diff --git a/tools/server/public/bundle.js b/tools/server/public/bundle.js index c1e79a61b01..8c1b1449629 100644 --- a/tools/server/public/bundle.js +++ b/tools/server/public/bundle.js @@ -220,13 +220,13 @@ setContext,settled,tick,unmount,untrack:untrack$1},Symbol.toStringTag,{value:"Mo hat cannot be used in HTTP headers`)}this.status=status,this.location=location2}}class SvelteKitError extends Error{constructor(status,text2,message){super(message),this.status=status,this.text=text2}}new URL("sveltekit-internal://");function normalize_path(path2,trailing_slash){return path2==="/"||trailing_slash==="ignore"?path2:trailing_slash==="never"?path2.endsWith("/")?path2.slice(0,-1):path2:trailing_slash==="always"&&!path2.endsWith("/")?path2+"/":path2}function decode_pathname(pathname){ return pathname.split("%25").map(decodeURI).join("%25")}function decode_params(params){for(const key2 in params)params[key2]=decodeURIComponent(params[key2]);return params}function strip_hash({href}){return href.split("#")[0]}function make_trackable(url2,callback,search_params_callback,allow_hash=!1){const tracked=new URL(url2);Object.defineProperty(tracked,"searchParams",{value:new Proxy(tracked.searchParams,{get(obj,key2){if(key2==="get"||key2==="getAll"||key2==="has")return(param,...rest)=>(search_params_callback( param),obj[key2](param,...rest));callback();const value=Reflect.get(obj,key2);return typeof value=="function"?value.bind(obj):value}}),enumerable:!0,configurable:!0});const tracked_url_properties=["href","pathname","search","toString","toJSON"];allow_hash&&tracked_url_properties.push("hash");for(const property of tracked_url_properties)Object.defineProperty(tracked,property,{get(){return callback(),url2[property]},enumerable:!0,configurable:!0});return tracked}function noop$2(){}function hash$1(...values){ -let hash2=5381;for(const value of values)if(typeof value=="string"){let i=value.length;for(;i;)hash2=hash2*33^value.charCodeAt(--i)}else if(ArrayBuffer.isView(value)){const buffer=new Uint8Array(value.buffer,value.byteOffset,value.byteLength);let i=buffer.length;for(;i;)hash2=hash2*33^buffer[--i]}else throw new TypeError("value must be a string or TypedArray");return(hash2>>>0).toString(36)}new TextEncoder;new TextDecoder;function base64_decode(encoded){const binary=atob(encoded),bytes=new Uint8Array( -binary.length);for(let i=0;i((input instanceof Request?input.method:init2?.method||"GET")!=="GET"&&cache.delete(build_selector(input)),native_fetch(input,init2));const cache=new Map;function initial_fetch(resource,opts){const selector=build_selector(resource,opts),script=document.querySelector(selector);if(script?.textContent){script.remove();let{body:body2,...init2}=JSON.parse( -script.textContent);const ttl=script.getAttribute("data-ttl");return ttl&&cache.set(selector,{body:body2,init:init2,ttl:1e3*Number(ttl)}),script.getAttribute("data-b64")!==null&&(body2=base64_decode(body2)),Promise.resolve(new Response(body2,init2))}return window.fetch(resource,opts)}function subsequent_fetch(resource,resolved,opts){if(cache.size>0){const selector=build_selector(resource,opts),cached2=cache.get(selector);if(cached2){if(performance.now(){const rest_match=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(segment);if(rest_match)return params.push({name:rest_match[1],matcher:rest_match[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const optional_match=/^\[\[(\w+)(?:=(\w+))?\]\]$/. -exec(segment);if(optional_match)return params.push({name:optional_match[1],matcher:optional_match[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!segment)return;const parts=segment.split(/\[(.+?)\](?!\])/);return"/"+parts.map((content2,i)=>{if(i%2){if(content2.startsWith("x+"))return escape$3(String.fromCharCode(parseInt(content2.slice(2),16)));if(content2.startsWith("u+"))return escape$3(String.fromCharCode(...content2.slice(2).split("-").map(code2=>parseInt(code2,16))));const match=param_pattern. -exec(content2),[,is_optional,is_rest,name,matcher]=match;return params.push({name,matcher,optional:!!is_optional,rest:!!is_rest,chained:is_rest?i===1&&parts[0]==="":!1}),is_rest?"([^]*?)":is_optional?"([^/]*)?":"([^/]+?)"}return escape$3(content2)}).join("")}).join("")}/?$`),params}}function affects_path(segment){return segment!==""&&!/^\([^)]+\)$/.test(segment)}function get_route_segments(route){return route.slice(1).split("/").filter(affects_path)}function exec(match,params,matchers2){const result={}, +let hash2=5381;for(const value of values)if(typeof value=="string"){let i=value.length;for(;i;)hash2=hash2*33^value.charCodeAt(--i)}else if(ArrayBuffer.isView(value)){const buffer=new Uint8Array(value.buffer,value.byteOffset,value.byteLength);let i=buffer.length;for(;i;)hash2=hash2*33^buffer[--i]}else throw new TypeError("value must be a string or TypedArray");return(hash2>>>0).toString(36)}new TextEncoder;function base64_decode(encoded){const binary=atob(encoded),bytes=new Uint8Array(binary.length); +for(let i=0;i((input instanceof Request?input.method:init2?.method||"GET")!=="GET"&&cache.delete(build_selector(input)),native_fetch(input,init2));const cache=new Map;function initial_fetch(resource,opts){const selector=build_selector(resource,opts),script=document.querySelector(selector);if(script?.textContent){script.remove();let{body:body2,...init2}=JSON.parse(script.textContent); +const ttl=script.getAttribute("data-ttl");return ttl&&cache.set(selector,{body:body2,init:init2,ttl:1e3*Number(ttl)}),script.getAttribute("data-b64")!==null&&(body2=base64_decode(body2)),Promise.resolve(new Response(body2,init2))}return window.fetch(resource,opts)}function subsequent_fetch(resource,resolved,opts){if(cache.size>0){const selector=build_selector(resource,opts),cached2=cache.get(selector);if(cached2){if(performance.now(){const rest_match=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(segment);if(rest_match)return params.push({name:rest_match[1],matcher:rest_match[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const optional_match=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(segment); +if(optional_match)return params.push({name:optional_match[1],matcher:optional_match[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!segment)return;const parts=segment.split(/\[(.+?)\](?!\])/);return"/"+parts.map((content2,i)=>{if(i%2){if(content2.startsWith("x+"))return escape$3(String.fromCharCode(parseInt(content2.slice(2),16)));if(content2.startsWith("u+"))return escape$3(String.fromCharCode(...content2.slice(2).split("-").map(code2=>parseInt(code2,16))));const match=param_pattern.exec( +content2),[,is_optional,is_rest,name,matcher]=match;return params.push({name,matcher,optional:!!is_optional,rest:!!is_rest,chained:is_rest?i===1&&parts[0]==="":!1}),is_rest?"([^]*?)":is_optional?"([^/]*)?":"([^/]+?)"}return escape$3(content2)}).join("")}).join("")}/?$`),params}}function affects_path(segment){return segment!==""&&!/^\([^)]+\)$/.test(segment)}function get_route_segments(route){return route.slice(1).split("/").filter(affects_path)}function exec(match,params,matchers2){const result={}, values=match.slice(1),values_needing_match=values.filter(value=>value!==void 0);let buffered=0;for(let i=0;is2).join("/"),buffered=0),value===void 0)if(param.rest)value="";else continue;if(!param.matcher||matchers2[param.matcher](value)){result[param.name]=value;const next_param=params[i+1],next_value=values[i+1];next_param&&!next_param.rest&& next_param.optional&&next_value&¶m.chained&&(buffered=0),!next_param&&!next_value&&Object.keys(result).length===values_needing_match.length&&(buffered=0);continue}if(param.optional&¶m.chained){buffered++;continue}return}if(!buffered)return result}function escape$3(str){return str.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function parse$5({nodes:nodes2,server_loads:server_loads2, dictionary:dictionary2,matchers:matchers2}){const layouts_with_server_load=new Set(server_loads2);return Object.entries(dictionary2).map(([id2,[leaf2,layouts,errors2]])=>{const{pattern:pattern2,params}=parse_route_id(id2),route={id:id2,exec:path2=>{const match=pattern2.exec(path2);if(match)return exec(match,params,matchers2)},errors:[1,...errors2||[]].map(n=>nodes2[n]),layouts:[0,...layouts||[]].map(create_layout_loader),leaf:create_leaf_loader(leaf2)};return route.errors.length=route.layouts.length= @@ -238,19 +238,20 @@ SVGAElement?a.target.baseVal:a.target,external=!url2||!!target2||is_external_url link_option(el,"preload-code")),preload_data===null&&(preload_data=link_option(el,"preload-data")),keepfocus===null&&(keepfocus=link_option(el,"keepfocus")),noscroll===null&&(noscroll=link_option(el,"noscroll")),reload===null&&(reload=link_option(el,"reload")),replace_state===null&&(replace_state=link_option(el,"replacestate")),el=parent_element(el);function get_option_state(value){switch(value){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:levels[preload_code?? "off"],preload_data:levels[preload_data??"off"],keepfocus:get_option_state(keepfocus),noscroll:get_option_state(noscroll),reload:get_option_state(reload),replace_state:get_option_state(replace_state)}}function notifiable_store(value){const store=writable(value);let ready=!0;function notify(){ready=!0,store.update(val=>val)}function set2(new_value){ready=!1,store.set(new_value)}function subscribe(run2){let old_value;return store.subscribe(new_value=>{(old_value===void 0||ready&&new_value!==old_value)&& run2(old_value=new_value)})}return{notify,set:set2,subscribe}}const updated_listener={v:noop$2};function create_updated_store(){const{set:set2,subscribe}=writable(!1);let timeout;async function check(){clearTimeout(timeout);try{const res=await fetch(`${assets}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!res.ok)return!1;const updated2=(await res.json()).version!==version$3;return updated2&&(set2(!0),updated_listener.v(),clearTimeout(timeout)),updated2}catch{return!1}} -return{subscribe,check}}function is_external_url(url2,base2,hash_routing){return url2.origin!==origin||!url2.pathname.startsWith(base2)?!0:hash_routing?url2.pathname!==location.pathname:!1}const valid_layout_exports=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...valid_layout_exports];const valid_layout_server_exports=new Set([...valid_layout_exports]);[...valid_layout_server_exports];function compact(arr){return arr.filter(val=>val!=null)}function get_status(error2){return error2 instanceof -HttpError||error2 instanceof SvelteKitError?error2.status:500}function get_message(error2){return error2 instanceof SvelteKitError?error2.text:"Internal Error"}let page$3,navigating,updated;const is_legacy=onMount$1.toString().includes("$$")||/function \w+\(\) \{\}/.test(onMount$1.toString()),placeholder_url="a:";is_legacy?(page$3={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(placeholder_url)},navigating={current:null},updated={current:!1}):(page$3=new class{#data=state$1( -{});get data(){return get$3(this.#data)}set data(value){set$1(this.#data,value)}#form=state$1(null);get form(){return get$3(this.#form)}set form(value){set$1(this.#form,value)}#error=state$1(null);get error(){return get$3(this.#error)}set error(value){set$1(this.#error,value)}#params=state$1({});get params(){return get$3(this.#params)}set params(value){set$1(this.#params,value)}#route=state$1({id:null});get route(){return get$3(this.#route)}set route(value){set$1(this.#route,value)}#state=state$1( -{});get state(){return get$3(this.#state)}set state(value){set$1(this.#state,value)}#status=state$1(-1);get status(){return get$3(this.#status)}set status(value){set$1(this.#status,value)}#url=state$1(new URL(placeholder_url));get url(){return get$3(this.#url)}set url(value){set$1(this.#url,value)}},navigating=new class{#current=state$1(null);get current(){return get$3(this.#current)}set current(value){set$1(this.#current,value)}},updated=new class{#current=state$1(!1);get current(){return get$3( -this.#current)}set current(value){set$1(this.#current,value)}},updated_listener.v=()=>updated.current=!0);function update(new_page){Object.assign(page$3,new_page)}const noop_span={spanContext(){return noop_span_context},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},noop_span_context={traceId:"", -spanId:"",traceFlags:0},{onMount}=svelte,untrack=untrack$1??(value=>value()),ICON_REL_ATTRIBUTES=new Set(["icon","shortcut icon","apple-touch-icon"]);let rendering_error=null;const scroll_positions=get$2(SCROLL_KEY)??{},snapshots=get$2(SNAPSHOT_KEY)??{},stores={url:notifiable_store({}),page:notifiable_store({}),navigating:writable(null),updated:create_updated_store()};function update_scroll_positions(index2){scroll_positions[index2]=scroll_state()}function clear_onward_history(current_history_index2,current_navigation_index2){ -let i=current_history_index2+1;for(;scroll_positions[i];)delete scroll_positions[i],i+=1;for(i=current_navigation_index2+1;snapshots[i];)delete snapshots[i],i+=1}function native_navigation(url2,replace2=!1){return replace2?location.replace(url2.href):location.href=url2.href,new Promise(noop$2)}async function update_service_worker(){if("serviceWorker"in navigator){const registration=await navigator.serviceWorker.getRegistration(base||"/");registration&&await registration.update()}}let routes,default_layout_loader, -default_error_loader,container,target,app$1;const invalidated=[],components=[];let load_cache=null;function discard_load_cache(){load_cache?.fork?.then(f=>f?.discard()),load_cache=null}const reroute_cache=new Map,before_navigate_callbacks=new Set,on_navigate_callbacks=new Set,after_navigate_callbacks=new Set;let current={branch:[],error:null,url:null},hydrated=!1,started=!1,autoscroll=!0,is_navigating=!1,hash_navigating=!1,has_navigated=!1,force_invalidation=!1,root$21,current_history_index,current_navigation_index, -token;const preload_tokens=new Set,query_map=new Map;async function start$1(_app,_target,hydrate2){globalThis.__sveltekit__&&(globalThis.__sveltekit__.query,globalThis.__sveltekit__.prerender),document.URL!==location.href&&(location.href=location.href),app$1=_app,await _app.hooks.init?.(),routes=parse$5(_app),container=document.documentElement,target=_target,default_layout_loader=_app.nodes[0],default_error_loader=_app.nodes[1],default_layout_loader(),default_error_loader(),current_history_index= -history.state?.[HISTORY_INDEX],current_navigation_index=history.state?.[NAVIGATION_INDEX],current_history_index||(current_history_index=current_navigation_index=Date.now(),history.replaceState({...history.state,[HISTORY_INDEX]:current_history_index,[NAVIGATION_INDEX]:current_navigation_index},""));const scroll=scroll_positions[current_history_index];function restore_scroll(){scroll&&(history.scrollRestoration="manual",scrollTo(scroll.x,scroll.y))}hydrate2?(restore_scroll(),await _hydrate(target, -hydrate2)):(await navigate({type:"enter",url:resolve_url(app$1.hash?decode_hash(new URL(location.href)):location.href),replace_state:!0}),restore_scroll()),_start_router()}function reset_invalidation(){invalidated.length=0,force_invalidation=!1}function capture_snapshot(index2){components.some(c2=>c2?.snapshot)&&(snapshots[index2]=components.map(c2=>c2?.snapshot?.capture()))}function restore_snapshot(index2){snapshots[index2]?.forEach((value,i)=>{components[i]?.snapshot?.restore(value)})}function persist_state(){ -update_scroll_positions(current_history_index),set(SCROLL_KEY,scroll_positions),capture_snapshot(current_navigation_index),set(SNAPSHOT_KEY,snapshots)}async function _goto(url2,options,redirect_count,nav_token){let query_keys;options.invalidateAll&&discard_load_cache(),await navigate({type:"goto",url:resolve_url(url2),keepfocus:options.keepFocus,noscroll:options.noScroll,replace_state:options.replaceState,state:options.state,redirect_count,nav_token,accept:()=>{options.invalidateAll&&(force_invalidation= -!0,query_keys=[],query_map.forEach((entries,id2)=>{for(const payload of entries.keys())query_keys.push(id2+"/"+payload)})),options.invalidate&&options.invalidate.forEach(push_invalidated)}}),options.invalidateAll&&tick().then(tick).then(()=>{query_map.forEach((entries,id2)=>{entries.forEach(({resource},payload)=>{query_keys?.includes(id2+"/"+payload)&&resource.refresh?.()})})})}async function _preload_data(intent){if(intent.id!==load_cache?.id){discard_load_cache();const preload2={};preload_tokens. +return{subscribe,check}}function is_external_url(url2,base2,hash_routing){return url2.origin!==origin||!url2.pathname.startsWith(base2)?!0:hash_routing?url2.pathname!==location.pathname:!1}const valid_layout_exports=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...valid_layout_exports];const valid_layout_server_exports=new Set([...valid_layout_exports]);[...valid_layout_server_exports];function compact(arr){return arr.filter(val=>val!=null)}function create_remote_key(id2,payload){ +return id2+"/"+payload}function get_status(error2){return error2 instanceof HttpError||error2 instanceof SvelteKitError?error2.status:500}function get_message(error2){return error2 instanceof SvelteKitError?error2.text:"Internal Error"}let page$3,navigating,updated;const is_legacy=onMount$1.toString().includes("$$")||/function \w+\(\) \{\}/.test(onMount$1.toString()),placeholder_url="a:";is_legacy?(page$3={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(placeholder_url)}, +navigating={current:null},updated={current:!1}):(page$3=new class{#data=state$1({});get data(){return get$3(this.#data)}set data(value){set$1(this.#data,value)}#form=state$1(null);get form(){return get$3(this.#form)}set form(value){set$1(this.#form,value)}#error=state$1(null);get error(){return get$3(this.#error)}set error(value){set$1(this.#error,value)}#params=state$1({});get params(){return get$3(this.#params)}set params(value){set$1(this.#params,value)}#route=state$1({id:null});get route(){return get$3( +this.#route)}set route(value){set$1(this.#route,value)}#state=state$1({});get state(){return get$3(this.#state)}set state(value){set$1(this.#state,value)}#status=state$1(-1);get status(){return get$3(this.#status)}set status(value){set$1(this.#status,value)}#url=state$1(new URL(placeholder_url));get url(){return get$3(this.#url)}set url(value){set$1(this.#url,value)}},navigating=new class{#current=state$1(null);get current(){return get$3(this.#current)}set current(value){set$1(this.#current,value)}}, +updated=new class{#current=state$1(!1);get current(){return get$3(this.#current)}set current(value){set$1(this.#current,value)}},updated_listener.v=()=>updated.current=!0);function update(new_page){Object.assign(page$3,new_page)}const noop_span={spanContext(){return noop_span_context},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){ +return this},addLinks(){return this}},noop_span_context={traceId:"",spanId:"",traceFlags:0},{onMount}=svelte,untrack=untrack$1??(value=>value()),ICON_REL_ATTRIBUTES=new Set(["icon","shortcut icon","apple-touch-icon"]);let rendering_error=null;const scroll_positions=get$2(SCROLL_KEY)??{},snapshots=get$2(SNAPSHOT_KEY)??{},stores={url:notifiable_store({}),page:notifiable_store({}),navigating:writable(null),updated:create_updated_store()};function update_scroll_positions(index2){scroll_positions[index2]= +scroll_state()}function clear_onward_history(current_history_index2,current_navigation_index2){let i=current_history_index2+1;for(;scroll_positions[i];)delete scroll_positions[i],i+=1;for(i=current_navigation_index2+1;snapshots[i];)delete snapshots[i],i+=1}function native_navigation(url2,replace2=!1){return replace2?location.replace(url2.href):location.href=url2.href,new Promise(noop$2)}async function update_service_worker(){if("serviceWorker"in navigator){const registration=await navigator.serviceWorker. +getRegistration(base||"/");registration&&await registration.update()}}let routes,default_layout_loader,default_error_loader,container,target,app$1;const invalidated=[],components=[];let load_cache=null;function discard_load_cache(){load_cache?.fork?.then(f=>f?.discard()),load_cache=null}const reroute_cache=new Map,before_navigate_callbacks=new Set,on_navigate_callbacks=new Set,after_navigate_callbacks=new Set;let current={branch:[],error:null,url:null},hydrated=!1,started=!1,autoscroll=!0,is_navigating=!1, +hash_navigating=!1,has_navigated=!1,force_invalidation=!1,root$21,current_history_index,current_navigation_index,token;const preload_tokens=new Set,query_map=new Map,live_query_map=new Map;async function start$1(_app,_target,hydrate2){globalThis.__sveltekit__&&(globalThis.__sveltekit__.query,globalThis.__sveltekit__.prerender),document.URL!==location.href&&(location.href=location.href),app$1=_app,await _app.hooks.init?.(),routes=parse$5(_app),container=document.documentElement,target= +_target,default_layout_loader=_app.nodes[0],default_error_loader=_app.nodes[1],default_layout_loader(),default_error_loader(),current_history_index=history.state?.[HISTORY_INDEX],current_navigation_index=history.state?.[NAVIGATION_INDEX],current_history_index||(current_history_index=current_navigation_index=Date.now(),history.replaceState({...history.state,[HISTORY_INDEX]:current_history_index,[NAVIGATION_INDEX]:current_navigation_index},""));const scroll=scroll_positions[current_history_index]; +function restore_scroll(){scroll&&(history.scrollRestoration="manual",scrollTo(scroll.x,scroll.y))}hydrate2?(restore_scroll(),await _hydrate(target,hydrate2)):(await navigate({type:"enter",url:resolve_url(app$1.hash?decode_hash(new URL(location.href)):location.href),replace_state:!0}),restore_scroll()),_start_router()}function reset_invalidation(){invalidated.length=0,force_invalidation=!1}function capture_snapshot(index2){components.some(c2=>c2?.snapshot)&&(snapshots[index2]=components.map(c2=>c2?. +snapshot?.capture()))}function restore_snapshot(index2){snapshots[index2]?.forEach((value,i)=>{components[i]?.snapshot?.restore(value)})}function persist_state(){update_scroll_positions(current_history_index),set(SCROLL_KEY,scroll_positions),capture_snapshot(current_navigation_index),set(SNAPSHOT_KEY,snapshots)}async function _goto(url2,options,redirect_count,nav_token){let query_keys,live_query_keys;options.invalidateAll&&discard_load_cache(),await navigate({type:"goto",url:resolve_url(url2),keepfocus:options. +keepFocus,noscroll:options.noScroll,replace_state:options.replaceState,state:options.state,redirect_count,nav_token,accept:()=>{if(options.invalidateAll){force_invalidation=!0,query_keys=new Set;for(const[id2,entries]of query_map)for(const payload of entries.keys())query_keys.add(create_remote_key(id2,payload));live_query_keys=new Set;for(const[id2,entries]of live_query_map)for(const payload of entries.keys())live_query_keys.add(create_remote_key(id2,payload))}options.invalidate&&options.invalidate. +forEach(push_invalidated)}}),options.invalidateAll&&tick().then(tick).then(()=>{for(const[id2,entries]of query_map)for(const[payload,{resource}]of entries)query_keys?.has(create_remote_key(id2,payload))&&resource.refresh();for(const[id2,entries]of live_query_map)for(const[payload,{resource}]of entries)live_query_keys?.has(create_remote_key(id2,payload))&&resource.reconnect()})}async function _preload_data(intent){if(intent.id!==load_cache?.id){discard_load_cache();const preload2={};preload_tokens. add(preload2),load_cache={id:intent.id,token:preload2,promise:load_route({...intent,preload:preload2}).then(result=>(preload_tokens.delete(preload2),result.type==="loaded"&&result.state.error&&discard_load_cache(),result)),fork:null}}return load_cache.promise}async function _preload_code(url2){const route=(await get_navigation_intent(url2,!1))?.route;route&&await Promise.all([...route.layouts,route.leaf].filter(Boolean).map(load2=>load2[1]()))}async function initialize(result,target2,hydrate2){const nav={ params:current.params,route:{id:current.route?.id??null},url:new URL(location.href)};current={...result.state,nav};const style2=document.querySelector("style[data-sveltekit]");if(style2&&style2.remove(),Object.assign(page$3,result.props.page),root$21=new app$1.root({target:target2,props:{...result.props,stores,components},hydrate:hydrate2,sync:!1,transformError:void 0}),await Promise.resolve(),restore_snapshot(current_navigation_index),hydrate2){const navigation={from:null,to:{...nav,scroll:scroll_positions[current_history_index]?? scroll_state()},willUnload:!1,type:"enter",complete:Promise.resolve()};after_navigate_callbacks.forEach(fn=>fn(navigation))}started=!0}async function get_navigation_result_from_branch({url:url2,params,branch:branch2,errors:errors2,status,error:error2,route,form}){let slash="never";if(base&&(url2.pathname===base||url2.pathname===base+"/"))slash="always";else for(const node2 of branch2)node2?.slash!==void 0&&(slash=node2.slash);url2.pathname=normalize_path(url2.pathname,slash),url2.search=url2.search; @@ -598,414 +599,415 @@ current?.(e),!(e.defaultPrevented||this.#isSub)){if(this.parentMenu.root.ignoreC (this.parentMenu.root.ignoreCloseAutoFocus=!0,rootMenu.onClose(),afterTick(()=>{nodeToFocus.focus(),afterTick(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})})):this.domContext.getDocument().body.focus()}onkeydown(e){if(e.defaultPrevented)return;if(e.key===TAB){this.handleTabKeyDown(e);return}const target2=e.target,currentTarget=e.currentTarget;if(!isHTMLElement$1(target2)||!isHTMLElement$1(currentTarget))return;const isKeydownInside=target2.closest(`[${this.parentMenu.root.getBitsAttr("cont\ ent")}]`)?.id===this.parentMenu.contentId.current,isModifierKey=e.ctrlKey||e.altKey||e.metaKey,isCharacterKey=e.key.length===1;if(this.rovingFocusGroup.handleKeydown(target2,e)||e.code==="Space")return;const candidateNodes=this.#getCandidateNodes();isKeydownInside&&!isModifierKey&&isCharacterKey&&this.#handleTypeaheadSearch(e.key,candidateNodes),e.target?.id===this.parentMenu.contentId.current&&FIRST_LAST_KEYS$1.includes(e.key)&&(e.preventDefault(),LAST_KEYS$1.includes(e.key)&&candidateNodes.reverse(), focusFirst(candidateNodes,{select:!1},()=>this.domContext.getActiveElement()))}onblur(e){isElement$1(e.currentTarget)&&isElement$1(e.target)&&(e.currentTarget.contains?.(e.target)||(this.domContext.getWindow().clearTimeout(this.#timer),this.search=""))}onfocus(_){this.parentMenu.root.isUsingKeyboard.current&&afterTick(()=>this.rovingFocusGroup.focusFirstCandidate())}onItemEnter(){return this.#isPointerMovingToSubmenu()}onItemLeave(e){if(e.currentTarget.hasAttribute(this.parentMenu.root.getBitsAttr( -"sub-trigger"))||this.#isPointerMovingToSubmenu()||this.parentMenu.root.isUsingKeyboard.current)return;this.parentMenu.contentNode?.focus(),this.rovingFocusGroup.setCurrentTabStopId("")}onTriggerLeave(){return!!this.#isPointerMovingToSubmenu()}handleInteractOutside(e){if(!isElementOrSVGElement(e.target))return;const triggerId=this.parentMenu.triggerNode?.id;if(e.target.id===triggerId){e.preventDefault();return}if(e.target.closest(`#${triggerId}`)){e.preventDefault();return}this.parentMenu.root.ignoreCloseAutoFocus= -!0,afterTick(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})}get shouldRender(){return this.parentMenu.contentPresence.shouldRender}#snippetProps=user_derived(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,role:"menu","aria-orientation":"vertical",[this.parentMenu.root.getBitsAttr("content")]:"","data-state":getDataOpenClosed(this.parentMenu. -opts.open.current),...getDataTransitionAttrs(this.parentMenu.contentPresence.transitionStatus),onkeydown:this.onkeydown,onblur:this.onblur,onfocus:this.onfocus,dir:this.parentMenu.root.opts.dir.current,style:{pointerEvents:"auto",contain:"layout style"},...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}popperProps={onCloseAutoFocus:e=>this.onCloseAutoFocus(e)}}class MenuItemSharedState{opts;content;attachment;#isFocused=state$1(!1);constructor(opts,content2){ -this.opts=opts,this.content=content2,this.attachment=attachRef(this.opts.ref),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this),this.onfocus=this.onfocus.bind(this),this.onblur=this.onblur.bind(this)}onpointermove(e){if(!e.defaultPrevented&&isMouseEvent(e))if(this.opts.disabled.current)this.content.onItemLeave(e);else{if(this.content.onItemEnter())return;const item=e.currentTarget;if(!isHTMLElement$1(item))return;item.focus()}}onpointerleave(e){e. -defaultPrevented||isMouseEvent(e)&&this.content.onItemLeave(e)}onfocus(e){afterTick(()=>{e.defaultPrevented||this.opts.disabled.current||set$1(this.#isFocused,!0)})}onblur(e){afterTick(()=>{e.defaultPrevented||set$1(this.#isFocused,!1)})}#props=user_derived(()=>({id:this.opts.id.current,tabindex:-1,role:"menuitem","aria-disabled":boolToStr(this.opts.disabled.current),"data-disabled":boolToEmptyStrOrUndef(this.opts.disabled.current),"data-highlighted":get$3(this.#isFocused)?"":void 0,[this.content. -parentMenu.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onfocus:this.onfocus,onblur:this.onblur,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class MenuItemState{static create(opts){const item=new MenuItemSharedState(opts,MenuContentContext.get());return new MenuItemState(opts,item)}opts;item;root;#isPointerDown=!1;constructor(opts,item){this.opts=opts,this.item=item,this.root=item.content. -parentMenu.root,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this)}#handleSelect(){if(this.item.opts.disabled.current)return;const selectEvent=new CustomEvent("menuitemselect",{bubbles:!0,cancelable:!0});if(this.opts.onSelect.current(selectEvent),selectEvent.defaultPrevented){this.item.content.parentMenu.root.isUsingKeyboard.current=!1;return}this.opts.closeOnSelect.current&&this. -item.content.parentMenu.root.opts.onClose()}onkeydown(e){const isTypingAhead=this.item.content.search!=="";if(!(this.item.opts.disabled.current||isTypingAhead&&e.key===SPACE)&&SELECTION_KEYS.includes(e.key)){if(!isHTMLElement$1(e.currentTarget))return;e.currentTarget.click(),e.preventDefault()}}onclick(_){this.item.opts.disabled.current||this.#handleSelect()}onpointerup(e){if(!e.defaultPrevented&&!this.#isPointerDown){if(!isHTMLElement$1(e.currentTarget))return;e.currentTarget?.click()}}onpointerdown(_){ -this.#isPointerDown=!0}#props=user_derived(()=>mergeProps(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class MenuSubTriggerState{static create(opts){const content2=MenuContentContext.get(),item=new MenuItemSharedState(opts,content2),submenu=MenuMenuContext.get();return new MenuSubTriggerState(opts,item,content2,submenu)}opts;item;content;submenu;attachment;#openTimer=null;constructor(opts,item,content2,submenu){ -this.opts=opts,this.item=item,this.content=content2,this.submenu=submenu,this.attachment=attachRef(this.opts.ref,v=>this.submenu.triggerNode=v),this.onpointerleave=this.onpointerleave.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),onDestroyEffect(()=>{this.#clearOpenTimer()})}#clearOpenTimer(){this.#openTimer!==null&&(this.content.domContext.getWindow().clearTimeout(this.#openTimer),this.#openTimer=null)}onpointermove(e){ -if(isMouseEvent(e)){if(this.submenu.root.isPointerInTransit){this.#openTimer!==null&&this.#clearOpenTimer();return}if(!this.item.opts.disabled.current&&!this.submenu.opts.open.current&&!this.#openTimer){const openDelay=this.opts.openDelay.current;if(openDelay<=0){this.submenu.onOpen();return}this.#openTimer=this.content.domContext.setTimeout(()=>{if(this.submenu.root.isPointerInTransit){this.#clearOpenTimer();return}this.submenu.onOpen(),this.#clearOpenTimer()},openDelay)}}}onpointerleave(e){isMouseEvent( -e)&&this.#clearOpenTimer()}onkeydown(e){const isTypingAhead=this.content.search!=="";this.item.opts.disabled.current||isTypingAhead&&e.key===SPACE||SUB_OPEN_KEYS[this.submenu.root.opts.dir.current].includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}onclick(e){if(this.item.opts.disabled.current||!isHTMLElement$1(e.currentTarget))return;e.currentTarget.focus();const selectEvent=new CustomEvent("menusubtriggerselect",{bubbles:!0,cancelable:!0});this.opts.onSelect.current(selectEvent),this. -submenu.opts.open.current||(this.submenu.onOpen(),afterTick(()=>{const contentNode=this.submenu.contentNode;contentNode&&MenuOpenEvent.dispatch(contentNode)}))}#props=user_derived(()=>mergeProps({"aria-haspopup":"menu","aria-expanded":boolToStr(this.submenu.opts.open.current),"data-state":getDataOpenClosed(this.submenu.opts.open.current),"aria-controls":this.submenu.opts.open.current?this.submenu.contentId.current:void 0,[this.submenu.root.getBitsAttr("sub-trigger")]:"",onclick:this.onclick,onpointermove:this. -onpointermove,onpointerleave:this.onpointerleave,onkeydown:this.onkeydown,...this.attachment},this.item.props));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class MenuSeparatorState{static create(opts){return new MenuSeparatorState(opts,MenuRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref)}#props=user_derived(()=>({id:this.opts.id.current,role:"group",[this.root.getBitsAttr("\ -separator")]:"",...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class DropdownMenuTriggerState{static create(opts){return new DropdownMenuTriggerState(opts,MenuMenuContext.get())}opts;parentMenu;attachment;constructor(opts,parentMenu){this.opts=opts,this.parentMenu=parentMenu,this.attachment=attachRef(this.opts.ref,v=>this.parentMenu.triggerNode=v)}onclick=e=>{this.opts.disabled.current||e.detail!==0||(this.parentMenu.toggleOpen(),e.preventDefault())};onpointerdown=e=>{ -if(!this.opts.disabled.current){if(e.pointerType==="touch")return e.preventDefault();e.button===0&&e.ctrlKey===!1&&(this.parentMenu.toggleOpen(),this.parentMenu.opts.open.current||e.preventDefault())}};onpointerup=e=>{this.opts.disabled.current||e.pointerType==="touch"&&(e.preventDefault(),this.parentMenu.toggleOpen())};onkeydown=e=>{if(!this.opts.disabled.current){if(e.key===SPACE||e.key===ENTER){this.parentMenu.toggleOpen(),e.preventDefault();return}e.key===ARROW_DOWN&&(this.parentMenu.onOpen(), -e.preventDefault())}};#ariaControls=user_derived(()=>{if(this.parentMenu.opts.open.current&&this.parentMenu.contentId.current)return this.parentMenu.contentId.current});#props=user_derived(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"aria-haspopup":"menu","aria-expanded":boolToStr(this.parentMenu.opts.open.current),"aria-controls":get$3(this.#ariaControls),"data-disabled":boolToEmptyStrOrUndef(this.opts.disabled.current),"data-state":getDataOpenClosed(this.parentMenu.opts.open. -current),[this.parentMenu.root.getBitsAttr("trigger")]:"",onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class MenuSubmenuState{static create(opts){const menu=MenuMenuContext.get();return MenuMenuContext.set(new MenuMenuState(opts,menu.root,menu))}}globalThis.bitsDismissableLayers??=new Map;class DismissibleLayerState{static create(opts){ -return new DismissibleLayerState(opts)}opts;#interactOutsideProp;#behaviorType;#interceptedEvents={pointerdown:!1};#isResponsibleLayer=!1;#isFocusInsideDOMTree=!1;#documentObj=void 0;#onFocusOutside;#unsubClickListener=noop$1;constructor(opts){this.opts=opts,this.#behaviorType=opts.interactOutsideBehavior,this.#interactOutsideProp=opts.onInteractOutside,this.#onFocusOutside=opts.onFocusOutside,user_effect(()=>{this.#documentObj=getOwnerDocument(this.opts.ref.current)});let unsubEvents=noop$1;const cleanup=()=>{ -this.#resetState(),globalThis.bitsDismissableLayers.delete(this),this.#handleInteractOutside.destroy(),unsubEvents()};watch$1([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return afterSleep(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#behaviorType),unsubEvents(),unsubEvents=this.#addEventListeners())}),cleanup}),onDestroyEffect(()=>{this.#resetState.destroy(),globalThis.bitsDismissableLayers. -delete(this),this.#handleInteractOutside.destroy(),this.#unsubClickListener(),unsubEvents()})}#handleFocus=event2=>{event2.defaultPrevented||this.opts.ref.current&&afterTick(()=>{!this.opts.ref.current||this.#isTargetWithinLayer(event2.target)||event2.target&&!this.#isFocusInsideDOMTree&&this.#onFocusOutside.current?.(event2)})};#addEventListeners(){return executeCallbacks(on(this.#documentObj,"pointerdown",executeCallbacks(this.#markInterceptedEvent,this.#markResponsibleLayer),{capture:!0}),on( -this.#documentObj,"pointerdown",executeCallbacks(this.#markNonInterceptedEvent,this.#handleInteractOutside)),on(this.#documentObj,"focusin",this.#handleFocus))}#handleDismiss=e=>{let event2=e;event2.defaultPrevented&&(event2=createWrappedEvent(e)),this.#interactOutsideProp.current(e)};#handleInteractOutside=debounce$1(e=>{if(!this.opts.ref.current){this.#unsubClickListener();return}const isEventValid=this.opts.isValidEvent.current(e,this.opts.ref.current)||isValidEvent(e,this.opts.ref.current);if(!this.#isResponsibleLayer|| -this.#isAnyEventIntercepted()||!isEventValid){this.#unsubClickListener();return}let event2=e;if(event2.defaultPrevented&&(event2=createWrappedEvent(event2)),this.#behaviorType.current!=="close"&&this.#behaviorType.current!=="defer-otherwise-close"){this.#unsubClickListener();return}e.pointerType==="touch"?(this.#unsubClickListener(),this.#unsubClickListener=on(this.#documentObj,"click",this.#handleDismiss,{once:!0})):this.#interactOutsideProp.current(event2)},10);#markInterceptedEvent=e=>{this.#interceptedEvents[e. -type]=!0};#markNonInterceptedEvent=e=>{this.#interceptedEvents[e.type]=!1};#markResponsibleLayer=()=>{this.opts.ref.current&&(this.#isResponsibleLayer=isResponsibleLayer(this.opts.ref.current))};#isTargetWithinLayer=target2=>this.opts.ref.current?isOrContainsTarget(this.opts.ref.current,target2):!1;#resetState=debounce$1(()=>{for(const eventType in this.#interceptedEvents)this.#interceptedEvents[eventType]=!1;this.#isResponsibleLayer=!1},20);#isAnyEventIntercepted(){return Object.values(this.#interceptedEvents). -some(Boolean)}#onfocuscapture=()=>{this.#isFocusInsideDOMTree=!0};#onblurcapture=()=>{this.#isFocusInsideDOMTree=!1};props={onfocuscapture:this.#onfocuscapture,onblurcapture:this.#onblurcapture}}function getTopMostDismissableLayer(layersArr=[...globalThis.bitsDismissableLayers]){return layersArr.findLast(([_,{current:behaviorType}])=>behaviorType==="close"||behaviorType==="ignore")}function isResponsibleLayer(node2){const layersArr=[...globalThis.bitsDismissableLayers],topMostLayer=getTopMostDismissableLayer( -layersArr);if(topMostLayer)return topMostLayer[0].opts.ref.current===node2;const[firstLayerNode]=layersArr[0];return firstLayerNode.opts.ref.current===node2}function isValidEvent(e,node2){const target2=e.target;if(!isElementOrSVGElement(target2))return!1;const targetIsContextMenuTrigger=!!target2.closest(`[${CONTEXT_MENU_TRIGGER_ATTR}]`),nodeIsContextMenu=!!node2.closest(`[${CONTEXT_MENU_CONTENT_ATTR}]`);return"button"in e&&e.button>0&&!targetIsContextMenuTrigger?!1:"button"in e&&e.button===0&&targetIsContextMenuTrigger&& -nodeIsContextMenu?!0:targetIsContextMenuTrigger&&nodeIsContextMenu?!1:getOwnerDocument(target2).documentElement.contains(target2)&&!isOrContainsTarget(node2,target2)&&isClickTrulyOutside(e,node2)}function createWrappedEvent(e){const capturedCurrentTarget=e.currentTarget,capturedTarget=e.target;let newEvent;e instanceof PointerEvent?newEvent=new PointerEvent(e.type,e):newEvent=new PointerEvent("pointerdown",e);let isPrevented=!1;return new Proxy(newEvent,{get:(target2,prop2)=>prop2==="currentTarg\ -et"?capturedCurrentTarget:prop2==="target"?capturedTarget:prop2==="preventDefault"?()=>{isPrevented=!0,typeof target2.preventDefault=="function"&&target2.preventDefault()}:prop2==="defaultPrevented"?isPrevented:prop2 in target2?target2[prop2]:e[prop2]})}function Dismissible_layer($$anchor,$$props){push$1($$props,!0);let interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"close"),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),onFocusOutside=prop($$props,"onFocusOutside", -3,noop$1),isValidEvent2=prop($$props,"isValidEvent",3,()=>!1);const dismissibleLayerState=DismissibleLayerState.create({id:boxWith$1(()=>$$props.id),interactOutsideBehavior:boxWith$1(()=>interactOutsideBehavior()),onInteractOutside:boxWith$1(()=>onInteractOutside()),enabled:boxWith$1(()=>$$props.enabled),onFocusOutside:boxWith$1(()=>onFocusOutside()),isValidEvent:boxWith$1(()=>isValidEvent2()),ref:$$props.ref});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children?? -noop$3,()=>({props:dismissibleLayerState.props})),append($$anchor,fragment),pop()}globalThis.bitsEscapeLayers??=new Map;class EscapeLayerState{static create(opts){return new EscapeLayerState(opts)}opts;domContext;constructor(opts){this.opts=opts,this.domContext=new DOMContext(this.opts.ref);let unsubEvents=noop$1;watch$1(()=>opts.enabled.current,enabled=>(enabled&&(globalThis.bitsEscapeLayers.set(this,opts.escapeKeydownBehavior),unsubEvents=this.#addEventListener()),()=>{unsubEvents(),globalThis. -bitsEscapeLayers.delete(this)}))}#addEventListener=()=>on(this.domContext.getDocument(),"keydown",this.#onkeydown,{passive:!1});#onkeydown=e=>{if(e.key!==ESCAPE||!isResponsibleEscapeLayer(this))return;const clonedEvent=new KeyboardEvent(e.type,e);e.preventDefault();const behaviorType=this.opts.escapeKeydownBehavior.current;behaviorType!=="close"&&behaviorType!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(clonedEvent)}}function isResponsibleEscapeLayer(instance){const layersArr=[...globalThis. -bitsEscapeLayers],topMostLayer=layersArr.findLast(([_,{current:behaviorType}])=>behaviorType==="close"||behaviorType==="ignore");if(topMostLayer)return topMostLayer[0]===instance;const[firstLayerNode]=layersArr[0];return firstLayerNode===instance}function Escape_layer($$anchor,$$props){push$1($$props,!0);let escapeKeydownBehavior=prop($$props,"escapeKeydownBehavior",3,"close"),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1);EscapeLayerState.create({escapeKeydownBehavior:boxWith$1(()=>escapeKeydownBehavior()), -onEscapeKeydown:boxWith$1(()=>onEscapeKeydown()),enabled:boxWith$1(()=>$$props.enabled),ref:$$props.ref});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}class FocusScopeManager{static instance;#scopeStack=simpleBox([]);#focusHistory=new WeakMap;#preFocusHistory=new WeakMap;static getInstance(){return this.instance||(this.instance=new FocusScopeManager),this.instance}register(scope2){const current2=this.getActive(); -current2&¤t2!==scope2&¤t2.pause();const activeElement=document.activeElement;activeElement&&activeElement!==document.body&&this.#preFocusHistory.set(scope2,activeElement),this.#scopeStack.current=this.#scopeStack.current.filter(s2=>s2!==scope2),this.#scopeStack.current.unshift(scope2)}unregister(scope2){this.#scopeStack.current=this.#scopeStack.current.filter(s2=>s2!==scope2);const next2=this.getActive();next2&&next2.resume()}getActive(){return this.#scopeStack.current[0]}setFocusMemory(scope2,element2){ -this.#focusHistory.set(scope2,element2)}getFocusMemory(scope2){return this.#focusHistory.get(scope2)}isActiveScope(scope2){return this.getActive()===scope2}setPreFocusMemory(scope2,element2){this.#preFocusHistory.set(scope2,element2)}getPreFocusMemory(scope2){return this.#preFocusHistory.get(scope2)}clearPreFocusMemory(scope2){this.#preFocusHistory.delete(scope2)}}class FocusScope{#paused=!1;#container=null;#manager=FocusScopeManager.getInstance();#cleanupFns=[];#opts;constructor(opts){this.#opts= -opts}get paused(){return this.#paused}pause(){this.#paused=!0}resume(){this.#paused=!1}#cleanup(){for(const fn of this.#cleanupFns)fn();this.#cleanupFns=[]}mount(container2){this.#container&&this.unmount(),this.#container=container2,this.#manager.register(this),this.#setupEventListeners(),this.#handleOpenAutoFocus()}unmount(){this.#container&&(this.#cleanup(),this.#handleCloseAutoFocus(),this.#manager.unregister(this),this.#manager.clearPreFocusMemory(this),this.#container=null)}#handleOpenAutoFocus(){ -if(!this.#container)return;const event2=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#opts.onOpenAutoFocus.current(event2),event2.defaultPrevented||requestAnimationFrame(()=>{if(!this.#container)return;const firstTabbable=this.#getFirstTabbable();firstTabbable?(firstTabbable.focus(),this.#manager.setFocusMemory(this,firstTabbable)):this.#container.focus()})}#handleCloseAutoFocus(){const event2=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0}); -if(this.#opts.onCloseAutoFocus.current?.(event2),!event2.defaultPrevented){const preFocusedElement=this.#manager.getPreFocusMemory(this);if(preFocusedElement&&document.contains(preFocusedElement))try{preFocusedElement.focus()}catch{document.body.focus()}}}#setupEventListeners(){if(!this.#container||!this.#opts.trap.current)return;const container2=this.#container,doc=container2.ownerDocument,handleFocus=e=>{if(this.#paused||!this.#manager.isActiveScope(this))return;const target2=e.target;if(!target2) -return;if(container2.contains(target2))this.#manager.setFocusMemory(this,target2);else{const lastFocused=this.#manager.getFocusMemory(this);if(lastFocused&&container2.contains(lastFocused)&&isFocusable(lastFocused))e.preventDefault(),lastFocused.focus();else{const firstTabbable=this.#getFirstTabbable(),firstFocusable=this.#getAllFocusables()[0];(firstTabbable||firstFocusable||container2).focus()}}},handleKeydown=e=>{if(!this.#opts.loop||this.#paused||e.key!=="Tab"||!this.#manager.isActiveScope(this)) -return;const tabbables=this.#getTabbables();if(tabbables.length===0)return;const first=tabbables[0],last=tabbables[tabbables.length-1];!e.shiftKey&&doc.activeElement===last?(e.preventDefault(),first.focus()):e.shiftKey&&doc.activeElement===first&&(e.preventDefault(),last.focus())};this.#cleanupFns.push(on(doc,"focusin",handleFocus,{capture:!0}),on(container2,"keydown",handleKeydown));const observer=new MutationObserver(()=>{const lastFocused=this.#manager.getFocusMemory(this);if(lastFocused&&!container2. -contains(lastFocused)){const firstTabbable=this.#getFirstTabbable(),firstFocusable=this.#getAllFocusables()[0],elementToFocus=firstTabbable||firstFocusable;elementToFocus?(elementToFocus.focus(),this.#manager.setFocusMemory(this,elementToFocus)):container2.focus()}});observer.observe(container2,{childList:!0,subtree:!0}),this.#cleanupFns.push(()=>observer.disconnect())}#getTabbables(){return this.#container?tabbable(this.#container,{includeContainer:!1,getShadowRoot:!0}):[]}#getFirstTabbable(){return this.#getTabbables()[0]|| -null}#getAllFocusables(){return this.#container?focusable(this.#container,{includeContainer:!1,getShadowRoot:!0}):[]}static use(opts){let scope2=null;return watch$1([()=>opts.ref.current,()=>opts.enabled.current],([ref2,enabled])=>{ref2&&enabled?(scope2||(scope2=new FocusScope(opts)),scope2.mount(ref2)):scope2&&(scope2.unmount(),scope2=null)}),onDestroyEffect(()=>{scope2?.unmount()}),{get props(){return{tabindex:-1}}}}}function Focus_scope($$anchor,$$props){push$1($$props,!0);let enabled=prop($$props, -"enabled",3,!1),trapFocus=prop($$props,"trapFocus",3,!1),loop2=prop($$props,"loop",3,!1),onCloseAutoFocus=prop($$props,"onCloseAutoFocus",3,noop$1),onOpenAutoFocus=prop($$props,"onOpenAutoFocus",3,noop$1);const focusScopeState=FocusScope.use({enabled:boxWith$1(()=>enabled()),trap:boxWith$1(()=>trapFocus()),loop:loop2(),onCloseAutoFocus:boxWith$1(()=>onCloseAutoFocus()),onOpenAutoFocus:boxWith$1(()=>onOpenAutoFocus()),ref:$$props.ref});var fragment=comment$2(),node2=first_child(fragment);snippet( -node2,()=>$$props.focusScope??noop$3,()=>({props:focusScopeState.props})),append($$anchor,fragment),pop()}globalThis.bitsTextSelectionLayers??=new Map;class TextSelectionLayerState{static create(opts){return new TextSelectionLayerState(opts)}opts;domContext;#unsubSelectionLock=noop$1;constructor(opts){this.opts=opts,this.domContext=new DOMContext(opts.ref);let unsubEvents=noop$1;watch$1(()=>this.opts.enabled.current,isEnabled=>(isEnabled&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled), -unsubEvents(),unsubEvents=this.#addEventListeners()),()=>{unsubEvents(),this.#resetSelectionLock(),globalThis.bitsTextSelectionLayers.delete(this)}))}#addEventListeners(){return executeCallbacks(on(this.domContext.getDocument(),"pointerdown",this.#pointerdown),on(this.domContext.getDocument(),"pointerup",composeHandlers(this.#resetSelectionLock,this.opts.onPointerUp.current)))}#pointerdown=e=>{const node2=this.opts.ref.current,target2=e.target;!isHTMLElement$1(node2)||!isHTMLElement$1(target2)|| -!this.opts.enabled.current||!isHighestLayer(this)||!contains$3(node2,target2)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&(this.#unsubSelectionLock=preventTextSelectionOverflow(node2,this.domContext.getDocument().body)))};#resetSelectionLock=()=>{this.#unsubSelectionLock(),this.#unsubSelectionLock=noop$1}}const getUserSelect=node2=>node2.style.userSelect||node2.style.webkitUserSelect;function preventTextSelectionOverflow(node2,body2){const originalBodyUserSelect=getUserSelect(body2), -originalNodeUserSelect=getUserSelect(node2);return setUserSelect(body2,"none"),setUserSelect(node2,"text"),()=>{setUserSelect(body2,originalBodyUserSelect),setUserSelect(node2,originalNodeUserSelect)}}function setUserSelect(node2,value){node2.style.userSelect=value,node2.style.webkitUserSelect=value}function isHighestLayer(instance){const layersArr=[...globalThis.bitsTextSelectionLayers];if(!layersArr.length)return!1;const highestLayer=layersArr.at(-1);return highestLayer?highestLayer[0]===instance: -!1}function Text_selection_layer($$anchor,$$props){push$1($$props,!0);let preventOverflowTextSelection=prop($$props,"preventOverflowTextSelection",3,!0),onPointerDown=prop($$props,"onPointerDown",3,noop$1),onPointerUp=prop($$props,"onPointerUp",3,noop$1);TextSelectionLayerState.create({id:boxWith$1(()=>$$props.id),onPointerDown:boxWith$1(()=>onPointerDown()),onPointerUp:boxWith$1(()=>onPointerUp()),enabled:boxWith$1(()=>$$props.enabled&&preventOverflowTextSelection()),ref:$$props.ref});var fragment=comment$2(), -node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}globalThis.bitsIdCounter??={current:0};function useId(prefix="bits"){return globalThis.bitsIdCounter.current++,`${prefix}-${globalThis.bitsIdCounter.current}`}class SharedState{#factory;#subscribers=0;#state=state$1();#scope;constructor(factory){this.#factory=factory}#dispose(){this.#subscribers-=1,this.#scope&&this.#subscribers<=0&&(this.#scope(),set$1(this.#state,void 0),this.#scope=void 0)}get(...args){ -return this.#subscribers+=1,get$3(this.#state)===void 0&&(this.#scope=effect_root(()=>{set$1(this.#state,this.#factory(...args),!0)})),user_effect(()=>()=>{this.#dispose()}),get$3(this.#state)}}const lockMap=new SvelteMap;let initialBodyStyle=state$1(null),stopTouchMoveListener=null,cleanupTimeoutId=null,isInCleanupTransition=!1;const anyLocked=boxWith$1(()=>{for(const value of lockMap.values())if(value)return!0;return!1});let cleanupScheduledAt=null;const bodyLockStackCount=new SharedState(()=>{ -function resetBodyStyle(){document.body.setAttribute("style",get$3(initialBodyStyle)??""),document.body.style.removeProperty("--scrollbar-width"),isIOS&&stopTouchMoveListener?.(),set$1(initialBodyStyle,null)}function cancelPendingCleanup(){cleanupTimeoutId!==null&&(window.clearTimeout(cleanupTimeoutId),cleanupTimeoutId=null)}function scheduleCleanupIfNoNewLocks(delay,callback){cancelPendingCleanup(),isInCleanupTransition=!0,cleanupScheduledAt=Date.now();const currentCleanupId=cleanupScheduledAt, -cleanupFn=()=>{cleanupTimeoutId=null,cleanupScheduledAt===currentCleanupId&&(isAnyLocked(lockMap)?isInCleanupTransition=!1:(isInCleanupTransition=!1,callback()))},actualDelay=delay===null?24:delay;cleanupTimeoutId=window.setTimeout(cleanupFn,actualDelay)}function ensureInitialStyleCaptured(){get$3(initialBodyStyle)===null&&lockMap.size===0&&!isInCleanupTransition&&set$1(initialBodyStyle,document.body.getAttribute("style"),!0)}return watch$1(()=>anyLocked.current,()=>{if(!anyLocked.current)return; -ensureInitialStyleCaptured(),isInCleanupTransition=!1;const htmlStyle=getComputedStyle(document.documentElement),bodyStyle=getComputedStyle(document.body),hasStableGutter=htmlStyle.scrollbarGutter?.includes("stable")||bodyStyle.scrollbarGutter?.includes("stable"),verticalScrollbarWidth=window.innerWidth-document.documentElement.clientWidth,config2={padding:Number.parseInt(bodyStyle.paddingRight??"0",10)+verticalScrollbarWidth,margin:Number.parseInt(bodyStyle.marginRight??"0",10)};verticalScrollbarWidth> -0&&!hasStableGutter&&(document.body.style.paddingRight=`${config2.padding}px`,document.body.style.marginRight=`${config2.margin}px`,document.body.style.setProperty("--scrollbar-width",`${verticalScrollbarWidth}px`)),document.body.style.overflow="hidden",isIOS&&(stopTouchMoveListener=on(document,"touchmove",e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),afterTick(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}), -onDestroyEffect(()=>()=>{stopTouchMoveListener?.()}),{get lockMap(){return lockMap},resetBodyStyle,scheduleCleanupIfNoNewLocks,cancelPendingCleanup,ensureInitialStyleCaptured}});class BodyScrollLock{#id=useId();#initialState;#restoreScrollDelay=()=>null;#countState;locked;constructor(initialState,restoreScrollDelay=()=>null){this.#initialState=initialState,this.#restoreScrollDelay=restoreScrollDelay,this.#countState=bodyLockStackCount.get(),this.#countState&&(this.#countState.cancelPendingCleanup(), -this.#countState.ensureInitialStyleCaptured(),this.#countState.lockMap.set(this.#id,this.#initialState??!1),this.locked=boxWith$1(()=>this.#countState.lockMap.get(this.#id)??!1,v=>this.#countState.lockMap.set(this.#id,v)),onDestroyEffect(()=>{if(this.#countState.lockMap.delete(this.#id),isAnyLocked(this.#countState.lockMap))return;const restoreScrollDelay2=this.#restoreScrollDelay();this.#countState.scheduleCleanupIfNoNewLocks(restoreScrollDelay2,()=>{this.#countState.resetBodyStyle()})}))}}function isAnyLocked(map2){ -for(const[_,value]of map2)if(value)return!0;return!1}function Scroll_lock($$anchor,$$props){push$1($$props,!0);let preventScroll=prop($$props,"preventScroll",3,!0),restoreScrollDelay=prop($$props,"restoreScrollDelay",3,null);preventScroll()&&new BodyScrollLock(preventScroll(),()=>restoreScrollDelay()),pop()}var root_6$y=from_html(" ",1),root_8$A=from_html("
",1);function Alert_dialog_content$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props, -"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),forceMount=prop($$props,"forceMount",3,!1),interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"ignore"),onCloseAutoFocus=prop($$props,"onCloseAutoFocus",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),onOpenAutoFocus=prop($$props,"onOpenAutoFocus",3,noop$1),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),preventScroll=prop($$props,"preventScroll",3,!0),trapFocus=prop($$props,"trapFocus",3,!0), -restoreScrollDelay=prop($$props,"restoreScrollDelay",3,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","interactOutsideBehavior","onCloseAutoFocus","onEscapeKeydown","onOpenAutoFocus","onInteractOutside","preventScroll","trapFocus","restoreScrollDelay"]);const contentState=DialogContentState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props));var fragment=comment$2(), -node2=first_child(fragment);{var consequent_2=$$anchor2=>{Focus_scope($$anchor2,{get ref(){return contentState.opts.ref},loop:!0,get trapFocus(){return trapFocus()},get enabled(){return contentState.root.opts.open.current},get onCloseAutoFocus(){return onCloseAutoFocus()},onOpenAutoFocus:e=>{onOpenAutoFocus()(e),!e.defaultPrevented&&(e.preventDefault(),afterSleep(0,()=>contentState.opts.ref.current?.focus()))},focusScope:($$anchor3,$$arg0)=>{let focusScopeProps=()=>$$arg0?.().props;Escape_layer( -$$anchor3,spread_props(()=>get$3(mergedProps),{get enabled(){return contentState.root.opts.open.current},get ref(){return contentState.opts.ref},onEscapeKeydown:e=>{onEscapeKeydown()(e),!e.defaultPrevented&&contentState.root.handleClose()},children:($$anchor4,$$slotProps)=>{Dismissible_layer($$anchor4,spread_props(()=>get$3(mergedProps),{get ref(){return contentState.opts.ref},get enabled(){return contentState.root.opts.open.current},get interactOutsideBehavior(){return interactOutsideBehavior()}, -onInteractOutside:e=>{onInteractOutside()(e),!e.defaultPrevented&&contentState.root.handleClose()},children:($$anchor5,$$slotProps2)=>{Text_selection_layer($$anchor5,spread_props(()=>get$3(mergedProps),{get ref(){return contentState.opts.ref},get enabled(){return contentState.root.opts.open.current},children:($$anchor6,$$slotProps3)=>{var fragment_5=comment$2(),node_1=first_child(fragment_5);{var consequent_1=$$anchor7=>{var fragment_6=root_6$y(),node_2=first_child(fragment_6);{var consequent=$$anchor8=>{ -Scroll_lock($$anchor8,{get preventScroll(){return preventScroll()},get restoreScrollDelay(){return restoreScrollDelay()}})};if_block(node_2,$$render=>{contentState.root.opts.open.current&&$$render(consequent)})}var node_3=sibling(node_2,2);{let $0=user_derived(()=>({props:mergeProps(get$3(mergedProps),focusScopeProps()),...contentState.snippetProps}));snippet(node_3,()=>$$props.child,()=>get$3($0))}append($$anchor7,fragment_6)},alternate=$$anchor7=>{var fragment_8=root_8$A(),node_4=first_child(fragment_8); -Scroll_lock(node_4,{get preventScroll(){return preventScroll()}});var div=sibling(node_4,2);attribute_effect(div,$0=>({...$0}),[()=>mergeProps(get$3(mergedProps),focusScopeProps())]);var node_5=child(div);snippet(node_5,()=>$$props.children??noop$3),reset(div),append($$anchor7,fragment_8)};if_block(node_1,$$render=>{$$props.child?$$render(consequent_1):$$render(alternate,-1)})}append($$anchor6,fragment_5)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})}; -if_block(node2,$$render=>{(contentState.shouldRender||forceMount())&&$$render(consequent_2)})}append($$anchor,fragment),pop()}var root_3$15=from_html("
");function Dialog_overlay$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),forceMount=prop($$props,"forceMount",3,!1),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const overlayState=DialogOverlayState. -create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,overlayState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_2=first_child(fragment_2);{let $0=user_derived(()=>({props:mergeProps(get$3(mergedProps)),...overlayState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$3( -$0))}append($$anchor3,fragment_2)},alternate=$$anchor3=>{var div=root_3$15();attribute_effect(div,$0=>({...$0}),[()=>mergeProps(get$3(mergedProps))]);var node_3=child(div);snippet(node_3,()=>$$props.children??noop$3,()=>overlayState.snippetProps),reset(div),append($$anchor3,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment_1)};if_block(node2,$$render=>{(overlayState.shouldRender||forceMount())&&$$render(consequent_1)})}append($$anchor, -fragment),pop()}var root_2$1A=from_html("
");function Dialog_description$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","children","child","ref"]);const descriptionState=DialogDescriptionState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,descriptionState. -props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1A();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent): -$$render(alternate,-1)})}append($$anchor,fragment),pop()}const checkboxAttrs=createBitsAttrs({component:"checkbox",parts:["root","group","group-label","input"]}),CheckboxGroupContext=new Context$1("Checkbox.Group"),CheckboxRootContext=new Context$1("Checkbox.Root");class CheckboxRootState{static create(opts,group=null){return CheckboxRootContext.set(new CheckboxRootState(opts,group))}opts;group;#trueName=user_derived(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this. -opts.name.current);get trueName(){return get$3(this.#trueName)}set trueName(value){set$1(this.#trueName,value)}#trueRequired=user_derived(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current);get trueRequired(){return get$3(this.#trueRequired)}set trueRequired(value){set$1(this.#trueRequired,value)}#trueDisabled=user_derived(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current);get trueDisabled(){return get$3(this.#trueDisabled)}set trueDisabled(value){ -set$1(this.#trueDisabled,value)}#trueReadonly=user_derived(()=>this.group&&this.group.opts.readonly.current?!0:this.opts.readonly.current);get trueReadonly(){return get$3(this.#trueReadonly)}set trueReadonly(value){set$1(this.#trueReadonly,value)}attachment;constructor(opts,group){this.opts=opts,this.group=group,this.attachment=attachRef(this.opts.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),watch$1.pre([()=>snapshot(this.group?.opts.value.current),()=>this. -opts.value.current],([groupValue,value])=>{!groupValue||!value||(this.opts.checked.current=groupValue.includes(value))}),watch$1.pre(()=>this.opts.checked.current,checked=>{this.group&&(checked?this.group?.addValue(this.opts.value.current):this.group?.removeValue(this.opts.value.current))})}onkeydown(e){if(!(this.trueDisabled||this.trueReadonly)){if(e.key===ENTER){e.preventDefault(),this.opts.type.current==="submit"&&e.currentTarget.closest("form")?.requestSubmit();return}e.key===SPACE&&(e.preventDefault(), -this.#toggle())}}#toggle(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current}onclick(e){if(!(this.trueDisabled||this.trueReadonly)){if(this.opts.type.current==="submit"){this.#toggle();return}e.preventDefault(),this.#toggle()}}#snippetProps=user_derived(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){ -set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,role:"checkbox",type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":getAriaChecked(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":boolToStr(this.trueRequired),"aria-readonly":boolToStr(this.trueReadonly),"data-disabled":boolToEmptyStrOrUndef(this.trueDisabled),"data-readonly":boolToEmptyStrOrUndef(this.trueReadonly),"data-state":getCheckboxDataState(this.opts.checked.current, -this.opts.indeterminate.current),[checkboxAttrs.root]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class CheckboxInputState{static create(){return new CheckboxInputState(CheckboxRootContext.get())}root;#trueChecked=user_derived(()=>this.root.group?!!(this.root.opts.value.current!==void 0&&this.root.group.opts.value.current.includes(this.root.opts.value.current)):this.root.opts.checked.current);get trueChecked(){ -return get$3(this.#trueChecked)}set trueChecked(value){set$1(this.#trueChecked,value)}#shouldRender=user_derived(()=>!!this.root.trueName);get shouldRender(){return get$3(this.#shouldRender)}set shouldRender(value){set$1(this.#shouldRender,value)}constructor(root2){this.root=root2,this.onfocus=this.onfocus.bind(this)}onfocus(_){isHTMLElement$1(this.root.opts.ref.current)&&this.root.opts.ref.current.focus()}#props=user_derived(()=>({type:"checkbox",checked:this.root.opts.checked.current===!0,disabled:this. -root.trueDisabled,required:this.root.trueRequired,name:this.root.trueName,value:this.root.opts.value.current,readonly:this.root.trueReadonly,onfocus:this.onfocus}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}function getCheckboxDataState(checked,indeterminate){return indeterminate?"indeterminate":checked?"checked":"unchecked"}enable_legacy_mode_flag();var root_1$1d=from_html(""),root_2$1z=from_html("");function Hidden_input($$anchor,$$props){ -push$1($$props,!0);let value=prop($$props,"value",15),restProps=rest_props($$props,["$$slots","$$events","$$legacy","value"]);const mergedProps=user_derived(()=>mergeProps(restProps,{"aria-hidden":"true",tabindex:-1,style:{...srOnlyStyles$1,position:"absolute",top:"0",left:"0"}}));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var input=root_1$1d();attribute_effect(input,()=>({...get$3(mergedProps),value:value()}),void 0,void 0,void 0,void 0,!0),append($$anchor2, -input)},alternate=$$anchor2=>{var input_1=root_2$1z();attribute_effect(input_1,()=>({...get$3(mergedProps)}),void 0,void 0,void 0,void 0,!0),bind_value(input_1,value),append($$anchor2,input_1)};if_block(node2,$$render=>{get$3(mergedProps).type==="checkbox"?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}function Checkbox_input($$anchor,$$props){push$1($$props,!1);const inputState=CheckboxInputState.create();init();var fragment=comment$2(),node2=first_child(fragment); -{var consequent=$$anchor2=>{Hidden_input($$anchor2,spread_props(()=>inputState.props))};if_block(node2,$$render=>{inputState.shouldRender&&$$render(consequent)})}append($$anchor,fragment),pop()}var root_2$1y=from_html(""),root$1_=from_html(" ",1);function Checkbox$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let checked=prop($$props,"checked",15,!1),ref2=prop($$props,"ref",15,null),disabled=prop($$props,"disabled",3,!1),required2=prop($$props,"required", -3,!1),name=prop($$props,"name",3,void 0),value=prop($$props,"value",3,"on"),id2=prop($$props,"id",19,()=>createId(uid2)),indeterminate=prop($$props,"indeterminate",15,!1),type2=prop($$props,"type",3,"button"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","checked","ref","onCheckedChange","children","disabled","required","name","value","id","indeterminate","onIndeterminateChange","child","type","readonly"]);const group=CheckboxGroupContext.getOr(null);group&&value()&&(group.opts.value. -current.includes(value())?checked(!0):checked(!1)),watch$1.pre(()=>value(),()=>{group&&value()&&(group.opts.value.current.includes(value())?checked(!0):checked(!1))});const rootState=CheckboxRootState.create({checked:boxWith$1(()=>checked(),v=>{checked(v),$$props.onCheckedChange?.(v)}),disabled:boxWith$1(()=>disabled()??!1),required:boxWith$1(()=>required2()),name:boxWith$1(()=>name()),value:boxWith$1(()=>value()),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),indeterminate:boxWith$1( -()=>indeterminate(),v=>{indeterminate(v),$$props.onIndeterminateChange?.(v)}),type:boxWith$1(()=>type2()),readonly:boxWith$1(()=>!!$$props.readonly)},group),mergedProps=user_derived(()=>mergeProps({...restProps},rootState.props));var fragment=root$1_(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>({props:get$3(mergedProps),...rootState.snippetProps}));snippet(node_1,()=>$$props.child,()=>get$3($0))}append( -$$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1y();attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3,()=>rootState.snippetProps),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}var node_3=sibling(node2,2);Checkbox_input(node_3,{}),append($$anchor,fragment),pop()}const collapsibleAttrs=createBitsAttrs({component:"collapsible",parts:[ -"root","content","trigger"]}),CollapsibleRootContext=new Context$1("Collapsible.Root");class CollapsibleRootState{static create(opts){return CollapsibleRootContext.set(new CollapsibleRootState(opts))}opts;attachment;#contentNode=state$1(null);get contentNode(){return get$3(this.#contentNode)}set contentNode(value){set$1(this.#contentNode,value,!0)}contentPresence;#contentId=state$1(void 0);get contentId(){return get$3(this.#contentId)}set contentId(value){set$1(this.#contentId,value,!0)}constructor(opts){ -this.opts=opts,this.toggleOpen=this.toggleOpen.bind(this),this.attachment=attachRef(this.opts.ref),this.contentPresence=new PresenceManager({ref:boxWith$1(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}})}toggleOpen(){this.opts.open.current=!this.opts.open.current}#props=user_derived(()=>({id:this.opts.id.current,"data-state":getDataOpenClosed(this.opts.open.current),"data-disabled":boolToEmptyStrOrUndef(this.opts.disabled. -current),[collapsibleAttrs.root]:"",...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class CollapsibleContentState{static create(opts){return new CollapsibleContentState(opts,CollapsibleRootContext.get())}opts;root;attachment;#present=user_derived(()=>this.opts.hiddenUntilFound.current?this.root.opts.open.current:this.opts.forceMount.current||this.root.opts.open.current);get present(){return get$3(this.#present)}set present(value){set$1(this.#present, -value)}#originalStyles;#isMountAnimationPrevented=state$1(!1);#width=state$1(0);#height=state$1(0);constructor(opts,root2){this.opts=opts,this.root=root2,set$1(this.#isMountAnimationPrevented,root2.opts.open.current,!0),this.root.contentId=this.opts.id.current,this.attachment=attachRef(this.opts.ref,v=>this.root.contentNode=v),watch$1.pre(()=>this.opts.id.current,id2=>{this.root.contentId=id2}),user_pre_effect(()=>{const rAF=requestAnimationFrame(()=>{set$1(this.#isMountAnimationPrevented,!1)}); -return()=>{cancelAnimationFrame(rAF)}}),watch$1.pre([()=>this.opts.ref.current,()=>this.opts.hiddenUntilFound.current],([node2,hiddenUntilFound])=>!node2||!hiddenUntilFound?void 0:on(node2,"beforematch",()=>{this.root.opts.open.current||requestAnimationFrame(()=>{this.root.opts.open.current=!0})})),watch$1([()=>this.opts.ref.current,()=>this.present],([node2])=>{node2&&afterTick(()=>{if(!this.opts.ref.current)return;this.#originalStyles=this.#originalStyles||{transitionDuration:node2.style.transitionDuration, -animationName:node2.style.animationName},node2.style.transitionDuration="0s",node2.style.animationName="none";const rect=node2.getBoundingClientRect();if(set$1(this.#height,rect.height,!0),set$1(this.#width,rect.width,!0),!get$3(this.#isMountAnimationPrevented)){const{animationName,transitionDuration}=this.#originalStyles;node2.style.transitionDuration=transitionDuration,node2.style.animationName=animationName}})})}get shouldRender(){return this.root.contentPresence.shouldRender}#snippetProps=user_derived( -()=>({open:this.root.opts.open.current}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":get$3(this.#height)?`${get$3(this.#height)}px`:void 0,"--bits-collapsible-content-width":get$3(this.#width)?`${get$3(this.#width)}px`:void 0},hidden:this.opts.hiddenUntilFound.current&&!this.root.opts.open.current?"until-found":void 0,"data-state":getDataOpenClosed( -this.root.opts.open.current),...getDataTransitionAttrs(this.root.contentPresence.transitionStatus),"data-disabled":boolToEmptyStrOrUndef(this.root.opts.disabled.current),[collapsibleAttrs.content]:"",...this.opts.hiddenUntilFound.current&&!this.shouldRender?{}:{hidden:this.opts.hiddenUntilFound.current?!this.shouldRender:this.opts.forceMount.current?void 0:!this.shouldRender},...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class CollapsibleTriggerState{static create(opts){ -return new CollapsibleTriggerState(opts,CollapsibleRootContext.get())}opts;root;attachment;#isDisabled=user_derived(()=>this.opts.disabled.current||this.root.opts.disabled.current);constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){if(!get$3(this.#isDisabled)){if(e.button!==0)return e.preventDefault();this.root.toggleOpen()}}onkeydown(e){get$3(this.#isDisabled)||(e. -key===SPACE||e.key===ENTER)&&(e.preventDefault(),this.root.toggleOpen())}#props=user_derived(()=>({id:this.opts.id.current,type:"button",disabled:get$3(this.#isDisabled),"aria-controls":this.root.contentId,"aria-expanded":boolToStr(this.root.opts.open.current),"data-state":getDataOpenClosed(this.root.opts.open.current),"data-disabled":boolToEmptyStrOrUndef(get$3(this.#isDisabled)),[collapsibleAttrs.trigger]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return get$3( -this.#props)}set props(value){set$1(this.#props,value)}}var root_2$1x=from_html("
");function Collapsible$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),open2=prop($$props,"open",15,!1),disabled=prop($$props,"disabled",3,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1),restProps=rest_props($$props,["$$slots","$$event\ -s","$$legacy","children","child","id","ref","open","disabled","onOpenChange","onOpenChangeComplete"]);const rootState=CollapsibleRootState.create({open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),disabled:boxWith$1(()=>disabled()),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())}),mergedProps=user_derived(()=>mergeProps(restProps,rootState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{ -var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1x();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_2$1w=from_html("
");function Collapsible_content$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),forceMount=prop($$props,"forceMount",3,!1),hiddenUntilFound=prop($$props,"hiddenUntilFound",3,!1),id2=prop($$props,"id",19,()=>createId(uid2)),restProps=rest_props($$props,["$$slots","$$events","$$legacy","child","ref","forceMount","hiddenUntilFound","children","id"]);const contentState=CollapsibleContentState.create({id:boxWith$1(()=>id2()),forceMount:boxWith$1( -()=>forceMount()),hiddenUntilFound:boxWith$1(()=>hiddenUntilFound()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>({...contentState.snippetProps,props:get$3(mergedProps)}));snippet(node_1,()=>$$props.child,()=>get$3($0))}append($$anchor2,fragment_1)},alternate=$$anchor2=>{ -var div=root_2$1w();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_2$1v=from_html("");function Collapsible_trigger$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId( -uid2)),disabled=prop($$props,"disabled",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","ref","id","disabled"]);const triggerState=CollapsibleTriggerState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),disabled:boxWith$1(()=>disabled())}),mergedProps=user_derived(()=>mergeProps(restProps,triggerState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1); -snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1v();attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}const sides=["top","right","bottom","left"],min=Math.min,max=Math.max,round=Math. -round,floor=Math.floor,createCoords=v=>({x:v,y:v}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$1(start2,value,end){return max(start2,min(value,end))}function evaluate(value,param){return typeof value=="function"?value(param):value}function getSide$1(placement){return placement.split("-")[0]}function getAlignment(placement){return placement.split("-")[1]}function getOppositeAxis(axis){return axis==="x"?"y":"x"} -function getAxisLength(axis){return axis==="y"?"height":"width"}const yAxisSides=new Set(["top","bottom"]);function getSideAxis(placement){return yAxisSides.has(getSide$1(placement))?"y":"x"}function getAlignmentAxis(placement){return getOppositeAxis(getSideAxis(placement))}function getAlignmentSides(placement,rects,rtl){rtl===void 0&&(rtl=!1);const alignment=getAlignment(placement),alignmentAxis=getAlignmentAxis(placement),length=getAxisLength(alignmentAxis);let mainAlignmentSide=alignmentAxis=== -"x"?alignment===(rtl?"end":"start")?"right":"left":alignment==="start"?"bottom":"top";return rects.reference[length]>rects.floating[length]&&(mainAlignmentSide=getOppositePlacement(mainAlignmentSide)),[mainAlignmentSide,getOppositePlacement(mainAlignmentSide)]}function getExpandedPlacements(placement){const oppositePlacement=getOppositePlacement(placement);return[getOppositeAlignmentPlacement(placement),oppositePlacement,getOppositeAlignmentPlacement(oppositePlacement)]}function getOppositeAlignmentPlacement(placement){ -return placement.replace(/start|end/g,alignment=>oppositeAlignmentMap[alignment])}const lrPlacement=["left","right"],rlPlacement=["right","left"],tbPlacement=["top","bottom"],btPlacement=["bottom","top"];function getSideList(side,isStart,rtl){switch(side){case"top":case"bottom":return rtl?isStart?rlPlacement:lrPlacement:isStart?lrPlacement:rlPlacement;case"left":case"right":return isStart?tbPlacement:btPlacement;default:return[]}}function getOppositeAxisPlacements(placement,flipAlignment,direction,rtl){ -const alignment=getAlignment(placement);let list2=getSideList(getSide$1(placement),direction==="start",rtl);return alignment&&(list2=list2.map(side=>side+"-"+alignment),flipAlignment&&(list2=list2.concat(list2.map(getOppositeAlignmentPlacement)))),list2}function getOppositePlacement(placement){return placement.replace(/left|right|bottom|top/g,side=>oppositeSideMap[side])}function expandPaddingObject(padding){return{top:0,right:0,bottom:0,left:0,...padding}}function getPaddingObject(padding){return typeof padding!= -"number"?expandPaddingObject(padding):{top:padding,right:padding,bottom:padding,left:padding}}function rectToClientRect(rect){const{x,y,width,height}=rect;return{width,height,top:y,left:x,right:x+width,bottom:y+height,x,y}}function computeCoordsFromPlacement(_ref,placement,rtl){let{reference,floating}=_ref;const sideAxis=getSideAxis(placement),alignmentAxis=getAlignmentAxis(placement),alignLength=getAxisLength(alignmentAxis),side=getSide$1(placement),isVertical=sideAxis==="y",commonX=reference.x+ -reference.width/2-floating.width/2,commonY=reference.y+reference.height/2-floating.height/2,commonAlign=reference[alignLength]/2-floating[alignLength]/2;let coords;switch(side){case"top":coords={x:commonX,y:reference.y-floating.height};break;case"bottom":coords={x:commonX,y:reference.y+reference.height};break;case"right":coords={x:reference.x+reference.width,y:commonY};break;case"left":coords={x:reference.x-floating.width,y:commonY};break;default:coords={x:reference.x,y:reference.y}}switch(getAlignment( -placement)){case"start":coords[alignmentAxis]-=commonAlign*(rtl&&isVertical?-1:1);break;case"end":coords[alignmentAxis]+=commonAlign*(rtl&&isVertical?-1:1);break}return coords}const computePosition$1=async(reference,floating,config2)=>{const{placement="bottom",strategy="absolute",middleware=[],platform:platform2}=config2,validMiddleware=middleware.filter(Boolean),rtl=await(platform2.isRTL==null?void 0:platform2.isRTL(floating));let rects=await platform2.getElementRects({reference,floating,strategy}), -{x,y}=computeCoordsFromPlacement(rects,placement,rtl),statefulPlacement=placement,middlewareData={},resetCount=0;for(let i=0;i({name:"arrow",options,async fn(state2){const{x,y,placement,rects,platform:platform2,elements,middlewareData}=state2,{element:element2,padding=0}=evaluate(options,state2)||{};if(element2==null)return{};const paddingObject=getPaddingObject(padding),coords={x,y},axis=getAlignmentAxis(placement),length=getAxisLength(axis),arrowDimensions=await platform2.getDimensions(element2),isYAxis=axis=== -"y",minProp=isYAxis?"top":"left",maxProp=isYAxis?"bottom":"right",clientProp=isYAxis?"clientHeight":"clientWidth",endDiff=rects.reference[length]+rects.reference[axis]-coords[axis]-rects.floating[length],startDiff=coords[axis]-rects.reference[axis],arrowOffsetParent=await(platform2.getOffsetParent==null?void 0:platform2.getOffsetParent(element2));let clientSize=arrowOffsetParent?arrowOffsetParent[clientProp]:0;(!clientSize||!await(platform2.isElement==null?void 0:platform2.isElement(arrowOffsetParent)))&& -(clientSize=elements.floating[clientProp]||rects.floating[length]);const centerToReference=endDiff/2-startDiff/2,largestPossiblePadding=clientSize/2-arrowDimensions[length]/2-1,minPadding=min(paddingObject[minProp],largestPossiblePadding),maxPadding=min(paddingObject[maxProp],largestPossiblePadding),min$1=minPadding,max2=clientSize-arrowDimensions[length]-maxPadding,center=clientSize/2-arrowDimensions[length]/2+centerToReference,offset2=clamp$1(min$1,center,max2),shouldAddOffset=!middlewareData. -arrow&&getAlignment(placement)!=null&¢er!==offset2&&rects.reference[length]/2-(centerside2<=0)){var _middlewareData$flip2,_overflowsData$filter;const nextIndex=(((_middlewareData$flip2=middlewareData.flip)==null?void 0:_middlewareData$flip2.index)||0)+1,nextPlacement=placements[nextIndex];if(nextPlacement&&(!(checkCrossAxis==="alignment"?initialSideAxis!==getSideAxis(nextPlacement):!1)||overflowsData.every(d2=>d2.overflows[0]>0&&getSideAxis(d2.placement)===initialSideAxis)))return{data:{index:nextIndex,overflows:overflowsData},reset:{placement:nextPlacement}}; -let resetPlacement=(_overflowsData$filter=overflowsData.filter(d2=>d2.overflows[0]<=0).sort((a,b)=>a.overflows[1]-b.overflows[1])[0])==null?void 0:_overflowsData$filter.placement;if(!resetPlacement)switch(fallbackStrategy){case"bestFit":{var _overflowsData$filter2;const placement2=(_overflowsData$filter2=overflowsData.filter(d2=>{if(hasFallbackAxisSideDirection){const currentSideAxis=getSideAxis(d2.placement);return currentSideAxis===initialSideAxis||currentSideAxis==="y"}return!0}).map(d2=>[d2. -placement,d2.overflows.filter(overflow2=>overflow2>0).reduce((acc,overflow2)=>acc+overflow2,0)]).sort((a,b)=>a[1]-b[1])[0])==null?void 0:_overflowsData$filter2[0];placement2&&(resetPlacement=placement2);break}case"initialPlacement":resetPlacement=initialPlacement;break}if(placement!==resetPlacement)return{reset:{placement:resetPlacement}}}return{}}}};function getSideOffsets(overflow,rect){return{top:overflow.top-rect.height,right:overflow.right-rect.width,bottom:overflow.bottom-rect.height,left:overflow. -left-rect.width}}function isAnySideFullyClipped(overflow){return sides.some(side=>overflow[side]>=0)}const hide$1=function(options){return options===void 0&&(options={}),{name:"hide",options,async fn(state2){const{rects}=state2,{strategy="referenceHidden",...detectOverflowOptions}=evaluate(options,state2);switch(strategy){case"referenceHidden":{const overflow=await detectOverflow(state2,{...detectOverflowOptions,elementContext:"reference"}),offsets=getSideOffsets(overflow,rects.reference);return{ -data:{referenceHiddenOffsets:offsets,referenceHidden:isAnySideFullyClipped(offsets)}}}case"escaped":{const overflow=await detectOverflow(state2,{...detectOverflowOptions,altBoundary:!0}),offsets=getSideOffsets(overflow,rects.floating);return{data:{escapedOffsets:offsets,escaped:isAnySideFullyClipped(offsets)}}}default:return{}}}}},originSides=new Set(["left","top"]);async function convertValueToCoords(state2,options){const{placement,platform:platform2,elements}=state2,rtl=await(platform2.isRTL== -null?void 0:platform2.isRTL(elements.floating)),side=getSide$1(placement),alignment=getAlignment(placement),isVertical=getSideAxis(placement)==="y",mainAxisMulti=originSides.has(side)?-1:1,crossAxisMulti=rtl&&isVertical?-1:1,rawValue=evaluate(options,state2);let{mainAxis,crossAxis,alignmentAxis}=typeof rawValue=="number"?{mainAxis:rawValue,crossAxis:0,alignmentAxis:null}:{mainAxis:rawValue.mainAxis||0,crossAxis:rawValue.crossAxis||0,alignmentAxis:rawValue.alignmentAxis};return alignment&&typeof alignmentAxis== -"number"&&(crossAxis=alignment==="end"?alignmentAxis*-1:alignmentAxis),isVertical?{x:crossAxis*crossAxisMulti,y:mainAxis*mainAxisMulti}:{x:mainAxis*mainAxisMulti,y:crossAxis*crossAxisMulti}}const offset$1=function(options){return options===void 0&&(options=0),{name:"offset",options,async fn(state2){var _middlewareData$offse,_middlewareData$arrow;const{x,y,placement,middlewareData}=state2,diffCoords=await convertValueToCoords(state2,options);return placement===((_middlewareData$offse=middlewareData. -offset)==null?void 0:_middlewareData$offse.placement)&&(_middlewareData$arrow=middlewareData.arrow)!=null&&_middlewareData$arrow.alignmentOffset?{}:{x:x+diffCoords.x,y:y+diffCoords.y,data:{...diffCoords,placement}}}}},shift$1=function(options){return options===void 0&&(options={}),{name:"shift",options,async fn(state2){const{x,y,placement}=state2,{mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!1,limiter={fn:_ref=>{let{x:x2,y:y2}=_ref;return{x:x2,y:y2}}},...detectOverflowOptions}=evaluate(options, -state2),coords={x,y},overflow=await detectOverflow(state2,detectOverflowOptions),crossAxis=getSideAxis(getSide$1(placement)),mainAxis=getOppositeAxis(crossAxis);let mainAxisCoord=coords[mainAxis],crossAxisCoord=coords[crossAxis];if(checkMainAxis){const minSide=mainAxis==="y"?"top":"left",maxSide=mainAxis==="y"?"bottom":"right",min2=mainAxisCoord+overflow[minSide],max2=mainAxisCoord-overflow[maxSide];mainAxisCoord=clamp$1(min2,mainAxisCoord,max2)}if(checkCrossAxis){const minSide=crossAxis==="y"?"\ -top":"left",maxSide=crossAxis==="y"?"bottom":"right",min2=crossAxisCoord+overflow[minSide],max2=crossAxisCoord-overflow[maxSide];crossAxisCoord=clamp$1(min2,crossAxisCoord,max2)}const limitedCoords=limiter.fn({...state2,[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord});return{...limitedCoords,data:{x:limitedCoords.x-x,y:limitedCoords.y-y,enabled:{[mainAxis]:checkMainAxis,[crossAxis]:checkCrossAxis}}}}}},limitShift$1=function(options){return options===void 0&&(options={}),{options,fn(state2){ -const{x,y,placement,rects,middlewareData}=state2,{offset:offset2=0,mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!0}=evaluate(options,state2),coords={x,y},crossAxis=getSideAxis(placement),mainAxis=getOppositeAxis(crossAxis);let mainAxisCoord=coords[mainAxis],crossAxisCoord=coords[crossAxis];const rawOffset=evaluate(offset2,state2),computedOffset=typeof rawOffset=="number"?{mainAxis:rawOffset,crossAxis:0}:{mainAxis:0,crossAxis:0,...rawOffset};if(checkMainAxis){const len=mainAxis==="y"?"heigh\ -t":"width",limitMin=rects.reference[mainAxis]-rects.floating[len]+computedOffset.mainAxis,limitMax=rects.reference[mainAxis]+rects.reference[len]-computedOffset.mainAxis;mainAxisCoordlimitMax&&(mainAxisCoord=limitMax)}if(checkCrossAxis){var _middlewareData$offse,_middlewareData$offse2;const len=mainAxis==="y"?"width":"height",isOriginSide=originSides.has(getSide$1(placement)),limitMin=rects.reference[crossAxis]-rects.floating[len]+(isOriginSide&&((_middlewareData$offse= -middlewareData.offset)==null?void 0:_middlewareData$offse[crossAxis])||0)+(isOriginSide?0:computedOffset.crossAxis),limitMax=rects.reference[crossAxis]+rects.reference[len]+(isOriginSide?0:((_middlewareData$offse2=middlewareData.offset)==null?void 0:_middlewareData$offse2[crossAxis])||0)-(isOriginSide?computedOffset.crossAxis:0);crossAxisCoordlimitMax&&(crossAxisCoord=limitMax)}return{[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord}}}},size$1=function(options){ -return options===void 0&&(options={}),{name:"size",options,async fn(state2){var _state$middlewareData,_state$middlewareData2;const{placement,rects,platform:platform2,elements}=state2,{apply=()=>{},...detectOverflowOptions}=evaluate(options,state2),overflow=await detectOverflow(state2,detectOverflowOptions),side=getSide$1(placement),alignment=getAlignment(placement),isYAxis=getSideAxis(placement)==="y",{width,height}=rects.floating;let heightSide,widthSide;side==="top"||side==="bottom"?(heightSide= -side,widthSide=alignment===(await(platform2.isRTL==null?void 0:platform2.isRTL(elements.floating))?"start":"end")?"left":"right"):(widthSide=side,heightSide=alignment==="end"?"top":"bottom");const maximumClippingHeight=height-overflow.top-overflow.bottom,maximumClippingWidth=width-overflow.left-overflow.right,overflowAvailableHeight=min(height-overflow[heightSide],maximumClippingHeight),overflowAvailableWidth=min(width-overflow[widthSide],maximumClippingWidth),noShift=!state2.middlewareData.shift; -let availableHeight=overflowAvailableHeight,availableWidth=overflowAvailableWidth;if((_state$middlewareData=state2.middlewareData.shift)!=null&&_state$middlewareData.enabled.x&&(availableWidth=maximumClippingWidth),(_state$middlewareData2=state2.middlewareData.shift)!=null&&_state$middlewareData2.enabled.y&&(availableHeight=maximumClippingHeight),noShift&&!alignment){const xMin=max(overflow.left,0),xMax=max(overflow.right,0),yMin=max(overflow.top,0),yMax=max(overflow.bottom,0);isYAxis?availableWidth= -width-2*(xMin!==0||xMax!==0?xMin+xMax:max(overflow.left,overflow.right)):availableHeight=height-2*(yMin!==0||yMax!==0?yMin+yMax:max(overflow.top,overflow.bottom))}await apply({...state2,availableWidth,availableHeight});const nextDimensions=await platform2.getDimensions(elements.floating);return width!==nextDimensions.width||height!==nextDimensions.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<"u"}function getNodeName(node2){return isNode(node2)?(node2.nodeName||"").toLowerCase(): -"#document"}function getWindow(node2){var _node$ownerDocument;return(node2==null||(_node$ownerDocument=node2.ownerDocument)==null?void 0:_node$ownerDocument.defaultView)||window}function getDocumentElement(node2){var _ref;return(_ref=(isNode(node2)?node2.ownerDocument:node2.document)||window.document)==null?void 0:_ref.documentElement}function isNode(value){return hasWindow()?value instanceof Node||value instanceof getWindow(value).Node:!1}function isElement(value){return hasWindow()?value instanceof -Element||value instanceof getWindow(value).Element:!1}function isHTMLElement(value){return hasWindow()?value instanceof HTMLElement||value instanceof getWindow(value).HTMLElement:!1}function isShadowRoot(value){return!hasWindow()||typeof ShadowRoot>"u"?!1:value instanceof ShadowRoot||value instanceof getWindow(value).ShadowRoot}const invalidOverflowDisplayValues=new Set(["inline","contents"]);function isOverflowElement(element2){const{overflow,overflowX,overflowY,display}=getComputedStyle$1(element2); -return/auto|scroll|overlay|hidden|clip/.test(overflow+overflowY+overflowX)&&!invalidOverflowDisplayValues.has(display)}const tableElements=new Set(["table","td","th"]);function isTableElement(element2){return tableElements.has(getNodeName(element2))}const topLayerSelectors=[":popover-open",":modal"];function isTopLayer(element2){return topLayerSelectors.some(selector=>{try{return element2.matches(selector)}catch{return!1}})}const transformProperties=["transform","translate","scale","rotate","per\ -spective"],willChangeValues=["transform","translate","scale","rotate","perspective","filter"],containValues=["paint","layout","strict","content"];function isContainingBlock(elementOrCss){const webkit=isWebKit(),css2=isElement(elementOrCss)?getComputedStyle$1(elementOrCss):elementOrCss;return transformProperties.some(value=>css2[value]?css2[value]!=="none":!1)||(css2.containerType?css2.containerType!=="normal":!1)||!webkit&&(css2.backdropFilter?css2.backdropFilter!=="none":!1)||!webkit&&(css2.filter? -css2.filter!=="none":!1)||willChangeValues.some(value=>(css2.willChange||"").includes(value))||containValues.some(value=>(css2.contain||"").includes(value))}function getContainingBlock(element2){let currentNode=getParentNode(element2);for(;isHTMLElement(currentNode)&&!isLastTraversableNode(currentNode);){if(isContainingBlock(currentNode))return currentNode;if(isTopLayer(currentNode))return null;currentNode=getParentNode(currentNode)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports? -!1:CSS.supports("-webkit-backdrop-filter","none")}const lastTraversableNodeNames=new Set(["html","body","#document"]);function isLastTraversableNode(node2){return lastTraversableNodeNames.has(getNodeName(node2))}function getComputedStyle$1(element2){return getWindow(element2).getComputedStyle(element2)}function getNodeScroll(element2){return isElement(element2)?{scrollLeft:element2.scrollLeft,scrollTop:element2.scrollTop}:{scrollLeft:element2.scrollX,scrollTop:element2.scrollY}}function getParentNode(node2){ -if(getNodeName(node2)==="html")return node2;const result=node2.assignedSlot||node2.parentNode||isShadowRoot(node2)&&node2.host||getDocumentElement(node2);return isShadowRoot(result)?result.host:result}function getNearestOverflowAncestor(node2){const parentNode=getParentNode(node2);return isLastTraversableNode(parentNode)?node2.ownerDocument?node2.ownerDocument.body:node2.body:isHTMLElement(parentNode)&&isOverflowElement(parentNode)?parentNode:getNearestOverflowAncestor(parentNode)}function getOverflowAncestors(node2,list2,traverseIframes){ -var _node$ownerDocument2;list2===void 0&&(list2=[]),traverseIframes===void 0&&(traverseIframes=!0);const scrollableAncestor=getNearestOverflowAncestor(node2),isBody=scrollableAncestor===((_node$ownerDocument2=node2.ownerDocument)==null?void 0:_node$ownerDocument2.body),win=getWindow(scrollableAncestor);if(isBody){const frameElement=getFrameElement(win);return list2.concat(win,win.visualViewport||[],isOverflowElement(scrollableAncestor)?scrollableAncestor:[],frameElement&&traverseIframes?getOverflowAncestors( -frameElement):[])}return list2.concat(scrollableAncestor,getOverflowAncestors(scrollableAncestor,[],traverseIframes))}function getFrameElement(win){return win.parent&&Object.getPrototypeOf(win.parent)?win.frameElement:null}function getCssDimensions(element2){const css2=getComputedStyle$1(element2);let width=parseFloat(css2.width)||0,height=parseFloat(css2.height)||0;const hasOffset=isHTMLElement(element2),offsetWidth=hasOffset?element2.offsetWidth:width,offsetHeight=hasOffset?element2.offsetHeight: -height,shouldFallback=round(width)!==offsetWidth||round(height)!==offsetHeight;return shouldFallback&&(width=offsetWidth,height=offsetHeight),{width,height,$:shouldFallback}}function unwrapElement(element2){return isElement(element2)?element2:element2.contextElement}function getScale(element2){const domElement=unwrapElement(element2);if(!isHTMLElement(domElement))return createCoords(1);const rect=domElement.getBoundingClientRect(),{width,height,$}=getCssDimensions(domElement);let x=($?round(rect. -width):rect.width)/width,y=($?round(rect.height):rect.height)/height;return(!x||!Number.isFinite(x))&&(x=1),(!y||!Number.isFinite(y))&&(y=1),{x,y}}const noOffsets=createCoords(0);function getVisualOffsets(element2){const win=getWindow(element2);return!isWebKit()||!win.visualViewport?noOffsets:{x:win.visualViewport.offsetLeft,y:win.visualViewport.offsetTop}}function shouldAddVisualOffsets(element2,isFixed,floatingOffsetParent){return isFixed===void 0&&(isFixed=!1),!floatingOffsetParent||isFixed&& -floatingOffsetParent!==getWindow(element2)?!1:isFixed}function getBoundingClientRect(element2,includeScale,isFixedStrategy,offsetParent){includeScale===void 0&&(includeScale=!1),isFixedStrategy===void 0&&(isFixedStrategy=!1);const clientRect=element2.getBoundingClientRect(),domElement=unwrapElement(element2);let scale2=createCoords(1);includeScale&&(offsetParent?isElement(offsetParent)&&(scale2=getScale(offsetParent)):scale2=getScale(element2));const visualOffsets=shouldAddVisualOffsets(domElement, -isFixedStrategy,offsetParent)?getVisualOffsets(domElement):createCoords(0);let x=(clientRect.left+visualOffsets.x)/scale2.x,y=(clientRect.top+visualOffsets.y)/scale2.y,width=clientRect.width/scale2.x,height=clientRect.height/scale2.y;if(domElement){const win=getWindow(domElement),offsetWin=offsetParent&&isElement(offsetParent)?getWindow(offsetParent):offsetParent;let currentWin=win,currentIFrame=getFrameElement(currentWin);for(;currentIFrame&&offsetParent&&offsetWin!==currentWin;){const iframeScale=getScale( -currentIFrame),iframeRect=currentIFrame.getBoundingClientRect(),css2=getComputedStyle$1(currentIFrame),left=iframeRect.left+(currentIFrame.clientLeft+parseFloat(css2.paddingLeft))*iframeScale.x,top=iframeRect.top+(currentIFrame.clientTop+parseFloat(css2.paddingTop))*iframeScale.y;x*=iframeScale.x,y*=iframeScale.y,width*=iframeScale.x,height*=iframeScale.y,x+=left,y+=top,currentWin=getWindow(currentIFrame),currentIFrame=getFrameElement(currentWin)}}return rectToClientRect({width,height,x,y})}function getWindowScrollBarX(element2,rect){ -const leftScroll=getNodeScroll(element2).scrollLeft;return rect?rect.left+leftScroll:getBoundingClientRect(getDocumentElement(element2)).left+leftScroll}function getHTMLOffset(documentElement,scroll,ignoreScrollbarX){ignoreScrollbarX===void 0&&(ignoreScrollbarX=!1);const htmlRect=documentElement.getBoundingClientRect(),x=htmlRect.left+scroll.scrollLeft-(ignoreScrollbarX?0:getWindowScrollBarX(documentElement,htmlRect)),y=htmlRect.top+scroll.scrollTop;return{x,y}}function convertOffsetParentRelativeRectToViewportRelativeRect(_ref){ -let{elements,rect,offsetParent,strategy}=_ref;const isFixed=strategy==="fixed",documentElement=getDocumentElement(offsetParent),topLayer=elements?isTopLayer(elements.floating):!1;if(offsetParent===documentElement||topLayer&&isFixed)return rect;let scroll={scrollLeft:0,scrollTop:0},scale2=createCoords(1);const offsets=createCoords(0),isOffsetParentAnElement=isHTMLElement(offsetParent);if((isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed)&&((getNodeName(offsetParent)!=="body"||isOverflowElement( -documentElement))&&(scroll=getNodeScroll(offsetParent)),isHTMLElement(offsetParent))){const offsetRect=getBoundingClientRect(offsetParent);scale2=getScale(offsetParent),offsets.x=offsetRect.x+offsetParent.clientLeft,offsets.y=offsetRect.y+offsetParent.clientTop}const htmlOffset=documentElement&&!isOffsetParentAnElement&&!isFixed?getHTMLOffset(documentElement,scroll,!0):createCoords(0);return{width:rect.width*scale2.x,height:rect.height*scale2.y,x:rect.x*scale2.x-scroll.scrollLeft*scale2.x+offsets. -x+htmlOffset.x,y:rect.y*scale2.y-scroll.scrollTop*scale2.y+offsets.y+htmlOffset.y}}function getClientRects(element2){return Array.from(element2.getClientRects())}function getDocumentRect(element2){const html2=getDocumentElement(element2),scroll=getNodeScroll(element2),body2=element2.ownerDocument.body,width=max(html2.scrollWidth,html2.clientWidth,body2.scrollWidth,body2.clientWidth),height=max(html2.scrollHeight,html2.clientHeight,body2.scrollHeight,body2.clientHeight);let x=-scroll.scrollLeft+getWindowScrollBarX( -element2);const y=-scroll.scrollTop;return getComputedStyle$1(body2).direction==="rtl"&&(x+=max(html2.clientWidth,body2.clientWidth)-width),{width,height,x,y}}function getViewportRect(element2,strategy){const win=getWindow(element2),html2=getDocumentElement(element2),visualViewport=win.visualViewport;let width=html2.clientWidth,height=html2.clientHeight,x=0,y=0;if(visualViewport){width=visualViewport.width,height=visualViewport.height;const visualViewportBased=isWebKit();(!visualViewportBased||visualViewportBased&& -strategy==="fixed")&&(x=visualViewport.offsetLeft,y=visualViewport.offsetTop)}return{width,height,x,y}}const absoluteOrFixed=new Set(["absolute","fixed"]);function getInnerBoundingClientRect(element2,strategy){const clientRect=getBoundingClientRect(element2,!0,strategy==="fixed"),top=clientRect.top+element2.clientTop,left=clientRect.left+element2.clientLeft,scale2=isHTMLElement(element2)?getScale(element2):createCoords(1),width=element2.clientWidth*scale2.x,height=element2.clientHeight*scale2.y, -x=left*scale2.x,y=top*scale2.y;return{width,height,x,y}}function getClientRectFromClippingAncestor(element2,clippingAncestor,strategy){let rect;if(clippingAncestor==="viewport")rect=getViewportRect(element2,strategy);else if(clippingAncestor==="document")rect=getDocumentRect(getDocumentElement(element2));else if(isElement(clippingAncestor))rect=getInnerBoundingClientRect(clippingAncestor,strategy);else{const visualOffsets=getVisualOffsets(element2);rect={x:clippingAncestor.x-visualOffsets.x,y:clippingAncestor. -y-visualOffsets.y,width:clippingAncestor.width,height:clippingAncestor.height}}return rectToClientRect(rect)}function hasFixedPositionAncestor(element2,stopNode){const parentNode=getParentNode(element2);return parentNode===stopNode||!isElement(parentNode)||isLastTraversableNode(parentNode)?!1:getComputedStyle$1(parentNode).position==="fixed"||hasFixedPositionAncestor(parentNode,stopNode)}function getClippingElementAncestors(element2,cache2){const cachedResult=cache2.get(element2);if(cachedResult) -return cachedResult;let result=getOverflowAncestors(element2,[],!1).filter(el=>isElement(el)&&getNodeName(el)!=="body"),currentContainingBlockComputedStyle=null;const elementIsFixed=getComputedStyle$1(element2).position==="fixed";let currentNode=elementIsFixed?getParentNode(element2):element2;for(;isElement(currentNode)&&!isLastTraversableNode(currentNode);){const computedStyle=getComputedStyle$1(currentNode),currentNodeIsContaining=isContainingBlock(currentNode);!currentNodeIsContaining&&computedStyle. -position==="fixed"&&(currentContainingBlockComputedStyle=null),(elementIsFixed?!currentNodeIsContaining&&!currentContainingBlockComputedStyle:!currentNodeIsContaining&&computedStyle.position==="static"&&!!currentContainingBlockComputedStyle&&absoluteOrFixed.has(currentContainingBlockComputedStyle.position)||isOverflowElement(currentNode)&&!currentNodeIsContaining&&hasFixedPositionAncestor(element2,currentNode))?result=result.filter(ancestor=>ancestor!==currentNode):currentContainingBlockComputedStyle= -computedStyle,currentNode=getParentNode(currentNode)}return cache2.set(element2,result),result}function getClippingRect(_ref){let{element:element2,boundary:boundary2,rootBoundary,strategy}=_ref;const clippingAncestors=[...boundary2==="clippingAncestors"?isTopLayer(element2)?[]:getClippingElementAncestors(element2,this._c):[].concat(boundary2),rootBoundary],firstClippingAncestor=clippingAncestors[0],clippingRect=clippingAncestors.reduce((accRect,clippingAncestor)=>{const rect=getClientRectFromClippingAncestor( -element2,clippingAncestor,strategy);return accRect.top=max(rect.top,accRect.top),accRect.right=min(rect.right,accRect.right),accRect.bottom=min(rect.bottom,accRect.bottom),accRect.left=max(rect.left,accRect.left),accRect},getClientRectFromClippingAncestor(element2,firstClippingAncestor,strategy));return{width:clippingRect.right-clippingRect.left,height:clippingRect.bottom-clippingRect.top,x:clippingRect.left,y:clippingRect.top}}function getDimensions(element2){const{width,height}=getCssDimensions( -element2);return{width,height}}function getRectRelativeToOffsetParent(element2,offsetParent,strategy){const isOffsetParentAnElement=isHTMLElement(offsetParent),documentElement=getDocumentElement(offsetParent),isFixed=strategy==="fixed",rect=getBoundingClientRect(element2,!0,isFixed,offsetParent);let scroll={scrollLeft:0,scrollTop:0};const offsets=createCoords(0);function setLeftRTLScrollbarOffset(){offsets.x=getWindowScrollBarX(documentElement)}if(isOffsetParentAnElement||!isOffsetParentAnElement&& -!isFixed)if((getNodeName(offsetParent)!=="body"||isOverflowElement(documentElement))&&(scroll=getNodeScroll(offsetParent)),isOffsetParentAnElement){const offsetRect=getBoundingClientRect(offsetParent,!0,isFixed,offsetParent);offsets.x=offsetRect.x+offsetParent.clientLeft,offsets.y=offsetRect.y+offsetParent.clientTop}else documentElement&&setLeftRTLScrollbarOffset();isFixed&&!isOffsetParentAnElement&&documentElement&&setLeftRTLScrollbarOffset();const htmlOffset=documentElement&&!isOffsetParentAnElement&& -!isFixed?getHTMLOffset(documentElement,scroll):createCoords(0),x=rect.left+scroll.scrollLeft-offsets.x-htmlOffset.x,y=rect.top+scroll.scrollTop-offsets.y-htmlOffset.y;return{x,y,width:rect.width,height:rect.height}}function isStaticPositioned(element2){return getComputedStyle$1(element2).position==="static"}function getTrueOffsetParent(element2,polyfill){if(!isHTMLElement(element2)||getComputedStyle$1(element2).position==="fixed")return null;if(polyfill)return polyfill(element2);let rawOffsetParent=element2. -offsetParent;return getDocumentElement(element2)===rawOffsetParent&&(rawOffsetParent=rawOffsetParent.ownerDocument.body),rawOffsetParent}function getOffsetParent(element2,polyfill){const win=getWindow(element2);if(isTopLayer(element2))return win;if(!isHTMLElement(element2)){let svgOffsetParent=getParentNode(element2);for(;svgOffsetParent&&!isLastTraversableNode(svgOffsetParent);){if(isElement(svgOffsetParent)&&!isStaticPositioned(svgOffsetParent))return svgOffsetParent;svgOffsetParent=getParentNode( -svgOffsetParent)}return win}let offsetParent=getTrueOffsetParent(element2,polyfill);for(;offsetParent&&isTableElement(offsetParent)&&isStaticPositioned(offsetParent);)offsetParent=getTrueOffsetParent(offsetParent,polyfill);return offsetParent&&isLastTraversableNode(offsetParent)&&isStaticPositioned(offsetParent)&&!isContainingBlock(offsetParent)?win:offsetParent||getContainingBlock(element2)||win}const getElementRects=async function(data){const getOffsetParentFn=this.getOffsetParent||getOffsetParent, -getDimensionsFn=this.getDimensions,floatingDimensions=await getDimensionsFn(data.floating);return{reference:getRectRelativeToOffsetParent(data.reference,await getOffsetParentFn(data.floating),data.strategy),floating:{x:0,y:0,width:floatingDimensions.width,height:floatingDimensions.height}}};function isRTL(element2){return getComputedStyle$1(element2).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects, -getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(a,b){return a.x===b.x&&a.y===b.y&&a.width===b.width&&a.height===b.height}function observeMove(element2,onMove){let io=null,timeoutId;const root2=getDocumentElement(element2);function cleanup(){var _io;clearTimeout(timeoutId),(_io=io)==null||_io.disconnect(),io=null}function refresh(skip,threshold){skip===void 0&&(skip=!1),threshold===void 0&&(threshold=1),cleanup();const elementRectForRootMargin=element2.getBoundingClientRect(), -{left,top,width,height}=elementRectForRootMargin;if(skip||onMove(),!width||!height)return;const insetTop=floor(top),insetRight=floor(root2.clientWidth-(left+width)),insetBottom=floor(root2.clientHeight-(top+height)),insetLeft=floor(left),options={rootMargin:-insetTop+"px "+-insetRight+"px "+-insetBottom+"px "+-insetLeft+"px",threshold:max(0,min(1,threshold))||1};let isFirstUpdate=!0;function handleObserve(entries){const ratio=entries[0].intersectionRatio;if(ratio!==threshold){if(!isFirstUpdate)return refresh(); -ratio?refresh(!1,ratio):timeoutId=setTimeout(()=>{refresh(!1,1e-7)},1e3)}ratio===1&&!rectsAreEqual(elementRectForRootMargin,element2.getBoundingClientRect())&&refresh(),isFirstUpdate=!1}try{io=new IntersectionObserver(handleObserve,{...options,root:root2.ownerDocument})}catch{io=new IntersectionObserver(handleObserve,options)}io.observe(element2)}return refresh(!0),cleanup}function autoUpdate(reference,floating,update2,options){options===void 0&&(options={});const{ancestorScroll=!0,ancestorResize=!0, -elementResize=typeof ResizeObserver=="function",layoutShift=typeof IntersectionObserver=="function",animationFrame=!1}=options,referenceEl=unwrapElement(reference),ancestors=ancestorScroll||ancestorResize?[...referenceEl?getOverflowAncestors(referenceEl):[],...getOverflowAncestors(floating)]:[];ancestors.forEach(ancestor=>{ancestorScroll&&ancestor.addEventListener("scroll",update2,{passive:!0}),ancestorResize&&ancestor.addEventListener("resize",update2)});const cleanupIo=referenceEl&&layoutShift? -observeMove(referenceEl,update2):null;let reobserveFrame=-1,resizeObserver=null;elementResize&&(resizeObserver=new ResizeObserver(_ref=>{let[firstEntry]=_ref;firstEntry&&firstEntry.target===referenceEl&&resizeObserver&&(resizeObserver.unobserve(floating),cancelAnimationFrame(reobserveFrame),reobserveFrame=requestAnimationFrame(()=>{var _resizeObserver;(_resizeObserver=resizeObserver)==null||_resizeObserver.observe(floating)})),update2()}),referenceEl&&!animationFrame&&resizeObserver.observe(referenceEl), -resizeObserver.observe(floating));let frameId,prevRefRect=animationFrame?getBoundingClientRect(reference):null;animationFrame&&frameLoop();function frameLoop(){const nextRefRect=getBoundingClientRect(reference);prevRefRect&&!rectsAreEqual(prevRefRect,nextRefRect)&&update2(),prevRefRect=nextRefRect,frameId=requestAnimationFrame(frameLoop)}return update2(),()=>{var _resizeObserver2;ancestors.forEach(ancestor=>{ancestorScroll&&ancestor.removeEventListener("scroll",update2),ancestorResize&&ancestor. -removeEventListener("resize",update2)}),cleanupIo?.(),(_resizeObserver2=resizeObserver)==null||_resizeObserver2.disconnect(),resizeObserver=null,animationFrame&&cancelAnimationFrame(frameId)}}const offset=offset$1,shift=shift$1,flip=flip$1,size=size$1,hide=hide$1,arrow=arrow$1,limitShift=limitShift$1,computePosition=(reference,floating,options)=>{const cache2=new Map,mergedOptions={platform,...options},platformWithCache={...mergedOptions.platform,_c:cache2};return computePosition$1(reference,floating, -{...mergedOptions,platform:platformWithCache})};function get(valueOrGetValue){return typeof valueOrGetValue=="function"?valueOrGetValue():valueOrGetValue}function getDPR(element2){return typeof window>"u"?1:(element2.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(element2,value){const dpr=getDPR(element2);return Math.round(value*dpr)/dpr}function getFloatingContentCSSVars(name){return{[`--bits-${name}-content-transform-origin`]:"var(--bits-floating-transform-origin)", -[`--bits-${name}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${name}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${name}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${name}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function useFloating(options){const whileElementsMountedOption=options.whileElementsMounted,openOption=user_derived(()=>get(options.open)??!0),middlewareOption=user_derived(()=>get(options.middleware)), -transformOption=user_derived(()=>get(options.transform)??!0),placementOption=user_derived(()=>get(options.placement)??"bottom"),strategyOption=user_derived(()=>get(options.strategy)??"absolute"),sideOffsetOption=user_derived(()=>get(options.sideOffset)??0),alignOffsetOption=user_derived(()=>get(options.alignOffset)??0),reference=options.reference;let x=state$1(0),y=state$1(0);const floating=simpleBox(null);let strategy=state$1(proxy(get$3(strategyOption))),placement=state$1(proxy(get$3(placementOption))), -middlewareData=state$1(proxy({})),isPositioned=state$1(!1),hasWhileMountedPosition=!1,updateRequestId=0;const floatingStyles=user_derived(()=>{const xVal=floating.current?roundByDPR(floating.current,get$3(x)):get$3(x),yVal=floating.current?roundByDPR(floating.current,get$3(y)):get$3(y);return get$3(transformOption)?{position:get$3(strategy),left:"0",top:"0",transform:`translate(${xVal}px, ${yVal}px)`,...floating.current&&getDPR(floating.current)>=1.5&&{willChange:"transform"}}:{position:get$3(strategy), -left:`${xVal}px`,top:`${yVal}px`}});let whileElementsMountedCleanup;function update2(){if(reference.current===null||floating.current===null)return;const referenceNode=reference.current,floatingNode=floating.current,requestId=++updateRequestId;computePosition(referenceNode,floatingNode,{middleware:get$3(middlewareOption),placement:get$3(placementOption),strategy:get$3(strategyOption)}).then(position2=>{if(requestId!==updateRequestId||reference.current!==referenceNode||floating.current!==floatingNode) -return;if(isReferenceHidden(referenceNode)){set$1(middlewareData,{...get$3(middlewareData),hide:{...get$3(middlewareData).hide,referenceHidden:!0}},!0);return}if(!get$3(openOption)&&get$3(x)!==0&&get$3(y)!==0){const maxExpectedOffset=Math.max(Math.abs(get$3(sideOffsetOption)),Math.abs(get$3(alignOffsetOption)),15);if(position2.x<=maxExpectedOffset&&position2.y<=maxExpectedOffset)return}set$1(x,position2.x,!0),set$1(y,position2.y,!0),set$1(strategy,position2.strategy,!0),set$1(placement,position2. -placement,!0),set$1(middlewareData,position2.middlewareData,!0),set$1(isPositioned,!0)})}function cleanup(){typeof whileElementsMountedCleanup=="function"&&(whileElementsMountedCleanup(),whileElementsMountedCleanup=void 0),updateRequestId++}function attach2(){if(cleanup(),whileElementsMountedOption===void 0){update2();return}get$3(openOption)&&(reference.current===null||floating.current===null||(whileElementsMountedCleanup=whileElementsMountedOption(reference.current,floating.current,update2)))} -function reset2(){!get$3(openOption)&&floating.current===null&&set$1(isPositioned,!1)}function trackWhileMountedDeps(){return[get$3(middlewareOption),get$3(placementOption),get$3(strategyOption),get$3(sideOffsetOption),get$3(alignOffsetOption),get$3(openOption)]}return user_effect(()=>{whileElementsMountedOption===void 0&&get$3(openOption)&&update2()}),user_effect(attach2),user_effect(()=>{if(whileElementsMountedOption!==void 0){if(trackWhileMountedDeps(),!get$3(openOption)){hasWhileMountedPosition= -!1;return}if(!get$3(isPositioned)){hasWhileMountedPosition=!1;return}if(!hasWhileMountedPosition){hasWhileMountedPosition=!0;return}update2()}}),user_effect(reset2),user_effect(()=>cleanup),{floating,reference,get strategy(){return get$3(strategy)},get placement(){return get$3(placement)},get middlewareData(){return get$3(middlewareData)},get isPositioned(){return get$3(isPositioned)},get floatingStyles(){return get$3(floatingStyles)},get update(){return update2}}}function isReferenceHidden(node2){ -return node2 instanceof Element?!node2.isConnected||node2 instanceof HTMLElement&&node2.hidden?!0:node2.getClientRects().length===0:!1}const OPPOSITE_SIDE={top:"bottom",right:"left",bottom:"top",left:"right"},FloatingRootContext=new Context$1("Floating.Root"),FloatingContentContext=new Context$1("Floating.Content"),FloatingTooltipRootContext=new Context$1("Floating.Root");class FloatingRootState{static create(tooltip=!1){return tooltip?FloatingTooltipRootContext.set(new FloatingRootState):FloatingRootContext. -set(new FloatingRootState)}anchorNode=simpleBox(null);customAnchorNode=simpleBox(null);triggerNode=simpleBox(null);constructor(){user_effect(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class FloatingContentState{static create(opts,tooltip=!1){return tooltip?FloatingContentContext. -set(new FloatingContentState(opts,FloatingTooltipRootContext.get())):FloatingContentContext.set(new FloatingContentState(opts,FloatingRootContext.get()))}opts;root;contentRef=simpleBox(null);wrapperRef=simpleBox(null);arrowRef=simpleBox(null);contentAttachment=attachRef(this.contentRef);wrapperAttachment=attachRef(this.wrapperRef);arrowAttachment=attachRef(this.arrowRef);arrowId=simpleBox(useId());#transformedStyle=user_derived(()=>{if(typeof this.opts.style=="string")return cssToStyleObj(this.opts. -style);if(!this.opts.style)return{}});#updatePositionStrategy=void 0;#arrowSize=new ElementSize(()=>this.arrowRef.current??void 0);#arrowWidth=user_derived(()=>this.#arrowSize?.width??0);#arrowHeight=user_derived(()=>this.#arrowSize?.height??0);#desiredPlacement=user_derived(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#boundary=user_derived(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts. -collisionBoundary.current]);#hasExplicitBoundaries=user_derived(()=>get$3(this.#boundary).length>0);get hasExplicitBoundaries(){return get$3(this.#hasExplicitBoundaries)}set hasExplicitBoundaries(value){set$1(this.#hasExplicitBoundaries,value)}#detectOverflowOptions=user_derived(()=>({padding:this.opts.collisionPadding.current,boundary:get$3(this.#boundary).filter(isNotNull),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return get$3(this.#detectOverflowOptions)}set detectOverflowOptions(value){ -set$1(this.#detectOverflowOptions,value)}#availableWidth=state$1(void 0);#availableHeight=state$1(void 0);#anchorWidth=state$1(void 0);#anchorHeight=state$1(void 0);#middleware=user_derived(()=>[offset({mainAxis:this.opts.sideOffset.current+get$3(this.#arrowHeight),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&shift({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?limitShift():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions. -current&&flip({...this.detectOverflowOptions}),size({...this.detectOverflowOptions,apply:({rects,availableWidth,availableHeight})=>{const{width:anchorWidth,height:anchorHeight}=rects.reference;set$1(this.#availableWidth,availableWidth,!0),set$1(this.#availableHeight,availableHeight,!0),set$1(this.#anchorWidth,anchorWidth,!0),set$1(this.#anchorHeight,anchorHeight,!0)}}),this.arrowRef.current&&arrow({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),transformOrigin({arrowWidth:get$3( -this.#arrowWidth),arrowHeight:get$3(this.#arrowHeight)}),this.opts.hideWhenDetached.current&&hide({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return get$3(this.#middleware)}set middleware(value){set$1(this.#middleware,value)}floating;#placedSide=user_derived(()=>getSideFromPlacement(this.floating.placement));get placedSide(){return get$3(this.#placedSide)}set placedSide(value){set$1(this.#placedSide,value)}#placedAlign=user_derived(()=>getAlignFromPlacement( -this.floating.placement));get placedAlign(){return get$3(this.#placedAlign)}set placedAlign(value){set$1(this.#placedAlign,value)}#arrowX=user_derived(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return get$3(this.#arrowX)}set arrowX(value){set$1(this.#arrowX,value)}#arrowY=user_derived(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return get$3(this.#arrowY)}set arrowY(value){set$1(this.#arrowY,value)}#cannotCenterArrow=user_derived(()=>this.floating.middlewareData.arrow?. -centerOffset!==0);get cannotCenterArrow(){return get$3(this.#cannotCenterArrow)}set cannotCenterArrow(value){set$1(this.#cannotCenterArrow,value)}#contentZIndex=state$1();get contentZIndex(){return get$3(this.#contentZIndex)}set contentZIndex(value){set$1(this.#contentZIndex,value,!0)}#arrowBaseSide=user_derived(()=>OPPOSITE_SIDE[this.placedSide]);get arrowBaseSide(){return get$3(this.#arrowBaseSide)}set arrowBaseSide(value){set$1(this.#arrowBaseSide,value)}#wrapperProps=user_derived(()=>({id:this. -opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${get$3(this.#availableWidth)}px`,"--bits-floating-available-height":`${get$3( -this.#availableHeight)}px`,"--bits-floating-anchor-width":`${get$3(this.#anchorWidth)}px`,"--bits-floating-anchor-height":`${get$3(this.#anchorHeight)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...get$3(this.#transformedStyle)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return get$3(this.#wrapperProps)}set wrapperProps(value){set$1(this.#wrapperProps,value)}#props=user_derived(()=>({"data-side":this.placedSide, -"data-align":this.placedAlign,style:styleToString$1({...get$3(this.#transformedStyle)}),...this.contentAttachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}#arrowStyle=user_derived(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%\ -) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return get$3(this.#arrowStyle)}set arrowStyle(value){set$1(this.#arrowStyle,value)}constructor(opts,root2){this.opts=opts,this.root=root2,this.#updatePositionStrategy=opts.updatePositionStrategy,opts.customAnchor&&(this.root.customAnchorNode.current=opts.customAnchor.current),watch$1(()=>opts.customAnchor. -current,customAnchor=>{this.root.customAnchorNode.current=customAnchor}),this.floating=useFloating({strategy:()=>this.opts.strategy.current,placement:()=>get$3(this.#desiredPlacement),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...args)=>autoUpdate(...args,{animationFrame:this.#updatePositionStrategy?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),user_effect( -()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),watch$1(()=>this.contentRef.current,contentNode=>{if(!contentNode||!this.opts.enabled.current)return;const win=getWindow$1(contentNode),rafId=win.requestAnimationFrame(()=>{if(this.contentRef.current!==contentNode||!this.opts.enabled.current)return;const zIndex=win.getComputedStyle(contentNode).zIndex;zIndex!==this.contentZIndex&&(this.contentZIndex=zIndex)});return()=>{win.cancelAnimationFrame(rafId)}}),user_effect(()=>{this.floating. -floating.current=this.wrapperRef.current})}}class FloatingArrowState{static create(opts){return new FloatingArrowState(opts,FloatingContentContext.get())}opts;content;constructor(opts,content2){this.opts=opts,this.content=content2}#props=user_derived(()=>({id:this.opts.id.current,style:this.content.arrowStyle,"data-side":this.content.placedSide,...this.content.arrowAttachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class FloatingAnchorState{static create(opts,tooltip=!1){ -return tooltip?new FloatingAnchorState(opts,FloatingTooltipRootContext.get()):new FloatingAnchorState(opts,FloatingRootContext.get())}opts;root;constructor(opts,root2){this.opts=opts,this.root=root2,opts.virtualEl&&opts.virtualEl.current?root2.triggerNode=boxFrom$1(opts.virtualEl.current):root2.triggerNode=opts.ref}}function transformOrigin(options){return{name:"transformOrigin",options,fn(data){const{placement,rects,middlewareData}=data,isArrowHidden=middlewareData.arrow?.centerOffset!==0,arrowWidth=isArrowHidden? -0:options.arrowWidth,arrowHeight=isArrowHidden?0:options.arrowHeight,[placedSide,placedAlign]=getSideAndAlignFromPlacement(placement),noArrowAlign={start:"0%",center:"50%",end:"100%"}[placedAlign],arrowXCenter=(middlewareData.arrow?.x??0)+arrowWidth/2,arrowYCenter=(middlewareData.arrow?.y??0)+arrowHeight/2;let x="",y="";return placedSide==="bottom"?(x=isArrowHidden?noArrowAlign:`${arrowXCenter}px`,y=`${-arrowHeight}px`):placedSide==="top"?(x=isArrowHidden?noArrowAlign:`${arrowXCenter}px`,y=`${rects. -floating.height+arrowHeight}px`):placedSide==="right"?(x=`${-arrowHeight}px`,y=isArrowHidden?noArrowAlign:`${arrowYCenter}px`):placedSide==="left"&&(x=`${rects.floating.width+arrowHeight}px`,y=isArrowHidden?noArrowAlign:`${arrowYCenter}px`),{data:{x,y}}}}}function getSideAndAlignFromPlacement(placement){const[side,align="center"]=placement.split("-");return[side,align]}function getSideFromPlacement(placement){return getSideAndAlignFromPlacement(placement)[0]}function getAlignFromPlacement(placement){ -return getSideAndAlignFromPlacement(placement)[1]}function Floating_layer($$anchor,$$props){push$1($$props,!0);let tooltip=prop($$props,"tooltip",3,!1);FloatingRootState.create(tooltip());var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}class DataTypeahead{#opts;#candidateValues=user_derived(()=>this.#opts.candidateValues());#search;constructor(opts){this.#opts=opts,this.#search=boxAutoReset("",{afterMs:1e3,getWindow:this.#opts. -getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(key2){if(!this.#opts.enabled()||!get$3(this.#candidateValues).length)return;this.#search.current=this.#search.current+key2;const currentItem=this.#opts.getCurrentItem(),currentMatch=get$3(this.#candidateValues).find(item=>item===currentItem)??"",values=get$3(this.#candidateValues).map(item=>item??""),nextMatch=getNextMatch(values,this.#search.current, -currentMatch),newItem=get$3(this.#candidateValues).find(item=>item===nextMatch);return newItem&&this.#opts.onMatch(newItem),newItem}resetTypeahead(){this.#search.current=""}}const FIRST_KEYS=[ARROW_DOWN,PAGE_UP,HOME],LAST_KEYS=[ARROW_UP,PAGE_DOWN,END],FIRST_LAST_KEYS=[...FIRST_KEYS,...LAST_KEYS],selectAttrs=createBitsAttrs({component:"select",parts:["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","i\ -tem-text","value"]}),SelectRootContext=new Context$1("Select.Root | Combobox.Root"),SelectContentContext=new Context$1("Select.Content | Combobox.Content");class SelectBaseRootState{opts;#touchedInput=state$1(!1);get touchedInput(){return get$3(this.#touchedInput)}set touchedInput(value){set$1(this.#touchedInput,value,!0)}#inputNode=state$1(null);get inputNode(){return get$3(this.#inputNode)}set inputNode(value){set$1(this.#inputNode,value,!0)}#contentNode=state$1(null);get contentNode(){return get$3( -this.#contentNode)}set contentNode(value){set$1(this.#contentNode,value,!0)}contentPresence;#viewportNode=state$1(null);get viewportNode(){return get$3(this.#viewportNode)}set viewportNode(value){set$1(this.#viewportNode,value,!0)}#triggerNode=state$1(null);get triggerNode(){return get$3(this.#triggerNode)}set triggerNode(value){set$1(this.#triggerNode,value,!0)}#valueNode=state$1(null);get valueNode(){return get$3(this.#valueNode)}set valueNode(value){set$1(this.#valueNode,value,!0)}#valueId=state$1( -"");get valueId(){return get$3(this.#valueId)}set valueId(value){set$1(this.#valueId,value,!0)}#highlightedNode=state$1(null);get highlightedNode(){return get$3(this.#highlightedNode)}set highlightedNode(value){set$1(this.#highlightedNode,value,!0)}#highlightedValue=user_derived(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null);get highlightedValue(){return get$3(this.#highlightedValue)}set highlightedValue(value){set$1(this.#highlightedValue,value)}#highlightedId=user_derived( -()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return get$3(this.#highlightedId)}set highlightedId(value){set$1(this.#highlightedId,value)}#highlightedLabel=user_derived(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null);get highlightedLabel(){return get$3(this.#highlightedLabel)}set highlightedLabel(value){set$1(this.#highlightedLabel,value)}#contentIsPositioned=state$1(!1);get contentIsPositioned(){return get$3(this.#contentIsPositioned)}set contentIsPositioned(value){ -set$1(this.#contentIsPositioned,value,!0)}isUsingKeyboard=!1;isCombobox=!1;domContext=new DOMContext(()=>null);constructor(opts){this.opts=opts,this.isCombobox=opts.isCombobox,this.contentPresence=new PresenceManager({ref:boxWith$1(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),user_pre_effect(()=>{this.opts.open.current||this.setHighlightedNode(null)})}setHighlightedNode(node2,initial=!1){this.highlightedNode=node2,node2&& -(this.isUsingKeyboard||initial)&&this.scrollHighlightedNodeIntoView(node2)}scrollHighlightedNodeIntoView(node2){!this.viewportNode||!this.contentIsPositioned||node2.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){const node2=this.contentNode;return node2?Array.from(node2.querySelectorAll(`[${this.getBitsAttr("item")}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(initial=!1){this.setHighlightedNode(null);let nodes2=this.getCandidateNodes();if(nodes2.length){ -if(this.viewportNode){const viewportRect=this.viewportNode.getBoundingClientRect();nodes2=nodes2.filter(node2=>{if(!this.viewportNode)return!1;const nodeRect=node2.getBoundingClientRect();return nodeRect.right<=viewportRect.right&&nodeRect.left>=viewportRect.left&&nodeRect.bottom<=viewportRect.bottom&&nodeRect.top>=viewportRect.top})}this.setHighlightedNode(nodes2[0],initial)}}getNodeByValue(value){return this.getCandidateNodes().find(node2=>node2.dataset.value===value)??null}getLabelForValue(value){ -if(value==="")return"";const fromItems=this.opts.items.current.find(item=>item.value===value)?.label;if(fromItems!==void 0)return fromItems;const node2=this.getNodeByValue(value);if(node2){const dataLabel=node2.getAttribute("data-label");return dataLabel!==null&&dataLabel!==""?dataLabel:node2.textContent?.trim()??value}return value}setOpen(open2){this.opts.open.current=open2}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode( -null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=part=>selectAttrs.getAttr(part,this.isCombobox?"combobox":void 0)}class SelectSingleRootState extends SelectBaseRootState{opts;isMulti=!1;#hasValue=user_derived(()=>this.opts.value.current!=="");get hasValue(){return get$3(this.#hasValue)}set hasValue(value){set$1(this.#hasValue,value)}#currentLabel=user_derived(()=>this.opts.items.current.length?this.opts.items.current.find(item=>item.value===this.opts.value.current)?.label??"":"");get currentLabel(){ -return get$3(this.#currentLabel)}set currentLabel(value){set$1(this.#currentLabel,value)}#candidateLabels=user_derived(()=>this.opts.items.current.length?this.opts.items.current.filter(item=>!item.disabled).map(item=>item.label):[]);get candidateLabels(){return get$3(this.#candidateLabels)}set candidateLabels(value){set$1(this.#candidateLabels,value)}#dataTypeaheadEnabled=user_derived(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return get$3(this.#dataTypeaheadEnabled)}set dataTypeaheadEnabled(value){ -set$1(this.#dataTypeaheadEnabled,value)}constructor(opts){super(opts),this.opts=opts,user_effect(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),watch$1(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(itemValue){return this.opts.value.current===itemValue}toggleItem(itemValue,itemLabel=itemValue){const newValue=this.includesItem(itemValue)?"":itemValue;this.opts.value.current=newValue,newValue!==""&&(this. -opts.inputValue.current=itemLabel)}setInitialHighlightedNode(){afterTick(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==""){const node2=this.getNodeByValue(this.opts.value.current);if(node2){this.setHighlightedNode(node2,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class SelectMultipleRootState extends SelectBaseRootState{opts;isMulti=!0;#hasValue=user_derived(()=>this.opts.value.current.length>0);get hasValue(){ -return get$3(this.#hasValue)}set hasValue(value){set$1(this.#hasValue,value)}constructor(opts){super(opts),this.opts=opts,user_effect(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),watch$1(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(itemValue){return this.opts.value.current.includes(itemValue)}toggleItem(itemValue,itemLabel=itemValue){this.includesItem(itemValue)?this.opts.value.current=this.opts.value. -current.filter(v=>v!==itemValue):this.opts.value.current=[...this.opts.value.current,itemValue],this.opts.inputValue.current=itemLabel}setInitialHighlightedNode(){afterTick(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const node2=this.getNodeByValue(this.opts.value.current[0]);if(node2){this.setHighlightedNode(node2,!0);return}}this.setHighlightedToFirstCandidate( -!0)}})}}class SelectRootState{static create(props){const{type:type2,...rest}=props,rootState=type2==="single"?new SelectSingleRootState(rest):new SelectMultipleRootState(rest);return SelectRootContext.set(rootState)}}class SelectTriggerState{static create(opts){return new SelectTriggerState(opts,SelectRootContext.get())}opts;root;attachment;#domTypeahead;#dataTypeahead;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(opts.ref,v=>this.root.triggerNode=v),this.root. -domContext=new DOMContext(opts.ref),this.#domTypeahead=new DOMTypeahead({getCurrentItem:()=>this.root.highlightedNode,onMatch:node2=>{this.root.setHighlightedNode(node2)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()}),this.#dataTypeahead=new DataTypeahead({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:label=>{if(this.root.isMulti||!this.root.opts.items.current)return;const matchedItem=this.root.opts.items.current. -find(item=>item.label===label);matchedItem&&(this.root.opts.value.current=matchedItem.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()}),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}#handleOpen(){this.root.opts.open.current=!0,this.#dataTypeahead. -resetTypeahead(),this.#domTypeahead.resetTypeahead()}#handlePointerOpen(_){this.#handleOpen()}#handleKeyboardSelection(){const isCurrentSelectedValue=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&isCurrentSelectedValue&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!isCurrentSelectedValue?(this.root. -handleClose(),!0):!1)}onkeydown(e){if(this.root.isUsingKeyboard=!0,(e.key===ARROW_UP||e.key===ARROW_DOWN)&&e.preventDefault(),!this.root.opts.open.current){if(e.key===ENTER||e.key===SPACE||e.key===ARROW_DOWN||e.key===ARROW_UP)e.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){this.#dataTypeahead.handleTypeaheadSearch(e.key);return}if(this.root.hasValue)return;const candidateNodes2=this.root.getCandidateNodes();if(!candidateNodes2.length)return;if(e. -key===ARROW_DOWN){const firstCandidate=candidateNodes2[0];this.root.setHighlightedNode(firstCandidate)}else if(e.key===ARROW_UP){const lastCandidate=candidateNodes2[candidateNodes2.length-1];this.root.setHighlightedNode(lastCandidate)}return}if(e.key===TAB){this.root.handleClose();return}if((e.key===ENTER||e.key===SPACE&&this.#domTypeahead.search==="")&&!e.isComposing&&(e.preventDefault(),this.#handleKeyboardSelection()))return;if(e.key===ARROW_UP&&e.altKey&&this.root.handleClose(),FIRST_LAST_KEYS. -includes(e.key)){e.preventDefault();const candidateNodes2=this.root.getCandidateNodes(),currHighlightedNode=this.root.highlightedNode,currIndex=currHighlightedNode?candidateNodes2.indexOf(currHighlightedNode):-1,loop2=this.root.opts.loop.current;let nextItem;if(e.key===ARROW_DOWN?nextItem=next(candidateNodes2,currIndex,loop2):e.key===ARROW_UP?nextItem=prev(candidateNodes2,currIndex,loop2):e.key===PAGE_DOWN?nextItem=forward(candidateNodes2,currIndex,10,loop2):e.key===PAGE_UP?nextItem=backward(candidateNodes2, -currIndex,10,loop2):e.key===HOME?nextItem=candidateNodes2[0]:e.key===END&&(nextItem=candidateNodes2[candidateNodes2.length-1]),!nextItem)return;this.root.setHighlightedNode(nextItem);return}const isModifierKey=e.ctrlKey||e.altKey||e.metaKey,isCharacterKey=e.key.length===1,isSpaceKey=e.key===SPACE,candidateNodes=this.root.getCandidateNodes();if(e.key!==TAB){if(!isModifierKey&&(isCharacterKey||isSpaceKey)){!this.#domTypeahead.handleTypeaheadSearch(e.key,candidateNodes)&&isSpaceKey&&(e.preventDefault(), -this.#handleKeyboardSelection());return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(e){e.currentTarget.focus()}onpointerdown(e){if(this.root.opts.disabled.current)return;if(e.pointerType==="touch")return e.preventDefault();const target2=e.target;target2?.hasPointerCapture(e.pointerId)&&target2?.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&(this.root.opts.open.current===!1?this.#handlePointerOpen(e):this.root.handleClose())}onpointerup(e){this. -root.opts.disabled.current||(e.preventDefault(),e.pointerType==="touch"&&(this.root.opts.open.current===!1?this.#handlePointerOpen(e):this.root.handleClose()))}#props=user_derived(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":boolToStr(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":getDataOpenClosed(this.root.opts.open.current),"data-disabled":boolToEmptyStrOrUndef(this.root.opts. -disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.getBitsAttr("trigger")]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class SelectContentState{static create(opts){return SelectContentContext.set(new SelectContentState(opts,SelectRootContext.get()))}opts;root;attachment;#isPositioned=state$1(!1);get isPositioned(){ -return get$3(this.#isPositioned)}set isPositioned(value){set$1(this.#isPositioned,value,!0)}domContext;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(opts.ref,v=>this.root.contentNode=v),this.domContext=new DOMContext(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),onDestroyEffect(()=>{this.root.contentNode=null,this.root.contentIsPositioned=!1,this.isPositioned=!1}),watch$1(()=>this.root.opts.open.current,()=>{this.root.opts.open. -current||(this.root.contentIsPositioned=!1,this.isPositioned=!1)}),watch$1([()=>this.isPositioned,()=>this.root.highlightedNode],()=>{!this.isPositioned||!this.root.highlightedNode||this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode)}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(_){this.root.isUsingKeyboard=!1}#styles=user_derived(()=>getFloatingContentCSSVars(this.root.isCombobox?"combobox":"select"));onInteractOutside=e=>{if(e.target===this.root.triggerNode||e. -target===this.root.inputNode){e.preventDefault();return}this.opts.onInteractOutside.current(e),!e.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=e=>{e.preventDefault()};onCloseAutoFocus=e=>{e.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#snippetProps=user_derived(()=>({open:this.root.opts.open.current}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){ -set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":getDataOpenClosed(this.root.opts.open.current),...getDataTransitionAttrs(this.root.contentPresence.transitionStatus),[this.root.getBitsAttr("content")]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...get$3(this.#styles)},onpointermove:this.onpointermove,...this.attachment}));get props(){ -return get$3(this.#props)}set props(value){set$1(this.#props,value)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.root.contentIsPositioned=!0,this.isPositioned=!0)}}}class SelectItemState{static create(opts){return new SelectItemState(opts,SelectRootContext.get())}opts;root;attachment;#isSelected=user_derived( -()=>this.root.includesItem(this.opts.value.current));get isSelected(){return get$3(this.#isSelected)}set isSelected(value){set$1(this.#isSelected,value)}#isHighlighted=user_derived(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return get$3(this.#isHighlighted)}set isHighlighted(value){set$1(this.#isHighlighted,value)}prevHighlighted=new Previous(()=>this.isHighlighted);#mounted=state$1(!1);get mounted(){return get$3(this.#mounted)}set mounted(value){set$1(this.#mounted, -value,!0)}constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(opts.ref),watch$1([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),watch$1(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove. -bind(this)}handleSelect(){if(this.opts.disabled.current)return;const isCurrentSelectedValue=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&isCurrentSelectedValue&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!isCurrentSelectedValue&&this.root.handleClose()}#snippetProps=user_derived(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){ -return get$3(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}onpointerdown(e){e.preventDefault()}onpointerup(e){if(!(e.defaultPrevented||!this.opts.ref.current)){if(e.pointerType==="touch"&&!isIOS){on(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}e.preventDefault(),this.handleSelect(),e.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(e){e.pointerType!== -"touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#props=user_derived(()=>({id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":boolToEmptyStrOrUndef(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem( -this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class SelectHiddenInputState{static create(opts){return new SelectHiddenInputState(opts,SelectRootContext.get())}opts;root;#shouldRender=user_derived(()=>this.root.opts.name.current!=="");get shouldRender(){ -return get$3(this.#shouldRender)}set shouldRender(value){set$1(this.#shouldRender,value)}constructor(opts,root2){this.opts=opts,this.root=root2,this.onfocus=this.onfocus.bind(this)}onfocus(e){e.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#props=user_derived(()=>({disabled:boolToTrueOrUndef(this.root.opts.disabled.current),required:boolToTrueOrUndef(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current, -onfocus:this.onfocus}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class SelectViewportState{static create(opts){return new SelectViewportState(opts,SelectContentContext.get())}opts;content;root;attachment;#prevScrollTop=state$1(0);get prevScrollTop(){return get$3(this.#prevScrollTop)}set prevScrollTop(value){set$1(this.#prevScrollTop,value,!0)}constructor(opts,content2){this.opts=opts,this.content=content2,this.root=content2.root,this.attachment=attachRef(opts. -ref,v=>{this.root.viewportNode=v})}#props=user_derived(()=>({id:this.opts.id.current,role:"presentation",[this.root.getBitsAttr("viewport")]:"",style:{position:"relative",flex:1,overflow:"auto"},...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class SelectScrollButtonImplState{opts;content;root;attachment;autoScrollTimer=null;userScrollTimer=-1;isUserScrolling=!1;onAutoScroll=noop$1;#mounted=state$1(!1);get mounted(){return get$3(this.#mounted)}set mounted(value){ -set$1(this.#mounted,value,!0)}constructor(opts,content2){this.opts=opts,this.content=content2,this.root=content2.root,this.attachment=attachRef(opts.ref),watch$1([()=>this.mounted],()=>{if(!this.mounted){this.isUserScrolling=!1;return}this.isUserScrolling}),user_effect(()=>{this.mounted||this.clearAutoScrollInterval()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}handleUserScroll(){this.content. -domContext.clearTimeout(this.userScrollTimer),this.isUserScrolling=!0,this.userScrollTimer=this.content.domContext.setTimeout(()=>{this.isUserScrolling=!1},200)}clearAutoScrollInterval(){this.autoScrollTimer!==null&&(this.content.domContext.clearTimeout(this.autoScrollTimer),this.autoScrollTimer=null)}onpointerdown(_){if(this.autoScrollTimer!==null)return;const autoScroll=tick2=>{this.onAutoScroll(),this.autoScrollTimer=this.content.domContext.setTimeout(()=>autoScroll(tick2+1),this.opts.delay.current( -tick2))};this.autoScrollTimer=this.content.domContext.setTimeout(()=>autoScroll(1),this.opts.delay.current(0))}onpointermove(e){this.onpointerdown(e)}onpointerleave(_){this.clearAutoScrollInterval()}#props=user_derived(()=>({id:this.opts.id.current,"aria-hidden":boolToStrTrueOrUndef(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props, -value)}}class SelectScrollDownButtonState{static create(opts){return new SelectScrollDownButtonState(new SelectScrollButtonImplState(opts,SelectContentContext.get()))}scrollButtonState;content;root;#canScrollDown=state$1(!1);get canScrollDown(){return get$3(this.#canScrollDown)}set canScrollDown(value){set$1(this.#canScrollDown,value,!0)}scrollIntoViewTimer=null;constructor(scrollButtonState){this.scrollButtonState=scrollButtonState,this.content=scrollButtonState.content,this.root=scrollButtonState. -root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,watch$1([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),on(this.root.viewportNode,"scroll",()=>this.handleScroll())}),watch$1([()=>this.root.opts.inputValue.current,()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{!this.root.viewportNode||!this.content.isPositioned||this.handleScroll(!0)}),watch$1(()=>this.scrollButtonState. -mounted,()=>{this.scrollButtonState.mounted&&(this.scrollIntoViewTimer&&clearTimeout(this.scrollIntoViewTimer),this.scrollIntoViewTimer=afterSleep(5,()=>{const activeItem=this.root.highlightedNode;activeItem&&this.root.scrollHighlightedNodeIntoView(activeItem)}))})}handleScroll=(manual=!1)=>{if(manual||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;const maxScroll=this.root.viewportNode.scrollHeight-this.root.viewportNode.clientHeight,paddingTop=Number.parseInt(getComputedStyle( -this.root.viewportNode).paddingTop,10);this.canScrollDown=Math.ceil(this.root.viewportNode.scrollTop){const viewport=this.root.viewportNode,selectedItem=this.root.highlightedNode;!viewport||!selectedItem||(viewport.scrollTop=viewport.scrollTop+selectedItem.offsetHeight)};#props=user_derived(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr("scroll-down-button")]:""}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}} -class SelectScrollUpButtonState{static create(opts){return new SelectScrollUpButtonState(new SelectScrollButtonImplState(opts,SelectContentContext.get()))}scrollButtonState;content;root;#canScrollUp=state$1(!1);get canScrollUp(){return get$3(this.#canScrollUp)}set canScrollUp(value){set$1(this.#canScrollUp,value,!0)}constructor(scrollButtonState){this.scrollButtonState=scrollButtonState,this.content=scrollButtonState.content,this.root=scrollButtonState.root,this.scrollButtonState.onAutoScroll=this. -handleAutoScroll,watch$1([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),on(this.root.viewportNode,"scroll",()=>this.handleScroll())})}handleScroll=(manual=!1)=>{if(manual||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;const paddingTop=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollUp=this.root.viewportNode.scrollTop-paddingTop>.1};handleAutoScroll=()=>{ -!this.root.viewportNode||!this.root.highlightedNode||(this.root.viewportNode.scrollTop=this.root.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)};#props=user_derived(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr("scroll-up-button")]:""}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}function Select_hidden_input($$anchor,$$props){push$1($$props,!0);let value=prop($$props,"value",15);const hiddenInputState=SelectHiddenInputState.create( -{value:boxWith$1(()=>value())});var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Hidden_input($$anchor2,spread_props(()=>hiddenInputState.props,{get autocomplete(){return $$props.autocomplete},get value(){return value()},set value($$value){value($$value)}}))};if_block(node2,$$render=>{hiddenInputState.shouldRender&&$$render(consequent)})}append($$anchor,fragment),pop()}function Floating_layer_anchor($$anchor,$$props){push$1($$props,!0);let tooltip=prop($$props,"to\ -oltip",3,!1);FloatingAnchorState.create({id:boxWith$1(()=>$$props.id),virtualEl:boxWith$1(()=>$$props.virtualEl),ref:$$props.ref},tooltip());var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}var root_4$M=from_svg(''),root_2$1u=from_html("");function Arrow($$anchor,$$props){ -push$1($$props,!0);let id2=prop($$props,"id",19,useId),width=prop($$props,"width",3,10),height=prop($$props,"height",3,5),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","children","child","width","height"]);const mergedProps=user_derived(()=>mergeProps(restProps,{id:id2()}));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})), -append($$anchor2,fragment_1)},alternate_1=$$anchor2=>{var span=root_2$1u();attribute_effect(span,()=>({...get$3(mergedProps)}));var node_2=child(span);{var consequent_1=$$anchor3=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.children??noop$3),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var svg2=root_4$M();template_effect(()=>{set_attribute(svg2,"width",width()),set_attribute(svg2,"height",height())}),append($$anchor3,svg2)};if_block(node_2,$$render=>{ -$$props.children?$$render(consequent_1):$$render(alternate,-1)})}reset(span),append($$anchor2,span)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate_1,-1)})}append($$anchor,fragment),pop()}function Floating_layer_arrow($$anchor,$$props){push$1($$props,!0);let id2=prop($$props,"id",19,useId),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref"]);const arrowState=FloatingArrowState.create({id:boxWith$1(()=>id2()), -ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,arrowState.props));Arrow($$anchor,spread_props(()=>get$3(mergedProps))),pop()}function Floating_layer_content($$anchor,$$props){push$1($$props,!0);let side=prop($$props,"side",3,"bottom"),sideOffset=prop($$props,"sideOffset",3,0),align=prop($$props,"align",3,"center"),alignOffset=prop($$props,"alignOffset",3,0),arrowPadding=prop($$props,"arrowPadding",3,0),avoidCollisions=prop($$props,"avoidCollisions",3,!0), -collisionBoundary=prop($$props,"collisionBoundary",19,()=>[]),collisionPadding=prop($$props,"collisionPadding",3,0),hideWhenDetached=prop($$props,"hideWhenDetached",3,!1),onPlaced=prop($$props,"onPlaced",3,()=>{}),sticky=prop($$props,"sticky",3,"partial"),updatePositionStrategy=prop($$props,"updatePositionStrategy",3,"optimized"),strategy=prop($$props,"strategy",3,"fixed"),dir=prop($$props,"dir",3,"ltr"),style2=prop($$props,"style",19,()=>({})),wrapperId=prop($$props,"wrapperId",19,useId),customAnchor=prop( -$$props,"customAnchor",3,null),tooltip=prop($$props,"tooltip",3,!1);const contentState=FloatingContentState.create({side:boxWith$1(()=>side()),sideOffset:boxWith$1(()=>sideOffset()),align:boxWith$1(()=>align()),alignOffset:boxWith$1(()=>alignOffset()),id:boxWith$1(()=>$$props.id),arrowPadding:boxWith$1(()=>arrowPadding()),avoidCollisions:boxWith$1(()=>avoidCollisions()),collisionBoundary:boxWith$1(()=>collisionBoundary()),collisionPadding:boxWith$1(()=>collisionPadding()),hideWhenDetached:boxWith$1( -()=>hideWhenDetached()),onPlaced:boxWith$1(()=>onPlaced()),sticky:boxWith$1(()=>sticky()),updatePositionStrategy:boxWith$1(()=>updatePositionStrategy()),strategy:boxWith$1(()=>strategy()),dir:boxWith$1(()=>dir()),style:boxWith$1(()=>style2()),enabled:boxWith$1(()=>$$props.enabled),wrapperId:boxWith$1(()=>wrapperId()),customAnchor:boxWith$1(()=>customAnchor())},tooltip()),mergedProps=user_derived(()=>mergeProps(contentState.wrapperProps,{style:{pointerEvents:"auto"}}));var fragment=comment$2(),node2=first_child( -fragment);snippet(node2,()=>$$props.content??noop$3,()=>({props:contentState.props,wrapperProps:get$3(mergedProps)})),append($$anchor,fragment),pop()}function Floating_layer_content_static($$anchor,$$props){push$1($$props,!0),onMount$1(()=>{$$props.onPlaced?.()});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.content??noop$3,()=>({props:{},wrapperProps:{}})),append($$anchor,fragment),pop()}function Popper_content($$anchor,$$props){let isStatic=prop($$props,"isStat\ -ic",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Floating_layer_content_static($$anchor2,{get content(){return $$props.content},get onPlaced(){return $$props.onPlaced}})},alternate=$$anchor2=>{Floating_layer_content($$anchor2,spread_props({get content(){return $$props.content},get onPlaced(){return $$props.onPlaced}},()=>restProps))};if_block(node2,$$render=>{ -isStatic()?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment)}var root_1$1c=from_html(" ",1);function Popper_layer_inner($$anchor,$$props){push$1($$props,!0);let interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"close"),trapFocus=prop($$props,"trapFocus",3,!0),isValidEvent2=prop($$props,"isValidEvent",3,()=>!1),customAnchor=prop($$props,"customAnchor",3,null),isStatic=prop($$props,"isStatic",3,!1),tooltip=prop($$props,"tooltip",3,!1),contentPointerEvents=prop( -$$props,"contentPointerEvents",3,"auto"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAut\ -oFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);const resolvedPreventScroll=user_derived(()=>$$props.preventScroll??!0),effectiveStrategy=user_derived(()=>$$props.strategy??(get$3(resolvedPreventScroll)?"fixed":"absolute"));Popper_content($$anchor,{get isStatic(){return isStatic()},get id(){return $$props.id},get side(){return $$props.side},get sideOffset(){return $$props.sideOffset}, -get align(){return $$props.align},get alignOffset(){return $$props.alignOffset},get arrowPadding(){return $$props.arrowPadding},get avoidCollisions(){return $$props.avoidCollisions},get collisionBoundary(){return $$props.collisionBoundary},get collisionPadding(){return $$props.collisionPadding},get sticky(){return $$props.sticky},get hideWhenDetached(){return $$props.hideWhenDetached},get updatePositionStrategy(){return $$props.updatePositionStrategy},get strategy(){return get$3(effectiveStrategy)}, -get dir(){return $$props.dir},get wrapperId(){return $$props.wrapperId},get style(){return $$props.style},get onPlaced(){return $$props.onPlaced},get customAnchor(){return customAnchor()},get enabled(){return $$props.enabled},get tooltip(){return tooltip()},content:($$anchor2,$$arg0)=>{let floatingProps=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;var fragment_1=root_1$1c(),node2=first_child(fragment_1);{var consequent=$$anchor3=>{Scroll_lock($$anchor3,{get preventScroll(){return get$3( -resolvedPreventScroll)}})},consequent_1=$$anchor3=>{Scroll_lock($$anchor3,{get preventScroll(){return get$3(resolvedPreventScroll)}})};if_block(node2,$$render=>{$$props.forceMount&&$$props.enabled?$$render(consequent):$$props.forceMount||$$render(consequent_1,1)})}var node_1=sibling(node2,2);Focus_scope(node_1,{get onOpenAutoFocus(){return $$props.onOpenAutoFocus},get onCloseAutoFocus(){return $$props.onCloseAutoFocus},get loop(){return $$props.loop},get enabled(){return $$props.enabled},get trapFocus(){ -return trapFocus()},get forceMount(){return $$props.forceMount},get ref(){return $$props.ref},focusScope:($$anchor3,$$arg02)=>{let focusScopeProps=()=>$$arg02?.().props;Escape_layer($$anchor3,{get onEscapeKeydown(){return $$props.onEscapeKeydown},get escapeKeydownBehavior(){return $$props.escapeKeydownBehavior},get enabled(){return $$props.enabled},get ref(){return $$props.ref},children:($$anchor4,$$slotProps)=>{Dismissible_layer($$anchor4,{get id(){return $$props.id},get onInteractOutside(){return $$props. -onInteractOutside},get onFocusOutside(){return $$props.onFocusOutside},get interactOutsideBehavior(){return interactOutsideBehavior()},get isValidEvent(){return isValidEvent2()},get enabled(){return $$props.enabled},get ref(){return $$props.ref},children:($$anchor5,$$arg03)=>{let dismissibleProps=()=>$$arg03?.().props;Text_selection_layer($$anchor5,{get id(){return $$props.id},get preventOverflowTextSelection(){return $$props.preventOverflowTextSelection},get onPointerDown(){return $$props.onPointerDown}, -get onPointerUp(){return $$props.onPointerUp},get enabled(){return $$props.enabled},get ref(){return $$props.ref},children:($$anchor6,$$slotProps2)=>{var fragment_7=comment$2(),node_2=first_child(fragment_7);{let $0=user_derived(()=>({props:mergeProps(restProps,floatingProps(),dismissibleProps(),focusScopeProps(),{style:{pointerEvents:contentPointerEvents()}}),wrapperProps:wrapperProps()}));snippet(node_2,()=>$$props.popper??noop$3,()=>get$3($0))}append($$anchor6,fragment_7)},$$slots:{default:!0}})}, -$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),append($$anchor2,fragment_1)},$$slots:{content:!0}}),pop()}function Popper_layer($$anchor,$$props){let interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"close"),trapFocus=prop($$props,"trapFocus",3,!0),isValidEvent2=prop($$props,"isValidEvent",3,()=>!1),customAnchor=prop($$props,"customAnchor",3,null),isStatic=prop($$props,"isStatic",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","poppe\ -r","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","i\ -sStatic","ref","shouldRender"]);var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Popper_layer_inner($$anchor2,spread_props({get popper(){return $$props.popper},get onEscapeKeydown(){return $$props.onEscapeKeydown},get escapeKeydownBehavior(){return $$props.escapeKeydownBehavior},get preventOverflowTextSelection(){return $$props.preventOverflowTextSelection},get id(){return $$props.id},get onPointerDown(){return $$props.onPointerDown},get onPointerUp(){return $$props. -onPointerUp},get side(){return $$props.side},get sideOffset(){return $$props.sideOffset},get align(){return $$props.align},get alignOffset(){return $$props.alignOffset},get arrowPadding(){return $$props.arrowPadding},get avoidCollisions(){return $$props.avoidCollisions},get collisionBoundary(){return $$props.collisionBoundary},get collisionPadding(){return $$props.collisionPadding},get sticky(){return $$props.sticky},get hideWhenDetached(){return $$props.hideWhenDetached},get updatePositionStrategy(){ -return $$props.updatePositionStrategy},get strategy(){return $$props.strategy},get dir(){return $$props.dir},get preventScroll(){return $$props.preventScroll},get wrapperId(){return $$props.wrapperId},get style(){return $$props.style},get onPlaced(){return $$props.onPlaced},get customAnchor(){return customAnchor()},get isStatic(){return isStatic()},get enabled(){return $$props.open},get onInteractOutside(){return $$props.onInteractOutside},get onCloseAutoFocus(){return $$props.onCloseAutoFocus}, -get onOpenAutoFocus(){return $$props.onOpenAutoFocus},get interactOutsideBehavior(){return interactOutsideBehavior()},get loop(){return $$props.loop},get trapFocus(){return trapFocus()},get isValidEvent(){return isValidEvent2()},get onFocusOutside(){return $$props.onFocusOutside},forceMount:!1,get ref(){return $$props.ref}},()=>restProps))};if_block(node2,$$render=>{$$props.shouldRender&&$$render(consequent)})}append($$anchor,fragment)}function Popper_layer_force_mount($$anchor,$$props){let interactOutsideBehavior=prop( -$$props,"interactOutsideBehavior",3,"close"),trapFocus=prop($$props,"trapFocus",3,!0),isValidEvent2=prop($$props,"isValidEvent",3,()=>!1),customAnchor=prop($$props,"customAnchor",3,null),isStatic=prop($$props,"isStatic",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary", -"collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);Popper_layer_inner($$anchor,spread_props({get popper(){return $$props.popper},get onEscapeKeydown(){return $$props.onEscapeKeydown},get escapeKeydownBehavior(){return $$props.escapeKeydownBehavior}, -get preventOverflowTextSelection(){return $$props.preventOverflowTextSelection},get id(){return $$props.id},get onPointerDown(){return $$props.onPointerDown},get onPointerUp(){return $$props.onPointerUp},get side(){return $$props.side},get sideOffset(){return $$props.sideOffset},get align(){return $$props.align},get alignOffset(){return $$props.alignOffset},get arrowPadding(){return $$props.arrowPadding},get avoidCollisions(){return $$props.avoidCollisions},get collisionBoundary(){return $$props. -collisionBoundary},get collisionPadding(){return $$props.collisionPadding},get sticky(){return $$props.sticky},get hideWhenDetached(){return $$props.hideWhenDetached},get updatePositionStrategy(){return $$props.updatePositionStrategy},get strategy(){return $$props.strategy},get dir(){return $$props.dir},get preventScroll(){return $$props.preventScroll},get wrapperId(){return $$props.wrapperId},get style(){return $$props.style},get onPlaced(){return $$props.onPlaced},get customAnchor(){return customAnchor()}, -get isStatic(){return isStatic()},get enabled(){return $$props.enabled},get onInteractOutside(){return $$props.onInteractOutside},get onCloseAutoFocus(){return $$props.onCloseAutoFocus},get onOpenAutoFocus(){return $$props.onOpenAutoFocus},get interactOutsideBehavior(){return interactOutsideBehavior()},get loop(){return $$props.loop},get trapFocus(){return trapFocus()},get isValidEvent(){return isValidEvent2()},get onFocusOutside(){return $$props.onFocusOutside}},()=>restProps,{forceMount:!0}))} -var root_4$L=from_html("
"),root_8$z=from_html("
");function Select_content$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),forceMount=prop($$props,"forceMount",3,!1),side=prop($$props,"side",3,"bottom"),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),preventScroll=prop($$props,"prevent\ -Scroll",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]);const contentState=SelectContentState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),onInteractOutside:boxWith$1(()=>onInteractOutside()),onEscapeKeydown:boxWith$1(()=>onEscapeKeydown())}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props));var fragment=comment$2(),node2=first_child( -fragment);{var consequent_1=$$anchor2=>{Popper_layer_force_mount($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get side(){return side()},get enabled(){return contentState.root.opts.open.current},get id(){return id2()},get preventScroll(){return preventScroll()},forceMount:!0,get shouldRender(){return contentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived( -()=>mergeProps(props(),{style:contentState.props.style},{style:$$props.style}));var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent=$$anchor4=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$L();attribute_effect(div,()=>({...wrapperProps()})); -var div_1=child(div);attribute_effect(div_1,()=>({...get$3(finalProps)}));var node_3=child(div_1);snippet(node_3,()=>$$props.children??noop$3),reset(div_1),reset(div),append($$anchor4,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor3,fragment_2)},$$slots:{popper:!0}}))},consequent_3=$$anchor2=>{Popper_layer($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get side(){return side()}, -get open(){return contentState.root.opts.open.current},get id(){return id2()},get preventScroll(){return preventScroll()},forceMount:!1,get shouldRender(){return contentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:contentState.props.style},{style:$$props.style}));var fragment_5=comment$2(),node_4=first_child(fragment_5);{var consequent_2=$$anchor4=>{var fragment_6=comment$2(), -node_5=first_child(fragment_6);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_5,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_6)},alternate_1=$$anchor4=>{var div_2=root_8$z();attribute_effect(div_2,()=>({...wrapperProps()}));var div_3=child(div_2);attribute_effect(div_3,()=>({...get$3(finalProps)}));var node_6=child(div_3);snippet(node_6,()=>$$props.children??noop$3),reset(div_3),reset(div_2),append($$anchor4, -div_2)};if_block(node_4,$$render=>{$$props.child?$$render(consequent_2):$$render(alternate_1,-1)})}append($$anchor3,fragment_5)},$$slots:{popper:!0}}))};if_block(node2,$$render=>{forceMount()?$$render(consequent_1):forceMount()||$$render(consequent_3,1)})}append($$anchor,fragment),pop()}function Mounted($$anchor,$$props){push$1($$props,!0);let mounted=prop($$props,"mounted",15,!1),onMountedChange=prop($$props,"onMountedChange",3,noop$1);onMountEffect(()=>(mounted(!0),onMountedChange()(!0),()=>{mounted( -!1),onMountedChange()(!1)})),pop()}var root_2$1t=from_html("
"),root$1Z=from_html(" ",1);function Select_item$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),label=prop($$props,"label",19,()=>$$props.value),disabled=prop($$props,"disabled",3,!1),onHighlight=prop($$props,"onHighlight",3,noop$1),onUnhighlight=prop($$props,"onUnhighlight",3,noop$1),restProps=rest_props($$props,["$$slots", -"$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]);const itemState=SelectItemState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),value:boxWith$1(()=>$$props.value),disabled:boxWith$1(()=>disabled()),label:boxWith$1(()=>label()),onHighlight:boxWith$1(()=>onHighlight()),onUnhighlight:boxWith$1(()=>onUnhighlight())}),mergedProps=user_derived(()=>mergeProps(restProps,itemState.props));var fragment=root$1Z(),node2=first_child( -fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>({props:get$3(mergedProps),...itemState.snippetProps}));snippet(node_1,()=>$$props.child,()=>get$3($0))}append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1t();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3,()=>itemState.snippetProps),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{ -$$props.child?$$render(consequent):$$render(alternate,-1)})}var node_3=sibling(node2,2);Mounted(node_3,{get mounted(){return itemState.mounted},set mounted($$value){itemState.mounted=$$value}}),append($$anchor,fragment),pop()}var root_2$1s=from_html("
");function Select_viewport($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id", -"ref","children","child"]);const viewportState=SelectViewportState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,viewportState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1s();attribute_effect( -div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_3$14=from_html("
"),root_1$1b=from_html(" ",1);function Select_scroll_down_button$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15, -null),delay=prop($$props,"delay",3,()=>50),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const scrollButtonState=SelectScrollDownButtonState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),delay:boxWith$1(()=>delay())}),mergedProps=user_derived(()=>mergeProps(restProps,scrollButtonState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{var fragment_1=root_1$1b(),node_1=first_child( -fragment_1);Mounted(node_1,{get mounted(){return scrollButtonState.scrollButtonState.mounted},set mounted($$value){scrollButtonState.scrollButtonState.mounted=$$value}});var node_2=sibling(node_1,2);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.child,()=>({props:restProps})),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var div=root_3$14();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_4=child(div);snippet(node_4, -()=>$$props.children??noop$3),reset(div),append($$anchor3,div)};if_block(node_2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment_1)};if_block(node2,$$render=>{scrollButtonState.canScrollDown&&$$render(consequent_1)})}append($$anchor,fragment),pop()}var root_3$13=from_html("
"),root_1$1a=from_html(" ",1);function Select_scroll_up_button$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId( -uid2)),ref2=prop($$props,"ref",15,null),delay=prop($$props,"delay",3,()=>50),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const scrollButtonState=SelectScrollUpButtonState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),delay:boxWith$1(()=>delay())}),mergedProps=user_derived(()=>mergeProps(restProps,scrollButtonState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{var fragment_1=root_1$1a(), -node_1=first_child(fragment_1);Mounted(node_1,{get mounted(){return scrollButtonState.scrollButtonState.mounted},set mounted($$value){scrollButtonState.scrollButtonState.mounted=$$value}});var node_2=sibling(node_1,2);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.child,()=>({props:restProps})),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var div=root_3$13();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_4=child( -div);snippet(node_4,()=>$$props.children??noop$3),reset(div),append($$anchor3,div)};if_block(node_2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment_1)};if_block(node2,$$render=>{scrollButtonState.canScrollUp&&$$render(consequent_1)})}append($$anchor,fragment),pop()}function Menu_sub($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenC\ -hangeComplete",3,noop$1);MenuSubmenuState.create({open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()?.(v)}),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())}),Floating_layer($$anchor,{children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}var root_2$1r=from_html("
");function Menu_item($$anchor,$$props){const uid2=props_id();push$1( -$$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid2)),disabled=prop($$props,"disabled",3,!1),onSelect=prop($$props,"onSelect",3,noop$1),closeOnSelect=prop($$props,"closeOnSelect",3,!0),restProps=rest_props($$props,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]);const itemState=MenuItemState.create({id:boxWith$1(()=>id2()),disabled:boxWith$1(()=>disabled()),onSelect:boxWith$1(()=>onSelect()),ref:boxWith$1( -()=>ref2(),v=>ref2(v)),closeOnSelect:boxWith$1(()=>closeOnSelect())}),mergedProps=user_derived(()=>mergeProps(restProps,itemState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1r();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2, -()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_2$1q=from_html("
");function Menu_separator($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid2)),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","id","child","children"]);const separatorState=MenuSeparatorState. -create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,separatorState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1q();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet( -node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_4$K=from_html("
"),root_8$y=from_html("
");function Menu_sub_content($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),loop2=prop($$props,"loop",3,!0),onInteractOutside=prop( -$$props,"onInteractOutside",3,noop$1),forceMount=prop($$props,"forceMount",3,!1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"defer-otherwise-close"),escapeKeydownBehavior=prop($$props,"escapeKeydownBehavior",3,"defer-otherwise-close"),onOpenAutoFocusProp=prop($$props,"onOpenAutoFocus",3,noop$1),onCloseAutoFocusProp=prop($$props,"onCloseAutoFocus",3,noop$1),onFocusOutside=prop($$props,"onFocusOutside",3,noop$1),side=prop( -$$props,"side",3,"right"),trapFocus=prop($$props,"trapFocus",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","children","child","loop","onInteractOutside","forceMount","onEscapeKeydown","interactOutsideBehavior","escapeKeydownBehavior","onOpenAutoFocus","onCloseAutoFocus","onFocusOutside","side","trapFocus","style"]);const subContentState=MenuContentState.create({id:boxWith$1(()=>id2()),loop:boxWith$1(()=>loop2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),isSub:!0,onCloseAutoFocus:boxWith$1( -()=>handleCloseAutoFocus)});function onkeydown(e){const isKeyDownInside=e.currentTarget.contains(e.target),isCloseKey=SUB_CLOSE_KEYS[subContentState.parentMenu.root.opts.dir.current].includes(e.key);isKeyDownInside&&isCloseKey&&(subContentState.parentMenu.onClose(),subContentState.parentMenu.triggerNode?.focus(),e.preventDefault())}const dataAttr=user_derived(()=>subContentState.parentMenu.root.getBitsAttr("sub-content")),mergedProps=user_derived(()=>mergeProps(restProps,subContentState.props,{side:side(), -onkeydown,[get$3(dataAttr)]:""}));function handleOpenAutoFocus(e){onOpenAutoFocusProp()(e),!e.defaultPrevented&&(e.preventDefault(),subContentState.parentMenu.root.isUsingKeyboard&&subContentState.parentMenu.contentNode&&MenuOpenEvent.dispatch(subContentState.parentMenu.contentNode))}function handleCloseAutoFocus(e){onCloseAutoFocusProp()(e),!e.defaultPrevented&&e.preventDefault()}function handleInteractOutside(e){onInteractOutside()(e),!e.defaultPrevented&&subContentState.parentMenu.onClose()}function handleEscapeKeydown(e){ -onEscapeKeydown()(e),!e.defaultPrevented&&subContentState.parentMenu.onClose()}function handleOnFocusOutside(e){if(onFocusOutside()(e),e.defaultPrevented||!isHTMLElement$1(e.target)||e.target.id===subContentState.parentMenu.triggerNode?.id)return;if(subContentState.parentMenu.parentMenu?.contentNode?.contains(e.target)){subContentState.parentMenu.onClose(),e.preventDefault();return}const subContentSelector=`[${subContentState.parentMenu.root.getBitsAttr("sub-content")}]`;if(e.target.closest(subContentSelector)){ -e.preventDefault();return}subContentState.parentMenu.onClose()}var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{Popper_layer_force_mount($$anchor2,spread_props(()=>get$3(mergedProps),{get ref(){return subContentState.opts.ref},get interactOutsideBehavior(){return interactOutsideBehavior()},get escapeKeydownBehavior(){return escapeKeydownBehavior()},onOpenAutoFocus:handleOpenAutoFocus,get enabled(){return subContentState.parentMenu.opts.open.current},onInteractOutside:handleInteractOutside, -onEscapeKeydown:handleEscapeKeydown,onFocusOutside:handleOnFocusOutside,preventScroll:!1,get loop(){return loop2()},get trapFocus(){return trapFocus()},get shouldRender(){return subContentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),get$3(mergedProps),{style:getFloatingContentCSSVars("menu")},{style:$$props.style}));var fragment_2=comment$2(),node_1=first_child(fragment_2); -{var consequent=$$anchor4=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...subContentState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$K();attribute_effect(div,()=>({...wrapperProps()}));var div_1=child(div);attribute_effect(div_1,()=>({...get$3(finalProps)}));var node_3=child(div_1);snippet(node_3,()=>$$props.children?? -noop$3),reset(div_1),reset(div),append($$anchor4,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor3,fragment_2)},$$slots:{popper:!0}}))},consequent_3=$$anchor2=>{Popper_layer($$anchor2,spread_props(()=>get$3(mergedProps),{get ref(){return subContentState.opts.ref},get interactOutsideBehavior(){return interactOutsideBehavior()},get escapeKeydownBehavior(){return escapeKeydownBehavior()},onCloseAutoFocus:handleCloseAutoFocus,onOpenAutoFocus:handleOpenAutoFocus, -get open(){return subContentState.parentMenu.opts.open.current},onInteractOutside:handleInteractOutside,onEscapeKeydown:handleEscapeKeydown,onFocusOutside:handleOnFocusOutside,preventScroll:!1,get loop(){return loop2()},get trapFocus(){return trapFocus()},get shouldRender(){return subContentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),get$3(mergedProps),{style:getFloatingContentCSSVars( -"menu")},{style:$$props.style}));var fragment_5=comment$2(),node_4=first_child(fragment_5);{var consequent_2=$$anchor4=>{var fragment_6=comment$2(),node_5=first_child(fragment_6);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...subContentState.snippetProps}));snippet(node_5,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_6)},alternate_1=$$anchor4=>{var div_2=root_8$y();attribute_effect(div_2,()=>({...wrapperProps()}));var div_3=child(div_2);attribute_effect( -div_3,()=>({...get$3(finalProps)}));var node_6=child(div_3);snippet(node_6,()=>$$props.children??noop$3),reset(div_3),reset(div_2),append($$anchor4,div_2)};if_block(node_4,$$render=>{$$props.child?$$render(consequent_2):$$render(alternate_1,-1)})}append($$anchor3,fragment_5)},$$slots:{popper:!0}}))};if_block(node2,$$render=>{forceMount()?$$render(consequent_1):forceMount()||$$render(consequent_3,1)})}append($$anchor,fragment),pop()}var root_3$12=from_html("
");function Menu_sub_trigger($$anchor,$$props){ -const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),disabled=prop($$props,"disabled",3,!1),ref2=prop($$props,"ref",15,null),onSelect=prop($$props,"onSelect",3,noop$1),openDelay=prop($$props,"openDelay",3,0),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","disabled","ref","children","child","onSelect","openDelay"]);const subTriggerState=MenuSubTriggerState.create({disabled:boxWith$1(()=>disabled()),onSelect:boxWith$1(()=>onSelect()),id:boxWith$1( -()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),openDelay:boxWith$1(()=>openDelay())}),mergedProps=user_derived(()=>mergeProps(restProps,subTriggerState.props));Floating_layer_anchor($$anchor,{get id(){return id2()},get ref(){return subTriggerState.opts.ref},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_1=first_child(fragment_2);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})), -append($$anchor3,fragment_2)},alternate=$$anchor3=>{var div=root_3$12();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor3,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}function isPointInPolygon(point2,polygon){const[x,y]=point2;let isInside=!1;const length=polygon.length;for(let i=0,j=length-1;i=y!=yj>=y&&x<=(xj-xi)*(y-yi)/(yj-yi)+xi&&(isInside=!isInside)}return isInside}function isInsideRect(point2,rect){return point2[0]>=rect.left&&point2[0]<=rect.right&&point2[1]>=rect.top&&point2[1]<=rect.bottom}function getSide(triggerRect,contentRect){const triggerCenterX=triggerRect.left+triggerRect.width/2,triggerCenterY=triggerRect.top+triggerRect.height/2,contentCenterX=contentRect.left+contentRect.width/2,contentCenterY=contentRect. -top+contentRect.height/2,deltaX=contentCenterX-triggerCenterX,deltaY=contentCenterY-triggerCenterY;return Math.abs(deltaX)>Math.abs(deltaY)?deltaX>0?"right":"left":deltaY>0?"bottom":"top"}class SafePolygon{#opts;#buffer;#transitIntentTimeout;#exitPoint=null;#exitTarget=null;#transitTargets=[];#trackedTriggerNode=null;#leaveFallbackRafId=null;#transitIntentTimeoutId=null;#cancelLeaveFallback(){this.#leaveFallbackRafId!==null&&(cancelAnimationFrame(this.#leaveFallbackRafId),this.#leaveFallbackRafId= -null)}#scheduleLeaveFallback(){this.#cancelLeaveFallback(),this.#leaveFallbackRafId=requestAnimationFrame(()=>{this.#leaveFallbackRafId=null,!(!this.#exitPoint||!this.#exitTarget)&&(this.#clearTracking(),this.#opts.onPointerExit())})}#cancelTransitIntentTimeout(){this.#transitIntentTimeoutId!==null&&(clearTimeout(this.#transitIntentTimeoutId),this.#transitIntentTimeoutId=null)}#scheduleTransitIntentTimeout(){this.#transitIntentTimeout!==null&&(this.#cancelTransitIntentTimeout(),this.#transitIntentTimeoutId= -window.setTimeout(()=>{this.#transitIntentTimeoutId=null,!(!this.#exitPoint||!this.#exitTarget)&&(this.#clearTracking(),this.#opts.onPointerExit())},this.#transitIntentTimeout))}constructor(opts){this.#opts=opts,this.#buffer=opts.buffer??1;const transitIntentTimeout=opts.transitIntentTimeout;this.#transitIntentTimeout=typeof transitIntentTimeout=="number"&&transitIntentTimeout>0?transitIntentTimeout:null,watch$1([opts.triggerNode,opts.contentNode,opts.enabled],([triggerNode,contentNode,enabled])=>{ -if(!triggerNode||!contentNode||!enabled){this.#trackedTriggerNode=null,this.#clearTracking();return}this.#trackedTriggerNode&&this.#trackedTriggerNode!==triggerNode&&this.#clearTracking(),this.#trackedTriggerNode=triggerNode;const doc=getDocument$1(triggerNode),handlePointerMove=e=>{this.#onPointerMove([e.clientX,e.clientY],triggerNode,contentNode)},handleTriggerLeave=e=>{const target2=e.relatedTarget;if(isElement$1(target2)&&contentNode.contains(target2))return;const ignoredTargets=this.#opts.ignoredTargets?.()?? -[];isElement$1(target2)&&ignoredTargets.some(n=>n===target2||n.contains(target2))||(this.#transitTargets=isElement$1(target2)&&ignoredTargets.length>0?ignoredTargets.filter(n=>target2.contains(n)):[],this.#exitPoint=[e.clientX,e.clientY],this.#exitTarget="content",this.#scheduleLeaveFallback())},handleTriggerEnter=()=>{this.#clearTracking()},handleContentEnter=()=>{this.#clearTracking()},handleContentLeave=e=>{const target2=e.relatedTarget;isElement$1(target2)&&triggerNode.contains(target2)||(this.#exitPoint= -[e.clientX,e.clientY],this.#exitTarget="trigger",this.#scheduleLeaveFallback())};return[on(doc,"pointermove",handlePointerMove),on(triggerNode,"pointerleave",handleTriggerLeave),on(triggerNode,"pointerenter",handleTriggerEnter),on(contentNode,"pointerenter",handleContentEnter),on(contentNode,"pointerleave",handleContentLeave)].reduce((acc,cleanup)=>()=>{acc(),cleanup()},()=>{})})}#onPointerMove(clientPoint,triggerNode,contentNode){if(!this.#exitPoint||!this.#exitTarget)return;this.#cancelLeaveFallback(), -this.#scheduleTransitIntentTimeout();const triggerRect=triggerNode.getBoundingClientRect(),contentRect=contentNode.getBoundingClientRect();if(this.#exitTarget==="content"&&isInsideRect(clientPoint,contentRect)){this.#clearTracking();return}if(this.#exitTarget==="trigger"&&isInsideRect(clientPoint,triggerRect)){this.#clearTracking();return}if(this.#exitTarget==="content"&&this.#transitTargets.length>0)for(const transitTarget of this.#transitTargets){const transitRect=transitTarget.getBoundingClientRect(); -if(isInsideRect(clientPoint,transitRect))return;const transitSide=getSide(triggerRect,transitRect),transitCorridor=this.#getCorridorPolygon(triggerRect,transitRect,transitSide);if(transitCorridor&&isPointInPolygon(clientPoint,transitCorridor))return}const side=getSide(triggerRect,contentRect),corridorPoly=this.#getCorridorPolygon(triggerRect,contentRect,side);if(corridorPoly&&isPointInPolygon(clientPoint,corridorPoly))return;const targetRect=this.#exitTarget==="content"?contentRect:triggerRect,safePoly=this.#getSafePolygon( -this.#exitPoint,targetRect,side,this.#exitTarget);isPointInPolygon(clientPoint,safePoly)||(this.#clearTracking(),this.#opts.onPointerExit())}#clearTracking(){this.#exitPoint=null,this.#exitTarget=null,this.#transitTargets=[],this.#cancelLeaveFallback(),this.#cancelTransitIntentTimeout()}#getCorridorPolygon(triggerRect,contentRect,side){const buffer=this.#buffer;switch(side){case"top":return[[Math.min(triggerRect.left,contentRect.left)-buffer,triggerRect.top],[Math.min(triggerRect.left,contentRect. -left)-buffer,contentRect.bottom],[Math.max(triggerRect.right,contentRect.right)+buffer,contentRect.bottom],[Math.max(triggerRect.right,contentRect.right)+buffer,triggerRect.top]];case"bottom":return[[Math.min(triggerRect.left,contentRect.left)-buffer,triggerRect.bottom],[Math.min(triggerRect.left,contentRect.left)-buffer,contentRect.top],[Math.max(triggerRect.right,contentRect.right)+buffer,contentRect.top],[Math.max(triggerRect.right,contentRect.right)+buffer,triggerRect.bottom]];case"left":return[ -[triggerRect.left,Math.min(triggerRect.top,contentRect.top)-buffer],[contentRect.right,Math.min(triggerRect.top,contentRect.top)-buffer],[contentRect.right,Math.max(triggerRect.bottom,contentRect.bottom)+buffer],[triggerRect.left,Math.max(triggerRect.bottom,contentRect.bottom)+buffer]];case"right":return[[triggerRect.right,Math.min(triggerRect.top,contentRect.top)-buffer],[contentRect.left,Math.min(triggerRect.top,contentRect.top)-buffer],[contentRect.left,Math.max(triggerRect.bottom,contentRect. -bottom)+buffer],[triggerRect.right,Math.max(triggerRect.bottom,contentRect.bottom)+buffer]]}}#getSafePolygon(exitPoint,targetRect,side,exitTarget){const buffer=this.#buffer*4,[x,y]=exitPoint;switch(exitTarget==="trigger"?this.#flipSide(side):side){case"top":return[[x-buffer,y+buffer],[x+buffer,y+buffer],[targetRect.right+buffer,targetRect.bottom],[targetRect.right+buffer,targetRect.top],[targetRect.left-buffer,targetRect.top],[targetRect.left-buffer,targetRect.bottom]];case"bottom":return[[x-buffer, -y-buffer],[x+buffer,y-buffer],[targetRect.right+buffer,targetRect.top],[targetRect.right+buffer,targetRect.bottom],[targetRect.left-buffer,targetRect.bottom],[targetRect.left-buffer,targetRect.top]];case"left":return[[x+buffer,y-buffer],[x+buffer,y+buffer],[targetRect.right,targetRect.bottom+buffer],[targetRect.left,targetRect.bottom+buffer],[targetRect.left,targetRect.top-buffer],[targetRect.right,targetRect.top-buffer]];case"right":return[[x-buffer,y-buffer],[x-buffer,y+buffer],[targetRect.left, -targetRect.bottom+buffer],[targetRect.right,targetRect.bottom+buffer],[targetRect.right,targetRect.top-buffer],[targetRect.left,targetRect.top-buffer]]}}#flipSide(side){switch(side){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}}const popoverAttrs=createBitsAttrs({component:"popover",parts:["root","trigger","content","close","overlay"]}),PopoverRootContext=new Context$1("Popover.Root");class PopoverRootState{static create(opts){return PopoverRootContext. -set(new PopoverRootState(opts))}opts;#contentNode=state$1(null);get contentNode(){return get$3(this.#contentNode)}set contentNode(value){set$1(this.#contentNode,value,!0)}contentPresence;#triggerNode=state$1(null);get triggerNode(){return get$3(this.#triggerNode)}set triggerNode(value){set$1(this.#triggerNode,value,!0)}#overlayNode=state$1(null);get overlayNode(){return get$3(this.#overlayNode)}set overlayNode(value){set$1(this.#overlayNode,value,!0)}overlayPresence;#openedViaHover=state$1(!1);get openedViaHover(){ -return get$3(this.#openedViaHover)}set openedViaHover(value){set$1(this.#openedViaHover,value,!0)}#hasInteractedWithContent=state$1(!1);get hasInteractedWithContent(){return get$3(this.#hasInteractedWithContent)}set hasInteractedWithContent(value){set$1(this.#hasInteractedWithContent,value,!0)}#hoverCooldown=state$1(!1);get hoverCooldown(){return get$3(this.#hoverCooldown)}set hoverCooldown(value){set$1(this.#hoverCooldown,value,!0)}#closeDelay=state$1(0);get closeDelay(){return get$3(this.#closeDelay)}set closeDelay(value){ -set$1(this.#closeDelay,value,!0)}#closeTimeout=null;#domContext=null;constructor(opts){this.opts=opts,this.contentPresence=new PresenceManager({ref:boxWith$1(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new PresenceManager({ref:boxWith$1(()=>this.overlayNode),open:this.opts.open}),watch$1(()=>this.opts.open.current,isOpen=>{isOpen||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#clearCloseTimeout())})}setDomContext(ctx){ -this.#domContext=ctx}#clearCloseTimeout(){this.#closeTimeout!==null&&this.#domContext&&(this.#domContext.clearTimeout(this.#closeTimeout),this.#closeTimeout=null)}toggleOpen(){this.#clearCloseTimeout(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#clearCloseTimeout(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#clearCloseTimeout(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&& -this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#clearCloseTimeout(),this.closeDelay<=0?this.opts.open.current=!1:this.#domContext&&(this.#closeTimeout=this.#domContext.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#closeTimeout=null},this.closeDelay))))}cancelDelayedClose(){this.#clearCloseTimeout()}markInteraction(){ -this.hasInteractedWithContent=!0,this.#clearCloseTimeout()}}class PopoverTriggerState{static create(opts){return new PopoverTriggerState(opts,PopoverRootContext.get())}opts;root;attachment;domContext;#openTimeout=null;#closeTimeout=null;#isHovering=state$1(!1);constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref,v=>this.root.triggerNode=v),this.domContext=new DOMContext(opts.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this), -this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),watch$1(()=>this.opts.closeDelay.current,delay=>{this.root.closeDelay=delay})}#clearOpenTimeout(){this.#openTimeout!==null&&(this.domContext.clearTimeout(this.#openTimeout),this.#openTimeout=null)}#clearCloseTimeout(){this.#closeTimeout!==null&&(this.domContext.clearTimeout(this.#closeTimeout),this.#closeTimeout=null)}#clearAllTimeouts(){this.#clearOpenTimeout(), -this.#clearCloseTimeout()}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||isTouch(e)||(set$1(this.#isHovering,!0),this.#clearCloseTimeout(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const delay=this.opts.openDelay.current;delay<=0?this.root.handleHoverOpen():this.#openTimeout=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#openTimeout=null},delay)}onpointerleave(e){this.opts.disabled.current||this. -opts.openOnHover.current&&(isTouch(e)||(set$1(this.#isHovering,!1),this.#clearOpenTimeout(),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(this.#clearAllTimeouts(),get$3(this.#isHovering)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}get$3(this.#isHovering)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this. -root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===ENTER||e.key===SPACE)&&(e.preventDefault(),this.#clearAllTimeouts(),this.root.toggleOpen())}#getAriaControls(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#props=user_derived(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":boolToStr(this.root.opts.open.current),"data-state":getDataOpenClosed(this.root. -opts.open.current),"aria-controls":this.#getAriaControls(),[popoverAttrs.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class PopoverContentState{static create(opts){return new PopoverContentState(opts,PopoverRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts= -opts,this.root=root2,this.attachment=attachRef(this.opts.ref,v=>this.root.contentNode=v),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new SafePolygon({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this. -root.handleDelayedHoverClose()}})}onpointerdown(_){this.root.markInteraction()}onfocusin(e){const target2=e.target;isElement$1(target2)&&isTabbable(target2)&&this.root.markInteraction()}onpointerenter(e){isTouch(e)||this.root.cancelDelayedClose()}onpointerleave(e){isTouch(e)}onInteractOutside=e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!isElement$1(e.target))return;const closestTrigger=e.target.closest(popoverAttrs.selector("trigger"));if(!(closestTrigger&&closestTrigger=== -this.root.triggerNode)){if(this.opts.customAnchor.current){if(isElement$1(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current=="string"){const el=document.querySelector(this.opts.customAnchor.current);if(el&&el.contains(e.target))return}}this.root.handleClose()}};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence. -shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#snippetProps=user_derived(()=>({open:this.root.opts.open.current}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,tabindex:-1,"data-state":getDataOpenClosed(this.root.opts.open.current),...getDataTransitionAttrs(this.root.contentPresence.transitionStatus),[popoverAttrs.content]:"", -style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}}var root_4$J=from_html("
"),root_8$x=from_html("
");function Popover_content$1($$anchor,$$props){ -const uid2=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid2)),forceMount=prop($$props,"forceMount",3,!1),onOpenAutoFocus=prop($$props,"onOpenAutoFocus",3,noop$1),onCloseAutoFocus=prop($$props,"onCloseAutoFocus",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),trapFocus=prop($$props,"trapFocus",3,!0),preventScroll=prop($$props,"preventScroll",3,!1),customAnchor=prop( -$$props,"customAnchor",3,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]);const contentState=PopoverContentState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),onInteractOutside:boxWith$1(()=>onInteractOutside()),onEscapeKeydown:boxWith$1(()=>onEscapeKeydown()),customAnchor:boxWith$1(()=>customAnchor())}), -mergedProps=user_derived(()=>mergeProps(restProps,contentState.props)),effectiveTrapFocus=user_derived(()=>trapFocus()&&contentState.shouldTrapFocus);function handleOpenAutoFocus(e){contentState.shouldTrapFocus||e.preventDefault(),onOpenAutoFocus()(e)}var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{Popper_layer_force_mount($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get enabled(){return contentState. -root.opts.open.current},get id(){return id2()},get trapFocus(){return get$3(effectiveTrapFocus)},get preventScroll(){return preventScroll()},loop:!0,forceMount:!0,get customAnchor(){return customAnchor()},onOpenAutoFocus:handleOpenAutoFocus,get onCloseAutoFocus(){return onCloseAutoFocus()},get shouldRender(){return contentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars( -"popover")},{style:$$props.style}));var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent=$$anchor4=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$J();attribute_effect(div,()=>({...wrapperProps()}));var div_1=child(div);attribute_effect(div_1, -()=>({...get$3(finalProps)}));var node_3=child(div_1);snippet(node_3,()=>$$props.children??noop$3),reset(div_1),reset(div),append($$anchor4,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor3,fragment_2)},$$slots:{popper:!0}}))},consequent_3=$$anchor2=>{Popper_layer($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get open(){return contentState.root.opts.open.current},get id(){ -return id2()},get trapFocus(){return get$3(effectiveTrapFocus)},get preventScroll(){return preventScroll()},loop:!0,forceMount:!1,get customAnchor(){return customAnchor()},onOpenAutoFocus:handleOpenAutoFocus,get onCloseAutoFocus(){return onCloseAutoFocus()},get shouldRender(){return contentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars("po\ -pover")},{style:$$props.style}));var fragment_5=comment$2(),node_4=first_child(fragment_5);{var consequent_2=$$anchor4=>{var fragment_6=comment$2(),node_5=first_child(fragment_6);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_5,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_6)},alternate_1=$$anchor4=>{var div_2=root_8$x();attribute_effect(div_2,()=>({...wrapperProps()}));var div_3=child(div_2);attribute_effect( -div_3,()=>({...get$3(finalProps)}));var node_6=child(div_3);snippet(node_6,()=>$$props.children??noop$3),reset(div_3),reset(div_2),append($$anchor4,div_2)};if_block(node_4,$$render=>{$$props.child?$$render(consequent_2):$$render(alternate_1,-1)})}append($$anchor3,fragment_5)},$$slots:{popper:!0}}))};if_block(node2,$$render=>{forceMount()?$$render(consequent_1):forceMount()||$$render(consequent_3,1)})}append($$anchor,fragment),pop()}var root_3$11=from_html("");function Popover_trigger$1($$anchor,$$props){ -const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),type2=prop($$props,"type",3,"button"),disabled=prop($$props,"disabled",3,!1),openOnHover=prop($$props,"openOnHover",3,!1),openDelay=prop($$props,"openDelay",3,700),closeDelay=prop($$props,"closeDelay",3,300),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]);const triggerState=PopoverTriggerState. -create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),disabled:boxWith$1(()=>!!disabled()),openOnHover:boxWith$1(()=>openOnHover()),openDelay:boxWith$1(()=>openDelay()),closeDelay:boxWith$1(()=>closeDelay())}),mergedProps=user_derived(()=>mergeProps(restProps,triggerState.props,{type:type2()}));Floating_layer_anchor($$anchor,{get id(){return id2()},get ref(){return triggerState.opts.ref},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);{var consequent=$$anchor3=>{ -var fragment_2=comment$2(),node_1=first_child(fragment_2);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var button=root_3$11();attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor3,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment_1)},$$slots:{default:!0}}), -pop()}function Dialog($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1);DialogRootState.create({variant:boxWith$1(()=>"dialog"),open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor, -fragment),pop()}var root_2$1p=from_html("");function Dialog_close($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),disabled=prop($$props,"disabled",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const closeState=DialogCloseState.create({variant:boxWith$1(()=>"close"),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2( -v)),disabled:boxWith$1(()=>!!disabled())}),mergedProps=user_derived(()=>mergeProps(restProps,closeState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1p();attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props. -children??noop$3),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_6$x=from_html(" ",1),root_8$w=from_html("
",1);function Dialog_content$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),forceMount=prop($$props,"forceMount",3,!1),onCloseAutoFocus=prop($$props,"onCl\ -oseAutoFocus",3,noop$1),onOpenAutoFocus=prop($$props,"onOpenAutoFocus",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),trapFocus=prop($$props,"trapFocus",3,!0),preventScroll=prop($$props,"preventScroll",3,!0),restoreScrollDelay=prop($$props,"restoreScrollDelay",3,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscap\ -eKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const contentState=DialogContentState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_2=$$anchor2=>{Focus_scope($$anchor2,{get ref(){return contentState.opts.ref},loop:!0,get trapFocus(){return trapFocus()},get enabled(){return contentState.root.opts.open. -current},get onOpenAutoFocus(){return onOpenAutoFocus()},get onCloseAutoFocus(){return onCloseAutoFocus()},focusScope:($$anchor3,$$arg0)=>{let focusScopeProps=()=>$$arg0?.().props;Escape_layer($$anchor3,spread_props(()=>get$3(mergedProps),{get enabled(){return contentState.root.opts.open.current},get ref(){return contentState.opts.ref},onEscapeKeydown:e=>{onEscapeKeydown()(e),!e.defaultPrevented&&contentState.root.handleClose()},children:($$anchor4,$$slotProps)=>{Dismissible_layer($$anchor4,spread_props( -()=>get$3(mergedProps),{get ref(){return contentState.opts.ref},get enabled(){return contentState.root.opts.open.current},onInteractOutside:e=>{onInteractOutside()(e),!e.defaultPrevented&&contentState.root.handleClose()},children:($$anchor5,$$slotProps2)=>{Text_selection_layer($$anchor5,spread_props(()=>get$3(mergedProps),{get ref(){return contentState.opts.ref},get enabled(){return contentState.root.opts.open.current},children:($$anchor6,$$slotProps3)=>{var fragment_5=comment$2(),node_1=first_child( -fragment_5);{var consequent_1=$$anchor7=>{var fragment_6=root_6$x(),node_2=first_child(fragment_6);{var consequent=$$anchor8=>{Scroll_lock($$anchor8,{get preventScroll(){return preventScroll()},get restoreScrollDelay(){return restoreScrollDelay()}})};if_block(node_2,$$render=>{contentState.root.opts.open.current&&$$render(consequent)})}var node_3=sibling(node_2,2);{let $0=user_derived(()=>({props:mergeProps(get$3(mergedProps),focusScopeProps()),...contentState.snippetProps}));snippet(node_3,()=>$$props. -child,()=>get$3($0))}append($$anchor7,fragment_6)},alternate=$$anchor7=>{var fragment_8=root_8$w(),node_4=first_child(fragment_8);Scroll_lock(node_4,{get preventScroll(){return preventScroll()}});var div=sibling(node_4,2);attribute_effect(div,$0=>({...$0}),[()=>mergeProps(get$3(mergedProps),focusScopeProps())]);var node_5=child(div);snippet(node_5,()=>$$props.children??noop$3),reset(div),append($$anchor7,fragment_8)};if_block(node_1,$$render=>{$$props.child?$$render(consequent_1):$$render(alternate, --1)})}append($$anchor6,fragment_5)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};if_block(node2,$$render=>{(contentState.shouldRender||forceMount())&&$$render(consequent_2)})}append($$anchor,fragment),pop()}function Menu($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),dir=prop($$props,"dir",3,"ltr"),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1), -variant=prop($$props,"_internal_variant",3,"dropdown-menu"),shouldSkipExitAnimation=prop($$props,"_internal_should_skip_exit_animation",3,void 0);const root2=MenuRootState.create({variant:boxWith$1(()=>variant()),dir:boxWith$1(()=>dir()),onClose:()=>{open2(!1),onOpenChange()(!1)},shouldSkipExitAnimation:()=>shouldSkipExitAnimation()?.()??!1});MenuMenuState.create({open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())},root2),Floating_layer( -$$anchor,{children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}var root_4$I=from_html("
"),root_8$v=from_html("
");function Dropdown_menu_content$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),loop2=prop($$props,"l\ -oop",3,!0),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),onCloseAutoFocus=prop($$props,"onCloseAutoFocus",3,noop$1),forceMount=prop($$props,"forceMount",3,!1),trapFocus=prop($$props,"trapFocus",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const contentState=MenuContentState.create( -{id:boxWith$1(()=>id2()),loop:boxWith$1(()=>loop2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),onCloseAutoFocus:boxWith$1(()=>onCloseAutoFocus())}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props));function handleInteractOutside(e){if(contentState.handleInteractOutside(e),!e.defaultPrevented&&(onInteractOutside()(e),!e.defaultPrevented)){if(e.target&&e.target instanceof Element){const subContentSelector=`[${contentState.parentMenu.root.getBitsAttr("sub-content")}]`;if(e.target.closest( -subContentSelector))return}contentState.parentMenu.onClose()}}function handleEscapeKeydown(e){onEscapeKeydown()(e),!e.defaultPrevented&&contentState.parentMenu.onClose()}var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{Popper_layer_force_mount($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get enabled(){return contentState.parentMenu.opts.open.current},onInteractOutside:handleInteractOutside,onEscapeKeydown:handleEscapeKeydown, -get trapFocus(){return trapFocus()},get loop(){return loop2()},forceMount:!0,get id(){return id2()},get shouldRender(){return contentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars("dropdown-menu")},{style:$$props.style}));var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent=$$anchor4=>{var fragment_3=comment$2(),node_2=first_child( -fragment_3);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$I();attribute_effect(div,()=>({...wrapperProps()}));var div_1=child(div);attribute_effect(div_1,()=>({...get$3(finalProps)}));var node_3=child(div_1);snippet(node_3,()=>$$props.children??noop$3),reset(div_1),reset(div),append($$anchor4,div)};if_block(node_1,$$render=>{ -$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor3,fragment_2)},$$slots:{popper:!0}}))},consequent_3=$$anchor2=>{Popper_layer($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get open(){return contentState.parentMenu.opts.open.current},onInteractOutside:handleInteractOutside,onEscapeKeydown:handleEscapeKeydown,get trapFocus(){return trapFocus()},get loop(){return loop2()},forceMount:!1,get id(){return id2()}, -get shouldRender(){return contentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars("dropdown-menu")},{style:$$props.style}));var fragment_5=comment$2(),node_4=first_child(fragment_5);{var consequent_2=$$anchor4=>{var fragment_6=comment$2(),node_5=first_child(fragment_6);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(), -...contentState.snippetProps}));snippet(node_5,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_6)},alternate_1=$$anchor4=>{var div_2=root_8$v();attribute_effect(div_2,()=>({...wrapperProps()}));var div_3=child(div_2);attribute_effect(div_3,()=>({...get$3(finalProps)}));var node_6=child(div_3);snippet(node_6,()=>$$props.children??noop$3),reset(div_3),reset(div_2),append($$anchor4,div_2)};if_block(node_4,$$render=>{$$props.child?$$render(consequent_2):$$render(alternate_1,-1)})}append($$anchor3, -fragment_5)},$$slots:{popper:!0}}))};if_block(node2,$$render=>{forceMount()?$$render(consequent_1):forceMount()||$$render(consequent_3,1)})}append($$anchor,fragment),pop()}var root_3$10=from_html("");function Menu_trigger($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),disabled=prop($$props,"disabled",3,!1),type2=prop($$props,"type",3,"button"),restProps=rest_props($$props,["$$slots", -"$$events","$$legacy","id","ref","child","children","disabled","type"]);const triggerState=DropdownMenuTriggerState.create({id:boxWith$1(()=>id2()),disabled:boxWith$1(()=>disabled()??!1),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,triggerState.props,{type:type2()}));Floating_layer_anchor($$anchor,{get id(){return id2()},get ref(){return triggerState.opts.ref},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);{ -var consequent=$$anchor3=>{var fragment_2=comment$2(),node_1=first_child(fragment_2);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var button=root_3$10();attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor3,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment_1)}, -$$slots:{default:!0}}),pop()}const labelAttrs=createBitsAttrs({component:"label",parts:["root"]});class LabelRootState{static create(opts){return new LabelRootState(opts)}opts;attachment;constructor(opts){this.opts=opts,this.attachment=attachRef(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}onmousedown(e){e.detail>1&&e.preventDefault()}#props=user_derived(()=>({id:this.opts.id.current,[labelAttrs.root]:"",onmousedown:this.onmousedown,...this.attachment}));get props(){return get$3(this.#props)}set props(value){ -set$1(this.#props,value)}}var root_2$1o=from_html("");function Label$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","id","ref","for"]);const rootState=LabelRootState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,rootState.props,{for:$$props. -for}));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var label=root_2$1o();attribute_effect(label,()=>({...get$3(mergedProps),for:$$props.for}));var node_2=child(label);snippet(node_2,()=>$$props.children??noop$3),reset(label),append($$anchor2,label)};if_block(node2,$$render=>{$$props.child? -$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}class SvelteResizeObserver{#node;#onResize;constructor(node2,onResize){this.#node=node2,this.#onResize=onResize,this.handler=this.handler.bind(this),user_effect(this.handler)}handler(){let rAF=0;const _node=this.#node();if(!_node)return;const resizeObserver=new ResizeObserver(()=>{cancelAnimationFrame(rAF),rAF=window.requestAnimationFrame(this.#onResize)});return resizeObserver.observe(_node),()=>{window.cancelAnimationFrame( -rAF),resizeObserver.unobserve(_node)}}}class Presence{opts;present;#afterAnimations;#isPresent=state$1(!1);#hasMounted=!1;#transitionStatus=state$1(void 0);#transitionFrame=null;constructor(opts){this.opts=opts,this.present=this.opts.open,set$1(this.#isPresent,opts.open.current,!0),this.#afterAnimations=new AnimationsComplete({ref:this.opts.ref,afterTick:this.opts.open}),onDestroyEffect(()=>this.#clearTransitionFrame()),watch$1(()=>this.present.current,isOpen=>{if(!this.#hasMounted){this.#hasMounted= -!0;return}this.#clearTransitionFrame(),isOpen&&set$1(this.#isPresent,!0),set$1(this.#transitionStatus,isOpen?"starting":"ending",!0),isOpen&&(this.#transitionFrame=window.requestAnimationFrame(()=>{this.#transitionFrame=null,this.present.current&&set$1(this.#transitionStatus,void 0)})),this.#afterAnimations.run(()=>{isOpen===this.present.current&&(isOpen||set$1(this.#isPresent,!1),set$1(this.#transitionStatus,void 0))})})}#_isPresent=user_derived(()=>get$3(this.#isPresent));get isPresent(){return get$3( -this.#_isPresent)}set isPresent(value){set$1(this.#_isPresent,value)}get transitionStatus(){return get$3(this.#transitionStatus)}#clearTransitionFrame(){this.#transitionFrame!==null&&(window.cancelAnimationFrame(this.#transitionFrame),this.#transitionFrame=null)}}function Presence_layer($$anchor,$$props){push$1($$props,!0);const presenceState=new Presence({open:boxWith$1(()=>$$props.open),ref:$$props.ref});var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(), -node_1=first_child(fragment_1);snippet(node_1,()=>$$props.presence??noop$3,()=>({present:presenceState.isPresent,transitionStatus:presenceState.transitionStatus})),append($$anchor2,fragment_1)};if_block(node2,$$render=>{($$props.forceMount||$$props.open||presenceState.isPresent)&&$$render(consequent)})}append($$anchor,fragment),pop()}function Popover$1($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop( -$$props,"onOpenChangeComplete",3,noop$1);PopoverRootState.create({open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())}),Floating_layer($$anchor,{children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}function clamp(n,min2,max2){return Math.min(max2,Math.max(min2,n))}class StateMachine{state;#machine;constructor(initialState,machine){ +"sub-trigger"))||this.#isPointerMovingToSubmenu()||this.parentMenu.root.isUsingKeyboard.current)return;this.parentMenu.contentNode?.focus({preventScroll:!0}),this.rovingFocusGroup.setCurrentTabStopId("")}onTriggerLeave(){return!!this.#isPointerMovingToSubmenu()}handleInteractOutside(e){if(!isElementOrSVGElement(e.target))return;const triggerId=this.parentMenu.triggerNode?.id;if(e.target.id===triggerId){e.preventDefault();return}if(e.target.closest(`#${triggerId}`)){e.preventDefault();return}this. +parentMenu.root.ignoreCloseAutoFocus=!0,afterTick(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})}get shouldRender(){return this.parentMenu.contentPresence.shouldRender}#snippetProps=user_derived(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,role:"menu","aria-orientation":"vertical",[this.parentMenu.root.getBitsAttr("content")]:"","da\ +ta-state":getDataOpenClosed(this.parentMenu.opts.open.current),...getDataTransitionAttrs(this.parentMenu.contentPresence.transitionStatus),onkeydown:this.onkeydown,onblur:this.onblur,onfocus:this.onfocus,dir:this.parentMenu.root.opts.dir.current,style:{pointerEvents:"auto",contain:"layout style"},...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}popperProps={onCloseAutoFocus:e=>this.onCloseAutoFocus(e)}}class MenuItemSharedState{opts;content;attachment;#isFocused=state$1( +!1);constructor(opts,content2){this.opts=opts,this.content=content2,this.attachment=attachRef(this.opts.ref),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this),this.onfocus=this.onfocus.bind(this),this.onblur=this.onblur.bind(this)}onpointermove(e){if(!e.defaultPrevented&&isMouseEvent(e))if(this.opts.disabled.current)this.content.onItemLeave(e);else{if(this.content.onItemEnter())return;const item=e.currentTarget;if(!isHTMLElement$1(item))return;item. +focus({preventScroll:!0})}}onpointerleave(e){e.defaultPrevented||isMouseEvent(e)&&this.content.onItemLeave(e)}onfocus(e){afterTick(()=>{e.defaultPrevented||this.opts.disabled.current||set$1(this.#isFocused,!0)})}onblur(e){afterTick(()=>{e.defaultPrevented||set$1(this.#isFocused,!1)})}#props=user_derived(()=>({id:this.opts.id.current,tabindex:-1,role:"menuitem","aria-disabled":boolToStr(this.opts.disabled.current),"data-disabled":boolToEmptyStrOrUndef(this.opts.disabled.current),"data-highlighted":get$3( +this.#isFocused)?"":void 0,[this.content.parentMenu.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onfocus:this.onfocus,onblur:this.onblur,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class MenuItemState{static create(opts){const item=new MenuItemSharedState(opts,MenuContentContext.get());return new MenuItemState(opts,item)}opts;item;root;#isPointerDown=!1;constructor(opts,item){this.opts= +opts,this.item=item,this.root=item.content.parentMenu.root,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this)}#handleSelect(){if(this.item.opts.disabled.current)return;const selectEvent=new CustomEvent("menuitemselect",{bubbles:!0,cancelable:!0});if(this.opts.onSelect.current(selectEvent),selectEvent.defaultPrevented){this.item.content.parentMenu.root.isUsingKeyboard.current=!1; +return}this.opts.closeOnSelect.current&&this.item.content.parentMenu.root.opts.onClose()}onkeydown(e){const isTypingAhead=this.item.content.search!=="";if(!(this.item.opts.disabled.current||isTypingAhead&&e.key===SPACE)&&SELECTION_KEYS.includes(e.key)){if(!isHTMLElement$1(e.currentTarget))return;e.currentTarget.click(),e.preventDefault()}}onclick(_){this.item.opts.disabled.current||this.#handleSelect()}onpointerup(e){if(!e.defaultPrevented&&!this.#isPointerDown){if(!isHTMLElement$1(e.currentTarget)) +return;e.currentTarget?.click()}}onpointerdown(_){this.#isPointerDown=!0}#props=user_derived(()=>mergeProps(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class MenuSubTriggerState{static create(opts){const content2=MenuContentContext.get(),item=new MenuItemSharedState(opts,content2),submenu=MenuMenuContext.get();return new MenuSubTriggerState( +opts,item,content2,submenu)}opts;item;content;submenu;attachment;#openTimer=null;constructor(opts,item,content2,submenu){this.opts=opts,this.item=item,this.content=content2,this.submenu=submenu,this.attachment=attachRef(this.opts.ref,v=>this.submenu.triggerNode=v),this.onpointerleave=this.onpointerleave.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),onDestroyEffect(()=>{this.#clearOpenTimer()})}#clearOpenTimer(){ +this.#openTimer!==null&&(this.content.domContext.getWindow().clearTimeout(this.#openTimer),this.#openTimer=null)}onpointermove(e){if(isMouseEvent(e)){if(this.submenu.root.isPointerInTransit){this.#openTimer!==null&&this.#clearOpenTimer();return}if(!this.item.opts.disabled.current&&!this.submenu.opts.open.current&&!this.#openTimer){const openDelay=this.opts.openDelay.current;if(openDelay<=0){this.submenu.onOpen();return}this.#openTimer=this.content.domContext.setTimeout(()=>{if(this.submenu.root. +isPointerInTransit){this.#clearOpenTimer();return}this.submenu.onOpen(),this.#clearOpenTimer()},openDelay)}}}onpointerleave(e){isMouseEvent(e)&&this.#clearOpenTimer()}onkeydown(e){const isTypingAhead=this.content.search!=="";this.item.opts.disabled.current||isTypingAhead&&e.key===SPACE||SUB_OPEN_KEYS[this.submenu.root.opts.dir.current].includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}onclick(e){if(this.item.opts.disabled.current||!isHTMLElement$1(e.currentTarget))return;e.currentTarget. +focus();const selectEvent=new CustomEvent("menusubtriggerselect",{bubbles:!0,cancelable:!0});this.opts.onSelect.current(selectEvent),this.submenu.opts.open.current||(this.submenu.onOpen(),afterTick(()=>{const contentNode=this.submenu.contentNode;contentNode&&MenuOpenEvent.dispatch(contentNode)}))}#props=user_derived(()=>mergeProps({"aria-haspopup":"menu","aria-expanded":boolToStr(this.submenu.opts.open.current),"data-state":getDataOpenClosed(this.submenu.opts.open.current),"aria-controls":this.submenu. +opts.open.current?this.submenu.contentId.current:void 0,[this.submenu.root.getBitsAttr("sub-trigger")]:"",onclick:this.onclick,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onkeydown:this.onkeydown,...this.attachment},this.item.props));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class MenuSeparatorState{static create(opts){return new MenuSeparatorState(opts,MenuRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts=opts, +this.root=root2,this.attachment=attachRef(this.opts.ref)}#props=user_derived(()=>({id:this.opts.id.current,role:"group",[this.root.getBitsAttr("separator")]:"",...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class DropdownMenuTriggerState{static create(opts){return new DropdownMenuTriggerState(opts,MenuMenuContext.get())}opts;parentMenu;attachment;constructor(opts,parentMenu){this.opts=opts,this.parentMenu=parentMenu,this.attachment=attachRef( +this.opts.ref,v=>this.parentMenu.triggerNode=v)}onclick=e=>{this.opts.disabled.current||e.detail!==0||(this.parentMenu.toggleOpen(),e.preventDefault())};onpointerdown=e=>{if(!this.opts.disabled.current){if(e.pointerType==="touch")return e.preventDefault();e.button===0&&e.ctrlKey===!1&&(this.parentMenu.toggleOpen(),this.parentMenu.opts.open.current||e.preventDefault())}};onpointerup=e=>{this.opts.disabled.current||e.pointerType==="touch"&&(e.preventDefault(),this.parentMenu.toggleOpen())};onkeydown=e=>{ +if(!this.opts.disabled.current){if(e.key===SPACE||e.key===ENTER){this.parentMenu.toggleOpen(),e.preventDefault();return}e.key===ARROW_DOWN&&(this.parentMenu.onOpen(),e.preventDefault())}};#ariaControls=user_derived(()=>{if(this.parentMenu.opts.open.current&&this.parentMenu.contentId.current)return this.parentMenu.contentId.current});#props=user_derived(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"aria-haspopup":"menu","aria-expanded":boolToStr(this.parentMenu.opts.open.current), +"aria-controls":get$3(this.#ariaControls),"data-disabled":boolToEmptyStrOrUndef(this.opts.disabled.current),"data-state":getDataOpenClosed(this.parentMenu.opts.open.current),[this.parentMenu.root.getBitsAttr("trigger")]:"",onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class MenuSubmenuState{static create(opts){const menu=MenuMenuContext. +get();return MenuMenuContext.set(new MenuMenuState(opts,menu.root,menu))}}globalThis.bitsDismissableLayers??=new Map;class DismissibleLayerState{static create(opts){return new DismissibleLayerState(opts)}opts;#interactOutsideProp;#behaviorType;#interceptedEvents={pointerdown:!1};#isResponsibleLayer=!1;#isFocusInsideDOMTree=!1;#documentObj=void 0;#onFocusOutside;#unsubClickListener=noop$1;constructor(opts){this.opts=opts,this.#behaviorType=opts.interactOutsideBehavior,this.#interactOutsideProp=opts. +onInteractOutside,this.#onFocusOutside=opts.onFocusOutside,user_effect(()=>{this.#documentObj=getOwnerDocument(this.opts.ref.current)});let unsubEvents=noop$1;const cleanup=()=>{this.#resetState(),globalThis.bitsDismissableLayers.delete(this),this.#handleInteractOutside.destroy(),unsubEvents()};watch$1([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return afterSleep(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers. +set(this,this.#behaviorType),unsubEvents(),unsubEvents=this.#addEventListeners())}),cleanup}),onDestroyEffect(()=>{this.#resetState.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#handleInteractOutside.destroy(),this.#unsubClickListener(),unsubEvents()})}#handleFocus=event2=>{event2.defaultPrevented||this.opts.ref.current&&afterTick(()=>{!this.opts.ref.current||this.#isTargetWithinLayer(event2.target)||event2.target&&!this.#isFocusInsideDOMTree&&this.#onFocusOutside.current?.(event2)})};#addEventListeners(){ +return executeCallbacks(on(this.#documentObj,"pointerdown",executeCallbacks(this.#markInterceptedEvent,this.#markResponsibleLayer),{capture:!0}),on(this.#documentObj,"pointerdown",executeCallbacks(this.#markNonInterceptedEvent,this.#handleInteractOutside)),on(this.#documentObj,"focusin",this.#handleFocus))}#handleDismiss=e=>{let event2=e;event2.defaultPrevented&&(event2=createWrappedEvent(e)),this.#interactOutsideProp.current(e)};#handleInteractOutside=debounce$1(e=>{if(!this.opts.ref.current){this.#unsubClickListener(); +return}const isEventValid=this.opts.isValidEvent.current(e,this.opts.ref.current)||isValidEvent(e,this.opts.ref.current);if(!this.#isResponsibleLayer||this.#isAnyEventIntercepted()||!isEventValid){this.#unsubClickListener();return}let event2=e;if(event2.defaultPrevented&&(event2=createWrappedEvent(event2)),this.#behaviorType.current!=="close"&&this.#behaviorType.current!=="defer-otherwise-close"){this.#unsubClickListener();return}e.pointerType==="touch"?(this.#unsubClickListener(),this.#unsubClickListener= +on(this.#documentObj,"click",this.#handleDismiss,{once:!0})):this.#interactOutsideProp.current(event2)},10);#markInterceptedEvent=e=>{this.#interceptedEvents[e.type]=!0};#markNonInterceptedEvent=e=>{this.#interceptedEvents[e.type]=!1};#markResponsibleLayer=()=>{this.opts.ref.current&&(this.#isResponsibleLayer=isResponsibleLayer(this.opts.ref.current))};#isTargetWithinLayer=target2=>this.opts.ref.current?isOrContainsTarget(this.opts.ref.current,target2):!1;#resetState=debounce$1(()=>{for(const eventType in this.#interceptedEvents) +this.#interceptedEvents[eventType]=!1;this.#isResponsibleLayer=!1},20);#isAnyEventIntercepted(){return Object.values(this.#interceptedEvents).some(Boolean)}#onfocuscapture=()=>{this.#isFocusInsideDOMTree=!0};#onblurcapture=()=>{this.#isFocusInsideDOMTree=!1};props={onfocuscapture:this.#onfocuscapture,onblurcapture:this.#onblurcapture}}function getTopMostDismissableLayer(layersArr=[...globalThis.bitsDismissableLayers]){return layersArr.findLast(([_,{current:behaviorType}])=>behaviorType==="close"|| +behaviorType==="ignore")}function isResponsibleLayer(node2){const layersArr=[...globalThis.bitsDismissableLayers],topMostLayer=getTopMostDismissableLayer(layersArr);if(topMostLayer)return topMostLayer[0].opts.ref.current===node2;const[firstLayerNode]=layersArr[0];return firstLayerNode.opts.ref.current===node2}function isValidEvent(e,node2){const target2=e.target;if(!isElementOrSVGElement(target2))return!1;const targetIsContextMenuTrigger=!!target2.closest(`[${CONTEXT_MENU_TRIGGER_ATTR}]`),nodeIsContextMenu=!!node2. +closest(`[${CONTEXT_MENU_CONTENT_ATTR}]`);return"button"in e&&e.button>0&&!targetIsContextMenuTrigger?!1:"button"in e&&e.button===0&&targetIsContextMenuTrigger&&nodeIsContextMenu?!0:targetIsContextMenuTrigger&&nodeIsContextMenu?!1:getOwnerDocument(target2).documentElement.contains(target2)&&!isOrContainsTarget(node2,target2)&&isClickTrulyOutside(e,node2)}function createWrappedEvent(e){const capturedCurrentTarget=e.currentTarget,capturedTarget=e.target;let newEvent;e instanceof PointerEvent?newEvent= +new PointerEvent(e.type,e):newEvent=new PointerEvent("pointerdown",e);let isPrevented=!1;return new Proxy(newEvent,{get:(target2,prop2)=>prop2==="currentTarget"?capturedCurrentTarget:prop2==="target"?capturedTarget:prop2==="preventDefault"?()=>{isPrevented=!0,typeof target2.preventDefault=="function"&&target2.preventDefault()}:prop2==="defaultPrevented"?isPrevented:prop2 in target2?target2[prop2]:e[prop2]})}function Dismissible_layer($$anchor,$$props){push$1($$props,!0);let interactOutsideBehavior=prop( +$$props,"interactOutsideBehavior",3,"close"),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),onFocusOutside=prop($$props,"onFocusOutside",3,noop$1),isValidEvent2=prop($$props,"isValidEvent",3,()=>!1);const dismissibleLayerState=DismissibleLayerState.create({id:boxWith$1(()=>$$props.id),interactOutsideBehavior:boxWith$1(()=>interactOutsideBehavior()),onInteractOutside:boxWith$1(()=>onInteractOutside()),enabled:boxWith$1(()=>$$props.enabled),onFocusOutside:boxWith$1(()=>onFocusOutside()), +isValidEvent:boxWith$1(()=>isValidEvent2()),ref:$$props.ref});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3,()=>({props:dismissibleLayerState.props})),append($$anchor,fragment),pop()}globalThis.bitsEscapeLayers??=new Map;class EscapeLayerState{static create(opts){return new EscapeLayerState(opts)}opts;domContext;constructor(opts){this.opts=opts,this.domContext=new DOMContext(this.opts.ref);let unsubEvents=noop$1;watch$1(()=>opts.enabled.current,enabled=>(enabled&& +(globalThis.bitsEscapeLayers.set(this,opts.escapeKeydownBehavior),unsubEvents=this.#addEventListener()),()=>{unsubEvents(),globalThis.bitsEscapeLayers.delete(this)}))}#addEventListener=()=>on(this.domContext.getDocument(),"keydown",this.#onkeydown,{passive:!1});#onkeydown=e=>{if(e.key!==ESCAPE||!isResponsibleEscapeLayer(this))return;const clonedEvent=new KeyboardEvent(e.type,e);e.preventDefault();const behaviorType=this.opts.escapeKeydownBehavior.current;behaviorType!=="close"&&behaviorType!=="d\ +efer-otherwise-close"||this.opts.onEscapeKeydown.current(clonedEvent)}}function isResponsibleEscapeLayer(instance){const layersArr=[...globalThis.bitsEscapeLayers],topMostLayer=layersArr.findLast(([_,{current:behaviorType}])=>behaviorType==="close"||behaviorType==="ignore");if(topMostLayer)return topMostLayer[0]===instance;const[firstLayerNode]=layersArr[0];return firstLayerNode===instance}function Escape_layer($$anchor,$$props){push$1($$props,!0);let escapeKeydownBehavior=prop($$props,"escapeKe\ +ydownBehavior",3,"close"),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1);EscapeLayerState.create({escapeKeydownBehavior:boxWith$1(()=>escapeKeydownBehavior()),onEscapeKeydown:boxWith$1(()=>onEscapeKeydown()),enabled:boxWith$1(()=>$$props.enabled),ref:$$props.ref});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}class FocusScopeManager{static instance;#scopeStack=simpleBox([]);#focusHistory=new WeakMap;#preFocusHistory=new WeakMap;static getInstance(){ +return this.instance||(this.instance=new FocusScopeManager),this.instance}register(scope2){const current2=this.getActive();current2&¤t2!==scope2&¤t2.pause();const activeElement=document.activeElement;activeElement&&activeElement!==document.body&&this.#preFocusHistory.set(scope2,activeElement),this.#scopeStack.current=this.#scopeStack.current.filter(s2=>s2!==scope2),this.#scopeStack.current.unshift(scope2)}unregister(scope2){this.#scopeStack.current=this.#scopeStack.current.filter(s2=>s2!== +scope2);const next2=this.getActive();next2&&next2.resume()}getActive(){return this.#scopeStack.current[0]}setFocusMemory(scope2,element2){this.#focusHistory.set(scope2,element2)}getFocusMemory(scope2){return this.#focusHistory.get(scope2)}isActiveScope(scope2){return this.getActive()===scope2}setPreFocusMemory(scope2,element2){this.#preFocusHistory.set(scope2,element2)}getPreFocusMemory(scope2){return this.#preFocusHistory.get(scope2)}clearPreFocusMemory(scope2){this.#preFocusHistory.delete(scope2)}} +class FocusScope{#paused=!1;#container=null;#manager=FocusScopeManager.getInstance();#cleanupFns=[];#opts;constructor(opts){this.#opts=opts}get paused(){return this.#paused}pause(){this.#paused=!0}resume(){this.#paused=!1}#cleanup(){for(const fn of this.#cleanupFns)fn();this.#cleanupFns=[]}mount(container2){this.#container&&this.unmount(),this.#container=container2,this.#manager.register(this),this.#setupEventListeners(),this.#handleOpenAutoFocus()}unmount(){this.#container&&(this.#cleanup(),this.#handleCloseAutoFocus(), +this.#manager.unregister(this),this.#manager.clearPreFocusMemory(this),this.#container=null)}#handleOpenAutoFocus(){if(!this.#container)return;const event2=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#opts.onOpenAutoFocus.current(event2),event2.defaultPrevented||requestAnimationFrame(()=>{if(!this.#container)return;const firstTabbable=this.#getFirstTabbable();firstTabbable?(firstTabbable.focus(),this.#manager.setFocusMemory(this,firstTabbable)):this.#container.focus()})}#handleCloseAutoFocus(){ +const event2=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#opts.onCloseAutoFocus.current?.(event2),!event2.defaultPrevented){const preFocusedElement=this.#manager.getPreFocusMemory(this);if(preFocusedElement&&document.contains(preFocusedElement))try{preFocusedElement.focus()}catch{document.body.focus()}}}#setupEventListeners(){if(!this.#container||!this.#opts.trap.current)return;const container2=this.#container,doc=container2.ownerDocument,handleFocus=e=>{if(this.#paused|| +!this.#manager.isActiveScope(this))return;const target2=e.target;if(!target2)return;if(container2.contains(target2))this.#manager.setFocusMemory(this,target2);else{const lastFocused=this.#manager.getFocusMemory(this);if(lastFocused&&container2.contains(lastFocused)&&isFocusable(lastFocused))e.preventDefault(),lastFocused.focus();else{const firstTabbable=this.#getFirstTabbable(),firstFocusable=this.#getAllFocusables()[0];(firstTabbable||firstFocusable||container2).focus()}}},handleKeydown=e=>{if(!this.#opts. +loop||this.#paused||e.key!=="Tab"||!this.#manager.isActiveScope(this))return;const tabbables=this.#getTabbables();if(tabbables.length===0)return;const first=tabbables[0],last=tabbables[tabbables.length-1];!e.shiftKey&&doc.activeElement===last?(e.preventDefault(),first.focus()):e.shiftKey&&doc.activeElement===first&&(e.preventDefault(),last.focus())};this.#cleanupFns.push(on(doc,"focusin",handleFocus,{capture:!0}),on(container2,"keydown",handleKeydown));const observer=new MutationObserver(()=>{const lastFocused=this.#manager. +getFocusMemory(this);if(lastFocused&&!container2.contains(lastFocused)){const firstTabbable=this.#getFirstTabbable(),firstFocusable=this.#getAllFocusables()[0],elementToFocus=firstTabbable||firstFocusable;elementToFocus?(elementToFocus.focus(),this.#manager.setFocusMemory(this,elementToFocus)):container2.focus()}});observer.observe(container2,{childList:!0,subtree:!0}),this.#cleanupFns.push(()=>observer.disconnect())}#getTabbables(){return this.#container?tabbable(this.#container,{includeContainer:!1, +getShadowRoot:!0}):[]}#getFirstTabbable(){return this.#getTabbables()[0]||null}#getAllFocusables(){return this.#container?focusable(this.#container,{includeContainer:!1,getShadowRoot:!0}):[]}static use(opts){let scope2=null;return watch$1([()=>opts.ref.current,()=>opts.enabled.current],([ref2,enabled])=>{ref2&&enabled?(scope2||(scope2=new FocusScope(opts)),scope2.mount(ref2)):scope2&&(scope2.unmount(),scope2=null)}),onDestroyEffect(()=>{scope2?.unmount()}),{get props(){return{tabindex:-1}}}}}function Focus_scope($$anchor,$$props){ +push$1($$props,!0);let enabled=prop($$props,"enabled",3,!1),trapFocus=prop($$props,"trapFocus",3,!1),loop2=prop($$props,"loop",3,!1),onCloseAutoFocus=prop($$props,"onCloseAutoFocus",3,noop$1),onOpenAutoFocus=prop($$props,"onOpenAutoFocus",3,noop$1);const focusScopeState=FocusScope.use({enabled:boxWith$1(()=>enabled()),trap:boxWith$1(()=>trapFocus()),loop:loop2(),onCloseAutoFocus:boxWith$1(()=>onCloseAutoFocus()),onOpenAutoFocus:boxWith$1(()=>onOpenAutoFocus()),ref:$$props.ref});var fragment=comment$2(), +node2=first_child(fragment);snippet(node2,()=>$$props.focusScope??noop$3,()=>({props:focusScopeState.props})),append($$anchor,fragment),pop()}const noopPointer=()=>{};globalThis.bitsTextSelectionLayers??=new Map;class TextSelectionLayerState{static create(opts){return new TextSelectionLayerState(opts)}opts;domContext;#unsubSelectionLock=noop$1;#enabledSnapshot=!1;#onPointerDownSnapshot=noopPointer;#onPointerUpSnapshot=noopPointer;constructor(opts){this.opts=opts,this.domContext=new DOMContext(opts. +ref);let unsubEvents=noop$1;watch$1(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([enabled,onPointerDown,onPointerUp])=>(this.#enabledSnapshot=enabled,this.#onPointerDownSnapshot=onPointerDown,this.#onPointerUpSnapshot=onPointerUp,enabled&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),unsubEvents(),unsubEvents=this.#addEventListeners()),()=>{this.#enabledSnapshot=!1,unsubEvents(),this.#resetSelectionLock(),globalThis.bitsTextSelectionLayers. +delete(this)}))}#addEventListeners(){return executeCallbacks(on(this.domContext.getDocument(),"pointerdown",this.#pointerdown),on(this.domContext.getDocument(),"pointerup",composeHandlers(this.#resetSelectionLock,this.#pointerupUserHandler)))}#pointerupUserHandler=e=>{this.#onPointerUpSnapshot(e)};#pointerdown=e=>{const node2=this.opts.ref.current,target2=e.target;!isHTMLElement$1(node2)||!isHTMLElement$1(target2)||!this.#enabledSnapshot||!isHighestLayer(this)||!contains$3(node2,target2)||(this.#onPointerDownSnapshot( +e),!e.defaultPrevented&&(this.#unsubSelectionLock=preventTextSelectionOverflow(node2,this.domContext.getDocument().body)))};#resetSelectionLock=()=>{this.#unsubSelectionLock(),this.#unsubSelectionLock=noop$1}}const getUserSelect=node2=>node2.style.userSelect||node2.style.webkitUserSelect;function preventTextSelectionOverflow(node2,body2){const originalBodyUserSelect=getUserSelect(body2),originalNodeUserSelect=getUserSelect(node2);return setUserSelect(body2,"none"),setUserSelect(node2,"text"),()=>{ +setUserSelect(body2,originalBodyUserSelect),setUserSelect(node2,originalNodeUserSelect)}}function setUserSelect(node2,value){node2.style.userSelect=value,node2.style.webkitUserSelect=value}function isHighestLayer(instance){const layersArr=[...globalThis.bitsTextSelectionLayers];if(!layersArr.length)return!1;const highestLayer=layersArr.at(-1);return highestLayer?highestLayer[0]===instance:!1}function Text_selection_layer($$anchor,$$props){push$1($$props,!0);let preventOverflowTextSelection=prop( +$$props,"preventOverflowTextSelection",3,!0),onPointerDown=prop($$props,"onPointerDown",3,noop$1),onPointerUp=prop($$props,"onPointerUp",3,noop$1);TextSelectionLayerState.create({id:boxWith$1(()=>$$props.id),onPointerDown:boxWith$1(()=>onPointerDown()),onPointerUp:boxWith$1(()=>onPointerUp()),enabled:boxWith$1(()=>$$props.enabled&&preventOverflowTextSelection()),ref:$$props.ref});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment), +pop()}globalThis.bitsIdCounter??={current:0};function useId(prefix="bits"){return globalThis.bitsIdCounter.current++,`${prefix}-${globalThis.bitsIdCounter.current}`}class SharedState{#factory;#subscribers=0;#state=state$1();#scope;constructor(factory){this.#factory=factory}#dispose(){this.#subscribers-=1,this.#scope&&this.#subscribers<=0&&(this.#scope(),set$1(this.#state,void 0),this.#scope=void 0)}get(...args){return this.#subscribers+=1,get$3(this.#state)===void 0&&(this.#scope=effect_root(()=>{ +set$1(this.#state,this.#factory(...args),!0)})),user_effect(()=>()=>{this.#dispose()}),get$3(this.#state)}}const lockMap=new SvelteMap;let initialBodyStyle=state$1(null),stopTouchMoveListener=null,cleanupTimeoutId=null,isInCleanupTransition=!1;const anyLocked=boxWith$1(()=>{for(const value of lockMap.values())if(value)return!0;return!1});let cleanupScheduledAt=null;const bodyLockStackCount=new SharedState(()=>{function resetBodyStyle(){document.body.setAttribute("style",get$3(initialBodyStyle)?? +""),document.body.style.removeProperty("--scrollbar-width"),isIOS&&stopTouchMoveListener?.(),set$1(initialBodyStyle,null)}function cancelPendingCleanup(){cleanupTimeoutId!==null&&(window.clearTimeout(cleanupTimeoutId),cleanupTimeoutId=null)}function scheduleCleanupIfNoNewLocks(delay,callback){cancelPendingCleanup(),isInCleanupTransition=!0,cleanupScheduledAt=Date.now();const currentCleanupId=cleanupScheduledAt,cleanupFn=()=>{cleanupTimeoutId=null,cleanupScheduledAt===currentCleanupId&&(isAnyLocked( +lockMap)?isInCleanupTransition=!1:(isInCleanupTransition=!1,callback()))},actualDelay=delay===null?24:delay;cleanupTimeoutId=window.setTimeout(cleanupFn,actualDelay)}function ensureInitialStyleCaptured(){get$3(initialBodyStyle)===null&&lockMap.size===0&&!isInCleanupTransition&&set$1(initialBodyStyle,document.body.getAttribute("style"),!0)}return watch$1(()=>anyLocked.current,()=>{if(!anyLocked.current)return;ensureInitialStyleCaptured(),isInCleanupTransition=!1;const htmlStyle=getComputedStyle(document. +documentElement),bodyStyle=getComputedStyle(document.body),hasStableGutter=htmlStyle.scrollbarGutter?.includes("stable")||bodyStyle.scrollbarGutter?.includes("stable"),verticalScrollbarWidth=window.innerWidth-document.documentElement.clientWidth,config2={padding:Number.parseInt(bodyStyle.paddingRight??"0",10)+verticalScrollbarWidth,margin:Number.parseInt(bodyStyle.marginRight??"0",10)};verticalScrollbarWidth>0&&!hasStableGutter&&(document.body.style.paddingRight=`${config2.padding}px`,document.body. +style.marginRight=`${config2.margin}px`,document.body.style.setProperty("--scrollbar-width",`${verticalScrollbarWidth}px`)),document.body.style.overflow="hidden",isIOS&&(stopTouchMoveListener=on(document,"touchmove",e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),afterTick(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),onDestroyEffect(()=>()=>{stopTouchMoveListener?.()}),{get lockMap(){return lockMap},resetBodyStyle, +scheduleCleanupIfNoNewLocks,cancelPendingCleanup,ensureInitialStyleCaptured}});class BodyScrollLock{#id=useId();#initialState;#restoreScrollDelay=()=>null;#countState;locked;constructor(initialState,restoreScrollDelay=()=>null){this.#initialState=initialState,this.#restoreScrollDelay=restoreScrollDelay,this.#countState=bodyLockStackCount.get(),this.#countState&&(this.#countState.cancelPendingCleanup(),this.#countState.ensureInitialStyleCaptured(),this.#countState.lockMap.set(this.#id,this.#initialState?? +!1),this.locked=boxWith$1(()=>this.#countState.lockMap.get(this.#id)??!1,v=>this.#countState.lockMap.set(this.#id,v)),onDestroyEffect(()=>{if(this.#countState.lockMap.delete(this.#id),isAnyLocked(this.#countState.lockMap))return;const restoreScrollDelay2=this.#restoreScrollDelay();this.#countState.scheduleCleanupIfNoNewLocks(restoreScrollDelay2,()=>{this.#countState.resetBodyStyle()})}))}}function isAnyLocked(map2){for(const[_,value]of map2)if(value)return!0;return!1}function Scroll_lock($$anchor,$$props){ +push$1($$props,!0);let preventScroll=prop($$props,"preventScroll",3,!0),restoreScrollDelay=prop($$props,"restoreScrollDelay",3,null);preventScroll()&&new BodyScrollLock(preventScroll(),()=>restoreScrollDelay()),pop()}var root_6$y=from_html(" ",1),root_8$A=from_html("
",1);function Alert_dialog_content$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),forceMount=prop($$props,"forceM\ +ount",3,!1),interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"ignore"),onCloseAutoFocus=prop($$props,"onCloseAutoFocus",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),onOpenAutoFocus=prop($$props,"onOpenAutoFocus",3,noop$1),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),preventScroll=prop($$props,"preventScroll",3,!0),trapFocus=prop($$props,"trapFocus",3,!0),restoreScrollDelay=prop($$props,"restoreScrollDelay",3,null),restProps=rest_props($$props, +["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","interactOutsideBehavior","onCloseAutoFocus","onEscapeKeydown","onOpenAutoFocus","onInteractOutside","preventScroll","trapFocus","restoreScrollDelay"]);const contentState=DialogContentState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_2=$$anchor2=>{Focus_scope( +$$anchor2,{get ref(){return contentState.opts.ref},loop:!0,get trapFocus(){return trapFocus()},get enabled(){return contentState.root.opts.open.current},get onCloseAutoFocus(){return onCloseAutoFocus()},onOpenAutoFocus:e=>{onOpenAutoFocus()(e),!e.defaultPrevented&&(e.preventDefault(),afterSleep(0,()=>contentState.opts.ref.current?.focus()))},focusScope:($$anchor3,$$arg0)=>{let focusScopeProps=()=>$$arg0?.().props;Escape_layer($$anchor3,spread_props(()=>get$3(mergedProps),{get enabled(){return contentState. +root.opts.open.current},get ref(){return contentState.opts.ref},onEscapeKeydown:e=>{onEscapeKeydown()(e),!e.defaultPrevented&&contentState.root.handleClose()},children:($$anchor4,$$slotProps)=>{Dismissible_layer($$anchor4,spread_props(()=>get$3(mergedProps),{get ref(){return contentState.opts.ref},get enabled(){return contentState.root.opts.open.current},get interactOutsideBehavior(){return interactOutsideBehavior()},onInteractOutside:e=>{onInteractOutside()(e),!e.defaultPrevented&&contentState. +root.handleClose()},children:($$anchor5,$$slotProps2)=>{Text_selection_layer($$anchor5,spread_props(()=>get$3(mergedProps),{get ref(){return contentState.opts.ref},get enabled(){return contentState.root.opts.open.current},children:($$anchor6,$$slotProps3)=>{var fragment_5=comment$2(),node_1=first_child(fragment_5);{var consequent_1=$$anchor7=>{var fragment_6=root_6$y(),node_2=first_child(fragment_6);{var consequent=$$anchor8=>{Scroll_lock($$anchor8,{get preventScroll(){return preventScroll()},get restoreScrollDelay(){ +return restoreScrollDelay()}})};if_block(node_2,$$render=>{contentState.root.opts.open.current&&$$render(consequent)})}var node_3=sibling(node_2,2);{let $0=user_derived(()=>({props:mergeProps(get$3(mergedProps),focusScopeProps()),...contentState.snippetProps}));snippet(node_3,()=>$$props.child,()=>get$3($0))}append($$anchor7,fragment_6)},alternate=$$anchor7=>{var fragment_8=root_8$A(),node_4=first_child(fragment_8);Scroll_lock(node_4,{get preventScroll(){return preventScroll()}});var div=sibling( +node_4,2);attribute_effect(div,$0=>({...$0}),[()=>mergeProps(get$3(mergedProps),focusScopeProps())]);var node_5=child(div);snippet(node_5,()=>$$props.children??noop$3),reset(div),append($$anchor7,fragment_8)};if_block(node_1,$$render=>{$$props.child?$$render(consequent_1):$$render(alternate,-1)})}append($$anchor6,fragment_5)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};if_block(node2,$$render=>{(contentState.shouldRender||forceMount())&&$$render( +consequent_2)})}append($$anchor,fragment),pop()}var root_3$15=from_html("
");function Dialog_overlay$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),forceMount=prop($$props,"forceMount",3,!1),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const overlayState=DialogOverlayState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(), +v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,overlayState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_2=first_child(fragment_2);{let $0=user_derived(()=>({props:mergeProps(get$3(mergedProps)),...overlayState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$3($0))}append($$anchor3,fragment_2)},alternate=$$anchor3=>{ +var div=root_3$15();attribute_effect(div,$0=>({...$0}),[()=>mergeProps(get$3(mergedProps))]);var node_3=child(div);snippet(node_3,()=>$$props.children??noop$3,()=>overlayState.snippetProps),reset(div),append($$anchor3,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment_1)};if_block(node2,$$render=>{(overlayState.shouldRender||forceMount())&&$$render(consequent_1)})}append($$anchor,fragment),pop()}var root_2$1A=from_html("
\ +
");function Dialog_description$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","children","child","ref"]);const descriptionState=DialogDescriptionState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,descriptionState.props));var fragment=comment$2(),node2=first_child( +fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1A();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment), +pop()}const checkboxAttrs=createBitsAttrs({component:"checkbox",parts:["root","group","group-label","input"]}),CheckboxGroupContext=new Context$1("Checkbox.Group"),CheckboxRootContext=new Context$1("Checkbox.Root");class CheckboxRootState{static create(opts,group=null){return CheckboxRootContext.set(new CheckboxRootState(opts,group))}opts;group;#trueName=user_derived(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this.opts.name.current);get trueName(){return get$3(this.#trueName)}set trueName(value){ +set$1(this.#trueName,value)}#trueRequired=user_derived(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current);get trueRequired(){return get$3(this.#trueRequired)}set trueRequired(value){set$1(this.#trueRequired,value)}#trueDisabled=user_derived(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current);get trueDisabled(){return get$3(this.#trueDisabled)}set trueDisabled(value){set$1(this.#trueDisabled,value)}#trueReadonly=user_derived(()=>this.group&& +this.group.opts.readonly.current?!0:this.opts.readonly.current);get trueReadonly(){return get$3(this.#trueReadonly)}set trueReadonly(value){set$1(this.#trueReadonly,value)}attachment;constructor(opts,group){this.opts=opts,this.group=group,this.attachment=attachRef(this.opts.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),watch$1.pre([()=>snapshot(this.group?.opts.value.current),()=>this.opts.value.current],([groupValue,value])=>{!groupValue||!value||(this.opts. +checked.current=groupValue.includes(value))}),watch$1.pre(()=>this.opts.checked.current,checked=>{this.group&&(checked?this.group?.addValue(this.opts.value.current):this.group?.removeValue(this.opts.value.current))})}onkeydown(e){if(!(this.trueDisabled||this.trueReadonly)){if(e.key===ENTER){e.preventDefault(),this.opts.type.current==="submit"&&e.currentTarget.closest("form")?.requestSubmit();return}e.key===SPACE&&(e.preventDefault(),this.#toggle())}}#toggle(){this.opts.indeterminate.current?(this. +opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current}onclick(e){if(!(this.trueDisabled||this.trueReadonly)){if(this.opts.type.current==="submit"){this.#toggle();return}e.preventDefault(),this.#toggle()}}#snippetProps=user_derived(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived( +()=>({id:this.opts.id.current,role:"checkbox",type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":getAriaChecked(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":boolToStr(this.trueRequired),"aria-readonly":boolToStr(this.trueReadonly),"data-disabled":boolToEmptyStrOrUndef(this.trueDisabled),"data-readonly":boolToEmptyStrOrUndef(this.trueReadonly),"data-state":getCheckboxDataState(this.opts.checked.current,this.opts.indeterminate.current),[checkboxAttrs. +root]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class CheckboxInputState{static create(){return new CheckboxInputState(CheckboxRootContext.get())}root;#trueChecked=user_derived(()=>this.root.group?!!(this.root.opts.value.current!==void 0&&this.root.group.opts.value.current.includes(this.root.opts.value.current)):this.root.opts.checked.current);get trueChecked(){return get$3(this.#trueChecked)}set trueChecked(value){ +set$1(this.#trueChecked,value)}#shouldRender=user_derived(()=>!!this.root.trueName);get shouldRender(){return get$3(this.#shouldRender)}set shouldRender(value){set$1(this.#shouldRender,value)}constructor(root2){this.root=root2,this.onfocus=this.onfocus.bind(this)}onfocus(_){isHTMLElement$1(this.root.opts.ref.current)&&this.root.opts.ref.current.focus()}#props=user_derived(()=>({type:"checkbox",checked:this.root.opts.checked.current===!0,disabled:this.root.trueDisabled,required:this.root.trueRequired, +name:this.root.trueName,value:this.root.opts.value.current,readonly:this.root.trueReadonly,onfocus:this.onfocus}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}function getCheckboxDataState(checked,indeterminate){return indeterminate?"indeterminate":checked?"checked":"unchecked"}enable_legacy_mode_flag();var root_1$1d=from_html(""),root_2$1z=from_html("");function Hidden_input($$anchor,$$props){push$1($$props,!0);let value=prop($$props,"value", +15),restProps=rest_props($$props,["$$slots","$$events","$$legacy","value"]);const mergedProps=user_derived(()=>mergeProps(restProps,{"aria-hidden":"true",tabindex:-1,style:{...srOnlyStyles$1,position:"absolute",top:"0",left:"0"}}));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var input=root_1$1d();attribute_effect(input,()=>({...get$3(mergedProps),value:value()}),void 0,void 0,void 0,void 0,!0),append($$anchor2,input)},alternate=$$anchor2=>{var input_1=root_2$1z(); +attribute_effect(input_1,()=>({...get$3(mergedProps)}),void 0,void 0,void 0,void 0,!0),bind_value(input_1,value),append($$anchor2,input_1)};if_block(node2,$$render=>{get$3(mergedProps).type==="checkbox"?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}function Checkbox_input($$anchor,$$props){push$1($$props,!1);const inputState=CheckboxInputState.create();init();var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Hidden_input($$anchor2,spread_props( +()=>inputState.props))};if_block(node2,$$render=>{inputState.shouldRender&&$$render(consequent)})}append($$anchor,fragment),pop()}var root_2$1y=from_html(""),root$1_=from_html(" ",1);function Checkbox$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let checked=prop($$props,"checked",15,!1),ref2=prop($$props,"ref",15,null),disabled=prop($$props,"disabled",3,!1),required2=prop($$props,"required",3,!1),name=prop($$props,"name",3,void 0),value=prop($$props,"val\ +ue",3,"on"),id2=prop($$props,"id",19,()=>createId(uid2)),indeterminate=prop($$props,"indeterminate",15,!1),type2=prop($$props,"type",3,"button"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","checked","ref","onCheckedChange","children","disabled","required","name","value","id","indeterminate","onIndeterminateChange","child","type","readonly"]);const group=CheckboxGroupContext.getOr(null);group&&value()&&(group.opts.value.current.includes(value())?checked(!0):checked(!1)),watch$1. +pre(()=>value(),()=>{group&&value()&&(group.opts.value.current.includes(value())?checked(!0):checked(!1))});const rootState=CheckboxRootState.create({checked:boxWith$1(()=>checked(),v=>{checked(v),$$props.onCheckedChange?.(v)}),disabled:boxWith$1(()=>disabled()??!1),required:boxWith$1(()=>required2()),name:boxWith$1(()=>name()),value:boxWith$1(()=>value()),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),indeterminate:boxWith$1(()=>indeterminate(),v=>{indeterminate(v),$$props.onIndeterminateChange?.( +v)}),type:boxWith$1(()=>type2()),readonly:boxWith$1(()=>!!$$props.readonly)},group),mergedProps=user_derived(()=>mergeProps({...restProps},rootState.props));var fragment=root$1_(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>({props:get$3(mergedProps),...rootState.snippetProps}));snippet(node_1,()=>$$props.child,()=>get$3($0))}append($$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1y();attribute_effect( +button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3,()=>rootState.snippetProps),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}var node_3=sibling(node2,2);Checkbox_input(node_3,{}),append($$anchor,fragment),pop()}const collapsibleAttrs=createBitsAttrs({component:"collapsible",parts:["root","content","trigger"]}),CollapsibleRootContext=new Context$1("Collapsible.Ro\ +ot");class CollapsibleRootState{static create(opts){return CollapsibleRootContext.set(new CollapsibleRootState(opts))}opts;attachment;#contentNode=state$1(null);get contentNode(){return get$3(this.#contentNode)}set contentNode(value){set$1(this.#contentNode,value,!0)}contentPresence;#contentId=state$1(void 0);get contentId(){return get$3(this.#contentId)}set contentId(value){set$1(this.#contentId,value,!0)}constructor(opts){this.opts=opts,this.toggleOpen=this.toggleOpen.bind(this),this.attachment= +attachRef(this.opts.ref),this.contentPresence=new PresenceManager({ref:boxWith$1(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}})}toggleOpen(){this.opts.open.current=!this.opts.open.current}#props=user_derived(()=>({id:this.opts.id.current,"data-state":getDataOpenClosed(this.opts.open.current),"data-disabled":boolToEmptyStrOrUndef(this.opts.disabled.current),[collapsibleAttrs.root]:"",...this.attachment}));get props(){return get$3( +this.#props)}set props(value){set$1(this.#props,value)}}class CollapsibleContentState{static create(opts){return new CollapsibleContentState(opts,CollapsibleRootContext.get())}opts;root;attachment;#present=user_derived(()=>this.opts.hiddenUntilFound.current?this.root.opts.open.current:this.opts.forceMount.current||this.root.opts.open.current);get present(){return get$3(this.#present)}set present(value){set$1(this.#present,value)}#originalStyles;#isMountAnimationPrevented=state$1(!1);#width=state$1( +0);#height=state$1(0);constructor(opts,root2){this.opts=opts,this.root=root2,set$1(this.#isMountAnimationPrevented,root2.opts.open.current,!0),this.root.contentId=this.opts.id.current,this.attachment=attachRef(this.opts.ref,v=>this.root.contentNode=v),watch$1.pre(()=>this.opts.id.current,id2=>{this.root.contentId=id2}),user_pre_effect(()=>{const rAF=requestAnimationFrame(()=>{set$1(this.#isMountAnimationPrevented,!1)});return()=>{cancelAnimationFrame(rAF)}}),watch$1.pre([()=>this.opts.ref.current, +()=>this.opts.hiddenUntilFound.current],([node2,hiddenUntilFound])=>!node2||!hiddenUntilFound?void 0:on(node2,"beforematch",()=>{this.root.opts.open.current||requestAnimationFrame(()=>{this.root.opts.open.current=!0})})),watch$1([()=>this.opts.ref.current,()=>this.present],([node2])=>{node2&&afterTick(()=>{if(!this.opts.ref.current)return;this.#originalStyles=this.#originalStyles||{transitionDuration:node2.style.transitionDuration,animationName:node2.style.animationName},node2.style.transitionDuration= +"0s",node2.style.animationName="none";const rect=node2.getBoundingClientRect();if(set$1(this.#height,rect.height,!0),set$1(this.#width,rect.width,!0),!get$3(this.#isMountAnimationPrevented)){const{animationName,transitionDuration}=this.#originalStyles;node2.style.transitionDuration=transitionDuration,node2.style.animationName=animationName}})})}get shouldRender(){return this.root.contentPresence.shouldRender}#snippetProps=user_derived(()=>({open:this.root.opts.open.current}));get snippetProps(){ +return get$3(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":get$3(this.#height)?`${get$3(this.#height)}px`:void 0,"--bits-collapsible-content-width":get$3(this.#width)?`${get$3(this.#width)}px`:void 0},hidden:this.opts.hiddenUntilFound.current&&!this.root.opts.open.current?"until-found":void 0,"data-state":getDataOpenClosed(this.root.opts.open.current),...getDataTransitionAttrs( +this.root.contentPresence.transitionStatus),"data-disabled":boolToEmptyStrOrUndef(this.root.opts.disabled.current),[collapsibleAttrs.content]:"",...this.opts.hiddenUntilFound.current&&!this.shouldRender?{}:{hidden:this.opts.hiddenUntilFound.current?!this.shouldRender:this.opts.forceMount.current?void 0:!this.shouldRender},...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class CollapsibleTriggerState{static create(opts){return new CollapsibleTriggerState( +opts,CollapsibleRootContext.get())}opts;root;attachment;#isDisabled=user_derived(()=>this.opts.disabled.current||this.root.opts.disabled.current);constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){if(!get$3(this.#isDisabled)){if(e.button!==0)return e.preventDefault();this.root.toggleOpen()}}onkeydown(e){get$3(this.#isDisabled)||(e.key===SPACE||e.key===ENTER)&&(e.preventDefault(), +this.root.toggleOpen())}#props=user_derived(()=>({id:this.opts.id.current,type:"button",disabled:get$3(this.#isDisabled),"aria-controls":this.root.contentId,"aria-expanded":boolToStr(this.root.opts.open.current),"data-state":getDataOpenClosed(this.root.opts.open.current),"data-disabled":boolToEmptyStrOrUndef(get$3(this.#isDisabled)),[collapsibleAttrs.trigger]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props, +value)}}var root_2$1x=from_html("
");function Collapsible$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),open2=prop($$props,"open",15,!1),disabled=prop($$props,"disabled",3,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","id","ref","ope\ +n","disabled","onOpenChange","onOpenChangeComplete"]);const rootState=CollapsibleRootState.create({open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),disabled:boxWith$1(()=>disabled()),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())}),mergedProps=user_derived(()=>mergeProps(restProps,rootState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child( +fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1x();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_2$1w=from_html("
");function Collapsible_content$1($$anchor,$$props){ +const uid2=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),forceMount=prop($$props,"forceMount",3,!1),hiddenUntilFound=prop($$props,"hiddenUntilFound",3,!1),id2=prop($$props,"id",19,()=>createId(uid2)),restProps=rest_props($$props,["$$slots","$$events","$$legacy","child","ref","forceMount","hiddenUntilFound","children","id"]);const contentState=CollapsibleContentState.create({id:boxWith$1(()=>id2()),forceMount:boxWith$1(()=>forceMount()),hiddenUntilFound:boxWith$1(()=>hiddenUntilFound()), +ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>({...contentState.snippetProps,props:get$3(mergedProps)}));snippet(node_1,()=>$$props.child,()=>get$3($0))}append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1w();attribute_effect(div,()=>({...get$3(mergedProps)})); +var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_2$1v=from_html("");function Collapsible_trigger$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid2)),disabled=prop($$props,"disabled",3,!1),restProps=rest_props($$props, +["$$slots","$$events","$$legacy","children","child","ref","id","disabled"]);const triggerState=CollapsibleTriggerState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),disabled:boxWith$1(()=>disabled())}),mergedProps=user_derived(()=>mergeProps(restProps,triggerState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})), +append($$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1v();attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}const sides=["top","right","bottom","left"],min=Math.min,max=Math.max,round=Math.round,floor=Math.floor,createCoords=v=>({x:v,y:v}),oppositeSideMap={ +left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$1(start2,value,end){return max(start2,min(value,end))}function evaluate(value,param){return typeof value=="function"?value(param):value}function getSide$1(placement){return placement.split("-")[0]}function getAlignment(placement){return placement.split("-")[1]}function getOppositeAxis(axis){return axis==="x"?"y":"x"}function getAxisLength(axis){return axis==="y"?"height":"width"}const yAxisSides=new Set( +["top","bottom"]);function getSideAxis(placement){return yAxisSides.has(getSide$1(placement))?"y":"x"}function getAlignmentAxis(placement){return getOppositeAxis(getSideAxis(placement))}function getAlignmentSides(placement,rects,rtl){rtl===void 0&&(rtl=!1);const alignment=getAlignment(placement),alignmentAxis=getAlignmentAxis(placement),length=getAxisLength(alignmentAxis);let mainAlignmentSide=alignmentAxis==="x"?alignment===(rtl?"end":"start")?"right":"left":alignment==="start"?"bottom":"top";return rects. +reference[length]>rects.floating[length]&&(mainAlignmentSide=getOppositePlacement(mainAlignmentSide)),[mainAlignmentSide,getOppositePlacement(mainAlignmentSide)]}function getExpandedPlacements(placement){const oppositePlacement=getOppositePlacement(placement);return[getOppositeAlignmentPlacement(placement),oppositePlacement,getOppositeAlignmentPlacement(oppositePlacement)]}function getOppositeAlignmentPlacement(placement){return placement.replace(/start|end/g,alignment=>oppositeAlignmentMap[alignment])} +const lrPlacement=["left","right"],rlPlacement=["right","left"],tbPlacement=["top","bottom"],btPlacement=["bottom","top"];function getSideList(side,isStart,rtl){switch(side){case"top":case"bottom":return rtl?isStart?rlPlacement:lrPlacement:isStart?lrPlacement:rlPlacement;case"left":case"right":return isStart?tbPlacement:btPlacement;default:return[]}}function getOppositeAxisPlacements(placement,flipAlignment,direction,rtl){const alignment=getAlignment(placement);let list2=getSideList(getSide$1(placement), +direction==="start",rtl);return alignment&&(list2=list2.map(side=>side+"-"+alignment),flipAlignment&&(list2=list2.concat(list2.map(getOppositeAlignmentPlacement)))),list2}function getOppositePlacement(placement){return placement.replace(/left|right|bottom|top/g,side=>oppositeSideMap[side])}function expandPaddingObject(padding){return{top:0,right:0,bottom:0,left:0,...padding}}function getPaddingObject(padding){return typeof padding!="number"?expandPaddingObject(padding):{top:padding,right:padding, +bottom:padding,left:padding}}function rectToClientRect(rect){const{x,y,width,height}=rect;return{width,height,top:y,left:x,right:x+width,bottom:y+height,x,y}}function computeCoordsFromPlacement(_ref,placement,rtl){let{reference,floating}=_ref;const sideAxis=getSideAxis(placement),alignmentAxis=getAlignmentAxis(placement),alignLength=getAxisLength(alignmentAxis),side=getSide$1(placement),isVertical=sideAxis==="y",commonX=reference.x+reference.width/2-floating.width/2,commonY=reference.y+reference. +height/2-floating.height/2,commonAlign=reference[alignLength]/2-floating[alignLength]/2;let coords;switch(side){case"top":coords={x:commonX,y:reference.y-floating.height};break;case"bottom":coords={x:commonX,y:reference.y+reference.height};break;case"right":coords={x:reference.x+reference.width,y:commonY};break;case"left":coords={x:reference.x-floating.width,y:commonY};break;default:coords={x:reference.x,y:reference.y}}switch(getAlignment(placement)){case"start":coords[alignmentAxis]-=commonAlign* +(rtl&&isVertical?-1:1);break;case"end":coords[alignmentAxis]+=commonAlign*(rtl&&isVertical?-1:1);break}return coords}const computePosition$1=async(reference,floating,config2)=>{const{placement="bottom",strategy="absolute",middleware=[],platform:platform2}=config2,validMiddleware=middleware.filter(Boolean),rtl=await(platform2.isRTL==null?void 0:platform2.isRTL(floating));let rects=await platform2.getElementRects({reference,floating,strategy}),{x,y}=computeCoordsFromPlacement(rects,placement,rtl), +statefulPlacement=placement,middlewareData={},resetCount=0;for(let i=0;i({name:"arrow",options,async fn(state2){const{x,y,placement,rects,platform:platform2,elements,middlewareData}=state2,{element:element2,padding=0}=evaluate(options,state2)||{};if(element2==null)return{};const paddingObject=getPaddingObject(padding),coords={x,y},axis=getAlignmentAxis(placement),length=getAxisLength(axis),arrowDimensions=await platform2.getDimensions(element2),isYAxis=axis==="y",minProp=isYAxis?"top":"left",maxProp=isYAxis? +"bottom":"right",clientProp=isYAxis?"clientHeight":"clientWidth",endDiff=rects.reference[length]+rects.reference[axis]-coords[axis]-rects.floating[length],startDiff=coords[axis]-rects.reference[axis],arrowOffsetParent=await(platform2.getOffsetParent==null?void 0:platform2.getOffsetParent(element2));let clientSize=arrowOffsetParent?arrowOffsetParent[clientProp]:0;(!clientSize||!await(platform2.isElement==null?void 0:platform2.isElement(arrowOffsetParent)))&&(clientSize=elements.floating[clientProp]|| +rects.floating[length]);const centerToReference=endDiff/2-startDiff/2,largestPossiblePadding=clientSize/2-arrowDimensions[length]/2-1,minPadding=min(paddingObject[minProp],largestPossiblePadding),maxPadding=min(paddingObject[maxProp],largestPossiblePadding),min$1=minPadding,max2=clientSize-arrowDimensions[length]-maxPadding,center=clientSize/2-arrowDimensions[length]/2+centerToReference,offset2=clamp$1(min$1,center,max2),shouldAddOffset=!middlewareData.arrow&&getAlignment(placement)!=null&¢er!== +offset2&&rects.reference[length]/2-(centerside2<= +0)){var _middlewareData$flip2,_overflowsData$filter;const nextIndex=(((_middlewareData$flip2=middlewareData.flip)==null?void 0:_middlewareData$flip2.index)||0)+1,nextPlacement=placements[nextIndex];if(nextPlacement&&(!(checkCrossAxis==="alignment"?initialSideAxis!==getSideAxis(nextPlacement):!1)||overflowsData.every(d2=>d2.overflows[0]>0&&getSideAxis(d2.placement)===initialSideAxis)))return{data:{index:nextIndex,overflows:overflowsData},reset:{placement:nextPlacement}};let resetPlacement=(_overflowsData$filter= +overflowsData.filter(d2=>d2.overflows[0]<=0).sort((a,b)=>a.overflows[1]-b.overflows[1])[0])==null?void 0:_overflowsData$filter.placement;if(!resetPlacement)switch(fallbackStrategy){case"bestFit":{var _overflowsData$filter2;const placement2=(_overflowsData$filter2=overflowsData.filter(d2=>{if(hasFallbackAxisSideDirection){const currentSideAxis=getSideAxis(d2.placement);return currentSideAxis===initialSideAxis||currentSideAxis==="y"}return!0}).map(d2=>[d2.placement,d2.overflows.filter(overflow2=>overflow2> +0).reduce((acc,overflow2)=>acc+overflow2,0)]).sort((a,b)=>a[1]-b[1])[0])==null?void 0:_overflowsData$filter2[0];placement2&&(resetPlacement=placement2);break}case"initialPlacement":resetPlacement=initialPlacement;break}if(placement!==resetPlacement)return{reset:{placement:resetPlacement}}}return{}}}};function getSideOffsets(overflow,rect){return{top:overflow.top-rect.height,right:overflow.right-rect.width,bottom:overflow.bottom-rect.height,left:overflow.left-rect.width}}function isAnySideFullyClipped(overflow){ +return sides.some(side=>overflow[side]>=0)}const hide$1=function(options){return options===void 0&&(options={}),{name:"hide",options,async fn(state2){const{rects}=state2,{strategy="referenceHidden",...detectOverflowOptions}=evaluate(options,state2);switch(strategy){case"referenceHidden":{const overflow=await detectOverflow(state2,{...detectOverflowOptions,elementContext:"reference"}),offsets=getSideOffsets(overflow,rects.reference);return{data:{referenceHiddenOffsets:offsets,referenceHidden:isAnySideFullyClipped( +offsets)}}}case"escaped":{const overflow=await detectOverflow(state2,{...detectOverflowOptions,altBoundary:!0}),offsets=getSideOffsets(overflow,rects.floating);return{data:{escapedOffsets:offsets,escaped:isAnySideFullyClipped(offsets)}}}default:return{}}}}},originSides=new Set(["left","top"]);async function convertValueToCoords(state2,options){const{placement,platform:platform2,elements}=state2,rtl=await(platform2.isRTL==null?void 0:platform2.isRTL(elements.floating)),side=getSide$1(placement),alignment=getAlignment( +placement),isVertical=getSideAxis(placement)==="y",mainAxisMulti=originSides.has(side)?-1:1,crossAxisMulti=rtl&&isVertical?-1:1,rawValue=evaluate(options,state2);let{mainAxis,crossAxis,alignmentAxis}=typeof rawValue=="number"?{mainAxis:rawValue,crossAxis:0,alignmentAxis:null}:{mainAxis:rawValue.mainAxis||0,crossAxis:rawValue.crossAxis||0,alignmentAxis:rawValue.alignmentAxis};return alignment&&typeof alignmentAxis=="number"&&(crossAxis=alignment==="end"?alignmentAxis*-1:alignmentAxis),isVertical? +{x:crossAxis*crossAxisMulti,y:mainAxis*mainAxisMulti}:{x:mainAxis*mainAxisMulti,y:crossAxis*crossAxisMulti}}const offset$1=function(options){return options===void 0&&(options=0),{name:"offset",options,async fn(state2){var _middlewareData$offse,_middlewareData$arrow;const{x,y,placement,middlewareData}=state2,diffCoords=await convertValueToCoords(state2,options);return placement===((_middlewareData$offse=middlewareData.offset)==null?void 0:_middlewareData$offse.placement)&&(_middlewareData$arrow=middlewareData. +arrow)!=null&&_middlewareData$arrow.alignmentOffset?{}:{x:x+diffCoords.x,y:y+diffCoords.y,data:{...diffCoords,placement}}}}},shift$1=function(options){return options===void 0&&(options={}),{name:"shift",options,async fn(state2){const{x,y,placement}=state2,{mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!1,limiter={fn:_ref=>{let{x:x2,y:y2}=_ref;return{x:x2,y:y2}}},...detectOverflowOptions}=evaluate(options,state2),coords={x,y},overflow=await detectOverflow(state2,detectOverflowOptions),crossAxis=getSideAxis( +getSide$1(placement)),mainAxis=getOppositeAxis(crossAxis);let mainAxisCoord=coords[mainAxis],crossAxisCoord=coords[crossAxis];if(checkMainAxis){const minSide=mainAxis==="y"?"top":"left",maxSide=mainAxis==="y"?"bottom":"right",min2=mainAxisCoord+overflow[minSide],max2=mainAxisCoord-overflow[maxSide];mainAxisCoord=clamp$1(min2,mainAxisCoord,max2)}if(checkCrossAxis){const minSide=crossAxis==="y"?"top":"left",maxSide=crossAxis==="y"?"bottom":"right",min2=crossAxisCoord+overflow[minSide],max2=crossAxisCoord- +overflow[maxSide];crossAxisCoord=clamp$1(min2,crossAxisCoord,max2)}const limitedCoords=limiter.fn({...state2,[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord});return{...limitedCoords,data:{x:limitedCoords.x-x,y:limitedCoords.y-y,enabled:{[mainAxis]:checkMainAxis,[crossAxis]:checkCrossAxis}}}}}},limitShift$1=function(options){return options===void 0&&(options={}),{options,fn(state2){const{x,y,placement,rects,middlewareData}=state2,{offset:offset2=0,mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!0}=evaluate( +options,state2),coords={x,y},crossAxis=getSideAxis(placement),mainAxis=getOppositeAxis(crossAxis);let mainAxisCoord=coords[mainAxis],crossAxisCoord=coords[crossAxis];const rawOffset=evaluate(offset2,state2),computedOffset=typeof rawOffset=="number"?{mainAxis:rawOffset,crossAxis:0}:{mainAxis:0,crossAxis:0,...rawOffset};if(checkMainAxis){const len=mainAxis==="y"?"height":"width",limitMin=rects.reference[mainAxis]-rects.floating[len]+computedOffset.mainAxis,limitMax=rects.reference[mainAxis]+rects. +reference[len]-computedOffset.mainAxis;mainAxisCoordlimitMax&&(mainAxisCoord=limitMax)}if(checkCrossAxis){var _middlewareData$offse,_middlewareData$offse2;const len=mainAxis==="y"?"width":"height",isOriginSide=originSides.has(getSide$1(placement)),limitMin=rects.reference[crossAxis]-rects.floating[len]+(isOriginSide&&((_middlewareData$offse=middlewareData.offset)==null?void 0:_middlewareData$offse[crossAxis])||0)+(isOriginSide?0:computedOffset.crossAxis), +limitMax=rects.reference[crossAxis]+rects.reference[len]+(isOriginSide?0:((_middlewareData$offse2=middlewareData.offset)==null?void 0:_middlewareData$offse2[crossAxis])||0)-(isOriginSide?computedOffset.crossAxis:0);crossAxisCoordlimitMax&&(crossAxisCoord=limitMax)}return{[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord}}}},size$1=function(options){return options===void 0&&(options={}),{name:"size",options,async fn(state2){var _state$middlewareData, +_state$middlewareData2;const{placement,rects,platform:platform2,elements}=state2,{apply=()=>{},...detectOverflowOptions}=evaluate(options,state2),overflow=await detectOverflow(state2,detectOverflowOptions),side=getSide$1(placement),alignment=getAlignment(placement),isYAxis=getSideAxis(placement)==="y",{width,height}=rects.floating;let heightSide,widthSide;side==="top"||side==="bottom"?(heightSide=side,widthSide=alignment===(await(platform2.isRTL==null?void 0:platform2.isRTL(elements.floating))?"\ +start":"end")?"left":"right"):(widthSide=side,heightSide=alignment==="end"?"top":"bottom");const maximumClippingHeight=height-overflow.top-overflow.bottom,maximumClippingWidth=width-overflow.left-overflow.right,overflowAvailableHeight=min(height-overflow[heightSide],maximumClippingHeight),overflowAvailableWidth=min(width-overflow[widthSide],maximumClippingWidth),noShift=!state2.middlewareData.shift;let availableHeight=overflowAvailableHeight,availableWidth=overflowAvailableWidth;if((_state$middlewareData= +state2.middlewareData.shift)!=null&&_state$middlewareData.enabled.x&&(availableWidth=maximumClippingWidth),(_state$middlewareData2=state2.middlewareData.shift)!=null&&_state$middlewareData2.enabled.y&&(availableHeight=maximumClippingHeight),noShift&&!alignment){const xMin=max(overflow.left,0),xMax=max(overflow.right,0),yMin=max(overflow.top,0),yMax=max(overflow.bottom,0);isYAxis?availableWidth=width-2*(xMin!==0||xMax!==0?xMin+xMax:max(overflow.left,overflow.right)):availableHeight=height-2*(yMin!== +0||yMax!==0?yMin+yMax:max(overflow.top,overflow.bottom))}await apply({...state2,availableWidth,availableHeight});const nextDimensions=await platform2.getDimensions(elements.floating);return width!==nextDimensions.width||height!==nextDimensions.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<"u"}function getNodeName(node2){return isNode(node2)?(node2.nodeName||"").toLowerCase():"#document"}function getWindow(node2){var _node$ownerDocument;return(node2==null||(_node$ownerDocument= +node2.ownerDocument)==null?void 0:_node$ownerDocument.defaultView)||window}function getDocumentElement(node2){var _ref;return(_ref=(isNode(node2)?node2.ownerDocument:node2.document)||window.document)==null?void 0:_ref.documentElement}function isNode(value){return hasWindow()?value instanceof Node||value instanceof getWindow(value).Node:!1}function isElement(value){return hasWindow()?value instanceof Element||value instanceof getWindow(value).Element:!1}function isHTMLElement(value){return hasWindow()? +value instanceof HTMLElement||value instanceof getWindow(value).HTMLElement:!1}function isShadowRoot(value){return!hasWindow()||typeof ShadowRoot>"u"?!1:value instanceof ShadowRoot||value instanceof getWindow(value).ShadowRoot}const invalidOverflowDisplayValues=new Set(["inline","contents"]);function isOverflowElement(element2){const{overflow,overflowX,overflowY,display}=getComputedStyle$1(element2);return/auto|scroll|overlay|hidden|clip/.test(overflow+overflowY+overflowX)&&!invalidOverflowDisplayValues. +has(display)}const tableElements=new Set(["table","td","th"]);function isTableElement(element2){return tableElements.has(getNodeName(element2))}const topLayerSelectors=[":popover-open",":modal"];function isTopLayer(element2){return topLayerSelectors.some(selector=>{try{return element2.matches(selector)}catch{return!1}})}const transformProperties=["transform","translate","scale","rotate","perspective"],willChangeValues=["transform","translate","scale","rotate","perspective","filter"],containValues=[ +"paint","layout","strict","content"];function isContainingBlock(elementOrCss){const webkit=isWebKit(),css2=isElement(elementOrCss)?getComputedStyle$1(elementOrCss):elementOrCss;return transformProperties.some(value=>css2[value]?css2[value]!=="none":!1)||(css2.containerType?css2.containerType!=="normal":!1)||!webkit&&(css2.backdropFilter?css2.backdropFilter!=="none":!1)||!webkit&&(css2.filter?css2.filter!=="none":!1)||willChangeValues.some(value=>(css2.willChange||"").includes(value))||containValues. +some(value=>(css2.contain||"").includes(value))}function getContainingBlock(element2){let currentNode=getParentNode(element2);for(;isHTMLElement(currentNode)&&!isLastTraversableNode(currentNode);){if(isContainingBlock(currentNode))return currentNode;if(isTopLayer(currentNode))return null;currentNode=getParentNode(currentNode)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const lastTraversableNodeNames=new Set(["html","body", +"#document"]);function isLastTraversableNode(node2){return lastTraversableNodeNames.has(getNodeName(node2))}function getComputedStyle$1(element2){return getWindow(element2).getComputedStyle(element2)}function getNodeScroll(element2){return isElement(element2)?{scrollLeft:element2.scrollLeft,scrollTop:element2.scrollTop}:{scrollLeft:element2.scrollX,scrollTop:element2.scrollY}}function getParentNode(node2){if(getNodeName(node2)==="html")return node2;const result=node2.assignedSlot||node2.parentNode|| +isShadowRoot(node2)&&node2.host||getDocumentElement(node2);return isShadowRoot(result)?result.host:result}function getNearestOverflowAncestor(node2){const parentNode=getParentNode(node2);return isLastTraversableNode(parentNode)?node2.ownerDocument?node2.ownerDocument.body:node2.body:isHTMLElement(parentNode)&&isOverflowElement(parentNode)?parentNode:getNearestOverflowAncestor(parentNode)}function getOverflowAncestors(node2,list2,traverseIframes){var _node$ownerDocument2;list2===void 0&&(list2=[]), +traverseIframes===void 0&&(traverseIframes=!0);const scrollableAncestor=getNearestOverflowAncestor(node2),isBody=scrollableAncestor===((_node$ownerDocument2=node2.ownerDocument)==null?void 0:_node$ownerDocument2.body),win=getWindow(scrollableAncestor);if(isBody){const frameElement=getFrameElement(win);return list2.concat(win,win.visualViewport||[],isOverflowElement(scrollableAncestor)?scrollableAncestor:[],frameElement&&traverseIframes?getOverflowAncestors(frameElement):[])}return list2.concat(scrollableAncestor, +getOverflowAncestors(scrollableAncestor,[],traverseIframes))}function getFrameElement(win){return win.parent&&Object.getPrototypeOf(win.parent)?win.frameElement:null}function getCssDimensions(element2){const css2=getComputedStyle$1(element2);let width=parseFloat(css2.width)||0,height=parseFloat(css2.height)||0;const hasOffset=isHTMLElement(element2),offsetWidth=hasOffset?element2.offsetWidth:width,offsetHeight=hasOffset?element2.offsetHeight:height,shouldFallback=round(width)!==offsetWidth||round( +height)!==offsetHeight;return shouldFallback&&(width=offsetWidth,height=offsetHeight),{width,height,$:shouldFallback}}function unwrapElement(element2){return isElement(element2)?element2:element2.contextElement}function getScale(element2){const domElement=unwrapElement(element2);if(!isHTMLElement(domElement))return createCoords(1);const rect=domElement.getBoundingClientRect(),{width,height,$}=getCssDimensions(domElement);let x=($?round(rect.width):rect.width)/width,y=($?round(rect.height):rect.height)/ +height;return(!x||!Number.isFinite(x))&&(x=1),(!y||!Number.isFinite(y))&&(y=1),{x,y}}const noOffsets=createCoords(0);function getVisualOffsets(element2){const win=getWindow(element2);return!isWebKit()||!win.visualViewport?noOffsets:{x:win.visualViewport.offsetLeft,y:win.visualViewport.offsetTop}}function shouldAddVisualOffsets(element2,isFixed,floatingOffsetParent){return isFixed===void 0&&(isFixed=!1),!floatingOffsetParent||isFixed&&floatingOffsetParent!==getWindow(element2)?!1:isFixed}function getBoundingClientRect(element2,includeScale,isFixedStrategy,offsetParent){ +includeScale===void 0&&(includeScale=!1),isFixedStrategy===void 0&&(isFixedStrategy=!1);const clientRect=element2.getBoundingClientRect(),domElement=unwrapElement(element2);let scale2=createCoords(1);includeScale&&(offsetParent?isElement(offsetParent)&&(scale2=getScale(offsetParent)):scale2=getScale(element2));const visualOffsets=shouldAddVisualOffsets(domElement,isFixedStrategy,offsetParent)?getVisualOffsets(domElement):createCoords(0);let x=(clientRect.left+visualOffsets.x)/scale2.x,y=(clientRect. +top+visualOffsets.y)/scale2.y,width=clientRect.width/scale2.x,height=clientRect.height/scale2.y;if(domElement){const win=getWindow(domElement),offsetWin=offsetParent&&isElement(offsetParent)?getWindow(offsetParent):offsetParent;let currentWin=win,currentIFrame=getFrameElement(currentWin);for(;currentIFrame&&offsetParent&&offsetWin!==currentWin;){const iframeScale=getScale(currentIFrame),iframeRect=currentIFrame.getBoundingClientRect(),css2=getComputedStyle$1(currentIFrame),left=iframeRect.left+(currentIFrame. +clientLeft+parseFloat(css2.paddingLeft))*iframeScale.x,top=iframeRect.top+(currentIFrame.clientTop+parseFloat(css2.paddingTop))*iframeScale.y;x*=iframeScale.x,y*=iframeScale.y,width*=iframeScale.x,height*=iframeScale.y,x+=left,y+=top,currentWin=getWindow(currentIFrame),currentIFrame=getFrameElement(currentWin)}}return rectToClientRect({width,height,x,y})}function getWindowScrollBarX(element2,rect){const leftScroll=getNodeScroll(element2).scrollLeft;return rect?rect.left+leftScroll:getBoundingClientRect( +getDocumentElement(element2)).left+leftScroll}function getHTMLOffset(documentElement,scroll,ignoreScrollbarX){ignoreScrollbarX===void 0&&(ignoreScrollbarX=!1);const htmlRect=documentElement.getBoundingClientRect(),x=htmlRect.left+scroll.scrollLeft-(ignoreScrollbarX?0:getWindowScrollBarX(documentElement,htmlRect)),y=htmlRect.top+scroll.scrollTop;return{x,y}}function convertOffsetParentRelativeRectToViewportRelativeRect(_ref){let{elements,rect,offsetParent,strategy}=_ref;const isFixed=strategy==="\ +fixed",documentElement=getDocumentElement(offsetParent),topLayer=elements?isTopLayer(elements.floating):!1;if(offsetParent===documentElement||topLayer&&isFixed)return rect;let scroll={scrollLeft:0,scrollTop:0},scale2=createCoords(1);const offsets=createCoords(0),isOffsetParentAnElement=isHTMLElement(offsetParent);if((isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed)&&((getNodeName(offsetParent)!=="body"||isOverflowElement(documentElement))&&(scroll=getNodeScroll(offsetParent)),isHTMLElement( +offsetParent))){const offsetRect=getBoundingClientRect(offsetParent);scale2=getScale(offsetParent),offsets.x=offsetRect.x+offsetParent.clientLeft,offsets.y=offsetRect.y+offsetParent.clientTop}const htmlOffset=documentElement&&!isOffsetParentAnElement&&!isFixed?getHTMLOffset(documentElement,scroll,!0):createCoords(0);return{width:rect.width*scale2.x,height:rect.height*scale2.y,x:rect.x*scale2.x-scroll.scrollLeft*scale2.x+offsets.x+htmlOffset.x,y:rect.y*scale2.y-scroll.scrollTop*scale2.y+offsets.y+ +htmlOffset.y}}function getClientRects(element2){return Array.from(element2.getClientRects())}function getDocumentRect(element2){const html2=getDocumentElement(element2),scroll=getNodeScroll(element2),body2=element2.ownerDocument.body,width=max(html2.scrollWidth,html2.clientWidth,body2.scrollWidth,body2.clientWidth),height=max(html2.scrollHeight,html2.clientHeight,body2.scrollHeight,body2.clientHeight);let x=-scroll.scrollLeft+getWindowScrollBarX(element2);const y=-scroll.scrollTop;return getComputedStyle$1( +body2).direction==="rtl"&&(x+=max(html2.clientWidth,body2.clientWidth)-width),{width,height,x,y}}function getViewportRect(element2,strategy){const win=getWindow(element2),html2=getDocumentElement(element2),visualViewport=win.visualViewport;let width=html2.clientWidth,height=html2.clientHeight,x=0,y=0;if(visualViewport){width=visualViewport.width,height=visualViewport.height;const visualViewportBased=isWebKit();(!visualViewportBased||visualViewportBased&&strategy==="fixed")&&(x=visualViewport.offsetLeft, +y=visualViewport.offsetTop)}return{width,height,x,y}}const absoluteOrFixed=new Set(["absolute","fixed"]);function getInnerBoundingClientRect(element2,strategy){const clientRect=getBoundingClientRect(element2,!0,strategy==="fixed"),top=clientRect.top+element2.clientTop,left=clientRect.left+element2.clientLeft,scale2=isHTMLElement(element2)?getScale(element2):createCoords(1),width=element2.clientWidth*scale2.x,height=element2.clientHeight*scale2.y,x=left*scale2.x,y=top*scale2.y;return{width,height, +x,y}}function getClientRectFromClippingAncestor(element2,clippingAncestor,strategy){let rect;if(clippingAncestor==="viewport")rect=getViewportRect(element2,strategy);else if(clippingAncestor==="document")rect=getDocumentRect(getDocumentElement(element2));else if(isElement(clippingAncestor))rect=getInnerBoundingClientRect(clippingAncestor,strategy);else{const visualOffsets=getVisualOffsets(element2);rect={x:clippingAncestor.x-visualOffsets.x,y:clippingAncestor.y-visualOffsets.y,width:clippingAncestor. +width,height:clippingAncestor.height}}return rectToClientRect(rect)}function hasFixedPositionAncestor(element2,stopNode){const parentNode=getParentNode(element2);return parentNode===stopNode||!isElement(parentNode)||isLastTraversableNode(parentNode)?!1:getComputedStyle$1(parentNode).position==="fixed"||hasFixedPositionAncestor(parentNode,stopNode)}function getClippingElementAncestors(element2,cache2){const cachedResult=cache2.get(element2);if(cachedResult)return cachedResult;let result=getOverflowAncestors( +element2,[],!1).filter(el=>isElement(el)&&getNodeName(el)!=="body"),currentContainingBlockComputedStyle=null;const elementIsFixed=getComputedStyle$1(element2).position==="fixed";let currentNode=elementIsFixed?getParentNode(element2):element2;for(;isElement(currentNode)&&!isLastTraversableNode(currentNode);){const computedStyle=getComputedStyle$1(currentNode),currentNodeIsContaining=isContainingBlock(currentNode);!currentNodeIsContaining&&computedStyle.position==="fixed"&&(currentContainingBlockComputedStyle= +null),(elementIsFixed?!currentNodeIsContaining&&!currentContainingBlockComputedStyle:!currentNodeIsContaining&&computedStyle.position==="static"&&!!currentContainingBlockComputedStyle&&absoluteOrFixed.has(currentContainingBlockComputedStyle.position)||isOverflowElement(currentNode)&&!currentNodeIsContaining&&hasFixedPositionAncestor(element2,currentNode))?result=result.filter(ancestor=>ancestor!==currentNode):currentContainingBlockComputedStyle=computedStyle,currentNode=getParentNode(currentNode)} +return cache2.set(element2,result),result}function getClippingRect(_ref){let{element:element2,boundary:boundary2,rootBoundary,strategy}=_ref;const clippingAncestors=[...boundary2==="clippingAncestors"?isTopLayer(element2)?[]:getClippingElementAncestors(element2,this._c):[].concat(boundary2),rootBoundary],firstClippingAncestor=clippingAncestors[0],clippingRect=clippingAncestors.reduce((accRect,clippingAncestor)=>{const rect=getClientRectFromClippingAncestor(element2,clippingAncestor,strategy);return accRect. +top=max(rect.top,accRect.top),accRect.right=min(rect.right,accRect.right),accRect.bottom=min(rect.bottom,accRect.bottom),accRect.left=max(rect.left,accRect.left),accRect},getClientRectFromClippingAncestor(element2,firstClippingAncestor,strategy));return{width:clippingRect.right-clippingRect.left,height:clippingRect.bottom-clippingRect.top,x:clippingRect.left,y:clippingRect.top}}function getDimensions(element2){const{width,height}=getCssDimensions(element2);return{width,height}}function getRectRelativeToOffsetParent(element2,offsetParent,strategy){ +const isOffsetParentAnElement=isHTMLElement(offsetParent),documentElement=getDocumentElement(offsetParent),isFixed=strategy==="fixed",rect=getBoundingClientRect(element2,!0,isFixed,offsetParent);let scroll={scrollLeft:0,scrollTop:0};const offsets=createCoords(0);function setLeftRTLScrollbarOffset(){offsets.x=getWindowScrollBarX(documentElement)}if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed)if((getNodeName(offsetParent)!=="body"||isOverflowElement(documentElement))&&(scroll=getNodeScroll( +offsetParent)),isOffsetParentAnElement){const offsetRect=getBoundingClientRect(offsetParent,!0,isFixed,offsetParent);offsets.x=offsetRect.x+offsetParent.clientLeft,offsets.y=offsetRect.y+offsetParent.clientTop}else documentElement&&setLeftRTLScrollbarOffset();isFixed&&!isOffsetParentAnElement&&documentElement&&setLeftRTLScrollbarOffset();const htmlOffset=documentElement&&!isOffsetParentAnElement&&!isFixed?getHTMLOffset(documentElement,scroll):createCoords(0),x=rect.left+scroll.scrollLeft-offsets. +x-htmlOffset.x,y=rect.top+scroll.scrollTop-offsets.y-htmlOffset.y;return{x,y,width:rect.width,height:rect.height}}function isStaticPositioned(element2){return getComputedStyle$1(element2).position==="static"}function getTrueOffsetParent(element2,polyfill){if(!isHTMLElement(element2)||getComputedStyle$1(element2).position==="fixed")return null;if(polyfill)return polyfill(element2);let rawOffsetParent=element2.offsetParent;return getDocumentElement(element2)===rawOffsetParent&&(rawOffsetParent=rawOffsetParent. +ownerDocument.body),rawOffsetParent}function getOffsetParent(element2,polyfill){const win=getWindow(element2);if(isTopLayer(element2))return win;if(!isHTMLElement(element2)){let svgOffsetParent=getParentNode(element2);for(;svgOffsetParent&&!isLastTraversableNode(svgOffsetParent);){if(isElement(svgOffsetParent)&&!isStaticPositioned(svgOffsetParent))return svgOffsetParent;svgOffsetParent=getParentNode(svgOffsetParent)}return win}let offsetParent=getTrueOffsetParent(element2,polyfill);for(;offsetParent&& +isTableElement(offsetParent)&&isStaticPositioned(offsetParent);)offsetParent=getTrueOffsetParent(offsetParent,polyfill);return offsetParent&&isLastTraversableNode(offsetParent)&&isStaticPositioned(offsetParent)&&!isContainingBlock(offsetParent)?win:offsetParent||getContainingBlock(element2)||win}const getElementRects=async function(data){const getOffsetParentFn=this.getOffsetParent||getOffsetParent,getDimensionsFn=this.getDimensions,floatingDimensions=await getDimensionsFn(data.floating);return{ +reference:getRectRelativeToOffsetParent(data.reference,await getOffsetParentFn(data.floating),data.strategy),floating:{x:0,y:0,width:floatingDimensions.width,height:floatingDimensions.height}}};function isRTL(element2){return getComputedStyle$1(element2).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(a,b){return a. +x===b.x&&a.y===b.y&&a.width===b.width&&a.height===b.height}function observeMove(element2,onMove){let io=null,timeoutId;const root2=getDocumentElement(element2);function cleanup(){var _io;clearTimeout(timeoutId),(_io=io)==null||_io.disconnect(),io=null}function refresh(skip,threshold){skip===void 0&&(skip=!1),threshold===void 0&&(threshold=1),cleanup();const elementRectForRootMargin=element2.getBoundingClientRect(),{left,top,width,height}=elementRectForRootMargin;if(skip||onMove(),!width||!height) +return;const insetTop=floor(top),insetRight=floor(root2.clientWidth-(left+width)),insetBottom=floor(root2.clientHeight-(top+height)),insetLeft=floor(left),options={rootMargin:-insetTop+"px "+-insetRight+"px "+-insetBottom+"px "+-insetLeft+"px",threshold:max(0,min(1,threshold))||1};let isFirstUpdate=!0;function handleObserve(entries){const ratio=entries[0].intersectionRatio;if(ratio!==threshold){if(!isFirstUpdate)return refresh();ratio?refresh(!1,ratio):timeoutId=setTimeout(()=>{refresh(!1,1e-7)}, +1e3)}ratio===1&&!rectsAreEqual(elementRectForRootMargin,element2.getBoundingClientRect())&&refresh(),isFirstUpdate=!1}try{io=new IntersectionObserver(handleObserve,{...options,root:root2.ownerDocument})}catch{io=new IntersectionObserver(handleObserve,options)}io.observe(element2)}return refresh(!0),cleanup}function autoUpdate(reference,floating,update2,options){options===void 0&&(options={});const{ancestorScroll=!0,ancestorResize=!0,elementResize=typeof ResizeObserver=="function",layoutShift=typeof IntersectionObserver== +"function",animationFrame=!1}=options,referenceEl=unwrapElement(reference),ancestors=ancestorScroll||ancestorResize?[...referenceEl?getOverflowAncestors(referenceEl):[],...getOverflowAncestors(floating)]:[];ancestors.forEach(ancestor=>{ancestorScroll&&ancestor.addEventListener("scroll",update2,{passive:!0}),ancestorResize&&ancestor.addEventListener("resize",update2)});const cleanupIo=referenceEl&&layoutShift?observeMove(referenceEl,update2):null;let reobserveFrame=-1,resizeObserver=null;elementResize&& +(resizeObserver=new ResizeObserver(_ref=>{let[firstEntry]=_ref;firstEntry&&firstEntry.target===referenceEl&&resizeObserver&&(resizeObserver.unobserve(floating),cancelAnimationFrame(reobserveFrame),reobserveFrame=requestAnimationFrame(()=>{var _resizeObserver;(_resizeObserver=resizeObserver)==null||_resizeObserver.observe(floating)})),update2()}),referenceEl&&!animationFrame&&resizeObserver.observe(referenceEl),resizeObserver.observe(floating));let frameId,prevRefRect=animationFrame?getBoundingClientRect( +reference):null;animationFrame&&frameLoop();function frameLoop(){const nextRefRect=getBoundingClientRect(reference);prevRefRect&&!rectsAreEqual(prevRefRect,nextRefRect)&&update2(),prevRefRect=nextRefRect,frameId=requestAnimationFrame(frameLoop)}return update2(),()=>{var _resizeObserver2;ancestors.forEach(ancestor=>{ancestorScroll&&ancestor.removeEventListener("scroll",update2),ancestorResize&&ancestor.removeEventListener("resize",update2)}),cleanupIo?.(),(_resizeObserver2=resizeObserver)==null|| +_resizeObserver2.disconnect(),resizeObserver=null,animationFrame&&cancelAnimationFrame(frameId)}}const offset=offset$1,shift=shift$1,flip=flip$1,size=size$1,hide=hide$1,arrow=arrow$1,limitShift=limitShift$1,computePosition=(reference,floating,options)=>{const cache2=new Map,mergedOptions={platform,...options},platformWithCache={...mergedOptions.platform,_c:cache2};return computePosition$1(reference,floating,{...mergedOptions,platform:platformWithCache})};function get(valueOrGetValue){return typeof valueOrGetValue== +"function"?valueOrGetValue():valueOrGetValue}function getDPR(element2){return typeof window>"u"?1:(element2.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(element2,value){const dpr=getDPR(element2);return Math.round(value*dpr)/dpr}function getFloatingContentCSSVars(name){return{[`--bits-${name}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${name}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${name}-content-av\ +ailable-height`]:"var(--bits-floating-available-height)",[`--bits-${name}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${name}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function useFloating(options){const whileElementsMountedOption=options.whileElementsMounted,openOption=user_derived(()=>get(options.open)??!0),middlewareOption=user_derived(()=>get(options.middleware)),transformOption=user_derived(()=>get(options.transform)??!0),placementOption=user_derived(()=>get(options. +placement)??"bottom"),strategyOption=user_derived(()=>get(options.strategy)??"absolute"),sideOffsetOption=user_derived(()=>get(options.sideOffset)??0),alignOffsetOption=user_derived(()=>get(options.alignOffset)??0),reference=options.reference;let x=state$1(0),y=state$1(0);const floating=simpleBox(null);let strategy=state$1(proxy(get$3(strategyOption))),placement=state$1(proxy(get$3(placementOption))),middlewareData=state$1(proxy({})),isPositioned=state$1(!1),hasWhileMountedPosition=!1,updateRequestId=0; +const floatingStyles=user_derived(()=>{const xVal=floating.current?roundByDPR(floating.current,get$3(x)):get$3(x),yVal=floating.current?roundByDPR(floating.current,get$3(y)):get$3(y);return get$3(transformOption)?{position:get$3(strategy),left:"0",top:"0",transform:`translate(${xVal}px, ${yVal}px)`,...floating.current&&getDPR(floating.current)>=1.5&&{willChange:"transform"}}:{position:get$3(strategy),left:`${xVal}px`,top:`${yVal}px`}});let whileElementsMountedCleanup;function update2(){if(reference. +current===null||floating.current===null)return;const referenceNode=reference.current,floatingNode=floating.current,requestId=++updateRequestId;computePosition(referenceNode,floatingNode,{middleware:get$3(middlewareOption),placement:get$3(placementOption),strategy:get$3(strategyOption)}).then(position2=>{if(requestId!==updateRequestId||reference.current!==referenceNode||floating.current!==floatingNode)return;if(isReferenceHidden(referenceNode)){set$1(middlewareData,{...get$3(middlewareData),hide:{ +...get$3(middlewareData).hide,referenceHidden:!0}},!0);return}if(!get$3(openOption)&&get$3(x)!==0&&get$3(y)!==0){const maxExpectedOffset=Math.max(Math.abs(get$3(sideOffsetOption)),Math.abs(get$3(alignOffsetOption)),15);if(position2.x<=maxExpectedOffset&&position2.y<=maxExpectedOffset)return}set$1(x,position2.x,!0),set$1(y,position2.y,!0),set$1(strategy,position2.strategy,!0),set$1(placement,position2.placement,!0),set$1(middlewareData,position2.middlewareData,!0),set$1(isPositioned,!0)})}function cleanup(){ +typeof whileElementsMountedCleanup=="function"&&(whileElementsMountedCleanup(),whileElementsMountedCleanup=void 0),updateRequestId++}function attach2(){if(cleanup(),whileElementsMountedOption===void 0){update2();return}get$3(openOption)&&(reference.current===null||floating.current===null||(whileElementsMountedCleanup=whileElementsMountedOption(reference.current,floating.current,update2)))}function reset2(){!get$3(openOption)&&floating.current===null&&set$1(isPositioned,!1)}function trackWhileMountedDeps(){ +return[get$3(middlewareOption),get$3(placementOption),get$3(strategyOption),get$3(sideOffsetOption),get$3(alignOffsetOption),get$3(openOption)]}return user_effect(()=>{whileElementsMountedOption===void 0&&get$3(openOption)&&update2()}),user_effect(attach2),user_effect(()=>{if(whileElementsMountedOption!==void 0){if(trackWhileMountedDeps(),!get$3(openOption)){hasWhileMountedPosition=!1;return}if(!get$3(isPositioned)){hasWhileMountedPosition=!1;return}if(!hasWhileMountedPosition){hasWhileMountedPosition= +!0;return}update2()}}),user_effect(reset2),user_effect(()=>cleanup),{floating,reference,get strategy(){return get$3(strategy)},get placement(){return get$3(placement)},get middlewareData(){return get$3(middlewareData)},get isPositioned(){return get$3(isPositioned)},get floatingStyles(){return get$3(floatingStyles)},get update(){return update2}}}function isReferenceHidden(node2){return node2 instanceof Element?!node2.isConnected||node2 instanceof HTMLElement&&node2.hidden?!0:node2.getClientRects(). +length===0:!1}const OPPOSITE_SIDE={top:"bottom",right:"left",bottom:"top",left:"right"},FloatingRootContext=new Context$1("Floating.Root"),FloatingContentContext=new Context$1("Floating.Content"),FloatingTooltipRootContext=new Context$1("Floating.Root");class FloatingRootState{static create(tooltip=!1){return tooltip?FloatingTooltipRootContext.set(new FloatingRootState):FloatingRootContext.set(new FloatingRootState)}anchorNode=simpleBox(null);customAnchorNode=simpleBox(null);triggerNode=simpleBox( +null);constructor(){user_effect(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class FloatingContentState{static create(opts,tooltip=!1){return tooltip?FloatingContentContext.set(new FloatingContentState(opts,FloatingTooltipRootContext.get())):FloatingContentContext.set(new FloatingContentState( +opts,FloatingRootContext.get()))}opts;root;contentRef=simpleBox(null);wrapperRef=simpleBox(null);arrowRef=simpleBox(null);contentAttachment=attachRef(this.contentRef);wrapperAttachment=attachRef(this.wrapperRef);arrowAttachment=attachRef(this.arrowRef);arrowId=simpleBox(useId());#transformedStyle=user_derived(()=>{if(typeof this.opts.style=="string")return cssToStyleObj(this.opts.style);if(!this.opts.style)return{}});#updatePositionStrategy=void 0;#arrowSize=new ElementSize(()=>this.arrowRef.current?? +void 0);#arrowWidth=user_derived(()=>this.#arrowSize?.width??0);#arrowHeight=user_derived(()=>this.#arrowSize?.height??0);#desiredPlacement=user_derived(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#boundary=user_derived(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#hasExplicitBoundaries=user_derived(()=>get$3(this.#boundary).length>0);get hasExplicitBoundaries(){ +return get$3(this.#hasExplicitBoundaries)}set hasExplicitBoundaries(value){set$1(this.#hasExplicitBoundaries,value)}#detectOverflowOptions=user_derived(()=>({padding:this.opts.collisionPadding.current,boundary:get$3(this.#boundary).filter(isNotNull),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return get$3(this.#detectOverflowOptions)}set detectOverflowOptions(value){set$1(this.#detectOverflowOptions,value)}#availableWidth=state$1(void 0);#availableHeight=state$1(void 0);#anchorWidth=state$1( +void 0);#anchorHeight=state$1(void 0);#middleware=user_derived(()=>[offset({mainAxis:this.opts.sideOffset.current+get$3(this.#arrowHeight),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&shift({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?limitShift():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&flip({...this.detectOverflowOptions}),size({...this.detectOverflowOptions,apply:({rects,availableWidth,availableHeight})=>{ +const{width:anchorWidth,height:anchorHeight}=rects.reference;set$1(this.#availableWidth,availableWidth,!0),set$1(this.#availableHeight,availableHeight,!0),set$1(this.#anchorWidth,anchorWidth,!0),set$1(this.#anchorHeight,anchorHeight,!0)}}),this.arrowRef.current&&arrow({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),transformOrigin({arrowWidth:get$3(this.#arrowWidth),arrowHeight:get$3(this.#arrowHeight)}),this.opts.hideWhenDetached.current&&hide({strategy:"referenceHidden", +...this.detectOverflowOptions})].filter(Boolean));get middleware(){return get$3(this.#middleware)}set middleware(value){set$1(this.#middleware,value)}floating;#placedSide=user_derived(()=>getSideFromPlacement(this.floating.placement));get placedSide(){return get$3(this.#placedSide)}set placedSide(value){set$1(this.#placedSide,value)}#placedAlign=user_derived(()=>getAlignFromPlacement(this.floating.placement));get placedAlign(){return get$3(this.#placedAlign)}set placedAlign(value){set$1(this.#placedAlign, +value)}#arrowX=user_derived(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return get$3(this.#arrowX)}set arrowX(value){set$1(this.#arrowX,value)}#arrowY=user_derived(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return get$3(this.#arrowY)}set arrowY(value){set$1(this.#arrowY,value)}#cannotCenterArrow=user_derived(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return get$3(this.#cannotCenterArrow)}set cannotCenterArrow(value){set$1(this.#cannotCenterArrow, +value)}#contentZIndex=state$1();get contentZIndex(){return get$3(this.#contentZIndex)}set contentZIndex(value){set$1(this.#contentZIndex,value,!0)}#arrowBaseSide=user_derived(()=>OPPOSITE_SIDE[this.placedSide]);get arrowBaseSide(){return get$3(this.#arrowBaseSide)}set arrowBaseSide(value){set$1(this.#arrowBaseSide,value)}#wrapperProps=user_derived(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned? +this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${get$3(this.#availableWidth)}px`,"--bits-floating-available-height":`${get$3(this.#availableHeight)}px`,"--bits-floating-anchor-width":`${get$3(this.#anchorWidth)}px`,"--bits-floating-anchor-height":`${get$3(this.#anchorHeight)}\ +px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...get$3(this.#transformedStyle)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return get$3(this.#wrapperProps)}set wrapperProps(value){set$1(this.#wrapperProps,value)}#props=user_derived(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:styleToString$1({...get$3(this.#transformedStyle)}),...this.contentAttachment}));get props(){return get$3(this.#props)}set props(value){ +set$1(this.#props,value)}#arrowStyle=user_derived(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden": +void 0}));get arrowStyle(){return get$3(this.#arrowStyle)}set arrowStyle(value){set$1(this.#arrowStyle,value)}constructor(opts,root2){this.opts=opts,this.root=root2,this.#updatePositionStrategy=opts.updatePositionStrategy,opts.customAnchor&&(this.root.customAnchorNode.current=opts.customAnchor.current),watch$1(()=>opts.customAnchor.current,customAnchor=>{this.root.customAnchorNode.current=customAnchor}),this.floating=useFloating({strategy:()=>this.opts.strategy.current,placement:()=>get$3(this.#desiredPlacement), +middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...args)=>autoUpdate(...args,{animationFrame:this.#updatePositionStrategy?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),user_effect(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),watch$1(()=>this.contentRef.current,contentNode=>{if(!contentNode||!this.opts.enabled.current)return;const win=getWindow$1( +contentNode),rafId=win.requestAnimationFrame(()=>{if(this.contentRef.current!==contentNode||!this.opts.enabled.current)return;const zIndex=win.getComputedStyle(contentNode).zIndex;zIndex!==this.contentZIndex&&(this.contentZIndex=zIndex)});return()=>{win.cancelAnimationFrame(rafId)}}),user_effect(()=>{this.floating.floating.current=this.wrapperRef.current})}}class FloatingArrowState{static create(opts){return new FloatingArrowState(opts,FloatingContentContext.get())}opts;content;constructor(opts,content2){ +this.opts=opts,this.content=content2}#props=user_derived(()=>({id:this.opts.id.current,style:this.content.arrowStyle,"data-side":this.content.placedSide,...this.content.arrowAttachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class FloatingAnchorState{static create(opts,tooltip=!1){return tooltip?new FloatingAnchorState(opts,FloatingTooltipRootContext.get()):new FloatingAnchorState(opts,FloatingRootContext.get())}opts;root;constructor(opts,root2){this.opts= +opts,this.root=root2,opts.virtualEl&&opts.virtualEl.current?root2.triggerNode=boxFrom$1(opts.virtualEl.current):root2.triggerNode=opts.ref}}function transformOrigin(options){return{name:"transformOrigin",options,fn(data){const{placement,rects,middlewareData}=data,isArrowHidden=middlewareData.arrow?.centerOffset!==0,arrowWidth=isArrowHidden?0:options.arrowWidth,arrowHeight=isArrowHidden?0:options.arrowHeight,[placedSide,placedAlign]=getSideAndAlignFromPlacement(placement),noArrowAlign={start:"0%", +center:"50%",end:"100%"}[placedAlign],arrowXCenter=(middlewareData.arrow?.x??0)+arrowWidth/2,arrowYCenter=(middlewareData.arrow?.y??0)+arrowHeight/2;let x="",y="";return placedSide==="bottom"?(x=isArrowHidden?noArrowAlign:`${arrowXCenter}px`,y=`${-arrowHeight}px`):placedSide==="top"?(x=isArrowHidden?noArrowAlign:`${arrowXCenter}px`,y=`${rects.floating.height+arrowHeight}px`):placedSide==="right"?(x=`${-arrowHeight}px`,y=isArrowHidden?noArrowAlign:`${arrowYCenter}px`):placedSide==="left"&&(x=`${rects. +floating.width+arrowHeight}px`,y=isArrowHidden?noArrowAlign:`${arrowYCenter}px`),{data:{x,y}}}}}function getSideAndAlignFromPlacement(placement){const[side,align="center"]=placement.split("-");return[side,align]}function getSideFromPlacement(placement){return getSideAndAlignFromPlacement(placement)[0]}function getAlignFromPlacement(placement){return getSideAndAlignFromPlacement(placement)[1]}function Floating_layer($$anchor,$$props){push$1($$props,!0);let tooltip=prop($$props,"tooltip",3,!1);FloatingRootState. +create(tooltip());var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}class DataTypeahead{#opts;#candidateValues=user_derived(()=>this.#opts.candidateValues());#search;constructor(opts){this.#opts=opts,this.#search=boxAutoReset("",{afterMs:1e3,getWindow:this.#opts.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(key2){if(!this.#opts. +enabled()||!get$3(this.#candidateValues).length)return;this.#search.current=this.#search.current+key2;const currentItem=this.#opts.getCurrentItem(),currentMatch=get$3(this.#candidateValues).find(item=>item===currentItem)??"",values=get$3(this.#candidateValues).map(item=>item??""),nextMatch=getNextMatch(values,this.#search.current,currentMatch),newItem=get$3(this.#candidateValues).find(item=>item===nextMatch);return newItem&&this.#opts.onMatch(newItem),newItem}resetTypeahead(){this.#search.current= +""}}const FIRST_KEYS=[ARROW_DOWN,PAGE_UP,HOME],LAST_KEYS=[ARROW_UP,PAGE_DOWN,END],FIRST_LAST_KEYS=[...FIRST_KEYS,...LAST_KEYS],selectAttrs=createBitsAttrs({component:"select",parts:["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"]}),SelectRootContext=new Context$1("Select.Root | Combobox.Root"),SelectContentContext=new Context$1("Select.Content | Combobox.Content");class SelectBaseRootState{opts;#touchedInput=state$1( +!1);get touchedInput(){return get$3(this.#touchedInput)}set touchedInput(value){set$1(this.#touchedInput,value,!0)}#inputNode=state$1(null);get inputNode(){return get$3(this.#inputNode)}set inputNode(value){set$1(this.#inputNode,value,!0)}#contentNode=state$1(null);get contentNode(){return get$3(this.#contentNode)}set contentNode(value){set$1(this.#contentNode,value,!0)}contentPresence;#viewportNode=state$1(null);get viewportNode(){return get$3(this.#viewportNode)}set viewportNode(value){set$1(this.#viewportNode, +value,!0)}#triggerNode=state$1(null);get triggerNode(){return get$3(this.#triggerNode)}set triggerNode(value){set$1(this.#triggerNode,value,!0)}#valueNode=state$1(null);get valueNode(){return get$3(this.#valueNode)}set valueNode(value){set$1(this.#valueNode,value,!0)}#valueId=state$1("");get valueId(){return get$3(this.#valueId)}set valueId(value){set$1(this.#valueId,value,!0)}#highlightedNode=state$1(null);get highlightedNode(){return get$3(this.#highlightedNode)}set highlightedNode(value){set$1( +this.#highlightedNode,value,!0)}#highlightedValue=user_derived(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null);get highlightedValue(){return get$3(this.#highlightedValue)}set highlightedValue(value){set$1(this.#highlightedValue,value)}#highlightedId=user_derived(()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return get$3(this.#highlightedId)}set highlightedId(value){set$1(this.#highlightedId,value)}#highlightedLabel=user_derived(()=>this. +highlightedNode?this.highlightedNode.getAttribute("data-label"):null);get highlightedLabel(){return get$3(this.#highlightedLabel)}set highlightedLabel(value){set$1(this.#highlightedLabel,value)}#contentIsPositioned=state$1(!1);get contentIsPositioned(){return get$3(this.#contentIsPositioned)}set contentIsPositioned(value){set$1(this.#contentIsPositioned,value,!0)}isUsingKeyboard=!1;isCombobox=!1;domContext=new DOMContext(()=>null);constructor(opts){this.opts=opts,this.isCombobox=opts.isCombobox, +this.contentPresence=new PresenceManager({ref:boxWith$1(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),user_pre_effect(()=>{this.opts.open.current||this.setHighlightedNode(null)})}setHighlightedNode(node2,initial=!1){this.highlightedNode=node2,node2&&(this.isUsingKeyboard||initial)&&this.scrollHighlightedNodeIntoView(node2)}scrollHighlightedNodeIntoView(node2){!this.viewportNode||!this.contentIsPositioned||node2.scrollIntoView( +{block:this.opts.scrollAlignment.current})}getCandidateNodes(){const node2=this.contentNode;return node2?Array.from(node2.querySelectorAll(`[${this.getBitsAttr("item")}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(initial=!1){this.setHighlightedNode(null);let nodes2=this.getCandidateNodes();if(nodes2.length){if(this.viewportNode){const viewportRect=this.viewportNode.getBoundingClientRect();nodes2=nodes2.filter(node2=>{if(!this.viewportNode)return!1;const nodeRect=node2.getBoundingClientRect(); +return nodeRect.right<=viewportRect.right&&nodeRect.left>=viewportRect.left&&nodeRect.bottom<=viewportRect.bottom&&nodeRect.top>=viewportRect.top})}this.setHighlightedNode(nodes2[0],initial)}}getNodeByValue(value){return this.getCandidateNodes().find(node2=>node2.dataset.value===value)??null}getLabelForValue(value){if(value==="")return"";const fromItems=this.opts.items.current.find(item=>item.value===value)?.label;if(fromItems!==void 0)return fromItems;const node2=this.getNodeByValue(value);if(node2){ +const dataLabel=node2.getAttribute("data-label");return dataLabel!==null&&dataLabel!==""?dataLabel:node2.textContent?.trim()??value}return value}setOpen(open2){this.opts.open.current=open2}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=part=>selectAttrs.getAttr(part,this.isCombobox?"combobox":void 0)}class SelectSingleRootState extends SelectBaseRootState{opts;isMulti=!1;#hasValue=user_derived( +()=>this.opts.value.current!=="");get hasValue(){return get$3(this.#hasValue)}set hasValue(value){set$1(this.#hasValue,value)}#currentLabel=user_derived(()=>this.opts.items.current.length?this.opts.items.current.find(item=>item.value===this.opts.value.current)?.label??"":"");get currentLabel(){return get$3(this.#currentLabel)}set currentLabel(value){set$1(this.#currentLabel,value)}#candidateLabels=user_derived(()=>this.opts.items.current.length?this.opts.items.current.filter(item=>!item.disabled). +map(item=>item.label):[]);get candidateLabels(){return get$3(this.#candidateLabels)}set candidateLabels(value){set$1(this.#candidateLabels,value)}#dataTypeaheadEnabled=user_derived(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return get$3(this.#dataTypeaheadEnabled)}set dataTypeaheadEnabled(value){set$1(this.#dataTypeaheadEnabled,value)}constructor(opts){super(opts),this.opts=opts,user_effect(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode( +null)}),watch$1(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(itemValue){return this.opts.value.current===itemValue}toggleItem(itemValue,itemLabel=itemValue){const newValue=this.includesItem(itemValue)?"":itemValue;this.opts.value.current=newValue,newValue!==""&&(this.opts.inputValue.current=itemLabel)}setInitialHighlightedNode(){afterTick(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this. +opts.value.current!==""){const node2=this.getNodeByValue(this.opts.value.current);if(node2){this.setHighlightedNode(node2,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class SelectMultipleRootState extends SelectBaseRootState{opts;isMulti=!0;#hasValue=user_derived(()=>this.opts.value.current.length>0);get hasValue(){return get$3(this.#hasValue)}set hasValue(value){set$1(this.#hasValue,value)}constructor(opts){super(opts),this.opts=opts,user_effect(()=>{!this.opts.open.current&&this.highlightedNode&& +this.setHighlightedNode(null)}),watch$1(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(itemValue){return this.opts.value.current.includes(itemValue)}toggleItem(itemValue,itemLabel=itemValue){this.includesItem(itemValue)?this.opts.value.current=this.opts.value.current.filter(v=>v!==itemValue):this.opts.value.current=[...this.opts.value.current,itemValue],this.opts.inputValue.current=itemLabel}setInitialHighlightedNode(){afterTick(()=>{if(this. +domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const node2=this.getNodeByValue(this.opts.value.current[0]);if(node2){this.setHighlightedNode(node2,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class SelectRootState{static create(props){const{type:type2,...rest}=props,rootState=type2==="single"?new SelectSingleRootState(rest):new SelectMultipleRootState(rest);return SelectRootContext. +set(rootState)}}class SelectTriggerState{static create(opts){return new SelectTriggerState(opts,SelectRootContext.get())}opts;root;attachment;#domTypeahead;#dataTypeahead;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(opts.ref,v=>this.root.triggerNode=v),this.root.domContext=new DOMContext(opts.ref),this.#domTypeahead=new DOMTypeahead({getCurrentItem:()=>this.root.highlightedNode,onMatch:node2=>{this.root.setHighlightedNode(node2)},getActiveElement:()=>this.root. +domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()}),this.#dataTypeahead=new DataTypeahead({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:label=>{if(this.root.isMulti||!this.root.opts.items.current)return;const matchedItem=this.root.opts.items.current.find(item=>item.label===label);matchedItem&&(this.root.opts.value.current=matchedItem.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]: +this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()}),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}#handleOpen(){this.root.opts.open.current=!0,this.#dataTypeahead.resetTypeahead(),this.#domTypeahead.resetTypeahead()}#handlePointerOpen(_){this.#handleOpen()}#handleKeyboardSelection(){const isCurrentSelectedValue=this.root.highlightedValue===this.root. +opts.value.current;return!this.root.opts.allowDeselect.current&&isCurrentSelectedValue&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!isCurrentSelectedValue?(this.root.handleClose(),!0):!1)}onkeydown(e){if(this.root.isUsingKeyboard=!0,(e.key===ARROW_UP||e.key===ARROW_DOWN)&&e.preventDefault(),!this.root.opts.open.current){if(e.key===ENTER||e.key===SPACE|| +e.key===ARROW_DOWN||e.key===ARROW_UP)e.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){this.#dataTypeahead.handleTypeaheadSearch(e.key);return}if(this.root.hasValue)return;const candidateNodes2=this.root.getCandidateNodes();if(!candidateNodes2.length)return;if(e.key===ARROW_DOWN){const firstCandidate=candidateNodes2[0];this.root.setHighlightedNode(firstCandidate)}else if(e.key===ARROW_UP){const lastCandidate=candidateNodes2[candidateNodes2.length- +1];this.root.setHighlightedNode(lastCandidate)}return}if(e.key===TAB){this.root.handleClose();return}if((e.key===ENTER||e.key===SPACE&&this.#domTypeahead.search==="")&&!e.isComposing&&(e.preventDefault(),this.#handleKeyboardSelection()))return;if(e.key===ARROW_UP&&e.altKey&&this.root.handleClose(),FIRST_LAST_KEYS.includes(e.key)){e.preventDefault();const candidateNodes2=this.root.getCandidateNodes(),currHighlightedNode=this.root.highlightedNode,currIndex=currHighlightedNode?candidateNodes2.indexOf( +currHighlightedNode):-1,loop2=this.root.opts.loop.current;let nextItem;if(e.key===ARROW_DOWN?nextItem=next(candidateNodes2,currIndex,loop2):e.key===ARROW_UP?nextItem=prev(candidateNodes2,currIndex,loop2):e.key===PAGE_DOWN?nextItem=forward(candidateNodes2,currIndex,10,loop2):e.key===PAGE_UP?nextItem=backward(candidateNodes2,currIndex,10,loop2):e.key===HOME?nextItem=candidateNodes2[0]:e.key===END&&(nextItem=candidateNodes2[candidateNodes2.length-1]),!nextItem)return;this.root.setHighlightedNode(nextItem); +return}const isModifierKey=e.ctrlKey||e.altKey||e.metaKey,isCharacterKey=e.key.length===1,isSpaceKey=e.key===SPACE,candidateNodes=this.root.getCandidateNodes();if(e.key!==TAB){if(!isModifierKey&&(isCharacterKey||isSpaceKey)){!this.#domTypeahead.handleTypeaheadSearch(e.key,candidateNodes)&&isSpaceKey&&(e.preventDefault(),this.#handleKeyboardSelection());return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(e){e.currentTarget.focus()}onpointerdown(e){if(this.root.opts. +disabled.current)return;if(e.pointerType==="touch")return e.preventDefault();const target2=e.target;target2?.hasPointerCapture(e.pointerId)&&target2?.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&(this.root.opts.open.current===!1?this.#handlePointerOpen(e):this.root.handleClose())}onpointerup(e){this.root.opts.disabled.current||(e.preventDefault(),e.pointerType==="touch"&&(this.root.opts.open.current===!1?this.#handlePointerOpen(e):this.root.handleClose()))}#props=user_derived( +()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":boolToStr(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":getDataOpenClosed(this.root.opts.open.current),"data-disabled":boolToEmptyStrOrUndef(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.getBitsAttr("trigger")]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick, +onpointerup:this.onpointerup,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class SelectContentState{static create(opts){return SelectContentContext.set(new SelectContentState(opts,SelectRootContext.get()))}opts;root;attachment;#isPositioned=state$1(!1);get isPositioned(){return get$3(this.#isPositioned)}set isPositioned(value){set$1(this.#isPositioned,value,!0)}domContext;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment= +attachRef(opts.ref,v=>this.root.contentNode=v),this.domContext=new DOMContext(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),onDestroyEffect(()=>{this.root.contentNode=null,this.root.contentIsPositioned=!1,this.isPositioned=!1}),watch$1(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.root.contentIsPositioned=!1,this.isPositioned=!1)}),watch$1([()=>this.isPositioned,()=>this.root.highlightedNode],()=>{!this.isPositioned||!this.root.highlightedNode|| +this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode)}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(_){this.root.isUsingKeyboard=!1}#styles=user_derived(()=>getFloatingContentCSSVars(this.root.isCombobox?"combobox":"select"));onInteractOutside=e=>{if(e.target===this.root.triggerNode||e.target===this.root.inputNode){e.preventDefault();return}this.opts.onInteractOutside.current(e),!e.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=e=>{this.opts.onEscapeKeydown. +current(e),!e.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=e=>{e.preventDefault()};onCloseAutoFocus=e=>{e.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#snippetProps=user_derived(()=>({open:this.root.opts.open.current}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0, +"data-state":getDataOpenClosed(this.root.opts.open.current),...getDataTransitionAttrs(this.root.contentPresence.transitionStatus),[this.root.getBitsAttr("content")]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...get$3(this.#styles)},onpointermove:this.onpointermove,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this. +onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.root.contentIsPositioned=!0,this.isPositioned=!0)}}}class SelectItemState{static create(opts){return new SelectItemState(opts,SelectRootContext.get())}opts;root;attachment;#isSelected=user_derived(()=>this.root.includesItem(this.opts.value.current));get isSelected(){return get$3(this.#isSelected)}set isSelected(value){set$1(this.#isSelected, +value)}#isHighlighted=user_derived(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return get$3(this.#isHighlighted)}set isHighlighted(value){set$1(this.#isHighlighted,value)}prevHighlighted=new Previous(()=>this.isHighlighted);#mounted=state$1(!1);get mounted(){return get$3(this.#mounted)}set mounted(value){set$1(this.#mounted,value,!0)}constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(opts.ref),watch$1([()=>this.isHighlighted,()=>this. +prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),watch$1(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}handleSelect(){if(this.opts.disabled.current)return;const isCurrentSelectedValue=this.opts.value.current===this.root.opts.value. +current;if(!this.root.opts.allowDeselect.current&&isCurrentSelectedValue&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!isCurrentSelectedValue&&this.root.handleClose()}#snippetProps=user_derived(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}onpointerdown(e){e.preventDefault()}onpointerup(e){ +if(!(e.defaultPrevented||!this.opts.ref.current)){if(e.pointerType==="touch"&&!isIOS){on(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}e.preventDefault(),this.handleSelect(),e.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(e){e.pointerType!=="touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#props=user_derived(()=>({ +id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":boolToEmptyStrOrUndef(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem(this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove, +onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class SelectHiddenInputState{static create(opts){return new SelectHiddenInputState(opts,SelectRootContext.get())}opts;root;#shouldRender=user_derived(()=>this.root.opts.name.current!=="");get shouldRender(){return get$3(this.#shouldRender)}set shouldRender(value){set$1(this.#shouldRender,value)}constructor(opts,root2){this.opts=opts, +this.root=root2,this.onfocus=this.onfocus.bind(this)}onfocus(e){e.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#props=user_derived(()=>({disabled:boolToTrueOrUndef(this.root.opts.disabled.current),required:boolToTrueOrUndef(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class SelectViewportState{static create(opts){ +return new SelectViewportState(opts,SelectContentContext.get())}opts;content;root;attachment;#prevScrollTop=state$1(0);get prevScrollTop(){return get$3(this.#prevScrollTop)}set prevScrollTop(value){set$1(this.#prevScrollTop,value,!0)}constructor(opts,content2){this.opts=opts,this.content=content2,this.root=content2.root,this.attachment=attachRef(opts.ref,v=>{this.root.viewportNode=v})}#props=user_derived(()=>({id:this.opts.id.current,role:"presentation",[this.root.getBitsAttr("viewport")]:"",style:{ +position:"relative",flex:1,overflow:"auto"},...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class SelectScrollButtonImplState{opts;content;root;attachment;autoScrollTimer=null;userScrollTimer=-1;isUserScrolling=!1;onAutoScroll=noop$1;#mounted=state$1(!1);get mounted(){return get$3(this.#mounted)}set mounted(value){set$1(this.#mounted,value,!0)}constructor(opts,content2){this.opts=opts,this.content=content2,this.root=content2.root,this.attachment= +attachRef(opts.ref),watch$1([()=>this.mounted],()=>{if(!this.mounted){this.isUserScrolling=!1;return}this.isUserScrolling}),user_effect(()=>{this.mounted||this.clearAutoScrollInterval()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}handleUserScroll(){this.content.domContext.clearTimeout(this.userScrollTimer),this.isUserScrolling=!0,this.userScrollTimer=this.content.domContext.setTimeout(()=>{ +this.isUserScrolling=!1},200)}clearAutoScrollInterval(){this.autoScrollTimer!==null&&(this.content.domContext.clearTimeout(this.autoScrollTimer),this.autoScrollTimer=null)}onpointerdown(_){if(this.autoScrollTimer!==null)return;const autoScroll=tick2=>{this.onAutoScroll(),this.autoScrollTimer=this.content.domContext.setTimeout(()=>autoScroll(tick2+1),this.opts.delay.current(tick2))};this.autoScrollTimer=this.content.domContext.setTimeout(()=>autoScroll(1),this.opts.delay.current(0))}onpointermove(e){ +this.onpointerdown(e)}onpointerleave(_){this.clearAutoScrollInterval()}#props=user_derived(()=>({id:this.opts.id.current,"aria-hidden":boolToStrTrueOrUndef(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class SelectScrollDownButtonState{static create(opts){return new SelectScrollDownButtonState(new SelectScrollButtonImplState( +opts,SelectContentContext.get()))}scrollButtonState;content;root;#canScrollDown=state$1(!1);get canScrollDown(){return get$3(this.#canScrollDown)}set canScrollDown(value){set$1(this.#canScrollDown,value,!0)}scrollIntoViewTimer=null;constructor(scrollButtonState){this.scrollButtonState=scrollButtonState,this.content=scrollButtonState.content,this.root=scrollButtonState.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,watch$1([()=>this.root.viewportNode,()=>this.content.isPositioned], +()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),on(this.root.viewportNode,"scroll",()=>this.handleScroll())}),watch$1([()=>this.root.opts.inputValue.current,()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{!this.root.viewportNode||!this.content.isPositioned||this.handleScroll(!0)}),watch$1(()=>this.scrollButtonState.mounted,()=>{this.scrollButtonState.mounted&&(this.scrollIntoViewTimer&&clearTimeout(this.scrollIntoViewTimer),this.scrollIntoViewTimer= +afterSleep(5,()=>{const activeItem=this.root.highlightedNode;activeItem&&this.root.scrollHighlightedNodeIntoView(activeItem)}))})}handleScroll=(manual=!1)=>{if(manual||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;const maxScroll=this.root.viewportNode.scrollHeight-this.root.viewportNode.clientHeight,paddingTop=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollDown=Math.ceil(this.root.viewportNode.scrollTop){ +const viewport=this.root.viewportNode,selectedItem=this.root.highlightedNode;!viewport||!selectedItem||(viewport.scrollTop=viewport.scrollTop+selectedItem.offsetHeight)};#props=user_derived(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr("scroll-down-button")]:""}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class SelectScrollUpButtonState{static create(opts){return new SelectScrollUpButtonState(new SelectScrollButtonImplState(opts,SelectContentContext. +get()))}scrollButtonState;content;root;#canScrollUp=state$1(!1);get canScrollUp(){return get$3(this.#canScrollUp)}set canScrollUp(value){set$1(this.#canScrollUp,value,!0)}constructor(scrollButtonState){this.scrollButtonState=scrollButtonState,this.content=scrollButtonState.content,this.root=scrollButtonState.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,watch$1([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned)) +return this.handleScroll(!0),on(this.root.viewportNode,"scroll",()=>this.handleScroll())})}handleScroll=(manual=!1)=>{if(manual||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;const paddingTop=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollUp=this.root.viewportNode.scrollTop-paddingTop>.1};handleAutoScroll=()=>{!this.root.viewportNode||!this.root.highlightedNode||(this.root.viewportNode.scrollTop=this.root.viewportNode.scrollTop-this. +root.highlightedNode.offsetHeight)};#props=user_derived(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr("scroll-up-button")]:""}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}function Select_hidden_input($$anchor,$$props){push$1($$props,!0);let value=prop($$props,"value",15);const hiddenInputState=SelectHiddenInputState.create({value:boxWith$1(()=>value())});var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Hidden_input( +$$anchor2,spread_props(()=>hiddenInputState.props,{get autocomplete(){return $$props.autocomplete},get value(){return value()},set value($$value){value($$value)}}))};if_block(node2,$$render=>{hiddenInputState.shouldRender&&$$render(consequent)})}append($$anchor,fragment),pop()}function Floating_layer_anchor($$anchor,$$props){push$1($$props,!0);let tooltip=prop($$props,"tooltip",3,!1);FloatingAnchorState.create({id:boxWith$1(()=>$$props.id),virtualEl:boxWith$1(()=>$$props.virtualEl),ref:$$props.ref}, +tooltip());var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}var root_4$M=from_svg(''),root_2$1u=from_html("");function Arrow($$anchor,$$props){push$1($$props,!0);let id2=prop($$props,"id",19,useId),width=prop($$props,"width",3,10),height=prop($$props,"height",3,5),restProps=rest_props( +$$props,["$$slots","$$events","$$legacy","id","children","child","width","height"]);const mergedProps=user_derived(()=>mergeProps(restProps,{id:id2()}));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate_1=$$anchor2=>{var span=root_2$1u();attribute_effect(span,()=>({...get$3(mergedProps)}));var node_2=child( +span);{var consequent_1=$$anchor3=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.children??noop$3),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var svg2=root_4$M();template_effect(()=>{set_attribute(svg2,"width",width()),set_attribute(svg2,"height",height())}),append($$anchor3,svg2)};if_block(node_2,$$render=>{$$props.children?$$render(consequent_1):$$render(alternate,-1)})}reset(span),append($$anchor2,span)};if_block(node2,$$render=>{$$props.child? +$$render(consequent):$$render(alternate_1,-1)})}append($$anchor,fragment),pop()}function Floating_layer_arrow($$anchor,$$props){push$1($$props,!0);let id2=prop($$props,"id",19,useId),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref"]);const arrowState=FloatingArrowState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,arrowState.props));Arrow($$anchor,spread_props(()=>get$3( +mergedProps))),pop()}function Floating_layer_content($$anchor,$$props){push$1($$props,!0);let side=prop($$props,"side",3,"bottom"),sideOffset=prop($$props,"sideOffset",3,0),align=prop($$props,"align",3,"center"),alignOffset=prop($$props,"alignOffset",3,0),arrowPadding=prop($$props,"arrowPadding",3,0),avoidCollisions=prop($$props,"avoidCollisions",3,!0),collisionBoundary=prop($$props,"collisionBoundary",19,()=>[]),collisionPadding=prop($$props,"collisionPadding",3,0),hideWhenDetached=prop($$props, +"hideWhenDetached",3,!1),onPlaced=prop($$props,"onPlaced",3,()=>{}),sticky=prop($$props,"sticky",3,"partial"),updatePositionStrategy=prop($$props,"updatePositionStrategy",3,"optimized"),strategy=prop($$props,"strategy",3,"fixed"),dir=prop($$props,"dir",3,"ltr"),style2=prop($$props,"style",19,()=>({})),wrapperId=prop($$props,"wrapperId",19,useId),customAnchor=prop($$props,"customAnchor",3,null),tooltip=prop($$props,"tooltip",3,!1);const contentState=FloatingContentState.create({side:boxWith$1(()=>side()), +sideOffset:boxWith$1(()=>sideOffset()),align:boxWith$1(()=>align()),alignOffset:boxWith$1(()=>alignOffset()),id:boxWith$1(()=>$$props.id),arrowPadding:boxWith$1(()=>arrowPadding()),avoidCollisions:boxWith$1(()=>avoidCollisions()),collisionBoundary:boxWith$1(()=>collisionBoundary()),collisionPadding:boxWith$1(()=>collisionPadding()),hideWhenDetached:boxWith$1(()=>hideWhenDetached()),onPlaced:boxWith$1(()=>onPlaced()),sticky:boxWith$1(()=>sticky()),updatePositionStrategy:boxWith$1(()=>updatePositionStrategy()), +strategy:boxWith$1(()=>strategy()),dir:boxWith$1(()=>dir()),style:boxWith$1(()=>style2()),enabled:boxWith$1(()=>$$props.enabled),wrapperId:boxWith$1(()=>wrapperId()),customAnchor:boxWith$1(()=>customAnchor())},tooltip()),mergedProps=user_derived(()=>mergeProps(contentState.wrapperProps,{style:{pointerEvents:"auto"}}));var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.content??noop$3,()=>({props:contentState.props,wrapperProps:get$3(mergedProps)})),append($$anchor,fragment), +pop()}function Floating_layer_content_static($$anchor,$$props){push$1($$props,!0),onMount$1(()=>{$$props.onPlaced?.()});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.content??noop$3,()=>({props:{},wrapperProps:{}})),append($$anchor,fragment),pop()}function Popper_content($$anchor,$$props){let isStatic=prop($$props,"isStatic",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var fragment=comment$2(),node2=first_child( +fragment);{var consequent=$$anchor2=>{Floating_layer_content_static($$anchor2,{get content(){return $$props.content},get onPlaced(){return $$props.onPlaced}})},alternate=$$anchor2=>{Floating_layer_content($$anchor2,spread_props({get content(){return $$props.content},get onPlaced(){return $$props.onPlaced}},()=>restProps))};if_block(node2,$$render=>{isStatic()?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment)}var root_1$1c=from_html(" ",1);function Popper_layer_inner($$anchor,$$props){ +push$1($$props,!0);let interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"close"),trapFocus=prop($$props,"trapFocus",3,!0),isValidEvent2=prop($$props,"isValidEvent",3,()=>!1),customAnchor=prop($$props,"customAnchor",3,null),isStatic=prop($$props,"isStatic",3,!1),tooltip=prop($$props,"tooltip",3,!1),contentPointerEvents=prop($$props,"contentPointerEvents",3,"auto"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","prev\ +entOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]); +const resolvedPreventScroll=user_derived(()=>$$props.preventScroll??!0),effectiveStrategy=user_derived(()=>$$props.strategy??(get$3(resolvedPreventScroll)?"fixed":"absolute"));Popper_content($$anchor,{get isStatic(){return isStatic()},get id(){return $$props.id},get side(){return $$props.side},get sideOffset(){return $$props.sideOffset},get align(){return $$props.align},get alignOffset(){return $$props.alignOffset},get arrowPadding(){return $$props.arrowPadding},get avoidCollisions(){return $$props. +avoidCollisions},get collisionBoundary(){return $$props.collisionBoundary},get collisionPadding(){return $$props.collisionPadding},get sticky(){return $$props.sticky},get hideWhenDetached(){return $$props.hideWhenDetached},get updatePositionStrategy(){return $$props.updatePositionStrategy},get strategy(){return get$3(effectiveStrategy)},get dir(){return $$props.dir},get wrapperId(){return $$props.wrapperId},get style(){return $$props.style},get onPlaced(){return $$props.onPlaced},get customAnchor(){ +return customAnchor()},get enabled(){return $$props.enabled},get tooltip(){return tooltip()},content:($$anchor2,$$arg0)=>{let floatingProps=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;var fragment_1=root_1$1c(),node2=first_child(fragment_1);{var consequent=$$anchor3=>{Scroll_lock($$anchor3,{get preventScroll(){return get$3(resolvedPreventScroll)}})},consequent_1=$$anchor3=>{Scroll_lock($$anchor3,{get preventScroll(){return get$3(resolvedPreventScroll)}})};if_block(node2,$$render=>{ +$$props.forceMount&&$$props.enabled?$$render(consequent):$$props.forceMount||$$render(consequent_1,1)})}var node_1=sibling(node2,2);Focus_scope(node_1,{get onOpenAutoFocus(){return $$props.onOpenAutoFocus},get onCloseAutoFocus(){return $$props.onCloseAutoFocus},get loop(){return $$props.loop},get enabled(){return $$props.enabled},get trapFocus(){return trapFocus()},get forceMount(){return $$props.forceMount},get ref(){return $$props.ref},focusScope:($$anchor3,$$arg02)=>{let focusScopeProps=()=>$$arg02?.(). +props;Escape_layer($$anchor3,{get onEscapeKeydown(){return $$props.onEscapeKeydown},get escapeKeydownBehavior(){return $$props.escapeKeydownBehavior},get enabled(){return $$props.enabled},get ref(){return $$props.ref},children:($$anchor4,$$slotProps)=>{Dismissible_layer($$anchor4,{get id(){return $$props.id},get onInteractOutside(){return $$props.onInteractOutside},get onFocusOutside(){return $$props.onFocusOutside},get interactOutsideBehavior(){return interactOutsideBehavior()},get isValidEvent(){ +return isValidEvent2()},get enabled(){return $$props.enabled},get ref(){return $$props.ref},children:($$anchor5,$$arg03)=>{let dismissibleProps=()=>$$arg03?.().props;Text_selection_layer($$anchor5,{get id(){return $$props.id},get preventOverflowTextSelection(){return $$props.preventOverflowTextSelection},get onPointerDown(){return $$props.onPointerDown},get onPointerUp(){return $$props.onPointerUp},get enabled(){return $$props.enabled},get ref(){return $$props.ref},children:($$anchor6,$$slotProps2)=>{ +var fragment_7=comment$2(),node_2=first_child(fragment_7);{let $0=user_derived(()=>({props:mergeProps(restProps,floatingProps(),dismissibleProps(),focusScopeProps(),{style:{pointerEvents:contentPointerEvents()}}),wrapperProps:wrapperProps()}));snippet(node_2,()=>$$props.popper??noop$3,()=>get$3($0))}append($$anchor6,fragment_7)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),append($$anchor2,fragment_1)},$$slots:{content:!0}}),pop()}function Popper_layer($$anchor,$$props){ +let interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"close"),trapFocus=prop($$props,"trapFocus",3,!0),isValidEvent2=prop($$props,"isValidEvent",3,()=>!1),customAnchor=prop($$props,"customAnchor",3,null),isStatic=prop($$props,"isStatic",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding", +"avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Popper_layer_inner($$anchor2,spread_props({get popper(){return $$props. +popper},get onEscapeKeydown(){return $$props.onEscapeKeydown},get escapeKeydownBehavior(){return $$props.escapeKeydownBehavior},get preventOverflowTextSelection(){return $$props.preventOverflowTextSelection},get id(){return $$props.id},get onPointerDown(){return $$props.onPointerDown},get onPointerUp(){return $$props.onPointerUp},get side(){return $$props.side},get sideOffset(){return $$props.sideOffset},get align(){return $$props.align},get alignOffset(){return $$props.alignOffset},get arrowPadding(){ +return $$props.arrowPadding},get avoidCollisions(){return $$props.avoidCollisions},get collisionBoundary(){return $$props.collisionBoundary},get collisionPadding(){return $$props.collisionPadding},get sticky(){return $$props.sticky},get hideWhenDetached(){return $$props.hideWhenDetached},get updatePositionStrategy(){return $$props.updatePositionStrategy},get strategy(){return $$props.strategy},get dir(){return $$props.dir},get preventScroll(){return $$props.preventScroll},get wrapperId(){return $$props. +wrapperId},get style(){return $$props.style},get onPlaced(){return $$props.onPlaced},get customAnchor(){return customAnchor()},get isStatic(){return isStatic()},get enabled(){return $$props.open},get onInteractOutside(){return $$props.onInteractOutside},get onCloseAutoFocus(){return $$props.onCloseAutoFocus},get onOpenAutoFocus(){return $$props.onOpenAutoFocus},get interactOutsideBehavior(){return interactOutsideBehavior()},get loop(){return $$props.loop},get trapFocus(){return trapFocus()},get isValidEvent(){ +return isValidEvent2()},get onFocusOutside(){return $$props.onFocusOutside},forceMount:!1,get ref(){return $$props.ref}},()=>restProps))};if_block(node2,$$render=>{$$props.shouldRender&&$$render(consequent)})}append($$anchor,fragment)}function Popper_layer_force_mount($$anchor,$$props){let interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"close"),trapFocus=prop($$props,"trapFocus",3,!0),isValidEvent2=prop($$props,"isValidEvent",3,()=>!1),customAnchor=prop($$props,"customAnchor",3, +null),isStatic=prop($$props,"isStatic",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpe\ +nAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);Popper_layer_inner($$anchor,spread_props({get popper(){return $$props.popper},get onEscapeKeydown(){return $$props.onEscapeKeydown},get escapeKeydownBehavior(){return $$props.escapeKeydownBehavior},get preventOverflowTextSelection(){return $$props.preventOverflowTextSelection},get id(){return $$props.id},get onPointerDown(){return $$props.onPointerDown},get onPointerUp(){ +return $$props.onPointerUp},get side(){return $$props.side},get sideOffset(){return $$props.sideOffset},get align(){return $$props.align},get alignOffset(){return $$props.alignOffset},get arrowPadding(){return $$props.arrowPadding},get avoidCollisions(){return $$props.avoidCollisions},get collisionBoundary(){return $$props.collisionBoundary},get collisionPadding(){return $$props.collisionPadding},get sticky(){return $$props.sticky},get hideWhenDetached(){return $$props.hideWhenDetached},get updatePositionStrategy(){ +return $$props.updatePositionStrategy},get strategy(){return $$props.strategy},get dir(){return $$props.dir},get preventScroll(){return $$props.preventScroll},get wrapperId(){return $$props.wrapperId},get style(){return $$props.style},get onPlaced(){return $$props.onPlaced},get customAnchor(){return customAnchor()},get isStatic(){return isStatic()},get enabled(){return $$props.enabled},get onInteractOutside(){return $$props.onInteractOutside},get onCloseAutoFocus(){return $$props.onCloseAutoFocus}, +get onOpenAutoFocus(){return $$props.onOpenAutoFocus},get interactOutsideBehavior(){return interactOutsideBehavior()},get loop(){return $$props.loop},get trapFocus(){return trapFocus()},get isValidEvent(){return isValidEvent2()},get onFocusOutside(){return $$props.onFocusOutside}},()=>restProps,{forceMount:!0}))}var root_4$L=from_html("
"),root_8$z=from_html("
");function Select_content$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop( +$$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),forceMount=prop($$props,"forceMount",3,!1),side=prop($$props,"side",3,"bottom"),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),preventScroll=prop($$props,"preventScroll",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]);const contentState=SelectContentState. +create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),onInteractOutside:boxWith$1(()=>onInteractOutside()),onEscapeKeydown:boxWith$1(()=>onEscapeKeydown())}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{Popper_layer_force_mount($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get side(){return side()},get enabled(){ +return contentState.root.opts.open.current},get id(){return id2()},get preventScroll(){return preventScroll()},forceMount:!0,get shouldRender(){return contentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:contentState.props.style},{style:$$props.style}));var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent=$$anchor4=>{var fragment_3=comment$2(), +node_2=first_child(fragment_3);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$L();attribute_effect(div,()=>({...wrapperProps()}));var div_1=child(div);attribute_effect(div_1,()=>({...get$3(finalProps)}));var node_3=child(div_1);snippet(node_3,()=>$$props.children??noop$3),reset(div_1),reset(div),append($$anchor4,div)};if_block( +node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor3,fragment_2)},$$slots:{popper:!0}}))},consequent_3=$$anchor2=>{Popper_layer($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get side(){return side()},get open(){return contentState.root.opts.open.current},get id(){return id2()},get preventScroll(){return preventScroll()},forceMount:!1,get shouldRender(){return contentState.shouldRender}, +popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:contentState.props.style},{style:$$props.style}));var fragment_5=comment$2(),node_4=first_child(fragment_5);{var consequent_2=$$anchor4=>{var fragment_6=comment$2(),node_5=first_child(fragment_6);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_5,()=>$$props.child, +()=>get$3($0))}append($$anchor4,fragment_6)},alternate_1=$$anchor4=>{var div_2=root_8$z();attribute_effect(div_2,()=>({...wrapperProps()}));var div_3=child(div_2);attribute_effect(div_3,()=>({...get$3(finalProps)}));var node_6=child(div_3);snippet(node_6,()=>$$props.children??noop$3),reset(div_3),reset(div_2),append($$anchor4,div_2)};if_block(node_4,$$render=>{$$props.child?$$render(consequent_2):$$render(alternate_1,-1)})}append($$anchor3,fragment_5)},$$slots:{popper:!0}}))};if_block(node2,$$render=>{ +forceMount()?$$render(consequent_1):forceMount()||$$render(consequent_3,1)})}append($$anchor,fragment),pop()}function Mounted($$anchor,$$props){push$1($$props,!0);let mounted=prop($$props,"mounted",15,!1),onMountedChange=prop($$props,"onMountedChange",3,noop$1);onMountEffect(()=>(mounted(!0),onMountedChange()(!0),()=>{mounted(!1),onMountedChange()(!1)})),pop()}var root_2$1t=from_html("
"),root$1Z=from_html(" ",1);function Select_item$1($$anchor,$$props){const uid2=props_id();push$1( +$$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),label=prop($$props,"label",19,()=>$$props.value),disabled=prop($$props,"disabled",3,!1),onHighlight=prop($$props,"onHighlight",3,noop$1),onUnhighlight=prop($$props,"onUnhighlight",3,noop$1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]);const itemState=SelectItemState.create({id:boxWith$1(()=>id2()),ref:boxWith$1( +()=>ref2(),v=>ref2(v)),value:boxWith$1(()=>$$props.value),disabled:boxWith$1(()=>disabled()),label:boxWith$1(()=>label()),onHighlight:boxWith$1(()=>onHighlight()),onUnhighlight:boxWith$1(()=>onUnhighlight())}),mergedProps=user_derived(()=>mergeProps(restProps,itemState.props));var fragment=root$1Z(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>({props:get$3(mergedProps),...itemState.snippetProps}));snippet( +node_1,()=>$$props.child,()=>get$3($0))}append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1t();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3,()=>itemState.snippetProps),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}var node_3=sibling(node2,2);Mounted(node_3,{get mounted(){return itemState.mounted},set mounted($$value){itemState.mounted= +$$value}}),append($$anchor,fragment),pop()}var root_2$1s=from_html("
");function Select_viewport($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","children","child"]);const viewportState=SelectViewportState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps, +viewportState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1s();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render( +consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_3$14=from_html("
"),root_1$1b=from_html(" ",1);function Select_scroll_down_button$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),delay=prop($$props,"delay",3,()=>50),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const scrollButtonState=SelectScrollDownButtonState. +create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),delay:boxWith$1(()=>delay())}),mergedProps=user_derived(()=>mergeProps(restProps,scrollButtonState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{var fragment_1=root_1$1b(),node_1=first_child(fragment_1);Mounted(node_1,{get mounted(){return scrollButtonState.scrollButtonState.mounted},set mounted($$value){scrollButtonState.scrollButtonState.mounted=$$value}});var node_2=sibling(node_1, +2);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.child,()=>({props:restProps})),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var div=root_3$14();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_4=child(div);snippet(node_4,()=>$$props.children??noop$3),reset(div),append($$anchor3,div)};if_block(node_2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment_1)};if_block(node2, +$$render=>{scrollButtonState.canScrollDown&&$$render(consequent_1)})}append($$anchor,fragment),pop()}var root_3$13=from_html("
"),root_1$1a=from_html(" ",1);function Select_scroll_up_button$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),delay=prop($$props,"delay",3,()=>50),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const scrollButtonState=SelectScrollUpButtonState. +create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),delay:boxWith$1(()=>delay())}),mergedProps=user_derived(()=>mergeProps(restProps,scrollButtonState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{var fragment_1=root_1$1a(),node_1=first_child(fragment_1);Mounted(node_1,{get mounted(){return scrollButtonState.scrollButtonState.mounted},set mounted($$value){scrollButtonState.scrollButtonState.mounted=$$value}});var node_2=sibling(node_1, +2);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.child,()=>({props:restProps})),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var div=root_3$13();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_4=child(div);snippet(node_4,()=>$$props.children??noop$3),reset(div),append($$anchor3,div)};if_block(node_2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment_1)};if_block(node2, +$$render=>{scrollButtonState.canScrollUp&&$$render(consequent_1)})}append($$anchor,fragment),pop()}function Menu_sub($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1);MenuSubmenuState.create({open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()?.(v)}),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())}),Floating_layer($$anchor,{children:($$anchor2,$$slotProps)=>{ +var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}var root_2$1r=from_html("
");function Menu_item($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid2)),disabled=prop($$props,"disabled",3,!1),onSelect=prop($$props,"onSelect",3,noop$1),closeOnSelect=prop($$props,"closeOnSelect",3,!0),restProps=rest_props( +$$props,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]);const itemState=MenuItemState.create({id:boxWith$1(()=>id2()),disabled:boxWith$1(()=>disabled()),onSelect:boxWith$1(()=>onSelect()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),closeOnSelect:boxWith$1(()=>closeOnSelect())}),mergedProps=user_derived(()=>mergeProps(restProps,itemState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(), +node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1r();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_2$1q=from_html("
");function Menu_separator($$anchor,$$props){ +const uid2=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid2)),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","id","child","children"]);const separatorState=MenuSeparatorState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,separatorState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(), +node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1q();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_4$K=from_html("
"),root_8$y=from_html( +"
");function Menu_sub_content($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),loop2=prop($$props,"loop",3,!0),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),forceMount=prop($$props,"forceMount",3,!1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"defer-otherwise-close"),escapeKeydownBehavior=prop( +$$props,"escapeKeydownBehavior",3,"defer-otherwise-close"),onOpenAutoFocusProp=prop($$props,"onOpenAutoFocus",3,noop$1),onCloseAutoFocusProp=prop($$props,"onCloseAutoFocus",3,noop$1),onFocusOutside=prop($$props,"onFocusOutside",3,noop$1),side=prop($$props,"side",3,"right"),trapFocus=prop($$props,"trapFocus",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","children","child","loop","onInteractOutside","forceMount","onEscapeKeydown","interactOutsideBehavior","escapeKe\ +ydownBehavior","onOpenAutoFocus","onCloseAutoFocus","onFocusOutside","side","trapFocus","style"]);const subContentState=MenuContentState.create({id:boxWith$1(()=>id2()),loop:boxWith$1(()=>loop2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),isSub:!0,onCloseAutoFocus:boxWith$1(()=>handleCloseAutoFocus)});function onkeydown(e){const isKeyDownInside=e.currentTarget.contains(e.target),isCloseKey=SUB_CLOSE_KEYS[subContentState.parentMenu.root.opts.dir.current].includes(e.key);isKeyDownInside&&isCloseKey&&(subContentState. +parentMenu.onClose(),subContentState.parentMenu.triggerNode?.focus(),e.preventDefault())}const dataAttr=user_derived(()=>subContentState.parentMenu.root.getBitsAttr("sub-content")),mergedProps=user_derived(()=>mergeProps(restProps,subContentState.props,{side:side(),onkeydown,[get$3(dataAttr)]:""}));function handleOpenAutoFocus(e){onOpenAutoFocusProp()(e),!e.defaultPrevented&&(e.preventDefault(),subContentState.parentMenu.root.isUsingKeyboard&&subContentState.parentMenu.contentNode&&MenuOpenEvent. +dispatch(subContentState.parentMenu.contentNode))}function handleCloseAutoFocus(e){onCloseAutoFocusProp()(e),!e.defaultPrevented&&e.preventDefault()}function handleInteractOutside(e){onInteractOutside()(e),!e.defaultPrevented&&subContentState.parentMenu.onClose()}function handleEscapeKeydown(e){onEscapeKeydown()(e),!e.defaultPrevented&&subContentState.parentMenu.onClose()}function handleOnFocusOutside(e){if(onFocusOutside()(e),e.defaultPrevented||!isHTMLElement$1(e.target)||e.target.id===subContentState. +parentMenu.triggerNode?.id)return;if(subContentState.parentMenu.parentMenu?.contentNode?.contains(e.target)){subContentState.parentMenu.onClose(),e.preventDefault();return}const subContentSelector=`[${subContentState.parentMenu.root.getBitsAttr("sub-content")}]`;if(e.target.closest(subContentSelector)){e.preventDefault();return}subContentState.parentMenu.onClose()}var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{Popper_layer_force_mount($$anchor2,spread_props(()=>get$3( +mergedProps),{get ref(){return subContentState.opts.ref},get interactOutsideBehavior(){return interactOutsideBehavior()},get escapeKeydownBehavior(){return escapeKeydownBehavior()},onOpenAutoFocus:handleOpenAutoFocus,get enabled(){return subContentState.parentMenu.opts.open.current},onInteractOutside:handleInteractOutside,onEscapeKeydown:handleEscapeKeydown,onFocusOutside:handleOnFocusOutside,preventScroll:!1,get loop(){return loop2()},get trapFocus(){return trapFocus()},get shouldRender(){return subContentState. +shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),get$3(mergedProps),{style:getFloatingContentCSSVars("menu")},{style:$$props.style}));var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent=$$anchor4=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...subContentState.snippetProps})); +snippet(node_2,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$K();attribute_effect(div,()=>({...wrapperProps()}));var div_1=child(div);attribute_effect(div_1,()=>({...get$3(finalProps)}));var node_3=child(div_1);snippet(node_3,()=>$$props.children??noop$3),reset(div_1),reset(div),append($$anchor4,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor3,fragment_2)},$$slots:{popper:!0}}))},consequent_3=$$anchor2=>{ +Popper_layer($$anchor2,spread_props(()=>get$3(mergedProps),{get ref(){return subContentState.opts.ref},get interactOutsideBehavior(){return interactOutsideBehavior()},get escapeKeydownBehavior(){return escapeKeydownBehavior()},onCloseAutoFocus:handleCloseAutoFocus,onOpenAutoFocus:handleOpenAutoFocus,get open(){return subContentState.parentMenu.opts.open.current},onInteractOutside:handleInteractOutside,onEscapeKeydown:handleEscapeKeydown,onFocusOutside:handleOnFocusOutside,preventScroll:!1,get loop(){ +return loop2()},get trapFocus(){return trapFocus()},get shouldRender(){return subContentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),get$3(mergedProps),{style:getFloatingContentCSSVars("menu")},{style:$$props.style}));var fragment_5=comment$2(),node_4=first_child(fragment_5);{var consequent_2=$$anchor4=>{var fragment_6=comment$2(),node_5=first_child(fragment_6);{let $0=user_derived( +()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...subContentState.snippetProps}));snippet(node_5,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_6)},alternate_1=$$anchor4=>{var div_2=root_8$y();attribute_effect(div_2,()=>({...wrapperProps()}));var div_3=child(div_2);attribute_effect(div_3,()=>({...get$3(finalProps)}));var node_6=child(div_3);snippet(node_6,()=>$$props.children??noop$3),reset(div_3),reset(div_2),append($$anchor4,div_2)};if_block(node_4,$$render=>{$$props.child? +$$render(consequent_2):$$render(alternate_1,-1)})}append($$anchor3,fragment_5)},$$slots:{popper:!0}}))};if_block(node2,$$render=>{forceMount()?$$render(consequent_1):forceMount()||$$render(consequent_3,1)})}append($$anchor,fragment),pop()}var root_3$12=from_html("
");function Menu_sub_trigger($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),disabled=prop($$props,"disabled",3,!1),ref2=prop($$props,"ref",15,null),onSelect=prop( +$$props,"onSelect",3,noop$1),openDelay=prop($$props,"openDelay",3,0),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","disabled","ref","children","child","onSelect","openDelay"]);const subTriggerState=MenuSubTriggerState.create({disabled:boxWith$1(()=>disabled()),onSelect:boxWith$1(()=>onSelect()),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),openDelay:boxWith$1(()=>openDelay())}),mergedProps=user_derived(()=>mergeProps(restProps,subTriggerState.props));Floating_layer_anchor( +$$anchor,{get id(){return id2()},get ref(){return subTriggerState.opts.ref},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_1=first_child(fragment_2);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var div=root_3$12();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children?? +noop$3),reset(div),append($$anchor3,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}function isPointInPolygon(point2,polygon){const[x,y]=point2;let isInside=!1;const length=polygon.length;for(let i=0,j=length-1;i=y!=yj>=y&&x<=(xj-xi)*(y-yi)/(yj-yi)+xi&&(isInside=!isInside)}return isInside}function isInsideRect(point2,rect){ +return point2[0]>=rect.left&&point2[0]<=rect.right&&point2[1]>=rect.top&&point2[1]<=rect.bottom}function getSide(triggerRect,contentRect){const triggerCenterX=triggerRect.left+triggerRect.width/2,triggerCenterY=triggerRect.top+triggerRect.height/2,contentCenterX=contentRect.left+contentRect.width/2,contentCenterY=contentRect.top+contentRect.height/2,deltaX=contentCenterX-triggerCenterX,deltaY=contentCenterY-triggerCenterY;return Math.abs(deltaX)>Math.abs(deltaY)?deltaX>0?"right":"left":deltaY>0? +"bottom":"top"}class SafePolygon{#opts;#buffer;#transitIntentTimeout;#exitPoint=null;#exitTarget=null;#transitTargets=[];#trackedTriggerNode=null;#leaveFallbackRafId=null;#transitIntentTimeoutId=null;#cancelLeaveFallback(){this.#leaveFallbackRafId!==null&&(cancelAnimationFrame(this.#leaveFallbackRafId),this.#leaveFallbackRafId=null)}#scheduleLeaveFallback(){this.#cancelLeaveFallback(),this.#leaveFallbackRafId=requestAnimationFrame(()=>{this.#leaveFallbackRafId=null,!(!this.#exitPoint||!this.#exitTarget)&& +(this.#clearTracking(),this.#opts.onPointerExit())})}#cancelTransitIntentTimeout(){this.#transitIntentTimeoutId!==null&&(clearTimeout(this.#transitIntentTimeoutId),this.#transitIntentTimeoutId=null)}#scheduleTransitIntentTimeout(){this.#transitIntentTimeout!==null&&(this.#cancelTransitIntentTimeout(),this.#transitIntentTimeoutId=window.setTimeout(()=>{this.#transitIntentTimeoutId=null,!(!this.#exitPoint||!this.#exitTarget)&&(this.#clearTracking(),this.#opts.onPointerExit())},this.#transitIntentTimeout))}constructor(opts){ +this.#opts=opts,this.#buffer=opts.buffer??1;const transitIntentTimeout=opts.transitIntentTimeout;this.#transitIntentTimeout=typeof transitIntentTimeout=="number"&&transitIntentTimeout>0?transitIntentTimeout:null,watch$1([opts.triggerNode,opts.contentNode,opts.enabled],([triggerNode,contentNode,enabled])=>{if(!triggerNode||!contentNode||!enabled){this.#trackedTriggerNode=null,this.#clearTracking();return}this.#trackedTriggerNode&&this.#trackedTriggerNode!==triggerNode&&this.#clearTracking(),this.#trackedTriggerNode= +triggerNode;const doc=getDocument$1(triggerNode),handlePointerMove=e=>{this.#onPointerMove([e.clientX,e.clientY],triggerNode,contentNode)},handleTriggerLeave=e=>{const target2=e.relatedTarget;if(isElement$1(target2)&&contentNode.contains(target2))return;const ignoredTargets=this.#opts.ignoredTargets?.()??[];isElement$1(target2)&&ignoredTargets.some(n=>n===target2||n.contains(target2))||(this.#transitTargets=isElement$1(target2)&&ignoredTargets.length>0?ignoredTargets.filter(n=>target2.contains(n)): +[],this.#exitPoint=[e.clientX,e.clientY],this.#exitTarget="content",this.#scheduleLeaveFallback())},handleTriggerEnter=()=>{this.#clearTracking()},handleContentEnter=()=>{this.#clearTracking()},handleContentLeave=e=>{const target2=e.relatedTarget;isElement$1(target2)&&triggerNode.contains(target2)||(this.#exitPoint=[e.clientX,e.clientY],this.#exitTarget="trigger",this.#scheduleLeaveFallback())};return[on(doc,"pointermove",handlePointerMove),on(triggerNode,"pointerleave",handleTriggerLeave),on(triggerNode, +"pointerenter",handleTriggerEnter),on(contentNode,"pointerenter",handleContentEnter),on(contentNode,"pointerleave",handleContentLeave)].reduce((acc,cleanup)=>()=>{acc(),cleanup()},()=>{})})}#onPointerMove(clientPoint,triggerNode,contentNode){if(!this.#exitPoint||!this.#exitTarget)return;this.#cancelLeaveFallback(),this.#scheduleTransitIntentTimeout();const triggerRect=triggerNode.getBoundingClientRect(),contentRect=contentNode.getBoundingClientRect();if(this.#exitTarget==="content"&&isInsideRect( +clientPoint,contentRect)){this.#clearTracking();return}if(this.#exitTarget==="trigger"&&isInsideRect(clientPoint,triggerRect)){this.#clearTracking();return}if(this.#exitTarget==="content"&&this.#transitTargets.length>0)for(const transitTarget of this.#transitTargets){const transitRect=transitTarget.getBoundingClientRect();if(isInsideRect(clientPoint,transitRect))return;const transitSide=getSide(triggerRect,transitRect),transitCorridor=this.#getCorridorPolygon(triggerRect,transitRect,transitSide); +if(transitCorridor&&isPointInPolygon(clientPoint,transitCorridor))return}const side=getSide(triggerRect,contentRect),corridorPoly=this.#getCorridorPolygon(triggerRect,contentRect,side);if(corridorPoly&&isPointInPolygon(clientPoint,corridorPoly))return;const targetRect=this.#exitTarget==="content"?contentRect:triggerRect,safePoly=this.#getSafePolygon(this.#exitPoint,targetRect,side,this.#exitTarget);isPointInPolygon(clientPoint,safePoly)||(this.#clearTracking(),this.#opts.onPointerExit())}#clearTracking(){ +this.#exitPoint=null,this.#exitTarget=null,this.#transitTargets=[],this.#cancelLeaveFallback(),this.#cancelTransitIntentTimeout()}#getCorridorPolygon(triggerRect,contentRect,side){const buffer=this.#buffer;switch(side){case"top":return[[Math.min(triggerRect.left,contentRect.left)-buffer,triggerRect.top],[Math.min(triggerRect.left,contentRect.left)-buffer,contentRect.bottom],[Math.max(triggerRect.right,contentRect.right)+buffer,contentRect.bottom],[Math.max(triggerRect.right,contentRect.right)+buffer, +triggerRect.top]];case"bottom":return[[Math.min(triggerRect.left,contentRect.left)-buffer,triggerRect.bottom],[Math.min(triggerRect.left,contentRect.left)-buffer,contentRect.top],[Math.max(triggerRect.right,contentRect.right)+buffer,contentRect.top],[Math.max(triggerRect.right,contentRect.right)+buffer,triggerRect.bottom]];case"left":return[[triggerRect.left,Math.min(triggerRect.top,contentRect.top)-buffer],[contentRect.right,Math.min(triggerRect.top,contentRect.top)-buffer],[contentRect.right,Math. +max(triggerRect.bottom,contentRect.bottom)+buffer],[triggerRect.left,Math.max(triggerRect.bottom,contentRect.bottom)+buffer]];case"right":return[[triggerRect.right,Math.min(triggerRect.top,contentRect.top)-buffer],[contentRect.left,Math.min(triggerRect.top,contentRect.top)-buffer],[contentRect.left,Math.max(triggerRect.bottom,contentRect.bottom)+buffer],[triggerRect.right,Math.max(triggerRect.bottom,contentRect.bottom)+buffer]]}}#getSafePolygon(exitPoint,targetRect,side,exitTarget){const buffer=this.#buffer* +4,[x,y]=exitPoint;switch(exitTarget==="trigger"?this.#flipSide(side):side){case"top":return[[x-buffer,y+buffer],[x+buffer,y+buffer],[targetRect.right+buffer,targetRect.bottom],[targetRect.right+buffer,targetRect.top],[targetRect.left-buffer,targetRect.top],[targetRect.left-buffer,targetRect.bottom]];case"bottom":return[[x-buffer,y-buffer],[x+buffer,y-buffer],[targetRect.right+buffer,targetRect.top],[targetRect.right+buffer,targetRect.bottom],[targetRect.left-buffer,targetRect.bottom],[targetRect. +left-buffer,targetRect.top]];case"left":return[[x+buffer,y-buffer],[x+buffer,y+buffer],[targetRect.right,targetRect.bottom+buffer],[targetRect.left,targetRect.bottom+buffer],[targetRect.left,targetRect.top-buffer],[targetRect.right,targetRect.top-buffer]];case"right":return[[x-buffer,y-buffer],[x-buffer,y+buffer],[targetRect.left,targetRect.bottom+buffer],[targetRect.right,targetRect.bottom+buffer],[targetRect.right,targetRect.top-buffer],[targetRect.left,targetRect.top-buffer]]}}#flipSide(side){ +switch(side){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}}const popoverAttrs=createBitsAttrs({component:"popover",parts:["root","trigger","content","close","overlay"]}),PopoverRootContext=new Context$1("Popover.Root");class PopoverRootState{static create(opts){return PopoverRootContext.set(new PopoverRootState(opts))}opts;#contentNode=state$1(null);get contentNode(){return get$3(this.#contentNode)}set contentNode(value){set$1(this.#contentNode, +value,!0)}contentPresence;#triggerNode=state$1(null);get triggerNode(){return get$3(this.#triggerNode)}set triggerNode(value){set$1(this.#triggerNode,value,!0)}#overlayNode=state$1(null);get overlayNode(){return get$3(this.#overlayNode)}set overlayNode(value){set$1(this.#overlayNode,value,!0)}overlayPresence;#openedViaHover=state$1(!1);get openedViaHover(){return get$3(this.#openedViaHover)}set openedViaHover(value){set$1(this.#openedViaHover,value,!0)}#hasInteractedWithContent=state$1(!1);get hasInteractedWithContent(){ +return get$3(this.#hasInteractedWithContent)}set hasInteractedWithContent(value){set$1(this.#hasInteractedWithContent,value,!0)}#hoverCooldown=state$1(!1);get hoverCooldown(){return get$3(this.#hoverCooldown)}set hoverCooldown(value){set$1(this.#hoverCooldown,value,!0)}#closeDelay=state$1(0);get closeDelay(){return get$3(this.#closeDelay)}set closeDelay(value){set$1(this.#closeDelay,value,!0)}#closeTimeout=null;#domContext=null;constructor(opts){this.opts=opts,this.contentPresence=new PresenceManager( +{ref:boxWith$1(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new PresenceManager({ref:boxWith$1(()=>this.overlayNode),open:this.opts.open}),watch$1(()=>this.opts.open.current,isOpen=>{isOpen||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#clearCloseTimeout())})}setDomContext(ctx){this.#domContext=ctx}#clearCloseTimeout(){this.#closeTimeout!==null&&this.#domContext&&(this.#domContext. +clearTimeout(this.#closeTimeout),this.#closeTimeout=null)}toggleOpen(){this.#clearCloseTimeout(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#clearCloseTimeout(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#clearCloseTimeout(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){ +this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#clearCloseTimeout(),this.closeDelay<=0?this.opts.open.current=!1:this.#domContext&&(this.#closeTimeout=this.#domContext.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#closeTimeout=null},this.closeDelay))))}cancelDelayedClose(){this.#clearCloseTimeout()}markInteraction(){this.hasInteractedWithContent=!0,this.#clearCloseTimeout()}}class PopoverTriggerState{static create(opts){ +return new PopoverTriggerState(opts,PopoverRootContext.get())}opts;root;attachment;domContext;#openTimeout=null;#closeTimeout=null;#isHovering=state$1(!1);constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref,v=>this.root.triggerNode=v),this.domContext=new DOMContext(opts.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave= +this.onpointerleave.bind(this),watch$1(()=>this.opts.closeDelay.current,delay=>{this.root.closeDelay=delay})}#clearOpenTimeout(){this.#openTimeout!==null&&(this.domContext.clearTimeout(this.#openTimeout),this.#openTimeout=null)}#clearCloseTimeout(){this.#closeTimeout!==null&&(this.domContext.clearTimeout(this.#closeTimeout),this.#closeTimeout=null)}#clearAllTimeouts(){this.#clearOpenTimeout(),this.#clearCloseTimeout()}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current|| +isTouch(e)||(set$1(this.#isHovering,!0),this.#clearCloseTimeout(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const delay=this.opts.openDelay.current;delay<=0?this.root.handleHoverOpen():this.#openTimeout=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#openTimeout=null},delay)}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&(isTouch(e)||(set$1(this.#isHovering,!1),this.#clearOpenTimeout(),this.root.hoverCooldown= +!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(this.#clearAllTimeouts(),get$3(this.#isHovering)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}get$3(this.#isHovering)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current|| +(e.key===ENTER||e.key===SPACE)&&(e.preventDefault(),this.#clearAllTimeouts(),this.root.toggleOpen())}#getAriaControls(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#props=user_derived(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":boolToStr(this.root.opts.open.current),"data-state":getDataOpenClosed(this.root.opts.open.current),"aria-controls":this.#getAriaControls(),[popoverAttrs.trigger]:"",disabled:this.opts.disabled.current, +onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class PopoverContentState{static create(opts){return new PopoverContentState(opts,PopoverRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref,v=>this.root.contentNode=v),this.onpointerdown=this.onpointerdown. +bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new SafePolygon({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(_){this.root.markInteraction()}onfocusin(e){const target2=e.target;isElement$1( +target2)&&isTabbable(target2)&&this.root.markInteraction()}onpointerenter(e){isTouch(e)||this.root.cancelDelayedClose()}onpointerleave(e){isTouch(e)}onInteractOutside=e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!isElement$1(e.target))return;const closestTrigger=e.target.closest(popoverAttrs.selector("trigger"));if(!(closestTrigger&&closestTrigger===this.root.triggerNode)){if(this.opts.customAnchor.current){if(isElement$1(this.opts.customAnchor.current)){if(this.opts.customAnchor. +current.contains(e.target))return}else if(typeof this.opts.customAnchor.current=="string"){const el=document.querySelector(this.opts.customAnchor.current);if(el&&el.contains(e.target))return}}this.root.handleClose()}};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#snippetProps=user_derived( +()=>({open:this.root.opts.open.current}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,tabindex:-1,"data-state":getDataOpenClosed(this.root.opts.open.current),...getDataTransitionAttrs(this.root.contentPresence.transitionStatus),[popoverAttrs.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter, +onpointerleave:this.onpointerleave,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}}var root_4$J=from_html("
"),root_8$x=from_html("
");function Popover_content$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid2)),forceMount=prop( +$$props,"forceMount",3,!1),onOpenAutoFocus=prop($$props,"onOpenAutoFocus",3,noop$1),onCloseAutoFocus=prop($$props,"onCloseAutoFocus",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),trapFocus=prop($$props,"trapFocus",3,!0),preventScroll=prop($$props,"preventScroll",3,!1),customAnchor=prop($$props,"customAnchor",3,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","child","children","ref","id","forceMo\ +unt","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]);const contentState=PopoverContentState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),onInteractOutside:boxWith$1(()=>onInteractOutside()),onEscapeKeydown:boxWith$1(()=>onEscapeKeydown()),customAnchor:boxWith$1(()=>customAnchor())}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props)),effectiveTrapFocus=user_derived(()=>trapFocus()&& +contentState.shouldTrapFocus);function handleOpenAutoFocus(e){contentState.shouldTrapFocus||e.preventDefault(),onOpenAutoFocus()(e)}var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{Popper_layer_force_mount($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get enabled(){return contentState.root.opts.open.current},get id(){return id2()},get trapFocus(){return get$3(effectiveTrapFocus)},get preventScroll(){ +return preventScroll()},loop:!0,forceMount:!0,get customAnchor(){return customAnchor()},onOpenAutoFocus:handleOpenAutoFocus,get onCloseAutoFocus(){return onCloseAutoFocus()},get shouldRender(){return contentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars("popover")},{style:$$props.style}));var fragment_2=comment$2(),node_1=first_child(fragment_2); +{var consequent=$$anchor4=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$J();attribute_effect(div,()=>({...wrapperProps()}));var div_1=child(div);attribute_effect(div_1,()=>({...get$3(finalProps)}));var node_3=child(div_1);snippet(node_3,()=>$$props.children??noop$3), +reset(div_1),reset(div),append($$anchor4,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor3,fragment_2)},$$slots:{popper:!0}}))},consequent_3=$$anchor2=>{Popper_layer($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get open(){return contentState.root.opts.open.current},get id(){return id2()},get trapFocus(){return get$3(effectiveTrapFocus)},get preventScroll(){return preventScroll()}, +loop:!0,forceMount:!1,get customAnchor(){return customAnchor()},onOpenAutoFocus:handleOpenAutoFocus,get onCloseAutoFocus(){return onCloseAutoFocus()},get shouldRender(){return contentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars("popover")},{style:$$props.style}));var fragment_5=comment$2(),node_4=first_child(fragment_5);{var consequent_2=$$anchor4=>{ +var fragment_6=comment$2(),node_5=first_child(fragment_6);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_5,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_6)},alternate_1=$$anchor4=>{var div_2=root_8$x();attribute_effect(div_2,()=>({...wrapperProps()}));var div_3=child(div_2);attribute_effect(div_3,()=>({...get$3(finalProps)}));var node_6=child(div_3);snippet(node_6,()=>$$props.children??noop$3),reset(div_3), +reset(div_2),append($$anchor4,div_2)};if_block(node_4,$$render=>{$$props.child?$$render(consequent_2):$$render(alternate_1,-1)})}append($$anchor3,fragment_5)},$$slots:{popper:!0}}))};if_block(node2,$$render=>{forceMount()?$$render(consequent_1):forceMount()||$$render(consequent_3,1)})}append($$anchor,fragment),pop()}var root_3$11=from_html("");function Popover_trigger$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)), +ref2=prop($$props,"ref",15,null),type2=prop($$props,"type",3,"button"),disabled=prop($$props,"disabled",3,!1),openOnHover=prop($$props,"openOnHover",3,!1),openDelay=prop($$props,"openDelay",3,700),closeDelay=prop($$props,"closeDelay",3,300),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]);const triggerState=PopoverTriggerState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)), +disabled:boxWith$1(()=>!!disabled()),openOnHover:boxWith$1(()=>openOnHover()),openDelay:boxWith$1(()=>openDelay()),closeDelay:boxWith$1(()=>closeDelay())}),mergedProps=user_derived(()=>mergeProps(restProps,triggerState.props,{type:type2()}));Floating_layer_anchor($$anchor,{get id(){return id2()},get ref(){return triggerState.opts.ref},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_1=first_child( +fragment_2);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var button=root_3$11();attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor3,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}function Dialog($$anchor,$$props){push$1( +$$props,!0);let open2=prop($$props,"open",15,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1);DialogRootState.create({variant:boxWith$1(()=>"dialog"),open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}var root_2$1p=from_html("");function Dialog_close($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),disabled=prop($$props,"disabled",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const closeState=DialogCloseState.create({variant:boxWith$1(()=>"close"),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),disabled:boxWith$1(()=>!!disabled())}), +mergedProps=user_derived(()=>mergeProps(restProps,closeState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1p();attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor2, +button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_6$x=from_html(" ",1),root_8$w=from_html("
",1);function Dialog_content$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),forceMount=prop($$props,"forceMount",3,!1),onCloseAutoFocus=prop($$props,"onCloseAutoFocus",3,noop$1),onOpenAutoFocus=prop($$props, +"onOpenAutoFocus",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),trapFocus=prop($$props,"trapFocus",3,!0),preventScroll=prop($$props,"preventScroll",3,!0),restoreScrollDelay=prop($$props,"restoreScrollDelay",3,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScr\ +oll","restoreScrollDelay"]);const contentState=DialogContentState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_2=$$anchor2=>{Focus_scope($$anchor2,{get ref(){return contentState.opts.ref},loop:!0,get trapFocus(){return trapFocus()},get enabled(){return contentState.root.opts.open.current},get onOpenAutoFocus(){return onOpenAutoFocus()}, +get onCloseAutoFocus(){return onCloseAutoFocus()},focusScope:($$anchor3,$$arg0)=>{let focusScopeProps=()=>$$arg0?.().props;Escape_layer($$anchor3,spread_props(()=>get$3(mergedProps),{get enabled(){return contentState.root.opts.open.current},get ref(){return contentState.opts.ref},onEscapeKeydown:e=>{onEscapeKeydown()(e),!e.defaultPrevented&&contentState.root.handleClose()},children:($$anchor4,$$slotProps)=>{Dismissible_layer($$anchor4,spread_props(()=>get$3(mergedProps),{get ref(){return contentState. +opts.ref},get enabled(){return contentState.root.opts.open.current},onInteractOutside:e=>{onInteractOutside()(e),!e.defaultPrevented&&contentState.root.handleClose()},children:($$anchor5,$$slotProps2)=>{Text_selection_layer($$anchor5,spread_props(()=>get$3(mergedProps),{get ref(){return contentState.opts.ref},get enabled(){return contentState.root.opts.open.current},children:($$anchor6,$$slotProps3)=>{var fragment_5=comment$2(),node_1=first_child(fragment_5);{var consequent_1=$$anchor7=>{var fragment_6=root_6$x(), +node_2=first_child(fragment_6);{var consequent=$$anchor8=>{Scroll_lock($$anchor8,{get preventScroll(){return preventScroll()},get restoreScrollDelay(){return restoreScrollDelay()}})};if_block(node_2,$$render=>{contentState.root.opts.open.current&&$$render(consequent)})}var node_3=sibling(node_2,2);{let $0=user_derived(()=>({props:mergeProps(get$3(mergedProps),focusScopeProps()),...contentState.snippetProps}));snippet(node_3,()=>$$props.child,()=>get$3($0))}append($$anchor7,fragment_6)},alternate=$$anchor7=>{ +var fragment_8=root_8$w(),node_4=first_child(fragment_8);Scroll_lock(node_4,{get preventScroll(){return preventScroll()}});var div=sibling(node_4,2);attribute_effect(div,$0=>({...$0}),[()=>mergeProps(get$3(mergedProps),focusScopeProps())]);var node_5=child(div);snippet(node_5,()=>$$props.children??noop$3),reset(div),append($$anchor7,fragment_8)};if_block(node_1,$$render=>{$$props.child?$$render(consequent_1):$$render(alternate,-1)})}append($$anchor6,fragment_5)},$$slots:{default:!0}}))},$$slots:{ +default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};if_block(node2,$$render=>{(contentState.shouldRender||forceMount())&&$$render(consequent_2)})}append($$anchor,fragment),pop()}function Menu($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),dir=prop($$props,"dir",3,"ltr"),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1),variant=prop($$props,"_internal_variant",3,"dropdown-menu"),shouldSkipExitAnimation=prop( +$$props,"_internal_should_skip_exit_animation",3,void 0);const root2=MenuRootState.create({variant:boxWith$1(()=>variant()),dir:boxWith$1(()=>dir()),onClose:()=>{open2(!1),onOpenChange()(!1)},shouldSkipExitAnimation:()=>shouldSkipExitAnimation()?.()??!1});MenuMenuState.create({open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())},root2),Floating_layer($$anchor,{children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child( +fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}var root_4$I=from_html("
"),root_8$v=from_html("
");function Dropdown_menu_content$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),loop2=prop($$props,"loop",3,!0),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),onEscapeKeydown=prop( +$$props,"onEscapeKeydown",3,noop$1),onCloseAutoFocus=prop($$props,"onCloseAutoFocus",3,noop$1),forceMount=prop($$props,"forceMount",3,!1),trapFocus=prop($$props,"trapFocus",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const contentState=MenuContentState.create({id:boxWith$1(()=>id2()),loop:boxWith$1(()=>loop2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)), +onCloseAutoFocus:boxWith$1(()=>onCloseAutoFocus())}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props));function handleInteractOutside(e){if(contentState.handleInteractOutside(e),!e.defaultPrevented&&(onInteractOutside()(e),!e.defaultPrevented)){if(e.target&&e.target instanceof Element){const subContentSelector=`[${contentState.parentMenu.root.getBitsAttr("sub-content")}]`;if(e.target.closest(subContentSelector))return}contentState.parentMenu.onClose()}}function handleEscapeKeydown(e){ +onEscapeKeydown()(e),!e.defaultPrevented&&contentState.parentMenu.onClose()}var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{Popper_layer_force_mount($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get enabled(){return contentState.parentMenu.opts.open.current},onInteractOutside:handleInteractOutside,onEscapeKeydown:handleEscapeKeydown,get trapFocus(){return trapFocus()},get loop(){return loop2()}, +forceMount:!0,get id(){return id2()},get shouldRender(){return contentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars("dropdown-menu")},{style:$$props.style}));var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent=$$anchor4=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);{let $0=user_derived(()=>({props:get$3( +finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$I();attribute_effect(div,()=>({...wrapperProps()}));var div_1=child(div);attribute_effect(div_1,()=>({...get$3(finalProps)}));var node_3=child(div_1);snippet(node_3,()=>$$props.children??noop$3),reset(div_1),reset(div),append($$anchor4,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render( +alternate,-1)})}append($$anchor3,fragment_2)},$$slots:{popper:!0}}))},consequent_3=$$anchor2=>{Popper_layer($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get open(){return contentState.parentMenu.opts.open.current},onInteractOutside:handleInteractOutside,onEscapeKeydown:handleEscapeKeydown,get trapFocus(){return trapFocus()},get loop(){return loop2()},forceMount:!1,get id(){return id2()},get shouldRender(){return contentState. +shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars("dropdown-menu")},{style:$$props.style}));var fragment_5=comment$2(),node_4=first_child(fragment_5);{var consequent_2=$$anchor4=>{var fragment_6=comment$2(),node_5=first_child(fragment_6);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet( +node_5,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_6)},alternate_1=$$anchor4=>{var div_2=root_8$v();attribute_effect(div_2,()=>({...wrapperProps()}));var div_3=child(div_2);attribute_effect(div_3,()=>({...get$3(finalProps)}));var node_6=child(div_3);snippet(node_6,()=>$$props.children??noop$3),reset(div_3),reset(div_2),append($$anchor4,div_2)};if_block(node_4,$$render=>{$$props.child?$$render(consequent_2):$$render(alternate_1,-1)})}append($$anchor3,fragment_5)},$$slots:{popper:!0}}))}; +if_block(node2,$$render=>{forceMount()?$$render(consequent_1):forceMount()||$$render(consequent_3,1)})}append($$anchor,fragment),pop()}var root_3$10=from_html("");function Menu_trigger($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),disabled=prop($$props,"disabled",3,!1),type2=prop($$props,"type",3,"button"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","chi\ +ld","children","disabled","type"]);const triggerState=DropdownMenuTriggerState.create({id:boxWith$1(()=>id2()),disabled:boxWith$1(()=>disabled()??!1),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,triggerState.props,{type:type2()}));Floating_layer_anchor($$anchor,{get id(){return id2()},get ref(){return triggerState.opts.ref},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);{var consequent=$$anchor3=>{var fragment_2=comment$2(), +node_1=first_child(fragment_2);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var button=root_3$10();attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor3,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}const labelAttrs=createBitsAttrs( +{component:"label",parts:["root"]});class LabelRootState{static create(opts){return new LabelRootState(opts)}opts;attachment;constructor(opts){this.opts=opts,this.attachment=attachRef(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}onmousedown(e){e.detail>1&&e.preventDefault()}#props=user_derived(()=>({id:this.opts.id.current,[labelAttrs.root]:"",onmousedown:this.onmousedown,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}var root_2$1o=from_html( +"");function Label$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","id","ref","for"]);const rootState=LabelRootState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,rootState.props,{for:$$props.for}));var fragment=comment$2(),node2=first_child( +fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var label=root_2$1o();attribute_effect(label,()=>({...get$3(mergedProps),for:$$props.for}));var node_2=child(label);snippet(node_2,()=>$$props.children??noop$3),reset(label),append($$anchor2,label)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})} +append($$anchor,fragment),pop()}class SvelteResizeObserver{#node;#onResize;constructor(node2,onResize){this.#node=node2,this.#onResize=onResize,this.handler=this.handler.bind(this),user_effect(this.handler)}handler(){let rAF=0;const _node=this.#node();if(!_node)return;const resizeObserver=new ResizeObserver(()=>{cancelAnimationFrame(rAF),rAF=window.requestAnimationFrame(this.#onResize)});return resizeObserver.observe(_node),()=>{window.cancelAnimationFrame(rAF),resizeObserver.unobserve(_node)}}} +class Presence{opts;present;#afterAnimations;#isPresent=state$1(!1);#hasMounted=!1;#transitionStatus=state$1(void 0);#transitionFrame=null;constructor(opts){this.opts=opts,this.present=this.opts.open,set$1(this.#isPresent,opts.open.current,!0),this.#afterAnimations=new AnimationsComplete({ref:this.opts.ref,afterTick:this.opts.open}),onDestroyEffect(()=>this.#clearTransitionFrame()),watch$1(()=>this.present.current,isOpen=>{if(!this.#hasMounted){this.#hasMounted=!0;return}this.#clearTransitionFrame(), +isOpen&&set$1(this.#isPresent,!0),set$1(this.#transitionStatus,isOpen?"starting":"ending",!0),isOpen&&(this.#transitionFrame=window.requestAnimationFrame(()=>{this.#transitionFrame=null,this.present.current&&set$1(this.#transitionStatus,void 0)})),this.#afterAnimations.run(()=>{isOpen===this.present.current&&(isOpen||set$1(this.#isPresent,!1),set$1(this.#transitionStatus,void 0))})})}#_isPresent=user_derived(()=>get$3(this.#isPresent));get isPresent(){return get$3(this.#_isPresent)}set isPresent(value){ +set$1(this.#_isPresent,value)}get transitionStatus(){return get$3(this.#transitionStatus)}#clearTransitionFrame(){this.#transitionFrame!==null&&(window.cancelAnimationFrame(this.#transitionFrame),this.#transitionFrame=null)}}function Presence_layer($$anchor,$$props){push$1($$props,!0);const presenceState=new Presence({open:boxWith$1(()=>$$props.open),ref:$$props.ref});var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1); +snippet(node_1,()=>$$props.presence??noop$3,()=>({present:presenceState.isPresent,transitionStatus:presenceState.transitionStatus})),append($$anchor2,fragment_1)};if_block(node2,$$render=>{($$props.forceMount||$$props.open||presenceState.isPresent)&&$$render(consequent)})}append($$anchor,fragment),pop()}function Popover$1($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComp\ +lete",3,noop$1);PopoverRootState.create({open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())}),Floating_layer($$anchor,{children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}function clamp(n,min2,max2){return Math.min(max2,Math.max(min2,n))}class StateMachine{state;#machine;constructor(initialState,machine){ this.state=simpleBox(initialState),this.#machine=machine,this.dispatch=this.dispatch.bind(this)}#reducer(event2){return this.#machine[this.state.current][event2]??this.state.current}dispatch(event2){this.state.current=this.#reducer(event2)}}const scrollAreaAttrs=createBitsAttrs({component:"scroll-area",parts:["root","viewport","corner","thumb","scrollbar"]}),ScrollAreaRootContext=new Context$1("ScrollArea.Root"),ScrollAreaScrollbarContext=new Context$1("ScrollArea.Scrollbar"),ScrollAreaScrollbarVisibleContext=new Context$1( "ScrollArea.ScrollbarVisible"),ScrollAreaScrollbarAxisContext=new Context$1("ScrollArea.ScrollbarAxis"),ScrollAreaScrollbarSharedContext=new Context$1("ScrollArea.ScrollbarShared");class ScrollAreaRootState{static create(opts){return ScrollAreaRootContext.set(new ScrollAreaRootState(opts))}opts;attachment;#scrollAreaNode=state$1(null);get scrollAreaNode(){return get$3(this.#scrollAreaNode)}set scrollAreaNode(value){set$1(this.#scrollAreaNode,value,!0)}#viewportNode=state$1(null);get viewportNode(){ return get$3(this.#viewportNode)}set viewportNode(value){set$1(this.#viewportNode,value,!0)}#contentNode=state$1(null);get contentNode(){return get$3(this.#contentNode)}set contentNode(value){set$1(this.#contentNode,value,!0)}#scrollbarXNode=state$1(null);get scrollbarXNode(){return get$3(this.#scrollbarXNode)}set scrollbarXNode(value){set$1(this.#scrollbarXNode,value,!0)}#scrollbarYNode=state$1(null);get scrollbarYNode(){return get$3(this.#scrollbarYNode)}set scrollbarYNode(value){set$1(this.#scrollbarYNode, @@ -1134,160 +1136,160 @@ create({open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),triggerId:bo const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),side=prop($$props,"side",3,"top"),sideOffset=prop($$props,"sideOffset",3,0),align=prop($$props,"align",3,"center"),avoidCollisions=prop($$props,"avoidCollisions",3,!0),arrowPadding=prop($$props,"arrowPadding",3,0),sticky=prop($$props,"sticky",3,"partial"),hideWhenDetached=prop($$props,"hideWhenDetached",3,!1),collisionPadding=prop($$props,"collisionPadding",3,0),onInteractOutside=prop( $$props,"onInteractOutside",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),forceMount=prop($$props,"forceMount",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","id","ref","side","sideOffset","align","avoidCollisions","arrowPadding","sticky","strategy","hideWhenDetached","customAnchor","collisionPadding","onInteractOutside","onEscapeKeydown","forceMount","style"]);const contentState=TooltipContentState.create({id:boxWith$1(()=>id2()),ref:boxWith$1( ()=>ref2(),v=>ref2(v)),onInteractOutside:boxWith$1(()=>onInteractOutside()),onEscapeKeydown:boxWith$1(()=>onEscapeKeydown())}),floatingProps=user_derived(()=>({side:side(),sideOffset:sideOffset(),align:align(),avoidCollisions:avoidCollisions(),arrowPadding:arrowPadding(),sticky:sticky(),hideWhenDetached:hideWhenDetached(),collisionPadding:collisionPadding(),strategy:$$props.strategy,customAnchor:$$props.customAnchor??contentState.root.triggerNode})),mergedProps=user_derived(()=>mergeProps(restProps, -get$3(floatingProps),contentState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{{const popper=($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars("tooltip")},{style:$$props.style}));var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent=$$anchor4=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);{let $02=user_derived( -()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$3($02))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$H();attribute_effect(div,()=>({...wrapperProps()}));var div_1=child(div);attribute_effect(div_1,()=>({...get$3(finalProps)}));var node_3=child(div_1);snippet(node_3,()=>$$props.children??noop$3),reset(div_1),reset(div),append($$anchor4,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent): -$$render(alternate,-1)})}append($$anchor3,fragment_2)};let $0=user_derived(()=>contentState.root.disableHoverableContent?"none":"auto");Popper_layer_force_mount($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get enabled(){return contentState.root.opts.open.current},get id(){return id2()},trapFocus:!1,loop:!1,preventScroll:!1,forceMount:!0,get ref(){return contentState.opts.ref},tooltip:!0,get shouldRender(){return contentState.shouldRender},get contentPointerEvents(){ -return get$3($0)},popper,$$slots:{popper:!0}}))}},consequent_3=$$anchor2=>{{const popper=($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars("tooltip")},{style:$$props.style}));var fragment_5=comment$2(),node_4=first_child(fragment_5);{var consequent_2=$$anchor4=>{var fragment_6=comment$2(),node_5=first_child(fragment_6);{let $02=user_derived(()=>({props:get$3(finalProps), -wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_5,()=>$$props.child,()=>get$3($02))}append($$anchor4,fragment_6)},alternate_1=$$anchor4=>{var div_2=root_8$u();attribute_effect(div_2,()=>({...wrapperProps()}));var div_3=child(div_2);attribute_effect(div_3,()=>({...get$3(finalProps)}));var node_6=child(div_3);snippet(node_6,()=>$$props.children??noop$3),reset(div_3),reset(div_2),append($$anchor4,div_2)};if_block(node_4,$$render=>{$$props.child?$$render(consequent_2):$$render( -alternate_1,-1)})}append($$anchor3,fragment_5)};let $0=user_derived(()=>contentState.root.disableHoverableContent?"none":"auto");Popper_layer($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get open(){return contentState.root.opts.open.current},get id(){return id2()},trapFocus:!1,loop:!1,preventScroll:!1,forceMount:!1,get ref(){return contentState.opts.ref},tooltip:!0,get shouldRender(){return contentState.shouldRender},get contentPointerEvents(){return get$3($0)},popper, -$$slots:{popper:!0}}))}};if_block(node2,$$render=>{forceMount()?$$render(consequent_1):forceMount()||$$render(consequent_3,1)})}append($$anchor,fragment),pop()}var root_2$1h=from_html("");function Tooltip_trigger$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),disabled=prop($$props,"disabled",3,!1),type2=prop($$props,"type",3,"button"),tabindex=prop($$props,"tabindex",3,0),ref2=prop($$props,"ref",15,null),restProps=rest_props( -$$props,["$$slots","$$events","$$legacy","children","child","id","disabled","payload","tether","type","tabindex","ref"]);const triggerState=TooltipTriggerState.create({id:boxWith$1(()=>id2()),disabled:boxWith$1(()=>disabled()??!1),tabindex:boxWith$1(()=>tabindex()??0),payload:boxWith$1(()=>$$props.payload),tether:boxWith$1(()=>$$props.tether),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,triggerState.props,{type:type2()}));var fragment=comment$2(),node2=first_child( -fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1h();attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor, -fragment),pop()}function Tooltip_arrow($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref"]);Floating_layer_arrow($$anchor,spread_props(()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}})),pop()}function Tooltip_provider($$anchor,$$props){push$1($$props,!0);let delayDuration=prop($$props,"delayDuration",3,700),disableCloseOnTriggerClick=prop($$props,"disableCloseOnTriggerClick",3,!1),disableHoverableContent=prop( -$$props,"disableHoverableContent",3,!1),disabled=prop($$props,"disabled",3,!1),ignoreNonKeyboardFocus=prop($$props,"ignoreNonKeyboardFocus",3,!1),skipDelayDuration=prop($$props,"skipDelayDuration",3,300);TooltipProviderState.create({delayDuration:boxWith$1(()=>delayDuration()),disableCloseOnTriggerClick:boxWith$1(()=>disableCloseOnTriggerClick()),disableHoverableContent:boxWith$1(()=>disableHoverableContent()),disabled:boxWith$1(()=>disabled()),ignoreNonKeyboardFocus:boxWith$1(()=>ignoreNonKeyboardFocus()), -skipDelayDuration:boxWith$1(()=>skipDelayDuration())});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}function Tooltip_trigger($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Tooltip_trigger$1,($$anchor2,TooltipPrimitive_Trigger)=>{TooltipPrimitive_Trigger( -$$anchor2,spread_props({"data-slot":"tooltip-trigger",class:"cursor-pointer"},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))}),append($$anchor,fragment),pop()}var root_3$_=from_html("
"),root_2$1g=from_html(" ",1);function Tooltip_content($$anchor,$$props){push$1($$props,!0);const tooltipContent=$$anchor2=>{var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Tooltip_content$1,($$anchor3,TooltipPrimitive_Content)=>{TooltipPrimitive_Content( -$$anchor3,spread_props({"data-slot":"tooltip-content",get sideOffset(){return sideOffset()},get side(){return side()},get class(){return get$3(contentClass)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor4,$$slotProps)=>{var fragment_1=root_2$1g(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.children??noop$3);var node_2=sibling(node_1,2);{const child2=($$anchor5,$$arg0)=>{let props=()=>$$arg0?.().props;var div=root_3$_();attribute_effect( -div,$0=>({class:$0,...props()}),[()=>cn$1("z-50 size-2.5 rotate-45 rounded-[2px] bg-primary","data-[side=top]:translate-x-1/2 data-[side=top]:translate-y-[calc(-50%_+_2px)]","data-[side=bottom]:-translate-x-1/2 data-[side=bottom]:-translate-y-[calc(-50%_+_1px)]","data-[side=right]:translate-x-[calc(50%_+_2px)] data-[side=right]:translate-y-1/2","data-[side=left]:-translate-y-[calc(50%_-_3px)]",$$props.arrowClasses)]),append($$anchor5,div)};component(node_2,()=>Tooltip_arrow,($$anchor5,TooltipPrimitive_Arrow)=>{ -TooltipPrimitive_Arrow($$anchor5,{child:child2,$$slots:{child:!0}})})}append($$anchor4,fragment_1)},$$slots:{default:!0}}))}),append($$anchor2,fragment)};let ref2=prop($$props,"ref",15,null),sideOffset=prop($$props,"sideOffset",3,0),side=prop($$props,"side",3,"top"),noPortal=prop($$props,"noPortal",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","sideOffset","side","children","arrowClasses","noPortal"]);const contentClass=user_derived(()=>cn$1("z-50 w-fit origin\ --(--bits-tooltip-content-transform-origin) animate-in rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:fill-mode-forwards",$$props.class));var fragment_2=comment$2(),node_3=first_child( -fragment_2);{var consequent=$$anchor2=>{tooltipContent($$anchor2)},alternate=$$anchor2=>{var fragment_4=comment$2(),node_4=first_child(fragment_4);component(node_4,()=>Portal$2,($$anchor3,TooltipPrimitive_Portal)=>{TooltipPrimitive_Portal($$anchor3,{children:($$anchor4,$$slotProps)=>{tooltipContent($$anchor4)},$$slots:{default:!0}})}),append($$anchor2,fragment_4)};if_block(node_3,$$render=>{noPortal()?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment_2),pop()}const Root$5=Tooltip, -Provider=Tooltip_provider;var AttachmentType=(AttachmentType2=>(AttachmentType2.AUDIO="AUDIO",AttachmentType2.IMAGE="IMAGE",AttachmentType2.MCP_PROMPT="MCP_PROMPT",AttachmentType2.MCP_RESOURCE="MCP_RESOURCE",AttachmentType2.PDF="PDF",AttachmentType2.TEXT="TEXT",AttachmentType2.LEGACY_CONTEXT="context",AttachmentType2))(AttachmentType||{}),AttachmentMenuItemId=(AttachmentMenuItemId2=>(AttachmentMenuItemId2.IMAGES="images",AttachmentMenuItemId2.AUDIO="audio",AttachmentMenuItemId2.TEXT="text",AttachmentMenuItemId2. -PDF="pdf",AttachmentMenuItemId2.SYSTEM_MESSAGE="system-message",AttachmentMenuItemId2.MCP_PROMPT="mcp-prompt",AttachmentMenuItemId2.MCP_RESOURCES="mcp-resources",AttachmentMenuItemId2))(AttachmentMenuItemId||{}),AttachmentItemEnabledWhen=(AttachmentItemEnabledWhen2=>(AttachmentItemEnabledWhen2.ALWAYS="always",AttachmentItemEnabledWhen2.HAS_VISION_MODALITY="hasVisionModality",AttachmentItemEnabledWhen2.HAS_AUDIO_MODALITY="hasAudioModality",AttachmentItemEnabledWhen2))(AttachmentItemEnabledWhen||{}), -AttachmentAction=(AttachmentAction2=>(AttachmentAction2.FILE_UPLOAD="onFileUpload",AttachmentAction2.SYSTEM_PROMPT_CLICK="onSystemPromptClick",AttachmentAction2.MCP_PROMPT_CLICK="onMcpPromptClick",AttachmentAction2.MCP_RESOURCES_CLICK="onMcpResourcesClick",AttachmentAction2))(AttachmentAction||{}),AttachmentItemVisibleWhen=(AttachmentItemVisibleWhen2=>(AttachmentItemVisibleWhen2.HAS_MCP_PROMPTS_SUPPORT="hasMcpPromptsSupport",AttachmentItemVisibleWhen2.HAS_MCP_RESOURCES_SUPPORT="hasMcpResourcesSu\ -pport",AttachmentItemVisibleWhen2))(AttachmentItemVisibleWhen||{}),ToolCallType=(ToolCallType2=>(ToolCallType2.FUNCTION="function",ToolCallType2))(ToolCallType||{}),AgenticSectionType=(AgenticSectionType2=>(AgenticSectionType2.TEXT="text",AgenticSectionType2.TOOL_CALL="tool_call",AgenticSectionType2.TOOL_CALL_PENDING="tool_call_pending",AgenticSectionType2.TOOL_CALL_STREAMING="tool_call_streaming",AgenticSectionType2.REASONING="reasoning",AgenticSectionType2.REASONING_PENDING="reasoning_pending", -AgenticSectionType2))(AgenticSectionType||{}),ChatMessageStatsView=(ChatMessageStatsView2=>(ChatMessageStatsView2.GENERATION="generation",ChatMessageStatsView2.READING="reading",ChatMessageStatsView2.TOOLS="tools",ChatMessageStatsView2.SUMMARY="summary",ChatMessageStatsView2))(ChatMessageStatsView||{}),ReasoningFormat=(ReasoningFormat2=>(ReasoningFormat2.NONE="none",ReasoningFormat2.AUTO="auto",ReasoningFormat2))(ReasoningFormat||{}),MessageRole=(MessageRole2=>(MessageRole2.USER="user",MessageRole2. -ASSISTANT="assistant",MessageRole2.SYSTEM="system",MessageRole2.TOOL="tool",MessageRole2))(MessageRole||{}),MessageType=(MessageType2=>(MessageType2.ROOT="root",MessageType2.TEXT="text",MessageType2.THINK="think",MessageType2.SYSTEM="system",MessageType2))(MessageType||{}),ContentPartType=(ContentPartType2=>(ContentPartType2.TEXT="text",ContentPartType2.IMAGE_URL="image_url",ContentPartType2.INPUT_AUDIO="input_audio",ContentPartType2))(ContentPartType||{}),ErrorDialogType=(ErrorDialogType2=>(ErrorDialogType2. -TIMEOUT="timeout",ErrorDialogType2.SERVER="server",ErrorDialogType2))(ErrorDialogType||{}),ConversationSelectionMode=(ConversationSelectionMode2=>(ConversationSelectionMode2.EXPORT="export",ConversationSelectionMode2.IMPORT="import",ConversationSelectionMode2))(ConversationSelectionMode||{}),PdfViewMode=(PdfViewMode2=>(PdfViewMode2.TEXT="text",PdfViewMode2.PAGES="pages",PdfViewMode2))(PdfViewMode||{}),FileTypeCategory=(FileTypeCategory2=>(FileTypeCategory2.IMAGE="image",FileTypeCategory2.AUDIO="\ -audio",FileTypeCategory2.PDF="pdf",FileTypeCategory2.TEXT="text",FileTypeCategory2))(FileTypeCategory||{}),SpecialFileType=(SpecialFileType2=>(SpecialFileType2.MCP_PROMPT="mcp-prompt",SpecialFileType2))(SpecialFileType||{}),FileTypeImage=(FileTypeImage2=>(FileTypeImage2.JPEG="jpeg",FileTypeImage2.PNG="png",FileTypeImage2.GIF="gif",FileTypeImage2.WEBP="webp",FileTypeImage2.SVG="svg",FileTypeImage2))(FileTypeImage||{}),FileTypeAudio=(FileTypeAudio2=>(FileTypeAudio2.MP3="mp3",FileTypeAudio2.WAV="wa\ -v",FileTypeAudio2.WEBM="webm",FileTypeAudio2))(FileTypeAudio||{}),FileTypePdf=(FileTypePdf2=>(FileTypePdf2.PDF="pdf",FileTypePdf2))(FileTypePdf||{}),FileTypeText=(FileTypeText2=>(FileTypeText2.PLAIN_TEXT="plainText",FileTypeText2.MARKDOWN="md",FileTypeText2.ASCIIDOC="asciidoc",FileTypeText2.JAVASCRIPT="js",FileTypeText2.TYPESCRIPT="ts",FileTypeText2.JSX="jsx",FileTypeText2.TSX="tsx",FileTypeText2.CSS="css",FileTypeText2.HTML="html",FileTypeText2.JSON="json",FileTypeText2.XML="xml",FileTypeText2. -YAML="yaml",FileTypeText2.CSV="csv",FileTypeText2.LOG="log",FileTypeText2.PYTHON="python",FileTypeText2.JAVA="java",FileTypeText2.CPP="cpp",FileTypeText2.PHP="php",FileTypeText2.RUBY="ruby",FileTypeText2.GO="go",FileTypeText2.RUST="rust",FileTypeText2.SHELL="shell",FileTypeText2.SQL="sql",FileTypeText2.R="r",FileTypeText2.SCALA="scala",FileTypeText2.KOTLIN="kotlin",FileTypeText2.SWIFT="swift",FileTypeText2.DART="dart",FileTypeText2.VUE="vue",FileTypeText2.SVELTE="svelte",FileTypeText2.LATEX="lat\ -ex",FileTypeText2.BIBTEX="bibtex",FileTypeText2.CUDA="cuda",FileTypeText2.VULKAN="vulkan",FileTypeText2.HASKELL="haskell",FileTypeText2.CSHARP="csharp",FileTypeText2.PROPERTIES="properties",FileTypeText2))(FileTypeText||{}),FileExtensionImage=(FileExtensionImage2=>(FileExtensionImage2.JPG=".jpg",FileExtensionImage2.JPEG=".jpeg",FileExtensionImage2.PNG=".png",FileExtensionImage2.GIF=".gif",FileExtensionImage2.WEBP=".webp",FileExtensionImage2.SVG=".svg",FileExtensionImage2))(FileExtensionImage||{}), -FileExtensionAudio=(FileExtensionAudio2=>(FileExtensionAudio2.MP3=".mp3",FileExtensionAudio2.WAV=".wav",FileExtensionAudio2))(FileExtensionAudio||{}),FileExtensionPdf=(FileExtensionPdf2=>(FileExtensionPdf2.PDF=".pdf",FileExtensionPdf2))(FileExtensionPdf||{}),FileExtensionText=(FileExtensionText2=>(FileExtensionText2.TXT=".txt",FileExtensionText2.MD=".md",FileExtensionText2.ADOC=".adoc",FileExtensionText2.JS=".js",FileExtensionText2.TS=".ts",FileExtensionText2.JSX=".jsx",FileExtensionText2.TSX=".\ -tsx",FileExtensionText2.CSS=".css",FileExtensionText2.HTML=".html",FileExtensionText2.HTM=".htm",FileExtensionText2.JSON=".json",FileExtensionText2.XML=".xml",FileExtensionText2.YAML=".yaml",FileExtensionText2.YML=".yml",FileExtensionText2.CSV=".csv",FileExtensionText2.LOG=".log",FileExtensionText2.PY=".py",FileExtensionText2.JAVA=".java",FileExtensionText2.CPP=".cpp",FileExtensionText2.C=".c",FileExtensionText2.H=".h",FileExtensionText2.PHP=".php",FileExtensionText2.RB=".rb",FileExtensionText2. -GO=".go",FileExtensionText2.RS=".rs",FileExtensionText2.SH=".sh",FileExtensionText2.BAT=".bat",FileExtensionText2.SQL=".sql",FileExtensionText2.R=".r",FileExtensionText2.SCALA=".scala",FileExtensionText2.KT=".kt",FileExtensionText2.SWIFT=".swift",FileExtensionText2.DART=".dart",FileExtensionText2.VUE=".vue",FileExtensionText2.SVELTE=".svelte",FileExtensionText2.TEX=".tex",FileExtensionText2.BIB=".bib",FileExtensionText2.CU=".cu",FileExtensionText2.CUH=".cuh",FileExtensionText2.COMP=".comp",FileExtensionText2. -HPP=".hpp",FileExtensionText2.HS=".hs",FileExtensionText2.PROPERTIES=".properties",FileExtensionText2.CS=".cs",FileExtensionText2))(FileExtensionText||{}),MimeTypePrefix=(MimeTypePrefix2=>(MimeTypePrefix2.IMAGE="image/",MimeTypePrefix2.TEXT="text",MimeTypePrefix2))(MimeTypePrefix||{}),MimeTypeIncludes=(MimeTypeIncludes2=>(MimeTypeIncludes2.JSON="json",MimeTypeIncludes2.JAVASCRIPT="javascript",MimeTypeIncludes2.TYPESCRIPT="typescript",MimeTypeIncludes2))(MimeTypeIncludes||{}),UriPattern=(UriPattern2=>(UriPattern2. -DATABASE_KEYWORD="database",UriPattern2.DATABASE_SCHEME="db://",UriPattern2))(UriPattern||{}),MimeTypeApplication=(MimeTypeApplication2=>(MimeTypeApplication2.PDF="application/pdf",MimeTypeApplication2.OCTET_STREAM="application/octet-stream",MimeTypeApplication2))(MimeTypeApplication||{}),MimeTypeAudio=(MimeTypeAudio2=>(MimeTypeAudio2.MP3_MPEG="audio/mpeg",MimeTypeAudio2.MP3="audio/mp3",MimeTypeAudio2.MP4="audio/mp4",MimeTypeAudio2.WAV="audio/wav",MimeTypeAudio2.WEBM="audio/webm",MimeTypeAudio2. -WEBM_OPUS="audio/webm;codecs=opus",MimeTypeAudio2))(MimeTypeAudio||{}),MimeTypeImage=(MimeTypeImage2=>(MimeTypeImage2.JPEG="image/jpeg",MimeTypeImage2.JPG="image/jpg",MimeTypeImage2.PNG="image/png",MimeTypeImage2.GIF="image/gif",MimeTypeImage2.WEBP="image/webp",MimeTypeImage2.SVG="image/svg+xml",MimeTypeImage2.ICO="image/x-icon",MimeTypeImage2.ICO_MICROSOFT="image/vnd.microsoft.icon",MimeTypeImage2))(MimeTypeImage||{}),MimeTypeText=(MimeTypeText2=>(MimeTypeText2.PLAIN="text/plain",MimeTypeText2. -MARKDOWN="text/markdown",MimeTypeText2.ASCIIDOC="text/asciidoc",MimeTypeText2.JAVASCRIPT="text/javascript",MimeTypeText2.JAVASCRIPT_APP="application/javascript",MimeTypeText2.TYPESCRIPT="text/typescript",MimeTypeText2.JSX="text/jsx",MimeTypeText2.TSX="text/tsx",MimeTypeText2.CSS="text/css",MimeTypeText2.HTML="text/html",MimeTypeText2.JSON="application/json",MimeTypeText2.XML_TEXT="text/xml",MimeTypeText2.XML_APP="application/xml",MimeTypeText2.YAML_TEXT="text/yaml",MimeTypeText2.YAML_APP="applic\ -ation/yaml",MimeTypeText2.CSV="text/csv",MimeTypeText2.PYTHON="text/x-python",MimeTypeText2.JAVA="text/x-java-source",MimeTypeText2.CPP_HDR="text/x-c++hdr",MimeTypeText2.CPP_SRC="text/x-c++src",MimeTypeText2.CSHARP="text/x-csharp",MimeTypeText2.HASKELL="text/x-haskell",MimeTypeText2.C_SRC="text/x-csrc",MimeTypeText2.C_HDR="text/x-chdr",MimeTypeText2.PHP="text/x-php",MimeTypeText2.RUBY="text/x-ruby",MimeTypeText2.GO="text/x-go",MimeTypeText2.RUST="text/x-rust",MimeTypeText2.SHELL="text/x-shellscr\ -ipt",MimeTypeText2.BAT="application/x-bat",MimeTypeText2.SQL="text/x-sql",MimeTypeText2.R="text/x-r",MimeTypeText2.SCALA="text/x-scala",MimeTypeText2.KOTLIN="text/x-kotlin",MimeTypeText2.SWIFT="text/x-swift",MimeTypeText2.DART="text/x-dart",MimeTypeText2.VUE="text/x-vue",MimeTypeText2.SVELTE="text/x-svelte",MimeTypeText2.TEX="text/x-tex",MimeTypeText2.TEX_APP="application/x-tex",MimeTypeText2.LATEX="application/x-latex",MimeTypeText2.BIBTEX="text/x-bibtex",MimeTypeText2.CUDA="text/x-cuda",MimeTypeText2. -PROPERTIES="text/properties",MimeTypeText2))(MimeTypeText||{}),MCPConnectionPhase=(MCPConnectionPhase2=>(MCPConnectionPhase2.IDLE="idle",MCPConnectionPhase2.TRANSPORT_CREATING="transport_creating",MCPConnectionPhase2.TRANSPORT_READY="transport_ready",MCPConnectionPhase2.INITIALIZING="initializing",MCPConnectionPhase2.CAPABILITIES_EXCHANGED="capabilities_exchanged",MCPConnectionPhase2.LISTING_TOOLS="listing_tools",MCPConnectionPhase2.CONNECTED="connected",MCPConnectionPhase2.ERROR="error",MCPConnectionPhase2. -DISCONNECTED="disconnected",MCPConnectionPhase2))(MCPConnectionPhase||{}),MCPLogLevel=(MCPLogLevel2=>(MCPLogLevel2.INFO="info",MCPLogLevel2.WARN="warn",MCPLogLevel2.ERROR="error",MCPLogLevel2))(MCPLogLevel||{}),MCPTransportType=(MCPTransportType2=>(MCPTransportType2.WEBSOCKET="websocket",MCPTransportType2.STREAMABLE_HTTP="streamable_http",MCPTransportType2.SSE="sse",MCPTransportType2))(MCPTransportType||{}),HealthCheckStatus=(HealthCheckStatus2=>(HealthCheckStatus2.IDLE="idle",HealthCheckStatus2. -CONNECTING="connecting",HealthCheckStatus2.SUCCESS="success",HealthCheckStatus2.ERROR="error",HealthCheckStatus2))(HealthCheckStatus||{}),MCPContentType=(MCPContentType2=>(MCPContentType2.TEXT="text",MCPContentType2.IMAGE="image",MCPContentType2.RESOURCE="resource",MCPContentType2))(MCPContentType||{}),JsonSchemaType=(JsonSchemaType2=>(JsonSchemaType2.OBJECT="object",JsonSchemaType2))(JsonSchemaType||{}),MCPRefType=(MCPRefType2=>(MCPRefType2.PROMPT="ref/prompt",MCPRefType2.RESOURCE="ref/resource", -MCPRefType2))(MCPRefType||{}),ModelModality=(ModelModality2=>(ModelModality2.TEXT="TEXT",ModelModality2.AUDIO="AUDIO",ModelModality2.VISION="VISION",ModelModality2))(ModelModality||{}),ServerRole=(ServerRole2=>(ServerRole2.MODEL="model",ServerRole2.ROUTER="router",ServerRole2))(ServerRole||{}),ServerModelStatus=(ServerModelStatus2=>(ServerModelStatus2.UNLOADED="unloaded",ServerModelStatus2.LOADING="loading",ServerModelStatus2.LOADED="loaded",ServerModelStatus2.SLEEPING="sleeping",ServerModelStatus2. -FAILED="failed",ServerModelStatus2))(ServerModelStatus||{}),ParameterSource=(ParameterSource2=>(ParameterSource2.DEFAULT="default",ParameterSource2.CUSTOM="custom",ParameterSource2))(ParameterSource||{}),SyncableParameterType=(SyncableParameterType2=>(SyncableParameterType2.NUMBER="number",SyncableParameterType2.STRING="string",SyncableParameterType2.BOOLEAN="boolean",SyncableParameterType2))(SyncableParameterType||{}),SettingsFieldType=(SettingsFieldType2=>(SettingsFieldType2.INPUT="input",SettingsFieldType2. -TEXTAREA="textarea",SettingsFieldType2.CHECKBOX="checkbox",SettingsFieldType2.SELECT="select",SettingsFieldType2))(SettingsFieldType||{}),ColorMode=(ColorMode2=>(ColorMode2.LIGHT="light",ColorMode2.DARK="dark",ColorMode2.SYSTEM="system",ColorMode2))(ColorMode||{}),TooltipSide=(TooltipSide2=>(TooltipSide2.TOP="top",TooltipSide2.RIGHT="right",TooltipSide2.BOTTOM="bottom",TooltipSide2.LEFT="left",TooltipSide2))(TooltipSide||{}),McpPromptVariant=(McpPromptVariant2=>(McpPromptVariant2.MESSAGE="messag\ -e",McpPromptVariant2.ATTACHMENT="attachment",McpPromptVariant2))(McpPromptVariant||{}),UrlProtocol=(UrlProtocol2=>(UrlProtocol2.DATA="data:",UrlProtocol2.HTTP="http:",UrlProtocol2.HTTPS="https:",UrlProtocol2.WEBSOCKET="ws:",UrlProtocol2.WEBSOCKET_SECURE="wss:",UrlProtocol2))(UrlProtocol||{}),HtmlInputType=(HtmlInputType2=>(HtmlInputType2.FILE="file",HtmlInputType2))(HtmlInputType||{}),KeyboardKey=(KeyboardKey2=>(KeyboardKey2.ENTER="Enter",KeyboardKey2.ESCAPE="Escape",KeyboardKey2.ARROW_UP="Arrow\ -Up",KeyboardKey2.ARROW_DOWN="ArrowDown",KeyboardKey2.ARROW_LEFT="ArrowLeft",KeyboardKey2.ARROW_RIGHT="ArrowRight",KeyboardKey2.TAB="Tab",KeyboardKey2.D_LOWER="d",KeyboardKey2.D_UPPER="D",KeyboardKey2.E_UPPER="E",KeyboardKey2.K_LOWER="k",KeyboardKey2.O_LOWER="o",KeyboardKey2.O_UPPER="O",KeyboardKey2.SPACE=" ",KeyboardKey2))(KeyboardKey||{}),ToolSource=(ToolSource2=>(ToolSource2.BUILTIN="builtin",ToolSource2.MCP="mcp",ToolSource2.CUSTOM="custom",ToolSource2))(ToolSource||{}),ToolPermissionDecision=(ToolPermissionDecision2=>(ToolPermissionDecision2. -ALWAYS="always",ToolPermissionDecision2.ALWAYS_SERVER="always_server",ToolPermissionDecision2.ONCE="once",ToolPermissionDecision2.DENY="deny",ToolPermissionDecision2))(ToolPermissionDecision||{}),ToolResponseField=(ToolResponseField2=>(ToolResponseField2.PLAIN_TEXT="plain_text_response",ToolResponseField2.ERROR="error",ToolResponseField2))(ToolResponseField||{}),root_5$v=from_html("

"),root_1$19=from_html(" ",1);function ActionIcon($$anchor,$$props){push$1($$props,!0);let variant=prop( -$$props,"variant",3,"ghost"),size2=prop($$props,"size",3,"sm"),className=prop($$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),iconSize=prop($$props,"iconSize",3,"h-3 w-3"),tooltipSide=prop($$props,"tooltipSide",19,()=>TooltipSide.TOP),stopPropagationOnClick=prop($$props,"stopPropagationOnClick",3,!1);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$5,($$anchor2,Tooltip_Root)=>{Tooltip_Root($$anchor2,{children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$19(), -node_1=first_child(fragment_1);component(node_1,()=>Tooltip_trigger,($$anchor4,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor4,{children:($$anchor5,$$slotProps2)=>{{let $0=user_derived(()=>$$props.ariaLabel||$$props.tooltip);Button($$anchor5,{get variant(){return variant()},get size(){return size2()},get disabled(){return disabled()},onclick:e=>{stopPropagationOnClick()&&e.stopPropagation(),$$props.onclick?.(e)},get class(){return`h-6 w-6 p-0 ${className()??""} flex hover:bg-transparent data-[state\ -=open]:bg-transparent!`},get"aria-label"(){return get$3($0)},children:($$anchor6,$$slotProps3)=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);{var consequent=$$anchor7=>{const IconComponent=user_derived(()=>$$props.icon);var fragment_4=comment$2(),node_3=first_child(fragment_4);component(node_3,()=>get$3(IconComponent),($$anchor8,IconComponent_1)=>{IconComponent_1($$anchor8,{get class(){return iconSize()}})}),append($$anchor7,fragment_4)};if_block(node_2,$$render=>{$$props.icon&&$$render( -consequent)})}append($$anchor6,fragment_3)},$$slots:{default:!0}})}},$$slots:{default:!0}})});var node_4=sibling(node_1,2);component(node_4,()=>Tooltip_content,($$anchor4,Tooltip_Content)=>{Tooltip_Content($$anchor4,{get side(){return tooltipSide()},children:($$anchor5,$$slotProps2)=>{var p2=root_5$v(),text2=child(p2,!0);reset(p2),template_effect(()=>set_text(text2,$$props.tooltip)),append($$anchor5,p2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor, -fragment),pop()}const defaultAttributes={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var root$1V=from_svg("");function Icon($$anchor,$$props){push$1($$props,!0);const color=prop($$props,"color",3,"currentColor"),size2=prop($$props,"size",3,24),strokeWidth=prop($$props,"strokeWidth",3,2),absoluteStrokeWidth=prop($$props,"absoluteStrokeWidth",3,!1),iconNode=prop( -$$props,"iconNode",19,()=>[]),props=rest_props($$props,["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]);var svg2=root$1V();attribute_effect(svg2,$0=>({...defaultAttributes,...props,width:size2(),height:size2(),stroke:color(),"stroke-width":$0,class:["lucide-icon lucide",$$props.name&&`lucide-${$$props.name}`,$$props.class]}),[()=>absoluteStrokeWidth()?Number(strokeWidth())*24/Number(size2()):strokeWidth()]);var node2=child(svg2);each( -node2,17,iconNode,index$2,($$anchor2,$$item)=>{var $$array=user_derived(()=>to_array(get$3($$item),2));let tag=()=>get$3($$array)[0],attrs=()=>get$3($$array)[1];var fragment=comment$2(),node_1=first_child(fragment);element$4(node_1,tag,!0,($$element,$$anchor3)=>{attribute_effect($$element,()=>({...attrs()}))}),append($$anchor2,fragment)});var node_2=sibling(node2);snippet(node_2,()=>$$props.children??noop$3),reset(svg2),append($$anchor,svg2),pop()}function Arrow_big_up($$anchor,$$props){push$1($$props, -!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M9 18v-6H5l7-7 7 7h-4v6H9z"}]];Icon($$anchor,spread_props({name:"arrow-big-up"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Arrow_right($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props, -["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M5 12h14"}],["path",{d:"m12 5 7 7-7 7"}]];Icon($$anchor,spread_props({name:"arrow-right"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Arrow_up($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$\ -$legacy"]);const iconNode=[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]];Icon($$anchor,spread_props({name:"arrow-up"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Book_open_text($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[ -["path",{d:"M12 7v14"}],["path",{d:"M16 12h2"}],["path",{d:"M16 8h2"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"}],["path",{d:"M6 12h2"}],["path",{d:"M6 8h2"}]];Icon($$anchor,spread_props({name:"book-open-text"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append( -$$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Braces($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1"}]];Icon($$anchor,spread_props({name:"braces"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(), -node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Brain($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3\ --4 4.5 4.5 0 0 1-3 4"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18"}]];Icon($$anchor,spread_props({name:"brain"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props. -children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Check($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M20 6 9 17l-5-5"}]];Icon($$anchor,spread_props({name:"check"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{ -default:!0}})),pop()}function Chevron_down($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m6 9 6 6 6-6"}]];Icon($$anchor,spread_props({name:"chevron-down"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Chevron_left($$anchor,$$props){ -push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m15 18-6-6 6-6"}]];Icon($$anchor,spread_props({name:"chevron-left"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Chevron_up($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props, -["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m18 15-6-6-6 6"}]];Icon($$anchor,spread_props({name:"chevron-up"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Chevron_right($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[ -["path",{d:"m9 18 6-6-6-6"}]];Icon($$anchor,spread_props({name:"chevron-right"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Chevrons_up_down($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m7 15 5 5 5-5"}],["path",{ -d:"m7 9 5-5 5 5"}]];Icon($$anchor,spread_props({name:"chevrons-up-down"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Circle_alert($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"\ -12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]];Icon($$anchor,spread_props({name:"circle-alert"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Circle_check_big($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[ -["path",{d:"M21.801 10A10 10 0 1 1 17 3.335"}],["path",{d:"m9 11 3 3L22 4"}]];Icon($$anchor,spread_props({name:"circle-check-big"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Circle_x($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[ -["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]];Icon($$anchor,spread_props({name:"circle-x"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Clock($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[ -["circle",{cx:"12",cy:"12",r:"10"}],["polyline",{points:"12 6 12 12 16 14"}]];Icon($$anchor,spread_props({name:"clock"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Code($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"\ -m16 18 6-6-6-6"}],["path",{d:"m8 6-6 6 6 6"}]];Icon($$anchor,spread_props({name:"code"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Copy($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"14",height:"14",x:"8",y:"8", -rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];Icon($$anchor,spread_props({name:"copy"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Database($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[ -["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5"}],["path",{d:"M3 12A9 3 0 0 0 21 12"}]];Icon($$anchor,spread_props({name:"database"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Download($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots", -"$$events","$$legacy"]);const iconNode=[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]];Icon($$anchor,spread_props({name:"download"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Ellipsis($$anchor,$$props){push$1($$props,!0);let props=rest_props( -$$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]];Icon($$anchor,spread_props({name:"ellipsis"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function External_link($$anchor,$$props){push$1($$props, -!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]];Icon($$anchor,spread_props({name:"external-link"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Eye($$anchor,$$props){ -push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]];Icon($$anchor,spread_props({name:"eye"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)}, -$$slots:{default:!0}})),pop()}function File_text($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}],["path",{d:"M10 9H8"}],["path",{d:"M16 13H8"}],["path",{d:"M16 17H8"}]];Icon($$anchor,spread_props({name:"file-text"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(), -node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function File_x($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}],["path",{d:"m14.5 12.5-5 5"}],["path",{d:"m9.5 12.5 5 5"}]];Icon($$anchor,spread_props({name:"file-x"},()=>props,{get iconNode(){ -return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function File$1($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}]];Icon($$anchor,spread_props({name:"file"}, -()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Flask_conical($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2"}],["\ -path",{d:"M6.453 15h11.094"}],["path",{d:"M8.5 2h7"}]];Icon($$anchor,spread_props({name:"flask-conical"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Folder_open($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m6 14 \ -1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]];Icon($$anchor,spread_props({name:"folder-open"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Funnel($$anchor,$$props){push$1( -$$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"}]];Icon($$anchor,spread_props({name:"funnel"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)}, -$$slots:{default:!0}})),pop()}function Gauge($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m12 14 4-4"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0"}]];Icon($$anchor,spread_props({name:"gauge"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})), -pop()}function Git_branch($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["line",{x1:"6",x2:"6",y1:"3",y2:"15"}],["circle",{cx:"18",cy:"6",r:"3"}],["circle",{cx:"6",cy:"18",r:"3"}],["path",{d:"M18 9a9 9 0 0 1-9 9"}]];Icon($$anchor,spread_props({name:"git-branch"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children?? -noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Globe($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}],["path",{d:"M2 12h20"}]];Icon($$anchor,spread_props({name:"globe"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1); -snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Heart_off($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["line",{x1:"2",y1:"2",x2:"22",y2:"22"}],["path",{d:"M16.5 16.5 12 21l-7-7c-1.5-1.45-3-3.2-3-5.5a5.5 5.5 0 0 1 2.14-4.35"}],["path",{d:"M8.76 3.1c1.15.22 2.13.78 3.24 1.9 1.5-1.5 2.74-2 4.5-2A5.5 5.5 0 0 1 22 8.5c0 2.12-1.3 3.78-2.67 5.17"}]];Icon($$anchor,spread_props( -{name:"heart-off"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Heart($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5\ - 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"}]];Icon($$anchor,spread_props({name:"heart"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Image$1($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"18",height:"18",x:"3",y:"3", -rx:"2",ry:"2"}],["circle",{cx:"9",cy:"9",r:"2"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"}]];Icon($$anchor,spread_props({name:"image"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Info$1($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legac\ -y"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];Icon($$anchor,spread_props({name:"info"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Key($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]); -const iconNode=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"}],["path",{d:"m21 2-9.6 9.6"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5"}]];Icon($$anchor,spread_props({name:"key"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Layers($$anchor,$$props){push$1($$props,!0);let props=rest_props( -$$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17"}]];Icon($$anchor,spread_props({name:"layers"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(), -node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function List_checks($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m3 17 2 2 4-4"}],["path",{d:"m3 7 2 2 4-4"}],["path",{d:"M13 6h8"}],["path",{d:"M13 12h8"}],["path",{d:"M13 18h8"}]];Icon($$anchor,spread_props({name:"list-checks"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{ -var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function List_restart($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21 6H3"}],["path",{d:"M7 12H3"}],["path",{d:"M7 18H3"}],["path",{d:"M12 18a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L11 14"}],["path",{d:"M11 10v4h4"}]];Icon($$anchor, -spread_props({name:"list-restart"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Loader_circle($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];Icon($$anchor,spread_props({name:"loader-c\ -ircle"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Message_square($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"}]];Icon($$anchor,spread_props({name:"\ -message-square"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Mic($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}],["li\ -ne",{x1:"12",x2:"12",y1:"19",y2:"22"}]];Icon($$anchor,spread_props({name:"mic"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Minus($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M5 12h14"}]];Icon($$anchor,spread_props( -{name:"minus"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Monitor($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21"}],["line",{x1:"12", -x2:"12",y1:"17",y2:"21"}]];Icon($$anchor,spread_props({name:"monitor"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Moon($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"}]];Icon($$anchor, -spread_props({name:"moon"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Music($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M9 18V5l12-2v13"}],["circle",{cx:"6",cy:"18",r:"3"}],["circle",{cx:"18",cy:"16",r:"3"}]];Icon( -$$anchor,spread_props({name:"music"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Package($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-\ -2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"}],["path",{d:"M12 22V12"}],["polyline",{points:"3.29 7 12 12 20.71 7"}],["path",{d:"m7.5 4.27 9 5.15"}]];Icon($$anchor,spread_props({name:"package"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Panel_left_close($$anchor,$$props){push$1($$props,!0);let props=rest_props( -$$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}],["path",{d:"m16 15-3-3 3-3"}]];Icon($$anchor,spread_props({name:"panel-left-close"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Panel_left($$anchor,$$props){push$1( -$$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]];Icon($$anchor,spread_props({name:"panel-left"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Pencil_ruler($$anchor,$$props){push$1( -$$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13"}],["path",{d:"m8 6 2-2"}],["path",{d:"m18 16 2-2"}],["path",{d:"m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];Icon($$anchor, -spread_props({name:"pencil-ruler"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Pencil($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.\ -5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];Icon($$anchor,spread_props({name:"pencil"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Plus($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"\ -M5 12h14"}],["path",{d:"M12 5v14"}]];Icon($$anchor,spread_props({name:"plus"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Power_off($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15"}],[ -"path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68"}],["path",{d:"M12 2v4"}],["path",{d:"m2 2 20 20"}]];Icon($$anchor,spread_props({name:"power-off"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Power($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[ -["path",{d:"M12 2v10"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04"}]];Icon($$anchor,spread_props({name:"power"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Radio($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M4.9 1\ -9.1C1 15.2 1 8.8 4.9 4.9"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5"}],["circle",{cx:"12",cy:"12",r:"2"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19"}]];Icon($$anchor,spread_props({name:"radio"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Refresh_cw($$anchor,$$props){ -push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]];Icon($$anchor,spread_props({name:"refresh-cw"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children?? -noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Rotate_ccw($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}]];Icon($$anchor,spread_props({name:"rotate-ccw"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props. -children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Rotate_cw($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}]];Icon($$anchor,spread_props({name:"rotate-cw"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2, -()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Search($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];Icon($$anchor,spread_props({name:"search"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children?? -noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Server($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18"}]];Icon($$anchor,spread_props({name:"server"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{ -var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Settings$1($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73\ - 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}],["circle",{cx:"12",cy:"12",r:"3"}]];Icon($$anchor,spread_props({name:"settings"},()=>props,{get iconNode(){return iconNode}, -children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Shield_off($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m2 2 20 20"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71"}],["path",{d:"M9.309 3.652A12.252 12.252\ - 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264"}]];Icon($$anchor,spread_props({name:"shield-off"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Shield_question($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$\ -$events","$$legacy"]);const iconNode=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3"}],["path",{d:"M12 17h.01"}]];Icon($$anchor,spread_props({name:"shield-question"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props. -children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Shield($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}]];Icon($$anchor,spread_props({name:"shield"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{ -var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Sliders_vertical($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["line",{x1:"4",x2:"4",y1:"21",y2:"14"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3"}],["line",{x1:"20",x2:"20",y1:"21", -y2:"16"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16"}]];Icon($$anchor,spread_props({name:"sliders-vertical"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Sparkles($$anchor,$$props){ -push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"}],["path",{d:"M20 3v4"}],["path",{d:"M22 5h-4"}],["path",{d:"M4 17v2"}],["path",{d:"M5 18H3"}]];Icon($$anchor,spread_props({name:"sparkl\ -es"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Square_pen($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.01\ -3 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"}]];Icon($$anchor,spread_props({name:"square-pen"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Square($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[ -["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}]];Icon($$anchor,spread_props({name:"square"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Sun($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"4"}], -["path",{d:"M12 2v2"}],["path",{d:"M12 20v2"}],["path",{d:"m4.93 4.93 1.41 1.41"}],["path",{d:"m17.66 17.66 1.41 1.41"}],["path",{d:"M2 12h2"}],["path",{d:"M20 12h2"}],["path",{d:"m6.34 17.66-1.41 1.41"}],["path",{d:"m19.07 4.93-1.41 1.41"}]];Icon($$anchor,spread_props({name:"sun"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{ -default:!0}})),pop()}function Timer_off($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M10 2h4"}],["path",{d:"M4.6 11a8 8 0 0 0 1.7 8.7 8 8 0 0 0 8.7 1.7"}],["path",{d:"M7.4 7.4a8 8 0 0 1 10.3 1 8 8 0 0 1 .9 10.2"}],["path",{d:"m2 2 20 20"}],["path",{d:"M12 12v-2"}]];Icon($$anchor,spread_props({name:"timer-off"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(), -node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Trash_2($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M3 6h18"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17"}]];Icon($$anchor,spread_props( -{name:"trash-2"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Triangle_alert($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12\ - 9v4"}],["path",{d:"M12 17h.01"}]];Icon($$anchor,spread_props({name:"triangle-alert"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Upload($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 3v12"}],["path",{d:"m17 8-\ -5-5-5 5"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}]];Icon($$anchor,spread_props({name:"upload"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Whole_word($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"\ -7",cy:"12",r:"3"}],["path",{d:"M10 9v6"}],["circle",{cx:"17",cy:"12",r:"3"}],["path",{d:"M14 7v8"}],["path",{d:"M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1"}]];Icon($$anchor,spread_props({name:"whole-word"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Wrench($$anchor,$$props){push$1($$props,!0);let props=rest_props( -$$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"}]];Icon($$anchor,spread_props({name:"wrench"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})), -pop()}function X($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];Icon($$anchor,spread_props({name:"x"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Zap($$anchor,$$props){push$1( -$$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"}]];Icon($$anchor,spread_props({name:"zap"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2, -fragment_1)},$$slots:{default:!0}})),pop()}const defaultWindow$2=typeof window<"u"?window:void 0;function getActiveElement$2(document2){let activeElement=document2.activeElement;for(;activeElement?.shadowRoot;){const node2=activeElement.shadowRoot.activeElement;if(node2===activeElement)break;activeElement=node2}return activeElement}let ActiveElement$2=class{#document;#subscribe;constructor(options={}){const{window:window2=defaultWindow$2,document:document2=window2?.document}=options;window2!==void 0&& -(this.#document=document2,this.#subscribe=createSubscriber(update2=>{const cleanupFocusIn=on(window2,"focusin",update2),cleanupFocusOut=on(window2,"focusout",update2);return()=>{cleanupFocusIn(),cleanupFocusOut()}}))}get current(){return this.#subscribe?.(),this.#document?getActiveElement$2(this.#document):null}};new ActiveElement$2;function runEffect(flush,effect2){switch(flush){case"post":user_effect(effect2);break;case"pre":user_pre_effect(effect2);break}}function runWatcher(sources,flush,effect2,options={}){ -const{lazy=!1}=options;let active=!lazy,previousValues=Array.isArray(sources)?[]:void 0;runEffect(flush,()=>{const values=Array.isArray(sources)?sources.map(source2=>source2()):sources();if(!active){active=!0,previousValues=values;return}const cleanup=untrack$1(()=>effect2(values,previousValues));return previousValues=values,cleanup})}function watch(sources,effect2,options){runWatcher(sources,"post",effect2,options)}function watchPre(sources,effect2,options){runWatcher(sources,"pre",effect2,options)} -watch.pre=watchPre;function getStorage(storageType,window2){switch(storageType){case"local":return window2.localStorage;case"session":return window2.sessionStorage}}class PersistedState{#current;#key;#serializer;#storage;#subscribe;#version=state$1(0);constructor(key2,initialValue,options={}){const{storage:storageType="local",serializer:serializer2={serialize:JSON.stringify,deserialize:JSON.parse},syncTabs=!0,window:window2=defaultWindow$2}=options;if(this.#current=initialValue,this.#key=key2,this.#serializer= -serializer2,window2===void 0)return;const storage=getStorage(storageType,window2);this.#storage=storage;const existingValue=storage.getItem(key2);existingValue!==null?this.#current=this.#deserialize(existingValue):this.#serialize(initialValue),syncTabs&&storageType==="local"&&(this.#subscribe=createSubscriber(()=>on(window2,"storage",this.#handleStorageEvent)))}get current(){this.#subscribe?.(),get$3(this.#version);const root2=this.#deserialize(this.#storage?.getItem(this.#key))??this.#current,proxies=new WeakMap, -proxy2=value=>{if(value===null||value?.constructor.name==="Date"||typeof value!="object")return value;let p2=proxies.get(value);return p2||(p2=new Proxy(value,{get:(target2,property)=>(get$3(this.#version),proxy2(Reflect.get(target2,property))),set:(target2,property,value2)=>(set$1(this.#version,get$3(this.#version)+1),Reflect.set(target2,property,value2),this.#serialize(root2),!0)}),proxies.set(value,p2)),p2};return proxy2(root2)}set current(newValue){this.#serialize(newValue),set$1(this.#version, -get$3(this.#version)+1)}#handleStorageEvent=event2=>{event2.key!==this.#key||event2.newValue===null||(this.#current=this.#deserialize(event2.newValue),set$1(this.#version,get$3(this.#version)+1))};#deserialize(value){try{return this.#serializer.deserialize(value)}catch(error2){console.error(`Error when parsing "${value}" from persisted store "${this.#key}"`,error2);return}}#serialize(value){try{value!=null&&this.#storage?.setItem(this.#key,this.#serializer.serialize(value))}catch(error2){console. -error(`Error when writing value from persisted store "${this.#key}" to ${this.#storage}`,error2)}}}function sanitizeClassNames(classNames){return classNames.filter(className=>className.length>0)}const noopStorage={getItem:_key=>null,setItem:(_key,_value)=>{}},isBrowser$1=typeof document<"u";function isFunction(value){return typeof value=="function"}function isObject$1(value){return value!==null&&typeof value=="object"}const BoxSymbol=Symbol("box"),isWritableSymbol=Symbol("is-writable");function isBox(value){ -return isObject$1(value)&&BoxSymbol in value}function isWritableBox(value){return box.isBox(value)&&isWritableSymbol in value}function box(initialValue){let current2=state$1(proxy(initialValue));return{[BoxSymbol]:!0,[isWritableSymbol]:!0,get current(){return get$3(current2)},set current(v){set$1(current2,v,!0)}}}function boxWith(getter,setter){const derived2=user_derived(getter);return setter?{[BoxSymbol]:!0,[isWritableSymbol]:!0,get current(){return get$3(derived2)},set current(v){setter(v)}}: -{[BoxSymbol]:!0,get current(){return getter()}}}function boxFrom(value){return box.isBox(value)?value:isFunction(value)?box.with(value):box(value)}function boxFlatten(boxes){return Object.entries(boxes).reduce((acc,[key2,b])=>box.isBox(b)?(box.isWritableBox(b)?Object.defineProperty(acc,key2,{get(){return b.current},set(v){b.current=v}}):Object.defineProperty(acc,key2,{get(){return b.current}}),acc):Object.assign(acc,{[key2]:b}),{})}function toReadonlyBox(b){return box.isWritableBox(b)?{[BoxSymbol]:!0, -get current(){return b.current}}:b}box.from=boxFrom;box.with=boxWith;box.flatten=boxFlatten;box.readonly=toReadonlyBox;box.isBox=isBox;box.isWritableBox=isWritableBox;function createParser$1(matcher,replacer){const regex=RegExp(matcher,"g");return str=>{if(typeof str!="string")throw new TypeError(`expected an argument of type string, but got ${typeof str}`);return str.match(regex)?str.replace(regex,replacer):str}}const camelToKebab=createParser$1(/[A-Z]/,match=>`-${match.toLowerCase()}`);function styleToCSS(styleObj){ -if(!styleObj||typeof styleObj!="object"||Array.isArray(styleObj))throw new TypeError(`expected an argument of type object, but got ${typeof styleObj}`);return Object.keys(styleObj).map(property=>`${camelToKebab(property)}: ${styleObj[property]};`).join(` +get$3(floatingProps),contentState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{{const popper=($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalWrapperProps=user_derived(()=>mergeProps(wrapperProps(),{style:{pointerEvents:contentState.root.disableHoverableContent?"none":void 0}})),finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars("tooltip")},{style:$$props.style}));var fragment_2=comment$2(), +node_1=first_child(fragment_2);{var consequent=$$anchor4=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);{let $02=user_derived(()=>({props:get$3(finalProps),wrapperProps:get$3(finalWrapperProps),...contentState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$3($02))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$H();attribute_effect(div,()=>({...get$3(finalWrapperProps)}));var div_1=child(div);attribute_effect(div_1,()=>({...get$3(finalProps)}));var node_3=child( +div_1);snippet(node_3,()=>$$props.children??noop$3),reset(div_1),reset(div),append($$anchor4,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor3,fragment_2)};let $0=user_derived(()=>contentState.root.disableHoverableContent?"none":"auto");Popper_layer_force_mount($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get enabled(){return contentState.root.opts.open.current},get id(){return id2()},trapFocus:!1,loop:!1, +preventScroll:!1,forceMount:!0,get ref(){return contentState.opts.ref},tooltip:!0,get shouldRender(){return contentState.shouldRender},get contentPointerEvents(){return get$3($0)},popper,$$slots:{popper:!0}}))}},consequent_3=$$anchor2=>{{const popper=($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalWrapperProps=user_derived(()=>mergeProps(wrapperProps(),{style:{pointerEvents:contentState.root.disableHoverableContent?"none":void 0}})),finalProps=user_derived( +()=>mergeProps(props(),{style:getFloatingContentCSSVars("tooltip")},{style:$$props.style}));var fragment_5=comment$2(),node_4=first_child(fragment_5);{var consequent_2=$$anchor4=>{var fragment_6=comment$2(),node_5=first_child(fragment_6);{let $02=user_derived(()=>({props:get$3(finalProps),wrapperProps:get$3(finalWrapperProps),...contentState.snippetProps}));snippet(node_5,()=>$$props.child,()=>get$3($02))}append($$anchor4,fragment_6)},alternate_1=$$anchor4=>{var div_2=root_8$u();attribute_effect( +div_2,()=>({...get$3(finalWrapperProps)}));var div_3=child(div_2);attribute_effect(div_3,()=>({...get$3(finalProps)}));var node_6=child(div_3);snippet(node_6,()=>$$props.children??noop$3),reset(div_3),reset(div_2),append($$anchor4,div_2)};if_block(node_4,$$render=>{$$props.child?$$render(consequent_2):$$render(alternate_1,-1)})}append($$anchor3,fragment_5)};let $0=user_derived(()=>contentState.root.disableHoverableContent?"none":"auto");Popper_layer($$anchor2,spread_props(()=>get$3(mergedProps), +()=>contentState.popperProps,{get open(){return contentState.root.opts.open.current},get id(){return id2()},trapFocus:!1,loop:!1,preventScroll:!1,forceMount:!1,get ref(){return contentState.opts.ref},tooltip:!0,get shouldRender(){return contentState.shouldRender},get contentPointerEvents(){return get$3($0)},popper,$$slots:{popper:!0}}))}};if_block(node2,$$render=>{forceMount()?$$render(consequent_1):forceMount()||$$render(consequent_3,1)})}append($$anchor,fragment),pop()}var root_2$1h=from_html( +"");function Tooltip_trigger$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),disabled=prop($$props,"disabled",3,!1),type2=prop($$props,"type",3,"button"),tabindex=prop($$props,"tabindex",3,0),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","id","disabled","payload","tether","type","tabindex","ref"]);const triggerState=TooltipTriggerState.create({id:boxWith$1( +()=>id2()),disabled:boxWith$1(()=>disabled()??!1),tabindex:boxWith$1(()=>tabindex()??0),payload:boxWith$1(()=>$$props.payload),tether:boxWith$1(()=>$$props.tether),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,triggerState.props,{type:type2()}));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append( +$$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1h();attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}function Tooltip_arrow($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","\ +$$legacy","ref"]);Floating_layer_arrow($$anchor,spread_props(()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}})),pop()}function Tooltip_provider($$anchor,$$props){push$1($$props,!0);let delayDuration=prop($$props,"delayDuration",3,700),disableCloseOnTriggerClick=prop($$props,"disableCloseOnTriggerClick",3,!1),disableHoverableContent=prop($$props,"disableHoverableContent",3,!1),disabled=prop($$props,"disabled",3,!1),ignoreNonKeyboardFocus=prop($$props,"ignoreNonKeyboardFocu\ +s",3,!1),skipDelayDuration=prop($$props,"skipDelayDuration",3,300);TooltipProviderState.create({delayDuration:boxWith$1(()=>delayDuration()),disableCloseOnTriggerClick:boxWith$1(()=>disableCloseOnTriggerClick()),disableHoverableContent:boxWith$1(()=>disableHoverableContent()),disabled:boxWith$1(()=>disabled()),ignoreNonKeyboardFocus:boxWith$1(()=>ignoreNonKeyboardFocus()),skipDelayDuration:boxWith$1(()=>skipDelayDuration())});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props. +children??noop$3),append($$anchor,fragment),pop()}function Tooltip_trigger($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Tooltip_trigger$1,($$anchor2,TooltipPrimitive_Trigger)=>{TooltipPrimitive_Trigger($$anchor2,spread_props({"data-slot":"tooltip-trigger",class:"cursor-pointer"},()=>restProps,{get ref(){return ref2()},set ref($$value){ +ref2($$value)}}))}),append($$anchor,fragment),pop()}var root_3$_=from_html("
"),root_2$1g=from_html(" ",1);function Tooltip_content($$anchor,$$props){push$1($$props,!0);const tooltipContent=$$anchor2=>{var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Tooltip_content$1,($$anchor3,TooltipPrimitive_Content)=>{TooltipPrimitive_Content($$anchor3,spread_props({"data-slot":"tooltip-content",get sideOffset(){return sideOffset()},get side(){return side()},get class(){ +return get$3(contentClass)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor4,$$slotProps)=>{var fragment_1=root_2$1g(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.children??noop$3);var node_2=sibling(node_1,2);{const child2=($$anchor5,$$arg0)=>{let props=()=>$$arg0?.().props;var div=root_3$_();attribute_effect(div,$0=>({class:$0,...props()}),[()=>cn$1("z-50 size-2.5 rotate-45 rounded-[2px] bg-primary","data-[side=top]:translate-x-1/2 data\ +-[side=top]:translate-y-[calc(-50%_+_2px)]","data-[side=bottom]:-translate-x-1/2 data-[side=bottom]:-translate-y-[calc(-50%_+_1px)]","data-[side=right]:translate-x-[calc(50%_+_2px)] data-[side=right]:translate-y-1/2","data-[side=left]:-translate-y-[calc(50%_-_3px)]",$$props.arrowClasses)]),append($$anchor5,div)};component(node_2,()=>Tooltip_arrow,($$anchor5,TooltipPrimitive_Arrow)=>{TooltipPrimitive_Arrow($$anchor5,{child:child2,$$slots:{child:!0}})})}append($$anchor4,fragment_1)},$$slots:{default:!0}}))}), +append($$anchor2,fragment)};let ref2=prop($$props,"ref",15,null),sideOffset=prop($$props,"sideOffset",3,0),side=prop($$props,"side",3,"top"),noPortal=prop($$props,"noPortal",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","sideOffset","side","children","arrowClasses","noPortal"]);const contentClass=user_derived(()=>cn$1("z-50 w-fit origin-(--bits-tooltip-content-transform-origin) animate-in rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-fore\ +ground fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:fill-mode-forwards",$$props.class));var fragment_2=comment$2(),node_3=first_child(fragment_2);{var consequent=$$anchor2=>{tooltipContent($$anchor2)},alternate=$$anchor2=>{var fragment_4=comment$2(),node_4=first_child( +fragment_4);component(node_4,()=>Portal$2,($$anchor3,TooltipPrimitive_Portal)=>{TooltipPrimitive_Portal($$anchor3,{children:($$anchor4,$$slotProps)=>{tooltipContent($$anchor4)},$$slots:{default:!0}})}),append($$anchor2,fragment_4)};if_block(node_3,$$render=>{noPortal()?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment_2),pop()}const Root$5=Tooltip,Provider=Tooltip_provider;var AttachmentType=(AttachmentType2=>(AttachmentType2.AUDIO="AUDIO",AttachmentType2.IMAGE="IMAGE",AttachmentType2. +MCP_PROMPT="MCP_PROMPT",AttachmentType2.MCP_RESOURCE="MCP_RESOURCE",AttachmentType2.PDF="PDF",AttachmentType2.TEXT="TEXT",AttachmentType2.LEGACY_CONTEXT="context",AttachmentType2))(AttachmentType||{}),AttachmentMenuItemId=(AttachmentMenuItemId2=>(AttachmentMenuItemId2.IMAGES="images",AttachmentMenuItemId2.AUDIO="audio",AttachmentMenuItemId2.TEXT="text",AttachmentMenuItemId2.PDF="pdf",AttachmentMenuItemId2.SYSTEM_MESSAGE="system-message",AttachmentMenuItemId2.MCP_PROMPT="mcp-prompt",AttachmentMenuItemId2. +MCP_RESOURCES="mcp-resources",AttachmentMenuItemId2))(AttachmentMenuItemId||{}),AttachmentItemEnabledWhen=(AttachmentItemEnabledWhen2=>(AttachmentItemEnabledWhen2.ALWAYS="always",AttachmentItemEnabledWhen2.HAS_VISION_MODALITY="hasVisionModality",AttachmentItemEnabledWhen2.HAS_AUDIO_MODALITY="hasAudioModality",AttachmentItemEnabledWhen2))(AttachmentItemEnabledWhen||{}),AttachmentAction=(AttachmentAction2=>(AttachmentAction2.FILE_UPLOAD="onFileUpload",AttachmentAction2.SYSTEM_PROMPT_CLICK="onSyste\ +mPromptClick",AttachmentAction2.MCP_PROMPT_CLICK="onMcpPromptClick",AttachmentAction2.MCP_RESOURCES_CLICK="onMcpResourcesClick",AttachmentAction2))(AttachmentAction||{}),AttachmentItemVisibleWhen=(AttachmentItemVisibleWhen2=>(AttachmentItemVisibleWhen2.HAS_MCP_PROMPTS_SUPPORT="hasMcpPromptsSupport",AttachmentItemVisibleWhen2.HAS_MCP_RESOURCES_SUPPORT="hasMcpResourcesSupport",AttachmentItemVisibleWhen2))(AttachmentItemVisibleWhen||{}),ToolCallType=(ToolCallType2=>(ToolCallType2.FUNCTION="function", +ToolCallType2))(ToolCallType||{}),AgenticSectionType=(AgenticSectionType2=>(AgenticSectionType2.TEXT="text",AgenticSectionType2.TOOL_CALL="tool_call",AgenticSectionType2.TOOL_CALL_PENDING="tool_call_pending",AgenticSectionType2.TOOL_CALL_STREAMING="tool_call_streaming",AgenticSectionType2.REASONING="reasoning",AgenticSectionType2.REASONING_PENDING="reasoning_pending",AgenticSectionType2))(AgenticSectionType||{}),ChatMessageStatsView=(ChatMessageStatsView2=>(ChatMessageStatsView2.GENERATION="gene\ +ration",ChatMessageStatsView2.READING="reading",ChatMessageStatsView2.TOOLS="tools",ChatMessageStatsView2.SUMMARY="summary",ChatMessageStatsView2))(ChatMessageStatsView||{}),ReasoningFormat=(ReasoningFormat2=>(ReasoningFormat2.NONE="none",ReasoningFormat2.AUTO="auto",ReasoningFormat2))(ReasoningFormat||{}),MessageRole=(MessageRole2=>(MessageRole2.USER="user",MessageRole2.ASSISTANT="assistant",MessageRole2.SYSTEM="system",MessageRole2.TOOL="tool",MessageRole2))(MessageRole||{}),MessageType=(MessageType2=>(MessageType2. +ROOT="root",MessageType2.TEXT="text",MessageType2.THINK="think",MessageType2.SYSTEM="system",MessageType2))(MessageType||{}),ContentPartType=(ContentPartType2=>(ContentPartType2.TEXT="text",ContentPartType2.IMAGE_URL="image_url",ContentPartType2.INPUT_AUDIO="input_audio",ContentPartType2))(ContentPartType||{}),ErrorDialogType=(ErrorDialogType2=>(ErrorDialogType2.TIMEOUT="timeout",ErrorDialogType2.SERVER="server",ErrorDialogType2))(ErrorDialogType||{}),ConversationSelectionMode=(ConversationSelectionMode2=>(ConversationSelectionMode2. +EXPORT="export",ConversationSelectionMode2.IMPORT="import",ConversationSelectionMode2))(ConversationSelectionMode||{}),PdfViewMode=(PdfViewMode2=>(PdfViewMode2.TEXT="text",PdfViewMode2.PAGES="pages",PdfViewMode2))(PdfViewMode||{}),FileTypeCategory=(FileTypeCategory2=>(FileTypeCategory2.IMAGE="image",FileTypeCategory2.AUDIO="audio",FileTypeCategory2.PDF="pdf",FileTypeCategory2.TEXT="text",FileTypeCategory2))(FileTypeCategory||{}),SpecialFileType=(SpecialFileType2=>(SpecialFileType2.MCP_PROMPT="mc\ +p-prompt",SpecialFileType2))(SpecialFileType||{}),FileTypeImage=(FileTypeImage2=>(FileTypeImage2.JPEG="jpeg",FileTypeImage2.PNG="png",FileTypeImage2.GIF="gif",FileTypeImage2.WEBP="webp",FileTypeImage2.SVG="svg",FileTypeImage2))(FileTypeImage||{}),FileTypeAudio=(FileTypeAudio2=>(FileTypeAudio2.MP3="mp3",FileTypeAudio2.WAV="wav",FileTypeAudio2.WEBM="webm",FileTypeAudio2))(FileTypeAudio||{}),FileTypePdf=(FileTypePdf2=>(FileTypePdf2.PDF="pdf",FileTypePdf2))(FileTypePdf||{}),FileTypeText=(FileTypeText2=>(FileTypeText2. +PLAIN_TEXT="plainText",FileTypeText2.MARKDOWN="md",FileTypeText2.ASCIIDOC="asciidoc",FileTypeText2.JAVASCRIPT="js",FileTypeText2.TYPESCRIPT="ts",FileTypeText2.JSX="jsx",FileTypeText2.TSX="tsx",FileTypeText2.CSS="css",FileTypeText2.HTML="html",FileTypeText2.JSON="json",FileTypeText2.XML="xml",FileTypeText2.YAML="yaml",FileTypeText2.CSV="csv",FileTypeText2.LOG="log",FileTypeText2.PYTHON="python",FileTypeText2.JAVA="java",FileTypeText2.CPP="cpp",FileTypeText2.PHP="php",FileTypeText2.RUBY="ruby",FileTypeText2. +GO="go",FileTypeText2.RUST="rust",FileTypeText2.SHELL="shell",FileTypeText2.SQL="sql",FileTypeText2.R="r",FileTypeText2.SCALA="scala",FileTypeText2.KOTLIN="kotlin",FileTypeText2.SWIFT="swift",FileTypeText2.DART="dart",FileTypeText2.VUE="vue",FileTypeText2.SVELTE="svelte",FileTypeText2.LATEX="latex",FileTypeText2.BIBTEX="bibtex",FileTypeText2.CUDA="cuda",FileTypeText2.VULKAN="vulkan",FileTypeText2.HASKELL="haskell",FileTypeText2.CSHARP="csharp",FileTypeText2.PROPERTIES="properties",FileTypeText2))( +FileTypeText||{}),FileExtensionImage=(FileExtensionImage2=>(FileExtensionImage2.JPG=".jpg",FileExtensionImage2.JPEG=".jpeg",FileExtensionImage2.PNG=".png",FileExtensionImage2.GIF=".gif",FileExtensionImage2.WEBP=".webp",FileExtensionImage2.SVG=".svg",FileExtensionImage2))(FileExtensionImage||{}),FileExtensionAudio=(FileExtensionAudio2=>(FileExtensionAudio2.MP3=".mp3",FileExtensionAudio2.WAV=".wav",FileExtensionAudio2))(FileExtensionAudio||{}),FileExtensionPdf=(FileExtensionPdf2=>(FileExtensionPdf2. +PDF=".pdf",FileExtensionPdf2))(FileExtensionPdf||{}),FileExtensionText=(FileExtensionText2=>(FileExtensionText2.TXT=".txt",FileExtensionText2.MD=".md",FileExtensionText2.ADOC=".adoc",FileExtensionText2.JS=".js",FileExtensionText2.TS=".ts",FileExtensionText2.JSX=".jsx",FileExtensionText2.TSX=".tsx",FileExtensionText2.CSS=".css",FileExtensionText2.HTML=".html",FileExtensionText2.HTM=".htm",FileExtensionText2.JSON=".json",FileExtensionText2.XML=".xml",FileExtensionText2.YAML=".yaml",FileExtensionText2. +YML=".yml",FileExtensionText2.CSV=".csv",FileExtensionText2.LOG=".log",FileExtensionText2.PY=".py",FileExtensionText2.JAVA=".java",FileExtensionText2.CPP=".cpp",FileExtensionText2.C=".c",FileExtensionText2.H=".h",FileExtensionText2.PHP=".php",FileExtensionText2.RB=".rb",FileExtensionText2.GO=".go",FileExtensionText2.RS=".rs",FileExtensionText2.SH=".sh",FileExtensionText2.BAT=".bat",FileExtensionText2.SQL=".sql",FileExtensionText2.R=".r",FileExtensionText2.SCALA=".scala",FileExtensionText2.KT=".k\ +t",FileExtensionText2.SWIFT=".swift",FileExtensionText2.DART=".dart",FileExtensionText2.VUE=".vue",FileExtensionText2.SVELTE=".svelte",FileExtensionText2.TEX=".tex",FileExtensionText2.BIB=".bib",FileExtensionText2.CU=".cu",FileExtensionText2.CUH=".cuh",FileExtensionText2.COMP=".comp",FileExtensionText2.HPP=".hpp",FileExtensionText2.HS=".hs",FileExtensionText2.PROPERTIES=".properties",FileExtensionText2.CS=".cs",FileExtensionText2))(FileExtensionText||{}),MimeTypePrefix=(MimeTypePrefix2=>(MimeTypePrefix2. +IMAGE="image/",MimeTypePrefix2.TEXT="text",MimeTypePrefix2))(MimeTypePrefix||{}),MimeTypeIncludes=(MimeTypeIncludes2=>(MimeTypeIncludes2.JSON="json",MimeTypeIncludes2.JAVASCRIPT="javascript",MimeTypeIncludes2.TYPESCRIPT="typescript",MimeTypeIncludes2))(MimeTypeIncludes||{}),UriPattern=(UriPattern2=>(UriPattern2.DATABASE_KEYWORD="database",UriPattern2.DATABASE_SCHEME="db://",UriPattern2))(UriPattern||{}),MimeTypeApplication=(MimeTypeApplication2=>(MimeTypeApplication2.PDF="application/pdf",MimeTypeApplication2. +OCTET_STREAM="application/octet-stream",MimeTypeApplication2))(MimeTypeApplication||{}),MimeTypeAudio=(MimeTypeAudio2=>(MimeTypeAudio2.MP3_MPEG="audio/mpeg",MimeTypeAudio2.MP3="audio/mp3",MimeTypeAudio2.MP4="audio/mp4",MimeTypeAudio2.WAV="audio/wav",MimeTypeAudio2.WEBM="audio/webm",MimeTypeAudio2.WEBM_OPUS="audio/webm;codecs=opus",MimeTypeAudio2))(MimeTypeAudio||{}),MimeTypeImage=(MimeTypeImage2=>(MimeTypeImage2.JPEG="image/jpeg",MimeTypeImage2.JPG="image/jpg",MimeTypeImage2.PNG="image/png",MimeTypeImage2. +GIF="image/gif",MimeTypeImage2.WEBP="image/webp",MimeTypeImage2.SVG="image/svg+xml",MimeTypeImage2.ICO="image/x-icon",MimeTypeImage2.ICO_MICROSOFT="image/vnd.microsoft.icon",MimeTypeImage2))(MimeTypeImage||{}),MimeTypeText=(MimeTypeText2=>(MimeTypeText2.PLAIN="text/plain",MimeTypeText2.MARKDOWN="text/markdown",MimeTypeText2.ASCIIDOC="text/asciidoc",MimeTypeText2.JAVASCRIPT="text/javascript",MimeTypeText2.JAVASCRIPT_APP="application/javascript",MimeTypeText2.TYPESCRIPT="text/typescript",MimeTypeText2. +JSX="text/jsx",MimeTypeText2.TSX="text/tsx",MimeTypeText2.CSS="text/css",MimeTypeText2.HTML="text/html",MimeTypeText2.JSON="application/json",MimeTypeText2.XML_TEXT="text/xml",MimeTypeText2.XML_APP="application/xml",MimeTypeText2.YAML_TEXT="text/yaml",MimeTypeText2.YAML_APP="application/yaml",MimeTypeText2.CSV="text/csv",MimeTypeText2.PYTHON="text/x-python",MimeTypeText2.JAVA="text/x-java-source",MimeTypeText2.CPP_HDR="text/x-c++hdr",MimeTypeText2.CPP_SRC="text/x-c++src",MimeTypeText2.CSHARP="te\ +xt/x-csharp",MimeTypeText2.HASKELL="text/x-haskell",MimeTypeText2.C_SRC="text/x-csrc",MimeTypeText2.C_HDR="text/x-chdr",MimeTypeText2.PHP="text/x-php",MimeTypeText2.RUBY="text/x-ruby",MimeTypeText2.GO="text/x-go",MimeTypeText2.RUST="text/x-rust",MimeTypeText2.SHELL="text/x-shellscript",MimeTypeText2.BAT="application/x-bat",MimeTypeText2.SQL="text/x-sql",MimeTypeText2.R="text/x-r",MimeTypeText2.SCALA="text/x-scala",MimeTypeText2.KOTLIN="text/x-kotlin",MimeTypeText2.SWIFT="text/x-swift",MimeTypeText2. +DART="text/x-dart",MimeTypeText2.VUE="text/x-vue",MimeTypeText2.SVELTE="text/x-svelte",MimeTypeText2.TEX="text/x-tex",MimeTypeText2.TEX_APP="application/x-tex",MimeTypeText2.LATEX="application/x-latex",MimeTypeText2.BIBTEX="text/x-bibtex",MimeTypeText2.CUDA="text/x-cuda",MimeTypeText2.PROPERTIES="text/properties",MimeTypeText2))(MimeTypeText||{}),MCPConnectionPhase=(MCPConnectionPhase2=>(MCPConnectionPhase2.IDLE="idle",MCPConnectionPhase2.TRANSPORT_CREATING="transport_creating",MCPConnectionPhase2. +TRANSPORT_READY="transport_ready",MCPConnectionPhase2.INITIALIZING="initializing",MCPConnectionPhase2.CAPABILITIES_EXCHANGED="capabilities_exchanged",MCPConnectionPhase2.LISTING_TOOLS="listing_tools",MCPConnectionPhase2.CONNECTED="connected",MCPConnectionPhase2.ERROR="error",MCPConnectionPhase2.DISCONNECTED="disconnected",MCPConnectionPhase2))(MCPConnectionPhase||{}),MCPLogLevel=(MCPLogLevel2=>(MCPLogLevel2.INFO="info",MCPLogLevel2.WARN="warn",MCPLogLevel2.ERROR="error",MCPLogLevel2))(MCPLogLevel|| +{}),MCPTransportType=(MCPTransportType2=>(MCPTransportType2.WEBSOCKET="websocket",MCPTransportType2.STREAMABLE_HTTP="streamable_http",MCPTransportType2.SSE="sse",MCPTransportType2))(MCPTransportType||{}),HealthCheckStatus=(HealthCheckStatus2=>(HealthCheckStatus2.IDLE="idle",HealthCheckStatus2.CONNECTING="connecting",HealthCheckStatus2.SUCCESS="success",HealthCheckStatus2.ERROR="error",HealthCheckStatus2))(HealthCheckStatus||{}),MCPContentType=(MCPContentType2=>(MCPContentType2.TEXT="text",MCPContentType2. +IMAGE="image",MCPContentType2.RESOURCE="resource",MCPContentType2))(MCPContentType||{}),JsonSchemaType=(JsonSchemaType2=>(JsonSchemaType2.OBJECT="object",JsonSchemaType2))(JsonSchemaType||{}),MCPRefType=(MCPRefType2=>(MCPRefType2.PROMPT="ref/prompt",MCPRefType2.RESOURCE="ref/resource",MCPRefType2))(MCPRefType||{}),ModelModality=(ModelModality2=>(ModelModality2.TEXT="TEXT",ModelModality2.AUDIO="AUDIO",ModelModality2.VISION="VISION",ModelModality2))(ModelModality||{}),ServerRole=(ServerRole2=>(ServerRole2. +MODEL="model",ServerRole2.ROUTER="router",ServerRole2))(ServerRole||{}),ServerModelStatus=(ServerModelStatus2=>(ServerModelStatus2.UNLOADED="unloaded",ServerModelStatus2.LOADING="loading",ServerModelStatus2.LOADED="loaded",ServerModelStatus2.SLEEPING="sleeping",ServerModelStatus2.FAILED="failed",ServerModelStatus2))(ServerModelStatus||{}),ParameterSource=(ParameterSource2=>(ParameterSource2.DEFAULT="default",ParameterSource2.CUSTOM="custom",ParameterSource2))(ParameterSource||{}),SyncableParameterType=(SyncableParameterType2=>(SyncableParameterType2. +NUMBER="number",SyncableParameterType2.STRING="string",SyncableParameterType2.BOOLEAN="boolean",SyncableParameterType2))(SyncableParameterType||{}),SettingsFieldType=(SettingsFieldType2=>(SettingsFieldType2.INPUT="input",SettingsFieldType2.TEXTAREA="textarea",SettingsFieldType2.CHECKBOX="checkbox",SettingsFieldType2.SELECT="select",SettingsFieldType2))(SettingsFieldType||{}),ColorMode=(ColorMode2=>(ColorMode2.LIGHT="light",ColorMode2.DARK="dark",ColorMode2.SYSTEM="system",ColorMode2))(ColorMode|| +{}),TooltipSide=(TooltipSide2=>(TooltipSide2.TOP="top",TooltipSide2.RIGHT="right",TooltipSide2.BOTTOM="bottom",TooltipSide2.LEFT="left",TooltipSide2))(TooltipSide||{}),McpPromptVariant=(McpPromptVariant2=>(McpPromptVariant2.MESSAGE="message",McpPromptVariant2.ATTACHMENT="attachment",McpPromptVariant2))(McpPromptVariant||{}),UrlProtocol=(UrlProtocol2=>(UrlProtocol2.DATA="data:",UrlProtocol2.HTTP="http:",UrlProtocol2.HTTPS="https:",UrlProtocol2.WEBSOCKET="ws:",UrlProtocol2.WEBSOCKET_SECURE="wss:", +UrlProtocol2))(UrlProtocol||{}),HtmlInputType=(HtmlInputType2=>(HtmlInputType2.FILE="file",HtmlInputType2))(HtmlInputType||{}),KeyboardKey=(KeyboardKey2=>(KeyboardKey2.ENTER="Enter",KeyboardKey2.ESCAPE="Escape",KeyboardKey2.ARROW_UP="ArrowUp",KeyboardKey2.ARROW_DOWN="ArrowDown",KeyboardKey2.ARROW_LEFT="ArrowLeft",KeyboardKey2.ARROW_RIGHT="ArrowRight",KeyboardKey2.TAB="Tab",KeyboardKey2.D_LOWER="d",KeyboardKey2.D_UPPER="D",KeyboardKey2.E_UPPER="E",KeyboardKey2.K_LOWER="k",KeyboardKey2.O_LOWER="o", +KeyboardKey2.O_UPPER="O",KeyboardKey2.SPACE=" ",KeyboardKey2))(KeyboardKey||{}),ToolSource=(ToolSource2=>(ToolSource2.BUILTIN="builtin",ToolSource2.MCP="mcp",ToolSource2.CUSTOM="custom",ToolSource2))(ToolSource||{}),ToolPermissionDecision=(ToolPermissionDecision2=>(ToolPermissionDecision2.ALWAYS="always",ToolPermissionDecision2.ALWAYS_SERVER="always_server",ToolPermissionDecision2.ONCE="once",ToolPermissionDecision2.DENY="deny",ToolPermissionDecision2))(ToolPermissionDecision||{}),ToolResponseField=(ToolResponseField2=>(ToolResponseField2. +PLAIN_TEXT="plain_text_response",ToolResponseField2.ERROR="error",ToolResponseField2))(ToolResponseField||{}),root_5$v=from_html("

"),root_1$19=from_html(" ",1);function ActionIcon($$anchor,$$props){push$1($$props,!0);let variant=prop($$props,"variant",3,"ghost"),size2=prop($$props,"size",3,"sm"),className=prop($$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),iconSize=prop($$props,"iconSize",3,"h-3 w-3"),tooltipSide=prop($$props,"tooltipSide",19,()=>TooltipSide.TOP),stopPropagationOnClick=prop( +$$props,"stopPropagationOnClick",3,!1);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$5,($$anchor2,Tooltip_Root)=>{Tooltip_Root($$anchor2,{children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$19(),node_1=first_child(fragment_1);component(node_1,()=>Tooltip_trigger,($$anchor4,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor4,{children:($$anchor5,$$slotProps2)=>{{let $0=user_derived(()=>$$props.ariaLabel||$$props.tooltip);Button($$anchor5,{get variant(){return variant()}, +get size(){return size2()},get disabled(){return disabled()},onclick:e=>{stopPropagationOnClick()&&e.stopPropagation(),$$props.onclick?.(e)},get class(){return`h-6 w-6 p-0 ${className()??""} flex hover:bg-transparent data-[state=open]:bg-transparent!`},get"aria-label"(){return get$3($0)},children:($$anchor6,$$slotProps3)=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);{var consequent=$$anchor7=>{const IconComponent=user_derived(()=>$$props.icon);var fragment_4=comment$2(),node_3=first_child( +fragment_4);component(node_3,()=>get$3(IconComponent),($$anchor8,IconComponent_1)=>{IconComponent_1($$anchor8,{get class(){return iconSize()}})}),append($$anchor7,fragment_4)};if_block(node_2,$$render=>{$$props.icon&&$$render(consequent)})}append($$anchor6,fragment_3)},$$slots:{default:!0}})}},$$slots:{default:!0}})});var node_4=sibling(node_1,2);component(node_4,()=>Tooltip_content,($$anchor4,Tooltip_Content)=>{Tooltip_Content($$anchor4,{get side(){return tooltipSide()},children:($$anchor5,$$slotProps2)=>{ +var p2=root_5$v(),text2=child(p2,!0);reset(p2),template_effect(()=>set_text(text2,$$props.tooltip)),append($$anchor5,p2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}const defaultAttributes={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var root$1V=from_svg("");function Icon($$anchor,$$props){ +push$1($$props,!0);const color=prop($$props,"color",3,"currentColor"),size2=prop($$props,"size",3,24),strokeWidth=prop($$props,"strokeWidth",3,2),absoluteStrokeWidth=prop($$props,"absoluteStrokeWidth",3,!1),iconNode=prop($$props,"iconNode",19,()=>[]),props=rest_props($$props,["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]);var svg2=root$1V();attribute_effect(svg2,$0=>({...defaultAttributes,...props,width:size2(),height:size2(),stroke:color(), +"stroke-width":$0,class:["lucide-icon lucide",$$props.name&&`lucide-${$$props.name}`,$$props.class]}),[()=>absoluteStrokeWidth()?Number(strokeWidth())*24/Number(size2()):strokeWidth()]);var node2=child(svg2);each(node2,17,iconNode,index$2,($$anchor2,$$item)=>{var $$array=user_derived(()=>to_array(get$3($$item),2));let tag=()=>get$3($$array)[0],attrs=()=>get$3($$array)[1];var fragment=comment$2(),node_1=first_child(fragment);element$4(node_1,tag,!0,($$element,$$anchor3)=>{attribute_effect($$element, +()=>({...attrs()}))}),append($$anchor2,fragment)});var node_2=sibling(node2);snippet(node_2,()=>$$props.children??noop$3),reset(svg2),append($$anchor,svg2),pop()}function Arrow_big_up($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M9 18v-6H5l7-7 7 7h-4v6H9z"}]];Icon($$anchor,spread_props({name:"arrow-big-up"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child( +fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Arrow_right($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M5 12h14"}],["path",{d:"m12 5 7 7-7 7"}]];Icon($$anchor,spread_props({name:"arrow-right"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2, +()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Arrow_up($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]];Icon($$anchor,spread_props({name:"arrow-up"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3), +append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Book_open_text($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 7v14"}],["path",{d:"M16 12h2"}],["path",{d:"M16 8h2"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"}],["path",{d:"M6 12h2"}],["path",{d:"M6 8h2"}]];Icon($$anchor,spread_props({name:"bo\ +ok-open-text"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Braces($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1"}],["path",{d:"M16 21h1a2 2 0 0 \ +0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1"}]];Icon($$anchor,spread_props({name:"braces"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Brain($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 5a3 3 0 1 \ +0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516"}],["path",{d:"M19.967 17.484A4 4 0 0\ + 1 18 18"}]];Icon($$anchor,spread_props({name:"brain"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Check($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M20 6 9 17l-5-5"}]];Icon($$anchor,spread_props({name:"check"}, +()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Chevron_down($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m6 9 6 6 6-6"}]];Icon($$anchor,spread_props({name:"chevron-down"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{ +var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Chevron_left($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m15 18-6-6 6-6"}]];Icon($$anchor,spread_props({name:"chevron-left"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child( +fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Chevron_up($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m18 15-6-6-6 6"}]];Icon($$anchor,spread_props({name:"chevron-up"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children?? +noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Chevron_right($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m9 18 6-6-6-6"}]];Icon($$anchor,spread_props({name:"chevron-right"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{ +default:!0}})),pop()}function Chevrons_up_down($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m7 15 5 5 5-5"}],["path",{d:"m7 9 5-5 5 5"}]];Icon($$anchor,spread_props({name:"chevrons-up-down"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})), +pop()}function Circle_alert($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]];Icon($$anchor,spread_props({name:"circle-alert"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append( +$$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Circle_check_big($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335"}],["path",{d:"m9 11 3 3L22 4"}]];Icon($$anchor,spread_props({name:"circle-check-big"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3), +append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Circle_x($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]];Icon($$anchor,spread_props({name:"circle-x"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3), +append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Clock($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"10"}],["polyline",{points:"12 6 12 12 16 14"}]];Icon($$anchor,spread_props({name:"clock"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2, +fragment_1)},$$slots:{default:!0}})),pop()}function Code($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m16 18 6-6-6-6"}],["path",{d:"m8 6-6 6 6 6"}]];Icon($$anchor,spread_props({name:"code"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})), +pop()}function Copy($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];Icon($$anchor,spread_props({name:"copy"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2, +fragment_1)},$$slots:{default:!0}})),pop()}function Database($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5"}],["path",{d:"M3 12A9 3 0 0 0 21 12"}]];Icon($$anchor,spread_props({name:"database"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props. +children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Download($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]];Icon($$anchor,spread_props({name:"download"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1); +snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Ellipsis($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]];Icon($$anchor,spread_props({name:"ellipsis"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child( +fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function External_link($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]];Icon($$anchor,spread_props({name:"external-link"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{ +var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Eye($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]];Icon($$anchor,spread_props({name:"eye"},()=>props,{get iconNode(){ +return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function File_text($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}],["path",{d:"M10 9H8"}],["path",{d:"M16\ + 13H8"}],["path",{d:"M16 17H8"}]];Icon($$anchor,spread_props({name:"file-text"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function File_x($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2\ + 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}],["path",{d:"m14.5 12.5-5 5"}],["path",{d:"m9.5 12.5 5 5"}]];Icon($$anchor,spread_props({name:"file-x"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function File$1($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots", +"$$events","$$legacy"]);const iconNode=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}]];Icon($$anchor,spread_props({name:"file"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Flask_conical($$anchor,$$props){push$1($$props,!0);let props=rest_props( +$$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2"}],["path",{d:"M6.453 15h11.094"}],["path",{d:"M8.5 2h7"}]];Icon($$anchor,spread_props({name:"flask-conical"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{ +default:!0}})),pop()}function Folder_open($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]];Icon($$anchor,spread_props({name:"folder-open"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(), +node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Funnel($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"}]];Icon($$anchor,spread_props({name:"funnel"},()=>props,{get iconNode(){return iconNode}, +children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Gauge($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m12 14 4-4"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0"}]];Icon($$anchor,spread_props({name:"gauge"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{ +var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Git_branch($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["line",{x1:"6",x2:"6",y1:"3",y2:"15"}],["circle",{cx:"18",cy:"6",r:"3"}],["circle",{cx:"6",cy:"18",r:"3"}],["path",{d:"M18 9a9 9 0 0 1-9 9"}]];Icon($$anchor,spread_props({name:"git-branch"},()=>props,{ +get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Globe($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}],["path",{d:"M2 12h20"}]];Icon($$anchor,spread_props( +{name:"globe"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Heart_off($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["line",{x1:"2",y1:"2",x2:"22",y2:"22"}],["path",{d:"M16.5 16.5 12 21l-7-7c-1.5-1.45-3-3.2-3-5.5a5.5 5.5 0 0 1\ + 2.14-4.35"}],["path",{d:"M8.76 3.1c1.15.22 2.13.78 3.24 1.9 1.5-1.5 2.74-2 4.5-2A5.5 5.5 0 0 1 22 8.5c0 2.12-1.3 3.78-2.67 5.17"}]];Icon($$anchor,spread_props({name:"heart-off"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Heart($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,[ +"$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"}]];Icon($$anchor,spread_props({name:"heart"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Image$1($$anchor,$$props){ +push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}],["circle",{cx:"9",cy:"9",r:"2"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"}]];Icon($$anchor,spread_props({name:"image"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)}, +$$slots:{default:!0}})),pop()}function Info$1($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];Icon($$anchor,spread_props({name:"info"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)}, +$$slots:{default:!0}})),pop()}function Key($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"}],["path",{d:"m21 2-9.6 9.6"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5"}]];Icon($$anchor,spread_props({name:"key"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props. +children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Layers($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 \ +0 0 22 17"}]];Icon($$anchor,spread_props({name:"layers"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function List_checks($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m3 17 2 2 4-4"}],["path",{d:"m3 7 2 2 4-4"}],["path",{ +d:"M13 6h8"}],["path",{d:"M13 12h8"}],["path",{d:"M13 18h8"}]];Icon($$anchor,spread_props({name:"list-checks"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function List_restart($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"\ +M21 6H3"}],["path",{d:"M7 12H3"}],["path",{d:"M7 18H3"}],["path",{d:"M12 18a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L11 14"}],["path",{d:"M11 10v4h4"}]];Icon($$anchor,spread_props({name:"list-restart"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Loader_circle($$anchor,$$props){ +push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];Icon($$anchor,spread_props({name:"loader-circle"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Message_square($$anchor,$$props){push$1($$props,!0);let props=rest_props( +$$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"}]];Icon($$anchor,spread_props({name:"message-square"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Mic($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props, +["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22"}]];Icon($$anchor,spread_props({name:"mic"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Minus($$anchor,$$props){ +push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M5 12h14"}]];Icon($$anchor,spread_props({name:"minus"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Monitor($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","\ +$$events","$$legacy"]);const iconNode=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21"}]];Icon($$anchor,spread_props({name:"monitor"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Moon($$anchor,$$props){push$1( +$$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"}]];Icon($$anchor,spread_props({name:"moon"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Music($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props, +["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M9 18V5l12-2v13"}],["circle",{cx:"6",cy:"18",r:"3"}],["circle",{cx:"18",cy:"16",r:"3"}]];Icon($$anchor,spread_props({name:"music"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Package($$anchor,$$props){push$1($$props,!0);let props=rest_props( +$$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"}],["path",{d:"M12 22V12"}],["polyline",{points:"3.29 7 12 12 20.71 7"}],["path",{d:"m7.5 4.27 9 5.15"}]];Icon($$anchor,spread_props({name:"package"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props. +children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Panel_left_close($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}],["path",{d:"m16 15-3-3 3-3"}]];Icon($$anchor,spread_props({name:"panel-left-close"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child( +fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Panel_left($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]];Icon($$anchor,spread_props({name:"panel-left"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child( +fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Pencil_ruler($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13"}],["path",{d:"m8 6 2-2"}],["path",{d:"m18 16 2-2"}],["path",{d:"m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17"}],["path",{d:"M21.174 6\ +.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];Icon($$anchor,spread_props({name:"pencil-ruler"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Pencil($$anchor,$$props){push$1($$props,!0);let props=rest_props( +$$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];Icon($$anchor,spread_props({name:"pencil"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})), +pop()}function Plus($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];Icon($$anchor,spread_props({name:"plus"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Power_off($$anchor,$$props){ +push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68"}],["path",{d:"M12 2v4"}],["path",{d:"m2 2 20 20"}]];Icon($$anchor,spread_props({name:"power-off"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{ +default:!0}})),pop()}function Power($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 2v10"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04"}]];Icon($$anchor,spread_props({name:"power"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()} +function Radio($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5"}],["circle",{cx:"12",cy:"12",r:"2"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19"}]];Icon($$anchor,spread_props({name:"radio"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(), +node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Refresh_cw($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]];Icon($$anchor,spread_props({name:"refresh-cw"}, +()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Rotate_ccw($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}]];Icon($$anchor,spread_props({name:"\ +rotate-ccw"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Rotate_cw($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}]];Icon($$anchor,spread_props( +{name:"rotate-cw"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Search($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];Icon($$anchor,spread_props({name:"search"}, +()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Server($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2"}],["line",{ +x1:"6",x2:"6.01",y1:"6",y2:"6"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18"}]];Icon($$anchor,spread_props({name:"server"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Settings$1($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["p\ +ath",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0\ +-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}],["circle",{cx:"12",cy:"12",r:"3"}]];Icon($$anchor,spread_props({name:"settings"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Shield_off($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$ev\ +ents","$$legacy"]);const iconNode=[["path",{d:"m2 2 20 20"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264"}]];Icon($$anchor,spread_props({name:"shield-off"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet( +node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Shield_question($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3"}],["path",{d:"M12 17h.01"}]];Icon($$anchor, +spread_props({name:"shield-question"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Shield($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 \ +1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}]];Icon($$anchor,spread_props({name:"shield"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Sliders_vertical($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[ +["line",{x1:"4",x2:"4",y1:"21",y2:"14"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16"}]];Icon($$anchor,spread_props({name:"sliders-vertical"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{ +var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Sparkles($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 1\ +4.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"}],["path",{d:"M20 3v4"}],["path",{d:"M22 5h-4"}],["path",{d:"M4 17v2"}],["path",{d:"M5 18H3"}]];Icon($$anchor,spread_props({name:"sparkles"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Square_pen($$anchor,$$props){push$1($$props,!0);let props=rest_props( +$$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"}]];Icon($$anchor,spread_props({name:"square-pen"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append( +$$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Square($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}]];Icon($$anchor,spread_props({name:"square"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{ +default:!0}})),pop()}function Sun($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"4"}],["path",{d:"M12 2v2"}],["path",{d:"M12 20v2"}],["path",{d:"m4.93 4.93 1.41 1.41"}],["path",{d:"m17.66 17.66 1.41 1.41"}],["path",{d:"M2 12h2"}],["path",{d:"M20 12h2"}],["path",{d:"m6.34 17.66-1.41 1.41"}],["path",{d:"m19.07 4.93-1.41 1.41"}]];Icon($$anchor,spread_props({name:"sun"},()=>props,{get iconNode(){return iconNode}, +children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Timer_off($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M10 2h4"}],["path",{d:"M4.6 11a8 8 0 0 0 1.7 8.7 8 8 0 0 0 8.7 1.7"}],["path",{d:"M7.4 7.4a8 8 0 0 1 10.3 1 8 8 0 0 1 .9 10.2"}],["path",{d:"m2 2 20 20"}],[ +"path",{d:"M12 12v-2"}]];Icon($$anchor,spread_props({name:"timer-off"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Trash_2($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M3 6h18"}],["path",{d:"M19 6v14c0 1-1 2-2 2H\ +7c-1 0-2-1-2-2V6"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17"}]];Icon($$anchor,spread_props({name:"trash-2"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Triangle_alert($$anchor,$$props){push$1($$props,!0); +let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]];Icon($$anchor,spread_props({name:"triangle-alert"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})), +pop()}function Upload($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 3v12"}],["path",{d:"m17 8-5-5-5 5"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}]];Icon($$anchor,spread_props({name:"upload"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)}, +$$slots:{default:!0}})),pop()}function Whole_word($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"7",cy:"12",r:"3"}],["path",{d:"M10 9v6"}],["circle",{cx:"17",cy:"12",r:"3"}],["path",{d:"M14 7v8"}],["path",{d:"M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1"}]];Icon($$anchor,spread_props({name:"whole-word"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child( +fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Wrench($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"}]];Icon($$anchor,spread_props({name:"wrench"},()=>props,{get iconNode(){return iconNode}, +children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function X($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];Icon($$anchor,spread_props({name:"x"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(), +node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Zap($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"}]];Icon($$anchor,spread_props({name:"zap"},()=>props,{get iconNode(){ +return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}const defaultWindow$2=typeof window<"u"?window:void 0;function getActiveElement$2(document2){let activeElement=document2.activeElement;for(;activeElement?.shadowRoot;){const node2=activeElement.shadowRoot.activeElement;if(node2===activeElement)break;activeElement=node2}return activeElement} +let ActiveElement$2=class{#document;#subscribe;constructor(options={}){const{window:window2=defaultWindow$2,document:document2=window2?.document}=options;window2!==void 0&&(this.#document=document2,this.#subscribe=createSubscriber(update2=>{const cleanupFocusIn=on(window2,"focusin",update2),cleanupFocusOut=on(window2,"focusout",update2);return()=>{cleanupFocusIn(),cleanupFocusOut()}}))}get current(){return this.#subscribe?.(),this.#document?getActiveElement$2(this.#document):null}};new ActiveElement$2; +function runEffect(flush,effect2){switch(flush){case"post":user_effect(effect2);break;case"pre":user_pre_effect(effect2);break}}function runWatcher(sources,flush,effect2,options={}){const{lazy=!1}=options;let active=!lazy,previousValues=Array.isArray(sources)?[]:void 0;runEffect(flush,()=>{const values=Array.isArray(sources)?sources.map(source2=>source2()):sources();if(!active){active=!0,previousValues=values;return}const cleanup=untrack$1(()=>effect2(values,previousValues));return previousValues= +values,cleanup})}function watch(sources,effect2,options){runWatcher(sources,"post",effect2,options)}function watchPre(sources,effect2,options){runWatcher(sources,"pre",effect2,options)}watch.pre=watchPre;function getStorage(storageType,window2){switch(storageType){case"local":return window2.localStorage;case"session":return window2.sessionStorage}}class PersistedState{#current;#key;#serializer;#storage;#subscribe;#version=state$1(0);constructor(key2,initialValue,options={}){const{storage:storageType="\ +local",serializer:serializer2={serialize:JSON.stringify,deserialize:JSON.parse},syncTabs=!0,window:window2=defaultWindow$2}=options;if(this.#current=initialValue,this.#key=key2,this.#serializer=serializer2,window2===void 0)return;const storage=getStorage(storageType,window2);this.#storage=storage;const existingValue=storage.getItem(key2);existingValue!==null?this.#current=this.#deserialize(existingValue):this.#serialize(initialValue),syncTabs&&storageType==="local"&&(this.#subscribe=createSubscriber( +()=>on(window2,"storage",this.#handleStorageEvent)))}get current(){this.#subscribe?.(),get$3(this.#version);const root2=this.#deserialize(this.#storage?.getItem(this.#key))??this.#current,proxies=new WeakMap,proxy2=value=>{if(value===null||value?.constructor.name==="Date"||typeof value!="object")return value;let p2=proxies.get(value);return p2||(p2=new Proxy(value,{get:(target2,property)=>(get$3(this.#version),proxy2(Reflect.get(target2,property))),set:(target2,property,value2)=>(set$1(this.#version, +get$3(this.#version)+1),Reflect.set(target2,property,value2),this.#serialize(root2),!0)}),proxies.set(value,p2)),p2};return proxy2(root2)}set current(newValue){this.#serialize(newValue),set$1(this.#version,get$3(this.#version)+1)}#handleStorageEvent=event2=>{event2.key!==this.#key||event2.newValue===null||(this.#current=this.#deserialize(event2.newValue),set$1(this.#version,get$3(this.#version)+1))};#deserialize(value){try{return this.#serializer.deserialize(value)}catch(error2){console.error(`E\ +rror when parsing "${value}" from persisted store "${this.#key}"`,error2);return}}#serialize(value){try{value!=null&&this.#storage?.setItem(this.#key,this.#serializer.serialize(value))}catch(error2){console.error(`Error when writing value from persisted store "${this.#key}" to ${this.#storage}`,error2)}}}function sanitizeClassNames(classNames){return classNames.filter(className=>className.length>0)}const noopStorage={getItem:_key=>null,setItem:(_key,_value)=>{}},isBrowser$1=typeof document<"u";function isFunction(value){ +return typeof value=="function"}function isObject$1(value){return value!==null&&typeof value=="object"}const BoxSymbol=Symbol("box"),isWritableSymbol=Symbol("is-writable");function isBox(value){return isObject$1(value)&&BoxSymbol in value}function isWritableBox(value){return box.isBox(value)&&isWritableSymbol in value}function box(initialValue){let current2=state$1(proxy(initialValue));return{[BoxSymbol]:!0,[isWritableSymbol]:!0,get current(){return get$3(current2)},set current(v){set$1(current2, +v,!0)}}}function boxWith(getter,setter){const derived2=user_derived(getter);return setter?{[BoxSymbol]:!0,[isWritableSymbol]:!0,get current(){return get$3(derived2)},set current(v){setter(v)}}:{[BoxSymbol]:!0,get current(){return getter()}}}function boxFrom(value){return box.isBox(value)?value:isFunction(value)?box.with(value):box(value)}function boxFlatten(boxes){return Object.entries(boxes).reduce((acc,[key2,b])=>box.isBox(b)?(box.isWritableBox(b)?Object.defineProperty(acc,key2,{get(){return b. +current},set(v){b.current=v}}):Object.defineProperty(acc,key2,{get(){return b.current}}),acc):Object.assign(acc,{[key2]:b}),{})}function toReadonlyBox(b){return box.isWritableBox(b)?{[BoxSymbol]:!0,get current(){return b.current}}:b}box.from=boxFrom;box.with=boxWith;box.flatten=boxFlatten;box.readonly=toReadonlyBox;box.isBox=isBox;box.isWritableBox=isWritableBox;function createParser$1(matcher,replacer){const regex=RegExp(matcher,"g");return str=>{if(typeof str!="string")throw new TypeError(`exp\ +ected an argument of type string, but got ${typeof str}`);return str.match(regex)?str.replace(regex,replacer):str}}const camelToKebab=createParser$1(/[A-Z]/,match=>`-${match.toLowerCase()}`);function styleToCSS(styleObj){if(!styleObj||typeof styleObj!="object"||Array.isArray(styleObj))throw new TypeError(`expected an argument of type object, but got ${typeof styleObj}`);return Object.keys(styleObj).map(property=>`${camelToKebab(property)}: ${styleObj[property]};`).join(` `)}function styleToString(style2={}){return styleToCSS(style2).replace(` `," ")}const srOnlyStyles={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"};styleToString(srOnlyStyles);const defaultWindow$1=typeof window<"u"?window:void 0;function getActiveElement$1(document2){let activeElement=document2.activeElement;for(;activeElement?.shadowRoot;){const node2=activeElement.shadowRoot.activeElement;if(node2===activeElement)break;activeElement=node2} return activeElement}let ActiveElement$1=class{#document;#subscribe;constructor(options={}){const{window:window2=defaultWindow$1,document:document2=window2?.document}=options;window2!==void 0&&(this.#document=document2,this.#subscribe=createSubscriber(update2=>{const cleanupFocusIn=on(window2,"focusin",update2),cleanupFocusOut=on(window2,"focusout",update2);return()=>{cleanupFocusIn(),cleanupFocusOut()}}))}get current(){return this.#subscribe?.(),this.#document?getActiveElement$1(this.#document): @@ -1369,15 +1371,15 @@ type:SettingsFieldType.SELECT,section:SETTINGS_SECTION_SLUGS.GENERAL,options:COL behave.",defaultValue:"",type:SettingsFieldType.TEXTAREA,section:SETTINGS_SECTION_SLUGS.GENERAL,sync:{serverKey:SETTINGS_KEYS.SYSTEM_MESSAGE,paramType:SyncableParameterType.STRING}},{key:SETTINGS_KEYS.PASTE_LONG_TEXT_TO_FILE_LEN,label:"Paste long text to file length",help:"On pasting long text, it will be converted to a file. You can control the file length by setting the value of this parameter. Value 0 means disable.",defaultValue:2500,type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS. GENERAL,sync:{serverKey:SETTINGS_KEYS.PASTE_LONG_TEXT_TO_FILE_LEN,paramType:SyncableParameterType.NUMBER}},{key:SETTINGS_KEYS.SEND_ON_ENTER,label:"Send message on Enter",help:"Use Enter to send messages and Shift + Enter for new lines. When disabled, use Ctrl/Cmd + Enter.",defaultValue:!0,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.GENERAL,sync:{serverKey:SETTINGS_KEYS.SEND_ON_ENTER,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.COPY_TEXT_ATTACHMENTS_AS_PLAIN_TEXT, label:"Copy text attachments as plain text",help:"When copying a message with text attachments, combine them into a single plain text string instead of a special format that can be pasted back as attachments.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.GENERAL,sync:{serverKey:SETTINGS_KEYS.COPY_TEXT_ATTACHMENTS_AS_PLAIN_TEXT,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.ENABLE_CONTINUE_GENERATION,label:'Enable "Continue" button',help:'Enable "Co\ -ntinue" button for assistant messages. Currently works only with non-reasoning models.',defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.GENERAL,isExperimental:!0,sync:{serverKey:SETTINGS_KEYS.ENABLE_CONTINUE_GENERATION,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.PDF_AS_IMAGE,label:"Parse PDF as image",help:"Parse PDF as image instead of text. Automatically falls back to text processing for non-vision models.",defaultValue:!1,type:SettingsFieldType. -CHECKBOX,section:SETTINGS_SECTION_SLUGS.GENERAL,sync:{serverKey:SETTINGS_KEYS.PDF_AS_IMAGE,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.ASK_FOR_TITLE_CONFIRMATION,label:"Ask for confirmation before changing conversation title",help:"Ask for confirmation before automatically changing conversation title when editing the first message.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.GENERAL,sync:{serverKey:SETTINGS_KEYS.ASK_FOR_TITLE_CONFIRMATION,paramType:SyncableParameterType. -BOOLEAN}},{key:SETTINGS_KEYS.TITLE_GENERATION_USE_FIRST_LINE,label:"Use first non-empty line for conversation title",help:"Use only the first non-empty line of the prompt to generate the conversation title.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.GENERAL,sync:{serverKey:SETTINGS_KEYS.TITLE_GENERATION_USE_FIRST_LINE,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.TITLE_GENERATION_USE_LLM,label:"Use LLM to generate conversation title",help:"Use \ -the LLM to automatically generate conversation titles based on the first message exchange.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.GENERAL,isExperimental:!0},{key:SETTINGS_KEYS.TITLE_GENERATION_PROMPT,label:"LLM title generation prompt",help:"Optional template for the title generation prompt. Use {{USER}} for the user message and {{ASSISTANT}} for the assistant message.",defaultValue:TITLE_GENERATION.DEFAULT_PROMPT,type:SettingsFieldType.TEXTAREA,section:SETTINGS_SECTION_SLUGS. -GENERAL}]},[SETTINGS_SECTION_SLUGS.DISPLAY]:{title:SETTINGS_SECTION_TITLES.DISPLAY,slug:SETTINGS_SECTION_SLUGS.DISPLAY,icon:Monitor,settings:[{key:SETTINGS_KEYS.SHOW_MESSAGE_STATS,label:"Show message generation statistics",help:"Display generation statistics (tokens/second, token count, duration) below each assistant message.",defaultValue:!0,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.SHOW_MESSAGE_STATS,paramType:SyncableParameterType.BOOLEAN}}, -{key:SETTINGS_KEYS.SHOW_THOUGHT_IN_PROGRESS,label:"Show thought in progress",help:"Expand thought process by default when generating messages.",defaultValue:!0,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.SHOW_THOUGHT_IN_PROGRESS,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.SHOW_TOOL_CALL_IN_PROGRESS,label:"Show tool call in progress",help:"Automatically expand tool call details while executing and keep them expanded after c\ -ompletion.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.SHOW_TOOL_CALL_IN_PROGRESS,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.KEEP_STATS_VISIBLE,label:"Keep stats visible after generation",help:"Keep processing statistics visible after generation finishes.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.KEEP_STATS_VISIBLE,paramType:SyncableParameterType. -BOOLEAN}},{key:SETTINGS_KEYS.AUTO_MIC_ON_EMPTY,label:"Show microphone on empty input",help:"Automatically show microphone button instead of send button when textarea is empty for models with audio modality support.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,isExperimental:!0,sync:{serverKey:SETTINGS_KEYS.AUTO_MIC_ON_EMPTY,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.RENDER_USER_CONTENT_AS_MARKDOWN,label:"Render user content as Markdown", -help:"Render user messages using markdown formatting in the chat.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.RENDER_USER_CONTENT_AS_MARKDOWN,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.FULL_HEIGHT_CODE_BLOCKS,label:"Use full height code blocks",help:"Always display code blocks at their full natural height, overriding any height limits.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS. +ntinue" button for assistant messages, including reasoning models.',defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.GENERAL,isExperimental:!0,sync:{serverKey:SETTINGS_KEYS.ENABLE_CONTINUE_GENERATION,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.PDF_AS_IMAGE,label:"Parse PDF as image",help:"Parse PDF as image instead of text. Automatically falls back to text processing for non-vision models.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS. +GENERAL,sync:{serverKey:SETTINGS_KEYS.PDF_AS_IMAGE,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.ASK_FOR_TITLE_CONFIRMATION,label:"Ask for confirmation before changing conversation title",help:"Ask for confirmation before automatically changing conversation title when editing the first message.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.GENERAL,sync:{serverKey:SETTINGS_KEYS.ASK_FOR_TITLE_CONFIRMATION,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS. +TITLE_GENERATION_USE_FIRST_LINE,label:"Use first non-empty line for conversation title",help:"Use only the first non-empty line of the prompt to generate the conversation title.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.GENERAL,sync:{serverKey:SETTINGS_KEYS.TITLE_GENERATION_USE_FIRST_LINE,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.TITLE_GENERATION_USE_LLM,label:"Use LLM to generate conversation title",help:"Use the LLM to automatically gene\ +rate conversation titles based on the first message exchange.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.GENERAL,isExperimental:!0},{key:SETTINGS_KEYS.TITLE_GENERATION_PROMPT,label:"LLM title generation prompt",help:"Optional template for the title generation prompt. Use {{USER}} for the user message and {{ASSISTANT}} for the assistant message.",defaultValue:TITLE_GENERATION.DEFAULT_PROMPT,type:SettingsFieldType.TEXTAREA,section:SETTINGS_SECTION_SLUGS.GENERAL}]}, +[SETTINGS_SECTION_SLUGS.DISPLAY]:{title:SETTINGS_SECTION_TITLES.DISPLAY,slug:SETTINGS_SECTION_SLUGS.DISPLAY,icon:Monitor,settings:[{key:SETTINGS_KEYS.SHOW_MESSAGE_STATS,label:"Show message generation statistics",help:"Display generation statistics (tokens/second, token count, duration) below each assistant message.",defaultValue:!0,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.SHOW_MESSAGE_STATS,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS. +SHOW_THOUGHT_IN_PROGRESS,label:"Show thought in progress",help:"Expand thought process by default when generating messages.",defaultValue:!0,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.SHOW_THOUGHT_IN_PROGRESS,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.SHOW_TOOL_CALL_IN_PROGRESS,label:"Show tool call in progress",help:"Automatically expand tool call details while executing and keep them expanded after completion.",defaultValue:!1, +type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.SHOW_TOOL_CALL_IN_PROGRESS,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.KEEP_STATS_VISIBLE,label:"Keep stats visible after generation",help:"Keep processing statistics visible after generation finishes.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.KEEP_STATS_VISIBLE,paramType:SyncableParameterType.BOOLEAN}},{ +key:SETTINGS_KEYS.AUTO_MIC_ON_EMPTY,label:"Show microphone on empty input",help:"Automatically show microphone button instead of send button when textarea is empty for models with audio modality support.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,isExperimental:!0,sync:{serverKey:SETTINGS_KEYS.AUTO_MIC_ON_EMPTY,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.RENDER_USER_CONTENT_AS_MARKDOWN,label:"Render user content as Markdown",help:"Ren\ +der user messages using markdown formatting in the chat.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.RENDER_USER_CONTENT_AS_MARKDOWN,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.FULL_HEIGHT_CODE_BLOCKS,label:"Use full height code blocks",help:"Always display code blocks at their full natural height, overriding any height limits.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS. DISPLAY,sync:{serverKey:SETTINGS_KEYS.FULL_HEIGHT_CODE_BLOCKS,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.DISABLE_AUTO_SCROLL,label:"Disable automatic scroll",help:"Disable automatic scrolling while messages stream so you can control the viewport position manually.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.DISABLE_AUTO_SCROLL,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.ALWAYS_SHOW_SIDEBAR_ON_DESKTOP, label:"Always show sidebar on desktop",help:"Always keep the sidebar visible on desktop instead of auto-hiding it.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.ALWAYS_SHOW_SIDEBAR_ON_DESKTOP,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.SHOW_RAW_MODEL_NAMES,label:"Show raw model names",help:'Display full raw model identifiers (e.g. "ggml-org/GLM-4.7-Flash-GGUF:Q8_0") instead of parsed names with badges.',defaultValue:!1, type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.SHOW_RAW_MODEL_NAMES,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.ALWAYS_SHOW_AGENTIC_TURNS,label:"Always show agentic turns in conversation",help:"Always expand and display agentic loop turns in conversation messages.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.ALWAYS_SHOW_AGENTIC_TURNS,paramType:SyncableParameterType. @@ -6471,140 +6473,141 @@ id,!1);return}console.error("Failed to send message:",error2),this.setChatLoadin if(isRouterMode()&&!effectiveModel){const conversationModel=this.getConversationModel(allMessages);effectiveModel=selectedModelName()||conversationModel}isRouterMode()&&effectiveModel&&(modelsStore.getModelProps(effectiveModel)||await modelsStore.fetchModelProps(effectiveModel));let currentMessageId=assistantMessage.id,streamedContent="",streamedReasoningContent="",resolvedModel=null,modelPersisted=!1;const convId=assistantMessage.convId,recordModel=(modelName,persistImmediately=!0)=>{if(!modelName) return;const n=normalizeModelName(modelName);if(!n||n===resolvedModel)return;resolvedModel=n;const idx=conversationsStore.findMessageIndex(currentMessageId);conversationsStore.updateMessageAtIndex(idx,{model:n}),persistImmediately&&!modelPersisted&&(modelPersisted=!0,DatabaseService.updateMessage(currentMessageId,{model:n}).catch(()=>{modelPersisted=!1,resolvedModel=null}))},updateStreamingUI=()=>{this.setChatStreaming(convId,streamedContent,currentMessageId);const idx=conversationsStore.findMessageIndex( currentMessageId);conversationsStore.updateMessageAtIndex(idx,{content:streamedContent})},cleanupStreamingState=()=>{this.setStreamingActive(!1),this.setChatLoading(convId,!1),this.clearChatStreaming(convId),this.setProcessingState(convId,null)};this.setStreamingActive(!0),this.setActiveProcessingConversation(convId);const abortController=this.getOrCreateAbortController(convId),streamCallbacks={onChunk:chunk=>{streamedContent+=chunk,updateStreamingUI()},onReasoningChunk:chunk=>{streamedReasoningContent+= -chunk;const idx=conversationsStore.findMessageIndex(currentMessageId);conversationsStore.updateMessageAtIndex(idx,{reasoningContent:streamedReasoningContent})},onToolCallsStreaming:toolCalls=>{const idx=conversationsStore.findMessageIndex(currentMessageId);conversationsStore.updateMessageAtIndex(idx,{toolCalls:JSON.stringify(toolCalls)})},onAttachments:(messageId,extras)=>{if(!extras.length)return;const idx=conversationsStore.findMessageIndex(messageId);if(idx===-1)return;const updatedExtras=[...conversationsStore. -activeMessages[idx].extra||[],...extras];conversationsStore.updateMessageAtIndex(idx,{extra:updatedExtras}),DatabaseService.updateMessage(messageId,{extra:updatedExtras}).catch(console.error)},onModel:modelName=>recordModel(modelName),onTurnComplete:intermediateTimings=>{const idx=conversationsStore.findMessageIndex(assistantMessage.id);conversationsStore.updateMessageAtIndex(idx,{timings:intermediateTimings})},onTimings:(timings,promptProgress)=>{const tokensPerSecond=timings?.predicted_ms&&timings?. -predicted_n?timings.predicted_n/timings.predicted_ms*1e3:0;this.updateProcessingStateFromTimings({prompt_n:timings?.prompt_n||0,prompt_ms:timings?.prompt_ms,predicted_n:timings?.predicted_n||0,predicted_per_second:tokensPerSecond,cache_n:timings?.cache_n||0,prompt_progress:promptProgress},convId)},onAssistantTurnComplete:async(content2,reasoningContent,timings,toolCalls)=>{const updateData={content:content2,reasoningContent:reasoningContent||void 0,toolCalls:toolCalls?JSON.stringify(toolCalls):"", -timings};resolvedModel&&!modelPersisted&&(updateData.model=resolvedModel),await DatabaseService.updateMessage(currentMessageId,updateData);const idx=conversationsStore.findMessageIndex(currentMessageId),uiUpdate={content:content2,reasoningContent:reasoningContent||void 0,toolCalls:toolCalls?JSON.stringify(toolCalls):""};timings&&(uiUpdate.timings=timings),resolvedModel&&(uiUpdate.model=resolvedModel),conversationsStore.updateMessageAtIndex(idx,uiUpdate),await conversationsStore.updateCurrentNode( -currentMessageId)},createToolResultMessage:async(toolCallId,content2,extras)=>{const msg=await DatabaseService.createMessageBranch({convId,type:MessageType.TEXT,role:MessageRole.TOOL,content:content2,toolCallId,timestamp:Date.now(),toolCalls:"",children:[],extra:extras},currentMessageId);return conversationsStore.addMessageToActive(msg),await conversationsStore.updateCurrentNode(msg.id),msg},createAssistantMessage:async()=>{streamedContent="",streamedReasoningContent="";const lastMsg=conversationsStore. -activeMessages[conversationsStore.activeMessages.length-1],msg=await DatabaseService.createMessageBranch({convId,type:MessageType.TEXT,role:MessageRole.ASSISTANT,content:"",timestamp:Date.now(),toolCalls:"",children:[],model:resolvedModel},lastMsg.id);return conversationsStore.addMessageToActive(msg),currentMessageId=msg.id,msg},onFlowComplete:finalTimings=>{if(finalTimings){const idx=conversationsStore.findMessageIndex(assistantMessage.id);conversationsStore.updateMessageAtIndex(idx,{timings:finalTimings}), -DatabaseService.updateMessage(assistantMessage.id,{timings:finalTimings}).catch(console.error)}cleanupStreamingState(),onComplete&&onComplete(streamedContent),isRouterMode()&&modelsStore.fetchRouterModels().catch(console.error),config$1().preEncodeConversation&&this.triggerPreEncode(allMessages,assistantMessage,streamedContent,effectiveModel,!!config$1().excludeReasoningFromContext)},onError:error2=>{if(this.setStreamingActive(!1),isAbortError(error2)){cleanupStreamingState();const pending=this. -consumePendingMessage(convId);pending&&this.sendMessage(pending.content,pending.extras);return}console.error("Streaming error:",error2),cleanupStreamingState(),this.clearPendingMessage(convId);const idx=conversationsStore.findMessageIndex(assistantMessage.id);if(idx!==-1){const failedMessage=conversationsStore.removeMessageAtIndex(idx);failedMessage&&DatabaseService.deleteMessage(failedMessage.id).catch(console.error)}const contextInfo=error2.contextInfo;this.showErrorDialog({type:error2.name=== -"TimeoutError"?ErrorDialogType.TIMEOUT:ErrorDialogType.SERVER,message:error2.message,contextInfo}),onError&&onError(error2)}},perChatOverrides=conversationsStore.activeConversation?.mcpServerOverrides;if((await agenticStore.runAgenticFlow({conversationId:convId,messages:allMessages,options:{...this.getApiOptions(),...effectiveModel?{model:effectiveModel}:{}},callbacks:streamCallbacks,signal:abortController.signal,perChatOverrides})).handled){firstUserMessageContent&&await this.generateTitleWithLLM( -firstUserMessageContent,streamedContent,convId);const pending=agenticStore.consumePendingSteeringMessage(convId);pending&&await this.sendMessage(pending.content,pending.extras);return}await ChatService.sendMessage(allMessages,{...this.getApiOptions(),...effectiveModel?{model:effectiveModel}:{},stream:!0,onChunk:streamCallbacks.onChunk,onReasoningChunk:streamCallbacks.onReasoningChunk,onModel:streamCallbacks.onModel,onTimings:streamCallbacks.onTimings,onComplete:async(finalContent,reasoningContent,timings,toolCalls)=>{ +chunk,this.setChatStreaming(convId,streamedContent,currentMessageId);const idx=conversationsStore.findMessageIndex(currentMessageId);conversationsStore.updateMessageAtIndex(idx,{reasoningContent:streamedReasoningContent})},onToolCallsStreaming:toolCalls=>{const idx=conversationsStore.findMessageIndex(currentMessageId);conversationsStore.updateMessageAtIndex(idx,{toolCalls:JSON.stringify(toolCalls)})},onAttachments:(messageId,extras)=>{if(!extras.length)return;const idx=conversationsStore.findMessageIndex( +messageId);if(idx===-1)return;const updatedExtras=[...conversationsStore.activeMessages[idx].extra||[],...extras];conversationsStore.updateMessageAtIndex(idx,{extra:updatedExtras}),DatabaseService.updateMessage(messageId,{extra:updatedExtras}).catch(console.error)},onModel:modelName=>recordModel(modelName),onTurnComplete:intermediateTimings=>{const idx=conversationsStore.findMessageIndex(assistantMessage.id);conversationsStore.updateMessageAtIndex(idx,{timings:intermediateTimings})},onTimings:(timings,promptProgress)=>{ +const tokensPerSecond=timings?.predicted_ms&&timings?.predicted_n?timings.predicted_n/timings.predicted_ms*1e3:0;this.updateProcessingStateFromTimings({prompt_n:timings?.prompt_n||0,prompt_ms:timings?.prompt_ms,predicted_n:timings?.predicted_n||0,predicted_per_second:tokensPerSecond,cache_n:timings?.cache_n||0,prompt_progress:promptProgress},convId)},onAssistantTurnComplete:async(content2,reasoningContent,timings,toolCalls)=>{const updateData={content:content2,reasoningContent:reasoningContent|| +void 0,toolCalls:toolCalls?JSON.stringify(toolCalls):"",timings};resolvedModel&&!modelPersisted&&(updateData.model=resolvedModel),await DatabaseService.updateMessage(currentMessageId,updateData);const idx=conversationsStore.findMessageIndex(currentMessageId),uiUpdate={content:content2,reasoningContent:reasoningContent||void 0,toolCalls:toolCalls?JSON.stringify(toolCalls):""};timings&&(uiUpdate.timings=timings),resolvedModel&&(uiUpdate.model=resolvedModel),conversationsStore.updateMessageAtIndex( +idx,uiUpdate),await conversationsStore.updateCurrentNode(currentMessageId)},createToolResultMessage:async(toolCallId,content2,extras)=>{const msg=await DatabaseService.createMessageBranch({convId,type:MessageType.TEXT,role:MessageRole.TOOL,content:content2,toolCallId,timestamp:Date.now(),toolCalls:"",children:[],extra:extras},currentMessageId);return conversationsStore.addMessageToActive(msg),await conversationsStore.updateCurrentNode(msg.id),msg},createAssistantMessage:async()=>{streamedContent= +"",streamedReasoningContent="";const lastMsg=conversationsStore.activeMessages[conversationsStore.activeMessages.length-1],msg=await DatabaseService.createMessageBranch({convId,type:MessageType.TEXT,role:MessageRole.ASSISTANT,content:"",timestamp:Date.now(),toolCalls:"",children:[],model:resolvedModel},lastMsg.id);return conversationsStore.addMessageToActive(msg),currentMessageId=msg.id,msg},onFlowComplete:finalTimings=>{if(finalTimings){const idx=conversationsStore.findMessageIndex(assistantMessage. +id);conversationsStore.updateMessageAtIndex(idx,{timings:finalTimings}),DatabaseService.updateMessage(assistantMessage.id,{timings:finalTimings}).catch(console.error)}cleanupStreamingState(),onComplete&&onComplete(streamedContent),isRouterMode()&&modelsStore.fetchRouterModels().catch(console.error),config$1().preEncodeConversation&&this.triggerPreEncode(allMessages,assistantMessage,streamedContent,effectiveModel,!!config$1().excludeReasoningFromContext)},onError:error2=>{if(this.setStreamingActive( +!1),isAbortError(error2)){cleanupStreamingState();const pending=this.consumePendingMessage(convId);pending&&this.sendMessage(pending.content,pending.extras);return}console.error("Streaming error:",error2),cleanupStreamingState(),this.clearPendingMessage(convId);const idx=conversationsStore.findMessageIndex(assistantMessage.id);if(idx!==-1){const failedMessage=conversationsStore.removeMessageAtIndex(idx);failedMessage&&DatabaseService.deleteMessage(failedMessage.id).catch(console.error)}const contextInfo=error2. +contextInfo;this.showErrorDialog({type:error2.name==="TimeoutError"?ErrorDialogType.TIMEOUT:ErrorDialogType.SERVER,message:error2.message,contextInfo}),onError&&onError(error2)}},perChatOverrides=conversationsStore.activeConversation?.mcpServerOverrides;if((await agenticStore.runAgenticFlow({conversationId:convId,messages:allMessages,options:{...this.getApiOptions(),...effectiveModel?{model:effectiveModel}:{}},callbacks:streamCallbacks,signal:abortController.signal,perChatOverrides})).handled){firstUserMessageContent&& +await this.generateTitleWithLLM(firstUserMessageContent,streamedContent,convId);const pending=agenticStore.consumePendingSteeringMessage(convId);pending&&await this.sendMessage(pending.content,pending.extras);return}await ChatService.sendMessage(allMessages,{...this.getApiOptions(),...effectiveModel?{model:effectiveModel}:{},stream:!0,onChunk:streamCallbacks.onChunk,onReasoningChunk:streamCallbacks.onReasoningChunk,onModel:streamCallbacks.onModel,onTimings:streamCallbacks.onTimings,onComplete:async(finalContent,reasoningContent,timings,toolCalls)=>{ const content2=streamedContent||finalContent||"",reasoning=streamedReasoningContent||reasoningContent,updateData={content:content2,reasoningContent:reasoning||void 0,toolCalls:toolCalls||"",timings};resolvedModel&&!modelPersisted&&(updateData.model=resolvedModel),await DatabaseService.updateMessage(currentMessageId,updateData);const idx=conversationsStore.findMessageIndex(currentMessageId),uiUpdate={content:content2,reasoningContent:reasoning||void 0,toolCalls:toolCalls||""};timings&&(uiUpdate.timings= timings),resolvedModel&&(uiUpdate.model=resolvedModel),conversationsStore.updateMessageAtIndex(idx,uiUpdate),await conversationsStore.updateCurrentNode(currentMessageId),cleanupStreamingState(),onComplete&&await onComplete(content2),isRouterMode()&&modelsStore.fetchRouterModels().catch(console.error),firstUserMessageContent&&await this.generateTitleWithLLM(firstUserMessageContent,streamedContent,convId);const pending=this.consumePendingMessage(convId);pending&&await this.sendMessage(pending.content, pending.extras)},onError:streamCallbacks.onError},convId,abortController.signal)}async stopGeneration(){const activeConv=conversationsStore.activeConversation;activeConv&&await this.stopGenerationForChat(activeConv.id)}async stopGenerationForChat(convId){await this.savePartialResponseIfNeeded(convId),this.setStreamingActive(!1),this.abortRequest(convId),this.setChatLoading(convId,!1),this.clearChatStreaming(convId),this.setProcessingState(convId,null),this.clearPendingMessage(convId)}async generateTitleWithLLM(userContent,assistantContent,convId){ const effectiveModel=isRouterMode()&&selectedModelName()?selectedModelName():void 0,configValue=config$1(),titlePrompt=(typeof configValue.titleGenerationPrompt=="string"&&configValue.titleGenerationPrompt.trim()?configValue.titleGenerationPrompt:TITLE_GENERATION.DEFAULT_PROMPT).replace("{{USER}}",String(userContent||"")).replace("{{ASSISTANT}}",String(assistantContent||"")),titleMessage={role:MessageRole.USER,content:titlePrompt},titleResponse=await ChatService.generateTitle(titleMessage,effectiveModel); if(!titleResponse)return;let cleanTitle=titleResponse.trim();if(cleanTitle=cleanTitle.replace(TITLE_GENERATION.PREFIX_PATTERN,"").replace(TITLE_GENERATION.QUOTE_PATTERN,"").trim(),!cleanTitle||cleanTitle.lengthl.trim().length>0);cleanTitle=firstLine?firstLine.trim():TITLE_GENERATION.FALLBACK}cleanTitle&&cleanTitle.length>=TITLE_GENERATION.MIN_LENGTH&&await conversationsStore.updateConversationName(convId,cleanTitle)}async savePartialResponseIfNeeded(convId){const conversationId=convId||conversationsStore.activeConversation?.id;if(!conversationId)return;const streamingState=this.getChatStreaming(conversationId);if(!streamingState||!streamingState.response.trim())return;const messages=conversationId=== -conversationsStore.activeConversation?.id?conversationsStore.activeMessages:await conversationsStore.getConversationMessages(conversationId);if(!messages.length)return;const lastMessage=messages[messages.length-1];if(lastMessage?.role===MessageRole.ASSISTANT)try{const updateData={content:streamingState.response},lastKnownState=this.getProcessingState(conversationId);lastKnownState&&(updateData.timings={prompt_n:lastKnownState.promptTokens||0,prompt_ms:lastKnownState.promptMs,predicted_n:lastKnownState. -tokensDecoded||0,cache_n:lastKnownState.cacheTokens||0,predicted_ms:lastKnownState.tokensPerSecond&&lastKnownState.tokensDecoded?lastKnownState.tokensDecoded/lastKnownState.tokensPerSecond*1e3:void 0}),await DatabaseService.updateMessage(lastMessage.id,updateData),lastMessage.content=streamingState.response,updateData.timings&&(lastMessage.timings=updateData.timings)}catch(error2){lastMessage.content=streamingState.response,console.error("Failed to save partial response:",error2)}}async updateMessage(messageId,newContent){ -const activeConv=conversationsStore.activeConversation;if(!activeConv)return;this.isChatLoadingInternal(activeConv.id)&&await this.stopGeneration();const result=this.getMessageByIdWithRole(messageId,MessageRole.USER);if(!result)return;const{message:messageToUpdate,index:messageIndex}=result,originalContent=messageToUpdate.content;try{const rootMessage=(await conversationsStore.getConversationMessages(activeConv.id)).find(m=>m.type==="root"&&m.parent===null),isFirstUserMessage=rootMessage&&messageToUpdate. -parent===rootMessage.id;conversationsStore.updateMessageAtIndex(messageIndex,{content:newContent}),await DatabaseService.updateMessage(messageId,{content:newContent}),isFirstUserMessage&&newContent.trim()&&await conversationsStore.updateConversationTitleWithConfirmation(activeConv.id,generateConversationTitle(newContent,!!config$1().titleGenerationUseFirstLine));const messagesToRemove=conversationsStore.activeMessages.slice(messageIndex+1);for(const message of messagesToRemove)await DatabaseService. -deleteMessage(message.id);conversationsStore.sliceActiveMessages(messageIndex+1),conversationsStore.updateConversationTimestamp(),this.setChatLoading(activeConv.id,!0),this.clearChatStreaming(activeConv.id);const assistantMessage=await this.createAssistantMessage();conversationsStore.addMessageToActive(assistantMessage),await conversationsStore.updateCurrentNode(assistantMessage.id),await this.streamChatCompletion(conversationsStore.activeMessages.slice(0,-1),assistantMessage,void 0,()=>{conversationsStore. -updateMessageAtIndex(conversationsStore.findMessageIndex(messageId),{content:originalContent})})}catch(error2){isAbortError(error2)||console.error("Failed to update message:",error2)}}async regenerateMessage(messageId){const activeConv=conversationsStore.activeConversation;if(!activeConv||this.isChatLoadingInternal(activeConv.id))return;this.cancelPreEncode();const result=this.getMessageByIdWithRole(messageId,MessageRole.ASSISTANT);if(!result)return;const{index:messageIndex}=result;try{const messagesToRemove=conversationsStore. -activeMessages.slice(messageIndex);for(const message of messagesToRemove)await DatabaseService.deleteMessage(message.id);conversationsStore.sliceActiveMessages(messageIndex),conversationsStore.updateConversationTimestamp(),this.setChatLoading(activeConv.id,!0),this.clearChatStreaming(activeConv.id);const parentMessageId=conversationsStore.activeMessages.length>0?conversationsStore.activeMessages[conversationsStore.activeMessages.length-1].id:void 0,assistantMessage=await this.createAssistantMessage( -parentMessageId);conversationsStore.addMessageToActive(assistantMessage),await this.streamChatCompletion(conversationsStore.activeMessages.slice(0,-1),assistantMessage)}catch(error2){isAbortError(error2)||console.error("Failed to regenerate message:",error2),this.setChatLoading(activeConv?.id||"",!1)}}async regenerateMessageWithBranching(messageId,modelOverride){const activeConv=conversationsStore.activeConversation;if(!(!activeConv||this.isChatLoadingInternal(activeConv.id))){this.cancelPreEncode(); -try{const idx=conversationsStore.findMessageIndex(messageId);if(idx===-1)return;const msg=conversationsStore.activeMessages[idx];if(msg.role!==MessageRole.ASSISTANT)return;const allMessages=await conversationsStore.getConversationMessages(activeConv.id),parentMessage=findMessageById(allMessages,msg.parent);if(!parentMessage)return;this.setChatLoading(activeConv.id,!0),this.clearChatStreaming(activeConv.id);const newAssistantMessage=await DatabaseService.createMessageBranch({convId:msg.convId,type:msg. -type,timestamp:Date.now(),role:msg.role,content:"",toolCalls:"",children:[],model:null},parentMessage.id);await conversationsStore.updateCurrentNode(newAssistantMessage.id),conversationsStore.updateConversationTimestamp(),await conversationsStore.refreshActiveMessages();const conversationPath=filterByLeafNodeId(allMessages,parentMessage.id,!1),modelToUse=modelOverride||msg.model||void 0;await this.streamChatCompletion(conversationPath,newAssistantMessage,void 0,void 0,modelToUse)}catch(error2){isAbortError( -error2)||console.error("Failed to regenerate message with branching:",error2),this.setChatLoading(activeConv?.id||"",!1)}}}async getDeletionInfo(messageId){const activeConv=conversationsStore.activeConversation;if(!activeConv)return{totalCount:0,userMessages:0,assistantMessages:0,messageTypes:[]};const allMessages=await conversationsStore.getConversationMessages(activeConv.id);if(findMessageById(allMessages,messageId)?.role===MessageRole.SYSTEM){const messagesToDelete2=allMessages.filter(m=>m.id=== -messageId);let userMessages2=0,assistantMessages2=0;const messageTypes2=[];for(const msg of messagesToDelete2)msg.role===MessageRole.USER?(userMessages2++,messageTypes2.includes("user message")||messageTypes2.push("user message")):msg.role===MessageRole.ASSISTANT&&(assistantMessages2++,messageTypes2.includes("assistant response")||messageTypes2.push("assistant response"));return{totalCount:1,userMessages:userMessages2,assistantMessages:assistantMessages2,messageTypes:messageTypes2}}const descendants=findDescendantMessages( -allMessages,messageId),allToDelete=[messageId,...descendants],messagesToDelete=allMessages.filter(m=>allToDelete.includes(m.id));let userMessages=0,assistantMessages=0;const messageTypes=[];for(const msg of messagesToDelete)msg.role===MessageRole.USER?(userMessages++,messageTypes.includes("user message")||messageTypes.push("user message")):msg.role===MessageRole.ASSISTANT&&(assistantMessages++,messageTypes.includes("assistant response")||messageTypes.push("assistant response"));return{totalCount:allToDelete. -length,userMessages,assistantMessages,messageTypes}}async deleteMessage(messageId){const activeConv=conversationsStore.activeConversation;if(activeConv)try{const allMessages=await conversationsStore.getConversationMessages(activeConv.id),messageToDelete=findMessageById(allMessages,messageId);if(!messageToDelete)return;if(filterByLeafNodeId(allMessages,activeConv.currNode||"",!1).some(m=>m.id===messageId)&&messageToDelete.parent){const siblings2=allMessages.filter(m=>m.parent===messageToDelete.parent&& -m.id!==messageId);if(siblings2.length>0){const latestSibling=siblings2.reduce((latest,sibling2)=>sibling2.timestamp>latest.timestamp?sibling2:latest);await conversationsStore.updateCurrentNode(findLeafNode(allMessages,latestSibling.id))}else messageToDelete.parent&&await conversationsStore.updateCurrentNode(findLeafNode(allMessages,messageToDelete.parent))}await DatabaseService.deleteMessageCascading(activeConv.id,messageId),await conversationsStore.refreshActiveMessages(),conversationsStore.updateConversationTimestamp()}catch(error2){ -console.error("Failed to delete message:",error2)}}async continueAssistantMessage(messageId){const activeConv=conversationsStore.activeConversation;if(!activeConv||this.isChatLoadingInternal(activeConv.id))return;const result=this.getMessageByIdWithRole(messageId,MessageRole.ASSISTANT);if(!result)return;const{message:msg,index:idx}=result;try{this.showErrorDialog(null),this.setChatLoading(activeConv.id,!0),this.clearChatStreaming(activeConv.id);const allMessages=await conversationsStore.getConversationMessages( -activeConv.id),dbMessage=findMessageById(allMessages,messageId);if(!dbMessage){this.setChatLoading(activeConv.id,!1);return}const originalContent=dbMessage.content,originalReasoning=dbMessage.reasoningContent||"",contextWithContinue=[...conversationsStore.activeMessages.slice(0,idx),{role:MessageRole.ASSISTANT,content:originalContent}];let appendedContent="",appendedReasoning="",hasReceivedContent=!1;const updateStreamingContent=fullContent=>{this.setChatStreaming(msg.convId,fullContent,msg.id), -conversationsStore.updateMessageAtIndex(idx,{content:fullContent})},abortController=this.getOrCreateAbortController(msg.convId);await ChatService.sendMessage(contextWithContinue,{...this.getApiOptions(),onChunk:chunk=>{appendedContent+=chunk,hasReceivedContent=!0,updateStreamingContent(originalContent+appendedContent)},onReasoningChunk:chunk=>{appendedReasoning+=chunk,hasReceivedContent=!0,conversationsStore.updateMessageAtIndex(idx,{reasoningContent:originalReasoning+appendedReasoning})},onTimings:(timings,promptProgress)=>{ -const tokensPerSecond=timings?.predicted_ms&&timings?.predicted_n?timings.predicted_n/timings.predicted_ms*1e3:0;this.updateProcessingStateFromTimings({prompt_n:timings?.prompt_n||0,prompt_ms:timings?.prompt_ms,predicted_n:timings?.predicted_n||0,predicted_per_second:tokensPerSecond,cache_n:timings?.cache_n||0,prompt_progress:promptProgress},msg.convId)},onComplete:async(finalContent,reasoningContent,timings)=>{const finalAppendedContent=hasReceivedContent?appendedContent:finalContent||"",finalAppendedReasoning=hasReceivedContent? -appendedReasoning:reasoningContent||"",fullContent=originalContent+finalAppendedContent,fullReasoning=originalReasoning+finalAppendedReasoning||void 0;await DatabaseService.updateMessage(msg.id,{content:fullContent,reasoningContent:fullReasoning,timestamp:Date.now(),timings}),conversationsStore.updateMessageAtIndex(idx,{content:fullContent,reasoningContent:fullReasoning,timestamp:Date.now(),timings}),conversationsStore.updateConversationTimestamp(),this.setChatLoading(msg.convId,!1),this.clearChatStreaming( -msg.convId),this.setProcessingState(msg.convId,null)},onError:async error2=>{if(isAbortError(error2)){hasReceivedContent&&appendedContent&&(await DatabaseService.updateMessage(msg.id,{content:originalContent+appendedContent,reasoningContent:originalReasoning+appendedReasoning||void 0,timestamp:Date.now()}),conversationsStore.updateMessageAtIndex(idx,{content:originalContent+appendedContent,reasoningContent:originalReasoning+appendedReasoning||void 0,timestamp:Date.now()})),this.setChatLoading(msg. -convId,!1),this.clearChatStreaming(msg.convId),this.setProcessingState(msg.convId,null);return}console.error("Continue generation error:",error2),conversationsStore.updateMessageAtIndex(idx,{content:originalContent}),await DatabaseService.updateMessage(msg.id,{content:originalContent}),this.setChatLoading(msg.convId,!1),this.clearChatStreaming(msg.convId),this.setProcessingState(msg.convId,null),this.showErrorDialog({type:error2.name==="TimeoutError"?ErrorDialogType.TIMEOUT:ErrorDialogType.SERVER, -message:error2.message})}},msg.convId,abortController.signal)}catch(error2){isAbortError(error2)||console.error("Failed to continue message:",error2),activeConv&&this.setChatLoading(activeConv.id,!1)}}async editAssistantMessage(messageId,newContent,shouldBranch){const activeConv=conversationsStore.activeConversation;if(!activeConv||this.isChatLoadingInternal(activeConv.id))return;const result=this.getMessageByIdWithRole(messageId,MessageRole.ASSISTANT);if(!result)return;const{message:msg,index:idx}=result; -try{if(shouldBranch){const newMessage=await DatabaseService.createMessageBranch({convId:msg.convId,type:msg.type,timestamp:Date.now(),role:msg.role,content:newContent,toolCalls:msg.toolCalls||"",children:[],model:msg.model},msg.parent);await conversationsStore.updateCurrentNode(newMessage.id)}else await DatabaseService.updateMessage(msg.id,{content:newContent}),conversationsStore.updateMessageAtIndex(idx,{content:newContent});conversationsStore.updateConversationTimestamp(),await conversationsStore. -refreshActiveMessages()}catch(error2){console.error("Failed to edit assistant message:",error2)}}async editUserMessagePreserveResponses(messageId,newContent,newExtras){const activeConv=conversationsStore.activeConversation;if(!activeConv)return;const result=this.getMessageByIdWithRole(messageId,MessageRole.USER);if(!result)return;const{message:msg,index:idx}=result;try{const updateData={content:newContent};newExtras!==void 0&&(updateData.extra=JSON.parse(JSON.stringify(newExtras))),await DatabaseService. -updateMessage(messageId,updateData),conversationsStore.updateMessageAtIndex(idx,updateData);const rootMessage=(await conversationsStore.getConversationMessages(activeConv.id)).find(m=>m.type==="root"&&m.parent===null);rootMessage&&msg.parent===rootMessage.id&&newContent.trim()&&await conversationsStore.updateConversationTitleWithConfirmation(activeConv.id,generateConversationTitle(newContent,!!config$1().titleGenerationUseFirstLine)),conversationsStore.updateConversationTimestamp()}catch(error2){ -console.error("Failed to edit user message:",error2)}}async editMessageWithBranching(messageId,newContent,newExtras){const activeConv=conversationsStore.activeConversation;if(!activeConv||this.isChatLoadingInternal(activeConv.id))return;let result=this.getMessageByIdWithRole(messageId,MessageRole.USER);if(result||(result=this.getMessageByIdWithRole(messageId,MessageRole.SYSTEM)),!result)return;const{message:msg,index:idx}=result;try{const allMessages=await conversationsStore.getConversationMessages( -activeConv.id),rootMessage=allMessages.find(m=>m.type==="root"&&m.parent===null),isFirstUserMessage=msg.role===MessageRole.USER&&rootMessage&&msg.parent===rootMessage.id,extrasToUse=newExtras!==void 0?JSON.parse(JSON.stringify(newExtras)):msg.extra?JSON.parse(JSON.stringify(msg.extra)):void 0;let messageIdForResponse;const dbMsg=findMessageById(allMessages,msg.id);if(dbMsg?dbMsg.children.length>0:msg.children.length>0){const parentId=msg.parent||rootMessage?.id;if(!parentId)return;const newMessage=await DatabaseService. -createMessageBranch({convId:msg.convId,type:msg.type,timestamp:Date.now(),role:msg.role,content:newContent,toolCalls:msg.toolCalls||"",children:[],extra:extrasToUse,model:msg.model},parentId);await conversationsStore.updateCurrentNode(newMessage.id),messageIdForResponse=newMessage.id}else{const updates={content:newContent,timestamp:Date.now(),extra:extrasToUse};await DatabaseService.updateMessage(msg.id,updates),conversationsStore.updateMessageAtIndex(idx,updates),messageIdForResponse=msg.id}conversationsStore. -updateConversationTimestamp(),isFirstUserMessage&&newContent.trim()&&await conversationsStore.updateConversationTitleWithConfirmation(activeConv.id,generateConversationTitle(newContent,!!config$1().titleGenerationUseFirstLine)),await conversationsStore.refreshActiveMessages(),msg.role===MessageRole.USER&&await this.generateResponseForMessage(messageIdForResponse)}catch(error2){console.error("Failed to edit message with branching:",error2)}}async generateResponseForMessage(userMessageId){const activeConv=conversationsStore. -activeConversation;if(activeConv){this.showErrorDialog(null),this.setChatLoading(activeConv.id,!0),this.clearChatStreaming(activeConv.id);try{const allMessages=await conversationsStore.getConversationMessages(activeConv.id),conversationPath=filterByLeafNodeId(allMessages,userMessageId,!1),assistantMessage=await DatabaseService.createMessageBranch({convId:activeConv.id,type:MessageType.TEXT,timestamp:Date.now(),role:MessageRole.ASSISTANT,content:"",toolCalls:"",children:[],model:null},userMessageId); -conversationsStore.addMessageToActive(assistantMessage),await this.streamChatCompletion(conversationPath,assistantMessage)}catch(error2){console.error("Failed to generate response:",error2),this.setChatLoading(activeConv.id,!1)}}}getContextTotal(){const activeConvId=this.activeConversationId,activeState=activeConvId?this.getProcessingState(activeConvId):null;if(activeState&&typeof activeState.contextTotal=="number"&&activeState.contextTotal>0)return activeState.contextTotal;if(isRouterMode()){const modelContextSize=selectedModelContextSize(); -if(typeof modelContextSize=="number"&&modelContextSize>0)return modelContextSize}else{const propsContextSize=contextSize();if(typeof propsContextSize=="number"&&propsContextSize>0)return propsContextSize}return null}updateProcessingStateFromTimings(timingData,conversationId){const processingState=this.parseTimingData(timingData);if(processingState===null){console.warn("Failed to parse timing data - skipping update");return}const targetId=conversationId||this.activeConversationId;targetId&&this.setProcessingState( -targetId,processingState)}parseTimingData(timingData){const promptTokens=timingData.prompt_n||0,promptMs=timingData.prompt_ms||void 0,predictedTokens=timingData.predicted_n||0,tokensPerSecond=timingData.predicted_per_second||0,cacheTokens=timingData.cache_n||0,promptProgress=timingData.prompt_progress,contextTotal=this.getContextTotal(),currentConfig=config$1(),outputTokensMax=currentConfig.max_tokens||-1,contextUsed=promptTokens+cacheTokens+predictedTokens,outputTokensUsed=predictedTokens,progressCache=promptProgress?. -cache||0,progressActualDone=(promptProgress?.processed??0)-progressCache,progressActualTotal=(promptProgress?.total??0)-progressCache,progressPercent=promptProgress?Math.round(progressActualDone/progressActualTotal*100):void 0;return{status:predictedTokens>0?"generating":promptProgress?"preparing":"idle",tokensDecoded:predictedTokens,tokensRemaining:outputTokensMax-predictedTokens,contextUsed,contextTotal,outputTokensUsed,outputTokensMax,hasNextToken:predictedTokens>0,tokensPerSecond,temperature:currentConfig. -temperature??.8,topP:currentConfig.top_p??.95,speculative:!1,progressPercent,promptProgress,promptTokens,promptMs,cacheTokens}}restoreProcessingStateFromMessages(messages,conversationId){for(let i=messages.length-1;i>=0;i--){const message=messages[i];if(message.role===MessageRole.ASSISTANT&&message.timings){const restoredState=this.parseTimingData({prompt_n:message.timings.prompt_n||0,prompt_ms:message.timings.prompt_ms,predicted_n:message.timings.predicted_n||0,predicted_per_second:message.timings. -predicted_n&&message.timings.predicted_ms?message.timings.predicted_n/message.timings.predicted_ms*1e3:0,cache_n:message.timings.cache_n||0});if(restoredState){this.setProcessingState(conversationId,restoredState);return}}}}getConversationModel(messages){for(let i=messages.length-1;i>=0;i--){const message=messages[i];if(message.role===MessageRole.ASSISTANT&&message.model)return message.model}return null}getApiOptions(){const currentConfig=config$1(),hasValue=value=>value!=null&&value!=="",apiOptions={ -stream:!0,timings_per_token:!0};if(isRouterMode()){const modelName=selectedModelName();modelName&&(apiOptions.model=modelName)}return currentConfig.systemMessage&&(apiOptions.systemMessage=currentConfig.systemMessage),currentConfig.disableReasoningParsing&&(apiOptions.disableReasoningParsing=!0),currentConfig.excludeReasoningFromContext&&(apiOptions.excludeReasoningFromContext=!0),hasValue(currentConfig.temperature)&&(apiOptions.temperature=Number(currentConfig.temperature)),hasValue(currentConfig. -max_tokens)&&(apiOptions.max_tokens=Number(currentConfig.max_tokens)),hasValue(currentConfig.dynatemp_range)&&(apiOptions.dynatemp_range=Number(currentConfig.dynatemp_range)),hasValue(currentConfig.dynatemp_exponent)&&(apiOptions.dynatemp_exponent=Number(currentConfig.dynatemp_exponent)),hasValue(currentConfig.top_k)&&(apiOptions.top_k=Number(currentConfig.top_k)),hasValue(currentConfig.top_p)&&(apiOptions.top_p=Number(currentConfig.top_p)),hasValue(currentConfig.min_p)&&(apiOptions.min_p=Number( -currentConfig.min_p)),hasValue(currentConfig.xtc_probability)&&(apiOptions.xtc_probability=Number(currentConfig.xtc_probability)),hasValue(currentConfig.xtc_threshold)&&(apiOptions.xtc_threshold=Number(currentConfig.xtc_threshold)),hasValue(currentConfig.typ_p)&&(apiOptions.typ_p=Number(currentConfig.typ_p)),hasValue(currentConfig.repeat_last_n)&&(apiOptions.repeat_last_n=Number(currentConfig.repeat_last_n)),hasValue(currentConfig.repeat_penalty)&&(apiOptions.repeat_penalty=Number(currentConfig. -repeat_penalty)),hasValue(currentConfig.presence_penalty)&&(apiOptions.presence_penalty=Number(currentConfig.presence_penalty)),hasValue(currentConfig.frequency_penalty)&&(apiOptions.frequency_penalty=Number(currentConfig.frequency_penalty)),hasValue(currentConfig.dry_multiplier)&&(apiOptions.dry_multiplier=Number(currentConfig.dry_multiplier)),hasValue(currentConfig.dry_base)&&(apiOptions.dry_base=Number(currentConfig.dry_base)),hasValue(currentConfig.dry_allowed_length)&&(apiOptions.dry_allowed_length= -Number(currentConfig.dry_allowed_length)),hasValue(currentConfig.dry_penalty_last_n)&&(apiOptions.dry_penalty_last_n=Number(currentConfig.dry_penalty_last_n)),currentConfig.samplers&&(apiOptions.samplers=currentConfig.samplers),apiOptions.backend_sampling=currentConfig.backend_sampling,currentConfig.custom&&(apiOptions.custom=currentConfig.custom),apiOptions}cancelPreEncode(){this.preEncodeAbortController&&(this.preEncodeAbortController.abort(),this.preEncodeAbortController=null)}async triggerPreEncode(allMessages,assistantMessage,assistantContent,model,excludeReasoning){ -this.cancelPreEncode(),this.preEncodeAbortController=new AbortController;const signal=this.preEncodeAbortController.signal;try{if(!await ChatService.areAllSlotsIdle(model,signal)||signal.aborted)return;const messagesWithAssistant=[...allMessages,{...assistantMessage,content:assistantContent}];await ChatService.preEncode(messagesWithAssistant,model,excludeReasoning,signal)}catch(err){isAbortError(err)||console.warn("[ChatStore] Pre-encode failed:",err)}}}const chatStore=new ChatStore,activeProcessingState=()=>chatStore. -activeProcessingState,errorDialog=()=>chatStore.errorDialogState,getAddFilesHandler=()=>chatStore.getAddFilesHandler(),getAllLoadingChats=()=>chatStore.getAllLoadingChats(),isChatStreaming=()=>chatStore.isStreaming(),isEditing=()=>chatStore.isEditing(),isLoading=()=>chatStore.isLoading,pendingEditMessageId=()=>chatStore.pendingEditMessageId,chatPendingMessageContent=convId=>chatStore.pendingMessageContent(convId),chatPendingMessageExtras=convId=>chatStore.pendingMessageExtras(convId),chatClearPendingMessage=convId=>chatStore. -clearPendingMessage(convId),chatInjectPendingMessage=(convId,content2,extras)=>chatStore.injectPendingMessage(convId,content2,extras);var root$1u=from_html('
',1);function ChatForm($$anchor,$$props){push$1($$props,!0);let attachments=prop($$props,"attachments",19,()=>[]),className=prop( -$$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),isLoading2=prop($$props,"isLoading",3,!1),placeholder=prop($$props,"placeholder",3,"Type a message..."),showMcpPromptButton=prop($$props,"showMcpPromptButton",3,!1),showAddButton=prop($$props,"showAddButton",3,!0),showModelSelector=prop($$props,"showModelSelector",3,!0),uploadedFiles=prop($$props,"uploadedFiles",31,()=>proxy([])),value=prop($$props,"value",15,""),audioRecorder,chatFormActionsRef=state$1(void 0),fileInputRef=state$1(void 0), -pickersRef=state$1(void 0),textareaRef=state$1(void 0),isRecording=state$1(!1),recordingSupported=state$1(!1),isPromptPickerOpen=state$1(!1),promptSearchQuery=state$1(""),isInlineResourcePickerOpen=state$1(!1),resourceSearchQuery=state$1(""),isResourceDialogOpen=state$1(!1),preSelectedResourceUri=state$1(void 0),currentConfig=user_derived(config$1),pasteLongTextToFileLength=user_derived(()=>{const n=Number(get$3(currentConfig).pasteLongTextToFileLen);return Number.isNaN(n)?Number(SETTING_CONFIG_DEFAULT. -pasteLongTextToFileLen):n}),isRouter=user_derived(isRouterMode),conversationModel=user_derived(()=>chatStore.getConversationModel(activeMessages())),activeModelId=user_derived(()=>{const options=modelOptions();if(!get$3(isRouter))return options.length>0?options[0].model:null;const selectedId=selectedModelId();if(selectedId){const model=options.find(m=>m.id===selectedId);if(model)return model.model}if(get$3(conversationModel)){const model=options.find(m=>m.model===get$3(conversationModel));if(model) -return model.model}return null}),hasModelSelected=user_derived(()=>!get$3(isRouter)||!!get$3(conversationModel)||!!selectedModelId()),hasLoadingAttachments=user_derived(()=>uploadedFiles().some(f=>f.isLoading)),hasAttachments=user_derived(()=>attachments()&&attachments().length>0||uploadedFiles()&&uploadedFiles().length>0),canSubmit=user_derived(()=>value().trim().length>0||get$3(hasAttachments));onMount$1(()=>{set$1(recordingSupported,isAudioRecordingSupported(),!0),audioRecorder=new AudioRecorder}); -function focus2(){get$3(textareaRef)?.focus()}function resetTextareaHeight(){get$3(textareaRef)?.resetHeight()}function openModelSelector(){get$3(chatFormActionsRef)?.openModelSelector()}function checkModelSelected(){return get$3(hasModelSelected)?!0:(get$3(chatFormActionsRef)?.openModelSelector(),!1)}function handleFileSelect(files){$$props.onFilesAdd?.(files)}function handleFileUpload(){get$3(fileInputRef)?.click()}function handleFileRemove(fileId){if(fileId.startsWith("attachment-")){const index2=parseInt( -fileId.replace("attachment-",""),10);!isNaN(index2)&&index2>=0&&index2item.kind==="file").map(item=>item.getAsFile()).filter(file=>file!==null);if(files.length>0){event2.preventDefault(),$$props.onFilesAdd?.(files);return}const text2=event2.clipboardData.getData(MimeTypeText.PLAIN);if(text2.startsWith(CLIPBOARD_CONTENT_QUOTE_PREFIX)){const parsed=parseClipboardContent(text2);if(parsed.textAttachments.length>0||parsed. -mcpPromptAttachments.length>0){if(event2.preventDefault(),value(parsed.message),$$props.onValueChange?.(parsed.message),parsed.textAttachments.length>0){const attachmentFiles=parsed.textAttachments.map(att=>new File([att.content],att.name,{type:MimeTypeText.PLAIN}));$$props.onFilesAdd?.(attachmentFiles)}if(parsed.mcpPromptAttachments.length>0){const mcpPromptFiles=parsed.mcpPromptAttachments.map(att=>({id:uuid$1(),name:att.name,size:att.content.length,type:SpecialFileType.MCP_PROMPT,file:new File( -[att.content],`${att.name}${FileExtensionText.TXT}`,{type:MimeTypeText.PLAIN}),isLoading:!1,textContent:att.content,mcpPrompt:{serverName:att.serverName,promptName:att.promptName,arguments:att.arguments}}));uploadedFiles([...uploadedFiles(),...mcpPromptFiles]),$$props.onUploadedFilesChange?.(uploadedFiles())}setTimeout(()=>{get$3(textareaRef)?.focus()},10);return}}if(text2.length>0&&get$3(pasteLongTextToFileLength)>0&&text2.length>get$3(pasteLongTextToFileLength)){event2.preventDefault();const textFile=new File( -[text2],"Pasted",{type:MimeTypeText.PLAIN});$$props.onFilesAdd?.([textFile])}}function handlePromptLoadStart(placeholderId,promptInfo,args){value().startsWith(PROMPT_TRIGGER_PREFIX)&&(value(""),$$props.onValueChange?.("")),set$1(isPromptPickerOpen,!1),set$1(promptSearchQuery,"");const promptName=promptInfo.title||promptInfo.name,placeholder2={id:placeholderId,name:promptName,size:INITIAL_FILE_SIZE,type:SpecialFileType.MCP_PROMPT,file:new File([],"loading"),isLoading:!0,mcpPrompt:{serverName:promptInfo. -serverName,promptName:promptInfo.name,arguments:args?{...args}:void 0}};uploadedFiles([...uploadedFiles(),placeholder2]),$$props.onUploadedFilesChange?.(uploadedFiles()),get$3(textareaRef)?.focus()}function handlePromptLoadComplete(placeholderId,result){const promptText=result.messages?.map(msg=>typeof msg.content=="string"?msg.content:msg.content.type===ContentPartType.TEXT?msg.content.text:"").filter(Boolean).join(PROMPT_CONTENT_SEPARATOR);uploadedFiles(uploadedFiles().map(f=>f.id===placeholderId? -{...f,isLoading:!1,textContent:promptText,size:promptText.length,file:new File([promptText],`${f.name}${FileExtensionText.TXT}`,{type:MimeTypeText.PLAIN})}:f)),$$props.onUploadedFilesChange?.(uploadedFiles())}function handlePromptLoadError(placeholderId,error2){uploadedFiles(uploadedFiles().map(f=>f.id===placeholderId?{...f,isLoading:!1,loadError:error2}:f)),$$props.onUploadedFilesChange?.(uploadedFiles())}function handlePromptPickerClose(){set$1(isPromptPickerOpen,!1),set$1(promptSearchQuery,""), -get$3(textareaRef)?.focus()}function handleInlineResourcePickerClose(){set$1(isInlineResourcePickerOpen,!1),set$1(resourceSearchQuery,""),get$3(textareaRef)?.focus()}function handleInlineResourceSelect(){value().startsWith(RESOURCE_TRIGGER_PREFIX)&&(value(""),$$props.onValueChange?.("")),set$1(isInlineResourcePickerOpen,!1),set$1(resourceSearchQuery,""),get$3(textareaRef)?.focus()}function handleBrowseResources(){set$1(isInlineResourcePickerOpen,!1),set$1(resourceSearchQuery,""),value().startsWith( -RESOURCE_TRIGGER_PREFIX)&&(value(""),$$props.onValueChange?.("")),set$1(isResourceDialogOpen,!0)}async function handleMicClick(){if(!audioRecorder||!get$3(recordingSupported)){console.warn("Audio recording not supported");return}if(get$3(isRecording)){set$1(isRecording,!1);try{const audioBlob=await audioRecorder.stopRecording(),wavBlob=await convertToWav(audioBlob),audioFile=createAudioFile(wavBlob);$$props.onFilesAdd?.([audioFile])}catch(error2){console.error("Failed to stop recording:",error2)}}else -try{await audioRecorder.startRecording(),set$1(isRecording,!0)}catch(error2){console.error("Failed to start recording:",error2)}}var $$exports={focus:focus2,resetTextareaHeight,openModelSelector,checkModelSelected},fragment=root$1u(),node2=first_child(fragment);bind_this(ChatFormFileInputInvisible(node2,{onFileSelect:handleFileSelect}),$$value=>set$1(fileInputRef,$$value,!0),()=>get$3(fileInputRef));var form=sibling(node2,2),node_1=child(form);bind_this(ChatFormPickers(node_1,{get isPromptPickerOpen(){ -return get$3(isPromptPickerOpen)},get promptSearchQuery(){return get$3(promptSearchQuery)},get isInlineResourcePickerOpen(){return get$3(isInlineResourcePickerOpen)},get resourceSearchQuery(){return get$3(resourceSearchQuery)},onPromptPickerClose:handlePromptPickerClose,onInlineResourcePickerClose:handleInlineResourcePickerClose,onInlineResourceSelect:handleInlineResourceSelect,onPromptLoadStart:handlePromptLoadStart,onPromptLoadComplete:handlePromptLoadComplete,onPromptLoadError:handlePromptLoadError, -onInlineResourceBrowse:handleBrowseResources}),$$value=>set$1(pickersRef,$$value,!0),()=>get$3(pickersRef));var div=sibling(node_1,2),node_2=child(div);{let $0=user_derived(()=>get$3(activeModelId)??void 0);ChatAttachmentsList(node_2,{get attachments(){return attachments()},onFileRemove:handleFileRemove,limitToSingleRow:!0,class:"py-5",style:"scroll-padding: 1rem;",get activeModelId(){return get$3($0)},get uploadedFiles(){return uploadedFiles()},set uploadedFiles($$value){uploadedFiles($$value)}})} -var div_1=sibling(node_2,2),node_3=child(div_1);bind_this(ChatFormTextarea(node_3,{class:"px-5 py-1.5 md:pt-0",onKeydown:handleKeydown,onInput:()=>{handleInput(),$$props.onValueChange?.(value())},get disabled(){return disabled()},get placeholder(){return placeholder()},get value(){return value()},set value($$value){value($$value)}}),$$value=>set$1(textareaRef,$$value,!0),()=>get$3(textareaRef));var node_4=sibling(node_3,2);{var consequent=$$anchor2=>{ChatFormMcpResourcesList($$anchor2,{class:"mb\ --3",onResourceClick:uri2=>{set$1(preSelectedResourceUri,uri2,!0),set$1(isResourceDialogOpen,!0)}})},d2=user_derived(()=>mcpHasResourceAttachments());if_block(node_4,$$render=>{get$3(d2)&&$$render(consequent)})}var node_5=sibling(node_4,2);{let $0=user_derived(()=>showMcpPromptButton()?()=>set$1(isPromptPickerOpen,!0):void 0);bind_this(ChatFormActions(node_5,{class:"px-3",get canSend(){return get$3(canSubmit)},get disabled(){return disabled()},get isLoading(){return isLoading2()},get isRecording(){ -return get$3(isRecording)},get showAddButton(){return showAddButton()},get showModelSelector(){return showModelSelector()},get uploadedFiles(){return uploadedFiles()},onFileUpload:handleFileUpload,onMicClick:handleMicClick,get onStop(){return $$props.onStop},onSystemPromptClick:()=>$$props.onSystemPromptClick?.({message:value(),files:uploadedFiles()}),get onMcpPromptClick(){return get$3($0)},onMcpResourcesClick:()=>set$1(isResourceDialogOpen,!0)}),$$value=>set$1(chatFormActionsRef,$$value,!0),()=>get$3( -chatFormActionsRef))}reset(div_1),reset(div),reset(form);var node_6=sibling(form,2);return DialogMcpResourcesBrowser(node_6,{get preSelectedUri(){return get$3(preSelectedResourceUri)},onAttach:resource=>{mcpStore.attachResource(resource.uri)},onOpenChange:newOpen=>{newOpen||set$1(preSelectedResourceUri,void 0)},get open(){return get$3(isResourceDialogOpen)},set open($$value){set$1(isResourceDialogOpen,$$value,!0)}}),template_effect(()=>{set_class(form,1,`relative ${className()??""}`),set_class(div, -1,`${INPUT_CLASSES??""} overflow-hidden rounded-3xl backdrop-blur-md ${disabled()?"cursor-not-allowed opacity-60":""}`)}),event("submit",form,event2=>{event2.preventDefault(),!(!get$3(canSubmit)||disabled()||get$3(hasLoadingAttachments))&&$$props.onSubmit?.()}),event("paste",div_1,handlePaste),append($$anchor,fragment),pop($$exports)}function Dropdown_menu_content($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),sideOffset=prop($$props,"sideOffset",3,4),restProps=rest_props( -$$props,["$$slots","$$events","$$legacy","ref","sideOffset","portalProps","class"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Portal$2,($$anchor2,DropdownMenuPrimitive_Portal)=>{DropdownMenuPrimitive_Portal($$anchor2,spread_props(()=>$$props.portalProps,{children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>cn$1("z-50 max-h-(--bits-dropdown-menu-content-available-height) min-w-[8rem] origin-(--bits-dro\ -pdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover p-1.5 text-popover-foreground shadow-md outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=op\ -en]:fade-in-0 data-[state=open]:zoom-in-95 dark:border-border/20",$$props.class));component(node_1,()=>Dropdown_menu_content$1,($$anchor4,DropdownMenuPrimitive_Content)=>{DropdownMenuPrimitive_Content($$anchor4,spread_props({"data-slot":"dropdown-menu-content",get sideOffset(){return sideOffset()},get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor3,fragment_1)},$$slots:{default:!0}}))}),append($$anchor,fragment),pop()}function Dropdown_menu_item($$anchor,$$props){ -push$1($$props,!0);let ref2=prop($$props,"ref",15,null),variant=prop($$props,"variant",3,"default"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","inset","variant"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disab\ -led]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:data-highlighted:text-destructive dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:!text-destructive",$$props.class));component(node2,()=>Menu_item, -($$anchor2,DropdownMenuPrimitive_Item)=>{DropdownMenuPrimitive_Item($$anchor2,spread_props({"data-slot":"dropdown-menu-item",get"data-inset"(){return $$props.inset},get"data-variant"(){return variant()},get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}function Dropdown_menu_separator($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events", -"$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("-mx-1 my-1 h-px bg-border/20",$$props.class));component(node2,()=>Menu_separator,($$anchor2,DropdownMenuPrimitive_Separator)=>{DropdownMenuPrimitive_Separator($$anchor2,spread_props({"data-slot":"dropdown-menu-separator",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}function Dropdown_menu_trigger($$anchor,$$props){ -push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Menu_trigger,($$anchor2,DropdownMenuPrimitive_Trigger)=>{DropdownMenuPrimitive_Trigger($$anchor2,spread_props({"data-slot":"dropdown-menu-trigger"},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))}),append($$anchor,fragment),pop()}function Dropdown_menu_sub_content($$anchor,$$props){ -push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("z-50 max-h-(--bits-dropdown-menu-content-available-height) min-w-[8rem] origin-(--bits-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover p-1.5 text-popover-foreground shadow-md outline-none data-[side=bottom]:slide-\ -in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 dark:border-border/20",$$props.class));component(node2,()=>Menu_sub_content,($$anchor2,DropdownMenuPrimitive_SubContent)=>{DropdownMenuPrimitive_SubContent( -$$anchor2,spread_props({"data-slot":"dropdown-menu-sub-content",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}var root_1$P=from_html(" ",1);function Dropdown_menu_sub_trigger($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","inset","children"]);var fragment=comment$2(),node2=first_child(fragment);{ -let $0=user_derived(()=>cn$1("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",$$props.class));component( -node2,()=>Menu_sub_trigger,($$anchor2,DropdownMenuPrimitive_SubTrigger)=>{DropdownMenuPrimitive_SubTrigger($$anchor2,spread_props({"data-slot":"dropdown-menu-sub-trigger",get"data-inset"(){return $$props.inset},get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$P(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.children??noop$3);var node_2=sibling(node_1,2);Chevron_right(node_2, -{class:"ml-auto size-4"}),append($$anchor3,fragment_1)},$$slots:{default:!0}}))})}append($$anchor,fragment),pop()}const Sub=Menu_sub,Root$4=Menu;function useAttachmentMenu(getFlags,getCallbacks,close2){const modalityFlags=user_derived(getFlags),callbacks=user_derived(()=>{const cbs=getCallbacks(),wrap2=fn=>()=>{close2(),fn?.()};return{[AttachmentAction.FILE_UPLOAD]:wrap2(cbs.onFileUpload),[AttachmentAction.SYSTEM_PROMPT_CLICK]:wrap2(cbs.onSystemPromptClick),[AttachmentAction.MCP_PROMPT_CLICK]:wrap2( -cbs.onMcpPromptClick),[AttachmentAction.MCP_RESOURCES_CLICK]:wrap2(cbs.onMcpResourcesClick)}});function isItemEnabled(enabledWhen){return!enabledWhen||enabledWhen==="always"?!0:!!get$3(modalityFlags)[enabledWhen]}function isItemVisible(visibleWhen){return visibleWhen?!!get$3(modalityFlags)[visibleWhen]:!0}function getSystemMessageTooltip(){return page$1.params.id?"Inject custom system message at the beginning of the conversation":"Add custom system message for a new conversation"}return{get callbacks(){ -return get$3(callbacks)},isItemEnabled,isItemVisible,getSystemMessageTooltip}}var root_6$s=from_html(" ",1),root_10$f=from_html(" ",1),root_11$e=from_html("

"),root_8$r=from_html(" ",1),root_16$6=from_html(" ",1),root_17$8=from_html("

PDFs will be converted to text. Image-based PDFs may not work properly.

"),root_13$d=from_html(" ",1),root_22$2=from_html(" ",1),root_23$5=from_html("

"),root_20$5=from_html( -" ",1),root_26$2=from_html(" ",1),root_3$S=from_html(" ",1),root_1$O=from_html(" ",1),root$1t=from_html("
");function ChatFormActionAddDropdown($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),hasAudioModality=prop($$props,"hasAudioModality",3,!1),hasVisionModality=prop($$props,"hasVisionModality",3,!1),hasMcpPromptsSupport=prop($$props,"hasMcpPromptsSupport",3, -!1),hasMcpResourcesSupport=prop($$props,"hasMcpResourcesSupport",3,!1),dropdownOpen=state$1(!1);function handleMcpSettingsClick(){set$1(dropdownOpen,!1),$$props.onMcpSettingsClick?.()}const attachmentMenu=useAttachmentMenu(()=>({hasVisionModality:hasVisionModality(),hasAudioModality:hasAudioModality(),hasMcpPromptsSupport:hasMcpPromptsSupport(),hasMcpResourcesSupport:hasMcpResourcesSupport()}),()=>({onFileUpload:$$props.onFileUpload,onSystemPromptClick:$$props.onSystemPromptClick,onMcpPromptClick:$$props. -onMcpPromptClick,onMcpResourcesClick:$$props.onMcpResourcesClick}),()=>{set$1(dropdownOpen,!1)});var div=root$1t(),node2=child(div);component(node2,()=>Root$4,($$anchor2,DropdownMenu_Root)=>{DropdownMenu_Root($$anchor2,{get open(){return get$3(dropdownOpen)},set open($$value){set$1(dropdownOpen,$$value,!0)},children:($$anchor3,$$slotProps)=>{var fragment=root_1$O(),node_1=first_child(fragment);component(node_1,()=>Dropdown_menu_trigger,($$anchor4,DropdownMenu_Trigger)=>{DropdownMenu_Trigger($$anchor4, -{name:"Attach files",get disabled(){return disabled()},children:($$anchor5,$$slotProps2)=>{var fragment_1=comment$2(),node_2=first_child(fragment_1);snippet(node_2,()=>$$props.trigger,()=>({disabled:disabled()})),append($$anchor5,fragment_1)},$$slots:{default:!0}})});var node_3=sibling(node_1,2);component(node_3,()=>Dropdown_menu_content,($$anchor4,DropdownMenu_Content)=>{DropdownMenu_Content($$anchor4,{align:"start",class:"w-48",children:($$anchor5,$$slotProps2)=>{var fragment_2=root_3$S(),node_4=first_child( -fragment_2);each(node_4,17,()=>ATTACHMENT_FILE_ITEMS,item=>item.id,($$anchor6,item)=>{const enabled=user_derived(()=>attachmentMenu.isItemEnabled(get$3(item).enabledWhen));var fragment_3=comment$2(),node_5=first_child(fragment_3);{var consequent=$$anchor7=>{var fragment_4=comment$2(),node_6=first_child(fragment_4);{let $0=user_derived(()=>get$3(item).class??"");component(node_6,()=>Dropdown_menu_item,($$anchor8,DropdownMenu_Item)=>{DropdownMenu_Item($$anchor8,{get class(){return`${get$3($0)??""}\ - flex cursor-pointer items-center gap-2`},onclick:()=>attachmentMenu.callbacks[get$3(item).action](),children:($$anchor9,$$slotProps3)=>{var fragment_5=root_6$s(),node_7=first_child(fragment_5);component(node_7,()=>get$3(item).icon,($$anchor10,item_icon)=>{item_icon($$anchor10,{class:"h-4 w-4"})});var span=sibling(node_7,2),text2=child(span,!0);reset(span),template_effect(()=>set_text(text2,get$3(item).label)),append($$anchor9,fragment_5)},$$slots:{default:!0}})})}append($$anchor7,fragment_4)},consequent_1=$$anchor7=>{ -var fragment_6=comment$2(),node_8=first_child(fragment_6);component(node_8,()=>Root$5,($$anchor8,Tooltip_Root)=>{Tooltip_Root($$anchor8,{get delayDuration(){return TOOLTIP_DELAY_DURATION},children:($$anchor9,$$slotProps3)=>{var fragment_7=root_8$r(),node_9=first_child(fragment_7);component(node_9,()=>Tooltip_trigger,($$anchor10,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor10,{class:"w-full",children:($$anchor11,$$slotProps4)=>{var fragment_8=comment$2(),node_10=first_child(fragment_8);{let $0=user_derived( -()=>get$3(item).class??"");component(node_10,()=>Dropdown_menu_item,($$anchor12,DropdownMenu_Item_1)=>{DropdownMenu_Item_1($$anchor12,{get class(){return`${get$3($0)??""} flex cursor-pointer items-center gap-2`},disabled:!0,children:($$anchor13,$$slotProps5)=>{var fragment_9=root_10$f(),node_11=first_child(fragment_9);component(node_11,()=>get$3(item).icon,($$anchor14,item_icon_1)=>{item_icon_1($$anchor14,{class:"h-4 w-4"})});var span_1=sibling(node_11,2),text_1=child(span_1,!0);reset(span_1),template_effect( -()=>set_text(text_1,get$3(item).label)),append($$anchor13,fragment_9)},$$slots:{default:!0}})})}append($$anchor11,fragment_8)},$$slots:{default:!0}})});var node_12=sibling(node_9,2);component(node_12,()=>Tooltip_content,($$anchor10,Tooltip_Content)=>{Tooltip_Content($$anchor10,{side:"right",children:($$anchor11,$$slotProps4)=>{var p2=root_11$e(),text_2=child(p2,!0);reset(p2),template_effect(()=>set_text(text_2,get$3(item).disabledTooltip)),append($$anchor11,p2)},$$slots:{default:!0}})}),append($$anchor9, -fragment_7)},$$slots:{default:!0}})}),append($$anchor7,fragment_6)};if_block(node_5,$$render=>{get$3(enabled)?$$render(consequent):get$3(item).disabledTooltip&&$$render(consequent_1,1)})}append($$anchor6,fragment_3)});var node_13=sibling(node_4,2);{var consequent_3=$$anchor6=>{var fragment_10=comment$2(),node_14=first_child(fragment_10);component(node_14,()=>Root$5,($$anchor7,Tooltip_Root_1)=>{Tooltip_Root_1($$anchor7,{get delayDuration(){return TOOLTIP_DELAY_DURATION},children:($$anchor8,$$slotProps3)=>{ -var fragment_11=root_13$d(),node_15=first_child(fragment_11);component(node_15,()=>Tooltip_trigger,($$anchor9,Tooltip_Trigger_1)=>{Tooltip_Trigger_1($$anchor9,{class:"w-full",children:($$anchor10,$$slotProps4)=>{var fragment_12=comment$2(),node_16=first_child(fragment_12);component(node_16,()=>Dropdown_menu_item,($$anchor11,DropdownMenu_Item_2)=>{DropdownMenu_Item_2($$anchor11,{class:"flex cursor-pointer items-center gap-2",get onclick(){return attachmentMenu.callbacks.onFileUpload},children:($$anchor12,$$slotProps5)=>{ -const pdfItem=user_derived(()=>ATTACHMENT_FILE_ITEMS.find(i=>i.id===AttachmentMenuItemId.PDF));var fragment_13=comment$2(),node_17=first_child(fragment_13);{var consequent_2=$$anchor13=>{var fragment_14=root_16$6(),node_18=first_child(fragment_14);component(node_18,()=>get$3(pdfItem).icon,($$anchor14,pdfItem_icon)=>{pdfItem_icon($$anchor14,{class:"h-4 w-4"})});var span_2=sibling(node_18,2),text_3=child(span_2,!0);reset(span_2),template_effect(()=>set_text(text_3,get$3(pdfItem).label)),append($$anchor13, -fragment_14)};if_block(node_17,$$render=>{get$3(pdfItem)&&$$render(consequent_2)})}append($$anchor12,fragment_13)},$$slots:{default:!0}})}),append($$anchor10,fragment_12)},$$slots:{default:!0}})});var node_19=sibling(node_15,2);component(node_19,()=>Tooltip_content,($$anchor9,Tooltip_Content_1)=>{Tooltip_Content_1($$anchor9,{side:"right",children:($$anchor10,$$slotProps4)=>{var p_1=root_17$8();append($$anchor10,p_1)},$$slots:{default:!0}})}),append($$anchor8,fragment_11)},$$slots:{default:!0}})}), -append($$anchor6,fragment_10)},d2=user_derived(()=>!attachmentMenu.isItemEnabled("hasVisionModality"));if_block(node_13,$$render=>{get$3(d2)&&$$render(consequent_3)})}var node_20=sibling(node_13,2);component(node_20,()=>Dropdown_menu_separator,($$anchor6,DropdownMenu_Separator)=>{DropdownMenu_Separator($$anchor6,{})});var node_21=sibling(node_20,2);each(node_21,17,()=>ATTACHMENT_EXTRA_ITEMS,item=>item.id,($$anchor6,item)=>{var fragment_15=comment$2(),node_22=first_child(fragment_15);{var consequent_4=$$anchor7=>{ -var fragment_16=comment$2(),node_23=first_child(fragment_16);component(node_23,()=>Root$5,($$anchor8,Tooltip_Root_2)=>{Tooltip_Root_2($$anchor8,{get delayDuration(){return TOOLTIP_DELAY_DURATION},children:($$anchor9,$$slotProps3)=>{var fragment_17=root_20$5(),node_24=first_child(fragment_17);component(node_24,()=>Tooltip_trigger,($$anchor10,Tooltip_Trigger_2)=>{Tooltip_Trigger_2($$anchor10,{class:"w-full",children:($$anchor11,$$slotProps4)=>{var fragment_18=comment$2(),node_25=first_child(fragment_18); -component(node_25,()=>Dropdown_menu_item,($$anchor12,DropdownMenu_Item_3)=>{DropdownMenu_Item_3($$anchor12,{class:"flex cursor-pointer items-center gap-2",onclick:()=>attachmentMenu.callbacks[get$3(item).action](),children:($$anchor13,$$slotProps5)=>{var fragment_19=root_22$2(),node_26=first_child(fragment_19);component(node_26,()=>get$3(item).icon,($$anchor14,item_icon_2)=>{item_icon_2($$anchor14,{class:"h-4 w-4"})});var span_3=sibling(node_26,2),text_4=child(span_3,!0);reset(span_3),template_effect( -()=>set_text(text_4,get$3(item).label)),append($$anchor13,fragment_19)},$$slots:{default:!0}})}),append($$anchor11,fragment_18)},$$slots:{default:!0}})});var node_27=sibling(node_24,2);component(node_27,()=>Tooltip_content,($$anchor10,Tooltip_Content_2)=>{Tooltip_Content_2($$anchor10,{side:"right",children:($$anchor11,$$slotProps4)=>{var p_2=root_23$5(),text_5=child(p_2,!0);reset(p_2),template_effect($0=>set_text(text_5,$0),[()=>attachmentMenu.getSystemMessageTooltip()]),append($$anchor11,p_2)}, -$$slots:{default:!0}})}),append($$anchor9,fragment_17)},$$slots:{default:!0}})}),append($$anchor7,fragment_16)};if_block(node_22,$$render=>{get$3(item).id===AttachmentMenuItemId.SYSTEM_MESSAGE&&$$render(consequent_4)})}append($$anchor6,fragment_15)});var node_28=sibling(node_21,2);ChatFormActionAddToolsSubmenu(node_28,{});var node_29=sibling(node_28,2);ChatFormActionAddMcpServersSubmenu(node_29,{onMcpSettingsClick:handleMcpSettingsClick});var node_30=sibling(node_29,2);each(node_30,17,()=>ATTACHMENT_MCP_ITEMS, -item=>item.id,($$anchor6,item)=>{var fragment_20=comment$2(),node_31=first_child(fragment_20);{var consequent_5=$$anchor7=>{var fragment_21=comment$2(),node_32=first_child(fragment_21);component(node_32,()=>Dropdown_menu_item,($$anchor8,DropdownMenu_Item_4)=>{DropdownMenu_Item_4($$anchor8,{class:"flex cursor-pointer items-center gap-2",onclick:()=>attachmentMenu.callbacks[get$3(item).action](),children:($$anchor9,$$slotProps3)=>{var fragment_22=root_26$2(),node_33=first_child(fragment_22);component( -node_33,()=>get$3(item).icon,($$anchor10,item_icon_3)=>{item_icon_3($$anchor10,{class:"h-4 w-4"})});var span_4=sibling(node_33,2),text_6=child(span_4,!0);reset(span_4),template_effect(()=>set_text(text_6,get$3(item).label)),append($$anchor9,fragment_22)},$$slots:{default:!0}})}),append($$anchor7,fragment_21)},d_12=user_derived(()=>attachmentMenu.isItemVisible(get$3(item).visibleWhen));if_block(node_31,$$render=>{get$3(d_12)&&$$render(consequent_5)})}append($$anchor6,fragment_20)}),append($$anchor5, -fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment)},$$slots:{default:!0}})}),reset(div),template_effect(()=>set_class(div,1,`flex items-center gap-1 ${className()??""}`)),append($$anchor,div),pop()}function Sheet_overlay($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("fixed inset-0 z-50 bg-black/5\ -0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=open]:animate-in data-[state=open]:fade-in-0",$$props.class));component(node2,()=>Dialog_overlay$1,($$anchor2,SheetPrimitive_Overlay)=>{SheetPrimitive_Overlay($$anchor2,spread_props({"data-slot":"sheet-overlay",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}const sheetVariants=tv({base:`bor\ -der-border/30 dark:border-border/20 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fill-mode-forwards fixed z-50 flex flex-col gap-4 shadow-sm transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 ${PANEL_CLASSES}`,variants:{side:{top:"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",bottom:"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inse\ -t-x-0 bottom-0 h-auto border-t",left:"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}});var root_3$R=from_html(' Close',1),root_2$12=from_html(" ",1),root_1$N=from_html(" ",1);function Sheet_content($$anchor,$$props){ -push$1($$props,!0);let ref2=prop($$props,"ref",15,null),side=prop($$props,"side",3,"right"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","side","portalProps","children"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Portal$2,($$anchor2,SheetPrimitive_Portal)=>{SheetPrimitive_Portal($$anchor2,spread_props(()=>$$props.portalProps,{children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$N(),node_1=first_child(fragment_1);Sheet_overlay(node_1, -{});var node_2=sibling(node_1,2);{let $0=user_derived(()=>cn$1(sheetVariants({side:side()}),$$props.class));component(node_2,()=>Dialog_content$1,($$anchor4,SheetPrimitive_Content)=>{SheetPrimitive_Content($$anchor4,spread_props({"data-slot":"sheet-content",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$12(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.children??noop$3); -var node_4=sibling(node_3,2);component(node_4,()=>Dialog_close,($$anchor6,SheetPrimitive_Close)=>{SheetPrimitive_Close($$anchor6,{class:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:pointer-events-none",children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$R(),node_5=first_child(fragment_3);X(node_5,{class:"size-4"}),next$1( -2),append($$anchor7,fragment_3)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}}))})}append($$anchor3,fragment_1)},$$slots:{default:!0}}))}),append($$anchor,fragment),pop()}var root$1s=from_html("
");function Sheet_header($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$1s();attribute_effect(div,$0=>({"data-slot":"sheet-header",class:$0, -...restProps}),[()=>cn$1("flex flex-col gap-1.5 p-4",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}function Sheet_title($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("font-semibold text-fo\ -reground",$$props.class));component(node2,()=>Dialog_title$1,($$anchor2,SheetPrimitive_Title)=>{SheetPrimitive_Title($$anchor2,spread_props({"data-slot":"sheet-title",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}function Sheet_description($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(), -node2=first_child(fragment);{let $0=user_derived(()=>cn$1("text-sm text-muted-foreground",$$props.class));component(node2,()=>Dialog_description$1,($$anchor2,SheetPrimitive_Description)=>{SheetPrimitive_Description($$anchor2,spread_props({"data-slot":"sheet-description",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}const Root$3=Dialog;var root_3$Q=from_html(" ",1),root_7$r=from_html(''),root_10$e=from_html(''),root_11$d=from_html("

"),root_9$k=from_html(" ",1),root_15$9=from_html(''),root_16$5=from_html("

PDFs will be converted to text. Image-based PDFs may not work properly.

"),root_14$5=from_html(" ",1),root_20$4=from_html(''),root_21$3=from_html("

"), -root_19$9=from_html(" ",1),root_23$4=from_html(''),root_2$11=from_html(' ',1),root_1$M=from_html(" ",1),root$1r=from_html("
");function ChatFormActionAddSheet($$anchor,$$props){ +`).find(l=>l.trim().length>0);cleanTitle=firstLine?firstLine.trim():TITLE_GENERATION.FALLBACK}cleanTitle&&cleanTitle.length>=TITLE_GENERATION.MIN_LENGTH&&await conversationsStore.updateConversationName(convId,cleanTitle)}async savePartialResponseIfNeeded(convId){const conversationId=convId||conversationsStore.activeConversation?.id;if(!conversationId)return;const streamingState=this.getChatStreaming(conversationId);if(!streamingState)return;const messages=conversationId===conversationsStore.activeConversation?. +id?conversationsStore.activeMessages:await conversationsStore.getConversationMessages(conversationId);if(!messages.length)return;const lastMessage=messages[messages.length-1];if(lastMessage?.role!==MessageRole.ASSISTANT)return;const partialContent=streamingState.response,partialReasoning=lastMessage.reasoningContent||"";if(!(!partialContent.trim()&&!partialReasoning.trim()))try{const updateData={content:partialContent};partialReasoning&&(updateData.reasoningContent=partialReasoning);const lastKnownState=this. +getProcessingState(conversationId);lastKnownState&&(updateData.timings={prompt_n:lastKnownState.promptTokens||0,prompt_ms:lastKnownState.promptMs,predicted_n:lastKnownState.tokensDecoded||0,cache_n:lastKnownState.cacheTokens||0,predicted_ms:lastKnownState.tokensPerSecond&&lastKnownState.tokensDecoded?lastKnownState.tokensDecoded/lastKnownState.tokensPerSecond*1e3:void 0}),await DatabaseService.updateMessage(lastMessage.id,updateData),lastMessage.content=partialContent,updateData.timings&&(lastMessage. +timings=updateData.timings)}catch(error2){lastMessage.content=partialContent,console.error("Failed to save partial response:",error2)}}async updateMessage(messageId,newContent){const activeConv=conversationsStore.activeConversation;if(!activeConv)return;this.isChatLoadingInternal(activeConv.id)&&await this.stopGeneration();const result=this.getMessageByIdWithRole(messageId,MessageRole.USER);if(!result)return;const{message:messageToUpdate,index:messageIndex}=result,originalContent=messageToUpdate. +content;try{const rootMessage=(await conversationsStore.getConversationMessages(activeConv.id)).find(m=>m.type==="root"&&m.parent===null),isFirstUserMessage=rootMessage&&messageToUpdate.parent===rootMessage.id;conversationsStore.updateMessageAtIndex(messageIndex,{content:newContent}),await DatabaseService.updateMessage(messageId,{content:newContent}),isFirstUserMessage&&newContent.trim()&&await conversationsStore.updateConversationTitleWithConfirmation(activeConv.id,generateConversationTitle(newContent, +!!config$1().titleGenerationUseFirstLine));const messagesToRemove=conversationsStore.activeMessages.slice(messageIndex+1);for(const message of messagesToRemove)await DatabaseService.deleteMessage(message.id);conversationsStore.sliceActiveMessages(messageIndex+1),conversationsStore.updateConversationTimestamp(),this.setChatLoading(activeConv.id,!0),this.clearChatStreaming(activeConv.id);const assistantMessage=await this.createAssistantMessage();conversationsStore.addMessageToActive(assistantMessage), +await conversationsStore.updateCurrentNode(assistantMessage.id),await this.streamChatCompletion(conversationsStore.activeMessages.slice(0,-1),assistantMessage,void 0,()=>{conversationsStore.updateMessageAtIndex(conversationsStore.findMessageIndex(messageId),{content:originalContent})})}catch(error2){isAbortError(error2)||console.error("Failed to update message:",error2)}}async regenerateMessage(messageId){const activeConv=conversationsStore.activeConversation;if(!activeConv||this.isChatLoadingInternal( +activeConv.id))return;this.cancelPreEncode();const result=this.getMessageByIdWithRole(messageId,MessageRole.ASSISTANT);if(!result)return;const{index:messageIndex}=result;try{const messagesToRemove=conversationsStore.activeMessages.slice(messageIndex);for(const message of messagesToRemove)await DatabaseService.deleteMessage(message.id);conversationsStore.sliceActiveMessages(messageIndex),conversationsStore.updateConversationTimestamp(),this.setChatLoading(activeConv.id,!0),this.clearChatStreaming( +activeConv.id);const parentMessageId=conversationsStore.activeMessages.length>0?conversationsStore.activeMessages[conversationsStore.activeMessages.length-1].id:void 0,assistantMessage=await this.createAssistantMessage(parentMessageId);conversationsStore.addMessageToActive(assistantMessage),await this.streamChatCompletion(conversationsStore.activeMessages.slice(0,-1),assistantMessage)}catch(error2){isAbortError(error2)||console.error("Failed to regenerate message:",error2),this.setChatLoading(activeConv?. +id||"",!1)}}async regenerateMessageWithBranching(messageId,modelOverride){const activeConv=conversationsStore.activeConversation;if(!(!activeConv||this.isChatLoadingInternal(activeConv.id))){this.cancelPreEncode();try{const idx=conversationsStore.findMessageIndex(messageId);if(idx===-1)return;const msg=conversationsStore.activeMessages[idx];if(msg.role!==MessageRole.ASSISTANT)return;const allMessages=await conversationsStore.getConversationMessages(activeConv.id),parentMessage=findMessageById(allMessages, +msg.parent);if(!parentMessage)return;this.setChatLoading(activeConv.id,!0),this.clearChatStreaming(activeConv.id);const newAssistantMessage=await DatabaseService.createMessageBranch({convId:msg.convId,type:msg.type,timestamp:Date.now(),role:msg.role,content:"",toolCalls:"",children:[],model:null},parentMessage.id);await conversationsStore.updateCurrentNode(newAssistantMessage.id),conversationsStore.updateConversationTimestamp(),await conversationsStore.refreshActiveMessages();const conversationPath=filterByLeafNodeId( +allMessages,parentMessage.id,!1),modelToUse=modelOverride||msg.model||void 0;await this.streamChatCompletion(conversationPath,newAssistantMessage,void 0,void 0,modelToUse)}catch(error2){isAbortError(error2)||console.error("Failed to regenerate message with branching:",error2),this.setChatLoading(activeConv?.id||"",!1)}}}async getDeletionInfo(messageId){const activeConv=conversationsStore.activeConversation;if(!activeConv)return{totalCount:0,userMessages:0,assistantMessages:0,messageTypes:[]};const allMessages=await conversationsStore. +getConversationMessages(activeConv.id);if(findMessageById(allMessages,messageId)?.role===MessageRole.SYSTEM){const messagesToDelete2=allMessages.filter(m=>m.id===messageId);let userMessages2=0,assistantMessages2=0;const messageTypes2=[];for(const msg of messagesToDelete2)msg.role===MessageRole.USER?(userMessages2++,messageTypes2.includes("user message")||messageTypes2.push("user message")):msg.role===MessageRole.ASSISTANT&&(assistantMessages2++,messageTypes2.includes("assistant response")||messageTypes2. +push("assistant response"));return{totalCount:1,userMessages:userMessages2,assistantMessages:assistantMessages2,messageTypes:messageTypes2}}const descendants=findDescendantMessages(allMessages,messageId),allToDelete=[messageId,...descendants],messagesToDelete=allMessages.filter(m=>allToDelete.includes(m.id));let userMessages=0,assistantMessages=0;const messageTypes=[];for(const msg of messagesToDelete)msg.role===MessageRole.USER?(userMessages++,messageTypes.includes("user message")||messageTypes. +push("user message")):msg.role===MessageRole.ASSISTANT&&(assistantMessages++,messageTypes.includes("assistant response")||messageTypes.push("assistant response"));return{totalCount:allToDelete.length,userMessages,assistantMessages,messageTypes}}async deleteMessage(messageId){const activeConv=conversationsStore.activeConversation;if(activeConv)try{const allMessages=await conversationsStore.getConversationMessages(activeConv.id),messageToDelete=findMessageById(allMessages,messageId);if(!messageToDelete) +return;if(filterByLeafNodeId(allMessages,activeConv.currNode||"",!1).some(m=>m.id===messageId)&&messageToDelete.parent){const siblings2=allMessages.filter(m=>m.parent===messageToDelete.parent&&m.id!==messageId);if(siblings2.length>0){const latestSibling=siblings2.reduce((latest,sibling2)=>sibling2.timestamp>latest.timestamp?sibling2:latest);await conversationsStore.updateCurrentNode(findLeafNode(allMessages,latestSibling.id))}else messageToDelete.parent&&await conversationsStore.updateCurrentNode( +findLeafNode(allMessages,messageToDelete.parent))}await DatabaseService.deleteMessageCascading(activeConv.id,messageId),await conversationsStore.refreshActiveMessages(),conversationsStore.updateConversationTimestamp()}catch(error2){console.error("Failed to delete message:",error2)}}async continueAssistantMessage(messageId){const activeConv=conversationsStore.activeConversation;if(!activeConv||this.isChatLoadingInternal(activeConv.id))return;const result=this.getMessageByIdWithRole(messageId,MessageRole. +ASSISTANT);if(!result)return;const{message:msg,index:idx}=result;try{this.showErrorDialog(null),this.setChatLoading(activeConv.id,!0),this.clearChatStreaming(activeConv.id);const allMessages=await conversationsStore.getConversationMessages(activeConv.id),dbMessage=findMessageById(allMessages,messageId);if(!dbMessage){this.setChatLoading(activeConv.id,!1);return}const originalContent=dbMessage.content,originalReasoning=dbMessage.reasoningContent||"",contextWithContinue=[...conversationsStore.activeMessages. +slice(0,idx),{role:MessageRole.ASSISTANT,content:originalContent,reasoning_content:originalReasoning||void 0}];let appendedContent="",appendedReasoning="",hasReceivedContent=!1;const updateStreamingContent=fullContent=>{this.setChatStreaming(msg.convId,fullContent,msg.id),conversationsStore.updateMessageAtIndex(idx,{content:fullContent})},abortController=this.getOrCreateAbortController(msg.convId);await ChatService.sendMessage(contextWithContinue,{...this.getApiOptions(),onChunk:chunk=>{appendedContent+= +chunk,hasReceivedContent=!0,updateStreamingContent(originalContent+appendedContent)},onReasoningChunk:chunk=>{appendedReasoning+=chunk,hasReceivedContent=!0,this.setChatStreaming(msg.convId,originalContent+appendedContent,msg.id),conversationsStore.updateMessageAtIndex(idx,{reasoningContent:originalReasoning+appendedReasoning})},onTimings:(timings,promptProgress)=>{const tokensPerSecond=timings?.predicted_ms&&timings?.predicted_n?timings.predicted_n/timings.predicted_ms*1e3:0;this.updateProcessingStateFromTimings( +{prompt_n:timings?.prompt_n||0,prompt_ms:timings?.prompt_ms,predicted_n:timings?.predicted_n||0,predicted_per_second:tokensPerSecond,cache_n:timings?.cache_n||0,prompt_progress:promptProgress},msg.convId)},onComplete:async(finalContent,reasoningContent,timings)=>{const finalAppendedContent=hasReceivedContent?appendedContent:finalContent||"",finalAppendedReasoning=hasReceivedContent?appendedReasoning:reasoningContent||"",fullContent=originalContent+finalAppendedContent,fullReasoning=originalReasoning+ +finalAppendedReasoning||void 0;await DatabaseService.updateMessage(msg.id,{content:fullContent,reasoningContent:fullReasoning,timestamp:Date.now(),timings}),conversationsStore.updateMessageAtIndex(idx,{content:fullContent,reasoningContent:fullReasoning,timestamp:Date.now(),timings}),conversationsStore.updateConversationTimestamp(),this.setChatLoading(msg.convId,!1),this.clearChatStreaming(msg.convId),this.setProcessingState(msg.convId,null)},onError:async error2=>{if(isAbortError(error2)){hasReceivedContent&& +appendedContent&&(await DatabaseService.updateMessage(msg.id,{content:originalContent+appendedContent,reasoningContent:originalReasoning+appendedReasoning||void 0,timestamp:Date.now()}),conversationsStore.updateMessageAtIndex(idx,{content:originalContent+appendedContent,reasoningContent:originalReasoning+appendedReasoning||void 0,timestamp:Date.now()})),this.setChatLoading(msg.convId,!1),this.clearChatStreaming(msg.convId),this.setProcessingState(msg.convId,null);return}console.error("Continue g\ +eneration error:",error2),conversationsStore.updateMessageAtIndex(idx,{content:originalContent}),await DatabaseService.updateMessage(msg.id,{content:originalContent}),this.setChatLoading(msg.convId,!1),this.clearChatStreaming(msg.convId),this.setProcessingState(msg.convId,null),this.showErrorDialog({type:error2.name==="TimeoutError"?ErrorDialogType.TIMEOUT:ErrorDialogType.SERVER,message:error2.message})}},msg.convId,abortController.signal)}catch(error2){isAbortError(error2)||console.error("Faile\ +d to continue message:",error2),activeConv&&this.setChatLoading(activeConv.id,!1)}}async editAssistantMessage(messageId,newContent,shouldBranch){const activeConv=conversationsStore.activeConversation;if(!activeConv||this.isChatLoadingInternal(activeConv.id))return;const result=this.getMessageByIdWithRole(messageId,MessageRole.ASSISTANT);if(!result)return;const{message:msg,index:idx}=result;try{if(shouldBranch){const newMessage=await DatabaseService.createMessageBranch({convId:msg.convId,type:msg. +type,timestamp:Date.now(),role:msg.role,content:newContent,toolCalls:msg.toolCalls||"",children:[],model:msg.model},msg.parent);await conversationsStore.updateCurrentNode(newMessage.id)}else await DatabaseService.updateMessage(msg.id,{content:newContent}),conversationsStore.updateMessageAtIndex(idx,{content:newContent});conversationsStore.updateConversationTimestamp(),await conversationsStore.refreshActiveMessages()}catch(error2){console.error("Failed to edit assistant message:",error2)}}async editUserMessagePreserveResponses(messageId,newContent,newExtras){ +const activeConv=conversationsStore.activeConversation;if(!activeConv)return;const result=this.getMessageByIdWithRole(messageId,MessageRole.USER);if(!result)return;const{message:msg,index:idx}=result;try{const updateData={content:newContent};newExtras!==void 0&&(updateData.extra=JSON.parse(JSON.stringify(newExtras))),await DatabaseService.updateMessage(messageId,updateData),conversationsStore.updateMessageAtIndex(idx,updateData);const rootMessage=(await conversationsStore.getConversationMessages( +activeConv.id)).find(m=>m.type==="root"&&m.parent===null);rootMessage&&msg.parent===rootMessage.id&&newContent.trim()&&await conversationsStore.updateConversationTitleWithConfirmation(activeConv.id,generateConversationTitle(newContent,!!config$1().titleGenerationUseFirstLine)),conversationsStore.updateConversationTimestamp()}catch(error2){console.error("Failed to edit user message:",error2)}}async editMessageWithBranching(messageId,newContent,newExtras){const activeConv=conversationsStore.activeConversation; +if(!activeConv||this.isChatLoadingInternal(activeConv.id))return;let result=this.getMessageByIdWithRole(messageId,MessageRole.USER);if(result||(result=this.getMessageByIdWithRole(messageId,MessageRole.SYSTEM)),!result)return;const{message:msg,index:idx}=result;try{const allMessages=await conversationsStore.getConversationMessages(activeConv.id),rootMessage=allMessages.find(m=>m.type==="root"&&m.parent===null),isFirstUserMessage=msg.role===MessageRole.USER&&rootMessage&&msg.parent===rootMessage.id, +extrasToUse=newExtras!==void 0?JSON.parse(JSON.stringify(newExtras)):msg.extra?JSON.parse(JSON.stringify(msg.extra)):void 0;let messageIdForResponse;const dbMsg=findMessageById(allMessages,msg.id);if(dbMsg?dbMsg.children.length>0:msg.children.length>0){const parentId=msg.parent||rootMessage?.id;if(!parentId)return;const newMessage=await DatabaseService.createMessageBranch({convId:msg.convId,type:msg.type,timestamp:Date.now(),role:msg.role,content:newContent,toolCalls:msg.toolCalls||"",children:[], +extra:extrasToUse,model:msg.model},parentId);await conversationsStore.updateCurrentNode(newMessage.id),messageIdForResponse=newMessage.id}else{const updates={content:newContent,timestamp:Date.now(),extra:extrasToUse};await DatabaseService.updateMessage(msg.id,updates),conversationsStore.updateMessageAtIndex(idx,updates),messageIdForResponse=msg.id}conversationsStore.updateConversationTimestamp(),isFirstUserMessage&&newContent.trim()&&await conversationsStore.updateConversationTitleWithConfirmation( +activeConv.id,generateConversationTitle(newContent,!!config$1().titleGenerationUseFirstLine)),await conversationsStore.refreshActiveMessages(),msg.role===MessageRole.USER&&await this.generateResponseForMessage(messageIdForResponse)}catch(error2){console.error("Failed to edit message with branching:",error2)}}async generateResponseForMessage(userMessageId){const activeConv=conversationsStore.activeConversation;if(activeConv){this.showErrorDialog(null),this.setChatLoading(activeConv.id,!0),this.clearChatStreaming( +activeConv.id);try{const allMessages=await conversationsStore.getConversationMessages(activeConv.id),conversationPath=filterByLeafNodeId(allMessages,userMessageId,!1),assistantMessage=await DatabaseService.createMessageBranch({convId:activeConv.id,type:MessageType.TEXT,timestamp:Date.now(),role:MessageRole.ASSISTANT,content:"",toolCalls:"",children:[],model:null},userMessageId);conversationsStore.addMessageToActive(assistantMessage),await this.streamChatCompletion(conversationPath,assistantMessage)}catch(error2){ +console.error("Failed to generate response:",error2),this.setChatLoading(activeConv.id,!1)}}}getContextTotal(){const activeConvId=this.activeConversationId,activeState=activeConvId?this.getProcessingState(activeConvId):null;if(activeState&&typeof activeState.contextTotal=="number"&&activeState.contextTotal>0)return activeState.contextTotal;if(isRouterMode()){const modelContextSize=selectedModelContextSize();if(typeof modelContextSize=="number"&&modelContextSize>0)return modelContextSize}else{const propsContextSize=contextSize(); +if(typeof propsContextSize=="number"&&propsContextSize>0)return propsContextSize}return null}updateProcessingStateFromTimings(timingData,conversationId){const processingState=this.parseTimingData(timingData);if(processingState===null){console.warn("Failed to parse timing data - skipping update");return}const targetId=conversationId||this.activeConversationId;targetId&&this.setProcessingState(targetId,processingState)}parseTimingData(timingData){const promptTokens=timingData.prompt_n||0,promptMs=timingData. +prompt_ms||void 0,predictedTokens=timingData.predicted_n||0,tokensPerSecond=timingData.predicted_per_second||0,cacheTokens=timingData.cache_n||0,promptProgress=timingData.prompt_progress,contextTotal=this.getContextTotal(),currentConfig=config$1(),outputTokensMax=currentConfig.max_tokens||-1,contextUsed=promptTokens+cacheTokens+predictedTokens,outputTokensUsed=predictedTokens,progressCache=promptProgress?.cache||0,progressActualDone=(promptProgress?.processed??0)-progressCache,progressActualTotal=(promptProgress?. +total??0)-progressCache,progressPercent=promptProgress?Math.round(progressActualDone/progressActualTotal*100):void 0;return{status:predictedTokens>0?"generating":promptProgress?"preparing":"idle",tokensDecoded:predictedTokens,tokensRemaining:outputTokensMax-predictedTokens,contextUsed,contextTotal,outputTokensUsed,outputTokensMax,hasNextToken:predictedTokens>0,tokensPerSecond,temperature:currentConfig.temperature??.8,topP:currentConfig.top_p??.95,speculative:!1,progressPercent,promptProgress,promptTokens, +promptMs,cacheTokens}}restoreProcessingStateFromMessages(messages,conversationId){for(let i=messages.length-1;i>=0;i--){const message=messages[i];if(message.role===MessageRole.ASSISTANT&&message.timings){const restoredState=this.parseTimingData({prompt_n:message.timings.prompt_n||0,prompt_ms:message.timings.prompt_ms,predicted_n:message.timings.predicted_n||0,predicted_per_second:message.timings.predicted_n&&message.timings.predicted_ms?message.timings.predicted_n/message.timings.predicted_ms*1e3: +0,cache_n:message.timings.cache_n||0});if(restoredState){this.setProcessingState(conversationId,restoredState);return}}}}getConversationModel(messages){for(let i=messages.length-1;i>=0;i--){const message=messages[i];if(message.role===MessageRole.ASSISTANT&&message.model)return message.model}return null}getApiOptions(){const currentConfig=config$1(),hasValue=value=>value!=null&&value!=="",apiOptions={stream:!0,timings_per_token:!0};if(isRouterMode()){const modelName=selectedModelName();modelName&& +(apiOptions.model=modelName)}return currentConfig.systemMessage&&(apiOptions.systemMessage=currentConfig.systemMessage),currentConfig.disableReasoningParsing&&(apiOptions.disableReasoningParsing=!0),currentConfig.excludeReasoningFromContext&&(apiOptions.excludeReasoningFromContext=!0),hasValue(currentConfig.temperature)&&(apiOptions.temperature=Number(currentConfig.temperature)),hasValue(currentConfig.max_tokens)&&(apiOptions.max_tokens=Number(currentConfig.max_tokens)),hasValue(currentConfig.dynatemp_range)&& +(apiOptions.dynatemp_range=Number(currentConfig.dynatemp_range)),hasValue(currentConfig.dynatemp_exponent)&&(apiOptions.dynatemp_exponent=Number(currentConfig.dynatemp_exponent)),hasValue(currentConfig.top_k)&&(apiOptions.top_k=Number(currentConfig.top_k)),hasValue(currentConfig.top_p)&&(apiOptions.top_p=Number(currentConfig.top_p)),hasValue(currentConfig.min_p)&&(apiOptions.min_p=Number(currentConfig.min_p)),hasValue(currentConfig.xtc_probability)&&(apiOptions.xtc_probability=Number(currentConfig. +xtc_probability)),hasValue(currentConfig.xtc_threshold)&&(apiOptions.xtc_threshold=Number(currentConfig.xtc_threshold)),hasValue(currentConfig.typ_p)&&(apiOptions.typ_p=Number(currentConfig.typ_p)),hasValue(currentConfig.repeat_last_n)&&(apiOptions.repeat_last_n=Number(currentConfig.repeat_last_n)),hasValue(currentConfig.repeat_penalty)&&(apiOptions.repeat_penalty=Number(currentConfig.repeat_penalty)),hasValue(currentConfig.presence_penalty)&&(apiOptions.presence_penalty=Number(currentConfig.presence_penalty)), +hasValue(currentConfig.frequency_penalty)&&(apiOptions.frequency_penalty=Number(currentConfig.frequency_penalty)),hasValue(currentConfig.dry_multiplier)&&(apiOptions.dry_multiplier=Number(currentConfig.dry_multiplier)),hasValue(currentConfig.dry_base)&&(apiOptions.dry_base=Number(currentConfig.dry_base)),hasValue(currentConfig.dry_allowed_length)&&(apiOptions.dry_allowed_length=Number(currentConfig.dry_allowed_length)),hasValue(currentConfig.dry_penalty_last_n)&&(apiOptions.dry_penalty_last_n=Number( +currentConfig.dry_penalty_last_n)),currentConfig.samplers&&(apiOptions.samplers=currentConfig.samplers),apiOptions.backend_sampling=currentConfig.backend_sampling,currentConfig.custom&&(apiOptions.custom=currentConfig.custom),apiOptions}cancelPreEncode(){this.preEncodeAbortController&&(this.preEncodeAbortController.abort(),this.preEncodeAbortController=null)}async triggerPreEncode(allMessages,assistantMessage,assistantContent,model,excludeReasoning){this.cancelPreEncode(),this.preEncodeAbortController= +new AbortController;const signal=this.preEncodeAbortController.signal;try{if(!await ChatService.areAllSlotsIdle(model,signal)||signal.aborted)return;const messagesWithAssistant=[...allMessages,{...assistantMessage,content:assistantContent}];await ChatService.preEncode(messagesWithAssistant,model,excludeReasoning,signal)}catch(err){isAbortError(err)||console.warn("[ChatStore] Pre-encode failed:",err)}}}const chatStore=new ChatStore,activeProcessingState=()=>chatStore.activeProcessingState,errorDialog=()=>chatStore. +errorDialogState,getAddFilesHandler=()=>chatStore.getAddFilesHandler(),getAllLoadingChats=()=>chatStore.getAllLoadingChats(),isChatStreaming=()=>chatStore.isStreaming(),isEditing=()=>chatStore.isEditing(),isLoading=()=>chatStore.isLoading,pendingEditMessageId=()=>chatStore.pendingEditMessageId,chatPendingMessageContent=convId=>chatStore.pendingMessageContent(convId),chatPendingMessageExtras=convId=>chatStore.pendingMessageExtras(convId),chatClearPendingMessage=convId=>chatStore.clearPendingMessage( +convId),chatInjectPendingMessage=(convId,content2,extras)=>chatStore.injectPendingMessage(convId,content2,extras);var root$1u=from_html('
',1);function ChatForm($$anchor,$$props){push$1($$props,!0);let attachments=prop($$props,"attachments",19,()=>[]),className=prop($$props,"cla\ +ss",3,""),disabled=prop($$props,"disabled",3,!1),isLoading2=prop($$props,"isLoading",3,!1),placeholder=prop($$props,"placeholder",3,"Type a message..."),showMcpPromptButton=prop($$props,"showMcpPromptButton",3,!1),showAddButton=prop($$props,"showAddButton",3,!0),showModelSelector=prop($$props,"showModelSelector",3,!0),uploadedFiles=prop($$props,"uploadedFiles",31,()=>proxy([])),value=prop($$props,"value",15,""),audioRecorder,chatFormActionsRef=state$1(void 0),fileInputRef=state$1(void 0),pickersRef=state$1( +void 0),textareaRef=state$1(void 0),isRecording=state$1(!1),recordingSupported=state$1(!1),isPromptPickerOpen=state$1(!1),promptSearchQuery=state$1(""),isInlineResourcePickerOpen=state$1(!1),resourceSearchQuery=state$1(""),isResourceDialogOpen=state$1(!1),preSelectedResourceUri=state$1(void 0),currentConfig=user_derived(config$1),pasteLongTextToFileLength=user_derived(()=>{const n=Number(get$3(currentConfig).pasteLongTextToFileLen);return Number.isNaN(n)?Number(SETTING_CONFIG_DEFAULT.pasteLongTextToFileLen): +n}),isRouter=user_derived(isRouterMode),conversationModel=user_derived(()=>chatStore.getConversationModel(activeMessages())),activeModelId=user_derived(()=>{const options=modelOptions();if(!get$3(isRouter))return options.length>0?options[0].model:null;const selectedId=selectedModelId();if(selectedId){const model=options.find(m=>m.id===selectedId);if(model)return model.model}if(get$3(conversationModel)){const model=options.find(m=>m.model===get$3(conversationModel));if(model)return model.model}return null}), +hasModelSelected=user_derived(()=>!get$3(isRouter)||!!get$3(conversationModel)||!!selectedModelId()),hasLoadingAttachments=user_derived(()=>uploadedFiles().some(f=>f.isLoading)),hasAttachments=user_derived(()=>attachments()&&attachments().length>0||uploadedFiles()&&uploadedFiles().length>0),canSubmit=user_derived(()=>value().trim().length>0||get$3(hasAttachments));onMount$1(()=>{set$1(recordingSupported,isAudioRecordingSupported(),!0),audioRecorder=new AudioRecorder});function focus2(){get$3(textareaRef)?. +focus()}function resetTextareaHeight(){get$3(textareaRef)?.resetHeight()}function openModelSelector(){get$3(chatFormActionsRef)?.openModelSelector()}function checkModelSelected(){return get$3(hasModelSelected)?!0:(get$3(chatFormActionsRef)?.openModelSelector(),!1)}function handleFileSelect(files){$$props.onFilesAdd?.(files)}function handleFileUpload(){get$3(fileInputRef)?.click()}function handleFileRemove(fileId){if(fileId.startsWith("attachment-")){const index2=parseInt(fileId.replace("attachme\ +nt-",""),10);!isNaN(index2)&&index2>=0&&index2item.kind==="file").map(item=>item.getAsFile()).filter(file=>file!==null);if(files.length>0){event2.preventDefault(),$$props.onFilesAdd?.(files);return}const text2=event2.clipboardData.getData(MimeTypeText.PLAIN);if(text2.startsWith(CLIPBOARD_CONTENT_QUOTE_PREFIX)){const parsed=parseClipboardContent(text2);if(parsed.textAttachments.length>0||parsed.mcpPromptAttachments.length> +0){if(event2.preventDefault(),value(parsed.message),$$props.onValueChange?.(parsed.message),parsed.textAttachments.length>0){const attachmentFiles=parsed.textAttachments.map(att=>new File([att.content],att.name,{type:MimeTypeText.PLAIN}));$$props.onFilesAdd?.(attachmentFiles)}if(parsed.mcpPromptAttachments.length>0){const mcpPromptFiles=parsed.mcpPromptAttachments.map(att=>({id:uuid$1(),name:att.name,size:att.content.length,type:SpecialFileType.MCP_PROMPT,file:new File([att.content],`${att.name}${FileExtensionText. +TXT}`,{type:MimeTypeText.PLAIN}),isLoading:!1,textContent:att.content,mcpPrompt:{serverName:att.serverName,promptName:att.promptName,arguments:att.arguments}}));uploadedFiles([...uploadedFiles(),...mcpPromptFiles]),$$props.onUploadedFilesChange?.(uploadedFiles())}setTimeout(()=>{get$3(textareaRef)?.focus()},10);return}}if(text2.length>0&&get$3(pasteLongTextToFileLength)>0&&text2.length>get$3(pasteLongTextToFileLength)){event2.preventDefault();const textFile=new File([text2],"Pasted",{type:MimeTypeText. +PLAIN});$$props.onFilesAdd?.([textFile])}}function handlePromptLoadStart(placeholderId,promptInfo,args){value().startsWith(PROMPT_TRIGGER_PREFIX)&&(value(""),$$props.onValueChange?.("")),set$1(isPromptPickerOpen,!1),set$1(promptSearchQuery,"");const promptName=promptInfo.title||promptInfo.name,placeholder2={id:placeholderId,name:promptName,size:INITIAL_FILE_SIZE,type:SpecialFileType.MCP_PROMPT,file:new File([],"loading"),isLoading:!0,mcpPrompt:{serverName:promptInfo.serverName,promptName:promptInfo. +name,arguments:args?{...args}:void 0}};uploadedFiles([...uploadedFiles(),placeholder2]),$$props.onUploadedFilesChange?.(uploadedFiles()),get$3(textareaRef)?.focus()}function handlePromptLoadComplete(placeholderId,result){const promptText=result.messages?.map(msg=>typeof msg.content=="string"?msg.content:msg.content.type===ContentPartType.TEXT?msg.content.text:"").filter(Boolean).join(PROMPT_CONTENT_SEPARATOR);uploadedFiles(uploadedFiles().map(f=>f.id===placeholderId?{...f,isLoading:!1,textContent:promptText, +size:promptText.length,file:new File([promptText],`${f.name}${FileExtensionText.TXT}`,{type:MimeTypeText.PLAIN})}:f)),$$props.onUploadedFilesChange?.(uploadedFiles())}function handlePromptLoadError(placeholderId,error2){uploadedFiles(uploadedFiles().map(f=>f.id===placeholderId?{...f,isLoading:!1,loadError:error2}:f)),$$props.onUploadedFilesChange?.(uploadedFiles())}function handlePromptPickerClose(){set$1(isPromptPickerOpen,!1),set$1(promptSearchQuery,""),get$3(textareaRef)?.focus()}function handleInlineResourcePickerClose(){ +set$1(isInlineResourcePickerOpen,!1),set$1(resourceSearchQuery,""),get$3(textareaRef)?.focus()}function handleInlineResourceSelect(){value().startsWith(RESOURCE_TRIGGER_PREFIX)&&(value(""),$$props.onValueChange?.("")),set$1(isInlineResourcePickerOpen,!1),set$1(resourceSearchQuery,""),get$3(textareaRef)?.focus()}function handleBrowseResources(){set$1(isInlineResourcePickerOpen,!1),set$1(resourceSearchQuery,""),value().startsWith(RESOURCE_TRIGGER_PREFIX)&&(value(""),$$props.onValueChange?.("")),set$1( +isResourceDialogOpen,!0)}async function handleMicClick(){if(!audioRecorder||!get$3(recordingSupported)){console.warn("Audio recording not supported");return}if(get$3(isRecording)){set$1(isRecording,!1);try{const audioBlob=await audioRecorder.stopRecording(),wavBlob=await convertToWav(audioBlob),audioFile=createAudioFile(wavBlob);$$props.onFilesAdd?.([audioFile])}catch(error2){console.error("Failed to stop recording:",error2)}}else try{await audioRecorder.startRecording(),set$1(isRecording,!0)}catch(error2){ +console.error("Failed to start recording:",error2)}}var $$exports={focus:focus2,resetTextareaHeight,openModelSelector,checkModelSelected},fragment=root$1u(),node2=first_child(fragment);bind_this(ChatFormFileInputInvisible(node2,{onFileSelect:handleFileSelect}),$$value=>set$1(fileInputRef,$$value,!0),()=>get$3(fileInputRef));var form=sibling(node2,2),node_1=child(form);bind_this(ChatFormPickers(node_1,{get isPromptPickerOpen(){return get$3(isPromptPickerOpen)},get promptSearchQuery(){return get$3( +promptSearchQuery)},get isInlineResourcePickerOpen(){return get$3(isInlineResourcePickerOpen)},get resourceSearchQuery(){return get$3(resourceSearchQuery)},onPromptPickerClose:handlePromptPickerClose,onInlineResourcePickerClose:handleInlineResourcePickerClose,onInlineResourceSelect:handleInlineResourceSelect,onPromptLoadStart:handlePromptLoadStart,onPromptLoadComplete:handlePromptLoadComplete,onPromptLoadError:handlePromptLoadError,onInlineResourceBrowse:handleBrowseResources}),$$value=>set$1(pickersRef, +$$value,!0),()=>get$3(pickersRef));var div=sibling(node_1,2),node_2=child(div);{let $0=user_derived(()=>get$3(activeModelId)??void 0);ChatAttachmentsList(node_2,{get attachments(){return attachments()},onFileRemove:handleFileRemove,limitToSingleRow:!0,class:"py-5",style:"scroll-padding: 1rem;",get activeModelId(){return get$3($0)},get uploadedFiles(){return uploadedFiles()},set uploadedFiles($$value){uploadedFiles($$value)}})}var div_1=sibling(node_2,2),node_3=child(div_1);bind_this(ChatFormTextarea( +node_3,{class:"px-5 py-1.5 md:pt-0",onKeydown:handleKeydown,onInput:()=>{handleInput(),$$props.onValueChange?.(value())},get disabled(){return disabled()},get placeholder(){return placeholder()},get value(){return value()},set value($$value){value($$value)}}),$$value=>set$1(textareaRef,$$value,!0),()=>get$3(textareaRef));var node_4=sibling(node_3,2);{var consequent=$$anchor2=>{ChatFormMcpResourcesList($$anchor2,{class:"mb-3",onResourceClick:uri2=>{set$1(preSelectedResourceUri,uri2,!0),set$1(isResourceDialogOpen, +!0)}})},d2=user_derived(()=>mcpHasResourceAttachments());if_block(node_4,$$render=>{get$3(d2)&&$$render(consequent)})}var node_5=sibling(node_4,2);{let $0=user_derived(()=>showMcpPromptButton()?()=>set$1(isPromptPickerOpen,!0):void 0);bind_this(ChatFormActions(node_5,{class:"px-3",get canSend(){return get$3(canSubmit)},get disabled(){return disabled()},get isLoading(){return isLoading2()},get isRecording(){return get$3(isRecording)},get showAddButton(){return showAddButton()},get showModelSelector(){ +return showModelSelector()},get uploadedFiles(){return uploadedFiles()},onFileUpload:handleFileUpload,onMicClick:handleMicClick,get onStop(){return $$props.onStop},onSystemPromptClick:()=>$$props.onSystemPromptClick?.({message:value(),files:uploadedFiles()}),get onMcpPromptClick(){return get$3($0)},onMcpResourcesClick:()=>set$1(isResourceDialogOpen,!0)}),$$value=>set$1(chatFormActionsRef,$$value,!0),()=>get$3(chatFormActionsRef))}reset(div_1),reset(div),reset(form);var node_6=sibling(form,2);return DialogMcpResourcesBrowser( +node_6,{get preSelectedUri(){return get$3(preSelectedResourceUri)},onAttach:resource=>{mcpStore.attachResource(resource.uri)},onOpenChange:newOpen=>{newOpen||set$1(preSelectedResourceUri,void 0)},get open(){return get$3(isResourceDialogOpen)},set open($$value){set$1(isResourceDialogOpen,$$value,!0)}}),template_effect(()=>{set_class(form,1,`relative ${className()??""}`),set_class(div,1,`${INPUT_CLASSES??""} overflow-hidden rounded-3xl backdrop-blur-md ${disabled()?"cursor-not-allowed opacity-60": +""}`)}),event("submit",form,event2=>{event2.preventDefault(),!(!get$3(canSubmit)||disabled()||get$3(hasLoadingAttachments))&&$$props.onSubmit?.()}),event("paste",div_1,handlePaste),append($$anchor,fragment),pop($$exports)}function Dropdown_menu_content($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),sideOffset=prop($$props,"sideOffset",3,4),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","sideOffset","portalProps","class"]);var fragment=comment$2(),node2=first_child( +fragment);component(node2,()=>Portal$2,($$anchor2,DropdownMenuPrimitive_Portal)=>{DropdownMenuPrimitive_Portal($$anchor2,spread_props(()=>$$props.portalProps,{children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>cn$1("z-50 max-h-(--bits-dropdown-menu-content-available-height) min-w-[8rem] origin-(--bits-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover p-1.5 text-po\ +pover-foreground shadow-md outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 dark:border-border/20",$$props.class));component(node_1,()=>Dropdown_menu_content$1, +($$anchor4,DropdownMenuPrimitive_Content)=>{DropdownMenuPrimitive_Content($$anchor4,spread_props({"data-slot":"dropdown-menu-content",get sideOffset(){return sideOffset()},get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor3,fragment_1)},$$slots:{default:!0}}))}),append($$anchor,fragment),pop()}function Dropdown_menu_item($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),variant=prop($$props,"variant", +3,"default"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","inset","variant"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[var\ +iant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:data-highlighted:text-destructive dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:!text-destructive",$$props.class));component(node2,()=>Menu_item,($$anchor2,DropdownMenuPrimitive_Item)=>{DropdownMenuPrimitive_Item($$anchor2,spread_props( +{"data-slot":"dropdown-menu-item",get"data-inset"(){return $$props.inset},get"data-variant"(){return variant()},get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}function Dropdown_menu_separator($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived( +()=>cn$1("-mx-1 my-1 h-px bg-border/20",$$props.class));component(node2,()=>Menu_separator,($$anchor2,DropdownMenuPrimitive_Separator)=>{DropdownMenuPrimitive_Separator($$anchor2,spread_props({"data-slot":"dropdown-menu-separator",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}function Dropdown_menu_trigger($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props, +["$$slots","$$events","$$legacy","ref"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Menu_trigger,($$anchor2,DropdownMenuPrimitive_Trigger)=>{DropdownMenuPrimitive_Trigger($$anchor2,spread_props({"data-slot":"dropdown-menu-trigger"},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))}),append($$anchor,fragment),pop()}function Dropdown_menu_sub_content($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props( +$$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("z-50 max-h-(--bits-dropdown-menu-content-available-height) min-w-[8rem] origin-(--bits-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover p-1.5 text-popover-foreground shadow-md outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-\ +in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 dark:border-border/20",$$props.class));component(node2,()=>Menu_sub_content,($$anchor2,DropdownMenuPrimitive_SubContent)=>{DropdownMenuPrimitive_SubContent($$anchor2,spread_props({"data-slot":"dropdown-menu-sub-content",get class(){ +return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}var root_1$P=from_html(" ",1);function Dropdown_menu_sub_trigger($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","inset","children"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("flex cursor-default items-center gap-2 rounded\ +-sm px-2 py-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",$$props.class));component(node2,()=>Menu_sub_trigger,($$anchor2,DropdownMenuPrimitive_SubTrigger)=>{ +DropdownMenuPrimitive_SubTrigger($$anchor2,spread_props({"data-slot":"dropdown-menu-sub-trigger",get"data-inset"(){return $$props.inset},get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$P(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.children??noop$3);var node_2=sibling(node_1,2);Chevron_right(node_2,{class:"ml-auto size-4"}),append($$anchor3,fragment_1)},$$slots:{default:!0}}))})} +append($$anchor,fragment),pop()}const Sub=Menu_sub,Root$4=Menu;function useAttachmentMenu(getFlags,getCallbacks,close2){const modalityFlags=user_derived(getFlags),callbacks=user_derived(()=>{const cbs=getCallbacks(),wrap2=fn=>()=>{close2(),fn?.()};return{[AttachmentAction.FILE_UPLOAD]:wrap2(cbs.onFileUpload),[AttachmentAction.SYSTEM_PROMPT_CLICK]:wrap2(cbs.onSystemPromptClick),[AttachmentAction.MCP_PROMPT_CLICK]:wrap2(cbs.onMcpPromptClick),[AttachmentAction.MCP_RESOURCES_CLICK]:wrap2(cbs.onMcpResourcesClick)}}); +function isItemEnabled(enabledWhen){return!enabledWhen||enabledWhen==="always"?!0:!!get$3(modalityFlags)[enabledWhen]}function isItemVisible(visibleWhen){return visibleWhen?!!get$3(modalityFlags)[visibleWhen]:!0}function getSystemMessageTooltip(){return page$1.params.id?"Inject custom system message at the beginning of the conversation":"Add custom system message for a new conversation"}return{get callbacks(){return get$3(callbacks)},isItemEnabled,isItemVisible,getSystemMessageTooltip}}var root_6$s=from_html( +" ",1),root_10$f=from_html(" ",1),root_11$e=from_html("

"),root_8$r=from_html(" ",1),root_16$6=from_html(" ",1),root_17$8=from_html("

PDFs will be converted to text. Image-based PDFs may not work properly.

"),root_13$d=from_html(" ",1),root_22$2=from_html(" ",1),root_23$5=from_html("

"),root_20$5=from_html(" ",1),root_26$2=from_html(" ",1),root_3$S=from_html(" \ + ",1),root_1$O=from_html(" ",1),root$1t=from_html("
");function ChatFormActionAddDropdown($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),hasAudioModality=prop($$props,"hasAudioModality",3,!1),hasVisionModality=prop($$props,"hasVisionModality",3,!1),hasMcpPromptsSupport=prop($$props,"hasMcpPromptsSupport",3,!1),hasMcpResourcesSupport=prop($$props,"hasMcpResourcesSupport",3,!1),dropdownOpen=state$1(!1); +function handleMcpSettingsClick(){set$1(dropdownOpen,!1),$$props.onMcpSettingsClick?.()}const attachmentMenu=useAttachmentMenu(()=>({hasVisionModality:hasVisionModality(),hasAudioModality:hasAudioModality(),hasMcpPromptsSupport:hasMcpPromptsSupport(),hasMcpResourcesSupport:hasMcpResourcesSupport()}),()=>({onFileUpload:$$props.onFileUpload,onSystemPromptClick:$$props.onSystemPromptClick,onMcpPromptClick:$$props.onMcpPromptClick,onMcpResourcesClick:$$props.onMcpResourcesClick}),()=>{set$1(dropdownOpen, +!1)});var div=root$1t(),node2=child(div);component(node2,()=>Root$4,($$anchor2,DropdownMenu_Root)=>{DropdownMenu_Root($$anchor2,{get open(){return get$3(dropdownOpen)},set open($$value){set$1(dropdownOpen,$$value,!0)},children:($$anchor3,$$slotProps)=>{var fragment=root_1$O(),node_1=first_child(fragment);component(node_1,()=>Dropdown_menu_trigger,($$anchor4,DropdownMenu_Trigger)=>{DropdownMenu_Trigger($$anchor4,{name:"Attach files",get disabled(){return disabled()},children:($$anchor5,$$slotProps2)=>{ +var fragment_1=comment$2(),node_2=first_child(fragment_1);snippet(node_2,()=>$$props.trigger,()=>({disabled:disabled()})),append($$anchor5,fragment_1)},$$slots:{default:!0}})});var node_3=sibling(node_1,2);component(node_3,()=>Dropdown_menu_content,($$anchor4,DropdownMenu_Content)=>{DropdownMenu_Content($$anchor4,{align:"start",class:"w-48",children:($$anchor5,$$slotProps2)=>{var fragment_2=root_3$S(),node_4=first_child(fragment_2);each(node_4,17,()=>ATTACHMENT_FILE_ITEMS,item=>item.id,($$anchor6,item)=>{ +const enabled=user_derived(()=>attachmentMenu.isItemEnabled(get$3(item).enabledWhen));var fragment_3=comment$2(),node_5=first_child(fragment_3);{var consequent=$$anchor7=>{var fragment_4=comment$2(),node_6=first_child(fragment_4);{let $0=user_derived(()=>get$3(item).class??"");component(node_6,()=>Dropdown_menu_item,($$anchor8,DropdownMenu_Item)=>{DropdownMenu_Item($$anchor8,{get class(){return`${get$3($0)??""} flex cursor-pointer items-center gap-2`},onclick:()=>attachmentMenu.callbacks[get$3(item). +action](),children:($$anchor9,$$slotProps3)=>{var fragment_5=root_6$s(),node_7=first_child(fragment_5);component(node_7,()=>get$3(item).icon,($$anchor10,item_icon)=>{item_icon($$anchor10,{class:"h-4 w-4"})});var span=sibling(node_7,2),text2=child(span,!0);reset(span),template_effect(()=>set_text(text2,get$3(item).label)),append($$anchor9,fragment_5)},$$slots:{default:!0}})})}append($$anchor7,fragment_4)},consequent_1=$$anchor7=>{var fragment_6=comment$2(),node_8=first_child(fragment_6);component( +node_8,()=>Root$5,($$anchor8,Tooltip_Root)=>{Tooltip_Root($$anchor8,{get delayDuration(){return TOOLTIP_DELAY_DURATION},children:($$anchor9,$$slotProps3)=>{var fragment_7=root_8$r(),node_9=first_child(fragment_7);component(node_9,()=>Tooltip_trigger,($$anchor10,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor10,{class:"w-full",children:($$anchor11,$$slotProps4)=>{var fragment_8=comment$2(),node_10=first_child(fragment_8);{let $0=user_derived(()=>get$3(item).class??"");component(node_10,()=>Dropdown_menu_item, +($$anchor12,DropdownMenu_Item_1)=>{DropdownMenu_Item_1($$anchor12,{get class(){return`${get$3($0)??""} flex cursor-pointer items-center gap-2`},disabled:!0,children:($$anchor13,$$slotProps5)=>{var fragment_9=root_10$f(),node_11=first_child(fragment_9);component(node_11,()=>get$3(item).icon,($$anchor14,item_icon_1)=>{item_icon_1($$anchor14,{class:"h-4 w-4"})});var span_1=sibling(node_11,2),text_1=child(span_1,!0);reset(span_1),template_effect(()=>set_text(text_1,get$3(item).label)),append($$anchor13, +fragment_9)},$$slots:{default:!0}})})}append($$anchor11,fragment_8)},$$slots:{default:!0}})});var node_12=sibling(node_9,2);component(node_12,()=>Tooltip_content,($$anchor10,Tooltip_Content)=>{Tooltip_Content($$anchor10,{side:"right",children:($$anchor11,$$slotProps4)=>{var p2=root_11$e(),text_2=child(p2,!0);reset(p2),template_effect(()=>set_text(text_2,get$3(item).disabledTooltip)),append($$anchor11,p2)},$$slots:{default:!0}})}),append($$anchor9,fragment_7)},$$slots:{default:!0}})}),append($$anchor7, +fragment_6)};if_block(node_5,$$render=>{get$3(enabled)?$$render(consequent):get$3(item).disabledTooltip&&$$render(consequent_1,1)})}append($$anchor6,fragment_3)});var node_13=sibling(node_4,2);{var consequent_3=$$anchor6=>{var fragment_10=comment$2(),node_14=first_child(fragment_10);component(node_14,()=>Root$5,($$anchor7,Tooltip_Root_1)=>{Tooltip_Root_1($$anchor7,{get delayDuration(){return TOOLTIP_DELAY_DURATION},children:($$anchor8,$$slotProps3)=>{var fragment_11=root_13$d(),node_15=first_child( +fragment_11);component(node_15,()=>Tooltip_trigger,($$anchor9,Tooltip_Trigger_1)=>{Tooltip_Trigger_1($$anchor9,{class:"w-full",children:($$anchor10,$$slotProps4)=>{var fragment_12=comment$2(),node_16=first_child(fragment_12);component(node_16,()=>Dropdown_menu_item,($$anchor11,DropdownMenu_Item_2)=>{DropdownMenu_Item_2($$anchor11,{class:"flex cursor-pointer items-center gap-2",get onclick(){return attachmentMenu.callbacks.onFileUpload},children:($$anchor12,$$slotProps5)=>{const pdfItem=user_derived( +()=>ATTACHMENT_FILE_ITEMS.find(i=>i.id===AttachmentMenuItemId.PDF));var fragment_13=comment$2(),node_17=first_child(fragment_13);{var consequent_2=$$anchor13=>{var fragment_14=root_16$6(),node_18=first_child(fragment_14);component(node_18,()=>get$3(pdfItem).icon,($$anchor14,pdfItem_icon)=>{pdfItem_icon($$anchor14,{class:"h-4 w-4"})});var span_2=sibling(node_18,2),text_3=child(span_2,!0);reset(span_2),template_effect(()=>set_text(text_3,get$3(pdfItem).label)),append($$anchor13,fragment_14)};if_block( +node_17,$$render=>{get$3(pdfItem)&&$$render(consequent_2)})}append($$anchor12,fragment_13)},$$slots:{default:!0}})}),append($$anchor10,fragment_12)},$$slots:{default:!0}})});var node_19=sibling(node_15,2);component(node_19,()=>Tooltip_content,($$anchor9,Tooltip_Content_1)=>{Tooltip_Content_1($$anchor9,{side:"right",children:($$anchor10,$$slotProps4)=>{var p_1=root_17$8();append($$anchor10,p_1)},$$slots:{default:!0}})}),append($$anchor8,fragment_11)},$$slots:{default:!0}})}),append($$anchor6,fragment_10)}, +d2=user_derived(()=>!attachmentMenu.isItemEnabled("hasVisionModality"));if_block(node_13,$$render=>{get$3(d2)&&$$render(consequent_3)})}var node_20=sibling(node_13,2);component(node_20,()=>Dropdown_menu_separator,($$anchor6,DropdownMenu_Separator)=>{DropdownMenu_Separator($$anchor6,{})});var node_21=sibling(node_20,2);each(node_21,17,()=>ATTACHMENT_EXTRA_ITEMS,item=>item.id,($$anchor6,item)=>{var fragment_15=comment$2(),node_22=first_child(fragment_15);{var consequent_4=$$anchor7=>{var fragment_16=comment$2(), +node_23=first_child(fragment_16);component(node_23,()=>Root$5,($$anchor8,Tooltip_Root_2)=>{Tooltip_Root_2($$anchor8,{get delayDuration(){return TOOLTIP_DELAY_DURATION},children:($$anchor9,$$slotProps3)=>{var fragment_17=root_20$5(),node_24=first_child(fragment_17);component(node_24,()=>Tooltip_trigger,($$anchor10,Tooltip_Trigger_2)=>{Tooltip_Trigger_2($$anchor10,{class:"w-full",children:($$anchor11,$$slotProps4)=>{var fragment_18=comment$2(),node_25=first_child(fragment_18);component(node_25,()=>Dropdown_menu_item, +($$anchor12,DropdownMenu_Item_3)=>{DropdownMenu_Item_3($$anchor12,{class:"flex cursor-pointer items-center gap-2",onclick:()=>attachmentMenu.callbacks[get$3(item).action](),children:($$anchor13,$$slotProps5)=>{var fragment_19=root_22$2(),node_26=first_child(fragment_19);component(node_26,()=>get$3(item).icon,($$anchor14,item_icon_2)=>{item_icon_2($$anchor14,{class:"h-4 w-4"})});var span_3=sibling(node_26,2),text_4=child(span_3,!0);reset(span_3),template_effect(()=>set_text(text_4,get$3(item).label)), +append($$anchor13,fragment_19)},$$slots:{default:!0}})}),append($$anchor11,fragment_18)},$$slots:{default:!0}})});var node_27=sibling(node_24,2);component(node_27,()=>Tooltip_content,($$anchor10,Tooltip_Content_2)=>{Tooltip_Content_2($$anchor10,{side:"right",children:($$anchor11,$$slotProps4)=>{var p_2=root_23$5(),text_5=child(p_2,!0);reset(p_2),template_effect($0=>set_text(text_5,$0),[()=>attachmentMenu.getSystemMessageTooltip()]),append($$anchor11,p_2)},$$slots:{default:!0}})}),append($$anchor9, +fragment_17)},$$slots:{default:!0}})}),append($$anchor7,fragment_16)};if_block(node_22,$$render=>{get$3(item).id===AttachmentMenuItemId.SYSTEM_MESSAGE&&$$render(consequent_4)})}append($$anchor6,fragment_15)});var node_28=sibling(node_21,2);ChatFormActionAddToolsSubmenu(node_28,{});var node_29=sibling(node_28,2);ChatFormActionAddMcpServersSubmenu(node_29,{onMcpSettingsClick:handleMcpSettingsClick});var node_30=sibling(node_29,2);each(node_30,17,()=>ATTACHMENT_MCP_ITEMS,item=>item.id,($$anchor6,item)=>{ +var fragment_20=comment$2(),node_31=first_child(fragment_20);{var consequent_5=$$anchor7=>{var fragment_21=comment$2(),node_32=first_child(fragment_21);component(node_32,()=>Dropdown_menu_item,($$anchor8,DropdownMenu_Item_4)=>{DropdownMenu_Item_4($$anchor8,{class:"flex cursor-pointer items-center gap-2",onclick:()=>attachmentMenu.callbacks[get$3(item).action](),children:($$anchor9,$$slotProps3)=>{var fragment_22=root_26$2(),node_33=first_child(fragment_22);component(node_33,()=>get$3(item).icon, +($$anchor10,item_icon_3)=>{item_icon_3($$anchor10,{class:"h-4 w-4"})});var span_4=sibling(node_33,2),text_6=child(span_4,!0);reset(span_4),template_effect(()=>set_text(text_6,get$3(item).label)),append($$anchor9,fragment_22)},$$slots:{default:!0}})}),append($$anchor7,fragment_21)},d_12=user_derived(()=>attachmentMenu.isItemVisible(get$3(item).visibleWhen));if_block(node_31,$$render=>{get$3(d_12)&&$$render(consequent_5)})}append($$anchor6,fragment_20)}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}), +append($$anchor3,fragment)},$$slots:{default:!0}})}),reset(div),template_effect(()=>set_class(div,1,`flex items-center gap-1 ${className()??""}`)),append($$anchor,div),pop()}function Sheet_overlay($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data\ +-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=open]:animate-in data-[state=open]:fade-in-0",$$props.class));component(node2,()=>Dialog_overlay$1,($$anchor2,SheetPrimitive_Overlay)=>{SheetPrimitive_Overlay($$anchor2,spread_props({"data-slot":"sheet-overlay",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}const sheetVariants=tv({base:`border-border/30 dark:border-border/20 da\ +ta-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fill-mode-forwards fixed z-50 flex flex-col gap-4 shadow-sm transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 ${PANEL_CLASSES}`,variants:{side:{top:"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",bottom:"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",left:"\ +data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}});var root_3$R=from_html(' Close',1),root_2$12=from_html(" ",1),root_1$N=from_html(" ",1);function Sheet_content($$anchor,$$props){push$1($$props,!0);let ref2=prop( +$$props,"ref",15,null),side=prop($$props,"side",3,"right"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","side","portalProps","children"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Portal$2,($$anchor2,SheetPrimitive_Portal)=>{SheetPrimitive_Portal($$anchor2,spread_props(()=>$$props.portalProps,{children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$N(),node_1=first_child(fragment_1);Sheet_overlay(node_1,{});var node_2=sibling(node_1, +2);{let $0=user_derived(()=>cn$1(sheetVariants({side:side()}),$$props.class));component(node_2,()=>Dialog_content$1,($$anchor4,SheetPrimitive_Content)=>{SheetPrimitive_Content($$anchor4,spread_props({"data-slot":"sheet-content",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$12(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.children??noop$3);var node_4=sibling(node_3,2);component( +node_4,()=>Dialog_close,($$anchor6,SheetPrimitive_Close)=>{SheetPrimitive_Close($$anchor6,{class:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:pointer-events-none",children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$R(),node_5=first_child(fragment_3);X(node_5,{class:"size-4"}),next$1(2),append($$anchor7,fragment_3)},$$slots:{ +default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}}))})}append($$anchor3,fragment_1)},$$slots:{default:!0}}))}),append($$anchor,fragment),pop()}var root$1s=from_html("
");function Sheet_header($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$1s();attribute_effect(div,$0=>({"data-slot":"sheet-header",class:$0,...restProps}),[()=>cn$1("flex fle\ +x-col gap-1.5 p-4",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}function Sheet_title($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("font-semibold text-foreground",$$props.class));component( +node2,()=>Dialog_title$1,($$anchor2,SheetPrimitive_Title)=>{SheetPrimitive_Title($$anchor2,spread_props({"data-slot":"sheet-title",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}function Sheet_description($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment); +{let $0=user_derived(()=>cn$1("text-sm text-muted-foreground",$$props.class));component(node2,()=>Dialog_description$1,($$anchor2,SheetPrimitive_Description)=>{SheetPrimitive_Description($$anchor2,spread_props({"data-slot":"sheet-description",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}const Root$3=Dialog;var root_3$Q=from_html(" ",1),root_7$r=from_html(''),root_11$d=from_html("

"),root_9$k=from_html(" ",1),root_15$9=from_html(''),root_16$5=from_html("

PDFs will be converted to text. Image-based PDFs may not work properly.

"),root_14$5=from_html(" ",1),root_20$4=from_html(''),root_21$3=from_html("

"),root_19$9=from_html(" ",1),root_23$4=from_html(''),root_2$11=from_html(' ',1),root_1$M=from_html(" ",1),root$1r=from_html("
");function ChatFormActionAddSheet($$anchor,$$props){ push$1($$props,!0);let className=prop($$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),hasAudioModality=prop($$props,"hasAudioModality",3,!1),hasVisionModality=prop($$props,"hasVisionModality",3,!1),hasMcpPromptsSupport=prop($$props,"hasMcpPromptsSupport",3,!1),hasMcpResourcesSupport=prop($$props,"hasMcpResourcesSupport",3,!1),sheetOpen=state$1(!1);const attachmentMenu=useAttachmentMenu(()=>({hasVisionModality:hasVisionModality(),hasAudioModality:hasAudioModality(),hasMcpPromptsSupport:hasMcpPromptsSupport(), hasMcpResourcesSupport:hasMcpResourcesSupport()}),()=>({onFileUpload:$$props.onFileUpload,onSystemPromptClick:$$props.onSystemPromptClick,onMcpPromptClick:$$props.onMcpPromptClick,onMcpResourcesClick:$$props.onMcpResourcesClick}),()=>{set$1(sheetOpen,!1)}),sheetItemClass="flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm transition-colors hover:bg-accent active:bg-accent disabled:cursor-not-allowed disabled:opacity-50";var div=root$1r(),node2=child(div);component(node2,()=>Root$3, ($$anchor2,Sheet_Root)=>{Sheet_Root($$anchor2,{get open(){return get$3(sheetOpen)},set open($$value){set$1(sheetOpen,$$value,!0)},children:($$anchor3,$$slotProps)=>{var fragment=root_1$M(),node_1=first_child(fragment);snippet(node_1,()=>$$props.trigger,()=>({disabled:disabled(),onclick:()=>set$1(sheetOpen,!0)}));var node_2=sibling(node_1,2);component(node_2,()=>Sheet_content,($$anchor4,Sheet_Content)=>{Sheet_Content($$anchor4,{side:"bottom",class:"max-h-[85vh] gap-0 overflow-y-auto",children:($$anchor5,$$slotProps2)=>{ @@ -6934,8 +6937,8 @@ cache2,percent=Math.round(actualProcessed/actualTotal*100),eta=getETASecs(actual 0&&time_ms>0){const tokensPerSecond=actualProcessed/(time_ms/1e3);return{tokensProcessed:actualProcessed,totalTokens:actualTotal,timeMs:time_ms,tokensPerSecond}}}return get$3(lastKnownProcessingStats)}function getLiveGenerationStats(){if(!get$3(processingState))return null;const{tokensDecoded,tokensPerSecond}=get$3(processingState);if(tokensDecoded<=0)return null;const timeMs=tokensPerSecond&&tokensPerSecond>0?tokensDecoded/tokensPerSecond*1e3:0;return{tokensGenerated:tokensDecoded,timeMs,tokensPerSecond:tokensPerSecond|| 0}}return{get processingState(){return get$3(processingState)},getProcessingDetails,getTechnicalDetails,getProcessingMessage,getPromptProgressText,getLiveProcessingStats,getLiveGenerationStats,shouldShowDetails,startMonitoring,stopMonitoring}}var root_1$y=from_html('
'),root_4$s=from_html('
 
'),root_6$l=from_html( '
'),root_7$j=from_html('
'),root_8$l=from_html('
'),root$15=from_html('
');function ChatMessageAssistant($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),isLastAssistantMessage=prop($$props,"isLastAssistantMessage",3,!1),toolMessages=prop($$props,"toolMessages",19,()=>[]),siblingInfo=prop($$props,"siblingInfo",3,null);const editCtx=getMessageEditContext(),isAgentic=user_derived(()=>hasAgenticContent($$props.message,toolMessages())),hasReasoning=user_derived(()=>!!$$props.message.reasoningContent),processingState=useProcessingState(); -let currentConfig=user_derived(config$1),isRouter=user_derived(isRouterMode),showRawOutput=state$1(!1),rawOutputContent=user_derived(()=>{const sections=deriveAgenticSections($$props.message,toolMessages(),[],!1),parts=[];for(const section of sections)switch(section.type){case AgenticSectionType.REASONING:case AgenticSectionType.REASONING_PENDING:parts.push(`${REASONING_TAGS.START} +div>');function ChatMessageAssistant($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),isLastAssistantMessage=prop($$props,"isLastAssistantMessage",3,!1),toolMessages=prop($$props,"toolMessages",19,()=>[]),siblingInfo=prop($$props,"siblingInfo",3,null);const editCtx=getMessageEditContext(),isAgentic=user_derived(()=>hasAgenticContent($$props.message,toolMessages())),processingState=useProcessingState();let currentConfig=user_derived(config$1),isRouter=user_derived(isRouterMode), +showRawOutput=state$1(!1),rawOutputContent=user_derived(()=>{const sections=deriveAgenticSections($$props.message,toolMessages(),[],!1),parts=[];for(const section of sections)switch(section.type){case AgenticSectionType.REASONING:case AgenticSectionType.REASONING_PENDING:parts.push(`${REASONING_TAGS.START} ${section.content} ${REASONING_TAGS.END}`);break;case AgenticSectionType.TEXT:parts.push(section.content);break;case AgenticSectionType.TOOL_CALL:case AgenticSectionType.TOOL_CALL_PENDING:case AgenticSectionType.TOOL_CALL_STREAMING:{const callObj={name:section.toolName};if(section.toolArgs)try{callObj.arguments=JSON.parse(section.toolArgs)}catch{callObj.arguments=section.toolArgs}parts.push(JSON.stringify(callObj,null,2)),section.toolResult&&parts.push(`[Tool Result] ${section.toolResult}`);break}}return parts.join(` @@ -6955,24 +6958,24 @@ isRouter)?$$render(consequent_5):$$render(alternate_2,-1)})}var node_6=sibling(n promptProgress=user_derived(()=>processingState.processingState?.promptProgress),isStillProcessingPrompt=user_derived(()=>get$3(promptProgress)&&get$3(promptProgress).processed{{let $0=user_derived(()=>!!get$3(isStillProcessingPrompt)),$1=user_derived(()=>get$3(liveStats)?.tokensProcessed),$2=user_derived(()=>get$3(liveStats)?.timeMs),$3=user_derived(()=>get$3(genStats)?.tokensGenerated), $4=user_derived(()=>get$3(genStats)?.timeMs);ChatMessageStatistics($$anchor4,{isLive:!0,get isProcessingPrompt(){return get$3($0)},get promptTokens(){return get$3($1)},get promptMs(){return get$3($2)},get predictedTokens(){return get$3($3)},get predictedMs(){return get$3($4)}})}};if_block(node_7,$$render=>{(get$3(liveStats)||get$3(genStats))&&$$render(consequent_7)})}append($$anchor3,fragment_6)},d2=user_derived(()=>isLoading()&&get$3(currentConfig).showMessageStats);if_block(node_6,$$render=>{get$3( currentConfig).showMessageStats&&$$props.message.timings&&$$props.message.timings.predicted_n&&$$props.message.timings.predicted_ms?$$render(consequent_6):get$3(d2)&&$$render(consequent_8,1)})}reset(div_7),bind_this(div_7,$$value=>set$1(statsContainerEl,$$value),()=>get$3(statsContainerEl)),append($$anchor2,div_7)};if_block(node_4,$$render=>{get$3(displayedModel)&&$$render(consequent_9)})}reset(div_6);var node_8=sibling(div_6,2);{var consequent_10=$$anchor2=>{{let $0=user_derived(()=>get$3(currentConfig). -enableContinueGeneration&&!get$3(hasReasoning)?$$props.onContinue:void 0);ChatMessageActionIcons($$anchor2,{get role(){return MessageRole.ASSISTANT},justify:"start",actionsPosition:"left",get siblingInfo(){return siblingInfo()},get showDeleteDialog(){return $$props.showDeleteDialog},get deletionInfo(){return $$props.deletionInfo},get onCopy(){return $$props.onCopy},get onEdit(){return $$props.onEdit},get onRegenerate(){return $$props.onRegenerate},get onContinue(){return get$3($0)},get onForkConversation(){ -return $$props.onForkConversation},get onDelete(){return $$props.onDelete},get onConfirmDelete(){return $$props.onConfirmDelete},get onNavigateToSibling(){return $$props.onNavigateToSibling},get onShowDeleteDialogChange(){return $$props.onShowDeleteDialogChange},get showRawOutputSwitch(){return get$3(currentConfig).showRawOutputSwitch},get rawOutputEnabled(){return get$3(showRawOutput)},onRawOutputToggle:enabled=>set$1(showRawOutput,enabled,!0)})}};if_block(node_8,$$render=>{$$props.message.timestamp&& -!editCtx.isEditing&&$$render(consequent_10)})}reset(div),template_effect(()=>set_class(div,1,`text-md group w-full leading-7.5 ${className()??""}`,"svelte-3902tz")),append($$anchor,div),pop()}var root_1$x=from_html('
'),root_2$O=from_html('
'),root_3$G=from_html("
"),root_4$r=from_html(" Cancel",1),root$14=from_html('
',1);function ChatMessageEditForm($$anchor,$$props){push$1($$props,!0);const editCtx=getMessageEditContext();let saveWithoutRegenerate=state$1(!1),showDiscardDialog=state$1(!1),branchAfterEdit=state$1( -!1),isUserMessage=user_derived(()=>editCtx.messageRole===MessageRole.USER),isAssistantMessage=user_derived(()=>editCtx.messageRole===MessageRole.ASSISTANT),hasUnsavedChanges=user_derived(()=>!!(editCtx.editedContent!==editCtx.originalContent||editCtx.editedUploadedFiles.length>0||editCtx.editedExtras.length!==editCtx.originalExtras.length||editCtx.editedExtras.some((extra,i)=>extra!==editCtx.originalExtras[i]))),hasAttachments=user_derived(()=>editCtx.editedExtras&&editCtx.editedExtras.length>0|| -editCtx.editedUploadedFiles&&editCtx.editedUploadedFiles.length>0),canSubmit=user_derived(()=>editCtx.editedContent.trim().length>0||get$3(hasAttachments));function handleGlobalKeydown(event2){event2.key===KeyboardKey.ESCAPE&&(event2.preventDefault(),attemptCancel())}function attemptCancel(){get$3(hasUnsavedChanges)?set$1(showDiscardDialog,!0):editCtx.cancel()}function handleSubmit(){get$3(canSubmit)&&(get$3(isUserMessage)&&get$3(saveWithoutRegenerate)&&editCtx.showSaveOnlyOption?editCtx.saveOnly(): -(get$3(isAssistantMessage)&&editCtx.setShouldBranchAfterEdit&&editCtx.setShouldBranchAfterEdit(get$3(branchAfterEdit)),editCtx.save()),set$1(saveWithoutRegenerate,!1),set$1(branchAfterEdit,!1))}function handleAttachmentRemove(index2){const newExtras=[...editCtx.editedExtras];newExtras.splice(index2,1),editCtx.setExtras(newExtras)}function handleUploadedFileRemove(fileId){const newFiles=editCtx.editedUploadedFiles.filter(f=>f.id!==fileId);editCtx.setUploadedFiles(newFiles)}async function handleFilesAdd(files){ -const processed=await processFilesToChatUploaded(files);editCtx.setUploadedFiles([...editCtx.editedUploadedFiles,...processed])}user_effect(()=>(chatStore.setEditModeActive(handleFilesAdd),()=>{chatStore.clearEditMode()}));var fragment=root$14();event("keydown",$window,handleGlobalKeydown);var div=first_child(fragment),node2=child(div);{let $0=user_derived(()=>editCtx.messageRole===MessageRole.USER),$1=user_derived(()=>editCtx.messageRole===MessageRole.USER);ChatForm(node2,{get value(){return editCtx. -editedContent},get attachments(){return editCtx.editedExtras},placeholder:"Edit your message...",showMcpPromptButton:!0,get showAddButton(){return get$3($0)},get showModelSelector(){return get$3($1)},get onValueChange(){return editCtx.setContent},onAttachmentRemove:handleAttachmentRemove,onUploadedFileRemove:handleUploadedFileRemove,onFilesAdd:handleFilesAdd,onSubmit:handleSubmit,get uploadedFiles(){return editCtx.editedUploadedFiles},set uploadedFiles($$value){editCtx.editedUploadedFiles=$$value}})} -reset(div);var div_1=sibling(div,2),node_1=child(div_1);{var consequent=$$anchor2=>{var div_2=root_1$x(),node_2=child(div_2);Switch(node_2,{id:"save-only-switch",class:"scale-75",get checked(){return get$3(saveWithoutRegenerate)},set checked($$value){set$1(saveWithoutRegenerate,$$value,!0)}}),next$1(2),reset(div_2),append($$anchor2,div_2)},consequent_1=$$anchor2=>{var div_3=root_2$O(),node_3=child(div_3);Switch(node_3,{id:"branch-after-edit",class:"scale-75",get checked(){return get$3(branchAfterEdit)}, -set checked($$value){set$1(branchAfterEdit,$$value,!0)}}),next$1(2),reset(div_3),append($$anchor2,div_3)},alternate=$$anchor2=>{var div_4=root_3$G();append($$anchor2,div_4)};if_block(node_1,$$render=>{get$3(isUserMessage)&&editCtx.showSaveOnlyOption?$$render(consequent):get$3(isAssistantMessage)?$$render(consequent_1,1):$$render(alternate,-1)})}var node_4=sibling(node_1,2);Button(node_4,{class:"h-7 px-3 text-xs",onclick:attemptCancel,size:"sm",variant:"ghost",children:($$anchor2,$$slotProps)=>{var fragment_1=root_4$r(), -node_5=first_child(fragment_1);X(node_5,{class:"mr-1 h-3 w-3"}),next$1(),append($$anchor2,fragment_1)},$$slots:{default:!0}}),reset(div_1);var node_6=sibling(div_1,2);DialogConfirmation(node_6,{title:"Discard changes?",description:"You have unsaved changes. Are you sure you want to discard them?",confirmText:"Discard",cancelText:"Keep editing",variant:"destructive",get icon(){return Triangle_alert},get onConfirm(){return editCtx.cancel},onCancel:()=>set$1(showDiscardDialog,!1),get open(){return get$3( -showDiscardDialog)},set open($$value){set$1(showDiscardDialog,$$value,!0)}}),append($$anchor,fragment),pop()}var root_3$F=from_html('
'),root_2$N=from_html(" ",1),root$13=from_html('
');function ChatMessageUser($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),siblingInfo=prop($$props,"siblingInfo",3,null);const editCtx=getMessageEditContext();var div=root$13(),node2=child( -div);{var consequent=$$anchor2=>{ChatMessageEditForm($$anchor2,{})},alternate=$$anchor2=>{var fragment_1=root_2$N(),node_1=first_child(fragment_1);ChatMessageUserBubble(node_1,{get content(){return $$props.message.content},get attachments(){return $$props.message.extra},renderMarkdown:!0});var node_2=sibling(node_1,2);{var consequent_1=$$anchor3=>{var div_1=root_3$F(),node_3=child(div_1);ChatMessageActionIcons(node_3,{actionsPosition:"right",get deletionInfo(){return $$props.deletionInfo},justify:"\ -end",get onConfirmDelete(){return $$props.onConfirmDelete},get onCopy(){return $$props.onCopy},get onDelete(){return $$props.onDelete},get onEdit(){return $$props.onEdit},get onForkConversation(){return $$props.onForkConversation},get onNavigateToSibling(){return $$props.onNavigateToSibling},get onShowDeleteDialogChange(){return $$props.onShowDeleteDialogChange},get siblingInfo(){return siblingInfo()},get showDeleteDialog(){return $$props.showDeleteDialog},get role(){return MessageRole.USER}}),reset( -div_1),append($$anchor3,div_1)};if_block(node_2,$$render=>{$$props.message.timestamp&&$$render(consequent_1)})}append($$anchor2,fragment_1)};if_block(node2,$$render=>{editCtx.isEditing?$$render(consequent):$$render(alternate,-1)})}reset(div),template_effect(()=>set_class(div,1,`group flex flex-col items-end gap-3 md:gap-2 ${className()??""}`)),append($$anchor,div),pop()}var root_1$w=from_html('
'),root_4$q=from_html("
"),root_5$k=from_html(' '),root$12=from_html(" ",1);function ChatMessageUserBubble($$anchor,$$props){push$1($$props,!0);let attachments=prop($$props,"attachments",19,()=>[]),renderMarkdown=prop($$props,"renderMarkdown",3,!1),textColorClass=prop($$props,"textColorClass",3,"text-foreground"),cardBgClass=prop($$props,"cardBgClass",3,"dark:bg-primary/15"),maxHeightStyle=prop($$props,"maxHeightStyle",3,"max-height: var(--max-message-height);"),isMultiline=state$1(!1),messageElement=state$1( -void 0);const currentConfig=config$1();user_effect(()=>{if(!get$3(messageElement)||!$$props.content.trim())return;if($$props.content.includes(` +enableContinueGeneration?$$props.onContinue:void 0);ChatMessageActionIcons($$anchor2,{get role(){return MessageRole.ASSISTANT},justify:"start",actionsPosition:"left",get siblingInfo(){return siblingInfo()},get showDeleteDialog(){return $$props.showDeleteDialog},get deletionInfo(){return $$props.deletionInfo},get onCopy(){return $$props.onCopy},get onEdit(){return $$props.onEdit},get onRegenerate(){return $$props.onRegenerate},get onContinue(){return get$3($0)},get onForkConversation(){return $$props. +onForkConversation},get onDelete(){return $$props.onDelete},get onConfirmDelete(){return $$props.onConfirmDelete},get onNavigateToSibling(){return $$props.onNavigateToSibling},get onShowDeleteDialogChange(){return $$props.onShowDeleteDialogChange},get showRawOutputSwitch(){return get$3(currentConfig).showRawOutputSwitch},get rawOutputEnabled(){return get$3(showRawOutput)},onRawOutputToggle:enabled=>set$1(showRawOutput,enabled,!0)})}};if_block(node_8,$$render=>{$$props.message.timestamp&&!editCtx. +isEditing&&$$render(consequent_10)})}reset(div),template_effect(()=>set_class(div,1,`text-md group w-full leading-7.5 ${className()??""}`,"svelte-3902tz")),append($$anchor,div),pop()}var root_1$x=from_html('
'),root_2$O=from_html('
'),root_3$G=from_html("
"),root_4$r=from_html(" Cancel",1),root$14=from_html('
',1);function ChatMessageEditForm($$anchor,$$props){push$1($$props,!0);const editCtx=getMessageEditContext();let saveWithoutRegenerate=state$1(!1),showDiscardDialog=state$1(!1),branchAfterEdit=state$1(!1),isUserMessage=user_derived( +()=>editCtx.messageRole===MessageRole.USER),isAssistantMessage=user_derived(()=>editCtx.messageRole===MessageRole.ASSISTANT),hasUnsavedChanges=user_derived(()=>!!(editCtx.editedContent!==editCtx.originalContent||editCtx.editedUploadedFiles.length>0||editCtx.editedExtras.length!==editCtx.originalExtras.length||editCtx.editedExtras.some((extra,i)=>extra!==editCtx.originalExtras[i]))),hasAttachments=user_derived(()=>editCtx.editedExtras&&editCtx.editedExtras.length>0||editCtx.editedUploadedFiles&&editCtx. +editedUploadedFiles.length>0),canSubmit=user_derived(()=>editCtx.editedContent.trim().length>0||get$3(hasAttachments));function handleGlobalKeydown(event2){event2.key===KeyboardKey.ESCAPE&&(event2.preventDefault(),attemptCancel())}function attemptCancel(){get$3(hasUnsavedChanges)?set$1(showDiscardDialog,!0):editCtx.cancel()}function handleSubmit(){get$3(canSubmit)&&(get$3(isUserMessage)&&get$3(saveWithoutRegenerate)&&editCtx.showSaveOnlyOption?editCtx.saveOnly():(get$3(isAssistantMessage)&&editCtx. +setShouldBranchAfterEdit&&editCtx.setShouldBranchAfterEdit(get$3(branchAfterEdit)),editCtx.save()),set$1(saveWithoutRegenerate,!1),set$1(branchAfterEdit,!1))}function handleAttachmentRemove(index2){const newExtras=[...editCtx.editedExtras];newExtras.splice(index2,1),editCtx.setExtras(newExtras)}function handleUploadedFileRemove(fileId){const newFiles=editCtx.editedUploadedFiles.filter(f=>f.id!==fileId);editCtx.setUploadedFiles(newFiles)}async function handleFilesAdd(files){const processed=await processFilesToChatUploaded( +files);editCtx.setUploadedFiles([...editCtx.editedUploadedFiles,...processed])}user_effect(()=>(chatStore.setEditModeActive(handleFilesAdd),()=>{chatStore.clearEditMode()}));var fragment=root$14();event("keydown",$window,handleGlobalKeydown);var div=first_child(fragment),node2=child(div);{let $0=user_derived(()=>editCtx.messageRole===MessageRole.USER),$1=user_derived(()=>editCtx.messageRole===MessageRole.USER);ChatForm(node2,{get value(){return editCtx.editedContent},get attachments(){return editCtx. +editedExtras},placeholder:"Edit your message...",showMcpPromptButton:!0,get showAddButton(){return get$3($0)},get showModelSelector(){return get$3($1)},get onValueChange(){return editCtx.setContent},onAttachmentRemove:handleAttachmentRemove,onUploadedFileRemove:handleUploadedFileRemove,onFilesAdd:handleFilesAdd,onSubmit:handleSubmit,get uploadedFiles(){return editCtx.editedUploadedFiles},set uploadedFiles($$value){editCtx.editedUploadedFiles=$$value}})}reset(div);var div_1=sibling(div,2),node_1=child( +div_1);{var consequent=$$anchor2=>{var div_2=root_1$x(),node_2=child(div_2);Switch(node_2,{id:"save-only-switch",class:"scale-75",get checked(){return get$3(saveWithoutRegenerate)},set checked($$value){set$1(saveWithoutRegenerate,$$value,!0)}}),next$1(2),reset(div_2),append($$anchor2,div_2)},consequent_1=$$anchor2=>{var div_3=root_2$O(),node_3=child(div_3);Switch(node_3,{id:"branch-after-edit",class:"scale-75",get checked(){return get$3(branchAfterEdit)},set checked($$value){set$1(branchAfterEdit, +$$value,!0)}}),next$1(2),reset(div_3),append($$anchor2,div_3)},alternate=$$anchor2=>{var div_4=root_3$G();append($$anchor2,div_4)};if_block(node_1,$$render=>{get$3(isUserMessage)&&editCtx.showSaveOnlyOption?$$render(consequent):get$3(isAssistantMessage)?$$render(consequent_1,1):$$render(alternate,-1)})}var node_4=sibling(node_1,2);Button(node_4,{class:"h-7 px-3 text-xs",onclick:attemptCancel,size:"sm",variant:"ghost",children:($$anchor2,$$slotProps)=>{var fragment_1=root_4$r(),node_5=first_child( +fragment_1);X(node_5,{class:"mr-1 h-3 w-3"}),next$1(),append($$anchor2,fragment_1)},$$slots:{default:!0}}),reset(div_1);var node_6=sibling(div_1,2);DialogConfirmation(node_6,{title:"Discard changes?",description:"You have unsaved changes. Are you sure you want to discard them?",confirmText:"Discard",cancelText:"Keep editing",variant:"destructive",get icon(){return Triangle_alert},get onConfirm(){return editCtx.cancel},onCancel:()=>set$1(showDiscardDialog,!1),get open(){return get$3(showDiscardDialog)}, +set open($$value){set$1(showDiscardDialog,$$value,!0)}}),append($$anchor,fragment),pop()}var root_3$F=from_html('
'),root_2$N=from_html(" ",1),root$13=from_html('
');function ChatMessageUser($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),siblingInfo=prop($$props,"siblingInfo",3,null);const editCtx=getMessageEditContext();var div=root$13(),node2=child(div);{var consequent=$$anchor2=>{ +ChatMessageEditForm($$anchor2,{})},alternate=$$anchor2=>{var fragment_1=root_2$N(),node_1=first_child(fragment_1);ChatMessageUserBubble(node_1,{get content(){return $$props.message.content},get attachments(){return $$props.message.extra},renderMarkdown:!0});var node_2=sibling(node_1,2);{var consequent_1=$$anchor3=>{var div_1=root_3$F(),node_3=child(div_1);ChatMessageActionIcons(node_3,{actionsPosition:"right",get deletionInfo(){return $$props.deletionInfo},justify:"end",get onConfirmDelete(){return $$props. +onConfirmDelete},get onCopy(){return $$props.onCopy},get onDelete(){return $$props.onDelete},get onEdit(){return $$props.onEdit},get onForkConversation(){return $$props.onForkConversation},get onNavigateToSibling(){return $$props.onNavigateToSibling},get onShowDeleteDialogChange(){return $$props.onShowDeleteDialogChange},get siblingInfo(){return siblingInfo()},get showDeleteDialog(){return $$props.showDeleteDialog},get role(){return MessageRole.USER}}),reset(div_1),append($$anchor3,div_1)};if_block( +node_2,$$render=>{$$props.message.timestamp&&$$render(consequent_1)})}append($$anchor2,fragment_1)};if_block(node2,$$render=>{editCtx.isEditing?$$render(consequent):$$render(alternate,-1)})}reset(div),template_effect(()=>set_class(div,1,`group flex flex-col items-end gap-3 md:gap-2 ${className()??""}`)),append($$anchor,div),pop()}var root_1$w=from_html('
'),root_4$q=from_html("
"),root_5$k=from_html(' '),root$12=from_html(" ",1);function ChatMessageUserBubble($$anchor,$$props){push$1($$props,!0);let attachments=prop($$props,"attachments",19,()=>[]),renderMarkdown=prop($$props,"renderMarkdown",3,!1),textColorClass=prop($$props,"textColorClass",3,"text-foreground"),cardBgClass=prop($$props,"cardBgClass",3,"dark:bg-primary/15"),maxHeightStyle=prop($$props,"maxHeightStyle",3,"max-height: var(--max-message-height);"),isMultiline=state$1(!1),messageElement=state$1(void 0);const currentConfig=config$1(); +user_effect(()=>{if(!get$3(messageElement)||!$$props.content.trim())return;if($$props.content.includes(` `)){set$1(isMultiline,!0);return}const resizeObserver=new ResizeObserver(entries=>{for(const entry of entries){const element2=entry.target;set$1(isMultiline,element2.offsetHeight>24*1.5)}});return resizeObserver.observe(get$3(messageElement)),()=>{resizeObserver.disconnect()}});var fragment=root$12(),node2=first_child(fragment);{var consequent=$$anchor2=>{var div=root_1$w(),node_1=child(div);ChatAttachmentsList(node_1,{get attachments(){return attachments()},readonly:!0,imageHeight:"h-40"}),reset( div),append($$anchor2,div)};if_block(node2,$$render=>{attachments()&&attachments().length>0&&$$render(consequent)})}var node_2=sibling(node2,2);{var consequent_2=$$anchor2=>{{let $0=user_derived(()=>get$3(isMultiline)?"":void 0);Card($$anchor2,{get class(){return`max-w-[80%] overflow-y-auto rounded-[1.125rem] border-none bg-primary/5 px-3.75 py-1.5 ${textColorClass()??""} backdrop-blur-md data-[multiline]:py-2.5 ${cardBgClass()??""}`},get"data-multiline"(){return get$3($0)},get style(){return`${maxHeightStyle()?? ""} overflow-wrap: anywhere; word-break: break-word;`},children:($$anchor3,$$slotProps)=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);{var consequent_1=$$anchor4=>{var div_1=root_4$q(),node_4=child(div_1);MarkdownContent(node_4,{class:"markdown-user-content -my-4",get content(){return $$props.content}}),reset(div_1),bind_this(div_1,$$value=>set$1(messageElement,$$value),()=>get$3(messageElement)),append($$anchor4,div_1)},alternate=$$anchor4=>{var span=root_5$k(),text2=child(span,!0); diff --git a/tools/server/server-common.cpp b/tools/server/server-common.cpp index 21c843c0d69..0675ce31d06 100644 --- a/tools/server/server-common.cpp +++ b/tools/server/server-common.cpp @@ -1082,11 +1082,12 @@ json oaicompat_chat_params_parse( throw std::invalid_argument("Cannot have 2 or more assistant messages at the end of the list."); } - /* TODO: test this properly */ - inputs.reasoning_format = COMMON_REASONING_FORMAT_NONE; - - if ( inputs.enable_thinking ) { - throw std::invalid_argument("Assistant response prefill is incompatible with enable_thinking."); + // reject reasoning prefill on channel based templates that do not expose explicit thinking tags + if (!last_message.reasoning_content.empty() && inputs.enable_thinking) { + auto probe_params = common_chat_templates_apply(opt.tmpls.get(), inputs); + if (probe_params.supports_thinking && probe_params.thinking_end_tag.empty()) { + throw std::invalid_argument("Assistant prefill with reasoning_content is not supported yet for this template."); + } } inputs.add_generation_prompt = true; @@ -1098,6 +1099,42 @@ json oaicompat_chat_params_parse( /* Append assistant prefilled message */ if (prefill_assistant_message) { + const bool thinking_active = chat_params.supports_thinking && !chat_params.thinking_end_tag.empty(); + const bool has_reasoning = !last_message.reasoning_content.empty(); + const bool has_content = !last_message.content.empty() || !last_message.content_parts.empty(); + const bool mid_reasoning = has_reasoning && !has_content; + + // some templates inject thinking_start in generation_prompt, others let the model emit it + const bool gp_has_think = thinking_active + && chat_params.generation_prompt.find(chat_params.thinking_start_tag) != std::string::npos; + + // open the thinking block when reasoning is present and the template did not inject it + if (has_reasoning) { + if (thinking_active && !gp_has_think) { + chat_params.prompt += chat_params.thinking_start_tag; + } + chat_params.prompt += last_message.reasoning_content; + } + + if (thinking_active) { + if (mid_reasoning) { + // model continues inside the thinking block, keep generation_prompt open on think + if (!gp_has_think) { + chat_params.generation_prompt += chat_params.thinking_start_tag; + } + } else { + // close thinking block when reasoning is followed by content, or when the template forced it open + if (has_reasoning || gp_has_think) { + chat_params.prompt += chat_params.thinking_end_tag; + } + // strip thinking_start from generation_prompt so the parser routes model output as content + auto pos = chat_params.generation_prompt.rfind(chat_params.thinking_start_tag); + if (pos != std::string::npos) { + chat_params.generation_prompt = chat_params.generation_prompt.substr(0, pos); + } + } + } + if (!last_message.content_parts.empty()) { for (auto & p : last_message.content_parts) { chat_params.prompt += p.text; diff --git a/tools/server/webui/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageAssistant/ChatMessageAssistant.svelte b/tools/server/webui/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageAssistant/ChatMessageAssistant.svelte index 2fb6066d9e8..b4d69b932ab 100644 --- a/tools/server/webui/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageAssistant/ChatMessageAssistant.svelte +++ b/tools/server/webui/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageAssistant/ChatMessageAssistant.svelte @@ -74,7 +74,6 @@ const editCtx = getMessageEditContext(); const isAgentic = $derived(hasAgenticContent(message, toolMessages)); - const hasReasoning = $derived(!!message.reasoningContent); const processingState = useProcessingState(); let currentConfig = $derived(config()); @@ -329,7 +328,7 @@ {onCopy} {onEdit} {onRegenerate} - onContinue={currentConfig.enableContinueGeneration && !hasReasoning ? onContinue : undefined} + onContinue={currentConfig.enableContinueGeneration ? onContinue : undefined} {onForkConversation} {onDelete} {onConfirmDelete} diff --git a/tools/server/webui/src/lib/constants/settings-registry.ts b/tools/server/webui/src/lib/constants/settings-registry.ts index 9c7cc2bf69c..809f780640c 100644 --- a/tools/server/webui/src/lib/constants/settings-registry.ts +++ b/tools/server/webui/src/lib/constants/settings-registry.ts @@ -122,7 +122,7 @@ const SETTINGS_REGISTRY: Record = { { key: SETTINGS_KEYS.ENABLE_CONTINUE_GENERATION, label: 'Enable "Continue" button', - help: 'Enable "Continue" button for assistant messages. Currently works only with non-reasoning models.', + help: 'Enable "Continue" button for assistant messages, including reasoning models.', defaultValue: false, type: SettingsFieldType.CHECKBOX, section: SETTINGS_SECTION_SLUGS.GENERAL, diff --git a/tools/server/webui/src/lib/stores/chat.svelte.ts b/tools/server/webui/src/lib/stores/chat.svelte.ts index 7157068e9ba..7b4a4e04293 100644 --- a/tools/server/webui/src/lib/stores/chat.svelte.ts +++ b/tools/server/webui/src/lib/stores/chat.svelte.ts @@ -674,7 +674,8 @@ class ChatStore { }, onReasoningChunk: (chunk: string) => { streamedReasoningContent += chunk; - // Update UI to show reasoning is being received + // mark streaming state so a stop mid-thinking can persist the partial reasoning + this.setChatStreaming(convId, streamedContent, currentMessageId); const idx = conversationsStore.findMessageIndex(currentMessageId); conversationsStore.updateMessageAtIndex(idx, { reasoningContent: streamedReasoningContent @@ -989,38 +990,51 @@ class ChatStore { const conversationId = convId || conversationsStore.activeConversation?.id; if (!conversationId) return; const streamingState = this.getChatStreaming(conversationId); - if (!streamingState || !streamingState.response.trim()) return; + if (!streamingState) return; const messages = conversationId === conversationsStore.activeConversation?.id ? conversationsStore.activeMessages : await conversationsStore.getConversationMessages(conversationId); if (!messages.length) return; const lastMessage = messages[messages.length - 1]; - if (lastMessage?.role === MessageRole.ASSISTANT) { - try { - const updateData: { content: string; timings?: ChatMessageTimings } = { - content: streamingState.response + if (lastMessage?.role !== MessageRole.ASSISTANT) return; + + const partialContent = streamingState.response; + const partialReasoning = lastMessage.reasoningContent || ''; + + // nothing to persist when both content and reasoning are empty (e.g. stop before any token) + if (!partialContent.trim() && !partialReasoning.trim()) return; + + try { + const updateData: { + content: string; + reasoningContent?: string; + timings?: ChatMessageTimings; + } = { + content: partialContent + }; + if (partialReasoning) { + updateData.reasoningContent = partialReasoning; + } + const lastKnownState = this.getProcessingState(conversationId); + if (lastKnownState) { + updateData.timings = { + prompt_n: lastKnownState.promptTokens || 0, + prompt_ms: lastKnownState.promptMs, + predicted_n: lastKnownState.tokensDecoded || 0, + cache_n: lastKnownState.cacheTokens || 0, + predicted_ms: + lastKnownState.tokensPerSecond && lastKnownState.tokensDecoded + ? (lastKnownState.tokensDecoded / lastKnownState.tokensPerSecond) * 1000 + : undefined }; - const lastKnownState = this.getProcessingState(conversationId); - if (lastKnownState) { - updateData.timings = { - prompt_n: lastKnownState.promptTokens || 0, - prompt_ms: lastKnownState.promptMs, - predicted_n: lastKnownState.tokensDecoded || 0, - cache_n: lastKnownState.cacheTokens || 0, - predicted_ms: - lastKnownState.tokensPerSecond && lastKnownState.tokensDecoded - ? (lastKnownState.tokensDecoded / lastKnownState.tokensPerSecond) * 1000 - : undefined - }; - } - await DatabaseService.updateMessage(lastMessage.id, updateData); - lastMessage.content = streamingState.response; - if (updateData.timings) lastMessage.timings = updateData.timings; - } catch (error) { - lastMessage.content = streamingState.response; - console.error('Failed to save partial response:', error); } + await DatabaseService.updateMessage(lastMessage.id, updateData); + lastMessage.content = partialContent; + if (updateData.timings) lastMessage.timings = updateData.timings; + } catch (error) { + lastMessage.content = partialContent; + console.error('Failed to save partial response:', error); } } @@ -1265,7 +1279,11 @@ class ChatStore { const conversationContext = conversationsStore.activeMessages.slice(0, idx); const contextWithContinue = [ ...conversationContext, - { role: MessageRole.ASSISTANT as const, content: originalContent } + { + role: MessageRole.ASSISTANT as const, + content: originalContent, + reasoning_content: originalReasoning || undefined + } ]; let appendedContent = ''; @@ -1291,6 +1309,8 @@ class ChatStore { onReasoningChunk: (chunk: string) => { appendedReasoning += chunk; hasReceivedContent = true; + // mark streaming state so a stop mid-thinking can persist the partial reasoning + this.setChatStreaming(msg.convId, originalContent + appendedContent, msg.id); conversationsStore.updateMessageAtIndex(idx, { reasoningContent: originalReasoning + appendedReasoning });