@lytjs/core 5.0.0 → 5.0.1

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.
@@ -1 +1 @@
1
- "use strict";var e=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var h=(E,T)=>{for(var O in T)e(E,O,{get:T[O],enumerable:!0})},G=(E,T,O,i)=>{if(T&&typeof T=="object"||typeof T=="function")for(let N of g(T))!m.call(E,N)&&N!==O&&e(E,N,{get:()=>T[N],enumerable:!(i=u(T,N))||i.enumerable});return E};var v=E=>G(e({},"__esModule",{value:!0}),E);var x={};h(x,{ErrorBoundary:()=>A,ErrorCategory:()=>n.ErrorCategory,LytError:()=>R.LytError,LytErrorCodes:()=>D,callWithErrorHandling:()=>f,callWithErrorHandlingAsync:()=>F,createCompilerError:()=>I.createCompilerError,createComponentError:()=>I.createComponentError,createMessage:()=>U,createRendererError:()=>I.createRendererError,getCategory:()=>n.getCategory,getDevMode:()=>V,getErrorMessage:()=>n.getErrorMessage,handleError:()=>L,resetWarnedMessages:()=>p,setDevMode:()=>l,warn:()=>S,warnOnce:()=>t,warnOnceUtil:()=>t,warnUtil:()=>S});module.exports=v(x);var R=require("@lytjs/common");var D=(_=>(_[_.INVALID_ARGUMENT=1001]="INVALID_ARGUMENT",_[_.NOT_FOUND=1002]="NOT_FOUND",_[_.ALREADY_EXISTS=1003]="ALREADY_EXISTS",_[_.OPERATION_FAILED=1004]="OPERATION_FAILED",_[_.REACTIVE_READONLY=2001]="REACTIVE_READONLY",_[_.REACTIVE_EFFECT_DISPOSED=2002]="REACTIVE_EFFECT_DISPOSED",_[_.COMPUTED_CYCLE=2003]="COMPUTED_CYCLE",_[_.PARSE_ERROR=3001]="PARSE_ERROR",_[_.INVALID_EXPRESSION=3002]="INVALID_EXPRESSION",_[_.INVALID_DIRECTIVE=3003]="INVALID_DIRECTIVE",_[_.INVALID_TEMPLATE=3004]="INVALID_TEMPLATE",_[_.RENDER_ERROR=4001]="RENDER_ERROR",_[_.HYDRATION_MISMATCH=4002]="HYDRATION_MISMATCH",_[_.INVALID_VNODE=4003]="INVALID_VNODE",_[_.COMPONENT_INVALID_PROPS=5001]="COMPONENT_INVALID_PROPS",_[_.COMPONENT_MISSING_TEMPLATE=5002]="COMPONENT_MISSING_TEMPLATE",_[_.COMPONENT_LIFECYCLE_ERROR=5003]="COMPONENT_LIFECYCLE_ERROR",_[_.ROUTE_NOT_FOUND=6001]="ROUTE_NOT_FOUND",_[_.ROUTE_DUPLICATE=6002]="ROUTE_DUPLICATE",_[_.NAVIGATION_ABORTED=6003]="NAVIGATION_ABORTED",_[_.NAVIGATION_FAILED=6004]="NAVIGATION_FAILED",_[_.STORE_NOT_FOUND=7001]="STORE_NOT_FOUND",_[_.STORE_DUPLICATE=7002]="STORE_DUPLICATE",_[_.LYT_COMPILER_PARSE_ERROR=R.LytErrorCodes.LYT_COMPILER_PARSE_ERROR]="LYT_COMPILER_PARSE_ERROR",_[_.LYT_COMPILER_INVALID_EXPRESSION=R.LytErrorCodes.LYT_COMPILER_INVALID_EXPRESSION]="LYT_COMPILER_INVALID_EXPRESSION",_[_.LYT_COMPILER_INVALID_TEMPLATE=R.LytErrorCodes.LYT_COMPILER_INVALID_TEMPLATE]="LYT_COMPILER_INVALID_TEMPLATE",_[_.LYT_COMPILER_INVALID_DIRECTIVE=R.LytErrorCodes.LYT_COMPILER_INVALID_DIRECTIVE]="LYT_COMPILER_INVALID_DIRECTIVE",_[_.LYT_COMPILER_CODEGEN_ERROR=R.LytErrorCodes.LYT_COMPILER_CODEGEN_ERROR]="LYT_COMPILER_CODEGEN_ERROR",_[_.LYT_COMPILER_SFC_PARSE_ERROR=R.LytErrorCodes.LYT_COMPILER_SFC_PARSE_ERROR]="LYT_COMPILER_SFC_PARSE_ERROR",_[_.LYT_COMPILER_TRANSFORM_ERROR=R.LytErrorCodes.LYT_COMPILER_TRANSFORM_ERROR]="LYT_COMPILER_TRANSFORM_ERROR",_[_.LYT_RENDERER_MOUNT_FAILED=R.LytErrorCodes.LYT_RENDERER_MOUNT_FAILED]="LYT_RENDERER_MOUNT_FAILED",_[_.LYT_RENDERER_PATCH_FAILED=R.LytErrorCodes.LYT_RENDERER_PATCH_FAILED]="LYT_RENDERER_PATCH_FAILED",_[_.LYT_RENDERER_HYDRATION_MISMATCH=R.LytErrorCodes.LYT_RENDERER_HYDRATION_MISMATCH]="LYT_RENDERER_HYDRATION_MISMATCH",_[_.LYT_RENDERER_INVALID_VNODE=R.LytErrorCodes.LYT_RENDERER_INVALID_VNODE]="LYT_RENDERER_INVALID_VNODE",_[_.LYT_RENDERER_UNMOUNT_FAILED=R.LytErrorCodes.LYT_RENDERER_UNMOUNT_FAILED]="LYT_RENDERER_UNMOUNT_FAILED",_[_.LYT_COMPONENT_INVALID_PROPS=R.LytErrorCodes.LYT_COMPONENT_INVALID_PROPS]="LYT_COMPONENT_INVALID_PROPS",_[_.LYT_COMPONENT_MISSING_RENDER=R.LytErrorCodes.LYT_COMPONENT_MISSING_RENDER]="LYT_COMPONENT_MISSING_RENDER",_[_.LYT_COMPONENT_LIFECYCLE_ERROR=R.LytErrorCodes.LYT_COMPONENT_LIFECYCLE_ERROR]="LYT_COMPONENT_LIFECYCLE_ERROR",_[_.LYT_COMPONENT_INVALID=R.LytErrorCodes.LYT_COMPONENT_INVALID]="LYT_COMPONENT_INVALID",_[_.LYT_COMPONENT_EMIT_INVALID=R.LytErrorCodes.LYT_COMPONENT_EMIT_INVALID]="LYT_COMPONENT_EMIT_INVALID",_[_.LYT_COMPONENT_RENDER_ERROR=R.LytErrorCodes.LYT_COMPONENT_RENDER_ERROR]="LYT_COMPONENT_RENDER_ERROR",_[_.LYT_ROUTER_INVALID_ROUTE=R.LytErrorCodes.LYT_ROUTER_INVALID_ROUTE]="LYT_ROUTER_INVALID_ROUTE",_[_.LYT_ROUTER_NAVIGATION_FAILED=R.LytErrorCodes.LYT_ROUTER_NAVIGATION_FAILED]="LYT_ROUTER_NAVIGATION_FAILED",_[_.LYT_ROUTER_DUPLICATE_ROUTE=R.LytErrorCodes.LYT_ROUTER_DUPLICATE_ROUTE]="LYT_ROUTER_DUPLICATE_ROUTE",_[_.LYT_ROUTER_NAVIGATION_ABORTED=R.LytErrorCodes.LYT_ROUTER_NAVIGATION_ABORTED]="LYT_ROUTER_NAVIGATION_ABORTED",_[_.LYT_ROUTER_GUARD_ERROR=R.LytErrorCodes.LYT_ROUTER_GUARD_ERROR]="LYT_ROUTER_GUARD_ERROR",_[_.LYT_STORE_ALREADY_EXISTS=R.LytErrorCodes.LYT_STORE_ALREADY_EXISTS]="LYT_STORE_ALREADY_EXISTS",_[_.LYT_STORE_NOT_FOUND=R.LytErrorCodes.LYT_STORE_NOT_FOUND]="LYT_STORE_NOT_FOUND",_[_.LYT_STORE_DISPOSED=R.LytErrorCodes.LYT_STORE_DISPOSED]="LYT_STORE_DISPOSED",_[_.LYT_STORE_PATCH_ERROR=R.LytErrorCodes.LYT_STORE_PATCH_ERROR]="LYT_STORE_PATCH_ERROR",_[_.LYT_REACTIVITY_READONLY_SET=R.LytErrorCodes.LYT_REACTIVITY_READONLY_SET]="LYT_REACTIVITY_READONLY_SET",_[_.LYT_REACTIVITY_READONLY_DELETE=R.LytErrorCodes.LYT_REACTIVITY_READONLY_DELETE]="LYT_REACTIVITY_READONLY_DELETE",_[_.LYT_REACTIVITY_EFFECT_ERROR=R.LytErrorCodes.LYT_REACTIVITY_EFFECT_ERROR]="LYT_REACTIVITY_EFFECT_ERROR",_[_.LYT_REACTIVITY_COMPUTED_CYCLE=R.LytErrorCodes.LYT_REACTIVITY_COMPUTED_CYCLE]="LYT_REACTIVITY_COMPUTED_CYCLE",_[_.LYT_REACTIVITY_EFFECT_DISPOSED=R.LytErrorCodes.LYT_REACTIVITY_EFFECT_DISPOSED]="LYT_REACTIVITY_EFFECT_DISPOSED",_[_.LYT_REACTIVITY_CIRCULAR_DEPENDENCY=R.LytErrorCodes.LYT_REACTIVITY_CIRCULAR_DEPENDENCY]="LYT_REACTIVITY_CIRCULAR_DEPENDENCY",_[_.LYT_REACTIVITY_SIGNAL_DISPOSED=R.LytErrorCodes.LYT_REACTIVITY_SIGNAL_DISPOSED]="LYT_REACTIVITY_SIGNAL_DISPOSED",_[_.LYT_CORE_PLUGIN_ERROR=R.LytErrorCodes.LYT_CORE_PLUGIN_ERROR]="LYT_CORE_PLUGIN_ERROR",_[_.LYT_CORE_MOUNT_NO_CONTAINER=R.LytErrorCodes.LYT_CORE_MOUNT_NO_CONTAINER]="LYT_CORE_MOUNT_NO_CONTAINER",_[_.LYT_CORE_ALREADY_MOUNTED=R.LytErrorCodes.LYT_CORE_ALREADY_MOUNTED]="LYT_CORE_ALREADY_MOUNTED",_[_.LYT_CORE_INVALID_ARGUMENT=R.LytErrorCodes.LYT_CORE_INVALID_ARGUMENT]="LYT_CORE_INVALID_ARGUMENT",_[_.LYT_CORE_NOT_FOUND=R.LytErrorCodes.LYT_CORE_NOT_FOUND]="LYT_CORE_NOT_FOUND",_[_.LYT_CORE_ALREADY_EXISTS=R.LytErrorCodes.LYT_CORE_ALREADY_EXISTS]="LYT_CORE_ALREADY_EXISTS",_[_.LYT_CORE_OPERATION_FAILED=R.LytErrorCodes.LYT_CORE_OPERATION_FAILED]="LYT_CORE_OPERATION_FAILED",_[_.LYT_CLI_SCAFFOLD_FAILED=R.LytErrorCodes.LYT_CLI_SCAFFOLD_FAILED]="LYT_CLI_SCAFFOLD_FAILED",_[_.LYT_CLI_BUILD_FAILED=R.LytErrorCodes.LYT_CLI_BUILD_FAILED]="LYT_CLI_BUILD_FAILED",_[_.LYT_CLI_DEV_SERVER_ERROR=R.LytErrorCodes.LYT_CLI_DEV_SERVER_ERROR]="LYT_CLI_DEV_SERVER_ERROR",_[_.LYT_CLI_CONFIG_INVALID=R.LytErrorCodes.LYT_CLI_CONFIG_INVALID]="LYT_CLI_CONFIG_INVALID",_[_.LYT_CLI_HMR_CONNECTION_FAILED=R.LytErrorCodes.LYT_CLI_HMR_CONNECTION_FAILED]="LYT_CLI_HMR_CONNECTION_FAILED",_[_.LYT_DEVTOOLS_CONNECTION_FAILED=R.LytErrorCodes.LYT_DEVTOOLS_CONNECTION_FAILED]="LYT_DEVTOOLS_CONNECTION_FAILED",_[_.LYT_DEVTOOLS_PANEL_ERROR=R.LytErrorCodes.LYT_DEVTOOLS_PANEL_ERROR]="LYT_DEVTOOLS_PANEL_ERROR",_[_.LYT_DEVTOOLS_PERF_OVERFLOW=R.LytErrorCodes.LYT_DEVTOOLS_PERF_OVERFLOW]="LYT_DEVTOOLS_PERF_OVERFLOW",_[_.LYT_DEVTOOLS_COMPONENT_TREE_ERROR=R.LytErrorCodes.LYT_DEVTOOLS_COMPONENT_TREE_ERROR]="LYT_DEVTOOLS_COMPONENT_TREE_ERROR",_[_.LYT_PLUGIN_INSTALL_FAILED=R.LytErrorCodes.LYT_PLUGIN_INSTALL_FAILED]="LYT_PLUGIN_INSTALL_FAILED",_[_.LYT_PLUGIN_ALREADY_INSTALLED=R.LytErrorCodes.LYT_PLUGIN_ALREADY_INSTALLED]="LYT_PLUGIN_ALREADY_INSTALLED",_[_.LYT_PLUGIN_INVALID=R.LytErrorCodes.LYT_PLUGIN_INVALID]="LYT_PLUGIN_INVALID",_[_.LYT_PLUGIN_UNINSTALL_FAILED=R.LytErrorCodes.LYT_PLUGIN_UNINSTALL_FAILED]="LYT_PLUGIN_UNINSTALL_FAILED",_[_.LYT_RENDERER_VAPOR_ERROR=R.LytErrorCodes.LYT_RENDERER_VAPOR_ERROR]="LYT_RENDERER_VAPOR_ERROR",_[_.LYT_RENDERER_VAPOR_COMPILER_ERROR=R.LytErrorCodes.LYT_RENDERER_VAPOR_COMPILER_ERROR]="LYT_RENDERER_VAPOR_COMPILER_ERROR",_[_.LYT_RENDERER_VAPOR_COMPONENT_ERROR=R.LytErrorCodes.LYT_RENDERER_VAPOR_COMPONENT_ERROR]="LYT_RENDERER_VAPOR_COMPONENT_ERROR",_[_.LYT_SSR_STREAM_ERROR=R.LytErrorCodes.LYT_SSR_STREAM_ERROR]="LYT_SSR_STREAM_ERROR",_[_.LYT_SSR_SUSPENSE_TIMEOUT=R.LytErrorCodes.LYT_SSR_SUSPENSE_TIMEOUT]="LYT_SSR_SUSPENSE_TIMEOUT",_[_.LYT_SSR_HYDRATION_ERROR=R.LytErrorCodes.LYT_SSR_HYDRATION_ERROR]="LYT_SSR_HYDRATION_ERROR",_[_.LYT_SSR_ISLAND_ERROR=R.LytErrorCodes.LYT_SSR_ISLAND_ERROR]="LYT_SSR_ISLAND_ERROR",_))(D||{});var a=class a{constructor(T){this.errors=[],this.options=T||{},this._hasError=!1}get hasError(){return this._hasError}static setGlobalHandler(T){a.globalHandler=T}capture(T,O,i){var c;let N={error:T,vm:O,info:i||"",timestamp:Date.now()};this.errors.push(N),this._hasError=!0;let M=(c=this.options.maxErrors)!=null?c:100;this.errors.length>M&&this.errors.splice(0,this.errors.length-M),!(this.options.onErrorCaptured&&this.options.onErrorCaptured(T instanceof R.LytError?T:new R.LytError(D.LYT_CORE_OPERATION_FAILED,T.message),O,N.info)===!0)&&this.options.onError&&this.options.onError(T instanceof R.LytError?T:new R.LytError(D.LYT_CORE_OPERATION_FAILED,T.message),O)}getFallback(T){if(!this.options.fallback||this.errors.length===0)return null;let O=this.errors[this.errors.length-1];return this.options.fallback(O.error,O.vm,O.info)}getErrors(){return this.errors.slice()}getErrorCount(){return this.errors.length}getLastErrors(){return this.errors.length===0?null:{...this.errors[this.errors.length-1]}}clear(){this.errors=[],this._hasError=!1}};a.globalHandler=null;var A=a,Y=!0,P=new Set;function l(E){Y=E}function V(){return Y}function S(E){if(!Y)return;let T=console.warn;typeof T=="function"&&T(`[Lyt warn] ${E}`)}function t(E){if(!Y||P.has(E))return;P.add(E);let T=console.warn;typeof T=="function"&&T(`[Lyt warn] ${E}`)}function p(){P.clear()}function U(E,...T){let O=(0,R.getErrorMessage)(E);return`[Lyt ${E}] ${O}`}function L(E,T,O){A.globalHandler&&A.globalHandler(E,T,O||""),Y?E instanceof R.LytError&&E.details:typeof reportError=="function"&&reportError(E)}function f(E,T){try{return E()}catch(O){L(O instanceof Error?O:new Error(String(O)),T);return}}async function F(E,T){try{return await E()}catch(O){L(O instanceof Error?O:new Error(String(O)),T);return}}var n=require("@lytjs/common");var I=require("@lytjs/common");
1
+ "use strict";var e=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var h=(E,T)=>{for(var O in T)e(E,O,{get:T[O],enumerable:!0})},G=(E,T,O,a)=>{if(T&&typeof T=="object"||typeof T=="function")for(let N of g(T))!m.call(E,N)&&N!==O&&e(E,N,{get:()=>T[N],enumerable:!(a=u(T,N))||a.enumerable});return E};var v=E=>G(e({},"__esModule",{value:!0}),E);var x={};h(x,{ErrorBoundary:()=>A,ErrorCategory:()=>n.ErrorCategory,LytError:()=>R.LytError,LytErrorCodes:()=>D,callWithErrorHandling:()=>f,callWithErrorHandlingAsync:()=>F,createCompilerError:()=>I.createCompilerError,createComponentError:()=>I.createComponentError,createMessage:()=>U,createRendererError:()=>I.createRendererError,getCategory:()=>n.getCategory,getDevMode:()=>V,getErrorMessage:()=>n.getErrorMessage,handleError:()=>L,resetWarnedMessages:()=>p,setDevMode:()=>l,warn:()=>S,warnOnce:()=>t,warnOnceUtil:()=>t,warnUtil:()=>S});module.exports=v(x);var R=require("@lytjs/common");var D=(_=>(_[_.INVALID_ARGUMENT=1001]="INVALID_ARGUMENT",_[_.NOT_FOUND=1002]="NOT_FOUND",_[_.ALREADY_EXISTS=1003]="ALREADY_EXISTS",_[_.OPERATION_FAILED=1004]="OPERATION_FAILED",_[_.REACTIVE_READONLY=2001]="REACTIVE_READONLY",_[_.REACTIVE_EFFECT_DISPOSED=2002]="REACTIVE_EFFECT_DISPOSED",_[_.COMPUTED_CYCLE=2003]="COMPUTED_CYCLE",_[_.PARSE_ERROR=3001]="PARSE_ERROR",_[_.INVALID_EXPRESSION=3002]="INVALID_EXPRESSION",_[_.INVALID_DIRECTIVE=3003]="INVALID_DIRECTIVE",_[_.INVALID_TEMPLATE=3004]="INVALID_TEMPLATE",_[_.RENDER_ERROR=4001]="RENDER_ERROR",_[_.HYDRATION_MISMATCH=4002]="HYDRATION_MISMATCH",_[_.INVALID_VNODE=4003]="INVALID_VNODE",_[_.COMPONENT_INVALID_PROPS=5001]="COMPONENT_INVALID_PROPS",_[_.COMPONENT_MISSING_TEMPLATE=5002]="COMPONENT_MISSING_TEMPLATE",_[_.COMPONENT_LIFECYCLE_ERROR=5003]="COMPONENT_LIFECYCLE_ERROR",_[_.ROUTE_NOT_FOUND=6001]="ROUTE_NOT_FOUND",_[_.ROUTE_DUPLICATE=6002]="ROUTE_DUPLICATE",_[_.NAVIGATION_ABORTED=6003]="NAVIGATION_ABORTED",_[_.NAVIGATION_FAILED=6004]="NAVIGATION_FAILED",_[_.STORE_NOT_FOUND=7001]="STORE_NOT_FOUND",_[_.STORE_DUPLICATE=7002]="STORE_DUPLICATE",_[_.LYT_COMPILER_PARSE_ERROR=R.LytErrorCodes.LYT_COMPILER_PARSE_ERROR]="LYT_COMPILER_PARSE_ERROR",_[_.LYT_COMPILER_INVALID_EXPRESSION=R.LytErrorCodes.LYT_COMPILER_INVALID_EXPRESSION]="LYT_COMPILER_INVALID_EXPRESSION",_[_.LYT_COMPILER_INVALID_TEMPLATE=R.LytErrorCodes.LYT_COMPILER_INVALID_TEMPLATE]="LYT_COMPILER_INVALID_TEMPLATE",_[_.LYT_COMPILER_INVALID_DIRECTIVE=R.LytErrorCodes.LYT_COMPILER_INVALID_DIRECTIVE]="LYT_COMPILER_INVALID_DIRECTIVE",_[_.LYT_COMPILER_CODEGEN_ERROR=R.LytErrorCodes.LYT_COMPILER_CODEGEN_ERROR]="LYT_COMPILER_CODEGEN_ERROR",_[_.LYT_COMPILER_SFC_PARSE_ERROR=R.LytErrorCodes.LYT_COMPILER_SFC_PARSE_ERROR]="LYT_COMPILER_SFC_PARSE_ERROR",_[_.LYT_COMPILER_TRANSFORM_ERROR=R.LytErrorCodes.LYT_COMPILER_TRANSFORM_ERROR]="LYT_COMPILER_TRANSFORM_ERROR",_[_.LYT_RENDERER_MOUNT_FAILED=R.LytErrorCodes.LYT_RENDERER_MOUNT_FAILED]="LYT_RENDERER_MOUNT_FAILED",_[_.LYT_RENDERER_PATCH_FAILED=R.LytErrorCodes.LYT_RENDERER_PATCH_FAILED]="LYT_RENDERER_PATCH_FAILED",_[_.LYT_RENDERER_HYDRATION_MISMATCH=R.LytErrorCodes.LYT_RENDERER_HYDRATION_MISMATCH]="LYT_RENDERER_HYDRATION_MISMATCH",_[_.LYT_RENDERER_INVALID_VNODE=R.LytErrorCodes.LYT_RENDERER_INVALID_VNODE]="LYT_RENDERER_INVALID_VNODE",_[_.LYT_RENDERER_UNMOUNT_FAILED=R.LytErrorCodes.LYT_RENDERER_UNMOUNT_FAILED]="LYT_RENDERER_UNMOUNT_FAILED",_[_.LYT_COMPONENT_INVALID_PROPS=R.LytErrorCodes.LYT_COMPONENT_INVALID_PROPS]="LYT_COMPONENT_INVALID_PROPS",_[_.LYT_COMPONENT_MISSING_RENDER=R.LytErrorCodes.LYT_COMPONENT_MISSING_RENDER]="LYT_COMPONENT_MISSING_RENDER",_[_.LYT_COMPONENT_LIFECYCLE_ERROR=R.LytErrorCodes.LYT_COMPONENT_LIFECYCLE_ERROR]="LYT_COMPONENT_LIFECYCLE_ERROR",_[_.LYT_COMPONENT_INVALID=R.LytErrorCodes.LYT_COMPONENT_INVALID]="LYT_COMPONENT_INVALID",_[_.LYT_COMPONENT_EMIT_INVALID=R.LytErrorCodes.LYT_COMPONENT_EMIT_INVALID]="LYT_COMPONENT_EMIT_INVALID",_[_.LYT_COMPONENT_RENDER_ERROR=R.LytErrorCodes.LYT_COMPONENT_RENDER_ERROR]="LYT_COMPONENT_RENDER_ERROR",_[_.LYT_ROUTER_INVALID_ROUTE=R.LytErrorCodes.LYT_ROUTER_INVALID_ROUTE]="LYT_ROUTER_INVALID_ROUTE",_[_.LYT_ROUTER_NAVIGATION_FAILED=R.LytErrorCodes.LYT_ROUTER_NAVIGATION_FAILED]="LYT_ROUTER_NAVIGATION_FAILED",_[_.LYT_ROUTER_DUPLICATE_ROUTE=R.LytErrorCodes.LYT_ROUTER_DUPLICATE_ROUTE]="LYT_ROUTER_DUPLICATE_ROUTE",_[_.LYT_ROUTER_NAVIGATION_ABORTED=R.LytErrorCodes.LYT_ROUTER_NAVIGATION_ABORTED]="LYT_ROUTER_NAVIGATION_ABORTED",_[_.LYT_ROUTER_GUARD_ERROR=R.LytErrorCodes.LYT_ROUTER_GUARD_ERROR]="LYT_ROUTER_GUARD_ERROR",_[_.LYT_STORE_ALREADY_EXISTS=R.LytErrorCodes.LYT_STORE_ALREADY_EXISTS]="LYT_STORE_ALREADY_EXISTS",_[_.LYT_STORE_NOT_FOUND=R.LytErrorCodes.LYT_STORE_NOT_FOUND]="LYT_STORE_NOT_FOUND",_[_.LYT_STORE_DISPOSED=R.LytErrorCodes.LYT_STORE_DISPOSED]="LYT_STORE_DISPOSED",_[_.LYT_STORE_PATCH_ERROR=R.LytErrorCodes.LYT_STORE_PATCH_ERROR]="LYT_STORE_PATCH_ERROR",_[_.LYT_REACTIVITY_READONLY_SET=R.LytErrorCodes.LYT_REACTIVITY_READONLY_SET]="LYT_REACTIVITY_READONLY_SET",_[_.LYT_REACTIVITY_READONLY_DELETE=R.LytErrorCodes.LYT_REACTIVITY_READONLY_DELETE]="LYT_REACTIVITY_READONLY_DELETE",_[_.LYT_REACTIVITY_EFFECT_ERROR=R.LytErrorCodes.LYT_REACTIVITY_EFFECT_ERROR]="LYT_REACTIVITY_EFFECT_ERROR",_[_.LYT_REACTIVITY_COMPUTED_CYCLE=R.LytErrorCodes.LYT_REACTIVITY_COMPUTED_CYCLE]="LYT_REACTIVITY_COMPUTED_CYCLE",_[_.LYT_REACTIVITY_EFFECT_DISPOSED=R.LytErrorCodes.LYT_REACTIVITY_EFFECT_DISPOSED]="LYT_REACTIVITY_EFFECT_DISPOSED",_[_.LYT_REACTIVITY_CIRCULAR_DEPENDENCY=R.LytErrorCodes.LYT_REACTIVITY_CIRCULAR_DEPENDENCY]="LYT_REACTIVITY_CIRCULAR_DEPENDENCY",_[_.LYT_REACTIVITY_SIGNAL_DISPOSED=R.LytErrorCodes.LYT_REACTIVITY_SIGNAL_DISPOSED]="LYT_REACTIVITY_SIGNAL_DISPOSED",_[_.LYT_CORE_PLUGIN_ERROR=R.LytErrorCodes.LYT_CORE_PLUGIN_ERROR]="LYT_CORE_PLUGIN_ERROR",_[_.LYT_CORE_MOUNT_NO_CONTAINER=R.LytErrorCodes.LYT_CORE_MOUNT_NO_CONTAINER]="LYT_CORE_MOUNT_NO_CONTAINER",_[_.LYT_CORE_ALREADY_MOUNTED=R.LytErrorCodes.LYT_CORE_ALREADY_MOUNTED]="LYT_CORE_ALREADY_MOUNTED",_[_.LYT_CORE_INVALID_ARGUMENT=R.LytErrorCodes.LYT_CORE_INVALID_ARGUMENT]="LYT_CORE_INVALID_ARGUMENT",_[_.LYT_CORE_NOT_FOUND=R.LytErrorCodes.LYT_CORE_NOT_FOUND]="LYT_CORE_NOT_FOUND",_[_.LYT_CORE_ALREADY_EXISTS=R.LytErrorCodes.LYT_CORE_ALREADY_EXISTS]="LYT_CORE_ALREADY_EXISTS",_[_.LYT_CORE_OPERATION_FAILED=R.LytErrorCodes.LYT_CORE_OPERATION_FAILED]="LYT_CORE_OPERATION_FAILED",_[_.LYT_CLI_SCAFFOLD_FAILED=R.LytErrorCodes.LYT_CLI_SCAFFOLD_FAILED]="LYT_CLI_SCAFFOLD_FAILED",_[_.LYT_CLI_BUILD_FAILED=R.LytErrorCodes.LYT_CLI_BUILD_FAILED]="LYT_CLI_BUILD_FAILED",_[_.LYT_CLI_DEV_SERVER_ERROR=R.LytErrorCodes.LYT_CLI_DEV_SERVER_ERROR]="LYT_CLI_DEV_SERVER_ERROR",_[_.LYT_CLI_CONFIG_INVALID=R.LytErrorCodes.LYT_CLI_CONFIG_INVALID]="LYT_CLI_CONFIG_INVALID",_[_.LYT_CLI_HMR_CONNECTION_FAILED=R.LytErrorCodes.LYT_CLI_HMR_CONNECTION_FAILED]="LYT_CLI_HMR_CONNECTION_FAILED",_[_.LYT_DEVTOOLS_CONNECTION_FAILED=R.LytErrorCodes.LYT_DEVTOOLS_CONNECTION_FAILED]="LYT_DEVTOOLS_CONNECTION_FAILED",_[_.LYT_DEVTOOLS_PANEL_ERROR=R.LytErrorCodes.LYT_DEVTOOLS_PANEL_ERROR]="LYT_DEVTOOLS_PANEL_ERROR",_[_.LYT_DEVTOOLS_PERF_OVERFLOW=R.LytErrorCodes.LYT_DEVTOOLS_PERF_OVERFLOW]="LYT_DEVTOOLS_PERF_OVERFLOW",_[_.LYT_DEVTOOLS_COMPONENT_TREE_ERROR=R.LytErrorCodes.LYT_DEVTOOLS_COMPONENT_TREE_ERROR]="LYT_DEVTOOLS_COMPONENT_TREE_ERROR",_[_.LYT_PLUGIN_INSTALL_FAILED=R.LytErrorCodes.LYT_PLUGIN_INSTALL_FAILED]="LYT_PLUGIN_INSTALL_FAILED",_[_.LYT_PLUGIN_ALREADY_INSTALLED=R.LytErrorCodes.LYT_PLUGIN_ALREADY_INSTALLED]="LYT_PLUGIN_ALREADY_INSTALLED",_[_.LYT_PLUGIN_INVALID=R.LytErrorCodes.LYT_PLUGIN_INVALID]="LYT_PLUGIN_INVALID",_[_.LYT_PLUGIN_UNINSTALL_FAILED=R.LytErrorCodes.LYT_PLUGIN_UNINSTALL_FAILED]="LYT_PLUGIN_UNINSTALL_FAILED",_[_.LYT_RENDERER_VAPOR_ERROR=R.LytErrorCodes.LYT_RENDERER_VAPOR_ERROR]="LYT_RENDERER_VAPOR_ERROR",_[_.LYT_RENDERER_VAPOR_COMPILER_ERROR=R.LytErrorCodes.LYT_RENDERER_VAPOR_COMPILER_ERROR]="LYT_RENDERER_VAPOR_COMPILER_ERROR",_[_.LYT_RENDERER_VAPOR_COMPONENT_ERROR=R.LytErrorCodes.LYT_RENDERER_VAPOR_COMPONENT_ERROR]="LYT_RENDERER_VAPOR_COMPONENT_ERROR",_[_.LYT_SSR_STREAM_ERROR=R.LytErrorCodes.LYT_SSR_STREAM_ERROR]="LYT_SSR_STREAM_ERROR",_[_.LYT_SSR_SUSPENSE_TIMEOUT=R.LytErrorCodes.LYT_SSR_SUSPENSE_TIMEOUT]="LYT_SSR_SUSPENSE_TIMEOUT",_[_.LYT_SSR_HYDRATION_ERROR=R.LytErrorCodes.LYT_SSR_HYDRATION_ERROR]="LYT_SSR_HYDRATION_ERROR",_[_.LYT_SSR_ISLAND_ERROR=R.LytErrorCodes.LYT_SSR_ISLAND_ERROR]="LYT_SSR_ISLAND_ERROR",_))(D||{});var i=class i{constructor(T){this.errors=[],this.options=T||{},this._hasError=!1}get hasError(){return this._hasError}static setGlobalHandler(T){i.globalHandler=T}capture(T,O,a){var c;let N={error:T,vm:O,info:a||"",timestamp:Date.now()};this.errors.push(N),this._hasError=!0;let M=(c=this.options.maxErrors)!=null?c:100;this.errors.length>M&&this.errors.splice(0,this.errors.length-M),!(this.options.onErrorCaptured&&this.options.onErrorCaptured(T instanceof R.LytError?T:new R.LytError(D.LYT_CORE_OPERATION_FAILED,T.message),O,N.info)===!0)&&this.options.onError&&this.options.onError(T instanceof R.LytError?T:new R.LytError(D.LYT_CORE_OPERATION_FAILED,T.message),O)}getFallback(T){if(!this.options.fallback||this.errors.length===0)return null;let O=this.errors[this.errors.length-1];return this.options.fallback(O.error,O.vm,O.info)}getErrors(){return this.errors.slice()}getErrorCount(){return this.errors.length}getLastErrors(){return this.errors.length===0?null:{...this.errors[this.errors.length-1]}}clear(){this.errors=[],this._hasError=!1}};i.globalHandler=null;var A=i,Y=!0,P=new Set;function l(E){Y=E}function V(){return Y}function S(E){if(!Y)return;let T=console.warn;typeof T=="function"&&T(`[Lyt warn] ${E}`)}function t(E){if(!Y||P.has(E))return;P.add(E);let T=console.warn;typeof T=="function"&&T(`[Lyt warn] ${E}`)}function p(){P.clear()}function U(E,...T){let O=(0,R.getErrorMessage)(E);return`[Lyt ${E}] ${O}`}function L(E,T,O){A.globalHandler&&A.globalHandler(E,T,O||""),Y?E instanceof R.LytError&&E.details:typeof reportError=="function"&&reportError(E)}function f(E,T){try{return E()}catch(O){L(O instanceof Error?O:new Error(String(O)),T);return}}async function F(E,T){try{return await E()}catch(O){L(O instanceof Error?O:new Error(String(O)),T);return}}var n=require("@lytjs/common");var I=require("@lytjs/common");
@@ -1 +1 @@
1
- import{LytError as n,LytErrorCodes as R,getErrorMessage as M}from"@lytjs/common";var A=(_=>(_[_.INVALID_ARGUMENT=1001]="INVALID_ARGUMENT",_[_.NOT_FOUND=1002]="NOT_FOUND",_[_.ALREADY_EXISTS=1003]="ALREADY_EXISTS",_[_.OPERATION_FAILED=1004]="OPERATION_FAILED",_[_.REACTIVE_READONLY=2001]="REACTIVE_READONLY",_[_.REACTIVE_EFFECT_DISPOSED=2002]="REACTIVE_EFFECT_DISPOSED",_[_.COMPUTED_CYCLE=2003]="COMPUTED_CYCLE",_[_.PARSE_ERROR=3001]="PARSE_ERROR",_[_.INVALID_EXPRESSION=3002]="INVALID_EXPRESSION",_[_.INVALID_DIRECTIVE=3003]="INVALID_DIRECTIVE",_[_.INVALID_TEMPLATE=3004]="INVALID_TEMPLATE",_[_.RENDER_ERROR=4001]="RENDER_ERROR",_[_.HYDRATION_MISMATCH=4002]="HYDRATION_MISMATCH",_[_.INVALID_VNODE=4003]="INVALID_VNODE",_[_.COMPONENT_INVALID_PROPS=5001]="COMPONENT_INVALID_PROPS",_[_.COMPONENT_MISSING_TEMPLATE=5002]="COMPONENT_MISSING_TEMPLATE",_[_.COMPONENT_LIFECYCLE_ERROR=5003]="COMPONENT_LIFECYCLE_ERROR",_[_.ROUTE_NOT_FOUND=6001]="ROUTE_NOT_FOUND",_[_.ROUTE_DUPLICATE=6002]="ROUTE_DUPLICATE",_[_.NAVIGATION_ABORTED=6003]="NAVIGATION_ABORTED",_[_.NAVIGATION_FAILED=6004]="NAVIGATION_FAILED",_[_.STORE_NOT_FOUND=7001]="STORE_NOT_FOUND",_[_.STORE_DUPLICATE=7002]="STORE_DUPLICATE",_[_.LYT_COMPILER_PARSE_ERROR=R.LYT_COMPILER_PARSE_ERROR]="LYT_COMPILER_PARSE_ERROR",_[_.LYT_COMPILER_INVALID_EXPRESSION=R.LYT_COMPILER_INVALID_EXPRESSION]="LYT_COMPILER_INVALID_EXPRESSION",_[_.LYT_COMPILER_INVALID_TEMPLATE=R.LYT_COMPILER_INVALID_TEMPLATE]="LYT_COMPILER_INVALID_TEMPLATE",_[_.LYT_COMPILER_INVALID_DIRECTIVE=R.LYT_COMPILER_INVALID_DIRECTIVE]="LYT_COMPILER_INVALID_DIRECTIVE",_[_.LYT_COMPILER_CODEGEN_ERROR=R.LYT_COMPILER_CODEGEN_ERROR]="LYT_COMPILER_CODEGEN_ERROR",_[_.LYT_COMPILER_SFC_PARSE_ERROR=R.LYT_COMPILER_SFC_PARSE_ERROR]="LYT_COMPILER_SFC_PARSE_ERROR",_[_.LYT_COMPILER_TRANSFORM_ERROR=R.LYT_COMPILER_TRANSFORM_ERROR]="LYT_COMPILER_TRANSFORM_ERROR",_[_.LYT_RENDERER_MOUNT_FAILED=R.LYT_RENDERER_MOUNT_FAILED]="LYT_RENDERER_MOUNT_FAILED",_[_.LYT_RENDERER_PATCH_FAILED=R.LYT_RENDERER_PATCH_FAILED]="LYT_RENDERER_PATCH_FAILED",_[_.LYT_RENDERER_HYDRATION_MISMATCH=R.LYT_RENDERER_HYDRATION_MISMATCH]="LYT_RENDERER_HYDRATION_MISMATCH",_[_.LYT_RENDERER_INVALID_VNODE=R.LYT_RENDERER_INVALID_VNODE]="LYT_RENDERER_INVALID_VNODE",_[_.LYT_RENDERER_UNMOUNT_FAILED=R.LYT_RENDERER_UNMOUNT_FAILED]="LYT_RENDERER_UNMOUNT_FAILED",_[_.LYT_COMPONENT_INVALID_PROPS=R.LYT_COMPONENT_INVALID_PROPS]="LYT_COMPONENT_INVALID_PROPS",_[_.LYT_COMPONENT_MISSING_RENDER=R.LYT_COMPONENT_MISSING_RENDER]="LYT_COMPONENT_MISSING_RENDER",_[_.LYT_COMPONENT_LIFECYCLE_ERROR=R.LYT_COMPONENT_LIFECYCLE_ERROR]="LYT_COMPONENT_LIFECYCLE_ERROR",_[_.LYT_COMPONENT_INVALID=R.LYT_COMPONENT_INVALID]="LYT_COMPONENT_INVALID",_[_.LYT_COMPONENT_EMIT_INVALID=R.LYT_COMPONENT_EMIT_INVALID]="LYT_COMPONENT_EMIT_INVALID",_[_.LYT_COMPONENT_RENDER_ERROR=R.LYT_COMPONENT_RENDER_ERROR]="LYT_COMPONENT_RENDER_ERROR",_[_.LYT_ROUTER_INVALID_ROUTE=R.LYT_ROUTER_INVALID_ROUTE]="LYT_ROUTER_INVALID_ROUTE",_[_.LYT_ROUTER_NAVIGATION_FAILED=R.LYT_ROUTER_NAVIGATION_FAILED]="LYT_ROUTER_NAVIGATION_FAILED",_[_.LYT_ROUTER_DUPLICATE_ROUTE=R.LYT_ROUTER_DUPLICATE_ROUTE]="LYT_ROUTER_DUPLICATE_ROUTE",_[_.LYT_ROUTER_NAVIGATION_ABORTED=R.LYT_ROUTER_NAVIGATION_ABORTED]="LYT_ROUTER_NAVIGATION_ABORTED",_[_.LYT_ROUTER_GUARD_ERROR=R.LYT_ROUTER_GUARD_ERROR]="LYT_ROUTER_GUARD_ERROR",_[_.LYT_STORE_ALREADY_EXISTS=R.LYT_STORE_ALREADY_EXISTS]="LYT_STORE_ALREADY_EXISTS",_[_.LYT_STORE_NOT_FOUND=R.LYT_STORE_NOT_FOUND]="LYT_STORE_NOT_FOUND",_[_.LYT_STORE_DISPOSED=R.LYT_STORE_DISPOSED]="LYT_STORE_DISPOSED",_[_.LYT_STORE_PATCH_ERROR=R.LYT_STORE_PATCH_ERROR]="LYT_STORE_PATCH_ERROR",_[_.LYT_REACTIVITY_READONLY_SET=R.LYT_REACTIVITY_READONLY_SET]="LYT_REACTIVITY_READONLY_SET",_[_.LYT_REACTIVITY_READONLY_DELETE=R.LYT_REACTIVITY_READONLY_DELETE]="LYT_REACTIVITY_READONLY_DELETE",_[_.LYT_REACTIVITY_EFFECT_ERROR=R.LYT_REACTIVITY_EFFECT_ERROR]="LYT_REACTIVITY_EFFECT_ERROR",_[_.LYT_REACTIVITY_COMPUTED_CYCLE=R.LYT_REACTIVITY_COMPUTED_CYCLE]="LYT_REACTIVITY_COMPUTED_CYCLE",_[_.LYT_REACTIVITY_EFFECT_DISPOSED=R.LYT_REACTIVITY_EFFECT_DISPOSED]="LYT_REACTIVITY_EFFECT_DISPOSED",_[_.LYT_REACTIVITY_CIRCULAR_DEPENDENCY=R.LYT_REACTIVITY_CIRCULAR_DEPENDENCY]="LYT_REACTIVITY_CIRCULAR_DEPENDENCY",_[_.LYT_REACTIVITY_SIGNAL_DISPOSED=R.LYT_REACTIVITY_SIGNAL_DISPOSED]="LYT_REACTIVITY_SIGNAL_DISPOSED",_[_.LYT_CORE_PLUGIN_ERROR=R.LYT_CORE_PLUGIN_ERROR]="LYT_CORE_PLUGIN_ERROR",_[_.LYT_CORE_MOUNT_NO_CONTAINER=R.LYT_CORE_MOUNT_NO_CONTAINER]="LYT_CORE_MOUNT_NO_CONTAINER",_[_.LYT_CORE_ALREADY_MOUNTED=R.LYT_CORE_ALREADY_MOUNTED]="LYT_CORE_ALREADY_MOUNTED",_[_.LYT_CORE_INVALID_ARGUMENT=R.LYT_CORE_INVALID_ARGUMENT]="LYT_CORE_INVALID_ARGUMENT",_[_.LYT_CORE_NOT_FOUND=R.LYT_CORE_NOT_FOUND]="LYT_CORE_NOT_FOUND",_[_.LYT_CORE_ALREADY_EXISTS=R.LYT_CORE_ALREADY_EXISTS]="LYT_CORE_ALREADY_EXISTS",_[_.LYT_CORE_OPERATION_FAILED=R.LYT_CORE_OPERATION_FAILED]="LYT_CORE_OPERATION_FAILED",_[_.LYT_CLI_SCAFFOLD_FAILED=R.LYT_CLI_SCAFFOLD_FAILED]="LYT_CLI_SCAFFOLD_FAILED",_[_.LYT_CLI_BUILD_FAILED=R.LYT_CLI_BUILD_FAILED]="LYT_CLI_BUILD_FAILED",_[_.LYT_CLI_DEV_SERVER_ERROR=R.LYT_CLI_DEV_SERVER_ERROR]="LYT_CLI_DEV_SERVER_ERROR",_[_.LYT_CLI_CONFIG_INVALID=R.LYT_CLI_CONFIG_INVALID]="LYT_CLI_CONFIG_INVALID",_[_.LYT_CLI_HMR_CONNECTION_FAILED=R.LYT_CLI_HMR_CONNECTION_FAILED]="LYT_CLI_HMR_CONNECTION_FAILED",_[_.LYT_DEVTOOLS_CONNECTION_FAILED=R.LYT_DEVTOOLS_CONNECTION_FAILED]="LYT_DEVTOOLS_CONNECTION_FAILED",_[_.LYT_DEVTOOLS_PANEL_ERROR=R.LYT_DEVTOOLS_PANEL_ERROR]="LYT_DEVTOOLS_PANEL_ERROR",_[_.LYT_DEVTOOLS_PERF_OVERFLOW=R.LYT_DEVTOOLS_PERF_OVERFLOW]="LYT_DEVTOOLS_PERF_OVERFLOW",_[_.LYT_DEVTOOLS_COMPONENT_TREE_ERROR=R.LYT_DEVTOOLS_COMPONENT_TREE_ERROR]="LYT_DEVTOOLS_COMPONENT_TREE_ERROR",_[_.LYT_PLUGIN_INSTALL_FAILED=R.LYT_PLUGIN_INSTALL_FAILED]="LYT_PLUGIN_INSTALL_FAILED",_[_.LYT_PLUGIN_ALREADY_INSTALLED=R.LYT_PLUGIN_ALREADY_INSTALLED]="LYT_PLUGIN_ALREADY_INSTALLED",_[_.LYT_PLUGIN_INVALID=R.LYT_PLUGIN_INVALID]="LYT_PLUGIN_INVALID",_[_.LYT_PLUGIN_UNINSTALL_FAILED=R.LYT_PLUGIN_UNINSTALL_FAILED]="LYT_PLUGIN_UNINSTALL_FAILED",_[_.LYT_RENDERER_VAPOR_ERROR=R.LYT_RENDERER_VAPOR_ERROR]="LYT_RENDERER_VAPOR_ERROR",_[_.LYT_RENDERER_VAPOR_COMPILER_ERROR=R.LYT_RENDERER_VAPOR_COMPILER_ERROR]="LYT_RENDERER_VAPOR_COMPILER_ERROR",_[_.LYT_RENDERER_VAPOR_COMPONENT_ERROR=R.LYT_RENDERER_VAPOR_COMPONENT_ERROR]="LYT_RENDERER_VAPOR_COMPONENT_ERROR",_[_.LYT_SSR_STREAM_ERROR=R.LYT_SSR_STREAM_ERROR]="LYT_SSR_STREAM_ERROR",_[_.LYT_SSR_SUSPENSE_TIMEOUT=R.LYT_SSR_SUSPENSE_TIMEOUT]="LYT_SSR_SUSPENSE_TIMEOUT",_[_.LYT_SSR_HYDRATION_ERROR=R.LYT_SSR_HYDRATION_ERROR]="LYT_SSR_HYDRATION_ERROR",_[_.LYT_SSR_ISLAND_ERROR=R.LYT_SSR_ISLAND_ERROR]="LYT_SSR_ISLAND_ERROR",_))(A||{});var D=class D{constructor(T){this.errors=[],this.options=T||{},this._hasError=!1}get hasError(){return this._hasError}static setGlobalHandler(T){D.globalHandler=T}capture(T,E,t){var e;let a={error:T,vm:E,info:t||"",timestamp:Date.now()};this.errors.push(a),this._hasError=!0;let L=(e=this.options.maxErrors)!=null?e:100;this.errors.length>L&&this.errors.splice(0,this.errors.length-L),!(this.options.onErrorCaptured&&this.options.onErrorCaptured(T instanceof n?T:new n(A.LYT_CORE_OPERATION_FAILED,T.message),E,a.info)===!0)&&this.options.onError&&this.options.onError(T instanceof n?T:new n(A.LYT_CORE_OPERATION_FAILED,T.message),E)}getFallback(T){if(!this.options.fallback||this.errors.length===0)return null;let E=this.errors[this.errors.length-1];return this.options.fallback(E.error,E.vm,E.info)}getErrors(){return this.errors.slice()}getErrorCount(){return this.errors.length}getLastErrors(){return this.errors.length===0?null:{...this.errors[this.errors.length-1]}}clear(){this.errors=[],this._hasError=!1}};D.globalHandler=null;var I=D,N=!0,Y=new Set;function c(O){N=O}function l(){return N}function P(O){if(!N)return;let T=console.warn;typeof T=="function"&&T(`[Lyt warn] ${O}`)}function S(O){if(!N||Y.has(O))return;Y.add(O);let T=console.warn;typeof T=="function"&&T(`[Lyt warn] ${O}`)}function V(){Y.clear()}function p(O,...T){let E=M(O);return`[Lyt ${O}] ${E}`}function i(O,T,E){I.globalHandler&&I.globalHandler(O,T,E||""),N?O instanceof n&&O.details:typeof reportError=="function"&&reportError(O)}function U(O,T){try{return O()}catch(E){i(E instanceof Error?E:new Error(String(E)),T);return}}async function f(O,T){try{return await O()}catch(E){i(E instanceof Error?E:new Error(String(E)),T);return}}import{LytErrorCodes as b,ErrorCategory as F,getErrorMessage as u,getCategory as g}from"@lytjs/common";import{LytError as W,createCompilerError as m,createRendererError as h,createComponentError as G}from"@lytjs/common";export{I as ErrorBoundary,F as ErrorCategory,n as LytError,A as LytErrorCodes,U as callWithErrorHandling,f as callWithErrorHandlingAsync,m as createCompilerError,G as createComponentError,p as createMessage,h as createRendererError,g as getCategory,l as getDevMode,u as getErrorMessage,i as handleError,V as resetWarnedMessages,c as setDevMode,P as warn,S as warnOnce,S as warnOnceUtil,P as warnUtil};
1
+ import{LytError as n,LytErrorCodes as R,getErrorMessage as M}from"@lytjs/common";var A=(_=>(_[_.INVALID_ARGUMENT=1001]="INVALID_ARGUMENT",_[_.NOT_FOUND=1002]="NOT_FOUND",_[_.ALREADY_EXISTS=1003]="ALREADY_EXISTS",_[_.OPERATION_FAILED=1004]="OPERATION_FAILED",_[_.REACTIVE_READONLY=2001]="REACTIVE_READONLY",_[_.REACTIVE_EFFECT_DISPOSED=2002]="REACTIVE_EFFECT_DISPOSED",_[_.COMPUTED_CYCLE=2003]="COMPUTED_CYCLE",_[_.PARSE_ERROR=3001]="PARSE_ERROR",_[_.INVALID_EXPRESSION=3002]="INVALID_EXPRESSION",_[_.INVALID_DIRECTIVE=3003]="INVALID_DIRECTIVE",_[_.INVALID_TEMPLATE=3004]="INVALID_TEMPLATE",_[_.RENDER_ERROR=4001]="RENDER_ERROR",_[_.HYDRATION_MISMATCH=4002]="HYDRATION_MISMATCH",_[_.INVALID_VNODE=4003]="INVALID_VNODE",_[_.COMPONENT_INVALID_PROPS=5001]="COMPONENT_INVALID_PROPS",_[_.COMPONENT_MISSING_TEMPLATE=5002]="COMPONENT_MISSING_TEMPLATE",_[_.COMPONENT_LIFECYCLE_ERROR=5003]="COMPONENT_LIFECYCLE_ERROR",_[_.ROUTE_NOT_FOUND=6001]="ROUTE_NOT_FOUND",_[_.ROUTE_DUPLICATE=6002]="ROUTE_DUPLICATE",_[_.NAVIGATION_ABORTED=6003]="NAVIGATION_ABORTED",_[_.NAVIGATION_FAILED=6004]="NAVIGATION_FAILED",_[_.STORE_NOT_FOUND=7001]="STORE_NOT_FOUND",_[_.STORE_DUPLICATE=7002]="STORE_DUPLICATE",_[_.LYT_COMPILER_PARSE_ERROR=R.LYT_COMPILER_PARSE_ERROR]="LYT_COMPILER_PARSE_ERROR",_[_.LYT_COMPILER_INVALID_EXPRESSION=R.LYT_COMPILER_INVALID_EXPRESSION]="LYT_COMPILER_INVALID_EXPRESSION",_[_.LYT_COMPILER_INVALID_TEMPLATE=R.LYT_COMPILER_INVALID_TEMPLATE]="LYT_COMPILER_INVALID_TEMPLATE",_[_.LYT_COMPILER_INVALID_DIRECTIVE=R.LYT_COMPILER_INVALID_DIRECTIVE]="LYT_COMPILER_INVALID_DIRECTIVE",_[_.LYT_COMPILER_CODEGEN_ERROR=R.LYT_COMPILER_CODEGEN_ERROR]="LYT_COMPILER_CODEGEN_ERROR",_[_.LYT_COMPILER_SFC_PARSE_ERROR=R.LYT_COMPILER_SFC_PARSE_ERROR]="LYT_COMPILER_SFC_PARSE_ERROR",_[_.LYT_COMPILER_TRANSFORM_ERROR=R.LYT_COMPILER_TRANSFORM_ERROR]="LYT_COMPILER_TRANSFORM_ERROR",_[_.LYT_RENDERER_MOUNT_FAILED=R.LYT_RENDERER_MOUNT_FAILED]="LYT_RENDERER_MOUNT_FAILED",_[_.LYT_RENDERER_PATCH_FAILED=R.LYT_RENDERER_PATCH_FAILED]="LYT_RENDERER_PATCH_FAILED",_[_.LYT_RENDERER_HYDRATION_MISMATCH=R.LYT_RENDERER_HYDRATION_MISMATCH]="LYT_RENDERER_HYDRATION_MISMATCH",_[_.LYT_RENDERER_INVALID_VNODE=R.LYT_RENDERER_INVALID_VNODE]="LYT_RENDERER_INVALID_VNODE",_[_.LYT_RENDERER_UNMOUNT_FAILED=R.LYT_RENDERER_UNMOUNT_FAILED]="LYT_RENDERER_UNMOUNT_FAILED",_[_.LYT_COMPONENT_INVALID_PROPS=R.LYT_COMPONENT_INVALID_PROPS]="LYT_COMPONENT_INVALID_PROPS",_[_.LYT_COMPONENT_MISSING_RENDER=R.LYT_COMPONENT_MISSING_RENDER]="LYT_COMPONENT_MISSING_RENDER",_[_.LYT_COMPONENT_LIFECYCLE_ERROR=R.LYT_COMPONENT_LIFECYCLE_ERROR]="LYT_COMPONENT_LIFECYCLE_ERROR",_[_.LYT_COMPONENT_INVALID=R.LYT_COMPONENT_INVALID]="LYT_COMPONENT_INVALID",_[_.LYT_COMPONENT_EMIT_INVALID=R.LYT_COMPONENT_EMIT_INVALID]="LYT_COMPONENT_EMIT_INVALID",_[_.LYT_COMPONENT_RENDER_ERROR=R.LYT_COMPONENT_RENDER_ERROR]="LYT_COMPONENT_RENDER_ERROR",_[_.LYT_ROUTER_INVALID_ROUTE=R.LYT_ROUTER_INVALID_ROUTE]="LYT_ROUTER_INVALID_ROUTE",_[_.LYT_ROUTER_NAVIGATION_FAILED=R.LYT_ROUTER_NAVIGATION_FAILED]="LYT_ROUTER_NAVIGATION_FAILED",_[_.LYT_ROUTER_DUPLICATE_ROUTE=R.LYT_ROUTER_DUPLICATE_ROUTE]="LYT_ROUTER_DUPLICATE_ROUTE",_[_.LYT_ROUTER_NAVIGATION_ABORTED=R.LYT_ROUTER_NAVIGATION_ABORTED]="LYT_ROUTER_NAVIGATION_ABORTED",_[_.LYT_ROUTER_GUARD_ERROR=R.LYT_ROUTER_GUARD_ERROR]="LYT_ROUTER_GUARD_ERROR",_[_.LYT_STORE_ALREADY_EXISTS=R.LYT_STORE_ALREADY_EXISTS]="LYT_STORE_ALREADY_EXISTS",_[_.LYT_STORE_NOT_FOUND=R.LYT_STORE_NOT_FOUND]="LYT_STORE_NOT_FOUND",_[_.LYT_STORE_DISPOSED=R.LYT_STORE_DISPOSED]="LYT_STORE_DISPOSED",_[_.LYT_STORE_PATCH_ERROR=R.LYT_STORE_PATCH_ERROR]="LYT_STORE_PATCH_ERROR",_[_.LYT_REACTIVITY_READONLY_SET=R.LYT_REACTIVITY_READONLY_SET]="LYT_REACTIVITY_READONLY_SET",_[_.LYT_REACTIVITY_READONLY_DELETE=R.LYT_REACTIVITY_READONLY_DELETE]="LYT_REACTIVITY_READONLY_DELETE",_[_.LYT_REACTIVITY_EFFECT_ERROR=R.LYT_REACTIVITY_EFFECT_ERROR]="LYT_REACTIVITY_EFFECT_ERROR",_[_.LYT_REACTIVITY_COMPUTED_CYCLE=R.LYT_REACTIVITY_COMPUTED_CYCLE]="LYT_REACTIVITY_COMPUTED_CYCLE",_[_.LYT_REACTIVITY_EFFECT_DISPOSED=R.LYT_REACTIVITY_EFFECT_DISPOSED]="LYT_REACTIVITY_EFFECT_DISPOSED",_[_.LYT_REACTIVITY_CIRCULAR_DEPENDENCY=R.LYT_REACTIVITY_CIRCULAR_DEPENDENCY]="LYT_REACTIVITY_CIRCULAR_DEPENDENCY",_[_.LYT_REACTIVITY_SIGNAL_DISPOSED=R.LYT_REACTIVITY_SIGNAL_DISPOSED]="LYT_REACTIVITY_SIGNAL_DISPOSED",_[_.LYT_CORE_PLUGIN_ERROR=R.LYT_CORE_PLUGIN_ERROR]="LYT_CORE_PLUGIN_ERROR",_[_.LYT_CORE_MOUNT_NO_CONTAINER=R.LYT_CORE_MOUNT_NO_CONTAINER]="LYT_CORE_MOUNT_NO_CONTAINER",_[_.LYT_CORE_ALREADY_MOUNTED=R.LYT_CORE_ALREADY_MOUNTED]="LYT_CORE_ALREADY_MOUNTED",_[_.LYT_CORE_INVALID_ARGUMENT=R.LYT_CORE_INVALID_ARGUMENT]="LYT_CORE_INVALID_ARGUMENT",_[_.LYT_CORE_NOT_FOUND=R.LYT_CORE_NOT_FOUND]="LYT_CORE_NOT_FOUND",_[_.LYT_CORE_ALREADY_EXISTS=R.LYT_CORE_ALREADY_EXISTS]="LYT_CORE_ALREADY_EXISTS",_[_.LYT_CORE_OPERATION_FAILED=R.LYT_CORE_OPERATION_FAILED]="LYT_CORE_OPERATION_FAILED",_[_.LYT_CLI_SCAFFOLD_FAILED=R.LYT_CLI_SCAFFOLD_FAILED]="LYT_CLI_SCAFFOLD_FAILED",_[_.LYT_CLI_BUILD_FAILED=R.LYT_CLI_BUILD_FAILED]="LYT_CLI_BUILD_FAILED",_[_.LYT_CLI_DEV_SERVER_ERROR=R.LYT_CLI_DEV_SERVER_ERROR]="LYT_CLI_DEV_SERVER_ERROR",_[_.LYT_CLI_CONFIG_INVALID=R.LYT_CLI_CONFIG_INVALID]="LYT_CLI_CONFIG_INVALID",_[_.LYT_CLI_HMR_CONNECTION_FAILED=R.LYT_CLI_HMR_CONNECTION_FAILED]="LYT_CLI_HMR_CONNECTION_FAILED",_[_.LYT_DEVTOOLS_CONNECTION_FAILED=R.LYT_DEVTOOLS_CONNECTION_FAILED]="LYT_DEVTOOLS_CONNECTION_FAILED",_[_.LYT_DEVTOOLS_PANEL_ERROR=R.LYT_DEVTOOLS_PANEL_ERROR]="LYT_DEVTOOLS_PANEL_ERROR",_[_.LYT_DEVTOOLS_PERF_OVERFLOW=R.LYT_DEVTOOLS_PERF_OVERFLOW]="LYT_DEVTOOLS_PERF_OVERFLOW",_[_.LYT_DEVTOOLS_COMPONENT_TREE_ERROR=R.LYT_DEVTOOLS_COMPONENT_TREE_ERROR]="LYT_DEVTOOLS_COMPONENT_TREE_ERROR",_[_.LYT_PLUGIN_INSTALL_FAILED=R.LYT_PLUGIN_INSTALL_FAILED]="LYT_PLUGIN_INSTALL_FAILED",_[_.LYT_PLUGIN_ALREADY_INSTALLED=R.LYT_PLUGIN_ALREADY_INSTALLED]="LYT_PLUGIN_ALREADY_INSTALLED",_[_.LYT_PLUGIN_INVALID=R.LYT_PLUGIN_INVALID]="LYT_PLUGIN_INVALID",_[_.LYT_PLUGIN_UNINSTALL_FAILED=R.LYT_PLUGIN_UNINSTALL_FAILED]="LYT_PLUGIN_UNINSTALL_FAILED",_[_.LYT_RENDERER_VAPOR_ERROR=R.LYT_RENDERER_VAPOR_ERROR]="LYT_RENDERER_VAPOR_ERROR",_[_.LYT_RENDERER_VAPOR_COMPILER_ERROR=R.LYT_RENDERER_VAPOR_COMPILER_ERROR]="LYT_RENDERER_VAPOR_COMPILER_ERROR",_[_.LYT_RENDERER_VAPOR_COMPONENT_ERROR=R.LYT_RENDERER_VAPOR_COMPONENT_ERROR]="LYT_RENDERER_VAPOR_COMPONENT_ERROR",_[_.LYT_SSR_STREAM_ERROR=R.LYT_SSR_STREAM_ERROR]="LYT_SSR_STREAM_ERROR",_[_.LYT_SSR_SUSPENSE_TIMEOUT=R.LYT_SSR_SUSPENSE_TIMEOUT]="LYT_SSR_SUSPENSE_TIMEOUT",_[_.LYT_SSR_HYDRATION_ERROR=R.LYT_SSR_HYDRATION_ERROR]="LYT_SSR_HYDRATION_ERROR",_[_.LYT_SSR_ISLAND_ERROR=R.LYT_SSR_ISLAND_ERROR]="LYT_SSR_ISLAND_ERROR",_))(A||{});var D=class D{constructor(T){this.errors=[],this.options=T||{},this._hasError=!1}get hasError(){return this._hasError}static setGlobalHandler(T){D.globalHandler=T}capture(T,E,t){var e;let i={error:T,vm:E,info:t||"",timestamp:Date.now()};this.errors.push(i),this._hasError=!0;let L=(e=this.options.maxErrors)!=null?e:100;this.errors.length>L&&this.errors.splice(0,this.errors.length-L),!(this.options.onErrorCaptured&&this.options.onErrorCaptured(T instanceof n?T:new n(A.LYT_CORE_OPERATION_FAILED,T.message),E,i.info)===!0)&&this.options.onError&&this.options.onError(T instanceof n?T:new n(A.LYT_CORE_OPERATION_FAILED,T.message),E)}getFallback(T){if(!this.options.fallback||this.errors.length===0)return null;let E=this.errors[this.errors.length-1];return this.options.fallback(E.error,E.vm,E.info)}getErrors(){return this.errors.slice()}getErrorCount(){return this.errors.length}getLastErrors(){return this.errors.length===0?null:{...this.errors[this.errors.length-1]}}clear(){this.errors=[],this._hasError=!1}};D.globalHandler=null;var I=D,N=!0,Y=new Set;function c(O){N=O}function l(){return N}function P(O){if(!N)return;let T=console.warn;typeof T=="function"&&T(`[Lyt warn] ${O}`)}function S(O){if(!N||Y.has(O))return;Y.add(O);let T=console.warn;typeof T=="function"&&T(`[Lyt warn] ${O}`)}function V(){Y.clear()}function p(O,...T){let E=M(O);return`[Lyt ${O}] ${E}`}function a(O,T,E){I.globalHandler&&I.globalHandler(O,T,E||""),N?O instanceof n&&O.details:typeof reportError=="function"&&reportError(O)}function U(O,T){try{return O()}catch(E){a(E instanceof Error?E:new Error(String(E)),T);return}}async function f(O,T){try{return await O()}catch(E){a(E instanceof Error?E:new Error(String(E)),T);return}}import{LytErrorCodes as b,ErrorCategory as F,getErrorMessage as u,getCategory as g}from"@lytjs/common";import{LytError as W,createCompilerError as m,createRendererError as h,createComponentError as G}from"@lytjs/common";export{I as ErrorBoundary,F as ErrorCategory,n as LytError,A as LytErrorCodes,U as callWithErrorHandling,f as callWithErrorHandlingAsync,m as createCompilerError,G as createComponentError,p as createMessage,h as createRendererError,g as getCategory,l as getDevMode,u as getErrorMessage,a as handleError,V as resetWarnedMessages,c as setDevMode,P as warn,S as warnOnce,S as warnOnceUtil,P as warnUtil};
@@ -4,6 +4,6 @@
4
4
  * 按需导入 Web Component API:
