UNPKG

mx-ui-components

Version:

mobius ui library

1 lines • 10.2 MB
(function(ha,ra){typeof exports=="object"&&typeof module<"u"?ra(exports):typeof define=="function"&&define.amd?define(["exports"],ra):(ha=typeof globalThis<"u"?globalThis:ha||self,ra(ha.mobius={}))})(this,function(exports){"use strict";var qb=Object.defineProperty;var Ey=ha=>{throw TypeError(ha)};var Qb=(ha,ra,Qa)=>ra in ha?qb(ha,ra,{enumerable:!0,configurable:!0,writable:!0,value:Qa}):ha[ra]=Qa;var Di=(ha,ra,Qa)=>Qb(ha,typeof ra!="symbol"?ra+"":ra,Qa),Ty=(ha,ra,Qa)=>ra.has(ha)||Ey("Cannot "+Qa);var Yc=(ha,ra,Qa)=>(Ty(ha,ra,"read from private field"),Qa?Qa.call(ha):ra.get(ha)),mA=(ha,ra,Qa)=>ra.has(ha)?Ey("Cannot add the same private member more than once"):ra instanceof WeakSet?ra.add(ha):ra.set(ha,Qa),vA=(ha,ra,Qa,wu)=>(Ty(ha,ra,"write to private field"),wu?wu.call(ha,Qa):ra.set(ha,Qa),Qa);var ha,ra,LA,kA,DA,cd,RA,bc,pd,gd,Hu,xa,wh,xu,xh,Eh,Th,Ih,Lh,Xf,Bd,Dh,tp,Rh,Nh,yd,Mh,Vd,Oh,Ph,$h,_d,Ud,ip,Wd,zd,Gd,rp,Bh,Fh,Kd,jd,qd,Hh,Vh,Uh,Wh,zh,bd,Gh,Kh,jh,qh,Qh,Yh,Xh,Zh,sp,lp,Gu,Yd,Jh,ef,Eu,Xd,tf,nf,Zd,rf,of,cf,cp,up,Jd,th,uf,df,ih,hf,ff,Jc,pf,gf,mf,vf,Af,pp,nh,gp,yf,_f,vp,Ap,rh,bf,Cf,Sf,wf,Tu,ju,Iu,ba;var _documentCurrentScript=typeof document<"u"?document.currentScript:null;const PUBLIC_VERSION="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(PUBLIC_VERSION);const PROPS_IS_IMMUTABLE=1,PROPS_IS_RUNES=2,PROPS_IS_UPDATED=4,PROPS_IS_BINDABLE=8,PROPS_IS_LAZY_INITIAL=16,TEMPLATE_FRAGMENT=1,TEMPLATE_USE_IMPORT_NODE=2,HYDRATION_START="[",HYDRATION_START_ELSE="[!",HYDRATION_END="]",HYDRATION_ERROR={},UNINITIALIZED=Symbol(),DEV=!1;function hydration_mismatch(Se){console.warn("hydration_mismatch")}var is_array=Array.isArray,array_from=Array.from,object_keys=Object.keys,define_property=Object.defineProperty,get_descriptor=Object.getOwnPropertyDescriptor,get_descriptors=Object.getOwnPropertyDescriptors,object_prototype=Object.prototype,array_prototype=Array.prototype,get_prototype_of=Object.getPrototypeOf;function is_function(Se){return typeof Se=="function"}const noop$6=()=>{};function run_all(Se){for(var Ae=0;Ae<Se.length;Ae++)Se[Ae]()}const DERIVED=2,EFFECT=4,RENDER_EFFECT=8,BLOCK_EFFECT=16,BRANCH_EFFECT=32,ROOT_EFFECT=64,UNOWNED=128,DISCONNECTED=256,CLEAN=512,DIRTY=1024,MAYBE_DIRTY=2048,INERT=4096,DESTROYED=8192,EFFECT_RAN=16384,EFFECT_TRANSPARENT=32768,LEGACY_DERIVED_PROP=65536,HEAD_EFFECT=1<<18,EFFECT_HAS_DERIVED=1<<19,STATE_SYMBOL=Symbol("$state"),LOADING_ATTR_SYMBOL=Symbol("");function equals$3(Se){return Se===this.v}function safe_not_equal(Se,Ae){return Se!=Se?Ae==Ae:Se!==Ae||Se!==null&&typeof Se=="object"||typeof Se=="function"}function safe_equals(Se){return!safe_not_equal(Se,this.v)}function effect_in_teardown(Se){throw new Error("effect_in_teardown")}function effect_in_unowned_derived(){throw new Error("effect_in_unowned_derived")}function effect_orphan(Se){throw new Error("effect_orphan")}function effect_update_depth_exceeded(){throw new Error("effect_update_depth_exceeded")}function hydration_failed(){throw new Error("hydration_failed")}function props_invalid_value(Se){throw new Error("props_invalid_value")}function state_descriptors_fixed(){throw new Error("state_descriptors_fixed")}function state_prototype_fixed(){throw new Error("state_prototype_fixed")}function state_unsafe_local_read(){throw new Error("state_unsafe_local_read")}function state_unsafe_mutation(){throw new Error("state_unsafe_mutation")}function source(Se){return{f:0,v:Se,reactions:null,equals:equals$3,version:0}}function state(Se){return push_derived_source(source(Se))}function mutable_source(Se,Ae=!1){var Ce;const _e=source(Se);return Ae||(_e.equals=safe_equals),component_context!==null&&component_context.l!==null&&((Ce=component_context.l).s??(Ce.s=[])).push(_e),_e}function push_derived_source(Se){return active_reaction!==null&&active_reaction.f&DERIVED&&(derived_sources===null?set_derived_sources([Se]):derived_sources.push(Se)),Se}function set$b(Se,Ae){return active_reaction!==null&&is_runes()&&active_reaction.f&(DERIVED|BLOCK_EFFECT)&&(derived_sources===null||!derived_sources.includes(Se))&&state_unsafe_mutation(),internal_set(Se,Ae)}function internal_set(Se,Ae){return Se.equals(Ae)||(Se.v=Ae,Se.version=increment_version(),mark_reactions(Se,DIRTY),is_runes()&&active_effect!==null&&active_effect.f&CLEAN&&!(active_effect.f&BRANCH_EFFECT)&&(new_deps!==null&&new_deps.includes(Se)?(set_signal_status(active_effect,DIRTY),schedule_effect(active_effect)):untracked_writes===null?set_untracked_writes([Se]):untracked_writes.push(Se))),Ae}function mark_reactions(Se,Ae){var _e=Se.reactions;if(_e!==null)for(var Ce=is_runes(),xe=_e.length,Ee=0;Ee<xe;Ee++){var Te=_e[Ee],Ie=Te.f;Ie&DIRTY||!Ce&&Te===active_effect||(set_signal_status(Te,Ae),Ie&(CLEAN|UNOWNED)&&(Ie&DERIVED?mark_reactions(Te,MAYBE_DIRTY):schedule_effect(Te)))}}function derived$1(Se){var Ae=DERIVED|DIRTY;active_effect===null?Ae|=UNOWNED:active_effect.f|=EFFECT_HAS_DERIVED;const _e={children:null,ctx:component_context,deps:null,equals:equals$3,f:Ae,fn:Se,reactions:null,v:null,version:0,parent:active_effect};if(active_reaction!==null&&active_reaction.f&DERIVED){var Ce=active_reaction;(Ce.children??(Ce.children=[])).push(_e)}return _e}function derived_safe_equal(Se){const Ae=derived$1(Se);return Ae.equals=safe_equals,Ae}function destroy_derived_children(Se){var Ae=Se.children;if(Ae!==null){Se.children=null;for(var _e=0;_e<Ae.length;_e+=1){var Ce=Ae[_e];Ce.f&DERIVED?destroy_derived(Ce):destroy_effect(Ce)}}}function execute_derived(Se){var Ae,_e=active_effect;set_active_effect(Se.parent);try{destroy_derived_children(Se),Ae=update_reaction(Se)}finally{set_active_effect(_e)}return Ae}function update_derived(Se){var Ae=execute_derived(Se),_e=(skip_reaction||Se.f&UNOWNED)&&Se.deps!==null?MAYBE_DIRTY:CLEAN;set_signal_status(Se,_e),Se.equals(Ae)||(Se.v=Ae,Se.version=increment_version())}function destroy_derived(Se){destroy_derived_children(Se),remove_reactions(Se,0),set_signal_status(Se,DESTROYED),Se.v=Se.children=Se.deps=Se.ctx=Se.reactions=null}function validate_effect(Se){active_effect===null&&active_reaction===null&&effect_orphan(),active_reaction!==null&&active_reaction.f&UNOWNED&&effect_in_unowned_derived(),is_destroying_effect&&effect_in_teardown()}function push_effect(Se,Ae){var _e=Ae.last;_e===null?Ae.last=Ae.first=Se:(_e.next=Se,Se.prev=_e,Ae.last=Se)}function create_effect(Se,Ae,_e,Ce=!0){var xe=(Se&ROOT_EFFECT)!==0,Ee=active_effect,Te={ctx:component_context,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:Se|DIRTY,first:null,fn:Ae,last:null,next:null,parent:xe?null:Ee,prev:null,teardown:null,transitions:null,version:0};if(_e){var Ie=is_flushing_effect;try{set_is_flushing_effect(!0),update_effect(Te),Te.f|=EFFECT_RAN}catch(Me){throw destroy_effect(Te),Me}finally{set_is_flushing_effect(Ie)}}else Ae!==null&&schedule_effect(Te);var ke=_e&&Te.deps===null&&Te.first===null&&Te.nodes_start===null&&Te.teardown===null&&(Te.f&EFFECT_HAS_DERIVED)===0;if(!ke&&!xe&&Ce&&(Ee!==null&&push_effect(Te,Ee),active_reaction!==null&&active_reaction.f&DERIVED)){var De=active_reaction;(De.children??(De.children=[])).push(Te)}return Te}function user_effect(Se){validate_effect();var Ae=active_effect!==null&&(active_effect.f&BRANCH_EFFECT)!==0&&component_context!==null&&!component_context.m;if(Ae){var _e=component_context;(_e.e??(_e.e=[])).push({fn:Se,effect:active_effect,reaction:active_reaction})}else{var Ce=effect(Se);return Ce}}function effect_root(Se){const Ae=create_effect(ROOT_EFFECT,Se,!0);return()=>{destroy_effect(Ae)}}function effect(Se){return create_effect(EFFECT,Se,!1)}function render_effect(Se){return create_effect(RENDER_EFFECT,Se,!0)}function template_effect(Se){return block$2(Se)}function block$2(Se,Ae=0){return create_effect(RENDER_EFFECT|BLOCK_EFFECT|Ae,Se,!0)}function branch(Se,Ae=!0){return create_effect(RENDER_EFFECT|BRANCH_EFFECT,Se,!0,Ae)}function execute_effect_teardown(Se){var Ae=Se.teardown;if(Ae!==null){const _e=is_destroying_effect,Ce=active_reaction;set_is_destroying_effect(!0),set_active_reaction(null);try{Ae.call(null)}finally{set_is_destroying_effect(_e),set_active_reaction(Ce)}}}function destroy_effect_deriveds(Se){var Ae=Se.deriveds;if(Ae!==null){Se.deriveds=null;for(var _e=0;_e<Ae.length;_e+=1)destroy_derived(Ae[_e])}}function destroy_effect_children(Se,Ae=!1){var _e=Se.first;for(Se.first=Se.last=null;_e!==null;){var Ce=_e.next;destroy_effect(_e,Ae),_e=Ce}}function destroy_block_effect_children(Se){for(var Ae=Se.first;Ae!==null;){var _e=Ae.next;Ae.f&BRANCH_EFFECT||destroy_effect(Ae),Ae=_e}}function destroy_effect(Se,Ae=!0){var _e=!1;if((Ae||Se.f&HEAD_EFFECT)&&Se.nodes_start!==null){for(var Ce=Se.nodes_start,xe=Se.nodes_end;Ce!==null;){var Ee=Ce===xe?null:get_next_sibling(Ce);Ce.remove(),Ce=Ee}_e=!0}destroy_effect_children(Se,Ae&&!_e),destroy_effect_deriveds(Se),remove_reactions(Se,0),set_signal_status(Se,DESTROYED);var Te=Se.transitions;if(Te!==null)for(const ke of Te)ke.stop();execute_effect_teardown(Se);var Ie=Se.parent;Ie!==null&&Ie.first!==null&&unlink_effect(Se),Se.next=Se.prev=Se.teardown=Se.ctx=Se.deps=Se.parent=Se.fn=Se.nodes_start=Se.nodes_end=null}function unlink_effect(Se){var Ae=Se.parent,_e=Se.prev,Ce=Se.next;_e!==null&&(_e.next=Ce),Ce!==null&&(Ce.prev=_e),Ae!==null&&(Ae.first===Se&&(Ae.first=Ce),Ae.last===Se&&(Ae.last=_e))}function pause_effect(Se,Ae){var _e=[];pause_children(Se,_e,!0),run_out_transitions(_e,()=>{destroy_effect(Se),Ae&&Ae()})}function run_out_transitions(Se,Ae){var _e=Se.length;if(_e>0){var Ce=()=>--_e||Ae();for(var xe of Se)xe.out(Ce)}else Ae()}function pause_children(Se,Ae,_e){if(!(Se.f&INERT)){if(Se.f^=INERT,Se.transitions!==null)for(const Te of Se.transitions)(Te.is_global||_e)&&Ae.push(Te);for(var Ce=Se.first;Ce!==null;){var xe=Ce.next,Ee=(Ce.f&EFFECT_TRANSPARENT)!==0||(Ce.f&BRANCH_EFFECT)!==0;pause_children(Ce,Ae,Ee?_e:!1),Ce=xe}}}function resume_effect(Se){resume_children(Se,!0)}function resume_children(Se,Ae){if(Se.f&INERT){check_dirtiness(Se)&&update_effect(Se),Se.f^=INERT;for(var _e=Se.first;_e!==null;){var Ce=_e.next,xe=(_e.f&EFFECT_TRANSPARENT)!==0||(_e.f&BRANCH_EFFECT)!==0;resume_children(_e,xe?Ae:!1),_e=Ce}if(Se.transitions!==null)for(const Ee of Se.transitions)(Ee.is_global||Ae)&&Ee.in()}}const request_idle_callback=typeof requestIdleCallback>"u"?Se=>setTimeout(Se,1):requestIdleCallback;let is_micro_task_queued$1=!1,is_idle_task_queued=!1,current_queued_micro_tasks=[],current_queued_idle_tasks=[];function process_micro_tasks(){is_micro_task_queued$1=!1;const Se=current_queued_micro_tasks.slice();current_queued_micro_tasks=[],run_all(Se)}function process_idle_tasks(){is_idle_task_queued=!1;const Se=current_queued_idle_tasks.slice();current_queued_idle_tasks=[],run_all(Se)}function queue_micro_task(Se){is_micro_task_queued$1||(is_micro_task_queued$1=!0,queueMicrotask(process_micro_tasks)),current_queued_micro_tasks.push(Se)}function queue_idle_task(Se){is_idle_task_queued||(is_idle_task_queued=!0,request_idle_callback(process_idle_tasks)),current_queued_idle_tasks.push(Se)}function flush_tasks(){is_micro_task_queued$1&&process_micro_tasks(),is_idle_task_queued&&process_idle_tasks()}function lifecycle_outside_component(Se){throw new Error("lifecycle_outside_component")}const FLUSH_MICROTASK=0,FLUSH_SYNC=1;let scheduler_mode=FLUSH_MICROTASK,is_micro_task_queued=!1,is_flushing_effect=!1,is_destroying_effect=!1;function set_is_flushing_effect(Se){is_flushing_effect=Se}function set_is_destroying_effect(Se){is_destroying_effect=Se}let queued_root_effects=[],flush_count=0,dev_effect_stack=[],active_reaction=null;function set_active_reaction(Se){active_reaction=Se}let active_effect=null;function set_active_effect(Se){active_effect=Se}let derived_sources=null;function set_derived_sources(Se){derived_sources=Se}let new_deps=null,skipped_deps=0,untracked_writes=null;function set_untracked_writes(Se){untracked_writes=Se}let current_version=0,skip_reaction=!1,component_context=null;function increment_version(){return++current_version}function is_runes(){return component_context!==null&&component_context.l===null}function check_dirtiness(Se){var Te,Ie;var Ae=Se.f;if(Ae&DIRTY)return!0;if(Ae&MAYBE_DIRTY){var _e=Se.deps,Ce=(Ae&UNOWNED)!==0;if(_e!==null){var xe;if(Ae&DISCONNECTED){for(xe=0;xe<_e.length;xe++)((Te=_e[xe]).reactions??(Te.reactions=[])).push(Se);Se.f^=DISCONNECTED}for(xe=0;xe<_e.length;xe++){var Ee=_e[xe];if(check_dirtiness(Ee)&&update_derived(Ee),Ce&&active_effect!==null&&!skip_reaction&&!((Ie=Ee==null?void 0:Ee.reactions)!=null&&Ie.includes(Se))&&(Ee.reactions??(Ee.reactions=[])).push(Se),Ee.version>Se.version)return!0}}Ce||set_signal_status(Se,CLEAN)}return!1}function handle_error(Se,Ae,_e){throw Se}function update_reaction(Se){var Pe;var Ae=new_deps,_e=skipped_deps,Ce=untracked_writes,xe=active_reaction,Ee=skip_reaction,Te=derived_sources,Ie=component_context,ke=Se.f;new_deps=null,skipped_deps=0,untracked_writes=null,active_reaction=ke&(BRANCH_EFFECT|ROOT_EFFECT)?null:Se,skip_reaction=!is_flushing_effect&&(ke&UNOWNED)!==0,derived_sources=null,component_context=Se.ctx;try{var De=(0,Se.fn)(),Me=Se.deps;if(new_deps!==null){var Oe;if(remove_reactions(Se,skipped_deps),Me!==null&&skipped_deps>0)for(Me.length=skipped_deps+new_deps.length,Oe=0;Oe<new_deps.length;Oe++)Me[skipped_deps+Oe]=new_deps[Oe];else Se.deps=Me=new_deps;if(!skip_reaction)for(Oe=skipped_deps;Oe<Me.length;Oe++)((Pe=Me[Oe]).reactions??(Pe.reactions=[])).push(Se)}else Me!==null&&skipped_deps<Me.length&&(remove_reactions(Se,skipped_deps),Me.length=skipped_deps);return De}finally{new_deps=Ae,skipped_deps=_e,untracked_writes=Ce,active_reaction=xe,skip_reaction=Ee,derived_sources=Te,component_context=Ie}}function remove_reaction(Se,Ae){let _e=Ae.reactions;if(_e!==null){var Ce=_e.indexOf(Se);if(Ce!==-1){var xe=_e.length-1;xe===0?_e=Ae.reactions=null:(_e[Ce]=_e[xe],_e.pop())}}_e===null&&Ae.f&DERIVED&&(new_deps===null||!new_deps.includes(Ae))&&(set_signal_status(Ae,MAYBE_DIRTY),Ae.f&(UNOWNED|DISCONNECTED)||(Ae.f^=DISCONNECTED),remove_reactions(Ae,0))}function remove_reactions(Se,Ae){var _e=Se.deps;if(_e!==null)for(var Ce=Ae;Ce<_e.length;Ce++)remove_reaction(Se,_e[Ce])}function update_effect(Se){var Ae=Se.f;if(!(Ae&DESTROYED)){set_signal_status(Se,CLEAN);var _e=active_effect;active_effect=Se;try{Ae&BLOCK_EFFECT?destroy_block_effect_children(Se):destroy_effect_children(Se),destroy_effect_deriveds(Se),execute_effect_teardown(Se);var Ce=update_reaction(Se);Se.teardown=typeof Ce=="function"?Ce:null,Se.version=current_version}catch(xe){handle_error(xe)}finally{active_effect=_e}}}function infinite_loop_guard(){flush_count>1e3&&(flush_count=0,effect_update_depth_exceeded()),flush_count++}function flush_queued_root_effects(Se){var Ae=Se.length;if(Ae!==0){infinite_loop_guard();var _e=is_flushing_effect;is_flushing_effect=!0;try{for(var Ce=0;Ce<Ae;Ce++){var xe=Se[Ce];xe.f&CLEAN||(xe.f^=CLEAN);var Ee=[];process_effects(xe,Ee),flush_queued_effects(Ee)}}finally{is_flushing_effect=_e}}}function flush_queued_effects(Se){var Ae=Se.length;if(Ae!==0)for(var _e=0;_e<Ae;_e++){var Ce=Se[_e];!(Ce.f&(DESTROYED|INERT))&&check_dirtiness(Ce)&&(update_effect(Ce),Ce.deps===null&&Ce.first===null&&Ce.nodes_start===null&&(Ce.teardown===null?unlink_effect(Ce):Ce.fn=null))}}function process_deferred(){if(is_micro_task_queued=!1,flush_count>1001)return;const Se=queued_root_effects;queued_root_effects=[],flush_queued_root_effects(Se),is_micro_task_queued||(flush_count=0)}function schedule_effect(Se){scheduler_mode===FLUSH_MICROTASK&&(is_micro_task_queued||(is_micro_task_queued=!0,queueMicrotask(process_deferred)));for(var Ae=Se;Ae.parent!==null;){Ae=Ae.parent;var _e=Ae.f;if(_e&(ROOT_EFFECT|BRANCH_EFFECT)){if(!(_e&CLEAN))return;Ae.f^=CLEAN}}queued_root_effects.push(Ae)}function process_effects(Se,Ae){var _e=Se.first,Ce=[];e:for(;_e!==null;){var xe=_e.f,Ee=(xe&BRANCH_EFFECT)!==0,Te=Ee&&(xe&CLEAN)!==0;if(!Te&&!(xe&INERT))if(xe&RENDER_EFFECT){Ee?_e.f^=CLEAN:check_dirtiness(_e)&&update_effect(_e);var Ie=_e.first;if(Ie!==null){_e=Ie;continue}}else xe&EFFECT&&Ce.push(_e);var ke=_e.next;if(ke===null){let Oe=_e.parent;for(;Oe!==null;){if(Se===Oe)break e;var De=Oe.next;if(De!==null){_e=De;continue e}Oe=Oe.parent}}_e=ke}for(var Me=0;Me<Ce.length;Me++)Ie=Ce[Me],Ae.push(Ie),process_effects(Ie,Ae)}function flush_sync(Se){var Ae=scheduler_mode,_e=queued_root_effects;try{infinite_loop_guard();const xe=[];scheduler_mode=FLUSH_SYNC,queued_root_effects=xe,is_micro_task_queued=!1,flush_queued_root_effects(_e);var Ce=Se==null?void 0:Se();return flush_tasks(),(queued_root_effects.length>0||xe.length>0)&&flush_sync(),flush_count=0,Ce}finally{scheduler_mode=Ae,queued_root_effects=_e}}function get$7(Se){var Ie;var Ae=Se.f,_e=(Ae&DERIVED)!==0;if(_e&&Ae&DESTROYED){var Ce=execute_derived(Se);return destroy_derived(Se),Ce}if(active_reaction!==null){derived_sources!==null&&derived_sources.includes(Se)&&state_unsafe_local_read();var xe=active_reaction.deps;new_deps===null&&xe!==null&&xe[skipped_deps]===Se?skipped_deps++:new_deps===null?new_deps=[Se]:new_deps.push(Se),untracked_writes!==null&&active_effect!==null&&active_effect.f&CLEAN&&!(active_effect.f&BRANCH_EFFECT)&&untracked_writes.includes(Se)&&(set_signal_status(active_effect,DIRTY),schedule_effect(active_effect))}else if(_e&&Se.deps===null){var Ee=Se,Te=Ee.parent;Te!==null&&!((Ie=Te.deriveds)!=null&&Ie.includes(Ee))&&(Te.deriveds??(Te.deriveds=[])).push(Ee)}return _e&&(Ee=Se,check_dirtiness(Ee)&&update_derived(Ee)),Se.v}function untrack(Se){const Ae=active_reaction;try{return active_reaction=null,Se()}finally{active_reaction=Ae}}const STATUS_MASK=-3585;function set_signal_status(Se,Ae){Se.f=Se.f&STATUS_MASK|Ae}function push$5(Se,Ae=!1,_e){component_context={p:component_context,c:null,e:null,m:!1,s:Se,x:null,l:null},Ae||(component_context.l={s:null,u:null,r1:[],r2:source(!1)})}function pop$1(Se){const Ae=component_context;if(Ae!==null){Se!==void 0&&(Ae.x=Se);const Te=Ae.e;if(Te!==null){var _e=active_effect,Ce=active_reaction;Ae.e=null;try{for(var xe=0;xe<Te.length;xe++){var Ee=Te[xe];set_active_effect(Ee.effect),set_active_reaction(Ee.reaction),effect(Ee.fn)}}finally{set_active_effect(_e),set_active_reaction(Ce)}}component_context=Ae.p,Ae.m=!0}return Se||{}}function proxy(Se,Ae=null,_e){if(typeof Se!="object"||Se===null||STATE_SYMBOL in Se)return Se;const Ce=get_prototype_of(Se);if(Ce!==object_prototype&&Ce!==array_prototype)return Se;var xe=new Map,Ee=is_array(Se),Te=source(0);Ee&&xe.set("length",source(Se.length));var Ie;return new Proxy(Se,{defineProperty(ke,De,Me){(!("value"in Me)||Me.configurable===!1||Me.enumerable===!1||Me.writable===!1)&&state_descriptors_fixed();var Oe=xe.get(De);return Oe===void 0?(Oe=source(Me.value),xe.set(De,Oe)):set$b(Oe,proxy(Me.value,Ie)),!0},deleteProperty(ke,De){var Me=xe.get(De);if(Me===void 0)De in ke&&xe.set(De,source(UNINITIALIZED));else{if(Ee&&typeof De=="string"){var Oe=xe.get("length"),Pe=Number(De);Number.isInteger(Pe)&&Pe<Oe.v&&set$b(Oe,Pe)}set$b(Me,UNINITIALIZED),update_version(Te)}return!0},get(ke,De,Me){var Be;if(De===STATE_SYMBOL)return Se;var Oe=xe.get(De),Pe=De in ke;if(Oe===void 0&&(!Pe||(Be=get_descriptor(ke,De))!=null&&Be.writable)&&(Oe=source(proxy(Pe?ke[De]:UNINITIALIZED,Ie)),xe.set(De,Oe)),Oe!==void 0){var $e=get$7(Oe);return $e===UNINITIALIZED?void 0:$e}return Reflect.get(ke,De,Me)},getOwnPropertyDescriptor(ke,De){var Me=Reflect.getOwnPropertyDescriptor(ke,De);if(Me&&"value"in Me){var Oe=xe.get(De);Oe&&(Me.value=get$7(Oe))}else if(Me===void 0){var Pe=xe.get(De),$e=Pe==null?void 0:Pe.v;if(Pe!==void 0&&$e!==UNINITIALIZED)return{enumerable:!0,configurable:!0,value:$e,writable:!0}}return Me},has(ke,De){var $e;if(De===STATE_SYMBOL)return!0;var Me=xe.get(De),Oe=Me!==void 0&&Me.v!==UNINITIALIZED||Reflect.has(ke,De);if(Me!==void 0||active_effect!==null&&(!Oe||($e=get_descriptor(ke,De))!=null&&$e.writable)){Me===void 0&&(Me=source(Oe?proxy(ke[De],Ie):UNINITIALIZED),xe.set(De,Me));var Pe=get$7(Me);if(Pe===UNINITIALIZED)return!1}return Oe},set(ke,De,Me,Oe){var We;var Pe=xe.get(De),$e=De in ke;if(Ee&&De==="length")for(var Be=Me;Be<Pe.v;Be+=1){var Fe=xe.get(Be+"");Fe!==void 0?set$b(Fe,UNINITIALIZED):Be in ke&&(Fe=source(UNINITIALIZED),xe.set(Be+"",Fe))}Pe===void 0?(!$e||(We=get_descriptor(ke,De))!=null&&We.writable)&&(Pe=source(void 0),set$b(Pe,proxy(Me,Ie)),xe.set(De,Pe)):($e=Pe.v!==UNINITIALIZED,set$b(Pe,proxy(Me,Ie)));var He=Reflect.getOwnPropertyDescriptor(ke,De);if(He!=null&&He.set&&He.set.call(Oe,Me),!$e){if(Ee&&typeof De=="string"){var Ve=xe.get("length"),Ue=Number(De);Number.isInteger(Ue)&&Ue>=Ve.v&&set$b(Ve,Ue+1)}update_version(Te)}return!0},ownKeys(ke){get$7(Te);var De=Reflect.ownKeys(ke).filter(Pe=>{var $e=xe.get(Pe);return $e===void 0||$e.v!==UNINITIALIZED});for(var[Me,Oe]of xe)Oe.v!==UNINITIALIZED&&!(Me in ke)&&De.push(Me);return De},setPrototypeOf(){state_prototype_fixed()}})}function update_version(Se,Ae=1){set$b(Se,Se.v+Ae)}var $window,first_child_getter,next_sibling_getter;function init_operations(){if($window===void 0){$window=window;var Se=Element.prototype,Ae=Node.prototype;first_child_getter=get_descriptor(Ae,"firstChild").get,next_sibling_getter=get_descriptor(Ae,"nextSibling").get,Se.__click=void 0,Se.__className="",Se.__attributes=null,Se.__styles=null,Se.__e=void 0,Text.prototype.__t=void 0}}function create_text(Se=""){return document.createTextNode(Se)}function get_first_child(Se){return first_child_getter.call(Se)}function get_next_sibling(Se){return next_sibling_getter.call(Se)}function child(Se,Ae){if(!hydrating)return get_first_child(Se);var _e=get_first_child(hydrate_node);if(_e===null)_e=hydrate_node.appendChild(create_text());else if(Ae&&_e.nodeType!==3){var Ce=create_text();return _e==null||_e.before(Ce),set_hydrate_node(Ce),Ce}return set_hydrate_node(_e),_e}function first_child(Se,Ae){if(!hydrating){var _e=get_first_child(Se);return _e instanceof Comment&&_e.data===""?get_next_sibling(_e):_e}return hydrate_node}function sibling(Se,Ae=1,_e=!1){let Ce=hydrating?hydrate_node:Se;for(;Ae--;)Ce=get_next_sibling(Ce);if(!hydrating)return Ce;var xe=Ce.nodeType;if(_e&&xe!==3){var Ee=create_text();return Ce==null||Ce.before(Ee),set_hydrate_node(Ee),Ee}return set_hydrate_node(Ce),Ce}function clear_text_content(Se){Se.textContent=""}let hydrating=!1;function set_hydrating(Se){hydrating=Se}let hydrate_node;function set_hydrate_node(Se){if(Se===null)throw hydration_mismatch(),HYDRATION_ERROR;return hydrate_node=Se}function hydrate_next(){return set_hydrate_node(get_next_sibling(hydrate_node))}function reset$2(Se){if(hydrating){if(get_next_sibling(hydrate_node)!==null)throw hydration_mismatch(),HYDRATION_ERROR;hydrate_node=Se}}function next(Se=1){if(hydrating){for(var Ae=Se,_e=hydrate_node;Ae--;)_e=get_next_sibling(_e);hydrate_node=_e}}function remove_nodes(){for(var Se=0,Ae=hydrate_node;;){if(Ae.nodeType===8){var _e=Ae.data;if(_e===HYDRATION_END){if(Se===0)return Ae;Se-=1}else(_e===HYDRATION_START||_e===HYDRATION_START_ELSE)&&(Se+=1)}var Ce=get_next_sibling(Ae);Ae.remove(),Ae=Ce}}const all_registered_events=new Set,root_event_handles=new Set;function create_event(Se,Ae,_e,Ce){function xe(Ee){if(Ce.capture||handle_event_propagation.call(Ae,Ee),!Ee.cancelBubble){var Te=active_reaction,Ie=active_effect;set_active_reaction(null),set_active_effect(null);try{return _e.call(this,Ee)}finally{set_active_reaction(Te),set_active_effect(Ie)}}}return Se.startsWith("pointer")||Se.startsWith("touch")||Se==="wheel"?queue_micro_task(()=>{Ae.addEventListener(Se,xe,Ce)}):Ae.addEventListener(Se,xe,Ce),xe}function delegate$1(Se){for(var Ae=0;Ae<Se.length;Ae++)all_registered_events.add(Se[Ae]);for(var _e of root_event_handles)_e(Se)}function handle_event_propagation(Se){var Ue;var Ae=this,_e=Ae.ownerDocument,Ce=Se.type,xe=((Ue=Se.composedPath)==null?void 0:Ue.call(Se))||[],Ee=xe[0]||Se.target,Te=0,Ie=Se.__root;if(Ie){var ke=xe.indexOf(Ie);if(ke!==-1&&(Ae===document||Ae===window)){Se.__root=Ae;return}var De=xe.indexOf(Ae);if(De===-1)return;ke<=De&&(Te=ke)}if(Ee=xe[Te]||Se.target,Ee!==Ae){define_property(Se,"currentTarget",{configurable:!0,get(){return Ee||_e}});var Me=active_reaction,Oe=active_effect;set_active_reaction(null),set_active_effect(null);try{for(var Pe,$e=[];Ee!==null;){var Be=Ee.assignedSlot||Ee.parentNode||Ee.host||null;try{var Fe=Ee["__"+Ce];if(Fe!==void 0&&!Ee.disabled)if(is_array(Fe)){var[He,...Ve]=Fe;He.apply(Ee,[Se,...Ve])}else Fe.call(Ee,Se)}catch(We){Pe?$e.push(We):Pe=We}if(Se.cancelBubble||Be===Ae||Be===null)break;Ee=Be}if(Pe){for(let We of $e)queueMicrotask(()=>{throw We});throw Pe}}finally{Se.__root=Ae,delete Se.currentTarget,set_active_reaction(Me),set_active_effect(Oe)}}}function create_fragment_from_html(Se){var Ae=document.createElement("template");return Ae.innerHTML=Se,Ae.content}function assign_nodes(Se,Ae){var _e=active_effect;_e.nodes_start===null&&(_e.nodes_start=Se,_e.nodes_end=Ae)}function template(Se,Ae){var _e=(Ae&TEMPLATE_FRAGMENT)!==0,Ce=(Ae&TEMPLATE_USE_IMPORT_NODE)!==0,xe,Ee=!Se.startsWith("<!>");return()=>{if(hydrating)return assign_nodes(hydrate_node,null),hydrate_node;xe===void 0&&(xe=create_fragment_from_html(Ee?Se:"<!>"+Se),_e||(xe=get_first_child(xe)));var Te=Ce?document.importNode(xe,!0):xe.cloneNode(!0);if(_e){var Ie=get_first_child(Te),ke=Te.lastChild;assign_nodes(Ie,ke)}else assign_nodes(Te,Te);return Te}}function text$2(Se=""){if(!hydrating){var Ae=create_text(Se+"");return assign_nodes(Ae,Ae),Ae}var _e=hydrate_node;return _e.nodeType!==3&&(_e.before(_e=create_text()),set_hydrate_node(_e)),assign_nodes(_e,_e),_e}function comment(){if(hydrating)return assign_nodes(hydrate_node,null),hydrate_node;var Se=document.createDocumentFragment(),Ae=document.createComment(""),_e=create_text();return Se.append(Ae,_e),assign_nodes(Ae,_e),Se}function append$4(Se,Ae){if(hydrating){active_effect.nodes_end=hydrate_node,hydrate_next();return}Se!==null&&Se.before(Ae)}function is_capture_event(Se){return Se.endsWith("capture")&&Se!=="gotpointercapture"&&Se!=="lostpointercapture"}const DELEGATED_EVENTS=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function is_delegated(Se){return DELEGATED_EVENTS.includes(Se)}const ATTRIBUTE_ALIASES={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"};function normalize_attribute(Se){return Se=Se.toLowerCase(),ATTRIBUTE_ALIASES[Se]??Se}const PASSIVE_EVENTS=["touchstart","touchmove"];function is_passive_event(Se){return PASSIVE_EVENTS.includes(Se)}function set_text(Se,Ae){var _e=Ae==null?"":typeof Ae=="object"?Ae+"":Ae;_e!==(Se.__t??(Se.__t=Se.nodeValue))&&(Se.__t=_e,Se.nodeValue=_e==null?"":_e+"")}function mount(Se,Ae){return _mount(Se,Ae)}function hydrate(Se,Ae){init_operations(),Ae.intro=Ae.intro??!1;const _e=Ae.target,Ce=hydrating,xe=hydrate_node;try{for(var Ee=get_first_child(_e);Ee&&(Ee.nodeType!==8||Ee.data!==HYDRATION_START);)Ee=get_next_sibling(Ee);if(!Ee)throw HYDRATION_ERROR;set_hydrating(!0),set_hydrate_node(Ee),hydrate_next();const Te=_mount(Se,{...Ae,anchor:Ee});if(hydrate_node===null||hydrate_node.nodeType!==8||hydrate_node.data!==HYDRATION_END)throw hydration_mismatch(),HYDRATION_ERROR;return set_hydrating(!1),Te}catch(Te){if(Te===HYDRATION_ERROR)return Ae.recover===!1&&hydration_failed(),init_operations(),clear_text_content(_e),set_hydrating(!1),mount(Se,Ae);throw Te}finally{set_hydrating(Ce),set_hydrate_node(xe)}}const document_listeners=new Map;function _mount(Se,{target:Ae,anchor:_e,props:Ce={},events:xe,context:Ee,intro:Te=!0}){init_operations();var Ie=new Set,ke=Oe=>{for(var Pe=0;Pe<Oe.length;Pe++){var $e=Oe[Pe];if(!Ie.has($e)){Ie.add($e);var Be=is_passive_event($e);Ae.addEventListener($e,handle_event_propagation,{passive:Be});var Fe=document_listeners.get($e);Fe===void 0?(document.addEventListener($e,handle_event_propagation,{passive:Be}),document_listeners.set($e,1)):document_listeners.set($e,Fe+1)}}};ke(array_from(all_registered_events)),root_event_handles.add(ke);var De=void 0,Me=effect_root(()=>{var Oe=_e??Ae.appendChild(create_text());return branch(()=>{if(Ee){push$5({});var Pe=component_context;Pe.c=Ee}xe&&(Ce.$$events=xe),hydrating&&assign_nodes(Oe,null),De=Se(Oe,Ce)||{},hydrating&&(active_effect.nodes_end=hydrate_node),Ee&&pop$1()}),()=>{var Be;for(var Pe of Ie){Ae.removeEventListener(Pe,handle_event_propagation);var $e=document_listeners.get(Pe);--$e===0?(document.removeEventListener(Pe,handle_event_propagation),document_listeners.delete(Pe)):document_listeners.set(Pe,$e)}root_event_handles.delete(ke),mounted_components.delete(De),Oe!==_e&&((Be=Oe.parentNode)==null||Be.removeChild(Oe))}});return mounted_components.set(De,Me),De}let mounted_components=new WeakMap;function unmount(Se){const Ae=mounted_components.get(Se);Ae&&Ae()}function if_block(Se,Ae,_e,Ce=null,xe=!1){hydrating&&hydrate_next();var Ee=Se,Te=null,Ie=null,ke=null,De=xe?EFFECT_TRANSPARENT:0;block$2(()=>{if(ke===(ke=!!Ae()))return;let Me=!1;if(hydrating){const Oe=Ee.data===HYDRATION_START_ELSE;ke===Oe&&(Ee=remove_nodes(),set_hydrate_node(Ee),set_hydrating(!1),Me=!0)}ke?(Te?resume_effect(Te):Te=branch(()=>_e(Ee)),Ie&&pause_effect(Ie,()=>{Ie=null})):(Ie?resume_effect(Ie):Ce&&(Ie=branch(()=>Ce(Ee))),Te&&pause_effect(Te,()=>{Te=null})),Me&&set_hydrating(!0)},De),hydrating&&(Ee=hydrate_node)}function snippet(Se,Ae,..._e){var Ce=Se,xe=noop$6,Ee;block$2(()=>{xe!==(xe=Ae())&&(Ee&&(destroy_effect(Ee),Ee=null),Ee=branch(()=>xe(Ce,..._e)))},EFFECT_TRANSPARENT),hydrating&&(Ce=hydrate_node)}function append_styles(Se,Ae){queue_micro_task(()=>{var _e=Se.getRootNode(),Ce=_e.host?_e:_e.head??_e.ownerDocument.head;if(!Ce.querySelector("#"+Ae.hash)){const xe=document.createElement("style");xe.id=Ae.hash,xe.textContent=Ae.code,Ce.appendChild(xe)}})}function autofocus(Se,Ae){if(Ae){const _e=document.body;Se.autofocus=!0,queue_micro_task(()=>{document.activeElement===_e&&Se.focus()})}}let listening_to_form_reset=!1;function add_form_reset_listener(){listening_to_form_reset||(listening_to_form_reset=!0,document.addEventListener("reset",Se=>{Promise.resolve().then(()=>{var Ae;if(!Se.defaultPrevented)for(const _e of Se.target.elements)(Ae=_e.__on_r)==null||Ae.call(_e)})},{capture:!0}))}function remove_input_defaults(Se){if(hydrating){var Ae=!1,_e=()=>{if(!Ae){if(Ae=!0,Se.hasAttribute("value")){var Ce=Se.value;set_attribute(Se,"value",null),Se.value=Ce}if(Se.hasAttribute("checked")){var xe=Se.checked;set_attribute(Se,"checked",null),Se.checked=xe}}};Se.__on_r=_e,queue_idle_task(_e),add_form_reset_listener()}}function set_attribute(Se,Ae,_e,Ce){var xe=Se.__attributes??(Se.__attributes={});hydrating&&(xe[Ae]=Se.getAttribute(Ae),Ae==="src"||Ae==="srcset"||Ae==="href"&&Se.nodeName==="LINK")||xe[Ae]!==(xe[Ae]=_e)&&(Ae==="style"&&"__styles"in Se&&(Se.__styles={}),Ae==="loading"&&(Se[LOADING_ATTR_SYMBOL]=_e),_e==null?Se.removeAttribute(Ae):typeof _e!="string"&&get_setters(Se).includes(Ae)?Se[Ae]=_e:Se.setAttribute(Ae,_e))}function set_attributes(Se,Ae,_e,Ce,xe=!1,Ee=!1,Te=!1){var Ie=Ae||{},ke=Se.tagName==="OPTION";for(var De in Ae)De in _e||(_e[De]=null);var Me=get_setters(Se),Oe=Se.__attributes??(Se.__attributes={}),Pe=[];for(const Ve in _e){let Ue=_e[Ve];if(ke&&Ve==="value"&&Ue==null){Se.value=Se.__value="",Ie[Ve]=Ue;continue}var $e=Ie[Ve];if(Ue!==$e){Ie[Ve]=Ue;var Be=Ve[0]+Ve[1];if(Be!=="$$"){if(Be==="on"){const We={},ze="$$"+Ve;let Ke=Ve.slice(2);var Fe=is_delegated(Ke);if(is_capture_event(Ke)&&(Ke=Ke.slice(0,-7),We.capture=!0),!Fe&&$e){if(Ue!=null)continue;Se.removeEventListener(Ke,Ie[ze],We),Ie[ze]=null}if(Ue!=null)if(Fe)Se[`__${Ke}`]=Ue,delegate$1([Ke]);else{let qe=function(Ge){Ie[Ve].call(this,Ge)};Ae?Ie[ze]=create_event(Ke,Se,qe,We):Pe.push([Ve,Ue,()=>Ie[ze]=create_event(Ke,Se,qe,We)])}}else if(Ve==="style"&&Ue!=null)Se.style.cssText=Ue+"";else if(Ve==="autofocus")autofocus(Se,!!Ue);else if(Ve==="__value"||Ve==="value"&&Ue!=null)Se.value=Se[Ve]=Se.__value=Ue;else{var He=Ve;xe||(He=normalize_attribute(He)),Ue==null&&!Ee?(Oe[Ve]=null,Se.removeAttribute(Ve)):Me.includes(He)&&(Ee||typeof Ue!="string")?Se[He]=Ue:typeof Ue!="function"&&(hydrating&&(He==="src"||He==="href"||He==="srcset")||set_attribute(Se,He,Ue))}Ve==="style"&&"__styles"in Se&&(Se.__styles={})}}}return Ae||queue_micro_task(()=>{if(Se.isConnected)for(const[Ve,Ue,We]of Pe)Ie[Ve]===Ue&&We()}),Ie}var setters_cache=new Map;function get_setters(Se){var Ae=setters_cache.get(Se.nodeName);if(Ae)return Ae;setters_cache.set(Se.nodeName,Ae=[]);for(var _e,Ce=get_prototype_of(Se),xe=Element.prototype;xe!==Ce;){_e=get_descriptors(Ce);for(var Ee in _e)_e[Ee].set&&Ae.push(Ee);Ce=get_prototype_of(Ce)}return Ae}function set_class(Se,Ae){var _e=Se.__className,Ce=to_class(Ae);hydrating&&Se.className===Ce?Se.__className=Ce:(_e!==Ce||hydrating&&Se.className!==Ce)&&(Ae==null?Se.removeAttribute("class"):Se.className=Ce,Se.__className=Ce)}function to_class(Se){return Se??""}function onMount(Se){component_context===null&&lifecycle_outside_component(),component_context.l!==null?init_update_callbacks(component_context).m.push(Se):user_effect(()=>{const Ae=untrack(Se);if(typeof Ae=="function")return Ae})}function init_update_callbacks(Se){var Ae=Se.l;return Ae.u??(Ae.u={a:[],b:[],m:[]})}let is_store_binding=!1;function capture_store_binding(Se){var Ae=is_store_binding;try{return is_store_binding=!1,[Se(),is_store_binding]}finally{is_store_binding=Ae}}const spread_props_handler={get(Se,Ae){let _e=Se.props.length;for(;_e--;){let Ce=Se.props[_e];if(is_function(Ce)&&(Ce=Ce()),typeof Ce=="object"&&Ce!==null&&Ae in Ce)return Ce[Ae]}},set(Se,Ae,_e){let Ce=Se.props.length;for(;Ce--;){let xe=Se.props[Ce];is_function(xe)&&(xe=xe());const Ee=get_descriptor(xe,Ae);if(Ee&&Ee.set)return Ee.set(_e),!0}return!1},getOwnPropertyDescriptor(Se,Ae){let _e=Se.props.length;for(;_e--;){let Ce=Se.props[_e];if(is_function(Ce)&&(Ce=Ce()),typeof Ce=="object"&&Ce!==null&&Ae in Ce){const xe=get_descriptor(Ce,Ae);return xe&&!xe.configurable&&(xe.configurable=!0),xe}}},has(Se,Ae){for(let _e of Se.props)if(is_function(_e)&&(_e=_e()),_e!=null&&Ae in _e)return!0;return!1},ownKeys(Se){const Ae=[];for(let _e of Se.props){is_function(_e)&&(_e=_e());for(const Ce in _e)Ae.includes(Ce)||Ae.push(Ce)}return Ae}};function spread_props(...Se){return new Proxy({props:Se},spread_props_handler)}function with_parent_branch(Se){for(var Ae=active_effect,_e=active_effect;Ae!==null&&!(Ae.f&(BRANCH_EFFECT|ROOT_EFFECT));)Ae=Ae.parent;try{return set_active_effect(Ae),Se()}finally{set_active_effect(_e)}}function prop$1(Se,Ae,_e,Ce){var qe;var xe=(_e&PROPS_IS_IMMUTABLE)!==0,Ee=(_e&PROPS_IS_RUNES)!==0,Te=(_e&PROPS_IS_BINDABLE)!==0,Ie=(_e&PROPS_IS_LAZY_INITIAL)!==0,ke=!1,De;Te?[De,ke]=capture_store_binding(()=>Se[Ae]):De=Se[Ae];var Me=(qe=get_descriptor(Se,Ae))==null?void 0:qe.set,Oe=Ce,Pe=!0,$e=!1,Be=()=>($e=!0,Pe&&(Pe=!1,Ie?Oe=untrack(Ce):Oe=Ce),Oe);De===void 0&&Ce!==void 0&&(Me&&Ee&&props_invalid_value(),De=Be(),Me&&Me(De));var Fe;if(Ee)Fe=()=>{var Ge=Se[Ae];return Ge===void 0?Be():(Pe=!0,$e=!1,Ge)};else{var He=with_parent_branch(()=>(xe?derived$1:derived_safe_equal)(()=>Se[Ae]));He.f|=LEGACY_DERIVED_PROP,Fe=()=>{var Ge=get$7(He);return Ge!==void 0&&(Oe=void 0),Ge===void 0?Oe:Ge}}if(!(_e&PROPS_IS_UPDATED))return Fe;if(Me){var Ve=Se.$$legacy;return function(Ge,Qe){return arguments.length>0?((!Ee||!Qe||Ve||ke)&&Me(Qe?Fe():Ge),Ge):Fe()}}var Ue=!1,We=!1,ze=mutable_source(De),Ke=with_parent_branch(()=>derived$1(()=>{var Ge=Fe(),Qe=get$7(ze);return Ue?(Ue=!1,We=!0,Qe):(We=!1,ze.v=Ge)}));return xe||(Ke.equals=safe_equals),function(Ge,Qe){if(arguments.length>0){const Ye=Qe?get$7(Ke):Ee&&Te?proxy(Ge):Ge;return Ke.equals(Ye)||(Ue=!0,set$b(ze,Ye),$e&&Oe!==void 0&&(Oe=Ye),untrack(()=>get$7(Ke))),Ge}return get$7(Ke)}}function createClassComponent(Se){return new Svelte4Component(Se)}class Svelte4Component{constructor(Ae){mA(this,ha);mA(this,ra);var Ee;var _e=new Map,Ce=(Te,Ie)=>{var ke=mutable_source(Ie);return _e.set(Te,ke),ke};const xe=new Proxy({...Ae.props||{},$$events:{}},{get(Te,Ie){return get$7(_e.get(Ie)??Ce(Ie,Reflect.get(Te,Ie)))},has(Te,Ie){return get$7(_e.get(Ie)??Ce(Ie,Reflect.get(Te,Ie))),Reflect.has(Te,Ie)},set(Te,Ie,ke){return set$b(_e.get(Ie)??Ce(Ie,ke),ke),Reflect.set(Te,Ie,ke)}});vA(this,ra,(Ae.hydrate?hydrate:mount)(Ae.component,{target:Ae.target,props:xe,context:Ae.context,intro:Ae.intro??!1,recover:Ae.recover})),(!((Ee=Ae==null?void 0:Ae.props)!=null&&Ee.$$host)||Ae.sync===!1)&&flush_sync(),vA(this,ha,xe.$$events);for(const Te of Object.keys(Yc(this,ra)))Te==="$set"||Te==="$destroy"||Te==="$on"||define_property(this,Te,{get(){return Yc(this,ra)[Te]},set(Ie){Yc(this,ra)[Te]=Ie},enumerable:!0});Yc(this,ra).$set=Te=>{Object.assign(xe,Te)},Yc(this,ra).$destroy=()=>{unmount(Yc(this,ra))}}$set(Ae){Yc(this,ra).$set(Ae)}$on(Ae,_e){Yc(this,ha)[Ae]=Yc(this,ha)[Ae]||[];const Ce=(...xe)=>_e.call(this,...xe);return Yc(this,ha)[Ae].push(Ce),()=>{Yc(this,ha)[Ae]=Yc(this,ha)[Ae].filter(xe=>xe!==Ce)}}$destroy(){Yc(this,ra).$destroy()}}ha=new WeakMap,ra=new WeakMap;let SvelteElement;typeof HTMLElement=="function"&&(SvelteElement=class extends HTMLElement{constructor(Ae,_e,Ce){super();Di(this,"$$ctor");Di(this,"$$s");Di(this,"$$c");Di(this,"$$cn",!1);Di(this,"$$d",{});Di(this,"$$r",!1);Di(this,"$$p_d",{});Di(this,"$$l",{});Di(this,"$$l_u",new Map);Di(this,"$$me");this.$$ctor=Ae,this.$$s=_e,Ce&&this.attachShadow({mode:"open"})}addEventListener(Ae,_e,Ce){if(this.$$l[Ae]=this.$$l[Ae]||[],this.$$l[Ae].push(_e),this.$$c){const xe=this.$$c.$on(Ae,_e);this.$$l_u.set(_e,xe)}super.addEventListener(Ae,_e,Ce)}removeEventListener(Ae,_e,Ce){if(super.removeEventListener(Ae,_e,Ce),this.$$c){const xe=this.$$l_u.get(_e);xe&&(xe(),this.$$l_u.delete(_e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let Ae=function(xe){return Ee=>{const Te=document.createElement("slot");xe!=="default"&&(Te.name=xe),append$4(Ee,Te)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const _e={},Ce=get_custom_elements_slots(this);for(const xe of this.$$s)xe in Ce&&(xe==="default"&&!this.$$d.children?(this.$$d.children=Ae(xe),_e.default=!0):_e[xe]=Ae(xe));for(const xe of this.attributes){const Ee=this.$$g_p(xe.name);Ee in this.$$d||(this.$$d[Ee]=get_custom_element_value(Ee,xe.value,this.$$p_d,"toProp"))}for(const xe in this.$$p_d)!(xe in this.$$d)&&this[xe]!==void 0&&(this.$$d[xe]=this[xe],delete this[xe]);this.$$c=createClassComponent({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:_e,$$host:this}}),this.$$me=effect_root(()=>{render_effect(()=>{var xe;this.$$r=!0;for(const Ee of object_keys(this.$$c)){if(!((xe=this.$$p_d[Ee])!=null&&xe.reflect))continue;this.$$d[Ee]=this.$$c[Ee];const Te=get_custom_element_value(Ee,this.$$d[Ee],this.$$p_d,"toAttribute");Te==null?this.removeAttribute(this.$$p_d[Ee].attribute||Ee):this.setAttribute(this.$$p_d[Ee].attribute||Ee,Te)}this.$$r=!1})});for(const xe in this.$$l)for(const Ee of this.$$l[xe]){const Te=this.$$c.$on(xe,Ee);this.$$l_u.set(Ee,Te)}this.$$l={}}}attributeChangedCallback(Ae,_e,Ce){var xe;this.$$r||(Ae=this.$$g_p(Ae),this.$$d[Ae]=get_custom_element_value(Ae,Ce,this.$$p_d,"toProp"),(xe=this.$$c)==null||xe.$set({[Ae]:this.$$d[Ae]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(Ae){return object_keys(this.$$p_d).find(_e=>this.$$p_d[_e].attribute===Ae||!this.$$p_d[_e].attribute&&_e.toLowerCase()===Ae)||Ae}});function get_custom_element_value(Se,Ae,_e,Ce){var Ee;const xe=(Ee=_e[Se])==null?void 0:Ee.type;if(Ae=xe==="Boolean"&&typeof Ae!="boolean"?Ae!=null:Ae,!Ce||!_e[Se])return Ae;if(Ce==="toAttribute")switch(xe){case"Object":case"Array":return Ae==null?null:JSON.stringify(Ae);case"Boolean":return Ae?"":null;case"Number":return Ae??null;default:return Ae}else switch(xe){case"Object":case"Array":return Ae&&JSON.parse(Ae);case"Boolean":return Ae;case"Number":return Ae!=null?+Ae:Ae;default:return Ae}}function get_custom_elements_slots(Se){const Ae={};return Se.childNodes.forEach(_e=>{Ae[_e.slot||"default"]=!0}),Ae}function create_custom_element(Se,Ae,_e,Ce,xe,Ee){let Te=class extends SvelteElement{constructor(){super(Se,_e,xe),this.$$p_d=Ae}static get observedAttributes(){return object_keys(Ae).map(Ie=>(Ae[Ie].attribute||Ie).toLowerCase())}};return object_keys(Ae).forEach(Ie=>{define_property(Te.prototype,Ie,{get(){return this.$$c&&Ie in this.$$c?this.$$c[Ie]:this.$$d[Ie]},set(ke){var Oe;ke=get_custom_element_value(Ie,ke,Ae),this.$$d[Ie]=ke;var De=this.$$c;if(De){var Me=(Oe=get_descriptor(De,Ie))==null?void 0:Oe.get;Me?De[Ie]=ke:De.$set({[Ie]:ke})}}})}),Ce.forEach(Ie=>{define_property(Te.prototype,Ie,{get(){var ke;return(ke=this.$$c)==null?void 0:ke[Ie]}})}),Ee&&(Te=Ee(Te)),Se.element=Te,Te}var root$p=template('<div><label class="svelte-13x2xcg"> <input type="text" class="svelte-13x2xcg"></label></div>');const $$css$3={hash:"svelte-13x2xcg",code:":host {display:block;}label.svelte-13x2xcg {font-weight:bold;display:block;}input.svelte-13x2xcg {width:100%;padding:0.5rem;margin-top:0.25rem;border:1px solid #ccc;border-radius:4px;}"};function TextField(Se,Ae){push$5(Ae,!1),append_styles(Se,$$css$3);let _e=prop$1(Ae,"label",12,"Text Field"),Ce=prop$1(Ae,"name",12,""),xe=prop$1(Ae,"placeholder",12,""),Ee=prop$1(Ae,"required",12,!1);var Te=root$p(),Ie=child(Te),ke=child(Ie),De=sibling(ke);return reset$2(Ie),reset$2(Te),template_effect(()=>{set_text(ke,`${_e()??""} `),set_attribute(De,"name",Ce()),set_attribute(De,"placeholder",xe()),De.required=Ee()}),append$4(Se,Te),pop$1({get label(){return _e()},set label(Me){_e(Me),flush_sync()},get name(){return Ce()},set name(Me){Ce(Me),flush_sync()},get placeholder(){return xe()},set placeholder(Me){xe(Me),flush_sync()},get required(){return Ee()},set required(Me){Ee(Me),flush_sync()}})}customElements.define("text-field",create_custom_element(TextField,{label:{},name:{},placeholder:{},required:{type:"Boolean"}},[],[],!0));var root$o=template('<div><label class="svelte-13x2xcg"> <input type="email" class="svelte-13x2xcg"></label></div>');const $$css$2={hash:"svelte-13x2xcg",code:":host {display:block;}label.svelte-13x2xcg {font-weight:bold;display:block;}input.svelte-13x2xcg {width:100%;padding:0.5rem;margin-top:0.25rem;border:1px solid #ccc;border-radius:4px;}"};function EmailField(Se,Ae){push$5(Ae,!1),append_styles(Se,$$css$2);let _e=prop$1(Ae,"label",12,"Email Field"),Ce=prop$1(Ae,"name",12,""),xe=prop$1(Ae,"placeholder",12,""),Ee=prop$1(Ae,"required",12,!1);var Te=root$o(),Ie=child(Te),ke=child(Ie),De=sibling(ke);return reset$2(Ie),reset$2(Te),template_effect(()=>{set_text(ke,`${_e()??""} `),set_attribute(De,"name",Ce()),set_attribute(De,"placeholder",xe()),De.required=Ee()}),append$4(Se,Te),pop$1({get label(){return _e()},set label(Me){_e(Me),flush_sync()},get name(){return Ce()},set name(Me){Ce(Me),flush_sync()},get placeholder(){return xe()},set placeholder(Me){xe(Me),flush_sync()},get required(){return Ee()},set required(Me){Ee(Me),flush_sync()}})}customElements.define("email-field",create_custom_element(EmailField,{label:{},name:{},placeholder:{},required:{type:"Boolean"}},[],[],!0));var root$n=template('<div><label class="svelte-13x2xcg"> <input type="password" class="svelte-13x2xcg"></label></div>');const $$css$1={hash:"svelte-13x2xcg",code:":host {display:block;}label.svelte-13x2xcg {font-weight:bold;display:block;}input.svelte-13x2xcg {width:100%;padding:0.5rem;margin-top:0.25rem;border:1px solid #ccc;border-radius:4px;}"};function PasswordField(Se,Ae){push$5(Ae,!1),append_styles(Se,$$css$1);let _e=prop$1(Ae,"label",12,"Password Field"),Ce=prop$1(Ae,"name",12,""),xe=prop$1(Ae,"placeholder",12,""),Ee=prop$1(Ae,"required",12,!1);var Te=root$n(),Ie=child(Te),ke=child(Ie),De=sibling(ke);return reset$2(Ie),reset$2(Te),template_effect(()=>{set_text(ke,`${_e()??""} `),set_attribute(De,"name",Ce()),set_attribute(De,"placeholder",xe()),De.required=Ee()}),append$4(Se,Te),pop$1({get label(){return _e()},set label(Me){_e(Me),flush_sync()},get name(){return Ce()},set name(Me){Ce(Me),flush_sync()},get placeholder(){return xe()},set placeholder(Me){xe(Me),flush_sync()},get required(){return Ee()},set required(Me){Ee(Me),flush_sync()}})}customElements.define("password-field",create_custom_element(PasswordField,{label:{},name:{},placeholder:{},required:{type:"Boolean"}},[],[],!0));var root$m=template('<button type="submit" class="svelte-gfy2gy"> </button>');const $$css={hash:"svelte-gfy2gy",code:":host {display:block;}button.svelte-gfy2gy {background-color:#007bff;color:#fff;padding:0.5rem 1rem;border:none;border-radius:4px;cursor:pointer;}button.svelte-gfy2gy:hover {background-color:#0056b3;}"};function SubmitButton(Se,Ae){push$5(Ae,!1),append_styles(Se,$$css);let _e=prop$1(Ae,"value",12,"Submit");var Ce=root$m(),xe=child(Ce,!0);return reset$2(Ce),template_effect(()=>set_text(xe,_e())),append$4(Se,Ce),pop$1({get value(){return _e()},set value(Ee){_e(Ee),flush_sync()}})}customElements.define("submit-button",create_custom_element(SubmitButton,{value:{}},[],[],!0));function mountComponents(Se,Ae,_e=void 0,Ce=void 0){Ce&&(Ce.innerHTML=_e);const xe=document.createDocumentFragment();return Se.forEach(Ee=>{const Te=createElementFromMetadata(Ee,Ae);if(Te){if(xe.appendChild(Te),Ee.type==="Renderer")Te.appendChild(Ae);else if(Ee.children&&Ee.children.length>0){const Ie=mountComponents(Ee.children,Ae);Te.appendChild(Ie)}}}),Ce&&(Ce.innerHTML="",Ce.appendChild(xe)),xe}function createElementFromMetadata(Se,Ae){const{type:_e,id:Ce,styles:xe,onload:Ee,events:Te,value:Ie,name:ke,props:De={},bindings:Me={},provider:Oe,services:Pe}=Se;if(!_e)return null;const $e=document.createElement(_e);if(Ae!=null&&Ae.store&&($e.store=Ae.store),Ae!=null&&Ae.serviceManager&&($e.serviceManager=Ae.serviceManager),Ce&&($e.id=Ce),Oe&&$e.setAttribute("provider",Oe),ke&&$e.setAttribute("name",ke),xe&&$e.setAttribute("class",xe),Ie&&($e.textContent=Ie),Ee&&$e.setAttribute("onload",Ee),Te&&$e.setAttribute("events",JSON.stringify(Te)),Pe&&typeof Pe=="object"){let Be=replaceCurlyBraces(Pe);$e.setAttribute("services",JSON.stringify(Be))}return $e.meta=Se,De&&typeof De=="object"&&$e.setAttribute("props",JSON.stringify(De)),Me&&typeof Me=="object"&&$e.setAttribute("bindings",JSON.stringify(Me)),$e}const millisecondsInWeek=6048e5,millisecondsInDay=864e5,constructFromSymbol=Symbol.for("constructDateFrom");function constructFrom(Se,Ae){return typeof Se=="function"?Se(Ae):Se&&typeof Se=="object"&&constructFromSymbol in Se?Se[constructFromSymbol](Ae):Se instanceof Date?new Se.constructor(Ae):new Date(Ae)}function toDate(Se,Ae){return constructFrom(Ae||Se,Se)}let defaultOptions$2={};function getDefaultOptions(){return defaultOptions$2}function startOfWeek(Se,Ae){var Ie,ke,De,Me;const _e=getDefaultOptions(),Ce=(Ae==null?void 0:Ae.weekStartsOn)??((ke=(Ie=Ae==null?void 0:Ae.locale)==null?void 0:Ie.options)==null?void 0:ke.weekStartsOn)??_e.weekStartsOn??((Me=(De=_e.locale)==null?void 0:De.options)==null?void 0:Me.weekStartsOn)??0,xe=toDate(Se,Ae==null?void 0:Ae.in),Ee=xe.getDay(),Te=(Ee<Ce?7:0)+Ee-Ce;return xe.setDate(xe.getDate()-Te),xe.setHours(0,0,0,0),xe}function startOfISOWeek(Se,Ae){return startOfWeek(Se,{...Ae,weekStartsOn:1})}function getISOWeekYear(Se,Ae){const _e=toDate(Se,Ae==null?void 0:Ae.in),Ce=_e.getFullYear(),xe=constructFrom(_e,0);xe.setFullYear(Ce+1,0,4),xe.setHours(0,0,0,0);const Ee=startOfISOWeek(xe),Te=constructFrom(_e,0);Te.setFullYear(Ce,0,4),Te.setHours(0,0,0,0);const Ie=startOfISOWeek(Te);return _e.getTime()>=Ee.getTime()?Ce+1:_e.getTime()>=Ie.getTime()?Ce:Ce-1}function getTimezoneOffsetInMilliseconds(Se){const Ae=toDate(Se),_e=new Date(Date.UTC(Ae.getFullYear(),Ae.getMonth(),Ae.getDate(),Ae.getHours(),Ae.getMinutes(),Ae.getSeconds(),Ae.getMilliseconds()));return _e.setUTCFullYear(Ae.getFullYear()),+Se-+_e}function normalizeDates(Se,...Ae){const _e=constructFrom.bind(null,Ae.find(Ce=>typeof Ce=="object"));return Ae.map(_e)}function startOfDay(Se,Ae){const _e=toDate(Se,Ae==null?void 0:Ae.in);return _e.setHours(0,0,0,0),_e}function differenceInCalendarDays(Se,Ae,_e){const[Ce,xe]=normalizeDates(_e==null?void 0:_e.in,Se,Ae),Ee=startOfDay(Ce),Te=startOfDay(xe),Ie=+Ee-getTimezoneOffsetInMilliseconds(Ee),ke=+Te-getTimezoneOffsetInMilliseconds(Te);return Math.round((Ie-ke)/millisecondsInDay)}function startOfISOWeekYear(Se,Ae){const _e=getISOWeekYear(Se,Ae),Ce=constructFrom(Se,0);return Ce.setFullYear(_e,0,4),Ce.setHours(0,0,0,0),startOfISOWeek(Ce)}function isDate(Se){return Se instanceof Date||typeof Se=="object"&&Object.prototype.toString.call(Se)==="[object Date]"}function isValid$1(Se){return!(!isDate(Se)&&typeof Se!="number"||isNaN(+toDate(Se)))}function startOfYear(Se,Ae){const _e=toDate(Se,Ae==null?void 0:Ae.in);return _e.setFullYear(_e.getFullYear(),0,1),_e.setHours(0,0,0,0),_e}const formatDistanceLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},formatDistance=(Se,Ae,_e)=>{let Ce;const xe=formatDistanceLocale[Se];return typeof xe=="string"?Ce=xe:Ae===1?Ce=xe.one:Ce=xe.other.replace("{{count}}",Ae.toString()),_e!=null&&_e.addSuffix?_e.comparison&&_e.comparison>0?"in "+Ce:Ce+" ago":C