@tempots/ui 0.23.0-next.17 → 0.23.0-next.19
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.
- package/index.cjs +1 -1
- package/index.js +201 -201
- package/package.json +1 -1
- package/renderables/inviewport.d.ts +1 -1
package/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var se=Object.defineProperty;var ce=(t,e,n)=>e in t?se(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var At=(t,e,n)=>ce(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@tempots/dom"),Ft=t=>{const e=t.split("/").pop();if(e==null||e.startsWith("."))return;const n=e.split(".")||[];return n.length>1?"."+n.pop():void 0},Wt=(t,e)=>{const n=Ft(e);return n!=null&&(t.length===0||!t.some(o=>n==o))},le=(t,e,n,o)=>{let r=t.target;for(;r!=null&&!(r instanceof HTMLAnchorElement);)r=r.parentElement;if(r==null)return!0;const i=r;if(t.button!==0||t.ctrlKey||t.metaKey||i.target!=="_self"&&i.target!==""||i.getAttribute("download")!=null)return!0;const{pathname:s,search:c,hash:a}=i;if(o){const l=s+c+a,m=i.getAttribute("href");if(!(m!=null&&m.startsWith("#"))&&m!==l)return!0}return e?!1:Wt(n,s)},Dt=(t,e={ignoreUrlWithExtension:!0,allowedExtensions:[],ignoreExternalUrl:!0})=>{const n=e.ignoreUrlWithExtension===!0&&Array.isArray(e.allowedExtensions)?e.allowedExtensions.map(o=>o.startsWith(".")?o:"."+o):[];return o=>{le(o,e.ignoreUrlWithExtension??!0,n,e.ignoreExternalUrl??!0)||t()&&o.preventDefault()}},Mt=u.makeProviderMark("LocationProvider"),ae=t=>u.Fragment(u.OnBrowserCtx(e=>u.Async(Promise.resolve().then(()=>require("./browser-location-D36kVbd7.cjs")).then(n=>n.ProvideBrowserLocation),n=>n(t))(e)),u.OnHeadlessCtx(e=>u.Async(Promise.resolve().then(()=>require("./headless-location-8Va85S-Q.cjs")).then(n=>n.ProvideHeadlessLocation),n=>n(e.container.currentURL,t))(e))),mt=t=>u.UseProvider(Mt,e=>n=>{const o=u.makeProp(e.value,e.equals);e.feedProp(o),o.on(e.set);const r=u.renderableOfTNode(t(o))(n);return i=>{o.dispose(),r(i)}}),ue=(t,e)=>t.pathname===e.pathname&&JSON.stringify(t.search)===JSON.stringify(e.search)&&t.hash===e.hash,Vt=(t,e)=>{var i;const n=new URL(t,e??((i=u.getWindow())==null?void 0:i.location.toString())),o=Object.fromEntries(n.searchParams.entries());let r=n.hash;return r.startsWith("#")&&(r=r.substring(1)),{pathname:n.pathname,search:o,hash:r===""?void 0:r}},Nt=(t,e)=>{const n=Vt(e);return t.set(n),t},fe=t=>{const n=new URLSearchParams(t.search).toString(),o=t.hash;return`${t.pathname}${n?`?${n}`:""}${o?`#${o}`:""}`},Ht=(t,...e)=>{if(typeof t=="string"||u.Signal.is(t))return Ht({href:t},...e);const{href:n,...o}=t;return mt(r=>u.html.a(u.on.click(Dt(()=>(Nt(r,u.Value.get(n)),!0),o)),u.attr.href(n),...e))},dt=u.makeProviderMark("Appearance"),me=t=>{const e=u.getWindow(),n=e!=null&&e.matchMedia!=null&&e.matchMedia("(prefers-color-scheme: dark)").matches,o=u.makeProp(n?"dark":"light"),r=s=>{o.set(s.matches?"dark":"light")},i=e!=null&&e.matchMedia!=null?e.matchMedia("(prefers-color-scheme: dark)"):void 0;return i==null||i.addEventListener("change",r),u.Fragment(u.WithProvider(dt,o,t),u.OnDispose(()=>i==null?void 0:i.removeEventListener("change",r)))},de=t=>u.UseProvider(dt,t),$t=(t,e)=>{if(typeof e=="function")return $t(t,{success:e});const n=e.failure??(s=>u.Fragment(u.OnDispose(s.on(console.error)),s.map(c=>`Error: ${c}`))),o=e.success,r=e.loading??(()=>u.Empty),i=e.notAsked??(()=>u.Empty);return u.OneOfType(u.Value.toSignal(t),{AsyncSuccess:s=>o(s.$.value),AsyncFailure:s=>n(s.$.error),Loading:s=>r(s.$.previousValue??u.makeSignal(void 0)),NotAsked:i})},he=(t=10)=>u.OnElement(e=>{const n=setTimeout(()=>{e==null||e.focus()},t);return()=>clearTimeout(n)}),pe=(t=10)=>u.OnElement(e=>{const n=setTimeout(()=>{e==null||e.select()},t);return()=>clearTimeout(n)}),ge=u.OnElement(t=>{const e=t.style.getPropertyValue(":empty");return t.style.setProperty(":empty","display:none"),n=>{n&&t.style.setProperty(":empty",e)}}),ye=t=>u.Portal("head > title",u.attr.innerText(t)),we={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 xe(t){return I[t]==null&&(I[t]=new IntersectionObserver(e=>{e.forEach(n=>{const o=J[t].get(n.target);o==null||o.set(n.isIntersecting)})},we[t])),I[t]}const zt=(t,e)=>{const n=u.makeProp(!1);return u.Fragment(u.OnElement(o=>{const r=typeof IntersectionObserver<"u"?xe(t):null;return J[t].set(o,n),r==null||r.observe(o),()=>{var i;n.dispose(),r==null||r.unobserve(o),J[t].delete(o),J[t].size===0&&((i=I[t])==null||i.disconnect(),I[t]=null)}}),u.renderableOfTNode(e(n)))},ve=(t,e,n)=>zt(t,o=>u.When(o,e,n??u.Empty)),G=Math.min,W=Math.max,Q=Math.round,X=Math.floor,k=t=>({x:t,y:t}),be={left:"right",right:"left",bottom:"top",top:"bottom"},Ae={start:"end",end:"start"};function Et(t,e,n){return W(t,G(e,n))}function nt(t,e){return typeof t=="function"?t(e):t}function D(t){return t.split("-")[0]}function ot(t){return t.split("-")[1]}function Bt(t){return t==="x"?"y":"x"}function Ut(t){return t==="y"?"height":"width"}function $(t){return["top","bottom"].includes(D(t))?"y":"x"}function _t(t){return Bt($(t))}function Ee(t,e,n){n===void 0&&(n=!1);const o=ot(t),r=_t(t),i=Ut(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=Z(s)),[s,Z(s)]}function Oe(t){const e=Z(t);return[at(t),e,at(e)]}function at(t){return t.replace(/start|end/g,e=>Ae[e])}function Re(t,e,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?r:o:e?o:r;case"left":case"right":return e?i:s;default:return[]}}function ke(t,e,n,o){const r=ot(t);let i=Re(D(t),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),e&&(i=i.concat(i.map(at)))),i}function Z(t){return t.replace(/left|right|bottom|top/g,e=>be[e])}function Te(t){return{top:0,right:0,bottom:0,left:0,...t}}function Le(t){return typeof t!="number"?Te(t):{top:t,right:t,bottom:t,left:t}}function tt(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function Ot(t,e,n){let{reference:o,floating:r}=t;const i=$(e),s=_t(e),c=Ut(s),a=D(e),l=i==="y",m=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,h=o[c]/2-r[c]/2;let d;switch(a){case"top":d={x:m,y:o.y-r.height};break;case"bottom":d={x:m,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:f};break;case"left":d={x:o.x-r.width,y:f};break;default:d={x:o.x,y:o.y}}switch(ot(e)){case"start":d[s]-=h*(n&&l?-1:1);break;case"end":d[s]+=h*(n&&l?-1:1);break}return d}const Se=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=i.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:m,y:f}=Ot(l,o,a),h=o,d={},g=0;for(let y=0;y<c.length;y++){const{name:w,fn:p}=c[y],{x,y:v,data:A,reset:b}=await p({x:m,y:f,initialPlacement:o,placement:h,strategy:r,middlewareData:d,rects:l,platform:s,elements:{reference:t,floating:e}});m=x??m,f=v??f,d={...d,[w]:{...d[w],...A}},b&&g<=50&&(g++,typeof b=="object"&&(b.placement&&(h=b.placement),b.rects&&(l=b.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):b.rects),{x:m,y:f}=Ot(l,h,a)),y=-1)}return{x:m,y:f,placement:h,strategy:r,middlewareData:d}};async function It(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:a}=t,{boundary:l="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=nt(e,t),g=Le(d),w=c[h?f==="floating"?"reference":"floating":f],p=tt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:l,rootBoundary:m,strategy:a})),x=f==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),A=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},b=tt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:v,strategy:a}):x);return{top:(p.top-b.top+g.top)/A.y,bottom:(b.bottom-p.bottom+g.bottom)/A.y,left:(p.left-b.left+g.left)/A.x,right:(b.right-p.right+g.right)/A.x}}const Pe=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:a,elements:l}=e,{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...w}=nt(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const p=D(r),x=$(c),v=D(c)===c,A=await(a.isRTL==null?void 0:a.isRTL(l.floating)),b=h||(v||!y?[Z(c)]:Oe(c)),V=g!=="none";!h&&V&&b.push(...ke(c,y,g,A));const re=[c,...b],ct=await It(e,w),K=[];let U=((o=i.flip)==null?void 0:o.overflows)||[];if(m&&K.push(ct[p]),f){const F=Ee(r,s,A);K.push(ct[F[0]],ct[F[1]])}if(U=[...U,{placement:r,overflows:K}],!K.every(F=>F<=0)){var wt,xt;const F=(((wt=i.flip)==null?void 0:wt.index)||0)+1,bt=re[F];if(bt)return{data:{index:F,overflows:U},reset:{placement:bt}};let _=(xt=U.filter(N=>N.overflows[0]<=0).sort((N,S)=>N.overflows[1]-S.overflows[1])[0])==null?void 0:xt.placement;if(!_)switch(d){case"bestFit":{var vt;const N=(vt=U.filter(S=>{if(V){const P=$(S.placement);return P===x||P==="y"}return!0}).map(S=>[S.placement,S.overflows.filter(P=>P>0).reduce((P,ie)=>P+ie,0)]).sort((S,P)=>S[1]-P[1])[0])==null?void 0:vt[0];N&&(_=N);break}case"initialPlacement":_=c;break}if(r!==_)return{reset:{placement:_}}}return{}}}};async function Ce(t,e){const{placement:n,platform:o,elements:r}=t,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=D(n),c=ot(n),a=$(n)==="y",l=["left","top"].includes(s)?-1:1,m=i&&a?-1:1,f=nt(e,t);let{mainAxis:h,crossAxis:d,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof g=="number"&&(d=c==="end"?g*-1:g),a?{x:d*m,y:h*l}:{x:h*l,y:d*m}}const Fe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=e,a=await Ce(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+a.x,y:i+a.y,data:{...a,placement:s}}}}},We=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:w=>{let{x:p,y:x}=w;return{x:p,y:x}}},...a}=nt(t,e),l={x:n,y:o},m=await It(e,a),f=$(D(r)),h=Bt(f);let d=l[h],g=l[f];if(i){const w=h==="y"?"top":"left",p=h==="y"?"bottom":"right",x=d+m[w],v=d-m[p];d=Et(x,d,v)}if(s){const w=f==="y"?"top":"left",p=f==="y"?"bottom":"right",x=g+m[w],v=g-m[p];g=Et(x,g,v)}const y=c.fn({...e,[h]:d,[f]:g});return{...y,data:{x:y.x-n,y:y.y-o,enabled:{[h]:i,[f]:s}}}}}};function rt(){return typeof window<"u"}function B(t){return jt(t)?(t.nodeName||"").toLowerCase():"#document"}function E(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function L(t){var e;return(e=(jt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function jt(t){return rt()?t instanceof Node||t instanceof E(t).Node:!1}function O(t){return rt()?t instanceof Element||t instanceof E(t).Element:!1}function T(t){return rt()?t instanceof HTMLElement||t instanceof E(t).HTMLElement:!1}function Rt(t){return!rt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof E(t).ShadowRoot}function Y(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=R(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(r)}function De(t){return["table","td","th"].includes(B(t))}function it(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function ht(t){const e=pt(),n=O(t)?R(t):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 Me(t){let e=C(t);for(;T(e)&&!z(e);){if(ht(e))return e;if(it(e))return null;e=C(e)}return null}function pt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function z(t){return["html","body","#document"].includes(B(t))}function R(t){return E(t).getComputedStyle(t)}function st(t){return O(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function C(t){if(B(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Rt(t)&&t.host||L(t);return Rt(e)?e.host:e}function qt(t){const e=C(t);return z(e)?t.ownerDocument?t.ownerDocument.body:t.body:T(e)&&Y(e)?e:qt(e)}function j(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=qt(t),i=r===((o=t.ownerDocument)==null?void 0:o.body),s=E(r);if(i){const c=ut(s);return e.concat(s,s.visualViewport||[],Y(r)?r:[],c&&n?j(c):[])}return e.concat(r,j(r,[],n))}function ut(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Yt(t){const e=R(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=T(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,c=Q(n)!==i||Q(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function gt(t){return O(t)?t:t.contextElement}function H(t){const e=gt(t);if(!T(e))return k(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=Yt(e);let s=(i?Q(n.width):n.width)/o,c=(i?Q(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const Ve=k(0);function Kt(t){const e=E(t);return!pt()||!e.visualViewport?Ve:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ne(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==E(t)?!1:e}function M(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=gt(t);let s=k(1);e&&(o?O(o)&&(s=H(o)):s=H(t));const c=Ne(i,n,o)?Kt(i):k(0);let a=(r.left+c.x)/s.x,l=(r.top+c.y)/s.y,m=r.width/s.x,f=r.height/s.y;if(i){const h=E(i),d=o&&O(o)?E(o):o;let g=h,y=ut(g);for(;y&&o&&d!==g;){const w=H(y),p=y.getBoundingClientRect(),x=R(y),v=p.left+(y.clientLeft+parseFloat(x.paddingLeft))*w.x,A=p.top+(y.clientTop+parseFloat(x.paddingTop))*w.y;a*=w.x,l*=w.y,m*=w.x,f*=w.y,a+=v,l+=A,g=E(y),y=ut(g)}}return tt({width:m,height:f,x:a,y:l})}function yt(t,e){const n=st(t).scrollLeft;return e?e.left+n:M(L(t)).left+n}function Xt(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),r=o.left+e.scrollLeft-(n?0:yt(t,o)),i=o.top+e.scrollTop;return{x:r,y:i}}function He(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i=r==="fixed",s=L(o),c=e?it(e.floating):!1;if(o===s||c&&i)return n;let a={scrollLeft:0,scrollTop:0},l=k(1);const m=k(0),f=T(o);if((f||!f&&!i)&&((B(o)!=="body"||Y(s))&&(a=st(o)),T(o))){const d=M(o);l=H(o),m.x=d.x+o.clientLeft,m.y=d.y+o.clientTop}const h=s&&!f&&!i?Xt(s,a,!0):k(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+m.x+h.x,y:n.y*l.y-a.scrollTop*l.y+m.y+h.y}}function $e(t){return Array.from(t.getClientRects())}function ze(t){const e=L(t),n=st(t),o=t.ownerDocument.body,r=W(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=W(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+yt(t);const c=-n.scrollTop;return R(o).direction==="rtl"&&(s+=W(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:c}}function Be(t,e){const n=E(t),o=L(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,c=0,a=0;if(r){i=r.width,s=r.height;const l=pt();(!l||l&&e==="fixed")&&(c=r.offsetLeft,a=r.offsetTop)}return{width:i,height:s,x:c,y:a}}function Ue(t,e){const n=M(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=T(t)?H(t):k(1),s=t.clientWidth*i.x,c=t.clientHeight*i.y,a=r*i.x,l=o*i.y;return{width:s,height:c,x:a,y:l}}function kt(t,e,n){let o;if(e==="viewport")o=Be(t,n);else if(e==="document")o=ze(L(t));else if(O(e))o=Ue(e,n);else{const r=Kt(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return tt(o)}function Jt(t,e){const n=C(t);return n===e||!O(n)||z(n)?!1:R(n).position==="fixed"||Jt(n,e)}function _e(t,e){const n=e.get(t);if(n)return n;let o=j(t,[],!1).filter(c=>O(c)&&B(c)!=="body"),r=null;const i=R(t).position==="fixed";let s=i?C(t):t;for(;O(s)&&!z(s);){const c=R(s),a=ht(s);!a&&c.position==="fixed"&&(r=null),(i?!a&&!r:!a&&c.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Y(s)&&!a&&Jt(t,s))?o=o.filter(m=>m!==s):r=c,s=C(s)}return e.set(t,o),o}function Ie(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const s=[...n==="clippingAncestors"?it(e)?[]:_e(e,this._c):[].concat(n),o],c=s[0],a=s.reduce((l,m)=>{const f=kt(e,m,r);return l.top=W(f.top,l.top),l.right=G(f.right,l.right),l.bottom=G(f.bottom,l.bottom),l.left=W(f.left,l.left),l},kt(e,c,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function je(t){const{width:e,height:n}=Yt(t);return{width:e,height:n}}function qe(t,e,n){const o=T(e),r=L(e),i=n==="fixed",s=M(t,!0,i,e);let c={scrollLeft:0,scrollTop:0};const a=k(0);if(o||!o&&!i)if((B(e)!=="body"||Y(r))&&(c=st(e)),o){const h=M(e,!0,i,e);a.x=h.x+e.clientLeft,a.y=h.y+e.clientTop}else r&&(a.x=yt(r));const l=r&&!o&&!i?Xt(r,c):k(0),m=s.left+c.scrollLeft-a.x-l.x,f=s.top+c.scrollTop-a.y-l.y;return{x:m,y:f,width:s.width,height:s.height}}function lt(t){return R(t).position==="static"}function Tt(t,e){if(!T(t)||R(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return L(t)===n&&(n=n.ownerDocument.body),n}function Gt(t,e){const n=E(t);if(it(t))return n;if(!T(t)){let r=C(t);for(;r&&!z(r);){if(O(r)&&!lt(r))return r;r=C(r)}return n}let o=Tt(t,e);for(;o&&De(o)&<(o);)o=Tt(o,e);return o&&z(o)&<(o)&&!ht(o)?n:o||Me(t)||n}const Ye=async function(t){const e=this.getOffsetParent||Gt,n=this.getDimensions,o=await n(t.floating);return{reference:qe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ke(t){return R(t).direction==="rtl"}const Xe={convertOffsetParentRelativeRectToViewportRelativeRect:He,getDocumentElement:L,getClippingRect:Ie,getOffsetParent:Gt,getElementRects:Ye,getClientRects:$e,getDimensions:je,getScale:H,isElement:O,isRTL:Ke};function Je(t,e){let n=null,o;const r=L(t);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,a){c===void 0&&(c=!1),a===void 0&&(a=1),i();const{left:l,top:m,width:f,height:h}=t.getBoundingClientRect();if(c||e(),!f||!h)return;const d=X(m),g=X(r.clientWidth-(l+f)),y=X(r.clientHeight-(m+h)),w=X(l),x={rootMargin:-d+"px "+-g+"px "+-y+"px "+-w+"px",threshold:W(0,G(1,a))||1};let v=!0;function A(b){const V=b[0].intersectionRatio;if(V!==a){if(!v)return s();V?s(!1,V):o=setTimeout(()=>{s(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(A,{...x,root:r.ownerDocument})}catch{n=new IntersectionObserver(A,x)}n.observe(t)}return s(!0),i}function Ge(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,l=gt(t),m=r||i?[...l?j(l):[],...j(e)]:[];m.forEach(p=>{r&&p.addEventListener("scroll",n,{passive:!0}),i&&p.addEventListener("resize",n)});const f=l&&c?Je(l,n):null;let h=-1,d=null;s&&(d=new ResizeObserver(p=>{let[x]=p;x&&x.target===l&&d&&(d.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=d)==null||v.observe(e)})),n()}),l&&!a&&d.observe(l),d.observe(e));let g,y=a?M(t):null;a&&w();function w(){const p=M(t);y&&(p.x!==y.x||p.y!==y.y||p.width!==y.width||p.height!==y.height)&&n(),y=p,g=requestAnimationFrame(w)}return n(),()=>{var p;m.forEach(x=>{r&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),f==null||f(),(p=d)==null||p.disconnect(),d=null,a&&cancelAnimationFrame(g)}}const Qe=Fe,Ze=We,Lt=Pe,tn=(t,e,n)=>{const o=new Map,r={platform:Xe,...n},i={...r.platform,_c:o};return Se(t,e,{...r,platform:i})},en=({content:t,open:e,placement:n,offset:{mainAxis:o,crossAxis:r}={mainAxis:0,crossAxis:0}})=>u.OnBrowserCtx(i=>{const s=u.Value.toSignal(e),c=i.element;return u.LazyWhen(s,()=>u.Portal("body",u.html.div(u.OnElement(a=>{const l=a;return l.style.position="absolute",Ge(c,l,()=>{tn(c,l,{placement:n,strategy:"absolute",middleware:[Lt(),Qe({mainAxis:o,crossAxis:r}),Ze(),Lt()]}).then(({x:m,y:f})=>{l.style.top=`${f}px`,l.style.left=`${m}px`})})}),t())))(i)}),Qt=(t,e)=>{if(typeof e=="function")return Qt(t,{success:e});const n=e.failure??(r=>u.Fragment(u.OnDispose(r.on(console.error)),r.map(i=>`Error: ${i}`))),o=e.success;return u.OneOfType(u.Value.toSignal(t),{Success:r=>o(r.$.value),Failure:r=>n(r.$.error)})},nn=()=>u.on.focus(t=>{var e;return(e=t.target)==null?void 0:e.select()}),on=t=>u.OnBrowserCtx(e=>{const{element:n}=e,o=u.makeProp({width:n.clientWidth,height:n.clientHeight}),r=u.renderableOfTNode(t(o))(e),i=()=>{o.set({width:n.clientWidth,height:n.clientHeight})};let s;return typeof ResizeObserver=="function"&&(s=new ResizeObserver(i),s.observe(n)),c=>{s==null||s.disconnect(),r(c)}}),rn=t=>e=>{const n=u.getWindow(),o=u.makeProp({width:(n==null?void 0:n.innerWidth)??0,height:(n==null?void 0:n.innerHeight)??0}),r=u.renderableOfTNode(t(o))(e),i=()=>{o.set({width:(n==null?void 0:n.innerWidth)??0,height:(n==null?void 0:n.innerHeight)??0})};return n==null||n.addEventListener("resize",i),s=>{n==null||n.removeEventListener("resize",i),r(s)}},Zt=(t,e)=>{const n=e.split("/").filter(r=>r!==""),o={};for(let r=0;r<t.length;r++){const i=t[r],s=n[r];if(!s&&i.type!=="catch-all")return null;if(i.type==="literal"){if(i.value!==s)return null}else if(i.type==="param")o[i.name]=s;else if(i.type==="catch-all")return{params:o,path:e}}return n.length!==t.length?null:{params:o,path:e}},te=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!==""),ee=t=>{const e=t.map(n=>{const o=te(n);return{route:n,segments:o}});return function(o){for(const{segments:r,route:i}of e){const s=Zt(r,o);if(s)return{...s,route:i}}return null}},sn=t=>{const e=ee(Object.keys(t));return mt(n=>{const o=n.map(r=>{const i=e(r.pathname);if(i==null)throw console.error("No route found for",r),new Error("No route found");return{params:i.params,route:i.route,path:i.path,search:r.search,hash:r.hash}});return u.OneOfTuple(o.map(r=>[r.route,r]),t)})},et=60*1e3,ft=60*et,q=24*ft,St=7*q,Pt=30*q,cn=365*q,ln=[{max:et*90,value:et,name:"minute",past:{singular:"a minute ago",plural:"{} minutes ago"},future:{singular:"in a minute",plural:"in {} minutes"}},{max:ft*36,value:ft,name:"hour",past:{singular:"an hour ago",plural:"{} hours ago"},future:{singular:"in an hour",plural:"in {} hours"}},{max:q*10,value:q,name:"day",past:{singular:"yesterday",plural:"{} days ago"},future:{singular:"tomorrow",plural:"in {} days"}},{max:St*6,value:St,name:"week",past:{singular:"last week",plural:"{} weeks ago"},future:{singular:"in a week",plural:"in {} weeks"}},{max:Pt*18,value:Pt,name:"month",past:{singular:"last month",plural:"{} months ago"},future:{singular:"in a month",plural:"in {} months"}},{max:1/0,value:cn,name:"year",past:{singular:"last year",plural:"{} years ago"},future:{singular:"in a year",plural:"in {} years"}}];function Ct(t,e,n,o){const r=Math.round(t/e);return r<=1?n:o.replace("{}",r.toLocaleString(void 0,{maximumFractionDigits:0,minimumFractionDigits:0}))}function ne(t){const e=Math.abs(t);if(e<et)return t<0?"just now":"in a moment";for(const n of ln)if(e<n.max)return t<0?Ct(e,n.value,n.past.singular,n.past.plural):Ct(e,n.value,n.future.singular,n.future.plural);throw new Error("unreachable")}const an=(t,e)=>{const n=e!=null?u.Signal.is(e)?e.derive():u.makeProp(e):u.makeProp(new Date),o=u.makeComputedOf(t,n)((i,s)=>{const c=i.getTime()-s.getTime();return ne(c)}),r=u.Prop.is(n)?setInterval(()=>n.set(new Date),5e3):void 0;return o.onDispose(()=>{r!=null&&clearInterval(r),n.dispose()}),o};class oe extends u.Prop{constructor(){super(...arguments);At(this,"tick",()=>this.update(n=>n+1))}}const un=(t=0)=>new oe(t,(e,n)=>e===n);exports.Anchor=Ht;exports.AsyncResultView=$t;exports.AutoFocus=he;exports.AutoSelect=pe;exports.ElementSize=on;exports.HTMLTitle=ye;exports.HiddenWhenEmpty=ge;exports.InViewport=zt;exports.LocationProviderMarker=Mt;exports.PopOver=en;exports.ProvideAppearance=me;exports.ProvideLocation=ae;exports.ResultView=Qt;exports.Router=sn;exports.SelectOnFocus=nn;exports.Ticker=oe;exports.UseAppearance=de;exports.UseLocation=mt;exports.WhenInViewport=ve;exports.WindowSize=rn;exports._checkExtensionCondition=Wt;exports._getExtension=Ft;exports._makeRouteMatcher=ee;exports._parseRouteSegments=te;exports.appearanceMarker=dt;exports.areLocationsEqual=ue;exports.handleAnchorClick=Dt;exports.locationFromURL=Vt;exports.makeRelativeTime=an;exports.makeTicker=un;exports.matchesRoute=Zt;exports.setLocationFromUrl=Nt;exports.timeDiffToString=ne;exports.urlFromLocation=fe;
|
|
1
|
+
"use strict";var se=Object.defineProperty;var ce=(t,e,n)=>e in t?se(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var At=(t,e,n)=>ce(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@tempots/dom"),Ft=t=>{const e=t.split("/").pop();if(e==null||e.startsWith("."))return;const n=e.split(".")||[];return n.length>1?"."+n.pop():void 0},Wt=(t,e)=>{const n=Ft(e);return n!=null&&(t.length===0||!t.some(o=>n==o))},le=(t,e,n,o)=>{let r=t.target;for(;r!=null&&!(r instanceof HTMLAnchorElement);)r=r.parentElement;if(r==null)return!0;const i=r;if(t.button!==0||t.ctrlKey||t.metaKey||i.target!=="_self"&&i.target!==""||i.getAttribute("download")!=null)return!0;const{pathname:s,search:c,hash:a}=i;if(o){const l=s+c+a,m=i.getAttribute("href");if(!(m!=null&&m.startsWith("#"))&&m!==l)return!0}return e?!1:Wt(n,s)},Dt=(t,e={ignoreUrlWithExtension:!0,allowedExtensions:[],ignoreExternalUrl:!0})=>{const n=e.ignoreUrlWithExtension===!0&&Array.isArray(e.allowedExtensions)?e.allowedExtensions.map(o=>o.startsWith(".")?o:"."+o):[];return o=>{le(o,e.ignoreUrlWithExtension??!0,n,e.ignoreExternalUrl??!0)||t()&&o.preventDefault()}},Mt=u.makeProviderMark("LocationProvider"),ae=t=>u.Fragment(u.OnBrowserCtx(e=>u.Async(Promise.resolve().then(()=>require("./browser-location-D36kVbd7.cjs")).then(n=>n.ProvideBrowserLocation),n=>n(t))(e)),u.OnHeadlessCtx(e=>u.Async(Promise.resolve().then(()=>require("./headless-location-8Va85S-Q.cjs")).then(n=>n.ProvideHeadlessLocation),n=>n(e.container.currentURL,t))(e))),mt=t=>u.UseProvider(Mt,e=>n=>{const o=u.makeProp(e.value,e.equals);e.feedProp(o),o.on(e.set);const r=u.renderableOfTNode(t(o))(n);return i=>{o.dispose(),r(i)}}),ue=(t,e)=>t.pathname===e.pathname&&JSON.stringify(t.search)===JSON.stringify(e.search)&&t.hash===e.hash,Vt=(t,e)=>{var i;const n=new URL(t,e??((i=u.getWindow())==null?void 0:i.location.toString())),o=Object.fromEntries(n.searchParams.entries());let r=n.hash;return r.startsWith("#")&&(r=r.substring(1)),{pathname:n.pathname,search:o,hash:r===""?void 0:r}},Nt=(t,e)=>{const n=Vt(e);return t.set(n),t},fe=t=>{const n=new URLSearchParams(t.search).toString(),o=t.hash;return`${t.pathname}${n?`?${n}`:""}${o?`#${o}`:""}`},Ht=(t,...e)=>{if(typeof t=="string"||u.Signal.is(t))return Ht({href:t},...e);const{href:n,...o}=t;return mt(r=>u.html.a(u.on.click(Dt(()=>(Nt(r,u.Value.get(n)),!0),o)),u.attr.href(n),...e))},dt=u.makeProviderMark("Appearance"),me=t=>{const e=u.getWindow(),n=e!=null&&e.matchMedia!=null&&e.matchMedia("(prefers-color-scheme: dark)").matches,o=u.makeProp(n?"dark":"light"),r=s=>{o.set(s.matches?"dark":"light")},i=e!=null&&e.matchMedia!=null?e.matchMedia("(prefers-color-scheme: dark)"):void 0;return i==null||i.addEventListener("change",r),u.Fragment(u.WithProvider(dt,o,t),u.OnDispose(()=>i==null?void 0:i.removeEventListener("change",r)))},de=t=>u.UseProvider(dt,t),$t=(t,e)=>{if(typeof e=="function")return $t(t,{success:e});const n=e.failure??(s=>u.Fragment(u.OnDispose(s.on(console.error)),s.map(c=>`Error: ${c}`))),o=e.success,r=e.loading??(()=>u.Empty),i=e.notAsked??(()=>u.Empty);return u.OneOfType(u.Value.toSignal(t),{AsyncSuccess:s=>o(s.$.value),AsyncFailure:s=>n(s.$.error),Loading:s=>r(s.$.previousValue??u.makeSignal(void 0)),NotAsked:i})},he=(t=10)=>u.OnElement(e=>{const n=setTimeout(()=>{e==null||e.focus()},t);return()=>clearTimeout(n)}),pe=(t=10)=>u.OnElement(e=>{const n=setTimeout(()=>{e==null||e.select()},t);return()=>clearTimeout(n)}),ge=u.OnElement(t=>{const e=t.style.getPropertyValue(":empty");return t.style.setProperty(":empty","display:none"),n=>{n&&t.style.setProperty(":empty",e)}}),ye=t=>u.Portal("head > title",u.attr.innerText(t)),we={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 xe(t){return I[t]==null&&(I[t]=new IntersectionObserver(e=>{e.forEach(n=>{const o=J[t].get(n.target);o==null||o.set(n.isIntersecting)})},we[t])),I[t]}const zt=(t,e)=>{const n=u.makeProp(!1);return u.Fragment(u.OnElement(o=>{const r=typeof IntersectionObserver<"u"?xe(t):null;return J[t].set(o,n),r==null||r.observe(o),()=>{var i;n.dispose(),r==null||r.unobserve(o),J[t].delete(o),J[t].size===0&&((i=I[t])==null||i.disconnect(),I[t]=null)}}),u.renderableOfTNode(e(n)))},ve=(t,e,n)=>zt(t,o=>u.When(o,e,n??(()=>u.Empty))),G=Math.min,W=Math.max,Q=Math.round,X=Math.floor,k=t=>({x:t,y:t}),be={left:"right",right:"left",bottom:"top",top:"bottom"},Ae={start:"end",end:"start"};function Et(t,e,n){return W(t,G(e,n))}function nt(t,e){return typeof t=="function"?t(e):t}function D(t){return t.split("-")[0]}function ot(t){return t.split("-")[1]}function Bt(t){return t==="x"?"y":"x"}function Ut(t){return t==="y"?"height":"width"}function $(t){return["top","bottom"].includes(D(t))?"y":"x"}function _t(t){return Bt($(t))}function Ee(t,e,n){n===void 0&&(n=!1);const o=ot(t),r=_t(t),i=Ut(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=Z(s)),[s,Z(s)]}function Oe(t){const e=Z(t);return[at(t),e,at(e)]}function at(t){return t.replace(/start|end/g,e=>Ae[e])}function Re(t,e,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?r:o:e?o:r;case"left":case"right":return e?i:s;default:return[]}}function ke(t,e,n,o){const r=ot(t);let i=Re(D(t),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),e&&(i=i.concat(i.map(at)))),i}function Z(t){return t.replace(/left|right|bottom|top/g,e=>be[e])}function Te(t){return{top:0,right:0,bottom:0,left:0,...t}}function Le(t){return typeof t!="number"?Te(t):{top:t,right:t,bottom:t,left:t}}function tt(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function Ot(t,e,n){let{reference:o,floating:r}=t;const i=$(e),s=_t(e),c=Ut(s),a=D(e),l=i==="y",m=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,h=o[c]/2-r[c]/2;let d;switch(a){case"top":d={x:m,y:o.y-r.height};break;case"bottom":d={x:m,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:f};break;case"left":d={x:o.x-r.width,y:f};break;default:d={x:o.x,y:o.y}}switch(ot(e)){case"start":d[s]-=h*(n&&l?-1:1);break;case"end":d[s]+=h*(n&&l?-1:1);break}return d}const Se=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=i.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:m,y:f}=Ot(l,o,a),h=o,d={},g=0;for(let y=0;y<c.length;y++){const{name:w,fn:p}=c[y],{x,y:v,data:A,reset:b}=await p({x:m,y:f,initialPlacement:o,placement:h,strategy:r,middlewareData:d,rects:l,platform:s,elements:{reference:t,floating:e}});m=x??m,f=v??f,d={...d,[w]:{...d[w],...A}},b&&g<=50&&(g++,typeof b=="object"&&(b.placement&&(h=b.placement),b.rects&&(l=b.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):b.rects),{x:m,y:f}=Ot(l,h,a)),y=-1)}return{x:m,y:f,placement:h,strategy:r,middlewareData:d}};async function It(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:a}=t,{boundary:l="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=nt(e,t),g=Le(d),w=c[h?f==="floating"?"reference":"floating":f],p=tt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:l,rootBoundary:m,strategy:a})),x=f==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),A=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},b=tt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:v,strategy:a}):x);return{top:(p.top-b.top+g.top)/A.y,bottom:(b.bottom-p.bottom+g.bottom)/A.y,left:(p.left-b.left+g.left)/A.x,right:(b.right-p.right+g.right)/A.x}}const Pe=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:a,elements:l}=e,{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...w}=nt(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const p=D(r),x=$(c),v=D(c)===c,A=await(a.isRTL==null?void 0:a.isRTL(l.floating)),b=h||(v||!y?[Z(c)]:Oe(c)),V=g!=="none";!h&&V&&b.push(...ke(c,y,g,A));const re=[c,...b],ct=await It(e,w),K=[];let U=((o=i.flip)==null?void 0:o.overflows)||[];if(m&&K.push(ct[p]),f){const F=Ee(r,s,A);K.push(ct[F[0]],ct[F[1]])}if(U=[...U,{placement:r,overflows:K}],!K.every(F=>F<=0)){var wt,xt;const F=(((wt=i.flip)==null?void 0:wt.index)||0)+1,bt=re[F];if(bt)return{data:{index:F,overflows:U},reset:{placement:bt}};let _=(xt=U.filter(N=>N.overflows[0]<=0).sort((N,S)=>N.overflows[1]-S.overflows[1])[0])==null?void 0:xt.placement;if(!_)switch(d){case"bestFit":{var vt;const N=(vt=U.filter(S=>{if(V){const P=$(S.placement);return P===x||P==="y"}return!0}).map(S=>[S.placement,S.overflows.filter(P=>P>0).reduce((P,ie)=>P+ie,0)]).sort((S,P)=>S[1]-P[1])[0])==null?void 0:vt[0];N&&(_=N);break}case"initialPlacement":_=c;break}if(r!==_)return{reset:{placement:_}}}return{}}}};async function Ce(t,e){const{placement:n,platform:o,elements:r}=t,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=D(n),c=ot(n),a=$(n)==="y",l=["left","top"].includes(s)?-1:1,m=i&&a?-1:1,f=nt(e,t);let{mainAxis:h,crossAxis:d,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof g=="number"&&(d=c==="end"?g*-1:g),a?{x:d*m,y:h*l}:{x:h*l,y:d*m}}const Fe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=e,a=await Ce(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+a.x,y:i+a.y,data:{...a,placement:s}}}}},We=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:w=>{let{x:p,y:x}=w;return{x:p,y:x}}},...a}=nt(t,e),l={x:n,y:o},m=await It(e,a),f=$(D(r)),h=Bt(f);let d=l[h],g=l[f];if(i){const w=h==="y"?"top":"left",p=h==="y"?"bottom":"right",x=d+m[w],v=d-m[p];d=Et(x,d,v)}if(s){const w=f==="y"?"top":"left",p=f==="y"?"bottom":"right",x=g+m[w],v=g-m[p];g=Et(x,g,v)}const y=c.fn({...e,[h]:d,[f]:g});return{...y,data:{x:y.x-n,y:y.y-o,enabled:{[h]:i,[f]:s}}}}}};function rt(){return typeof window<"u"}function B(t){return jt(t)?(t.nodeName||"").toLowerCase():"#document"}function E(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function L(t){var e;return(e=(jt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function jt(t){return rt()?t instanceof Node||t instanceof E(t).Node:!1}function O(t){return rt()?t instanceof Element||t instanceof E(t).Element:!1}function T(t){return rt()?t instanceof HTMLElement||t instanceof E(t).HTMLElement:!1}function Rt(t){return!rt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof E(t).ShadowRoot}function Y(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=R(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(r)}function De(t){return["table","td","th"].includes(B(t))}function it(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function ht(t){const e=pt(),n=O(t)?R(t):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 Me(t){let e=C(t);for(;T(e)&&!z(e);){if(ht(e))return e;if(it(e))return null;e=C(e)}return null}function pt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function z(t){return["html","body","#document"].includes(B(t))}function R(t){return E(t).getComputedStyle(t)}function st(t){return O(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function C(t){if(B(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Rt(t)&&t.host||L(t);return Rt(e)?e.host:e}function qt(t){const e=C(t);return z(e)?t.ownerDocument?t.ownerDocument.body:t.body:T(e)&&Y(e)?e:qt(e)}function j(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=qt(t),i=r===((o=t.ownerDocument)==null?void 0:o.body),s=E(r);if(i){const c=ut(s);return e.concat(s,s.visualViewport||[],Y(r)?r:[],c&&n?j(c):[])}return e.concat(r,j(r,[],n))}function ut(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Yt(t){const e=R(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=T(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,c=Q(n)!==i||Q(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function gt(t){return O(t)?t:t.contextElement}function H(t){const e=gt(t);if(!T(e))return k(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=Yt(e);let s=(i?Q(n.width):n.width)/o,c=(i?Q(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const Ve=k(0);function Kt(t){const e=E(t);return!pt()||!e.visualViewport?Ve:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ne(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==E(t)?!1:e}function M(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=gt(t);let s=k(1);e&&(o?O(o)&&(s=H(o)):s=H(t));const c=Ne(i,n,o)?Kt(i):k(0);let a=(r.left+c.x)/s.x,l=(r.top+c.y)/s.y,m=r.width/s.x,f=r.height/s.y;if(i){const h=E(i),d=o&&O(o)?E(o):o;let g=h,y=ut(g);for(;y&&o&&d!==g;){const w=H(y),p=y.getBoundingClientRect(),x=R(y),v=p.left+(y.clientLeft+parseFloat(x.paddingLeft))*w.x,A=p.top+(y.clientTop+parseFloat(x.paddingTop))*w.y;a*=w.x,l*=w.y,m*=w.x,f*=w.y,a+=v,l+=A,g=E(y),y=ut(g)}}return tt({width:m,height:f,x:a,y:l})}function yt(t,e){const n=st(t).scrollLeft;return e?e.left+n:M(L(t)).left+n}function Xt(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),r=o.left+e.scrollLeft-(n?0:yt(t,o)),i=o.top+e.scrollTop;return{x:r,y:i}}function He(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i=r==="fixed",s=L(o),c=e?it(e.floating):!1;if(o===s||c&&i)return n;let a={scrollLeft:0,scrollTop:0},l=k(1);const m=k(0),f=T(o);if((f||!f&&!i)&&((B(o)!=="body"||Y(s))&&(a=st(o)),T(o))){const d=M(o);l=H(o),m.x=d.x+o.clientLeft,m.y=d.y+o.clientTop}const h=s&&!f&&!i?Xt(s,a,!0):k(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+m.x+h.x,y:n.y*l.y-a.scrollTop*l.y+m.y+h.y}}function $e(t){return Array.from(t.getClientRects())}function ze(t){const e=L(t),n=st(t),o=t.ownerDocument.body,r=W(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=W(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+yt(t);const c=-n.scrollTop;return R(o).direction==="rtl"&&(s+=W(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:c}}function Be(t,e){const n=E(t),o=L(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,c=0,a=0;if(r){i=r.width,s=r.height;const l=pt();(!l||l&&e==="fixed")&&(c=r.offsetLeft,a=r.offsetTop)}return{width:i,height:s,x:c,y:a}}function Ue(t,e){const n=M(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=T(t)?H(t):k(1),s=t.clientWidth*i.x,c=t.clientHeight*i.y,a=r*i.x,l=o*i.y;return{width:s,height:c,x:a,y:l}}function kt(t,e,n){let o;if(e==="viewport")o=Be(t,n);else if(e==="document")o=ze(L(t));else if(O(e))o=Ue(e,n);else{const r=Kt(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return tt(o)}function Jt(t,e){const n=C(t);return n===e||!O(n)||z(n)?!1:R(n).position==="fixed"||Jt(n,e)}function _e(t,e){const n=e.get(t);if(n)return n;let o=j(t,[],!1).filter(c=>O(c)&&B(c)!=="body"),r=null;const i=R(t).position==="fixed";let s=i?C(t):t;for(;O(s)&&!z(s);){const c=R(s),a=ht(s);!a&&c.position==="fixed"&&(r=null),(i?!a&&!r:!a&&c.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Y(s)&&!a&&Jt(t,s))?o=o.filter(m=>m!==s):r=c,s=C(s)}return e.set(t,o),o}function Ie(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const s=[...n==="clippingAncestors"?it(e)?[]:_e(e,this._c):[].concat(n),o],c=s[0],a=s.reduce((l,m)=>{const f=kt(e,m,r);return l.top=W(f.top,l.top),l.right=G(f.right,l.right),l.bottom=G(f.bottom,l.bottom),l.left=W(f.left,l.left),l},kt(e,c,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function je(t){const{width:e,height:n}=Yt(t);return{width:e,height:n}}function qe(t,e,n){const o=T(e),r=L(e),i=n==="fixed",s=M(t,!0,i,e);let c={scrollLeft:0,scrollTop:0};const a=k(0);if(o||!o&&!i)if((B(e)!=="body"||Y(r))&&(c=st(e)),o){const h=M(e,!0,i,e);a.x=h.x+e.clientLeft,a.y=h.y+e.clientTop}else r&&(a.x=yt(r));const l=r&&!o&&!i?Xt(r,c):k(0),m=s.left+c.scrollLeft-a.x-l.x,f=s.top+c.scrollTop-a.y-l.y;return{x:m,y:f,width:s.width,height:s.height}}function lt(t){return R(t).position==="static"}function Tt(t,e){if(!T(t)||R(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return L(t)===n&&(n=n.ownerDocument.body),n}function Gt(t,e){const n=E(t);if(it(t))return n;if(!T(t)){let r=C(t);for(;r&&!z(r);){if(O(r)&&!lt(r))return r;r=C(r)}return n}let o=Tt(t,e);for(;o&&De(o)&<(o);)o=Tt(o,e);return o&&z(o)&<(o)&&!ht(o)?n:o||Me(t)||n}const Ye=async function(t){const e=this.getOffsetParent||Gt,n=this.getDimensions,o=await n(t.floating);return{reference:qe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ke(t){return R(t).direction==="rtl"}const Xe={convertOffsetParentRelativeRectToViewportRelativeRect:He,getDocumentElement:L,getClippingRect:Ie,getOffsetParent:Gt,getElementRects:Ye,getClientRects:$e,getDimensions:je,getScale:H,isElement:O,isRTL:Ke};function Je(t,e){let n=null,o;const r=L(t);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,a){c===void 0&&(c=!1),a===void 0&&(a=1),i();const{left:l,top:m,width:f,height:h}=t.getBoundingClientRect();if(c||e(),!f||!h)return;const d=X(m),g=X(r.clientWidth-(l+f)),y=X(r.clientHeight-(m+h)),w=X(l),x={rootMargin:-d+"px "+-g+"px "+-y+"px "+-w+"px",threshold:W(0,G(1,a))||1};let v=!0;function A(b){const V=b[0].intersectionRatio;if(V!==a){if(!v)return s();V?s(!1,V):o=setTimeout(()=>{s(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(A,{...x,root:r.ownerDocument})}catch{n=new IntersectionObserver(A,x)}n.observe(t)}return s(!0),i}function Ge(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,l=gt(t),m=r||i?[...l?j(l):[],...j(e)]:[];m.forEach(p=>{r&&p.addEventListener("scroll",n,{passive:!0}),i&&p.addEventListener("resize",n)});const f=l&&c?Je(l,n):null;let h=-1,d=null;s&&(d=new ResizeObserver(p=>{let[x]=p;x&&x.target===l&&d&&(d.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=d)==null||v.observe(e)})),n()}),l&&!a&&d.observe(l),d.observe(e));let g,y=a?M(t):null;a&&w();function w(){const p=M(t);y&&(p.x!==y.x||p.y!==y.y||p.width!==y.width||p.height!==y.height)&&n(),y=p,g=requestAnimationFrame(w)}return n(),()=>{var p;m.forEach(x=>{r&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),f==null||f(),(p=d)==null||p.disconnect(),d=null,a&&cancelAnimationFrame(g)}}const Qe=Fe,Ze=We,Lt=Pe,tn=(t,e,n)=>{const o=new Map,r={platform:Xe,...n},i={...r.platform,_c:o};return Se(t,e,{...r,platform:i})},en=({content:t,open:e,placement:n,offset:{mainAxis:o,crossAxis:r}={mainAxis:0,crossAxis:0}})=>u.OnBrowserCtx(i=>{const s=u.Value.toSignal(e),c=i.element;return u.When(s,()=>u.Portal("body",u.html.div(u.OnElement(a=>{const l=a;return l.style.position="absolute",Ge(c,l,()=>{tn(c,l,{placement:n,strategy:"absolute",middleware:[Lt(),Qe({mainAxis:o,crossAxis:r}),Ze(),Lt()]}).then(({x:m,y:f})=>{l.style.top=`${f}px`,l.style.left=`${m}px`})})}),t())))(i)}),Qt=(t,e)=>{if(typeof e=="function")return Qt(t,{success:e});const n=e.failure??(r=>u.Fragment(u.OnDispose(r.on(console.error)),r.map(i=>`Error: ${i}`))),o=e.success;return u.OneOfType(u.Value.toSignal(t),{Success:r=>o(r.$.value),Failure:r=>n(r.$.error)})},nn=()=>u.on.focus(t=>{var e;return(e=t.target)==null?void 0:e.select()}),on=t=>u.OnBrowserCtx(e=>{const{element:n}=e,o=u.makeProp({width:n.clientWidth,height:n.clientHeight}),r=u.renderableOfTNode(t(o))(e),i=()=>{o.set({width:n.clientWidth,height:n.clientHeight})};let s;return typeof ResizeObserver=="function"&&(s=new ResizeObserver(i),s.observe(n)),c=>{s==null||s.disconnect(),r(c)}}),rn=t=>e=>{const n=u.getWindow(),o=u.makeProp({width:(n==null?void 0:n.innerWidth)??0,height:(n==null?void 0:n.innerHeight)??0}),r=u.renderableOfTNode(t(o))(e),i=()=>{o.set({width:(n==null?void 0:n.innerWidth)??0,height:(n==null?void 0:n.innerHeight)??0})};return n==null||n.addEventListener("resize",i),s=>{n==null||n.removeEventListener("resize",i),r(s)}},Zt=(t,e)=>{const n=e.split("/").filter(r=>r!==""),o={};for(let r=0;r<t.length;r++){const i=t[r],s=n[r];if(!s&&i.type!=="catch-all")return null;if(i.type==="literal"){if(i.value!==s)return null}else if(i.type==="param")o[i.name]=s;else if(i.type==="catch-all")return{params:o,path:e}}return n.length!==t.length?null:{params:o,path:e}},te=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!==""),ee=t=>{const e=t.map(n=>{const o=te(n);return{route:n,segments:o}});return function(o){for(const{segments:r,route:i}of e){const s=Zt(r,o);if(s)return{...s,route:i}}return null}},sn=t=>{const e=ee(Object.keys(t));return mt(n=>{const o=n.map(r=>{const i=e(r.pathname);if(i==null)throw console.error("No route found for",r),new Error("No route found");return{params:i.params,route:i.route,path:i.path,search:r.search,hash:r.hash}});return u.OneOfTuple(o.map(r=>[r.route,r]),t)})},et=60*1e3,ft=60*et,q=24*ft,St=7*q,Pt=30*q,cn=365*q,ln=[{max:et*90,value:et,name:"minute",past:{singular:"a minute ago",plural:"{} minutes ago"},future:{singular:"in a minute",plural:"in {} minutes"}},{max:ft*36,value:ft,name:"hour",past:{singular:"an hour ago",plural:"{} hours ago"},future:{singular:"in an hour",plural:"in {} hours"}},{max:q*10,value:q,name:"day",past:{singular:"yesterday",plural:"{} days ago"},future:{singular:"tomorrow",plural:"in {} days"}},{max:St*6,value:St,name:"week",past:{singular:"last week",plural:"{} weeks ago"},future:{singular:"in a week",plural:"in {} weeks"}},{max:Pt*18,value:Pt,name:"month",past:{singular:"last month",plural:"{} months ago"},future:{singular:"in a month",plural:"in {} months"}},{max:1/0,value:cn,name:"year",past:{singular:"last year",plural:"{} years ago"},future:{singular:"in a year",plural:"in {} years"}}];function Ct(t,e,n,o){const r=Math.round(t/e);return r<=1?n:o.replace("{}",r.toLocaleString(void 0,{maximumFractionDigits:0,minimumFractionDigits:0}))}function ne(t){const e=Math.abs(t);if(e<et)return t<0?"just now":"in a moment";for(const n of ln)if(e<n.max)return t<0?Ct(e,n.value,n.past.singular,n.past.plural):Ct(e,n.value,n.future.singular,n.future.plural);throw new Error("unreachable")}const an=(t,e)=>{const n=e!=null?u.Signal.is(e)?e.derive():u.makeProp(e):u.makeProp(new Date),o=u.makeComputedOf(t,n)((i,s)=>{const c=i.getTime()-s.getTime();return ne(c)}),r=u.Prop.is(n)?setInterval(()=>n.set(new Date),5e3):void 0;return o.onDispose(()=>{r!=null&&clearInterval(r),n.dispose()}),o};class oe extends u.Prop{constructor(){super(...arguments);At(this,"tick",()=>this.update(n=>n+1))}}const un=(t=0)=>new oe(t,(e,n)=>e===n);exports.Anchor=Ht;exports.AsyncResultView=$t;exports.AutoFocus=he;exports.AutoSelect=pe;exports.ElementSize=on;exports.HTMLTitle=ye;exports.HiddenWhenEmpty=ge;exports.InViewport=zt;exports.LocationProviderMarker=Mt;exports.PopOver=en;exports.ProvideAppearance=me;exports.ProvideLocation=ae;exports.ResultView=Qt;exports.Router=sn;exports.SelectOnFocus=nn;exports.Ticker=oe;exports.UseAppearance=de;exports.UseLocation=mt;exports.WhenInViewport=ve;exports.WindowSize=rn;exports._checkExtensionCondition=Wt;exports._getExtension=Ft;exports._makeRouteMatcher=ee;exports._parseRouteSegments=te;exports.appearanceMarker=dt;exports.areLocationsEqual=ue;exports.handleAnchorClick=Dt;exports.locationFromURL=Vt;exports.makeRelativeTime=an;exports.makeTicker=un;exports.matchesRoute=Zt;exports.setLocationFromUrl=Nt;exports.timeDiffToString=ne;exports.urlFromLocation=fe;
|
package/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var kt = (t, e, n) =>
|
|
4
|
-
import { makeProviderMark as Ht, Fragment as q, OnBrowserCtx as yt, Async as St, OnHeadlessCtx as
|
|
5
|
-
const
|
|
1
|
+
var ue = Object.defineProperty;
|
|
2
|
+
var fe = (t, e, n) => e in t ? ue(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var kt = (t, e, n) => fe(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { makeProviderMark as Ht, Fragment as q, OnBrowserCtx as yt, Async as St, OnHeadlessCtx as he, UseProvider as zt, makeProp as W, renderableOfTNode as rt, getWindow as wt, Signal as Bt, html as Ut, on as It, Value as it, attr as _t, WithProvider as de, OnDispose as xt, Empty as dt, OneOfType as jt, makeSignal as me, OnElement as K, Portal as Yt, When as qt, OneOfTuple as pe, makeComputedOf as ge, Prop as Kt } from "@tempots/dom";
|
|
5
|
+
const ye = (t) => {
|
|
6
6
|
const e = t.split("/").pop();
|
|
7
7
|
if (e == null || e.startsWith(".")) return;
|
|
8
8
|
const n = e.split(".") || [];
|
|
9
9
|
return n.length > 1 ? "." + n.pop() : void 0;
|
|
10
|
-
},
|
|
11
|
-
const n =
|
|
10
|
+
}, we = (t, e) => {
|
|
11
|
+
const n = ye(e);
|
|
12
12
|
return n != null && (t.length === 0 || !t.some((o) => n == o));
|
|
13
|
-
},
|
|
13
|
+
}, xe = (t, e, n, o) => {
|
|
14
14
|
let r = t.target;
|
|
15
15
|
for (; r != null && !(r instanceof HTMLAnchorElement); )
|
|
16
16
|
r = r.parentElement;
|
|
@@ -25,8 +25,8 @@ const we = (t) => {
|
|
|
25
25
|
if (!(f != null && f.startsWith("#")) && f !== l)
|
|
26
26
|
return !0;
|
|
27
27
|
}
|
|
28
|
-
return e ? !1 :
|
|
29
|
-
},
|
|
28
|
+
return e ? !1 : we(n, s);
|
|
29
|
+
}, ve = (t, e = {
|
|
30
30
|
ignoreUrlWithExtension: !0,
|
|
31
31
|
allowedExtensions: [],
|
|
32
32
|
ignoreExternalUrl: !0
|
|
@@ -35,30 +35,30 @@ const we = (t) => {
|
|
|
35
35
|
(o) => o.startsWith(".") ? o : "." + o
|
|
36
36
|
) : [];
|
|
37
37
|
return (o) => {
|
|
38
|
-
|
|
38
|
+
xe(
|
|
39
39
|
o,
|
|
40
40
|
e.ignoreUrlWithExtension ?? !0,
|
|
41
41
|
n,
|
|
42
42
|
e.ignoreExternalUrl ?? !0
|
|
43
43
|
) || t() && o.preventDefault();
|
|
44
44
|
};
|
|
45
|
-
},
|
|
45
|
+
}, be = Ht("LocationProvider"), vn = (t) => q(
|
|
46
46
|
yt((e) => St(
|
|
47
47
|
import("./browser-location-12vUH3Kv.js").then((n) => n.ProvideBrowserLocation),
|
|
48
48
|
(n) => n(t)
|
|
49
49
|
)(e)),
|
|
50
|
-
|
|
50
|
+
he((e) => St(
|
|
51
51
|
import("./headless-location-Ba_ht5ZQ.js").then((n) => n.ProvideHeadlessLocation),
|
|
52
52
|
(n) => n(e.container.currentURL, t)
|
|
53
53
|
)(e))
|
|
54
|
-
),
|
|
55
|
-
const o =
|
|
54
|
+
), Xt = (t) => zt(be, (e) => (n) => {
|
|
55
|
+
const o = W(e.value, e.equals);
|
|
56
56
|
e.feedProp(o), o.on(e.set);
|
|
57
57
|
const r = rt(t(o))(n);
|
|
58
58
|
return (i) => {
|
|
59
59
|
o.dispose(), r(i);
|
|
60
60
|
};
|
|
61
|
-
}),
|
|
61
|
+
}), bn = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, Ae = (t, e) => {
|
|
62
62
|
var i;
|
|
63
63
|
const n = new URL(t, e ?? ((i = wt()) == null ? void 0 : i.location.toString())), o = Object.fromEntries(n.searchParams.entries());
|
|
64
64
|
let r = n.hash;
|
|
@@ -67,34 +67,34 @@ const we = (t) => {
|
|
|
67
67
|
search: o,
|
|
68
68
|
hash: r === "" ? void 0 : r
|
|
69
69
|
};
|
|
70
|
-
},
|
|
71
|
-
const n =
|
|
70
|
+
}, Ee = (t, e) => {
|
|
71
|
+
const n = Ae(e);
|
|
72
72
|
return t.set(n), t;
|
|
73
|
-
},
|
|
73
|
+
}, An = (t) => {
|
|
74
74
|
const n = new URLSearchParams(t.search).toString(), o = t.hash;
|
|
75
75
|
return `${t.pathname}${n ? `?${n}` : ""}${o ? `#${o}` : ""}`;
|
|
76
|
-
},
|
|
76
|
+
}, Re = (t, ...e) => {
|
|
77
77
|
if (typeof t == "string" || Bt.is(t))
|
|
78
|
-
return
|
|
78
|
+
return Re({ href: t }, ...e);
|
|
79
79
|
const { href: n, ...o } = t;
|
|
80
|
-
return
|
|
80
|
+
return Xt((r) => Ut.a(
|
|
81
81
|
It.click(
|
|
82
|
-
|
|
82
|
+
ve(() => (Ee(r, it.get(n)), !0), o)
|
|
83
83
|
),
|
|
84
84
|
_t.href(n),
|
|
85
85
|
...e
|
|
86
86
|
));
|
|
87
|
-
},
|
|
88
|
-
const e = wt(), n = e != null && e.matchMedia != null && e.matchMedia("(prefers-color-scheme: dark)").matches, o =
|
|
87
|
+
}, Jt = Ht("Appearance"), En = (t) => {
|
|
88
|
+
const e = wt(), n = e != null && e.matchMedia != null && e.matchMedia("(prefers-color-scheme: dark)").matches, o = W(n ? "dark" : "light"), r = (s) => {
|
|
89
89
|
o.set(s.matches ? "dark" : "light");
|
|
90
90
|
}, i = e != null && e.matchMedia != null ? e.matchMedia("(prefers-color-scheme: dark)") : void 0;
|
|
91
91
|
return i == null || i.addEventListener("change", r), q(
|
|
92
|
-
|
|
92
|
+
de(Jt, o, t),
|
|
93
93
|
xt(() => i == null ? void 0 : i.removeEventListener("change", r))
|
|
94
94
|
);
|
|
95
|
-
},
|
|
95
|
+
}, Rn = (t) => zt(Jt, t), Oe = (t, e) => {
|
|
96
96
|
if (typeof e == "function")
|
|
97
|
-
return
|
|
97
|
+
return Oe(t, { success: e });
|
|
98
98
|
const n = e.failure ?? ((s) => q(
|
|
99
99
|
xt(s.on(console.error)),
|
|
100
100
|
s.map((c) => `Error: ${c}`)
|
|
@@ -102,25 +102,25 @@ const we = (t) => {
|
|
|
102
102
|
return jt(it.toSignal(t), {
|
|
103
103
|
AsyncSuccess: (s) => o(s.$.value),
|
|
104
104
|
AsyncFailure: (s) => n(s.$.error),
|
|
105
|
-
Loading: (s) => r(s.$.previousValue ??
|
|
105
|
+
Loading: (s) => r(s.$.previousValue ?? me(void 0)),
|
|
106
106
|
NotAsked: i
|
|
107
107
|
});
|
|
108
|
-
},
|
|
108
|
+
}, On = (t = 10) => K((e) => {
|
|
109
109
|
const n = setTimeout(() => {
|
|
110
110
|
e == null || e.focus();
|
|
111
111
|
}, t);
|
|
112
112
|
return () => clearTimeout(n);
|
|
113
|
-
}),
|
|
113
|
+
}), Ln = (t = 10) => K((e) => {
|
|
114
114
|
const n = setTimeout(() => {
|
|
115
115
|
e == null || e.select();
|
|
116
116
|
}, t);
|
|
117
117
|
return () => clearTimeout(n);
|
|
118
|
-
}),
|
|
118
|
+
}), Tn = K((t) => {
|
|
119
119
|
const e = t.style.getPropertyValue(":empty");
|
|
120
120
|
return t.style.setProperty(":empty", "display:none"), (n) => {
|
|
121
121
|
n && t.style.setProperty(":empty", e);
|
|
122
122
|
};
|
|
123
|
-
}),
|
|
123
|
+
}), kn = (t) => Yt("head > title", _t.innerText(t)), Le = {
|
|
124
124
|
partial: {
|
|
125
125
|
root: null,
|
|
126
126
|
rootMargin: "0px",
|
|
@@ -138,19 +138,19 @@ const we = (t) => {
|
|
|
138
138
|
partial: null,
|
|
139
139
|
full: null
|
|
140
140
|
};
|
|
141
|
-
function
|
|
141
|
+
function Te(t) {
|
|
142
142
|
return _[t] == null && (_[t] = new IntersectionObserver((e) => {
|
|
143
143
|
e.forEach((n) => {
|
|
144
144
|
const o = Q[t].get(n.target);
|
|
145
145
|
o == null || o.set(n.isIntersecting);
|
|
146
146
|
});
|
|
147
|
-
},
|
|
147
|
+
}, Le[t])), _[t];
|
|
148
148
|
}
|
|
149
|
-
const
|
|
150
|
-
const n =
|
|
149
|
+
const ke = (t, e) => {
|
|
150
|
+
const n = W(!1);
|
|
151
151
|
return q(
|
|
152
152
|
K((o) => {
|
|
153
|
-
const r = typeof IntersectionObserver < "u" ?
|
|
153
|
+
const r = typeof IntersectionObserver < "u" ? Te(t) : null;
|
|
154
154
|
return Q[t].set(o, n), r == null || r.observe(o), () => {
|
|
155
155
|
var i;
|
|
156
156
|
n.dispose(), r == null || r.unobserve(o), Q[t].delete(o), Q[t].size === 0 && ((i = _[t]) == null || i.disconnect(), _[t] = null);
|
|
@@ -158,20 +158,20 @@ const Se = (t, e) => {
|
|
|
158
158
|
}),
|
|
159
159
|
rt(e(n))
|
|
160
160
|
);
|
|
161
|
-
},
|
|
161
|
+
}, Sn = (t, e, n) => ke(t, (o) => qt(o, e, n ?? (() => dt))), Z = Math.min, D = Math.max, tt = Math.round, G = Math.floor, O = (t) => ({
|
|
162
162
|
x: t,
|
|
163
163
|
y: t
|
|
164
|
-
}),
|
|
164
|
+
}), Se = {
|
|
165
165
|
left: "right",
|
|
166
166
|
right: "left",
|
|
167
167
|
bottom: "top",
|
|
168
168
|
top: "bottom"
|
|
169
|
-
},
|
|
169
|
+
}, Ce = {
|
|
170
170
|
start: "end",
|
|
171
171
|
end: "start"
|
|
172
172
|
};
|
|
173
173
|
function Ct(t, e, n) {
|
|
174
|
-
return
|
|
174
|
+
return D(t, Z(e, n));
|
|
175
175
|
}
|
|
176
176
|
function st(t, e) {
|
|
177
177
|
return typeof t == "function" ? t(e) : t;
|
|
@@ -182,21 +182,21 @@ function F(t) {
|
|
|
182
182
|
function ct(t) {
|
|
183
183
|
return t.split("-")[1];
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function Gt(t) {
|
|
186
186
|
return t === "x" ? "y" : "x";
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function Qt(t) {
|
|
189
189
|
return t === "y" ? "height" : "width";
|
|
190
190
|
}
|
|
191
191
|
function H(t) {
|
|
192
192
|
return ["top", "bottom"].includes(F(t)) ? "y" : "x";
|
|
193
193
|
}
|
|
194
|
-
function
|
|
195
|
-
return
|
|
194
|
+
function Zt(t) {
|
|
195
|
+
return Gt(H(t));
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function Pe(t, e, n) {
|
|
198
198
|
n === void 0 && (n = !1);
|
|
199
|
-
const o = ct(t), r =
|
|
199
|
+
const o = ct(t), r = Zt(t), i = Qt(r);
|
|
200
200
|
let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
201
201
|
return e.reference[i] > e.floating[i] && (s = et(s)), [s, et(s)];
|
|
202
202
|
}
|
|
@@ -205,9 +205,9 @@ function De(t) {
|
|
|
205
205
|
return [mt(t), e, mt(e)];
|
|
206
206
|
}
|
|
207
207
|
function mt(t) {
|
|
208
|
-
return t.replace(/start|end/g, (e) =>
|
|
208
|
+
return t.replace(/start|end/g, (e) => Ce[e]);
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function We(t, e, n) {
|
|
211
211
|
const o = ["left", "right"], r = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
|
|
212
212
|
switch (t) {
|
|
213
213
|
case "top":
|
|
@@ -220,15 +220,15 @@ function Fe(t, e, n) {
|
|
|
220
220
|
return [];
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function Fe(t, e, n, o) {
|
|
224
224
|
const r = ct(t);
|
|
225
|
-
let i =
|
|
225
|
+
let i = We(F(t), n === "start", o);
|
|
226
226
|
return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(mt)))), i;
|
|
227
227
|
}
|
|
228
228
|
function et(t) {
|
|
229
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
229
|
+
return t.replace(/left|right|bottom|top/g, (e) => Se[e]);
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function Me(t) {
|
|
232
232
|
return {
|
|
233
233
|
top: 0,
|
|
234
234
|
right: 0,
|
|
@@ -237,8 +237,8 @@ function Ne(t) {
|
|
|
237
237
|
...t
|
|
238
238
|
};
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
return typeof t != "number" ?
|
|
240
|
+
function Ne(t) {
|
|
241
|
+
return typeof t != "number" ? Me(t) : {
|
|
242
242
|
top: t,
|
|
243
243
|
right: t,
|
|
244
244
|
bottom: t,
|
|
@@ -268,7 +268,7 @@ function Pt(t, e, n) {
|
|
|
268
268
|
reference: o,
|
|
269
269
|
floating: r
|
|
270
270
|
} = t;
|
|
271
|
-
const i = H(e), s =
|
|
271
|
+
const i = H(e), s = Zt(e), c = Qt(s), a = F(e), l = i === "y", f = o.x + o.width / 2 - r.width / 2, u = o.y + o.height / 2 - r.height / 2, d = o[c] / 2 - r[c] / 2;
|
|
272
272
|
let h;
|
|
273
273
|
switch (a) {
|
|
274
274
|
case "top":
|
|
@@ -311,7 +311,7 @@ function Pt(t, e, n) {
|
|
|
311
311
|
}
|
|
312
312
|
return h;
|
|
313
313
|
}
|
|
314
|
-
const
|
|
314
|
+
const Ve = async (t, e, n) => {
|
|
315
315
|
const {
|
|
316
316
|
placement: o = "bottom",
|
|
317
317
|
strategy: r = "absolute",
|
|
@@ -372,7 +372,7 @@ const $e = async (t, e, n) => {
|
|
|
372
372
|
middlewareData: h
|
|
373
373
|
};
|
|
374
374
|
};
|
|
375
|
-
async function
|
|
375
|
+
async function te(t, e) {
|
|
376
376
|
var n;
|
|
377
377
|
e === void 0 && (e = {});
|
|
378
378
|
const {
|
|
@@ -388,7 +388,7 @@ async function Zt(t, e) {
|
|
|
388
388
|
elementContext: u = "floating",
|
|
389
389
|
altBoundary: d = !1,
|
|
390
390
|
padding: h = 0
|
|
391
|
-
} = st(e, t), p =
|
|
391
|
+
} = st(e, t), p = Ne(h), y = c[d ? u === "floating" ? "reference" : "floating" : u], m = nt(await i.getClippingRect({
|
|
392
392
|
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)),
|
|
393
393
|
boundary: l,
|
|
394
394
|
rootBoundary: f,
|
|
@@ -417,7 +417,7 @@ async function Zt(t, e) {
|
|
|
417
417
|
right: (v.right - m.right + p.right) / b.x
|
|
418
418
|
};
|
|
419
419
|
}
|
|
420
|
-
const
|
|
420
|
+
const $e = function(t) {
|
|
421
421
|
return t === void 0 && (t = {}), {
|
|
422
422
|
name: "flip",
|
|
423
423
|
options: t,
|
|
@@ -442,11 +442,11 @@ const He = function(t) {
|
|
|
442
442
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
443
443
|
return {};
|
|
444
444
|
const m = F(r), w = H(c), x = F(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), v = d || (x || !g ? [et(c)] : De(c)), N = p !== "none";
|
|
445
|
-
!d && N && v.push(...
|
|
446
|
-
const
|
|
445
|
+
!d && N && v.push(...Fe(c, g, p, b));
|
|
446
|
+
const le = [c, ...v], ft = await te(e, y), J = [];
|
|
447
447
|
let U = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
448
448
|
if (f && J.push(ft[m]), u) {
|
|
449
|
-
const P =
|
|
449
|
+
const P = Pe(r, s, b);
|
|
450
450
|
J.push(ft[P[0]], ft[P[1]]);
|
|
451
451
|
}
|
|
452
452
|
if (U = [...U, {
|
|
@@ -454,7 +454,7 @@ const He = function(t) {
|
|
|
454
454
|
overflows: J
|
|
455
455
|
}], !J.every((P) => P <= 0)) {
|
|
456
456
|
var Rt, Ot;
|
|
457
|
-
const P = (((Rt = i.flip) == null ? void 0 : Rt.index) || 0) + 1, Tt =
|
|
457
|
+
const P = (((Rt = i.flip) == null ? void 0 : Rt.index) || 0) + 1, Tt = le[P];
|
|
458
458
|
if (Tt)
|
|
459
459
|
return {
|
|
460
460
|
data: {
|
|
@@ -478,7 +478,7 @@ const He = function(t) {
|
|
|
478
478
|
S === "y";
|
|
479
479
|
}
|
|
480
480
|
return !0;
|
|
481
|
-
}).map((k) => [k.placement, k.overflows.filter((S) => S > 0).reduce((S,
|
|
481
|
+
}).map((k) => [k.placement, k.overflows.filter((S) => S > 0).reduce((S, ae) => S + ae, 0)]).sort((k, S) => k[1] - S[1])[0]) == null ? void 0 : Lt[0];
|
|
482
482
|
V && (I = V);
|
|
483
483
|
break;
|
|
484
484
|
}
|
|
@@ -497,7 +497,7 @@ const He = function(t) {
|
|
|
497
497
|
}
|
|
498
498
|
};
|
|
499
499
|
};
|
|
500
|
-
async function
|
|
500
|
+
async function He(t, e) {
|
|
501
501
|
const {
|
|
502
502
|
placement: n,
|
|
503
503
|
platform: o,
|
|
@@ -524,7 +524,7 @@ async function ze(t, e) {
|
|
|
524
524
|
y: h * f
|
|
525
525
|
};
|
|
526
526
|
}
|
|
527
|
-
const
|
|
527
|
+
const ze = function(t) {
|
|
528
528
|
return t === void 0 && (t = 0), {
|
|
529
529
|
name: "offset",
|
|
530
530
|
options: t,
|
|
@@ -535,7 +535,7 @@ const Be = function(t) {
|
|
|
535
535
|
y: i,
|
|
536
536
|
placement: s,
|
|
537
537
|
middlewareData: c
|
|
538
|
-
} = e, a = await
|
|
538
|
+
} = e, a = await He(e, t);
|
|
539
539
|
return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
|
|
540
540
|
x: r + a.x,
|
|
541
541
|
y: i + a.y,
|
|
@@ -546,7 +546,7 @@ const Be = function(t) {
|
|
|
546
546
|
};
|
|
547
547
|
}
|
|
548
548
|
};
|
|
549
|
-
},
|
|
549
|
+
}, Be = function(t) {
|
|
550
550
|
return t === void 0 && (t = {}), {
|
|
551
551
|
name: "shift",
|
|
552
552
|
options: t,
|
|
@@ -574,7 +574,7 @@ const Be = function(t) {
|
|
|
574
574
|
} = st(t, e), l = {
|
|
575
575
|
x: n,
|
|
576
576
|
y: o
|
|
577
|
-
}, f = await
|
|
577
|
+
}, f = await te(e, a), u = H(F(r)), d = Gt(u);
|
|
578
578
|
let h = l[d], p = l[u];
|
|
579
579
|
if (i) {
|
|
580
580
|
const y = d === "y" ? "top" : "left", m = d === "y" ? "bottom" : "right", w = h + f[y], x = h - f[m];
|
|
@@ -607,7 +607,7 @@ function lt() {
|
|
|
607
607
|
return typeof window < "u";
|
|
608
608
|
}
|
|
609
609
|
function B(t) {
|
|
610
|
-
return
|
|
610
|
+
return ee(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
611
611
|
}
|
|
612
612
|
function A(t) {
|
|
613
613
|
var e;
|
|
@@ -615,9 +615,9 @@ function A(t) {
|
|
|
615
615
|
}
|
|
616
616
|
function T(t) {
|
|
617
617
|
var e;
|
|
618
|
-
return (e = (
|
|
618
|
+
return (e = (ee(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function ee(t) {
|
|
621
621
|
return lt() ? t instanceof Node || t instanceof A(t).Node : !1;
|
|
622
622
|
}
|
|
623
623
|
function E(t) {
|
|
@@ -626,7 +626,7 @@ function E(t) {
|
|
|
626
626
|
function L(t) {
|
|
627
627
|
return lt() ? t instanceof HTMLElement || t instanceof A(t).HTMLElement : !1;
|
|
628
628
|
}
|
|
629
|
-
function
|
|
629
|
+
function Dt(t) {
|
|
630
630
|
return !lt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
|
|
631
631
|
}
|
|
632
632
|
function X(t) {
|
|
@@ -638,7 +638,7 @@ function X(t) {
|
|
|
638
638
|
} = R(t);
|
|
639
639
|
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(r);
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function Ue(t) {
|
|
642
642
|
return ["table", "td", "th"].includes(B(t));
|
|
643
643
|
}
|
|
644
644
|
function at(t) {
|
|
@@ -654,7 +654,7 @@ function vt(t) {
|
|
|
654
654
|
const e = bt(), n = E(t) ? R(t) : t;
|
|
655
655
|
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));
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function Ie(t) {
|
|
658
658
|
let e = C(t);
|
|
659
659
|
for (; L(e) && !z(e); ) {
|
|
660
660
|
if (vt(e))
|
|
@@ -690,19 +690,19 @@ function C(t) {
|
|
|
690
690
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
691
691
|
t.assignedSlot || // DOM Element detected.
|
|
692
692
|
t.parentNode || // ShadowRoot detected.
|
|
693
|
-
|
|
693
|
+
Dt(t) && t.host || // Fallback.
|
|
694
694
|
T(t)
|
|
695
695
|
);
|
|
696
|
-
return
|
|
696
|
+
return Dt(e) ? e.host : e;
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function ne(t) {
|
|
699
699
|
const e = C(t);
|
|
700
|
-
return z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : L(e) && X(e) ? e :
|
|
700
|
+
return z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : L(e) && X(e) ? e : ne(e);
|
|
701
701
|
}
|
|
702
702
|
function j(t, e, n) {
|
|
703
703
|
var o;
|
|
704
704
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
705
|
-
const r =
|
|
705
|
+
const r = ne(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = A(r);
|
|
706
706
|
if (i) {
|
|
707
707
|
const c = pt(s);
|
|
708
708
|
return e.concat(s, s.visualViewport || [], X(r) ? r : [], c && n ? j(c) : []);
|
|
@@ -712,7 +712,7 @@ function j(t, e, n) {
|
|
|
712
712
|
function pt(t) {
|
|
713
713
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
714
714
|
}
|
|
715
|
-
function
|
|
715
|
+
function oe(t) {
|
|
716
716
|
const e = R(t);
|
|
717
717
|
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
718
718
|
const r = L(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = tt(n) !== i || tt(o) !== s;
|
|
@@ -733,22 +733,22 @@ function $(t) {
|
|
|
733
733
|
width: o,
|
|
734
734
|
height: r,
|
|
735
735
|
$: i
|
|
736
|
-
} =
|
|
736
|
+
} = oe(e);
|
|
737
737
|
let s = (i ? tt(n.width) : n.width) / o, c = (i ? tt(n.height) : n.height) / r;
|
|
738
738
|
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
739
739
|
x: s,
|
|
740
740
|
y: c
|
|
741
741
|
};
|
|
742
742
|
}
|
|
743
|
-
const
|
|
744
|
-
function
|
|
743
|
+
const _e = /* @__PURE__ */ O(0);
|
|
744
|
+
function re(t) {
|
|
745
745
|
const e = A(t);
|
|
746
|
-
return !bt() || !e.visualViewport ?
|
|
746
|
+
return !bt() || !e.visualViewport ? _e : {
|
|
747
747
|
x: e.visualViewport.offsetLeft,
|
|
748
748
|
y: e.visualViewport.offsetTop
|
|
749
749
|
};
|
|
750
750
|
}
|
|
751
|
-
function
|
|
751
|
+
function je(t, e, n) {
|
|
752
752
|
return e === void 0 && (e = !1), !n || e && n !== A(t) ? !1 : e;
|
|
753
753
|
}
|
|
754
754
|
function M(t, e, n, o) {
|
|
@@ -756,7 +756,7 @@ function M(t, e, n, o) {
|
|
|
756
756
|
const r = t.getBoundingClientRect(), i = At(t);
|
|
757
757
|
let s = O(1);
|
|
758
758
|
e && (o ? E(o) && (s = $(o)) : s = $(t));
|
|
759
|
-
const c =
|
|
759
|
+
const c = je(i, n, o) ? re(i) : O(0);
|
|
760
760
|
let a = (r.left + c.x) / s.x, l = (r.top + c.y) / s.y, f = r.width / s.x, u = r.height / s.y;
|
|
761
761
|
if (i) {
|
|
762
762
|
const d = A(i), h = o && E(o) ? A(o) : o;
|
|
@@ -777,7 +777,7 @@ function Et(t, e) {
|
|
|
777
777
|
const n = ut(t).scrollLeft;
|
|
778
778
|
return e ? e.left + n : M(T(t)).left + n;
|
|
779
779
|
}
|
|
780
|
-
function
|
|
780
|
+
function ie(t, e, n) {
|
|
781
781
|
n === void 0 && (n = !1);
|
|
782
782
|
const o = t.getBoundingClientRect(), r = o.left + e.scrollLeft - (n ? 0 : (
|
|
783
783
|
// RTL <body> scrollbar.
|
|
@@ -788,7 +788,7 @@ function re(t, e, n) {
|
|
|
788
788
|
y: i
|
|
789
789
|
};
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function Ye(t) {
|
|
792
792
|
let {
|
|
793
793
|
elements: e,
|
|
794
794
|
rect: n,
|
|
@@ -807,7 +807,7 @@ function qe(t) {
|
|
|
807
807
|
const h = M(o);
|
|
808
808
|
l = $(o), f.x = h.x + o.clientLeft, f.y = h.y + o.clientTop;
|
|
809
809
|
}
|
|
810
|
-
const d = s && !u && !i ?
|
|
810
|
+
const d = s && !u && !i ? ie(s, a, !0) : O(0);
|
|
811
811
|
return {
|
|
812
812
|
width: n.width * l.x,
|
|
813
813
|
height: n.height * l.y,
|
|
@@ -815,21 +815,21 @@ function qe(t) {
|
|
|
815
815
|
y: n.y * l.y - a.scrollTop * l.y + f.y + d.y
|
|
816
816
|
};
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function qe(t) {
|
|
819
819
|
return Array.from(t.getClientRects());
|
|
820
820
|
}
|
|
821
|
-
function
|
|
822
|
-
const e = T(t), n = ut(t), o = t.ownerDocument.body, r =
|
|
821
|
+
function Ke(t) {
|
|
822
|
+
const e = T(t), n = ut(t), o = t.ownerDocument.body, r = D(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = D(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
823
823
|
let s = -n.scrollLeft + Et(t);
|
|
824
824
|
const c = -n.scrollTop;
|
|
825
|
-
return R(o).direction === "rtl" && (s +=
|
|
825
|
+
return R(o).direction === "rtl" && (s += D(e.clientWidth, o.clientWidth) - r), {
|
|
826
826
|
width: r,
|
|
827
827
|
height: i,
|
|
828
828
|
x: s,
|
|
829
829
|
y: c
|
|
830
830
|
};
|
|
831
831
|
}
|
|
832
|
-
function
|
|
832
|
+
function Xe(t, e) {
|
|
833
833
|
const n = A(t), o = T(t), r = n.visualViewport;
|
|
834
834
|
let i = o.clientWidth, s = o.clientHeight, c = 0, a = 0;
|
|
835
835
|
if (r) {
|
|
@@ -844,7 +844,7 @@ function Je(t, e) {
|
|
|
844
844
|
y: a
|
|
845
845
|
};
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function Je(t, e) {
|
|
848
848
|
const n = M(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = L(t) ? $(t) : O(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, a = r * i.x, l = o * i.y;
|
|
849
849
|
return {
|
|
850
850
|
width: s,
|
|
@@ -853,16 +853,16 @@ function Ge(t, e) {
|
|
|
853
853
|
y: l
|
|
854
854
|
};
|
|
855
855
|
}
|
|
856
|
-
function
|
|
856
|
+
function Wt(t, e, n) {
|
|
857
857
|
let o;
|
|
858
858
|
if (e === "viewport")
|
|
859
|
-
o =
|
|
859
|
+
o = Xe(t, n);
|
|
860
860
|
else if (e === "document")
|
|
861
|
-
o =
|
|
861
|
+
o = Ke(T(t));
|
|
862
862
|
else if (E(e))
|
|
863
|
-
o =
|
|
863
|
+
o = Je(e, n);
|
|
864
864
|
else {
|
|
865
|
-
const r =
|
|
865
|
+
const r = re(t);
|
|
866
866
|
o = {
|
|
867
867
|
x: e.x - r.x,
|
|
868
868
|
y: e.y - r.y,
|
|
@@ -872,11 +872,11 @@ function Dt(t, e, n) {
|
|
|
872
872
|
}
|
|
873
873
|
return nt(o);
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function se(t, e) {
|
|
876
876
|
const n = C(t);
|
|
877
|
-
return n === e || !E(n) || z(n) ? !1 : R(n).position === "fixed" ||
|
|
877
|
+
return n === e || !E(n) || z(n) ? !1 : R(n).position === "fixed" || se(n, e);
|
|
878
878
|
}
|
|
879
|
-
function
|
|
879
|
+
function Ge(t, e) {
|
|
880
880
|
const n = e.get(t);
|
|
881
881
|
if (n)
|
|
882
882
|
return n;
|
|
@@ -885,21 +885,21 @@ function Qe(t, e) {
|
|
|
885
885
|
let s = i ? C(t) : t;
|
|
886
886
|
for (; E(s) && !z(s); ) {
|
|
887
887
|
const c = R(s), a = vt(s);
|
|
888
|
-
!a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || X(s) && !a &&
|
|
888
|
+
!a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || X(s) && !a && se(t, s)) ? o = o.filter((f) => f !== s) : r = c, s = C(s);
|
|
889
889
|
}
|
|
890
890
|
return e.set(t, o), o;
|
|
891
891
|
}
|
|
892
|
-
function
|
|
892
|
+
function Qe(t) {
|
|
893
893
|
let {
|
|
894
894
|
element: e,
|
|
895
895
|
boundary: n,
|
|
896
896
|
rootBoundary: o,
|
|
897
897
|
strategy: r
|
|
898
898
|
} = t;
|
|
899
|
-
const s = [...n === "clippingAncestors" ? at(e) ? [] :
|
|
900
|
-
const u =
|
|
901
|
-
return l.top =
|
|
902
|
-
},
|
|
899
|
+
const s = [...n === "clippingAncestors" ? at(e) ? [] : Ge(e, this._c) : [].concat(n), o], c = s[0], a = s.reduce((l, f) => {
|
|
900
|
+
const u = Wt(e, f, r);
|
|
901
|
+
return l.top = D(u.top, l.top), l.right = Z(u.right, l.right), l.bottom = Z(u.bottom, l.bottom), l.left = D(u.left, l.left), l;
|
|
902
|
+
}, Wt(e, c, r));
|
|
903
903
|
return {
|
|
904
904
|
width: a.right - a.left,
|
|
905
905
|
height: a.bottom - a.top,
|
|
@@ -907,17 +907,17 @@ function Ze(t) {
|
|
|
907
907
|
y: a.top
|
|
908
908
|
};
|
|
909
909
|
}
|
|
910
|
-
function
|
|
910
|
+
function Ze(t) {
|
|
911
911
|
const {
|
|
912
912
|
width: e,
|
|
913
913
|
height: n
|
|
914
|
-
} =
|
|
914
|
+
} = oe(t);
|
|
915
915
|
return {
|
|
916
916
|
width: e,
|
|
917
917
|
height: n
|
|
918
918
|
};
|
|
919
919
|
}
|
|
920
|
-
function
|
|
920
|
+
function tn(t, e, n) {
|
|
921
921
|
const o = L(e), r = T(e), i = n === "fixed", s = M(t, !0, i, e);
|
|
922
922
|
let c = {
|
|
923
923
|
scrollLeft: 0,
|
|
@@ -929,7 +929,7 @@ function en(t, e, n) {
|
|
|
929
929
|
const d = M(e, !0, i, e);
|
|
930
930
|
a.x = d.x + e.clientLeft, a.y = d.y + e.clientTop;
|
|
931
931
|
} else r && (a.x = Et(r));
|
|
932
|
-
const l = r && !o && !i ?
|
|
932
|
+
const l = r && !o && !i ? ie(r, c) : O(0), f = s.left + c.scrollLeft - a.x - l.x, u = s.top + c.scrollTop - a.y - l.y;
|
|
933
933
|
return {
|
|
934
934
|
x: f,
|
|
935
935
|
y: u,
|
|
@@ -948,7 +948,7 @@ function Ft(t, e) {
|
|
|
948
948
|
let n = t.offsetParent;
|
|
949
949
|
return T(t) === n && (n = n.ownerDocument.body), n;
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function ce(t, e) {
|
|
952
952
|
const n = A(t);
|
|
953
953
|
if (at(t))
|
|
954
954
|
return n;
|
|
@@ -962,14 +962,14 @@ function se(t, e) {
|
|
|
962
962
|
return n;
|
|
963
963
|
}
|
|
964
964
|
let o = Ft(t, e);
|
|
965
|
-
for (; o &&
|
|
965
|
+
for (; o && Ue(o) && ht(o); )
|
|
966
966
|
o = Ft(o, e);
|
|
967
|
-
return o && z(o) && ht(o) && !vt(o) ? n : o ||
|
|
967
|
+
return o && z(o) && ht(o) && !vt(o) ? n : o || Ie(t) || n;
|
|
968
968
|
}
|
|
969
|
-
const
|
|
970
|
-
const e = this.getOffsetParent ||
|
|
969
|
+
const en = async function(t) {
|
|
970
|
+
const e = this.getOffsetParent || ce, n = this.getDimensions, o = await n(t.floating);
|
|
971
971
|
return {
|
|
972
|
-
reference:
|
|
972
|
+
reference: tn(t.reference, await e(t.floating), t.strategy),
|
|
973
973
|
floating: {
|
|
974
974
|
x: 0,
|
|
975
975
|
y: 0,
|
|
@@ -978,22 +978,22 @@ const nn = async function(t) {
|
|
|
978
978
|
}
|
|
979
979
|
};
|
|
980
980
|
};
|
|
981
|
-
function
|
|
981
|
+
function nn(t) {
|
|
982
982
|
return R(t).direction === "rtl";
|
|
983
983
|
}
|
|
984
|
-
const
|
|
985
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
984
|
+
const on = {
|
|
985
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Ye,
|
|
986
986
|
getDocumentElement: T,
|
|
987
|
-
getClippingRect:
|
|
988
|
-
getOffsetParent:
|
|
989
|
-
getElementRects:
|
|
990
|
-
getClientRects:
|
|
991
|
-
getDimensions:
|
|
987
|
+
getClippingRect: Qe,
|
|
988
|
+
getOffsetParent: ce,
|
|
989
|
+
getElementRects: en,
|
|
990
|
+
getClientRects: qe,
|
|
991
|
+
getDimensions: Ze,
|
|
992
992
|
getScale: $,
|
|
993
993
|
isElement: E,
|
|
994
|
-
isRTL:
|
|
994
|
+
isRTL: nn
|
|
995
995
|
};
|
|
996
|
-
function
|
|
996
|
+
function rn(t, e) {
|
|
997
997
|
let n = null, o;
|
|
998
998
|
const r = T(t);
|
|
999
999
|
function i() {
|
|
@@ -1012,7 +1012,7 @@ function sn(t, e) {
|
|
|
1012
1012
|
return;
|
|
1013
1013
|
const h = G(f), p = G(r.clientWidth - (l + u)), g = G(r.clientHeight - (f + d)), y = G(l), w = {
|
|
1014
1014
|
rootMargin: -h + "px " + -p + "px " + -g + "px " + -y + "px",
|
|
1015
|
-
threshold:
|
|
1015
|
+
threshold: D(0, Z(1, a)) || 1
|
|
1016
1016
|
};
|
|
1017
1017
|
let x = !0;
|
|
1018
1018
|
function b(v) {
|
|
@@ -1039,7 +1039,7 @@ function sn(t, e) {
|
|
|
1039
1039
|
}
|
|
1040
1040
|
return s(!0), i;
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1042
|
+
function sn(t, e, n, o) {
|
|
1043
1043
|
o === void 0 && (o = {});
|
|
1044
1044
|
const {
|
|
1045
1045
|
ancestorScroll: r = !0,
|
|
@@ -1053,7 +1053,7 @@ function cn(t, e, n, o) {
|
|
|
1053
1053
|
passive: !0
|
|
1054
1054
|
}), i && m.addEventListener("resize", n);
|
|
1055
1055
|
});
|
|
1056
|
-
const u = l && c ?
|
|
1056
|
+
const u = l && c ? rn(l, n) : null;
|
|
1057
1057
|
let d = -1, h = null;
|
|
1058
1058
|
s && (h = new ResizeObserver((m) => {
|
|
1059
1059
|
let [w] = m;
|
|
@@ -1075,40 +1075,40 @@ function cn(t, e, n, o) {
|
|
|
1075
1075
|
}), u == null || u(), (m = h) == null || m.disconnect(), h = null, a && cancelAnimationFrame(p);
|
|
1076
1076
|
};
|
|
1077
1077
|
}
|
|
1078
|
-
const
|
|
1078
|
+
const cn = ze, ln = Be, Mt = $e, an = (t, e, n) => {
|
|
1079
1079
|
const o = /* @__PURE__ */ new Map(), r = {
|
|
1080
|
-
platform:
|
|
1080
|
+
platform: on,
|
|
1081
1081
|
...n
|
|
1082
1082
|
}, i = {
|
|
1083
1083
|
...r.platform,
|
|
1084
1084
|
_c: o
|
|
1085
1085
|
};
|
|
1086
|
-
return
|
|
1086
|
+
return Ve(t, e, {
|
|
1087
1087
|
...r,
|
|
1088
1088
|
platform: i
|
|
1089
1089
|
});
|
|
1090
|
-
},
|
|
1090
|
+
}, Cn = ({
|
|
1091
1091
|
content: t,
|
|
1092
1092
|
open: e,
|
|
1093
1093
|
placement: n,
|
|
1094
1094
|
offset: { mainAxis: o, crossAxis: r } = { mainAxis: 0, crossAxis: 0 }
|
|
1095
1095
|
}) => yt((i) => {
|
|
1096
1096
|
const s = it.toSignal(e), c = i.element;
|
|
1097
|
-
return
|
|
1097
|
+
return qt(
|
|
1098
1098
|
s,
|
|
1099
1099
|
() => Yt(
|
|
1100
1100
|
"body",
|
|
1101
1101
|
Ut.div(
|
|
1102
1102
|
K((a) => {
|
|
1103
1103
|
const l = a;
|
|
1104
|
-
return l.style.position = "absolute",
|
|
1105
|
-
|
|
1104
|
+
return l.style.position = "absolute", sn(c, l, () => {
|
|
1105
|
+
an(c, l, {
|
|
1106
1106
|
placement: n,
|
|
1107
1107
|
strategy: "absolute",
|
|
1108
1108
|
middleware: [
|
|
1109
1109
|
Mt(),
|
|
1110
|
-
|
|
1111
|
-
|
|
1110
|
+
cn({ mainAxis: o, crossAxis: r }),
|
|
1111
|
+
ln(),
|
|
1112
1112
|
Mt()
|
|
1113
1113
|
]
|
|
1114
1114
|
}).then(({ x: f, y: u }) => {
|
|
@@ -1120,9 +1120,9 @@ const ln = Be, an = Ue, Mt = He, un = (t, e, n) => {
|
|
|
1120
1120
|
)
|
|
1121
1121
|
)
|
|
1122
1122
|
)(i);
|
|
1123
|
-
}),
|
|
1123
|
+
}), un = (t, e) => {
|
|
1124
1124
|
if (typeof e == "function")
|
|
1125
|
-
return
|
|
1125
|
+
return un(t, { success: e });
|
|
1126
1126
|
const n = e.failure ?? ((r) => q(
|
|
1127
1127
|
xt(r.on(console.error)),
|
|
1128
1128
|
r.map((i) => `Error: ${i}`)
|
|
@@ -1131,11 +1131,11 @@ const ln = Be, an = Ue, Mt = He, un = (t, e, n) => {
|
|
|
1131
1131
|
Success: (r) => o(r.$.value),
|
|
1132
1132
|
Failure: (r) => n(r.$.error)
|
|
1133
1133
|
});
|
|
1134
|
-
},
|
|
1134
|
+
}, Pn = () => It.focus((t) => {
|
|
1135
1135
|
var e;
|
|
1136
1136
|
return (e = t.target) == null ? void 0 : e.select();
|
|
1137
1137
|
}), Dn = (t) => yt((e) => {
|
|
1138
|
-
const { element: n } = e, o =
|
|
1138
|
+
const { element: n } = e, o = W({
|
|
1139
1139
|
width: n.clientWidth,
|
|
1140
1140
|
height: n.clientHeight
|
|
1141
1141
|
}), r = rt(t(o))(e), i = () => {
|
|
@@ -1145,8 +1145,8 @@ const ln = Be, an = Ue, Mt = He, un = (t, e, n) => {
|
|
|
1145
1145
|
return typeof ResizeObserver == "function" && (s = new ResizeObserver(i), s.observe(n)), (c) => {
|
|
1146
1146
|
s == null || s.disconnect(), r(c);
|
|
1147
1147
|
};
|
|
1148
|
-
}),
|
|
1149
|
-
const n = wt(), o =
|
|
1148
|
+
}), Wn = (t) => (e) => {
|
|
1149
|
+
const n = wt(), o = W({
|
|
1150
1150
|
width: (n == null ? void 0 : n.innerWidth) ?? 0,
|
|
1151
1151
|
height: (n == null ? void 0 : n.innerHeight) ?? 0
|
|
1152
1152
|
}), r = rt(t(o))(e), i = () => {
|
|
@@ -1158,7 +1158,7 @@ const ln = Be, an = Ue, Mt = He, un = (t, e, n) => {
|
|
|
1158
1158
|
return n == null || n.addEventListener("resize", i), (s) => {
|
|
1159
1159
|
n == null || n.removeEventListener("resize", i), r(s);
|
|
1160
1160
|
};
|
|
1161
|
-
},
|
|
1161
|
+
}, fn = (t, e) => {
|
|
1162
1162
|
const n = e.split("/").filter((r) => r !== ""), o = {};
|
|
1163
1163
|
for (let r = 0; r < t.length; r++) {
|
|
1164
1164
|
const i = t[r], s = n[r];
|
|
@@ -1173,22 +1173,22 @@ const ln = Be, an = Ue, Mt = He, un = (t, e, n) => {
|
|
|
1173
1173
|
return { params: o, path: e };
|
|
1174
1174
|
}
|
|
1175
1175
|
return n.length !== t.length ? null : { params: o, path: e };
|
|
1176
|
-
},
|
|
1176
|
+
}, hn = (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 !== ""), dn = (t) => {
|
|
1177
1177
|
const e = t.map((n) => {
|
|
1178
|
-
const o =
|
|
1178
|
+
const o = hn(n);
|
|
1179
1179
|
return { route: n, segments: o };
|
|
1180
1180
|
});
|
|
1181
1181
|
return function(o) {
|
|
1182
1182
|
for (const { segments: r, route: i } of e) {
|
|
1183
|
-
const s =
|
|
1183
|
+
const s = fn(r, o);
|
|
1184
1184
|
if (s)
|
|
1185
1185
|
return { ...s, route: i };
|
|
1186
1186
|
}
|
|
1187
1187
|
return null;
|
|
1188
1188
|
};
|
|
1189
|
-
},
|
|
1190
|
-
const e =
|
|
1191
|
-
return
|
|
1189
|
+
}, Fn = (t) => {
|
|
1190
|
+
const e = dn(Object.keys(t));
|
|
1191
|
+
return Xt((n) => {
|
|
1192
1192
|
const o = n.map((r) => {
|
|
1193
1193
|
const i = e(r.pathname);
|
|
1194
1194
|
if (i == null)
|
|
@@ -1201,13 +1201,13 @@ const ln = Be, an = Ue, Mt = He, un = (t, e, n) => {
|
|
|
1201
1201
|
hash: r.hash
|
|
1202
1202
|
};
|
|
1203
1203
|
});
|
|
1204
|
-
return
|
|
1204
|
+
return pe(
|
|
1205
1205
|
o.map((r) => [r.route, r]),
|
|
1206
1206
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1207
1207
|
t
|
|
1208
1208
|
);
|
|
1209
1209
|
});
|
|
1210
|
-
}, ot = 60 * 1e3, gt = 60 * ot, Y = 24 * gt, Nt = 7 * Y, Vt = 30 * Y,
|
|
1210
|
+
}, ot = 60 * 1e3, gt = 60 * ot, Y = 24 * gt, Nt = 7 * Y, Vt = 30 * Y, mn = 365 * Y, pn = [
|
|
1211
1211
|
{
|
|
1212
1212
|
max: ot * 90,
|
|
1213
1213
|
value: ot,
|
|
@@ -1245,7 +1245,7 @@ const ln = Be, an = Ue, Mt = He, un = (t, e, n) => {
|
|
|
1245
1245
|
},
|
|
1246
1246
|
{
|
|
1247
1247
|
max: 1 / 0,
|
|
1248
|
-
value:
|
|
1248
|
+
value: mn,
|
|
1249
1249
|
name: "year",
|
|
1250
1250
|
past: { singular: "last year", plural: "{} years ago" },
|
|
1251
1251
|
future: { singular: "in a year", plural: "in {} years" }
|
|
@@ -1261,67 +1261,67 @@ function $t(t, e, n, o) {
|
|
|
1261
1261
|
})
|
|
1262
1262
|
);
|
|
1263
1263
|
}
|
|
1264
|
-
function
|
|
1264
|
+
function gn(t) {
|
|
1265
1265
|
const e = Math.abs(t);
|
|
1266
1266
|
if (e < ot)
|
|
1267
1267
|
return t < 0 ? "just now" : "in a moment";
|
|
1268
|
-
for (const n of
|
|
1268
|
+
for (const n of pn)
|
|
1269
1269
|
if (e < n.max)
|
|
1270
1270
|
return t < 0 ? $t(e, n.value, n.past.singular, n.past.plural) : $t(e, n.value, n.future.singular, n.future.plural);
|
|
1271
1271
|
throw new Error("unreachable");
|
|
1272
1272
|
}
|
|
1273
|
-
const
|
|
1274
|
-
const n = e != null ? Bt.is(e) ? e.derive() :
|
|
1273
|
+
const Mn = (t, e) => {
|
|
1274
|
+
const n = e != null ? Bt.is(e) ? e.derive() : W(e) : W(/* @__PURE__ */ new Date()), o = ge(
|
|
1275
1275
|
t,
|
|
1276
1276
|
n
|
|
1277
1277
|
)((i, s) => {
|
|
1278
1278
|
const c = i.getTime() - s.getTime();
|
|
1279
|
-
return
|
|
1280
|
-
}), r =
|
|
1279
|
+
return gn(c);
|
|
1280
|
+
}), r = Kt.is(n) ? setInterval(() => n.set(/* @__PURE__ */ new Date()), 5e3) : void 0;
|
|
1281
1281
|
return o.onDispose(() => {
|
|
1282
1282
|
r != null && clearInterval(r), n.dispose();
|
|
1283
1283
|
}), o;
|
|
1284
1284
|
};
|
|
1285
|
-
class
|
|
1285
|
+
class yn extends Kt {
|
|
1286
1286
|
constructor() {
|
|
1287
1287
|
super(...arguments);
|
|
1288
1288
|
kt(this, "tick", () => this.update((n) => n + 1));
|
|
1289
1289
|
}
|
|
1290
1290
|
}
|
|
1291
|
-
const
|
|
1291
|
+
const Nn = (t = 0) => new yn(t, (e, n) => e === n);
|
|
1292
1292
|
export {
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1293
|
+
Re as Anchor,
|
|
1294
|
+
Oe as AsyncResultView,
|
|
1295
|
+
On as AutoFocus,
|
|
1296
|
+
Ln as AutoSelect,
|
|
1297
1297
|
Dn as ElementSize,
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1298
|
+
kn as HTMLTitle,
|
|
1299
|
+
Tn as HiddenWhenEmpty,
|
|
1300
|
+
ke as InViewport,
|
|
1301
|
+
be as LocationProviderMarker,
|
|
1302
|
+
Cn as PopOver,
|
|
1303
|
+
En as ProvideAppearance,
|
|
1304
|
+
vn as ProvideLocation,
|
|
1305
|
+
un as ResultView,
|
|
1306
|
+
Fn as Router,
|
|
1307
|
+
Pn as SelectOnFocus,
|
|
1308
|
+
yn as Ticker,
|
|
1309
|
+
Rn as UseAppearance,
|
|
1310
|
+
Xt as UseLocation,
|
|
1311
|
+
Sn as WhenInViewport,
|
|
1312
|
+
Wn as WindowSize,
|
|
1313
|
+
we as _checkExtensionCondition,
|
|
1314
|
+
ye as _getExtension,
|
|
1315
|
+
dn as _makeRouteMatcher,
|
|
1316
|
+
hn as _parseRouteSegments,
|
|
1317
|
+
Jt as appearanceMarker,
|
|
1318
|
+
bn as areLocationsEqual,
|
|
1319
|
+
ve as handleAnchorClick,
|
|
1320
|
+
Ae as locationFromURL,
|
|
1321
|
+
Mn as makeRelativeTime,
|
|
1322
|
+
Nn as makeTicker,
|
|
1323
|
+
fn as matchesRoute,
|
|
1324
|
+
Ee as setLocationFromUrl,
|
|
1325
|
+
gn as timeDiffToString,
|
|
1326
|
+
An as urlFromLocation
|
|
1327
1327
|
};
|
package/package.json
CHANGED
|
@@ -27,4 +27,4 @@ export declare const InViewport: (mode: InViewportMode, fn: (value: Signal<boole
|
|
|
27
27
|
* @returns The result of executing the `then` function or the `otherwise` function.
|
|
28
28
|
* @public
|
|
29
29
|
*/
|
|
30
|
-
export declare const WhenInViewport: (mode: InViewportMode, then: TNode, otherwise?: TNode) => Renderable;
|
|
30
|
+
export declare const WhenInViewport: (mode: InViewportMode, then: () => TNode, otherwise?: () => TNode) => Renderable;
|