@tempots/ui 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.cjs +1 -1
  2. package/index.js +736 -1357
  3. package/package.json +2 -2
package/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Me=Object.defineProperty,Fe=(t,e,n)=>e in t?Me(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,h=(t,e,n)=>Fe(t,typeof e!="symbol"?e+"":e,n);const E=class{constructor(e,n){h(this,"$__signal__",!0),h(this,"_value"),h(this,"_derivatives",[]),h(this,"_onValueListeners",[]),h(this,"_onDisposeListeners",[]),h(this,"get",()=>this._value),h(this,"hasListeners",()=>this._onValueListeners.length>0),h(this,"on",o=>(o(this.get()),this._onValueListeners.push(o),()=>{this._onValueListeners.splice(this._onValueListeners.indexOf(o),1)})),h(this,"_setAndNotify",(o,s)=>{const i=this.equals(this._value,o);i||(this._value=o),(s||!i)&&this._onValueListeners.forEach(r=>r(o))}),h(this,"_disposed",!1),h(this,"isDisposed",()=>this._disposed),h(this,"onDispose",o=>{this._onDisposeListeners.push(o)}),h(this,"dispose",()=>{this._disposed||(this._disposed=!0,this._onDisposeListeners.forEach(o=>o()),this._onDisposeListeners.length=0,this._derivatives.length=0)}),h(this,"map",(o,s=(i,r)=>i===r)=>{const i=new rt(()=>{try{return o(this.get())}catch(r){throw console.error("Error in Signal.map:",r),r}},s);return this.setDerivative(i),i}),h(this,"flatMap",(o,s=(i,r)=>i===r)=>{const i=new rt(()=>{try{return o(this.get()).get()}catch(r){throw console.error("Error in Signal.flatMap:",r),r}},s);return this.setDerivative(i),i}),h(this,"tap",o=>this.map(s=>(o(s),s))),h(this,"at",o=>this.map(s=>s[o])),h(this,"$",new Proxy(this,{get:(o,s)=>this.at(s)})),h(this,"filter",(o,s)=>{let i=s??this.get();const r=new rt(()=>{try{const c=this.get();return i=o(c)?c:i}catch(c){throw console.error("Error in Signal.filter:",c),c}},this.equals);return this.setDerivative(r),r}),h(this,"filterMap",(o,s,i=(r,c)=>r===c)=>{let r=s;const c=new rt(()=>{try{const l=this.get();return r=o(l)??r}catch(l){throw console.error("Error in Signal.filterMap:",l),l}},i);return this.setDerivative(c),c}),h(this,"mapAsync",(o,s,i,r=(c,l)=>c===l)=>{const c=D(s,r);let l=0,a=new AbortController;return c.onDispose(this.on(async f=>{const u=++l;a.abort(),a=new AbortController;try{const p=await o(f,{abortSignal:a.signal});u===l&&c.set(p)}catch(p){if(u===l)if(i!=null)c.set(i(p));else throw p}})),c}),h(this,"mapMaybe",(o,s)=>this.map(i=>o(i)??s)),h(this,"feedProp",(o,s=!1)=>{const i=this.on(o.set);return o.onDispose(i),s?this.onDispose(o.dispose):this.onDispose(i),o}),h(this,"deriveProp",(o=!0)=>this.feedProp(D(this.get()),o)),h(this,"count",()=>{let o=0;return this.map(()=>++o)}),h(this,"setDerivative",o=>{this._derivatives.push(o),o.onDispose(()=>{this._derivatives.splice(this._derivatives.indexOf(o),1)}),o.onDispose(this.on(o.setDirty)),this.onDispose(o.dispose)}),this.equals=n,this._value=e}get value(){return this._value}};h(E,"ofPromise",(t,e,n,o=(s,i)=>s===i)=>{const s=new E(e,o);return t.then(i=>s._setAndNotify(i,!1)).catch(i=>{n!=null?s._setAndNotify(n(i),!1):console.error("Unhandled promise rejection in Signal.ofPromise:",i)}),s}),h(E,"is",t=>t!=null&&t.$__signal__===!0),h(E,"wrap",(t,e=(n,o)=>n===o)=>E.is(t)?t:new E(t,e)),h(E,"maybeWrap",t=>t==null?t:E.wrap(t)),h(E,"unwrap",t=>E.is(t)?t.get():t),h(E,"map",(t,e)=>E.is(t)?t.map(e):e(t));let A=E;const Ne=typeof queueMicrotask=="function"?queueMicrotask:t=>Promise.resolve().then(t);class rt extends A{constructor(e,n){super(void 0,n),h(this,"$__computed__",!0),h(this,"_isDirty",!1),h(this,"setDirty",()=>{this._isDirty||this._disposed||(this._isDirty=!0,this._derivatives.forEach(o=>o.setDirty()),this._scheduleNotify())}),h(this,"_scheduleCount",0),h(this,"_scheduleNotify",()=>{const o=++this._scheduleCount;Ne(()=>{this._scheduleCount!==o||this._disposed!==!1||this._isDirty&&(this._isDirty=!1,this._setAndNotify(this._fn(),!1))})}),h(this,"get",()=>(this._isDirty&&(this._isDirty=!1,this._value=this._fn(),this._setAndNotify(this._value,!0)),this._value)),this._fn=e,this.setDirty()}static is(e){return e!=null&&e.$__computed__===!0}get value(){return this.get()}}const Wt=class Ht extends A{constructor(){super(...arguments),h(this,"$__prop__",!0),h(this,"set",e=>{this._setAndNotify(e,!1)}),h(this,"update",e=>{this._setAndNotify(e(this.get()),!1)}),h(this,"reducer",(e,...n)=>{const o=this;return function s(i){const r=o.value;o.update(c=>e(c,i)),!o.equals(r,o.value)&&n.forEach(c=>c({previousState:r,state:o.value,action:i,dispatch:s}))}}),h(this,"iso",(e,n,o=(s,i)=>s===i)=>{const s=new Ht(e(this.get()),o);return s.onDispose(this.on(i=>s.set(e(i)))),s.on(i=>this._setAndNotify(n(i),!1)),s}),h(this,"atProp",e=>this.iso(n=>n[e],n=>({...this.value,[e]:n})))}get value(){return this.get()}set value(e){this._setAndNotify(e,!1)}};h(Wt,"is",t=>t!=null&&t.$__prop__===!0);let $e=Wt;const D=(t,e=(n,o)=>n===o)=>new $e(t,e),Ve=(t,e=(n,o)=>n===o)=>new A(t,e),zt=new Set(["checked","disabled","hidden","selected"]),It=new Set(["rowSpan","colSpan","tabIndex","valueAsNumber"]),Bt=new Set(["valueAsDate"]),Ut=new Set(["value","textContent","innerText","innerHTML","outerHTML","className","classList"]),yt=new Map,G=(t,e)=>{if(yt.has(t))return yt.get(t);{const n=e(t);return yt.set(t,n),n}},We=t=>(e,n)=>{n==null?e[t]=null:e[t]=!!n},He=t=>(e,n)=>{n==null?e[t]=null:e[t]=Number(n)},ze=t=>(e,n)=>{n==null?e[t]=null:e[t]=n},Ie=t=>(e,n)=>{n==null?e[t]=null:e[t]=String(n)},Be=t=>(e,n)=>{n==null?e.removeAttribute(t):e.setAttribute(t,n)},qt=t=>zt.has(t)?G(t,We):It.has(t)?G(t,He):Bt.has(t)?G(t,ze):Ut.has(t)?G(t,Ie):G(t,Be),jt=t=>e=>zt.has(t)?!!e[t]:It.has(t)?Number(e[t]):Bt.has(t)?e[t]:Ut.has(t)?String(e[t]):e.getAttribute(t),q=t=>{const e=t;e&&e.onblur&&(e.onblur=null),!(!t||t.ownerDocument===void 0)&&t.parentElement&&t.parentElement.removeChild(t)};function Ue(t,e,n){let o=t.target;for(;o!=null&&!(o instanceof HTMLAnchorElement);)o=o.parentElement;if(o==null)return!0;const s=o;if(t.button!==0||t.ctrlKey||t.metaKey||s.target!=="_self"&&s.target!==""||s.getAttribute("download")!=null)return!0;if(n){const{pathname:i,search:r,hash:c}=s,l=i+r+c;if(s.getAttribute("href")!==l||e===!0&&!/\/[^/.]*$/.test(i)||Array.isArray(e)&&!e.some(a=>i.endsWith(a)))return!0}return!1}const qe=(t,{checkExtension:e=[".html"],checkExternalUrl:n=!0}={})=>o=>{Ue(o,e,n)||t()&&o.preventDefault()},je=t=>e=>{Qt(e);const n=e.createText(t);return e.appendOrInsert(n),o=>{o&&q(n)}},Je=t=>e=>{Qt(e);const n=e.createText(t.value);e.appendOrInsert(n);const o=t.on(s=>n.data=s);return s=>{o(),s&&q(n)}},j=(...t)=>e=>{const n=t.map(o=>b(o)(e));return o=>{n.forEach(s=>s(o))}},Q=()=>()=>{},Ke=t=>e=>(Gt(e),e.element.classList.add(...t),n=>{n&&e.element.classList.remove(...t)}),Xe=t=>e=>{Gt(e);const n=e.element;let o=[];const s=t.on(i=>{o.forEach(r=>n.classList.remove(r)),o=(i??"").split(" ").filter(r=>r.length>0),n.classList.add(...o)});return i=>{s(),i&&o.forEach(r=>n.classList.remove(r)),o.length=0}},et=(t,e)=>{const n=qt(t),o=jt(t);return s=>{Yt(s,t);const i=o(s.element);return n(s.element,e),r=>{r&&n(s.element,i)}}},nt=(t,e)=>{const n=qt(t),o=jt(t);return s=>{Yt(s,t);const i=o(s.element),r=e.on(c=>n(s.element,c));return c=>{r(),c&&n(s.element,i)}}},bt=new Proxy({},{get:(t,e)=>e==="class"?n=>A.is(n)?Xe(n):Ke((n??"").split(" ").filter(o=>o.length>0)):n=>A.is(n)?nt(e,n):et(e,n)});new Proxy({},{get:(t,e)=>n=>A.is(n)?nt(`data-${e}`,n):et(`data-${e}`,n)});new Proxy({},{get:(t,e)=>n=>A.is(n)?nt(`aria-${e}`,n):et(`aria-${e}`,n)});new Proxy({},{get:(t,e)=>n=>A.is(n)?nt(e,n):et(e,n)});new Proxy({},{get:(t,e)=>n=>A.is(n)?nt(e,n):et(e,n)});const b=t=>t==null?Q:Array.isArray(t)?j(...t.map(b)):typeof t=="string"?je(t):A.is(t)?Je(t):t,Jt=(t,...e)=>n=>{const o=n.createElement(t,void 0);n.isFirstLevel&&J()&&Zt(o),n.appendOrInsert(o),n=n.withElement(o);const s=e.map(i=>b(i)(n));return i=>{s.forEach(r=>r(!1)),i&&q(o)}},Kt=(t,e,...n)=>o=>{const s=o.createElement(t,e);o.isFirstLevel&&J()&&Zt(s),o.appendOrInsert(s),o=o.withElement(s);const i=n.map(r=>b(r)(o));return r=>{i.forEach(c=>c(!1)),r&&q(s)}},Xt=new Proxy({},{get:(t,e)=>(...n)=>Jt(e,n.flatMap(b))});new Proxy({},{get:(t,e)=>(...n)=>Jt("input",bt.type(e),...n)});const Ye="http://www.w3.org/2000/svg";new Proxy({},{get:(t,e)=>(...n)=>Kt(e,Ye,n.flatMap(b))});const Ge="http://www.w3.org/1998/Math/MathML";new Proxy({},{get:(t,e)=>(...n)=>Kt(e,Ge,n.flatMap(b))});const Ct="data-tempo-attr",Ze="data-tempo-class",Qe="data-tempo-node",tn="data-tempo-text",en=(t,e)=>{const n=t.getAttribute(e);if(n!=null){const o=t.getAttribute(Ct)??"{}",s={...JSON.parse(o),name:n};t.setAttribute(Ct,JSON.stringify(s).replace(/"/g,"&quot;"))}},Yt=(t,e)=>{J()&&t.isFirstLevel&&en(t.element,e)};function nn(t){t.setAttribute(Ze,t.className)}const Gt=t=>{J()&&t.isFirstLevel&&nn(t.element)},Zt=t=>{t.setAttribute(Qe,"")},on=t=>{t.setAttribute(tn,t.textContent??"")},Qt=t=>{J()&&t.isFirstLevel&&on(t.element)},sn=()=>{const t=globalThis;return t.__tempoSSR__==null&&(t.__tempoSSR__={isSSR:!1,counter:0}),t.__tempoSSR__},rn=t=>sn()[t],J=()=>rn("isSSR"),cn=(t,e)=>n=>(n.element.addEventListener(t,e),o=>{o&&n.element.removeEventListener(t,e)}),te=new Proxy({},{get:(t,e)=>n=>cn(e,n)}),ee=(t,e)=>n=>{n=n.makeRef();let o,s;const i=t.map(l=>Object.keys(l)[0]);let r;const c=i.on(l=>{if(l!==r){s==null||s.dispose(),o==null||o(!0),s=t.map(f=>f[l]);const a=e[l](s);o=b(a)(n),r=l}});return l=>{c(),l&&n.reference!=null&&q(n.reference),o==null||o(!0)}},ln=(t,e,n)=>ee(t.map(o=>({[o[e]]:o})),n),an=(t,e)=>{const n=t.map(([o,s])=>({[o]:s}));return ee(n,e)},ne=(t,e)=>ln(t,"type",e),un=(t,e)=>n=>{const o=Object.values(t).reduce((s,i)=>{const r=n.getProvider(i);if(r==null)throw new Error(`No provider found for mark: ${i.description}`);return s[i]=r,s},{});return b(e(o))(n)},oe=(t,e)=>un([t],n=>b(e(n[t]))),fn=(t,e,n)=>o=>{o=o.makeRef();let s=null,i=!1;const r=D(null),c=t.on(l=>{l==null?(s==null||s(!0),s=b((n==null?void 0:n())??Q)(o),i=!1):(r.value=l,i||(s==null||s(!0),s=b(e(r))(o),i=!0))});return l=>{c(),s==null||s(l),l&&o.reference&&q(o.reference)}},ot=t=>e=>n=>t(n,e),se=(t,e,n)=>fn(t.map(o=>o?!0:null),()=>e,n!=null?()=>n:void 0),ie=t=>e=>t(e.element)??(()=>{}),hn=(t,e)=>{const n=t(e);return()=>n(!0)},re=(t,e)=>n=>{const o=n.document.querySelector(t);if(o===null)throw new Error(`Cannot find element by selector for portal: ${t}`);return hn(b(e),n.withElement(o).withFirstLevel())},ce=t=>Symbol(t),dn=(t,e)=>n=>b(e)(n.withProviders(t)),le=(t,e,n)=>dn({[t]:e},b(n)),pn=(t,e)=>n=>{const o=n.element,s=o.style.getPropertyValue(t);return o.style.setProperty(t,e),i=>{i&&o.style.setProperty(t,s)}},mn=(t,e)=>n=>{const o=n.element,s=o.style.getPropertyValue(t);return e.on(i=>o.style.setProperty(t,i)),i=>{i&&o.style.setProperty(t,s)}};new Proxy({},{get:(t,e)=>n=>A.is(n)?mn(e,n):pn(e,n)});const _t=ce("LocationProvider"),ae=()=>{const t=(window==null?void 0:window.location.hash)===""?void 0:(window==null?void 0:window.location.hash.substring(1))??void 0;return{pathname:(window==null?void 0:window.location.pathname)??"",search:Object.fromEntries(new URLSearchParams((window==null?void 0:window.location.search)??"").entries()),hash:t}},ue=(t,e)=>t.pathname===e.pathname&&JSON.stringify(t.search)===JSON.stringify(e.search)&&t.hash===e.hash,fe=t=>{const e=new URL(t,(window==null?void 0:window.location.toString())??""),n=Object.fromEntries(e.searchParams.entries());let o=e.hash;return o.startsWith("#")&&(o=o.substring(1)),{pathname:e.pathname,search:n,hash:o===""?void 0:o}},he=(t,e)=>{const n=fe(e);return t.set(n),t},de=t=>{const n=new URLSearchParams(t.search).toString(),o=t.hash;return`${t.pathname}${n?`?${n}`:""}${o?`#${o}`:""}`},pe=()=>{const t=D(ae(),ue),e=()=>{let n=(window==null?void 0:window.location.hash)??"";n.startsWith("#")&&(n=n.substring(1));const o={pathname:(window==null?void 0:window.location.pathname)??"",search:Object.fromEntries(new URLSearchParams((window==null?void 0:window.location.search)??"").entries()),hash:n===""?void 0:n};t.set(o)};return window==null||window.addEventListener("popstate",e),t.onDispose(()=>{window==null||window.removeEventListener("popstate",e)}),t.on(n=>{window==null||window.history.pushState({},"",de(n))}),t},gn=t=>{const e=pe();return j(ot(e.dispose),le(_t,e,t))},At=t=>oe(_t,e=>n=>{const o=D(e.value,e.equals);e.feedProp(o),o.on(e.set);const s=b(t(o))(n);return i=>{o.dispose(),s(i)}}),wn=(t,...e)=>At(n=>Xt.a(te.click(qe(()=>(he(n,A.unwrap(t)),!0))),bt.href(t),...e)),Lt=ce("Appearance"),yn=t=>{const e=window.matchMedia!=null&&window.matchMedia("(prefers-color-scheme: dark)").matches,n=D(e?"dark":"light"),o=i=>{n.set(i.matches?"dark":"light")},s=window.matchMedia!=null?window.matchMedia("(prefers-color-scheme: dark)"):void 0;return s==null||s.addEventListener("change",o),j(le(Lt,n,t),ot(()=>s==null?void 0:s.removeEventListener("change",o)))},vn=t=>oe(Lt,t),me=(t,e)=>{if(typeof e=="function")return me(t,{success:e});const n=e.failure??(r=>j(ot(r.on(console.error)),r.map(c=>`Error: ${c}`))),o=e.success,s=e.loading??(()=>Q),i=e.notAsked??(()=>Q);return ne(A.wrap(t),{AsyncSuccess:r=>o(r.$.value),AsyncFailure:r=>n(r.$.error),Loading:r=>s(r.$.previousValue??Ve(void 0)),NotAsked:i})},xn=(t=10)=>e=>{const n=setTimeout(()=>{var o;(o=e.element)==null||o.focus()},t);return o=>clearTimeout(n)},bn=(t=10)=>e=>{const n=setTimeout(()=>{var o;(o=e.element)==null||o.select()},t);return o=>{clearTimeout(n)}},_n=t=>{const e=t.element,n=e.style.getPropertyValue(":empty");return e.style.setProperty(":empty","display:none"),o=>{o&&e.style.setProperty(":empty",n)}},An=t=>re("head > title",bt.innerText(t)),Ln={partial:{root:null,rootMargin:"0px",threshold:0},full:{root:null,rootMargin:"0px",threshold:1}},lt={partial:new Map,full:new Map},Z={partial:null,full:null};function En(t){return Z[t]==null&&(Z[t]=new IntersectionObserver(e=>{e.forEach(n=>{const o=lt[t].get(n.target);o==null||o.set(n.isIntersecting)})},Ln[t])),Z[t]}const ge=(t,e)=>{const n=D(J());return j(ie(o=>{const s=typeof IntersectionObserver<"u"?En(t):null;return lt[t].set(o,n),s==null||s.observe(o),()=>{var i;s==null||s.unobserve(o),lt[t].delete(o),lt[t].size===0&&((i=Z[t])==null||i.disconnect(),Z[t]=null)}}),ot(n.dispose),b(e(n)))},Sn=(t,e,n)=>ge(t,o=>se(o,e,n??Q)),at=Math.min,$=Math.max,ut=Math.round,ct=Math.floor,M=t=>({x:t,y:t}),Rn={left:"right",right:"left",bottom:"top",top:"bottom"},On={start:"end",end:"start"};function kt(t,e,n){return $(t,at(e,n))}function dt(t,e){return typeof t=="function"?t(e):t}function V(t){return t.split("-")[0]}function pt(t){return t.split("-")[1]}function we(t){return t==="x"?"y":"x"}function ye(t){return t==="y"?"height":"width"}function B(t){return["top","bottom"].includes(V(t))?"y":"x"}function ve(t){return we(B(t))}function Pn(t,e,n){n===void 0&&(n=!1);const o=pt(t),s=ve(t),i=ye(s);let r=s==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(r=ft(r)),[r,ft(r)]}function Dn(t){const e=ft(t);return[xt(t),e,xt(e)]}function xt(t){return t.replace(/start|end/g,e=>On[e])}function Tn(t,e,n){const o=["left","right"],s=["right","left"],i=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:o:e?o:s;case"left":case"right":return e?i:r;default:return[]}}function Cn(t,e,n,o){const s=pt(t);let i=Tn(V(t),n==="start",o);return s&&(i=i.map(r=>r+"-"+s),e&&(i=i.concat(i.map(xt)))),i}function ft(t){return t.replace(/left|right|bottom|top/g,e=>Rn[e])}function kn(t){return{top:0,right:0,bottom:0,left:0,...t}}function Mn(t){return typeof t!="number"?kn(t):{top:t,right:t,bottom:t,left:t}}function ht(t){const{x:e,y:n,width:o,height:s}=t;return{width:o,height:s,top:n,left:e,right:e+o,bottom:n+s,x:e,y:n}}function Mt(t,e,n){let{reference:o,floating:s}=t;const i=B(e),r=ve(e),c=ye(r),l=V(e),a=i==="y",f=o.x+o.width/2-s.width/2,u=o.y+o.height/2-s.height/2,p=o[c]/2-s[c]/2;let d;switch(l){case"top":d={x:f,y:o.y-s.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-s.width,y:u};break;default:d={x:o.x,y:o.y}}switch(pt(e)){case"start":d[r]-=p*(n&&a?-1:1);break;case"end":d[r]+=p*(n&&a?-1:1);break}return d}const Fn=async(t,e,n)=>{const{placement:o="bottom",strategy:s="absolute",middleware:i=[],platform:r}=n,c=i.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(e));let a=await r.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:u}=Mt(a,o,l),p=o,d={},g=0;for(let w=0;w<c.length;w++){const{name:y,fn:m}=c[w],{x:v,y:x,data:L,reset:_}=await m({x:f,y:u,initialPlacement:o,placement:p,strategy:s,middlewareData:d,rects:a,platform:r,elements:{reference:t,floating:e}});f=v??f,u=x??u,d={...d,[y]:{...d[y],...L}},_&&g<=50&&(g++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(a=_.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:s}):_.rects),{x:f,y:u}=Mt(a,p,l)),w=-1)}return{x:f,y:u,placement:p,strategy:s,middlewareData:d}};async function xe(t,e){var n;e===void 0&&(e={});const{x:o,y:s,platform:i,rects:r,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:p=!1,padding:d=0}=dt(e,t),g=Mn(d),y=c[p?u==="floating"?"reference":"floating":u],m=ht(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:a,rootBoundary:f,strategy:l})),v=u==="floating"?{x:o,y:s,width:r.floating.width,height:r.floating.height}:r.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),L=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},_=ht(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:v,offsetParent:x,strategy:l}):v);return{top:(m.top-_.top+g.top)/L.y,bottom:(_.bottom-m.bottom+g.bottom)/L.y,left:(m.left-_.left+g.left)/L.x,right:(_.right-m.right+g.right)/L.x}}const Nn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:s,middlewareData:i,rects:r,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:w=!0,...y}=dt(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const m=V(s),v=B(c),x=V(c)===c,L=await(l.isRTL==null?void 0:l.isRTL(a.floating)),_=p||(x||!w?[ft(c)]:Dn(c)),H=g!=="none";!p&&H&&_.push(...Cn(c,w,g,L));const Ce=[c,..._],wt=await xe(e,y),it=[];let X=((o=i.flip)==null?void 0:o.overflows)||[];if(f&&it.push(wt[m]),u){const N=Pn(s,r,L);it.push(wt[N[0]],wt[N[1]])}if(X=[...X,{placement:s,overflows:it}],!it.every(N=>N<=0)){var Ot,Pt;const N=(((Ot=i.flip)==null?void 0:Ot.index)||0)+1,Tt=Ce[N];if(Tt)return{data:{index:N,overflows:X},reset:{placement:Tt}};let Y=(Pt=X.filter(z=>z.overflows[0]<=0).sort((z,C)=>z.overflows[1]-C.overflows[1])[0])==null?void 0:Pt.placement;if(!Y)switch(d){case"bestFit":{var Dt;const z=(Dt=X.filter(C=>{if(H){const k=B(C.placement);return k===v||k==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(k=>k>0).reduce((k,ke)=>k+ke,0)]).sort((C,k)=>C[1]-k[1])[0])==null?void 0:Dt[0];z&&(Y=z);break}case"initialPlacement":Y=c;break}if(s!==Y)return{reset:{placement:Y}}}return{}}}};async function $n(t,e){const{placement:n,platform:o,elements:s}=t,i=await(o.isRTL==null?void 0:o.isRTL(s.floating)),r=V(n),c=pt(n),l=B(n)==="y",a=["left","top"].includes(r)?-1:1,f=i&&l?-1:1,u=dt(e,t);let{mainAxis:p,crossAxis:d,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return c&&typeof g=="number"&&(d=c==="end"?g*-1:g),l?{x:d*f,y:p*a}:{x:p*a,y:d*f}}const Vn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:s,y:i,placement:r,middlewareData:c}=e,l=await $n(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:r}}}}},Wn=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:s}=e,{mainAxis:i=!0,crossAxis:r=!1,limiter:c={fn:y=>{let{x:m,y:v}=y;return{x:m,y:v}}},...l}=dt(t,e),a={x:n,y:o},f=await xe(e,l),u=B(V(s)),p=we(u);let d=a[p],g=a[u];if(i){const y=p==="y"?"top":"left",m=p==="y"?"bottom":"right",v=d+f[y],x=d-f[m];d=kt(v,d,x)}if(r){const y=u==="y"?"top":"left",m=u==="y"?"bottom":"right",v=g+f[y],x=g-f[m];g=kt(v,g,x)}const w=c.fn({...e,[p]:d,[u]:g});return{...w,data:{x:w.x-n,y:w.y-o}}}}};function K(t){return be(t)?(t.nodeName||"").toLowerCase():"#document"}function S(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function T(t){var e;return(e=(be(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function be(t){return t instanceof Node||t instanceof S(t).Node}function O(t){return t instanceof Element||t instanceof S(t).Element}function P(t){return t instanceof HTMLElement||t instanceof S(t).HTMLElement}function Ft(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof S(t).ShadowRoot}function st(t){const{overflow:e,overflowX:n,overflowY:o,display:s}=R(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(s)}function Hn(t){return["table","td","th"].includes(K(t))}function mt(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Et(t){const e=St(),n=R(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function zn(t){let e=F(t);for(;P(e)&&!U(e);){if(mt(e))return null;if(Et(e))return e;e=F(e)}return null}function St(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function U(t){return["html","body","#document"].includes(K(t))}function R(t){return S(t).getComputedStyle(t)}function gt(t){return O(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function F(t){if(K(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ft(t)&&t.host||T(t);return Ft(e)?e.host:e}function _e(t){const e=F(t);return U(e)?t.ownerDocument?t.ownerDocument.body:t.body:P(e)&&st(e)?e:_e(e)}function tt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=_e(t),i=s===((o=t.ownerDocument)==null?void 0:o.body),r=S(s);return i?e.concat(r,r.visualViewport||[],st(s)?s:[],r.frameElement&&n?tt(r.frameElement):[]):e.concat(s,tt(s,[],n))}function Ae(t){const e=R(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const s=P(t),i=s?t.offsetWidth:n,r=s?t.offsetHeight:o,c=ut(n)!==i||ut(o)!==r;return c&&(n=i,o=r),{width:n,height:o,$:c}}function Rt(t){return O(t)?t:t.contextElement}function I(t){const e=Rt(t);if(!P(e))return M(1);const n=e.getBoundingClientRect(),{width:o,height:s,$:i}=Ae(e);let r=(i?ut(n.width):n.width)/o,c=(i?ut(n.height):n.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const In=M(0);function Le(t){const e=S(t);return!St()||!e.visualViewport?In:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Bn(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==S(t)?!1:e}function W(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=Rt(t);let r=M(1);e&&(o?O(o)&&(r=I(o)):r=I(t));const c=Bn(i,n,o)?Le(i):M(0);let l=(s.left+c.x)/r.x,a=(s.top+c.y)/r.y,f=s.width/r.x,u=s.height/r.y;if(i){const p=S(i),d=o&&O(o)?S(o):o;let g=p,w=g.frameElement;for(;w&&o&&d!==g;){const y=I(w),m=w.getBoundingClientRect(),v=R(w),x=m.left+(w.clientLeft+parseFloat(v.paddingLeft))*y.x,L=m.top+(w.clientTop+parseFloat(v.paddingTop))*y.y;l*=y.x,a*=y.y,f*=y.x,u*=y.y,l+=x,a+=L,g=S(w),w=g.frameElement}}return ht({width:f,height:u,x:l,y:a})}function Un(t){let{elements:e,rect:n,offsetParent:o,strategy:s}=t;const i=s==="fixed",r=T(o),c=e?mt(e.floating):!1;if(o===r||c&&i)return n;let l={scrollLeft:0,scrollTop:0},a=M(1);const f=M(0),u=P(o);if((u||!u&&!i)&&((K(o)!=="body"||st(r))&&(l=gt(o)),P(o))){const p=W(o);a=I(o),f.x=p.x+o.clientLeft,f.y=p.y+o.clientTop}return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+f.x,y:n.y*a.y-l.scrollTop*a.y+f.y}}function qn(t){return Array.from(t.getClientRects())}function Ee(t){return W(T(t)).left+gt(t).scrollLeft}function jn(t){const e=T(t),n=gt(t),o=t.ownerDocument.body,s=$(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=$(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+Ee(t);const c=-n.scrollTop;return R(o).direction==="rtl"&&(r+=$(e.clientWidth,o.clientWidth)-s),{width:s,height:i,x:r,y:c}}function Jn(t,e){const n=S(t),o=T(t),s=n.visualViewport;let i=o.clientWidth,r=o.clientHeight,c=0,l=0;if(s){i=s.width,r=s.height;const a=St();(!a||a&&e==="fixed")&&(c=s.offsetLeft,l=s.offsetTop)}return{width:i,height:r,x:c,y:l}}function Kn(t,e){const n=W(t,!0,e==="fixed"),o=n.top+t.clientTop,s=n.left+t.clientLeft,i=P(t)?I(t):M(1),r=t.clientWidth*i.x,c=t.clientHeight*i.y,l=s*i.x,a=o*i.y;return{width:r,height:c,x:l,y:a}}function Nt(t,e,n){let o;if(e==="viewport")o=Jn(t,n);else if(e==="document")o=jn(T(t));else if(O(e))o=Kn(e,n);else{const s=Le(t);o={...e,x:e.x-s.x,y:e.y-s.y}}return ht(o)}function Se(t,e){const n=F(t);return n===e||!O(n)||U(n)?!1:R(n).position==="fixed"||Se(n,e)}function Xn(t,e){const n=e.get(t);if(n)return n;let o=tt(t,[],!1).filter(c=>O(c)&&K(c)!=="body"),s=null;const i=R(t).position==="fixed";let r=i?F(t):t;for(;O(r)&&!U(r);){const c=R(r),l=Et(r);!l&&c.position==="fixed"&&(s=null),(i?!l&&!s:!l&&c.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||st(r)&&!l&&Se(t,r))?o=o.filter(f=>f!==r):s=c,r=F(r)}return e.set(t,o),o}function Yn(t){let{element:e,boundary:n,rootBoundary:o,strategy:s}=t;const r=[...n==="clippingAncestors"?mt(e)?[]:Xn(e,this._c):[].concat(n),o],c=r[0],l=r.reduce((a,f)=>{const u=Nt(e,f,s);return a.top=$(u.top,a.top),a.right=at(u.right,a.right),a.bottom=at(u.bottom,a.bottom),a.left=$(u.left,a.left),a},Nt(e,c,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Gn(t){const{width:e,height:n}=Ae(t);return{width:e,height:n}}function Zn(t,e,n){const o=P(e),s=T(e),i=n==="fixed",r=W(t,!0,i,e);let c={scrollLeft:0,scrollTop:0};const l=M(0);if(o||!o&&!i)if((K(e)!=="body"||st(s))&&(c=gt(e)),o){const u=W(e,!0,i,e);l.x=u.x+e.clientLeft,l.y=u.y+e.clientTop}else s&&(l.x=Ee(s));const a=r.left+c.scrollLeft-l.x,f=r.top+c.scrollTop-l.y;return{x:a,y:f,width:r.width,height:r.height}}function vt(t){return R(t).position==="static"}function $t(t,e){return!P(t)||R(t).position==="fixed"?null:e?e(t):t.offsetParent}function Re(t,e){const n=S(t);if(mt(t))return n;if(!P(t)){let s=F(t);for(;s&&!U(s);){if(O(s)&&!vt(s))return s;s=F(s)}return n}let o=$t(t,e);for(;o&&Hn(o)&&vt(o);)o=$t(o,e);return o&&U(o)&&vt(o)&&!Et(o)?n:o||zn(t)||n}const Qn=async function(t){const e=this.getOffsetParent||Re,n=this.getDimensions,o=await n(t.floating);return{reference:Zn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function to(t){return R(t).direction==="rtl"}const eo={convertOffsetParentRelativeRectToViewportRelativeRect:Un,getDocumentElement:T,getClippingRect:Yn,getOffsetParent:Re,getElementRects:Qn,getClientRects:qn,getDimensions:Gn,getScale:I,isElement:O,isRTL:to};function no(t,e){let n=null,o;const s=T(t);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function r(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),i();const{left:a,top:f,width:u,height:p}=t.getBoundingClientRect();if(c||e(),!u||!p)return;const d=ct(f),g=ct(s.clientWidth-(a+u)),w=ct(s.clientHeight-(f+p)),y=ct(a),v={rootMargin:-d+"px "+-g+"px "+-w+"px "+-y+"px",threshold:$(0,at(1,l))||1};let x=!0;function L(_){const H=_[0].intersectionRatio;if(H!==l){if(!x)return r();H?r(!1,H):o=setTimeout(()=>{r(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(L,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(L,v)}n.observe(t)}return r(!0),i}function oo(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Rt(t),f=s||i?[...a?tt(a):[],...tt(e)]:[];f.forEach(m=>{s&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});const u=a&&c?no(a,n):null;let p=-1,d=null;r&&(d=new ResizeObserver(m=>{let[v]=m;v&&v.target===a&&d&&(d.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=d)==null||x.observe(e)})),n()}),a&&!l&&d.observe(a),d.observe(e));let g,w=l?W(t):null;l&&y();function y(){const m=W(t);w&&(m.x!==w.x||m.y!==w.y||m.width!==w.width||m.height!==w.height)&&n(),w=m,g=requestAnimationFrame(y)}return n(),()=>{var m;f.forEach(v=>{s&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),u==null||u(),(m=d)==null||m.disconnect(),d=null,l&&cancelAnimationFrame(g)}}const so=Vn,io=Wn,Vt=Nn,ro=(t,e,n)=>{const o=new Map,s={platform:eo,...n},i={...s.platform,_c:o};return Fn(t,e,{...s,platform:i})},co=({content:t,open:e,placement:n,offset:{mainAxis:o,crossAxis:s}={mainAxis:0,crossAxis:0}})=>i=>{const r=i.element,c=A.wrap(e);return se(c,re("body",Xt.div(ie(l=>{const a=l;return a.style.position="absolute",oo(r,a,()=>{ro(r,a,{placement:n,strategy:"absolute",middleware:[Vt(),so({mainAxis:o,crossAxis:s}),io(),Vt()]}).then(({x:f,y:u})=>{a.style.top=`${u}px`,a.style.left=`${f}px`})})}),t())))(i)},Oe=(t,e)=>{if(typeof e=="function")return Oe(t,{success:e});const n=e.failure??(s=>j(ot(s.on(console.error)),s.map(i=>`Error: ${i}`))),o=e.success;return ne(A.wrap(t),{Success:s=>o(s.$.value),Failure:s=>n(s.$.error)})},lo=()=>te.focus(t=>{var e;return(e=t.target)==null?void 0:e.select()}),ao=t=>e=>{const n=e.element,o=D({width:n.clientWidth,height:n.clientHeight}),s=b(t(o))(e),i=()=>{o.set({width:n.clientWidth,height:n.clientHeight})};let r;return typeof ResizeObserver=="function"&&(r=new ResizeObserver(i),r.observe(n)),c=>{r==null||r.disconnect(),s(c)}},uo=t=>e=>{const n=D({width:(window==null?void 0:window.innerWidth)??0,height:(window==null?void 0:window.innerHeight)??0}),o=b(t(n))(e),s=()=>{n.set({width:(window==null?void 0:window.innerWidth)??0,height:(window==null?void 0:window.innerHeight)??0})};return window==null||window.addEventListener("resize",s),i=>{window==null||window.removeEventListener("resize",s),o(i)}},Pe=(t,e)=>{const n=e.split("/").filter(s=>s!==""),o={};for(let s=0;s<t.length;s++){const i=t[s],r=n[s];if(!r&&i.type!=="catch-all")return null;if(i.type==="literal"){if(i.value!==r)return null}else if(i.type==="param")o[i.name]=r;else if(i.type==="catch-all")return{params:o,path:e}}return n.length!==t.length?null:{params:o,path:e}},De=t=>t.split("/").map(e=>e.startsWith(":")?{type:"param",name:e.slice(1)}:e==="*"?{type:"catch-all"}:{type:"literal",value:e}).filter(e=>e.type!=="literal"||e.value!==""),Te=t=>{const e=t.map(n=>{const o=De(n);return{route:n,segments:o}});return function(o){for(const{segments:s,route:i}of e){const r=Pe(s,o);if(r)return{...r,route:i}}return null}},fo=t=>{const e=Te(Object.keys(t));return At(n=>{const o=n.map(s=>{const i=e(s.pathname);if(i==null)throw console.error("No route found for",s),new Error("No route found");return{params:i.params,route:i.route,path:i.path,search:s.search,hash:s.hash}});return an(o.map(s=>[s.route,s]),t)})};exports.Anchor=wn;exports.AsyncResultView=me;exports.AutoFocus=xn;exports.AutoSelect=bn;exports.ElementSize=ao;exports.HTMLTitle=An;exports.HiddenWhenEmpty=_n;exports.InViewport=ge;exports.LocationProviderMarker=_t;exports.PopOver=co;exports.ProvideAppearance=yn;exports.ProvideLocation=gn;exports.ResultView=Oe;exports.Router=fo;exports.SelectOnFocus=lo;exports.UseAppearance=vn;exports.UseLocation=At;exports.WhenInViewport=Sn;exports.WindowSize=uo;exports._makeLocation=ae;exports._makeLocationProp=pe;exports._makeRouteMatcher=Te;exports._parseRouteSegments=De;exports.appearanceMarker=Lt;exports.areLocationsEqual=ue;exports.locationFromURL=fe;exports.matchesRoute=Pe;exports.setLocationFromUrl=he;exports.urlFromLocation=de;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@tempots/dom"),ct=u.makeProviderMark("LocationProvider"),At=()=>{const t=(window==null?void 0:window.location.hash)===""?void 0:(window==null?void 0:window.location.hash.substring(1))??void 0;return{pathname:(window==null?void 0:window.location.pathname)??"",search:Object.fromEntries(new URLSearchParams((window==null?void 0:window.location.search)??"").entries()),hash:t}},Rt=(t,e)=>t.pathname===e.pathname&&JSON.stringify(t.search)===JSON.stringify(e.search)&&t.hash===e.hash,Lt=t=>{const e=new URL(t,(window==null?void 0:window.location.toString())??""),o=Object.fromEntries(e.searchParams.entries());let n=e.hash;return n.startsWith("#")&&(n=n.substring(1)),{pathname:e.pathname,search:o,hash:n===""?void 0:n}},Et=(t,e)=>{const o=Lt(e);return t.set(o),t},St=t=>{const o=new URLSearchParams(t.search).toString(),n=t.hash;return`${t.pathname}${o?`?${o}`:""}${n?`#${n}`:""}`},Tt=()=>{const t=u.makeProp(At(),Rt),e=()=>{let o=(window==null?void 0:window.location.hash)??"";o.startsWith("#")&&(o=o.substring(1));const n={pathname:(window==null?void 0:window.location.pathname)??"",search:Object.fromEntries(new URLSearchParams((window==null?void 0:window.location.search)??"").entries()),hash:o===""?void 0:o};t.set(n)};return window==null||window.addEventListener("popstate",e),t.onDispose(()=>{window==null||window.removeEventListener("popstate",e)}),t.on(o=>{window==null||window.history.pushState({},"",St(o))}),t},Yt=t=>{const e=Tt();return u.Fragment(u.OnUnmount(e.dispose),u.WithProvider(ct,e,t))},lt=t=>u.UseProvider(ct,e=>o=>{const n=u.makeProp(e.value,e.equals);e.feedProp(n),n.on(e.set);const i=u.renderableOfTNode(t(n))(o);return r=>{n.dispose(),i(r)}}),Jt=(t,...e)=>lt(o=>u.html.a(u.on.click(u.handleAnchorClick(()=>(Et(o,u.Signal.unwrap(t)),!0))),u.attr.href(t),...e)),at=u.makeProviderMark("Appearance"),Kt=t=>{const e=window.matchMedia!=null&&window.matchMedia("(prefers-color-scheme: dark)").matches,o=u.makeProp(e?"dark":"light"),n=r=>{o.set(r.matches?"dark":"light")},i=window.matchMedia!=null?window.matchMedia("(prefers-color-scheme: dark)"):void 0;return i==null||i.addEventListener("change",n),u.Fragment(u.WithProvider(at,o,t),u.OnUnmount(()=>i==null?void 0:i.removeEventListener("change",n)))},Gt=t=>u.UseProvider(at,t),kt=(t,e)=>{if(typeof e=="function")return kt(t,{success:e});const o=e.failure??(s=>u.Fragment(u.OnUnmount(s.on(console.error)),s.map(c=>`Error: ${c}`))),n=e.success,i=e.loading??(()=>u.Empty),r=e.notAsked??(()=>u.Empty);return u.OneOfType(u.Signal.wrap(t),{AsyncSuccess:s=>n(s.$.value),AsyncFailure:s=>o(s.$.error),Loading:s=>i(s.$.previousValue??u.makeSignal(void 0)),NotAsked:r})},Qt=(t=10)=>e=>{const o=setTimeout(()=>{var n;(n=e.element)==null||n.focus()},t);return n=>clearTimeout(o)},Zt=(t=10)=>e=>{const o=setTimeout(()=>{var n;(n=e.element)==null||n.select()},t);return n=>{clearTimeout(o)}},te=t=>{const e=t.element,o=e.style.getPropertyValue(":empty");return e.style.setProperty(":empty","display:none"),n=>{n&&e.style.setProperty(":empty",o)}},ee=t=>u.Portal("head > title",u.attr.innerText(t)),ne={partial:{root:null,rootMargin:"0px",threshold:0},full:{root:null,rootMargin:"0px",threshold:1}},J={partial:new Map,full:new Map},I={partial:null,full:null};function oe(t){return I[t]==null&&(I[t]=new IntersectionObserver(e=>{e.forEach(o=>{const n=J[t].get(o.target);n==null||n.set(o.isIntersecting)})},ne[t])),I[t]}const Pt=(t,e)=>{const o=u.makeProp(u.isSSR());return u.Fragment(u.OnMount(n=>{const i=typeof IntersectionObserver<"u"?oe(t):null;return J[t].set(n,o),i==null||i.observe(n),()=>{var r;i==null||i.unobserve(n),J[t].delete(n),J[t].size===0&&((r=I[t])==null||r.disconnect(),I[t]=null)}}),u.OnUnmount(o.dispose),u.renderableOfTNode(e(o)))},ie=(t,e,o)=>Pt(t,n=>u.When(n,e,o??u.Empty)),K=Math.min,M=Math.max,G=Math.round,Y=Math.floor,P=t=>({x:t,y:t}),re={left:"right",right:"left",bottom:"top",top:"bottom"},se={start:"end",end:"start"};function wt(t,e,o){return M(t,K(e,o))}function tt(t,e){return typeof t=="function"?t(e):t}function W(t){return t.split("-")[0]}function et(t){return t.split("-")[1]}function Ct(t){return t==="x"?"y":"x"}function Ft(t){return t==="y"?"height":"width"}function z(t){return["top","bottom"].includes(W(t))?"y":"x"}function Mt(t){return Ct(z(t))}function ce(t,e,o){o===void 0&&(o=!1);const n=et(t),i=Mt(t),r=Ft(i);let s=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=Q(s)),[s,Q(s)]}function le(t){const e=Q(t);return[st(t),e,st(e)]}function st(t){return t.replace(/start|end/g,e=>se[e])}function ae(t,e,o){const n=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return o?e?i:n:e?n:i;case"left":case"right":return e?r:s;default:return[]}}function ue(t,e,o,n){const i=et(t);let r=ae(W(t),o==="start",n);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(st)))),r}function Q(t){return t.replace(/left|right|bottom|top/g,e=>re[e])}function fe(t){return{top:0,right:0,bottom:0,left:0,...t}}function de(t){return typeof t!="number"?fe(t):{top:t,right:t,bottom:t,left:t}}function Z(t){const{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}function yt(t,e,o){let{reference:n,floating:i}=t;const r=z(e),s=Mt(e),c=Ft(s),a=W(e),l=r==="y",d=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,p=n[c]/2-i[c]/2;let h;switch(a){case"top":h={x:d,y:n.y-i.height};break;case"bottom":h={x:d,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:f};break;case"left":h={x:n.x-i.width,y:f};break;default:h={x:n.x,y:n.y}}switch(et(e)){case"start":h[s]-=p*(o&&l?-1:1);break;case"end":h[s]+=p*(o&&l?-1:1);break}return h}const he=async(t,e,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:r=[],platform:s}=o,c=r.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:f}=yt(l,n,a),p=n,h={},g=0;for(let w=0;w<c.length;w++){const{name:y,fn:m}=c[w],{x:v,y:x,data:O,reset:b}=await m({x:d,y:f,initialPlacement:n,placement:p,strategy:i,middlewareData:h,rects:l,platform:s,elements:{reference:t,floating:e}});d=v??d,f=x??f,h={...h,[y]:{...h[y],...O}},b&&g<=50&&(g++,typeof b=="object"&&(b.placement&&(p=b.placement),b.rects&&(l=b.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):b.rects),{x:d,y:f}=yt(l,p,a)),w=-1)}return{x:d,y:f,placement:p,strategy:i,middlewareData:h}};async function Wt(t,e){var o;e===void 0&&(e={});const{x:n,y:i,platform:r,rects:s,elements:c,strategy:a}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:h=0}=tt(e,t),g=de(h),y=c[p?f==="floating"?"reference":"floating":f],m=Z(await r.getClippingRect({element:(o=await(r.isElement==null?void 0:r.isElement(y)))==null||o?y:y.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:l,rootBoundary:d,strategy:a})),v=f==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,x=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),O=await(r.isElement==null?void 0:r.isElement(x))?await(r.getScale==null?void 0:r.getScale(x))||{x:1,y:1}:{x:1,y:1},b=Z(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:v,offsetParent:x,strategy:a}):v);return{top:(m.top-b.top+g.top)/O.y,bottom:(b.bottom-m.bottom+g.bottom)/O.y,left:(m.left-b.left+g.left)/O.x,right:(b.right-m.right+g.right)/O.x}}const me=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o,n;const{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:a,elements:l}=e,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:w=!0,...y}=tt(t,e);if((o=r.arrow)!=null&&o.alignmentOffset)return{};const m=W(i),v=z(c),x=W(c)===c,O=await(a.isRTL==null?void 0:a.isRTL(l.floating)),b=p||(x||!w?[Q(c)]:le(c)),N=g!=="none";!p&&N&&b.push(...ue(c,w,g,O));const qt=[c,...b],it=await Wt(e,y),X=[];let _=((n=r.flip)==null?void 0:n.overflows)||[];if(d&&X.push(it[m]),f){const F=ce(i,s,O);X.push(it[F[0]],it[F[1]])}if(_=[..._,{placement:i,overflows:X}],!X.every(F=>F<=0)){var ht,mt;const F=(((ht=r.flip)==null?void 0:ht.index)||0)+1,gt=qt[F];if(gt)return{data:{index:F,overflows:_},reset:{placement:gt}};let B=(mt=_.filter(V=>V.overflows[0]<=0).sort((V,T)=>V.overflows[1]-T.overflows[1])[0])==null?void 0:mt.placement;if(!B)switch(h){case"bestFit":{var pt;const V=(pt=_.filter(T=>{if(N){const k=z(T.placement);return k===v||k==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(k=>k>0).reduce((k,Xt)=>k+Xt,0)]).sort((T,k)=>T[1]-k[1])[0])==null?void 0:pt[0];V&&(B=V);break}case"initialPlacement":B=c;break}if(i!==B)return{reset:{placement:B}}}return{}}}};async function pe(t,e){const{placement:o,platform:n,elements:i}=t,r=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=W(o),c=et(o),a=z(o)==="y",l=["left","top"].includes(s)?-1:1,d=r&&a?-1:1,f=tt(e,t);let{mainAxis:p,crossAxis:h,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return c&&typeof g=="number"&&(h=c==="end"?g*-1:g),a?{x:h*d,y:p*l}:{x:p*l,y:h*d}}const ge=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;const{x:i,y:r,placement:s,middlewareData:c}=e,a=await pe(e,t);return s===((o=c.offset)==null?void 0:o.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:i+a.x,y:r+a.y,data:{...a,placement:s}}}}},we=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:n,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:y=>{let{x:m,y:v}=y;return{x:m,y:v}}},...a}=tt(t,e),l={x:o,y:n},d=await Wt(e,a),f=z(W(i)),p=Ct(f);let h=l[p],g=l[f];if(r){const y=p==="y"?"top":"left",m=p==="y"?"bottom":"right",v=h+d[y],x=h-d[m];h=wt(v,h,x)}if(s){const y=f==="y"?"top":"left",m=f==="y"?"bottom":"right",v=g+d[y],x=g-d[m];g=wt(v,g,x)}const w=c.fn({...e,[p]:h,[f]:g});return{...w,data:{x:w.x-o,y:w.y-n}}}}};function H(t){return Dt(t)?(t.nodeName||"").toLowerCase():"#document"}function A(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function S(t){var e;return(e=(Dt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Dt(t){return t instanceof Node||t instanceof A(t).Node}function L(t){return t instanceof Element||t instanceof A(t).Element}function E(t){return t instanceof HTMLElement||t instanceof A(t).HTMLElement}function vt(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof A(t).ShadowRoot}function q(t){const{overflow:e,overflowX:o,overflowY:n,display:i}=R(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&!["inline","contents"].includes(i)}function ye(t){return["table","td","th"].includes(H(t))}function nt(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function ut(t){const e=ft(),o=R(t);return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!e&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!e&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(o.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(o.contain||"").includes(n))}function ve(t){let e=C(t);for(;E(e)&&!U(e);){if(nt(e))return null;if(ut(e))return e;e=C(e)}return null}function ft(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function U(t){return["html","body","#document"].includes(H(t))}function R(t){return A(t).getComputedStyle(t)}function ot(t){return L(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function C(t){if(H(t)==="html")return t;const e=t.assignedSlot||t.parentNode||vt(t)&&t.host||S(t);return vt(e)?e.host:e}function Nt(t){const e=C(t);return U(e)?t.ownerDocument?t.ownerDocument.body:t.body:E(e)&&q(e)?e:Nt(e)}function j(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);const i=Nt(t),r=i===((n=t.ownerDocument)==null?void 0:n.body),s=A(i);return r?e.concat(s,s.visualViewport||[],q(i)?i:[],s.frameElement&&o?j(s.frameElement):[]):e.concat(i,j(i,[],o))}function Vt(t){const e=R(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=E(t),r=i?t.offsetWidth:o,s=i?t.offsetHeight:n,c=G(o)!==r||G(n)!==s;return c&&(o=r,n=s),{width:o,height:n,$:c}}function dt(t){return L(t)?t:t.contextElement}function $(t){const e=dt(t);if(!E(e))return P(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:r}=Vt(e);let s=(r?G(o.width):o.width)/n,c=(r?G(o.height):o.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const xe=P(0);function $t(t){const e=A(t);return!ft()||!e.visualViewport?xe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function be(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==A(t)?!1:e}function D(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),r=dt(t);let s=P(1);e&&(n?L(n)&&(s=$(n)):s=$(t));const c=be(r,o,n)?$t(r):P(0);let a=(i.left+c.x)/s.x,l=(i.top+c.y)/s.y,d=i.width/s.x,f=i.height/s.y;if(r){const p=A(r),h=n&&L(n)?A(n):n;let g=p,w=g.frameElement;for(;w&&n&&h!==g;){const y=$(w),m=w.getBoundingClientRect(),v=R(w),x=m.left+(w.clientLeft+parseFloat(v.paddingLeft))*y.x,O=m.top+(w.clientTop+parseFloat(v.paddingTop))*y.y;a*=y.x,l*=y.y,d*=y.x,f*=y.y,a+=x,l+=O,g=A(w),w=g.frameElement}}return Z({width:d,height:f,x:a,y:l})}function Oe(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const r=i==="fixed",s=S(n),c=e?nt(e.floating):!1;if(n===s||c&&r)return o;let a={scrollLeft:0,scrollTop:0},l=P(1);const d=P(0),f=E(n);if((f||!f&&!r)&&((H(n)!=="body"||q(s))&&(a=ot(n)),E(n))){const p=D(n);l=$(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}return{width:o.width*l.x,height:o.height*l.y,x:o.x*l.x-a.scrollLeft*l.x+d.x,y:o.y*l.y-a.scrollTop*l.y+d.y}}function Ae(t){return Array.from(t.getClientRects())}function zt(t){return D(S(t)).left+ot(t).scrollLeft}function Re(t){const e=S(t),o=ot(t),n=t.ownerDocument.body,i=M(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=M(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-o.scrollLeft+zt(t);const c=-o.scrollTop;return R(n).direction==="rtl"&&(s+=M(e.clientWidth,n.clientWidth)-i),{width:i,height:r,x:s,y:c}}function Le(t,e){const o=A(t),n=S(t),i=o.visualViewport;let r=n.clientWidth,s=n.clientHeight,c=0,a=0;if(i){r=i.width,s=i.height;const l=ft();(!l||l&&e==="fixed")&&(c=i.offsetLeft,a=i.offsetTop)}return{width:r,height:s,x:c,y:a}}function Ee(t,e){const o=D(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,r=E(t)?$(t):P(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,a=i*r.x,l=n*r.y;return{width:s,height:c,x:a,y:l}}function xt(t,e,o){let n;if(e==="viewport")n=Le(t,o);else if(e==="document")n=Re(S(t));else if(L(e))n=Ee(e,o);else{const i=$t(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return Z(n)}function Ut(t,e){const o=C(t);return o===e||!L(o)||U(o)?!1:R(o).position==="fixed"||Ut(o,e)}function Se(t,e){const o=e.get(t);if(o)return o;let n=j(t,[],!1).filter(c=>L(c)&&H(c)!=="body"),i=null;const r=R(t).position==="fixed";let s=r?C(t):t;for(;L(s)&&!U(s);){const c=R(s),a=ut(s);!a&&c.position==="fixed"&&(i=null),(r?!a&&!i:!a&&c.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||q(s)&&!a&&Ut(t,s))?n=n.filter(d=>d!==s):i=c,s=C(s)}return e.set(t,n),n}function Te(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const s=[...o==="clippingAncestors"?nt(e)?[]:Se(e,this._c):[].concat(o),n],c=s[0],a=s.reduce((l,d)=>{const f=xt(e,d,i);return l.top=M(f.top,l.top),l.right=K(f.right,l.right),l.bottom=K(f.bottom,l.bottom),l.left=M(f.left,l.left),l},xt(e,c,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function ke(t){const{width:e,height:o}=Vt(t);return{width:e,height:o}}function Pe(t,e,o){const n=E(e),i=S(e),r=o==="fixed",s=D(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const a=P(0);if(n||!n&&!r)if((H(e)!=="body"||q(i))&&(c=ot(e)),n){const f=D(e,!0,r,e);a.x=f.x+e.clientLeft,a.y=f.y+e.clientTop}else i&&(a.x=zt(i));const l=s.left+c.scrollLeft-a.x,d=s.top+c.scrollTop-a.y;return{x:l,y:d,width:s.width,height:s.height}}function rt(t){return R(t).position==="static"}function bt(t,e){return!E(t)||R(t).position==="fixed"?null:e?e(t):t.offsetParent}function Ht(t,e){const o=A(t);if(nt(t))return o;if(!E(t)){let i=C(t);for(;i&&!U(i);){if(L(i)&&!rt(i))return i;i=C(i)}return o}let n=bt(t,e);for(;n&&ye(n)&&rt(n);)n=bt(n,e);return n&&U(n)&&rt(n)&&!ut(n)?o:n||ve(t)||o}const Ce=async function(t){const e=this.getOffsetParent||Ht,o=this.getDimensions,n=await o(t.floating);return{reference:Pe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Fe(t){return R(t).direction==="rtl"}const Me={convertOffsetParentRelativeRectToViewportRelativeRect:Oe,getDocumentElement:S,getClippingRect:Te,getOffsetParent:Ht,getElementRects:Ce,getClientRects:Ae,getDimensions:ke,getScale:$,isElement:L,isRTL:Fe};function We(t,e){let o=null,n;const i=S(t);function r(){var c;clearTimeout(n),(c=o)==null||c.disconnect(),o=null}function s(c,a){c===void 0&&(c=!1),a===void 0&&(a=1),r();const{left:l,top:d,width:f,height:p}=t.getBoundingClientRect();if(c||e(),!f||!p)return;const h=Y(d),g=Y(i.clientWidth-(l+f)),w=Y(i.clientHeight-(d+p)),y=Y(l),v={rootMargin:-h+"px "+-g+"px "+-w+"px "+-y+"px",threshold:M(0,K(1,a))||1};let x=!0;function O(b){const N=b[0].intersectionRatio;if(N!==a){if(!x)return s();N?s(!1,N):n=setTimeout(()=>{s(!1,1e-7)},1e3)}x=!1}try{o=new IntersectionObserver(O,{...v,root:i.ownerDocument})}catch{o=new IntersectionObserver(O,v)}o.observe(t)}return s(!0),r}function De(t,e,o,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=n,l=dt(t),d=i||r?[...l?j(l):[],...j(e)]:[];d.forEach(m=>{i&&m.addEventListener("scroll",o,{passive:!0}),r&&m.addEventListener("resize",o)});const f=l&&c?We(l,o):null;let p=-1,h=null;s&&(h=new ResizeObserver(m=>{let[v]=m;v&&v.target===l&&h&&(h.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(e)})),o()}),l&&!a&&h.observe(l),h.observe(e));let g,w=a?D(t):null;a&&y();function y(){const m=D(t);w&&(m.x!==w.x||m.y!==w.y||m.width!==w.width||m.height!==w.height)&&o(),w=m,g=requestAnimationFrame(y)}return o(),()=>{var m;d.forEach(v=>{i&&v.removeEventListener("scroll",o),r&&v.removeEventListener("resize",o)}),f==null||f(),(m=h)==null||m.disconnect(),h=null,a&&cancelAnimationFrame(g)}}const Ne=ge,Ve=we,Ot=me,$e=(t,e,o)=>{const n=new Map,i={platform:Me,...o},r={...i.platform,_c:n};return he(t,e,{...i,platform:r})},ze=({content:t,open:e,placement:o,offset:{mainAxis:n,crossAxis:i}={mainAxis:0,crossAxis:0}})=>r=>{const s=r.element,c=u.Signal.wrap(e);return u.When(c,u.Portal("body",u.html.div(u.OnMount(a=>{const l=a;return l.style.position="absolute",De(s,l,()=>{$e(s,l,{placement:o,strategy:"absolute",middleware:[Ot(),Ne({mainAxis:n,crossAxis:i}),Ve(),Ot()]}).then(({x:d,y:f})=>{l.style.top=`${f}px`,l.style.left=`${d}px`})})}),t())))(r)},_t=(t,e)=>{if(typeof e=="function")return _t(t,{success:e});const o=e.failure??(i=>u.Fragment(u.OnUnmount(i.on(console.error)),i.map(r=>`Error: ${r}`))),n=e.success;return u.OneOfType(u.Signal.wrap(t),{Success:i=>n(i.$.value),Failure:i=>o(i.$.error)})},Ue=()=>u.on.focus(t=>{var e;return(e=t.target)==null?void 0:e.select()}),He=t=>e=>{const o=e.element,n=u.makeProp({width:o.clientWidth,height:o.clientHeight}),i=u.renderableOfTNode(t(n))(e),r=()=>{n.set({width:o.clientWidth,height:o.clientHeight})};let s;return typeof ResizeObserver=="function"&&(s=new ResizeObserver(r),s.observe(o)),c=>{s==null||s.disconnect(),i(c)}},_e=t=>e=>{const o=u.makeProp({width:(window==null?void 0:window.innerWidth)??0,height:(window==null?void 0:window.innerHeight)??0}),n=u.renderableOfTNode(t(o))(e),i=()=>{o.set({width:(window==null?void 0:window.innerWidth)??0,height:(window==null?void 0:window.innerHeight)??0})};return window==null||window.addEventListener("resize",i),r=>{window==null||window.removeEventListener("resize",i),n(r)}},Bt=(t,e)=>{const o=e.split("/").filter(i=>i!==""),n={};for(let i=0;i<t.length;i++){const r=t[i],s=o[i];if(!s&&r.type!=="catch-all")return null;if(r.type==="literal"){if(r.value!==s)return null}else if(r.type==="param")n[r.name]=s;else if(r.type==="catch-all")return{params:n,path:e}}return o.length!==t.length?null:{params:n,path:e}},It=t=>t.split("/").map(e=>e.startsWith(":")?{type:"param",name:e.slice(1)}:e==="*"?{type:"catch-all"}:{type:"literal",value:e}).filter(e=>e.type!=="literal"||e.value!==""),jt=t=>{const e=t.map(o=>{const n=It(o);return{route:o,segments:n}});return function(n){for(const{segments:i,route:r}of e){const s=Bt(i,n);if(s)return{...s,route:r}}return null}},Be=t=>{const e=jt(Object.keys(t));return lt(o=>{const n=o.map(i=>{const r=e(i.pathname);if(r==null)throw console.error("No route found for",i),new Error("No route found");return{params:r.params,route:r.route,path:r.path,search:i.search,hash:i.hash}});return u.OneOfTuple(n.map(i=>[i.route,i]),t)})};exports.Anchor=Jt;exports.AsyncResultView=kt;exports.AutoFocus=Qt;exports.AutoSelect=Zt;exports.ElementSize=He;exports.HTMLTitle=ee;exports.HiddenWhenEmpty=te;exports.InViewport=Pt;exports.LocationProviderMarker=ct;exports.PopOver=ze;exports.ProvideAppearance=Kt;exports.ProvideLocation=Yt;exports.ResultView=_t;exports.Router=Be;exports.SelectOnFocus=Ue;exports.UseAppearance=Gt;exports.UseLocation=lt;exports.WhenInViewport=ie;exports.WindowSize=_e;exports._makeLocation=At;exports._makeLocationProp=Tt;exports._makeRouteMatcher=jt;exports._parseRouteSegments=It;exports.appearanceMarker=at;exports.areLocationsEqual=Rt;exports.locationFromURL=Lt;exports.matchesRoute=Bt;exports.setLocationFromUrl=Et;exports.urlFromLocation=St;