@symbo.ls/element 3.14.802 → 3.14.804

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,32 @@
1
1
  # @symbo.ls/element
2
2
 
3
+ ## 3.14.804
4
+
5
+ ### Patch Changes
6
+
7
+ - A navigation skips the router's scroll-to-top when the scroll node is already at the origin (no forced layout after the swap; the first render keeps it). A yielding mount chunk ends before the next child would cross the 50 ms budget, so chunks are no longer long tasks. `el.update({ style })` keeps a custom property's name as written.
8
+
9
+ ## 3.14.803
10
+
11
+ ### Patch Changes
12
+
13
+ - Performance pass on the 3.14.827–3.14.832 batch, and opt-in View Transitions.
14
+
15
+ - Element create is faster than 3.14.826 again (kekela-like 4,068-element tree: create CPU min 1,265–1,355 ms vs 1,361–1,532 ms on 3.14.826). Per-definition caching of the extends merge layers (46,330 → 13,600 entries), no per-element source-text reads, one attribute writer.
16
+ - `css()` 3x faster (21 → 7 µs per call), byte-identical CSS output.
17
+ - Helmet renders a head layer only when its values change (20 `root.update({})` → 0 head renders, was 40). One runtime head writer: `applyElementMetadata`.
18
+ - brender/mermaid: registry script is escaped on the ISR and non-adopt paths; head/SSR output byte-identical otherwise.
19
+ - View Transitions for page switches (opt-in), `viewTransitionName` / `viewTransitionClass` flat props, `designSystem.viewTransition` animations.
20
+ - utils exports shared helpers used by helmet, frank, fetch and polyglot (escapeHtml, jsonForScript, alternateLinkKey, faviconLinkKey, bareLibraryKey, librarySpecsFor, polyglotLangStorageKey, ...).
21
+
22
+ - Updated dependencies
23
+ - @symbo.ls/signal@3.14.787
24
+ - @symbo.ls/css@3.14.777
25
+ - css-in-props@3.14.762
26
+ - attrs-in-props@3.14.696
27
+ - @symbo.ls/scratch@3.14.788
28
+ - @symbo.ls/utils@3.14.786
29
+
3
30
  ## 3.14.802
4
31
 
5
32
  ### Patch Changes
