1import{A as e,At as t,B as n,D as r,I as i,L as a,Lt as o,N as s,R as c,Rt as l,St as u,T as d,V as f,Vt as p,X as m,_t as h,a as g,ft as _,ht as v,it as y,j as b,jt as x,l as S,lt as C,m as w,n as T,o as E,p as D,s as O,ut as k,vt as A,w as j,wt as M,xt as N,z as P}from"./index-client.CmB40IKf.chunk.js";import"./disclose-version.xihTtKlq.chunk.js";import{c as F,l as I}from"./transitions.Bxjlk0Ir.chunk.js";import{A as L,C as R,a as ee,i as z,o as te,r as ne,t as B,w as V}from"./scroll-lock.DpOZFklr.chunk.js";import{A as H,C as re,O as U,R as W,T as G,_ as ie,b as ae,g as K,k as oe,n as q,t as J,w as se}from"./create-id.jG5ZLDbZ.chunk.js";import{n as Y}from"./dist.CSoAgKgN.chunk.js";import{t as X}from"./button.BiCVbghN.chunk.js";import"./button.BlNUYBDe.chunk.js";import{t as ce}from"./x.DTQ-GBEb.chunk.js";import{i as Z,n as Q,t as le}from"./input.Cex3HgPh.chunk.js";var ue=ae({component:`dialog`,parts:[`content`,`trigger`,`overlay`,`title`,`description`,`close`,`cancel`,`action`]}),$=new oe(`Dialog.Root | AlertDialog.Root`),de=class e{static create(t){let n=$.getOr(null);return $.set(new e(t,n))}opts;#e=h(null);get triggerNode(){return m(this.#e)}set triggerNode(e){v(this.#e,e,!0)}#t=h(null);get contentNode(){return m(this.#t)}set contentNode(e){v(this.#t,e,!0)}#n=h(null);get overlayNode(){return m(this.#n)}set overlayNode(e){v(this.#n,e,!0)}#r=h(null);get descriptionNode(){return m(this.#r)}set descriptionNode(e){v(this.#r,e,!0)}#i=h(void 0);get contentId(){return m(this.#i)}set contentId(e){v(this.#i,e,!0)}#a=h(void 0);get titleId(){return m(this.#a)}set titleId(e){v(this.#a,e,!0)}#o=h(void 0);get triggerId(){return m(this.#o)}set triggerId(e){v(this.#o,e,!0)}#s=h(void 0);get descriptionId(){return m(this.#s)}set descriptionId(e){v(this.#s,e,!0)}#c=h(null);get cancelNode(){return m(this.#c)}set cancelNode(e){v(this.#c,e,!0)}#l=h(0);get nestedOpenCount(){return m(this.#l)}set nestedOpenCount(e){v(this.#l,e,!0)}depth;parent;contentPresence;overlayPresence;constructor(e,t){this.opts=e,this.parent=t,this.depth=t?t.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new V({ref:W(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new V({ref:W(()=>this.overlayNode),open:this.opts.open,enabled:!0}),U(()=>this.opts.open.current,e=>{this.parent&&(e?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),L(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=e=>ue.getAttr(e,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#u=A(()=>({"data-state":re(this.opts.open.current)}));get sharedProps(){return m(this.#u)}set sharedProps(e){v(this.#u,e)}},fe=class e{static create(t){return new e(t,$.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=G(this.opts.ref,e=>{this.root.triggerNode=e,this.root.triggerId=e?.id}),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleOpen()}onkeydown(e){this.opts.disabled.current||(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),this.root.handleOpen())}#e=A(()=>({id:this.opts.id.current,"aria-haspopup":`dialog`,"aria-expanded":ie(this.root.opts.open.current),"aria-controls":this.root.contentId,[this.root.getBitsAttr(`trigger`)]:``,onkeydown:this.onkeydown,onclick:this.onclick,disabled:this.opts.disabled.current?!0:void 0,...this.root.sharedProps,...this.attachment}));get props(){return m(this.#e)}set props(e){v(this.#e,e)}},pe=class e{static create(t){return new e(t,$.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=G(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),this.root.handleClose())}#e=A(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:``,onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return m(this.#e)}set props(e){v(this.#e,e)}},me=class e{static create(t){return new e(t,$.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.root.titleId=this.opts.id.current,this.attachment=G(this.opts.ref),U.pre(()=>this.opts.id.current,e=>{this.root.titleId=e})}#e=A(()=>({id:this.opts.id.current,role:`heading`,"aria-level":this.opts.level.current,[this.root.getBitsAttr(`title`)]:``,...this.root.sharedProps,...this.attachment}));get props(){return m(this.#e)}set props(e){v(this.#e,e)}},he=class e{static create(t){return new e(t,$.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=G(this.opts.ref,e=>{this.root.contentNode=e,this.root.contentId=e?.id})}#e=A(()=>({open:this.root.opts.open.current}));get snippetProps(){return m(this.#e)}set snippetProps(e){v(this.#e,e)}#t=A(()=>({id:this.opts.id.current,role:this.root.opts.variant.current===`alert-dialog`?`alertdialog`:`dialog`,"aria-modal":`true`,"aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr(`content`)]:``,style:{pointerEvents:`auto`,outline:this.root.opts.variant.current===`alert-dialog`?`none`:void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:`layout style`},tabindex:this.root.opts.variant.current===`alert-dialog`?-1:void 0,"data-nested-open":K(this.root.nestedOpenCount>0),"data-nested":K(this.root.parent!==null),...se(this.root.contentPresence.transitionStatus),...this.root.sharedProps,...this.attachment}));get props(){return m(this.#t)}set props(e){v(this.#t,e)}get shouldRender(){return this.root.contentPresence.shouldRender}},ge=class e{static create(t){return new e(t,$.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=G(this.opts.ref,e=>this.root.overlayNode=e)}#e=A(()=>({open:this.root.opts.open.current}));get snippetProps(){return m(this.#e)}set snippetProps(e){v(this.#e,e)}#t=A(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`overlay`)]:``,style:{pointerEvents:`auto`,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":K(this.root.nestedOpenCount>0),"data-nested":K(this.root.parent!==null),...se(this.root.overlayPresence.transitionStatus),...this.root.sharedProps,...this.attachment}));get props(){return m(this.#t)}set props(e){v(this.#t,e)}get shouldRender(){return this.root.overlayPresence.shouldRender}},_e=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`child`,`children`,`level`]),ve=c(`<div><!></div>`);function ye(r,o){let s=n();x(o,!0);let c=g(o,`id`,19,()=>J(s)),u=g(o,`ref`,15,null),f=g(o,`level`,3,2),h=E(o,_e),_=me.create({id:W(()=>c()),level:W(()=>f()),ref:W(()=>u(),e=>u(e))}),v=A(()=>H(h,_.props));var y=a(),b=k(y),S=e=>{var t=a(),n=k(t);d(n,()=>o.child,()=>({props:m(v)})),i(e,t)},w=e=>{var t=ve();D(t,()=>({...m(v)}));var n=C(t);d(n,()=>o.children??p),l(t),i(e,t)};e(b,e=>{o.child?e(S):e(w,-1)}),i(r,y),t()}var be=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`forceMount`,`child`,`children`,`ref`]),xe=c(`<div><!></div>`);function Se(r,o){let s=n();x(o,!0);let c=g(o,`id`,19,()=>J(s)),u=g(o,`forceMount`,3,!1),f=g(o,`ref`,15,null),h=E(o,be),_=ge.create({id:W(()=>c()),ref:W(()=>f(),e=>f(e))}),v=A(()=>H(h,_.props));var y=a(),b=k(y),S=t=>{var n=a(),r=k(n),s=e=>{var t=a(),n=k(t);{let e=A(()=>({props:H(m(v)),..._.snippetProps}));d(n,()=>o.child,()=>m(e))}i(e,t)},c=e=>{var t=xe();D(t,e=>({...e}),[()=>H(m(v))]);var n=C(t);d(n,()=>o.children??p,()=>_.snippetProps),l(t),i(e,t)};e(r,e=>{o.child?e(s):e(c,-1)}),i(t,n)};e(b,e=>{(_.shouldRender||u())&&e(S)}),i(r,y),t()}var Ce=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`children`,`child`,`disabled`]),we=c(`<button><!></button>`);function Te(r,o){let s=n();x(o,!0);let c=g(o,`id`,19,()=>J(s)),u=g(o,`ref`,15,null),f=g(o,`disabled`,3,!1),h=E(o,Ce),_=fe.create({id:W(()=>c()),ref:W(()=>u(),e=>u(e)),disabled:W(()=>!!f())}),v=A(()=>H(h,_.props));var y=a(),b=k(y),S=e=>{var t=a(),n=k(t);d(n,()=>o.child,()=>({props:m(v)})),i(e,t)},w=e=>{var t=we();D(t,()=>({...m(v)}));var n=C(t);d(n,()=>o.children??p),l(t),i(e,t)};e(b,e=>{o.child?e(S):e(w,-1)}),i(r,y),t()}function Ee(e,n){x(n,!0);let r=g(n,`open`,15,!1),o=g(n,`onOpenChange`,3,q),s=g(n,`onOpenChangeComplete`,3,q);de.create({variant:W(()=>`dialog`),open:W(()=>r(),e=>{r(e),o()(e)}),onOpenChangeComplete:W(()=>s())});var c=a(),l=k(c);d(l,()=>n.children??p),i(e,c),t()}var De=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`disabled`]),Oe=c(`<button><!></button>`);function ke(r,o){let s=n();x(o,!0);let c=g(o,`id`,19,()=>J(s)),u=g(o,`ref`,15,null),f=g(o,`disabled`,3,!1),h=E(o,De),_=pe.create({variant:W(()=>`close`),id:W(()=>c()),ref:W(()=>u(),e=>u(e)),disabled:W(()=>!!f())}),v=A(()=>H(h,_.props));var y=a(),b=k(y),S=e=>{var t=a(),n=k(t);d(n,()=>o.child,()=>({props:m(v)})),i(e,t)},w=e=>{var t=Oe();D(t,()=>({...m(v)}));var n=C(t);d(n,()=>o.children??p),l(t),i(e,t)};e(b,e=>{o.child?e(S):e(w,-1)}),i(r,y),t()}var Ae=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`children`,`child`,`ref`,`forceMount`,`onCloseAutoFocus`,`onOpenAutoFocus`,`onEscapeKey
1down`,`onInteractOutside`,`trapFocus`,`preventScroll`,`restoreScrollDelay`]),je=c(`<!> <!>`,1),Me=c(`<!> <div><!></div>`,1);function Ne(r,o){let s=n();x(o,!0);let c=g(o,`id`,19,()=>J(s)),u=g(o,`ref`,15,null),f=g(o,`forceMount`,3,!1),h=g(o,`onCloseAutoFocus`,3,q),v=g(o,`onOpenAutoFocus`,3,q),y=g(o,`onEscapeKeydown`,3,q),b=g(o,`onInteractOutside`,3,q),S=g(o,`trapFocus`,3,!0),w=g(o,`preventScroll`,3,!0),T=g(o,`restoreScrollDelay`,3,null),j=E(o,Ae),M=he.create({id:W(()=>c()),ref:W(()=>u(),e=>u(e))}),N=A(()=>H(j,M.props));var P=a(),F=k(P),I=t=>{z(t,{get ref(){return M.opts.ref},loop:!0,get trapFocus(){return S()},get enabled(){return M.root.opts.open.current},get onOpenAutoFocus(){return v()},get onCloseAutoFocus(){return h()},focusScope:(t,n)=>{let r=()=>(n?.()).props;ee(t,O(()=>m(N),{get enabled(){return M.root.opts.open.current},get ref(){return M.opts.ref},onEscapeKeydown:e=>{y()(e),!e.defaultPrevented&&M.root.handleClose()},children:(t,n)=>{te(t,O(()=>m(N),{get ref(){return M.opts.ref},get enabled(){return M.root.opts.open.current},onInteractOutside:e=>{b()(e),!e.defaultPrevented&&M.root.handleClose()},children:(t,n)=>{ne(t,O(()=>m(N),{get ref(){return M.opts.ref},get enabled(){return M.root.opts.open.current},children:(t,n)=>{var s=a(),c=k(s),u=t=>{var n=je(),a=k(n),s=e=>{B(e,{get preventScroll(){return w()},get restoreScrollDelay(){return T()}})};e(a,e=>{M.root.opts.open.current&&e(s)});var c=_(a,2);{let e=A(()=>({props:H(m(N),r()),...M.snippetProps}));d(c,()=>o.child,()=>m(e))}i(t,n)},f=e=>{var t=Me(),n=k(t);B(n,{get preventScroll(){return w()}});var a=_(n,2);D(a,e=>({...e}),[()=>H(m(N),r())]);var s=C(a);d(s,()=>o.children??p),l(a),i(e,t)};e(c,e=>{o.child?e(u):e(f,-1)}),i(t,s)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};e(F,e=>{(M.shouldRender||f())&&e(I)}),i(r,P),t()}var Pe=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`]);function Fe(e,n){x(n,!0);let r=g(n,`ref`,15,null),o=E(n,Pe);var s=a(),c=k(s);j(c,()=>ke,(e,t)=>{t(e,O({"data-slot":`dialog-close`},()=>o,{get ref(){return r()},set ref(e){r(e)}}))}),i(e,s),t()}var Ie=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`portalProps`,`children`,`showCloseButton`]),Le=c(`<!> <span class="sr-only">Close</span>`,1),Re=c(`<!> <!>`,1);function ze(n,r){x(r,!0);let s=g(r,`ref`,15,null),c=g(r,`showCloseButton`,3,!0),l=E(r,Ie);var u=a(),f=k(u);j(f,()=>Xe,(t,n)=>{n(t,O(()=>r.portalProps,{children:(t,n)=>{var u=Re(),f=k(u);j(f,()=>We,(e,t)=>{t(e,{})});var h=_(f,2);{let t=A(()=>Y(`bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg`,r.class));j(h,()=>Ne,(n,u)=>{u(n,O({"data-slot":`dialog-content`,get class(){return m(t)}},()=>l,{get ref(){return s()},set ref(e){s(e)},children:(t,n)=>{var s=Re(),l=k(s);d(l,()=>r.children??p);var u=_(l,2),f=e=>{var t=a(),n=k(t);j(n,()=>ke,(e,t)=>{t(e,{class:`ring-offset-background focus:ring-ring absolute top-4 right-4 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:(e,t)=>{var n=Le(),r=k(n);ce(r,{}),o(2),i(e,n)},$$slots:{default:!0}})}),i(e,t)};e(u,e=>{c()&&e(f)}),i(t,s)},$$slots:{default:!0}}))})}i(t,u)},$$slots:{default:!0}}))}),i(n,u),t()}var Be=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Ve=c(`<div><!></div>`);function He(e,n){x(n,!0);let r=g(n,`ref`,15,null),a=E(n,Be);var o=Ve();D(o,e=>({"data-slot":`dialog-header`,class:e,...a}),[()=>Y(`flex flex-col gap-2 text-center sm:text-left`,n.class)]);var s=C(o);d(s,()=>n.children??p),l(o),S(o,e=>r(e),()=>r()),i(e,o),t()}var Ue=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function We(e,n){x(n,!0);let r=g(n,`ref`,15,null),o=E(n,Ue);var s=a(),c=k(s);{let e=A(()=>Y(`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,n.class));j(c,()=>Se,(t,n)=>{n(t,O({"data-slot":`dialog-overlay`,get class(){return m(e)}},()=>o,{get ref(){return r()},set ref(e){r(e)}}))})}i(e,s),t()}var Ge=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Ke(e,n){x(n,!0);let r=g(n,`ref`,15,null),o=E(n,Ge);var s=a(),c=k(s);{let e=A(()=>Y(`text-lg font-semibold leading-none`,n.class));j(c,()=>ye,(t,n)=>{n(t,O({"data-slot":`dialog-title`,get class(){return m(e)}},()=>o,{get ref(){return r()},set ref(e){r(e)}}))})}i(e,s),t()}var qe=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`]);function Je(e,n){x(n,!0);let r=g(n,`ref`,15,null),o=E(n,qe);var s=a(),c=k(s);j(c,()=>Te,(e,t)=>{t(e,O({"data-slot":`dialog-trigger`},()=>o,{get ref(){return r()},set ref(e){r(e)}}))}),i(e,s),t()}var Ye=Ee,Xe=R,Ze=P(`<svg class="lucide lucide-star" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"><path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"></path></svg>`),Qe=P(`<svg class="lucide lucide-trash-2" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path>
1<path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line></svg>`),$e=P(`<svg class="lucide lucide-map" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z"></path><path d="M15 5.764v15"></path><path d="M9 3.236v15"></path></svg>`),et=c(`<div class="pointer-events-none flex flex-col gap-1 truncate"><div class="flex items-center gap-2 truncate text-lg"><img height="24" width="24"/> </div> <div class="text-muted-foreground truncate text-left text-sm"> <!>)</div></div> <div class="-mr-1 flex justify-self-end"><!> <!> <!></div>`,1),tt=P(`<svg class="lucide lucide-search mr-1.25" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.3-4.3"></path></svg> `,1),nt=P(`<svg class="lucide lucide-mouse-pointer-2" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z"></path></svg>`),rt=c(`<h6 class="text-muted-foreground mt-4 mb-4 text-xl">Favorites</h6> <div id="location_search_favorites" class="border-border rounded-lg border"></div>`,1),it=c(`<h6 class="text-muted-foreground mt-4 mb-4 text-xl">Recent Locations</h6> <div id="location_search_lastVisited" class="border-border rounded-lg border"></div>`,1),at=c(`<!> <!> <!>`,1),ot=c(`<div class="list-group mt-4"><div id="location_search_results" class="border-border rounded-lg border"></div></div>`),st=c(`<div class="mt-4 flex h-full items-center justify-center"><!></div>`),ct=c(`<!> <div><div class="flex gap-3"><!> <!></div> <!></div>`,1),lt=c(`<!> <!>`,1);function ut(n,c){x(c,!0);let d=()=>u(I,`$lastVisited`,E),S=()=>u(F,`$favorites`,E),[E,D]=N(),O=(t,n=p,r=p,a=p,c=p)=>{{let u=A(c),d=A(()=>r()===0?`rounded-t-md`:``),p=A(()=>r()===a()-1?`rounded-b-md`:``);X(t,{variant:`outline`,get class(){return`location-search-${m(u)??``} flex h-[unset] w-full justify-between gap-0 rounded-none py-2 pr-1 pl-3 not-last:border-b md:pr-2 ${m(d)??``} ${m(p)??``}`},onclick:()=>V(n()),children:(t,r)=>{var a=et(),u=k(a),d=C(u),p=C(d),h=_(p);l(d);var g=_(d,2),v=C(g),b=_(v),x=e=>{var t=f();y(e=>s(t,e),[()=>` `+n().elevation.toFixed(0)+`m asl`]),i(e,t)};e(b,e=>{n().elevation&&e(x)}),o(),l(g),l(u);var T=_(u,2),E=C(T),D=e=>{X(e,{variant:`ghost`,class:`px-2 duration-200 hover:brightness-140 md:px-3`,onclick:e=>{e.stopPropagation(),ne(n())},title:`Save`,children:(e,t)=>{var n=Ze();i(e,n)},$$slots:{default:!0}})},O=A(()=>c()!==`favorite`&&!S().find(e=>e.id===n().id));e(E,e=>{m(O)&&e(D)});var j=_(E,2),M=e=>{X(e,{variant:`ghost`,class:`px-2 duration-200 hover:brightness-140 md:px-3`,onclick:e=>{e.stopPropagation(),c()===`favorite`?te(n()):z(n())},title:`Delete`,children:(e,t)=>{var n=Qe();i(e,n)},$$slots:{default:!0}})};e(j,e=>{c()!==`result`&&e(M)});var N=_(j,2);X(N,{variant:`ghost`,class:`px-2 duration-200 hover:brightness-140 md:px-3`,get href(){return`https://www.openstreetmap.org/#map=13/${n().latitude??``}/${n().longitude??``}`},target:`_blank`,title:`Show on map`,onclick:e=>{e.stopPropagation()},children:(e,t)=>{var n=$e();i(e,n)},$$slots:{default:!0}}),l(T),y((e,t,r)=>{w(p,`src`,`/images/country-flags/${e??``}.svg`),w(p,`title`,n().country),w(p,`alt`,n().country??n().country_code??``),s(h,` ${n().name??``}`),s(v,`${(n().admin1||``)??``} (${t??``}°N 2 ${r??``}°E`)},[()=>(n().country_code||`united_nations`).toLowerCase(),()=>n().latitude.toFixed(2),()=>n().longitude.toFixed(2)]),i(t,a)},$$slots:{default:!0}})}},P=g(c,`label`,3,`Search Locations...`),L,R=h(``);T(()=>{clearTimeout(L)});let ee=()=>{v(U,!1)},z=e=>{M(I,d().filter(t=>t.id!=e.id))},te=e=>{M(F,S().filter(t=>t.id!=e.id))},ne=e=>{M(F,[e,...S()]),z(e),v(R,``)},B=e=>{if(S().find(t=>
2t.id==e.id)){let t=S().filter(t=>t.id!=e.id);t.unshift(e),M(F,t);return}let t=d().filter(t=>t.id!=e.id);t.unshift(e),t.length>10&&t.pop(),M(I,t)},V=e=>{B(e),v(R,``),ee(),c.onlocation?.(e)},H=async e=>{if(e.toLowerCase()==`gps`){let e=await new Promise((e,t)=>navigator.geolocation.getCurrentPosition(e,t,{})),t=e.coords.latitude,n=e.coords.longitude;return{results:[{id:1e8+Math.floor(t*100+n+1e3),name:`GPS ${t.toFixed(2)}°N ${n.toFixed(2)}°E`,latitude:t,longitude:n,elevation:e.coords.altitude??NaN,feature_code:``,country_code:void 0,admin1_id:void 0,admin3_id:void 0,admin4_id:void 0,timezone:``,population:void 0,postcodes:void 0,country_id:void 0,country:void 0,admin1:void 0,admin3:void 0,admin4:void 0}]}}let t=`https://geocoding-api.open-meteo.com/v1/search?${new URLSearchParams({name:e})}`,n=await fetch(t);if(!n.ok)throw Error(await n.text());return await n.json()},re=A(()=>{if(L&&clearTimeout(L),m(R).length<2)return Promise.resolve({results:[]});let e=m(R);return new Promise(e=>{L=setTimeout(e,300)}).then(()=>H(e))}),U=h(!1);var W=a(),G=k(W);j(G,()=>Ye,(t,n)=>{n(t,{get open(){return m(U)},set open(e){v(U,e,!0)},children:(t,n)=>{var c=lt(),u=k(c);j(u,()=>Je,(e,t)=>{t(e,{id:`location_search`,type:`button`,class:`hover:bg-accent border-border flex h-12 w-full cursor-pointer items-center justify-center rounded-md border px-5 pr-6 duration-200`,children:(e,t)=>{var n=tt(),r=_(k(n),1,!0);y(()=>s(r,P())),i(e,n)},$$slots:{default:!0}})});var p=_(u,2);j(p,()=>Xe,(t,n)=>{n(t,{children:(t,n)=>{var c=lt(),u=k(c);j(u,()=>We,(e,t)=>{t(e,{class:`bg-black/5`})});var p=_(u,2);j(p,()=>ze,(t,n)=>{n(t,{class:`border-border top-[10%] flex max-h-[calc(100vh-10%)] min-h-100 translate-y-0 flex-col overflow-y-auto sm:max-w-150`,children:(t,n)=>{var c=ct(),u=k(c);j(u,()=>He,(e,t)=>{t(e,{children:(e,t)=>{var n=a(),r=k(n);j(r,()=>Ke,(e,t)=>{t(e,{children:(e,t)=>{o();var n=f(`Search Locations`);i(e,n)},$$slots:{default:!0}})}),i(e,n)},$$slots:{default:!0}})});var p=_(u,2),h=C(p),g=C(h);le(g,{type:`search`,id:`location_search_input`,autocomplete:`off`,spellcheck:`false`,"aria-label":`Search Location`,get value(){return m(R)},set value(e){v(R,e,!0)}});var x=_(g,2);X(x,{id:`location_search_gps`,variant:`outline`,title:`Detect Location via GPS`,onclick:()=>v(R,`GPS`),children:(e,t)=>{var n=nt();i(e,n)},$$slots:{default:!0}}),l(h);var w=_(h,2);b(w,()=>m(re),e=>{var t=st(),n=C(t);j(n,()=>Q,(e,t)=>{t(e,{class:`border-border my-auto w-[unset]`,children:(e,t)=>{var n=a(),r=k(n);j(r,()=>Z,(e,t)=>{t(e,{children:(e,t)=>{o();var n=f(`Loading...`);i(e,n)},$$slots:{default:!0}})}),i(e,n)},$$slots:{default:!0}})}),l(t),i(e,t)},(t,n)=>{var s=a(),c=k(s),u=t=>{var n=a(),s=k(n),c=t=>{var n=at(),s=k(n),c=e=>{var t=a(),n=k(t);j(n,()=>Q,(e,t)=>{t(e,{class:`border-border my-auto mt-4 w-[unset]`,children:(e,t)=>{var n=a(),r=k(n);j(r,()=>Z,(e,t)=>{t(e,{children:(e,t)=>{o();var n=f(`Start typing to search for locations`);i(e,n)},$$slots:{default:!0}})}),i(e,n)},$$slots:{default:!0}})}),i(e,t)};e(s,e=>{d().length===0&&S().length===0&&e(c)});var u=_(s,2),p=e=>{var t=rt(),n=_(k(t),2);r(n,7,S,e=>e.id,(e,t,n)=>{O(e,()=>m(t),()=>m(n),()=>S().length,()=>`favorite`)}),l(n),i(e,t)};e(u,e=>{S().length>0&&e(p)});var h=_(u,2),g=e=>{var t=it(),n=_(k(t),2);r(n,7,d,e=>e.id,(e,t,n)=>{O(e,()=>m(t),()=>m(n),()=>d().length,()=>`last-visited`)}),l(n),i(e,t)};e(h,e=>{d().length>0&&e(g)}),i(t,n)},u=e=>{var t=a(),n=k(t);j(n,()=>Q,(e,t)=>{t(e,{class:`border-border my-auto mt-4! w-[unset]`,children:(e,t)=>{var n=a(),r=k(n);j(r,()=>Z,(e,t)=>{t(e,{children:(e,t)=>{o();var n=f(`No locations found`);i(e,n)},$$slots:{default:!0}})}),i(e,n)},$$slots:{default:!0}})}),i(e,t)};e(s,e=>{m(R).length<2?e(c):e(u,-1)}),i(t,n)},p=e=>{var t=a(),n=k(t);j(n,()=>Q,(e,t)=>{t(e,{class:`border-border my-auto mt-4! w-[unset]`,children:(e,t)=>{var n=a(),r=k(n);j(r,()=>Z,(e,t)=>{t(e,{children:(e,t)=>{o();var n=f(`No locations found`);i(e,n)},$$slots:{default:!0}})}),i(e,n)},$$slots:{default:!0}})}),i(e,t)},h=e=>{var t=ot(),a=C(t);r(a,23,()=>m(n).results||[],e=>e.id,(e,t,r)=>{O(e,()=>m(t),()=>m(r),()=>m(n).results?.length??0,()=>`result`)}),l(a),l(t),i(e,t)};e(c,e=>{m(n).results&&m(n).results.length===0?e(u):m(n).results?e(h,-1):e(p,1)}),i(t,s)},(e,t)=>{var n=a(),r=k(n);j(r,()=>Q,(e,n)=>{n(e,{variant:`destructive`,class:`my-auto mt-4 w-[unset]`,children:(e,n)=>{var r=a(),c=k(r);j(c,()=>Z,(e,n)=>{n(e,{children:(e,n)=>{o();var r=f();y(()=>s(r,m(t).message)),i(e,r)},$$slots:{default:!0}})}),i(e,r)},$$slots:{default:!0}})}),i(e,n)}),l(p),i(t,c)},$$slots:{default:!0}})}),i(t,c)},$$slots:{default:!0}})}),i(t,c)},$$slots:{default:!0}})}),i(n,W),t(),D()}export{ze as a,Ke as i,Ye as n,Fe as o,Je as r,ut as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.