5
5
  * import { defineCustomElement, registerComponents } from '@lytjs/core/web-component'
6
6
  */
7
- export { defineCustomElement, registerComponents, unregisterElement, isBrowser, defineCustomElementFromSFC, } from './web-component';
7
+ export { defineCustomElement, registerComponents, unregisterElement, isBrowser, defineCustomElementFromSFC, propsToAttributes, attributesToProps, eventsToCustomEvents, injectStyles, scopedCSS, generateScopeId, } from './web-component';
8
8
  export type { CustomElementOptions, ComponentRegistration, } from './web-component';
9
9
  //# sourceMappingURL=web-component-entry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"web-component-entry.d.ts","sourceRoot":"","sources":["../../src/web-component-entry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,0BAA0B,GAC3B,MAAM,iBAAiB,CAAA;AAExB,YAAY,EACV,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"web-component-entry.d.ts","sourceRoot":"","sources":["../../src/web-component-entry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,YAAY,EACZ,SAAS,EACT,eAAe,GAChB,MAAM,iBAAiB,CAAA;AAExB,YAAY,EACV,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,iBAAiB,CAAA"}
@@ -124,4 +124,128 @@ export declare function unregisterElement(tagName: string): void;
124
124
  * ```
125
125
  */
126
126
  export declare function defineCustomElementFromSFC(tagName: string, sfcSource: string, options?: CustomElementOptions): Promise<void>;
127
+ /**
128
+ * 将 Props 定义转换为 observedAttributes 列表
129
+ *
130
+ * 自动将 camelCase prop 名转换为 kebab-case attribute 名,
131
+ * 用于 Custom Element 的 static get observedAttributes()。
132
+ *
133
+ * @param props - Props 定义对象
134
+ * @param exclude - 需要排除的 prop 名列表
135
+ * @returns kebab-case attribute 名数组
136
+ *
137
+ * @example
138
+ * ```ts
139
+ * const props = {
140
+ * initialCount: { type: Number, default: 0 },
141
+ * theme: { type: String, default: 'light' },
142
+ * isVisible: { type: Boolean },
143
+ * }
144
+ *
145
+ * const attrs = propsToAttributes(props)
146
+ * // ['initial-count', 'theme', 'is-visible']
147
+ * ```
148
+ */
149
+ export declare function propsToAttributes(props: Record<string, unknown>, exclude?: string[]): string[];
150
+ /**
151
+ * 将 HTML attributes 转换为组件 Props
152
+ *
153
+ * 从 DOM 元素上读取 attribute 值,进行类型推断和转换,
154
+ * 生成可直接传递给组件的 props 对象。
155
+ *
156
+ * @param attributes - NamedNodeMap(element.attributes)
157
+ * @param propMappings - 属性名映射(attribute name -> prop name)
158
+ * @param converters - 自定义属性值转换器
159
+ * @returns Props 对象
160
+ *
161
+ * @example
162
+ * ```ts
163
+ * const el = document.querySelector('lyt-counter')
164
+ * const props = attributesToProps(el.attributes, {
165
+ * 'initial-count': 'initialCount',
166
+ * })
167
+ * // { initialCount: 10, theme: 'dark' }
168
+ * ```
169
+ */
170
+ export declare function attributesToProps(attributes: NamedNodeMap, propMappings?: Record<string, string>, converters?: Record<string, (value: string) => any>): Record<string, unknown>;
171
+ /**
172
+ * 将 emits 定义转换为 Custom Event 配置
173
+ *
174
+ * 生成事件名映射和事件选项,用于 Custom Element 的事件转发。
175
+ *
176
+ * @param emits - emits 定义(数组或对象)
177
+ * @returns 事件配置映射
178
+ *
179
+ * @example
180
+ * ```ts
181
+ * const events = eventsToCustomEvents(['click', 'change', 'update:modelValue'])
182
+ * // {
183
+ * // click: { name: 'click', options: { bubbles: true, composed: true } },
184
+ * // change: { name: 'change', options: { bubbles: true, composed: true } },
185
+ * // 'update:modelValue': { name: 'update:modelValue', options: { bubbles: true, composed: true } },
186
+ * // }
187
+ * ```
188
+ */
189
+ export declare function eventsToCustomEvents(emits: string[] | Record<string, unknown>): Record<string, {
190
+ name: string;
191
+ options: {
192
+ bubbles: boolean;
193
+ composed: boolean;
194
+ cancelable: boolean;
195
+ detail?: any;
196
+ };
197
+ }>;
198
+ /**
199
+ * 注入样式到 Shadow DOM
200
+ *
201
+ * 创建 <style> 元素并添加到 Shadow Root 中。
202
+ * 支持追加模式和替换模式。
203
+ *
204
+ * @param styles - CSS 样式字符串
205
+ * @param shadowRoot - Shadow Root 引用
206
+ * @param options - 注入选项
207
+ *
208
+ * @example
209
+ * ```ts
210
+ * injectStyles(':host { display: block; }', element.shadowRoot)
211
+ * injectStyles('.new-style { color: red; }', element.shadowRoot, { append: true })
212
+ * ```
213
+ */
214
+ export declare function injectStyles(styles: string, shadowRoot: ShadowRoot, options?: {
215
+ append?: boolean;
216
+ id?: string;
217
+ }): HTMLStyleElement | null;
218
+ /**
219
+ * 添加 scoped 标识到 CSS
220
+ *
221
+ * 为所有选择器添加 scopeId 属性选择器前缀,
222
+ * 实现类似 Vue scoped CSS 的效果。
223
+ *
224
+ * @param css - 原始 CSS 字符串
225
+ * @param scopeId - scope 标识符(不含方括号)
226
+ * @returns 添加了 scoped 标识的 CSS
227
+ *
228
+ * @example
229
+ * ```ts
230
+ * const scoped = scopedCSS(
231
+ * '.container { color: red; } .container .title { font-size: 16px; }',
232
+ * 'data-v-abc123'
233
+ * )
234
+ * // '.container[data-v-abc123] { color: red; } .container[data-v-abc123] .title[data-v-abc123] { font-size: 16px; }'
235
+ * ```
236
+ */
237
+ export declare function scopedCSS(css: string, scopeId: string): string;
238
+ /**
239
+ * 生成唯一的 scope ID
240
+ *
241
+ * @param prefix - 前缀(默认 'data-v')
242
+ * @returns scope ID 字符串
243
+ *
244
+ * @example
245
+ * ```ts
246
+ * const scopeId = generateScopeId()
247
+ * // 'data-v-a1b2c3d4'
248
+ * ```
249
+ */
250
+ export declare function generateScopeId(prefix?: string): string;
127
251
  //# sourceMappingURL=web-component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"web-component.d.ts","sourceRoot":"","sources":["../../src/web-component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAM9D;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,oDAAoD;IACpD,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC7B,8BAA8B;IAC9B,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;IAC9B,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kCAAkC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACrC,uCAAuC;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACtC,yBAAyB;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC,CAAA;CAC7D;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,kBAAkB;IAClB,SAAS,EAAE,gBAAgB,CAAA;IAC3B,wBAAwB;IACxB,OAAO,CAAC,EAAE,oBAAoB,CAAA;CAC/B;AAMD;;GAEG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAOnC;AAurBD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,CAAC,EAAE,oBAAoB,GAC7B,IAAI,CAsBN;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,qBAAqB,EAAE,GAClC,IAAI,CAIN;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAgBvD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,IAAI,CAAC,CA6Df"}
1
+ {"version":3,"file":"web-component.d.ts","sourceRoot":"","sources":["../../src/web-component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAM9D;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,oDAAoD;IACpD,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC7B,8BAA8B;IAC9B,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;IAC9B,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kCAAkC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACrC,uCAAuC;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACtC,yBAAyB;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC,CAAA;CAC7D;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,kBAAkB;IAClB,SAAS,EAAE,gBAAgB,CAAA;IAC3B,wBAAwB;IACxB,OAAO,CAAC,EAAE,oBAAoB,CAAA;CAC/B;AAMD;;GAEG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAOnC;AAwrBD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,CAAC,EAAE,oBAAoB,GAC7B,IAAI,CAsBN;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,qBAAqB,EAAE,GAClC,IAAI,CAIN;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAgBvD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,IAAI,CAAC,CA6Df;AAMD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,GAAE,MAAM,EAAO,GACrB,MAAM,EAAE,CAIV;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,YAAY,EACxB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACrC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC,GAClD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAuBzB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACxC,MAAM,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,GAAG,CAAA;KAAE,CAAA;CAAE,CAAC,CAmBvH;AAMD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9C,gBAAgB,GAAG,IAAI,CAiCzB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CA4C9D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,MAAM,GAAE,MAAiB,GAAG,MAAM,CAOjE"}
@@ -1,6 +1,2 @@
1
- "use strict";var xe=Object.defineProperty;var Cn=Object.getOwnPropertyDescriptor;var Sn=Object.getOwnPropertyNames;var Rn=Object.prototype.hasOwnProperty;var v=(e,t)=>()=>(e&&(t=e(e=0)),t);var se=(e,t)=>{for(var n in t)xe(e,n,{get:t[n],enumerable:!0})},we=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Sn(t))!Rn.call(e,o)&&o!==n&&xe(e,o,{get:()=>t[o],enumerable:!(r=Cn(t,o))||r.enumerable});return e},X=(e,t,n)=>(we(e,t,"default"),n&&we(n,t,"default"));var _n=e=>we(xe({},"__esModule",{value:!0}),e);function j(e,t,n,r){return{start:e,end:t,line:n,column:r}}function ue(e){return{type:"Root",children:[],helpers:new Set,loc:e}}function fe(e,t,n=!1){return{type:"Element",tag:e,props:[],children:[],isComponent:/^[A-Z]/.test(e),directives:[],staticFlag:-1,isSelfClosing:n,loc:t}}function pe(e,t){return{type:"Text",content:e,isExpression:/\{\{.*?\}\}/s.test(e),staticFlag:-1,loc:t}}function de(e,t,n){return{type:"Attribute",name:e,value:t,isDynamic:/^:|^v-bind:/.test(e),isEvent:/^@|^v-on:/.test(e),loc:n}}function _(e,t,n="",r=[],o={start:0,end:0,line:1,column:1}){return{type:"Directive",name:e,value:t,arg:n,modifiers:r,loc:o}}var Pe=v(()=>{"use strict"});function Ie(e){let t=new Oe(e);for(;!t.isEOF();)switch(t.state){case 0:In(t);break;case 1:Fn(t);break;case 2:jn(t);break;case 3:Dn(t);break;case 4:Ln(t);break;case 5:Mn(t);break}return gt(t),t.root}function In(e){for(e.textBuffer===""&&(e.textStart=e.pos);!e.isEOF();){let t=e.peek();if(t==="<"){gt(e),e.advance(),e.state=1;return}if(t==="{"&&e.peekAt(1)==="{"){for(e.textBuffer+=e.advance(),e.textBuffer+=e.advance();!e.isEOF();){let n=e.peek();if(e.textBuffer+=e.advance(),n==="}"&&e.peek()==="}"){e.textBuffer+=e.advance();break}}continue}e.textBuffer+=e.advance()}}function Fn(e){if(e.skipWhitespace(),e.startsWith("!--")){e.state=5,e.commentBuffer="",e.advance(),e.advance(),e.advance();return}e.peek()==="/"?(e.isClosingTag=!0,e.advance()):e.isClosingTag=!1,e.tagNameBuffer="",e.tagNameStart=e.pos,e.state=2}function jn(e){for(;!e.isEOF();){let r=e.peek();if(/\s/.test(r)||r===">"||r==="/")break;e.tagNameBuffer+=e.advance()}if(e.isClosingTag){e.state=4;return}let t=j(e.tagNameStart,e.pos,e.line,e.column-e.tagNameBuffer.length),n=fe(e.tagNameBuffer.toLowerCase(),t);e.currentElement=n,e.state=3}function Dn(e){if(e.skipWhitespace(),e.isEOF())return;let t=e.peek();if(t===">"){e.advance(),ht(e);return}if(t==="/"&&e.peekAt(1)===">"){e.advance(),e.advance(),ht(e,!0);return}e.attrNameBuffer="",e.attrValueBuffer="",e.inAttrValue=!1,e.attrValueQuote="";let n=e.pos;for(;!e.isEOF();){let i=e.peek();if(/\s/.test(i)||i==="="||i===">"||i==="/")break;e.attrNameBuffer+=e.advance()}if(e.skipWhitespace(),e.peek()==="="){e.advance(),e.skipWhitespace();let i=e.peek();if(i==='"'||i==="'")for(e.attrValueQuote=i,e.advance(),e.inAttrValue=!0;!e.isEOF();){if(e.peek()===e.attrValueQuote){e.advance(),e.inAttrValue=!1;break}e.attrValueBuffer+=e.advance()}else for(;!e.isEOF();){let s=e.peek();if(/\s/.test(s)||s===">"||s==="/")break;e.attrValueBuffer+=e.advance()}}let r=j(n,e.pos,e.line,e.column),o=Bn(e.attrNameBuffer,e.attrValueBuffer||null,r);e.currentElement&&(o.type==="Directive"?e.currentElement.directives.push(o):e.currentElement.props.push(o))}function Ln(e){e.skipWhitespace(),e.peek()===">"&&e.advance();let t=e.tagNameBuffer.toLowerCase(),n=!1;for(let r=e.parentStack.length-1;r>=0;r--)if(e.parentStack[r].tag===t){e.parentStack.splice(r),e.currentElement=e.parentStack.length>0?e.parentStack[e.parentStack.length-1]:null,n=!0;break}e.state=0}function Mn(e){for(;!e.isEOF();){if(e.startsWith("-->")){e.advance(),e.advance(),e.advance(),e.state=0;return}e.commentBuffer+=e.advance()}}function gt(e){let t=e.textBuffer.trim();if(t.length===0){e.textBuffer="";return}let n=pe(t,j(e.textStart,e.pos,e.line,e.column));e.currentElement?e.currentElement.children.push(n):e.root.children.push(n),e.textBuffer=""}function ht(e,t=!1){if(!e.currentElement)return;e.currentElement.isSelfClosing=t;let n=Pn.has(e.currentElement.tag),r=e.parentStack.length>0?e.parentStack[e.parentStack.length-1]:null;r?r.children.push(e.currentElement):e.root.children.push(e.currentElement),!t&&!n?e.parentStack.push(e.currentElement):e.currentElement=r,e.state=0}function Bn(e,t,n){if(e.startsWith("v-")){let r=e.slice(2);if(r.startsWith("on")){let s=r.slice(2),f=s.indexOf("."),p=s,m=[];return f!==-1&&(p=s.slice(0,f),m.push(...s.slice(f+1).split("."))),_("on",t||"",p,m,n)}if(r.startsWith("bind")){let s=r.slice(4).replace(/^:/,"");return _("bind",t||"",s,[],n)}if(r.startsWith("slot")){let s=r.slice(4).replace(/^:/,"");return _("slot",t||"",s,[],n)}if(r==="model")return _("bind",t||"","model",[],n);if(r==="ref")return _("ref",t||"","",[],n);let o=r.indexOf(":"),i=o!==-1?r.slice(0,o):r;if(On.has(i)){let s=o!==-1?r.slice(o+1):"";return _(i,t||"",s,[],n)}}if(e.startsWith(":")){let r=e.slice(1);return _("bind",t||"",r,[],n)}if(e.startsWith("@")){let r=e.slice(1),o=r.indexOf("."),i=r,s=[];return o!==-1&&(i=r.slice(0,o),s.push(...r.slice(o+1).split("."))),_("on",t||"",i,s,n)}if(e.startsWith("#")){let r=e.slice(1);return _("slot",t||"",r,[],n)}return de(e,t,n)}var Pn,On,Oe,yt=v(()=>{"use strict";Pe();Pn=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),On=new Set(["if","each","bind","on","slot","ref"]),Oe=class{constructor(t){this.template=t,this.pos=0,this.line=1,this.column=1,this.state=0,this.root=ue(j(0,t.length,1,1)),this.currentElement=null,this.parentStack=[],this.textBuffer="",this.textStart=0,this.tagNameBuffer="",this.tagNameStart=0,this.attrNameBuffer="",this.attrValueBuffer="",this.attrValueQuote="",this.inAttrValue=!1,this.commentBuffer="",this.isClosingTag=!1}currentPos(){return j(this.pos,this.pos,this.line,this.column)}advance(){let t=this.template[this.pos++];return t===`
2
- `?(this.line++,this.column=1):this.column++,t}peek(){return this.template[this.pos]||""}peekAt(t){return this.template[this.pos+t]||""}isEOF(){return this.pos>=this.template.length}startsWith(t){return this.template.substring(this.pos,this.pos+t.length)===t}skipWhitespace(){for(;!this.isEOF()&&/\s/.test(this.peek());)this.advance()}}});function je(e,t={}){let n=new q(e,t),r=[Vn,$n,Wn,Hn,Kn,Gn],o=[...t.nodeTransforms||[],...r];me(e,n,o),Fe(e,n)}function me(e,t,n){t.parent=e;for(let r of n){let o=r(e,t);if(o&&t.onExitCallbacks.push(i=>o()),t.replaceNode){let i=t.replaceNode;t.replaceNode=null,me(i,t,n);return}if(t.removeNode){t.removeNode=null;return}}switch(e.type){case"Root":for(let r=0;r<e.children.length;r++)t.childIndex=r,me(e.children[r],t,n);break;case"Element":for(let r=0;r<e.children.length;r++)t.childIndex=r,me(e.children[r],t,n);break}}function Fe(e,t){let n=t.onExitCallbacks.splice(0);for(let r of n)r(e);switch(e.type){case"Root":for(let r of e.children)Fe(r,t);break;case"Element":for(let r of e.children)Fe(r,t);break}}function Vn(e,t){if(e.type!=="Element")return;let n=e.directives.find(r=>r.name==="if");n&&(Object.assign(e,{ifCondition:n.value,ifBranches:[]}),t.root.helpers.add("createConditionalVNode"),e.directives=e.directives.filter(r=>r!==n))}function $n(e,t){if(e.type!=="Element")return;let n=e.directives.find(o=>o.name==="each");if(!n)return;let r=Un(n.value);r&&(Object.assign(e,{eachInfo:r}),t.root.helpers.add("renderList")),e.directives=e.directives.filter(o=>o!==n)}function Wn(e,t){if(e.type!=="Element")return;let n=e.directives.filter(o=>o.name==="bind");if(n.length===0)return;let r=[];for(let o of n){let i=o.arg==="model";r.push({arg:o.arg,value:o.value,isModel:i}),i&&t.root.helpers.add("createModelBinding")}Object.assign(e,{bindings:r}),e.directives=e.directives.filter(o=>o.name!=="bind")}function Hn(e,t){if(e.type!=="Element")return;let n=e.directives.filter(o=>o.name==="on");if(n.length===0)return;let r=[];for(let o of n)r.push({name:o.arg,value:o.value,modifiers:o.modifiers}),t.root.helpers.add("createEventHandler");Object.assign(e,{events:r}),e.directives=e.directives.filter(o=>o.name!=="on")}function Kn(e,t){if(e.type!=="Element")return;let n=e.directives.find(r=>r.name==="slot");n&&(Object.assign(e,{slotInfo:{name:n.arg||"default",value:n.value}}),t.root.helpers.add("renderSlot"),e.directives=e.directives.filter(r=>r!==n))}function Gn(e,t){if(e.type!=="Element")return;let n=e.directives.find(r=>r.name==="ref");n&&(Object.assign(e,{refInfo:{name:n.value}}),t.root.helpers.add("createRef"),e.directives=e.directives.filter(r=>r!==n))}function Un(e){let t=e.match(/^\s*(?:\((\w+)\s*,\s*(\w+)\)|(\w+))\s+(?:in|of)\s+(\S+)\s*$/);return t?{item:t[1]||t[3],index:t[2]||"",collection:t[4]}:null}var q,De=v(()=>{"use strict";q=class{constructor(t,n={}){this.root=t,this.parent=null,this.childIndex=0,this.options={markStatic:!0,...n},this.onExitCallbacks=[],this.replaceNode=null,this.removeNode=null}}});function Le(e){let t={hoistedNodes:[],hoistedNames:[]},n=0;for(let r of e.children)bt(r,t,()=>(n++,`_hoisted_${n}`));return t}function bt(e,t,n){switch(e.type){case"Text":return Yn(e,t,n);case"Element":return zn(e,t,n);default:return!1}}function Yn(e,t,n){return e.isExpression?(e.staticFlag=0,!1):(e.staticFlag=1,!0)}function zn(e,t,n){if(e.directives.length>0)return e.staticFlag=0,!1;let r=e;if(r.ifCondition||r.eachInfo||r.bindings&&r.bindings.length>0||r.events&&r.events.length>0||r.slotInfo||r.refInfo)return e.staticFlag=0,!1;for(let i of e.props)if(i.isDynamic||i.isEvent)return e.staticFlag=0,!1;let o=!0;for(let i of e.children)bt(i,t,n)||(o=!1);if(o){if(e.staticFlag=1,e.children.length>0){let i=n();t.hoistedNodes.push(e),t.hoistedNames.push(i),e.hoistedName=i}return!0}return e.staticFlag=0,!1}function Me(e){if(e.type==="Text")return!e.isExpression;if(e.type==="Element"){if(e.staticFlag!==-1)return e.staticFlag===1;let t=e;if(e.directives.length>0||t.ifCondition||t.eachInfo||t.bindings&&t.bindings.length>0||t.events&&t.events.length>0||t.slotInfo||t.refInfo)return!1;for(let n of e.props)if(n.isDynamic||n.isEvent)return!1;for(let n of e.children)if(!Me(n))return!1;return!0}return!1}var vt=v(()=>{"use strict"});var Be,Tt=v(()=>{"use strict";Be=(l=>(l[l.TEXT=1]="TEXT",l[l.CLASS=2]="CLASS",l[l.STYLE=4]="STYLE",l[l.PROPS=8]="PROPS",l[l.FULL_PROPS=16]="FULL_PROPS",l[l.EVENT=32]="EVENT",l[l.SLOTS=64]="SLOTS",l[l.STABLE_FRAGMENT=128]="STABLE_FRAGMENT",l[l.KEYED_FRAGMENT=256]="KEYED_FRAGMENT",l[l.UNKEYED_FRAGMENT=512]="UNKEYED_FRAGMENT",l[l.NEED_PATCH=1024]="NEED_PATCH",l[l.DYNAMIC_SLOTS=2048]="DYNAMIC_SLOTS",l[l.HOISTED=-1]="HOISTED",l[l.BAIL=-2]="BAIL",l))(Be||{})});function He(e,t={}){let n=new he;if(Xn(e,n),n.hoistedDecls.length>0){for(let r of n.hoistedDecls)n.pushLine(r);n.newline()}return qn(e.children,n),{code:n.code,hoisted:n.hoistedDecls,helpers:Array.from(n.helpers.keys())}}function Xn(e,t){t.helpers.set("h","Lyt");for(let n of e.helpers)switch(n){case"createConditionalVNode":break;case"renderList":t.helpers.set("renderList","Lyt");break;case"createModelBinding":break;case"createEventHandler":break;case"renderSlot":t.helpers.set("renderSlot","Lyt");break;case"createRef":break;default:t.helpers.set(n,"Lyt")}}function qn(e,t){if(e.length===0){t.push("null");return}if(e.length===1){$e(e[0],t);return}t.push("["),t.indentIn();for(let n=0;n<e.length;n++)n>0&&t.pushLine(","),$e(e[n],t);t.indentOut(),t.pushLine(""),t.push("]")}function $e(e,t){switch(e.type){case"Element":Jn(e,t);break;case"Text":tr(e,t);break}}function Jn(e,t){let n=e;if(n.ifCondition){let r=n.ifCondition;t.push(`(${k(r)} ? (`),Ve(e,t),t.push(") : null)");return}if(n.eachInfo){let r=n.eachInfo;t.push(`renderList(${k(r.collection)}, (${r.item}`),r.index&&t.push(`, ${r.index}`),t.push(") => "),Ve(e,t),t.push(")");return}Ve(e,t)}function Ve(e,t){let n=e,r=Qn(e,t),o=er(e.children,t),i=e.isComponent?e.tag:`'${e.tag}'`;t.push(`h(${i}`),t.push(r?`, ${r}`:", null"),o&&o!=="null"&&t.push(`, ${o}`),t.push(")")}function Qn(e,t){let n=e,r=[],o=Zn(e);if(o&&r.push(o),n.bindings){let i=n.bindings;for(let s of i)s.isModel?r.push(`model: { value: ${k(s.value)}, callback: $event => ${k(s.value)} = $event }`):r.push(`'${s.arg}': ${k(s.value)}`)}if(n.events){let i=n.events;for(let s of i){let f=`on${sr(s.name)}`,p=k(s.value);if(s.modifiers.length>0){let m=s.modifiers.map(g=>{switch(g){case"stop":return"$event.stopPropagation()";case"prevent":return"$event.preventDefault()";case"capture":return null;case"once":return null;default:return null}}).filter(Boolean);m.length>0&&(p=`($event) => { ${m.join("; ")}; ${k(s.value)}($event) }`)}r.push(`'${f}': ${p}`)}}if(n.refInfo){let i=n.refInfo;r.push(`ref: '${i.name}'`)}if(n.slotInfo){let i=n.slotInfo;r.push(`'slot': '${i.name}'`)}return r.length===0?"":`{ ${r.join(", ")} }`}function Zn(e){let t=[];for(let n of e.props)n.isDynamic||n.isEvent||(n.value===null?t.push(`'${n.name}': true`):t.push(`'${n.name}': '${We(n.value)}'`));return t.join(", ")}function er(e,t){if(e.length===0)return"";let n=[],r=new he;for(let o of e)$e(o,r),n.push(r.code),r.code="";return n.length===0?"":n.length===1?n[0]:`[${n.join(", ")}]`}function tr(e,t){if(!e.isExpression){t.push(`'${We(e.content)}'`);return}let n=ir(e.content);if(n.length===1&&n[0].type==="expression"){t.push(k(n[0].value));return}let r=n.map(o=>o.type==="text"?`'${We(o.value)}'`:k(o.value));t.push(r.join(" + "))}function ir(e){let t=[],n=/\{\{([\s\S]*?)\}\}/g,r=0,o;for(;(o=n.exec(e))!==null;)o.index>r&&t.push({type:"text",value:e.slice(r,o.index)}),t.push({type:"expression",value:o[1].trim()}),r=n.lastIndex;return r<e.length&&t.push({type:"text",value:e.slice(r)}),t}function k(e){if(e=e.trim(),e.startsWith("_ctx."))return e;if(/^\w+(\.\w+)*$/.test(e))return`_ctx.${e}`;if(e.match(/^(\w+(?:\.\w+)*)\s*\(/))return`_ctx.${e}`;if(e.includes("=>"))return e;let n=[],r=e.replace(/(['"`])(?:(?!\1|\\).|\\.)*\1/g,o=>(n.push(o),`__PH${n.length-1}__`));r=r.replace(/(?<!_ctx\.)(?<!\w)(\w+(?:\.\w+)*)/g,o=>nr.has(o)||rr.has(o)||or.has(o)||/^\d/.test(o)||/^__PH\d+__$/.test(o)?o:`_ctx.${o}`);for(let o=0;o<n.length;o++)r=r.replace(`__PH${o}__`,n[o]);return r}function We(e){return e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}function sr(e){return e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join("")}var he,nr,rr,or,Et=v(()=>{"use strict";he=class{constructor(){this.code="",this.indentLevel=0,this.indent=" ",this.needsNewline=!0,this.helpers=new Map,this.hoistedDecls=[]}push(t){this.needsNewline&&(this.code+=this.indent.repeat(this.indentLevel),this.needsNewline=!1),this.code+=t}pushLine(t){this.push(t),this.newline()}newline(){this.code+=`
3
- `,this.needsNewline=!0}indentIn(){this.indentLevel++}indentOut(){this.indentLevel--}};nr=new Set(["true","false","null","undefined","this","super","new","delete","typeof","instanceof","in","of","void","throw","return","yield","await","async","if","else","for","while","do","switch","case","break","continue","try","catch","finally","class","extends","import","export","from","default","var","let","const","function","debugger"]),rr=new Set(["console","window","document","Math","JSON","Date","Array","Object","String","Number","Boolean","RegExp","Error","TypeError","RangeError","SyntaxError","Map","Set","WeakMap","WeakSet","Promise","Symbol","Proxy","Reflect","parseInt","parseFloat","isNaN","isFinite","NaN","Infinity"]),or=new Set(["$event","$refs","$el","$emit","$slots","$parent","$root"])});function ur(e){let t={};if(!e||!e.trim())return t;Rt.lastIndex=0;let n;for(;(n=Rt.exec(e))!==null;){let r=n[1],o=n[2]!==void 0?n[2]:n[3]!==void 0?n[3]:n[4]!==void 0?n[4]:"";t[r]=o}return t}function fr(e,t,n,r){let o=1,i=r;for(;i<e.length&&o>0;){let s=e.slice(i).search(t),f=e.indexOf(n,i);if(f===-1)return-1;if(s!==-1&&s+i<f)o++,i=s+i+1;else{if(o--,o===0)return f+n.length;i=f+n.length}}return-1}function Ke(e,t,n){t.lastIndex=0;let r=t.exec(e);if(!r)return null;let o=r.index,i=r[1]||"",s=ur(i),f=r.index+r[0].length,p=fr(e,t,n,f);return p===-1?null:{content:e.slice(f,p-n.length).trim(),start:o,end:p,attrs:s}}function J(e,t="anonymous.lyt"){let n=e.replace(ar,""),r=Ke(n,lr,"</template>"),o=r?{type:"template",content:r.content,start:r.start,end:r.end,attrs:r.attrs}:null,i=Ke(n,cr,"<\/script>"),s=i?{type:"script",content:i.content,start:i.start,end:i.end,attrs:i.attrs}:null,f=[],p=n;for(Ct.lastIndex=0;;){let m=Ke(p,Ct,"</style>");if(!m)break;f.push({type:"style",content:m.content,start:m.start,end:m.end,attrs:m.attrs,scoped:"scoped"in m.attrs}),p=p.slice(m.end)}return{filename:t,template:o,script:s,styles:f}}function Ge(e){St.lastIndex=0;let t=St.exec(e);return t?t[1].trim():null}var ar,lr,cr,Ct,St,Rt,ge=v(()=>{"use strict";ar=/<!--[\s\S]*?-->/g,lr=/<template(\s[^>]*)?\s*>/,cr=/<script(\s[^>]*)?\s*>/,Ct=/<style(\s[^>]*)?\s*>/,St=/export\s+default\s*\{([\s\S]*?)\}\s*$/,Rt=/(\w[\w-]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|(\S+)))?/g});function dr(e,t){let n=5381,r=e+"\0"+t;for(let o=0;o<r.length;o++)n=(n<<5)+n+r.charCodeAt(o)&4294967295;return pr+(n>>>0).toString(16).slice(0,6)}function Q(e,t){let n="",r=0,o=e.length;for(;r<o;){if(e[r]==="@"){let m=e.slice(r).match(/^@([\w-]+)/);if(m){let g=m[1];if(["keyframes","-webkit-keyframes","-moz-keyframes","font-face"].includes(g)){let c=e.indexOf("{",r+m[0].length);if(c!==-1){let d=Ue(e,c+1);if(d!==-1){n+=e.slice(r,d),r=d;continue}}}if(["media","supports","document"].includes(g)){let c=e.indexOf("{",r+m[0].length);if(c!==-1){let d=Ue(e,c+1);if(d!==-1){let l=e.slice(r,c+1),h=e.slice(c+1,d-1),u=Q(h,t);n+=l+u+"}",r=d;continue}}}let a=e.indexOf(";",r);if(a!==-1){n+=e.slice(r,a+1),r=a+1;continue}}}let i=e.indexOf("{",r);if(i===-1){n+=e.slice(r);break}let s=e.slice(r,i).trim();if(!s){n+=e.slice(r,i+1),r=i+1;continue}let f=Ue(e,i+1);if(f===-1){n+=e.slice(r);break}let p=mr(s,t);n+=p+e.slice(i,f),r=f}return n}function Ue(e,t){let n=1,r=t;for(;r<e.length&&n>0;)e[r]==="{"?n++:e[r]==="}"&&n--,r++;return n===0?r:-1}function mr(e,t){return hr(e).map(r=>gr(r.trim(),t)).join(", ")}function hr(e){let t=[],n=0,r="";for(let o=0;o<e.length;o++){let i=e[o];i==="("?(n++,r+=i):i===")"?(n--,r+=i):i===","&&n===0?(t.push(r),r=""):r+=i}return r.trim()&&t.push(r),t}function gr(e,t){let n=/(::(?:before|after|first-line|first-letter|selection|placeholder|backdrop|marker|spelling-error|grammar-error)[\s\S]*)$/,r=e.match(n),o=e,i="";r&&(o=e.slice(0,e.length-r[0].length),i=r[0]);let s=/(:(?:hover|focus|active|visited|link|first-child|last-child|nth-child\([^)]*\)|nth-of-type\([^)]*\)|not\([^)]*\)|root|empty|checked|disabled|enabled|valid|invalid|required|optional|read-only|read-write)[\s\S]*)$/,f=o.match(s),p=o,m="";return f&&(p=o.slice(0,o.length-f[0].length),m=f[0]),p=p.replace(/\s+$/,""),`${p}[${t}]${m}${i}`}function Ye(e){let{template:t,script:n,styles:r,filename:o}=e,i=[(t==null?void 0:t.content)||"",(n==null?void 0:n.content)||"",...r.map(a=>a.content)].join("\0"),s=dr(o,i),f="null";t&&(f=`function(_ctx) { return ${ze(t.content).code} }`);let p="{}";if(n){let a=Ge(n.content);a&&(p=`{ ${a} }`)}let m=[];for(let a of r){let c=a.content;a.scoped&&(c=Q(c,s)),m.push(c)}return{code:yr(f,p,s,m),styles:m,scopedId:s}}function yr(e,t,n,r){let o=[];if(o.push("// Generated by Lyt.js SFC Compiler"),o.push(""),o.push(`const _sfcId = '${n}'`),o.push(""),r.length>0){o.push("const _styles = [");for(let i of r)o.push(` ${JSON.stringify(i)},`);o.push("]"),o.push(""),o.push("function _injectStyles() {"),o.push(" if (typeof document === 'undefined') {"),o.push(" throw new Error('[Lyt Compiler] SFC \u7F16\u8BD1\u9700\u8981 DOM \u73AF\u5883')"),o.push(" }"),o.push(" for (const css of _styles) {"),o.push(' const style = document.createElement("style")'),o.push(' style.setAttribute("data-sfc-id", _sfcId)'),o.push(" style.textContent = css"),o.push(" document.head.appendChild(style)"),o.push(" }"),o.push("}"),o.push(""),o.push("_injectStyles()"),o.push("")}return o.push("export default {"),o.push(" __sfcId: _sfcId,"),o.push(` render: ${e},`),o.push(` ...${t},`),o.push("}"),o.join(`
4
- `)}var pr,_t=v(()=>{"use strict";Xe();ge();pr="data-v-"});var Nt=v(()=>{"use strict";ge();_t()});function br(e){let t=e.match(/props:\s*(\{[^}]+\}|\[[^\]]+\])/);return t?t[1]:null}function vr(e){let t=e.match(/emits:\s*(\{[^}]+\}|\[[^\]]+\])/);return t?t[1]:null}function qe(e,t={}){let{filename:n="Component"}=t,r=n.replace(/\.lyt$/,""),o=[];if(o.push("/**"),o.push(` * ${r} \u7EC4\u4EF6\u7C7B\u578B\u58F0\u660E`),o.push(" * \u7531 @lytjs/compiler \u81EA\u52A8\u751F\u6210"),o.push(" */"),o.push(""),o.push("export interface ComponentProps {"),e.script){let i=br(e.script.content);i&&o.push(` // Props \u5B9A\u4E49: ${i}`)}if(o.push(" [key: string]: any;"),o.push("}"),o.push(""),o.push("export interface ComponentEmits {"),e.script){let i=vr(e.script.content);i&&o.push(` // Emits \u5B9A\u4E49: ${i}`)}return o.push(" [key: string]: (...args: any[]) => any;"),o.push("}"),o.push(""),o.push("/**"),o.push(" * \u7EC4\u4EF6\u7C7B\u578B\u5B9A\u4E49"),o.push(" */"),o.push("declare const component: import('@lytjs/component').ComponentDefine;"),o.push(""),o.push("export default component;"),o.join(`
5
- `)}function Je(e,t="Component.lyt"){let n=J(e,t);return qe(n,{filename:t,generateDts:!0})}function wt(){return{name:"lytjs-types",transform(e,t){if(t.endsWith(".lyt")){let n=Je(e,t);return{code:e,map:null,dts:n}}return null}}}var xt=v(()=>{"use strict";ge()});var kt={};se(kt,{CompilerPatchFlags:()=>Be,TransformContext:()=>q,compile:()=>ze,compileSFC:()=>Ye,createAttributeNode:()=>de,createDirectiveNode:()=>_,createElementNode:()=>fe,createPosition:()=>j,createRootNode:()=>ue,createTextNode:()=>pe,createTypePlugin:()=>wt,generate:()=>He,generateDtsForLytFile:()=>Je,generateTypeDeclarations:()=>qe,isStatic:()=>Me,optimize:()=>Le,parseHTML:()=>Ie,parseSFC:()=>J,scopeCSS:()=>Q,transform:()=>je});function ze(e,t={}){let n=Ie(e);je(n,t.transform);let r=Le(n),o=He(n,t.codegen);return{code:o.code,ast:n,hoistResult:r,helpers:o.helpers}}var Xe=v(()=>{"use strict";Pe();yt();De();De();vt();Tt();Et();Nt();xt()});function be(){Pt.push(ye),ye=!1}function ve(){let e=Pt.pop();ye=e===void 0?!0:e}function At(e){let{deps:t}=e;for(let n of t)n.delete(e);t.clear()}function T(e,t){if(!ye||!E)return;let n=Qe.get(e);n||(n=new Map,Qe.set(e,n));let r=n.get(t);r||(r=new Set,n.set(t,r)),r.has(E)||(r.add(E),E.deps.add(r))}function C(e,t,n,r){let o=Qe.get(e);if(!o)return;let i=new Set,s=f=>{if(f)for(let p of f)(p!==E||p.allowRecurse)&&i.add(p)};if(s(o.get(t)),(n==="add"||n==="delete")&&s(o.get($)),n==="set"&&Array.isArray(e)){let f=o.get("length");f&&typeof t=="number"&&t<e.length&&s(f)}for(let f of i)f.scheduler?f.scheduler(f):f.run()}function Ot(e,t={}){let n=new w(e,t);t.lazy||n.run();let r=n.run.bind(n);return r.effect=n,r.stop=()=>n.stop(),r}function It(e){var t;(t=e==null?void 0:e.effect)==null||t.stop()}var E,Z,Tr,Qe,w,ye,Pt,$,K=v(()=>{"use strict";E=null,Z=[],Tr=0,Qe=new WeakMap,w=class{constructor(t,n={}){this.active=!0;this.deps=new Set;this.fn=t,this.scheduler=n.scheduler,this.beforeRun=n.beforeRun,this.afterRun=n.afterRun,this.lazy=n.lazy,this.id=Tr++}run(){var t,n;if(!this.active)return this.fn();if(Z.includes(this))return this.fn();try{return(t=this.beforeRun)==null||t.call(this),Z.push(this),E=this,At(this),this.fn()}finally{(n=this.afterRun)==null||n.call(this),Z.pop(),E=Z[Z.length-1]||null}}stop(){this.active&&(At(this),this.onStop&&this.onStop(),this.active=!1)}},ye=!0,Pt=[];$=Symbol("iterate")});function ee(e){return e!==null&&typeof e=="object"}function Mt(e,t){return!Object.is(e,t)}function Te(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Bt(e){return typeof e=="string"&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e}function te(e,t={}){if(!ee(e)||e[W])return e;if(e[A])return Ce(e);let n=Ft.get(e);if(n)return n;let r=new Proxy(e,Er);return Ft.set(e,r),r}function Ce(e){if(!ee(e))return e;let t=jt.get(e);if(t)return t;e[A]=!0;let n=new Proxy(e,Cr);return jt.set(e,n),n}function Vt(e){if(!ee(e))return e;let t=Dt.get(e);if(t)return t;let n=new Proxy(e,Sr);return Dt.set(e,n),n}function D(e){let t=e&&e[P];return t?D(t):e}function G(e){return Ze(e)?G(e[P]):!!(e&&e[W])}function Ze(e){return!!(e&&e[A])}function $t(e){return e[A]=!0,e}function Wt(e){return e[Lt]=!0,e}var A,P,W,Lt,Ft,jt,Dt,Ee,Er,Cr,Sr,Se=v(()=>{"use strict";K();A=Symbol("readonly"),P=Symbol("raw"),W=Symbol("reactive"),Lt=Symbol("skip"),Ft=new WeakMap,jt=new WeakMap,Dt=new WeakMap;Ee={};["includes","indexOf","lastIndexOf"].forEach(e=>{Ee[e]=function(...t){let n=D(this);for(let r=0;r<n.length;r++)T(n,String(r));return T(n,"length"),n[e](...t)}});["push","pop","shift","unshift","splice","sort","reverse"].forEach(e=>{Ee[e]=function(...t){be();let n=Array.prototype[e].apply(this,t);return ve(),C(D(this),"length","set",D(this).length),n}});Er={get(e,t,n){if(t===P)return e;if(t===W)return!0;if(Array.isArray(e)&&Ee.hasOwnProperty(t))return Ee[t];T(e,t);let r=Reflect.get(e,t,n);return t===A?e[A]===!0:!ee(r)||e[Lt]?r:te(r)},set(e,t,n,r){let o=e[t],i=Array.isArray(e)&&Bt(t)?Number(t)<e.length:Te(e,t),s=Reflect.set(e,t,n,r);return(e===(r==null?void 0:r[P])||e===D(r))&&(i?Mt(n,o)&&C(e,t,"set",n):C(e,t,"add",n)),s},deleteProperty(e,t){let n=Te(e,t),r=Reflect.deleteProperty(e,t);return r&&n&&C(e,t,"delete"),r},has(e,t){return T(e,t),Reflect.has(e,t)},ownKeys(e){return T(e,$),Reflect.ownKeys(e)}},Cr={get(e,t,n){if(t===P)return e;if(t===W||t===A)return!0;T(e,t);let r=Reflect.get(e,t,n);return ee(r)?Ce(r):r},set(e,t,n,r){return!1},deleteProperty(e,t){return!1},has(e,t){return T(e,t),Reflect.has(e,t)},ownKeys(e){return T(e,$),Reflect.ownKeys(e)}},Sr={get(e,t,n){return t===P?e:t===W?!0:(T(e,t),Reflect.get(e,t,n))},set(e,t,n,r){let o=e[t],i=Array.isArray(e)&&Bt(t)?Number(t)<e.length:Te(e,t),s=Reflect.set(e,t,n,r);return(e===(r==null?void 0:r[P])||e===D(r))&&(i?Mt(n,o)&&C(e,t,"set",n):C(e,t,"add",n)),s},deleteProperty(e,t){let n=Te(e,t),r=Reflect.deleteProperty(e,t);return r&&n&&C(e,t,"delete"),r},has(e,t){return T(e,t),Reflect.has(e,t)},ownKeys(e){return T(e,$),Reflect.ownKeys(e)}}});function Rr(e){return tt.get(e)||e}function Kt(e){if(O(e))return e;let t={_value:Gt(e),_rawValue:e,__v_isRef:!0,[U]:!0},n=new Proxy(t,_r);return tt.set(n,t),n}function Gt(e){return(0,Ht.isObject)(e)?te(e):e}function Ut(e){if(O(e))return e;let t={_value:e,_rawValue:e,__v_isRef:!0,__v_isShallow:!0,[U]:!0,[et]:!0},n=new Proxy(t,Nr);return tt.set(n,t),n}function O(e){return!!(e&&e.__v_isRef===!0)}function Yt(e){return O(e)?e.value:e}function nt(e,t){let n=e[t];return O(n)?n:new Proxy({_obj:e,_key:t,__v_isRef:!0},{get(r,o,i){return o==="value"?r._obj[r._key]:o==="__v_isRef"?!0:Reflect.get(r,o,i)},set(r,o,i,s){return o==="value"?(r._obj[r._key]=i,!0):Reflect.set(r,o,i,s)}})}function zt(e){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=nt(e,n));return t}function Xt(e){let t=Rr(e);C(t,"value","set",t._rawValue)}var Ht,U,et,tt,_r,Nr,rt=v(()=>{"use strict";K();Se();Ht=require("@lytjs/common"),U=Symbol("ref"),et=Symbol("shallowRef"),tt=new WeakMap;_r={get(e,t,n){return t==="value"?(T(e,"value"),e._value):t===U||t==="__v_isRef"?!0:t==="_rawValue"?e._rawValue:Reflect.get(e,t,n)},set(e,t,n,r){if(t==="value"){let o=e._rawValue;return Object.is(o,n)||(e._rawValue=n,e._value=Gt(n),C(e,"value","set",n)),!0}return Reflect.set(e,t,n,r)}};Nr={get(e,t,n){return t==="value"?(T(e,"value"),e._value):t===U||t==="__v_isRef"||t==="__v_isShallow"?!0:t==="_rawValue"?e._rawValue:Reflect.get(e,t,n)},set(e,t,n,r){if(t==="value"){let o=e._rawValue;return Object.is(o,n)||(e._rawValue=n,e._value=n,C(e,"value","set",n)),!0}return Reflect.set(e,t,n,r)}}});function qt(e){let t,n;return typeof e=="function"?(t=e,n=void 0):(t=e.get,n=e.set),new ot(t,n)}var ot,Jt=v(()=>{"use strict";K();ot=class{constructor(t,n){this._dirty=!0;this.__v_isRef=!0;this.deps=new Set;this._setter=n,this._effect=new w(t,{scheduler:()=>{this._dirty||(this._dirty=!0,this.triggerDep())},lazy:!0}),this._value=void 0}get value(){return T(this,"value"),E&&!this.deps.has(E)&&(this.deps.add(E),E.deps.add(this.deps)),this._dirty&&(this._value=this._effect.run(),this._dirty=!1),this._value}set value(t){this._setter&&this._setter(t)}triggerDep(){for(let t of this.deps)t.scheduler?t.scheduler(t):t.run()}}});function ne(e,t=1/0,n){if(!(0,I.isObject)(e)||t<=0||(n||(n=new Set),n.has(e)))return e;if(n.add(e),O(e))ne(e.value,t-1,n);else if(Array.isArray(e))for(let r=0;r<e.length;r++)ne(e[r],t-1,n);else for(let r of Object.keys(e))ne(e[r],t-1,n);return e}function Qt(e){return O(e)?()=>e.value:G(e)?()=>ne(e):typeof e=="function"?e:()=>ne(e)}function Zt(e,t,n={}){let r,o=!1;if(Array.isArray(e)){o=!0;let g=e.map(a=>Qt(a));r=()=>g.map(a=>a())}else r=Qt(e);G(e)&&n.deep!==!1&&(n.deep=!0);let i=o?[]:void 0,s,f=g=>{s=g},p=()=>{s&&(s(),s=void 0);let g=m.run();(o?g.some((a,c)=>!Object.is(a,i[c])):!Object.is(g,i)||n.deep&&(0,I.isObject)(g))&&(t(g,o?[...i]:i,f),i=o?[...g]:g)},m=new w(r,{lazy:!0,scheduler:()=>{n.flush==="sync"?p():(0,I.queueJob)(p)}});return n.immediate?p():i=m.run(),()=>{m.stop()}}function en(e,t={}){let n,r=()=>{n&&(n(),n=void 0),e(i=>{n=i})},o=new w(r,{scheduler:()=>{t.flush==="sync"?r():(0,I.queueJob)(r)}});return o.run(),()=>{o.stop(),n&&(n(),n=void 0)}}var I,tn=v(()=>{"use strict";K();rt();Se();I=require("@lytjs/common")});function Re(e){let t=e,n=new Set,r=function(){return x&&!re&&n.add(x),t};return r.set=function(o){Object.is(t,o)||(t=o,cn(n))},r.update=function(o){r.set(o(t))},r._subscribe=function(o){n.add(o)},r._unsubscribe=function(o){n.delete(o)},r.dispose=function(){n.clear()},r}function rn(e){let t,n=!0,r=!1,o=new Set,i=new Set,s=function(){if(x&&!re&&i.add(x),n){if(r)throw new nn.LytError("LYT_REACTIVITY_CIRCULAR_DEPENDENCY","computed \u5728\u5176\u81EA\u8EAB\u7684\u8BA1\u7B97\u56FE\u4E2D");r=!0;for(let g of o)g._unsubscribe(s);o.clear();let m=x;x=s;try{t=e()}finally{x=m,r=!1}n=!1}return t},f={_dirty:!1,notify(){n=!0,cn(i)}};return s.notify=f.notify.bind(f),s._dirty=!1,s._subscribe=function(p){i.add(p)},s._unsubscribe=function(p){i.delete(p)},s}function on(e){let t=null,n=!1,r=new Set,o=()=>{if(n)return;t&&(t(),t=null);for(let f of r)f._unsubscribe(i);r.clear();let s=x;x=i;try{e(f=>{t=f})}finally{x=s}},i={_dirty:!1,notify(){oe>0?Y.add(i):o()}};return o(),()=>{n=!0,t&&(t(),t=null);for(let s of r)s._unsubscribe(i);r.clear(),Y.delete(i)}}function sn(e){oe++;try{e()}finally{oe--,oe===0&&an()}}function an(){if(!it){it=!0;try{let e=new Set(Y);Y.clear();for(let t of e)t.notify();Y.size>0&&an()}finally{it=!1}}}function ln(e){let t=re;re=!0;try{return e()}finally{re=t}}function cn(e){if(oe>0)for(let t of e)Y.add(t);else for(let t of e)t.notify()}var nn,x,re,oe,Y,it,st=v(()=>{"use strict";nn=require("@lytjs/common"),x=null,re=!1,oe=0,Y=new Set,it=!1});function un(){return z.length>0?z[z.length-1]:null}function fn(e){return e()}function pn(e){let t=Re(e),n=o=>t.set(o),r=un();return[t,n]}function dn(){let e={_cleanupFns:[]};return z.push(e),()=>{for(let n of e._cleanupFns)n();e._cleanupFns.length=0;let t=z.indexOf(e);t!==-1&&z.splice(t,1)}}function mn(e){let t=un();t&&t._cleanupFns.push(e)}var z,hn=v(()=>{"use strict";st();z=[]});var gn={};se(gn,{ITERATE_KEY:()=>$,ReactiveEffect:()=>w,activeEffect:()=>E,batch:()=>sn,clearQueue:()=>L.clearQueue,computed:()=>qt,computedSignal:()=>rn,effect:()=>Ot,enterSignalComponentContext:()=>dn,hasPendingJob:()=>L.hasPendingJob,isReactive:()=>G,isReadonly:()=>Ze,isRef:()=>O,markReadOnly:()=>$t,markSkip:()=>Wt,nextTick:()=>I.nextTick,onSignalCleanup:()=>mn,pauseTracking:()=>be,queueJob:()=>L.queueJob,queuePostFlushCb:()=>L.queuePostFlushCb,rawSymbol:()=>P,reactive:()=>te,reactiveFlag:()=>W,readonly:()=>Ce,readonlyFlag:()=>A,ref:()=>Kt,refSymbol:()=>U,resetTracking:()=>ve,shallowReactive:()=>Vt,shallowRef:()=>Ut,shallowRefSymbol:()=>et,signal:()=>Re,signalEffect:()=>on,stop:()=>It,toRaw:()=>D,toRef:()=>nt,toRefs:()=>zt,track:()=>T,trigger:()=>C,triggerRef:()=>Xt,unref:()=>Yt,untrack:()=>ln,useSignal:()=>fn,useSignalState:()=>pn,watch:()=>Zt,watchEffect:()=>en});var L,yn=v(()=>{"use strict";K();Se();rt();Jt();tn();L=require("@lytjs/common");st();hn()});var Or={};se(Or,{defineCustomElement:()=>Ne,defineCustomElementFromSFC:()=>Tn,isBrowser:()=>_e,registerComponents:()=>bn,unregisterElement:()=>vn});module.exports=_n(Or);var V={};se(V,{Fragment:()=>ae.Fragment,ShapeFlags:()=>Ae,createApp:()=>mt,h:()=>N});var F=require("@lytjs/common"),ae=require("@lytjs/vdom");var Ae=(s=>(s[s.ELEMENT=1]="ELEMENT",s[s.FUNCTIONAL_COMPONENT=2]="FUNCTIONAL_COMPONENT",s[s.STATEFUL_COMPONENT=4]="STATEFUL_COMPONENT",s[s.TEXT_CHILDREN=8]="TEXT_CHILDREN",s[s.ARRAY_CHILDREN=16]="ARRAY_CHILDREN",s[s.SLOTS_CHILDREN=32]="SLOTS_CHILDREN",s))(Ae||{});function Nn(e,t){if(t!=null)if((0,F.isStringOrNumber)(t))e.children=String(t),e.shapeFlag|=8;else if((0,F.isArray)(t)){let n=[];for(let r=0;r<t.length;r++){let o=t[r];if(!(o==null||typeof o=="boolean"))if((0,F.isArray)(o))for(let i=0;i<o.length;i++){let s=o[i];s!=null&&typeof s!="boolean"&&n.push((0,F.isVNode)(s)?s:ke(String(s)))}else(0,F.isVNode)(o)?n.push(o):n.push(ke(String(o)))}e.children=n,e.shapeFlag|=16}else typeof t=="object"&&(e.children=t,e.shapeFlag|=32)}function ke(e,t=null,n=null){var p,m;let r=0;typeof e=="string"?r=1:e===ae.Fragment?r=0:typeof e=="function"?r=2:typeof e=="object"&&e!==null&&(e.setup||e.__vccOpts||e.render)&&(r=4);let o=(p=t==null?void 0:t.key)!=null?p:null,i=(m=t==null?void 0:t.ref)!=null?m:null,s=t;if(t){let{key:g,ref:a,...c}=t;s=c}let f={type:e,props:s,children:null,key:o,ref:i,shapeFlag:r,el:null,component:null};return n!=null&&Nn(f,n),f}function N(e,t,n){return ke(e,t||null,n||null)}var le=require("@lytjs/common");function at(e){return Object.create(e||null)}function lt(e){return e!==null&&typeof e=="object"&&typeof e.install=="function"}function ct(e){return typeof e=="function"}function ut(e,t,...n){if(lt(t)){let r=t.onBeforeInstall?t.onBeforeInstall(e,...n):void 0;if((0,le.isPromise)(r))return r.then(()=>{let o=t.install(e,...n);if((0,le.isPromise)(o))return o.then(()=>{if(t.onInstalled)return t.onInstalled(e,...n)});if(t.onInstalled)return t.onInstalled(e,...n)});{let o=t.install(e,...n);if((0,le.isPromise)(o))return o.then(()=>{if(t.onInstalled)return t.onInstalled(e,...n)});if(t.onInstalled)return t.onInstalled(e,...n)}}else if(ct(t))return t(e,...n)}function ft(e,t){if(lt(t)){if(typeof t.uninstall=="function")return t.uninstall(e)}else ct(t)}var ce=require("@lytjs/reactivity"),pt=require("@lytjs/compiler"),R=require("@lytjs/component"),dt=require("@lytjs/renderer"),wn=100,B=new Map;function xn(e){let t=B.get(e);if(t)return B.delete(e),B.set(e,t),t;let{code:n}=(0,pt.compile)(e);if(t=new Function("h","_ctx",`return ${n}`),B.size>=wn){let r=B.keys().next().value;r!==void 0&&B.delete(r)}return B.set(e,t),t}function kn(e){let t={...e};if(e.state&&typeof e.state!="function"){let n=e.state;t.state=()=>({...n})}if(typeof e.render=="function"){let n=e.render;t.render=(r,o)=>n(r)}if(e.computed){let n={};for(let r of Object.keys(e.computed)){let o=e.computed[r];typeof o=="function"?n[r]={get:o}:n[r]=o}t.computed=n}if(typeof e.init=="function"){let n=e.init;t.init=function(r,o){return n.call(this,r)}}return t}function An(){return{createElement(e){return document.createElement(e)},createText(e){return document.createTextNode(e)},createComment(e){return document.createComment(e)},setAttribute(e,t,n){e.setAttribute(t,String(n))},removeAttribute(e,t){e.removeAttribute(t)},setStyle(e,t){if(typeof t=="string")e.style.cssText=t;else if(t&&typeof t=="object")for(let n in t)e.style[n]=t[n]},setClass(e,t){if(typeof t=="string")e.className=t;else if(t&&typeof t=="object"){let n=[];for(let[r,o]of Object.entries(t))o&&n.push(r);e.className=n.join(" ")}else e.className=""},insert(e,t,n){n!=null?e.insertBefore(t,n):e.appendChild(t)},remove(e){e.parentNode&&e.parentNode.removeChild(e)},replace(e,t,n){e.replaceChild(n,t)},addEventListener(e,t,n,r){e.addEventListener(t,n,r)},removeEventListener(e,t,n){e.removeEventListener(t,n)},nextTick(e){Promise.resolve().then(e)},parentNode(e){return e.parentNode},nextSibling(e){return e.nextSibling},querySelector(e){return document.querySelector(e)}}}function mt(e,t){let n=new Set,r={},o={},i=at(),s={},f={},p=null,m=null,g=null,a=null,c=!1,l=kn(typeof e=="function"?{render:e}:e),h=(0,R.defineComponent)(l),u={config:s,globalProperties:f,get _instance(){return p},mount(y){if(c)return u;let b;if(typeof y=="string"){let M=document.querySelector(y);if(!M)throw new Error(`[Lyt] \u6302\u8F7D\u76EE\u6807 "${y}" \u672A\u627E\u5230`);b=M}else b=y;a=b;let S=An();m=(0,dt.createRenderer)(S),p=(0,R.createComponentInstance)(h),(0,R.setupComponent)(p,t||{},null);let H=p.type;if(!H.render&&H.template){let M=xn(H.template);H.render=(ie,En)=>M(ie,En.renderProxy)}return(0,R.mountComponent)(p,N),p.subTree&&m.mount(p.subTree,b),g=(0,ce.effect)(()=>{if(!(!p||!p.isMounted||!m)&&((0,R.updateComponent)(p,N),p.subTree&&a)){let M=a.firstChild,ie=p.subTree;for(;a.firstChild;)a.removeChild(a.firstChild);m.mount(ie,a)}},{lazy:!0}),c=!0,u},unmount(){if(c){if(g&&((0,ce.stop)(g),g=null),p&&(0,R.unmountComponent)(p),a)for(;a.firstChild;)a.removeChild(a.firstChild);p=null,m=null,a=null,c=!1}},use(y,...b){if(n.has(y))return u;n.add(y);let S=ut({use:u.use.bind(u),unuse:u.unuse.bind(u),isInstalled:u.isInstalled.bind(u),provide:u.provide.bind(u),inject:u.inject.bind(u),config:s,globalProperties:f},y,...b);return S instanceof Promise?S.then(()=>u):u},unuse(y){if(!n.has(y))return u;n.delete(y);let b=ft({use:u.use.bind(u),unuse:u.unuse.bind(u),isInstalled:u.isInstalled.bind(u),provide:u.provide.bind(u),inject:u.inject.bind(u),config:s,globalProperties:f},y);return b instanceof Promise?b.then(()=>u):u},isInstalled(y){return n.has(y)},provide(y,b){return i[y]=b,u},inject(y,b){let S=i[y];return S!==void 0?S:b},component(y,b){return b?(r[y]=b,u):r[y]},directive(y,b){return b?(o[y]=b,u):o[y]}};return u}X(V,require("@lytjs/common"));function _e(){return typeof globalThis.window!="undefined"&&typeof globalThis.document!="undefined"&&typeof globalThis.HTMLElement!="undefined"&&typeof globalThis.customElements!="undefined"}function wr(e){return e.replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function xr(e){if(e===""||e==="true")return!0;if(e==="false")return!1;if(e==="null")return null;if(e==="undefined")return;let t=Number(e);if(!isNaN(t)&&e.trim()!=="")return t;if(e.startsWith("{")&&e.endsWith("}")||e.startsWith("[")&&e.endsWith("]"))try{return JSON.parse(e)}catch(n){}return e}function kr(e,t){return t&&t[e]?t[e]:wr(e)}function Ar(e){let t=[],n=e;if(n.emits&&(Array.isArray(n.emits)?t.push(...n.emits):typeof n.emits=="object"&&t.push(...Object.keys(n.emits))),n.methods){for(let r of Object.keys(n.methods))if(r.startsWith("on")&&r.length>2){let o=r.charAt(2).toLowerCase()+r.slice(3);t.push(o)}}return t}function Pr(e,t={}){let{shadowMode:n="open",styles:r="",propMappings:o,eventMappings:i={},attributeConverters:s={}}=t,f=t.observedAttributes||[],p=Ar(e);return class extends HTMLElement{constructor(){super();this._shadowRoot=null;this._instance=null;this._props={};this._container=null;this._connected=!1;this._eventCleanups=[];this._effectCleanup=null;this._originalDescriptors=new Map;this._compiledTemplate=null;this._updateScheduled=!1}static get observedAttributes(){return f}connectedCallback(){if(!this._connected){if(this._connected=!0,this._shadowRoot=this.attachShadow({mode:n}),r){let a=document.createElement("style");a.textContent=r,this._shadowRoot.appendChild(a)}this._container=document.createElement("div"),this._shadowRoot.appendChild(this._container),this._syncAttributesToProps(),this._mountComponent(),this._forwardSlots()}}disconnectedCallback(){if(this._connected){this._connected=!1;for(let a of this._eventCleanups)a();this._eventCleanups=[],this._effectCleanup&&(this._effectCleanup(),this._effectCleanup=null),this._originalDescriptors.clear(),this._compiledTemplate=null,this._instance=null,this._container&&(this._container.innerHTML="")}}attributeChangedCallback(a,c,d){c!==d&&this._connected&&(this._syncAttributesToProps(),this._updateComponent())}_syncAttributesToProps(){let a={};for(let c of f)if(this.hasAttribute(c)){let d=this.getAttribute(c),l=kr(c,o);s[c]?a[l]=s[c](d):a[l]=xr(d)}if(e.props){for(let[c,d]of Object.entries(e.props))if(a[c]===void 0){let l=d;l&&typeof l=="object"&&"default"in l?a[c]=typeof l.default=="function"?l.default():l.default:l==null}}this._props=a}async _mountComponent(){let a=e.render?e.render:e.template?await this._compileTemplate(e.template):null;if(!a)return;let c=this._createComponentContext(),d=a.call(c,N,c);d&&this._container&&this._renderVNode(d,this._container),this._setupReactiveUpdates(c,a)}async _compileTemplate(a){try{let c=await Promise.resolve().then(()=>(Xe(),kt)),{compile:d}=c,{code:l}=d(a);return new Function("h","_ctx",`return ${l}`)}catch(c){return null}}_createComponentContext(){let a=e.state?typeof e.state=="function"?e.state():{...e.state}:{},c=e.computed||{},d=e.methods||{},l={...this._props,...a};for(let[h,u]of Object.entries(c))typeof u=="function"?Object.defineProperty(l,h,{get:u.bind(l),enumerable:!0}):u&&typeof u=="object"&&"get"in u&&Object.defineProperty(l,h,{get:u.get.bind(l),enumerable:!0});for(let[h,u]of Object.entries(d))typeof u=="function"&&(l[h]=u.bind(l));return l.emit=(h,...u)=>{let y=i[h]||h,b=new CustomEvent(y,{detail:u.length===1?u[0]:u,bubbles:!0,composed:!0});this.dispatchEvent(b)},l.$el=this._container,l.$attrs={...this._props},l.$slots=this._getSlotContent(),l}_setupReactiveUpdates(a,c){try{Promise.resolve().then(()=>(yn(),gn)).then(d=>{let{effect:l,stop:h}=d,u=l(()=>{if(!this._connected||!this._container)return;let b=c.call(a,N,a);b&&(this._container.innerHTML="",this._renderVNode(b,this._container))},{lazy:!0}),y=e.state?typeof e.state=="function"?Object.keys(e.state()):Object.keys(e.state):[];for(let b of y){let S=a[b],H=Object.getOwnPropertyDescriptor(a,b);this._originalDescriptors.set(b,H),Object.defineProperty(a,b,{get(){return S},set(M){S=M;try{u()}catch(ie){}},enumerable:!0})}this._effectCleanup=()=>{try{h(u)}catch(b){}}}).catch(()=>{this._setupReactiveUpdatesFallback(a,c)})}catch(d){this._setupReactiveUpdatesFallback(a,c)}}_setupReactiveUpdatesFallback(a,c){let d=e.state?typeof e.state=="function"?Object.keys(e.state()):Object.keys(e.state):[];for(let l of d){let u=a[l],y=Object.getOwnPropertyDescriptor(a,l);this._originalDescriptors.set(l,y);let b=this;Object.defineProperty(a,l,{get(){return u},set(S){u=S,b._scheduleUpdate(a,c)},enumerable:!0})}}_scheduleUpdate(a,c){this._updateScheduled||(this._updateScheduled=!0,Promise.resolve().then(()=>{if(this._updateScheduled=!1,!this._connected||!this._container)return;let d=c.call(a,N,a);d&&(this._container.innerHTML="",this._renderVNode(d,this._container))}))}async _updateComponent(){if(!this._container)return;let a=e.render||null;if(!a&&e.template&&(this._compiledTemplate&&this._compiledTemplate.template===e.template?a=this._compiledTemplate.render:(a=await this._compileTemplate(e.template),a&&(this._compiledTemplate={template:e.template,render:a}))),!a)return;let c=this._createComponentContext(),d=a.call(c,N,c);this._container.innerHTML="",d&&this._renderVNode(d,this._container)}_renderVNode(a,c){let d=this._vNodeToElement(a);d&&c.appendChild(d)}_vNodeToElement(a){if(!a)return null;if(typeof a.type=="symbol"){let c=document.createDocumentFragment();if(Array.isArray(a.children))for(let d of a.children){let l=this._vNodeToElement(d);l&&c.appendChild(l)}return c}if(typeof a.children=="string")return document.createTextNode(a.children);if(typeof a.type=="string"){let c=document.createElement(a.type);if(a.props)for(let[d,l]of Object.entries(a.props))if(d==="style"&&typeof l=="object")for(let[h,u]of Object.entries(l))c.style[h]=u;else if(d==="class"){if(typeof l=="string")c.className=l;else if(typeof l=="object"){let h=[];for(let[u,y]of Object.entries(l))y&&h.push(u);c.className=h.join(" ")}}else if(d.startsWith("on")&&typeof l=="function"){let h=d.slice(2).toLowerCase();c.addEventListener(h,l),this._eventCleanups.push(()=>{c.removeEventListener(h,l)})}else d==="ref"&&typeof l=="function"?l(c):c.setAttribute(d,String(l));if(Array.isArray(a.children))for(let d of a.children){let l=this._vNodeToElement(d);l&&c.appendChild(l)}else typeof a.children=="string"&&(c.textContent=a.children);return c}return typeof a.type=="object"||typeof a.type=="function"?a.component?this._vNodeToElement(a.component.subTree||a):document.createComment("component"):null}_forwardSlots(){if(!this._shadowRoot||!this._container)return;let a=this.querySelectorAll("[slot]");for(let d of a){let l=d.getAttribute("slot")||"default",h=document.createElement("slot");l!=="default"&&h.setAttribute("name",l),this._container.appendChild(h)}let c=document.createElement("slot");this._container.appendChild(c)}_getSlotContent(){var l;let a={},c=this.querySelectorAll("[slot]");for(let h of c){let u=h.getAttribute("slot")||"default";a[u]||(a[u]=[]),a[u].push(h.cloneNode(!0))}let d=[];for(let h of Array.from(this.childNodes))(l=h.hasAttribute)!=null&&l.call(h,"slot")||d.push(h.cloneNode(!0));return d.length>0&&(a.default=d),a}get _lytInstance(){return this._instance}get _lytProps(){return{...this._props}}}}function Ne(e,t,n){if(!e.includes("-"))throw new Error(`[Lyt Web Component] \u6807\u7B7E\u540D "${e}" \u5FC5\u987B\u5305\u542B\u8FDE\u5B57\u7B26 (-)\u3002\u8FD9\u662F Custom Element \u89C4\u8303\u7684\u8981\u6C42\u3002`);if(!_e())return;let r=Pr(t,n);customElements.define(e,r)}function bn(e){for(let{tagName:t,component:n,options:r}of e)Ne(t,n,r)}function vn(e){if(_e())try{let t=customElements;t.__unregister&&t.__unregister(e)}catch(t){}}async function Tn(e,t,n){let r=t.match(/<template>([\s\S]*?)<\/template>/),o=t.match(/<script[^>]*>([\s\S]*?)<\/script>/),i=/<style[^>]*>([\s\S]*?)<\/style>/g,s=[],f;for(;(f=i.exec(t))!==null;)s.push(f);let p=(n==null?void 0:n.styles)||"";for(let c of s)p+=c[1]+`
6
- `;let m=r?r[1].trim():void 0,g={};if(o){let c=o[1].trim();if(c.match(/export\s+default\s*(\{[\s\S]*\}|\([\s\S]*\)[\s\S]*?\))/))try{let l={},h={exports:l};new Function("module","exports",`"use strict"; ${c.replace(/export\s+default\s*/,"module.exports =")}`)(h,l),g=h.exports||l}catch(l){}}let a={...n,styles:p};m&&!g.template&&!g.render&&(g.template=m),Ne(e,g,a)}
1
+ "use strict";var se=Object.create;var T=Object.defineProperty;var le=Object.getOwnPropertyDescriptor;var ae=Object.getOwnPropertyNames;var ce=Object.getPrototypeOf,ue=Object.prototype.hasOwnProperty;var M=(e,t)=>{for(var n in t)T(e,n,{get:t[n],enumerable:!0})},w=(e,t,n,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of ae(t))!ue.call(e,a)&&a!==n&&T(e,a,{get:()=>t[a],enumerable:!(l=le(t,a))||l.enumerable});return e},x=(e,t,n)=>(w(e,t,"default"),n&&w(n,t,"default")),F=(e,t,n)=>(n=e!=null?se(ce(e)):{},w(t||!e||!e.__esModule?T(n,"default",{value:e,enumerable:!0}):n,e)),de=e=>w(T({},"__esModule",{value:!0}),e);var _e={};M(_e,{attributesToProps:()=>ee,defineCustomElement:()=>S,defineCustomElementFromSFC:()=>G,eventsToCustomEvents:()=>te,generateScopeId:()=>re,injectStyles:()=>ne,isBrowser:()=>O,propsToAttributes:()=>Q,registerComponents:()=>Z,scopedCSS:()=>oe,unregisterElement:()=>J});module.exports=de(_e);var N={};M(N,{Fragment:()=>j.Fragment,ShapeFlags:()=>D,createApp:()=>K,h:()=>_});var E=require("@lytjs/common"),j=require("@lytjs/vdom");var D=(u=>(u[u.ELEMENT=1]="ELEMENT",u[u.FUNCTIONAL_COMPONENT=2]="FUNCTIONAL_COMPONENT",u[u.STATEFUL_COMPONENT=4]="STATEFUL_COMPONENT",u[u.TEXT_CHILDREN=8]="TEXT_CHILDREN",u[u.ARRAY_CHILDREN=16]="ARRAY_CHILDREN",u[u.SLOTS_CHILDREN=32]="SLOTS_CHILDREN",u))(D||{});function pe(e,t){if(t!=null)if((0,E.isStringOrNumber)(t))e.children=String(t),e.shapeFlag|=8;else if((0,E.isArray)(t)){let n=[];for(let l=0;l<t.length;l++){let a=t[l];if(!(a==null||typeof a=="boolean"))if((0,E.isArray)(a))for(let y=0;y<a.length;y++){let u=a[y];u!=null&&typeof u!="boolean"&&n.push((0,E.isVNode)(u)?u:V(String(u)))}else(0,E.isVNode)(a)?n.push(a):n.push(V(String(a)))}e.children=n,e.shapeFlag|=16}else typeof t=="object"&&(e.children=t,e.shapeFlag|=32)}function V(e,t=null,n=null){var p,h;let l=0;typeof e=="string"?l=1:e===j.Fragment?l=0:typeof e=="function"?l=2:typeof e=="object"&&e!==null&&(e.setup||e.__vccOpts||e.render)&&(l=4);let a=(p=t==null?void 0:t.key)!=null?p:null,y=(h=t==null?void 0:t.ref)!=null?h:null,u=t;if(t){let{key:b,ref:o,...r}=t;u=r}let g={type:e,props:u,children:null,key:a,ref:y,shapeFlag:l,el:null,component:null};return n!=null&&pe(g,n),g}function _(e,t,n){return V(e,t||null,n||null)}var I=require("@lytjs/common");function H(e){return Object.create(e||null)}function B(e){return e!==null&&typeof e=="object"&&typeof e.install=="function"}function W(e){return typeof e=="function"}function U(e,t,...n){if(B(t)){let l=t.onBeforeInstall?t.onBeforeInstall(e,...n):void 0;if((0,I.isPromise)(l))return l.then(()=>{let a=t.install(e,...n);if((0,I.isPromise)(a))return a.then(()=>{if(t.onInstalled)return t.onInstalled(e,...n)});if(t.onInstalled)return t.onInstalled(e,...n)});{let a=t.install(e,...n);if((0,I.isPromise)(a))return a.then(()=>{if(t.onInstalled)return t.onInstalled(e,...n)});if(t.onInstalled)return t.onInstalled(e,...n)}}else if(W(t))return t(e,...n)}function $(e,t){if(B(t)){if(typeof t.uninstall=="function")return t.uninstall(e)}else W(t)}var L=require("@lytjs/reactivity"),z=require("@lytjs/compiler"),v=require("@lytjs/component"),q=require("@lytjs/renderer"),fe=100,P=new Map;function me(e){let t=P.get(e);if(t)return P.delete(e),P.set(e,t),t;let{code:n}=(0,z.compile)(e);if(t=new Function("h","_ctx",`return ${n}`),P.size>=fe){let l=P.keys().next().value;l!==void 0&&P.delete(l)}return P.set(e,t),t}function ye(e){let t={...e};if(e.state&&typeof e.state!="function"){let n=e.state;t.state=()=>({...n})}if(typeof e.render=="function"){let n=e.render;t.render=(l,a)=>n(l)}if(e.computed){let n={};for(let l of Object.keys(e.computed)){let a=e.computed[l];typeof a=="function"?n[l]={get:a}:n[l]=a}t.computed=n}if(typeof e.init=="function"){let n=e.init;t.init=function(l,a){return n.call(this,l)}}return t}function ge(){return{createElement(e){return document.createElement(e)},createText(e){return document.createTextNode(e)},createComment(e){return document.createComment(e)},setAttribute(e,t,n){e.setAttribute(t,String(n))},removeAttribute(e,t){e.removeAttribute(t)},setStyle(e,t){if(typeof t=="string")e.style.cssText=t;else if(t&&typeof t=="object")for(let n in t)e.style[n]=t[n]},setClass(e,t){if(typeof t=="string")e.className=t;else if(t&&typeof t=="object"){let n=[];for(let[l,a]of Object.entries(t))a&&n.push(l);e.className=n.join(" ")}else e.className=""},insert(e,t,n){n!=null?e.insertBefore(t,n):e.appendChild(t)},remove(e){e.parentNode&&e.parentNode.removeChild(e)},replace(e,t,n){e.replaceChild(n,t)},addEventListener(e,t,n,l){e.addEventListener(t,n,l)},removeEventListener(e,t,n){e.removeEventListener(t,n)},nextTick(e){Promise.resolve().then(e)},parentNode(e){return e.parentNode},nextSibling(e){return e.nextSibling},querySelector(e){return document.querySelector(e)}}}function K(e,t){let n=new Set,l={},a={},y=H(),u={},g={},p=null,h=null,b=null,o=null,r=!1,i=ye(typeof e=="function"?{render:e}:e),d=(0,v.defineComponent)(i),s={config:u,globalProperties:g,get _instance(){return p},mount(f){if(r)return s;let m;if(typeof f=="string"){let A=document.querySelector(f);if(!A)throw new Error(`[Lyt] \u6302\u8F7D\u76EE\u6807 "${f}" \u672A\u627E\u5230`);m=A}else m=f;o=m;let C=ge();h=(0,q.createRenderer)(C),p=(0,v.createComponentInstance)(d),(0,v.setupComponent)(p,t||{},null);let k=p.type;if(!k.render&&k.template){let A=me(k.template);k.render=(R,ie)=>A(R,ie.renderProxy)}return(0,v.mountComponent)(p,_),p.subTree&&h.mount(p.subTree,m),b=(0,L.effect)(()=>{if(!(!p||!p.isMounted||!h)&&((0,v.updateComponent)(p,_),p.subTree&&o)){let A=o.firstChild,R=p.subTree;for(;o.firstChild;)o.removeChild(o.firstChild);h.mount(R,o)}},{lazy:!0}),r=!0,s},unmount(){if(r){if(b&&((0,L.stop)(b),b=null),p&&(0,v.unmountComponent)(p),o)for(;o.firstChild;)o.removeChild(o.firstChild);p=null,h=null,o=null,r=!1}},use(f,...m){if(n.has(f))return s;n.add(f);let C=U({use:s.use.bind(s),unuse:s.unuse.bind(s),isInstalled:s.isInstalled.bind(s),provide:s.provide.bind(s),inject:s.inject.bind(s),config:u,globalProperties:g},f,...m);return C instanceof Promise?C.then(()=>s):s},unuse(f){if(!n.has(f))return s;n.delete(f);let m=$({use:s.use.bind(s),unuse:s.unuse.bind(s),isInstalled:s.isInstalled.bind(s),provide:s.provide.bind(s),inject:s.inject.bind(s),config:u,globalProperties:g},f);return m instanceof Promise?m.then(()=>s):s},isInstalled(f){return n.has(f)},provide(f,m){return y[f]=m,s},inject(f,m){let C=y[f];return C!==void 0?C:m},component(f,m){return m?(l[f]=m,s):l[f]},directive(f,m){return m?(a[f]=m,s):a[f]}};return s}x(N,require("@lytjs/common"));function O(){return typeof globalThis.window!="undefined"&&typeof globalThis.document!="undefined"&&typeof globalThis.HTMLElement!="undefined"&&typeof globalThis.customElements!="undefined"}function X(e){return e.replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function he(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Y(e){if(e===""||e==="true")return!0;if(e==="false")return!1;if(e==="null")return null;if(e==="undefined")return;let t=Number(e);if(!isNaN(t)&&e.trim()!=="")return t;if(e.startsWith("{")&&e.endsWith("}")||e.startsWith("[")&&e.endsWith("]"))try{return JSON.parse(e)}catch(n){}return e}function be(e,t){return t&&t[e]?t[e]:X(e)}function Ce(e){let t=[],n=e;if(n.emits&&(Array.isArray(n.emits)?t.push(...n.emits):typeof n.emits=="object"&&t.push(...Object.keys(n.emits))),n.methods){for(let l of Object.keys(n.methods))if(l.startsWith("on")&&l.length>2){let a=l.charAt(2).toLowerCase()+l.slice(3);t.push(a)}}return t}function ve(e,t={}){let{shadowMode:n="open",styles:l="",propMappings:a,eventMappings:y={},attributeConverters:u={}}=t,g=t.observedAttributes||[],p=Ce(e);return class extends HTMLElement{constructor(){super();this._shadowRoot=null;this._instance=null;this._props={};this._container=null;this._connected=!1;this._eventCleanups=[];this._effectCleanup=null;this._originalDescriptors=new Map;this._compiledTemplate=null;this._updateScheduled=!1}static get observedAttributes(){return g}connectedCallback(){if(!this._connected){if(this._connected=!0,this._shadowRoot=this.attachShadow({mode:n}),l){let o=document.createElement("style");o.textContent=l,this._shadowRoot.appendChild(o)}this._container=document.createElement("div"),this._shadowRoot.appendChild(this._container),this._syncAttributesToProps(),this._mountComponent(),this._forwardSlots()}}disconnectedCallback(){if(this._connected){this._connected=!1;for(let o of this._eventCleanups)o();this._eventCleanups=[],this._effectCleanup&&(this._effectCleanup(),this._effectCleanup=null),this._originalDescriptors.clear(),this._compiledTemplate=null,this._instance=null,this._container&&(this._container.innerHTML="")}}attributeChangedCallback(o,r,c){r!==c&&this._connected&&(this._syncAttributesToProps(),this._updateComponent())}_syncAttributesToProps(){let o={};for(let r of g)if(this.hasAttribute(r)){let c=this.getAttribute(r),i=be(r,a);u[r]?o[i]=u[r](c):o[i]=Y(c)}if(e.props){for(let[r,c]of Object.entries(e.props))if(o[r]===void 0){let i=c;i&&typeof i=="object"&&"default"in i?o[r]=typeof i.default=="function"?i.default():i.default:i==null}}this._props=o}async _mountComponent(){let o=e.render?e.render:e.template?await this._compileTemplate(e.template):null;if(!o)return;let r=this._createComponentContext(),c=o?o.call(r,_,r):null;c&&this._container&&this._renderVNode(c,this._container),this._setupReactiveUpdates(r,o)}async _compileTemplate(o){try{let r=await import("@lytjs/compiler"),{compile:c}=r,{code:i}=c(o);return new Function("h","_ctx",`return ${i}`)}catch(r){return null}}_createComponentContext(){let o=e.state?typeof e.state=="function"?e.state():{...e.state}:{},r=e.computed||{},c=e.methods||{},i={...this._props,...o};for(let[d,s]of Object.entries(r))typeof s=="function"?Object.defineProperty(i,d,{get:s.bind(i),enumerable:!0}):s&&typeof s=="object"&&"get"in s&&Object.defineProperty(i,d,{get:s.get.bind(i),enumerable:!0});for(let[d,s]of Object.entries(c))typeof s=="function"&&(i[d]=s.bind(i));return i.emit=(d,...s)=>{let f=y[d]||d,m=new CustomEvent(f,{detail:s.length===1?s[0]:s,bubbles:!0,composed:!0});this.dispatchEvent(m)},i.$el=this._container,i.$attrs={...this._props},i.$slots=this._getSlotContent(),i}_setupReactiveUpdates(o,r){try{import("@lytjs/reactivity").then(c=>{let{effect:i,stop:d}=c,s=i(()=>{if(!this._connected||!this._container||!r)return;let m=r.call(o,_,o);m&&(this._container.innerHTML="",this._renderVNode(m,this._container))},{lazy:!0}),f=e.state?typeof e.state=="function"?Object.keys(e.state()):Object.keys(e.state):[];for(let m of f){let C=o[m],k=Object.getOwnPropertyDescriptor(o,m);this._originalDescriptors.set(m,k),Object.defineProperty(o,m,{get(){return C},set(A){C=A;try{s()}catch(R){}},enumerable:!0})}this._effectCleanup=()=>{try{d(s)}catch(m){}}}).catch(()=>{this._setupReactiveUpdatesFallback(o,r)})}catch(c){this._setupReactiveUpdatesFallback(o,r)}}_setupReactiveUpdatesFallback(o,r){let c=e.state?typeof e.state=="function"?Object.keys(e.state()):Object.keys(e.state):[];for(let i of c){let s=o[i],f=Object.getOwnPropertyDescriptor(o,i);this._originalDescriptors.set(i,f);let m=this;Object.defineProperty(o,i,{get(){return s},set(C){s=C,m._scheduleUpdate(o,r)},enumerable:!0})}}_scheduleUpdate(o,r){this._updateScheduled||(this._updateScheduled=!0,Promise.resolve().then(()=>{if(this._updateScheduled=!1,!this._connected||!this._container||!r)return;let c=r.call(o,_,o);c&&(this._container.innerHTML="",this._renderVNode(c,this._container))}))}async _updateComponent(){if(!this._container)return;let o=e.render||null;if(!o&&e.template&&(this._compiledTemplate&&this._compiledTemplate.template===e.template?o=this._compiledTemplate.render:(o=await this._compileTemplate(e.template),o&&(this._compiledTemplate={template:e.template,render:o}))),!o)return;let r=this._createComponentContext(),c=o?o.call(r,_,r):null;this._container.innerHTML="",c&&this._renderVNode(c,this._container)}_renderVNode(o,r){let c=this._vNodeToElement(o);c&&r.appendChild(c)}_vNodeToElement(o){if(!o)return null;if(typeof o.type=="symbol"){let r=document.createDocumentFragment();if(Array.isArray(o.children))for(let c of o.children){let i=this._vNodeToElement(c);i&&r.appendChild(i)}return r}if(typeof o.children=="string")return document.createTextNode(o.children);if(typeof o.type=="string"){let r=document.createElement(o.type);if(o.props)for(let[c,i]of Object.entries(o.props))if(c==="style"&&typeof i=="object")for(let[d,s]of Object.entries(i))r.style[d]=s;else if(c==="class"){if(typeof i=="string")r.className=i;else if(typeof i=="object"){let d=[];for(let[s,f]of Object.entries(i))f&&d.push(s);r.className=d.join(" ")}}else if(c.startsWith("on")&&typeof i=="function"){let d=c.slice(2).toLowerCase();r.addEventListener(d,i),this._eventCleanups.push(()=>{r.removeEventListener(d,i)})}else c==="ref"&&typeof i=="function"?i(r):r.setAttribute(c,String(i));if(Array.isArray(o.children))for(let c of o.children){let i=this._vNodeToElement(c);i&&r.appendChild(i)}else typeof o.children=="string"&&(r.textContent=o.children);return r}return typeof o.type=="object"||typeof o.type=="function"?o.component?this._vNodeToElement(o.component.subTree||o):document.createComment("component"):null}_forwardSlots(){if(!this._shadowRoot||!this._container)return;let o=this.querySelectorAll("[slot]");for(let c of o){let i=c.getAttribute("slot")||"default",d=document.createElement("slot");i!=="default"&&d.setAttribute("name",i),this._container.appendChild(d)}let r=document.createElement("slot");this._container.appendChild(r)}_getSlotContent(){var i;let o={},r=this.querySelectorAll("[slot]");for(let d of r){let s=d.getAttribute("slot")||"default";o[s]||(o[s]=[]),o[s].push(d.cloneNode(!0))}let c=[];for(let d of Array.from(this.childNodes))(i=d.hasAttribute)!=null&&i.call(d,"slot")||c.push(d.cloneNode(!0));return c.length>0&&(o.default=c),o}get _lytInstance(){return this._instance}get _lytProps(){return{...this._props}}}}function S(e,t,n){if(!e.includes("-"))throw new Error(`[Lyt Web Component] \u6807\u7B7E\u540D "${e}" \u5FC5\u987B\u5305\u542B\u8FDE\u5B57\u7B26 (-)\u3002\u8FD9\u662F Custom Element \u89C4\u8303\u7684\u8981\u6C42\u3002`);if(!O())return;let l=ve(t,n);customElements.define(e,l)}function Z(e){for(let{tagName:t,component:n,options:l}of e)S(t,n,l)}function J(e){if(O())try{let t=customElements;t.__unregister&&t.__unregister(e)}catch(t){}}async function G(e,t,n){let l=t.match(/<template>([\s\S]*?)<\/template>/),a=t.match(/<script[^>]*>([\s\S]*?)<\/script>/),y=/<style[^>]*>([\s\S]*?)<\/style>/g,u=[],g;for(;(g=y.exec(t))!==null;)u.push(g);let p=(n==null?void 0:n.styles)||"";for(let r of u)p+=r[1]+`
2
+ `;let h=l?l[1].trim():void 0,b={};if(a){let r=a[1].trim();if(r.match(/export\s+default\s*(\{[\s\S]*\}|\([\s\S]*\)[\s\S]*?\))/))try{let i={},d={exports:i};new Function("module","exports",`"use strict"; ${r.replace(/export\s+default\s*/,"module.exports =")}`)(d,i),b=d.exports||i}catch(i){}}let o={...n,styles:p};h&&!b.template&&!b.render&&(b.template=h),S(e,b,o)}function Q(e,t=[]){return Object.keys(e).filter(n=>!t.includes(n)).map(he)}function ee(e,t,n){let l={};for(let a=0;a<e.length;a++){let y=e[a],u=y.name,g=y.value;if(u.startsWith("on"))continue;let p=(t==null?void 0:t[u])||X(u);n!=null&&n[u]?l[p]=n[u](g):l[p]=Y(g)}return l}function te(e){let t=Array.isArray(e)?e:Object.keys(e),n={};for(let l of t)n[l]={name:l,options:{bubbles:!0,composed:!0,cancelable:!0}};return n}function ne(e,t,n={}){if(!e||!t)return null;let{append:l=!1,id:a}=n;if(a){let u=t.getElementById(a);if(u)return u.textContent=e,u}let y=document.createElement("style");if(a&&(y.id=a),y.textContent=e,l)t.appendChild(y);else{let u=t.querySelector("div");u?t.insertBefore(y,u):t.insertBefore(y,t.firstChild)}return y}function oe(e,t){let n=`[${t}]`;return e.replace(/([^{}@/][^{}]*?)(\s*\{[^{}]*\})/g,(l,a,y)=>a.trim().startsWith("@")||a.includes(":host")?l:a.split(",").map(g=>{let p=g.trim();if(!p||p.startsWith("@"))return g;let h=p.indexOf("::"),b=h!==-1?p.slice(h):"",o=h!==-1?p.slice(0,h):p,r=o.indexOf(":"),c=r!==-1?o.slice(r):"",d=(r!==-1?o.slice(0,r):o).split(/\s+/).filter(Boolean),s=d[d.length-1];return s&&(d[d.length-1]=s+n),d.join(" ")+c+b}).join(", ")+y)}function re(e="data-v"){let t="abcdef0123456789",n="";for(let l=0;l<8;l++)n+=t[Math.floor(Math.random()*t.length)];return`${e}-${n}`}
@@ -1,6 +1,2 @@
1
- var tt=Object.defineProperty;var hn=Object.getOwnPropertyDescriptor;var gn=Object.getOwnPropertyNames;var yn=Object.prototype.hasOwnProperty;var v=(e,t)=>()=>(e&&(t=e(e=0)),t);var ye=(e,t)=>{for(var n in t)tt(e,n,{get:t[n],enumerable:!0})},et=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of gn(t))!yn.call(e,o)&&o!==n&&tt(e,o,{get:()=>t[o],enumerable:!(r=hn(t,o))||r.enumerable});return e},G=(e,t,n)=>(et(e,t,"default"),n&&et(n,t,"default"));function O(e,t,n,r){return{start:e,end:t,line:n,column:r}}function ne(e){return{type:"Root",children:[],helpers:new Set,loc:e}}function re(e,t,n=!1){return{type:"Element",tag:e,props:[],children:[],isComponent:/^[A-Z]/.test(e),directives:[],staticFlag:-1,isSelfClosing:n,loc:t}}function oe(e,t){return{type:"Text",content:e,isExpression:/\{\{.*?\}\}/s.test(e),staticFlag:-1,loc:t}}function ie(e,t,n){return{type:"Attribute",name:e,value:t,isDynamic:/^:|^v-bind:/.test(e),isEvent:/^@|^v-on:/.test(e),loc:n}}function R(e,t,n="",r=[],o={start:0,end:0,line:1,column:1}){return{type:"Directive",name:e,value:t,arg:n,modifiers:r,loc:o}}var Ce=v(()=>{"use strict"});function Re(e){let t=new Se(e);for(;!t.isEOF();)switch(t.state){case 0:Dn(t);break;case 1:Ln(t);break;case 2:Mn(t);break;case 3:Bn(t);break;case 4:Vn(t);break;case 5:$n(t);break}return ft(t),t.root}function Dn(e){for(e.textBuffer===""&&(e.textStart=e.pos);!e.isEOF();){let t=e.peek();if(t==="<"){ft(e),e.advance(),e.state=1;return}if(t==="{"&&e.peekAt(1)==="{"){for(e.textBuffer+=e.advance(),e.textBuffer+=e.advance();!e.isEOF();){let n=e.peek();if(e.textBuffer+=e.advance(),n==="}"&&e.peek()==="}"){e.textBuffer+=e.advance();break}}continue}e.textBuffer+=e.advance()}}function Ln(e){if(e.skipWhitespace(),e.startsWith("!--")){e.state=5,e.commentBuffer="",e.advance(),e.advance(),e.advance();return}e.peek()==="/"?(e.isClosingTag=!0,e.advance()):e.isClosingTag=!1,e.tagNameBuffer="",e.tagNameStart=e.pos,e.state=2}function Mn(e){for(;!e.isEOF();){let r=e.peek();if(/\s/.test(r)||r===">"||r==="/")break;e.tagNameBuffer+=e.advance()}if(e.isClosingTag){e.state=4;return}let t=O(e.tagNameStart,e.pos,e.line,e.column-e.tagNameBuffer.length),n=re(e.tagNameBuffer.toLowerCase(),t);e.currentElement=n,e.state=3}function Bn(e){if(e.skipWhitespace(),e.isEOF())return;let t=e.peek();if(t===">"){e.advance(),ut(e);return}if(t==="/"&&e.peekAt(1)===">"){e.advance(),e.advance(),ut(e,!0);return}e.attrNameBuffer="",e.attrValueBuffer="",e.inAttrValue=!1,e.attrValueQuote="";let n=e.pos;for(;!e.isEOF();){let i=e.peek();if(/\s/.test(i)||i==="="||i===">"||i==="/")break;e.attrNameBuffer+=e.advance()}if(e.skipWhitespace(),e.peek()==="="){e.advance(),e.skipWhitespace();let i=e.peek();if(i==='"'||i==="'")for(e.attrValueQuote=i,e.advance(),e.inAttrValue=!0;!e.isEOF();){if(e.peek()===e.attrValueQuote){e.advance(),e.inAttrValue=!1;break}e.attrValueBuffer+=e.advance()}else for(;!e.isEOF();){let s=e.peek();if(/\s/.test(s)||s===">"||s==="/")break;e.attrValueBuffer+=e.advance()}}let r=O(n,e.pos,e.line,e.column),o=Wn(e.attrNameBuffer,e.attrValueBuffer||null,r);e.currentElement&&(o.type==="Directive"?e.currentElement.directives.push(o):e.currentElement.props.push(o))}function Vn(e){e.skipWhitespace(),e.peek()===">"&&e.advance();let t=e.tagNameBuffer.toLowerCase(),n=!1;for(let r=e.parentStack.length-1;r>=0;r--)if(e.parentStack[r].tag===t){e.parentStack.splice(r),e.currentElement=e.parentStack.length>0?e.parentStack[e.parentStack.length-1]:null,n=!0;break}e.state=0}function $n(e){for(;!e.isEOF();){if(e.startsWith("-->")){e.advance(),e.advance(),e.advance(),e.state=0;return}e.commentBuffer+=e.advance()}}function ft(e){let t=e.textBuffer.trim();if(t.length===0){e.textBuffer="";return}let n=oe(t,O(e.textStart,e.pos,e.line,e.column));e.currentElement?e.currentElement.children.push(n):e.root.children.push(n),e.textBuffer=""}function ut(e,t=!1){if(!e.currentElement)return;e.currentElement.isSelfClosing=t;let n=Fn.has(e.currentElement.tag),r=e.parentStack.length>0?e.parentStack[e.parentStack.length-1]:null;r?r.children.push(e.currentElement):e.root.children.push(e.currentElement),!t&&!n?e.parentStack.push(e.currentElement):e.currentElement=r,e.state=0}function Wn(e,t,n){if(e.startsWith("v-")){let r=e.slice(2);if(r.startsWith("on")){let s=r.slice(2),f=s.indexOf("."),p=s,m=[];return f!==-1&&(p=s.slice(0,f),m.push(...s.slice(f+1).split("."))),R("on",t||"",p,m,n)}if(r.startsWith("bind")){let s=r.slice(4).replace(/^:/,"");return R("bind",t||"",s,[],n)}if(r.startsWith("slot")){let s=r.slice(4).replace(/^:/,"");return R("slot",t||"",s,[],n)}if(r==="model")return R("bind",t||"","model",[],n);if(r==="ref")return R("ref",t||"","",[],n);let o=r.indexOf(":"),i=o!==-1?r.slice(0,o):r;if(jn.has(i)){let s=o!==-1?r.slice(o+1):"";return R(i,t||"",s,[],n)}}if(e.startsWith(":")){let r=e.slice(1);return R("bind",t||"",r,[],n)}if(e.startsWith("@")){let r=e.slice(1),o=r.indexOf("."),i=r,s=[];return o!==-1&&(i=r.slice(0,o),s.push(...r.slice(o+1).split("."))),R("on",t||"",i,s,n)}if(e.startsWith("#")){let r=e.slice(1);return R("slot",t||"",r,[],n)}return ie(e,t,n)}var Fn,jn,Se,pt=v(()=>{"use strict";Ce();Fn=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),jn=new Set(["if","each","bind","on","slot","ref"]),Se=class{constructor(t){this.template=t,this.pos=0,this.line=1,this.column=1,this.state=0,this.root=ne(O(0,t.length,1,1)),this.currentElement=null,this.parentStack=[],this.textBuffer="",this.textStart=0,this.tagNameBuffer="",this.tagNameStart=0,this.attrNameBuffer="",this.attrValueBuffer="",this.attrValueQuote="",this.inAttrValue=!1,this.commentBuffer="",this.isClosingTag=!1}currentPos(){return O(this.pos,this.pos,this.line,this.column)}advance(){let t=this.template[this.pos++];return t===`
2
- `?(this.line++,this.column=1):this.column++,t}peek(){return this.template[this.pos]||""}peekAt(t){return this.template[this.pos+t]||""}isEOF(){return this.pos>=this.template.length}startsWith(t){return this.template.substring(this.pos,this.pos+t.length)===t}skipWhitespace(){for(;!this.isEOF()&&/\s/.test(this.peek());)this.advance()}}});function Ne(e,t={}){let n=new U(e,t),r=[Hn,Kn,Gn,Un,Yn,zn],o=[...t.nodeTransforms||[],...r];se(e,n,o),_e(e,n)}function se(e,t,n){t.parent=e;for(let r of n){let o=r(e,t);if(o&&t.onExitCallbacks.push(i=>o()),t.replaceNode){let i=t.replaceNode;t.replaceNode=null,se(i,t,n);return}if(t.removeNode){t.removeNode=null;return}}switch(e.type){case"Root":for(let r=0;r<e.children.length;r++)t.childIndex=r,se(e.children[r],t,n);break;case"Element":for(let r=0;r<e.children.length;r++)t.childIndex=r,se(e.children[r],t,n);break}}function _e(e,t){let n=t.onExitCallbacks.splice(0);for(let r of n)r(e);switch(e.type){case"Root":for(let r of e.children)_e(r,t);break;case"Element":for(let r of e.children)_e(r,t);break}}function Hn(e,t){if(e.type!=="Element")return;let n=e.directives.find(r=>r.name==="if");n&&(Object.assign(e,{ifCondition:n.value,ifBranches:[]}),t.root.helpers.add("createConditionalVNode"),e.directives=e.directives.filter(r=>r!==n))}function Kn(e,t){if(e.type!=="Element")return;let n=e.directives.find(o=>o.name==="each");if(!n)return;let r=Xn(n.value);r&&(Object.assign(e,{eachInfo:r}),t.root.helpers.add("renderList")),e.directives=e.directives.filter(o=>o!==n)}function Gn(e,t){if(e.type!=="Element")return;let n=e.directives.filter(o=>o.name==="bind");if(n.length===0)return;let r=[];for(let o of n){let i=o.arg==="model";r.push({arg:o.arg,value:o.value,isModel:i}),i&&t.root.helpers.add("createModelBinding")}Object.assign(e,{bindings:r}),e.directives=e.directives.filter(o=>o.name!=="bind")}function Un(e,t){if(e.type!=="Element")return;let n=e.directives.filter(o=>o.name==="on");if(n.length===0)return;let r=[];for(let o of n)r.push({name:o.arg,value:o.value,modifiers:o.modifiers}),t.root.helpers.add("createEventHandler");Object.assign(e,{events:r}),e.directives=e.directives.filter(o=>o.name!=="on")}function Yn(e,t){if(e.type!=="Element")return;let n=e.directives.find(r=>r.name==="slot");n&&(Object.assign(e,{slotInfo:{name:n.arg||"default",value:n.value}}),t.root.helpers.add("renderSlot"),e.directives=e.directives.filter(r=>r!==n))}function zn(e,t){if(e.type!=="Element")return;let n=e.directives.find(r=>r.name==="ref");n&&(Object.assign(e,{refInfo:{name:n.value}}),t.root.helpers.add("createRef"),e.directives=e.directives.filter(r=>r!==n))}function Xn(e){let t=e.match(/^\s*(?:\((\w+)\s*,\s*(\w+)\)|(\w+))\s+(?:in|of)\s+(\S+)\s*$/);return t?{item:t[1]||t[3],index:t[2]||"",collection:t[4]}:null}var U,we=v(()=>{"use strict";U=class{constructor(t,n={}){this.root=t,this.parent=null,this.childIndex=0,this.options={markStatic:!0,...n},this.onExitCallbacks=[],this.replaceNode=null,this.removeNode=null}}});function xe(e){let t={hoistedNodes:[],hoistedNames:[]},n=0;for(let r of e.children)dt(r,t,()=>(n++,`_hoisted_${n}`));return t}function dt(e,t,n){switch(e.type){case"Text":return qn(e,t,n);case"Element":return Jn(e,t,n);default:return!1}}function qn(e,t,n){return e.isExpression?(e.staticFlag=0,!1):(e.staticFlag=1,!0)}function Jn(e,t,n){if(e.directives.length>0)return e.staticFlag=0,!1;let r=e;if(r.ifCondition||r.eachInfo||r.bindings&&r.bindings.length>0||r.events&&r.events.length>0||r.slotInfo||r.refInfo)return e.staticFlag=0,!1;for(let i of e.props)if(i.isDynamic||i.isEvent)return e.staticFlag=0,!1;let o=!0;for(let i of e.children)dt(i,t,n)||(o=!1);if(o){if(e.staticFlag=1,e.children.length>0){let i=n();t.hoistedNodes.push(e),t.hoistedNames.push(i),e.hoistedName=i}return!0}return e.staticFlag=0,!1}function ke(e){if(e.type==="Text")return!e.isExpression;if(e.type==="Element"){if(e.staticFlag!==-1)return e.staticFlag===1;let t=e;if(e.directives.length>0||t.ifCondition||t.eachInfo||t.bindings&&t.bindings.length>0||t.events&&t.events.length>0||t.slotInfo||t.refInfo)return!1;for(let n of e.props)if(n.isDynamic||n.isEvent)return!1;for(let n of e.children)if(!ke(n))return!1;return!0}return!1}var mt=v(()=>{"use strict"});var Ae,ht=v(()=>{"use strict";Ae=(l=>(l[l.TEXT=1]="TEXT",l[l.CLASS=2]="CLASS",l[l.STYLE=4]="STYLE",l[l.PROPS=8]="PROPS",l[l.FULL_PROPS=16]="FULL_PROPS",l[l.EVENT=32]="EVENT",l[l.SLOTS=64]="SLOTS",l[l.STABLE_FRAGMENT=128]="STABLE_FRAGMENT",l[l.KEYED_FRAGMENT=256]="KEYED_FRAGMENT",l[l.UNKEYED_FRAGMENT=512]="UNKEYED_FRAGMENT",l[l.NEED_PATCH=1024]="NEED_PATCH",l[l.DYNAMIC_SLOTS=2048]="DYNAMIC_SLOTS",l[l.HOISTED=-1]="HOISTED",l[l.BAIL=-2]="BAIL",l))(Ae||{})});function Fe(e,t={}){let n=new ae;if(Qn(e,n),n.hoistedDecls.length>0){for(let r of n.hoistedDecls)n.pushLine(r);n.newline()}return Zn(e.children,n),{code:n.code,hoisted:n.hoistedDecls,helpers:Array.from(n.helpers.keys())}}function Qn(e,t){t.helpers.set("h","Lyt");for(let n of e.helpers)switch(n){case"createConditionalVNode":break;case"renderList":t.helpers.set("renderList","Lyt");break;case"createModelBinding":break;case"createEventHandler":break;case"renderSlot":t.helpers.set("renderSlot","Lyt");break;case"createRef":break;default:t.helpers.set(n,"Lyt")}}function Zn(e,t){if(e.length===0){t.push("null");return}if(e.length===1){Oe(e[0],t);return}t.push("["),t.indentIn();for(let n=0;n<e.length;n++)n>0&&t.pushLine(","),Oe(e[n],t);t.indentOut(),t.pushLine(""),t.push("]")}function Oe(e,t){switch(e.type){case"Element":er(e,t);break;case"Text":or(e,t);break}}function er(e,t){let n=e;if(n.ifCondition){let r=n.ifCondition;t.push(`(${x(r)} ? (`),Pe(e,t),t.push(") : null)");return}if(n.eachInfo){let r=n.eachInfo;t.push(`renderList(${x(r.collection)}, (${r.item}`),r.index&&t.push(`, ${r.index}`),t.push(") => "),Pe(e,t),t.push(")");return}Pe(e,t)}function Pe(e,t){let n=e,r=tr(e,t),o=rr(e.children,t),i=e.isComponent?e.tag:`'${e.tag}'`;t.push(`h(${i}`),t.push(r?`, ${r}`:", null"),o&&o!=="null"&&t.push(`, ${o}`),t.push(")")}function tr(e,t){let n=e,r=[],o=nr(e);if(o&&r.push(o),n.bindings){let i=n.bindings;for(let s of i)s.isModel?r.push(`model: { value: ${x(s.value)}, callback: $event => ${x(s.value)} = $event }`):r.push(`'${s.arg}': ${x(s.value)}`)}if(n.events){let i=n.events;for(let s of i){let f=`on${cr(s.name)}`,p=x(s.value);if(s.modifiers.length>0){let m=s.modifiers.map(g=>{switch(g){case"stop":return"$event.stopPropagation()";case"prevent":return"$event.preventDefault()";case"capture":return null;case"once":return null;default:return null}}).filter(Boolean);m.length>0&&(p=`($event) => { ${m.join("; ")}; ${x(s.value)}($event) }`)}r.push(`'${f}': ${p}`)}}if(n.refInfo){let i=n.refInfo;r.push(`ref: '${i.name}'`)}if(n.slotInfo){let i=n.slotInfo;r.push(`'slot': '${i.name}'`)}return r.length===0?"":`{ ${r.join(", ")} }`}function nr(e){let t=[];for(let n of e.props)n.isDynamic||n.isEvent||(n.value===null?t.push(`'${n.name}': true`):t.push(`'${n.name}': '${Ie(n.value)}'`));return t.join(", ")}function rr(e,t){if(e.length===0)return"";let n=[],r=new ae;for(let o of e)Oe(o,r),n.push(r.code),r.code="";return n.length===0?"":n.length===1?n[0]:`[${n.join(", ")}]`}function or(e,t){if(!e.isExpression){t.push(`'${Ie(e.content)}'`);return}let n=lr(e.content);if(n.length===1&&n[0].type==="expression"){t.push(x(n[0].value));return}let r=n.map(o=>o.type==="text"?`'${Ie(o.value)}'`:x(o.value));t.push(r.join(" + "))}function lr(e){let t=[],n=/\{\{([\s\S]*?)\}\}/g,r=0,o;for(;(o=n.exec(e))!==null;)o.index>r&&t.push({type:"text",value:e.slice(r,o.index)}),t.push({type:"expression",value:o[1].trim()}),r=n.lastIndex;return r<e.length&&t.push({type:"text",value:e.slice(r)}),t}function x(e){if(e=e.trim(),e.startsWith("_ctx."))return e;if(/^\w+(\.\w+)*$/.test(e))return`_ctx.${e}`;if(e.match(/^(\w+(?:\.\w+)*)\s*\(/))return`_ctx.${e}`;if(e.includes("=>"))return e;let n=[],r=e.replace(/(['"`])(?:(?!\1|\\).|\\.)*\1/g,o=>(n.push(o),`__PH${n.length-1}__`));r=r.replace(/(?<!_ctx\.)(?<!\w)(\w+(?:\.\w+)*)/g,o=>ir.has(o)||sr.has(o)||ar.has(o)||/^\d/.test(o)||/^__PH\d+__$/.test(o)?o:`_ctx.${o}`);for(let o=0;o<n.length;o++)r=r.replace(`__PH${o}__`,n[o]);return r}function Ie(e){return e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}function cr(e){return e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join("")}var ae,ir,sr,ar,gt=v(()=>{"use strict";ae=class{constructor(){this.code="",this.indentLevel=0,this.indent=" ",this.needsNewline=!0,this.helpers=new Map,this.hoistedDecls=[]}push(t){this.needsNewline&&(this.code+=this.indent.repeat(this.indentLevel),this.needsNewline=!1),this.code+=t}pushLine(t){this.push(t),this.newline()}newline(){this.code+=`
3
- `,this.needsNewline=!0}indentIn(){this.indentLevel++}indentOut(){this.indentLevel--}};ir=new Set(["true","false","null","undefined","this","super","new","delete","typeof","instanceof","in","of","void","throw","return","yield","await","async","if","else","for","while","do","switch","case","break","continue","try","catch","finally","class","extends","import","export","from","default","var","let","const","function","debugger"]),sr=new Set(["console","window","document","Math","JSON","Date","Array","Object","String","Number","Boolean","RegExp","Error","TypeError","RangeError","SyntaxError","Map","Set","WeakMap","WeakSet","Promise","Symbol","Proxy","Reflect","parseInt","parseFloat","isNaN","isFinite","NaN","Infinity"]),ar=new Set(["$event","$refs","$el","$emit","$slots","$parent","$root"])});function dr(e){let t={};if(!e||!e.trim())return t;vt.lastIndex=0;let n;for(;(n=vt.exec(e))!==null;){let r=n[1],o=n[2]!==void 0?n[2]:n[3]!==void 0?n[3]:n[4]!==void 0?n[4]:"";t[r]=o}return t}function mr(e,t,n,r){let o=1,i=r;for(;i<e.length&&o>0;){let s=e.slice(i).search(t),f=e.indexOf(n,i);if(f===-1)return-1;if(s!==-1&&s+i<f)o++,i=s+i+1;else{if(o--,o===0)return f+n.length;i=f+n.length}}return-1}function je(e,t,n){t.lastIndex=0;let r=t.exec(e);if(!r)return null;let o=r.index,i=r[1]||"",s=dr(i),f=r.index+r[0].length,p=mr(e,t,n,f);return p===-1?null:{content:e.slice(f,p-n.length).trim(),start:o,end:p,attrs:s}}function Y(e,t="anonymous.lyt"){let n=e.replace(ur,""),r=je(n,fr,"</template>"),o=r?{type:"template",content:r.content,start:r.start,end:r.end,attrs:r.attrs}:null,i=je(n,pr,"<\/script>"),s=i?{type:"script",content:i.content,start:i.start,end:i.end,attrs:i.attrs}:null,f=[],p=n;for(yt.lastIndex=0;;){let m=je(p,yt,"</style>");if(!m)break;f.push({type:"style",content:m.content,start:m.start,end:m.end,attrs:m.attrs,scoped:"scoped"in m.attrs}),p=p.slice(m.end)}return{filename:t,template:o,script:s,styles:f}}function De(e){bt.lastIndex=0;let t=bt.exec(e);return t?t[1].trim():null}var ur,fr,pr,yt,bt,vt,le=v(()=>{"use strict";ur=/<!--[\s\S]*?-->/g,fr=/<template(\s[^>]*)?\s*>/,pr=/<script(\s[^>]*)?\s*>/,yt=/<style(\s[^>]*)?\s*>/,bt=/export\s+default\s*\{([\s\S]*?)\}\s*$/,vt=/(\w[\w-]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|(\S+)))?/g});function gr(e,t){let n=5381,r=e+"\0"+t;for(let o=0;o<r.length;o++)n=(n<<5)+n+r.charCodeAt(o)&4294967295;return hr+(n>>>0).toString(16).slice(0,6)}function z(e,t){let n="",r=0,o=e.length;for(;r<o;){if(e[r]==="@"){let m=e.slice(r).match(/^@([\w-]+)/);if(m){let g=m[1];if(["keyframes","-webkit-keyframes","-moz-keyframes","font-face"].includes(g)){let c=e.indexOf("{",r+m[0].length);if(c!==-1){let d=Le(e,c+1);if(d!==-1){n+=e.slice(r,d),r=d;continue}}}if(["media","supports","document"].includes(g)){let c=e.indexOf("{",r+m[0].length);if(c!==-1){let d=Le(e,c+1);if(d!==-1){let l=e.slice(r,c+1),h=e.slice(c+1,d-1),u=z(h,t);n+=l+u+"}",r=d;continue}}}let a=e.indexOf(";",r);if(a!==-1){n+=e.slice(r,a+1),r=a+1;continue}}}let i=e.indexOf("{",r);if(i===-1){n+=e.slice(r);break}let s=e.slice(r,i).trim();if(!s){n+=e.slice(r,i+1),r=i+1;continue}let f=Le(e,i+1);if(f===-1){n+=e.slice(r);break}let p=yr(s,t);n+=p+e.slice(i,f),r=f}return n}function Le(e,t){let n=1,r=t;for(;r<e.length&&n>0;)e[r]==="{"?n++:e[r]==="}"&&n--,r++;return n===0?r:-1}function yr(e,t){return br(e).map(r=>vr(r.trim(),t)).join(", ")}function br(e){let t=[],n=0,r="";for(let o=0;o<e.length;o++){let i=e[o];i==="("?(n++,r+=i):i===")"?(n--,r+=i):i===","&&n===0?(t.push(r),r=""):r+=i}return r.trim()&&t.push(r),t}function vr(e,t){let n=/(::(?:before|after|first-line|first-letter|selection|placeholder|backdrop|marker|spelling-error|grammar-error)[\s\S]*)$/,r=e.match(n),o=e,i="";r&&(o=e.slice(0,e.length-r[0].length),i=r[0]);let s=/(:(?:hover|focus|active|visited|link|first-child|last-child|nth-child\([^)]*\)|nth-of-type\([^)]*\)|not\([^)]*\)|root|empty|checked|disabled|enabled|valid|invalid|required|optional|read-only|read-write)[\s\S]*)$/,f=o.match(s),p=o,m="";return f&&(p=o.slice(0,o.length-f[0].length),m=f[0]),p=p.replace(/\s+$/,""),`${p}[${t}]${m}${i}`}function Me(e){let{template:t,script:n,styles:r,filename:o}=e,i=[(t==null?void 0:t.content)||"",(n==null?void 0:n.content)||"",...r.map(a=>a.content)].join("\0"),s=gr(o,i),f="null";t&&(f=`function(_ctx) { return ${Be(t.content).code} }`);let p="{}";if(n){let a=De(n.content);a&&(p=`{ ${a} }`)}let m=[];for(let a of r){let c=a.content;a.scoped&&(c=z(c,s)),m.push(c)}return{code:Tr(f,p,s,m),styles:m,scopedId:s}}function Tr(e,t,n,r){let o=[];if(o.push("// Generated by Lyt.js SFC Compiler"),o.push(""),o.push(`const _sfcId = '${n}'`),o.push(""),r.length>0){o.push("const _styles = [");for(let i of r)o.push(` ${JSON.stringify(i)},`);o.push("]"),o.push(""),o.push("function _injectStyles() {"),o.push(" if (typeof document === 'undefined') {"),o.push(" throw new Error('[Lyt Compiler] SFC \u7F16\u8BD1\u9700\u8981 DOM \u73AF\u5883')"),o.push(" }"),o.push(" for (const css of _styles) {"),o.push(' const style = document.createElement("style")'),o.push(' style.setAttribute("data-sfc-id", _sfcId)'),o.push(" style.textContent = css"),o.push(" document.head.appendChild(style)"),o.push(" }"),o.push("}"),o.push(""),o.push("_injectStyles()"),o.push("")}return o.push("export default {"),o.push(" __sfcId: _sfcId,"),o.push(` render: ${e},`),o.push(` ...${t},`),o.push("}"),o.join(`
4
- `)}var hr,Tt=v(()=>{"use strict";Ve();le();hr="data-v-"});var Et=v(()=>{"use strict";le();Tt()});function Er(e){let t=e.match(/props:\s*(\{[^}]+\}|\[[^\]]+\])/);return t?t[1]:null}function Cr(e){let t=e.match(/emits:\s*(\{[^}]+\}|\[[^\]]+\])/);return t?t[1]:null}function $e(e,t={}){let{filename:n="Component"}=t,r=n.replace(/\.lyt$/,""),o=[];if(o.push("/**"),o.push(` * ${r} \u7EC4\u4EF6\u7C7B\u578B\u58F0\u660E`),o.push(" * \u7531 @lytjs/compiler \u81EA\u52A8\u751F\u6210"),o.push(" */"),o.push(""),o.push("export interface ComponentProps {"),e.script){let i=Er(e.script.content);i&&o.push(` // Props \u5B9A\u4E49: ${i}`)}if(o.push(" [key: string]: any;"),o.push("}"),o.push(""),o.push("export interface ComponentEmits {"),e.script){let i=Cr(e.script.content);i&&o.push(` // Emits \u5B9A\u4E49: ${i}`)}return o.push(" [key: string]: (...args: any[]) => any;"),o.push("}"),o.push(""),o.push("/**"),o.push(" * \u7EC4\u4EF6\u7C7B\u578B\u5B9A\u4E49"),o.push(" */"),o.push("declare const component: import('@lytjs/component').ComponentDefine;"),o.push(""),o.push("export default component;"),o.join(`
5
- `)}function We(e,t="Component.lyt"){let n=Y(e,t);return $e(n,{filename:t,generateDts:!0})}function Ct(){return{name:"lytjs-types",transform(e,t){if(t.endsWith(".lyt")){let n=We(e,t);return{code:e,map:null,dts:n}}return null}}}var St=v(()=>{"use strict";le()});var Rt={};ye(Rt,{CompilerPatchFlags:()=>Ae,TransformContext:()=>U,compile:()=>Be,compileSFC:()=>Me,createAttributeNode:()=>ie,createDirectiveNode:()=>R,createElementNode:()=>re,createPosition:()=>O,createRootNode:()=>ne,createTextNode:()=>oe,createTypePlugin:()=>Ct,generate:()=>Fe,generateDtsForLytFile:()=>We,generateTypeDeclarations:()=>$e,isStatic:()=>ke,optimize:()=>xe,parseHTML:()=>Re,parseSFC:()=>Y,scopeCSS:()=>z,transform:()=>Ne});function Be(e,t={}){let n=Re(e);Ne(n,t.transform);let r=xe(n),o=Fe(n,t.codegen);return{code:o.code,ast:n,hoistResult:r,helpers:o.helpers}}var Ve=v(()=>{"use strict";Ce();pt();we();we();mt();ht();gt();Et();St()});function ue(){Nt.push(ce),ce=!1}function fe(){let e=Nt.pop();ce=e===void 0?!0:e}function _t(e){let{deps:t}=e;for(let n of t)n.delete(e);t.clear()}function T(e,t){if(!ce||!E)return;let n=He.get(e);n||(n=new Map,He.set(e,n));let r=n.get(t);r||(r=new Set,n.set(t,r)),r.has(E)||(r.add(E),E.deps.add(r))}function C(e,t,n,r){let o=He.get(e);if(!o)return;let i=new Set,s=f=>{if(f)for(let p of f)(p!==E||p.allowRecurse)&&i.add(p)};if(s(o.get(t)),(n==="add"||n==="delete")&&s(o.get(L)),n==="set"&&Array.isArray(e)){let f=o.get("length");f&&typeof t=="number"&&t<e.length&&s(f)}for(let f of i)f.scheduler?f.scheduler(f):f.run()}function wt(e,t={}){let n=new N(e,t);t.lazy||n.run();let r=n.run.bind(n);return r.effect=n,r.stop=()=>n.stop(),r}function xt(e){var t;(t=e==null?void 0:e.effect)==null||t.stop()}var E,X,Sr,He,N,ce,Nt,L,V=v(()=>{"use strict";E=null,X=[],Sr=0,He=new WeakMap,N=class{constructor(t,n={}){this.active=!0;this.deps=new Set;this.fn=t,this.scheduler=n.scheduler,this.beforeRun=n.beforeRun,this.afterRun=n.afterRun,this.lazy=n.lazy,this.id=Sr++}run(){var t,n;if(!this.active)return this.fn();if(X.includes(this))return this.fn();try{return(t=this.beforeRun)==null||t.call(this),X.push(this),E=this,_t(this),this.fn()}finally{(n=this.afterRun)==null||n.call(this),X.pop(),E=X[X.length-1]||null}}stop(){this.active&&(_t(this),this.onStop&&this.onStop(),this.active=!1)}},ce=!0,Nt=[];L=Symbol("iterate")});function q(e){return e!==null&&typeof e=="object"}function It(e,t){return!Object.is(e,t)}function pe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ft(e){return typeof e=="string"&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e}function J(e,t={}){if(!q(e)||e[M])return e;if(e[k])return me(e);let n=kt.get(e);if(n)return n;let r=new Proxy(e,Rr);return kt.set(e,r),r}function me(e){if(!q(e))return e;let t=At.get(e);if(t)return t;e[k]=!0;let n=new Proxy(e,_r);return At.set(e,n),n}function jt(e){if(!q(e))return e;let t=Pt.get(e);if(t)return t;let n=new Proxy(e,Nr);return Pt.set(e,n),n}function I(e){let t=e&&e[A];return t?I(t):e}function $(e){return Ke(e)?$(e[A]):!!(e&&e[M])}function Ke(e){return!!(e&&e[k])}function Dt(e){return e[k]=!0,e}function Lt(e){return e[Ot]=!0,e}var k,A,M,Ot,kt,At,Pt,de,Rr,_r,Nr,he=v(()=>{"use strict";V();k=Symbol("readonly"),A=Symbol("raw"),M=Symbol("reactive"),Ot=Symbol("skip"),kt=new WeakMap,At=new WeakMap,Pt=new WeakMap;de={};["includes","indexOf","lastIndexOf"].forEach(e=>{de[e]=function(...t){let n=I(this);for(let r=0;r<n.length;r++)T(n,String(r));return T(n,"length"),n[e](...t)}});["push","pop","shift","unshift","splice","sort","reverse"].forEach(e=>{de[e]=function(...t){ue();let n=Array.prototype[e].apply(this,t);return fe(),C(I(this),"length","set",I(this).length),n}});Rr={get(e,t,n){if(t===A)return e;if(t===M)return!0;if(Array.isArray(e)&&de.hasOwnProperty(t))return de[t];T(e,t);let r=Reflect.get(e,t,n);return t===k?e[k]===!0:!q(r)||e[Ot]?r:J(r)},set(e,t,n,r){let o=e[t],i=Array.isArray(e)&&Ft(t)?Number(t)<e.length:pe(e,t),s=Reflect.set(e,t,n,r);return(e===(r==null?void 0:r[A])||e===I(r))&&(i?It(n,o)&&C(e,t,"set",n):C(e,t,"add",n)),s},deleteProperty(e,t){let n=pe(e,t),r=Reflect.deleteProperty(e,t);return r&&n&&C(e,t,"delete"),r},has(e,t){return T(e,t),Reflect.has(e,t)},ownKeys(e){return T(e,L),Reflect.ownKeys(e)}},_r={get(e,t,n){if(t===A)return e;if(t===M||t===k)return!0;T(e,t);let r=Reflect.get(e,t,n);return q(r)?me(r):r},set(e,t,n,r){return!1},deleteProperty(e,t){return!1},has(e,t){return T(e,t),Reflect.has(e,t)},ownKeys(e){return T(e,L),Reflect.ownKeys(e)}},Nr={get(e,t,n){return t===A?e:t===M?!0:(T(e,t),Reflect.get(e,t,n))},set(e,t,n,r){let o=e[t],i=Array.isArray(e)&&Ft(t)?Number(t)<e.length:pe(e,t),s=Reflect.set(e,t,n,r);return(e===(r==null?void 0:r[A])||e===I(r))&&(i?It(n,o)&&C(e,t,"set",n):C(e,t,"add",n)),s},deleteProperty(e,t){let n=pe(e,t),r=Reflect.deleteProperty(e,t);return r&&n&&C(e,t,"delete"),r},has(e,t){return T(e,t),Reflect.has(e,t)},ownKeys(e){return T(e,L),Reflect.ownKeys(e)}}});import{isObject as wr}from"@lytjs/common";function xr(e){return Ue.get(e)||e}function Mt(e){if(P(e))return e;let t={_value:Bt(e),_rawValue:e,__v_isRef:!0,[W]:!0},n=new Proxy(t,kr);return Ue.set(n,t),n}function Bt(e){return wr(e)?J(e):e}function Vt(e){if(P(e))return e;let t={_value:e,_rawValue:e,__v_isRef:!0,__v_isShallow:!0,[W]:!0,[Ge]:!0},n=new Proxy(t,Ar);return Ue.set(n,t),n}function P(e){return!!(e&&e.__v_isRef===!0)}function $t(e){return P(e)?e.value:e}function Ye(e,t){let n=e[t];return P(n)?n:new Proxy({_obj:e,_key:t,__v_isRef:!0},{get(r,o,i){return o==="value"?r._obj[r._key]:o==="__v_isRef"?!0:Reflect.get(r,o,i)},set(r,o,i,s){return o==="value"?(r._obj[r._key]=i,!0):Reflect.set(r,o,i,s)}})}function Wt(e){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=Ye(e,n));return t}function Ht(e){let t=xr(e);C(t,"value","set",t._rawValue)}var W,Ge,Ue,kr,Ar,ze=v(()=>{"use strict";V();he();W=Symbol("ref"),Ge=Symbol("shallowRef"),Ue=new WeakMap;kr={get(e,t,n){return t==="value"?(T(e,"value"),e._value):t===W||t==="__v_isRef"?!0:t==="_rawValue"?e._rawValue:Reflect.get(e,t,n)},set(e,t,n,r){if(t==="value"){let o=e._rawValue;return Object.is(o,n)||(e._rawValue=n,e._value=Bt(n),C(e,"value","set",n)),!0}return Reflect.set(e,t,n,r)}};Ar={get(e,t,n){return t==="value"?(T(e,"value"),e._value):t===W||t==="__v_isRef"||t==="__v_isShallow"?!0:t==="_rawValue"?e._rawValue:Reflect.get(e,t,n)},set(e,t,n,r){if(t==="value"){let o=e._rawValue;return Object.is(o,n)||(e._rawValue=n,e._value=n,C(e,"value","set",n)),!0}return Reflect.set(e,t,n,r)}}});function Kt(e){let t,n;return typeof e=="function"?(t=e,n=void 0):(t=e.get,n=e.set),new Xe(t,n)}var Xe,Gt=v(()=>{"use strict";V();Xe=class{constructor(t,n){this._dirty=!0;this.__v_isRef=!0;this.deps=new Set;this._setter=n,this._effect=new N(t,{scheduler:()=>{this._dirty||(this._dirty=!0,this.triggerDep())},lazy:!0}),this._value=void 0}get value(){return T(this,"value"),E&&!this.deps.has(E)&&(this.deps.add(E),E.deps.add(this.deps)),this._dirty&&(this._value=this._effect.run(),this._dirty=!1),this._value}set value(t){this._setter&&this._setter(t)}triggerDep(){for(let t of this.deps)t.scheduler?t.scheduler(t):t.run()}}});import{queueJob as Yt,nextTick as zt,isObject as Xt}from"@lytjs/common";function Q(e,t=1/0,n){if(!Xt(e)||t<=0||(n||(n=new Set),n.has(e)))return e;if(n.add(e),P(e))Q(e.value,t-1,n);else if(Array.isArray(e))for(let r=0;r<e.length;r++)Q(e[r],t-1,n);else for(let r of Object.keys(e))Q(e[r],t-1,n);return e}function Ut(e){return P(e)?()=>e.value:$(e)?()=>Q(e):typeof e=="function"?e:()=>Q(e)}function qt(e,t,n={}){let r,o=!1;if(Array.isArray(e)){o=!0;let g=e.map(a=>Ut(a));r=()=>g.map(a=>a())}else r=Ut(e);$(e)&&n.deep!==!1&&(n.deep=!0);let i=o?[]:void 0,s,f=g=>{s=g},p=()=>{s&&(s(),s=void 0);let g=m.run();(o?g.some((a,c)=>!Object.is(a,i[c])):!Object.is(g,i)||n.deep&&Xt(g))&&(t(g,o?[...i]:i,f),i=o?[...g]:g)},m=new N(r,{lazy:!0,scheduler:()=>{n.flush==="sync"?p():Yt(p)}});return n.immediate?p():i=m.run(),()=>{m.stop()}}function Jt(e,t={}){let n,r=()=>{n&&(n(),n=void 0),e(i=>{n=i})},o=new N(r,{scheduler:()=>{t.flush==="sync"?r():Yt(r)}});return o.run(),()=>{o.stop(),n&&(n(),n=void 0)}}var Qt=v(()=>{"use strict";V();ze();he()});import{LytError as Pr}from"@lytjs/common";function ge(e){let t=e,n=new Set,r=function(){return w&&!Z&&n.add(w),t};return r.set=function(o){Object.is(t,o)||(t=o,on(n))},r.update=function(o){r.set(o(t))},r._subscribe=function(o){n.add(o)},r._unsubscribe=function(o){n.delete(o)},r.dispose=function(){n.clear()},r}function Zt(e){let t,n=!0,r=!1,o=new Set,i=new Set,s=function(){if(w&&!Z&&i.add(w),n){if(r)throw new Pr("LYT_REACTIVITY_CIRCULAR_DEPENDENCY","computed \u5728\u5176\u81EA\u8EAB\u7684\u8BA1\u7B97\u56FE\u4E2D");r=!0;for(let g of o)g._unsubscribe(s);o.clear();let m=w;w=s;try{t=e()}finally{w=m,r=!1}n=!1}return t},f={_dirty:!1,notify(){n=!0,on(i)}};return s.notify=f.notify.bind(f),s._dirty=!1,s._subscribe=function(p){i.add(p)},s._unsubscribe=function(p){i.delete(p)},s}function en(e){let t=null,n=!1,r=new Set,o=()=>{if(n)return;t&&(t(),t=null);for(let f of r)f._unsubscribe(i);r.clear();let s=w;w=i;try{e(f=>{t=f})}finally{w=s}},i={_dirty:!1,notify(){ee>0?H.add(i):o()}};return o(),()=>{n=!0,t&&(t(),t=null);for(let s of r)s._unsubscribe(i);r.clear(),H.delete(i)}}function tn(e){ee++;try{e()}finally{ee--,ee===0&&nn()}}function nn(){if(!qe){qe=!0;try{let e=new Set(H);H.clear();for(let t of e)t.notify();H.size>0&&nn()}finally{qe=!1}}}function rn(e){let t=Z;Z=!0;try{return e()}finally{Z=t}}function on(e){if(ee>0)for(let t of e)H.add(t);else for(let t of e)t.notify()}var w,Z,ee,H,qe,Je=v(()=>{"use strict";w=null,Z=!1,ee=0,H=new Set,qe=!1});function sn(){return K.length>0?K[K.length-1]:null}function an(e){return e()}function ln(e){let t=ge(e),n=o=>t.set(o),r=sn();return[t,n]}function cn(){let e={_cleanupFns:[]};return K.push(e),()=>{for(let n of e._cleanupFns)n();e._cleanupFns.length=0;let t=K.indexOf(e);t!==-1&&K.splice(t,1)}}function un(e){let t=sn();t&&t._cleanupFns.push(e)}var K,fn=v(()=>{"use strict";Je();K=[]});var pn={};ye(pn,{ITERATE_KEY:()=>L,ReactiveEffect:()=>N,activeEffect:()=>E,batch:()=>tn,clearQueue:()=>jr,computed:()=>Kt,computedSignal:()=>Zt,effect:()=>wt,enterSignalComponentContext:()=>cn,hasPendingJob:()=>Fr,isReactive:()=>$,isReadonly:()=>Ke,isRef:()=>P,markReadOnly:()=>Dt,markSkip:()=>Lt,nextTick:()=>zt,onSignalCleanup:()=>un,pauseTracking:()=>ue,queueJob:()=>Or,queuePostFlushCb:()=>Ir,rawSymbol:()=>A,reactive:()=>J,reactiveFlag:()=>M,readonly:()=>me,readonlyFlag:()=>k,ref:()=>Mt,refSymbol:()=>W,resetTracking:()=>fe,shallowReactive:()=>jt,shallowRef:()=>Vt,shallowRefSymbol:()=>Ge,signal:()=>ge,signalEffect:()=>en,stop:()=>xt,toRaw:()=>I,toRef:()=>Ye,toRefs:()=>Wt,track:()=>T,trigger:()=>C,triggerRef:()=>Ht,unref:()=>$t,untrack:()=>rn,useSignal:()=>an,useSignalState:()=>ln,watch:()=>qt,watchEffect:()=>Jt});import{queueJob as Or,queuePostFlushCb as Ir,hasPendingJob as Fr,clearQueue as jr}from"@lytjs/common";var dn=v(()=>{"use strict";V();he();ze();Gt();Qt();Je();fn()});var D={};ye(D,{Fragment:()=>ve,ShapeFlags:()=>Te,createApp:()=>ct,h:()=>_});import{isStringOrNumber as bn,isArray as nt,isVNode as rt}from"@lytjs/common";import{Fragment as ve}from"@lytjs/vdom";var Te=(s=>(s[s.ELEMENT=1]="ELEMENT",s[s.FUNCTIONAL_COMPONENT=2]="FUNCTIONAL_COMPONENT",s[s.STATEFUL_COMPONENT=4]="STATEFUL_COMPONENT",s[s.TEXT_CHILDREN=8]="TEXT_CHILDREN",s[s.ARRAY_CHILDREN=16]="ARRAY_CHILDREN",s[s.SLOTS_CHILDREN=32]="SLOTS_CHILDREN",s))(Te||{});function vn(e,t){if(t!=null)if(bn(t))e.children=String(t),e.shapeFlag|=8;else if(nt(t)){let n=[];for(let r=0;r<t.length;r++){let o=t[r];if(!(o==null||typeof o=="boolean"))if(nt(o))for(let i=0;i<o.length;i++){let s=o[i];s!=null&&typeof s!="boolean"&&n.push(rt(s)?s:be(String(s)))}else rt(o)?n.push(o):n.push(be(String(o)))}e.children=n,e.shapeFlag|=16}else typeof t=="object"&&(e.children=t,e.shapeFlag|=32)}function be(e,t=null,n=null){var p,m;let r=0;typeof e=="string"?r=1:e===ve?r=0:typeof e=="function"?r=2:typeof e=="object"&&e!==null&&(e.setup||e.__vccOpts||e.render)&&(r=4);let o=(p=t==null?void 0:t.key)!=null?p:null,i=(m=t==null?void 0:t.ref)!=null?m:null,s=t;if(t){let{key:g,ref:a,...c}=t;s=c}let f={type:e,props:s,children:null,key:o,ref:i,shapeFlag:r,el:null,component:null};return n!=null&&vn(f,n),f}function _(e,t,n){return be(e,t||null,n||null)}import{isPromise as Ee}from"@lytjs/common";function ot(e){return Object.create(e||null)}function it(e){return e!==null&&typeof e=="object"&&typeof e.install=="function"}function st(e){return typeof e=="function"}function at(e,t,...n){if(it(t)){let r=t.onBeforeInstall?t.onBeforeInstall(e,...n):void 0;if(Ee(r))return r.then(()=>{let o=t.install(e,...n);if(Ee(o))return o.then(()=>{if(t.onInstalled)return t.onInstalled(e,...n)});if(t.onInstalled)return t.onInstalled(e,...n)});{let o=t.install(e,...n);if(Ee(o))return o.then(()=>{if(t.onInstalled)return t.onInstalled(e,...n)});if(t.onInstalled)return t.onInstalled(e,...n)}}else if(st(t))return t(e,...n)}function lt(e,t){if(it(t)){if(typeof t.uninstall=="function")return t.uninstall(e)}else st(t)}import{effect as Tn,stop as En}from"@lytjs/reactivity";import{compile as Cn}from"@lytjs/compiler";import{defineComponent as Sn,createComponentInstance as Rn,setupComponent as _n,mountComponent as Nn,updateComponent as wn,unmountComponent as xn}from"@lytjs/component";import{createRenderer as kn}from"@lytjs/renderer";var An=100,j=new Map;function Pn(e){let t=j.get(e);if(t)return j.delete(e),j.set(e,t),t;let{code:n}=Cn(e);if(t=new Function("h","_ctx",`return ${n}`),j.size>=An){let r=j.keys().next().value;r!==void 0&&j.delete(r)}return j.set(e,t),t}function On(e){let t={...e};if(e.state&&typeof e.state!="function"){let n=e.state;t.state=()=>({...n})}if(typeof e.render=="function"){let n=e.render;t.render=(r,o)=>n(r)}if(e.computed){let n={};for(let r of Object.keys(e.computed)){let o=e.computed[r];typeof o=="function"?n[r]={get:o}:n[r]=o}t.computed=n}if(typeof e.init=="function"){let n=e.init;t.init=function(r,o){return n.call(this,r)}}return t}function In(){return{createElement(e){return document.createElement(e)},createText(e){return document.createTextNode(e)},createComment(e){return document.createComment(e)},setAttribute(e,t,n){e.setAttribute(t,String(n))},removeAttribute(e,t){e.removeAttribute(t)},setStyle(e,t){if(typeof t=="string")e.style.cssText=t;else if(t&&typeof t=="object")for(let n in t)e.style[n]=t[n]},setClass(e,t){if(typeof t=="string")e.className=t;else if(t&&typeof t=="object"){let n=[];for(let[r,o]of Object.entries(t))o&&n.push(r);e.className=n.join(" ")}else e.className=""},insert(e,t,n){n!=null?e.insertBefore(t,n):e.appendChild(t)},remove(e){e.parentNode&&e.parentNode.removeChild(e)},replace(e,t,n){e.replaceChild(n,t)},addEventListener(e,t,n,r){e.addEventListener(t,n,r)},removeEventListener(e,t,n){e.removeEventListener(t,n)},nextTick(e){Promise.resolve().then(e)},parentNode(e){return e.parentNode},nextSibling(e){return e.nextSibling},querySelector(e){return document.querySelector(e)}}}function ct(e,t){let n=new Set,r={},o={},i=ot(),s={},f={},p=null,m=null,g=null,a=null,c=!1,l=On(typeof e=="function"?{render:e}:e),h=Sn(l),u={config:s,globalProperties:f,get _instance(){return p},mount(y){if(c)return u;let b;if(typeof y=="string"){let F=document.querySelector(y);if(!F)throw new Error(`[Lyt] \u6302\u8F7D\u76EE\u6807 "${y}" \u672A\u627E\u5230`);b=F}else b=y;a=b;let S=In();m=kn(S),p=Rn(h),_n(p,t||{},null);let B=p.type;if(!B.render&&B.template){let F=Pn(B.template);B.render=(te,mn)=>F(te,mn.renderProxy)}return Nn(p,_),p.subTree&&m.mount(p.subTree,b),g=Tn(()=>{if(!(!p||!p.isMounted||!m)&&(wn(p,_),p.subTree&&a)){let F=a.firstChild,te=p.subTree;for(;a.firstChild;)a.removeChild(a.firstChild);m.mount(te,a)}},{lazy:!0}),c=!0,u},unmount(){if(c){if(g&&(En(g),g=null),p&&xn(p),a)for(;a.firstChild;)a.removeChild(a.firstChild);p=null,m=null,a=null,c=!1}},use(y,...b){if(n.has(y))return u;n.add(y);let S=at({use:u.use.bind(u),unuse:u.unuse.bind(u),isInstalled:u.isInstalled.bind(u),provide:u.provide.bind(u),inject:u.inject.bind(u),config:s,globalProperties:f},y,...b);return S instanceof Promise?S.then(()=>u):u},unuse(y){if(!n.has(y))return u;n.delete(y);let b=lt({use:u.use.bind(u),unuse:u.unuse.bind(u),isInstalled:u.isInstalled.bind(u),provide:u.provide.bind(u),inject:u.inject.bind(u),config:s,globalProperties:f},y);return b instanceof Promise?b.then(()=>u):u},isInstalled(y){return n.has(y)},provide(y,b){return i[y]=b,u},inject(y,b){let S=i[y];return S!==void 0?S:b},component(y,b){return b?(r[y]=b,u):r[y]},directive(y,b){return b?(o[y]=b,u):o[y]}};return u}G(D,fo);import*as fo from"@lytjs/common";function Qe(){return typeof globalThis.window!="undefined"&&typeof globalThis.document!="undefined"&&typeof globalThis.HTMLElement!="undefined"&&typeof globalThis.customElements!="undefined"}function Dr(e){return e.replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Lr(e){if(e===""||e==="true")return!0;if(e==="false")return!1;if(e==="null")return null;if(e==="undefined")return;let t=Number(e);if(!isNaN(t)&&e.trim()!=="")return t;if(e.startsWith("{")&&e.endsWith("}")||e.startsWith("[")&&e.endsWith("]"))try{return JSON.parse(e)}catch(n){}return e}function Mr(e,t){return t&&t[e]?t[e]:Dr(e)}function Br(e){let t=[],n=e;if(n.emits&&(Array.isArray(n.emits)?t.push(...n.emits):typeof n.emits=="object"&&t.push(...Object.keys(n.emits))),n.methods){for(let r of Object.keys(n.methods))if(r.startsWith("on")&&r.length>2){let o=r.charAt(2).toLowerCase()+r.slice(3);t.push(o)}}return t}function Vr(e,t={}){let{shadowMode:n="open",styles:r="",propMappings:o,eventMappings:i={},attributeConverters:s={}}=t,f=t.observedAttributes||[],p=Br(e);return class extends HTMLElement{constructor(){super();this._shadowRoot=null;this._instance=null;this._props={};this._container=null;this._connected=!1;this._eventCleanups=[];this._effectCleanup=null;this._originalDescriptors=new Map;this._compiledTemplate=null;this._updateScheduled=!1}static get observedAttributes(){return f}connectedCallback(){if(!this._connected){if(this._connected=!0,this._shadowRoot=this.attachShadow({mode:n}),r){let a=document.createElement("style");a.textContent=r,this._shadowRoot.appendChild(a)}this._container=document.createElement("div"),this._shadowRoot.appendChild(this._container),this._syncAttributesToProps(),this._mountComponent(),this._forwardSlots()}}disconnectedCallback(){if(this._connected){this._connected=!1;for(let a of this._eventCleanups)a();this._eventCleanups=[],this._effectCleanup&&(this._effectCleanup(),this._effectCleanup=null),this._originalDescriptors.clear(),this._compiledTemplate=null,this._instance=null,this._container&&(this._container.innerHTML="")}}attributeChangedCallback(a,c,d){c!==d&&this._connected&&(this._syncAttributesToProps(),this._updateComponent())}_syncAttributesToProps(){let a={};for(let c of f)if(this.hasAttribute(c)){let d=this.getAttribute(c),l=Mr(c,o);s[c]?a[l]=s[c](d):a[l]=Lr(d)}if(e.props){for(let[c,d]of Object.entries(e.props))if(a[c]===void 0){let l=d;l&&typeof l=="object"&&"default"in l?a[c]=typeof l.default=="function"?l.default():l.default:l==null}}this._props=a}async _mountComponent(){let a=e.render?e.render:e.template?await this._compileTemplate(e.template):null;if(!a)return;let c=this._createComponentContext(),d=a.call(c,_,c);d&&this._container&&this._renderVNode(d,this._container),this._setupReactiveUpdates(c,a)}async _compileTemplate(a){try{let c=await Promise.resolve().then(()=>(Ve(),Rt)),{compile:d}=c,{code:l}=d(a);return new Function("h","_ctx",`return ${l}`)}catch(c){return null}}_createComponentContext(){let a=e.state?typeof e.state=="function"?e.state():{...e.state}:{},c=e.computed||{},d=e.methods||{},l={...this._props,...a};for(let[h,u]of Object.entries(c))typeof u=="function"?Object.defineProperty(l,h,{get:u.bind(l),enumerable:!0}):u&&typeof u=="object"&&"get"in u&&Object.defineProperty(l,h,{get:u.get.bind(l),enumerable:!0});for(let[h,u]of Object.entries(d))typeof u=="function"&&(l[h]=u.bind(l));return l.emit=(h,...u)=>{let y=i[h]||h,b=new CustomEvent(y,{detail:u.length===1?u[0]:u,bubbles:!0,composed:!0});this.dispatchEvent(b)},l.$el=this._container,l.$attrs={...this._props},l.$slots=this._getSlotContent(),l}_setupReactiveUpdates(a,c){try{Promise.resolve().then(()=>(dn(),pn)).then(d=>{let{effect:l,stop:h}=d,u=l(()=>{if(!this._connected||!this._container)return;let b=c.call(a,_,a);b&&(this._container.innerHTML="",this._renderVNode(b,this._container))},{lazy:!0}),y=e.state?typeof e.state=="function"?Object.keys(e.state()):Object.keys(e.state):[];for(let b of y){let S=a[b],B=Object.getOwnPropertyDescriptor(a,b);this._originalDescriptors.set(b,B),Object.defineProperty(a,b,{get(){return S},set(F){S=F;try{u()}catch(te){}},enumerable:!0})}this._effectCleanup=()=>{try{h(u)}catch(b){}}}).catch(()=>{this._setupReactiveUpdatesFallback(a,c)})}catch(d){this._setupReactiveUpdatesFallback(a,c)}}_setupReactiveUpdatesFallback(a,c){let d=e.state?typeof e.state=="function"?Object.keys(e.state()):Object.keys(e.state):[];for(let l of d){let u=a[l],y=Object.getOwnPropertyDescriptor(a,l);this._originalDescriptors.set(l,y);let b=this;Object.defineProperty(a,l,{get(){return u},set(S){u=S,b._scheduleUpdate(a,c)},enumerable:!0})}}_scheduleUpdate(a,c){this._updateScheduled||(this._updateScheduled=!0,Promise.resolve().then(()=>{if(this._updateScheduled=!1,!this._connected||!this._container)return;let d=c.call(a,_,a);d&&(this._container.innerHTML="",this._renderVNode(d,this._container))}))}async _updateComponent(){if(!this._container)return;let a=e.render||null;if(!a&&e.template&&(this._compiledTemplate&&this._compiledTemplate.template===e.template?a=this._compiledTemplate.render:(a=await this._compileTemplate(e.template),a&&(this._compiledTemplate={template:e.template,render:a}))),!a)return;let c=this._createComponentContext(),d=a.call(c,_,c);this._container.innerHTML="",d&&this._renderVNode(d,this._container)}_renderVNode(a,c){let d=this._vNodeToElement(a);d&&c.appendChild(d)}_vNodeToElement(a){if(!a)return null;if(typeof a.type=="symbol"){let c=document.createDocumentFragment();if(Array.isArray(a.children))for(let d of a.children){let l=this._vNodeToElement(d);l&&c.appendChild(l)}return c}if(typeof a.children=="string")return document.createTextNode(a.children);if(typeof a.type=="string"){let c=document.createElement(a.type);if(a.props)for(let[d,l]of Object.entries(a.props))if(d==="style"&&typeof l=="object")for(let[h,u]of Object.entries(l))c.style[h]=u;else if(d==="class"){if(typeof l=="string")c.className=l;else if(typeof l=="object"){let h=[];for(let[u,y]of Object.entries(l))y&&h.push(u);c.className=h.join(" ")}}else if(d.startsWith("on")&&typeof l=="function"){let h=d.slice(2).toLowerCase();c.addEventListener(h,l),this._eventCleanups.push(()=>{c.removeEventListener(h,l)})}else d==="ref"&&typeof l=="function"?l(c):c.setAttribute(d,String(l));if(Array.isArray(a.children))for(let d of a.children){let l=this._vNodeToElement(d);l&&c.appendChild(l)}else typeof a.children=="string"&&(c.textContent=a.children);return c}return typeof a.type=="object"||typeof a.type=="function"?a.component?this._vNodeToElement(a.component.subTree||a):document.createComment("component"):null}_forwardSlots(){if(!this._shadowRoot||!this._container)return;let a=this.querySelectorAll("[slot]");for(let d of a){let l=d.getAttribute("slot")||"default",h=document.createElement("slot");l!=="default"&&h.setAttribute("name",l),this._container.appendChild(h)}let c=document.createElement("slot");this._container.appendChild(c)}_getSlotContent(){var l;let a={},c=this.querySelectorAll("[slot]");for(let h of c){let u=h.getAttribute("slot")||"default";a[u]||(a[u]=[]),a[u].push(h.cloneNode(!0))}let d=[];for(let h of Array.from(this.childNodes))(l=h.hasAttribute)!=null&&l.call(h,"slot")||d.push(h.cloneNode(!0));return d.length>0&&(a.default=d),a}get _lytInstance(){return this._instance}get _lytProps(){return{...this._props}}}}function Ze(e,t,n){if(!e.includes("-"))throw new Error(`[Lyt Web Component] \u6807\u7B7E\u540D "${e}" \u5FC5\u987B\u5305\u542B\u8FDE\u5B57\u7B26 (-)\u3002\u8FD9\u662F Custom Element \u89C4\u8303\u7684\u8981\u6C42\u3002`);if(!Qe())return;let r=Vr(t,n);customElements.define(e,r)}function $r(e){for(let{tagName:t,component:n,options:r}of e)Ze(t,n,r)}function Wr(e){if(Qe())try{let t=customElements;t.__unregister&&t.__unregister(e)}catch(t){}}async function Hr(e,t,n){let r=t.match(/<template>([\s\S]*?)<\/template>/),o=t.match(/<script[^>]*>([\s\S]*?)<\/script>/),i=/<style[^>]*>([\s\S]*?)<\/style>/g,s=[],f;for(;(f=i.exec(t))!==null;)s.push(f);let p=(n==null?void 0:n.styles)||"";for(let c of s)p+=c[1]+`
6
- `;let m=r?r[1].trim():void 0,g={};if(o){let c=o[1].trim();if(c.match(/export\s+default\s*(\{[\s\S]*\}|\([\s\S]*\)[\s\S]*?\))/))try{let l={},h={exports:l};new Function("module","exports",`"use strict"; ${c.replace(/export\s+default\s*/,"module.exports =")}`)(h,l),g=h.exports||l}catch(l){}}let a={...n,styles:p};m&&!g.template&&!g.render&&(g.template=m),Ze(e,g,a)}export{Ze as defineCustomElement,Hr as defineCustomElementFromSFC,Qe as isBrowser,$r as registerComponents,Wr as unregisterElement};
1
+ var O=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var X=Object.prototype.hasOwnProperty;var Y=(e,t)=>{for(var n in t)O(e,n,{get:t[n],enumerable:!0})},L=(e,t,n,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of K(t))!X.call(e,a)&&a!==n&&O(e,a,{get:()=>t[a],enumerable:!(l=q(t,a))||l.enumerable});return e},N=(e,t,n)=>(L(e,t,"default"),n&&L(n,t,"default"));var A={};Y(A,{Fragment:()=>R,ShapeFlags:()=>w,createApp:()=>W,h:()=>v});import{isStringOrNumber as Z,isArray as S,isVNode as V}from"@lytjs/common";import{Fragment as R}from"@lytjs/vdom";var w=(u=>(u[u.ELEMENT=1]="ELEMENT",u[u.FUNCTIONAL_COMPONENT=2]="FUNCTIONAL_COMPONENT",u[u.STATEFUL_COMPONENT=4]="STATEFUL_COMPONENT",u[u.TEXT_CHILDREN=8]="TEXT_CHILDREN",u[u.ARRAY_CHILDREN=16]="ARRAY_CHILDREN",u[u.SLOTS_CHILDREN=32]="SLOTS_CHILDREN",u))(w||{});function J(e,t){if(t!=null)if(Z(t))e.children=String(t),e.shapeFlag|=8;else if(S(t)){let n=[];for(let l=0;l<t.length;l++){let a=t[l];if(!(a==null||typeof a=="boolean"))if(S(a))for(let y=0;y<a.length;y++){let u=a[y];u!=null&&typeof u!="boolean"&&n.push(V(u)?u:x(String(u)))}else V(a)?n.push(a):n.push(x(String(a)))}e.children=n,e.shapeFlag|=16}else typeof t=="object"&&(e.children=t,e.shapeFlag|=32)}function x(e,t=null,n=null){var p,h;let l=0;typeof e=="string"?l=1:e===R?l=0:typeof e=="function"?l=2:typeof e=="object"&&e!==null&&(e.setup||e.__vccOpts||e.render)&&(l=4);let a=(p=t==null?void 0:t.key)!=null?p:null,y=(h=t==null?void 0:t.ref)!=null?h:null,u=t;if(t){let{key:b,ref:o,...r}=t;u=r}let g={type:e,props:u,children:null,key:a,ref:y,shapeFlag:l,el:null,component:null};return n!=null&&J(g,n),g}function v(e,t,n){return x(e,t||null,n||null)}import{isPromise as T}from"@lytjs/common";function D(e){return Object.create(e||null)}function M(e){return e!==null&&typeof e=="object"&&typeof e.install=="function"}function F(e){return typeof e=="function"}function H(e,t,...n){if(M(t)){let l=t.onBeforeInstall?t.onBeforeInstall(e,...n):void 0;if(T(l))return l.then(()=>{let a=t.install(e,...n);if(T(a))return a.then(()=>{if(t.onInstalled)return t.onInstalled(e,...n)});if(t.onInstalled)return t.onInstalled(e,...n)});{let a=t.install(e,...n);if(T(a))return a.then(()=>{if(t.onInstalled)return t.onInstalled(e,...n)});if(t.onInstalled)return t.onInstalled(e,...n)}}else if(F(t))return t(e,...n)}function B(e,t){if(M(t)){if(typeof t.uninstall=="function")return t.uninstall(e)}else F(t)}import{effect as G,stop as Q}from"@lytjs/reactivity";import{compile as ee}from"@lytjs/compiler";import{defineComponent as te,createComponentInstance as ne,setupComponent as oe,mountComponent as re,updateComponent as ie,unmountComponent as se}from"@lytjs/component";import{createRenderer as le}from"@lytjs/renderer";var ae=100,E=new Map;function ce(e){let t=E.get(e);if(t)return E.delete(e),E.set(e,t),t;let{code:n}=ee(e);if(t=new Function("h","_ctx",`return ${n}`),E.size>=ae){let l=E.keys().next().value;l!==void 0&&E.delete(l)}return E.set(e,t),t}function ue(e){let t={...e};if(e.state&&typeof e.state!="function"){let n=e.state;t.state=()=>({...n})}if(typeof e.render=="function"){let n=e.render;t.render=(l,a)=>n(l)}if(e.computed){let n={};for(let l of Object.keys(e.computed)){let a=e.computed[l];typeof a=="function"?n[l]={get:a}:n[l]=a}t.computed=n}if(typeof e.init=="function"){let n=e.init;t.init=function(l,a){return n.call(this,l)}}return t}function de(){return{createElement(e){return document.createElement(e)},createText(e){return document.createTextNode(e)},createComment(e){return document.createComment(e)},setAttribute(e,t,n){e.setAttribute(t,String(n))},removeAttribute(e,t){e.removeAttribute(t)},setStyle(e,t){if(typeof t=="string")e.style.cssText=t;else if(t&&typeof t=="object")for(let n in t)e.style[n]=t[n]},setClass(e,t){if(typeof t=="string")e.className=t;else if(t&&typeof t=="object"){let n=[];for(let[l,a]of Object.entries(t))a&&n.push(l);e.className=n.join(" ")}else e.className=""},insert(e,t,n){n!=null?e.insertBefore(t,n):e.appendChild(t)},remove(e){e.parentNode&&e.parentNode.removeChild(e)},replace(e,t,n){e.replaceChild(n,t)},addEventListener(e,t,n,l){e.addEventListener(t,n,l)},removeEventListener(e,t,n){e.removeEventListener(t,n)},nextTick(e){Promise.resolve().then(e)},parentNode(e){return e.parentNode},nextSibling(e){return e.nextSibling},querySelector(e){return document.querySelector(e)}}}function W(e,t){let n=new Set,l={},a={},y=D(),u={},g={},p=null,h=null,b=null,o=null,r=!1,i=ue(typeof e=="function"?{render:e}:e),d=te(i),s={config:u,globalProperties:g,get _instance(){return p},mount(f){if(r)return s;let m;if(typeof f=="string"){let _=document.querySelector(f);if(!_)throw new Error(`[Lyt] \u6302\u8F7D\u76EE\u6807 "${f}" \u672A\u627E\u5230`);m=_}else m=f;o=m;let C=de();h=le(C),p=ne(d),oe(p,t||{},null);let P=p.type;if(!P.render&&P.template){let _=ce(P.template);P.render=(k,z)=>_(k,z.renderProxy)}return re(p,v),p.subTree&&h.mount(p.subTree,m),b=G(()=>{if(!(!p||!p.isMounted||!h)&&(ie(p,v),p.subTree&&o)){let _=o.firstChild,k=p.subTree;for(;o.firstChild;)o.removeChild(o.firstChild);h.mount(k,o)}},{lazy:!0}),r=!0,s},unmount(){if(r){if(b&&(Q(b),b=null),p&&se(p),o)for(;o.firstChild;)o.removeChild(o.firstChild);p=null,h=null,o=null,r=!1}},use(f,...m){if(n.has(f))return s;n.add(f);let C=H({use:s.use.bind(s),unuse:s.unuse.bind(s),isInstalled:s.isInstalled.bind(s),provide:s.provide.bind(s),inject:s.inject.bind(s),config:u,globalProperties:g},f,...m);return C instanceof Promise?C.then(()=>s):s},unuse(f){if(!n.has(f))return s;n.delete(f);let m=B({use:s.use.bind(s),unuse:s.unuse.bind(s),isInstalled:s.isInstalled.bind(s),provide:s.provide.bind(s),inject:s.inject.bind(s),config:u,globalProperties:g},f);return m instanceof Promise?m.then(()=>s):s},isInstalled(f){return n.has(f)},provide(f,m){return y[f]=m,s},inject(f,m){let C=y[f];return C!==void 0?C:m},component(f,m){return m?(l[f]=m,s):l[f]},directive(f,m){return m?(a[f]=m,s):a[f]}};return s}N(A,qe);import*as qe from"@lytjs/common";function j(){return typeof globalThis.window!="undefined"&&typeof globalThis.document!="undefined"&&typeof globalThis.HTMLElement!="undefined"&&typeof globalThis.customElements!="undefined"}function U(e){return e.replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function pe(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function $(e){if(e===""||e==="true")return!0;if(e==="false")return!1;if(e==="null")return null;if(e==="undefined")return;let t=Number(e);if(!isNaN(t)&&e.trim()!=="")return t;if(e.startsWith("{")&&e.endsWith("}")||e.startsWith("[")&&e.endsWith("]"))try{return JSON.parse(e)}catch(n){}return e}function fe(e,t){return t&&t[e]?t[e]:U(e)}function me(e){let t=[],n=e;if(n.emits&&(Array.isArray(n.emits)?t.push(...n.emits):typeof n.emits=="object"&&t.push(...Object.keys(n.emits))),n.methods){for(let l of Object.keys(n.methods))if(l.startsWith("on")&&l.length>2){let a=l.charAt(2).toLowerCase()+l.slice(3);t.push(a)}}return t}function ye(e,t={}){let{shadowMode:n="open",styles:l="",propMappings:a,eventMappings:y={},attributeConverters:u={}}=t,g=t.observedAttributes||[],p=me(e);return class extends HTMLElement{constructor(){super();this._shadowRoot=null;this._instance=null;this._props={};this._container=null;this._connected=!1;this._eventCleanups=[];this._effectCleanup=null;this._originalDescriptors=new Map;this._compiledTemplate=null;this._updateScheduled=!1}static get observedAttributes(){return g}connectedCallback(){if(!this._connected){if(this._connected=!0,this._shadowRoot=this.attachShadow({mode:n}),l){let o=document.createElement("style");o.textContent=l,this._shadowRoot.appendChild(o)}this._container=document.createElement("div"),this._shadowRoot.appendChild(this._container),this._syncAttributesToProps(),this._mountComponent(),this._forwardSlots()}}disconnectedCallback(){if(this._connected){this._connected=!1;for(let o of this._eventCleanups)o();this._eventCleanups=[],this._effectCleanup&&(this._effectCleanup(),this._effectCleanup=null),this._originalDescriptors.clear(),this._compiledTemplate=null,this._instance=null,this._container&&(this._container.innerHTML="")}}attributeChangedCallback(o,r,c){r!==c&&this._connected&&(this._syncAttributesToProps(),this._updateComponent())}_syncAttributesToProps(){let o={};for(let r of g)if(this.hasAttribute(r)){let c=this.getAttribute(r),i=fe(r,a);u[r]?o[i]=u[r](c):o[i]=$(c)}if(e.props){for(let[r,c]of Object.entries(e.props))if(o[r]===void 0){let i=c;i&&typeof i=="object"&&"default"in i?o[r]=typeof i.default=="function"?i.default():i.default:i==null}}this._props=o}async _mountComponent(){let o=e.render?e.render:e.template?await this._compileTemplate(e.template):null;if(!o)return;let r=this._createComponentContext(),c=o?o.call(r,v,r):null;c&&this._container&&this._renderVNode(c,this._container),this._setupReactiveUpdates(r,o)}async _compileTemplate(o){try{let r=await import("@lytjs/compiler"),{compile:c}=r,{code:i}=c(o);return new Function("h","_ctx",`return ${i}`)}catch(r){return null}}_createComponentContext(){let o=e.state?typeof e.state=="function"?e.state():{...e.state}:{},r=e.computed||{},c=e.methods||{},i={...this._props,...o};for(let[d,s]of Object.entries(r))typeof s=="function"?Object.defineProperty(i,d,{get:s.bind(i),enumerable:!0}):s&&typeof s=="object"&&"get"in s&&Object.defineProperty(i,d,{get:s.get.bind(i),enumerable:!0});for(let[d,s]of Object.entries(c))typeof s=="function"&&(i[d]=s.bind(i));return i.emit=(d,...s)=>{let f=y[d]||d,m=new CustomEvent(f,{detail:s.length===1?s[0]:s,bubbles:!0,composed:!0});this.dispatchEvent(m)},i.$el=this._container,i.$attrs={...this._props},i.$slots=this._getSlotContent(),i}_setupReactiveUpdates(o,r){try{import("@lytjs/reactivity").then(c=>{let{effect:i,stop:d}=c,s=i(()=>{if(!this._connected||!this._container||!r)return;let m=r.call(o,v,o);m&&(this._container.innerHTML="",this._renderVNode(m,this._container))},{lazy:!0}),f=e.state?typeof e.state=="function"?Object.keys(e.state()):Object.keys(e.state):[];for(let m of f){let C=o[m],P=Object.getOwnPropertyDescriptor(o,m);this._originalDescriptors.set(m,P),Object.defineProperty(o,m,{get(){return C},set(_){C=_;try{s()}catch(k){}},enumerable:!0})}this._effectCleanup=()=>{try{d(s)}catch(m){}}}).catch(()=>{this._setupReactiveUpdatesFallback(o,r)})}catch(c){this._setupReactiveUpdatesFallback(o,r)}}_setupReactiveUpdatesFallback(o,r){let c=e.state?typeof e.state=="function"?Object.keys(e.state()):Object.keys(e.state):[];for(let i of c){let s=o[i],f=Object.getOwnPropertyDescriptor(o,i);this._originalDescriptors.set(i,f);let m=this;Object.defineProperty(o,i,{get(){return s},set(C){s=C,m._scheduleUpdate(o,r)},enumerable:!0})}}_scheduleUpdate(o,r){this._updateScheduled||(this._updateScheduled=!0,Promise.resolve().then(()=>{if(this._updateScheduled=!1,!this._connected||!this._container||!r)return;let c=r.call(o,v,o);c&&(this._container.innerHTML="",this._renderVNode(c,this._container))}))}async _updateComponent(){if(!this._container)return;let o=e.render||null;if(!o&&e.template&&(this._compiledTemplate&&this._compiledTemplate.template===e.template?o=this._compiledTemplate.render:(o=await this._compileTemplate(e.template),o&&(this._compiledTemplate={template:e.template,render:o}))),!o)return;let r=this._createComponentContext(),c=o?o.call(r,v,r):null;this._container.innerHTML="",c&&this._renderVNode(c,this._container)}_renderVNode(o,r){let c=this._vNodeToElement(o);c&&r.appendChild(c)}_vNodeToElement(o){if(!o)return null;if(typeof o.type=="symbol"){let r=document.createDocumentFragment();if(Array.isArray(o.children))for(let c of o.children){let i=this._vNodeToElement(c);i&&r.appendChild(i)}return r}if(typeof o.children=="string")return document.createTextNode(o.children);if(typeof o.type=="string"){let r=document.createElement(o.type);if(o.props)for(let[c,i]of Object.entries(o.props))if(c==="style"&&typeof i=="object")for(let[d,s]of Object.entries(i))r.style[d]=s;else if(c==="class"){if(typeof i=="string")r.className=i;else if(typeof i=="object"){let d=[];for(let[s,f]of Object.entries(i))f&&d.push(s);r.className=d.join(" ")}}else if(c.startsWith("on")&&typeof i=="function"){let d=c.slice(2).toLowerCase();r.addEventListener(d,i),this._eventCleanups.push(()=>{r.removeEventListener(d,i)})}else c==="ref"&&typeof i=="function"?i(r):r.setAttribute(c,String(i));if(Array.isArray(o.children))for(let c of o.children){let i=this._vNodeToElement(c);i&&r.appendChild(i)}else typeof o.children=="string"&&(r.textContent=o.children);return r}return typeof o.type=="object"||typeof o.type=="function"?o.component?this._vNodeToElement(o.component.subTree||o):document.createComment("component"):null}_forwardSlots(){if(!this._shadowRoot||!this._container)return;let o=this.querySelectorAll("[slot]");for(let c of o){let i=c.getAttribute("slot")||"default",d=document.createElement("slot");i!=="default"&&d.setAttribute("name",i),this._container.appendChild(d)}let r=document.createElement("slot");this._container.appendChild(r)}_getSlotContent(){var i;let o={},r=this.querySelectorAll("[slot]");for(let d of r){let s=d.getAttribute("slot")||"default";o[s]||(o[s]=[]),o[s].push(d.cloneNode(!0))}let c=[];for(let d of Array.from(this.childNodes))(i=d.hasAttribute)!=null&&i.call(d,"slot")||c.push(d.cloneNode(!0));return c.length>0&&(o.default=c),o}get _lytInstance(){return this._instance}get _lytProps(){return{...this._props}}}}function I(e,t,n){if(!e.includes("-"))throw new Error(`[Lyt Web Component] \u6807\u7B7E\u540D "${e}" \u5FC5\u987B\u5305\u542B\u8FDE\u5B57\u7B26 (-)\u3002\u8FD9\u662F Custom Element \u89C4\u8303\u7684\u8981\u6C42\u3002`);if(!j())return;let l=ye(t,n);customElements.define(e,l)}function ge(e){for(let{tagName:t,component:n,options:l}of e)I(t,n,l)}function he(e){if(j())try{let t=customElements;t.__unregister&&t.__unregister(e)}catch(t){}}async function be(e,t,n){let l=t.match(/<template>([\s\S]*?)<\/template>/),a=t.match(/<script[^>]*>([\s\S]*?)<\/script>/),y=/<style[^>]*>([\s\S]*?)<\/style>/g,u=[],g;for(;(g=y.exec(t))!==null;)u.push(g);let p=(n==null?void 0:n.styles)||"";for(let r of u)p+=r[1]+`
2
+ `;let h=l?l[1].trim():void 0,b={};if(a){let r=a[1].trim();if(r.match(/export\s+default\s*(\{[\s\S]*\}|\([\s\S]*\)[\s\S]*?\))/))try{let i={},d={exports:i};new Function("module","exports",`"use strict"; ${r.replace(/export\s+default\s*/,"module.exports =")}`)(d,i),b=d.exports||i}catch(i){}}let o={...n,styles:p};h&&!b.template&&!b.render&&(b.template=h),I(e,b,o)}function Ce(e,t=[]){return Object.keys(e).filter(n=>!t.includes(n)).map(pe)}function ve(e,t,n){let l={};for(let a=0;a<e.length;a++){let y=e[a],u=y.name,g=y.value;if(u.startsWith("on"))continue;let p=(t==null?void 0:t[u])||U(u);n!=null&&n[u]?l[p]=n[u](g):l[p]=$(g)}return l}function _e(e){let t=Array.isArray(e)?e:Object.keys(e),n={};for(let l of t)n[l]={name:l,options:{bubbles:!0,composed:!0,cancelable:!0}};return n}function Ee(e,t,n={}){if(!e||!t)return null;let{append:l=!1,id:a}=n;if(a){let u=t.getElementById(a);if(u)return u.textContent=e,u}let y=document.createElement("style");if(a&&(y.id=a),y.textContent=e,l)t.appendChild(y);else{let u=t.querySelector("div");u?t.insertBefore(y,u):t.insertBefore(y,t.firstChild)}return y}function Ae(e,t){let n=`[${t}]`;return e.replace(/([^{}@/][^{}]*?)(\s*\{[^{}]*\})/g,(l,a,y)=>a.trim().startsWith("@")||a.includes(":host")?l:a.split(",").map(g=>{let p=g.trim();if(!p||p.startsWith("@"))return g;let h=p.indexOf("::"),b=h!==-1?p.slice(h):"",o=h!==-1?p.slice(0,h):p,r=o.indexOf(":"),c=r!==-1?o.slice(r):"",d=(r!==-1?o.slice(0,r):o).split(/\s+/).filter(Boolean),s=d[d.length-1];return s&&(d[d.length-1]=s+n),d.join(" ")+c+b}).join(", ")+y)}function Pe(e="data-v"){let t="abcdef0123456789",n="";for(let l=0;l<8;l++)n+=t[Math.floor(Math.random()*t.length)];return`${e}-${n}`}export{ve as attributesToProps,I as defineCustomElement,be as defineCustomElementFromSFC,_e as eventsToCustomEvents,Pe as generateScopeId,Ee as injectStyles,j as isBrowser,Ce as propsToAttributes,ge as registerComponents,Ae as scopedCSS,he as unregisterElement};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lytjs/core",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "Lyt.js 核心入口 - 整合响应式、编译器、虚拟 DOM、渲染器和组件系统",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -61,12 +61,12 @@
61
61
  "createApp"
62
62
  ],
63
63
  "dependencies": {
64
- "@lytjs/common": "^5.0.0",
65
- "@lytjs/reactivity": "^5.0.0",
66
- "@lytjs/compiler": "^5.0.0",
67
- "@lytjs/vdom": "^5.0.0",
68
- "@lytjs/renderer": "^5.0.0",
69
- "@lytjs/component": "^5.0.0"
64
+ "@lytjs/common": "^5.0.1",
65
+ "@lytjs/reactivity": "^5.0.1",
66
+ "@lytjs/compiler": "^5.0.1",
67
+ "@lytjs/vdom": "^5.0.1",
68
+ "@lytjs/renderer": "^5.0.1",
69
+ "@lytjs/component": "^5.0.1"
70
70
  },
71
71
  "engines": {
72
72
  "node": ">=18.0.0"