@raphy-js/dom 0.0.0-stage → 1.0.0-dev.88
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/LICENSE +202 -0
- package/README.md +187 -2
- package/dist/DOMBlueprintMaterializer-C-icNhvm.cjs +1 -0
- package/dist/DOMBlueprintMaterializer-CxzM_TX5.js +201 -0
- package/dist/FullDOMOperations-BOlf0_0L.js +2781 -0
- package/dist/FullDOMOperations-Dschwj33.cjs +1 -0
- package/dist/api/renderer.d.ts +12 -0
- package/dist/applicationIdentity-CHbuUlsE.cjs +1 -0
- package/dist/applicationIdentity-DjVgpsQq.js +11 -0
- package/dist/bind-BEmkQdaL.cjs +1 -0
- package/dist/bind-OakIMWpC.js +52 -0
- package/dist/binding/DOMValueWriter.d.ts +59 -0
- package/dist/binding/materializeComponentProps.d.ts +38 -0
- package/dist/binding/mountDOMBinding.d.ts +9 -0
- package/dist/binding/mountDOMProps.d.ts +22 -0
- package/dist/capture.cjs +1 -0
- package/dist/capture.d.ts +7 -0
- package/dist/capture.js +166 -0
- package/dist/channels-Bs8GHVWn.cjs +1 -0
- package/dist/channels-DqAQt-NH.js +33 -0
- package/dist/compact/hydration.cjs +1 -0
- package/dist/compact/hydration.d.ts +9 -0
- package/dist/compact/hydration.js +12 -0
- package/dist/compact/index.d.ts +19 -0
- package/dist/compact/targetRuntime.d.ts +1 -0
- package/dist/compact.cjs +1 -0
- package/dist/compact.js +34 -0
- package/dist/contracts/freezeGeneratedContract.d.ts +5 -0
- package/dist/contracts/manifest.json +25 -0
- package/dist/contracts/node.cjs +1 -0
- package/dist/contracts/node.contract.json +36889 -0
- package/dist/contracts/node.d.ts +6 -0
- package/dist/contracts/node.js +19 -0
- package/dist/contracts/stylesheet.cjs +1 -0
- package/dist/contracts/stylesheet.contract.json +11887 -0
- package/dist/contracts/stylesheet.d.ts +6 -0
- package/dist/contracts/stylesheet.js +22 -0
- package/dist/createDOMDataEventInput-B82pnIav.cjs +1 -0
- package/dist/createDOMDataEventInput-BDX50jhu.js +3010 -0
- package/dist/createDOMNodeRuntime-BHcsbeO1.cjs +1 -0
- package/dist/createDOMNodeRuntime-DIKOUQP7.js +3006 -0
- package/dist/createHydrationRenderer-C7srF-66.js +289 -0
- package/dist/createHydrationRenderer-DKybWTj4.cjs +1 -0
- package/dist/elementRef-D8Ir8tXA.cjs +1 -0
- package/dist/elementRef-YPBBElV9.js +32 -0
- package/dist/event/DOMEventHub.d.ts +303 -0
- package/dist/freezeGeneratedContract-0EZt85o4.js +10 -0
- package/dist/freezeGeneratedContract-g_Op1hGY.cjs +1 -0
- package/dist/hydration/HydrationEvents.d.ts +20 -0
- package/dist/hydration/HydrationSession.d.ts +107 -0
- package/dist/hydration/HydrationStream.d.ts +30 -0
- package/dist/hydration/activateHydration.d.ts +2 -0
- package/dist/hydration/createHydrationRenderer.d.ts +25 -0
- package/dist/hydration/index.d.ts +8 -0
- package/dist/hydration.cjs +1 -0
- package/dist/hydration.js +12 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +24 -0
- package/dist/interaction/clipboard.d.ts +2 -0
- package/dist/interaction/contextAction.d.ts +3 -0
- package/dist/interaction/contracts/node.cjs +1 -0
- package/dist/interaction/contracts/node.d.ts +15 -0
- package/dist/interaction/contracts/node.js +60 -0
- package/dist/interaction/dragDrop.d.ts +13 -0
- package/dist/interaction/focus.d.ts +4 -0
- package/dist/interaction/geometry.d.ts +39 -0
- package/dist/interaction/hover.d.ts +4 -0
- package/dist/interaction/index.d.ts +2 -0
- package/dist/interaction/interaction.d.ts +4 -0
- package/dist/interaction/internal/DOMInputModality.d.ts +20 -0
- package/dist/interaction/internal/DOMInteraction.types.d.ts +29 -0
- package/dist/interaction/internal/applicationIdentity.d.ts +3 -0
- package/dist/interaction/internal/dragDataTransfer.d.ts +4 -0
- package/dist/interaction/internal/solvePosition.d.ts +5 -0
- package/dist/interaction/keyboard.d.ts +3 -0
- package/dist/interaction/move.d.ts +3 -0
- package/dist/interaction/nativeDragDrop.d.ts +18 -0
- package/dist/interaction/outside.d.ts +3 -0
- package/dist/interaction/press.d.ts +3 -0
- package/dist/interaction/profile.cjs +1 -0
- package/dist/interaction/profile.d.ts +2 -0
- package/dist/interaction/profile.js +48 -0
- package/dist/interaction/rovingFocus.d.ts +4 -0
- package/dist/interaction/runtime.d.ts +7 -0
- package/dist/interaction/textEditing.d.ts +4 -0
- package/dist/interaction.cjs +1 -0
- package/dist/interaction.js +1603 -0
- package/dist/internal/dev.d.ts +20 -0
- package/dist/motion/channels.d.ts +5 -0
- package/dist/motion/index.d.ts +8 -0
- package/dist/motion-scroll/index.d.ts +19 -0
- package/dist/motion-scroll.cjs +1 -0
- package/dist/motion-scroll.js +169 -0
- package/dist/motion.cjs +1 -0
- package/dist/motion.js +187 -0
- package/dist/operations.cjs +1 -0
- package/dist/operations.d.ts +3 -0
- package/dist/operations.js +10 -0
- package/dist/profile/DOMProfile.d.ts +4 -0
- package/dist/profile/index.d.ts +1 -0
- package/dist/profile.cjs +1 -0
- package/dist/profile.js +23 -0
- package/dist/renderer/DOMEffectScope.d.ts +13 -0
- package/dist/renderer/DOMPresentation.d.ts +8 -0
- package/dist/renderer/DOMRenderer.d.ts +35 -0
- package/dist/renderer/DOMRenderer.types.d.ts +12 -0
- package/dist/renderer/DOMRendererExtension.types.d.ts +33 -0
- package/dist/renderer/DOMRuntimeProfile.d.ts +15 -0
- package/dist/renderer/DOMTargetRuntime.d.ts +1 -0
- package/dist/renderer/createDOMTargetRuntime.d.ts +3 -0
- package/dist/renderer/installAuxiliaryViews.d.ts +8 -0
- package/dist/renderer/installDOMRendererExtensions.d.ts +10 -0
- package/dist/renderer/resolveDOMMountTarget.d.ts +7 -0
- package/dist/renderer-4Wbid5nE.js +30 -0
- package/dist/renderer-DHK3lLG-.cjs +1 -0
- package/dist/resolveDOMMountTarget-C75JWc5x.cjs +1 -0
- package/dist/resolveDOMMountTarget-D944H05N.js +19 -0
- package/dist/runtime.cjs +1 -0
- package/dist/runtime.d.ts +21 -0
- package/dist/runtime.js +25 -0
- package/dist/serialization.cjs +1 -0
- package/dist/serialization.d.ts +4 -0
- package/dist/serialization.js +118 -0
- package/dist/stylesheet/DOMStyleManager.d.ts +95 -0
- package/dist/stylesheet/DOMStyleReferenceName.d.ts +2 -0
- package/dist/stylesheet/DOMStylesheetRuntime.d.ts +25 -0
- package/dist/stylesheet/acquireInstanceStylesheets.d.ts +4 -0
- package/dist/stylesheet/scopeDOMSelector.d.ts +2 -0
- package/dist/stylesheet/serializeDOMStyleValue.d.ts +3 -0
- package/dist/targetRuntime-C67QmOgE.cjs +1 -0
- package/dist/targetRuntime-C_OdmS5w.js +5 -0
- package/dist/template/AdvancedDOMMaterializer.d.ts +14 -0
- package/dist/template/AsyncDOMMaterializer.d.ts +4 -0
- package/dist/template/BoundaryDOMMaterializer.d.ts +10 -0
- package/dist/template/DOMHostPlan.d.ts +4 -0
- package/dist/template/DOMNode.types.d.ts +192 -0
- package/dist/template/DOMNodeRuntime.d.ts +1 -0
- package/dist/template/binding/DOMBinding.types.d.ts +44 -0
- package/dist/template/binding/bind.d.ts +16 -0
- package/dist/template/blueprint/DOMBlueprintAddressing.d.ts +23 -0
- package/dist/template/blueprint/DOMBlueprintMaterializer.d.ts +3 -0
- package/dist/template/blueprint/DOMBlueprintMaterializer.types.d.ts +15 -0
- package/dist/template/blueprint/DOMHostBlueprint.d.ts +102 -0
- package/dist/template/blueprint/DOMHostBlueprintCache.d.ts +86 -0
- package/dist/template/blueprint/createDOMDataEventInput.d.ts +5 -0
- package/dist/template/blueprint/mountDOMHostBlueprint.d.ts +45 -0
- package/dist/template/createDOMNodeRuntime.d.ts +3 -0
- package/dist/template/each/mountEach.d.ts +5 -0
- package/dist/template/each/mountPureEach.d.ts +22 -0
- package/dist/template/error/DOMInvocation.d.ts +58 -0
- package/dist/template/error/DOMOperationError.d.ts +25 -0
- package/dist/template/html/DOMRawHtmlNode.types.d.ts +21 -0
- package/dist/template/html/rawHtml.d.ts +5 -0
- package/dist/template/keep-alive/DOMKeepAliveNode.types.d.ts +10 -0
- package/dist/template/keep-alive/keepAlive.d.ts +4 -0
- package/dist/template/mount/DOMMountTransaction.d.ts +63 -0
- package/dist/template/mountNode.d.ts +173 -0
- package/dist/template/normalizeChildren.d.ts +5 -0
- package/dist/template/operations/DOMOperations.d.ts +56 -0
- package/dist/template/operations/FullDOMOperations.d.ts +6 -0
- package/dist/template/page/DOMHead.d.ts +7 -0
- package/dist/template/page/PageNodePlan.d.ts +31 -0
- package/dist/template/ref/DOMElementRef.types.d.ts +7 -0
- package/dist/template/ref/componentRefGuard.d.ts +6 -0
- package/dist/template/ref/elementRef.d.ts +9 -0
- package/dist/template/structural/range/DOMRange.d.ts +145 -0
- package/dist/template/teleport/DOMTeleportNode.types.d.ts +8 -0
- package/dist/template/teleport/teleport.d.ts +4 -0
- package/dist/template/transition/DOMTransitionCoordinator.d.ts +32 -0
- package/dist/template/transition/DOMTransitionNode.types.d.ts +30 -0
- package/dist/template/transition/transition.d.ts +4 -0
- package/dist/template/value/DOMValueDescriptor.types.d.ts +34 -0
- package/dist/template/value/valueDescriptors.d.ts +13 -0
- package/package.json +157 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const T=require("@raphy-js/core"),mt=require("./bind-BEmkQdaL.cjs"),we=require("./elementRef-D8Ir8tXA.cjs"),Z=Symbol("raphy.dom.event.data.undefined");class de{constructor(e,t,n,i){this.eventName=e,this.handler=t===null?Symbol(`raphy.dom.event.${e}.handler`):t.handler,this.owner=t===null?Symbol(`raphy.dom.event.${e}.owner`):t.owner,this.data=t===null?Symbol(`raphy.dom.event.${e}.data`):t.data,this.listeners=t===null?new Map:t.listeners,this.clearsData=i,this.eventless=n,this.plain=t===null?new de(e,this,!0,!1):this,this.retaining=i?this:new de(e,t??this,n,!0),this.dispatch=void 0}}class ne{constructor(e,t,n,i,o,s){this.hub=e,this.owner=t,this.errorContext=n,this.handleError=i,this._element0=o,this._slot0=s,this._element1=void 0,this._slot1=void 0,this._rest=void 0,this.router=void 0}get eventless(){return this._slot0.eventless}add(e,t){this._element1===void 0?(this._element1=e,this._slot1=t):this._rest===void 0?this._rest=[e,t]:this._rest.push(e,t)}release(){const e=this.hub;e._staticOwner===this&&(e._staticOwner=null,e._staticTwin=null);const t=this._element0;if(t===void 0)return;be(t,this._slot0),this._element0=void 0;const n=this._element1;n!==void 0&&(be(n,this._slot1),this._element1=void 0);const i=this._rest;if(i!==void 0){for(let o=0;o<i.length;o+=2)be(i[o],i[o+1]);this._rest=void 0}}}const Fe=Object.freeze({}),wt=()=>{},bt=128;class ue{constructor(){this.event=null,this.handed=null,this.target=null,this.outer=null,this.original=void 0,this.accessor=Object.freeze({configurable:!0,get:()=>this.target})}}let he=new ue,W=null;const ie=new Set(["auxclick","beforeinput","change","click","compositionend","compositionstart","compositionupdate","contextmenu","copy","cut","dblclick","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","focusin","focusout","input","keydown","keypress","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","paste","pointercancel","pointerdown","pointermove","pointerout","pointerover","pointerup","reset","submit","touchcancel","touchend","touchmove","touchstart","wheel"]);class Ot{_boundaries=new Map;_primaryBoundary;_runtime;_bindings=new WeakMap;_userRouteBindings=0;_routeBindings=0;_staticSlots=new Map;_eventNames=new Map;_dispatched=new WeakMap;_boundarySubscriptions=new Set;_disposed=!1;_staticOwner=null;_staticTwin=null;constructor(e,t){this._boundaries.set(e,1),this._primaryBoundary=e,this._runtime=t}boundaries(){return this._assertAlive(),Object.freeze([...this._boundaries.keys()])}resolveEventName(e){let t=this._eventNames.get(e);return t===void 0&&(t=e.slice(2).toLowerCase(),!this._disposed&&this._eventNames.size<bt&&this._eventNames.set(e,t)),t}createWriter(e,t,n,i,o={}){return this._createWriter(e,t,n,i,"user",o)}registerStatic(e,t,n,i,o,s,a=Fe,c){this._assertAlive();const l=oe(n,t);if(l===void 0)return;if(!ie.has(t)||!Oe(a)){this._registerStaticDirect(e,t,l,i,p=>s(o,p,`event:${t}`),a,c);return}const d=this._resolveStaticSlot(t),h=e,_=a.eventless===!0;if(h[d.handler]!==void 0||this._userRouteBindings!==0&&se(this._bindings.get(e),t)?.user!==void 0){this._registerDelegatedBinding(e,t,{handler:l,handleError:p=>s(o,p,`event:${t}`),owner:i,registered:!1,data:c,eventless:_},"user");return}const w=_?d.plain:d,E=c!==void 0&&kt(c)?w.retaining:w,D=this._staticOwner,k=D!==null&&D.owner===i&&D.errorContext===o&&D.handleError===s;let u;k?(D.add(h,E),u=D.eventless===_?D:this._staticTwin??=new ne(this,i,o,s,void 0,E)):u=new ne(this,i,o,s,h,E),h[d.handler]=l,h[d.owner]=u,h[d.data]=c,k||(this._staticOwner=u,this._staticTwin=null,i.own(u.release.bind(u))),d.listeners.size!==this._boundaries.size&&this._installRootListeners(d)}createRowEvent(e,t,n,i,o=Fe){if(this._assertAlive(),!ie.has(e)||!Oe(o))return;const s=this._resolveStaticSlot(e),a=o.eventless===!0?s.plain:s;return{slot:s,record:new ne(this,t,n,i,void 0,a)}}createRowRouter(e,t,n,i,o){if(this._assertAlive(),!ie.has(e))return;const s=this._resolveStaticSlot(e),a=new ne(this,t,n,i,void 0,s);return a.router={routes:[...o].sort((c,l)=>l.path.length-c.path.length)},{slot:s,record:a}}writeRowEvent(e,t,n,i){const o=e,s=t.slot;o[s.handler]=n,o[s.owner]=t.record,o[s.data]=i,s.listeners.size!==this._boundaries.size&&this._installRootListeners(s)}normalizeRowHandler(e,t){return oe(e,t)}createInternalWriter(e,t,n,i){return this._createWriter(e,t,n,i,"internal",{})}retainBoundary(e){this._assertAlive(),this._boundaries.set(e,(this._boundaries.get(e)??0)+1);let t=!0;const n=()=>{if(!t)return;t=!1;const i=(this._boundaries.get(e)??1)-1;if(i>0){this._boundaries.set(e,i);return}this._boundaries.delete(e);let o;for(const s of this._staticSlots.values()){const a=s.listeners.get(e);if(a!==void 0){try{e.removeEventListener(s.eventName,a)}catch(c){(o??=[]).push(c)}s.listeners.get(e)===a&&s.listeners.delete(e)}}for(const s of this._boundarySubscriptions){const a=s.listeners.get(e);if(a!==void 0){try{e.removeEventListener(s.eventName,a,De(s.options))}catch(c){(o??=[]).push(c)}s.listeners.delete(e)}}if(o?.length===1)throw o[0];if(o!==void 0)throw new AggregateError(o,"[RaphyDOM] Event boundary cleanup failed.")};try{for(const i of this._staticSlots.values())i.listeners.size!==0&&this._ensureBoundaryListener(i,e);for(const i of this._boundarySubscriptions)this._installBoundarySubscription(i,e)}catch(i){try{n()}catch(o){throw new AggregateError([i,o],"[RaphyDOM] Event boundary installation and rollback failed.")}throw i}return n}subscribeBoundaries(e,t,n=!1){this._assertAlive();const i=e.trim();if(i.length===0)throw new TypeError("[RaphyDOM] Boundary event name must not be empty.");const o={eventName:i,listener:t,listeners:new Map,options:n};this._boundarySubscriptions.add(o);let s=!0;const a=()=>{if(!s)return;s=!1,this._boundarySubscriptions.delete(o);let c;for(const[l,d]of o.listeners)try{l.removeEventListener(i,d,De(n))}catch(h){(c??=[]).push(h)}if(o.listeners.clear(),c?.length===1)throw c[0];if(c!==void 0)throw new AggregateError(c,"[RaphyDOM] Boundary subscription cleanup failed.")};try{for(const c of this._boundaries.keys())this._installBoundarySubscription(o,c)}catch(c){try{a()}catch(l){throw new AggregateError([c,l],"[RaphyDOM] Boundary subscription installation and rollback failed.")}throw c}return a}_createWriter(e,t,n,i,o,s){return this._assertAlive(),ie.has(t)&&Oe(s)?this._createDelegatedWriter(e,t,n,i,o,s.eventless===!0):this._createDirectWriter(e,t,n,i,s)}dispose(){if(this._disposed)return;this._disposed=!0;let e;for(const t of[...this._boundarySubscriptions]){for(const[n,i]of t.listeners)try{n.removeEventListener(t.eventName,i,De(t.options))}catch(o){(e??=[]).push(o)}t.listeners.clear()}this._boundarySubscriptions.clear();for(const t of this._staticSlots.values()){for(const[n,i]of t.listeners)try{n.removeEventListener(t.eventName,i)}catch(o){(e??=[]).push(o)}t.listeners.clear()}if(this._boundaries.clear(),this._bindings=new WeakMap,this._dispatched=new WeakMap,this._staticOwner=null,this._staticTwin=null,this._staticSlots.clear(),this._eventNames.clear(),e?.length===1)throw e[0];if(e!==void 0)throw new AggregateError(e,"[RaphyDOM] Event hub disposal failed.")}_installBoundarySubscription(e,t){if(e.listeners.has(t))return;const n=i=>{this._disposed||!Nt(this._boundaries,t,i)||e.listener.call(t,i)};t.addEventListener(e.eventName,n,e.options),e.listeners.set(t,n)}_createDelegatedWriter(e,t,n,i,o,s){const a={handler:void 0,handleError:i,owner:n,registered:!1,data:void 0,eventless:s};return{clear:()=>{a.handler=void 0},write:c=>{a.handler=oe(c,t),a.handler!==void 0&&this._registerDelegatedBinding(e,t,a,o)}}}_registerDelegatedBinding(e,t,n,i){if(n.registered)return;this._assertAlive();const o=this._bindings.get(e);let s=se(o,t);if(s===void 0)if(s={internal:void 0,user:void 0},o===void 0)this._bindings.set(e,{eventName:t,route:s});else if(o instanceof Map)o.set(t,s);else{const l=new Map;l.set(o.eventName,o.route),l.set(t,s),this._bindings.set(e,l)}Dt(s,i,n),n.registered=!0,this._routeBindings++,i==="user"&&this._userRouteBindings++;const a=n.owner.own(()=>{if(n.handler=void 0,n.data=void 0,!n.registered)return;n.registered=!1,this._routeBindings--,i==="user"&&this._userRouteBindings--;const l=this._bindings.get(e);if(l===void 0)return;const d=se(l,t);if(d!==void 0&&(Mt(d,i,n),d.internal===void 0&&d.user===void 0)){if(!(l instanceof Map))this._bindings.delete(e);else if(l.delete(t),l.size===0)this._bindings.delete(e);else if(l.size===1){const h=l.entries().next().value;h!==void 0&&this._bindings.set(e,{eventName:h[0],route:h[1]})}}}),c=this._resolveStaticSlot(t);try{c.listeners.size!==this._boundaries.size&&this._installRootListeners(c)}catch(l){try{a()}catch(d){throw new AggregateError([l,d],"[RaphyDOM] Event binding installation and rollback failed.")}throw l}}_createDirectWriter(e,t,n,i,o){let s,a=!1;const c=l=>{const d=s;if(!(d===void 0||n.disposed)&&!(o.self===!0&&l.target!==e))try{this._runtime.action(`@raphy-js/dom:event:${t}`,()=>{o.prevent===!0&&l.preventDefault(),o.stop===!0&&l.stopPropagation(),Q(e,d,void 0,o.eventless===!0?void 0:l)})()}catch(h){if(!i(h))throw h}finally{o.once===!0&&a&&(a=!1,s=void 0,e.removeEventListener(t,c,o.capture))}};return{clear:()=>{s=void 0},write:l=>{if(s=oe(l,t),!(s===void 0||a)){a=!0;try{e.addEventListener(t,c,o)}catch(d){s=void 0,a=!1;try{e.removeEventListener(t,c,o.capture)}catch(h){throw new AggregateError([d,h],"[RaphyDOM] Direct listener installation cleanup failed.")}throw d}n.own(()=>{s=void 0,a&&(a=!1,e.removeEventListener(t,c,o.capture))})}}}}_registerStaticDirect(e,t,n,i,o,s,a){let c=n,l=a,d=!0;const h=_=>{const w=c;if(w===void 0||i.disposed||s.self===!0&&_.target!==e)return;const E=l;try{this._runtime.action(`@raphy-js/dom:event:${t}`,()=>{s.prevent===!0&&_.preventDefault(),s.stop===!0&&_.stopPropagation(),Q(e,w,E,s.eventless===!0?void 0:_)})()}catch(D){if(!o(D))throw D}finally{s.once===!0&&d&&(d=!1,c=void 0,l=void 0,e.removeEventListener(t,h,s.capture))}};try{e.addEventListener(t,h,s)}catch(_){c=void 0,l=void 0,d=!1;try{e.removeEventListener(t,h,s.capture)}catch(w){throw new AggregateError([_,w],"[RaphyDOM] Direct listener installation cleanup failed.")}throw _}i.own(()=>{c=void 0,l=void 0,d&&(d=!1,e.removeEventListener(t,h,s.capture))})}_installRootListeners(e){for(const t of this._boundaries.keys())this._ensureBoundaryListener(e,t)}_resolveStaticSlot(e){let t=this._staticSlots.get(e);return t===void 0&&(t=new de(e,null,!1,!1),this._staticSlots.set(e,t)),t}_ensureBoundaryListener(e,t){const n=e.listeners;if(n.has(t))return;const i=o=>this._dispatch(e,o);n.set(t,i);try{t.addEventListener(e.eventName,i)}catch(o){let s=!1,a;try{t.removeEventListener(e.eventName,i)}catch(c){s=!0,a=c}throw n.get(t)===i&&n.delete(t),s?new AggregateError([o,a],"[RaphyDOM] Event listener installation and rollback failed."):o}}_dispatch(e,t){if(this._disposed)return;if(this._boundaries.size>1){const a=e.eventName;let c=this._dispatched.get(t);if(c?.has(a)===!0)return;c===void 0&&(c=new Set,this._dispatched.set(t,c)),c.add(a)}const n=typeof t.composedPath=="function"?t.composedPath():Ye(t.target),i=this._boundaries.size===1?n.indexOf(this._primaryBoundary):n.findIndex(a=>this._boundaries.has(a));let o=0;for(;o<=i&&!Ke(n[o]);)o++;if(o>i)return;const s=W;try{let a=e.dispatch;(a===void 0||this._runtime.disposed)&&(a=e.dispatch=this._runtime.action(`@raphy-js/dom:event:${e.eventName}`,St)),a(this,e,n,o,i,t)}finally{const a=W;a!==s&&a!==null&&At(a)}}_assertAlive(){if(this._disposed)throw new Error("[RaphyDOM] Event hub is disposed.")}}function se(r,e){if(r!==void 0)return r instanceof Map?r.get(e):r.eventName===e?r.route:void 0}function Dt(r,e,t){const n=r[e];if(n===void 0){r[e]=t;return}if(n instanceof Set){n.add(t);return}n!==t&&(r[e]=new Set([n,t]))}function Mt(r,e,t){const n=r[e];if(n===t){r[e]=void 0;return}n instanceof Set&&(n.delete(t),n.size===0?r[e]=void 0:n.size===1&&(r[e]=n.values().next().value))}function xe(r,e,t){if(t===void 0)return!1;if(!(t instanceof Set))return $e(r,e,t);for(const n of t)if($e(r,e,n))return!0;return!1}function $e(r,e,t){const n=t.handler;if(n===void 0||t.owner.disposed)return!1;try{return Q(r,n,t.data,t.eventless?void 0:Ae(e,r)),!1}catch(i){if(!t.handleError(i))throw i;return!0}}function Rt(r,e,t){const n=r[t.handler];if(n===void 0)return!1;const i=r[t.owner];if(i.owner.disposed)return!1;const o=i.router;if(o!==void 0)return Et(r,e,t,i,o,r[t.data]);try{return Q(r,n,r[t.data],i.eventless?void 0:Ae(e,r)),!1}catch(s){if(!i.handleError(i.errorContext,s,`event:${t.eventName}`))throw s;return!0}}function Et(r,e,t,n,i,o){const s=e.target;if(s===null)return!1;const a=i.routes;for(let c=0;c<a.length;c++){const l=a[c];let d=r;const h=l.path;for(let _=0;_<h.length&&d!==null;_++)d=d.childNodes[h[_]]??null;if(!(d===null||!d.contains(s))){try{Q(d,l.handler,l.data===void 0?void 0:l.data(o),l.eventless?void 0:Ae(e,d))}catch(_){if(!n.handleError(n.errorContext,_,`event:${t.eventName}`))throw _;return!0}if(e.cancelBubble)break}}return!1}function Q(r,e,t,n){t===void 0?n===void 0?e.call(r):e.call(r,n):n===void 0?e.call(r,t===Z?void 0:t):e.call(r,t===Z?void 0:t,n)}function Ae(r,e){let t=W;return(t===null||t.event!==r)&&(t=Ct(r)),t.target=e,t.handed}function be(r,e){r[e.handler]=void 0,r[e.owner]=void 0,e.clearsData&&(r[e.data]=void 0)}function kt(r){return typeof r!="number"&&typeof r!="boolean"&&r!==null&&r!==Z}function oe(r,e){if(r!=null){if(typeof r!="function")throw new TypeError(`[RaphyDOM] Event "${e}" must be a function.`);return r}}function St(r,e,t,n,i,o){const s=e.eventName,a=e.handler;for(let c=n;c<=i;c++){const l=t[c],d=r._routeBindings===0?void 0:se(r._bindings.get(l),s);if(d===void 0&&l[a]===void 0||c!==n&&!Ke(l))continue;const h=W;if(h!==null&&h.event===o&&(h.target=l),d!==void 0&&xe(l,o,d.internal)||Rt(l,o,e)||d!==void 0&&xe(l,o,d.user)||o.cancelBubble||r._disposed)break}}function Ct(r){const e=W,t=Object.getOwnPropertyDescriptor(r,"currentTarget");let n=e===null?he:new ue;try{Object.defineProperty(r,"currentTarget",n.accessor),n.handed=r,n.original=t}catch{n===he&&(n=new ue),n.handed=Tt(r,n)}return n.event=r,n.outer=e,W=n,n}function At(r){const e=r.event,t=r.handed===e,n=r.original;if(W=r.outer,r.event=null,r.handed=null,r.target=null,r.outer=null,r.original=void 0,!!t){if(n===void 0){Reflect.deleteProperty(e,"currentTarget")||Ue(r);return}try{Object.defineProperty(e,"currentTarget",n)}catch(i){throw Ue(r),i}}}function Ue(r){r===he&&(he=new ue)}function Tt(r,e){return new Proxy(r,{get(t,n){if(n==="currentTarget")return e.target;const i=Reflect.get(t,n,t);return typeof i=="function"?i.bind(t):i}})}function Ye(r){const e=[];let t=r;for(;t!==null;)e.push(t),t=Je(t)?t.parentNode:null;return e}function Ke(r){return Je(r)&&r.nodeType===1}function Je(r){return r!=null&&typeof Reflect.get(r,"nodeType")=="number"}function Oe(r){return r.capture!==!0&&r.once!==!0&&r.passive!==!0&&r.prevent!==!0&&r.self!==!0&&r.stop!==!0}function De(r){return typeof r=="boolean"?r:r.capture===!0}function Nt(r,e,t){if(r.size<2)return!0;const n=typeof t.composedPath=="function"?t.composedPath():Ye(t.target);for(const i of n)if(r.has(i))return i===e;return!0}const Pt=["click","input","change","keydown","submit","pointerdown","focusin","compositionstart","compositionend"],G=new WeakMap,fe=new WeakSet;function jt(r){return G.has(r)}function Ze(r){return fe.has(r)}function Qe(r){if(r.released)return;r.released=!0;const e=G.get(r.target)-1;e===0?(G.delete(r.target),fe.delete(r.target)):G.set(r.target,e)}function zt(r){const e=r.target,t=e;return G.set(e,(G.get(e)??0)+1),r.type==="compositionstart"?fe.add(e):r.type==="compositionend"&&fe.delete(e),{released:!1,event:r,target:e,value:Reflect.get(e,"value"),checked:Reflect.get(e,"checked"),..."selectionStart"in e?{selection:{start:t.selectionStart,end:t.selectionEnd,direction:t.selectionDirection}}:{}}}function Bt(r){if(Qe(r),!r.target.isConnected)return;if(r.value!==void 0&&Reflect.set(r.target,"value",r.value),r.checked!==void 0){const n=r.target.type;Reflect.set(r.target,"checked",r.event.type==="click"?n==="checkbox"?!r.checked:n==="radio"?!1:r.checked:r.checked)}r.selection?.start!==null&&r.selection?.start!==void 0&&r.target.setSelectionRange(r.selection.start,r.selection.end,r.selection.direction);const e=r.event.constructor;if(r.target.dispatchEvent(new e(r.event.type,r.event)))if(r.event.type==="submit"&&r.target.localName==="form"){const n=r.target;n.ownerDocument.defaultView.HTMLFormElement.prototype.submit.call(n)}else r.event.type==="keydown"&&r.event.key==="Enter"&&r.target.localName==="input"&&r.target.form?.requestSubmit()}function Ht(r){r.stopImmediatePropagation(),r.cancelable&&(r.type==="click"||r.type==="submit"||r.type==="keydown"&&r.key==="Enter"&&!r.isComposing)&&r.preventDefault()}const H=new WeakMap;let Re=0;function I(r){return Re===0?void 0:H.get(r)}class Te{constructor(e,t,n,i){this.options=e,this._stream=i,this.work=t,this._tokens=n??Me(e.target,e.manifest.texts);for(const[o,s]of this._tokens.entries())this._indexes.set(s.node,o)}_tokens;_cursor=0;_adopted=new WeakSet;_indexes=new WeakMap;pending=new Set;cleanups=new Set;_commits=[];_dirtyControls=new Set;_disposed=!1;_parent;_readyDone=!1;work;controlsChanged=!1;run(e){const t=this.options.target.ownerDocument,n=H.get(t);H.set(t,this),Re++;try{return e()}finally{Re--,n===void 0?H.delete(t):H.set(t,n)}}suspend(e){const t=this.options.target.ownerDocument,n=H.get(t);H.delete(t);try{return e()}finally{n!==void 0&&H.set(t,n)}}nextLabel(){return this._tokens[this._cursor]?.label}componentIdentity(){const e=this._tokens[this._cursor];return e?.kind==="range"&&(e.label==="raphy:component"||e.label==="raphy:async-component")?e.id?.replace(/\.async$/,""):void 0}portal(e,t){const n=this._tokens[this._indexes.get(t)],i=Me(e,this.options.manifest.texts),o=i.findIndex(a=>a.label==="raphy:teleport:content"&&a.id===`${n?.id}.portal`);if(o===-1)throw new Error("[RaphyDOM] Missing server portal boundary.");const s=i.slice(o,i[o].end).map(a=>({...a,end:a.end-o}));return this._fork({...this.options,target:e},s)}range(e){const t=this._take("range",e);return t===void 0?void 0:{first:t.node,last:t.last}}element(e,t){const n=this._tokens[this._cursor];if(n?.kind==="element"&&n.node.localName.toLowerCase()===e.toLowerCase()&&n.node.namespaceURI===t)return this._cursor++,this._adopted.add(n.node),n.node;this._mismatch(`${t}:${e}`,n)}text(e){if(e===""&&this._tokens[this._cursor]?.kind!=="text"){const i=this.options.target.ownerDocument.createTextNode("");return this._adopted.add(i),i}const t=this._take("text");if(t===void 0)return;const n=t.node;return e!==void 0&&this.checkText(n,e),n}checkText(e,t){const n=this._tokens[this._indexes.get(e)];if(e.data!==t&&!(this.controlsChanged&&n?.serverText===e.data)){const i={code:"DOM_HYDRATION_MISMATCH",expected:JSON.stringify(t),actual:JSON.stringify(e.data),node:e};if(this.options.onMismatch?.(i),this.options.mode!=="production")throw new Error(`[RaphyDOM] Hydration text mismatch: expected ${i.expected}, received ${i.actual}.`)}e.data!==t&&(e.data=t)}finishElement(e,t=!1){const n=this._tokens[this._indexes.get(e)];if(n!==void 0&&this._cursor<n.end)if(t)this._cursor=n.end;else for(;this._cursor<n.end;)this._mismatch("end of element",this._tokens[this._cursor])}owns(e){return this._adopted.has(e)}remaining(){for(;this._cursor<this._tokens.length;)this._mismatch("end of boundary",this._tokens[this._cursor])}defer(e,t=!1){const n=this._indexes.get(e)??-1,i=this._tokens[n];if(i===void 0)throw new Error("[RaphyDOM] Missing hydration boundary marker.");const o=t?n:n+1;this._cursor=i.end;const s=this._tokens.slice(o,i.end).map(a=>({...a,end:a.end-o}));return this._fork(this.options,s)}skip(e){this.defer(e)}get streaming(){return this._stream!==void 0}waitStream(e,t,n){const i=this._tokens[this._indexes.get(e)];return this._stream.register(i.id,e,t,n),this._stream.wait(i.id,n)}trackStream(e){this._stream.track(e)}finishStream(e){this._stream.release(this._tokens[this._indexes.get(e)].id)}rescan(e,t){return this._fork(this.options,Me(this.options.target,this.options.manifest.texts,e.nextSibling,t))}track(e){this.pending.add(e),e.then(()=>this.pending.delete(e),()=>this.pending.delete(e))}initialBinding(e,t){let n=!0,i,o;const s=new Promise((l,d)=>{i=l,o=d}),a=()=>{this.cleanups.delete(a),i()};this.cleanups.add(a);const c=e.own(a);return this.track(s),()=>{if(!n){t();return}n=!1;try{this.run(t),i()}catch(l){throw o(l),l}finally{c()}}}commit(e,t){this._commits.push({operation:e,cancel:t})}preserveControl(e){if(this.controlsChanged=!0,this._parent!==void 0&&!this._parent._readyDone){this._parent.preserveControl(e);return}jt(e)||this._dirtyControls.add(e)}async ready(){for(;this.pending.size!==0;)await Promise.all(this.pending);for(;!this._disposed&&this._commits.length!==0;)this._commits.shift().operation();if(this._readyDone=!0,!this._disposed){for(const e of this._dirtyControls)if(e.isConnected){const t=e.ownerDocument.defaultView,n=e.localName==="textarea"||e.localName==="input"&&!["checkbox","radio"].includes(e.type);e.dispatchEvent(n?new t.InputEvent("input",{bubbles:!0,isComposing:Ze(e)}):new t.Event("change",{bubbles:!0}))}}this._dirtyControls.clear()}dispose(){this._disposed=!0,this._dirtyControls.clear();for(const e of this._commits.splice(0))e.cancel();for(const e of this.cleanups)e();this.cleanups.clear()}_fork(e,t){const n=this._stream,i=n===void 0?e:{...e,get manifest(){return n.manifest}},o=new Te(i,this.work,t,n);o._parent=this;const s=()=>o.dispose();return this.cleanups.add(s),o.cleanups.add(()=>this.cleanups.delete(s)),o}_take(e,t){const n=this._tokens[this._cursor];if(n?.kind===e&&(t===void 0||n.label===t))return this._cursor++,this._adopted.add(n.node),this._stream?.claim(n.node),n;this._mismatch(t??e,n)}_mismatch(e,t){const n=t===void 0?"end of boundary":t.label??t.node.nodeName;if(this.options.onMismatch?.({code:"DOM_HYDRATION_MISMATCH",expected:e,actual:n,node:t?.node??null}),this.options.mode!=="production")throw new Error(`[RaphyDOM] Hydration mismatch: expected ${e}, received ${n}.`);if(t!==void 0){this._cursor=t.end;let i=t.node;for(;i!==null;){const o=i.nextSibling;if(i.remove(),i===t.last)break;i=o}}}}function Me(r,e,t,n){const i=[],o=(s,a=s.firstChild,c)=>{const l=[];for(let d=a;d!==null&&d!==c;d=d.nextSibling)if(d.nodeType===8){const h=d.data;if(h.startsWith("r:text@1:")){const w=h.slice(9);if(!Object.hasOwn(e,w))throw new Error("[RaphyDOM] Corrupt text identity.");let E=d.nextSibling;E?.nodeType!==3&&(E=r.ownerDocument.createTextNode(""),s.insertBefore(E,d.nextSibling));const D=E.nextSibling;if(D?.nodeType!==8||D.data!=="r:/text")throw new Error("[RaphyDOM] Corrupt text markers.");i.push({kind:"text",node:E,last:E,serverText:e[w],end:i.length+1}),d=D;continue}const _=/^(raphy:.+)@1:([\w.]+):(start|end)$/.exec(h);if(_===null)continue;if(_[3]==="start"){const w={kind:"range",node:d,last:d,label:_[1],id:_[2],end:0};i.push(w),l.push(w)}else{const w=l.pop();if(w?.id!==_[2]||w.label!==_[1])throw new Error("[RaphyDOM] Corrupt structural markers.");Object.assign(w,{last:d,end:i.length})}}else if(d.nodeType===1){const h=d;if(h.hasAttribute("data-r-manifest")||h.hasAttribute("data-r-stream-frame")||h.hasAttribute("data-r-chunk")||h.hasAttribute("data-r-region-chunk")||h.hasAttribute("data-r-chunk-error")||h.hasAttribute("data-r-stream-head")||h.hasAttribute("data-r-stream-portal"))continue;const _={kind:"element",node:d,last:d,end:0};i.push(_),o(d),_.end=i.length}else d.nodeType===3&&i.push({kind:"text",node:d,last:d,end:i.length+1});if(l.length!==0)throw new Error("[RaphyDOM] Unclosed structural markers.")};return t===void 0?o(r):o(n.parentNode,t,n),i}function It(r,e){return I(r)?.text(e)??r.createTextNode(e)}function Lt(r,e){I(r.ownerDocument)!==void 0&&e.parentNode===r||r.appendChild(e)}const F="@raphy-js/dom:write",Vt=Object.freeze({initial:"sync"}),Wt=Object.freeze([Object.freeze({name:F})]),Ft=Object.freeze({phases:Wt,scheduler:"microtask",validateRuntime(r){if(r.configuration.scheduler!=="microtask")throw new Error('[RaphyDOM] Runtime scheduler must be "microtask".');if(r.phases.find(t=>t.name===F)===void 0)throw new Error(`[RaphyDOM] Runtime does not provide the required "${F}" phase.`)}});function Xe(){return Ft}const xt=Xe();class m{constructor(e){this.error=e}}function $t(r,e){if(!r.hasUnrouted)throw new m(r.error);const t=e(r.error);if(!t.handled)throw new m(t.report.error);if(r.completed!==void 0)throw new m(r.completed.error)}class et{handled=!0;report;owner;constructor(e,t){this.report=e.report,this.owner=t,Object.freeze(this)}}class j{constructor(e){this.captured=e}}function J(r,e){if(r===void 0)return;if(r.interrupted===void 0)throw new m(r.prior);const t=r.interrupted.error;throw t instanceof j?new m(r.prior):t instanceof m?new m(new AggregateError([r.prior,t.error],"[RaphyDOM] Published cleanup and mount completion failed.")):(e(new AggregateError([r.prior,t],"[RaphyDOM] Published cleanup and mount completion failed.")),new m(r.prior))}function Ne(r,e,t){let n=!0,i=null;try{if(e(o=>{try{return t(o)}catch(s){if(s instanceof m)throw n?s:s.error;if(!(s instanceof j))throw s;n&&r.disposed&&(i=s)}},()=>i!==null),i!==null)throw i}finally{n=!1,i=null}}function Ee(r){try{r()}catch(e){if(e instanceof j)return;throw e instanceof m?e.error:e}}function ye(r){throw new m(r)}function Ut(r,e,t){Ne(r,(n,i)=>r._registerEffect(F,n,t,!1,ye,i),e)}function qt(r,e,t){Ne(r,(n,i)=>r._registerEffect(F,n,t,!0,ye,i),e)}function Gt(r,e,t,n){Ne(r,(i,o)=>r._registerWatch(e,F,i,n,ye,o),t)}function Yt(r,e){r._start(e,"sync",ye)}function Kt(r,e,t){let n=!1,i=!1;const o={handled:null};try{return r(s=>{try{e(s)}catch(a){if(a instanceof j)throw o.handled=a,a.captured.report.error;if(a instanceof m)throw n=!0,a.error;const c=t(a,s);if(c.handled){if(c instanceof et&&!c.owner.disposed&&!s.node.disposed)return;throw o.handled=new j(c),c.report.error}throw n=!0,c.report.error}},s=>{throw i=!0,s})}catch(s){throw s instanceof m?s:i?o.handled!==null||n?new m(s):s:o.handled!==null?Object.is(s,o.handled.captured.report.error)?o.handled:new m(s):n?new m(s):s}}class ae extends Error{constructor(e,t,n,i){super("[RaphyDOM] Renderer operation failed.",{cause:n}),this.component=e,this.owner=t,this.cause=n,this.source=i,this.name="DOMOperationError"}}function ce(r,e,t,n){return t instanceof ae?t.owner.disposed&&!e.disposed?new ae(t.component,e,t.cause,t.source):t:new ae(r,e,t,n)}class ke{_elementRefs=[];_components=[];_componentRefs=[];_completedFailures;_state="open";_holds=0;_released;get open(){return this._state==="open"}get held(){return this._holds!==0}hold(){this._assertOpen(),this._holds++;let e=!1;return()=>{if(!e&&(e=!0,--this._holds===0&&this._released!==void 0)){const t=this._released;this._released=void 0,this._state==="open"&&t()}}}afterHolds(e){if(this._assertOpen(),this._holds===0){e();return}this._released=e}addElementRef(e,t,n){this._assertOpen(),this._elementRefs.push({element:t,owner:n,reference:e}),we.isDOMElementRef(e)&&n.own(()=>we.releaseDOMElementRef(e,t))}addComponent(e,t){this._assertOpen(),this._components.push({component:e,handleError:t})}addComponentRef(e,t){this._assertOpen(),this._componentRefs.push({component:t,reference:e})}deferCompletedFailure(e){this._assertOpen(),(this._completedFailures??=[]).push(e)}absorb(e){this._assertOpen(),e._assertOpen(),this._elementRefs.push(...e._elementRefs),this._componentRefs.push(...e._componentRefs),this._components.push(...e._components),e._completedFailures!==void 0&&((this._completedFailures??=[]).push(...e._completedFailures),e._completedFailures=void 0),e._elementRefs.length=0,e._componentRefs.length=0,e._components.length=0,e._state="committed"}commit(e){this._assertOpen(),this._state="committing";let t;try{for(const{element:i,owner:o,reference:s}of this._elementRefs)o.disposed||(T.isTargetRef(s)?e.assignTargetRef(o,s,i):we.assignDOMElementRef(s,i));for(const{component:i,reference:o}of this._componentRefs)i.disposed||e.assignComponentRef(i,o);for(const{component:i,handleError:o}of this._components)if(!i.disposed)try{e.commitComponentMount(i)}catch(s){if(!o(s))throw s}this._state="committed"}catch(i){this._state="failed",t={error:i}}finally{this._elementRefs.length=0,this._componentRefs.length=0,this._components.length=0}const n=this._takeCompletion(t);if(n===void 0&&t!==void 0)throw t.error;return n}abort(e){const t=this.abortAndTakeCompleted(e);if(t===void 0)throw e;return t}abortAndTakeCompleted(e){return this._assertOpen(),this._state="failed",this._elementRefs.length=0,this._componentRefs.length=0,this._components.length=0,this._takeCompletion({error:e})}cancelAndTakeCompleted(){return this._assertOpen(),this._state="failed",this._elementRefs.length=0,this._componentRefs.length=0,this._components.length=0,this._takeCompletion()}_takeCompletion(e){const t=this._completedFailures;if(this._completedFailures=void 0,t===void 0)return;const n=t.length===1?t[0]:new AggregateError(t,"[RaphyDOM] Published branch cleanups failed.");return e===void 0?{prior:n}:{prior:n,interrupted:e}}_assertOpen(){if(!this.open)throw new Error("[RaphyDOM] Mount transaction is already closed.")}}function Jt(r,e,t,n){if(!r.open){n(t);return}const i=r.hold();let o=!0;try{n(()=>{if(!o){t();return}o=!1;try{t()}finally{i()}})}catch(s){throw i(),s}o&&e.own(i)}function Zt(r,e,t){const n=new Map(e.map(a=>[T.componentEventListenerName(a),a]));if(T.isNodeDynamicValue(r)){const a=t(()=>tr(tt(r.read()),n));return{bindings:[{source:a,replace:!0}],initial:a.peek()}}const i={},o={},s=[];for(const a of Reflect.ownKeys(r)){const c=Reflect.get(r,a);if(T.isNodeDynamicValue(c)){const l=c.read,d=t(()=>rr(a,l(),n));Xt(i,o,d.peek()),s.push({source:d,replace:!1})}else Pe(i,o,n,a,c)}return{bindings:s,initial:{listeners:o,props:i}}}function Qt(r,e){if(T.isNodeDynamicValue(r)){const i=e(()=>tt(r.read()));return{bindings:[{source:i,replace:!0}],initial:i.peek()}}const t={},n=[];for(const i of Reflect.ownKeys(r)){const o=Reflect.get(r,i);if(T.isNodeDynamicValue(o)){const s=o.read,a=()=>{const l=s();return pe(l),l},c=e(()=>er(i,a()));Se(t,c.peek()),n.push({source:c,replace:!1})}else pe(o),Reflect.set(t,i,o)}return{bindings:n,initial:t}}function Xt(r,e,t){Se(r,t.props),Se(e,t.listeners)}function Se(r,e){for(const t of Reflect.ownKeys(e))Reflect.set(r,t,Reflect.get(e,t))}function tt(r){if(r===null||typeof r!="object"||Array.isArray(r))throw new TypeError("[RaphyDOM] Grouped dynamic component props must return an object.");for(const e of Reflect.ownKeys(r)){if(T.isNodeDynamicValue(Reflect.get(r,e)))throw new TypeError("[RaphyDOM] Grouped dynamic component props cannot contain nested dynamic() values.");pe(Reflect.get(r,e))}return r}function er(r,e){const t={};return Reflect.set(t,r,e),t}function tr(r,e){const t={},n={};for(const i of Reflect.ownKeys(r))Pe(t,n,e,i,Reflect.get(r,i));return{listeners:n,props:t}}function rr(r,e,t){const n={},i={};return Pe(n,i,t,r,e),{listeners:i,props:n}}function Pe(r,e,t,n,i){if(pe(i),typeof n=="string"&&/^on[A-Z]/.test(n)){const o=t.get(n);if(o!==void 0){Reflect.set(e,o,i);return}const s=T.getComponentModelListenerMetadata(i);if(s!==null)throw new Error(`[RaphyDOM] model("${s.name}") requires component event "${s.eventName}".`)}Reflect.set(r,n,i)}function pe(r){if(mt.isDOMBinding(r))throw new TypeError("[RaphyDOM] bind() can only control a native DOM element.")}const nr=Object.freeze({}),ir=Object.freeze([]),x=process.env.NODE_ENV!=="production";function or(r){const e={kind:"property",value:r};return x?Object.freeze(e):e}function sr(r,e={}){const t={kind:"attribute",name:e.name,namespace:e.namespace,value:r};return x?Object.freeze(t):t}function rt(r,e={}){if(e.passive===!0&&e.prevent===!0)throw new TypeError("[RaphyDOM] Passive listener cannot use prevent modifier.");const t={...e},n={handler:r,kind:"listener",options:x?Object.freeze(t):t};return x?Object.freeze(n):n}function ar(r){if(typeof r!="object"||r===null)return!1;const e=Reflect.get(r,"kind");return e==="attribute"||e==="listener"||e==="property"}const nt=new Set(["innerHTML","outerHTML","textContent"]),cr=ur(nt);function lr(r,e,t,n,i,o,s=null){const a=je(r,e,s);if(a==="listener"){const l=s,d=n.resolveEventName(e);return n.createWriter(r,d,t,h=>o(i,h,`event:${d}`),l?.options)}if(a==="class")return yr(r);if(a==="style")return vr(r);if(a==="property")return mr(r,e);const c=s;return br(r,c?.name??e,c?.namespace)}function dr(r,e,t,n,i,o,s,a){const c=je(r,e,a);if(c==="listener"){const l=a;return i.registerStatic(r,i.resolveEventName(e),t,n,o,s,l?.options,l?.data),!0}return a!==null?!1:c==="class"?(hr(r,t),!0):c==="style"?(fr(r,t),!0):c==="property"?(pr(r,e,t),!0):(_r(r,e,t),!0)}function it(r){if(r[0]!=="o"||r[1]!=="n")return!1;const e=r.charCodeAt(2);return e>=65&&e<=90}function je(r,e,t){if((cr&1<<(e.length&31))!==0&&nt.has(e))throw new Error(`[RaphyDOM] Property "${e}" is not supported by node().`);const n=t?.kind;if(e==="class"||e==="style"){if(n!=="listener")return e}else if(it(e))return"listener";if(n==="listener")throw new TypeError("[RaphyDOM] listener() must be assigned to an on<Event> property.");return n==="property"?"property":n==="attribute"?"attribute":r.namespaceURI==="http://www.w3.org/1999/xhtml"&&!e.startsWith("aria-")&&!e.startsWith("data-")&&e in r?"property":"attribute"}function ur(r){let e=0;for(const t of r)e|=1<<(t.length&31);return e}function hr(r,e){const t=ze(e);t.length===0?r.removeAttribute("class"):r.setAttribute("class",t)}function fr(r,e){if(e==null){r.removeAttribute("style");return}if(typeof e=="string"){r.setAttribute("style",e);return}const t=lt(r);if(Array.isArray(e)){const n=ht(e);r.removeAttribute("style"),n.cssText.length!==0&&(t.cssText=n.cssText);for(const[i,o]of n.properties)_e(t,i,o);return}if(typeof e!="object")throw new TypeError("[RaphyDOM] style must be a string, object, or array.");for(const[n,i]of Object.entries(e))_e(t,n,i)}function pr(r,e,t){if(ot(r,e))return;if(t!=null){Ce(r,e,t);return}const n=Reflect.get(r,e),i=r.getAttribute(e);Ce(r,e,n),i===null?r.removeAttribute(e):r.setAttribute(e,i)}function _r(r,e,t,n){const i=at(e,t);if(i===void 0){ct(r,e,n);return}r.setAttribute(e,i)}function yr(r){const e=Symbol("unset");let t=r.hasAttribute("class")?e:"";const n=i=>{Object.is(t,i)||(i.length===0?r.removeAttribute("class"):r.setAttribute("class",i),t=i)};return{clear:()=>n(""),write(i){n(ze(i))}}}function vr(r){const e=lt(r);let t="empty",n=new Map,i;const o=()=>{t!=="empty"&&(r.removeAttribute("style"),t="empty",n=new Map,i=void 0)};return{clear:o,write(s){if(s==null){o();return}if(typeof s=="string"){if(t==="string"&&i===s)return;r.setAttribute("style",s),t="string",n=new Map,i=s;return}if(Array.isArray(s)){const l=ht(s);r.removeAttribute("style"),l.cssText.length!==0&&(e.cssText=l.cssText);for(const[d,h]of l.properties)_e(e,d,h);t="object",n=l.properties,i=void 0;return}if(typeof s!="object")throw new TypeError("[RaphyDOM] style must be a string, object, or array.");const a=s;if(t==="object"&&gr(n,a))return;t==="string"&&r.removeAttribute("style");const c=new Map;for(const l in a)Object.hasOwn(a,l)&&c.set(l,a[l]);for(const l of n.keys())c.has(l)||dt(e,l);for(const[l,d]of c)(t!=="object"||!Object.is(n.get(l),d))&&_e(e,l,d);t="object",n=c,i=void 0}}}function gr(r,e){let t=0;for(const n in e)if(Object.hasOwn(e,n)){if(!Object.is(r.get(n),e[n])||!r.has(n))return!1;t++}return t===r.size}function mr(r,e){const t=Reflect.get(r,e),n=r.getAttribute(e);let i=Symbol("unset"),o=!0;const s=ot(r,e),a=l=>{if(o&&(o=!1,s)){i=l;return}Object.is(i,l)||(Ce(r,e,l),i=l)},c=()=>{a(t),n===null?r.removeAttribute(e):r.setAttribute(e,n)};return{clear:c,write(l){if(l==null){c();return}a(l)}}}function ot(r,e){if(e!=="value"&&e!=="checked")return!1;const t=r.localName;if(e==="checked"&&t!=="input"||e==="value"&&t!=="input"&&t!=="textarea"&&t!=="select")return!1;const n=I(r.ownerDocument);if(n?.owns(r)!==!0)return!1;const i=r,o=e==="checked"?i.checked!==i.defaultChecked:t==="select"?wr(r):i.value!==i.defaultValue;return o&&n.preserveControl(r),o}function wr(r){const e=[...r.options],t=e.filter(i=>i.defaultSelected);if(r.multiple)return e.some(i=>i.selected!==i.defaultSelected);const n=t.at(-1)??e.find(i=>!i.disabled&&!(i.parentElement?.localName==="optgroup"&&i.parentElement.disabled));return r.selectedOptions[0]!==n}function br(r,e,t){const n=Symbol("unset");let i=n;const o=st(e),s=()=>{i!==n&&i!==void 0&&ct(r,e,t),i=void 0};return{clear:s,write(a){if(i!==n&&i!==void 0&&Object.is(i,a))return;const c=at(e,a,o);if(c===void 0){s();return}t===void 0?r.setAttribute(e,c):r.setAttributeNS(t,e,c),i=a}}}function Ce(r,e,t){if(!Reflect.set(r,e,t))throw new TypeError(`[RaphyDOM] DOM property "${e}" cannot be assigned.`)}function st(r){return r.startsWith("aria-")||r.startsWith("data-")}function at(r,e,t=st(r)){if(!(e==null||e===!1&&!t))return e===!0&&!t?"":String(e)}function ct(r,e,t){t===void 0?r.removeAttribute(e):r.removeAttributeNS(t,Or(e))}function lt(r){const e=Reflect.get(r,"style");if(typeof e!="object"||e===null)throw new TypeError("[RaphyDOM] This element does not support object style.");return e}function _e(r,e,t){if(t==null){dt(r,e);return}if(e.startsWith("--")||e.includes("-")){r.setProperty(e,String(t));return}if(!Reflect.set(r,e,t))throw new TypeError(`[RaphyDOM] Style property "${e}" cannot be assigned.`)}function dt(r,e){if(e.startsWith("--")||e.includes("-")){r.removeProperty(e);return}Reflect.set(r,e,"")}function ze(r){if(typeof r=="string")return r.trim();if(r==null||r===!1)return"";const e=[];return ut(e,r),e.join(" ")}function ut(r,e){if(!(e==null||e===!1)){if(typeof e=="string"){const t=e.trim();t.length!==0&&r.push(t);return}if(Array.isArray(e)){for(const t of e)ut(r,t);return}if(typeof e=="object"){for(const[t,n]of Object.entries(e))n&&r.push(t);return}throw new TypeError("[RaphyDOM] class must be a string, object, or array.")}}function ht(r){const e=[],t=new Map,n=i=>{if(!(i==null||i===!1)){if(typeof i=="string"){i.trim().length!==0&&e.push(i.trim());return}if(Array.isArray(i)){for(const o of i)n(o);return}if(typeof i=="object"){for(const[o,s]of Object.entries(i))t.set(o,s);return}throw new TypeError("[RaphyDOM] style array accepts only strings, objects, and nested arrays.")}};return n(r),{cssText:e.join(";"),properties:t}}function Or(r){const e=r.indexOf(":");return e===-1?r:r.slice(e+1)}function q(r,e){return r instanceof T.RaphEffectScope?r.fork(e):e}function Dr(r){const e=[];return ft(r,e),e.length===0?ir:x?Object.freeze(e):e}function ft(r,e){if(Mr(r)){for(const t of r)ft(t,e);return}r==null||typeof r=="boolean"||e.push(typeof r=="number"?String(r):r)}function Mr(r){return Array.isArray(r)}class V{first;last;_children;_parentRange=null;_removalCancellation=null;_removalHandler=null;_moveHandler=null;_removalPending=!1;_removalCleanups;constructor(e,t){this.first=e,this.last=t}static single(e){return new V(e,e)}static anchored(e,t){const n=I(e)?.range(t);if(n!==void 0)return new V(n.first,n.last);const i=e.createDocumentFragment(),o=e.createComment(`${t}:start`),s=e.createComment(`${t}:end`);return i.append(o,s),new V(o,s)}static moveNode(e,t,n){if(e.parentNode===null){t.insertBefore(e,n);return}const i=qe(e,e);t.insertBefore(e,n),Ge(i)}get parentNode(){return this.first.parentNode}plainNode(){return this.first===this.last&&this._removalHandler===null&&this._removalCleanups===void 0&&this._moveHandler===null&&this._children===void 0&&this._parentRange===null?this.first:null}adopt(e){if(e===this)throw new Error("[RaphyDOM] DOM range cannot adopt itself.");e._parentRange?._children?.delete(e),e._parentRange=this,this._children===void 0&&(this._children=new Set),this._children.add(e)}onRemoved(e){if(typeof e!="function")throw new TypeError("[RaphyDOM] DOM range removal cleanup must be a function.");(this._removalCleanups??=[]).push(e)}setRemovalHandler(e,t){if(this._removalHandler!==null)throw new Error("[RaphyDOM] DOM range removal handler is already configured.");this._removalHandler=e,this._removalCancellation=t??null}setMoveHandler(e){this._moveHandler=e}notifyMove(){this._moveHandler?.()}moveBefore(e,t){if(I(this.first.ownerDocument)!==void 0&&this.first.parentNode===e)return;if(this.first===this.last&&this.first.parentNode===null){e.insertBefore(this.first,t);return}const n=qe(this.first,this.last),i=this.first.ownerDocument.createDocumentFragment();let o=this.first;for(;o!==null;){const s=o.nextSibling;if(i.append(o),o===this.last){e.insertBefore(i,t),Ge(n);return}o=s}throw new Error("[RaphyDOM] Cannot move a disconnected partial DOM range.")}clear(){if(this.first===this.last)return;let e=this.first.nextSibling;for(;e!==null&&e!==this.last;){const t=e.nextSibling;e.remove(),e=t}}canClearParent(){const e=this.first,t=this.last,n=e.parentNode;if(e===t||n===null||n!==t.parentNode||this._removalHandler!==null||this._removalPending||this._children!==void 0&&this._children.size!==0)return!1;const i=n.nodeType;return(i===1||i===11)&&e.previousSibling===null&&t.nextSibling===null&&this._closestRemovalBoundary()===null}clearParent(){const e=this.first;e.parentNode.replaceChildren(e,this.last)}remove(e=!1){if(!e){const a=this._closestRemovalBoundary();if(a!==null){a.remove();return}}if(!e&&this._removalHandler!==null){if(this._removalPending)return;this._removalPending=!0,this._removalHandler(()=>{this._removalCancellation=null,this._removalHandler=null,this._removalPending=!1,this.remove(!0)});return}if(e&&this._removalPending){const a=this._removalCancellation;this._removalCancellation=null,this._removalHandler=null,this._removalPending=!1,a?.()}const t=this._parentRange,n=[],i=this._children;if(i!==void 0){const a=this.parentNode;for(const c of i)c._requiresExplicitRemoval(a)?(c.remove(e),!e&&c._removalPending&&(t===null?n.push(c):t.adopt(c))):(c._completeImplicitRemoval(),c._parentRange=null);i.clear()}this._children=void 0;for(const a of n)this._children===void 0&&(this._children=new Set),this._children.add(a);if(t?._children?.delete(this),this._parentRange=null,this.first===this.last){this.first.remove(),this._completeRemoval();return}if(this.first.parentNode===null){this.first.remove(),this.last.remove(),this._completeRemoval();return}let s=this.first;for(;s!==null;){const a=s.nextSibling;if(s.remove(),s===this.last){this._completeRemoval();return}s=a}this.last.remove(),this._completeRemoval()}_completeImplicitRemoval(){for(const e of this._children??[])e._completeImplicitRemoval(),e._parentRange=null;this._children?.clear(),this._children=void 0,this._completeRemoval()}_completeRemoval(){const e=this._removalCleanups;if(this._removalCleanups=void 0,e===void 0)return;let t;for(const n of e.reverse())try{n()}catch(i){(t??=[]).push(i)}if(t?.length===1)throw t[0];if(t!==void 0)throw new AggregateError(t,"[RaphyDOM] DOM range removal cleanup failed.")}removeNode(e,t){const n=this._removalHandler!==null||this._removalPending?this:this._closestRemovalBoundary();if(n===null){e.remove(),t?.();return}const i=V.single(e);t!==void 0&&i.onRemoved(t),this.adopt(i),n.remove()}_closestRemovalBoundary(){let e=this._parentRange;for(;e!==null;){if(e._removalHandler!==null||e._removalPending)return e;e=e._parentRange}return null}_requiresExplicitRemoval(e){if(this._removalHandler!==null||this._removalPending||this.parentNode!==e)return!0;for(const t of this._children??[])if(t._requiresExplicitRemoval(this.parentNode))return!0;return!1}}function qe(r,e){const t=r.ownerDocument,n=t?.activeElement;return t===null||n===null||n===void 0||n===t.body||n===t.documentElement||!Rr(r,e,n)?null:pt(n)?{element:n,selectionDirection:n.selectionDirection??void 0,selectionEnd:n.selectionEnd??void 0,selectionStart:n.selectionStart??void 0}:{element:n}}function Ge(r){if(r===null||!r.element.isConnected)return;const e=Reflect.get(r.element,"focus");typeof e=="function"&&e.call(r.element,{preventScroll:!0}),pt(r.element)&&r.selectionStart!==void 0&&r.selectionEnd!==void 0&&r.element.setSelectionRange(r.selectionStart,r.selectionEnd,r.selectionDirection)}function Rr(r,e,t){let n=r;for(;n!==null;){if(n===t||n.nodeType===1&&n.contains(t))return!0;if(n===e)return!1;n=n.nextSibling}return!1}function pt(r){return typeof Reflect.get(r,"setSelectionRange")=="function"}function Er(r){const{MountContext:e,mountChildren:t,runTemplateOperation:n,runMountTransaction:i,rethrowUnhandledDOMOperationError:o,ownDOMOutput:s,clearDOMBranchForTransaction:a,selectDOMBranch:c,clearDOMBranch:l,commitOrAbsorbTransaction:d,scheduleUnhandledAsyncError:h,captureDOMError:_,removeDOMOutputWithOutcome:w}=r;function E(k,u){const p=V.anchored(u.env.document,"raphy:async-boundary"),S=I(u.env.document);if(S?.streaming===!0&&S.nextLabel()==="raphy:async-boundary:pending"){S.skip(p.first);const N=new AbortController,L=()=>N.abort(),X=u.ownerNode.own(L);p.onRemoved(L);const Y=(async()=>{try{if(await S.waitStream(p.first,p.last,N.signal),N.signal.aborted||u.ownerNode.disposed)return;const b=S.rescan(p.first,p.last);b.run(()=>i(u,"hydrate-stream-boundary",C=>{D(k,new e(u.env,u.effectScope,u.ownerNode,C),p)})),b.remaining(),await b.ready()}catch(b){N.signal.aborted||o(u,b,"hydrate-stream-boundary",!0)}finally{N.signal.aborted||S.finishStream(p.first),X()}})();return S.trackStream(Y),p}return D(k,u,p)}function D(k,u,p){const S=I(u.env.document),N=S?.nextLabel()==="raphy:async-boundary:rejected"?S.defer(p.first):void 0;let L=N,X,Y;if(N!==void 0&&S.track(new Promise((R,M)=>{X=R,Y=M})),S!==void 0&&N===void 0){const R=n(u.env.targetRuntime,u.env.styleScopeId,k.content),M=t(R,u,"raphy:async-boundary:content");return p.adopt(M),M.moveBefore(p.parentNode,p.last),p}const b=new T.BranchBlock(u.ownerNode),C=new T.BranchBlock(u.ownerNode),_t=q(u.effectScope,b.node),Be=q(u.effectScope,C.node);s(u.ownerNode,p,u);let B=0,He,A=null;b.node._ownCompletedCleanup(()=>{const R=A;if(A=null,R===null||!R.open)return;const M=R.cancelAndTakeCompleted();return M===void 0?void 0:{error:M.prior,hasUnrouted:!1,completed:{error:M.prior}}});const ve=()=>{const R=++B;let M=null,O=new ke;const Ie=A;if(A=O,Ie?.open){const f=Ie.cancelAndTakeCompleted();f!==void 0&&O.deferCompletedFailure(f.prior)}const yt=u.env.document.createDocumentFragment();let $=!1,ge=null,me=!1,U=0,ee=!1;a(b,u,O,"async-boundary-content"),a(C,u,O,"async-boundary-content");const vt=f=>{if(k.rejected===void 0||R!==B)return;$=!0;const y=()=>i(u,"async-boundary-content",v=>{a(b,u,v,"async-boundary-content"),a(C,u,v,"async-boundary-content"),c(C,u,v,"async-boundary-rejected","rejected",f.report,g=>{const P=q(Be,g.node),z=t(n(u.env.targetRuntime,u.env.styleScopeId,()=>k.rejected({error:f.report.error,report:f.report,retry:He})),new e(u.env,P,g.node,v),"raphy:async-boundary:rejected");g.node.disposed||(s(g.node,z,u),p.adopt(z),z.moveBefore(p.parentNode,p.last))})});if(L===void 0)y();else{const v=L;L=void 0;try{v.run(y),v.remaining(),v.ready().then(X,Y)}catch(g){throw Y(g),g}}},Le=(f,y,v,g)=>{const P=ce(f,y,v,g),z=u.env.host.captureError(P.component,P.owner,P.cause,P.source,{caught:!0});if(z.handled){ge=z;try{vt(z)}catch(K){if(K instanceof j)return K.captured;if(K instanceof m)return Object.freeze({handled:!1,report:Object.freeze({...z.report,error:K.error})});const re=ce(P.component,C.node,K,{layer:"renderer",operation:"async-boundary-rejected"});return u.env.host.captureError(re.component,re.owner,re.cause,re.source)}}return z},te=f=>{if(f instanceof j){if(b.disposed||u.ownerNode.disposed)throw f;return}if(f instanceof m)throw f;if(b.disposed)return;const y=ce(u.env.ownerComponent,b.node,f,{layer:"renderer",operation:"async-boundary-content"}),v=k.rejected===void 0?u.env.host.captureError(y.component,y.owner,y.cause,y.source):Le(y.component,y.owner,y.cause,y.source);if(!v.handled)throw v.report.error},Ve=()=>{if($||R!==B||u.ownerNode.disposed||b.disposed||C.disposed||!me||U!==0||M===null)return;const f=O??new ke;let y;try{try{l(C,u,"async-boundary-content")}catch(v){if(!(v instanceof m))throw v;f.deferCompletedFailure(v.error)}p.adopt(M),M.moveBefore(p.parentNode,p.last),y=d(f,u),O=null,A===f&&(A=null),ee=!0}catch(v){const g=f.open?f.abortAndTakeCompleted(v):void 0;throw O=null,A===f&&(A=null),g!==void 0&&J(g,te),v}y!==void 0&&J(y,v=>o(u,v,"async-boundary-content",!0))},We=()=>{L===void 0&&($||R!==B||u.ownerNode.disposed||b.disposed||C.disposed||p.parentNode===null||(ee&&M!==null&&(M.moveBefore(yt,null),ee=!1),i(u,"async-boundary-content",f=>{c(C,u,f,"async-boundary-content","pending",U,y=>{const v=q(Be,y.node),g=t(n(u.env.targetRuntime,u.env.styleScopeId,k.pending),new e(u.env,v,y.node,f),"raphy:async-boundary:pending");y.node.disposed||(s(y.node,g,u),p.adopt(g),g.moveBefore(p.parentNode,p.last))})})))},gt={register(f){if($||R!==B)return;const y=me&&U===0&ⅇU++,y&&We();const v=f().catch(g=>{if(!(g instanceof j)){if(g instanceof m)throw g.error;if(!$&&R===B){const P=_(g,u,{layer:"renderer",operation:"async-boundary-dependency"});if(!P.handled)throw P.report.error}}}).finally(()=>{R!==B||u.ownerNode.disposed||b.disposed||C.disposed||(U--,Ee(Ve))});u.env.host.trackRenderWork(b.node,v),v.catch(h)}};try{if(c(b,u,O,"async-boundary-content","content",void 0,f=>{const y=q(_t,f.node);k.rejected!==void 0&&u.env.host.registerErrorBoundary(f.node,Le),M=t(n(u.env.targetRuntime,u.env.styleScopeId,k.content),new e({...u.env,asyncBoundary:gt},y,f.node,O),"raphy:async-boundary:content"),!f.node.disposed&&f.node._ownCompletedCleanup(()=>{if(M!==null)return w(M,u.env.host,u.env.ownerComponent)})}),$){R===B&&a(b,u,O,"async-boundary-content");const f=O?.open&&ge!==null?O.abortAndTakeCompleted(new j(ge)):void 0;A===O&&(A=null),O=null,f!==void 0&&J(f,te);return}if(me=!0,U===0){Ve();return}We()}catch(f){const y=O?.open?O.abortAndTakeCompleted(f):void 0;if(A===O&&(A=null),O=null,y!==void 0){J(y,te);return}te(f)}};return He=()=>Ee(ve),N===void 0?ve():S.suspend(ve),p}return E}const le=Symbol("raphy:dom:operations");function kr(r,e){if(typeof r!="object"||r===null||!("template"in r||"views"in r))throw new TypeError("[RaphyDOM] Declare operations on a resolved component with a template or named views, inside its async loader.");const t=Object.getOwnPropertyDescriptors(r);Reflect.deleteProperty(t,le);const n=Object.create(Object.getPrototypeOf(r),t);return Object.defineProperty(n,le,{value:Object.freeze([...r[le]??[],...e]),enumerable:!1,writable:!1,configurable:!1}),Object.freeze(n)}class Sr{_operation;_binding;_materializer;_advanced;_advancedMaterializer;_boundaries;_boundaryMaterializer;_async;_disposed=!1;constructor(e){this._install(e)}_install(e){for(const t of e)if(t.kind==="binding"){if(this._binding!==void 0&&this._binding!==t)throw new Error("[RaphyDOM] Conflicting binding materializers in one renderer.");this._binding=t}else if(t.kind==="advanced"){if(this._advanced!==void 0&&this._advanced!==t)throw new Error("[RaphyDOM] Conflicting advanced materializers in one renderer.");this._advanced=t}else if(t.kind==="boundaries"){if(this._boundaries!==void 0&&this._boundaries!==t)throw new Error("[RaphyDOM] Conflicting boundary materializers in one renderer.");this._boundaries=t}else if(t.kind==="each"){if(this._operation!==void 0&&this._operation!==t)throw new Error("[RaphyDOM] Conflicting each materializers in one renderer.");this._operation=t}else throw new TypeError("[RaphyDOM] Unknown operation.")}prepare(e){if(this._disposed)throw new Error("[RaphyDOM] Operation table is disposed.");const t=e[le];t!==void 0&&this._install(t)}mountEach(e,t,n){if(this._disposed)throw new Error("[RaphyDOM] Operation table is disposed.");if(this._operation===void 0)throw new Error("[RaphyDOM] each requires DOM operation metadata or the Full profile.");return this._materializer??=this._operation.create(n),this._materializer(e,t)}binding(){if(this._disposed)throw new Error("[RaphyDOM] Operation table is disposed.");if(this._binding===void 0)throw new Error("[RaphyDOM] bind requires DOM operation metadata or the Full profile.");return this._binding.mount}advanced(e){if(this._disposed)throw new Error("[RaphyDOM] Operation table is disposed.");if(this._advanced===void 0)throw new Error("[RaphyDOM] Advanced structural node requires DOM operation metadata or the Full profile.");return this._advancedMaterializer??=this._advanced.create(e),this._advancedMaterializer}boundaries(e,t){if(this._disposed)throw new Error("[RaphyDOM] Operation table is disposed.");if(this._boundaries===void 0)throw new Error(`[RaphyDOM] ${t} requires DOM operation metadata or the Full profile.`);return this._boundaryMaterializer??=this._boundaries.create(e),this._boundaryMaterializer}asyncBoundary(e){if(this._disposed)throw new Error("[RaphyDOM] Operation table is disposed.");return this._async??=Er(e),this._async}dispose(){this._disposed=!0,this._async=void 0,this._boundaries=void 0,this._boundaryMaterializer=void 0,this._operation=void 0,this._binding=void 0,this._materializer=void 0,this._advanced=void 0,this._advancedMaterializer=void 0}}function Cr(r,e,t){const n=rt(r,e);if(typeof r!="function")return n;const i={handler:n.handler,kind:n.kind,options:n.options,data:t===void 0?Z:t};return x?Object.freeze(i):i}exports.DEV=x;exports.DOMEventHub=Ot;exports.DOMHandledInvocationAbort=j;exports.DOMInvocationFailure=m;exports.DOMMountTransaction=ke;exports.DOMOperationError=ae;exports.DOMOperationTable=Sr;exports.DOMPendingBoundaryCapture=et;exports.DOMRange=V;exports.DOM_EVENT_UNDEFINED_DATA=Z;exports.DOM_ROW_ROUTER_HANDLER=wt;exports.DOM_RUNTIME_PROFILE=xt;exports.DOM_SYNC_BINDING_OPTIONS=Vt;exports.DOM_WRITE_PHASE=F;exports.EMPTY_DOM_ELEMENT_PROPS=nr;exports.HYDRATION_EVENTS=Pt;exports.HydrationSession=Te;exports.activeHydration=I;exports.appendAdopted=Lt;exports.attribute=sr;exports.captureHydrationEvent=zt;exports.completeDOMDisposal=$t;exports.completeDOMMount=J;exports.createDOMDataEventInput=Cr;exports.createDOMValueWriter=lr;exports.domRuntimeProfile=Xe;exports.forkDOMEffectScope=q;exports.hydrationText=It;exports.invokeDOMInitializer=Kt;exports.isDOMEventPropName=it;exports.isDOMValueDescriptor=ar;exports.isHydrationComposing=Ze;exports.listener=rt;exports.materializeComponentInputs=Zt;exports.materializeComponentProps=Qt;exports.normalizeChildren=Dr;exports.normalizeDOMClass=ze;exports.normalizeDOMOperationError=ce;exports.property=or;exports.registerDOMBinding=qt;exports.registerDOMEffect=Ut;exports.registerDOMWatch=Gt;exports.registerHeldBlock=Jt;exports.releaseHydrationEvent=Qe;exports.replayHydrationEvent=Bt;exports.resolveDOMValueChannel=je;exports.runDOMPhaseCallback=Ee;exports.startDOMGroupSlot=Yt;exports.suppressHydrationEvent=Ht;exports.withDOMOperations=kr;exports.writeStaticDOMValue=dr;
|