@@ -1 +1 @@
1
- "use strict";var d=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var b=(t,r)=>{for(var n in r)d(t,n,{get:r[n],enumerable:!0})},M=(t,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of _(r))!B.call(t,i)&&i!==n&&d(t,i,{get:()=>r[i],enumerable:!(o=g(r,i))||o.enumerable});return t};var O=t=>M(d({},"__esModule",{value:!0}),t);var U={};b(U,{destroyBridge:()=>L,mountBridge:()=>w});module.exports=O(U);var s=require("@symbo.ls/signal"),c=require("@symbo.ls/scratch"),h=require("@symbo.ls/utils/function.js"),l=require("./devRuntime.js");const x=(t,r)=>Object.prototype.hasOwnProperty.call(t,r);function f(t,r,n){t.context?.plugins?.length&&(0,h.runPluginHook)("error",t,{hook:r,error:n})||console.error(`[DOMQL] Lifecycle "${r}" error:`,n)}function u(t,r,n){const o=(0,s.getObserver)();o&&(0,s.setObserver)(null);const i=t.context?.designSystem;i&&(0,c.pushConfig)(i);try{return r.call(t,n,t,t.state,t.context)}finally{i&&(0,c.popConfig)(),o&&(0,s.setObserver)(o)}}function D(t,r){if(!(0,l.isLoudDevRuntime)())return;const n=r.__children&&r.__children.length>0;!n&&t.html==null||console.warn(`[smbls] bridge host "${r.path.join(".")}" renders DOMQL ${n?"children":"html"} inside the node it hands to its library \u2014 the library owns that subtree and may replace them. Keep DOMQL children beside the host, not in it.`)}function w(t){const r=t.__ref,n=t.node;if(!r||!n||r.__bridge||typeof t.onBridgeMount!="function"||!("scrollHeight"in n))return;const o=r.__bridge={settled:!1,failed:!1,disposed:!1,destroyed:!1,instance:void 0,effect:null};r.contentManaged=!0,D(t,r);let i;try{i=u(t,t.onBridgeMount,n)}catch(e){if(o.failed=!0,f(t,"onBridgeMount",e),t.context?.strictMode)throw e;return}if(i&&typeof i.then=="function"){i.then(e=>a(t,o,e),e=>{o.failed=!0,f(t,"onBridgeMount",e)});return}a(t,o,i)}function a(t,r,n){if(r.settled=!0,r.instance=n,r.disposed){p(t,r);return}if(Object.defineProperty(t,"bridge",{value:n,writable:!0,configurable:!0,enumerable:!1}),typeof t.onBridgeUpdate!="function")return;const o=t.__ref;r.effect=(0,s.createEffect)(()=>{if(r.disposed)return;const i=t.context?.designSystem;i&&(0,c.pushConfig)(i);try{const e=t.onBridgeUpdate.call(t,r.instance,t,t.state,t.context);e&&typeof e.then=="function"&&e.catch(y=>f(t,"onBridgeUpdate",y))}catch(e){f(t,"onBridgeUpdate",e)}finally{i&&(0,c.popConfig)()}},{depth:o.path.length,label:()=>o.path.join(".")+"::onBridgeUpdate"}),o.__effects.push(r.effect)}function L(t){const r=t.__ref?.__bridge;!r||r.disposed||(r.disposed=!0,r.effect&&r.effect.dispose(),r.settled&&p(t,r))}function p(t,r){if(r.destroyed)return;r.destroyed=!0;const n=r.instance;if(r.instance=void 0,x(t,"bridge")&&(t.bridge=void 0),typeof t.onBridgeDestroy=="function")try{const o=u(t,t.onBridgeDestroy,n);o&&typeof o.then=="function"&&o.catch(i=>f(t,"onBridgeDestroy",i))}catch(o){f(t,"onBridgeDestroy",o)}}
1
+ "use strict";var c=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var _=Object.prototype.hasOwnProperty;var l=(t,r)=>{for(var n in r)c(t,n,{get:r[n],enumerable:!0})},B=(t,r,n,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of g(r))!_.call(t,o)&&o!==n&&c(t,o,{get:()=>r[o],enumerable:!(i=y(r,o))||i.enumerable});return t};var b=t=>B(c({},"__esModule",{value:!0}),t);var x={};l(x,{destroyBridge:()=>O,mountBridge:()=>M});module.exports=b(x);var h=require("@symbo.ls/signal"),f=require("./runContext.js"),s=require("./pluginHooks.js"),p=require("./devRuntime.js");const w=(t,r)=>Object.prototype.hasOwnProperty.call(t,r);function d(t,r,n){return(0,f.untrack)(()=>(0,f.withDesignSystem)(t,()=>r.call(t,n,t,t.state,t.context)))}function D(t,r){if(!(0,p.isLoudDevRuntime)())return;const n=r.__children&&r.__children.length>0;!n&&t.html==null||console.warn(`[smbls] bridge host "${r.path.join(".")}" renders DOMQL ${n?"children":"html"} inside the node it hands to its library \u2014 the library owns that subtree and may replace them. Keep DOMQL children beside the host, not in it.`)}function M(t){const r=t.__ref,n=t.node;if(!r||!n||r.__bridge||typeof t.onBridgeMount!="function"||!("scrollHeight"in n))return;const i=r.__bridge={settled:!1,failed:!1,disposed:!1,destroyed:!1,instance:void 0,effect:null};r.contentManaged=!0,D(t,r);let o;try{o=d(t,t.onBridgeMount,n)}catch(e){if(i.failed=!0,(0,s.reportLifecycleError)(t,"onBridgeMount",e),t.context?.strictMode)throw e;return}if(o&&typeof o.then=="function"){o.then(e=>u(t,i,e),e=>{i.failed=!0,(0,s.reportLifecycleError)(t,"onBridgeMount",e)});return}u(t,i,o)}function u(t,r,n){if(r.settled=!0,r.instance=n,r.disposed){a(t,r);return}if(Object.defineProperty(t,"bridge",{value:n,writable:!0,configurable:!0,enumerable:!1}),typeof t.onBridgeUpdate!="function")return;const i=t.__ref;r.effect=(0,h.createEffect)(()=>{r.disposed||(0,f.withDesignSystem)(t,()=>{try{const o=t.onBridgeUpdate.call(t,r.instance,t,t.state,t.context);o&&typeof o.then=="function"&&o.catch(e=>(0,s.reportLifecycleError)(t,"onBridgeUpdate",e))}catch(o){(0,s.reportLifecycleError)(t,"onBridgeUpdate",o)}})},{depth:i.path.length,label:()=>i.path.join(".")+"::onBridgeUpdate"}),i.__effects.push(r.effect)}function O(t){const r=t.__ref?.__bridge;!r||r.disposed||(r.disposed=!0,r.effect&&r.effect.dispose(),r.settled&&a(t,r))}function a(t,r){if(r.destroyed)return;r.destroyed=!0;const n=r.instance;if(r.instance=void 0,w(t,"bridge")&&(t.bridge=void 0),typeof t.onBridgeDestroy=="function")try{const i=d(t,t.onBridgeDestroy,n);i&&typeof i.then=="function"&&i.catch(o=>(0,s.reportLifecycleError)(t,"onBridgeDestroy",o))}catch(i){(0,s.reportLifecycleError)(t,"onBridgeDestroy",i)}}
@@ -1,6 +1,6 @@
1
- "use strict";var Ns=Object.create;var Ut=Object.defineProperty;var Fs=Object.getOwnPropertyDescriptor;var $s=Object.getOwnPropertyNames;var Is=Object.getPrototypeOf,Us=Object.prototype.hasOwnProperty;var Bs=(t,o)=>{for(var s in o)Ut(t,s,{get:o[s],enumerable:!0})},ko=(t,o,s,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of $s(o))!Us.call(t,e)&&e!==s&&Ut(t,e,{get:()=>o[e],enumerable:!(n=Fs(o,e))||n.enumerable});return t};var Hs=(t,o,s)=>(s=t!=null?Ns(Is(t)):{},ko(o||!t||!t.__esModule?Ut(s,"default",{value:t,enumerable:!0}):s,t)),Vs=t=>ko(Ut({},"__esModule",{value:!0}),t);var se={};Bs(se,{BEFORE_UPDATE_MAX_CONSECUTIVE_FAILURES:()=>Zt,acquireBeforeUpdateGuard:()=>Os,checkedBefore:()=>xt,create:()=>m,default:()=>oe,flushMounts:()=>Yt,followChecked:()=>wt,isStaticCssProp:()=>Bn,recompileStaticCss:()=>Hn,reconcileAttrProp:()=>Vn,releaseBeforeUpdateGuard:()=>$t,resolveStyleBlock:()=>qt,writeElementText:()=>Ft});module.exports=Vs(se);var I=require("@symbo.ls/signal"),C=require("@symbo.ls/signal"),ot=require("./cache.js"),B=require("./registry.js"),St=require("./delegate.js"),vs=require("./bridge.js"),Qt=require("./extends.js"),js=require("./methods.js"),ie=require("./dispose.js"),nt=require("./devRuntime.js"),G=require("./mountScheduler.js"),M=require("@symbo.ls/utils"),lt=Hs(require("@symbo.ls/utils"),1),Y=require("@symbo.ls/utils/function.js"),ut=require("@symbo.ls/state"),P=require("css-in-props"),tt=require("@symbo.ls/css"),j=require("@symbo.ls/scratch"),k=require("attrs-in-props"),Es=require("./engineRegistry.js"),q=require("./cssLonghands.js"),K=require("./attributeFirst.js"),Ps=require("./version.js");const vo=(0,Es.resolveElementIdEngine)({uniqId:1,scopedStyleId:0},Ps.VERSION),jt=[],it=new Set;let oo=!1,jo=0,pt=null,Et=null;function ht(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function Eo(){return typeof document<"u"&&document.visibilityState==="hidden"}const Gs=250,Ws=1e3;function Ks(){return Et&&(Et!==(typeof requestAnimationFrame=="function"?requestAnimationFrame:null)||Eo())?!0:ht()-jo>=Ws}function zs(){if(oo=!0,jo=ht(),Et=null,typeof requestAnimationFrame!="function"){const t=typeof clearTimeout=="function"?clearTimeout:null,o=setTimeout(Yt,0);pt=t?()=>t(o):null;return}if(Eo()){const t=typeof clearTimeout=="function"?clearTimeout:null,o=setTimeout(Yt,Gs);pt=t?()=>t(o):null}else{const t=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:null;Et=requestAnimationFrame;const o=requestAnimationFrame(Yt);pt=t?()=>t(o):null}}function Bt(){if(oo){if(!Ks())return;const t=pt;if(pt=null,t)try{t()}catch{}}zs()}const Po=300,Oo=15e4;function Yt(){if(oo=!1,pt=null,Et=null,it.size&&Wn(),!jt.length)return;const t=jt.splice(0,jt.length);for(let o=0;o<t.length;o++){const s=t[o];if(s.node){if(!s.node.isConnected){const n=s.__ref||(s.__ref={});n.__mountAttempts=(n.__mountAttempts||0)+1,n.__mountFirstAttemptAt==null&&(n.__mountFirstAttemptAt=ht());const e=ht()-n.__mountFirstAttemptAt;n.__mountAttempts<=Po&&e<Oo?(jt.push(s),Bt()):console.warn("[DOMQL] onMounted dropped after",n.__mountAttempts,"attempts /",e,"ms \u2014 node never connected:",s.key||s.tag||s);continue}typeof s.onBridgeMount=="function"&&(0,vs.mountBridge)(s),typeof s.onMounted=="function"&&F("Mounted",s,s.__ref?.__mountOptions||{})}}}function so(t,o){const s=t.__ref?.__autoGrow;s&&s.active&&Mt(t,!0),!(typeof t.onMounted!="function"&&typeof t.onBridgeMount!="function")&&(t.__ref.__mountOptions=o,jt.push(t),Bt())}function To(t,o){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&(0,Y.runPluginHook)("contentUpdate",t,o);const s=t.context?.designSystem;s&&(0,j.pushConfig)(s);try{t.onContentUpdate(t,t.state,t.context,o)}catch(n){if(t.context?.plugins?.length&&(0,Y.runPluginHook)("error",t,{hook:"onContentUpdate",error:n})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',n),t.context?.strictMode)throw n}finally{s&&(0,j.popConfig)()}}function Q(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function Ys(t){return t.charAt(2).toLowerCase()+t.slice(3)}function qs(t){return t.toLowerCase()}function no(t){const o=t.charCodeAt(0);return o===58||o===64||o===38||o===91}function Pt(t,o){const s={...t};for(const n in o){const e=s[n],i=o[n];e&&i&&typeof e=="object"&&typeof i=="object"&&!Array.isArray(e)&&!Array.isArray(i)&&typeof e!="function"&&typeof i!="function"?s[n]=Pt(e,i):s[n]=i}return s}function Ht(t){if(typeof t=="string")return t||void 0;if(typeof t=="number"||typeof t=="bigint")return String(t)}function Lo(t,o,s,n){return Vt(n,Ht(t)||(o&&typeof o=="object"?Ht(o.key):void 0)||String(s))}function Vt(t,o){if(!t||typeof o!="string")return o;let s=o;for(;Zs(t,s);)s="$"+s;return s!==o&&Qs(t,o,s),s}function Zs(t,o){if(B.REGISTRY.has(o)&&o!=="content")return!0;if(!(o in t))return!1;const s=t[o];return!(s&&typeof s=="object"&&s.__ref&&s.parent===t)}const Do=new Set;function Qs(t,o,s){if(!(0,nt.isLoudDevRuntime)())return;const n=t.__ref&&t.__ref.path&&t.__ref.path.join(".")||t.key||"<root>",e=n+"::"+o;Do.has(e)||(Do.add(e),console.warn(`[smbls] a child keyed "${o}" at ${n} names a property of its parent; it lives at el["${s}"] (data-key="${s}") so the parent keeps its own "${o}". Prefix the data keys to keep plain el.<key> access.`))}function m(t,o,s,n={},e){const i=(0,C.getObserver)();if(i){(0,C.setObserver)(null);try{return m(t,o,s,n,e)}finally{(0,C.setObserver)(i)}}if(t==null||t===!1)return null;const a=yn(t);(typeof t=="string"||typeof t=="number")&&(t={text:t}),s=Ht(s);const c=Ht(t.key),r=Object.create(null);r.key=s||(c&&o?Vt(o,c):c)||`_${vo.uniqId++}`,r.parent=o||null,r.context=t.context||o?.context||n.context||{},r.context.__create||(r.context.__create=m);const f=r.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:o?.__ref?.root||r,path:o?.__ref?.path?[...o.__ref.path,r.key]:[r.key],origin:t};a&&(f.__runtimeSource=a);const l=t;if(t=Ro(r,t,s,c,o,n),r.if!=null){let d;if(typeof r.if=="function")try{d=r.if(r,r.state,r.context)}catch(h){if(d=!1,f.__ifError=h,typeof console<"u"&&console.warn){const y=r.key||r.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${y} \u2014 treating as false:`,h?.message||h)}}else d=r.if;f.__if=!!d}if(f.__if)typeof r.if=="function"&&(f.__ifInitialized=!0);else{o&&(o[r.key]=r);const d=ms(t,s,r.context?.components);return d.length&&(f.__ifLateMerge={definition:l,key:s,ownKey:c,names:d,options:n}),typeof r.if=="function"&&Ko(r,f,r.if),r}r.tag||(r.tag=(0,ot.detectTag)(r)),F("Init",r,n);const u=r.node=(0,ot.adoptHydrationNode)(r)||(0,ot.cacheNode)(r);if(!u)return r;if(r.tag==="fragment"){const h=(r.context?.document||globalThis.document).createComment("");u.appendChild(h),f.__fragmentAnchor=h}F("AttachNode",r,n),u.setAttribute&&r.key&&u.setAttribute("data-key",r.key),o&&(o[r.key]=r,o.__ref?.__children&&(o.__ref.__children.includes(r.key)||o.__ref.__children.push(r.key))),u.setAttribute&&r.context?.scopeSelector&&r.context.scopeSelector!==":root"&&r.context.key&&r.key===r.context.key&&u.setAttribute("data-smbls-app",r.context.key),r.id&&u.setAttribute&&(u.id=r.id),Ss(r,n),Go(r),ao(r),ps(r),_o(r),xs(r),mn(r);try{Cs(r,n)}catch(d){if(typeof console<"u"&&console.error){const h=r.__ref?.path?.join(".")||r.key||"<root>";console.error(`[smbls] createChildren failed at ${h}:`,d?.message||d,d?.stack?`
2
- `+d.stack.split(`
1
+ "use strict";var Gs=Object.create;var Ht=Object.defineProperty;var Ks=Object.getOwnPropertyDescriptor;var Ws=Object.getOwnPropertyNames;var zs=Object.getPrototypeOf,Ys=Object.prototype.hasOwnProperty;var qs=(t,o)=>{for(var s in o)Ht(t,s,{get:o[s],enumerable:!0})},jo=(t,o,s,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of Ws(o))!Ys.call(t,e)&&e!==s&&Ht(t,e,{get:()=>o[e],enumerable:!(n=Ks(o,e))||n.enumerable});return t};var Zs=(t,o,s)=>(s=t!=null?Gs(zs(t)):{},jo(o||!t||!t.__esModule?Ht(s,"default",{value:t,enumerable:!0}):s,t)),Qs=t=>jo(Ht({},"__esModule",{value:!0}),t);var _e={};qs(_e,{BEFORE_UPDATE_MAX_CONSECUTIVE_FAILURES:()=>Qt,acquireBeforeUpdateGuard:()=>$s,create:()=>ot,default:()=>ye,flushMounts:()=>Zt,isStaticCssProp:()=>Jn,recompileStaticCss:()=>mn,reconcileAttrProp:()=>oe,releaseBeforeUpdateGuard:()=>It,resolveStyleBlock:()=>$t,writeAttr:()=>Ft,writeElementText:()=>Nt});module.exports=Qs(_e);var $=require("@symbo.ls/signal"),E=require("@symbo.ls/signal"),W=require("./runContext.js"),nt=require("./cache.js"),H=require("./registry.js"),At=require("./delegate.js"),Rs=require("./bridge.js"),xt=require("./extends.js"),Ms=require("./methods.js"),xe=require("./dispose.js"),it=require("./devRuntime.js"),U=require("./mountScheduler.js"),L=require("@symbo.ls/utils"),Ut=Zs(require("@symbo.ls/utils"),1),z=require("./pluginHooks.js"),ut=require("@symbo.ls/state"),k=require("css-in-props"),st=require("@symbo.ls/css"),M=require("@symbo.ls/scratch"),v=require("attrs-in-props"),Ns=require("./engineRegistry.js"),I=require("./cssLonghands.js"),Q=require("./attributeFirst.js"),Fs=require("./version.js");const Eo=(0,Ns.resolveElementIdEngine)({uniqId:1,scopedStyleId:0},Fs.VERSION),Ct=[],ct=new Set;let oo=!1,Po=0,pt=null,kt=null;function ht(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function Oo(){return typeof document<"u"&&document.visibilityState==="hidden"}const Xs=250,Js=1e3;function ms(){return kt&&(kt!==(typeof requestAnimationFrame=="function"?requestAnimationFrame:null)||Oo())?!0:ht()-Po>=Js}function tn(){if(oo=!0,Po=ht(),kt=null,typeof requestAnimationFrame!="function"){const t=typeof clearTimeout=="function"?clearTimeout:null,o=setTimeout(Zt,0);pt=t?()=>t(o):null;return}if(Oo()){const t=typeof clearTimeout=="function"?clearTimeout:null,o=setTimeout(Zt,Xs);pt=t?()=>t(o):null}else{const t=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:null;kt=requestAnimationFrame;const o=requestAnimationFrame(Zt);pt=t?()=>t(o):null}}function Vt(){if(oo){if(!ms())return;const t=pt;if(pt=null,t)try{t()}catch{}}tn()}const To=300,Do=15e4;function Zt(){if(oo=!1,pt=null,kt=null,ct.size&&ne(),!Ct.length)return;const t=Ct.splice(0,Ct.length);for(let o=0;o<t.length;o++){const s=t[o];if(s.node){if(!s.node.isConnected){const n=s.__ref||(s.__ref={});n.__mountAttempts=(n.__mountAttempts||0)+1,n.__mountFirstAttemptAt==null&&(n.__mountFirstAttemptAt=ht());const e=ht()-n.__mountFirstAttemptAt;n.__mountAttempts<=To&&e<Do?(Ct.push(s),Vt()):console.warn("[DOMQL] onMounted dropped after",n.__mountAttempts,"attempts /",e,"ms \u2014 node never connected:",s.key||s.tag||s);continue}typeof s.onBridgeMount=="function"&&(0,Rs.mountBridge)(s),typeof s.onMounted=="function"&&N("Mounted",s,s.__ref?.__mountOptions||{})}}}function so(t,o){const s=t.__ref?.__autoGrow;s&&s.active&&Rt(t,!0),!(typeof t.onMounted!="function"&&typeof t.onBridgeMount!="function")&&(t.__ref.__mountOptions=o,Ct.push(t),Vt())}function Lo(t,o){typeof t.onContentUpdate=="function"&&((0,z.dispatchPluginHook)("contentUpdate",t,o),(0,W.withDesignSystem)(t,()=>{try{t.onContentUpdate(t,t.state,t.context,o)}catch(s){if((0,z.reportLifecycleError)(t,"onContentUpdate",s),t.context?.strictMode)throw s}}))}function m(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function on(t){return t.charAt(2).toLowerCase()+t.slice(3)}function sn(t){return t.toLowerCase()}function no(t){const o=t.charCodeAt(0);return o===58||o===64||o===38||o===91}function vt(t,o){const s={...t};for(const n in o){const e=s[n],c=o[n];e&&c&&typeof e=="object"&&typeof c=="object"&&!Array.isArray(e)&&!Array.isArray(c)&&typeof e!="function"&&typeof c!="function"?s[n]=vt(e,c):s[n]=c}return s}function Gt(t){if(typeof t=="string")return t||void 0;if(typeof t=="number"||typeof t=="bigint")return String(t)}function Ro(t,o,s,n){return Kt(n,Gt(t)||(o&&typeof o=="object"?Gt(o.key):void 0)||String(s))}function Kt(t,o){if(!t||typeof o!="string")return o;let s=o;for(;nn(t,s);)s="$"+s;return s!==o&&en(t,o,s),s}function nn(t,o){if(H.REGISTRY.has(o)&&o!=="content")return!0;if(!(o in t))return!1;const s=t[o];return!(s&&typeof s=="object"&&s.__ref&&s.parent===t)}const Mo=new Set;function en(t,o,s){if(!(0,it.isLoudDevRuntime)())return;const n=t.__ref&&t.__ref.path&&t.__ref.path.join(".")||t.key||"<root>",e=n+"::"+o;Mo.has(e)||(Mo.add(e),console.warn(`[smbls] a child keyed "${o}" at ${n} names a property of its parent; it lives at el["${s}"] (data-key="${s}") so the parent keeps its own "${o}". Prefix the data keys to keep plain el.<key> access.`))}function ot(t,o,s,n={},e){if((0,E.getObserver)())return(0,W.untrack)(()=>ot(t,o,s,n,e));if(t==null||t===!1)return null;const c=kn(t);(typeof t=="string"||typeof t=="number")&&(t={text:t}),s=Gt(s);const a=Gt(t.key),r=Object.create(null);r.key=s||(a&&o?Kt(o,a):a)||`_${Eo.uniqId++}`,r.parent=o||null,r.context=t.context||o?.context||n.context||{},r.context.__create||(r.context.__create=ot);const i=r.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:o?.__ref?.root||r,path:o?.__ref?.path?[...o.__ref.path,r.key]:[r.key],origin:t};c&&(i.__runtimeSource=c);const f=t;if(t=Fo(r,t,s,a,o,n),r.if!=null){let u;if(typeof r.if=="function")try{u=r.if(r,r.state,r.context)}catch(l){if(u=!1,i.__ifError=l,typeof console<"u"&&console.warn){const g=r.key||r.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${g} \u2014 treating as false:`,l?.message||l)}}else u=r.if;i.__if=!!u}if(i.__if)typeof r.if=="function"&&(i.__ifInitialized=!0);else{o&&(o[r.key]=r);const u=fn(t,s,r.context?.components);return u.length&&(i.__ifLateMerge={definition:f,key:s,ownKey:a,names:u,options:n}),typeof r.if=="function"&&mo(r,i,r.if),r}r.tag||(r.tag=(0,nt.detectTag)(r)),N("Init",r,n);const d=r.node=(0,nt.adoptHydrationNode)(r)||(0,nt.cacheNode)(r);if(!d)return r;if(r.tag==="fragment"){const l=(r.context?.document||globalThis.document).createComment("");d.appendChild(l),i.__fragmentAnchor=l}N("AttachNode",r,n),d.setAttribute&&r.key&&d.setAttribute("data-key",r.key),o&&(o[r.key]=r,o.__ref?.__children&&(o.__ref.__children.includes(r.key)||o.__ref.__children.push(r.key))),d.setAttribute&&r.context?.scopeSelector&&r.context.scopeSelector!==":root"&&r.context.key&&r.key===r.context.key&&d.setAttribute("data-smbls-app",r.context.key),r.id&&d.setAttribute&&(d.id=r.id),Ts(r,n),Qo(r),Jo(r);try{Ds(r,n)}catch(u){if(typeof console<"u"&&console.error){const l=r.__ref?.path?.join(".")||r.key||"<root>";console.error(`[smbls] createChildren failed at ${l}:`,u?.message||u,u?.stack?`
2
+ `+u.stack.split(`
3
3
  `).slice(0,6).join(`
4
- `):"")}}if(zt(r,!0),ks(r,o,e),typeof r.html=="function"&&r.node&&!r.node.innerHTML){const d=r.context?.designSystem;d&&(0,j.pushConfig)(d);try{const h=r.html(r,r.state,r.context);h!=null&&typeof h!="function"&&(r.node.innerHTML=h)}catch{}finally{d&&(0,j.popConfig)()}}if(F("Create",r,n),F("Complete",r,n),F("Render",r,n),F("RenderRouter",r,n),so(r,n),typeof r.onFrame=="function"){const d=r.onFrame,h=r.context?.designSystem,y=()=>{if(r.node){if(r.node.isConnected){h&&(0,j.pushConfig)(h);try{d(r,r.state,r.context)}catch(A){console.error("[DOMQL] onFrame error:",A)}finally{h&&(0,j.popConfig)()}}requestAnimationFrame(y)}};requestAnimationFrame(y)}return r}function Ro(t,o,s,n,e,i){if(s&&!o.extends&&!o.extend){const b=s.indexOf("_"),w=s.indexOf(".");let p=b>0?b:-1;if(w>0&&(p<0||w<p)&&(p=w),p>0){const _=s.substring(0,p),x=t.context?.components;x&&(x[_]||x["smbls."+_])?o={...o,extends:_}:x&&(0,nt.isLoudDevRuntime)()&&(/^[A-Z]\w*_\d+$/.test(s)||/^[A-Z]\w*\.\w+$/.test(s))&&console.warn(`[smbls] auto-extend: key "${s}" looks like an instance of "${_}" but neither "${_}" nor "smbls.${_}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}t.__ref&&(t.__ref.__mergeLayer=null),(0,Qt.applyExtends)(t,o,i);const a=(0,Qt.openMergeLayer)(t),c=a?a.rank:0,r=new Set(["childProps","attr","style","scope","data","vars"]),f=t.props&&typeof t.props=="object"?t.props:null;for(const b in o){if(b==="parent"||b==="node"||b==="__ref"||b==="extends"||b==="context"||b==="props")continue;if(b==="key"){n&&(t.key=e?Vt(e,n):n);continue}const w=o[b];a&&a.set(b,c);const p=t[b],_=p&&w&&typeof p=="object"&&typeof w=="object"&&!Array.isArray(p)&&!Array.isArray(w)&&typeof p!="function"&&typeof w!="function";_&&b.charCodeAt(0)>=65&&b.charCodeAt(0)<=90?t[b]=Pt(p,w):_&&r.has(b)?t[b]={...p,...w}:_&&no(b)?t[b]=Pt(p,w):t[b]=w}function l(b){for(const w in b){const p=b[w],_=t[w],x=_&&p&&typeof _=="object"&&typeof p=="object"&&!Array.isArray(_)&&!Array.isArray(p)&&typeof _!="function"&&typeof p!="function";x&&w.charCodeAt(0)>=65&&w.charCodeAt(0)<=90?t[w]=Pt(_,p):x&&r.has(w)?t[w]={..._,...p}:x&&no(w)?t[w]=Pt(_,p):t[w]=p}}if(f&&l(f),o.props&&typeof o.props=="object"&&(l(o.props),a))for(const b in o.props)a.set(b,c);o.classlist!==void 0&&(t.classlist=o.classlist),o.text!==void 0&&(t.text=o.text),o.html!==void 0&&(t.html=o.html);const u=t.scope&&typeof t.scope=="object"?t.scope:null,d=e?.scope,h=t.context&&typeof t.context.globalScope=="object"&&t.context.globalScope||null,y=d||h||null;if(o.scope!==void 0||u){const b={};u&&Object.assign(b,u),o.scope!==void 0&&Object.assign(b,o.scope),t.scope=(0,I.createScopeStore)(b,y)}else y&&(t.scope=y);o.if!==void 0&&(t.if=o.if);const A=t.__ref,g=_n(t,A&&A.__runtimeSource);return A&&(A.__declaredArrays=g||void 0),(0,js.addMethods)(t),tn(t,e,o,i),o}const Xs=new Set(["key","parent","context","__ref"]);function Js(t,o){for(const e of Object.keys(t))Xs.has(e)||delete t[e];const s=(0,C.getObserver)();s&&(0,C.setObserver)(null);let n=o.definition;if(!n.extends&&!n.extend&&typeof o.key=="string"){const e=t.context?.components||{},i=e[o.key]||e["smbls."+o.key];i&&(n={...n,extends:i})}try{Ro(t,n,o.key,o.ownKey,t.parent,o.options)}finally{s&&(0,C.setObserver)(s)}}function ms(t,o,s){const n=s||{},e=c=>!!(n[c]||n["smbls."+c]),i=[],a=[];if(t.extends&&a.push(...Array.isArray(t.extends)?t.extends:[t.extends]),t.extend&&a.push(...Array.isArray(t.extend)?t.extend:[t.extend]),a.length){for(const c of a){if(typeof c!="string")continue;const r=c.includes(">")?c.split(">")[0].trim():c;e(r)||i.push(r)}return i}if(typeof o=="string"&&/^[A-Z]/.test(o)){let c=-1;const r=o.indexOf("_"),f=o.indexOf(".");r>0&&(c=r),f>0&&(c<0||f<c)&&(c=f);const l=c>0?o.substring(0,c):o;e(l)||i.push(l)}return i}function eo(t,o,s){if(typeof t.onStateInit!="function"&&!t.context?.plugins?.length)return;const n=t.state;t.state=o;try{F("StateInit",t,s)}finally{t.state=n}}function tn(t,o,s,n){const e=!o,i=s.state&&typeof s.state=="object"&&!Array.isArray(s.state)&&Object.keys(s.state).length===0,a=e&&i&&t.context?.state,c=s.state!==void 0&&!a?s.state:t.state&&!(0,I.isStore)(t.state)?t.state:void 0;if(c==null){if(o?.state)t.state=o.state,(0,ut.applyStateMethods)(t,t.state);else if(t.context?.state){const r=t.context.state,f={...r},l=t.context?.polyglot;if(l?.translations){const u=t.context,d=r.lang||l.defaultLang||"en",h=new Set,y=(b,w)=>{h.has(b)||(0,M.isPolyglotWritableKey)(u,b,f)&&(f[b]=w,h.add(b),(0,M.markPolyglotSeeded)(u,b,w))},A=l.translations[d];if(A&&typeof A=="object")for(const b in A)y(b,A[b]);const g=new Set(l.languages||[]);for(const b in l.translations)g.has(b)||y(b,l.translations[b])}(0,I.isStore)(f)||eo(t,f,n),t.state=(0,I.isStore)(f)?f:(0,I.createStore)(f),t.state.__element=t,t.state.root=t.state,(0,ut.applyStateMethods)(t,t.state),lt.promoteActiveRootState?.(r,t.state),F("StateCreated",t,n)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),(0,ut.applyStateMethods)(t,t.state);return}if(typeof c=="string"){if(t.state=Mo(c,o),t.state&&typeof t.state=="object"&&!(0,I.isStore)(t.state)){const r=o?.state?.root||o?.state||t.state;Object.defineProperty(t.state,"root",{value:r,enumerable:!1,configurable:!0,writable:!0})}(0,ut.applyStateMethods)(t,t.state),sn(t,c,o),F("StateCreated",t,n);return}if(typeof c=="function"){const r=c(t,o?.state);if((0,I.isStore)(r))t.state=r;else{const f=r||{};eo(t,f,n),t.state=(0,I.createStore)(f)}}else if((0,I.isStore)(c))t.state=c;else{const r={...c};eo(t,r,n),t.state=(0,I.createStore)(r)}t.state.__element=t,o?.state?(t.state.parent=o.state,t.state.root=o.state.root||o.state):t.state.root=t.state,(0,ut.applyStateMethods)(t,t.state),lt.promoteActiveRootState?.(c,t.state),F("StateCreated",t,n)}function ro(t,o){if(!o)return t;const s=o.split("/");let n=t;for(const e of s){if(n==null)return{};n=n[e]}return n??{}}function Mo(t,o){if(!o)return{};if(t===".")return o.state||{};if(t.startsWith("../")){const e=t.slice(3);return e?ro(o.state,e):o.state??{}}if(t.startsWith("~/")){const e=o.state?.root||o.state,i=t.slice(2);return i?ro(e,i):e??{}}if(o.state?.[t]!==void 0)return o.state[t];const s=ro(o.state,t);if(s!=null&&Object.keys(s).length>0)return s;const n=o.context?.polyglot;if(n?.translations){const e=o.state?.root?.lang||n.defaultLang||"en",i=n.translations[e];if(i?.[t]!==void 0)return i[t];if(n.translations[t]!==void 0)return n.translations[t]}return{}}function on(t,o){let s=o.state,n=t;if(t.startsWith("~/")?(s=o.state&&(o.state.root||o.state),n=t.slice(2)):t.startsWith("../")&&(n=t.slice(3)),!n||!s||typeof s!="object")return;const e=s[n];if(e!==void 0||n.indexOf("/")===-1)return e;let i=s;for(const a of n.split("/")){if(i==null||typeof i!="object")return;i=i[a]}return i}function sn(t,o,s){const n=t.__ref;if(!n||!s||o==="."||!(0,I.isStore)(s.state))return;n.__stateBinding&&n.__stateBinding.dispose();const e=(0,C.getObserver)();e&&(0,C.setObserver)(null);try{const i=(0,C.createEffect)(()=>{const a=on(o,s);if(!a||typeof a!="object"||a===t.state)return;const c=(0,C.getObserver)();(0,C.setObserver)(null);try{No(t,t.state,a,!0)}finally{(0,C.setObserver)(c)}},{depth:n.path?n.path.length:0,label:O(n,"state")});i._isStateBinding=!0,n.__stateBinding=i,n.__effects&&n.__effects.push(i)}finally{e&&(0,C.setObserver)(e)}}function No(t,o,s,n){const e=t.__ref;if(!e)return;if(n||t.state===o){t.state=s,n&&(0,ut.applyStateMethods)(t,s),Fo(e);const a=e.__children;if(a)for(let c=0;c<a.length;c++){const r=t[a[c]];r&&r.__ref&&r.parent===t&&No(r,o,s,!1)}return}if(e.__stateBinding){e.__stateBinding._notify();return}const i=t.state;i&&typeof i=="object"&&i.parent===o&&(i.parent=s,Fo(e))}function Fo(t){const o=t.__effects;if(o)for(let s=0;s<o.length;s++){const n=o[s];n&&!n._disposed&&!n._isStateBinding&&!n._isSubscribeToEffect&&typeof n._notify=="function"&&n._notify()}}const nn=new Set(["s","state","ctx","context"]);function en(t){try{const s=(typeof lt.getFunctionSource=="function"?lt.getFunctionSource(t):Function.prototype.toString.call(t)).match(/^[^(]*\(([^)]*)\)/);return s?s[1].split(",").map(n=>n.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function rn(t){let o;try{o=typeof lt.getFunctionSource=="function"?lt.getFunctionSource(t):Function.prototype.toString.call(t)}catch{return!0}if(typeof o!="string")return!0;const s=o.match(/^\s*(?:async\s+)?([A-Za-z_$][\w$]*)\s*=>/)||o.match(/^[^(]*\(([^)]*)\)/);if(!s)return!0;const n=o.slice(s.index+s[0].length);if(/\bstate\b|\barguments\b|\bcall\s*\(/.test(n))return!0;const i=s[1].split(",").map(c=>c.trim())[1];if(!i)return!1;if(!/^[A-Za-z_$][\w$]*$/.test(i.split("=")[0].trim()))return!0;const a=i.split("=")[0].trim();return new RegExp("(^|[^\\w$.])"+a.replace(/\$/g,"\\$")+"(?![\\w$])").test(n)}const cn=3,fn=/^(is|has)[A-Z0-9_$]/,an=new Set(["routerOptions"]),$o=new WeakSet;function un(t,o){if(typeof t!="function"||t.length!==2||o&&(fn.test(o)||an.has(o))||$o.has(t))return!1;const s=en(t);if(s.length<2)return!1;const n=s[1].replace(/[{}[\]]/g,"").trim();return n.length<cn||nn.has(n)?!1:($o.add(t),!0)}function dn(t){const o=t.__ref,s=t.tag||"div",n=t.context?.designSystem,e=[],i=Object.keys(t);for(let a=0;a<i.length;a++){const c=i[a];if(typeof t[c]!="function"||B.REGISTRY.has(c))continue;const r=c.charCodeAt(0);r>=65&&r<=90||Q(c)||P.CSS_PROPS_REGISTRY[c]||P.DEFAULT_CSS_PROPERTIES_LIST&&P.DEFAULT_CSS_PROPERTIES_LIST.has(c)||r!==45&&((0,k.checkAttributeByTagName)(s,c)||((0,nt.isLoudDevRuntime)()&&un(t[c],c)&&console.warn(`[smbls] custom prop "${c}"${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('${c}', \u2026) instead of reading el.${c}(\u2026) directly (see RULES.md Rule 8).`),e.push({prop:c,fn:t[c]})))}for(let a=0;a<e.length;a++){const{prop:c,fn:r}=e[a];o.__exec[c]=r,Object.defineProperty(t,c,{get(){n&&(0,j.pushConfig)(n);try{return r(t,t.state,t.context)}catch{return}finally{n&&(0,j.popConfig)()}},set(f){delete o.__exec[c],Object.defineProperty(t,c,{value:f,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function ln(t,o){if(!(!Array.isArray(o)||o.length===0))for(let s=0;s<o.length;s++){const n=o[s];try{typeof n=="function"?n(t,t.state,t.context):typeof n=="string"&&t.state?.[n]}catch{}}}function R(t,o,s){return!Array.isArray(o)||o.length===0?s:function(...n){return ln(t,o),s.apply(this,n)}}function yt(t,o){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[o]}function O(t,o){return()=>t.path.join(".")+"::"+o}const Io=new Set;function N(t,o,s){if(!(0,nt.isLoudDevRuntime)())return;const n=O(t,o)();Io.has(n)||(Io.add(n),console.warn(`[smbls] "${o}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,s?.message||s))}const Uo=/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,pn=(t,o)=>{let s;try{s=String(t)}catch{return}if(!s.includes("{{"))return;Uo.lastIndex=0;let n;for(;(n=Uo.exec(s))!==null;)n[2].includes("{{")&&o.add(n[2])},hn=(t,o)=>!Q(t)&&!(0,K.isCssProp)(o,t),io=(t,o,s,n,e)=>{if(typeof o=="string"){!e&&o.includes("{{")&&s.add(o);return}typeof o=="function"&&hn(t,n)&&pn(o,s)},co=new WeakMap,Ot=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),Tt=t=>{if(typeof t=="string"||typeof t=="number")return{text:t};if(!t||typeof t!="object"||Array.isArray(t))return null;const o=t.props;return o&&typeof o=="object"&&!Array.isArray(o)?at(t,o):t},Lt=(t,o)=>t&&o?at(t,o):t||o||null,Bo=(t,o)=>{const s=t.__ref&&t.__ref.__runtimeSource;return!!s&&Ot(s,o)},_t=(t,o)=>Bo(t,o)?Tt(t.__ref.__runtimeSource[o]):null,Dt=(t,o)=>(o&&t&&typeof t=="object"&&co.set(t,o),t),yn=t=>{if(!t||typeof t!="object")return;const o=co.get(t);return o&&co.delete(t),o},fo=(t,o,s)=>{if(typeof t=="string"){t.includes("{{")&&o.add(t);return}if(!(!t||typeof t!="object"||s.has(t))){if(s.add(t),Array.isArray(t)){for(let n=0;n<t.length;n++)fo(t[n],o,s);return}if(!t.__ref)for(const n of Object.keys(t)){if(n==="state")continue;const e=Object.getOwnPropertyDescriptor(t,n);e&&"value"in e&&fo(e.value,o,s)}}},_n=(t,o)=>{let s=null;for(const n of Object.keys(t)){if(B.REGISTRY.has(n)||o&&Ot(o,n))continue;const e=Object.getOwnPropertyDescriptor(t,n),i=e&&e.value;if(!Array.isArray(i))continue;const a=new Set;fo(i,a,new Set),a.size&&(s||(s=new Map),s.set(i,a))}return s},Ho=(t,o)=>{if(Array.isArray(o))for(let s=t;s;s=s.parent){const n=s.__ref&&s.__ref.__declaredArrays,e=n&&n.get(o);if(!e)continue;const i=t.__ref;i.__authoredTemplates||(i.__authoredTemplates=new Set);for(const a of e)i.__authoredTemplates.add(a);return}},Vo=["attr","aria","data","metadata"],gn=t=>{if(Vo.includes(t))return!0;const o=t.charCodeAt(0);return o===46||o===33||o===64},bn=(t,o)=>{const s=new Set,n=t.tag||"div";for(const e of Object.keys(t)){const i=Object.getOwnPropertyDescriptor(t,e),a=i&&i.value,c=!!o&&Ot(o,e);if(a&&typeof a=="object"&&!Array.isArray(a)){if(!gn(e))continue;const r=c?o[e]:null,f=r&&typeof r=="object"?r:null,l=e.charCodeAt(0)===46||e.charCodeAt(0)===33;for(const u in a){const d=c&&(!f||Ot(f,u)),h=a[u];if(l&&h&&typeof h=="object"&&!Array.isArray(h)&&Vo.includes(u)){for(const y in h)io(y,h[y],s,n,d);continue}io(u,h,s,n,d)}continue}io(e,a,s,n,c)}return s};function Go(t,o){const s=t.__ref,n=!!(o&&o.skipIfEffect),e=bn(t,s.__runtimeSource);if(s.__authoredTemplates)for(const r of e)s.__authoredTemplates.add(r);else s.__authoredTemplates=e;if(dn(t),typeof t.text=="function"){const r=t.text,f=R(t,t.textDeps,r),l=(0,C.createEffect)(()=>{if(!s.contentManaged)try{let u=f(t,t.state,t.context);t.node&&u!=null&&typeof u!="function"&&typeof u!="object"&&(typeof u=="string"&&u.includes("{{")&&(u=M.replaceLiteralsWithObjectFields.call(t,u,t.state)),Ft(t,u))}catch(u){N(s,"text",u)}},{depth:s.path.length,label:O(s,"text")});s.__effects.push(l),s.__exec.text=r}else if(typeof t.text=="string"&&t.text.includes("{{")){const r=t.text,f=(0,C.createEffect)(()=>{if(s.contentManaged)return;const l=M.replaceLiteralsWithObjectFields.call(t,r,t.state);l!=null&&(t.text=l),t.node&&Ft(t,l??"")},{depth:s.path.length,label:O(s,"text")});s.__effects.push(f),s.__exec.text=r}const i=t.tag||"div";for(const r of Object.keys(t))if(typeof t[r]=="function"&&!B.REGISTRY.has(r)&&!Q(r)&&!s.__exec[r]&&!(0,K.isAttributeFirst)(i,r)){if(P.CSS_PROPS_REGISTRY[r]){const f=t[r],l=R(t,t[r+"Deps"],f),u=r;let d,h=null,y=null,A;const g=(0,C.createEffect)(()=>{const b=t.context?.designSystem;b&&(0,j.pushConfig)(b);try{const w=l(t,t.state,t.context);(0,P.pushStaticCssPass)();let p;try{p=P.CSS_PROPS_REGISTRY[u](w,t,t.state,t.context)}finally{(0,P.popStaticCssPass)()}if(Array.isArray(p)){const x={};for(const S of p)if(S)for(const E in S)x[E]=S[E];p=x}const _=u==="show"||u==="hide";if(p&&t.node&&An(p)){const x=Rt(p);if(x===null||x!==A){A=x;const S=(0,tt.css)(p,null,t.context?.cssPrefix),E=S?S.split(" ").filter(Boolean):null;if(t.node.classList){if(y)for(const v of y)t.node.classList.remove(v);if(E&&E.length)for(const v of E)t.node.classList.add(v);y=E}}d=void 0,h=null}else if(p&&t.node){if(y){for(const S of y)t.node.classList.remove(S);y=null,A=void 0}const x=Rt(p);if(x===null||x!==d||!bt(t.node,h)){d=x;const S=Xo(t,p);h=gt(t.node,S)}}else t.node&&_&&(d=void 0,h=null,t.node.style.display="")}finally{b&&(0,j.popConfig)()}},{depth:s.path.length,label:O(s,u)});s.__effects.push(g),s.__exec[r]=f}else if(P.DEFAULT_CSS_PROPERTIES_LIST&&P.DEFAULT_CSS_PROPERTIES_LIST.has(r)){const f=t[r],l=R(t,t[r+"Deps"],f),u=r;let d,h=null;const y=(0,C.createEffect)(()=>{const A=t.context?.designSystem;A&&(0,j.pushConfig)(A);try{const g=l(t,t.state,t.context);if(t.node)if(g!=null){const b=u+":"+String(g);if(b!==d||!bt(t.node,h)){d=b;const w={[u]:g},p=Xo(t,w);h=gt(t.node,p)}}else d=void 0,h=null,t.node.style[u]=""}finally{A&&(0,j.popConfig)()}},{depth:s.path.length,label:O(s,u)});s.__effects.push(y),s.__exec[r]=f}else if(r.charCodeAt(0)===45){const f=t[r];Zo(t,r,f,t[r+"Deps"],r),s.__exec[r]=f}}if(xn(t),typeof t.html=="function"){const r=t.html,f=R(t,t.htmlDeps,r),l=(0,C.createEffect)(()=>{const u=t.context?.designSystem;u&&(0,j.pushConfig)(u);try{const d=f(t,t.state,t.context);t.node&&d!=null&&typeof d!="function"&&(t.node.innerHTML=d)}finally{u&&(0,j.popConfig)()}},{depth:s.path.length,label:O(s,"html")});s.__effects.push(l),s.__exec.html=r}if(typeof t.value=="function"){const r=t.value,f=R(t,t.valueDeps,r),l=(0,C.createEffect)(()=>{try{let u=f(t,t.state,t.context);typeof u=="string"&&u.includes("{{")&&(u=M.replaceLiteralsWithObjectFields.call(t,u,t.state)),zo(t,u)}catch(u){N(s,"value",u)}},{depth:s.path.length,label:O(s,"value")});s.__effects.push(l),s.__exec.value=r}else if(typeof t.value=="string"&&t.value.includes("{{")){const r=t.value,f=(0,C.createEffect)(()=>{try{zo(t,M.replaceLiteralsWithObjectFields.call(t,r,t.state))}catch(l){N(s,"value",l)}},{depth:s.path.length,label:O(s,"value")});s.__effects.push(f),s.__exec.value=r}if(typeof t.style=="function"){const r=t.style,f=R(t,t.styleDeps,r);let l,u=null;const d=(0,C.createEffect)(()=>{const h=qt(t,f(t,t.state,t.context)),y=Rt(h);(y===null||y!==l||!bt(t.node,u))&&(l=y,Gt(t.node,u,h),J(t.node,h),u=gt(t.node,h))},{depth:s.path.length,label:O(s,"style")});s.__effects.push(d),s.__exec.style=r}else if(t.style&&typeof t.style=="object")for(const r in t.style){const f=t.style[r];if(typeof f!="function")continue;const l=R(t,yt(t.styleDeps,r),f);let u,d=null;const h=(0,C.createEffect)(()=>{try{const y=l(t,t.state,t.context);if(t.node){const A=r+":"+String(y);if(A!==u||!bt(t.node,d)){u=A;const g=qt(t,{[r]:y});Gt(t.node,d,Object.assign({},g,{[r]:""})),J(t.node,g),d=gt(t.node,g)}}}catch(y){N(s,"style."+r,y)}},{depth:s.path.length,label:O(s,"style."+r)});s.__effects.push(h)}if(t.attr&&typeof t.attr=="object"){for(const r in t.attr)if(typeof t.attr[r]=="function"){const f=R(t,yt(t.attrDeps,r),t.attr[r]),l=r,u=(0,C.createEffect)(()=>{try{let d=f(t,t.state,t.context);if(typeof d=="string"&&d.includes("{{")&&(d=M.replaceLiteralsWithObjectFields.call(t,d,t.state)),t.node?.setAttribute){const h=xt(t.node,l);d==null||d===!1&&!(0,k.isEnumeratedTrueFalseAttr)(l)?t.node.removeAttribute(l):typeof d!="function"&&typeof d!="object"&&t.node.setAttribute(l,(0,k.serializeAttrValue)(l,d)),wt(t.node,h)}}catch(d){N(s,"attr."+l,d)}},{depth:s.path.length,label:O(s,"attr."+l)});u._attrName=l.toLowerCase(),s.__effects.push(u)}else if(typeof t.attr[r]=="string"&&t.attr[r].includes("{{")){const f=t.attr[r],l=r,u=(0,C.createEffect)(()=>{try{const d=M.replaceLiteralsWithObjectFields.call(t,f,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(l,(0,k.serializeAttrValue)(l,d??""))}catch(d){N(s,"attr."+l,d)}},{depth:s.path.length,label:O(s,"attr."+l)});u._attrName=l.toLowerCase(),s.__effects.push(u)}}if(t.aria&&typeof t.aria=="object")for(const r in t.aria){const f=t.aria[r];if(typeof f=="string"&&f.includes("{{")){const h=f,y="aria-"+r.replace(/[A-Z]/g,g=>"-"+g.toLowerCase()),A=(0,C.createEffect)(()=>{try{const g=M.replaceLiteralsWithObjectFields.call(t,h,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(y,(0,k.serializeAttrValue)(y,g??""))}catch(g){N(s,"aria."+r,g)}},{depth:s.path.length,label:O(s,"aria."+r)});A._attrName=y,s.__effects.push(A);continue}if(typeof f!="function")continue;const l=R(t,yt(t.ariaDeps,r),t.aria[r]),u="aria-"+r.replace(/[A-Z]/g,h=>"-"+h.toLowerCase()),d=(0,C.createEffect)(()=>{try{const h=l(t,t.state,t.context);if(!t.node?.setAttribute)return;h==null?t.node.removeAttribute(u):typeof h!="function"&&typeof h!="object"&&t.node.setAttribute(u,(0,k.serializeAttrValue)(u,h))}catch(h){N(s,"aria."+r,h)}},{depth:s.path.length,label:O(s,"aria."+r)});d._attrName=u,s.__effects.push(d)}if(t.data&&typeof t.data=="object")for(const r in t.data){const f=t.data[r];if(typeof f=="string"&&f.includes("{{")){const y=f,A="data-"+r.replace(/[A-Z]/g,b=>"-"+b.toLowerCase()),g=(0,C.createEffect)(()=>{try{const b=M.replaceLiteralsWithObjectFields.call(t,y,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(A,b??"")}catch(b){N(s,"data."+r,b)}},{depth:s.path.length,label:O(s,"data."+r)});g._attrName=A,s.__effects.push(g);continue}if(typeof f!="function")continue;const l=R(t,yt(t.dataDeps,r),t.data[r]),d="data-"+r.replace(/[A-Z]/g,y=>"-"+y.toLowerCase()),h=(0,C.createEffect)(()=>{try{const y=l(t,t.state,t.context);if(!t.node?.setAttribute)return;y==null||y===!1?t.node.removeAttribute(d):typeof y!="function"&&typeof y!="object"&&t.node.setAttribute(d,y===!0?"":y)}catch(y){N(s,"data."+r,y)}},{depth:s.path.length,label:O(s,"data."+r)});h._attrName=d,s.__effects.push(h)}const a=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(a)for(const r in a){if(typeof a[r]!="function")continue;const f=R(t,yt(t.classDeps,r),a[r]),l=(0,C.createEffect)(()=>{try{const u=f(t,t.state,t.context);if(!t.node?.classList)return;typeof u=="string"?t.node.classList.add(u):u?t.node.classList.add(r):t.node.classList.remove(r)}catch(u){N(s,"class."+r,u)}},{depth:s.path.length,label:O(s,"class."+r)});s.__effects.push(l)}!n&&typeof t.if=="function"&&Ko(t,s,t.if);for(const r of Object.keys(t)){if(B.REGISTRY.has(r)||typeof t[r]!="function")continue;const f=r.charCodeAt(0);if(f>=65&&f<=90||Q(r))continue;const l=t[r];s.__exec[r]=l;const u=t.tag||"div";if((0,k.checkAttributeByTagName)(u,r)&&!(0,K.isCssProp)(u,r)){const d=(0,k.camelToAttr)(r)||r,h=R(t,t[r+"Deps"],l),y=(0,C.createEffect)(()=>{try{let A=h(t,t.state,t.context);if(typeof A=="string"&&A.includes("{{")&&(A=M.replaceLiteralsWithObjectFields.call(t,A,t.state)),t.node?.setAttribute){const g=xt(t.node,d);A==null||A===!1&&!(0,k.isEnumeratedTrueFalseAttr)(d)?t.node.removeAttribute(d):typeof A!="function"&&typeof A!="object"&&(d==="src"&&"src"in t.node?t.node.src=A:t.node.setAttribute(d,(0,k.serializeAttrValue)(d,A))),wt(t.node,g)}}catch(A){N(s,r,A)}},{depth:s.path.length,label:O(s,r)});y._attrName=d.toLowerCase(),s.__effects.push(y)}}const c=t.tag||"div";for(const r of Object.keys(t)){if(B.REGISTRY.has(r))continue;const f=t[r];if(typeof f!="string"||!f.includes("{{"))continue;const l=r.charCodeAt(0);if(l>=65&&l<=90||Q(r)||(0,K.isCssProp)(c,r)||k.ATTR_TRANSFORMS[r]||!(0,k.checkAttributeByTagName)(c,r))continue;const u=(0,k.camelToAttr)(r)||r,d=(0,C.createEffect)(()=>{try{const h=M.replaceLiteralsWithObjectFields.call(t,f,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(u,(0,k.serializeAttrValue)(u,h??""))}catch(h){N(s,r,h)}},{depth:s.path.length,label:O(s,r)});d._attrName=u.toLowerCase(),s.__effects.push(d)}if(En(t),Fn(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){const r=t.onStateUpdate,f=t.stateDeps;let l=!1,u=[];const d=(0,C.createEffect)(()=>{const h=[];for(let b=0;b<f.length;b++){const w=f[b];try{h[b]=typeof w=="function"?w(t,t.state,t.context):t.state?.[w]}catch{h[b]=void 0}}if(!l){l=!0,u=h;return}let y=h.length!==u.length;for(let b=0;!y&&b<h.length;b++)h[b]!==u[b]&&(y=!0);const A=u;if(u=h,!y)return;const g=t.context?.designSystem;g&&(0,j.pushConfig)(g);try{r(t,t.state,t.context,{prev:A,next:h})}catch(b){if(t.context?.plugins?.length&&(0,Y.runPluginHook)("error",t,{hook:"onStateUpdate",error:b})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',b),t.context?.strictMode)throw b}finally{g&&(0,j.popConfig)()}},{depth:s.path.length,label:O(s,"onStateUpdate")});s.__effects.push(d)}Ln(t)}function Wo(t){const o=t.parent,s=o?.node;if(!s||!t.node){ks(t,t.parent);return}let n=null;const e=Object.keys(o),i=e.indexOf(t.key);for(let a=i+1;a<e.length;a++){const c=o[e[a]];if(c?.node?.parentNode===s){n=c.node;break}}n?s.insertBefore(t.node,n):s.appendChild(t.node)}function Ko(t,o,s){let n=R(t,t.ifDeps,s);const e=(0,C.createEffect)(()=>{const i=!o.__ifInitialized&&o.__ifLateMerge;if(i){const r=t.context?.components||{};i.names.some(f=>r[f]||r["smbls."+f])&&(o.__ifLateMerge=null,Js(t,i),n=R(t,t.ifDeps,typeof t.if=="function"?t.if:s))}let a;try{a=n(t,t.state,t.context)}catch(r){if(a=!1,o.__ifError=r,typeof console<"u"&&console.warn){const f=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${f} \u2014 treating as false:`,r?.message||r)}return}const c=o.__if;if(o.__if=!!a,c&&!o.__if&&t.node){t.node.remove();try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(r){console.error("[smbls] onRemove error:",r)}}else if(!c&&o.__if)if(o.__ifInitialized)t.node||(t.node=(0,ot.cacheNode)(t)),t.node&&(t.node.ref=t),Wo(t),ao(t),_o(t),F("Render",t,{}),so(t,{});else{if(o.__ifInitialized=!0,o.__ifLateMerge=null,t.tag||(t.tag=(0,ot.detectTag)(t)),F("Init",t,{}),t.node||(t.node=(0,ot.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"&&!o.__fragmentAnchor){const f=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(f),o.__fragmentAnchor=f}F("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),Ss(t,{}),Go(t,{skipIfEffect:!0}),ao(t),ps(t),_o(t),xs(t),Cs(t,{}),Wo(t),F("Create",t,{}),F("Complete",t,{}),F("Render",t,{}),F("RenderRouter",t,{}),so(t,{})}},{depth:o.path.length,label:O(o,"if")});o.__effects.push(e)}function Ft(t,o){const s=t.node;if(!s)return;const n=o==null||typeof o=="object"?"":String(o);if(t.tag==="string"){s.nodeValue!==n&&(s.nodeValue=n);return}const e=t.__ref;let i=e?e.__textNode:null;if(i&&i.parentNode!==s&&(i=null),!i){const a=s.firstChild;a&&a.nodeType===3&&(i=a)}i?i.nodeValue!==n&&(i.nodeValue=n):s.firstChild?(i=(s.ownerDocument||t.context?.document||globalThis.document).createTextNode(n),s.insertBefore(i,s.firstChild)):(s.textContent=n,i=s.firstChild&&s.firstChild.nodeType===3?s.firstChild:null),e&&(e.__textNode=i||null)}function xt(t,o){return o!=="checked"||!t||t.tagName!=="INPUT"?null:t.hasAttribute("checked")}function wt(t,o){if(o===null)return;const s=t.hasAttribute("checked");s!==o&&t.checked!==s&&(t.checked=s)}function zo(t,o){const s=t.node;if(!s||!("value"in s))return;const n=o==null?"":String(o);if(s.value===n)return;const e=typeof document<"u"&&document.activeElement===s,i=e&&typeof s.selectionStart=="number"?s.selectionStart:null,a=e&&typeof s.selectionEnd=="number"?s.selectionEnd:null;if(s.value=n,e&&i!=null&&a!=null)try{s.setSelectionRange(i,a)}catch{}const c=t.__ref&&t.__ref.__autoGrow;c&&c.active&&c.resize()}function ao(t){const{node:o}=t;if(o){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&Ft(t,t.text),ls(t),typeof t.html=="string"&&(o.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&!(typeof t.value=="string"&&t.value.includes("{{"))&&"value"in o){const s=String(t.value);o.value!==s&&(o.value=s)}if(t.style&&typeof t.style=="object"){let s=t.style;for(const n in t.style)if(typeof t.style[n]=="function"){s={};for(const e in t.style)typeof t.style[e]!="function"&&(s[e]=t.style[e]);break}J(o,qt(t,s))}if(t.attr&&typeof t.attr=="object")for(const s in t.attr){const n=t.attr[s];typeof n=="function"||typeof n=="object"||n!=null&&(typeof n=="string"&&n.includes("{{")||n===!1&&!(0,k.isEnumeratedTrueFalseAttr)(s)||o.setAttribute&&o.setAttribute(s,(0,k.serializeAttrValue)(s,n)))}if(typeof t.themeModifier=="string"&&t.themeModifier&&o.setAttribute&&o.setAttribute("data-theme",t.themeModifier),t.data&&typeof t.data=="object")for(const s in t.data){const n=t.data[s];typeof n=="function"||typeof n=="object"||n==null||n===!1||typeof n=="string"&&n.includes("{{")||o.dataset&&(o.dataset[s]=n===!0?"":n)}if(t.classlist||t.class){const s=t.classlist||t.class;if(typeof s=="string")s.split(" ").forEach(n=>n&&o.classList.add(n));else if(typeof s=="object")for(const n in s){const e=typeof s[n]=="function"?s[n](t,t.state,t.context):s[n];e&&o.classList.add(typeof e=="string"?e:n)}}}}function Rt(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function An(t){if(!t||typeof t!="object")return!1;for(const o in t){const s=t[o];if(s&&typeof s=="object"&&!Array.isArray(s))return!0}return!1}function gt(t,o){if(!t||!t.style||!o)return null;const s=t.style,n=[];for(const e in o){if(o[e]==null||e.charAt(0)==="&")continue;const a=X(e);n.push(a,uo(s,a),Yo(s,a))}return n}function uo(t,o){return typeof t.getPropertyValue=="function"?t.getPropertyValue(o):""}function Yo(t,o){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(o):""}function X(t){return ct(t)?t:t.replace(/[A-Z]/g,o=>"-"+o.toLowerCase())}function Gt(t,o,s){if(!t||!t.style||!o||!o.length)return;const n=t.style,e=new Set;if(s&&typeof s=="object")for(const i in s)s[i]==null||i.charAt(0)==="&"||e.add(X(i));for(let i=0;i<o.length;i+=3){const a=o[i];e.has(a)||uo(n,a)===o[i+1]&&typeof n.removeProperty=="function"&&n.removeProperty(a)}}function bt(t,o){if(!o||!t||!t.style)return!1;const s=t.style;for(let n=0;n<o.length;n+=3)if(uo(s,o[n])!==o[n+1]||Yo(s,o[n])!==o[n+2])return!1;return!0}const ct=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,qo=t=>typeof t=="number"||t===!0||typeof t=="string"&&t!=="",Wt=t=>ct(t)?t:"--"+t;function Kt(t,o){if(!st(t))return null;let s=null;for(const n of Object.keys(t)){if(!n)continue;let e=t[n];if(typeof e=="function"){if(!o)continue;e=e(o,o.state,o.context)}qo(e)&&(s||(s={}),s[Wt(n)]=e)}return s}function Zo(t,o,s,n,e){const i=t.__ref,a=R(t,n,s);let c,r=null;const f=(0,C.createEffect)(()=>{const l=t.context?.designSystem;l&&(0,j.pushConfig)(l);try{const u=a(t,t.state,t.context),d=t.node;if(!d||!d.style)return;if(!qo(u)){Gt(d,r,null),c=void 0,r=null;return}const h=String(u);if(h!==c||!bt(d,r)){c=h;const y={[o]:u};J(d,y),r=gt(d,y)}}catch(u){N(i,e,u)}finally{l&&(0,j.popConfig)()}},{depth:i.path.length,label:O(i,e)});i.__effects.push(f)}function xn(t){const o=t.__ref,s=t.vars;if(typeof s=="function"){wn(t,s),o.__exec.vars=s;return}if(st(s))for(const n of Object.keys(s)){const e=s[n];!n||typeof e!="function"||Zo(t,Wt(n),e,yt(t.varsDeps,n),"vars."+n)}}function wn(t,o){const s=t.__ref,n=R(t,t.varsDeps,o);let e,i=null;const a=(0,C.createEffect)(()=>{const c=t.context?.designSystem;c&&(0,j.pushConfig)(c);try{const r=Kt(n(t,t.state,t.context)),f=t.node;if(!f||!f.style)return;const l=Rt(r);(l===null||l!==e||!bt(f,i))&&(e=l,Gt(f,i,r),r&&J(f,r),i=r?gt(f,r):null,s.__varsInline=r?new Set(Object.keys(r)):null)}catch(r){N(s,"vars",r)}finally{c&&(0,j.popConfig)()}},{depth:s.path.length,label:O(s,"vars")});s.__effects.push(a)}function lo(t,o){if(typeof t[o]=="function"&&((0,K.isCssProp)(t.tag||"div",o)||o.charCodeAt(0)===45))return!0;if(!ct(o))return!1;const s=t.vars;if(typeof s=="function"){const n=t.__ref&&t.__ref.__varsInline;return!!(n&&n.has(o))}if(!st(s))return!1;for(const n of Object.keys(s))if(typeof s[n]=="function"&&Wt(n)===o)return!0;return!1}function Sn(t){let o=null;for(const s in t)t[s]!=null&&s.charAt(0)!=="&"&&(o||(o=new Set),o.add(X(s)));return o}function Cn(t,o,s,n){const e=t.__ref;if(!e)return;let i=null;if(s)for(const a of s){if(n&&n.has(a))continue;const c=o[a];if(c==null||typeof c=="object")continue;const r=X(a);q.CSS_LONGHAND_SHORTHANDS[r]&&(i||(i={}),i[r]=c)}e.__declaredLonghands=i}function Qo(t,o){const s=t.__ref,n=s&&s.__declaredLonghands;if(!n||!o)return null;let e=null;for(const i in n){if(o.has(i))continue;const a=q.CSS_LONGHAND_SHORTHANDS[i];let c=!1;for(let r=0;r<a.length;r++)if(o.has(a[r])){c=!0;break}c&&(e||(e={}),e[i]=n[i])}return e}function Xo(t,o){const s=t.node;J(s,o);const n=Sn(o);if(!n)return o;const e=t.__ref;if(e)if(e.__inlineCssKeys)for(const a of n)e.__inlineCssKeys.add(a);else e.__inlineCssKeys=new Set(n);const i=Qo(t,n);return i?(J(s,i),Object.assign({},o,i)):o}function kn(t){const o=t.__ref;if(!o||!o.__inlineCssKeys||!o.__declaredLonghands)return;const s=Qo(t,o.__inlineCssKeys);s&&J(t.node,s)}function qt(t,o){if(!o||typeof o!="object")return o;const s=t&&t.context&&t.context.designSystem;s&&(0,j.pushConfig)(s);try{return(0,P.resolveStyleBlockTokens)(o,t)}catch{return o}finally{s&&(0,j.popConfig)()}}function J(t,o){if(!t||!o||!t.style)return;let s=null;for(const n in o){const e=o[n];if(e!=null){if(n.charAt(0)==="&"&&typeof e=="object"){s||(s={}),s[n]=e;continue}try{const i=String(e),a=ct(n)?n:n.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=i.trim(),r=/\s*!important\s*$/.test(c),f=c.replace(/\s*!important\s*$/,"");t.style.setProperty(a,f,r?"important":"")}catch{}}}s&&vn(t,s)}function vn(t,o){const s=`_ds${vo.scopedStyleId++}`;t.classList.add(s);const n=t.ownerDocument;let e=n.querySelector("style[data-smbls-scoped]");e||(e=n.createElement("style"),e.setAttribute("data-smbls-scoped",""),n.head.appendChild(e));let i="";for(const a in o){const c="."+s,r=a.replace(/&/g,c).split(",").map(l=>{const u=l.trim();return u.includes(c)?u:c+u}).join(", "),f=o[a];if(typeof f=="object"){let l="",u="";for(const d in f){const h=f[d];if(typeof h=="object"){const y=d.includes("&")?r.split(", ").map(g=>d.replace(/&/g,g)).join(", "):r.split(", ").map(g=>`${g} ${d}`).join(", ");let A="";for(const g in h)A+=`${X(g)}: ${h[g]};`;u+=(0,tt.wrapHoverRule)(`${y} { ${A} }`,y)+`
5
- `}else l+=`${X(d)}: ${h};`}l&&(i+=(0,tt.wrapHoverRule)(`${r} { ${l} }`,r)+`
6
- `),u&&(i+=u)}}i&&(e.textContent+=i)}const Jo=new Set;function mo(t){if(!Array.isArray(t))return"";const o=[];for(let s=0;s<t.length;s++)typeof t[s]=="string"&&t[s].length&&o.push(t[s]);return o.sort(),o.join("|")}function jn(t,o,s){const n=mo(s);queueMicrotask(()=>{if(!t.__ref)return;let e;try{e=o(t,t.state,t.context)}catch{return}if(mo(e)===n)return;const i=t.__ref.path?t.__ref.path.join("."):t.key||"?";Jo.has(i)||(Jo.add(i),console.warn(`[smbls] subscribeTo function at "${i}" resolved to a DIFFERENT key list one microtask after create \u2014 wired [${s.join(", ")||"(none)"}], probed [${Array.isArray(e)?e.join(", "):String(e)}]. subscribeTo's function form is resolved ONCE at element-create time (registerSubscribeToEffects, @symbo.ls/element create.js) \u2014 this element stays wired to the ORIGINAL list for its whole lifetime, so this drift is invisible to the reactive effect and any key only present in the new list will never trigger onUpdate. If the watched key genuinely is not known until later (e.g. a module config that loads after shell boot), route the write through an imperative call instead of subscribeTo \u2014 see functions/moduleOpenBridge.js's moduleOpenPage (workspace repo) for the house pattern.`))})}function En(t){const o=t.subscribeTo,s=typeof o=="function";let n=o;if(s)try{n=o(t,t.state,t.context)}catch{n=null}if(s&&(0,nt.isLoudDevRuntime)()&&jn(t,o,Array.isArray(n)?n:[]),!Array.isArray(n)||n.length===0)return;const e=t.__ref;for(let i=0;i<n.length;i++){const a=n[i];if(typeof a!="string"||a.length===0)continue;const c=a.split("."),r=c[0],f=c.slice(1),l={value:!1},u=(0,C.createEffect)(()=>{const d=t.state&&((0,I.isStore)(t.state)?t.state.root:null);if(!d||!(0,I.isStore)(d))return;let h=d;h=h[r];for(let A=0;A<f.length&&!(h==null||typeof h!="object");A++)if((0,I.isStore)(h))h=h[f[A]];else break;if(!l.value)return;let y=!1;if(typeof t.onBeforeUpdate=="function"){const A=t.context?.designSystem;A&&(0,j.pushConfig)(A);try{if(Os(e)){const g=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});g&&typeof g.then=="function"?g.then(()=>$t(e,!1),b=>{$t(e,!0),t.context?.plugins?.length&&(0,Y.runPluginHook)("error",t,{hook:"onBeforeUpdate",error:b})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",b)}):($t(e,!1),g===!1&&(y=!0))}}catch(g){$t(e,!0),t.context?.plugins?.length&&(0,Y.runPluginHook)("error",t,{hook:"onBeforeUpdate",error:g})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",g)}finally{A&&(0,j.popConfig)()}}if(!y&&t.node&&e.__effects)for(let A=0;A<e.__effects.length;A++){const g=e.__effects[A];g&&g!==u&&!g._disposed&&!g._isSubscribeToEffect&&typeof g._execute=="function"&&g._execute()}if(!y&&typeof t.onUpdate=="function"){const A=t.context?.designSystem;A&&(0,j.pushConfig)(A);try{t.onUpdate(t,t.state,t.context)}catch(g){t.context?.plugins?.length&&(0,Y.runPluginHook)("error",t,{hook:"onUpdate",error:g})||console.error("[DOMQL] subscribeTo onUpdate error:",g)}finally{A&&(0,j.popConfig)()}}},{depth:e.path.length,label:O(e,"subscribeTo("+a+")")});l.value=!0,u._isSubscribeToEffect=!0,e.__effects.push(u)}}function po(t,o){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&!t.startsWith("@container")&&(t==="@dark"||t==="@light"||!o.context?.designSystem?.media?.[t.slice(1)])}function ho(t,o){if(t.charCodeAt(0)!==64||/^@(media|supports|container|keyframes)\b/.test(t))return t;const s=o.context?.designSystem?.media?.[t.slice(1)];return s?/^@(media|supports|container)\b/.test(s)?s:`@media ${s}`:t}const ts=new Set;function Pn(t,o){const s=o?.__ref?.path?o.__ref.path.join("."):o?.key||"?",n=s+"::"+t;ts.has(n)||(ts.add(n),console.warn(`[smbls/css] "${t}" at ${s} 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.`))}const os=new Map;function On(t){let o=os.get(t);if(o)return o;o=[];const s=n=>{if(n)for(const e of n)o.push(e.replace(/-([a-z])/g,(i,a)=>a.toUpperCase()))};return s(q.CSS_LONGHAND_SHORTHANDS[t]),s(q.CSS_SHORTHAND_LONGHANDS[t]),os.set(t,o),o}function ss(t,o,s){if(lo(t,o)||s&&s.has(o))return!0;const n=On(X(o));for(let e=0;e<n.length;e++){const i=n[e];if(lo(t,i)||s&&s.has(i))return!0}return!1}function At(t,o,s,n){const e={},i=new Set,a=(c,r,f)=>{const l=f?new Set(Object.keys(e)):null;if(P.CSS_PROPS_REGISTRY[c]){const u=P.CSS_PROPS_REGISTRY[c](r,o,o.state,o.context);if(u){const d=Array.isArray(u)?u:[u];for(const h of d)h&&Object.assign(e,h)}}else e[c]=r;if(f)for(const u in e)l.has(u)||i.add(u)};for(const c in t){if(!Object.prototype.hasOwnProperty.call(t,c))continue;let r=t[c];if(typeof r=="function"&&(r=r(o,o.state,o.context)),!(r==null||typeof r=="function")){if(typeof r=="object"&&!Array.isArray(r)){if(c==="style"){for(const u in r){let d=r[u];typeof d=="function"&&(d=d(o,o.state,o.context)),!(d==null||typeof d=="function")&&a(u,d,ss(o,u,n))}continue}if(c==="vars"){const u=Kt(r,o);if(u)for(const d in u)a(d,u[d],lo(o,d)||!!(n&&n.has(d)));continue}if(po(c,o)){const u=At(r,o,!1,n);Object.keys(u).length&&(e[`[data-theme="${c.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(c)){(0,nt.isLoudDevRuntime)()&&Pn(c,o);continue}const f=ho(c,o),l=At(r,o,!1,n);Object.keys(l).length&&(e[f]=l);continue}a(c,r,ss(o,c,n))}}if(s)for(const c in e)i.add(c);for(const c of i){const r=e[c];typeof r=="string"&&!r.includes("!important")&&(e[c]=r+" !important")}return e}const st=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function ns(t,o){for(const s in o){const n=o[s];t[s]=st(n)?ns(st(t[s])?t[s]:{},n):n}return t}function Tn(t,o){if(!st(o))return;let s;for(const n of t.split(" ")){const e=n?o[n]:null;st(e)&&(s=ns(s||{},e))}return s}function yo(t,o){if(o===void 0&&(o=0),o>8)return!1;if(typeof t=="function")return!0;if(t&&typeof t=="object"&&!Array.isArray(t)){for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&yo(t[s],o+1))return!0}return!1}function es(t,o,s){if(!o||typeof o!="object"||Array.isArray(o))return null;if(po(t,s)){const i=At(o,s,!1);return Object.keys(i).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:i}:null}const n=ho(t,s),e=At(o,s,!1);return Object.keys(e).length?{cssProp:n,block:e}:null}function Ln(t){const o=t.__ref;for(const s of Object.keys(t)){if(!no(s))continue;const n=t[s];if(!n||typeof n!="object"||Array.isArray(n)||!yo(n))continue;let e=null,i;const a=(0,C.createEffect)(()=>{if(!t.node)return;const c=t.context?.designSystem;c&&(0,j.pushConfig)(c);let r,f=!1;try{const l=es(s,n,t),u=l?Rt(l.block)+"::"+l.cssProp:null;if(u!==null&&u===i)f=!0;else if(i=u,l){const d=(0,tt.css)({[l.cssProp]:l.block},null,t.context?.cssPrefix);r=d?d.split(" ").filter(Boolean):null}else r=null}finally{c&&(0,j.popConfig)()}if(!(f||!t.node.classList)){if(e)for(const l of e)t.node.classList.remove(l);if(r&&r.length)for(const l of r)t.node.classList.add(l);e=r}},{depth:o.path.length,label:O(o,"cssBlock("+s+")")});o.__effects.push(a)}}const Dn=()=>!0,Rn=(t,o)=>{const s=t.charAt(0);return(s===":"||s==="@"||s==="&"||s==="[")&&o&&typeof o=="object"&&!Array.isArray(o)?!0:!!P.CSS_PROPS_REGISTRY[t]||!!(P.DEFAULT_CSS_PROPERTIES_LIST&&P.DEFAULT_CSS_PROPERTIES_LIST.has(t))||ct(t)||t==="vars"};function Mn(t,o,s){const n={};let e=!1;for(const c in s)Object.prototype.hasOwnProperty.call(s,c)&&(c!=="data"&&c!=="aria"&&(Rn(c,s[c])||B.REGISTRY.has(c))?n[c]=!0:e=!0);if(!e)return null;const i=(0,k.extractConditionalAttrs)({[o]:s},t.tag||"div",n,Dn);let a=null;for(const c in i)/^on/i.test(c)||(a||(a={}),a[c]=i[c]);return a}function rs(t,o,s,n,e,i){const a=t.node;let c=null;const r=f=>{(c||(c=[])).push(f)};for(const f in n){const l=o.owners.get(f),u=l===s;if(!i&&l!==void 0&&!u)continue;let d;try{d=n[f](t)}catch(A){N(t.__ref,"conditional("+s+")."+f,A),u&&r(f);continue}if(typeof d=="string"&&d.includes("{{")&&(d=M.replaceLiteralsWithObjectFields.call(t,d,t.state)),u&&a.getAttribute(f)!==o.written.get(f)){r(f);continue}if(d==null||typeof d=="object"||typeof d=="function"){u&&is(a,o,f);continue}const h=d===!1&&!(0,k.isEnumeratedTrueFalseAttr)(f)?null:String((0,k.serializeAttrValue)(f,d));if(r(f),u&&h===o.written.get(f))continue;l===void 0&&o.base.set(f,a.getAttribute(f));const y=xt(a,f);h==null?a.removeAttribute(f):a.setAttribute(f,h),wt(a,y),o.owners.set(f,s),o.written.set(f,h)}e.appliedAttrs=c}function is(t,o,s){if(t.getAttribute(s)===o.written.get(s)){const n=o.base.get(s),e=xt(t,s);n==null?t.removeAttribute(s):t.setAttribute(s,n),wt(t,e)}o.owners.delete(s),o.base.delete(s),o.written.delete(s)}function Nn(t,o,s,n){const e=n.appliedAttrs;if(n.appliedAttrs=null,!!e)for(const i of e)o.owners.get(i)===s&&is(t.node,o,i)}function _o(t){const o=t.__ref&&t.__ref.__conditionalAttrs,s=t.node;if(!(!o||!o.owners.size||!s||!s.getAttribute))for(const n of o.owners.keys()){const e=o.written.get(n),i=s.getAttribute(n);i!==e&&(o.base.set(n,i),e==null?s.removeAttribute(n):s.setAttribute(n,e))}}function Fn(t){const o=t.__ref;o.__conditionalRunners=[];let s=null;const n=new Map;for(const e of Object.keys(t)){const i=e.charAt(0);if(i!=="."&&i!=="!")continue;const a=e.slice(1);if(!a)continue;if(/[:@\s>~+[\]]/.test(a)){if(typeof console<"u"&&console.warn){const g=a.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${e}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${i}\` is read as one prop name. Nest the selector inside instead: \`${i}${g}: { '${a.slice(g.length)}': {...} }\`.`)}continue}const c=t[e];if(!c||typeof c!="object")continue;const r=i==="!",f={lastMatch:!1,appliedKeys:null,appliedClasses:null,appliedAttrs:null},l=Mn(t,e,c);l&&!s&&(s=o.__conditionalAttrs={owners:new Map,base:new Map,written:new Map});const u=new Set;for(const g in c){if(!Object.prototype.hasOwnProperty.call(c,g))continue;const b=g.charAt(0),w=c[g];if(!((b===":"||b==="@"||b==="&"||b==="[")&&w&&typeof w=="object"&&!Array.isArray(w))){if(g==="vars"&&st(w)){for(const p of Object.keys(w))p&&u.add(Wt(p));continue}u.add(g)}}const d=()=>{let g;const b=t[a];if(b===void 0){const _=!!t.state&&a in t.state,x=t.state?t.state[a]:void 0;if(_||x!==void 0)g=x;else{const S=t.context?.cases?.[a];if(S===void 0)return;try{g=typeof S=="function"?S.call(t,t):S}catch(E){g=!1,o.__conditionalError=E,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${e}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,E?.message||E)}}}else if(typeof b=="function")try{g=b(t,t.state,t.context)}catch(_){g=!1,o.__conditionalError=_,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${e}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,_?.message||_)}else g=b;const w=r?!g:!!g;if(!t.node)return;const p=t.context?.designSystem;if(w===f.lastMatch){if(w&&l&&t.node.setAttribute){p&&(0,j.pushConfig)(p);try{rs(t,s,e,l,f,!1)}finally{p&&(0,j.popConfig)()}}return}f.lastMatch=w,p&&(0,j.pushConfig)(p);try{if(w){const _={},x={};let S=!1;for(const v in c){if(!Object.prototype.hasOwnProperty.call(c,v))continue;const $=c[v],et=v.charAt(0);if((et===":"||et==="@"||et==="&"||et==="[")&&$&&typeof $=="object"&&!Array.isArray($)){if(po(v,t)){const L=At($,t,!1,u);Object.keys(L).length&&(x[`[data-theme="${v.slice(1)}"] &`]=L,S=!0)}else{const L=ho(v,t),U=At($,t,!1,u);Object.keys(U).length&&(x[L]=U,S=!0)}continue}const rt=typeof $=="function"?$(t,t.state,t.context):$;if(rt!=null){if(P.CSS_PROPS_REGISTRY[v]){const L=P.CSS_PROPS_REGISTRY[v](rt,t,t.state,t.context);if(L){const U=Array.isArray(L)?L:[L];for(const Ct of U)Ct&&Object.assign(_,Ct)}}else if(P.DEFAULT_CSS_PROPERTIES_LIST&&P.DEFAULT_CSS_PROPERTIES_LIST.has(v))_[v]=rt;else if(ct(v))_[v]=rt;else if(v==="vars"){const L=Kt(rt,t);L&&Object.assign(_,L)}}}const E=Object.keys(_);if(E.length){J(t.node,_);for(const v of E)n.set(v,e);f.appliedKeys=E}else f.appliedKeys=null;if(S){const v=(0,tt.css)(x,null,t.context?.cssPrefix,{state:!0}),$=v?v.split(" ").filter(Boolean):[];if($.length&&t.node.classList){for(const et of $)t.node.classList.add(et);f.appliedClasses=$}else f.appliedClasses=null}else if(f.appliedClasses){for(const v of f.appliedClasses)t.node.classList.remove(v);f.appliedClasses=null}l&&t.node.setAttribute&&rs(t,s,e,l,f,!0)}else{if(f.appliedAttrs&&Nn(t,s,e,f),f.appliedKeys){for(const _ of f.appliedKeys)n.get(_)===e&&(ct(_)?t.node.style.removeProperty(_):t.node.style[_]="",n.delete(_));f.appliedKeys=null}if(f.appliedClasses){for(const _ of f.appliedClasses)t.node.classList.remove(_);f.appliedClasses=null}}}finally{p&&(0,j.popConfig)()}};o.__conditionalRunners.push(d);const h=R(t,t[a+"Deps"],d),y=(0,C.createEffect)(h,{depth:o.path.length,label:O(o,"conditional("+e+")")}),A=o.__exec&&o.__exec[a]||t[a];y._sources.size===0&&typeof A=="function"&&(0,nt.isLoudDevRuntime)()&&rn(A)&&console.warn(`[smbls] conditional \`${e}\` on ${t.key||"?"} subscribed to nothing \u2014 its predicate tracked no reactive read on its first run, so no state write will ever re-evaluate it (only a direct element.update() on this element re-runs it). If the predicate guards its state reads (\`in\`, short-circuits, \`?.\`), declare \`${a}Deps: [...]\` (state-key strings or \`(el, s) => \u2026\` selectors) so the subscription is armed unconditionally.`),o.__effects.push(y)}}const go=new WeakSet,cs=new WeakSet,fs=new WeakSet;function $n(t){if(fs.has(t))return!1;if(!cs.has(t)){cs.add(t);const o=t.defaultView,s=()=>{fs.add(t)};o&&typeof o.requestAnimationFrame=="function"?o.requestAnimationFrame(s):setTimeout(s,0)}return!0}function In(t){const o=t.ownerDocument;!o||go.has(o)||$n(o)||(go.add(o),queueMicrotask(()=>{go.delete(o);const s=o.body||o.documentElement;s&&s.offsetWidth}))}const bo=new WeakSet;let as=!1;function us(t){return t.startsWith("[data-theme=")||t.startsWith("@media")&&t.includes("prefers-color-scheme")}function Ao(t,o){const s={...t};for(const n in o){const e=o[n],i=s[n];s[n]=e&&typeof e=="object"&&i&&typeof i=="object"?Ao(i,e):e}return s}function ds(t,o){const s={};for(const n in t){const e=t[n];if(e&&typeof e=="object"){const i=ds(e,o);Object.keys(i).length&&(s[n]=i)}else o.has(n)||(s[n]=e)}return s}function Un(t,o,s){let n=null;for(const[e,i]of o){const a=X(e),c=q.CSS_LONGHAND_SHORTHANDS[a];if(c)for(let r=0;r<c.length;r++){const f=c[r].replace(/-([a-z])/g,(y,A)=>A.toUpperCase()),l=t[f]!=null?o.get(f):void 0,u=s&&s.get(c[r]),d=l!==void 0&&l>i&&(0,q.cssShorthandStatesLonghand)(c[r],t[f],a),h=!d&&u!==void 0&&u>i&&(0,q.cssShorthandStatesLonghand)(c[r],void 0,a);if(d||h){d&&delete t[e],n||(n=new Set),n.add(e);break}}}return n}function ls(t){const{node:o}=t;if(!o)return;if(as||(as=!0,(0,tt.css)({display:"none"})),bo.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}bo.add(t);const s=t.context?.designSystem;s&&(0,j.pushConfig)(s),(0,P.pushStaticCssPass)();try{const n={};let e=!1,i=[],a=null,c=null,r=null;const f=t.__ref&&t.__ref.__mergeLayer;let l,u=null,d=null;const h=(p,_)=>{if(_&&typeof _=="object"&&us(p)){c||(c={});const x=c[p];x&&(_=Ao(x,_)),c[p]=_}else(_===null||typeof _!="object")&&(r||(r=new Set),r.add(p),l!==void 0&&(u||(u=new Map),u.set(p,l)));n[p]=_};if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&P.CSS_PROPS_REGISTRY.theme){const p=P.CSS_PROPS_REGISTRY.theme(t.theme,t,t.state,t.context);if(p){const _=x=>{for(const S in x){const E=x[S];E&&typeof E=="object"&&us(S)&&(a||(a={}),a[S]=E),n[S]=E}};if(Array.isArray(p))for(const x of p)x&&_(x);else _(p);e=!0}}const y=(p,_)=>{if(p==="vars"){const x=Kt(_);if(x){for(const S in x)h(S,x[S]);e=!0}return}if(P.CSS_PROPS_REGISTRY[p]){const x=P.CSS_PROPS_REGISTRY[p](_,t,t.state,t.context);if(x){if(Array.isArray(x)){for(const S of x)if(S)for(const E in S)h(E,S[E])}else for(const S in x)h(S,x[S]);e=!0}}else if(P.DEFAULT_CSS_PROPERTIES_LIST&&P.DEFAULT_CSS_PROPERTIES_LIST.has(p))_!=null&&typeof _!="object"&&(h(p,_),e=!0);else if(p.charCodeAt(0)===45)_!=null&&typeof _!="object"&&(h(p,_),e=!0);else if((p.charAt(0)==="&"||p.charAt(0)==="@"||p.charAt(0)===":"||p.charAt(0)==="[")&&_&&typeof _=="object"&&!Array.isArray(_)){if(yo(_))return;const x=es(p,_,t);x&&(h(x.cssProp,x.block),e=!0)}};if(typeof t.class=="string"){const p=Tn(t.class,t.context?.designSystem?.class);if(p)for(const _ in p)y(_,p[_])}const A=r?new Set(r):null,g=t.tag||"div";for(const p of Object.keys(t)){if(typeof t[p]=="function"){const x=f&&f.get(p);x!==void 0&&(0,K.isCssProp)(g,p)&&(d||(d=new Map),d.set(X(p),x));continue}if(l=f?f.get(p):void 0,p==="vars"){y(p,t[p]);continue}if(B.REGISTRY.has(p)||p==="theme")continue;const _=p.charCodeAt(0);_>=65&&_<=90||Q(p)||(0,K.isAttributeFirst)(g,p)||y(p,t[p])}l=void 0;const b=u?Un(n,u,d):null;if(a)for(const p in a){let _=r?ds(a[p],r):a[p];c&&c[p]&&(_=Ao(_,c[p])),Object.keys(_).length?n[p]=_:delete n[p]}if(Cn(t,n,r,b?new Set([...A||[],...b]):A),e){n.display&&String(n.display).includes("!important")&&(o.style.setProperty("display",String(n.display).replace(/\s*!important\s*$/,""),"important"),delete n.display);const p=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;typeof p=="string"&&p!==""&&n.display&&n.display!==p&&(n.display=p);const _=(0,tt.css)(n,null,t.context?.cssPrefix);if(i=_?_.split(" ").filter(Boolean):[],_&&o.classList){const x=i;let S=!1;for(const E of x)o.classList.add(E),S||(E.charCodeAt(0)===95&&E.charCodeAt(1)===99||E.charCodeAt(0)===95&&E.indexOf("_c",1)!==-1)&&(S=!0);S&&In(o)}}const w=t.__ref;if(w){const p=w.__staticCssClasses;if(p&&o.classList){const _=new Set(i);for(const x of p)_.has(x)||o.classList.remove(x)}w.__staticCssClasses=i}kn(t)}finally{(0,P.popStaticCssPass)(),s&&(0,j.popConfig)(),bo.delete(t)}}const Bn=t=>!!P.CSS_PROPS_REGISTRY[t]||!!(P.DEFAULT_CSS_PROPERTIES_LIST&&P.DEFAULT_CSS_PROPERTIES_LIST.has(t))||typeof t=="string"&&t.charCodeAt(0)===45;function Hn(t){t&&t.node&&ls(t)}function ps(t){const{node:o}=t;if(!o||!o.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(const e in t.aria){const i=t.aria[e];if(typeof i=="function"||typeof i=="object"||i==null||typeof i=="string"&&i.includes("{{"))continue;const a="aria-"+e.replace(/[A-Z]/g,c=>"-"+c.toLowerCase());o.setAttribute(a,(0,k.serializeAttrValue)(a,i))}const s=(0,k.applyAttrTransforms)(t);for(const e in s){const i=s[e];i!=null&&i!==!1&&typeof i!="function"&&typeof i!="object"&&o.setAttribute(e,i===!0?"":i)}const n=t.tag||"div";for(const e of Object.keys(t)){if(typeof t[e]=="function"||B.REGISTRY.has(e)||e==="on"||s[e]!==void 0)continue;const i=e.charCodeAt(0);if(!(i>=65&&i<=90)&&!Q(e)&&!(0,K.isCssProp)(n,e)&&(0,k.checkAttributeByTagName)(n,e)){let a=t[e];if(a==null)continue;if(typeof a=="string"&&a.includes("{{")){if(!k.ATTR_TRANSFORMS[e])continue;a=M.replaceLiteralsWithObjectFields.call(t,a,t.state)}if(a==null||typeof a=="function"||typeof a=="object"||a===!1&&!(0,k.isEnumeratedTrueFalseAttr)((0,k.camelToAttr)(e)||e))continue;const c=(0,k.camelToAttr)(e)||e;o.setAttribute(c,(0,k.serializeAttrValue)(c,a))}}}function Vn(t,o){const{node:s}=t;if(!s||!s.setAttribute)return;const n=o.charCodeAt(0);if(n>=65&&n<=90||Q(o))return;const e=t.tag||"div";if((0,K.isCssProp)(e,o)||!(0,k.checkAttributeByTagName)(e,o))return;const i=(0,k.camelToAttr)(o)||o,a=i.toLowerCase(),c=t.__ref&&t.__ref.__effects;let r=!1;if(c)for(let d=0;d<c.length;d++){const h=c[d];h&&h._attrName===a&&!h._disposed&&typeof h._execute=="function"&&(r=!0,h._execute())}if(r)return;let f=t[o];const l=k.ATTR_TRANSFORMS[o];if(l&&f!=null){const d=l(t);d!==void 0&&(f=d)}typeof f=="string"&&f.includes("{{")&&(f=M.replaceLiteralsWithObjectFields.call(t,f,t.state));const u=xt(s,i);f==null||f===!1&&!(0,k.isEnumeratedTrueFalseAttr)(i)?s.removeAttribute(i):typeof f!="function"&&typeof f!="object"&&s.setAttribute(i,(0,k.serializeAttrValue)(i,f)),wt(s,u)}function Gn(t,o){const s=t.node,n=t.__ref;let e=n.__autoGrow;if(!o){if(e&&e.active){try{s.removeEventListener("input",e.resize)}catch{}ys(e),it.delete(t),s.style.height="",e.appliedMax!=null&&s.style.maxHeight===e.appliedMax&&(s.style.maxHeight=""),bs(s,e,!1),e.active=!1,e.appliedMax=null,e.lastMeasure=0}return}e||(e=n.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,lastWidth:null,watch:null,awaitingLayout:!1,appliedScroll:!1,fontsHooked:!1,attachAttempts:0,firstAttemptAt:null,resize:()=>{if(!s.isConnected){Mt(t,!0);return}if(!(s.scrollHeight>0)){e.awaitingLayout=!0,hs(t,e);return}e.awaitingLayout=!1;const a=zn(s),c=Yn(a),r=s.style.height;s.style.height="0px",c&&wo(s);const f=s.scrollHeight;if(!(f>0)){s.style.height=r,c&&wo(s);return}const l=qn(s,a),u=l!=null&&f<l?l:f,d=Xn(a),h=d!=null&&u>d;s.style.height=Qn(h?d:u,a)+"px",c&&wo(s),bs(s,e,h),e.lastMeasure=f,e.lastWidth=s.clientWidth,hs(t,e)}},n.__eventCleanup||(n.__eventCleanup=[]),n.__eventCleanup.push(()=>{try{s.removeEventListener("input",e.resize)}catch{}ys(e),it.delete(t)})),e.active||(s.addEventListener("input",e.resize),e.active=!0,Kn(t,e));const i=typeof o=="object"&&o.max!=null?String(o.max):null;i!==e.appliedMax&&(i==null?e.appliedMax!=null&&s.style.maxHeight===e.appliedMax&&(s.style.maxHeight=""):s.style.maxHeight=i,e.appliedMax=i),e.resize()}function Mt(t,o){const s=t.__ref?.__autoGrow;s&&(o&&(s.attachAttempts=0,s.firstAttemptAt=null),it.add(t),Bt())}function Wn(){const t=Array.from(it);it.clear();for(let o=0;o<t.length;o++){const s=t[o],n=s.node,e=s.__ref?.__autoGrow;if(!(!n||!e||!e.active)){if(!n.isConnected){e.firstAttemptAt==null&&(e.firstAttemptAt=ht()),e.attachAttempts+=1,e.attachAttempts<=Po&&ht()-e.firstAttemptAt<Oo&&(it.add(s),Bt());continue}e.attachAttempts=0,e.firstAttemptAt=null,e.resize()}}}function hs(t,o){if(o.watch)return;const s=t.node;if(!s)return;const n=s.ownerDocument&&s.ownerDocument.defaultView,e=n&&n.ResizeObserver||(typeof ResizeObserver=="function"?ResizeObserver:null);if(typeof e!="function")return;const i=()=>{if(!o.active||!s.isConnected||!(s.scrollHeight>0))return;if(o.awaitingLayout){o.awaitingLayout=!1,Mt(t,!0);return}const c=s.clientWidth;o.lastWidth!=null&&Math.abs(c-o.lastWidth)<.5||(o.lastWidth=c,Mt(t,!0))};let a;try{a=new e(i),a.observe(s)}catch{return}o.watch=a}function ys(t){const o=t.watch;if(o){t.watch=null;try{o.disconnect()}catch{}}}function Kn(t,o){if(o.fontsHooked)return;o.fontsHooked=!0;const s=t.node&&t.node.ownerDocument,n=s&&s.fonts&&s.fonts.ready;!n||typeof n.then!="function"||n.then(()=>{o.active&&t.node&&Mt(t,!0)},()=>{})}function zn(t){const o=t.ownerDocument&&t.ownerDocument.defaultView;try{return o&&o.getComputedStyle?o.getComputedStyle(t):null}catch{return null}}const ft=t=>typeof t=="string"&&/^\s*-?\d*\.?\d+px\s*$/.test(t)?parseFloat(t):null,xo=t=>(ft(t.paddingTop)||0)+(ft(t.paddingBottom)||0),_s=t=>(ft(t.borderTopWidth)||0)+(ft(t.borderBottomWidth)||0);function Yn(t){if(!t)return!1;const o=String(t.transitionProperty||"").split(","),s=String(t.transitionDuration||"0s").split(",");for(let n=0;n<o.length;n++){const e=o[n].trim();if(!(e!=="all"&&e!=="height")&&parseFloat(s[n%s.length])>0)return!0}return!1}function wo(t){if(typeof t.getAnimations!="function")return;let o;try{o=t.getAnimations()}catch{return}for(let s=0;s<o.length;s++){const n=o[s];if(n&&n.transitionProperty==="height")try{n.cancel()}catch{}}}function qn(t,o){if(!o||!t.hasAttribute||!t.hasAttribute("rows"))return null;const s=parseInt(t.getAttribute("rows"),10);if(!(s>0))return null;const n=ft(o.lineHeight)||Zn(t,o);return n>0?s*n+xo(o):null}const Nt=["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontFamily","lineHeight","letterSpacing"],gs=new WeakMap;function Zn(t,o){const s=t.ownerDocument,n=s&&(s.body||s.documentElement);if(!n||!s.createElement)return null;let e=gs.get(s);e||(e=new Map,gs.set(s,e));const i=Nt.map(f=>o[f]||"").join("|");if(e.has(i))return e.get(i);const a=s.createElement("textarea");a.rows=1,a.setAttribute("aria-hidden","true"),a.tabIndex=-1;const c=a.style;c.position="absolute",c.visibility="hidden",c.top="0",c.left="-9999px",c.height="auto",c.minHeight="0",c.maxHeight="none",c.padding="0",c.border="0",c.boxSizing="content-box",c.overflow="hidden";for(let f=0;f<Nt.length;f++)o[Nt[f]]&&(c[Nt[f]]=o[Nt[f]]);let r=0;try{n.appendChild(a),r=a.clientHeight}catch{r=0}finally{a.parentNode&&a.parentNode.removeChild(a)}return r>0?(e.set(i,r),r):null}function Qn(t,o){return o?o.boxSizing==="border-box"?t+_s(o):o.boxSizing==="content-box"?Math.max(0,t-xo(o)):t:t}function Xn(t){if(!t)return null;const o=ft(t.maxHeight);if(o==null||!(o>0))return null;const s=xo(t),n=_s(t),e=t.boxSizing==="border-box"?o-n:o+s,i=ft(t.lineHeight);if(!(i>0))return e;const a=Math.floor((e-s)/i+1e-6);return a>=1?a*i+s:e}function bs(t,o,s){s?o.appliedScroll||(t.style.overflowY="auto",o.appliedScroll=!0):o.appliedScroll&&(t.style.overflowY==="auto"&&(t.style.overflowY=""),o.appliedScroll=!1)}const As=["srcObject","muted"],Jn=(t,o)=>t==="muted"?o===!0||o===""||o==="true"||o==="muted":o??null;function mn(t){const o=t.node,s=t.__ref;if(!(!o||!s))for(let n=0;n<As.length;n++){const e=As[n],i=t[e];if(i===void 0||!(e in o))continue;const a=c=>{const r=Jn(e,c);if(o[e]!==r)try{o[e]=r}catch(f){N(s,e,f)}};if(typeof i=="function"){const c=R(t,t[e+"Deps"],i),r=(0,C.createEffect)(()=>{try{a(c(t,t.state,t.context))}catch(f){N(s,e,f)}},{depth:s.path.length,label:O(s,e)});s.__effects.push(r),s.__exec[e]=i}else a(i);e==="srcObject"&&(s.__releaseMedia=()=>{try{o.srcObject!=null&&(o.srcObject=null)}catch{}})}}function xs(t){if(!t.autoGrow)return;const o=t.node;if(!o||o.tagName!=="TEXTAREA")return;const s=t.__ref,n=t.autoGrow,e=typeof n=="function"?R(t,t.autoGrowDeps,n):null,i=(0,C.createEffect)(()=>{const a=t.autoGrow;let c=a;if(typeof a=="function")try{c=(a===n&&e?e:a)(t,t.state,t.context)}catch{c=null}Gn(t,c)},{depth:s.path.length,label:O(s,"autoGrow")});s.__effects||(s.__effects=[]),s.__effects.push(i),e&&(s.__exec.autoGrow=n)}const ws=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Ss(t,o){for(const s of Object.keys(t)){if(!Q(s)||ws.has(s))continue;const n=(0,St.globalEventKeyInfo)(s);if(n){(0,St.registerGlobalEvent)(n,t,t[s]);continue}let e=t[s],i=null;if(e&&typeof e=="object"&&!Array.isArray(e)&&(i=e,e=i.handler),typeof e=="string"&&/^[A-Za-z_$][\w$]*$/.test(e)){const c=e;e=function(f){return t.call(c,f)}}if(typeof e!="function")continue;const a=Ys(s);B.LIFECYCLE_EVENTS.has(a)||(0,St.registerEvent)(qs(a),t,e,i)}te(t)}function te(t){const o=t.node;if(!o||!o.addEventListener)return;const s={};let n=!1;for(const d of ws){const h=t[d];typeof h=="function"&&(s[d]=h,n=!0)}if(!n)return;const e=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,i=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600;let a=0,c=0,r=0,f=!1;const l=d=>{const h=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];h&&(a=h.clientX,c=h.clientY,r=Date.now(),f=!0)},u=d=>{if(!f)return;f=!1;const h=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!h)return;const y=h.clientX-a,A=h.clientY-c,g=Date.now()-r;if(g>i)return;const b=Math.abs(y),w=Math.abs(A);if(Math.max(b,w)<e)return;let p;if(b>w*1.2)p=y<0?"left":"right";else if(w>b*1.2)p=A<0?"up":"down";else return;const _="onSwipe"+p.charAt(0).toUpperCase()+p.slice(1),x=s[_],S=s.onSwipe;x&&x.call(t,d,t,t.state,t.context),S&&S.call(t,{direction:p,dx:y,dy:A,dt:g,event:d},t,t.state,t.context)};o.addEventListener("touchstart",l,{passive:!0}),o.addEventListener("touchend",u,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{o.removeEventListener("touchstart",l)}catch{}try{o.removeEventListener("touchend",u)}catch{}})}function at(t,o){const s={...t};for(const n in o){const e=s[n],i=o[n];e&&i&&typeof e=="object"&&typeof i=="object"&&!Array.isArray(e)&&!Array.isArray(i)&&typeof e!="function"&&typeof i!="function"?s[n]=at(e,i):s[n]=i}return s}function So(t,o,s,n,e){if(!o||!t.node)return;const i=t.childExtends,a=_t(t,"childProps");if(Array.isArray(o)){const c=t.tag==="fragment",r=t.context?.document||globalThis.document,f=c?null:r?.createDocumentFragment();if(!c&&!f)return;const l=t.childProps,u=t.childrenAs,d=w=>{let p=o[w];const _=p;(typeof p=="string"||typeof p=="number")&&(p={text:p});let x=l;if(typeof l=="function")try{x=l(t,p)}catch{x=null}let S=typeof l=="function"?Tt(x):a;if(e&&u!=="state"&&(S=Lt(S,Tt(_))),u==="state"){let v=_;(typeof _=="string"||typeof _=="number")&&(v={value:_,text:_}),p=x?{...x,state:v}:{state:v}}else x&&(p=at(x,p));if(i&&!p.ignoreChildExtends)if(p.extends){const v=Array.isArray(p.extends)?p.extends:[p.extends],$=Array.isArray(i)?i:[i];p={...p,extends:[...$,...v]}}else p={...p,extends:i};const E=Lo(p?.key,_,w,t);try{return m(Dt(p,S),t,E,s)}catch(v){if(typeof console<"u"&&console.error){const $=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${E}" failed to construct at ${$} (initial render, skipping this row):`,v?.message||v)}return null}},h=t.__ref;if(!(n===!0&&!c&&!!h&&(s?.mountYield===!0||t.yieldChildren===!0))){for(let w=0;w<o.length;w++){const p=d(w);!c&&p?.node&&f.appendChild(p.node)}return c||t.node.appendChild(f),!0}const A=h.__childrenChunkGen=(h.__childrenChunkGen||0)+1;(0,G.openMountBudget)();let g=null;const b=w=>{if(h.__disposed||h.__childrenChunkGen!==A){g&&g.parentNode&&g.remove();return}for(let p=w;p<o.length;p++){const _=d(p);if(_?.node&&(g?t.node.insertBefore(_.node,g):f.appendChild(_.node)),p+1<o.length&&(0,G.mountBudgetExhausted)()){g||(g=r.createComment("smbls-mount"),f.appendChild(g),t.node.appendChild(f));const x=p+1;(0,G.enqueueMountWork)(()=>b(x));return}}g?(g.remove(),t.node.tagName==="SELECT"&&zt(t,!0)):t.node.appendChild(f)};return b(0),(0,G.closeMountBudget)(),!0}if(typeof o=="string"){const c=Mo(o,t);if(Array.isArray(c))return So(t,c,s,n,!0)}if(typeof o=="object")for(const c in o){if(B.REGISTRY.has(c))continue;let r=o[c];if(r==null||r===!1)continue;const f=e?Lt(a,Tt(r)):a;if((typeof r=="string"||typeof r=="number")&&(r={text:r}),t.childProps&&(r=at(t.childProps,r)),i&&!r.ignoreChildExtends)if(r.extends){const l=Array.isArray(r.extends)?r.extends:[r.extends],u=Array.isArray(i)?i:[i];r={...r,extends:[...u,...l]}}else r={...r,extends:i};m(Dt(r,f),t,Vt(t,c),s)}}function zt(t,o){const s=t.node;if(!s||s.tagName!=="SELECT")return;const n=s.options;if(!n||!n.length)return;const e=t.__ref,i=e&&e.__exec&&e.__exec.value,a=typeof i=="function",c=t.value!=null&&typeof t.value!="function";if(a||c){let l;if(a)try{l=i(t,t.state,t.context)}catch{return}else l=t.value,typeof l=="string"&&l.includes("{{")&&(l=M.replaceLiteralsWithObjectFields.call(t,l,t.state));const u=l==null?"":String(l);s.value!==u&&(s.value=u);return}const r=o||!(e&&e.__selectSynced);if(e&&(e.__selectSynced=!0),!r)return;let f=-1;for(let l=0;l<n.length;l++)n[l].defaultSelected&&(f=l);f>=0&&s.selectedIndex!==f&&(s.selectedIndex=f)}function Cs(t,o){let{children:s,content:n}=t;const e=t.childExtends,i=typeof s=="function"||Bo(t,"children");if(typeof s=="function"){const y=s;try{s=y(t,t.state,t.context)}catch(p){if(s=void 0,typeof console<"u"&&console.error){const _=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${_} (initial run, treating as empty):`,p?.message||p)}}Ho(t,s),t.children=s;const A=t.__ref;let g=!1;const b=R(t,t.childrenDeps,y),w=(0,C.createEffect)(()=>{const p=g;g=!0;let _;try{_=b(t,t.state,t.context)}catch(L){if(typeof console<"u"&&console.error){const U=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${U}${p?"":" (initial tracking run)"}:`,L?.message||L)}return}if(!p||_===t.children)return;Ho(t,_),t.children=_,A.__childrenChunkGen!=null&&A.__childrenChunkGen++;const x=typeof t.onContentUpdate=="function",S=x?[]:null,E=x?[]:null,v=x?[]:null;if(Array.isArray(_)&&t.childrenAs==="state"){const L=t.childProps,U=[],Ct=new Map;for(let T=0;T<_.length;T++){const W=_[T];let D=L;if(typeof L=="function")try{D=L(t,W)}catch{D=null}const Z=Lo(D&&D.key,W,T,t);U.push(Z),Ct.set(Z,{rawChild:W,childProps:D})}const Ts=new Set(U),Ls=A.__children.slice();for(const T of Ls)if(!Ts.has(T)){const W=t[T];W?.remove&&W.remove(),delete t[T],E&&E.push(T)}const kt=t.childExtends,It=t.tag==="fragment",Ds=t.context?.document||globalThis.document,vt=It?null:Ds?.createDocumentFragment(),Xt=new Set;for(const T of U){const W=Ct.get(T),D=W.rawChild,Z=t[T];if(Z&&Z.state){if(D&&typeof D=="object"){const H=Z.state,dt=H.$replace||H.replace,Co=H.$update||H.update;try{if(typeof dt=="function")dt.call(H,D);else if(typeof Co=="function"){for(const V in H)if(!(V==="__element"||V==="root"||V==="parent"||V==="update")&&!Object.prototype.hasOwnProperty.call(D,V))try{H[V]=void 0}catch{}Co.call(H,D)}else for(const V in D)H[V]=D[V]}catch(V){if(typeof console<"u"&&console.error){const Ms=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${T}" failed to patch at ${Ms} (reconcile, keeping its previous data for this pass):`,V?.message||V)}}}v&&v.push(T);continue}let Jt=D;(typeof D=="string"||typeof D=="number")&&(Jt={value:D,text:D});const mt=W.childProps;let z=mt?{...mt,state:Jt}:{state:Jt};const Rs=typeof L=="function"?Tt(mt):_t(t,"childProps");if(kt&&!z.ignoreChildExtends)if(z.extends){const H=Array.isArray(z.extends)?z.extends:[z.extends],dt=Array.isArray(kt)?kt:[kt];z={...z,extends:[...dt,...H]}}else z={...z,extends:kt};let to;try{to=m(Dt(z,Rs),t,T,o)}catch(H){if(typeof console<"u"&&console.error){const dt=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${T}" failed to construct at ${dt} (reconcile, skipping this row):`,H?.message||H)}Xt.add(T);continue}!It&&to?.node&&vt&&vt.appendChild(to.node),S&&S.push(T)}if(!It&&vt&&vt.childNodes.length&&t.node&&t.node.appendChild(vt),!It&&t.node){let T=null;for(const W of U){const D=t[W]?.node;if(!D)continue;const Z=T?T.nextSibling:t.node.firstChild;D!==Z&&t.node.insertBefore(D,Z),T=D}}A.__children=Xt.size?U.filter(T=>!Xt.has(T)):U,x&&(S.length||E.length)&&To(t,{added:S,removed:E,kept:v}),zt(t,!1);return}const rt=x?[...A.__children]:null;for(const L of[...A.__children]){const U=t[L];U?.remove&&U.remove(),delete t[L]}A.__children=[],So(t,_,o,!1,!0),zt(t,!1),x&&To(t,{added:[...A.__children],removed:rt,kept:[]})},{depth:A.path.length,label:O(A,"children")});A.__effects.push(w)}const a=So(t,s,o,!0,i);if(n!=null&&!(n&&n.__ref)){let y=n;if(typeof y=="string"||typeof y=="number"?y={text:y}:typeof y!="object"&&(y={}),t.childProps&&(y=at(t.childProps,y)),e&&!y.ignoreChildExtends)if(y.extends){const g=Array.isArray(y.extends)?y.extends:[y.extends],b=Array.isArray(e)?e:[e];y={...y,extends:[...b,...g]}}else y={...y,extends:e};const A=Lt(_t(t,"childProps"),_t(t,"content"));m(Dt(y,A),t,"content",o)}if(s&&!a)return;const c=t.context?.components||{},r=t.__ref&&t.__ref.__runtimeSource,f=r?{}:null;{const y=Object.keys(t);for(let A=0;A<y.length;A++){const g=y[A];if(!g.endsWith("Extends")||typeof t[g]!="string")continue;const b=g.slice(0,-7);if(!b||b.charCodeAt(0)<65||b.charCodeAt(0)>90)continue;const w={extends:t[g]};delete t[g];for(let p=A+1;p<y.length;p++){const _=y[p],x=_.charCodeAt(0);if(x>=65&&x<=90||B.REGISTRY.has(_)||typeof t[_]=="function"&&(_.startsWith("on")||_.startsWith(".")))break;const S=t[_];S!==void 0&&(w[_]=S,delete t[_],f&&Ot(r,_)&&(f[b]||(f[b]={}),f[b][_]=r[_]))}t[b]&&typeof t[b]=="object"?t[b]={...w,...t[b]}:t[b]=w}}const l=o?.mountYield===!0||t.yieldChildren===!0,u=Object.keys(t),d=y=>{if(B.REGISTRY.has(y)||typeof t[y]!="object"||t[y]===null)return;const A=y.charCodeAt(0);if(A<65||A>90)return;let g=t[y];if(g.__ref)return;if(!g.extends&&!g.extend){const w=c[y]||c[`smbls.${y}`];w&&(g={...g,extends:w})}if(t.childProps&&(g=at(t.childProps,g)),e&&!g.ignoreChildExtends)if(g.extends){const w=Array.isArray(g.extends)?g.extends:[g.extends],p=Array.isArray(e)?e:[e];g={...g,extends:[...p,...w]}}else g={...g,extends:e};const b=r?Lt(_t(t,"childProps"),Lt(f[y]||null,_t(t,y))):null;m(Dt(g,b),t,y,o)};if(!l){for(const y of u)d(y);return}(0,G.openMountBudget)();const h=y=>{for(let A=y;A<u.length;A++)if(d(u[A]),A+1<u.length&&(0,G.mountBudgetExhausted)()){const g=A+1;(0,G.enqueueMountWork)(()=>h(g));return}};h(0),(0,G.closeMountBudget)()}function ks(t,o,s){const{node:n}=t;if(!n)return;n.ref=t;const e=o?.tag==="fragment"?o.__ref?.__fragmentAnchor:null;if(e){const a=e.parentNode;if(a){if(s?.position==="before"&&s.node)a.insertBefore(n,s.node);else if(s?.position==="after"&&s.node){const c=s.node.nextSibling;a.insertBefore(n,c||e)}else a.insertBefore(n,e);return}}const i=o?.node||(o?.nodeType?o:null);if(i)if(s?.position==="before"&&s.node)i.insertBefore(n,s.node);else if(s?.position==="after"&&s.node){const a=s.node.nextSibling;a?i.insertBefore(n,a):i.appendChild(n)}else i.appendChild(n)}const Zt=3;function Os(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=Zt?!1:(t.__inBeforeUpdate=!0,!0)}function $t(t,o){t&&(t.__inBeforeUpdate=!1,o?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===Zt&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${Zt}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function F(t,o,s){const n=t.charAt(0).toLowerCase()+t.slice(1);o.context?.plugins?.length&&(0,Y.runPluginHook)(n,o,s);const e="on"+t,i=o[e];if(typeof i=="function"){const r=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(r){if(o.__ref[r])return!0;o.__ref[r]=!0}const f=o.context?.designSystem;f&&(0,j.pushConfig)(f);let l=!!r;try{const u=i(o,o.state,o.context,s);if(u&&typeof u.then=="function"){const d=o.__ref;return u.catch(h=>{o.context?.plugins?.length&&(0,Y.runPluginHook)("error",o,{hook:e,error:h})||console.error(`[DOMQL] Lifecycle "${e}" error:`,h)}).finally(()=>{r&&d&&(d[r]=!1)}),l=!1,!0}if(u===!1)return!1}catch(u){if(o.context?.plugins?.length&&(0,Y.runPluginHook)("error",o,{hook:e,error:u})||console.error(`[DOMQL] Lifecycle "${e}" error:`,u),o.context?.strictMode)throw u}finally{f&&(0,j.popConfig)(),l&&o.__ref&&(o.__ref[r]=!1)}}return!0}var oe=m;
4
+ `):"")}}if(qt(r,!0),Ls(r,o,e),typeof r.html=="function"&&r.node&&!r.node.innerHTML&&(0,W.withDesignSystem)(r,()=>{try{const u=r.html(r,r.state,r.context);u!=null&&typeof u!="function"&&(r.node.innerHTML=u)}catch{}}),N("Create",r,n),N("Complete",r,n),N("Render",r,n),N("RenderRouter",r,n),so(r,n),typeof r.onFrame=="function"){const u=r.onFrame,l=r.context?.designSystem,g=()=>{if(r.node){if(r.node.isConnected){l&&(0,M.pushConfig)(l);try{u(r,r.state,r.context)}catch(x){console.error("[DOMQL] onFrame error:",x)}finally{l&&(0,M.popConfig)()}}requestAnimationFrame(g)}};requestAnimationFrame(g)}return r}const No=new Set(["childProps","attr","style","scope","data","vars"]);function Fo(t,o,s,n,e,c){if(s&&!o.extends&&!o.extend){const p=s.indexOf("_"),h=s.indexOf(".");let _=p>0?p:-1;if(h>0&&(_<0||h<_)&&(_=h),_>0){const w=s.substring(0,_),y=t.context?.components;y&&(y[w]||y["smbls."+w])?o={...o,extends:w}:y&&(0,it.isLoudDevRuntime)()&&(/^[A-Z]\w*_\d+$/.test(s)||/^[A-Z]\w*\.\w+$/.test(s))&&console.warn(`[smbls] auto-extend: key "${s}" looks like an instance of "${w}" but neither "${w}" nor "smbls.${w}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}t.__ref&&(t.__ref.__mergeLayer=null),(0,xt.applyExtends)(t,o,c);const a=(0,xt.openMergeLayer)(t),r=t.props&&typeof t.props=="object"?t.props:null;for(const p in o){if(p==="parent"||p==="node"||p==="__ref"||p==="extends"||p==="context"||p==="props")continue;if(p==="key"){n&&(t.key=e?Kt(e,n):n);continue}const h=o[p];a&&a.mark(p);const _=t[p],w=_&&h&&typeof _=="object"&&typeof h=="object"&&!Array.isArray(_)&&!Array.isArray(h)&&typeof _!="function"&&typeof h!="function";w&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?t[p]=vt(_,h):w&&No.has(p)?t[p]={..._,...h}:w&&no(p)?t[p]=vt(_,h):t[p]=h}function i(p){for(const h in p){const _=p[h],w=t[h],y=w&&_&&typeof w=="object"&&typeof _=="object"&&!Array.isArray(w)&&!Array.isArray(_)&&typeof w!="function"&&typeof _!="function";y&&h.charCodeAt(0)>=65&&h.charCodeAt(0)<=90?t[h]=vt(w,_):y&&No.has(h)?t[h]={...w,..._}:y&&no(h)?t[h]=vt(w,_):t[h]=_}}if(r&&i(r),o.props&&typeof o.props=="object"&&(i(o.props),a))for(const p in o.props)a.mark(p);(0,xt.closeMergeLayer)(t),o.classlist!==void 0&&(t.classlist=o.classlist),o.text!==void 0&&(t.text=o.text),o.html!==void 0&&(t.html=o.html);const f=t.scope&&typeof t.scope=="object"?t.scope:null,d=e?.scope,u=t.context&&typeof t.context.globalScope=="object"&&t.context.globalScope||null,l=d||u||null;if(o.scope!==void 0||f){const p={};f&&Object.assign(p,f),o.scope!==void 0&&Object.assign(p,o.scope),t.scope=(0,$.createScopeStore)(p,l)}else l&&(t.scope=l);o.if!==void 0&&(t.if=o.if);const g=t.__ref,x=vn(t,g&&g.__runtimeSource);return g&&(g.__declaredArrays=x||void 0),(0,Ms.addMethods)(t),an(t,e,o,c),o}const rn=new Set(["key","parent","context","__ref"]);function cn(t,o){for(const n of Object.keys(t))rn.has(n)||delete t[n];let s=o.definition;if(!s.extends&&!s.extend&&typeof o.key=="string"){const n=t.context?.components||{},e=n[o.key]||n["smbls."+o.key];e&&(s={...s,extends:e})}(0,W.untrack)(()=>Fo(t,s,o.key,o.ownKey,t.parent,o.options))}function fn(t,o,s){const n=s||{},e=r=>!!(n[r]||n["smbls."+r]),c=[],a=[];if(t.extends&&a.push(...Array.isArray(t.extends)?t.extends:[t.extends]),t.extend&&a.push(...Array.isArray(t.extend)?t.extend:[t.extend]),a.length){for(const r of a){if(typeof r!="string")continue;const i=r.includes(">")?r.split(">")[0].trim():r;e(i)||c.push(i)}return c}if(typeof o=="string"&&/^[A-Z]/.test(o)){let r=-1;const i=o.indexOf("_"),f=o.indexOf(".");i>0&&(r=i),f>0&&(r<0||f<r)&&(r=f);const d=r>0?o.substring(0,r):o;e(d)||c.push(d)}return c}function eo(t,o,s){if(typeof t.onStateInit!="function"&&!(0,z.hasPluginHook)(t,"stateInit"))return;const n=t.state;t.state=o;try{N("StateInit",t,s)}finally{t.state=n}}const ro=t=>({isDataOnlyKey:o=>(0,L.polyglotSeededKeys)(t).has(o)});function an(t,o,s,n){const e=!o,c=s.state&&typeof s.state=="object"&&!Array.isArray(s.state)&&Object.keys(s.state).length===0,a=e&&c&&t.context?.state,r=s.state!==void 0&&!a?s.state:t.state&&!(0,$.isStore)(t.state)?t.state:void 0;if(r==null){if(o?.state)t.state=o.state,(0,ut.applyStateMethods)(t,t.state);else if(t.context?.state){const i=t.context.state,f={...i},d=t.context?.polyglot;if(d?.translations){const u=t.context,l=i.lang||d.defaultLang||"en",g=new Set,x=(_,w)=>{g.has(_)||(0,L.isPolyglotWritableKey)(u,_,f)&&(f[_]=w,g.add(_),(0,L.markPolyglotSeeded)(u,_,w))},p=d.translations[l];if(p&&typeof p=="object")for(const _ in p)x(_,p[_]);const h=new Set(d.languages||[]);for(const _ in d.translations)h.has(_)||x(_,d.translations[_])}(0,$.isStore)(f)||eo(t,f,n),t.state=(0,$.isStore)(f)?f:(0,$.createStore)(f,ro(t.context)),t.state.__element=t,t.state.root=t.state,(0,ut.applyStateMethods)(t,t.state),Ut.promoteActiveRootState?.(i,t.state),N("StateCreated",t,n)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),(0,ut.applyStateMethods)(t,t.state);return}if(typeof r=="string"){if(t.state=Bo(r,o),t.state&&typeof t.state=="object"&&!(0,$.isStore)(t.state)){const i=o?.state?.root||o?.state||t.state;Object.defineProperty(t.state,"root",{value:i,enumerable:!1,configurable:!0,writable:!0})}(0,ut.applyStateMethods)(t,t.state),dn(t,r,o),N("StateCreated",t,n);return}if(typeof r=="function"){const i=r(t,o?.state);if((0,$.isStore)(i))t.state=i;else{const f=i||{};eo(t,f,n),t.state=(0,$.createStore)(f,o?.state?void 0:ro(t.context))}}else if((0,$.isStore)(r))t.state=r;else{const i={...r};eo(t,i,n),t.state=(0,$.createStore)(i,o?.state?void 0:ro(t.context))}t.state.__element=t,o?.state?(t.state.parent=o.state,t.state.root=o.state.root||o.state):t.state.root=t.state,(0,ut.applyStateMethods)(t,t.state),Ut.promoteActiveRootState?.(r,t.state),N("StateCreated",t,n)}function $o(t,o){if(!o)return t;const s=o.split("/");let n=t;for(const e of s){if(n==null)return{};n=n[e]}return n??{}}function Io(t,o){const s=o.state;return t.startsWith("~/")?[s&&(s.root||s),t.slice(2)]:t.startsWith("../")?[s,t.slice(3)]:[s,t]}function Bo(t,o){if(!o)return{};if(t===".")return o.state||{};if(t.startsWith("../")||t.startsWith("~/")){const[e,c]=Io(t,o);return c?$o(e,c):e??{}}if(o.state?.[t]!==void 0)return o.state[t];const s=$o(o.state,t);if(s!=null&&Object.keys(s).length>0)return s;const n=o.context?.polyglot;if(n?.translations){const e=o.state?.root?.lang||n.defaultLang||"en",c=n.translations[e];if(c?.[t]!==void 0)return c[t];if(n.translations[t]!==void 0)return n.translations[t]}return{}}function un(t,o){const[s,n]=Io(t,o);if(!n||!s||typeof s!="object")return;const e=s[n];if(e!==void 0||n.indexOf("/")===-1)return e;let c=s;for(const a of n.split("/")){if(c==null||typeof c!="object")return;c=c[a]}return c}function dn(t,o,s){const n=t.__ref;if(!n||!s||o==="."||!(0,$.isStore)(s.state))return;n.__stateBinding&&n.__stateBinding.dispose();const e=(0,W.untrack)(()=>(0,E.createEffect)(()=>{const c=un(o,s);!c||typeof c!="object"||c===t.state||(0,W.untrack)(()=>Ho(t,t.state,c,!0))},{depth:n.path?n.path.length:0,label:P(n,"state")}));e._isStateBinding=!0,n.__stateBinding=e,n.__effects&&n.__effects.push(e)}function Ho(t,o,s,n){const e=t.__ref;if(!e)return;if(n||t.state===o){t.state=s,n&&(0,ut.applyStateMethods)(t,s),Uo(e);const a=e.__children;if(a)for(let r=0;r<a.length;r++){const i=t[a[r]];i&&i.__ref&&i.parent===t&&Ho(i,o,s,!1)}return}if(e.__stateBinding){e.__stateBinding._notify();return}const c=t.state;c&&typeof c=="object"&&c.parent===o&&(c.parent=s,Uo(e))}function Uo(t){const o=t.__effects;if(o)for(let s=0;s<o.length;s++){const n=o[s];n&&!n._disposed&&!n._isStateBinding&&!n._isSubscribeToEffect&&typeof n._notify=="function"&&n._notify()}}const ln=new Set(["s","state","ctx","context"]),io=new WeakMap;function Vo(t){if(io.has(t))return io.get(t);let o=null;try{const s=typeof Ut.getFunctionSource=="function"?Ut.getFunctionSource(t):Function.prototype.toString.call(t);if(typeof s=="string"){const n=s.match(/^\s*(?:async\s+)?([A-Za-z_$][\w$]*)\s*=>/)||s.match(/^[^(]*\(([^)]*)\)/);n&&(o={params:n[1].split(",").map(e=>e.trim()),body:s.slice(n.index+n[0].length)})}}catch{}return io.set(t,o),o}function pn(t){const o=Vo(t);return o?o.params.map(s=>s.split("=")[0].trim()).filter(Boolean):[]}const Go=new WeakMap;function hn(t){let o=Go.get(t);return o===void 0&&(o=yn(Vo(t)),Go.set(t,o)),o}function yn(t){if(!t)return!0;const o=t.body;if(/\bstate\b|\barguments\b|\bcall\s*\(/.test(o))return!0;const s=t.params[1];if(!s)return!1;if(!/^[A-Za-z_$][\w$]*$/.test(s.split("=")[0].trim()))return!0;const n=s.split("=")[0].trim();return new RegExp("(^|[^\\w$.])"+n.replace(/\$/g,"\\$")+"(?![\\w$])").test(o)}const _n=3,gn=/^(is|has)[A-Z0-9_$]/,bn=new Set(["routerOptions"]),Ko=new WeakSet;function An(t,o){if(typeof t!="function"||t.length!==2||o&&(gn.test(o)||bn.has(o))||Ko.has(t))return!1;const s=pn(t);if(s.length<2)return!1;const n=s[1].replace(/[{}[\]]/g,"").trim();return n.length<_n||ln.has(n)?!1:(Ko.add(t),!0)}function xn(t){const o=t.__ref,s=t.tag||"div",n=t.context?.designSystem,e=[],c=Object.keys(t);for(let a=0;a<c.length;a++){const r=c[a];if(typeof t[r]!="function"||H.REGISTRY.has(r))continue;const i=r.charCodeAt(0);i>=65&&i<=90||m(r)||k.CSS_PROPS_REGISTRY[r]||k.DEFAULT_CSS_PROPERTIES_LIST&&k.DEFAULT_CSS_PROPERTIES_LIST.has(r)||i!==45&&((0,v.checkAttributeByTagName)(s,r)||((0,it.isLoudDevRuntime)()&&An(t[r],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).`),e.push({prop:r,fn:t[r]})))}for(let a=0;a<e.length;a++){const{prop:r,fn:i}=e[a];o.__exec[r]=i,Object.defineProperty(t,r,{get(){n&&(0,M.pushConfig)(n);try{return i(t,t.state,t.context)}catch{return}finally{n&&(0,M.popConfig)()}},set(f){delete o.__exec[r],Object.defineProperty(t,r,{value:f,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function wn(t,o){if(!(!Array.isArray(o)||o.length===0))for(let s=0;s<o.length;s++){const n=o[s];try{typeof n=="function"?n(t,t.state,t.context):typeof n=="string"&&t.state?.[n]}catch{}}}function R(t,o,s){return!Array.isArray(o)||o.length===0?s:function(...n){return wn(t,o),s.apply(this,n)}}function yt(t,o){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[o]}function P(t,o){return()=>t.path.join(".")+"::"+o}const Wo=new Set;function F(t,o,s){if(!(0,it.isLoudDevRuntime)())return;const n=P(t,o)();Wo.has(n)||(Wo.add(n),console.warn(`[smbls] "${o}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,s?.message||s))}const zo=/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,Sn=(t,o)=>{let s;try{s=String(t)}catch{return}if(!s.includes("{{"))return;zo.lastIndex=0;let n;for(;(n=zo.exec(s))!==null;)n[2].includes("{{")&&o.add(n[2])},Cn=(t,o)=>!m(t)&&!(0,Q.isCssProp)(o,t),co=(t,o,s,n,e)=>{if(typeof o=="string"){!e&&o.includes("{{")&&s.add(o);return}typeof o=="function"&&Cn(t,n)&&Sn(o,s)},fo=new WeakMap,jt=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),Et=t=>{if(typeof t=="string"||typeof t=="number")return{text:t};if(!t||typeof t!="object"||Array.isArray(t))return null;const o=t.props;return o&&typeof o=="object"&&!Array.isArray(o)?at(t,o):t},Pt=(t,o)=>t&&o?at(t,o):t||o||null,Yo=(t,o)=>{const s=t.__ref&&t.__ref.__runtimeSource;return!!s&&jt(s,o)},_t=(t,o)=>Yo(t,o)?Et(t.__ref.__runtimeSource[o]):null,Ot=(t,o)=>(o&&t&&typeof t=="object"&&fo.set(t,o),t),kn=t=>{if(!t||typeof t!="object")return;const o=fo.get(t);return o&&fo.delete(t),o},ao=(t,o,s)=>{if(typeof t=="string"){t.includes("{{")&&o.add(t);return}if(!(!t||typeof t!="object"||s.has(t))){if(s.add(t),Array.isArray(t)){for(let n=0;n<t.length;n++)ao(t[n],o,s);return}if(!t.__ref)for(const n of Object.keys(t)){if(n==="state")continue;const e=Object.getOwnPropertyDescriptor(t,n);e&&"value"in e&&ao(e.value,o,s)}}},vn=(t,o)=>{let s=null;for(const n of Object.keys(t)){if(H.REGISTRY.has(n)||o&&jt(o,n))continue;const e=Object.getOwnPropertyDescriptor(t,n),c=e&&e.value;if(!Array.isArray(c))continue;const a=new Set;ao(c,a,new Set),a.size&&(s||(s=new Map),s.set(c,a))}return s},qo=(t,o)=>{if(Array.isArray(o))for(let s=t;s;s=s.parent){const n=s.__ref&&s.__ref.__declaredArrays,e=n&&n.get(o);if(!e)continue;const c=t.__ref;c.__authoredTemplates||(c.__authoredTemplates=new Set);for(const a of e)c.__authoredTemplates.add(a);return}},Zo=["attr","aria","data","metadata"],jn=t=>{if(Zo.includes(t))return!0;const o=t.charCodeAt(0);return o===46||o===33||o===64},En=(t,o)=>{const s=new Set,n=t.tag||"div";for(const e of Object.keys(t)){const c=Object.getOwnPropertyDescriptor(t,e),a=c&&c.value,r=!!o&&jt(o,e);if(a&&typeof a=="object"&&!Array.isArray(a)){if(!jn(e))continue;const i=r?o[e]:null,f=i&&typeof i=="object"?i:null,d=e.charCodeAt(0)===46||e.charCodeAt(0)===33;for(const u in a){const l=r&&(!f||jt(f,u)),g=a[u];if(d&&g&&typeof g=="object"&&!Array.isArray(g)&&Zo.includes(u)){for(const x in g)co(x,g[x],s,n,l);continue}co(u,g,s,n,l)}continue}co(e,a,s,n,r)}return s};function Qo(t,o){const s=t.__ref,n=!!(o&&o.skipIfEffect),e=En(t,s.__runtimeSource);if(s.__authoredTemplates)for(const i of e)s.__authoredTemplates.add(i);else s.__authoredTemplates=e;if(xn(t),typeof t.text=="function"){const i=t.text,f=R(t,t.textDeps,i),d=(0,E.createEffect)(()=>{if(!s.contentManaged)try{let u=f(t,t.state,t.context);t.node&&u!=null&&typeof u!="function"&&typeof u!="object"&&(typeof u=="string"&&u.includes("{{")&&(u=L.replaceLiteralsWithObjectFields.call(t,u,t.state)),Nt(t,u))}catch(u){F(s,"text",u)}},{depth:s.path.length,label:P(s,"text")});s.__effects.push(d),s.__exec.text=i}else if(typeof t.text=="string"&&t.text.includes("{{")){const i=t.text,f=(0,E.createEffect)(()=>{if(s.contentManaged)return;const d=L.replaceLiteralsWithObjectFields.call(t,i,t.state);d!=null&&(t.text=d),t.node&&Nt(t,d??"")},{depth:s.path.length,label:P(s,"text")});s.__effects.push(f),s.__exec.text=i}const c=t.tag||"div";for(const i of Object.keys(t))if(typeof t[i]=="function"&&!H.REGISTRY.has(i)&&!m(i)&&!s.__exec[i]&&!(0,Q.isAttributeFirst)(c,i)){if(k.CSS_PROPS_REGISTRY[i]){const f=t[i],d=R(t,t[i+"Deps"],f),u=i;let l,g=null,x=null,p;const h=(0,E.createEffect)(()=>{const _=t.context?.designSystem;_&&(0,M.pushConfig)(_);try{const w=d(t,t.state,t.context);(0,k.pushStaticCssPass)();let y;try{y=k.CSS_PROPS_REGISTRY[u](w,t,t.state,t.context)}finally{(0,k.popStaticCssPass)()}if(Array.isArray(y)){const A={};for(const S of y)if(S)for(const C in S)A[C]=S[C];y=A}const b=u==="show"||u==="hide";if(y&&t.node&&Tn(y)){const A=gt(y);if(A===null||A!==p){p=A;const S=(0,st.css)(y,null,t.context?.cssPrefix),C=S?S.split(" ").filter(Boolean):null;if(t.node.classList){if(x)for(const j of x)t.node.classList.remove(j);if(C&&C.length)for(const j of C)t.node.classList.add(j);x=C}}l=void 0,g=null}else if(y&&t.node){if(x){for(const S of x)t.node.classList.remove(S);x=null,p=void 0}const A=gt(y);if(A===null||A!==l||!Dt(t.node,g)){l=A;const S=cs(t,y);g=Tt(t.node,S)}}else t.node&&b&&(l=void 0,g=null,t.node.style.display="")}finally{_&&(0,M.popConfig)()}},{depth:s.path.length,label:P(s,u)});s.__effects.push(h),s.__exec[i]=f}else if(k.DEFAULT_CSS_PROPERTIES_LIST&&k.DEFAULT_CSS_PROPERTIES_LIST.has(i)){const f=t[i],d=R(t,t[i+"Deps"],f),u=i;let l,g=null;const x=(0,E.createEffect)(()=>{const p=t.context?.designSystem;p&&(0,M.pushConfig)(p);try{const h=d(t,t.state,t.context);if(t.node)if(h!=null){const _=u+":"+String(h);if(_!==l||!Dt(t.node,g)){l=_;const w={[u]:h},y=cs(t,w);g=Tt(t.node,y)}}else l=void 0,g=null,t.node.style[u]=""}finally{p&&(0,M.popConfig)()}},{depth:s.path.length,label:P(s,u)});s.__effects.push(x),s.__exec[i]=f}else if(i.charCodeAt(0)===45){const f=t[i];es(t,i,f,t[i+"Deps"],i),s.__exec[i]=f}}if(Dn(t),typeof t.html=="function"){const i=t.html,f=R(t,t.htmlDeps,i),d=(0,E.createEffect)(()=>{(0,W.withDesignSystem)(t,()=>{const u=f(t,t.state,t.context);t.node&&u!=null&&typeof u!="function"&&(t.node.innerHTML=u)})},{depth:s.path.length,label:P(s,"html")});s.__effects.push(d),s.__exec.html=i}if(typeof t.value=="function"){const i=t.value,f=R(t,t.valueDeps,i),d=(0,E.createEffect)(()=>{try{let u=f(t,t.state,t.context);typeof u=="string"&&u.includes("{{")&&(u=L.replaceLiteralsWithObjectFields.call(t,u,t.state)),ts(t,u)}catch(u){F(s,"value",u)}},{depth:s.path.length,label:P(s,"value")});s.__effects.push(d),s.__exec.value=i}else if(typeof t.value=="string"&&t.value.includes("{{")){const i=t.value,f=(0,E.createEffect)(()=>{try{ts(t,L.replaceLiteralsWithObjectFields.call(t,i,t.state))}catch(d){F(s,"value",d)}},{depth:s.path.length,label:P(s,"value")});s.__effects.push(f),s.__exec.value=i}if(typeof t.style=="function"){const i=t.style,f=R(t,t.styleDeps,i);let d,u=null,l,g,x,p;const h=(0,E.createEffect)(()=>{const _=f(t,t.state,t.context),w=t.context&&t.context.designSystem;let y;if(_&&typeof _=="object"&&_===l&&w===x){const A=gt(_);y=A!==null&&A===g?p:$t(t,_),g=A}else y=$t(t,_),g=void 0;l=_,x=w,p=y;const b=gt(y);(b===null||b!==d||!Dt(t.node,u))&&(d=b,lo(t.node,u,y),et(t.node,y),u=Tt(t.node,y))},{depth:s.path.length,label:P(s,"style")});s.__effects.push(h),s.__exec.style=i}else if(t.style&&typeof t.style=="object")for(const i in t.style){const f=t.style[i];if(typeof f!="function")continue;const d=R(t,yt(t.styleDeps,i),f);let u,l=null;const g=(0,E.createEffect)(()=>{try{const x=d(t,t.state,t.context);if(t.node){const p=i+":"+String(x);if(p!==u||!Dt(t.node,l)){u=p;const h=$t(t,{[i]:x});lo(t.node,l,Object.assign({},h,{[i]:""})),et(t.node,h),l=Tt(t.node,h)}}}catch(x){F(s,"style."+i,x)}},{depth:s.path.length,label:P(s,"style."+i)});s.__effects.push(g)}if(t.attr&&typeof t.attr=="object"){for(const i in t.attr)if(typeof t.attr[i]=="function"){const f=R(t,yt(t.attrDeps,i),t.attr[i]),d=i,u=(0,E.createEffect)(()=>{try{let l=f(t,t.state,t.context);typeof l=="string"&&l.includes("{{")&&(l=L.replaceLiteralsWithObjectFields.call(t,l,t.state)),t.node?.setAttribute&&Ft(t.node,d,l)}catch(l){F(s,"attr."+d,l)}},{depth:s.path.length,label:P(s,"attr."+d)});u._attrName=d.toLowerCase(),s.__effects.push(u)}else if(typeof t.attr[i]=="string"&&t.attr[i].includes("{{")){const f=t.attr[i],d=i,u=(0,E.createEffect)(()=>{try{const l=L.replaceLiteralsWithObjectFields.call(t,f,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(d,(0,v.serializeAttrValue)(d,l??""))}catch(l){F(s,"attr."+d,l)}},{depth:s.path.length,label:P(s,"attr."+d)});u._attrName=d.toLowerCase(),s.__effects.push(u)}}if(t.aria&&typeof t.aria=="object")for(const i in t.aria){const f=t.aria[i];if(typeof f=="string"&&f.includes("{{")){const g=f,x="aria-"+i.replace(/[A-Z]/g,h=>"-"+h.toLowerCase()),p=(0,E.createEffect)(()=>{try{const h=L.replaceLiteralsWithObjectFields.call(t,g,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(x,(0,v.serializeAttrValue)(x,h??""))}catch(h){F(s,"aria."+i,h)}},{depth:s.path.length,label:P(s,"aria."+i)});p._attrName=x,s.__effects.push(p);continue}if(typeof f!="function")continue;const d=R(t,yt(t.ariaDeps,i),t.aria[i]),u="aria-"+i.replace(/[A-Z]/g,g=>"-"+g.toLowerCase()),l=(0,E.createEffect)(()=>{try{const g=d(t,t.state,t.context);if(!t.node?.setAttribute)return;Ft(t.node,u,g)}catch(g){F(s,"aria."+i,g)}},{depth:s.path.length,label:P(s,"aria."+i)});l._attrName=u,s.__effects.push(l)}if(t.data&&typeof t.data=="object")for(const i in t.data){const f=t.data[i];if(typeof f=="string"&&f.includes("{{")){const x=f,p="data-"+i.replace(/[A-Z]/g,_=>"-"+_.toLowerCase()),h=(0,E.createEffect)(()=>{try{const _=L.replaceLiteralsWithObjectFields.call(t,x,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(p,_??"")}catch(_){F(s,"data."+i,_)}},{depth:s.path.length,label:P(s,"data."+i)});h._attrName=p,s.__effects.push(h);continue}if(typeof f!="function")continue;const d=R(t,yt(t.dataDeps,i),t.data[i]),l="data-"+i.replace(/[A-Z]/g,x=>"-"+x.toLowerCase()),g=(0,E.createEffect)(()=>{try{const x=d(t,t.state,t.context);if(!t.node?.setAttribute)return;x==null||x===!1?t.node.removeAttribute(l):typeof x!="function"&&typeof x!="object"&&t.node.setAttribute(l,x===!0?"":x)}catch(x){F(s,"data."+i,x)}},{depth:s.path.length,label:P(s,"data."+i)});g._attrName=l,s.__effects.push(g)}const a=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(a)for(const i in a){if(typeof a[i]!="function")continue;const f=R(t,yt(t.classDeps,i),a[i]),d=(0,E.createEffect)(()=>{try{const u=f(t,t.state,t.context);if(!t.node?.classList)return;typeof u=="string"?t.node.classList.add(u):u?t.node.classList.add(i):t.node.classList.remove(i)}catch(u){F(s,"class."+i,u)}},{depth:s.path.length,label:P(s,"class."+i)});s.__effects.push(d)}!n&&typeof t.if=="function"&&mo(t,s,t.if);for(const i of Object.keys(t)){if(H.REGISTRY.has(i)||typeof t[i]!="function")continue;const f=i.charCodeAt(0);if(f>=65&&f<=90||m(i))continue;const d=t[i];s.__exec[i]=d;const u=t.tag||"div";if((0,v.checkAttributeByTagName)(u,i)&&!(0,Q.isCssProp)(u,i)){const l=(0,v.camelToAttr)(i)||i,g=R(t,t[i+"Deps"],d),x=(0,E.createEffect)(()=>{try{let p=g(t,t.state,t.context);typeof p=="string"&&p.includes("{{")&&(p=L.replaceLiteralsWithObjectFields.call(t,p,t.state)),t.node?.setAttribute&&Ft(t.node,l,p,!0)}catch(p){F(s,i,p)}},{depth:s.path.length,label:P(s,i)});x._attrName=l.toLowerCase(),s.__effects.push(x)}}const r=t.tag||"div";for(const i of Object.keys(t)){if(H.REGISTRY.has(i))continue;const f=t[i];if(typeof f!="string"||!f.includes("{{"))continue;const d=i.charCodeAt(0);if(d>=65&&d<=90||m(i)||(0,Q.isCssProp)(r,i)||v.ATTR_TRANSFORMS[i]||!(0,v.checkAttributeByTagName)(r,i))continue;const u=(0,v.camelToAttr)(i)||i,l=(0,E.createEffect)(()=>{try{const g=L.replaceLiteralsWithObjectFields.call(t,f,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(u,(0,v.serializeAttrValue)(u,g??""))}catch(g){F(s,i,g)}},{depth:s.path.length,label:P(s,i)});l._attrName=u.toLowerCase(),s.__effects.push(l)}if(In(t),Yn(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){const i=t.onStateUpdate,f=t.stateDeps;let d=!1,u=[];const l=(0,E.createEffect)(()=>{const g=[];for(let h=0;h<f.length;h++){const _=f[h];try{g[h]=typeof _=="function"?_(t,t.state,t.context):t.state?.[_]}catch{g[h]=void 0}}if(!d){d=!0,u=g;return}let x=g.length!==u.length;for(let h=0;!x&&h<g.length;h++)g[h]!==u[h]&&(x=!0);const p=u;u=g,x&&(0,W.withDesignSystem)(t,()=>{try{i(t,t.state,t.context,{prev:p,next:g})}catch(h){if((0,z.reportLifecycleError)(t,"onStateUpdate",h),t.context?.strictMode)throw h}})},{depth:s.path.length,label:P(s,"onStateUpdate")});s.__effects.push(l)}Vn(t)}function Xo(t){const o=t.parent,s=o?.node;if(!s||!t.node){Ls(t,t.parent);return}let n=null;const e=Object.keys(o),c=e.indexOf(t.key);for(let a=c+1;a<e.length;a++){const r=o[e[a]];if(r?.node?.parentNode===s){n=r.node;break}}n?s.insertBefore(t.node,n):s.appendChild(t.node)}function Jo(t){os(t),te(t),gs(t),pe(t),le(t)}function mo(t,o,s){let n=R(t,t.ifDeps,s);const e=(0,E.createEffect)(()=>{const c=!o.__ifInitialized&&o.__ifLateMerge;if(c){const i=t.context?.components||{};c.names.some(f=>i[f]||i["smbls."+f])&&(o.__ifLateMerge=null,cn(t,c),n=R(t,t.ifDeps,typeof t.if=="function"?t.if:s))}let a;try{a=n(t,t.state,t.context)}catch(i){if(a=!1,o.__ifError=i,typeof console<"u"&&console.warn){const f=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${f} \u2014 treating as false:`,i?.message||i)}return}const r=o.__if;if(o.__if=!!a,r&&!o.__if&&t.node){t.node.remove();try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(i){console.error("[smbls] onRemove error:",i)}}else if(!r&&o.__if)if(o.__ifInitialized)t.node||(t.node=(0,nt.cacheNode)(t)),t.node&&(t.node.ref=t),Xo(t),os(t),gs(t),N("Render",t,{}),so(t,{});else{if(o.__ifInitialized=!0,o.__ifLateMerge=null,t.tag||(t.tag=(0,nt.detectTag)(t)),N("Init",t,{}),t.node||(t.node=(0,nt.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"&&!o.__fragmentAnchor){const f=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(f),o.__fragmentAnchor=f}N("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),Ts(t,{}),Qo(t,{skipIfEffect:!0}),Jo(t),Ds(t,{}),Xo(t),N("Create",t,{}),N("Complete",t,{}),N("Render",t,{}),N("RenderRouter",t,{}),so(t,{})}},{depth:o.path.length,label:P(o,"if")});o.__effects.push(e)}function Nt(t,o){const s=t.node;if(!s)return;const n=o==null||typeof o=="object"?"":String(o);if(t.tag==="string"){s.nodeValue!==n&&(s.nodeValue=n);return}const e=t.__ref;let c=e?e.__textNode:null;if(c&&c.parentNode!==s&&(c=null),!c){const a=s.firstChild;a&&a.nodeType===3&&(c=a)}c?c.nodeValue!==n&&(c.nodeValue=n):s.firstChild?(c=(s.ownerDocument||t.context?.document||globalThis.document).createTextNode(n),s.insertBefore(c,s.firstChild)):(s.textContent=n,c=s.firstChild&&s.firstChild.nodeType===3?s.firstChild:null),e&&(e.__textNode=c||null)}function Pn(t,o){return o!=="checked"||!t||t.tagName!=="INPUT"?null:t.hasAttribute("checked")}function On(t,o){if(o===null)return;const s=t.hasAttribute("checked");s!==o&&t.checked!==s&&(t.checked=s)}function Ft(t,o,s,n){s==null||s===!1&&!(0,v.isEnumeratedTrueFalseAttr)(o)?Wt(t,o,null):typeof s=="function"||typeof s=="object"||(n&&o==="src"&&"src"in t?t.src=s:Wt(t,o,(0,v.serializeAttrValue)(o,s)))}function Wt(t,o,s){const n=Pn(t,o);s==null?t.removeAttribute(o):t.setAttribute(o,s),On(t,n)}function ts(t,o){const s=t.node;if(!s||!("value"in s))return;const n=o==null?"":String(o);if(s.value===n)return;const e=typeof document<"u"&&document.activeElement===s,c=e&&typeof s.selectionStart=="number"?s.selectionStart:null,a=e&&typeof s.selectionEnd=="number"?s.selectionEnd:null;if(s.value=n,e&&c!=null&&a!=null)try{s.setSelectionRange(c,a)}catch{}const r=t.__ref&&t.__ref.__autoGrow;r&&r.active&&r.resize()}function os(t){const{node:o}=t;if(o){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&Nt(t,t.text),Ss(t),typeof t.html=="string"&&(o.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&!(typeof t.value=="string"&&t.value.includes("{{"))&&"value"in o){const s=String(t.value);o.value!==s&&(o.value=s)}if(t.style&&typeof t.style=="object"){let s=t.style;for(const n in t.style)if(typeof t.style[n]=="function"){s={};for(const e in t.style)typeof t.style[e]!="function"&&(s[e]=t.style[e]);break}et(o,$t(t,s))}if(t.attr&&typeof t.attr=="object")for(const s in t.attr){const n=t.attr[s];typeof n=="function"||typeof n=="object"||n!=null&&(typeof n=="string"&&n.includes("{{")||n===!1&&!(0,v.isEnumeratedTrueFalseAttr)(s)||o.setAttribute&&o.setAttribute(s,(0,v.serializeAttrValue)(s,n)))}if(typeof t.themeModifier=="string"&&t.themeModifier&&o.setAttribute&&o.setAttribute("data-theme",t.themeModifier),t.data&&typeof t.data=="object")for(const s in t.data){const n=t.data[s];typeof n=="function"||typeof n=="object"||n==null||n===!1||typeof n=="string"&&n.includes("{{")||o.dataset&&(o.dataset[s]=n===!0?"":n)}if(t.classlist||t.class){const s=t.classlist||t.class;if(typeof s=="string")s.split(" ").forEach(n=>n&&o.classList.add(n));else if(typeof s=="object")for(const n in s){const e=typeof s[n]=="function"?s[n](t,t.state,t.context):s[n];e&&o.classList.add(typeof e=="string"?e:n)}}}}function gt(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Tn(t){if(!t||typeof t!="object")return!1;for(const o in t){const s=t[o];if(s&&typeof s=="object"&&!Array.isArray(s))return!0}return!1}function Tt(t,o){if(!t||!t.style||!o)return null;const s=t.style,n=[];for(const e in o){if(o[e]==null||e.charAt(0)==="&")continue;const a=tt(e);n.push(a,uo(s,a),ss(s,a))}return n}function uo(t,o){return typeof t.getPropertyValue=="function"?t.getPropertyValue(o):""}function ss(t,o){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(o):""}function tt(t){return(0,I.cssPropName)(t)}function lo(t,o,s){if(!t||!t.style||!o||!o.length)return;const n=t.style,e=new Set;if(s&&typeof s=="object")for(const c in s)s[c]==null||c.charAt(0)==="&"||e.add(tt(c));for(let c=0;c<o.length;c+=3){const a=o[c];e.has(a)||uo(n,a)===o[c+1]&&typeof n.removeProperty=="function"&&n.removeProperty(a)}}function Dt(t,o){if(!o||!t||!t.style)return!1;const s=t.style;for(let n=0;n<o.length;n+=3)if(uo(s,o[n])!==o[n+1]||ss(s,o[n])!==o[n+2])return!1;return!0}const Lt=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,ns=t=>typeof t=="number"||t===!0||typeof t=="string"&&t!=="",zt=t=>Lt(t)?t:"--"+t;function Yt(t,o){if(!rt(t))return null;let s=null;for(const n of Object.keys(t)){if(!n)continue;let e=t[n];if(typeof e=="function"){if(!o)continue;e=e(o,o.state,o.context)}ns(e)&&(s||(s={}),s[zt(n)]=e)}return s}function es(t,o,s,n,e){rs(t,e,R(t,n,s),c=>ns(c)?{[o]:c}:null)}function rs(t,o,s,n,e){const c=t.__ref;let a,r=null;const i=(0,E.createEffect)(()=>{(0,W.withDesignSystem)(t,()=>{try{const f=n(s(t,t.state,t.context)),d=t.node;if(!d||!d.style)return;const u=gt(f);(u===null||u!==a||!Dt(d,r))&&(a=u,lo(d,r,f),f&&et(d,f),r=f?Tt(d,f):null,e&&e(f))}catch(f){F(c,o,f)}})},{depth:c.path.length,label:P(c,o)});c.__effects.push(i)}function Dn(t){const o=t.__ref,s=t.vars;if(typeof s=="function"){Ln(t,s),o.__exec.vars=s;return}if(rt(s))for(const n of Object.keys(s)){const e=s[n];!n||typeof e!="function"||es(t,zt(n),e,yt(t.varsDeps,n),"vars."+n)}}function Ln(t,o){const s=t.__ref;rs(t,"vars",R(t,t.varsDeps,o),n=>Yt(n),n=>{s.__varsInline=n?new Set(Object.keys(n)):null})}function po(t,o){if(typeof t[o]=="function"&&((0,Q.isCssProp)(t.tag||"div",o)||o.charCodeAt(0)===45))return!0;if(!Lt(o))return!1;const s=t.vars;if(typeof s=="function"){const n=t.__ref&&t.__ref.__varsInline;return!!(n&&n.has(o))}if(!rt(s))return!1;for(const n of Object.keys(s))if(typeof s[n]=="function"&&zt(n)===o)return!0;return!1}function Rn(t){let o=null;for(const s in t)t[s]!=null&&s.charAt(0)!=="&"&&(o||(o=new Set),o.add(tt(s)));return o}function Mn(t,o,s,n){const e=t.__ref;if(!e)return;let c=null;if(s)for(const a of s){if(n&&n.has(a))continue;const r=o[a];if(r==null||typeof r=="object")continue;const i=tt(a);I.CSS_LONGHAND_SHORTHANDS[i]&&(c||(c={}),c[i]=r)}e.__declaredLonghands=c}function is(t,o){const s=t.__ref,n=s&&s.__declaredLonghands;if(!n||!o)return null;let e=null;for(const c in n){if(o.has(c))continue;const a=I.CSS_LONGHAND_SHORTHANDS[c];let r=!1;for(let i=0;i<a.length;i++)if(o.has(a[i])){r=!0;break}r&&(e||(e={}),e[c]=n[c])}return e}function cs(t,o){const s=t.node;et(s,o);const n=Rn(o);if(!n)return o;const e=t.__ref;if(e)if(e.__inlineCssKeys)for(const a of n)e.__inlineCssKeys.add(a);else e.__inlineCssKeys=new Set(n);const c=is(t,n);return c?(et(s,c),Object.assign({},o,c)):o}function Nn(t){const o=t.__ref;if(!o||!o.__inlineCssKeys||!o.__declaredLonghands)return;const s=is(t,o.__inlineCssKeys);s&&et(t.node,s)}function $t(t,o){return!o||typeof o!="object"?o:(0,W.withDesignSystem)(t,()=>{try{return(0,k.resolveStyleBlockTokens)(o,t)}catch{return o}})}function et(t,o){if(!t||!o||!t.style)return;let s=null;for(const n in o){const e=o[n];if(e!=null){if(n.charAt(0)==="&"&&typeof e=="object"){s||(s={}),s[n]=e;continue}try{const c=String(e),a=(0,I.cssPropName)(n),r=c.trim(),i=/\s*!important\s*$/.test(r),f=r.replace(/\s*!important\s*$/,"");t.style.setProperty(a,f,i?"important":"")}catch{}}}s&&Fn(t,s)}function Fn(t,o){const s=`_ds${Eo.scopedStyleId++}`;t.classList.add(s);const n=t.ownerDocument;let e=n.querySelector("style[data-smbls-scoped]");e||(e=n.createElement("style"),e.setAttribute("data-smbls-scoped",""),n.head.appendChild(e));let c="";for(const a in o){const r="."+s,i=a.replace(/&/g,r).split(",").map(d=>{const u=d.trim();return u.includes(r)?u:r+u}).join(", "),f=o[a];if(typeof f=="object"){let d="",u="";for(const l in f){const g=f[l];if(typeof g=="object"){const x=l.includes("&")?i.split(", ").map(h=>l.replace(/&/g,h)).join(", "):i.split(", ").map(h=>`${h} ${l}`).join(", ");let p="";for(const h in g)p+=`${tt(h)}: ${g[h]};`;u+=(0,st.wrapHoverRule)(`${x} { ${p} }`,x)+`
5
+ `}else d+=`${tt(l)}: ${g};`}d&&(c+=(0,st.wrapHoverRule)(`${i} { ${d} }`,i)+`
6
+ `),u&&(c+=u)}}c&&(e.textContent+=c)}const fs=new Set;function as(t){if(!Array.isArray(t))return"";const o=[];for(let s=0;s<t.length;s++)typeof t[s]=="string"&&t[s].length&&o.push(t[s]);return o.sort(),o.join("|")}function $n(t,o,s){const n=as(s);queueMicrotask(()=>{if(!t.__ref)return;let e;try{e=o(t,t.state,t.context)}catch{return}if(as(e)===n)return;const c=t.__ref.path?t.__ref.path.join("."):t.key||"?";fs.has(c)||(fs.add(c),console.warn(`[smbls] subscribeTo function at "${c}" resolved to a DIFFERENT key list one microtask after create \u2014 wired [${s.join(", ")||"(none)"}], probed [${Array.isArray(e)?e.join(", "):String(e)}]. subscribeTo's function form is resolved ONCE at element-create time (registerSubscribeToEffects, @symbo.ls/element create.js) \u2014 this element stays wired to the ORIGINAL list for its whole lifetime, so this drift is invisible to the reactive effect and any key only present in the new list will never trigger onUpdate. If the watched key genuinely is not known until later (e.g. a module config that loads after shell boot), route the write through an imperative call instead of subscribeTo \u2014 see functions/moduleOpenBridge.js's moduleOpenPage (workspace repo) for the house pattern.`))})}function In(t){const o=t.subscribeTo,s=typeof o=="function";let n=o;if(s)try{n=o(t,t.state,t.context)}catch{n=null}if(s&&(0,it.isLoudDevRuntime)()&&$n(t,o,Array.isArray(n)?n:[]),!Array.isArray(n)||n.length===0)return;const e=t.__ref;for(let c=0;c<n.length;c++){const a=n[c];if(typeof a!="string"||a.length===0)continue;const r=a.split("."),i=r[0],f=r.slice(1),d={value:!1},u=(0,E.createEffect)(()=>{const l=t.state&&((0,$.isStore)(t.state)?t.state.root:null);if(!l||!(0,$.isStore)(l))return;let g=l;g=g[i];for(let p=0;p<f.length&&!(g==null||typeof g!="object");p++)if((0,$.isStore)(g))g=g[f[p]];else break;if(!d.value)return;let x=!1;if(typeof t.onBeforeUpdate=="function"&&(0,W.withDesignSystem)(t,()=>{try{if($s(e)){const p=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});p&&typeof p.then=="function"?p.then(()=>It(e,!1),h=>{It(e,!0),(0,z.dispatchPluginHook)("error",t,{hook:"onBeforeUpdate",error:h})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",h)}):(It(e,!1),p===!1&&(x=!0))}}catch(p){It(e,!0),(0,z.dispatchPluginHook)("error",t,{hook:"onBeforeUpdate",error:p})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",p)}}),!x&&t.node&&e.__effects)for(let p=0;p<e.__effects.length;p++){const h=e.__effects[p];h&&h!==u&&!h._disposed&&!h._isSubscribeToEffect&&typeof h._execute=="function"&&h._execute()}!x&&typeof t.onUpdate=="function"&&(0,W.withDesignSystem)(t,()=>{try{t.onUpdate(t,t.state,t.context)}catch(p){(0,z.dispatchPluginHook)("error",t,{hook:"onUpdate",error:p})||console.error("[DOMQL] subscribeTo onUpdate error:",p)}})},{depth:e.path.length,label:P(e,"subscribeTo("+a+")")});d.value=!0,u._isSubscribeToEffect=!0,e.__effects.push(u)}}function ho(t,o){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&!t.startsWith("@container")&&(t==="@dark"||t==="@light"||!o.context?.designSystem?.media?.[t.slice(1)])}function yo(t,o){if(t.charCodeAt(0)!==64||/^@(media|supports|container|keyframes)\b/.test(t))return t;const s=o.context?.designSystem?.media?.[t.slice(1)];return s?/^@(media|supports|container)\b/.test(s)?s:`@media ${s}`:t}const us=new Set;function Bn(t,o){const s=o?.__ref?.path?o.__ref.path.join("."):o?.key||"?",n=s+"::"+t;us.has(n)||(us.add(n),console.warn(`[smbls/css] "${t}" at ${s} 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.`))}const ds=new Map;function Hn(t){let o=ds.get(t);if(o)return o;o=[];const s=n=>{if(n)for(const e of n)o.push((0,I.cssCamelName)(e))};return s(I.CSS_LONGHAND_SHORTHANDS[t]),s(I.CSS_SHORTHAND_LONGHANDS[t]),ds.set(t,o),o}function ls(t,o,s){if(po(t,o)||s&&s.has(o))return!0;const n=Hn(tt(o));for(let e=0;e<n.length;e++){const c=n[e];if(po(t,c)||s&&s.has(c))return!0}return!1}function bt(t,o,s,n){const e={},c=new Set,a=(r,i,f)=>{const d=f?new Set(Object.keys(e)):null;if(k.CSS_PROPS_REGISTRY[r]){const u=k.CSS_PROPS_REGISTRY[r](i,o,o.state,o.context);if(u){const l=Array.isArray(u)?u:[u];for(const g of l)g&&Object.assign(e,g)}}else e[r]=i;if(f)for(const u in e)d.has(u)||c.add(u)};for(const r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let i=t[r];if(typeof i=="function"&&(i=i(o,o.state,o.context)),!(i==null||typeof i=="function")){if(typeof i=="object"&&!Array.isArray(i)){if(r==="style"){for(const u in i){let l=i[u];typeof l=="function"&&(l=l(o,o.state,o.context)),!(l==null||typeof l=="function")&&a(u,l,ls(o,u,n))}continue}if(r==="vars"){const u=Yt(i,o);if(u)for(const l in u)a(l,u[l],po(o,l)||!!(n&&n.has(l)));continue}if(ho(r,o)){const u=bt(i,o,!1,n);Object.keys(u).length&&(e[`[data-theme="${r.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(r)){(0,it.isLoudDevRuntime)()&&Bn(r,o);continue}const f=yo(r,o),d=bt(i,o,!1,n);Object.keys(d).length&&(e[f]=d);continue}a(r,i,ls(o,r,n))}}if(s)for(const r in e)c.add(r);for(const r of c){const i=e[r];typeof i=="string"&&!i.includes("!important")&&(e[r]=i+" !important")}return e}const rt=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function ps(t,o){for(const s in o){const n=o[s];t[s]=rt(n)?ps(rt(t[s])?t[s]:{},n):n}return t}function Un(t,o){if(!rt(o))return;let s;for(const n of t.split(" ")){const e=n?o[n]:null;rt(e)&&(s=ps(s||{},e))}return s}function _o(t,o){if(o===void 0&&(o=0),o>8)return!1;if(typeof t=="function")return!0;if(t&&typeof t=="object"&&!Array.isArray(t)){for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&_o(t[s],o+1))return!0}return!1}function hs(t,o,s){if(!o||typeof o!="object"||Array.isArray(o))return null;if(ho(t,s)){const c=bt(o,s,!1);return Object.keys(c).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:c}:null}const n=yo(t,s),e=bt(o,s,!1);return Object.keys(e).length?{cssProp:n,block:e}:null}function Vn(t){const o=t.__ref;for(const s of Object.keys(t)){if(!no(s))continue;const n=t[s];if(!n||typeof n!="object"||Array.isArray(n)||!_o(n))continue;let e=null,c;const a=(0,E.createEffect)(()=>{if(!t.node)return;const r=t.context?.designSystem;r&&(0,M.pushConfig)(r);let i,f=!1;try{const d=hs(s,n,t),u=d?gt(d.block)+"::"+d.cssProp:null;if(u!==null&&u===c)f=!0;else if(c=u,d){const l=(0,st.css)({[d.cssProp]:d.block},null,t.context?.cssPrefix);i=l?l.split(" ").filter(Boolean):null}else i=null}finally{r&&(0,M.popConfig)()}if(!(f||!t.node.classList)){if(e)for(const d of e)t.node.classList.remove(d);if(i&&i.length)for(const d of i)t.node.classList.add(d);e=i}},{depth:o.path.length,label:P(o,"cssBlock("+s+")")});o.__effects.push(a)}}const Gn=()=>!0,Kn=(t,o)=>{const s=t.charAt(0);return(s===":"||s==="@"||s==="&"||s==="[")&&o&&typeof o=="object"&&!Array.isArray(o)?!0:!!k.CSS_PROPS_REGISTRY[t]||!!(k.DEFAULT_CSS_PROPERTIES_LIST&&k.DEFAULT_CSS_PROPERTIES_LIST.has(t))||Lt(t)||t==="vars"};function Wn(t,o,s){const n={};let e=!1;for(const r in s)Object.prototype.hasOwnProperty.call(s,r)&&(r!=="data"&&r!=="aria"&&(Kn(r,s[r])||H.REGISTRY.has(r))?n[r]=!0:e=!0);if(!e)return null;const c=(0,v.extractConditionalAttrs)({[o]:s},t.tag||"div",n,Gn);let a=null;for(const r in c)/^on/i.test(r)||(a||(a={}),a[r]=c[r]);return a}function ys(t,o,s,n,e,c){const a=t.node;let r=null;const i=f=>{(r||(r=[])).push(f)};for(const f in n){const d=o.owners.get(f),u=d===s;if(!c&&d!==void 0&&!u)continue;let l;try{l=n[f](t)}catch(x){F(t.__ref,"conditional("+s+")."+f,x),u&&i(f);continue}if(typeof l=="string"&&l.includes("{{")&&(l=L.replaceLiteralsWithObjectFields.call(t,l,t.state)),u&&a.getAttribute(f)!==o.written.get(f)){i(f);continue}if(l==null||typeof l=="object"||typeof l=="function"){u&&_s(a,o,f);continue}const g=l===!1&&!(0,v.isEnumeratedTrueFalseAttr)(f)?null:String((0,v.serializeAttrValue)(f,l));i(f),!(u&&g===o.written.get(f))&&(d===void 0&&o.base.set(f,a.getAttribute(f)),Wt(a,f,g),o.owners.set(f,s),o.written.set(f,g))}e.appliedAttrs=r}function _s(t,o,s){t.getAttribute(s)===o.written.get(s)&&Wt(t,s,o.base.get(s)),o.owners.delete(s),o.base.delete(s),o.written.delete(s)}function zn(t,o,s,n){const e=n.appliedAttrs;if(n.appliedAttrs=null,!!e)for(const c of e)o.owners.get(c)===s&&_s(t.node,o,c)}function gs(t){const o=t.__ref&&t.__ref.__conditionalAttrs,s=t.node;if(!(!o||!o.owners.size||!s||!s.getAttribute))for(const n of o.owners.keys()){const e=o.written.get(n),c=s.getAttribute(n);c!==e&&(o.base.set(n,c),e==null?s.removeAttribute(n):s.setAttribute(n,e))}}function Yn(t){const o=t.__ref;o.__conditionalRunners=[];let s=null;const n=new Map;for(const e of Object.keys(t)){const c=e.charAt(0);if(c!=="."&&c!=="!")continue;const a=e.slice(1);if(!a)continue;if(/[:@\s>~+[\]]/.test(a)){if(typeof console<"u"&&console.warn){const h=a.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${e}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${c}\` is read as one prop name. Nest the selector inside instead: \`${c}${h}: { '${a.slice(h.length)}': {...} }\`.`)}continue}const r=t[e];if(!r||typeof r!="object")continue;const i=c==="!",f={lastMatch:!1,appliedKeys:null,appliedClasses:null,appliedAttrs:null},d=Wn(t,e,r);d&&!s&&(s=o.__conditionalAttrs={owners:new Map,base:new Map,written:new Map});const u=new Set;for(const h in r){if(!Object.prototype.hasOwnProperty.call(r,h))continue;const _=h.charAt(0),w=r[h];if(!((_===":"||_==="@"||_==="&"||_==="[")&&w&&typeof w=="object"&&!Array.isArray(w))){if(h==="vars"&&rt(w)){for(const y of Object.keys(w))y&&u.add(zt(y));continue}u.add(h)}}const l=()=>{let h;const _=t[a];if(_===void 0){const b=!!t.state&&a in t.state,A=t.state?t.state[a]:void 0;if(b||A!==void 0)h=A;else{const S=t.context?.cases?.[a];if(S===void 0)return;try{h=typeof S=="function"?S.call(t,t):S}catch(C){h=!1,o.__conditionalError=C,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${e}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,C?.message||C)}}}else if(typeof _=="function")try{h=_(t,t.state,t.context)}catch(b){h=!1,o.__conditionalError=b,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${e}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,b?.message||b)}else h=_;const w=i?!h:!!h;if(!t.node)return;const y=t.context?.designSystem;if(w===f.lastMatch){if(w&&d&&t.node.setAttribute){y&&(0,M.pushConfig)(y);try{ys(t,s,e,d,f,!1)}finally{y&&(0,M.popConfig)()}}return}f.lastMatch=w,y&&(0,M.pushConfig)(y);try{if(w){const b={},A={};let S=!1;for(const j in r){if(!Object.prototype.hasOwnProperty.call(r,j))continue;const O=r[j],q=j.charAt(0);if((q===":"||q==="@"||q==="&"||q==="[")&&O&&typeof O=="object"&&!Array.isArray(O)){if(ho(j,t)){const V=bt(O,t,!1,u);Object.keys(V).length&&(A[`[data-theme="${j.slice(1)}"] &`]=V,S=!0)}else{const V=yo(j,t),B=bt(O,t,!1,u);Object.keys(B).length&&(A[V]=B,S=!0)}continue}const dt=typeof O=="function"?O(t,t.state,t.context):O;if(dt!=null){if(k.CSS_PROPS_REGISTRY[j]){const V=k.CSS_PROPS_REGISTRY[j](dt,t,t.state,t.context);if(V){const B=Array.isArray(V)?V:[V];for(const G of B)G&&Object.assign(b,G)}}else if(k.DEFAULT_CSS_PROPERTIES_LIST&&k.DEFAULT_CSS_PROPERTIES_LIST.has(j))b[j]=dt;else if(Lt(j))b[j]=dt;else if(j==="vars"){const V=Yt(dt,t);V&&Object.assign(b,V)}}}const C=Object.keys(b);if(C.length){et(t.node,b);for(const j of C)n.set(j,e);f.appliedKeys=C}else f.appliedKeys=null;if(S){const j=(0,st.css)(A,null,t.context?.cssPrefix,{state:!0}),O=j?j.split(" ").filter(Boolean):[];if(O.length&&t.node.classList){for(const q of O)t.node.classList.add(q);f.appliedClasses=O}else f.appliedClasses=null}else if(f.appliedClasses){for(const j of f.appliedClasses)t.node.classList.remove(j);f.appliedClasses=null}d&&t.node.setAttribute&&ys(t,s,e,d,f,!0)}else{if(f.appliedAttrs&&zn(t,s,e,f),f.appliedKeys){for(const b of f.appliedKeys)n.get(b)===e&&(Lt(b)?t.node.style.removeProperty(b):t.node.style[b]="",n.delete(b));f.appliedKeys=null}if(f.appliedClasses){for(const b of f.appliedClasses)t.node.classList.remove(b);f.appliedClasses=null}}}finally{y&&(0,M.popConfig)()}};o.__conditionalRunners.push(l);const g=R(t,t[a+"Deps"],l),x=(0,E.createEffect)(g,{depth:o.path.length,label:P(o,"conditional("+e+")")}),p=o.__exec&&o.__exec[a]||t[a];x._sources.size===0&&typeof p=="function"&&(0,it.isLoudDevRuntime)()&&hn(p)&&console.warn(`[smbls] conditional \`${e}\` on ${t.key||"?"} subscribed to nothing \u2014 its predicate tracked no reactive read on its first run, so no state write will ever re-evaluate it (only a direct element.update() on this element re-runs it). If the predicate guards its state reads (\`in\`, short-circuits, \`?.\`), declare \`${a}Deps: [...]\` (state-key strings or \`(el, s) => \u2026\` selectors) so the subscription is armed unconditionally.`),o.__effects.push(x)}}const go=new WeakSet,bo=new WeakMap;function qn(t){const o=bo.get(t);if(o==="painted")return!1;if(o===void 0){bo.set(t,"open");const s=t.defaultView,n=()=>{bo.set(t,"painted")};s&&typeof s.requestAnimationFrame=="function"?s.requestAnimationFrame(n):setTimeout(n,0)}return!0}function Zn(t){const o=t.ownerDocument;!o||go.has(o)||qn(o)||(go.add(o),queueMicrotask(()=>{go.delete(o);const s=o.body||o.documentElement;s&&s.offsetWidth}))}const Ao=new WeakSet;let bs=!1;function As(t){return t.startsWith("[data-theme=")||t.startsWith("@media")&&t.includes("prefers-color-scheme")}function xo(t,o){const s={...t};for(const n in o){const e=o[n],c=s[n];s[n]=e&&typeof e=="object"&&c&&typeof c=="object"?xo(c,e):e}return s}function xs(t,o){const s={};for(const n in t){const e=t[n];if(e&&typeof e=="object"){const c=xs(e,o);Object.keys(c).length&&(s[n]=c)}else o.has(n)||(s[n]=e)}return s}function Qn(t,o,s){let n=1/0,e=-1/0;for(const a of o.values())a<n&&(n=a),a>e&&(e=a);if(s)for(const a of s.values())a>e&&(e=a);if(e<=n)return null;let c=null;for(const[a,r]of o){if(r===e)continue;const i=Xn(a);if(i)for(let f=0;f<i.length;f+=3){const d=i[f],u=i[f+1],l=i[f+2],g=t[u]!=null?o.get(u):void 0,x=s&&s.get(d),p=g!==void 0&&g>r&&(0,I.cssShorthandStatesLonghand)(d,t[u],l),h=!p&&x!==void 0&&x>r&&(0,I.cssShorthandStatesLonghand)(d,void 0,l);if(p||h){p&&delete t[a],c||(c=new Set),c.add(a);break}}}return c}const ws=new Map;function Xn(t){let o=ws.get(t);if(o!==void 0)return o;const s=tt(t),n=I.CSS_LONGHAND_SHORTHANDS[s];if(o=null,Array.isArray(n)){o=[];for(const e of n)o.push(e,(0,I.cssCamelName)(e),s)}return ws.set(t,o),o}function Ss(t){const{node:o}=t;if(!o)return;if(bs||(bs=!0,(0,st.css)({display:"none"})),Ao.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}Ao.add(t);const s=t.context?.designSystem;s&&(0,M.pushConfig)(s),(0,k.pushStaticCssPass)();try{const n={};let e=!1,c=[],a=null,r=null,i=null;const f=t.__ref&&t.__ref.__mergeLayer;let d,u=null,l=null;const g=(y,b)=>{if(b&&typeof b=="object"&&As(y)){r||(r={});const A=r[y];A&&(b=xo(A,b)),r[y]=b}else(b===null||typeof b!="object")&&(i||(i=new Set),i.add(y),d!==void 0&&(u||(u=new Map),u.set(y,d)));n[y]=b};if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&k.CSS_PROPS_REGISTRY.theme){const y=k.CSS_PROPS_REGISTRY.theme(t.theme,t,t.state,t.context);if(y){const b=A=>{for(const S in A){const C=A[S];C&&typeof C=="object"&&As(S)&&(a||(a={}),a[S]=C),n[S]=C}};if(Array.isArray(y))for(const A of y)A&&b(A);else b(y);e=!0}}const x=(y,b)=>{if(y==="vars"){const A=Yt(b);if(A){for(const S in A)g(S,A[S]);e=!0}return}if(k.CSS_PROPS_REGISTRY[y]){const A=k.CSS_PROPS_REGISTRY[y](b,t,t.state,t.context);if(A){if(Array.isArray(A)){for(const S of A)if(S)for(const C in S)g(C,S[C])}else for(const S in A)g(S,A[S]);e=!0}}else if(k.DEFAULT_CSS_PROPERTIES_LIST&&k.DEFAULT_CSS_PROPERTIES_LIST.has(y))b!=null&&typeof b!="object"&&(g(y,b),e=!0);else if(y.charCodeAt(0)===45)b!=null&&typeof b!="object"&&(g(y,b),e=!0);else if((y.charAt(0)==="&"||y.charAt(0)==="@"||y.charAt(0)===":"||y.charAt(0)==="[")&&b&&typeof b=="object"&&!Array.isArray(b)){if(_o(b))return;const A=hs(y,b,t);A&&(g(A.cssProp,A.block),e=!0)}};if(typeof t.class=="string"){const y=Un(t.class,t.context?.designSystem?.class);if(y)for(const b in y)x(b,y[b])}const p=i?new Set(i):null,h=t.tag||"div";for(const y of Object.keys(t)){if(typeof t[y]=="function"){const A=f&&f.get(y);A!==void 0&&(0,Q.isCssProp)(h,y)&&(l||(l=new Map),l.set(tt(y),A));continue}if(d=f?f.get(y):void 0,y==="vars"){x(y,t[y]);continue}if(H.REGISTRY.has(y)||y==="theme")continue;const b=y.charCodeAt(0);b>=65&&b<=90||m(y)||(0,Q.isAttributeFirst)(h,y)||x(y,t[y])}d=void 0;const _=u?Qn(n,u,l):null;if(a)for(const y in a){let b=i?xs(a[y],i):a[y];r&&r[y]&&(b=xo(b,r[y])),Object.keys(b).length?n[y]=b:delete n[y]}if(Mn(t,n,i,_?new Set([...p||[],..._]):p),e){n.display&&String(n.display).includes("!important")&&(o.style.setProperty("display",String(n.display).replace(/\s*!important\s*$/,""),"important"),delete n.display);const y=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;typeof y=="string"&&y!==""&&n.display&&n.display!==y&&(n.display=y);const b=(0,st.css)(n,null,t.context?.cssPrefix);if(c=b?b.split(" ").filter(Boolean):[],b&&o.classList){const A=c;let S=!1;for(const C of A)o.classList.add(C),S||(C.charCodeAt(0)===95&&C.charCodeAt(1)===99||C.charCodeAt(0)===95&&C.indexOf("_c",1)!==-1)&&(S=!0);S&&Zn(o)}}const w=t.__ref;if(w){const y=w.__staticCssClasses;if(y&&o.classList){const b=new Set(c);for(const A of y)b.has(A)||o.classList.remove(A)}w.__staticCssClasses=c}Nn(t)}finally{(0,k.popStaticCssPass)(),s&&(0,M.popConfig)(),Ao.delete(t)}}const Jn=t=>!!k.CSS_PROPS_REGISTRY[t]||!!(k.DEFAULT_CSS_PROPERTIES_LIST&&k.DEFAULT_CSS_PROPERTIES_LIST.has(t))||typeof t=="string"&&t.charCodeAt(0)===45;function mn(t){t&&t.node&&Ss(t)}function te(t){const{node:o}=t;if(!o||!o.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(const e in t.aria){const c=t.aria[e];if(typeof c=="function"||typeof c=="object"||c==null||typeof c=="string"&&c.includes("{{"))continue;const a="aria-"+e.replace(/[A-Z]/g,r=>"-"+r.toLowerCase());o.setAttribute(a,(0,v.serializeAttrValue)(a,c))}const s=(0,v.applyAttrTransforms)(t);for(const e in s){const c=s[e];c!=null&&c!==!1&&typeof c!="function"&&typeof c!="object"&&o.setAttribute(e,c===!0?"":c)}const n=t.tag||"div";for(const e of Object.keys(t)){if(typeof t[e]=="function"||H.REGISTRY.has(e)||e==="on"||s[e]!==void 0)continue;const c=e.charCodeAt(0);if(!(c>=65&&c<=90)&&!m(e)&&!(0,Q.isCssProp)(n,e)&&(0,v.checkAttributeByTagName)(n,e)){let a=t[e];if(a==null)continue;if(typeof a=="string"&&a.includes("{{")){if(!v.ATTR_TRANSFORMS[e])continue;a=L.replaceLiteralsWithObjectFields.call(t,a,t.state)}if(a==null||typeof a=="function"||typeof a=="object"||a===!1&&!(0,v.isEnumeratedTrueFalseAttr)((0,v.camelToAttr)(e)||e))continue;const r=(0,v.camelToAttr)(e)||e;o.setAttribute(r,(0,v.serializeAttrValue)(r,a))}}}function oe(t,o){const{node:s}=t;if(!s||!s.setAttribute)return;const n=o.charCodeAt(0);if(n>=65&&n<=90||m(o))return;const e=t.tag||"div";if((0,Q.isCssProp)(e,o)||!(0,v.checkAttributeByTagName)(e,o))return;const c=(0,v.camelToAttr)(o)||o,a=c.toLowerCase(),r=t.__ref&&t.__ref.__effects;let i=!1;if(r)for(let u=0;u<r.length;u++){const l=r[u];l&&l._attrName===a&&!l._disposed&&typeof l._execute=="function"&&(i=!0,l._execute())}if(i)return;let f=t[o];const d=v.ATTR_TRANSFORMS[o];if(d&&f!=null){const u=d(t);u!==void 0&&(f=u)}typeof f=="string"&&f.includes("{{")&&(f=L.replaceLiteralsWithObjectFields.call(t,f,t.state)),Ft(s,c,f)}function se(t,o){const s=t.node,n=t.__ref;let e=n.__autoGrow;if(!o){if(e&&e.active){try{s.removeEventListener("input",e.resize)}catch{}ks(e),ct.delete(t),s.style.height="",e.appliedMax!=null&&s.style.maxHeight===e.appliedMax&&(s.style.maxHeight=""),Es(s,e,!1),e.active=!1,e.appliedMax=null,e.lastMeasure=0}return}e||(e=n.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,lastWidth:null,watch:null,awaitingLayout:!1,appliedScroll:!1,fontsHooked:!1,attachAttempts:0,firstAttemptAt:null,resize:()=>{if(!s.isConnected){Rt(t,!0);return}if(!(s.scrollHeight>0)){e.awaitingLayout=!0,Cs(t,e);return}e.awaitingLayout=!1;const a=re(s),r=ie(a),i=s.style.height;s.style.height="0px",r&&So(s);const f=s.scrollHeight;if(!(f>0)){s.style.height=i,r&&So(s);return}const d=ce(s,a),u=d!=null&&f<d?d:f,l=ue(a),g=l!=null&&u>l;s.style.height=ae(g?l:u,a)+"px",r&&So(s),Es(s,e,g),e.lastMeasure=f,e.lastWidth=s.clientWidth,Cs(t,e)}},n.__eventCleanup||(n.__eventCleanup=[]),n.__eventCleanup.push(()=>{try{s.removeEventListener("input",e.resize)}catch{}ks(e),ct.delete(t)})),e.active||(s.addEventListener("input",e.resize),e.active=!0,ee(t,e));const c=typeof o=="object"&&o.max!=null?String(o.max):null;c!==e.appliedMax&&(c==null?e.appliedMax!=null&&s.style.maxHeight===e.appliedMax&&(s.style.maxHeight=""):s.style.maxHeight=c,e.appliedMax=c),e.resize()}function Rt(t,o){const s=t.__ref?.__autoGrow;s&&(o&&(s.attachAttempts=0,s.firstAttemptAt=null),ct.add(t),Vt())}function ne(){const t=Array.from(ct);ct.clear();for(let o=0;o<t.length;o++){const s=t[o],n=s.node,e=s.__ref?.__autoGrow;if(!(!n||!e||!e.active)){if(!n.isConnected){e.firstAttemptAt==null&&(e.firstAttemptAt=ht()),e.attachAttempts+=1,e.attachAttempts<=To&&ht()-e.firstAttemptAt<Do&&(ct.add(s),Vt());continue}e.attachAttempts=0,e.firstAttemptAt=null,e.resize()}}}function Cs(t,o){if(o.watch)return;const s=t.node;if(!s)return;const n=s.ownerDocument&&s.ownerDocument.defaultView,e=n&&n.ResizeObserver||(typeof ResizeObserver=="function"?ResizeObserver:null);if(typeof e!="function")return;const c=()=>{if(!o.active||!s.isConnected||!(s.scrollHeight>0))return;if(o.awaitingLayout){o.awaitingLayout=!1,Rt(t,!0);return}const r=s.clientWidth;o.lastWidth!=null&&Math.abs(r-o.lastWidth)<.5||(o.lastWidth=r,Rt(t,!0))};let a;try{a=new e(c),a.observe(s)}catch{return}o.watch=a}function ks(t){const o=t.watch;if(o){t.watch=null;try{o.disconnect()}catch{}}}function ee(t,o){if(o.fontsHooked)return;o.fontsHooked=!0;const s=t.node&&t.node.ownerDocument,n=s&&s.fonts&&s.fonts.ready;!n||typeof n.then!="function"||n.then(()=>{o.active&&t.node&&Rt(t,!0)},()=>{})}function re(t){const o=t.ownerDocument&&t.ownerDocument.defaultView;try{return o&&o.getComputedStyle?o.getComputedStyle(t):null}catch{return null}}const ft=t=>typeof t=="string"&&/^\s*-?\d*\.?\d+px\s*$/.test(t)?parseFloat(t):null,wo=t=>(ft(t.paddingTop)||0)+(ft(t.paddingBottom)||0),vs=t=>(ft(t.borderTopWidth)||0)+(ft(t.borderBottomWidth)||0);function ie(t){if(!t)return!1;const o=String(t.transitionProperty||"").split(","),s=String(t.transitionDuration||"0s").split(",");for(let n=0;n<o.length;n++){const e=o[n].trim();if(!(e!=="all"&&e!=="height")&&parseFloat(s[n%s.length])>0)return!0}return!1}function So(t){if(typeof t.getAnimations!="function")return;let o;try{o=t.getAnimations()}catch{return}for(let s=0;s<o.length;s++){const n=o[s];if(n&&n.transitionProperty==="height")try{n.cancel()}catch{}}}function ce(t,o){if(!o||!t.hasAttribute||!t.hasAttribute("rows"))return null;const s=parseInt(t.getAttribute("rows"),10);if(!(s>0))return null;const n=ft(o.lineHeight)||fe(t,o);return n>0?s*n+wo(o):null}const Mt=["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontFamily","lineHeight","letterSpacing"],js=new WeakMap;function fe(t,o){const s=t.ownerDocument,n=s&&(s.body||s.documentElement);if(!n||!s.createElement)return null;let e=js.get(s);e||(e=new Map,js.set(s,e));const c=Mt.map(f=>o[f]||"").join("|");if(e.has(c))return e.get(c);const a=s.createElement("textarea");a.rows=1,a.setAttribute("aria-hidden","true"),a.tabIndex=-1;const r=a.style;r.position="absolute",r.visibility="hidden",r.top="0",r.left="-9999px",r.height="auto",r.minHeight="0",r.maxHeight="none",r.padding="0",r.border="0",r.boxSizing="content-box",r.overflow="hidden";for(let f=0;f<Mt.length;f++)o[Mt[f]]&&(r[Mt[f]]=o[Mt[f]]);let i=0;try{n.appendChild(a),i=a.clientHeight}catch{i=0}finally{a.parentNode&&a.parentNode.removeChild(a)}return i>0?(e.set(c,i),i):null}function ae(t,o){return o?o.boxSizing==="border-box"?t+vs(o):o.boxSizing==="content-box"?Math.max(0,t-wo(o)):t:t}function ue(t){if(!t)return null;const o=ft(t.maxHeight);if(o==null||!(o>0))return null;const s=wo(t),n=vs(t),e=t.boxSizing==="border-box"?o-n:o+s,c=ft(t.lineHeight);if(!(c>0))return e;const a=Math.floor((e-s)/c+1e-6);return a>=1?a*c+s:e}function Es(t,o,s){s?o.appliedScroll||(t.style.overflowY="auto",o.appliedScroll=!0):o.appliedScroll&&(t.style.overflowY==="auto"&&(t.style.overflowY=""),o.appliedScroll=!1)}const Ps=["srcObject","muted"],de=(t,o)=>t==="muted"?o===!0||o===""||o==="true"||o==="muted":o??null;function le(t){const o=t.node,s=t.__ref;if(!(!o||!s))for(let n=0;n<Ps.length;n++){const e=Ps[n],c=t[e];if(c===void 0||!(e in o))continue;const a=r=>{const i=de(e,r);if(o[e]!==i)try{o[e]=i}catch(f){F(s,e,f)}};if(typeof c=="function"){const r=R(t,t[e+"Deps"],c),i=(0,E.createEffect)(()=>{try{a(r(t,t.state,t.context))}catch(f){F(s,e,f)}},{depth:s.path.length,label:P(s,e)});s.__effects.push(i),s.__exec[e]=c}else a(c);e==="srcObject"&&(s.__releaseMedia=()=>{try{o.srcObject!=null&&(o.srcObject=null)}catch{}})}}function pe(t){if(!t.autoGrow)return;const o=t.node;if(!o||o.tagName!=="TEXTAREA")return;const s=t.__ref,n=t.autoGrow,e=typeof n=="function"?R(t,t.autoGrowDeps,n):null,c=(0,E.createEffect)(()=>{const a=t.autoGrow;let r=a;if(typeof a=="function")try{r=(a===n&&e?e:a)(t,t.state,t.context)}catch{r=null}se(t,r)},{depth:s.path.length,label:P(s,"autoGrow")});s.__effects||(s.__effects=[]),s.__effects.push(c),e&&(s.__exec.autoGrow=n)}const Os=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Ts(t,o){for(const s of Object.keys(t)){if(!m(s)||Os.has(s))continue;const n=(0,At.globalEventKeyInfo)(s);if(n){(0,At.registerGlobalEvent)(n,t,t[s]);continue}let e=t[s],c=null;if(e&&typeof e=="object"&&!Array.isArray(e)&&(c=e,e=c.handler),typeof e=="string"&&/^[A-Za-z_$][\w$]*$/.test(e)){const r=e;e=function(f){return t.call(r,f)}}if(typeof e!="function")continue;const a=on(s);H.LIFECYCLE_EVENTS.has(a)||(0,At.registerEvent)(sn(a),t,e,c)}he(t)}function he(t){const o=t.node;if(!o||!o.addEventListener)return;const s={};let n=!1;for(const l of Os){const g=t[l];typeof g=="function"&&(s[l]=g,n=!0)}if(!n)return;const e=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,c=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600;let a=0,r=0,i=0,f=!1;const d=l=>{const g=l.touches&&l.touches[0]||l.changedTouches&&l.changedTouches[0];g&&(a=g.clientX,r=g.clientY,i=Date.now(),f=!0)},u=l=>{if(!f)return;f=!1;const g=l.changedTouches&&l.changedTouches[0]||l.touches&&l.touches[0];if(!g)return;const x=g.clientX-a,p=g.clientY-r,h=Date.now()-i;if(h>c)return;const _=Math.abs(x),w=Math.abs(p);if(Math.max(_,w)<e)return;let y;if(_>w*1.2)y=x<0?"left":"right";else if(w>_*1.2)y=p<0?"up":"down";else return;const b="onSwipe"+y.charAt(0).toUpperCase()+y.slice(1),A=s[b],S=s.onSwipe;A&&A.call(t,l,t,t.state,t.context),S&&S.call(t,{direction:y,dx:x,dy:p,dt:h,event:l},t,t.state,t.context)};o.addEventListener("touchstart",d,{passive:!0}),o.addEventListener("touchend",u,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{o.removeEventListener("touchstart",d)}catch{}try{o.removeEventListener("touchend",u)}catch{}})}function at(t,o){const s={...t};for(const n in o){const e=s[n],c=o[n];e&&c&&typeof e=="object"&&typeof c=="object"&&!Array.isArray(e)&&!Array.isArray(c)&&typeof e!="function"&&typeof c!="function"?s[n]=at(e,c):s[n]=c}return s}function Co(t,o,s,n,e){if(!o||!t.node)return;const c=t.childExtends,a=_t(t,"childProps");if(Array.isArray(o)){const r=t.tag==="fragment",i=t.context?.document||globalThis.document,f=r?null:i?.createDocumentFragment();if(!r&&!f)return;const d=t.childProps,u=t.childrenAs,l=y=>{let b=o[y];const A=b;(typeof b=="string"||typeof b=="number")&&(b={text:b});let S=d;if(typeof d=="function")try{S=d(t,b)}catch{S=null}let C=typeof d=="function"?Et(S):a;if(e&&u!=="state"&&(C=Pt(C,Et(A))),u==="state"){let O=A;(typeof A=="string"||typeof A=="number")&&(O={value:A,text:A}),b=S?{...S,state:O}:{state:O}}else S&&(b=at(S,b));if(c&&!b.ignoreChildExtends)if(b.extends){const O=Array.isArray(b.extends)?b.extends:[b.extends],q=Array.isArray(c)?c:[c];b={...b,extends:[...q,...O]}}else b={...b,extends:c};const j=Ro(b?.key,A,y,t);try{return ot(Ot(b,C),t,j,s)}catch(O){if(typeof console<"u"&&console.error){const q=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${j}" failed to construct at ${q} (initial render, skipping this row):`,O?.message||O)}return null}},g=t.__ref;if(!(n===!0&&!r&&!!g&&(s?.mountYield===!0||t.yieldChildren===!0))){for(let y=0;y<o.length;y++){const b=l(y);!r&&b?.node&&f.appendChild(b.node)}return r||t.node.appendChild(f),!0}const p=g.__childrenChunkGen=(g.__childrenChunkGen||0)+1;(0,U.openMountBudget)();const h=(0,U.childCostMeter)();let _=null;const w=y=>{if(g.__disposed||g.__childrenChunkGen!==p){_&&_.parentNode&&_.remove();return}for(let b=y;b<o.length;b++){h.begin();const A=l(b);A?.node&&(_?t.node.insertBefore(A.node,_):f.appendChild(A.node));const S=h.end();if(b+1<o.length&&(0,U.mountBudgetExhausted)(S)){_||(_=i.createComment("smbls-mount"),f.appendChild(_),t.node.appendChild(f));const C=b+1;(0,U.enqueueMountWork)(()=>w(C));return}}_?(_.remove(),t.node.tagName==="SELECT"&&qt(t,!0)):t.node.appendChild(f)};return w(0),(0,U.closeMountBudget)(),!0}if(typeof o=="string"){const r=Bo(o,t);if(Array.isArray(r))return Co(t,r,s,n,!0)}if(typeof o=="object")for(const r in o){if(H.REGISTRY.has(r))continue;let i=o[r];if(i==null||i===!1)continue;const f=e?Pt(a,Et(i)):a;if((typeof i=="string"||typeof i=="number")&&(i={text:i}),t.childProps&&(i=at(t.childProps,i)),c&&!i.ignoreChildExtends)if(i.extends){const d=Array.isArray(i.extends)?i.extends:[i.extends],u=Array.isArray(c)?c:[c];i={...i,extends:[...u,...d]}}else i={...i,extends:c};ot(Ot(i,f),t,Kt(t,r),s)}}function qt(t,o){const s=t.node;if(!s||s.tagName!=="SELECT")return;const n=s.options;if(!n||!n.length)return;const e=t.__ref,c=e&&e.__exec&&e.__exec.value,a=typeof c=="function",r=t.value!=null&&typeof t.value!="function";if(a||r){let d;if(a)try{d=c(t,t.state,t.context)}catch{return}else d=t.value,typeof d=="string"&&d.includes("{{")&&(d=L.replaceLiteralsWithObjectFields.call(t,d,t.state));const u=d==null?"":String(d);s.value!==u&&(s.value=u);return}const i=o||!(e&&e.__selectSynced);if(e&&(e.__selectSynced=!0),!i)return;let f=-1;for(let d=0;d<n.length;d++)n[d].defaultSelected&&(f=d);f>=0&&s.selectedIndex!==f&&(s.selectedIndex=f)}function Ds(t,o){let{children:s,content:n}=t;const e=t.childExtends,c=typeof s=="function"||Yo(t,"children");if(typeof s=="function"){const p=s;try{s=p(t,t.state,t.context)}catch(b){if(s=void 0,typeof console<"u"&&console.error){const A=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${A} (initial run, treating as empty):`,b?.message||b)}}qo(t,s),t.children=s;const h=t.__ref;let _=!1;const w=R(t,t.childrenDeps,p),y=(0,E.createEffect)(()=>{const b=_;_=!0;let A;try{A=w(t,t.state,t.context)}catch(B){if(typeof console<"u"&&console.error){const G=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${G}${b?"":" (initial tracking run)"}:`,B?.message||B)}return}if(!b||A===t.children)return;qo(t,A),t.children=A,h.__childrenChunkGen!=null&&h.__childrenChunkGen++;const S=typeof t.onContentUpdate=="function",C=S?[]:null,j=S?[]:null,O=S?[]:null;if(Array.isArray(A)&&t.childrenAs==="state"){const B=t.childProps,G=[],ko=new Map;for(let T=0;T<A.length;T++){const Z=A[T];let D=B;if(typeof B=="function")try{D=B(t,Z)}catch{D=null}const J=Ro(D&&D.key,Z,T,t);G.push(J),ko.set(J,{rawChild:Z,childProps:D})}const Is=new Set(G),Bs=h.__children.slice();for(const T of Bs)if(!Is.has(T)){const Z=t[T];Z?.remove&&Z.remove(),delete t[T],j&&j.push(T)}const wt=t.childExtends,Bt=t.tag==="fragment",Hs=t.context?.document||globalThis.document,St=Bt?null:Hs?.createDocumentFragment(),Xt=new Set;for(const T of G){const Z=ko.get(T),D=Z.rawChild,J=t[T];if(J&&J.state){if(D&&typeof D=="object"){const K=J.state,lt=K.$replace||K.replace,vo=K.$update||K.update;try{if(typeof lt=="function")lt.call(K,D);else if(typeof vo=="function"){for(const Y in K)if(!(Y==="__element"||Y==="root"||Y==="parent"||Y==="update")&&!Object.prototype.hasOwnProperty.call(D,Y))try{K[Y]=void 0}catch{}vo.call(K,D)}else for(const Y in D)K[Y]=D[Y]}catch(Y){if(typeof console<"u"&&console.error){const Vs=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${T}" failed to patch at ${Vs} (reconcile, keeping its previous data for this pass):`,Y?.message||Y)}}}O&&O.push(T);continue}let Jt=D;(typeof D=="string"||typeof D=="number")&&(Jt={value:D,text:D});const mt=Z.childProps;let X=mt?{...mt,state:Jt}:{state:Jt};const Us=typeof B=="function"?Et(mt):_t(t,"childProps");if(wt&&!X.ignoreChildExtends)if(X.extends){const K=Array.isArray(X.extends)?X.extends:[X.extends],lt=Array.isArray(wt)?wt:[wt];X={...X,extends:[...lt,...K]}}else X={...X,extends:wt};let to;try{to=ot(Ot(X,Us),t,T,o)}catch(K){if(typeof console<"u"&&console.error){const lt=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${T}" failed to construct at ${lt} (reconcile, skipping this row):`,K?.message||K)}Xt.add(T);continue}!Bt&&to?.node&&St&&St.appendChild(to.node),C&&C.push(T)}if(!Bt&&St&&St.childNodes.length&&t.node&&t.node.appendChild(St),!Bt&&t.node){let T=null;for(const Z of G){const D=t[Z]?.node;if(!D)continue;const J=T?T.nextSibling:t.node.firstChild;D!==J&&t.node.insertBefore(D,J),T=D}}h.__children=Xt.size?G.filter(T=>!Xt.has(T)):G,S&&(C.length||j.length)&&Lo(t,{added:C,removed:j,kept:O}),qt(t,!1);return}const V=S?[...h.__children]:null;for(const B of[...h.__children]){const G=t[B];G?.remove&&G.remove(),delete t[B]}h.__children=[],Co(t,A,o,!1,!0),qt(t,!1),S&&Lo(t,{added:[...h.__children],removed:V,kept:[]})},{depth:h.path.length,label:P(h,"children")});h.__effects.push(y)}const a=Co(t,s,o,!0,c);if(n!=null&&!(n&&n.__ref)){let p=n;if(typeof p=="string"||typeof p=="number"?p={text:p}:typeof p!="object"&&(p={}),t.childProps&&(p=at(t.childProps,p)),e&&!p.ignoreChildExtends)if(p.extends){const _=Array.isArray(p.extends)?p.extends:[p.extends],w=Array.isArray(e)?e:[e];p={...p,extends:[...w,..._]}}else p={...p,extends:e};const h=Pt(_t(t,"childProps"),_t(t,"content"));ot(Ot(p,h),t,"content",o)}if(s&&!a)return;const r=t.context?.components||{},i=t.__ref&&t.__ref.__runtimeSource,f=i?{}:null;{const p=Object.keys(t);for(let h=0;h<p.length;h++){const _=p[h];if(!_.endsWith("Extends")||typeof t[_]!="string")continue;const w=_.slice(0,-7);if(!w||w.charCodeAt(0)<65||w.charCodeAt(0)>90)continue;const y={extends:t[_]};delete t[_];for(let b=h+1;b<p.length;b++){const A=p[b],S=A.charCodeAt(0);if(S>=65&&S<=90||H.REGISTRY.has(A)||typeof t[A]=="function"&&(A.startsWith("on")||A.startsWith(".")))break;const C=t[A];C!==void 0&&(y[A]=C,delete t[A],f&&jt(i,A)&&(f[w]||(f[w]={}),f[w][A]=i[A]))}t[w]&&typeof t[w]=="object"?t[w]={...y,...t[w]}:t[w]=y}}const d=o?.mountYield===!0||t.yieldChildren===!0,u=Object.keys(t),l=p=>{if(H.REGISTRY.has(p)||typeof t[p]!="object"||t[p]===null)return;const h=p.charCodeAt(0);if(h<65||h>90)return;let _=t[p];if(_.__ref)return;if(!_.extends&&!_.extend){const y=r[p]||r[`smbls.${p}`];y&&(_={..._,extends:y})}if(t.childProps&&(_=at(t.childProps,_)),e&&!_.ignoreChildExtends)if(_.extends){const y=Array.isArray(_.extends)?_.extends:[_.extends],b=Array.isArray(e)?e:[e];_={..._,extends:[...b,...y]}}else _={..._,extends:e};const w=i?Pt(_t(t,"childProps"),Pt(f[p]||null,_t(t,p))):null;ot(Ot(_,w),t,p,o)};if(!d){for(const p of u)l(p);return}(0,U.openMountBudget)();const g=(0,U.childCostMeter)(),x=p=>{for(let h=p;h<u.length;h++){g.begin(),l(u[h]);const _=g.end();if(h+1<u.length&&(0,U.mountBudgetExhausted)(_)){const w=h+1;(0,U.enqueueMountWork)(()=>x(w));return}}};x(0),(0,U.closeMountBudget)()}function Ls(t,o,s){const{node:n}=t;if(!n)return;n.ref=t;const e=o?.tag==="fragment"?o.__ref?.__fragmentAnchor:null;if(e){const a=e.parentNode;if(a){if(s?.position==="before"&&s.node)a.insertBefore(n,s.node);else if(s?.position==="after"&&s.node){const r=s.node.nextSibling;a.insertBefore(n,r||e)}else a.insertBefore(n,e);return}}const c=o?.node||(o?.nodeType?o:null);if(c)if(s?.position==="before"&&s.node)c.insertBefore(n,s.node);else if(s?.position==="after"&&s.node){const a=s.node.nextSibling;a?c.insertBefore(n,a):c.appendChild(n)}else c.appendChild(n)}const Qt=3;function $s(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=Qt?!1:(t.__inBeforeUpdate=!0,!0)}function It(t,o){t&&(t.__inBeforeUpdate=!1,o?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===Qt&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${Qt}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function N(t,o,s){const n=t.charAt(0).toLowerCase()+t.slice(1);(0,z.dispatchPluginHook)(n,o,s);const e="on"+t,c=o[e];if(typeof c=="function"){const i=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(i){if(o.__ref[i])return!0;o.__ref[i]=!0}const f=o.context?.designSystem;f&&(0,M.pushConfig)(f);let d=!!i;try{const u=c(o,o.state,o.context,s);if(u&&typeof u.then=="function"){const l=o.__ref;return u.catch(g=>{(0,z.reportLifecycleError)(o,e,g)}).finally(()=>{i&&l&&(l[i]=!1)}),d=!1,!0}if(u===!1)return!1}catch(u){if((0,z.reportLifecycleError)(o,e,u),o.context?.strictMode)throw u}finally{f&&(0,M.popConfig)(),d&&o.__ref&&(o.__ref[i]=!1)}}return!0}var ye=ot;
@@ -1 +1 @@
1
- "use strict";var a=Object.create;var N=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty;var O=(s,S)=>{for(var e in S)N(s,e,{get:S[e],enumerable:!0})},n=(s,S,e,o)=>{if(S&&typeof S=="object"||typeof S=="function")for(let t of r(S))!D.call(s,t)&&t!==e&&N(s,t,{get:()=>S[t],enumerable:!(o=h(S,t))||o.enumerable});return s};var _=(s,S,e)=>(e=s!=null?a(A(s)):{},n(S||!s||!s.__esModule?N(e,"default",{value:s,enumerable:!0}):e,s)),c=s=>n(N({},"__esModule",{value:!0}),s);var m={};O(m,{CSS_LONGHAND_SHORTHANDS:()=>d,CSS_SHORTHAND_LONGHANDS:()=>l,cssShorthandStatesLonghand:()=>L});module.exports=c(m);var H=_(require("@symbo.ls/css"),1);if(!H.CSS_SHORTHAND_LONGHANDS||!H.CSS_LONGHAND_SHORTHANDS)throw new Error("@symbo.ls/element: the installed @symbo.ls/css does not export CSS_SHORTHAND_LONGHANDS / CSS_LONGHAND_SHORTHANDS (the CSS shorthand family table, packages/css/src/cssLonghands.js). This element needs the @symbo.ls/css published in the same release \u2014 update @symbo.ls/css.");const l=H.CSS_SHORTHAND_LONGHANDS,d=H.CSS_LONGHAND_SHORTHANDS,L=H.cssShorthandStatesLonghand||(()=>!1);
1
+ "use strict";var H=Object.create;var a=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var l=(s,e)=>{for(var t in e)a(s,t,{get:e[t],enumerable:!0})},r=(s,e,t,N)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of A(e))!m.call(s,o)&&o!==t&&a(s,o,{get:()=>e[o],enumerable:!(N=n(e,o))||N.enumerable});return s};var _=(s,e,t)=>(t=s!=null?H(h(s)):{},r(e||!s||!s.__esModule?a(t,"default",{value:s,enumerable:!0}):t,s)),C=s=>r(a({},"__esModule",{value:!0}),s);var i={};l(i,{CSS_LONGHAND_SHORTHANDS:()=>O,CSS_SHORTHAND_LONGHANDS:()=>D,cssCamelName:()=>L,cssPropName:()=>d,cssShorthandStatesLonghand:()=>p});module.exports=C(i);var S=_(require("@symbo.ls/css"),1);if(!S.CSS_SHORTHAND_LONGHANDS||!S.CSS_LONGHAND_SHORTHANDS)throw new Error("@symbo.ls/element: the installed @symbo.ls/css does not export CSS_SHORTHAND_LONGHANDS / CSS_LONGHAND_SHORTHANDS (the CSS shorthand family table, packages/css/src/cssLonghands.js). This element needs the @symbo.ls/css published in the same release \u2014 update @symbo.ls/css.");const D=S.CSS_SHORTHAND_LONGHANDS,O=S.CSS_LONGHAND_SHORTHANDS,p=S.cssShorthandStatesLonghand||(()=>!1),c=s=>s.charCodeAt(0)===45&&s.charCodeAt(1)===45,d=S.cssPropName||(s=>c(s)?s:s.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())),L=S.cssCamelName||(s=>c(s)?s:s.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()));
@@ -1 +1 @@
1
- "use strict";var c=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var u=(r,o)=>{for(var _ in o)c(r,_,{get:o[_],enumerable:!0})},h=(r,o,_,f)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of p(o))!l.call(r,e)&&e!==_&&c(r,e,{get:()=>o[e],enumerable:!(f=d(o,e))||f.enumerable});return r};var v=r=>h(c({},"__esModule",{value:!0}),r);var g={};u(g,{dispose:()=>i,remove:()=>y});module.exports=v(g);var t=require("@symbo.ls/signal"),a=require("./bridge.js");function i(r){if(!r)return;const o=r.__ref;if(!o)return;const _=(0,t.getObserver)();if(_){(0,t.setObserver)(null);try{return i(r)}finally{(0,t.setObserver)(_)}}o.__disposed=!0;try{typeof r.onBeforeRemove=="function"&&r.onBeforeRemove(r,r.state,r.context)}catch(e){console.error("[smbls] onBeforeRemove error:",e)}if(o.__bridge&&(0,a.destroyBridge)(r),o.__effects){for(let e=0;e<o.__effects.length;e++)o.__effects[e].dispose();o.__effects.length=0}if(typeof o.__releaseMedia=="function"&&(o.__releaseMedia(),o.__releaseMedia=null),o.__eventCleanup){for(let e=0;e<o.__eventCleanup.length;e++)o.__eventCleanup[e]();o.__eventCleanup.length=0}if(o.__children){const e=o.__children.slice();o.__children.length=0;for(let n=0;n<e.length;n++){const s=r[e[n]];s&&s.__ref&&i(s)}}r.node?.parentNode?r.node.remove():r.tag==="fragment"&&o.__fragmentAnchor?.parentNode&&o.__fragmentAnchor.remove();const f=r.state?.$destroy||r.state?.destroy;if(typeof f=="function"&&r.state.__element===r&&f.call(r.state),r.parent?.__ref?.__children){const e=r.parent.__ref.__children.indexOf(r.key);e!==-1&&r.parent.__ref.__children.splice(e,1),delete r.parent[r.key]}try{typeof r.onRemove=="function"&&r.onRemove(r)}catch(e){console.error("[smbls] onRemove error:",e)}r.node=null,r.parent=null,r.__ref=null}function y(){i(this)}
1
+ "use strict";var n=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var h=(r,o)=>{for(var f in o)n(r,f,{get:o[f],enumerable:!0})},l=(r,o,f,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let _ of p(o))!u.call(r,_)&&_!==f&&n(r,_,{get:()=>o[_],enumerable:!(e=d(o,_))||e.enumerable});return r};var v=r=>l(n({},"__esModule",{value:!0}),r);var y={};h(y,{dispose:()=>t,remove:()=>g});module.exports=v(y);var s=require("@symbo.ls/signal"),c=require("./runContext.js"),a=require("./bridge.js");function t(r){if(!r)return;const o=r.__ref;if(!o)return;if((0,s.getObserver)())return(0,c.untrack)(()=>t(r));o.__disposed=!0;try{typeof r.onBeforeRemove=="function"&&r.onBeforeRemove(r,r.state,r.context)}catch(e){console.error("[smbls] onBeforeRemove error:",e)}if(o.__bridge&&(0,a.destroyBridge)(r),o.__effects){for(let e=0;e<o.__effects.length;e++)o.__effects[e].dispose();o.__effects.length=0}if(typeof o.__releaseMedia=="function"&&(o.__releaseMedia(),o.__releaseMedia=null),o.__eventCleanup){for(let e=0;e<o.__eventCleanup.length;e++)o.__eventCleanup[e]();o.__eventCleanup.length=0}if(o.__children){const e=o.__children.slice();o.__children.length=0;for(let _=0;_<e.length;_++){const i=r[e[_]];i&&i.__ref&&t(i)}}r.node?.parentNode?r.node.remove():r.tag==="fragment"&&o.__fragmentAnchor?.parentNode&&o.__fragmentAnchor.remove();const f=r.state?.$destroy||r.state?.destroy;if(typeof f=="function"&&r.state.__element===r&&f.call(r.state),r.parent?.__ref?.__children){const e=r.parent.__ref.__children.indexOf(r.key);e!==-1&&r.parent.__ref.__children.splice(e,1),delete r.parent[r.key]}try{typeof r.onRemove=="function"&&r.onRemove(r)}catch(e){console.error("[smbls] onRemove error:",e)}r.node=null,r.parent=null,r.__ref=null}function g(){t(this)}
@@ -1 +1 @@
1
- "use strict";var u=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var b=(t,r)=>{for(var e in r)u(t,e,{get:r[e],enumerable:!0})},j=(t,r,e,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of g(r))!d.call(t,n)&&n!==e&&u(t,n,{get:()=>r[n],enumerable:!(s=h(r,n))||s.enumerable});return t};var k=t=>j(u({},"__esModule",{value:!0}),t);var w={};b(w,{applyExtends:()=>_,openMergeLayer:()=>A});module.exports=k(w);const L=new WeakMap;function y(t){const r=[];return t.extends&&(Array.isArray(t.extends)?r.push(...t.extends):r.push(t.extends)),t.extend&&(Array.isArray(t.extend)?r.push(...t.extend):r.push(t.extend)),r}function _(t,r,e){const s=y(r);if(!s.length)return;const f=(t.context||e?.context||{}).components||{};for(let o=0;o<s.length;o++){const c=p(s[o],f);c&&c!==r&&x(t,c,e,new Set([r]))}}function p(t,r){if(typeof t=="string"){if(t.includes(">")){const e=t.split(">").map(n=>n.trim());let s=r[e[0]]||r[`smbls.${e[0]}`];for(let n=1;n<e.length&&s;n++)s=s[e[n]];return s||null}return r[t]||r[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function x(t,r,e,s=new Set){if(s.has(r))return;s.add(r);const n=y(r);if(n.length){const c=(t.context||e?.context||{}).components||{};for(let a=0;a<n.length;a++){const l=p(n[a],c);l&&x(t,l,e,s)}}const f=A(t);for(const o in r){if(o==="extends"||o==="extend")continue;const c=r[o];f&&f.set(o,f.rank),t[o]===void 0?c&&typeof c=="object"&&!Array.isArray(c)&&typeof c!="function"?t[o]={...c}:t[o]=c:typeof t[o]=="object"&&typeof c=="object"&&!Array.isArray(t[o])&&!Array.isArray(c)&&t[o]!==null&&c!==null?t[o]=i(t[o],c):t[o]=c}}function A(t){const r=t&&t.__ref;if(!r)return null;let e=r.__mergeLayer;return e||(e=r.__mergeLayer=new Map),e.rank=(e.rank||0)+1,e}function i(t,r){const e={...t};for(const s in r){const n=e[s],f=r[s];n&&f&&typeof n=="object"&&typeof f=="object"&&!Array.isArray(n)&&!Array.isArray(f)&&typeof n!="function"&&typeof f!="function"?e[s]=i(n,f):e[s]=f}return e}
1
+ "use strict";var l=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var L=(r,t)=>{for(var e in t)l(r,e,{get:t[e],enumerable:!0})},M=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of k(t))!b.call(r,s)&&s!==e&&l(r,s,{get:()=>t[s],enumerable:!(n=S(t,s))||n.enumerable});return r};var C=r=>M(l({},"__esModule",{value:!0}),r);var H={};L(H,{applyExtends:()=>N,closeMergeLayer:()=>E,openMergeLayer:()=>g});module.exports=C(H);var _=require("css-in-props"),f=require("./cssLonghands.js");const R=new WeakMap;function y(r){const t=[];return r.extends&&(Array.isArray(r.extends)?t.push(...r.extends):t.push(r.extends)),r.extend&&(Array.isArray(r.extend)?t.push(...r.extend):t.push(r.extend)),t}function N(r,t,e){const n=y(t);if(!n.length)return;const c=(r.context||e?.context||{}).components||{};for(let o=0;o<n.length;o++){const a=d(n[o],c);a&&a!==t&&h(r,a,e,new Set([t]))}}function d(r,t){if(typeof r=="string"){if(r.includes(">")){const e=r.split(">").map(s=>s.trim());let n=t[e[0]]||t[`smbls.${e[0]}`];for(let s=1;s<e.length&&n;s++)n=n[e[s]];return n||null}return t[r]||t[`smbls.${r}`]||null}return typeof r=="object"&&r!==null?r:null}function h(r,t,e,n=new Set){if(n.has(t))return;n.add(t);const s=y(t);if(s.length){const a=(r.context||e?.context||{}).components||{};for(let i=0;i<s.length;i++){const p=d(s[i],a);p&&h(r,p,e,n)}}const c=g(r);for(const o in t){if(o==="extends"||o==="extend")continue;const a=t[o];c&&c.mark(o),r[o]===void 0?a&&typeof a=="object"&&!Array.isArray(a)&&typeof a!="function"?r[o]={...a}:r[o]=a:typeof r[o]=="object"&&typeof a=="object"&&!Array.isArray(r[o])&&!Array.isArray(a)&&r[o]!==null&&a!==null?r[o]=x(r[o],a):r[o]=a}}class w{constructor(){this.rank=0,this.ranks=null}mark(t){j(t)&&(this.ranks||(this.ranks=new Map),this.ranks.set(t,this.rank))}get(t){return this.ranks?this.ranks.get(t):void 0}get size(){return this.ranks?this.ranks.size:0}}const u=new Set;for(const r of[f.CSS_LONGHAND_SHORTHANDS,f.CSS_SHORTHAND_LONGHANDS])for(const t in r)u.add(t),u.add((0,f.cssCamelName)(t));const A=new Map;function j(r){const t=r.charCodeAt(0);if(t>=65&&t<=90||t>=48&&t<=57)return!1;let e=A.get(r);return e===void 0&&(e=!!_.CSS_PROPS_REGISTRY[r]||u.has(r)||r.indexOf("-")>=0&&!(r.charCodeAt(0)===45&&r.charCodeAt(1)===45)&&u.has((0,f.cssPropName)(r)),A.set(r,e)),e}function g(r){const t=r&&r.__ref;if(!t)return null;let e=t.__mergeLayer;return e||(e=t.__mergeLayer=new w),e.rank++,e}function E(r){const t=r&&r.__ref&&r.__ref.__mergeLayer;if(!t||!t.ranks)return;let e;for(const n of t.ranks.values())if(e===void 0)e=n;else if(n!==e)return;t.ranks=null}function x(r,t){const e={...r};for(const n in t){const s=e[n],c=t[n];s&&c&&typeof s=="object"&&typeof c=="object"&&!Array.isArray(s)&&!Array.isArray(c)&&typeof s!="function"&&typeof c!="function"?e[n]=x(s,c):e[n]=c}return e}