@surdeddd/bottom-sheet 0.23.2 → 0.23.4

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 (62) hide show
  1. package/README.md +18 -16
  2. package/README.ru.md +697 -0
  3. package/dist/{BottomSheetCore-CQStdVy2.d.cts → BottomSheetCore-C5tJYVMY.d.cts} +4 -1
  4. package/dist/{BottomSheetCore-9i-Uh6T3.d.ts → BottomSheetCore-DxSrC4QC.d.ts} +4 -1
  5. package/dist/{BottomSheetEngine-CsQWHLNb.d.cts → BottomSheetEngine-B3F9qukX.d.cts} +1 -1
  6. package/dist/{BottomSheetEngine-Dn6h-7gF.d.ts → BottomSheetEngine-BchzgqGG.d.ts} +1 -1
  7. package/dist/core.cjs +43 -13
  8. package/dist/core.d.cts +2 -2
  9. package/dist/core.d.ts +2 -2
  10. package/dist/core.js +43 -13
  11. package/dist/debug.d.cts +3 -2
  12. package/dist/debug.d.ts +3 -2
  13. package/dist/{default-features-DkG9aho0.d.cts → default-features-BGiCSmV1.d.cts} +1 -1
  14. package/dist/{default-features-C3cilcW9.d.ts → default-features-DwVTzDwP.d.ts} +1 -1
  15. package/dist/element.cjs +107 -21
  16. package/dist/element.d.cts +5 -3
  17. package/dist/element.d.ts +5 -3
  18. package/dist/element.iife.global.js +2 -2
  19. package/dist/element.js +107 -21
  20. package/dist/features.cjs +56 -3
  21. package/dist/features.d.cts +3 -3
  22. package/dist/features.d.ts +3 -3
  23. package/dist/features.js +56 -3
  24. package/dist/{index-CnsJQZp2.d.ts → index-C7TSQkVK.d.cts} +3 -2
  25. package/dist/{index-CVGC5B5D.d.cts → index-CdM1tke5.d.ts} +3 -2
  26. package/dist/index.cjs +96 -16
  27. package/dist/index.d.cts +7 -6
  28. package/dist/index.d.ts +7 -6
  29. package/dist/index.js +96 -16
  30. package/dist/integrations/formik.d.cts +3 -2
  31. package/dist/integrations/formik.d.ts +3 -2
  32. package/dist/integrations/react-hook-form.d.cts +3 -2
  33. package/dist/integrations/react-hook-form.d.ts +3 -2
  34. package/dist/overlay.d.cts +2 -1
  35. package/dist/overlay.d.ts +2 -1
  36. package/dist/preact.d.cts +2 -2
  37. package/dist/preact.d.ts +2 -2
  38. package/dist/qwik-lib/index.qwik.cjs +87 -16
  39. package/dist/qwik-lib/index.qwik.mjs +87 -16
  40. package/dist/qwik.cjs +96 -16
  41. package/dist/qwik.d.cts +5 -3
  42. package/dist/qwik.d.ts +5 -3
  43. package/dist/qwik.js +96 -16
  44. package/dist/react.cjs +96 -16
  45. package/dist/react.d.cts +8 -5
  46. package/dist/react.d.ts +8 -5
  47. package/dist/react.js +96 -16
  48. package/dist/solid.cjs +96 -16
  49. package/dist/solid.d.cts +4 -1
  50. package/dist/solid.d.ts +4 -1
  51. package/dist/solid.js +96 -16
  52. package/dist/solid.source.jsx +96 -16
  53. package/dist/svelte-core.cjs +98 -16
  54. package/dist/svelte-core.js +97 -17
  55. package/dist/svelte-src/BottomSheet.svelte +1 -1
  56. package/dist/svelte.cjs +97 -18
  57. package/dist/svelte.js +97 -18
  58. package/dist/vue.cjs +96 -16
  59. package/dist/vue.js +96 -16
  60. package/dist/webgl.d.cts +3 -2
  61. package/dist/webgl.d.ts +3 -2
  62. package/package.json +32 -34
@@ -1,3 +1,3 @@
1
- "use strict";var surdeddd_bottomSheet=(()=>{var ce=Object.defineProperty;var Gn=Object.getOwnPropertyDescriptor;var Wn=Object.getOwnPropertyNames;var Un=Object.prototype.hasOwnProperty;var $n=(t,e,i)=>e in t?ce(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var m=(t,e)=>()=>(t&&(e=t(t=0)),e);var Dt=(t,e)=>{for(var i in e)ce(t,i,{get:e[i],enumerable:!0})},qn=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Wn(e))!Un.call(t,s)&&s!==i&&ce(t,s,{get:()=>e[s],enumerable:!(n=Gn(e,s))||n.enumerable});return t};var Yn=t=>qn(ce({},"__esModule",{value:!0}),t);var a=(t,e,i)=>$n(t,typeof e!="symbol"?e+"":e,i);var Le,R,kt=m(()=>{"use strict";Le=class{constructor(){a(this,"entries",[])}push(e){return this.entries.push(e),this.recompute(),()=>this.remove(e.id)}remove(e){let i=this.entries.findIndex(n=>n.id===e);i!==-1&&(this.entries.splice(i,1),this.recompute())}promote(e){let i=this.entries.findIndex(n=>n.id===e);if(i!==-1){if(i!==this.entries.length-1){let[n]=this.entries.splice(i,1);this.entries.push(n)}this.recompute()}}update(){this.recompute()}size(){return this.entries.length}depthOf(e){let i=[];for(let s of this.entries)(!s.isOpen||s.isOpen())&&i.push(s);let n=i.findIndex(s=>s.id===e);return n===-1?0:i.length-1-n}clear(){this.entries=[]}recompute(){let e=null,i=[];for(let n of this.entries)(!n.isOpen||n.isOpen())&&(e=n,i.push(n));!e&&this.entries.length>0&&(e=this.entries[this.entries.length-1]),this.entries.forEach((n,s)=>{if(n.setZIndex(100+s*10),n.setIsTop(n===e),n.setDepth){let r=i.indexOf(n);n.setDepth(r===-1?0:i.length-1-r)}})}},R=new Le});function Fe(t){switch(t){case"bottom":return e=>`translate3d(0, ${e}px, 0)`;case"top":return e=>`translate3d(0, ${-e}px, 0)`;case"left":return e=>`translate3d(${-e}px, 0, 0)`;case"right":return e=>`translate3d(${e}px, 0, 0)`}}var D,ue=m(()=>{"use strict";D=t=>t==="left"||t==="right"?"width":"height"});function _e(t){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`${t}-${crypto.randomUUID()}`:(He[t]=(He[t]??0)+1,`${t}-${He[t]}`)}var He,Ot=m(()=>{"use strict";He={}});function It(){let t=new Map;return{on(e,i){let n=t.get(e);return n||(n=new Set,t.set(e,n)),n.add(i),()=>{n.delete(i)}},emit(e,i){let n=t.get(e);if(n)for(let s of[...n])s(i)},listenerCount(e){return t.get(e)?.size??0},clear(){t.clear()}}}var Pt=m(()=>{"use strict"});var A,Lt,Zn,Ht,Ft,Xn,he,_t=m(()=>{"use strict";A=null,Lt="data-bs-probe",Zn=t=>{if(typeof document>"u")return null;if(!A||!A.isConnected){let e=document.querySelector(`[${Lt}]`);e?A=e:(A=document.createElement("div"),A.setAttribute("aria-hidden","true"),A.setAttribute(Lt,""),A.style.cssText="position:absolute;visibility:hidden;pointer-events:none;contain:strict;left:0;top:0;width:0;height:0;",document.body.appendChild(A))}return t==="vertical"?(A.style.width="0",A.style.height=""):(A.style.height="0",A.style.width=""),A},Ht=t=>t==="bottom"||t==="top",Ft=t=>typeof window>"u"?0:Ht(t)?window.innerHeight:window.innerWidth,Xn=/^(-?\d+(?:\.\d+)?)%$/,he=(t,e,i)=>{if(typeof t=="number")return Math.max(0,t);if(t==="full")return Ft(e);if(t==="fit"||t==="content")return Math.max(0,i?.()??0);let n=t.match(Xn);if(n){let o=parseFloat(n[1])/100;return Math.max(0,Ft(e)*o)}let s=Ht(e)?"vertical":"horizontal",r=Zn(s);return r?s==="vertical"?(r.style.height=t,Math.max(0,r.getBoundingClientRect().height)):(r.style.width=t,Math.max(0,r.getBoundingClientRect().width)):0}});function x(...t){typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof console<"u"&&console.warn(...t)}var G=m(()=>{"use strict"});var Bt,jn,Be,Qn,Nt,W,Jn,es,ts,Kt,U=m(()=>{"use strict";_t();G();Bt=(t,e,i)=>t.map(n=>{let s=he(n.size,e,i);return!Number.isFinite(s)||s<0?(x(`[BottomSheet] snap "${n.id}" resolved to invalid size (${String(n.size)} \u2192 ${s}); clamped to 0.`),{id:n.id,size:0}):{id:n.id,size:s}}).sort((n,s)=>n.size-s.size),jn=/(^|[^a-z])vh\b/i,Be=t=>{for(let e of t)typeof e.size=="string"&&jn.test(e.size)&&x(`[BottomSheet] snap "${e.id}" uses "vh" \u2014 prefer "dvh" on mobile (iOS Safari URL bar makes vh unstable). See https://web.dev/blog/viewport-units`)},Qn=(t,e,i,n=0,s=0)=>{let r=e.filter(u=>i.includes(u.id));if(r.length===0)return null;let o=t+n*s,l=r[0],c=Math.abs(o-l.size);for(let u=1;u<r.length;u++){let d=r[u],h=Math.abs(o-d.size);h<c&&(l=d,c=h)}return l},Nt=(t,e)=>{let i=t.filter(n=>e.includes(n.id));return i.length===0?{min:0,max:0}:{min:i[0].size,max:i[i.length-1].size}},W=(t,e)=>e.find(i=>i.id===t)??null,Jn=.4,es=12,ts=.15,Kt=t=>{let e=Math.abs(t.velocity),i=t.pointerKind==="mouse"?Jn:t.flickVelocity,n=t.pointerKind==="mouse"?es:t.dragThreshold,s=0;if((e>i||e>ts)&&(s=t.velocity>0?1:-1),Math.abs(t.delta)<n&&s===0)return W(t.activeId,t.resolved);let r=e>i?Math.min(e*180,t.maxAxisSize):0;return Qn(t.size,t.resolved,t.allowed,s,r)}});function Ne(t,e,i){let n=!1,s=!1;return t({...e,cancel:()=>{if(s){x(`[BottomSheet] ${i}.cancel() called asynchronously \u2014 ignored. cancel() must be invoked synchronously inside the listener.`);return}n=!0}}),s=!0,n}var Vt=m(()=>{"use strict";G()});var pe,Gt=m(()=>{"use strict";U();pe=class{constructor(e,i,n,s,r){a(this,"mode",n);a(this,"measureFit",s);a(this,"onMaxAxisSizeChange",r);a(this,"raw");a(this,"allowedIds");a(this,"resolved",[]);a(this,"maxAxisSize",0);a(this,"rangeCache",null);a(this,"notified",!1);this.raw=e,this.allowedIds=i??e.map(o=>o.id),this.recompute()}recompute(){let e=this.measureFit,i,n=e?()=>i??(i=e()):void 0;this.resolved=Bt(this.raw,this.mode,n);let s=this.resolved.reduce((o,l)=>l.size>o?l.size:o,0);this.rangeCache=null;let r=s!==this.maxAxisSize||!this.notified;this.maxAxisSize=s,this.notified=!0,r&&this.onMaxAxisSizeChange?.(this.maxAxisSize)}setRaw(e){this.raw=e,this.recompute()}setMode(e){e!==this.mode&&(this.mode=e,this.recompute())}setAllowedIds(e){this.allowedIds=e,this.rangeCache=null}findById(e){return W(e,this.resolved)}findDragSettleTarget(e){return Kt({...e,resolved:this.resolved,allowed:this.allowedIds,maxAxisSize:this.maxAxisSize})}getAllowedRange(){return this.rangeCache??(this.rangeCache=Nt(this.resolved,this.allowedIds))}getResolvedSnaps(){return this.resolved}getAllowedIds(){return this.allowedIds}getMaxAxisSize(){return this.maxAxisSize}setMaxAxisSize(e){this.maxAxisSize=e,this.onMaxAxisSizeChange?.(e)}}});function Wt(t,e){if(t.length!==0){for(let i of t)if(i!==e)try{if(i.state.size===0)continue;let n=i.getAllowedIds(),s=i.getResolvedSnaps(),r=l=>s.find(c=>c.id===l)?.size??0,o=n.find(l=>r(l)>0);o&&o!==i.state.activeId&&i.snapTo(o)}catch(n){queueMicrotask(()=>{throw n})}}}var Ut=m(()=>{"use strict"});function qt(t){if(typeof window>"u")return()=>{};let e=()=>{let r=t.resolveActiveSnap(),o=t.getMaxAxisSize();return{target:r?Math.min(r.size,o):null,max:o}},i=()=>{if(t.isDestroyed())return;let r=e();t.recomputeSnaps();let o=t.getMode(),c=o==="bottom"||o==="top"?window.innerHeight:window.innerWidth,u=t.getMaxAxisSize();c>0&&c<u&&t.setMaxAxisSize(c);let d=e();if(r.target!==null&&d.target!==null&&Math.abs(d.target-r.target)<.5&&Math.abs(d.max-r.max)<.5)return;let h=t.isAnimating?.()??!1;t.cancelInFlight(),t.newCycle();let p=t.resolveActiveSnap(),b=t.getMaxAxisSize(),g=Math.min(p?p.size:t.getSize(),b);t.setSize(g),p&&!t.isDragging()&&(t.applySize(g),h&&t.resyncAfterCancel?.())},n=null;typeof ResizeObserver<"u"?(n=new ResizeObserver(i),n.observe(document.documentElement)):window.addEventListener("resize",i),window.addEventListener("orientationchange",i);let s=()=>{t.isDestroyed()||document.hidden&&t.cancelInFlight()};return document.addEventListener("visibilitychange",s),()=>{n?.disconnect(),window.removeEventListener("resize",i),window.removeEventListener("orientationchange",i),document.removeEventListener("visibilitychange",s)}}var Yt=m(()=>{"use strict"});function Zt(t){if(typeof ResizeObserver>"u")return()=>{};if(!t.hasFitSnap())return()=>{};let e=0,i=()=>{e||(e=requestAnimationFrame(()=>{e=0,!(t.isDestroyed()||t.isDragging())&&t.recompute()}))},n=new ResizeObserver(i);n.observe(t.handle);let s=t.scrollContainer,r=new Set,o=new Set,l=typeof HTMLSlotElement<"u",c=()=>d(),u=()=>{if(!(!s||!l))for(let p of Array.from(s.children))p instanceof HTMLSlotElement&&!o.has(p)&&(p.addEventListener("slotchange",c),o.add(p))},d=()=>{u();let p=is(s);for(let b of r)p.includes(b)||(n.unobserve(b),r.delete(b));for(let b of p)r.has(b)||(n.observe(b),r.add(b));i()},h;return s&&(d(),typeof MutationObserver<"u"&&(h=new MutationObserver(d),h.observe(s,{childList:!0}))),()=>{n.disconnect(),h?.disconnect();for(let p of o)p.removeEventListener("slotchange",c);e&&cancelAnimationFrame(e)}}var is,Xt=m(()=>{"use strict";is=t=>{if(!t)return[];let e=typeof HTMLSlotElement<"u",i=[];for(let n of Array.from(t.children))if(e&&n instanceof HTMLSlotElement)for(let s of n.assignedElements())i.push(s);else i.push(n);return i}});function jt(t){let e,i,n=()=>{let r=i;if(r===void 0){e=void 0;return}if(typeof r=="number"){e=r;return}if(typeof window>"u")return;let o=he(r,t.mode);e=o>0?o:void 0};return{setRadius(r){t.element.style.setProperty("--bs-radius",typeof r=="number"?`${r}px`:r)},setMaxHeight(r){let o=typeof r=="number"?`${r}px`:r,l=D(t.mode);t.element.style.setProperty(l==="height"?"max-height":"max-width",o),i=r,n(),t.recompute()},resolveCap:n,clampTo:()=>{e!==void 0&&t.getMaxAxisSize()>e&&t.setMaxAxisSize(e)},getCap:()=>e}}var Qt=m(()=>{"use strict";U();ue()});var ns,ss,Jt,ei=m(()=>{"use strict";ue();ns=(t,e,i)=>{let n=i?"height":"width",s=t.style;if(!e){let b=s[n];s[n]="auto";let g=i?t.offsetHeight:t.offsetWidth;return s[n]=b,g}let r=e.style,o=s[n],l=r.flex,c=i?r.height:r.width;s[n]="auto",r.flex="none",i?r.height="auto":r.width="auto";let u=i?t.offsetHeight:t.offsetWidth,d=i?e.clientHeight:e.clientWidth,h=i?e.scrollHeight:e.scrollWidth,p=Math.max(u,u-d+h);return s[n]=o,r.flex=l,i?r.height=c:r.width=c,p},ss=(t,e)=>{let i=t.offsetParent;return i&&i!==document.body&&i!==document.documentElement?e?i.clientHeight:i.clientWidth:e?window.innerHeight:window.innerWidth},Jt=t=>{let e=D(t.mode)==="height",i=ns(t.element,t.scrollContainer,e),n=t.getMaxHeightCap(),s=n!==void 0?Math.min(i,n):i;if(typeof window>"u")return s;let r=ss(t.element,e);return r>0?Math.min(s,r):s}});function ti(t){let e=t.mode==="bottom"||t.mode==="top",i=e?"ArrowUp":"ArrowRight",n=e?"ArrowDown":"ArrowLeft",s=t.mode==="top"?n:i,r=t.mode==="top"?i:n,o=l=>{if(t.isDestroyed())return;let c=t.getAllowedIds(),u=c.indexOf(t.getActiveId());u!==-1&&(l.key===s&&u<c.length-1?(l.preventDefault(),t.snapTo(c[u+1])):l.key===r&&u>0?(l.preventDefault(),t.snapTo(c[u-1])):l.key==="Home"?(l.preventDefault(),t.snapTo(c[0])):l.key==="End"&&(l.preventDefault(),t.snapTo(c[c.length-1])))};return t.handle.addEventListener("keydown",o),()=>t.handle.removeEventListener("keydown",o)}var ii=m(()=>{"use strict"});var Ke,ni=m(()=>{"use strict";Ke=Object.freeze({subtle:{color:"rgba(0,0,0,0.2)",blur:void 0,range:[.3,1],interactive:!1},standard:{color:"rgba(0,0,0,0.4)",blur:void 0,range:[0,1],interactive:!1},monitoring:{color:"rgba(15,15,20,0.55)",blur:"4px",range:[0,1],interactive:!1},cinematic:{color:"rgba(0,0,0,0.7)",blur:"12px",range:[0,1],interactive:!1}})});var z,Ve=m(()=>{"use strict";z=class{constructor(){a(this,"last",-1)}shouldWrite(e,i){return Math.abs(e-this.last)<=i?!1:(this.last=e,!0)}invalidate(){this.last=-1}setLastWritten(e){this.last=e}get value(){return this.last}}});function rs(t,e,i){let n=`calc(var(--bs-size, 0px) + ${i})`;switch(t){case"bottom":return e==="sheet-top-left"?{bottom:n,left:i}:e==="sheet-top-right"?{bottom:n,right:i}:{bottom:n,left:"50%",transform:"translateX(-50%)"};case"top":return e==="sheet-top-left"?{top:n,left:i}:e==="sheet-top-right"?{top:n,right:i}:{top:n,left:"50%",transform:"translateX(-50%)"};case"left":return e==="sheet-top-left"?{left:n,top:i}:e==="sheet-top-right"?{left:n,bottom:i}:{left:n,top:"50%",transform:"translateY(-50%)"};case"right":return e==="sheet-top-left"?{right:n,top:i}:e==="sheet-top-right"?{right:n,bottom:i}:{right:n,top:"50%",transform:"translateY(-50%)"}}}function I(t,e,i,n){switch(i){case"top-left":t.top=n,t.left=n;break;case"top-center":t.top=n,t.left="50%",t.transform="translateX(-50%)";break;case"top-right":t.top=n,t.right=n;break;case"center-left":t.top="50%",t.left=n,t.transform="translateY(-50%)";break;case"center":t.top="50%",t.left="50%",t.transform="translate(-50%, -50%)";break;case"center-right":t.top="50%",t.right=n,t.transform="translateY(-50%)";break;case"bottom-left":t.bottom=n,t.left=n;break;case"bottom-center":t.bottom=n,t.left="50%",t.transform="translateX(-50%)";break;case"bottom-right":t.bottom=n,t.right=n;break;case"sheet-top-left":case"sheet-top-center":case"sheet-top-right":{let s=rs(e,i,n);s.top!==void 0&&(t.top=s.top),s.bottom!==void 0&&(t.bottom=s.bottom),s.left!==void 0&&(t.left=s.left),s.right!==void 0&&(t.right=s.right),s.transform!==void 0&&(t.transform=s.transform);break}}}var me=m(()=>{"use strict"});var as,ls,fe,ri=m(()=>{"use strict";ni();U();Ve();G();me();as=/^-?\d+(?:\.\d+)?(?:px|em|rem|%)$/,ls="rgba(0, 0, 0, 0.4)",fe=class{constructor(e,i){a(this,"screenComponent");a(this,"backdrop");a(this,"mode");a(this,"isDestroyed");a(this,"getAllowedIds");a(this,"getResolvedSnaps");a(this,"snapToFn");a(this,"closeFn");a(this,"scrimInteractive",!1);a(this,"scrimMode");a(this,"backdropRange");a(this,"screenRange");a(this,"scrimEnabled",!0);a(this,"savedScrimRanges",null);a(this,"scrimTapToCloseEnabled",!1);a(this,"detachScrimTap",null);a(this,"scrimOverlayTeardown",null);a(this,"backdropOpacitySentinel",new z);a(this,"screenOpacitySentinel",new z);a(this,"lastBackdropPointer","");a(this,"lastScreenDisplay","");this.screenComponent=e.screenComponent,this.backdrop=e.backdrop,this.mode=e.mode,this.isDestroyed=e.isDestroyed,this.getAllowedIds=e.getAllowedIds,this.getResolvedSnaps=e.getResolvedSnaps,this.snapToFn=e.snapTo,this.closeFn=e.close,this.scrimMode=i.scrimMode??"full";let n=i.scrimPreset?Ke[i.scrimPreset]:null;this.backdropRange=i.backdropRange??n?.range??[0,1],this.screenRange=i.screenRange??n?.range??[0,1],this.scrimTapToCloseEnabled=i.scrimTapToClose??!1;let r=i.scrimColor??n?.color??(this.scrimMode!=="off"&&!this.backdrop?ls:void 0);if(this.screenComponent){if(this.applyScrimStyles({color:r,blur:i.scrimBlur??n?.blur,interactive:i.scrimInteractive??n?.interactive??!1}),this.scrimMode==="above-sheet")this.applyAboveSheetInset();else if(this.scrimMode==="off"){let o=this.screenComponent.style;o.opacity="0",o.display="none",this.screenOpacitySentinel.setLastWritten(0),this.lastScreenDisplay="none"}}}invalidateOpacityCache(){this.backdropOpacitySentinel.invalidate(),this.screenOpacitySentinel.invalidate()}attach(){this.scrimTapToCloseEnabled&&this.setScrimTapToClose(!0)}applyOpacity(e,i){if(!(!i&&this.backdropOpacitySentinel.value!==-1&&this.screenOpacitySentinel.value!==-1)){if(this.backdrop){let[n,s]=this.backdropRange,r=Math.max(s-n,1e-4),o=Math.min(Math.max((e-n)/r,0),1);this.backdropOpacitySentinel.shouldWrite(o,.005)&&(this.backdrop.style.opacity=String(o));let l=o>.05?"auto":"none";l!==this.lastBackdropPointer&&(this.backdrop.style.pointerEvents=l,this.lastBackdropPointer=l)}if(this.screenComponent&&this.scrimMode!=="off"){let[n,s]=this.screenRange,r=Math.min(1,Math.max(0,(e-n)/Math.max(1e-4,s-n)));this.screenOpacitySentinel.shouldWrite(r,.005)&&(this.screenComponent.style.opacity=String(r));let o=r>0?"":"none";o!==this.lastScreenDisplay&&(this.screenComponent.style.display=o,this.lastScreenDisplay=o)}}}setBackdropRange(e,i){this.isDestroyed()||(this.backdropRange=e,this.invalidateOpacityCache(),i())}setScreenRange(e,i){this.isDestroyed()||(this.screenRange=e,this.invalidateOpacityCache(),i())}setScrimColor(e){this.isDestroyed()||this.applyScrimStyles({color:e===void 0?null:e})}setScrimBlur(e){this.isDestroyed()||this.applyScrimStyles({blur:e===void 0?null:e})}setScrimInteractive(e){this.isDestroyed()||this.applyScrimStyles({interactive:e})}setSheetMode(e){this.isDestroyed()||e===this.mode||(this.mode=e,this.invalidateOpacityCache())}setScrimMode(e,i){if(this.isDestroyed()||e===this.scrimMode)return;this.invalidateOpacityCache();let n=this.scrimMode;if(this.scrimMode=e,this.screenComponent){let s=this.screenComponent.style;n==="above-sheet"&&e!=="above-sheet"&&(s.position="",s.inset="",s.pointerEvents=""),e==="above-sheet"?this.applyAboveSheetInset():e==="off"?(s.opacity="0",s.display="none",this.screenOpacitySentinel.setLastWritten(0),this.lastScreenDisplay="none"):this.lastScreenDisplay==="none"&&(s.display="",this.lastScreenDisplay="")}i()}setScrimTapToClose(e){if(this.isDestroyed()||!this.screenComponent)return;let i=this.detachScrimTap!==null;if(e!==i)if(e){let n=this.screenComponent;n.style.pointerEvents==="none"&&(n.style.pointerEvents="auto");let s=()=>{if(this.isDestroyed())return;if(this.closeFn){this.closeFn();return}let r=this.getAllowedIds(),o=this.getResolvedSnaps(),l=r.find(c=>{let u=W(c,o);return u!==null&&u.size===0});l&&this.snapToFn(l)};n.addEventListener("click",s),this.detachScrimTap=()=>n.removeEventListener("click",s),this.scrimTapToCloseEnabled=!0}else this.detachScrimTap?.(),this.detachScrimTap=null,this.scrimTapToCloseEnabled=!1}setScrimEnabled(e,i){this.isDestroyed()||e!==this.scrimEnabled&&(this.scrimEnabled=e,this.invalidateOpacityCache(),e?(this.screenRange=this.savedScrimRanges?.screen??[0,1],this.backdropRange=this.savedScrimRanges?.backdrop??[0,1],this.savedScrimRanges=null):(this.savedScrimRanges={screen:this.screenRange,backdrop:this.backdropRange},this.screenRange=[1,1],this.backdropRange=[1,1]),i())}setScrim(e,i){if(this.isDestroyed())return;if(e.preset){let s=Ke[e.preset];this.applyScrimStyles({color:s.color,blur:s.blur??null,interactive:s.interactive}),!this.scrimEnabled&&this.savedScrimRanges?this.savedScrimRanges={screen:s.range,backdrop:s.range}:(this.screenRange=s.range,this.backdropRange=s.range)}let n=()=>{};e.mode!==void 0&&this.setScrimMode(e.mode,n),e.enabled!==void 0&&this.setScrimEnabled(e.enabled,n),e.tapToClose!==void 0&&this.setScrimTapToClose(e.tapToClose),this.applyScrimStyles({color:e.color,blur:e.blur,interactive:e.interactive}),e.range!==void 0&&(!this.scrimEnabled&&this.savedScrimRanges?this.savedScrimRanges={screen:e.range,backdrop:this.savedScrimRanges.backdrop}:this.screenRange=e.range),this.invalidateOpacityCache(),i()}setScrimOverlay(e){if(this.isDestroyed())return()=>{};if(!this.screenComponent)return()=>{};this.scrimOverlayTeardown?.();let i=this.screenComponent,n=e.inset??"16px",s=as.test(n)?n:"16px";s!==n&&x(`[bottom-sheet] setScrimOverlay: invalid inset ${JSON.stringify(n)}; expected a CSS length like "16px" / "1rem" / "5%". Falling back to "16px".`),e.children.ownerDocument&&e.children.ownerDocument!==i.ownerDocument&&x("[bottom-sheet] setScrimOverlay: children belong to a different document than the scrim. Cross-document adoption can drop event listeners; construct children via the same document as the sheet root.");let r=e.position??"top-right",o=e.interactive??!0,l=i.ownerDocument.createElement("div");l.className="bs-scrim-overlay";let c=l.style;c.position="absolute",I(c,this.mode,r,s),o&&(c.pointerEvents="auto"),l.appendChild(e.children);let u=i.parentElement;if(!u)return x("[bottom-sheet] setScrimOverlay: scrim element has no parent, skipping overlay injection. Mount the sheet root before calling setScrimOverlay."),()=>{};u.appendChild(l);let d=()=>{l.parentNode&&l.parentNode.removeChild(l),this.scrimOverlayTeardown===d&&(this.scrimOverlayTeardown=null)};return this.scrimOverlayTeardown=d,d}destroy(){if(this.detachScrimTap?.(),this.detachScrimTap=null,this.scrimOverlayTeardown?.(),this.scrimOverlayTeardown=null,this.screenComponent){let e=this.screenComponent.style;e.opacity="",e.display="",e.position="",e.inset="",e.pointerEvents=""}this.backdrop&&(this.backdrop.style.opacity="",this.backdrop.style.pointerEvents=""),this.invalidateOpacityCache(),this.lastBackdropPointer="",this.lastScreenDisplay=""}applyScrimStyles(e){if(!this.screenComponent)return;let i=this.screenComponent.style;if(e.color!==void 0&&(i.background=e.color===null?"":e.color),e.blur!==void 0){let n=i;if(e.blur===null)i.backdropFilter="",n.webkitBackdropFilter="";else{let s=`blur(${e.blur})`;i.backdropFilter=s,n.webkitBackdropFilter=s}}e.interactive!==void 0&&(this.scrimInteractive=e.interactive,i.pointerEvents=e.interactive?"auto":"none")}applyAboveSheetInset(){if(!this.screenComponent)return;let e={bottom:"0 0 var(--bs-size) 0",top:"var(--bs-size) 0 0 0",left:"0 0 0 var(--bs-size)",right:"0 var(--bs-size) 0 0"},i=this.screenComponent.style;i.position="fixed",i.inset=e[this.mode],i.pointerEvents=this.scrimInteractive||this.scrimTapToCloseEnabled?"auto":"none"}}});var oi,ds,ai,li,di,ci,ge=m(()=>{"use strict";oi=t=>1+2.40158*Math.pow(t-1,3)+1.40158*Math.pow(t-1,2),ds=t=>1-Math.pow(1-t,3),ai=t=>t,li=t=>1-Math.pow(1-t,5),di=({from:t,to:e,duration:i,easing:n=ds,onUpdate:s})=>{let r=!1,o=0,l=null,c=performance.now(),u=new Promise(d=>{if(l=d,i<=0){s(e),d();return}let h=p=>{if(r)return;let b=p-c,g=Math.min(b/i,1),f=t+(e-t)*n(g);s(f),g<1?o=requestAnimationFrame(h):d()};o=requestAnimationFrame(h)});return{cancel:()=>{r=!0,cancelAnimationFrame(o),l?.()},promise:u}},ci=()=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches});var Ge,cs,ui,We=m(()=>{"use strict";Ge={stiffness:220,damping:26,mass:1,restDelta:.5,restSpeed:.5},cs=1/30,ui=({from:t,to:e,velocity:i=0,config:n,onUpdate:s})=>{let r={...Ge,...n},o=!1,l=0,c=null,u=t,d=i,h=performance.now(),p=new Promise(b=>{c=b;let g=f=>{if(o)return;let y=Math.min((f-h)/1e3,cs);h=f;let M=Math.max(1,Math.ceil(y*240)),S=y/M,E=M;for(;E-- >0;){let de=(-r.stiffness*(u-e)-r.damping*d)/r.mass;d+=de*S,u+=d*S}if(!Number.isFinite(u)||!Number.isFinite(d)){s(e,0),b();return}s(u,d),Math.abs(e-u)<(r.restDelta??.5)&&Math.abs(d)<(r.restSpeed??.5)?(s(e,0),b()):l=requestAnimationFrame(g)};l=requestAnimationFrame(g)});return{cancel:()=>{o=!0,cancelAnimationFrame(l),c?.()},promise:p}}});function hi(t){switch(t){case"ios-spring":return{kind:"spring",spring:{stiffness:300,damping:30,mass:1}};case"material-bounce":return{kind:"spring",spring:{stiffness:200,damping:22,mass:1}};case"linear":return{kind:"tween",duration:us,easing:ai};case"snappy":return{kind:"tween",duration:180,easing:li};case"tween":return{kind:"tween"};default:return{kind:"spring"}}}var us,pi=m(()=>{"use strict";ge();us=220});function fi(t,e,i,n){let s={...Ge,...n},r=1/Ue,o=mi/Ue*1e3,l=Math.ceil(hs/1e3*Ue),c=[t],u=t,d=i;for(let h=1;h<=l;h+=1){let p=-s.stiffness*(u-e)-s.damping*d;if(d+=p/s.mass*r,u+=d*r,!Number.isFinite(u)||!Number.isFinite(d)){c.push(e);break}if(h%mi===0&&c.push(u),Math.abs(e-u)<(s.restDelta??.5)&&Math.abs(d)<(s.restSpeed??.5))break}return c[c.length-1]!==e&&c.push(e),{values:c,stepMs:o,durationMs:(c.length-1)*o}}function gi(t,e,i,n){let s=Math.max(2,Math.min(60,Math.round(i/16))),r=[];for(let o=0;o<=s;o+=1){let l=o/s;r.push(t+(e-t)*n(l))}return r[r.length-1]=e,{values:r,stepMs:i/s,durationMs:i}}var Ue,mi,hs,bi=m(()=>{"use strict";We();Ue=240,mi=4,hs=3e3});var ps,vi,be,yi=m(()=>{"use strict";ge();We();pi();bi();ps=220,vi=1e3,be=class{constructor(e,i){a(this,"element");a(this,"getRootEl");a(this,"applySizeFn");a(this,"getSize");a(this,"isDragging");a(this,"applyAux");a(this,"getTransformFor");a(this,"settleWaapi");a(this,"currentWaapi",null);a(this,"animationKind");a(this,"springConfig");a(this,"duration");a(this,"easing");a(this,"respectReducedMotion");a(this,"reducedMotion",!1);a(this,"detachReducedMotion",null);a(this,"viewTransitionsAvailable");a(this,"currentTween",null);a(this,"currentSpring",null);this.element=e.element,this.getRootEl=e.getRootEl,this.applySizeFn=e.applySize,this.getSize=e.getSize,this.isDragging=e.isDragging,this.applyAux=e.applyAux,this.getTransformFor=e.getTransformFor,this.settleWaapi=i.settleAnimation==="waapi";let n=hi(i.animation);this.animationKind=n.kind,this.duration=i.duration??n.duration??ps,this.easing=i.easing??n.easing??oi,this.springConfig={...n.spring??{},...i.spring??{}},this.respectReducedMotion=i.respectReducedMotion??!0;let s=i.viewTransitions??!1;if(this.viewTransitionsAvailable=s&&typeof document<"u"&&typeof document.startViewTransition=="function",this.respectReducedMotion&&typeof window<"u"&&typeof window.matchMedia=="function"){let r=window.matchMedia("(prefers-reduced-motion: reduce)");this.reducedMotion=r.matches;let o=l=>{this.reducedMotion=l.matches};typeof r.addEventListener=="function"?(r.addEventListener("change",o),this.detachReducedMotion=()=>r.removeEventListener("change",o)):typeof r.addListener=="function"&&(r.addListener(o),this.detachReducedMotion=()=>r.removeListener(o))}}get isAnimating(){return this.currentTween!==null||this.currentSpring!==null||this.currentWaapi!==null}cancelWaapi(){if(!this.currentWaapi)return;let e=this.currentWaapi;this.currentWaapi=null,e.stop();try{e.anim.cancel()}catch{}}cancel(){this.currentTween?.cancel(),this.currentSpring?.cancel(),this.cancelWaapi()}async animateTo(e,i){if(e===this.getSize()){!this.isAnimating&&!this.isDragging()&&(this.element.style.willChange="");return}if(this.currentTween?.cancel(),this.currentSpring?.cancel(),this.cancelWaapi(),this.getRootEl()?.setAttribute("data-animating","true"),this.element.style.willChange="transform",this.reducedMotion){this.applySizeFn(e),this.getRootEl()?.removeAttribute("data-animating"),this.isDragging()||(this.element.style.willChange="");return}if(this.settleWaapi&&this.applyAux&&this.getTransformFor&&typeof this.element.animate=="function"){let n=this.animationKind==="spring"?fi(this.getSize(),e,i*vi,this.springConfig):gi(this.getSize(),e,this.duration,this.easing);if(n.values.length>=2&&n.durationMs>0){await this.runWaapiSettle(n,e),this.isAnimating||(this.getRootEl()?.removeAttribute("data-animating"),this.isDragging()||(this.element.style.willChange=""));return}}if(this.animationKind==="spring"){let n=ui({from:this.getSize(),to:e,velocity:i*vi,config:this.springConfig,onUpdate:s=>this.applySizeFn(s)});this.currentSpring=n,await n.promise,this.currentSpring===n&&(this.currentSpring=null)}else{let n=di({from:this.getSize(),to:e,duration:this.duration,easing:this.easing,onUpdate:s=>this.applySizeFn(s)});this.currentTween=n,await n.promise,this.currentTween===n&&(this.currentTween=null)}this.isAnimating||(this.getRootEl()?.removeAttribute("data-animating"),this.isDragging()||(this.element.style.willChange=""))}async runWaapiSettle(e,i){let n=this.applyAux,s=this.getTransformFor,r=e.values.map(b=>({transform:s(b)})),o=this.element.animate(r,{duration:e.durationMs,easing:"linear",fill:"forwards"}),l=!1,c=0,u=e.values.length-1,d=()=>{if(l)return;let b=Math.min((Number(o.currentTime)||0)/e.stepMs,u),g=Math.floor(b),f=e.values[g],y=e.values[Math.min(g+1,u)];n(f+(y-f)*(b-g)),c=requestAnimationFrame(d)};c=requestAnimationFrame(d);let h={anim:o,stop:()=>{l=!0,cancelAnimationFrame(c)}};this.currentWaapi=h;try{await o.finished}catch{}h.stop();let p=this.currentWaapi===h;if(p&&(this.currentWaapi=null),p&&o.playState==="finished"){this.applySizeFn(i);try{o.cancel()}catch{}}}destroy(){if(this.detachReducedMotion?.(),this.detachReducedMotion=null,this.currentTween=null,this.currentSpring=null,this.currentWaapi){let e=this.currentWaapi;this.currentWaapi=null,e.stop();try{e.anim.cancel()}catch{}}}}});var Si,ms,xi,$e,fs,$,Ai,Ti=m(()=>{"use strict";Si=["a[href]","area[href]","button:not([disabled])","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","iframe","object","embed","[contenteditable='true']","[tabindex]:not([tabindex='-1'])"].join(","),ms=t=>typeof t.checkVisibility=="function"?t.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0}):t.offsetParent!==null,xi=t=>{let e=Array.from(t.querySelectorAll(Si));if(typeof HTMLSlotElement<"u")for(let i of Array.from(t.querySelectorAll("slot")))for(let n of i.assignedElements())n.matches(Si)&&e.push(n),e.push(...xi(n));return e},$e=t=>xi(t).filter(e=>!e.hasAttribute("inert")&&ms(e)&&!e.matches("[aria-hidden='true']")),fs=(t,e)=>{let i=e;for(;i;){if(i===t)return!0;let n=i.assignedSlot;if(n){i=n;continue}let s=i.parentNode;i=s instanceof ShadowRoot?s.host:s}return!1},$=[],Ai=(t,e={})=>{if(typeof document>"u")return()=>{};let i={};$.push(i);let n=()=>$[$.length-1]===i,s=document.activeElement;(()=>{let u=e.initialFocus;if(u===!1){t.hasAttribute("tabindex")||(t.tabIndex=-1),t.focus({preventScroll:!0});return}(typeof u=="string"?t.querySelector(u):u??$e(t)[0]??t)?.focus({preventScroll:!0})})();let o=u=>{if(!n())return;if(u.key==="Escape"&&e.onEscape){e.onEscape();return}if(u.key!=="Tab")return;let d=$e(t);if(d.length===0){u.preventDefault();return}let h=d[0],p=d[d.length-1],b=document.activeElement;u.shiftKey&&b===h?(u.preventDefault(),p.focus()):!u.shiftKey&&b===p&&(u.preventDefault(),h.focus())},l=u=>{if(!n())return;let d=u.target;d&&!fs(t,d)&&$e(t)[0]?.focus({preventScroll:!0})};document.addEventListener("keydown",o,!0),document.addEventListener("focusin",l,!0);let c=!1;return()=>{if(c)return;c=!0;let u=$.indexOf(i);u!==-1&&$.splice(u,1),document.removeEventListener("keydown",o,!0),document.removeEventListener("focusin",l,!0),s&&document.contains(s)?s.focus({preventScroll:!0}):document.querySelector("[data-bs-restore-fallback]")?.focus({preventScroll:!0})}}});var q,w,Ei,wi=m(()=>{"use strict";q=0,w=null,Ei=()=>{if(typeof document>"u")return()=>{};if(q===0){let e=document.body;w={overflow:e.style.overflow,position:e.style.position,top:e.style.top,width:e.style.width,paddingRight:e.style.paddingRight,scrollY:window.scrollY};let i=window.innerWidth-document.documentElement.clientWidth;if(i>0){let n=parseFloat(getComputedStyle(e).paddingRight)||0;e.style.paddingRight=`${n+i}px`}e.style.overflow="hidden",e.style.position="fixed",e.style.top=`-${w.scrollY}px`,e.style.width="100%"}q++;let t=!1;return()=>{if(!t&&(t=!0,q=Math.max(0,q-1),q===0&&w)){let e=document.body;e.style.overflow=w.overflow,e.style.position=w.position,e.style.top=w.top,e.style.width=w.width,e.style.paddingRight=w.paddingRight,window.scrollTo(0,w.scrollY),w=null}}}});function Ci(t){let e=[];return{apply(){if(typeof document>"u")return;let i=t();for(;i.parentElement&&i.parentElement!==document.body;)i=i.parentElement;let n=i.parentElement??document.body;for(let s of Array.from(n.children))s!==i&&(s.hasAttribute("inert")||s.classList.contains("bs-backdrop")||s.classList.contains("bs-screen")||s.classList.contains("bs-root")||(s.setAttribute("inert",""),e.push(s)))},remove(){for(let i of e)i.removeAttribute("inert");e.length=0}}}var Mi=m(()=>{"use strict"});var ve,zi=m(()=>{"use strict";Ti();wi();Mi();ve=class{constructor(e,i){a(this,"element");a(this,"focusTrapEnabled");a(this,"initialFocus");a(this,"closeOnEscape");a(this,"bodyScrollLockEnabled");a(this,"inertSiblingsEnabled");a(this,"inertSiblings");a(this,"shouldApplyInertSiblings");a(this,"returnFocus");a(this,"releaseFocusTrap",null);a(this,"releaseScrollLock",null);a(this,"installed",!1);a(this,"destroyed",!1);this.element=e.element,this.focusTrapEnabled=i.focusTrap??!1,this.initialFocus=i.initialFocus,this.closeOnEscape=i.closeOnEscape??!0,this.bodyScrollLockEnabled=i.lockBodyScroll??!0,this.inertSiblingsEnabled=i.inertSiblings??!1,this.shouldApplyInertSiblings=i.shouldApplyInertSiblings??(()=>!0),this.returnFocus=i.returnFocus,this.inertSiblings=Ci(()=>this.element)}get isInstalled(){return this.installed}install(){this.destroyed||(this.installed=!0,this.bodyScrollLockEnabled&&!this.releaseScrollLock&&(this.releaseScrollLock=Ei()),this.focusTrapEnabled&&!this.releaseFocusTrap&&(this.releaseFocusTrap=Ai(this.element,{initialFocus:this.initialFocus})),this.inertSiblingsEnabled&&this.shouldApplyInertSiblings()&&this.inertSiblings.apply())}setReturnFocus(e){this.destroyed||(this.returnFocus=e)}release(){this.installed&&(this.installed=!1,this.releaseFocusTrap?.(),this.releaseFocusTrap=null,this.releaseScrollLock?.(),this.releaseScrollLock=null,this.inertSiblings.remove(),this.returnFocus&&(typeof this.returnFocus=="function"?this.returnFocus():typeof this.returnFocus=="string"?typeof document<"u"?document.querySelector(this.returnFocus):null:this.returnFocus)?.focus?.())}destroy(){this.release(),this.destroyed=!0}}});var Ri,qe,Di,ki=m(()=>{"use strict";Ri=t=>t==="bottom"||t==="top",qe=class{constructor(e){a(this,"slots");a(this,"capacity");a(this,"head",0);a(this,"size",0);this.capacity=e,this.slots=new Array(e);for(let i=0;i<e;i++)this.slots[i]={t:0,v:0}}push(e,i){let n=this.slots[this.head];n.t=e,n.v=i,this.head=(this.head+1)%this.capacity,this.size<this.capacity&&this.size++}pruneBefore(e,i){for(;this.size>i;){let n=(this.head-this.size+this.capacity)%this.capacity;if(this.slots[n].t<e)this.size--;else break}}get length(){return this.size}oldest(){if(this.size!==0)return this.slots[(this.head-this.size+this.capacity)%this.capacity]}newest(){if(this.size!==0)return this.slots[(this.head-1+this.capacity)%this.capacity]}reset(){this.head=0,this.size=0}},Di=(t,e,i,n={})=>{let s=null,r="touch",o=0,l=0,c=0,u=!1,d=v=>v==="mouse"?160:120,h=32,p=new qe(h),b=Ri(e)?"Y":"X",g=e==="bottom"||e==="right"?-1:1,f=v=>b==="Y"?v.clientY:v.clientX,y=v=>b==="Y"?v.clientX:v.clientY,M=v=>{try{t.setPointerCapture(v)}catch{}},S=()=>{s=null,u=!1,p.reset()},E=v=>{if(s===null&&!(v.button!==void 0&&v.button!==0)&&!(n.shouldStart&&!n.shouldStart(v))){if(s=v.pointerId,r=v.pointerType||"touch",o=f(v),l=y(v),c=o,p.reset(),p.push(v.timeStamp,o),n.deferStart){u=!0;return}M(v.pointerId),i.onStart(o,r)}},Oe=v=>{if(v.pointerId!==s)return;let C=f(v),K=(C-o)*g;if(u){let V=n.deferStart(v,K,y(v)-l);if(V===!1){S();return}if(V!==!0)return;u=!1,o=C,c=C,p.reset(),p.push(v.timeStamp,C),M(v.pointerId),i.onStart(o,r);return}c=C,p.push(v.timeStamp,C);let Pe=v.timeStamp-d(r);p.pruneBefore(Pe,2),i.onMove(K)},Ie=v=>{if(v.pointerId!==s)return;if(u){S();return}let Mt=(c-o)*g,K=0;if(p.length>=3){let V=p.oldest(),zt=p.newest(),Rt=zt.t-V.t;Rt>0&&(K=(zt.v-V.v)/Rt*g)}let Pe=r;s=null,p.reset();try{t.hasPointerCapture(v.pointerId)&&t.releasePointerCapture(v.pointerId)}catch{}i.onEnd(Mt,K,Pe)},de=v=>{if(v.pointerId!==s)return;let C=u;S(),!C&&i.onCancel?.()};t.addEventListener("pointerdown",E),t.addEventListener("pointermove",Oe),t.addEventListener("pointerup",Ie),t.addEventListener("pointercancel",de);let Ct=n.manageTouchAction!==!1,Vn=t.style.touchAction;return Ct&&(t.style.touchAction=Ri(e)?"pan-x":"pan-y"),()=>{t.removeEventListener("pointerdown",E),t.removeEventListener("pointermove",Oe),t.removeEventListener("pointerup",Ie),t.removeEventListener("pointercancel",de),Ct&&(t.style.touchAction=Vn),s!==null&&t.hasPointerCapture(s)&&t.releasePointerCapture(s)}}});function Ye(t,e){let i=Math.min(e*.15,80);if(i<=0)return 0;let n=Math.abs(t);return Math.sign(t)*(i*n/(n+i))}var Oi=m(()=>{"use strict"});function Ii(t){if(typeof document>"u")return!1;let e=document.activeElement;if(!e||!t.contains(e))return!1;let i=e.tagName;if(!(i==="INPUT"||i==="TEXTAREA"||e.isContentEditable===!0))return!1;try{return e.blur(),!0}catch{return!1}}var Pi=m(()=>{"use strict"});var Y,Li=m(()=>{"use strict";ki();Oi();Pi();Y=class{constructor(e){a(this,"deps");a(this,"detach",null);a(this,"isDragging_",!1);a(this,"dragStartSize",0);a(this,"currentPointerKind","touch");a(this,"keyboardDismissed",!1);a(this,"dragSuppressed",!1);a(this,"dragPayload",{size:0,delta:0});this.deps=e}get isDragging(){return this.isDragging_}install(){return this.detach?this.detach:(this.detach=Di(this.deps.handle,this.deps.mode,{onStart:(e,i)=>{if(this.deps.getDisableDrag?.()){this.dragSuppressed=!0;return}this.dragSuppressed=!1,this.deps.cancelAnimation(),this.isDragging_=!0,this.dragStartSize=this.deps.getDragContext().size,this.currentPointerKind=i,this.keyboardDismissed=!1,this.deps.getRoot()?.setAttribute("data-dragging","true"),this.deps.element.style.willChange="transform",this.deps.emit("dragstart",{size:this.dragStartSize})},onMove:e=>{if(this.dragSuppressed)return;let i=this.deps.getDragContext(),{min:n,max:s}=i.range,r=i.maxAxisSize,o=i.rubberBandEnabled,l=this.dragStartSize+e;l>s?l=o?s+Ye(l-s,r):s:l<n&&(l=o?n-Ye(n-l,r):n),this.deps.applySize(l),!this.keyboardDismissed&&this.currentPointerKind==="touch"&&this.deps.mode==="bottom"&&l<this.dragStartSize&&Ii(this.deps.element)&&(this.keyboardDismissed=!0),this.deps.listenerCount("drag")>0&&(this.dragPayload.size=l,this.dragPayload.delta=e,this.deps.emit("drag",this.dragPayload))},onEnd:(e,i,n)=>{if(this.dragSuppressed){this.dragSuppressed=!1;return}this.isDragging_=!1,this.keyboardDismissed=!1,this.deps.getRoot()?.removeAttribute("data-dragging"),this.deps.emit("dragend",{size:this.deps.getDragContext().size,velocity:i}),this.deps.settleAfterDrag(e,i,n)},onCancel:()=>{if(this.dragSuppressed){this.dragSuppressed=!1;return}this.isDragging_=!1,this.keyboardDismissed=!1,this.deps.getRoot()?.removeAttribute("data-dragging"),this.deps.emit("dragend",{size:this.deps.getDragContext().size,velocity:0});let e=this.dragStartSize;this.deps.animateTo(e,0)}},this.deps.gestureOptions),this.detach)}forceClearDragState(){this.isDragging_&&(this.isDragging_=!1,this.keyboardDismissed=!1,this.deps.getRoot()?.removeAttribute("data-dragging"),this.deps.element.style.willChange="")}}});function je(t,e){let i=gs(t);return i?i.closest(Xe)?!1:e==="zones"?i.closest(Ze)!==null:!0:e!=="zones"}var Ze,Xe,gs,Fi=m(()=>{"use strict";Ze="[data-bs-drag]",Xe="[data-bs-no-drag]",gs=t=>{let e=t;return e&&typeof e.closest=="function"?e:null}});function Hi(t){let e=t.slop??6,i=t.crossDelta??0;return t.sharesScrollAxis??!0?Math.abs(t.delta)<e?"pending":t.scrollTop>0||t.delta>0&&t.atMaxSnap?"scroll":"drag":Math.abs(t.delta)<e&&Math.abs(i)<e?"pending":Math.abs(t.delta)<=Math.abs(i)?"scroll":"drag"}var _i=m(()=>{"use strict"});var bs,vs,ye,Qe=m(()=>{"use strict";bs=t=>t==="start"||t==="end",vs=t=>{if(!t)return"ltr";if(typeof getComputedStyle=="function")try{if(getComputedStyle(t).direction==="rtl")return"rtl"}catch{}try{let e=t.closest?.("[dir]");if(e)return e.getAttribute("dir")?.toLowerCase()==="rtl"?"rtl":"ltr"}catch{}return"ltr"},ye=(t,e)=>{if(!bs(t))return t;let i=vs(e)==="rtl";return t==="start"?i?"right":"left":i?"left":"right"}});function Je(t,e){let i=n=>{e()&&n.cancelable&&n.preventDefault()};return t.addEventListener("touchmove",i,{passive:!1}),()=>t.removeEventListener("touchmove",i)}var Bi=m(()=>{"use strict"});var Z,Ni=m(()=>{"use strict";Z=class{constructor(e,i){a(this,"handle",e);e.setAttribute("aria-orientation",i==="bottom"||i==="top"?"vertical":"horizontal")}setValue(e,i){if(e.length===0){this.handle.removeAttribute("aria-valuemin"),this.handle.removeAttribute("aria-valuemax"),this.handle.removeAttribute("aria-valuenow"),this.handle.removeAttribute("aria-valuetext");return}let n=Math.max(e.length-1,0),s=Math.max(e.indexOf(i),0);this.handle.setAttribute("aria-valuemin","0"),this.handle.setAttribute("aria-valuemax",String(n)),this.handle.setAttribute("aria-valuenow",String(s)),this.handle.setAttribute("aria-valuetext",i)}}});function Ki(t){let e=new Map,i=n=>{let s=t.getMaxAxisSize();return s<=0?!1:n<s/2};return{cache(n,s,r){let o=t.scrollContainer;o&&(i(s)||i(r)&&e.set(n,o.scrollTop))},restore(n,s,r){let o=t.scrollContainer;if(!o||i(r)||!i(s))return;let l=e.get(n);l!==void 0&&(o.scrollTop=l,e.delete(n))},clear(){e.clear()}}}var Vi=m(()=>{"use strict"});function ys(t,e){let i={frames:null,duration:0,easing:Se};if(t==="none")return i;if(t===void 0||typeof t=="string")return{frames:Gi[t??"fade"][e],duration:et,easing:Se};let n=e==="enter"?t.enter:t.exit;return n?{frames:n,duration:t.duration??et,easing:t.easing??Se}:t.preset==="none"?i:{frames:Gi[t.preset??"fade"][e],duration:t.duration??et,easing:t.easing??Se}}function P(t,e,i){if((typeof e=="object"?e.respectReducedMotion!==!1:!0)&&ci())return tt;let{frames:s,duration:r,easing:o}=ys(e,i);if(!s||r<=0||typeof t.animate!="function")return tt;let l=t.animate(s,{duration:r,easing:o,fill:"both"});return{finished:l.finished.then(()=>{}).catch(()=>{}),cancel:()=>{try{l.cancel()}catch{return}}}}var et,Se,Gi,tt,it=m(()=>{"use strict";ge();et=200,Se="cubic-bezier(0.22, 1, 0.36, 1)",Gi={fade:{enter:[{opacity:0},{opacity:1}],exit:[{opacity:1},{opacity:0}]},scale:{enter:[{opacity:0,transform:"scale(0.85)"},{opacity:1,transform:"scale(1)"}],exit:[{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.85)"}]},slide:{enter:[{opacity:0,transform:"translateY(10px)"},{opacity:1,transform:"translateY(0)"}],exit:[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(10px)"}]},pop:{enter:[{opacity:0,transform:"scale(0.6)",offset:0},{opacity:1,transform:"scale(1.06)",offset:.7},{opacity:1,transform:"scale(1)",offset:1}],exit:[{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.6)"}]}},tt={finished:Promise.resolve(),cancel:()=>{}}});function Wi(t,e){let n=t.host.ownerDocument.createElement("div");n.className="bs-anchor";let s=e.interactive??!0,r=e.position??"sheet-top-right",o=r==="dock-bottom"||r==="dock-top",l=n.style;if(l.position="fixed",o?(l.left="0",l.right="0",r==="dock-bottom"?l.bottom="0":l.top="0"):I(l,t.mode,r,e.inset??"16px"),e.fadeRange){let[g,f]=e.fadeRange,y=Math.max(f-g,1e-4);l.opacity=`clamp(0, calc((var(--bs-progress, 0) - ${g}) / ${y}), 1)`}n.appendChild(e.element),t.host.appendChild(n);let c=null,u=null,d=g=>typeof e.showOn=="function"?e.showOn(g):Array.isArray(e.showOn)?e.showOn.includes(g.activeId):o||g.size>0,h=(g,f)=>{if(g===c)return;if(c=g,u?.cancel(),u=null,n.style.pointerEvents=g&&s?"auto":"none",g){n.style.visibility="",f&&(u=P(e.element,e.animation,"enter"));return}if(!f){n.style.visibility="hidden";return}let y=P(e.element,e.animation,"exit");u=y,y.finished.then(()=>{u===y&&c===!1&&(n.style.visibility="hidden")})},p=g=>{t.isDestroyed()||h(d(t.getState()),g)},b=[t.on("snap",()=>p(!0)),t.on("open",()=>p(!0)),t.on("close",()=>p(!0))];return p(!1),{wrapper:n,detach:()=>{b.forEach(g=>g()),u?.cancel(),u=null,n.parentNode&&n.parentNode.removeChild(n)},syncZ:g=>{n.style.zIndex=String(g)}}}var Ui=m(()=>{"use strict";me();it()});function qi(t,e){let i=t.host.ownerDocument,n=e.stages.map(d=>{let h=i.createElement("div");h.className="bs-scrim-stage";let p=h.style;return p.position="absolute",I(p,t.mode,d.position??e.position??"center",d.inset??e.inset??"16px"),p.visibility="hidden",p.pointerEvents="none",h.appendChild(d.element),t.host.appendChild(h),{def:d,wrapper:h,inFlight:null}}),s=null,r=()=>{let d=t.getState();return d.size===0?n.find(h=>$i(h.def,d.activeId))??null:n.find(h=>$i(h.def,d.activeId))??n.find(h=>Ss(h.def,d.progress))??null},o=(d,h)=>{if(d.inFlight?.cancel(),d.wrapper.style.pointerEvents="none",!h){d.inFlight=null,d.wrapper.style.visibility="hidden";return}let p=P(d.def.element,d.def.animation??e.animation,"exit");d.inFlight=p,p.finished.then(()=>{d.inFlight===p&&s!==d&&(d.wrapper.style.visibility="hidden")})},l=(d,h)=>{d.inFlight?.cancel(),d.inFlight=null,d.wrapper.style.visibility="",d.wrapper.style.pointerEvents=d.def.interactive??e.interactive??!1?"auto":"none",h&&(d.inFlight=P(d.def.element,d.def.animation??e.animation,"enter"))},c=d=>{if(t.isDestroyed())return;let h=r();if(h===s)return;let p=s;s=h,p&&o(p,d),h&&l(h,d)},u=[t.on("snap",()=>c(!0)),t.on("open",()=>c(!0)),t.on("close",()=>c(!0))];return n.some(d=>d.def.forRange)&&u.push(t.on("progress",()=>c(!0))),c(!1),()=>{u.forEach(d=>d());for(let d of n)d.inFlight?.cancel(),d.inFlight=null,d.wrapper.parentNode&&d.wrapper.parentNode.removeChild(d.wrapper);s=null}}var $i,Ss,Yi=m(()=>{"use strict";me();it();$i=(t,e)=>t.for===void 0?!1:Array.isArray(t.for)?t.for.includes(e):t.for===e,Ss=(t,e)=>{if(!t.forRange)return!1;let[i,n]=t.forRange;return e>=i&&e<=n}});function Zi(t,e){let i=t.allowed??t.snapPoints.map(s=>s.id),n=t.initial??i[0]??t.snapPoints[0]?.id??"default";if(t.persistKey){let s=Ts(t.persistKey);s&&i.includes(s)&&(n=s)}return{mode:ye(t.mode??"bottom",t.element),flickVelocity:t.flickVelocity??xs,dragThreshold:t.dragThreshold??As,dragFrom:t.dragFrom??(t.handle?"handle":"sheet"),dragFromContent:t.dragFromContent??!0,rubberBandEnabled:t.rubberBand??!0,closeOnBack:t.closeOnBack??!1,persistent:t.persistent??!1,disableClose:t.disableClose??!1,disableDrag:t.disableDrag??!1,closeOnRouteChange:t.closeOnRouteChange??!1,radius:t.radius,maxHeight:t.maxHeight,initialAllowed:i,initialId:n,scrim:{scrimMode:t.scrimMode,scrimColor:t.scrimColor,scrimBlur:t.scrimBlur,scrimInteractive:t.scrimInteractive??(t.scrimTapToClose?!0:void 0),scrimTapToClose:t.scrimTapToClose,scrimPreset:t.scrimPreset,screenRange:t.screenRange,backdropRange:t.backdropRange},animation:{animation:t.animation,settleAnimation:t.settleAnimation,duration:t.duration,easing:t.easing,spring:t.spring,respectReducedMotion:t.respectReducedMotion,viewTransitions:t.viewTransitions},lifecycle:{focusTrap:t.focusTrap,initialFocus:t.initialFocus,closeOnEscape:t.closeOnEscape,lockBodyScroll:t.lockBodyScroll,inertSiblings:t.inertSiblings,shouldApplyInertSiblings:e?.shouldApplyInertSiblings,returnFocus:t.returnFocusTo}}}var xs,As,Ts,Xi=m(()=>{"use strict";Qe();xs=.65,As=18;Ts=t=>{if(typeof window>"u"||typeof localStorage>"u")return null;try{return localStorage.getItem(t)}catch{return null}}});var L,nt=m(()=>{"use strict";L=class{constructor(){a(this,"fns",[])}add(e){e&&this.fns.push(e)}drain(){for(;this.fns.length;)try{this.fns.pop()()}catch(e){queueMicrotask(()=>{throw e})}}}});var Es,xe,ji=m(()=>{"use strict";kt();ue();Ot();Pt();U();Vt();G();Gt();Ut();Yt();Xt();Qt();ei();ii();ri();yi();zi();Li();Fi();_i();Qe();Bi();Ni();Vi();Ui();Yi();Xi();nt();Ve();Es=8,xe=class{constructor(e){a(this,"id",_e("bs"));a(this,"element");a(this,"handle");a(this,"scrollContainer");a(this,"backdrop");a(this,"screenComponent");a(this,"scrimParent",null);a(this,"mode");a(this,"flickVelocity");a(this,"dragThreshold");a(this,"dragFromMode");a(this,"dragFromContentDefault");a(this,"rubberBandEnabled");a(this,"scrim");a(this,"aria");a(this,"animation");a(this,"lifecycle");a(this,"closeOnBack");a(this,"routedTo");a(this,"fitContentToSnap");a(this,"persistent");a(this,"disableCloseFlag");a(this,"disableDragFlag");a(this,"closeOnRouteChange");a(this,"maxHeight");a(this,"maxHeightDeps");a(this,"snapPointsRaw");a(this,"snaps");a(this,"activeId");a(this,"size",0);a(this,"gesture");a(this,"contentGesture");a(this,"detachSheetGesture",null);a(this,"detachSliderKeyboard",null);a(this,"rootEl",null);a(this,"destroyed",!1);a(this,"restClosed",!1);a(this,"currentViewTransition",null);a(this,"currentAbort",new AbortController);a(this,"sizeWriteSentinel",new z);a(this,"progressWriteSentinel",new z);a(this,"isTopSheet",!0);a(this,"opening",!1);a(this,"promotedForOpen",!1);a(this,"allowOvershoot",!1);a(this,"progressPayload",{value:0,size:0});a(this,"dragContextBuf",{size:0,maxAxisSize:0,range:{min:0,max:0},rubberBandEnabled:!1});a(this,"bus",It());a(this,"persistKey");a(this,"linkedSheets",[]);a(this,"scrollCache");a(this,"teardowns",new L);a(this,"anchors",[]);a(this,"anchorHost",null);a(this,"stackZ",100);a(this,"detachScrimStages",null);a(this,"stackEffectEnabled",!1);a(this,"stackEffectPrimed",!1);a(this,"fitDeps");a(this,"transformTemplate");a(this,"featureList",[]);a(this,"featureCtx");let i=Zi(e,{shouldApplyInertSiblings:()=>typeof document>"u"?!1:Array.from(document.body.children).some(o=>o===e.element||o.contains(e.element))});this.element=e.element,this.handle=e.handle??e.element,this.scrollContainer=e.scrollContainer,this.backdrop=e.backdrop,this.screenComponent=e.scrim??e.screenComponent,this.scrimParent=this.screenComponent?.parentElement??null,this.mode=i.mode,this.element.dataset.mode=this.mode,this.transformTemplate=Fe(this.mode),this.aria=new Z(this.handle,this.mode),this.flickVelocity=i.flickVelocity,this.dragThreshold=i.dragThreshold,this.dragFromMode=i.dragFrom,this.dragFromContentDefault=i.dragFromContent,this.rubberBandEnabled=i.rubberBandEnabled,this.scrim=new fe({mode:this.mode,screenComponent:this.screenComponent,backdrop:this.backdrop,isDestroyed:()=>this.destroyed,getAllowedIds:()=>this.snaps.getAllowedIds().slice(),getResolvedSnaps:()=>this.snaps.getResolvedSnaps().slice(),snapTo:r=>{this.snapTo(r)},close:()=>{this.canDismiss()&&this.close("backdrop")}},i.scrim),this.animation=new be({element:this.element,getRootEl:()=>this.rootEl,applySize:r=>this.applySize(r),getSize:()=>this.size,isDragging:()=>this.isDraggingAny(),applyAux:r=>this.applySize(r,!0),getTransformFor:r=>{let o=this.snaps.getMaxAxisSize(),l=o>0&&!this.allowOvershoot?Math.min(r,o):r;return this.transformTemplate(o-l)}},i.animation),this.lifecycle=new ve({element:this.element,close:()=>this.close()},i.lifecycle),this.closeOnBack=i.closeOnBack,this.routedTo=e.routedTo,this.fitContentToSnap=e.fitContentToSnap===!0,this.persistent=i.persistent,this.disableCloseFlag=i.disableClose,this.disableDragFlag=i.disableDrag,this.closeOnRouteChange=i.closeOnRouteChange,this.stackEffectEnabled=e.stackEffect??!1,this.snapPointsRaw=e.snapPoints,this.persistKey=e.persistKey,e.linkedSheets&&(this.linkedSheets=e.linkedSheets);let n=new Map;for(let r of e.features??[])n.set(r.name,r);this.featureList=Array.from(n.values()),this.activeId=i.initialId,Be(this.snapPointsRaw),this.auditDuplicateSnapIds(this.snapPointsRaw),this.rootEl=this.element.closest(".bs-root"),this.maxHeightDeps={element:this.element,mode:this.mode,getMaxAxisSize:()=>this.snaps.getMaxAxisSize(),setMaxAxisSize:r=>{this.snaps.setMaxAxisSize(r)},recompute:()=>this.recompute()},this.maxHeight=jt(this.maxHeightDeps),this.fitDeps={element:this.element,scrollContainer:this.scrollContainer,mode:this.mode,getMaxHeightCap:()=>this.maxHeight.getCap()},this.snaps=new pe(this.snapPointsRaw,i.initialAllowed,this.mode,()=>Jt(this.fitDeps),r=>{this.element.style[D(this.mode)]=`${r}px`});let s=this.snaps.findById(this.activeId);if(s&&(this.size=s.size),this.applySize(this.size),this.setRestClosed(this.size===0),this.updateAriaSlider(),this.scrollCache=Ki({scrollContainer:this.scrollContainer,getMaxAxisSize:()=>this.snaps.getMaxAxisSize()}),this.featureCtx=this.buildFeatureContext(e.autoCollapseAfter),this.attach(),this.registerInStack(),this.snaps.getMaxAxisSize()===0&&typeof IntersectionObserver<"u"&&typeof document<"u"){let r=new IntersectionObserver(o=>{for(let l of o)if(l.isIntersecting){if(this.destroyed)return;this.snaps.recompute(),this.healActiveSnap(),r.disconnect();return}});r.observe(this.element),this.teardowns.add(()=>r.disconnect())}this.teardowns.add(Zt({handle:this.handle,scrollContainer:this.scrollContainer,hasFitSnap:()=>this.snapPointsRaw.some(r=>r.size==="fit"||r.size==="content"),isDestroyed:()=>this.destroyed,isDragging:()=>this.isDraggingAny(),recompute:()=>this.recompute()})),i.radius!==void 0&&this.setRadius(i.radius),i.maxHeight!==void 0&&this.setMaxHeight(i.maxHeight),this.applyAutoAriaLabelledBy(),this.runFeatureStage("post"),this.warnOrphanFeatureOptions(),this.size>0&&this.handleOpen()}buildFeatureContext(e){return{element:this.element,scrollContainer:this.scrollContainer,sheetId:this.id,options:{routedTo:this.routedTo,closeOnBack:this.closeOnBack,closeOnRouteChange:this.closeOnRouteChange,persistKey:this.persistKey,autoCollapseAfter:e,fitContentToSnap:this.fitContentToSnap},isDestroyed:()=>this.destroyed,isDragging:()=>this.isDraggingAny(),isAnimating:()=>this.animation.isAnimating,isTopSheet:()=>this.isTopSheet,isVerticalAxis:()=>this.mode==="bottom"||this.mode==="top",getSize:()=>this.size,getActiveId:()=>this.activeId,getAllowedIds:()=>this.snaps.getAllowedIds().slice(),allowedIdsBySize:()=>this.allowedIdsBySize(),getMaxAxisSize:()=>this.snaps.getMaxAxisSize(),resolveSnap:i=>this.snaps.findById(i),resolveActiveSnap:()=>this.snaps.findById(this.activeId),setSize:i=>{this.size=i},setMaxAxisSize:i=>{this.snaps.setMaxAxisSize(i)},applySize:i=>this.applySize(i),recomputeSnaps:()=>this.recomputeSnaps(),newCycle:()=>{this.newCycle()},cancelInFlight:()=>{this.animation.cancel()},resyncAfterResize:()=>this.resyncAfterResize(),snapTo:i=>{this.snapTo(i)},close:i=>this.close(i),attachDragSurface:(i,n)=>this.attachDragSurface(i,n),on:(i,n)=>this.on(i,n),addTeardown:i=>this.teardowns.add(i)}}runFeatureStage(e){for(let i of this.featureList){if((i.stage??"post")!==e)continue;let n=i.install(this.featureCtx);n&&this.teardowns.add(n)}}warnOrphanFeatureOptions(){let e=new Set(this.featureList.map(i=>i.name));(this.closeOnBack||this.routedTo!==void 0||this.closeOnRouteChange)&&!e.has("route")&&x("[BottomSheet] closeOnBack/routedTo/closeOnRouteChange need routeFeature() \u2014 option ignored"),this.fitContentToSnap&&!e.has("content-fit")&&x("[BottomSheet] fitContentToSnap needs contentFitFeature() \u2014 option ignored"),this.persistKey&&!e.has("persist")&&x("[BottomSheet] persistKey needs persistFeature() \u2014 snaps will not be saved")}get state(){return{size:this.size,activeId:this.activeId,isDragging:this.isDraggingAny(),isAnimating:this.animation.isAnimating,progress:this.computeProgress(this.size)}}on(e,i){return this.bus.on(e,i)}use(e){if(this.destroyed)return x(`[BottomSheet] use("${e.name}") called on destroyed engine \u2014 ignored.`),this;let i=[],n={add:r=>{typeof r=="function"&&i.push(r)}},s;try{s=e.install(this,n)}catch(r){for(let o=i.length-1;o>=0;o--)try{i[o]()}catch(l){queueMicrotask(()=>{throw l})}return queueMicrotask(()=>{throw r}),this}for(let r of i)this.teardowns.add(r);return typeof s=="function"&&this.teardowns.add(s),this}setLinkedSheets(e){this.destroyed||(this.linkedSheets=e)}getAllowedIds(){return this.snaps.getAllowedIds().slice()}getResolvedSnaps(){return this.snaps.getResolvedSnaps()}async snapTo(e,i=0,n=!1){if(this.destroyed)return;let s=typeof i=="object"?i:{velocity:i},r=s.velocity??0,o=s.signal;if(o?.aborted)return;let l=this.snaps.findById(e);if(!l){x(`[BottomSheet] unknown snap id: ${e}`);return}if(!this.snaps.getAllowedIds().includes(e)){x(`[BottomSheet] snap "${e}" is not in allowed list`);return}if(!n&&this.emitBeforeSnap(l,this.activeId))return;let c=this.opening,u=this.newCycle(),d=()=>{this.animation.cancel(),this.newCycle()};o?.addEventListener("abort",d,{once:!0});let h=this.size===0||c,p=this.activeId,b=this.size;this.scrollCache.cache(p,b,l.size),this.activeId=e;let g=this.snapPointsRaw.find(y=>y.id===e)?.size;if(h&&!(e==="closed"||g===0)&&(this.opening=!0,c||(this.promotedForOpen=!0,R.promote(this.id))),this.animation.viewTransitionsAvailable){this.currentViewTransition?.skipTransition?.();let y=document.startViewTransition(()=>{this.applySize(l.size)});y.ready?.catch(()=>{}),this.currentViewTransition=y;try{await y.finished}catch{}this.currentViewTransition===y&&(this.currentViewTransition=null)}else await this.animation.animateTo(l.size,r);o?.removeEventListener("abort",d),!u.aborted&&(this.opening=!1,this.completeSnap(e,l.size,b,h,!1))}completeSnap(e,i,n,s,r){this.scrollCache.restore(e,n,i),this.updateAriaSlider(),this.emit("snap",{id:e,size:this.size,progress:this.computeProgress(this.size)}),r&&this.haptic(),this.setRestClosed(i===0),s&&i>0&&this.emitOpenSequence(e),i===0&&this.emitCloseSequence()}setRestClosed(e){e!==this.restClosed&&(this.restClosed=e,e?this.element.setAttribute("data-bs-rest","closed"):this.element.removeAttribute("data-bs-rest"))}emitOpenSequence(e){this.emit("open",{id:e}),this.handleOpen(),Wt(this.linkedSheets,this),this.emit("opened",{id:e})}emitCloseSequence(){this.emit("close",void 0),this.handleClose(),this.emit("closed",void 0)}async dragTo(e,i=0){if(this.destroyed)return;let n=typeof i=="object"?i:{velocity:i},s=n.velocity??0,r=n.signal;if(r?.aborted)return;this.newCycle();let o=()=>{this.animation.cancel(),this.newCycle()};r?.addEventListener("abort",o,{once:!0});let l=Math.max(0,Math.min(e,this.snaps.getMaxAxisSize()));await this.animation.animateTo(l,s),r?.removeEventListener("abort",o),this.destroyed||r?.aborted}open(e){if(this.destroyed)return Promise.resolve();let i=e??this.snaps.getAllowedIds().find(n=>(this.snaps.findById(n)?.size??0)>0)??this.activeId;return this.snapTo(i)}close(e="programmatic"){if(this.destroyed||this.disableCloseFlag||this.size>0&&this.emitBeforeClose(e))return Promise.resolve();let i=this.snapPointsRaw.find(n=>n.id==="closed")?.id??this.snaps.getAllowedIds().find(n=>this.snaps.findById(n)?.size===0)??this.snaps.getAllowedIds()[0];return this.snapTo(i??this.activeId)}canDismiss(){return!this.persistent&&!this.disableCloseFlag&&!this.destroyed}setPersistent(e){this.destroyed||(this.persistent=e)}setDisableClose(e){this.destroyed||(this.disableCloseFlag=e)}setDisableDrag(e){this.destroyed||(this.disableDragFlag=e)}setDragFromContent(e){this.destroyed||(this.dragFromContentDefault=e)}setDragFrom(e){this.destroyed||e===this.dragFromMode||(this.gesture?.forceClearDragState(),this.detachSheetGesture?.(),this.dragFromMode=e,this.mountSheetGesture())}getDragFrom(){return this.dragFromMode}setMode(e){if(this.destroyed)return;let i=ye(e,this.element);if(i===this.mode)return;let n=this.mode==="bottom"||this.mode==="top",s=i==="bottom"||i==="top";this.gesture?.forceClearDragState(),this.detachSheetGesture?.(),this.animation.cancel(),this.element.style.removeProperty(D(this.mode)),this.mode=i,this.element.dataset.mode=i,this.transformTemplate=Fe(i),this.maxHeightDeps.mode=i,this.fitDeps.mode=i,this.snaps.setMode(i),this.scrim.setSheetMode(i),n!==s&&(this.aria=new Z(this.handle,i)),this.detachSliderKeyboard?.(),this.mountSliderKeyboard(),this.mountSheetGesture(),this.recompute();let r=this.snaps.findById(this.activeId);r&&this.applySize(r.size),this.updateAriaSlider()}getMode(){return this.mode}isTop(){return this.isTopSheet}depth(){return R.depthOf(this.id)}expand(){if(this.destroyed)return Promise.resolve();let e=this.allowedIdsBySize(),i=e[e.length-1];return i?this.snapTo(i):Promise.resolve()}collapse(){if(this.destroyed)return Promise.resolve();let e=this.allowedIdsBySize(),n=e.find(s=>(this.snaps.findById(s)?.size??0)>0)??e[0];return n?this.snapTo(n):Promise.resolve()}setRadius(e){this.destroyed||this.maxHeight.setRadius(e)}setMaxHeight(e){this.destroyed||this.maxHeight.setMaxHeight(e)}setAllowed(e,i){if(!this.destroyed){if(this.snaps.setAllowedIds(e),this.updateAriaSlider(),i&&e.includes(i))this.snapTo(i,0,!0);else if(!e.includes(this.activeId)){let n=e[0];n&&this.snapTo(n,0,!0)}}}setBackdropRange(e){this.scrim.setBackdropRange(e,()=>this.applySize(this.size))}setScreenRange(e){this.scrim.setScreenRange(e,()=>this.applySize(this.size))}setScrimColor(e){this.scrim.setScrimColor(e)}setScrimBlur(e){this.scrim.setScrimBlur(e)}setScrimInteractive(e){this.scrim.setScrimInteractive(e)}setScrim(e){this.scrim.setScrim(e,()=>this.applySize(this.size))}setScrimMode(e){this.scrim.setScrimMode(e,()=>this.applySize(this.size))}setScrimTapToClose(e){this.scrim.setScrimTapToClose(e)}setScrimEnabled(e){this.scrim.setScrimEnabled(e,()=>this.applySize(this.size))}setScrimOverlay(e){return this.scrim.setScrimOverlay(e)}addAnchor(e){if(this.destroyed||typeof document>"u")return()=>{};this.anchorHost||(this.anchorHost=this.rootEl??this.element.parentElement??document.body,this.anchorHost.style.setProperty("--bs-size",`${this.size}px`),this.anchorHost.style.setProperty("--bs-progress",String(this.computeProgress(this.size))));let i=Wi({mode:this.mode,host:this.anchorHost,getState:()=>({activeId:this.activeId,size:this.size,progress:this.computeProgress(this.size)}),on:(s,r)=>this.on(s,r),isDestroyed:()=>this.destroyed},e);i.syncZ(this.stackZ+1),this.anchors.push(i);let n=()=>{let s=this.anchors.indexOf(i);s!==-1&&(this.anchors.splice(s,1),i.detach())};return this.teardowns.add(n),n}setScrimStages(e){if(this.destroyed||typeof document>"u")return()=>{};if(this.detachScrimStages?.(),this.detachScrimStages=null,!e)return()=>{};let i=this.screenComponent?.parentElement;if(!i)return x("[BottomSheet] setScrimStages: no scrim element mounted \u2014 pass `scrim` to the engine first."),()=>{};let n=qi({mode:this.mode,host:i,getState:()=>({activeId:this.activeId,size:this.size,progress:this.computeProgress(this.size)}),on:(r,o)=>this.on(r,o),isDestroyed:()=>this.destroyed},e),s=()=>{this.detachScrimStages===s&&(this.detachScrimStages=null),n()};return this.detachScrimStages=s,this.teardowns.add(()=>this.detachScrimStages?.()),s}getScrimState(){return{mode:this.scrim.scrimMode,enabled:this.scrim.scrimEnabled}}setSnapPoints(e,i){if(this.destroyed)return;if(this.animation.cancel(),this.newCycle(),this.snapPointsRaw=e,Be(e),this.auditDuplicateSnapIds(e),this.snaps.setRaw(e),i)this.snaps.setAllowedIds(i);else{let s=this.snaps.getResolvedSnaps().map(o=>o.id),r=this.snaps.getAllowedIds().filter(o=>s.includes(o));this.snaps.setAllowedIds(r.length?r:s)}this.scrollCache.clear(),this.scrim.invalidateOpacityCache();let n=this.snaps.findById(this.activeId);if(n)this.applySize(n.size);else{let s=this.snaps.getResolvedSnaps().find(r=>this.snaps.getAllowedIds().includes(r.id))??this.snaps.getResolvedSnaps()[0];s&&(this.activeId=s.id,this.applySize(s.size))}this.updateAriaSlider()}recompute(){this.destroyed||(this.maxHeight.resolveCap(),this.snaps.recompute(),this.maxHeight.clampTo(),this.scrim.invalidateOpacityCache(),!this.isDraggingAny()&&this.healActiveSnap())}healActiveSnap(){let e=this.snaps.findById(this.activeId);e&&(this.size=e.size,this.applySize(this.size),this.updateAriaSlider(),this.size>0&&!this.lifecycle.isInstalled&&!this.opening&&!this.animation.isAnimating&&this.emitOpenSequence(this.activeId))}destroy(){this.destroyed=!0,this.opening=!1,this.currentAbort.abort(),this.currentViewTransition?.skipTransition?.(),this.currentViewTransition=null,this.bus.clear(),this.animation.cancel(),this.gesture?.forceClearDragState(),this.contentGesture?.forceClearDragState(),this.setRestClosed(!1),this.teardowns.drain(),this.scrim.destroy(),this.animation.destroy(),this.lifecycle.destroy(),this.backdrop&&(this.backdrop.style.opacity="",this.backdrop.style.pointerEvents="");for(let e of[this.anchorHost,this.scrimParent,this.rootEl])e&&(e.style.removeProperty("--bs-size"),e.style.removeProperty("--bs-progress"));this.screenComponent&&(this.screenComponent.style.opacity="",this.screenComponent.style.display=""),this.sizeWriteSentinel.invalidate(),this.progressWriteSentinel.invalidate()}emit(e,i){this.bus.emit(e,i)}newCycle(){return this.allowOvershoot=!1,this.opening=!1,this.currentAbort.abort(),this.currentAbort=new AbortController,this.currentAbort.signal}emitBeforeSnap(e,i){return Ne(n=>this.emit("before-snap",n),{id:e.id,size:e.size,previousId:i},"before-snap")}emitBeforeClose(e){return Ne(i=>this.emit("before-close",i),{reason:e},"before-close")}applyAutoAriaLabelledBy(){if(typeof document>"u"||!this.lifecycle.focusTrapEnabled||this.element.getAttribute("aria-labelledby"))return;let e=this.handle??this.element,i=e.querySelector("[data-bs-title]")??e.querySelector("h1,h2,h3,h4,h5,h6");i&&(i.id||(i.id=_e("bs-title")),this.element.setAttribute("aria-labelledby",i.id))}recomputeSnaps(){this.maxHeight.resolveCap(),this.snaps.setRaw(this.snapPointsRaw),this.maxHeight.clampTo(),this.scrim.invalidateOpacityCache()}auditDuplicateSnapIds(e){let i=new Set;for(let n of e)i.has(n.id)&&x(`[BottomSheet] duplicate snap id "${n.id}" \u2014 only the first occurrence is reachable.`),i.add(n.id)}getAllowedRange(){return this.snaps.getAllowedRange()}allowedIdsBySize(){return this.snaps.getAllowedIds().slice().sort((e,i)=>(this.snaps.findById(e)?.size??0)-(this.snaps.findById(i)?.size??0))}updateAriaSlider(){this.aria.setValue(this.allowedIdsBySize(),this.activeId)}registerInStack(){this.teardowns.add(R.push({id:this.id,setZIndex:e=>{this.stackZ=e,this.element.style.zIndex=String(e),this.backdrop&&(this.backdrop.style.zIndex=String(e-1));for(let i of this.anchors)i.syncZ(e+1)},setIsTop:e=>{this.isTopSheet=e},isOpen:()=>this.size>0||this.opening,setDepth:e=>this.applyStackDepth(e)}))}applyStackDepth(e){if(!this.stackEffectEnabled)return;if(this.element.setAttribute("data-stack-depth",String(e)),!this.stackEffectPrimed){this.stackEffectPrimed=!0;let n=this.mode==="bottom"||this.mode==="top";this.element.style.transformOrigin=n?"50% 100%":"0% 50%",this.element.style.transition="scale 320ms cubic-bezier(0.29, 1.04, 0.84, 0.99)"}let i=Math.max(1-e*.04,.86);this.element.style.scale=i===1?"":String(i)}buildGestureDeps(e,i){return{handle:e,element:this.element,mode:this.mode,gestureOptions:i,getRoot:()=>this.rootEl,getDragContext:()=>{let n=this.dragContextBuf,s=this.getAllowedRange();return n.size=this.size,n.maxAxisSize=this.snaps.getMaxAxisSize(),n.range.min=s.min,n.range.max=s.max,n.rubberBandEnabled=this.rubberBandEnabled,n},getDisableDrag:()=>this.disableDragFlag,cancelAnimation:()=>this.animation.cancel(),applySize:n=>this.applySize(n),animateTo:(n,s)=>this.animation.animateTo(n,s),settleAfterDrag:(n,s,r)=>this.settleAfterDrag(n,s,r),emit:(n,s)=>this.emit(n,s),listenerCount:n=>this.bus.listenerCount(n)}}isContentDragAllowed(){return this.disableDragFlag?!1:this.snapPointsRaw.find(i=>i.id===this.activeId)?.dragFromContent??this.dragFromContentDefault}decideContentDrag(e,i,n,s){if(this.destroyed||i.pointerType==="mouse"||this.gesture?.isDragging||!this.isContentDragAllowed()||!je(i.target,"sheet"))return!1;let r=Hi({delta:n,crossDelta:s,sharesScrollAxis:this.mode==="bottom"||this.mode==="top",scrollTop:e.scrollTop,atMaxSnap:this.size>=this.getAllowedRange().max-.5});return r==="pending"?null:r==="drag"}attachDragSurface(e,i){if(this.destroyed||i!=="content"||this.contentGesture)return;let n=new Y(this.buildGestureDeps(e,{manageTouchAction:!1,deferStart:(o,l,c)=>this.decideContentDrag(e,o,l,c)}));this.contentGesture=n;let s=n.install(),r=Je(e,()=>n.isDragging);return()=>{r(),s(),this.contentGesture===n&&(this.contentGesture=void 0)}}sheetDragSurface(){return this.dragFromMode==="handle"?this.handle:this.element}canStartSheetDrag(e){if(this.contentGesture?.isDragging)return!1;let i=e.target,n=typeof i?.closest=="function";return n&&i.closest(Xe)?!1:this.handle!==this.element&&n&&this.handle.contains(i)?!0:je(e.target,this.dragFromMode)?this.dragFromMode==="handle"?!0:!(this.scrollContainer&&n&&this.scrollContainer.contains(i)&&!i.closest(Ze)):!1}mountSheetGesture(){let e=this.sheetDragSurface(),i=new Y(this.buildGestureDeps(e,{shouldStart:r=>this.canStartSheetDrag(r),manageTouchAction:this.dragFromMode==="handle"}));this.gesture=i;let n=i.install(),s=this.dragFromMode==="handle"?null:Je(e,()=>i.isDragging);this.detachSheetGesture=()=>{s?.(),n()}}attach(){this.mountSheetGesture(),this.teardowns.add(()=>{this.detachSheetGesture?.(),this.detachSheetGesture=null});try{this.attachFeatures()}catch(e){this.teardowns.drain();try{this.scrim.destroy()}catch(i){queueMicrotask(()=>{throw i})}try{this.animation.destroy()}catch(i){queueMicrotask(()=>{throw i})}try{this.lifecycle.destroy()}catch(i){queueMicrotask(()=>{throw i})}throw this.destroyed=!0,e}}attachFeatures(){if(this.runFeatureStage("attach"),typeof window<"u"&&(this.teardowns.add(qt({element:this.element,getMode:()=>this.mode,isDestroyed:()=>this.destroyed,isDragging:()=>this.isDraggingAny(),resolveActiveSnap:()=>this.snaps.findById(this.activeId),getMaxAxisSize:()=>this.snaps.getMaxAxisSize(),getSize:()=>this.size,setMaxAxisSize:e=>{this.snaps.setMaxAxisSize(e)},setSize:e=>{this.size=e},recomputeSnaps:()=>this.recomputeSnaps(),applySize:e=>this.applySize(e),cancelInFlight:()=>{this.animation.cancel()},newCycle:()=>{this.newCycle()},isAnimating:()=>this.animation.isAnimating,resyncAfterCancel:()=>this.resyncAfterResize()})),this.lifecycle.closeOnEscape)){let e=i=>{this.destroyed||i.defaultPrevented||this.canDismiss()&&i.key==="Escape"&&this.isTopSheet&&this.size>0&&this.close("escape")};document.addEventListener("keydown",e),this.teardowns.add(()=>document.removeEventListener("keydown",e))}this.mountSliderKeyboard(),this.scrim.attach()}mountSliderKeyboard(){let e=ti({handle:this.handle,mode:this.mode,isDestroyed:()=>this.destroyed,getAllowedIds:()=>this.allowedIdsBySize(),getActiveId:()=>this.activeId,snapTo:i=>{this.snapTo(i)}});this.detachSliderKeyboard=e,this.teardowns.add(()=>{this.detachSliderKeyboard?.(),this.detachSliderKeyboard=null})}settleAfterDrag(e,i,n="touch"){let s=this.newCycle(),r=this.snaps.findDragSettleTarget({delta:e,velocity:i,pointerKind:n,size:this.size,activeId:this.activeId,flickVelocity:this.flickVelocity,dragThreshold:this.dragThreshold});if(!r){this.clearWillChangeIfIdle();return}let o=this.activeId;if(r.id===o&&r.size===this.size){this.clearWillChangeIfIdle();return}if(this.emitBeforeSnap(r,o)){let h=this.snaps.findById(o);h&&this.animation.animateTo(h.size,0);return}let l=this.size,c=this.snaps.findById(o)?.size;this.scrollCache.cache(o,l,r.size),this.activeId=r.id,c===0&&r.size>0&&(this.opening=!0,this.promotedForOpen=!0,R.promote(this.id));let u=this.snaps.getMaxAxisSize(),d=u>0?Math.min(r.size,u):r.size;this.allowOvershoot=!0,this.animation.animateTo(d,i).then(()=>{s.aborted||(this.allowOvershoot=!1,this.opening=!1,this.completeSnap(r.id,r.size,l,c===0,!0))})}isDraggingAny(){return(this.gesture?.isDragging??!1)||(this.contentGesture?.isDragging??!1)}clearWillChangeIfIdle(){this.animation.isAnimating||this.isDraggingAny()||(this.element.style.willChange="")}haptic(){if(typeof navigator<"u"&&"vibrate"in navigator)try{navigator.vibrate(Es)}catch{}}applySize(e,i=!1){let n=this.snaps.getMaxAxisSize(),s=n>0&&e>n&&!this.isDraggingAny()&&!this.allowOvershoot?n:e;this.size=s,s>0&&this.setRestClosed(!1);let r=n-s,o=this.element.style;i||(o.transform=this.transformTemplate(r)),this.sizeWriteSentinel.shouldWrite(s,.5)&&(o.setProperty("--bs-size",`${s}px`),this.scrimParent&&this.scrimParent.style.setProperty("--bs-size",`${s}px`),this.anchorHost&&this.anchorHost!==this.scrimParent&&this.anchorHost.style.setProperty("--bs-size",`${s}px`),this.rootEl&&this.rootEl!==this.scrimParent&&this.rootEl!==this.anchorHost&&this.rootEl.style.setProperty("--bs-size",`${s}px`));let l=this.computeProgress(s),c=this.progressWriteSentinel.shouldWrite(l,.005);c&&(o.setProperty("--bs-progress",String(l)),this.anchorHost&&this.anchorHost.style.setProperty("--bs-progress",String(l)),this.rootEl&&this.rootEl!==this.anchorHost&&this.rootEl.style.setProperty("--bs-progress",String(l))),this.scrim.applyOpacity(l,c),c&&this.bus.listenerCount("progress")>0&&(this.progressPayload.value=l,this.progressPayload.size=s,this.emit("progress",this.progressPayload))}computeProgress(e){let{min:i,max:n}=this.getAllowedRange(),s=Math.min(n,this.snaps.getMaxAxisSize());return s<=i?0:Math.min(Math.max((e-i)/(s-i),0),1)}handleOpen(){this.promotedForOpen?this.promotedForOpen=!1:R.promote(this.id);try{this.lifecycle.install()}catch(e){this.destroyed||this.newCycle(),this.handleClose(),this.applySize(0),this.activeId=this.snapPointsRaw.find(i=>i.id==="closed")?.id??this.activeId,this.size=0,queueMicrotask(()=>{throw e})}}resyncAfterResize(){if(this.destroyed)return;let e=this.snaps.findById(this.activeId);e&&(this.updateAriaSlider(),this.emit("snap",{id:e.id,size:this.size,progress:this.computeProgress(this.size)}),e.size>0&&!this.lifecycle.isInstalled?this.emitOpenSequence(e.id):e.size===0&&this.lifecycle.isInstalled&&this.emitCloseSequence())}handleClose(){this.opening=!1,this.promotedForOpen=!1,this.lifecycle.release(),R.update()}}});function Qi(){if(H>0){H-=1;let n=st.shift();n&&n(),F();return}if(T.length===0){rt(),F();return}let t=null,e=-1;for(let n=T.length-1;n>=0;n-=1){let s=T[n];if(s.surface.isOpen()&&(t||(t=s,e=n),s.surface.isTop())){t=s,e=n;break}}if(!t){let n=T.pop();n&&(n.live=!1),F();return}t.live=!1,T.splice(e,1);let i=t;Promise.resolve(i.surface.close()).then(()=>{i.surface.isOpen()&&Ms(i)}),F()}function Ms(t){!_()||!Q()||(t.live=!0,Me(()=>{try{history.pushState(ot(t.surface),"",t.surface.url)}catch{t.live=!1}}),t.live&&(T.push(t),at()))}function Ji(t){let e={surface:t,priorUrl:void 0,live:!1};return!_()||!Q()||(e.priorUrl=t.url!==void 0?location.href:void 0,Me(()=>{try{history.pushState(ot(t),"",t.url),e.live=!0}catch{e.live=!1}}),e.live&&(T.push(e),at())),e}function lt(t){if(!_()||!Q())return;let e=t,i=T.indexOf(e);if(i===-1||!e.live)return;let n=T.length-1;e.live=!1,T.splice(i,1);let s=null;if(i!==n){let r=T[T.length-1].surface,o=e.priorUrl;s=()=>{Me(()=>{history.replaceState(ot(r),"",o!==void 0?o:location.href)})}}st.push(s),H+=1,Me(()=>{try{history.back()}catch{H=Math.max(0,H-1),st.pop()}}),F()}function en(t){return!_()||!Q()?()=>{}:(k.add(t),k.size===1&&ws(),at(),()=>{k.has(t)&&(k.delete(t),k.size===0&&Cs(),F())})}var T,k,H,Ae,st,Te,Ee,X,j,we,Ce,_,Q,ot,Me,rt,at,F,ws,Cs,tn=m(()=>{"use strict";T=[],k=new Set,H=0,Ae=0,st=[],Te=!1,Ee=!1,X=null,j=null,we=null,Ce=null,_=()=>typeof window<"u",Q=()=>typeof history<"u",ot=t=>({...t.markerState(),__bs:!0}),Me=t=>{Ae+=1;try{t()}finally{Ae-=1}},rt=()=>{let t=Array.from(k);for(let e of t)e()},at=()=>{Te||!_()||(window.addEventListener("popstate",Qi),Te=!0)},F=()=>{Te&&(T.length>0||k.size>0||H>0||(_()&&window.removeEventListener("popstate",Qi),Te=!1))},ws=()=>{Ee||!Q()||(X=history.pushState,j=history.replaceState,we=function(...t){X.apply(this,t),Ae===0&&rt()},Ce=function(...t){j.apply(this,t),Ae===0&&rt()},history.pushState=we,history.replaceState=Ce,Ee=!0)},Cs=()=>{Ee&&(history.pushState===we&&X&&(history.pushState=X),history.replaceState===Ce&&j&&(history.replaceState=j),X=null,j=null,we=null,Ce=null,Ee=!1)}});function nn(t){if(typeof window>"u")return()=>{};if(!t.routedTo&&!t.closeOnBack)return()=>{};let e=null,i=()=>{e||(e=Ji({isOpen:()=>!t.isDestroyed()&&t.getSize()>0,isTop:t.isTopSheet,close:t.close,markerState:()=>t.routedTo!==void 0?{__bsRouted:t.sheetId}:{__bsSheet:t.sheetId},url:t.routedTo}))},n=()=>{e&&(lt(e),e=null)},s=t.on("open",i),r=t.on("close",n);return t.getSize()>0&&i(),()=>{s(),r(),e&&(lt(e),e=null)}}function sn(t){return en(()=>{t.isDestroyed()||t.getSize()<=0||t.close()})}var rn=m(()=>{"use strict";tn()});function on(t,e){return t.on("snap",({id:n})=>{if(!(typeof window>"u")&&!(typeof localStorage>"u"))try{localStorage.setItem(e,n)}catch{}})}var an=m(()=>{"use strict"});function ln(t){let{ms:e}=t;if(e===void 0||e<=0)return()=>{};let i=null,n=()=>{i!==null&&(clearTimeout(i),i=null)},s=()=>{if(t.isDestroyed()||t.isDragging())return;let l=t.resolveSnap(t.getActiveId());if(!l||l.size===0)return;let c=null;for(let u of t.getAllowedIds()){let d=t.resolveSnap(u);!d||d.size<=0||(!c||d.size<c.size)&&(c=d)}c&&(c.id===l.id||c.size>=l.size||t.snapTo(c.id))},r=()=>{n(),!t.isDestroyed()&&(i=setTimeout(()=>{i=null,s()},e))},o=t.on("snap",()=>r());return(t.resolveSnap(t.getActiveId())?.size??0)>0&&r(),()=>{n(),o()}}var dn=m(()=>{"use strict"});function cn(t){let e=t.attachDragSurface(t.container,"content");return()=>e?.()}var un=m(()=>{"use strict"});function hn(t){if(typeof window>"u"||!window.visualViewport)return()=>{};let e=window.visualViewport,i=null,n=()=>{i===null&&(i=requestAnimationFrame(()=>{if(i=null,t.isDestroyed())return;t.recomputeSnaps();let s=t.isVerticalAxis(),r=s?e.height:e.width,o=s?window.innerHeight:window.innerWidth,l=Math.max(0,Math.min(o,r)-8);l<t.getMaxAxisSize()&&t.setMaxAxisSize(l);let c=t.isAnimating?.()??!1;t.cancelInFlight(),t.newCycle();let u=t.getMaxAxisSize();t.setSize(Math.min(t.getSize(),u));let d=t.resolveActiveSnap();d&&!t.isDragging()?(t.applySize(Math.min(d.size,u)),c&&t.resyncAfterCancel?.()):t.applySize(t.getSize())}))};return e.addEventListener("resize",n),()=>{e.removeEventListener("resize",n),i!==null&&cancelAnimationFrame(i)}}var pn=m(()=>{"use strict"});function mn(){return{name:"route",install:t=>{let e=new L;return t.options.closeOnRouteChange&&e.add(sn({isDestroyed:t.isDestroyed,getSize:t.getSize,close:()=>t.close()})),e.add(nn({routedTo:t.options.routedTo,closeOnBack:t.options.closeOnBack,isTopSheet:t.isTopSheet,getSize:t.getSize,isDestroyed:t.isDestroyed,close:()=>t.close("back"),on:t.on,sheetId:t.sheetId})),()=>e.drain()}}}function fn(){return{name:"persist",install:t=>{let e=t.options.persistKey;if(e)return on({on:t.on},e)}}}function gn(){return{name:"auto-collapse",install:t=>ln({ms:t.options.autoCollapseAfter,isDestroyed:t.isDestroyed,isDragging:t.isDragging,getAllowedIds:t.getAllowedIds,getActiveId:t.getActiveId,resolveSnap:t.resolveSnap,snapTo:t.snapTo,on:t.on})}}function bn(){return{name:"content-swipe",stage:"attach",install:t=>{if(t.scrollContainer)return cn({container:t.scrollContainer,attachDragSurface:t.attachDragSurface})}}}function vn(){return{name:"visual-viewport",install:t=>{if(!(typeof window>"u"))return hn({element:t.element,isVerticalAxis:t.isVerticalAxis,isDestroyed:t.isDestroyed,isDragging:t.isDragging,recomputeSnaps:t.recomputeSnaps,resolveActiveSnap:t.resolveActiveSnap,getMaxAxisSize:t.getMaxAxisSize,getSize:t.getSize,setMaxAxisSize:t.setMaxAxisSize,setSize:t.setSize,applySize:t.applySize,cancelInFlight:t.cancelInFlight,newCycle:t.newCycle,isAnimating:t.isAnimating,resyncAfterCancel:t.resyncAfterResize})}}}var yn=m(()=>{"use strict";rn();an();dn();un();pn();nt()});function Tn(){return{name:"content-fit",install:t=>{let e=t.scrollContainer;if(!t.options.fitContentToSnap||!e||typeof window>"u")return;let i=t.element,n=0,s=-1,r=0,o=!1,l=(S,E)=>i.style.setProperty(S,`${E}px`),c=S=>i.dataset.mode==="bottom"?Math.max(0,t.getMaxAxisSize()-S):0,u=S=>{s<0&&(s=e.scrollHeight-e.clientHeight-n,r=e.scrollTop);let E=Math.max(0,s+c(S));r>E&&(e.scrollTop>E&&(e.scrollTop=E),r=E)},d=()=>{if(t.isDestroyed())return;let S=t.getSize();o||(s=-1,u(S)),n=c(S),l(Sn,n),l(zs,S),l(xn,t.getMaxAxisSize()),o||(o=!0,i.setAttribute(dt,"rest")),s=-1},h=S=>{o&&(o=!1,i.setAttribute(dt,"moving"),l(An,e.offsetHeight)),u(S)},p=()=>t.isAnimating()||t.isDragging(),b=()=>{p()||d()};d();let g=t.on("progress",S=>p()?h(S.size):d()),f=t.on("snap",d),y=t.on("dragstart",()=>h(t.getSize())),M=typeof ResizeObserver>"u"?null:new ResizeObserver(b);return M?.observe(document.documentElement),window.addEventListener("orientationchange",b),()=>{g(),f(),y(),M?.disconnect(),window.removeEventListener("orientationchange",b),i.removeAttribute(dt);for(let S of[Sn,xn,An])i.style.removeProperty(S)}}}}var Sn,zs,xn,An,dt,En=m(()=>{"use strict";Sn="--bs-content-inset",zs="--bs-size",xn="--bs-max-size",An="--bs-footer-lift-max",dt="data-bs-fit-content"});function wn(){return[bn(),vn(),fn(),gn(),mn(),Tn()]}var Cn=m(()=>{"use strict";yn();En()});var ze,Mn=m(()=>{"use strict";ji();Cn();ze=class extends xe{constructor(e){super({...e,features:[...wn(),...e.features??[]]})}}});var zn,Rn=m(()=>{"use strict";zn=':where(.bs-root){--bs-surface-d:#ffffff;--bs-surface-border-d:rgba(225,227,237,1);--bs-radius-d:20px;--bs-handle-color-d:rgba(26,22,20,0.3);--bs-handle-width:40px;--bs-handle-height:5px;--bs-z-backdrop:90;--bs-z-sheet:100;--bs-backdrop-color-d:rgba(0,0,0,0.5);--bs-scrim-color-d:transparent;--bs-scrim-blur:0px;--bs-z-scrim:calc(var(--bs-z-sheet) - 1);--bs-size:0px;--bs-progress:0}.bs-backdrop{position:fixed;inset:0;background:var(--bs-backdrop-color,var(--bs-backdrop-color-d));opacity:0;pointer-events:none;z-index:var(--bs-z-backdrop);transition:opacity 0.24s cubic-bezier(0.22,1,0.36,1);will-change:opacity}.bs-root[data-dragging="true"] .bs-backdrop,.bs-root[data-animating="true"] .bs-backdrop{transition:none}.bs-sheet{position:fixed;background:var(--bs-surface,var(--bs-surface-d));box-shadow:var(--bs-shadow,var(--bs-shadow-auto,none));--bs-shadow-fade:clamp(0,calc(var(--bs-progress,0) * 8),1);z-index:var(--bs-z-sheet);pointer-events:auto;overflow:hidden;display:flex;flex-direction:column;-webkit-tap-highlight-color:transparent;user-select:none;overscroll-behavior:contain}.bs-sheet[data-mode="bottom"]{left:0;right:0;bottom:0;width:100%;border-top-left-radius:var(--bs-radius,var(--bs-radius-d));border-top-right-radius:var(--bs-radius,var(--bs-radius-d));border-top:1px solid var(--bs-surface-border,var(--bs-surface-border-d));padding-bottom:env(safe-area-inset-bottom);--bs-shadow-auto:0 calc(var(--bs-progress,0) * -2px - 3px) calc(var(--bs-progress,0) * 18px + 12px) rgba( 0,0,0,calc(var(--bs-shadow-fade) * (var(--bs-progress,0) * 0.15 + 0.12)) )}.bs-sheet[data-mode="top"]{left:0;right:0;top:0;width:100%;border-bottom-left-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-right-radius:var(--bs-radius,var(--bs-radius-d));border-bottom:1px solid var(--bs-surface-border,var(--bs-surface-border-d));flex-direction:column-reverse;--bs-shadow-auto:0 3px 12px rgba(0,0,0,calc(var(--bs-shadow-fade) * 0.12));padding-top:env(safe-area-inset-top)}.bs-sheet[data-mode="left"]{top:0;bottom:0;left:0;height:100%;border-top-right-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-right-radius:var(--bs-radius,var(--bs-radius-d));border-right:1px solid var(--bs-surface-border,var(--bs-surface-border-d));--bs-shadow-auto:3px 0 12px rgba(0,0,0,calc(var(--bs-shadow-fade) * 0.12))}.bs-sheet[data-mode="right"]{top:0;bottom:0;right:0;height:100%;border-top-left-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-left-radius:var(--bs-radius,var(--bs-radius-d));border-left:1px solid var(--bs-surface-border,var(--bs-surface-border-d));--bs-shadow-auto:-3px 0 12px rgba(0,0,0,calc(var(--bs-shadow-fade) * 0.12))}.bs-sheet[data-bs-rest="closed"]{box-shadow:none;visibility:hidden}.bs-sheet[data-bs-webgl="on"],.bs-sheet[data-bs-webgl="on"] .bs-handle,.bs-sheet[data-bs-webgl="on"] .bs-header,.bs-sheet[data-bs-webgl="on"] .bs-footer{background:transparent;box-shadow:none}.bs-sheet[data-mode="left"] .bs-content{padding-right:36px}.bs-sheet[data-mode="right"] .bs-content{padding-left:36px}.bs-handle{flex-shrink:0;min-height:44px;display:flex;flex-direction:column;justify-content:center;padding:var(--bs-handle-padding,8px 16px 4px);cursor:grab;touch-action:none;user-select:none;background:var(--bs-surface,var(--bs-surface-d));-webkit-tap-highlight-color:transparent;outline:none;position:relative}.bs-handle:active{cursor:grabbing}.bs-handle:focus-visible{outline:2px solid currentColor;outline-offset:-2px;border-radius:var(--bs-radius,var(--bs-radius-d))}.bs-handle::before{content:"";display:block;width:var(--bs-handle-width);height:var(--bs-handle-height);background:var(--bs-handle-color,var(--bs-handle-color-d));border-radius:calc(var(--bs-handle-height) / 2);margin:0 auto 8px;transition:width 0.15s ease,background 0.15s ease,transform 0.15s ease;pointer-events:none}.bs-sheet[data-mode="left"] .bs-handle,.bs-sheet[data-mode="right"] .bs-handle{position:absolute;top:0;bottom:0;width:28px;min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;background:var(--bs-surface,var(--bs-surface-d));z-index:1;overflow:hidden}.bs-sheet[data-mode="left"] .bs-handle>*,.bs-sheet[data-mode="right"] .bs-handle>*{display:none}.bs-sheet[data-mode="left"] .bs-handle{right:0;border-left:1px solid var(--bs-surface-border,var(--bs-surface-border-d))}.bs-sheet[data-mode="right"] .bs-handle{left:0;border-right:1px solid var(--bs-surface-border,var(--bs-surface-border-d))}.bs-sheet[data-mode="left"] .bs-handle::before,.bs-sheet[data-mode="right"] .bs-handle::before{width:var(--bs-handle-height);height:var(--bs-handle-width);margin:0}.bs-sheet:hover .bs-handle::before{background:color-mix(in oklab,var(--bs-handle-color,var(--bs-handle-color-d)),#000 15%)}.bs-handle:active::before{background:color-mix(in oklab,var(--bs-handle-color,var(--bs-handle-color-d)),#000 35%);transform:scaleX(1.15)}.bs-handle.bs-handle--ticks::after{content:"";display:block;position:absolute;left:50%;bottom:6px;transform:translateX(-50%);width:calc(var(--bs-handle-width) * 2);height:3px;background-image:radial-gradient( circle,var(--bs-handle-color,var(--bs-handle-color-d)) 0 1.5px,transparent 1.6px );background-size:8px 3px;background-repeat:repeat-x;background-position:center;opacity:0;transition:opacity 0.18s ease-out;pointer-events:none}.bs-root[data-dragging="true"] .bs-handle.bs-handle--ticks::after{opacity:0.4}.bs-sheet[data-mode="top"] .bs-handle.bs-handle--ticks::after{bottom:auto;top:6px}.bs-sheet[data-mode="left"] .bs-handle.bs-handle--ticks::after,.bs-sheet[data-mode="right"] .bs-handle.bs-handle--ticks::after{left:50%;top:50%;bottom:auto;transform:translate(-50%,-50%);width:3px;height:calc(var(--bs-handle-width) * 2);background-size:3px 8px;background-repeat:repeat-y;margin-left:calc(var(--bs-handle-height) + 6px)}.bs-sheet[data-mode="right"] .bs-handle.bs-handle--ticks::after{margin-left:calc(-1 * (var(--bs-handle-height) + 6px))}.bs-header{flex:0 0 auto;min-height:var(--bs-header-min-height,0px);padding:var(--bs-header-padding,0 16px 8px);background:var(--bs-surface,var(--bs-surface-d))}.bs-content{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;user-select:text;padding:var(--bs-content-padding,0 16px 16px)}.bs-sheet[data-bs-fit-content="moving"] .bs-content{scroll-padding-bottom:var(--bs-content-inset,0px)}.bs-sheet[data-bs-fit-content="moving"] .bs-content::after{content:"";display:block;flex:none;height:var(--bs-content-inset,0px)}.bs-sheet[data-bs-fit-content="rest"][data-mode="bottom"]::after{content:"";flex:0 1 max(0px,var(--bs-max-size,0px) - var(--bs-size,0px))}.bs-footer{flex:0 0 auto;padding:var(--bs-footer-padding,12px 16px calc(12px + env(safe-area-inset-bottom)));border-top:1px solid var(--bs-surface-border,var(--bs-surface-border-d));background:var(--bs-surface,var(--bs-surface-d))}.bs-sheet[data-bs-fit-content="moving"][data-mode="bottom"] .bs-footer{transform:translateY( clamp( calc(-1 * var(--bs-footer-lift-max,0px)),calc(var(--bs-size,0px) - var(--bs-max-size,0px)),0px ) )}.bs-sheet[data-bs-fit-content="moving"][data-mode="bottom"][data-bs-webgl="on"] .bs-footer{background:var(--bs-surface,var(--bs-surface-d))}.bs-sheet[data-mode="bottom"]:has(.bs-footer:not([hidden]):has(*)){padding-bottom:0}.bs-header:not(:has(*)),.bs-footer:not(:has(*)),.bs-header[hidden],.bs-footer[hidden]{display:none}.bs-screen{position:absolute;inset:0;pointer-events:none;z-index:var(--bs-z-scrim);background:var(--bs-scrim-color,var(--bs-scrim-color-d));backdrop-filter:blur(var(--bs-scrim-blur,0px));-webkit-backdrop-filter:blur(var(--bs-scrim-blur,0px));transition:opacity 0.24s cubic-bezier(0.22,1,0.36,1);will-change:opacity}.bs-root[data-dragging="true"] .bs-screen,.bs-root[data-animating="true"] .bs-screen{transition:none}.bs-scrim-overlay{z-index:calc(var(--bs-z-sheet) + 1);pointer-events:none}.bs-button-slot{position:fixed;z-index:calc(var(--bs-z-sheet) + 1);pointer-events:auto}.bs-button-slot[data-side="left"]{left:16px;bottom:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-side="right"]{right:16px;bottom:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-mode="top"]{bottom:auto;top:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-mode="left"]{left:calc(var(--bs-size,0px) + 12px);right:auto;bottom:auto;top:16px}.bs-button-slot[data-mode="right"]{right:calc(var(--bs-size,0px) + 12px);left:auto;bottom:auto;top:16px}@media (prefers-reduced-motion:reduce){.bs-backdrop,.bs-handle::before,.bs-button-slot[data-side="left"],.bs-button-slot[data-side="right"]{transition:none !important}}@media (prefers-color-scheme:dark){:where(.bs-root){--bs-surface-d:#1a1a1d;--bs-surface-border-d:rgba(255,255,255,0.08);--bs-handle-color-d:rgba(255,255,255,0.45);--bs-shadow-auto:0 -3px 16px rgba(0,0,0,0.5)}}@media (forced-colors:active){.bs-sheet{border:1px solid CanvasText}.bs-handle::before{background:CanvasText;forced-color-adjust:none}.bs-backdrop,.bs-screen{forced-color-adjust:none}}.bs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:where(.ovl-root){--ovl-surface:var(--bs-surface,var(--bs-surface-d,#ffffff));--ovl-surface-border:var(--bs-surface-border,var(--bs-surface-border-d,rgba(0,0,0,0.08)));--ovl-shadow:0 -8px 40px rgba(0,0,0,0.35);--ovl-radius:var(--bs-radius,var(--bs-radius-d,20px));--ovl-backdrop-color:rgba(0,0,0,0.5);--ovl-z-backdrop:200;--ovl-z-panel:201}.ovl-backdrop{position:fixed;inset:0;background:var(--ovl-backdrop-color);opacity:0;pointer-events:none;z-index:var(--ovl-z-backdrop)}.ovl-panel{position:fixed;background:var(--ovl-surface);box-shadow:var(--ovl-shadow);z-index:var(--ovl-z-panel);-webkit-tap-highlight-color:transparent;outline:none;transition:transform 0.32s cubic-bezier(0.29,1.24,0.84,0.99),opacity 0.32s ease-out}.ovl-panel[data-state="open"]{transform:translate3d(0,0,0);opacity:1}@starting-style{.ovl-panel[data-edge="bottom"][data-state="open"]{transform:translate3d(0,100%,0);opacity:0}.ovl-panel[data-edge="top"][data-state="open"]{transform:translate3d(0,-100%,0);opacity:0}.ovl-panel[data-edge="left"][data-state="open"]{transform:translate3d(-100%,0,0);opacity:0}.ovl-panel[data-edge="right"][data-state="open"]{transform:translate3d(100%,0,0);opacity:0}}.ovl-panel[data-edge="bottom"]{left:0;right:0;bottom:0;width:100%;border-top-left-radius:var(--ovl-radius);border-top-right-radius:var(--ovl-radius);border-top:1px solid var(--ovl-surface-border);padding-bottom:env(safe-area-inset-bottom)}.ovl-panel[data-edge="top"]{left:0;right:0;top:0;width:100%;border-bottom-left-radius:var(--ovl-radius);border-bottom-right-radius:var(--ovl-radius);border-bottom:1px solid var(--ovl-surface-border);padding-top:env(safe-area-inset-top)}.ovl-panel[data-edge="left"]{top:0;bottom:0;left:0;height:100%;border-top-right-radius:var(--ovl-radius);border-bottom-right-radius:var(--ovl-radius);border-right:1px solid var(--ovl-surface-border)}.ovl-panel[data-edge="right"]{top:0;bottom:0;right:0;height:100%;border-top-left-radius:var(--ovl-radius);border-bottom-left-radius:var(--ovl-radius);border-left:1px solid var(--ovl-surface-border)}@media (prefers-reduced-motion:reduce){.ovl-panel,.ovl-backdrop{transition:none !important}}'});var Re,Dn,kn,On=m(()=>{"use strict";Re=t=>{let e=document.createElement("slot");return e.name=t,e},Dn=(t,e)=>{let i=document.createElement("div");i.className=e,i.setAttribute("part",t);let n=Re(t);i.appendChild(n);let s=()=>{i.hidden=n.assignedNodes({flatten:!0}).length===0};return n.addEventListener("slotchange",s),s(),i},kn=()=>{let t=document.createElement("div");t.className="bs-root";let e=document.createElement("div");e.className="bs-backdrop",e.setAttribute("part","backdrop");let i=document.createElement("div");i.className="bs-screen",i.setAttribute("part","screen"),i.appendChild(Re("screen"));let n=document.createElement("section");n.className="bs-sheet",n.setAttribute("part","sheet"),n.setAttribute("role","dialog"),n.setAttribute("aria-modal","false");let s=document.createElement("div");s.className="bs-button-slot",s.setAttribute("data-side","left"),s.setAttribute("part","left-button"),s.appendChild(Re("leftButton"));let r=document.createElement("div");r.className="bs-button-slot",r.setAttribute("data-side","right"),r.setAttribute("part","right-button"),r.appendChild(Re("rightButton"));let o=document.createElement("div");o.className="bs-handle",o.setAttribute("part","handle"),o.setAttribute("role","slider"),o.setAttribute("tabindex","0"),o.setAttribute("aria-label","Resize sheet");let l=Dn("header","bs-header"),c=document.createElement("div");c.className="bs-content",c.setAttribute("part","content"),c.setAttribute("tabindex","0"),c.setAttribute("role","region"),c.setAttribute("aria-label","Sheet content");let u=document.createElement("slot");c.appendChild(u);let d=Dn("footer","bs-footer"),h=document.createElement("span");h.className="bs-sr-announce",h.setAttribute("role","status"),h.setAttribute("aria-live","polite"),h.setAttribute("aria-atomic","true"),h.style.cssText="position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);",n.append(o,l,c,d),t.append(e,i,n,s,r,h);let p=document.createDocumentFragment();return p.appendChild(t),{fragment:p,refs:{sheet:n,handle:o,header:l,content:c,footer:d,backdrop:e,screen:i,leftButton:s,rightButton:r,announcer:h}}}});var ct,ut,ht,J,pt,Pn,mt,ft,gt,bt,vt,yt,ee,te,ie,ne,B,ke,St,se,re,xt,oe,ae,O,Ln,Fn,Rs,In,Hn,Ds,ks,At,_n,Os,Tt,De,le,Is,Ps,Bn,Nn=m(()=>{"use strict";ct="snap-points",ut="allowed",ht="initial",J="mode",pt="backdrop",Pn="stylesheet",mt="animation",ft="focus-trap",gt="close-on-escape",bt="lock-body-scroll",vt="sheet-label",yt="stack-effect",ee="persistent",te="disable-close",ie="disable-drag",ne="drag-from",B="drag-from-content",ke="fit-content-to-snap",St="close-on-route-change",se="radius",re="max-height",xt="return-focus-to",oe="backdrop-color",ae="scrim-color",O="snap",Ln=new Set([J,se,re,oe,ae,O,ee,te,ie,ne,B]),Fn=[ct,ut,ht,J,pt,mt,ft,gt,bt,vt,yt,ee,te,ie,ne,B,ke,St,se,re,xt,oe,ae,O],Rs=t=>!!t&&typeof t=="object"&&typeof t.id=="string"&&(typeof t.size=="number"||typeof t.size=="string"),In=[{id:"full",size:"full"}],Hn=t=>{if(!t)return In;try{let e=JSON.parse(t);if(Array.isArray(e)&&e.length>0&&e.every(Rs))return e;if(Array.isArray(e))return In}catch{}return t.split(",").map(e=>e.trim()).filter(Boolean).map(e=>{let[i,n]=e.split(":").map(o=>o.trim()),s=Number(n),r=Number.isFinite(s)?s:n;return{id:i??"default",size:r}})},Ds=["bottom","top","left","right"],ks=["spring","tween","ios-spring","material-bounce","linear","snappy"],At=t=>t&&Ds.includes(t)?t:"bottom",_n=t=>t&&ks.includes(t)?t:void 0,Os=["handle","sheet","zones"],Tt=t=>t&&Os.includes(t)?t:void 0,De=t=>t?t.split(",").map(e=>e.trim()).filter(Boolean):void 0,le=t=>{if(t===null)return;let e=Number(t);return Number.isFinite(e)&&t.trim()!==""?e:t},Is=["top-left","top-center","top-right","center-left","center","center-right","bottom-left","bottom-center","bottom-right","sheet-top-left","sheet-top-center","sheet-top-right","dock-bottom","dock-top"],Ps=["fade","scale","slide","pop","none"],Bn=t=>{let e=t.getAttribute("data-position"),i=t.getAttribute("data-animation"),n=De(t.getAttribute("data-show-on")),s=De(t.getAttribute("data-fade-range")),r=s?.length===2&&s.every(o=>Number.isFinite(Number(o)))?[Number(s[0]),Number(s[1])]:void 0;return{position:e&&Is.includes(e)?e:void 0,inset:t.getAttribute("data-inset")??void 0,showOn:n,fadeRange:r,interactive:t.getAttribute("data-interactive")!=="false",animation:i&&Ps.includes(i)?i:void 0}}});var Kn={};Dt(Kn,{BottomSheetElement:()=>N,defineBottomSheet:()=>Et});var Ls,N,Et,wt=m(()=>{"use strict";Mn();Rn();On();Nn();Ls=typeof HTMLElement<"u"?HTMLElement:class{},N=class extends Ls{constructor(){super();a(this,"engine",null);a(this,"root");a(this,"offHandlers",[]);a(this,"refs");a(this,"backdropClickHandler",null);a(this,"stylesheetLinked",!1);a(this,"declarativeAnchors",[]);a(this,"lastActiveId",null);this.root=this.attachShadow({mode:"open"});let i=document.createElement("style");i.textContent=zn,this.root.appendChild(i);let n=document.createElement("style");n.textContent=[":host { display: contents; }",".bs-handle:focus-visible {"," outline: 2px solid currentColor;"," outline-offset: -2px;"," border-radius: var(--bs-radius, 20px);","}","@media (forced-colors: active) {"," .bs-handle:focus-visible { outline: 2px solid CanvasText; }","}"].join(`
2
- `),this.root.appendChild(n);let{fragment:s,refs:r}=kn();this.refs=r,this.root.appendChild(s)}static get observedAttributes(){return Fn.slice()}connectedCallback(){if(!this.stylesheetLinked){this.stylesheetLinked=!0;let i=this.getAttribute(Pn);if(i){let n=document.createElement("link");n.rel="stylesheet",n.href=i,this.root.appendChild(n)}}this.initEngine()}disconnectedCallback(){this.teardownEngine()}attributeChangedCallback(i,n,s){if(this.engine){if(Ln.has(i)){this.applyLiveAttribute(i,s);return}this.teardownEngine(),this.initEngine()}}applyLiveAttribute(i,n){if(this.engine)switch(i){case se:{let s=le(n);s!==void 0&&this.engine.setRadius(s);break}case re:{let s=le(n);s!==void 0&&this.engine.setMaxHeight(s);break}case oe:case ae:this.engine.setScrimColor(n);break;case ee:this.engine.setPersistent(n==="true");break;case te:this.engine.setDisableClose(n==="true");break;case ie:this.engine.setDisableDrag(n==="true");break;case B:this.engine.setDragFromContent(n!=="false");break;case ne:{let s=Tt(n);s&&this.engine.setDragFrom(s);break}case J:this.engine.setMode(At(n));break;case O:n&&n!==this.engine.state.activeId&&this.engine.snapTo(n);break}}getEngine(){return this.engine}teardownEngine(){this.lastActiveId=this.engine?.state.activeId??this.lastActiveId,this.offHandlers.forEach(i=>i()),this.offHandlers=[],this.backdropClickHandler&&(this.refs.backdrop.removeEventListener("click",this.backdropClickHandler),this.backdropClickHandler=null),this.engine?.destroy(),this.engine=null;for(let i of this.declarativeAnchors)this.appendChild(i);this.declarativeAnchors=[]}initEngine(){let{sheet:i,handle:n,content:s,backdrop:r,announcer:o}=this.refs,l=At(this.getAttribute(J));i.setAttribute("data-mode",l),this.refs.leftButton.setAttribute("data-mode",l),this.refs.rightButton.setAttribute("data-mode",l);let c=this.getAttribute(ft)==="true";c?i.setAttribute("aria-modal","true"):i.removeAttribute("aria-modal"),i.setAttribute("aria-label",this.getAttribute(vt)??"Bottom sheet");let u=this.getAttribute(pt)!=="false";r.style.display=u?"":"none",u&&(this.backdropClickHandler=()=>{this.engine?.canDismiss()&&this.engine.close("backdrop")},r.addEventListener("click",this.backdropClickHandler));let d=Hn(this.getAttribute(ct)),h=this.getAttribute(ht)??void 0,p=this.lastActiveId&&d.some(f=>f.id===this.lastActiveId)?this.lastActiveId:h,b={element:i,handle:n,scrollContainer:s,backdrop:u?r:void 0,scrim:this.refs.screen,mode:l,snapPoints:d,allowed:De(this.getAttribute(ut)),initial:p,animation:_n(this.getAttribute(mt)),focusTrap:c,closeOnEscape:this.getAttribute(gt)!=="false",lockBodyScroll:this.getAttribute(bt)!=="false",stackEffect:this.getAttribute(yt)==="true",persistent:this.getAttribute(ee)==="true",disableClose:this.getAttribute(te)==="true",disableDrag:this.getAttribute(ie)==="true",dragFrom:Tt(this.getAttribute(ne)),dragFromContent:this.getAttribute(B)===null?void 0:this.getAttribute(B)!=="false",fitContentToSnap:this.hasAttribute(ke)&&this.getAttribute(ke)!=="false",closeOnRouteChange:this.getAttribute(St)==="true",radius:le(this.getAttribute(se)),maxHeight:le(this.getAttribute(re)),returnFocusTo:this.getAttribute(xt)??void 0};this.engine=new ze(b),i.setAttribute("data-active",this.engine.state.activeId);let g=this.getAttribute(ae)??this.getAttribute(oe);g!==null&&this.engine.setScrimColor(g);for(let f of Array.from(this.querySelectorAll('[slot="anchor"]')))this.declarativeAnchors.push(f),this.engine.addAnchor({...Bn(f),element:f});this.offHandlers=[this.engine.on("snap",f=>{i.setAttribute("data-active",f.id),o.textContent=f.id,this.dispatchEvent(new CustomEvent("snap",{detail:f}))}),this.engine.on("before-snap",f=>{this.dispatchEvent(new CustomEvent("before-snap",{detail:f,cancelable:!0}))||f.cancel()}),this.engine.on("open",f=>this.dispatchEvent(new CustomEvent("open",{detail:f}))),this.engine.on("close",()=>this.dispatchEvent(new CustomEvent("close"))),this.engine.on("progress",f=>this.dispatchEvent(new CustomEvent("progress",{detail:f}))),this.engine.on("before-close",f=>{this.dispatchEvent(new CustomEvent("before-close",{detail:f,cancelable:!0}))||f.cancel()}),this.engine.on("opened",f=>this.dispatchEvent(new CustomEvent("opened",{detail:f}))),this.engine.on("closed",()=>this.dispatchEvent(new CustomEvent("closed"))),this.engine.on("dragstart",f=>this.dispatchEvent(new CustomEvent("drag-start",{detail:f}))),this.engine.on("dragend",f=>this.dispatchEvent(new CustomEvent("drag-end",{detail:f}))),this.engine.on("drag",f=>this.dispatchEvent(new CustomEvent("drag",{detail:f})))]}snapTo(i){return this.engine?.snapTo(i)??Promise.resolve()}open(i){return this.engine?.open(i)??Promise.resolve()}close(i){return this.engine?.close(i)??Promise.resolve()}expand(){return this.engine?.expand()??Promise.resolve()}collapse(){return this.engine?.collapse()??Promise.resolve()}isTop(){return this.engine?.isTop()??!1}depth(){return this.engine?.depth()??0}canDismiss(){return this.engine?.canDismiss()??!1}setRadius(i){this.engine?.setRadius(i)}setMaxHeight(i){this.engine?.setMaxHeight(i)}setAllowed(i,n){this.engine?.setAllowed(i,n)}addAnchor(i){return this.engine?.addAnchor(i)??(()=>{})}setScrimStages(i){return this.engine?.setScrimStages(i)??(()=>{})}recompute(){this.engine?.recompute()}get sheetState(){return this.engine?.state??null}get snap(){return this.engine?.state.activeId??this.getAttribute(O)}set snap(i){if(i===null){this.removeAttribute(O);return}this.engine?i!==this.engine.state.activeId&&this.engine.snapTo(i):this.setAttribute(O,i)}},Et=(t="bottom-sheet")=>{typeof customElements>"u"||customElements.get(t)||customElements.define(t,class extends N{})}});var Fs={};Dt(Fs,{BottomSheetElement:()=>N,defineBottomSheet:()=>Et});wt();typeof window<"u"&&typeof customElements<"u"&&Promise.resolve().then(()=>(wt(),Kn)).then(({defineBottomSheet:t})=>{t()});return Yn(Fs);})();
1
+ "use strict";var surdeddd_bottomSheet=(()=>{var ge=Object.defineProperty;var Un=Object.getOwnPropertyDescriptor;var $n=Object.getOwnPropertyNames;var qn=Object.prototype.hasOwnProperty;var Yn=(t,e,i)=>e in t?ge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var m=(t,e,i)=>()=>{if(i)throw i[0];try{return t&&(e=t(t=0)),e}catch(n){throw i=[n],n}};var It=(t,e)=>{for(var i in e)ge(t,i,{get:e[i],enumerable:!0})},Zn=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of $n(e))!qn.call(t,s)&&s!==i&&ge(t,s,{get:()=>e[s],enumerable:!(n=Un(e,s))||n.enumerable});return t};var Xn=t=>Zn(ge({},"__esModule",{value:!0}),t);var a=(t,e,i)=>Yn(t,typeof e!="symbol"?e+"":e,i);var Be,O,Lt=m(()=>{"use strict";Be=class{constructor(){a(this,"entries",[])}push(e){return this.entries.push(e),this.recompute(),()=>this.remove(e.id)}remove(e){let i=this.entries.findIndex(n=>n.id===e);i!==-1&&(this.entries.splice(i,1),this.recompute())}promote(e){let i=this.entries.findIndex(n=>n.id===e);if(i!==-1){if(i!==this.entries.length-1){let[n]=this.entries.splice(i,1);this.entries.push(n)}this.recompute()}}update(){this.recompute()}size(){return this.entries.length}depthOf(e){let i=[];for(let s of this.entries)(!s.isOpen||s.isOpen())&&i.push(s);let n=i.findIndex(s=>s.id===e);return n===-1?0:i.length-1-n}clear(){this.entries=[]}recompute(){let e=null,i=[];for(let n of this.entries)(!n.isOpen||n.isOpen())&&(e=n,i.push(n));!e&&this.entries.length>0&&(e=this.entries[this.entries.length-1]),this.entries.forEach((n,s)=>{if(n.setZIndex(100+s*10),n.setIsTop(n===e),n.setDepth){let r=i.indexOf(n);n.setDepth(r===-1?0:i.length-1-r)}})}},O=new Be});function Ne(t){switch(t){case"bottom":return e=>`translate3d(0, ${e}px, 0)`;case"top":return e=>`translate3d(0, ${-e}px, 0)`;case"left":return e=>`translate3d(${-e}px, 0, 0)`;case"right":return e=>`translate3d(${e}px, 0, 0)`}}var Pt,I,be=m(()=>{"use strict";Pt=(t,e)=>t==="bottom"?e.m42:t==="top"?-e.m42:t==="left"?-e.m41:e.m41,I=t=>t==="left"||t==="right"?"width":"height"});function Ve(t){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`${t}-${crypto.randomUUID()}`:(Ke[t]=(Ke[t]??0)+1,`${t}-${Ke[t]}`)}var Ke,Ft=m(()=>{"use strict";Ke={}});function Ht(){let t=new Map;return{on(e,i){let n=t.get(e);return n||(n=new Set,t.set(e,n)),n.add(i),()=>{n.delete(i)}},emit(e,i){let n=t.get(e);if(n)for(let s of[...n])s(i)},listenerCount(e){return t.get(e)?.size??0},clear(){t.clear()}}}var _t=m(()=>{"use strict"});var A,Bt,jn,Kt,Nt,Qn,ve,Vt=m(()=>{"use strict";A=null,Bt="data-bs-probe",jn=t=>{if(typeof document>"u")return null;if(!A||!A.isConnected){let e=document.querySelector(`[${Bt}]`);e?A=e:(A=document.createElement("div"),A.setAttribute("aria-hidden","true"),A.setAttribute(Bt,""),A.style.cssText="position:absolute;visibility:hidden;pointer-events:none;contain:strict;left:0;top:0;width:0;height:0;",document.body.appendChild(A))}return t==="vertical"?(A.style.width="0",A.style.height=""):(A.style.height="0",A.style.width=""),A},Kt=t=>t==="bottom"||t==="top",Nt=t=>typeof window>"u"?0:Kt(t)?window.innerHeight:window.innerWidth,Qn=/^(-?\d+(?:\.\d+)?)%$/,ve=(t,e,i)=>{if(typeof t=="number")return Math.max(0,t);if(t==="full")return Nt(e);if(t==="fit"||t==="content")return Math.max(0,i?.()??0);let n=t.match(Qn);if(n){let o=parseFloat(n[1])/100;return Math.max(0,Nt(e)*o)}let s=Kt(e)?"vertical":"horizontal",r=jn(s);return r?s==="vertical"?(r.style.height=t,Math.max(0,r.getBoundingClientRect().height)):(r.style.width=t,Math.max(0,r.getBoundingClientRect().width)):0}});function x(...t){typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof console<"u"&&console.warn(...t)}var Y=m(()=>{"use strict"});var Gt,Jn,Ge,es,Wt,Z,ts,is,ns,Ut,X=m(()=>{"use strict";Vt();Y();Gt=(t,e,i)=>t.map(n=>{let s=ve(n.size,e,i);return!Number.isFinite(s)||s<0?(x(`[BottomSheet] snap "${n.id}" resolved to invalid size (${String(n.size)} \u2192 ${s}); clamped to 0.`),{id:n.id,size:0}):{id:n.id,size:s}}).sort((n,s)=>n.size-s.size),Jn=/(^|[^a-z])vh\b/i,Ge=t=>{for(let e of t)typeof e.size=="string"&&Jn.test(e.size)&&x(`[BottomSheet] snap "${e.id}" uses "vh" \u2014 prefer "dvh" on mobile (iOS Safari URL bar makes vh unstable). See https://web.dev/blog/viewport-units`)},es=(t,e,i,n=0,s=0)=>{let r=e.filter(u=>i.includes(u.id));if(r.length===0)return null;let o=t+n*s,l=r[0],c=Math.abs(o-l.size);for(let u=1;u<r.length;u++){let d=r[u],h=Math.abs(o-d.size);h<c&&(l=d,c=h)}return l},Wt=(t,e)=>{let i=t.filter(n=>e.includes(n.id));return i.length===0?{min:0,max:0}:{min:i[0].size,max:i[i.length-1].size}},Z=(t,e)=>e.find(i=>i.id===t)??null,ts=.4,is=12,ns=.15,Ut=t=>{let e=Math.abs(t.velocity),i=t.pointerKind==="mouse"?ts:t.flickVelocity,n=t.pointerKind==="mouse"?is:t.dragThreshold,s=0;if((e>i||e>ns)&&(s=t.velocity>0?1:-1),Math.abs(t.delta)<n&&s===0)return Z(t.activeId,t.resolved);let r=e>i?Math.min(e*180,t.maxAxisSize):0;return es(t.size,t.resolved,t.allowed,s,r)}});function We(t,e,i){let n=!1,s=!1;return t({...e,cancel:()=>{if(s){x(`[BottomSheet] ${i}.cancel() called asynchronously \u2014 ignored. cancel() must be invoked synchronously inside the listener.`);return}n=!0}}),s=!0,n}var $t=m(()=>{"use strict";Y()});var ye,qt=m(()=>{"use strict";X();ye=class{constructor(e,i,n,s,r){a(this,"mode",n);a(this,"measureFit",s);a(this,"onMaxAxisSizeChange",r);a(this,"raw");a(this,"allowedIds");a(this,"resolved",[]);a(this,"maxAxisSize",0);a(this,"rangeCache",null);a(this,"notified",!1);this.raw=e,this.allowedIds=i??e.map(o=>o.id),this.recompute()}recompute(){let e=this.measureFit,i,n=e?()=>i??(i=e()):void 0;this.resolved=Gt(this.raw,this.mode,n);let s=this.resolved.reduce((o,l)=>l.size>o?l.size:o,0);this.rangeCache=null;let r=s!==this.maxAxisSize||!this.notified;this.maxAxisSize=s,this.notified=!0,r&&this.onMaxAxisSizeChange?.(this.maxAxisSize)}setRaw(e){this.raw=e,this.recompute()}setMode(e){e!==this.mode&&(this.mode=e,this.recompute())}setAllowedIds(e){this.allowedIds=e,this.rangeCache=null}findById(e){return Z(e,this.resolved)}findDragSettleTarget(e){return Ut({...e,resolved:this.resolved,allowed:this.allowedIds,maxAxisSize:this.maxAxisSize})}getAllowedRange(){return this.rangeCache??(this.rangeCache=Wt(this.resolved,this.allowedIds))}getResolvedSnaps(){return this.resolved}getAllowedIds(){return this.allowedIds}getMaxAxisSize(){return this.maxAxisSize}setMaxAxisSize(e){this.maxAxisSize=e,this.onMaxAxisSizeChange?.(e)}}});function Yt(t,e){if(t.length!==0){for(let i of t)if(i!==e)try{if(i.state.size===0)continue;let n=i.getAllowedIds(),s=i.getResolvedSnaps(),r=l=>s.find(c=>c.id===l)?.size??0,o=n.find(l=>r(l)>0);o&&o!==i.state.activeId&&i.snapTo(o)}catch(n){queueMicrotask(()=>{throw n})}}}var Zt=m(()=>{"use strict"});function jt(t){if(typeof window>"u")return()=>{};let e=()=>{let r=t.resolveActiveSnap(),o=t.getMaxAxisSize();return{target:r?Math.min(r.size,o):null,max:o}},i=()=>{if(t.isDestroyed())return;let r=e();t.recomputeSnaps();let o=t.getMode(),c=o==="bottom"||o==="top"?window.innerHeight:window.innerWidth,u=t.getMaxAxisSize();c>0&&c<u&&t.setMaxAxisSize(c);let d=e();if(r.target!==null&&d.target!==null&&Math.abs(d.target-r.target)<.5&&Math.abs(d.max-r.max)<.5)return;let h=t.isAnimating?.()??!1;t.cancelInFlight(),t.newCycle();let p=t.resolveActiveSnap(),v=t.getMaxAxisSize(),g=Math.min(p?p.size:t.getSize(),v);t.setSize(g),p&&!t.isDragging()&&(t.applySize(g),h&&t.resyncAfterCancel?.())},n=null;typeof ResizeObserver<"u"?(n=new ResizeObserver(i),n.observe(document.documentElement)):window.addEventListener("resize",i),window.addEventListener("orientationchange",i);let s=()=>{t.isDestroyed()||document.hidden&&t.cancelInFlight()};return document.addEventListener("visibilitychange",s),()=>{n?.disconnect(),window.removeEventListener("resize",i),window.removeEventListener("orientationchange",i),document.removeEventListener("visibilitychange",s)}}var Qt=m(()=>{"use strict"});function Jt(t){if(typeof ResizeObserver>"u")return()=>{};if(!t.hasFitSnap())return()=>{};let e=0,i=()=>{e||(e=requestAnimationFrame(()=>{e=0,!(t.isDestroyed()||t.isDragging())&&t.recompute()}))},n=new ResizeObserver(i);n.observe(t.handle);let s=t.scrollContainer,r=new Set,o=new Set,l=typeof HTMLSlotElement<"u",c=()=>d(),u=()=>{if(!(!s||!l))for(let p of Array.from(s.children))p instanceof HTMLSlotElement&&!o.has(p)&&(p.addEventListener("slotchange",c),o.add(p))},d=()=>{u();let p=ss(s);for(let v of r)p.includes(v)||(n.unobserve(v),r.delete(v));for(let v of p)r.has(v)||(n.observe(v),r.add(v));i()},h;return s&&(d(),typeof MutationObserver<"u"&&(h=new MutationObserver(d),h.observe(s,{childList:!0}))),()=>{n.disconnect(),h?.disconnect();for(let p of o)p.removeEventListener("slotchange",c);e&&cancelAnimationFrame(e)}}var ss,ei=m(()=>{"use strict";ss=t=>{if(!t)return[];let e=typeof HTMLSlotElement<"u",i=[];for(let n of Array.from(t.children))if(e&&n instanceof HTMLSlotElement)for(let s of n.assignedElements())i.push(s);else i.push(n);return i}});function ti(t){let e,i,n=()=>{let r=i;if(r===void 0){e=void 0;return}if(typeof r=="number"){e=r;return}if(typeof window>"u")return;let o=ve(r,t.mode);e=o>0?o:void 0};return{setRadius(r){t.element.style.setProperty("--bs-radius",typeof r=="number"?`${r}px`:r)},setMaxHeight(r){let o=typeof r=="number"?`${r}px`:r,l=I(t.mode);t.element.style.setProperty(l==="height"?"max-height":"max-width",o),i=r,n(),t.recompute()},resolveCap:n,clampTo:()=>{e!==void 0&&t.getMaxAxisSize()>e&&t.setMaxAxisSize(e)},getCap:()=>e}}var ii=m(()=>{"use strict";X();be()});var rs,os,ni,si=m(()=>{"use strict";be();rs=(t,e,i)=>{let n=i?"height":"width",s=t.style;if(!e){let v=s[n];s[n]="auto";let g=i?t.offsetHeight:t.offsetWidth;return s[n]=v,g}let r=e.style,o=s[n],l=r.flex,c=i?r.height:r.width;s[n]="auto",r.flex="none",i?r.height="auto":r.width="auto";let u=i?t.offsetHeight:t.offsetWidth,d=i?e.clientHeight:e.clientWidth,h=i?e.scrollHeight:e.scrollWidth,p=Math.max(u,u-d+h);return s[n]=o,r.flex=l,i?r.height=c:r.width=c,p},os=(t,e)=>{let i=t.offsetParent;return i&&i!==document.body&&i!==document.documentElement?e?i.clientHeight:i.clientWidth:e?window.innerHeight:window.innerWidth},ni=t=>{let e=I(t.mode)==="height",i=rs(t.element,t.scrollContainer,e),n=t.getMaxHeightCap(),s=n!==void 0?Math.min(i,n):i;if(typeof window>"u")return s;let r=os(t.element,e);return r>0?Math.min(s,r):s}});function ri(t){let e=t.mode==="bottom"||t.mode==="top",i=e?"ArrowUp":"ArrowRight",n=e?"ArrowDown":"ArrowLeft",s=t.mode==="top"?n:i,r=t.mode==="top"?i:n,o=l=>{if(t.isDestroyed())return;let c=t.getAllowedIds(),u=c.indexOf(t.getActiveId());u!==-1&&(l.key===s&&u<c.length-1?(l.preventDefault(),t.snapTo(c[u+1])):l.key===r&&u>0?(l.preventDefault(),t.snapTo(c[u-1])):l.key==="Home"?(l.preventDefault(),t.snapTo(c[0])):l.key==="End"&&(l.preventDefault(),t.snapTo(c[c.length-1])))};return t.handle.addEventListener("keydown",o),()=>t.handle.removeEventListener("keydown",o)}var oi=m(()=>{"use strict"});var Ue,ai=m(()=>{"use strict";Ue=Object.freeze({subtle:{color:"rgba(0,0,0,0.2)",blur:void 0,range:[.3,1],interactive:!1},standard:{color:"rgba(0,0,0,0.4)",blur:void 0,range:[0,1],interactive:!1},monitoring:{color:"rgba(15,15,20,0.55)",blur:"4px",range:[0,1],interactive:!1},cinematic:{color:"rgba(0,0,0,0.7)",blur:"12px",range:[0,1],interactive:!1}})});var D,$e=m(()=>{"use strict";D=class{constructor(){a(this,"last",-1)}shouldWrite(e,i){return Math.abs(e-this.last)<=i?!1:(this.last=e,!0)}invalidate(){this.last=-1}setLastWritten(e){this.last=e}get value(){return this.last}}});function as(t,e,i){let n=`calc(var(--bs-size, 0px) + ${i})`;switch(t){case"bottom":return e==="sheet-top-left"?{bottom:n,left:i}:e==="sheet-top-right"?{bottom:n,right:i}:{bottom:n,left:"50%",transform:"translateX(-50%)"};case"top":return e==="sheet-top-left"?{top:n,left:i}:e==="sheet-top-right"?{top:n,right:i}:{top:n,left:"50%",transform:"translateX(-50%)"};case"left":return e==="sheet-top-left"?{left:n,top:i}:e==="sheet-top-right"?{left:n,bottom:i}:{left:n,top:"50%",transform:"translateY(-50%)"};case"right":return e==="sheet-top-left"?{right:n,top:i}:e==="sheet-top-right"?{right:n,bottom:i}:{right:n,top:"50%",transform:"translateY(-50%)"}}}function H(t,e,i,n){switch(i){case"top-left":t.top=n,t.left=n;break;case"top-center":t.top=n,t.left="50%",t.transform="translateX(-50%)";break;case"top-right":t.top=n,t.right=n;break;case"center-left":t.top="50%",t.left=n,t.transform="translateY(-50%)";break;case"center":t.top="50%",t.left="50%",t.transform="translate(-50%, -50%)";break;case"center-right":t.top="50%",t.right=n,t.transform="translateY(-50%)";break;case"bottom-left":t.bottom=n,t.left=n;break;case"bottom-center":t.bottom=n,t.left="50%",t.transform="translateX(-50%)";break;case"bottom-right":t.bottom=n,t.right=n;break;case"sheet-top-left":case"sheet-top-center":case"sheet-top-right":{let s=as(e,i,n);s.top!==void 0&&(t.top=s.top),s.bottom!==void 0&&(t.bottom=s.bottom),s.left!==void 0&&(t.left=s.left),s.right!==void 0&&(t.right=s.right),s.transform!==void 0&&(t.transform=s.transform);break}}}var Se=m(()=>{"use strict"});var ds,cs,xe,di=m(()=>{"use strict";ai();X();$e();Y();Se();ds=/^-?\d+(?:\.\d+)?(?:px|em|rem|%)$/,cs="rgba(0, 0, 0, 0.4)",xe=class{constructor(e,i){a(this,"screenComponent");a(this,"backdrop");a(this,"mode");a(this,"isDestroyed");a(this,"getAllowedIds");a(this,"getResolvedSnaps");a(this,"snapToFn");a(this,"closeFn");a(this,"scrimInteractive",!1);a(this,"scrimMode");a(this,"backdropRange");a(this,"screenRange");a(this,"scrimEnabled",!0);a(this,"savedScrimRanges",null);a(this,"scrimTapToCloseEnabled",!1);a(this,"detachScrimTap",null);a(this,"scrimOverlayTeardown",null);a(this,"backdropOpacitySentinel",new D);a(this,"screenOpacitySentinel",new D);a(this,"lastBackdropPointer","");a(this,"lastScreenDisplay","");this.screenComponent=e.screenComponent,this.backdrop=e.backdrop,this.mode=e.mode,this.isDestroyed=e.isDestroyed,this.getAllowedIds=e.getAllowedIds,this.getResolvedSnaps=e.getResolvedSnaps,this.snapToFn=e.snapTo,this.closeFn=e.close,this.scrimMode=i.scrimMode??"full";let n=i.scrimPreset?Ue[i.scrimPreset]:null;this.backdropRange=i.backdropRange??n?.range??[0,1],this.screenRange=i.screenRange??n?.range??[0,1],this.scrimTapToCloseEnabled=i.scrimTapToClose??!1;let r=i.scrimColor??n?.color??(this.scrimMode!=="off"&&!this.backdrop?cs:void 0);if(this.screenComponent){if(this.applyScrimStyles({color:r,blur:i.scrimBlur??n?.blur,interactive:i.scrimInteractive??n?.interactive??!1}),this.scrimMode==="above-sheet")this.applyAboveSheetInset();else if(this.scrimMode==="off"){let o=this.screenComponent.style;o.opacity="0",o.display="none",this.screenOpacitySentinel.setLastWritten(0),this.lastScreenDisplay="none"}}}invalidateOpacityCache(){this.backdropOpacitySentinel.invalidate(),this.screenOpacitySentinel.invalidate()}attach(){this.scrimTapToCloseEnabled&&this.setScrimTapToClose(!0)}applyOpacity(e,i){if(!(!i&&this.backdropOpacitySentinel.value!==-1&&this.screenOpacitySentinel.value!==-1)){if(this.backdrop){let[n,s]=this.backdropRange,r=Math.max(s-n,1e-4),o=Math.min(Math.max((e-n)/r,0),1);this.backdropOpacitySentinel.shouldWrite(o,.005)&&(this.backdrop.style.opacity=String(o));let l=o>.05?"auto":"none";l!==this.lastBackdropPointer&&(this.backdrop.style.pointerEvents=l,this.lastBackdropPointer=l)}if(this.screenComponent&&this.scrimMode!=="off"){let[n,s]=this.screenRange,r=Math.min(1,Math.max(0,(e-n)/Math.max(1e-4,s-n)));this.screenOpacitySentinel.shouldWrite(r,.005)&&(this.screenComponent.style.opacity=String(r));let o=r>0?"":"none";o!==this.lastScreenDisplay&&(this.screenComponent.style.display=o,this.lastScreenDisplay=o)}}}setBackdropRange(e,i){this.isDestroyed()||(this.backdropRange=e,this.invalidateOpacityCache(),i())}setScreenRange(e,i){this.isDestroyed()||(this.screenRange=e,this.invalidateOpacityCache(),i())}setScrimColor(e){this.isDestroyed()||this.applyScrimStyles({color:e===void 0?null:e})}setScrimBlur(e){this.isDestroyed()||this.applyScrimStyles({blur:e===void 0?null:e})}setScrimInteractive(e){this.isDestroyed()||this.applyScrimStyles({interactive:e})}setSheetMode(e){this.isDestroyed()||e===this.mode||(this.mode=e,this.invalidateOpacityCache())}setScrimMode(e,i){if(this.isDestroyed()||e===this.scrimMode)return;this.invalidateOpacityCache();let n=this.scrimMode;if(this.scrimMode=e,this.screenComponent){let s=this.screenComponent.style;n==="above-sheet"&&e!=="above-sheet"&&(s.position="",s.inset="",s.pointerEvents=""),e==="above-sheet"?this.applyAboveSheetInset():e==="off"?(s.opacity="0",s.display="none",this.screenOpacitySentinel.setLastWritten(0),this.lastScreenDisplay="none"):this.lastScreenDisplay==="none"&&(s.display="",this.lastScreenDisplay="")}i()}setScrimTapToClose(e){if(this.isDestroyed()||!this.screenComponent)return;let i=this.detachScrimTap!==null;if(e!==i)if(e){let n=this.screenComponent;n.style.pointerEvents==="none"&&(n.style.pointerEvents="auto");let s=()=>{if(this.isDestroyed())return;if(this.closeFn){this.closeFn();return}let r=this.getAllowedIds(),o=this.getResolvedSnaps(),l=r.find(c=>{let u=Z(c,o);return u!==null&&u.size===0});l&&this.snapToFn(l)};n.addEventListener("click",s),this.detachScrimTap=()=>n.removeEventListener("click",s),this.scrimTapToCloseEnabled=!0}else this.detachScrimTap?.(),this.detachScrimTap=null,this.scrimTapToCloseEnabled=!1}setScrimEnabled(e,i){this.isDestroyed()||e!==this.scrimEnabled&&(this.scrimEnabled=e,this.invalidateOpacityCache(),e?(this.screenRange=this.savedScrimRanges?.screen??[0,1],this.backdropRange=this.savedScrimRanges?.backdrop??[0,1],this.savedScrimRanges=null):(this.savedScrimRanges={screen:this.screenRange,backdrop:this.backdropRange},this.screenRange=[1,1],this.backdropRange=[1,1]),i())}setScrim(e,i){if(this.isDestroyed())return;if(e.preset){let s=Ue[e.preset];this.applyScrimStyles({color:s.color,blur:s.blur??null,interactive:s.interactive}),!this.scrimEnabled&&this.savedScrimRanges?this.savedScrimRanges={screen:s.range,backdrop:s.range}:(this.screenRange=s.range,this.backdropRange=s.range)}let n=()=>{};e.mode!==void 0&&this.setScrimMode(e.mode,n),e.enabled!==void 0&&this.setScrimEnabled(e.enabled,n),e.tapToClose!==void 0&&this.setScrimTapToClose(e.tapToClose),this.applyScrimStyles({color:e.color,blur:e.blur,interactive:e.interactive}),e.range!==void 0&&(!this.scrimEnabled&&this.savedScrimRanges?this.savedScrimRanges={screen:e.range,backdrop:this.savedScrimRanges.backdrop}:this.screenRange=e.range),this.invalidateOpacityCache(),i()}setScrimOverlay(e){if(this.isDestroyed())return()=>{};if(!this.screenComponent)return()=>{};this.scrimOverlayTeardown?.();let i=this.screenComponent,n=e.inset??"16px",s=ds.test(n)?n:"16px";s!==n&&x(`[bottom-sheet] setScrimOverlay: invalid inset ${JSON.stringify(n)}; expected a CSS length like "16px" / "1rem" / "5%". Falling back to "16px".`),e.children.ownerDocument&&e.children.ownerDocument!==i.ownerDocument&&x("[bottom-sheet] setScrimOverlay: children belong to a different document than the scrim. Cross-document adoption can drop event listeners; construct children via the same document as the sheet root.");let r=e.position??"top-right",o=e.interactive??!0,l=i.ownerDocument.createElement("div");l.className="bs-scrim-overlay";let c=l.style;c.position="absolute",H(c,this.mode,r,s),o&&(c.pointerEvents="auto"),l.appendChild(e.children);let u=i.parentElement;if(!u)return x("[bottom-sheet] setScrimOverlay: scrim element has no parent, skipping overlay injection. Mount the sheet root before calling setScrimOverlay."),()=>{};u.appendChild(l);let d=()=>{l.parentNode&&l.parentNode.removeChild(l),this.scrimOverlayTeardown===d&&(this.scrimOverlayTeardown=null)};return this.scrimOverlayTeardown=d,d}destroy(){if(this.detachScrimTap?.(),this.detachScrimTap=null,this.scrimOverlayTeardown?.(),this.scrimOverlayTeardown=null,this.screenComponent){let e=this.screenComponent.style;e.opacity="",e.display="",e.position="",e.inset="",e.pointerEvents=""}this.backdrop&&(this.backdrop.style.opacity="",this.backdrop.style.pointerEvents=""),this.invalidateOpacityCache(),this.lastBackdropPointer="",this.lastScreenDisplay=""}applyScrimStyles(e){if(!this.screenComponent)return;let i=this.screenComponent.style;if(e.color!==void 0&&(i.background=e.color===null?"":e.color),e.blur!==void 0){let n=i;if(e.blur===null)i.backdropFilter="",n.webkitBackdropFilter="";else{let s=`blur(${e.blur})`;i.backdropFilter=s,n.webkitBackdropFilter=s}}e.interactive!==void 0&&(this.scrimInteractive=e.interactive,i.pointerEvents=e.interactive?"auto":"none")}applyAboveSheetInset(){if(!this.screenComponent)return;let e={bottom:"0 0 var(--bs-size) 0",top:"var(--bs-size) 0 0 0",left:"0 0 0 var(--bs-size)",right:"0 var(--bs-size) 0 0"},i=this.screenComponent.style;i.position="fixed",i.inset=e[this.mode],i.pointerEvents=this.scrimInteractive||this.scrimTapToCloseEnabled?"auto":"none"}}});var ci,us,ui,hi,pi,mi,Ae=m(()=>{"use strict";ci=t=>1+2.40158*Math.pow(t-1,3)+1.40158*Math.pow(t-1,2),us=t=>1-Math.pow(1-t,3),ui=t=>t,hi=t=>1-Math.pow(1-t,5),pi=({from:t,to:e,duration:i,easing:n=us,onUpdate:s})=>{let r=!1,o=0,l=null,c=performance.now(),u=new Promise(d=>{if(l=d,i<=0){s(e),d();return}let h=p=>{if(r)return;let v=Math.max(0,p-c),g=Math.min(v/i,1),b=t+(e-t)*n(g);s(b),g<1?o=requestAnimationFrame(h):d()};o=requestAnimationFrame(h)});return{cancel:()=>{r=!0,cancelAnimationFrame(o),l?.()},promise:u}},mi=()=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches});var qe,hs,fi,Ye=m(()=>{"use strict";qe={stiffness:220,damping:26,mass:1,restDelta:.5,restSpeed:.5},hs=1/30,fi=({from:t,to:e,velocity:i=0,config:n,onUpdate:s})=>{let r={...qe,...n},o=!1,l=0,c=null,u=t,d=i,h=performance.now(),p=new Promise(v=>{c=v;let g=b=>{if(o)return;let y=Math.min(Math.max(0,b-h)/1e3,hs);h=Math.max(h,b);let E=Math.max(1,Math.ceil(y*240)),C=y/E,R=E;for(;R-- >0;){let F=(-r.stiffness*(u-e)-r.damping*d)/r.mass;d+=F*C,u+=d*C}if(!Number.isFinite(u)||!Number.isFinite(d)){s(e,0),v();return}s(u,d),Math.abs(e-u)<(r.restDelta??.5)&&Math.abs(d)<(r.restSpeed??.5)?(s(e,0),v()):l=requestAnimationFrame(g)};l=requestAnimationFrame(g)});return{cancel:()=>{o=!0,cancelAnimationFrame(l),c?.()},promise:p}}});function gi(t){switch(t){case"ios-spring":return{kind:"spring",spring:{stiffness:300,damping:30,mass:1}};case"material-bounce":return{kind:"spring",spring:{stiffness:200,damping:22,mass:1}};case"linear":return{kind:"tween",duration:ps,easing:ui};case"snappy":return{kind:"tween",duration:180,easing:hi};case"tween":return{kind:"tween"};default:return{kind:"spring"}}}var ps,bi=m(()=>{"use strict";Ae();ps=220});function yi(t,e,i,n){let s={...qe,...n},r=1/Ze,o=vi/Ze*1e3,l=Math.ceil(ms/1e3*Ze),c=[t],u=t,d=i;for(let h=1;h<=l;h+=1){let p=-s.stiffness*(u-e)-s.damping*d;if(d+=p/s.mass*r,u+=d*r,!Number.isFinite(u)||!Number.isFinite(d)){c.push(e);break}if(h%vi===0&&c.push(u),Math.abs(e-u)<(s.restDelta??.5)&&Math.abs(d)<(s.restSpeed??.5))break}return c[c.length-1]!==e&&c.push(e),{values:c,stepMs:o,durationMs:(c.length-1)*o}}function Si(t,e,i,n){let s=Math.max(2,Math.min(60,Math.round(i/16))),r=[];for(let o=0;o<=s;o+=1){let l=o/s;r.push(t+(e-t)*n(l))}return r[r.length-1]=e,{values:r,stepMs:i/s,durationMs:i}}var Te,Ze,vi,ms,Xe=m(()=>{"use strict";Ye();Te="bs-settle",Ze=240,vi=4,ms=3e3});var fs,xi,Ee,Ai=m(()=>{"use strict";Ae();Ye();bi();Xe();fs=220,xi=1e3,Ee=class{constructor(e,i){a(this,"element");a(this,"getRootEl");a(this,"applySizeFn");a(this,"getSize");a(this,"isDragging");a(this,"applyAux");a(this,"getTransformFor");a(this,"readShownSize");a(this,"settleWaapi");a(this,"currentWaapi",null);a(this,"animationKind");a(this,"springConfig");a(this,"duration");a(this,"easing");a(this,"respectReducedMotion");a(this,"reducedMotion",!1);a(this,"detachReducedMotion",null);a(this,"viewTransitionsAvailable");a(this,"currentTween",null);a(this,"currentSpring",null);this.element=e.element,this.getRootEl=e.getRootEl,this.applySizeFn=e.applySize,this.getSize=e.getSize,this.isDragging=e.isDragging,this.applyAux=e.applyAux,this.getTransformFor=e.getTransformFor,this.readShownSize=e.readShownSize,this.settleWaapi=i.settleAnimation==="waapi";let n=gi(i.animation);this.animationKind=n.kind,this.duration=i.duration??n.duration??fs,this.easing=i.easing??n.easing??ci,this.springConfig={...n.spring??{},...i.spring??{}},this.respectReducedMotion=i.respectReducedMotion??!0;let s=i.viewTransitions??!1;if(this.viewTransitionsAvailable=s&&typeof document<"u"&&typeof document.startViewTransition=="function",this.respectReducedMotion&&typeof window<"u"&&typeof window.matchMedia=="function"){let r=window.matchMedia("(prefers-reduced-motion: reduce)");this.reducedMotion=r.matches;let o=l=>{this.reducedMotion=l.matches};typeof r.addEventListener=="function"?(r.addEventListener("change",o),this.detachReducedMotion=()=>r.removeEventListener("change",o)):typeof r.addListener=="function"&&(r.addListener(o),this.detachReducedMotion=()=>r.removeListener(o))}}get isAnimating(){return this.currentTween!==null||this.currentSpring!==null||this.currentWaapi!==null}cancelWaapi(){if(!this.currentWaapi)return;let e=this.currentWaapi;this.currentWaapi=null,e.stop();let i=this.readShownSize?.()??e.sizeNow();try{e.anim.cancel()}catch{}this.applySizeFn(i)}cancel(){this.currentTween?.cancel(),this.currentSpring?.cancel(),this.cancelWaapi()}async animateTo(e,i){if(e===this.getSize()){!this.isAnimating&&!this.isDragging()&&(this.applySizeFn(e),this.element.style.willChange="");return}if(this.currentTween?.cancel(),this.currentSpring?.cancel(),this.cancelWaapi(),this.getRootEl()?.setAttribute("data-animating","true"),this.element.style.willChange="transform",this.reducedMotion){this.applySizeFn(e),this.getRootEl()?.removeAttribute("data-animating"),this.isDragging()||(this.element.style.willChange="");return}if(this.settleWaapi&&this.applyAux&&this.getTransformFor&&typeof this.element.animate=="function"){let s=this.animationKind==="spring"?yi(this.getSize(),e,i*xi,this.springConfig):Si(this.getSize(),e,this.duration,this.easing);if(s.values.length>=2&&s.durationMs>0){await this.runWaapiSettle(s,e),this.isAnimating||(this.getRootEl()?.removeAttribute("data-animating"),this.isDragging()||(this.element.style.willChange=""));return}}let n=!1;if(this.animationKind==="spring"){let s=fi({from:this.getSize(),to:e,velocity:i*xi,config:this.springConfig,onUpdate:r=>this.applySizeFn(r)});this.currentSpring=s,await s.promise,n=this.currentSpring===s,n&&(this.currentSpring=null)}else{let s=pi({from:this.getSize(),to:e,duration:this.duration,easing:this.easing,onUpdate:r=>this.applySizeFn(r)});this.currentTween=s,await s.promise,n=this.currentTween===s,n&&(this.currentTween=null)}this.isAnimating||(this.getRootEl()?.removeAttribute("data-animating"),this.isDragging()||(n&&this.applySizeFn(this.getSize()),this.element.style.willChange=""))}async runWaapiSettle(e,i){let n=this.applyAux,s=this.getTransformFor,r=e.values.map(g=>({transform:s(g)})),o=this.element.animate(r,{duration:e.durationMs,easing:"linear",fill:"forwards"});o.id=Te;let l=!1,c=0,u=e.values.length-1,d=()=>{let g=Math.min((Number(o.currentTime)||0)/e.stepMs,u),b=Math.floor(g),y=e.values[b],E=e.values[Math.min(b+1,u)];return y+(E-y)*(g-b)},h=()=>{l||(n(d()),c=requestAnimationFrame(h))};c=requestAnimationFrame(h);let p={anim:o,stop:()=>{l=!0,cancelAnimationFrame(c)},sizeNow:d};this.currentWaapi=p;try{await o.finished}catch{}p.stop();let v=this.currentWaapi===p;if(v&&(this.currentWaapi=null),v&&o.playState==="finished"){this.applySizeFn(i);try{o.cancel()}catch{}}}destroy(){if(this.detachReducedMotion?.(),this.detachReducedMotion=null,this.currentTween=null,this.currentSpring=null,this.currentWaapi){let e=this.currentWaapi;this.currentWaapi=null,e.stop();try{e.anim.cancel()}catch{}}}}});var Ti,gs,Ei,je,bs,j,wi,Mi=m(()=>{"use strict";Ti=["a[href]","area[href]","button:not([disabled])","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","iframe","object","embed","[contenteditable='true']","[tabindex]:not([tabindex='-1'])"].join(","),gs=t=>typeof t.checkVisibility=="function"?t.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0}):t.offsetParent!==null,Ei=t=>{let e=Array.from(t.querySelectorAll(Ti));if(typeof HTMLSlotElement<"u")for(let i of Array.from(t.querySelectorAll("slot")))for(let n of i.assignedElements())n.matches(Ti)&&e.push(n),e.push(...Ei(n));return e},je=t=>Ei(t).filter(e=>!e.hasAttribute("inert")&&gs(e)&&!e.matches("[aria-hidden='true']")),bs=(t,e)=>{let i=e;for(;i;){if(i===t)return!0;let n=i.assignedSlot;if(n){i=n;continue}let s=i.parentNode;i=s instanceof ShadowRoot?s.host:s}return!1},j=[],wi=(t,e={})=>{if(typeof document>"u")return()=>{};let i={};j.push(i);let n=()=>j[j.length-1]===i,s=document.activeElement;(()=>{let u=e.initialFocus;if(u===!1){t.hasAttribute("tabindex")||(t.tabIndex=-1),t.focus({preventScroll:!0});return}(typeof u=="string"?t.querySelector(u):u??je(t)[0]??t)?.focus({preventScroll:!0})})();let o=u=>{if(!n())return;if(u.key==="Escape"&&e.onEscape){e.onEscape();return}if(u.key!=="Tab")return;let d=je(t);if(d.length===0){u.preventDefault();return}let h=d[0],p=d[d.length-1],v=document.activeElement;u.shiftKey&&v===h?(u.preventDefault(),p.focus()):!u.shiftKey&&v===p&&(u.preventDefault(),h.focus())},l=u=>{if(!n())return;let d=u.target;d&&!bs(t,d)&&je(t)[0]?.focus({preventScroll:!0})};document.addEventListener("keydown",o,!0),document.addEventListener("focusin",l,!0);let c=!1;return()=>{if(c)return;c=!0;let u=j.indexOf(i);u!==-1&&j.splice(u,1),document.removeEventListener("keydown",o,!0),document.removeEventListener("focusin",l,!0),s&&document.contains(s)?s.focus({preventScroll:!0}):document.querySelector("[data-bs-restore-fallback]")?.focus({preventScroll:!0})}}});var Q,M,Ci,zi=m(()=>{"use strict";Q=0,M=null,Ci=()=>{if(typeof document>"u")return()=>{};if(Q===0){let e=document.body;M={overflow:e.style.overflow,position:e.style.position,top:e.style.top,width:e.style.width,paddingRight:e.style.paddingRight,scrollY:window.scrollY};let i=window.innerWidth-document.documentElement.clientWidth;if(i>0){let n=parseFloat(getComputedStyle(e).paddingRight)||0;e.style.paddingRight=`${n+i}px`}e.style.overflow="hidden",e.style.position="fixed",e.style.top=`-${M.scrollY}px`,e.style.width="100%"}Q++;let t=!1;return()=>{if(!t&&(t=!0,Q=Math.max(0,Q-1),Q===0&&M)){let e=document.body;e.style.overflow=M.overflow,e.style.position=M.position,e.style.top=M.top,e.style.width=M.width,e.style.paddingRight=M.paddingRight,window.scrollTo(0,M.scrollY),M=null}}}});function Ri(t){let e=[];return{apply(){if(typeof document>"u")return;let i=t();for(;i.parentElement&&i.parentElement!==document.body;)i=i.parentElement;let n=i.parentElement??document.body;for(let s of Array.from(n.children))s!==i&&(s.hasAttribute("inert")||s.classList.contains("bs-backdrop")||s.classList.contains("bs-screen")||s.classList.contains("bs-root")||(s.setAttribute("inert",""),e.push(s)))},remove(){for(let i of e)i.removeAttribute("inert");e.length=0}}}var Di=m(()=>{"use strict"});var we,ki=m(()=>{"use strict";Mi();zi();Di();we=class{constructor(e,i){a(this,"element");a(this,"focusTrapEnabled");a(this,"initialFocus");a(this,"closeOnEscape");a(this,"bodyScrollLockEnabled");a(this,"inertSiblingsEnabled");a(this,"inertSiblings");a(this,"shouldApplyInertSiblings");a(this,"returnFocus");a(this,"releaseFocusTrap",null);a(this,"releaseScrollLock",null);a(this,"installed",!1);a(this,"destroyed",!1);this.element=e.element,this.focusTrapEnabled=i.focusTrap??!1,this.initialFocus=i.initialFocus,this.closeOnEscape=i.closeOnEscape??!0,this.bodyScrollLockEnabled=i.lockBodyScroll??!0,this.inertSiblingsEnabled=i.inertSiblings??!1,this.shouldApplyInertSiblings=i.shouldApplyInertSiblings??(()=>!0),this.returnFocus=i.returnFocus,this.inertSiblings=Ri(()=>this.element)}get isInstalled(){return this.installed}install(){this.destroyed||(this.installed=!0,this.bodyScrollLockEnabled&&!this.releaseScrollLock&&(this.releaseScrollLock=Ci()),this.focusTrapEnabled&&!this.releaseFocusTrap&&(this.releaseFocusTrap=wi(this.element,{initialFocus:this.initialFocus})),this.inertSiblingsEnabled&&this.shouldApplyInertSiblings()&&this.inertSiblings.apply())}setReturnFocus(e){this.destroyed||(this.returnFocus=e)}release(){this.installed&&(this.installed=!1,this.releaseFocusTrap?.(),this.releaseFocusTrap=null,this.releaseScrollLock?.(),this.releaseScrollLock=null,this.inertSiblings.remove(),this.returnFocus&&(typeof this.returnFocus=="function"?this.returnFocus():typeof this.returnFocus=="string"?typeof document<"u"?document.querySelector(this.returnFocus):null:this.returnFocus)?.focus?.())}destroy(){this.release(),this.destroyed=!0}}});var Oi,Qe,Ii,Li=m(()=>{"use strict";Oi=t=>t==="bottom"||t==="top",Qe=class{constructor(e){a(this,"slots");a(this,"capacity");a(this,"head",0);a(this,"size",0);this.capacity=e,this.slots=new Array(e);for(let i=0;i<e;i++)this.slots[i]={t:0,v:0}}push(e,i){let n=this.slots[this.head];n.t=e,n.v=i,this.head=(this.head+1)%this.capacity,this.size<this.capacity&&this.size++}pruneBefore(e,i){for(;this.size>i;){let n=(this.head-this.size+this.capacity)%this.capacity;if(this.slots[n].t<e)this.size--;else break}}get length(){return this.size}oldest(){if(this.size!==0)return this.slots[(this.head-this.size+this.capacity)%this.capacity]}newest(){if(this.size!==0)return this.slots[(this.head-1+this.capacity)%this.capacity]}reset(){this.head=0,this.size=0}},Ii=(t,e,i,n={})=>{let s=null,r="touch",o=0,l=0,c=0,u=!1,d=f=>f==="mouse"?160:120,h=32,p=new Qe(h),v=Oi(e)?"Y":"X",g=e==="bottom"||e==="right"?-1:1,b=f=>v==="Y"?f.clientY:f.clientX,y=f=>v==="Y"?f.clientX:f.clientY,E=f=>{try{t.setPointerCapture(f)}catch{}},C=()=>{s=null,u=!1,p.reset()},R=f=>{if(s===null&&!(f.button!==void 0&&f.button!==0)&&!(n.shouldStart&&!n.shouldStart(f))){if(s=f.pointerId,r=f.pointerType||"touch",o=b(f),l=y(f),c=o,p.reset(),p.push(f.timeStamp,o),n.deferStart){u=!0;return}E(f.pointerId),i.onStart(o,r)}},U=f=>{if(f.pointerId!==s)return;let S=b(f),z=(S-o)*g;if(u){let w=n.deferStart(f,z,y(f)-l);if(w===!1){C();return}if(w!==!0)return;u=!1,o=S,c=S,p.reset(),p.push(f.timeStamp,S),E(f.pointerId),i.onStart(o,r);return}c=S,p.push(f.timeStamp,S);let k=f.timeStamp-d(r);p.pruneBefore(k,2),i.onMove(z)},$=f=>{if(f.pointerId!==s)return;if(u){C();return}let q=(c-o)*g,z=0;if(p.length>=3){let w=p.oldest(),kt=p.newest(),Ot=kt.t-w.t;Ot>0&&(z=(kt.v-w.v)/Ot*g)}let k=r;s=null,p.reset();try{t.hasPointerCapture(f.pointerId)&&t.releasePointerCapture(f.pointerId)}catch{}i.onEnd(q,z,k)},F=f=>{if(f.pointerId!==s)return;let S=u;C(),!S&&i.onCancel?.()};t.addEventListener("pointerdown",R),t.addEventListener("pointermove",U),t.addEventListener("pointerup",$),t.addEventListener("pointercancel",F);let me=n.manageTouchAction!==!1,fe=t.style.touchAction;return me&&(t.style.touchAction=Oi(e)?"pan-x":"pan-y"),()=>{t.removeEventListener("pointerdown",R),t.removeEventListener("pointermove",U),t.removeEventListener("pointerup",$),t.removeEventListener("pointercancel",F),me&&(t.style.touchAction=fe),s!==null&&t.hasPointerCapture(s)&&t.releasePointerCapture(s)}}});function Je(t,e){let i=Math.min(e*.15,80);if(i<=0)return 0;let n=Math.abs(t);return Math.sign(t)*(i*n/(n+i))}var Pi=m(()=>{"use strict"});function Fi(t){if(typeof document>"u")return!1;let e=document.activeElement;if(!e||!t.contains(e))return!1;let i=e.tagName;if(!(i==="INPUT"||i==="TEXTAREA"||e.isContentEditable===!0))return!1;try{return e.blur(),!0}catch{return!1}}var Hi=m(()=>{"use strict"});var J,_i=m(()=>{"use strict";Li();Pi();Hi();J=class{constructor(e){a(this,"deps");a(this,"detach",null);a(this,"isDragging_",!1);a(this,"dragStartSize",0);a(this,"currentPointerKind","touch");a(this,"keyboardDismissed",!1);a(this,"dragSuppressed",!1);a(this,"dragPayload",{size:0,delta:0});this.deps=e}get isDragging(){return this.isDragging_}install(){return this.detach?this.detach:(this.detach=Ii(this.deps.handle,this.deps.mode,{onStart:(e,i)=>{if(this.deps.getDisableDrag?.()){this.dragSuppressed=!0;return}this.dragSuppressed=!1,this.deps.cancelAnimation(),this.isDragging_=!0,this.dragStartSize=this.deps.getDragContext().size,this.currentPointerKind=i,this.keyboardDismissed=!1,this.deps.getRoot()?.setAttribute("data-dragging","true"),this.deps.element.style.willChange="transform",this.deps.emit("dragstart",{size:this.dragStartSize})},onMove:e=>{if(this.dragSuppressed)return;let i=this.deps.getDragContext(),{min:n,max:s}=i.range,r=i.maxAxisSize,o=i.rubberBandEnabled,l=this.dragStartSize+e;l>s?l=o?s+Je(l-s,r):s:l<n&&(l=o?n-Je(n-l,r):n),this.deps.applySize(l),!this.keyboardDismissed&&this.currentPointerKind==="touch"&&this.deps.mode==="bottom"&&l<this.dragStartSize&&Fi(this.deps.element)&&(this.keyboardDismissed=!0),this.deps.listenerCount("drag")>0&&(this.dragPayload.size=l,this.dragPayload.delta=e,this.deps.emit("drag",this.dragPayload))},onEnd:(e,i,n)=>{if(this.dragSuppressed){this.dragSuppressed=!1;return}this.isDragging_=!1,this.keyboardDismissed=!1,this.deps.getRoot()?.removeAttribute("data-dragging"),this.deps.emit("dragend",{size:this.deps.getDragContext().size,velocity:i}),this.deps.settleAfterDrag(e,i,n)},onCancel:()=>{if(this.dragSuppressed){this.dragSuppressed=!1;return}this.isDragging_=!1,this.keyboardDismissed=!1,this.deps.getRoot()?.removeAttribute("data-dragging"),this.deps.emit("dragend",{size:this.deps.getDragContext().size,velocity:0});let e=this.dragStartSize;this.deps.animateTo(e,0)}},this.deps.gestureOptions),this.detach)}forceClearDragState(){this.isDragging_&&(this.isDragging_=!1,this.keyboardDismissed=!1,this.deps.getRoot()?.removeAttribute("data-dragging"),this.deps.element.style.willChange="")}}});function it(t,e){let i=vs(t);return i?i.closest(tt)?!1:e==="zones"?i.closest(et)!==null:!0:e!=="zones"}var et,tt,vs,Bi=m(()=>{"use strict";et="[data-bs-drag]",tt="[data-bs-no-drag]",vs=t=>{let e=t;return e&&typeof e.closest=="function"?e:null}});function Ni(t){let e=t.slop??6,i=t.crossDelta??0;return t.sharesScrollAxis??!0?Math.abs(t.delta)<e?"pending":t.scrollTop>0||t.delta>0&&t.atMaxSnap?"scroll":"drag":Math.abs(t.delta)<e&&Math.abs(i)<e?"pending":Math.abs(t.delta)<=Math.abs(i)?"scroll":"drag"}var Ki=m(()=>{"use strict"});var ys,Ss,Me,nt=m(()=>{"use strict";ys=t=>t==="start"||t==="end",Ss=t=>{if(!t)return"ltr";if(typeof getComputedStyle=="function")try{if(getComputedStyle(t).direction==="rtl")return"rtl"}catch{}try{let e=t.closest?.("[dir]");if(e)return e.getAttribute("dir")?.toLowerCase()==="rtl"?"rtl":"ltr"}catch{}return"ltr"},Me=(t,e)=>{if(!ys(t))return t;let i=Ss(e)==="rtl";return t==="start"?i?"right":"left":i?"left":"right"}});function st(t,e){let i=n=>{e()&&n.cancelable&&n.preventDefault()};return t.addEventListener("touchmove",i,{passive:!1}),()=>t.removeEventListener("touchmove",i)}var Vi=m(()=>{"use strict"});var ee,Gi=m(()=>{"use strict";ee=class{constructor(e,i){a(this,"handle",e);e.setAttribute("aria-orientation",i==="bottom"||i==="top"?"vertical":"horizontal")}setValue(e,i){if(e.length===0){this.handle.removeAttribute("aria-valuemin"),this.handle.removeAttribute("aria-valuemax"),this.handle.removeAttribute("aria-valuenow"),this.handle.removeAttribute("aria-valuetext");return}let n=Math.max(e.length-1,0),s=Math.max(e.indexOf(i),0);this.handle.setAttribute("aria-valuemin","0"),this.handle.setAttribute("aria-valuemax",String(n)),this.handle.setAttribute("aria-valuenow",String(s)),this.handle.setAttribute("aria-valuetext",i)}}});function Wi(t){let e=new Map,i=n=>{let s=t.getMaxAxisSize();return s<=0?!1:n<s/2};return{cache(n,s,r){let o=t.scrollContainer;o&&(i(s)||i(r)&&e.set(n,o.scrollTop))},restore(n,s,r){let o=t.scrollContainer;if(!o||i(r)||!i(s))return;let l=e.get(n);l!==void 0&&(o.scrollTop=l,e.delete(n))},clear(){e.clear()}}}var Ui=m(()=>{"use strict"});function xs(t,e){let i={frames:null,duration:0,easing:Ce};if(t==="none")return i;if(t===void 0||typeof t=="string")return{frames:$i[t??"fade"][e],duration:rt,easing:Ce};let n=e==="enter"?t.enter:t.exit;return n?{frames:n,duration:t.duration??rt,easing:t.easing??Ce}:t.preset==="none"?i:{frames:$i[t.preset??"fade"][e],duration:t.duration??rt,easing:t.easing??Ce}}function _(t,e,i){if((typeof e=="object"?e.respectReducedMotion!==!1:!0)&&mi())return ot;let{frames:s,duration:r,easing:o}=xs(e,i);if(!s||r<=0||typeof t.animate!="function")return ot;let l=t.animate(s,{duration:r,easing:o,fill:"both"});return{finished:l.finished.then(()=>{}).catch(()=>{}),cancel:()=>{try{l.cancel()}catch{return}}}}var rt,Ce,$i,ot,at=m(()=>{"use strict";Ae();rt=200,Ce="cubic-bezier(0.22, 1, 0.36, 1)",$i={fade:{enter:[{opacity:0},{opacity:1}],exit:[{opacity:1},{opacity:0}]},scale:{enter:[{opacity:0,transform:"scale(0.85)"},{opacity:1,transform:"scale(1)"}],exit:[{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.85)"}]},slide:{enter:[{opacity:0,transform:"translateY(10px)"},{opacity:1,transform:"translateY(0)"}],exit:[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(10px)"}]},pop:{enter:[{opacity:0,transform:"scale(0.6)",offset:0},{opacity:1,transform:"scale(1.06)",offset:.7},{opacity:1,transform:"scale(1)",offset:1}],exit:[{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.6)"}]}},ot={finished:Promise.resolve(),cancel:()=>{}}});function qi(t,e){let n=t.host.ownerDocument.createElement("div");n.className="bs-anchor";let s=e.interactive??!0,r=e.position??"sheet-top-right",o=r==="dock-bottom"||r==="dock-top",l=n.style;if(l.position="fixed",o?(l.left="0",l.right="0",r==="dock-bottom"?l.bottom="0":l.top="0"):H(l,t.mode,r,e.inset??"16px"),e.fadeRange){let[g,b]=e.fadeRange,y=Math.max(b-g,1e-4);l.opacity=`clamp(0, calc((var(--bs-progress, 0) - ${g}) / ${y}), 1)`}n.appendChild(e.element),t.host.appendChild(n);let c=null,u=null,d=g=>typeof e.showOn=="function"?e.showOn(g):Array.isArray(e.showOn)?e.showOn.includes(g.activeId):o||g.size>0,h=(g,b)=>{if(g===c)return;if(c=g,u?.cancel(),u=null,n.style.pointerEvents=g&&s?"auto":"none",g){n.style.visibility="",b&&(u=_(e.element,e.animation,"enter"));return}if(!b){n.style.visibility="hidden";return}let y=_(e.element,e.animation,"exit");u=y,y.finished.then(()=>{u===y&&c===!1&&(n.style.visibility="hidden")})},p=g=>{t.isDestroyed()||h(d(t.getState()),g)},v=[t.on("snap",()=>p(!0)),t.on("open",()=>p(!0)),t.on("close",()=>p(!0))];return p(!1),{wrapper:n,detach:()=>{v.forEach(g=>g()),u?.cancel(),u=null,n.parentNode&&n.parentNode.removeChild(n)},syncZ:g=>{n.style.zIndex=String(g)}}}var Yi=m(()=>{"use strict";Se();at()});function Xi(t,e){let i=t.host.ownerDocument,n=e.stages.map(d=>{let h=i.createElement("div");h.className="bs-scrim-stage";let p=h.style;return p.position="absolute",H(p,t.mode,d.position??e.position??"center",d.inset??e.inset??"16px"),p.visibility="hidden",p.pointerEvents="none",h.appendChild(d.element),t.host.appendChild(h),{def:d,wrapper:h,inFlight:null}}),s=null,r=()=>{let d=t.getState();return d.size===0?n.find(h=>Zi(h.def,d.activeId))??null:n.find(h=>Zi(h.def,d.activeId))??n.find(h=>As(h.def,d.progress))??null},o=(d,h)=>{if(d.inFlight?.cancel(),d.wrapper.style.pointerEvents="none",!h){d.inFlight=null,d.wrapper.style.visibility="hidden";return}let p=_(d.def.element,d.def.animation??e.animation,"exit");d.inFlight=p,p.finished.then(()=>{d.inFlight===p&&s!==d&&(d.wrapper.style.visibility="hidden")})},l=(d,h)=>{d.inFlight?.cancel(),d.inFlight=null,d.wrapper.style.visibility="",d.wrapper.style.pointerEvents=d.def.interactive??e.interactive??!1?"auto":"none",h&&(d.inFlight=_(d.def.element,d.def.animation??e.animation,"enter"))},c=d=>{if(t.isDestroyed())return;let h=r();if(h===s)return;let p=s;s=h,p&&o(p,d),h&&l(h,d)},u=[t.on("snap",()=>c(!0)),t.on("open",()=>c(!0)),t.on("close",()=>c(!0))];return n.some(d=>d.def.forRange)&&u.push(t.on("progress",()=>c(!0))),c(!1),()=>{u.forEach(d=>d());for(let d of n)d.inFlight?.cancel(),d.inFlight=null,d.wrapper.parentNode&&d.wrapper.parentNode.removeChild(d.wrapper);s=null}}var Zi,As,ji=m(()=>{"use strict";Se();at();Zi=(t,e)=>t.for===void 0?!1:Array.isArray(t.for)?t.for.includes(e):t.for===e,As=(t,e)=>{if(!t.forRange)return!1;let[i,n]=t.forRange;return e>=i&&e<=n}});function Qi(t,e){let i=t.allowed??t.snapPoints.map(s=>s.id),n=t.initial??i[0]??t.snapPoints[0]?.id??"default";if(t.persistKey){let s=ws(t.persistKey);s&&i.includes(s)&&(n=s)}return{mode:Me(t.mode??"bottom",t.element),flickVelocity:t.flickVelocity??Ts,dragThreshold:t.dragThreshold??Es,dragFrom:t.dragFrom??(t.handle?"handle":"sheet"),dragFromContent:t.dragFromContent??!0,rubberBandEnabled:t.rubberBand??!0,closeOnBack:t.closeOnBack??!1,persistent:t.persistent??!1,disableClose:t.disableClose??!1,disableDrag:t.disableDrag??!1,closeOnRouteChange:t.closeOnRouteChange??!1,radius:t.radius,maxHeight:t.maxHeight,initialAllowed:i,initialId:n,scrim:{scrimMode:t.scrimMode,scrimColor:t.scrimColor,scrimBlur:t.scrimBlur,scrimInteractive:t.scrimInteractive??(t.scrimTapToClose?!0:void 0),scrimTapToClose:t.scrimTapToClose,scrimPreset:t.scrimPreset,screenRange:t.screenRange,backdropRange:t.backdropRange},animation:{animation:t.animation,settleAnimation:t.settleAnimation,duration:t.duration,easing:t.easing,spring:t.spring,respectReducedMotion:t.respectReducedMotion,viewTransitions:t.viewTransitions},lifecycle:{focusTrap:t.focusTrap,initialFocus:t.initialFocus,closeOnEscape:t.closeOnEscape,lockBodyScroll:t.lockBodyScroll,inertSiblings:t.inertSiblings,shouldApplyInertSiblings:e?.shouldApplyInertSiblings,returnFocus:t.returnFocusTo}}}var Ts,Es,ws,Ji=m(()=>{"use strict";nt();Ts=.65,Es=18;ws=t=>{if(typeof window>"u"||typeof localStorage>"u")return null;try{return localStorage.getItem(t)}catch{return null}}});var B,lt=m(()=>{"use strict";B=class{constructor(){a(this,"fns",[])}add(e){e&&this.fns.push(e)}drain(){for(;this.fns.length;)try{this.fns.pop()()}catch(e){queueMicrotask(()=>{throw e})}}}});var Ms,ze,en=m(()=>{"use strict";Lt();be();Ft();_t();X();$t();Y();qt();Zt();Qt();ei();ii();si();oi();di();Ai();ki();_i();Bi();Ki();nt();Vi();Gi();Ui();Yi();ji();Ji();lt();$e();Ms=8,ze=class{constructor(e){a(this,"id",Ve("bs"));a(this,"element");a(this,"handle");a(this,"scrollContainer");a(this,"backdrop");a(this,"screenComponent");a(this,"scrimParent",null);a(this,"mode");a(this,"flickVelocity");a(this,"dragThreshold");a(this,"dragFromMode");a(this,"dragFromContentDefault");a(this,"rubberBandEnabled");a(this,"scrim");a(this,"aria");a(this,"animation");a(this,"lifecycle");a(this,"closeOnBack");a(this,"routedTo");a(this,"fitContentToSnap");a(this,"settleAnimation");a(this,"persistent");a(this,"disableCloseFlag");a(this,"disableDragFlag");a(this,"closeOnRouteChange");a(this,"maxHeight");a(this,"maxHeightDeps");a(this,"snapPointsRaw");a(this,"snaps");a(this,"activeId");a(this,"size",0);a(this,"gesture");a(this,"contentGesture");a(this,"detachSheetGesture",null);a(this,"detachSliderKeyboard",null);a(this,"rootEl",null);a(this,"destroyed",!1);a(this,"restClosed",!1);a(this,"currentViewTransition",null);a(this,"currentAbort",new AbortController);a(this,"sizeWriteSentinel",new D);a(this,"progressWriteSentinel",new D);a(this,"isTopSheet",!0);a(this,"opening",!1);a(this,"promotedForOpen",!1);a(this,"allowOvershoot",!1);a(this,"progressPayload",{value:0,size:0});a(this,"dragContextBuf",{size:0,maxAxisSize:0,range:{min:0,max:0},rubberBandEnabled:!1});a(this,"bus",Ht());a(this,"persistKey");a(this,"linkedSheets",[]);a(this,"scrollCache");a(this,"teardowns",new B);a(this,"anchors",[]);a(this,"anchorHost",null);a(this,"stackZ",100);a(this,"detachScrimStages",null);a(this,"stackEffectEnabled",!1);a(this,"stackEffectPrimed",!1);a(this,"fitDeps");a(this,"transformTemplate");a(this,"featureList",[]);a(this,"featureCtx");let i=Qi(e,{shouldApplyInertSiblings:()=>typeof document>"u"?!1:Array.from(document.body.children).some(o=>o===e.element||o.contains(e.element))});this.element=e.element,this.handle=e.handle??e.element,this.scrollContainer=e.scrollContainer,this.backdrop=e.backdrop,this.screenComponent=e.scrim??e.screenComponent,this.scrimParent=this.screenComponent?.parentElement??null,this.mode=i.mode,this.element.dataset.mode=this.mode,this.transformTemplate=Ne(this.mode),this.aria=new ee(this.handle,this.mode),this.flickVelocity=i.flickVelocity,this.dragThreshold=i.dragThreshold,this.dragFromMode=i.dragFrom,this.dragFromContentDefault=i.dragFromContent,this.rubberBandEnabled=i.rubberBandEnabled,this.scrim=new xe({mode:this.mode,screenComponent:this.screenComponent,backdrop:this.backdrop,isDestroyed:()=>this.destroyed,getAllowedIds:()=>this.snaps.getAllowedIds().slice(),getResolvedSnaps:()=>this.snaps.getResolvedSnaps().slice(),snapTo:r=>{this.snapTo(r)},close:()=>{this.canDismiss()&&this.close("backdrop")}},i.scrim),this.animation=new Ee({element:this.element,getRootEl:()=>this.rootEl,applySize:r=>this.applySize(r),getSize:()=>this.size,isDragging:()=>this.isDraggingAny(),applyAux:r=>this.applySize(r,!0),getTransformFor:r=>{let o=this.snaps.getMaxAxisSize(),l=o>0&&!this.allowOvershoot?Math.min(r,o):r;return this.transformTemplate(o-l)},readShownSize:()=>{let r=getComputedStyle(this.element).transform;if(!(!r||r==="none"))return this.snaps.getMaxAxisSize()-Pt(this.mode,new DOMMatrix(r))}},i.animation),this.lifecycle=new we({element:this.element,close:()=>this.close()},i.lifecycle),this.closeOnBack=i.closeOnBack,this.routedTo=e.routedTo,this.fitContentToSnap=e.fitContentToSnap===!0,this.settleAnimation=e.settleAnimation,this.persistent=i.persistent,this.disableCloseFlag=i.disableClose,this.disableDragFlag=i.disableDrag,this.closeOnRouteChange=i.closeOnRouteChange,this.stackEffectEnabled=e.stackEffect??!1,this.snapPointsRaw=e.snapPoints,this.persistKey=e.persistKey,e.linkedSheets&&(this.linkedSheets=e.linkedSheets);let n=new Map;for(let r of e.features??[])n.set(r.name,r);this.featureList=Array.from(n.values()),this.activeId=i.initialId,Ge(this.snapPointsRaw),this.auditDuplicateSnapIds(this.snapPointsRaw),this.rootEl=this.element.closest(".bs-root"),this.maxHeightDeps={element:this.element,mode:this.mode,getMaxAxisSize:()=>this.snaps.getMaxAxisSize(),setMaxAxisSize:r=>{this.snaps.setMaxAxisSize(r)},recompute:()=>this.recompute()},this.maxHeight=ti(this.maxHeightDeps),this.fitDeps={element:this.element,scrollContainer:this.scrollContainer,mode:this.mode,getMaxHeightCap:()=>this.maxHeight.getCap()},this.snaps=new ye(this.snapPointsRaw,i.initialAllowed,this.mode,()=>ni(this.fitDeps),r=>{this.element.style[I(this.mode)]=`${r}px`});let s=this.snaps.findById(this.activeId);if(s&&(this.size=s.size),this.applySize(this.size),this.setRestClosed(this.size===0),this.updateAriaSlider(),this.scrollCache=Wi({scrollContainer:this.scrollContainer,getMaxAxisSize:()=>this.snaps.getMaxAxisSize()}),this.featureCtx=this.buildFeatureContext(e.autoCollapseAfter),this.attach(),this.registerInStack(),this.snaps.getMaxAxisSize()===0&&typeof IntersectionObserver<"u"&&typeof document<"u"){let r=new IntersectionObserver(o=>{for(let l of o)if(l.isIntersecting){if(this.destroyed)return;this.snaps.recompute(),this.healActiveSnap(),r.disconnect();return}});r.observe(this.element),this.teardowns.add(()=>r.disconnect())}this.teardowns.add(Jt({handle:this.handle,scrollContainer:this.scrollContainer,hasFitSnap:()=>this.snapPointsRaw.some(r=>r.size==="fit"||r.size==="content"),isDestroyed:()=>this.destroyed,isDragging:()=>this.isDraggingAny(),recompute:()=>this.recompute()})),i.radius!==void 0&&this.setRadius(i.radius),i.maxHeight!==void 0&&this.setMaxHeight(i.maxHeight),this.applyAutoAriaLabelledBy(),this.runFeatureStage("post"),this.warnOrphanFeatureOptions(),this.size>0&&this.handleOpen()}buildFeatureContext(e){return{element:this.element,scrollContainer:this.scrollContainer,sheetId:this.id,options:{routedTo:this.routedTo,closeOnBack:this.closeOnBack,closeOnRouteChange:this.closeOnRouteChange,persistKey:this.persistKey,autoCollapseAfter:e,fitContentToSnap:this.fitContentToSnap,settleAnimation:this.settleAnimation},isDestroyed:()=>this.destroyed,isDragging:()=>this.isDraggingAny(),isAnimating:()=>this.animation.isAnimating,isTopSheet:()=>this.isTopSheet,isVerticalAxis:()=>this.mode==="bottom"||this.mode==="top",getSize:()=>this.size,getActiveId:()=>this.activeId,getAllowedIds:()=>this.snaps.getAllowedIds().slice(),allowedIdsBySize:()=>this.allowedIdsBySize(),getMaxAxisSize:()=>this.snaps.getMaxAxisSize(),resolveSnap:i=>this.snaps.findById(i),resolveActiveSnap:()=>this.snaps.findById(this.activeId),setSize:i=>{this.size=i},setMaxAxisSize:i=>{this.snaps.setMaxAxisSize(i)},applySize:i=>this.applySize(i),recomputeSnaps:()=>this.recomputeSnaps(),newCycle:()=>{this.newCycle()},cancelInFlight:()=>{this.animation.cancel()},resyncAfterResize:()=>this.resyncAfterResize(),snapTo:i=>{this.snapTo(i)},close:i=>this.close(i),attachDragSurface:(i,n)=>this.attachDragSurface(i,n),on:(i,n)=>this.on(i,n),addTeardown:i=>this.teardowns.add(i)}}runFeatureStage(e){for(let i of this.featureList){if((i.stage??"post")!==e)continue;let n=i.install(this.featureCtx);n&&this.teardowns.add(n)}}warnOrphanFeatureOptions(){let e=new Set(this.featureList.map(i=>i.name));(this.closeOnBack||this.routedTo!==void 0||this.closeOnRouteChange)&&!e.has("route")&&x("[BottomSheet] closeOnBack/routedTo/closeOnRouteChange need routeFeature() \u2014 option ignored"),this.fitContentToSnap&&!e.has("content-fit")&&x("[BottomSheet] fitContentToSnap needs contentFitFeature() \u2014 option ignored"),this.persistKey&&!e.has("persist")&&x("[BottomSheet] persistKey needs persistFeature() \u2014 snaps will not be saved")}get state(){return{size:this.size,activeId:this.activeId,isDragging:this.isDraggingAny(),isAnimating:this.animation.isAnimating,progress:this.computeProgress(this.size)}}on(e,i){return this.bus.on(e,i)}use(e){if(this.destroyed)return x(`[BottomSheet] use("${e.name}") called on destroyed engine \u2014 ignored.`),this;let i=[],n={add:r=>{typeof r=="function"&&i.push(r)}},s;try{s=e.install(this,n)}catch(r){for(let o=i.length-1;o>=0;o--)try{i[o]()}catch(l){queueMicrotask(()=>{throw l})}return queueMicrotask(()=>{throw r}),this}for(let r of i)this.teardowns.add(r);return typeof s=="function"&&this.teardowns.add(s),this}setLinkedSheets(e){this.destroyed||(this.linkedSheets=e)}getAllowedIds(){return this.snaps.getAllowedIds().slice()}getResolvedSnaps(){return this.snaps.getResolvedSnaps()}async snapTo(e,i=0,n=!1){if(this.destroyed)return;let s=typeof i=="object"?i:{velocity:i},r=s.velocity??0,o=s.signal;if(o?.aborted)return;let l=this.snaps.findById(e);if(!l){x(`[BottomSheet] unknown snap id: ${e}`);return}if(!this.snaps.getAllowedIds().includes(e)){x(`[BottomSheet] snap "${e}" is not in allowed list`);return}if(!n&&this.emitBeforeSnap(l,this.activeId))return;let c=this.opening,u=this.newCycle(),d=()=>{this.animation.cancel(),this.newCycle()};o?.addEventListener("abort",d,{once:!0});let h=this.size===0||c,p=this.activeId,v=this.size;this.scrollCache.cache(p,v,l.size),this.activeId=e;let g=this.snapPointsRaw.find(y=>y.id===e)?.size;if(h&&!(e==="closed"||g===0)&&(this.opening=!0,c||(this.promotedForOpen=!0,O.promote(this.id))),this.animation.viewTransitionsAvailable){this.currentViewTransition?.skipTransition?.();let y=document.startViewTransition(()=>{this.applySize(l.size)});y.ready?.catch(()=>{}),this.currentViewTransition=y;try{await y.finished}catch{}this.currentViewTransition===y&&(this.currentViewTransition=null)}else await this.animation.animateTo(l.size,r);o?.removeEventListener("abort",d),!u.aborted&&(this.opening=!1,this.completeSnap(e,l.size,v,h,!1))}completeSnap(e,i,n,s,r){this.scrollCache.restore(e,n,i),this.updateAriaSlider(),this.emit("snap",{id:e,size:this.size,progress:this.computeProgress(this.size)}),r&&this.haptic(),this.setRestClosed(i===0),s&&i>0&&this.emitOpenSequence(e),i===0&&this.emitCloseSequence()}setRestClosed(e){e!==this.restClosed&&(this.restClosed=e,e?this.element.setAttribute("data-bs-rest","closed"):this.element.removeAttribute("data-bs-rest"))}emitOpenSequence(e){this.emit("open",{id:e}),this.handleOpen(),Yt(this.linkedSheets,this),this.emit("opened",{id:e})}emitCloseSequence(){this.emit("close",void 0),this.handleClose(),this.emit("closed",void 0)}async dragTo(e,i=0){if(this.destroyed)return;let n=typeof i=="object"?i:{velocity:i},s=n.velocity??0,r=n.signal;if(r?.aborted)return;this.newCycle();let o=()=>{this.animation.cancel(),this.newCycle()};r?.addEventListener("abort",o,{once:!0});let l=Math.max(0,Math.min(e,this.snaps.getMaxAxisSize()));await this.animation.animateTo(l,s),r?.removeEventListener("abort",o),this.destroyed||r?.aborted}open(e){if(this.destroyed)return Promise.resolve();let i=e??this.snaps.getAllowedIds().find(n=>(this.snaps.findById(n)?.size??0)>0)??this.activeId;return this.snapTo(i)}close(e="programmatic"){if(this.destroyed||this.disableCloseFlag||this.size>0&&this.emitBeforeClose(e))return Promise.resolve();let i=this.snapPointsRaw.find(n=>n.id==="closed")?.id??this.snaps.getAllowedIds().find(n=>this.snaps.findById(n)?.size===0)??this.snaps.getAllowedIds()[0];return this.snapTo(i??this.activeId)}canDismiss(){return!this.persistent&&!this.disableCloseFlag&&!this.destroyed}setPersistent(e){this.destroyed||(this.persistent=e)}setDisableClose(e){this.destroyed||(this.disableCloseFlag=e)}setDisableDrag(e){this.destroyed||(this.disableDragFlag=e)}setDragFromContent(e){this.destroyed||(this.dragFromContentDefault=e)}setDragFrom(e){this.destroyed||e===this.dragFromMode||(this.gesture?.forceClearDragState(),this.detachSheetGesture?.(),this.dragFromMode=e,this.mountSheetGesture())}getDragFrom(){return this.dragFromMode}setMode(e){if(this.destroyed)return;let i=Me(e,this.element);if(i===this.mode)return;let n=this.mode==="bottom"||this.mode==="top",s=i==="bottom"||i==="top";this.gesture?.forceClearDragState(),this.detachSheetGesture?.(),this.animation.cancel(),this.element.style.removeProperty(I(this.mode)),this.mode=i,this.element.dataset.mode=i,this.transformTemplate=Ne(i),this.maxHeightDeps.mode=i,this.fitDeps.mode=i,this.snaps.setMode(i),this.scrim.setSheetMode(i),n!==s&&(this.aria=new ee(this.handle,i)),this.detachSliderKeyboard?.(),this.mountSliderKeyboard(),this.mountSheetGesture(),this.recompute();let r=this.snaps.findById(this.activeId);r&&this.applySize(r.size),this.updateAriaSlider()}getMode(){return this.mode}isTop(){return this.isTopSheet}depth(){return O.depthOf(this.id)}expand(){if(this.destroyed)return Promise.resolve();let e=this.allowedIdsBySize(),i=e[e.length-1];return i?this.snapTo(i):Promise.resolve()}collapse(){if(this.destroyed)return Promise.resolve();let e=this.allowedIdsBySize(),n=e.find(s=>(this.snaps.findById(s)?.size??0)>0)??e[0];return n?this.snapTo(n):Promise.resolve()}setRadius(e){this.destroyed||this.maxHeight.setRadius(e)}setMaxHeight(e){this.destroyed||this.maxHeight.setMaxHeight(e)}setAllowed(e,i){if(!this.destroyed){if(this.snaps.setAllowedIds(e),this.updateAriaSlider(),i&&e.includes(i))this.snapTo(i,0,!0);else if(!e.includes(this.activeId)){let n=e[0];n&&this.snapTo(n,0,!0)}}}setBackdropRange(e){this.scrim.setBackdropRange(e,()=>this.applySize(this.size))}setScreenRange(e){this.scrim.setScreenRange(e,()=>this.applySize(this.size))}setScrimColor(e){this.scrim.setScrimColor(e)}setScrimBlur(e){this.scrim.setScrimBlur(e)}setScrimInteractive(e){this.scrim.setScrimInteractive(e)}setScrim(e){this.scrim.setScrim(e,()=>this.applySize(this.size))}setScrimMode(e){this.scrim.setScrimMode(e,()=>this.applySize(this.size))}setScrimTapToClose(e){this.scrim.setScrimTapToClose(e)}setScrimEnabled(e){this.scrim.setScrimEnabled(e,()=>this.applySize(this.size))}setScrimOverlay(e){return this.scrim.setScrimOverlay(e)}addAnchor(e){if(this.destroyed||typeof document>"u")return()=>{};this.anchorHost||(this.anchorHost=this.rootEl??this.element.parentElement??document.body,this.anchorHost.style.setProperty("--bs-size",`${this.size}px`),this.anchorHost.style.setProperty("--bs-progress",String(this.computeProgress(this.size))));let i=qi({mode:this.mode,host:this.anchorHost,getState:()=>({activeId:this.activeId,size:this.size,progress:this.computeProgress(this.size)}),on:(s,r)=>this.on(s,r),isDestroyed:()=>this.destroyed},e);i.syncZ(this.stackZ+1),this.anchors.push(i);let n=()=>{let s=this.anchors.indexOf(i);s!==-1&&(this.anchors.splice(s,1),i.detach())};return this.teardowns.add(n),n}setScrimStages(e){if(this.destroyed||typeof document>"u")return()=>{};if(this.detachScrimStages?.(),this.detachScrimStages=null,!e)return()=>{};let i=this.screenComponent?.parentElement;if(!i)return x("[BottomSheet] setScrimStages: no scrim element mounted \u2014 pass `scrim` to the engine first."),()=>{};let n=Xi({mode:this.mode,host:i,getState:()=>({activeId:this.activeId,size:this.size,progress:this.computeProgress(this.size)}),on:(r,o)=>this.on(r,o),isDestroyed:()=>this.destroyed},e),s=()=>{this.detachScrimStages===s&&(this.detachScrimStages=null),n()};return this.detachScrimStages=s,this.teardowns.add(()=>this.detachScrimStages?.()),s}getScrimState(){return{mode:this.scrim.scrimMode,enabled:this.scrim.scrimEnabled}}setSnapPoints(e,i){if(this.destroyed)return;if(this.animation.cancel(),this.newCycle(),this.snapPointsRaw=e,Ge(e),this.auditDuplicateSnapIds(e),this.snaps.setRaw(e),i)this.snaps.setAllowedIds(i);else{let s=this.snaps.getResolvedSnaps().map(o=>o.id),r=this.snaps.getAllowedIds().filter(o=>s.includes(o));this.snaps.setAllowedIds(r.length?r:s)}this.scrollCache.clear(),this.scrim.invalidateOpacityCache();let n=this.snaps.findById(this.activeId);if(n)this.applySize(n.size);else{let s=this.snaps.getResolvedSnaps().find(r=>this.snaps.getAllowedIds().includes(r.id))??this.snaps.getResolvedSnaps()[0];s&&(this.activeId=s.id,this.applySize(s.size))}this.updateAriaSlider()}recompute(){this.destroyed||(this.maxHeight.resolveCap(),this.snaps.recompute(),this.maxHeight.clampTo(),this.scrim.invalidateOpacityCache(),!this.isDraggingAny()&&this.healActiveSnap())}healActiveSnap(){let e=this.snaps.findById(this.activeId);e&&(this.size=e.size,this.applySize(this.size),this.updateAriaSlider(),this.size>0&&!this.lifecycle.isInstalled&&!this.opening&&!this.animation.isAnimating&&this.emitOpenSequence(this.activeId))}destroy(){this.destroyed=!0,this.opening=!1,this.currentAbort.abort(),this.currentViewTransition?.skipTransition?.(),this.currentViewTransition=null,this.bus.clear(),this.animation.cancel(),this.gesture?.forceClearDragState(),this.contentGesture?.forceClearDragState(),this.setRestClosed(!1),this.teardowns.drain(),this.scrim.destroy(),this.animation.destroy(),this.lifecycle.destroy(),this.backdrop&&(this.backdrop.style.opacity="",this.backdrop.style.pointerEvents="");for(let e of[this.anchorHost,this.scrimParent,this.rootEl])e&&(e.style.removeProperty("--bs-size"),e.style.removeProperty("--bs-progress"));this.screenComponent&&(this.screenComponent.style.opacity="",this.screenComponent.style.display=""),this.sizeWriteSentinel.invalidate(),this.progressWriteSentinel.invalidate()}emit(e,i){this.bus.emit(e,i)}newCycle(){return this.allowOvershoot=!1,this.opening=!1,this.currentAbort.abort(),this.currentAbort=new AbortController,this.currentAbort.signal}emitBeforeSnap(e,i){return We(n=>this.emit("before-snap",n),{id:e.id,size:e.size,previousId:i},"before-snap")}emitBeforeClose(e){return We(i=>this.emit("before-close",i),{reason:e},"before-close")}applyAutoAriaLabelledBy(){if(typeof document>"u"||!this.lifecycle.focusTrapEnabled||this.element.getAttribute("aria-labelledby"))return;let e=this.handle??this.element,i=e.querySelector("[data-bs-title]")??e.querySelector("h1,h2,h3,h4,h5,h6");i&&(i.id||(i.id=Ve("bs-title")),this.element.setAttribute("aria-labelledby",i.id))}recomputeSnaps(){this.maxHeight.resolveCap(),this.snaps.setRaw(this.snapPointsRaw),this.maxHeight.clampTo(),this.scrim.invalidateOpacityCache()}auditDuplicateSnapIds(e){let i=new Set;for(let n of e)i.has(n.id)&&x(`[BottomSheet] duplicate snap id "${n.id}" \u2014 only the first occurrence is reachable.`),i.add(n.id)}getAllowedRange(){return this.snaps.getAllowedRange()}allowedIdsBySize(){return this.snaps.getAllowedIds().slice().sort((e,i)=>(this.snaps.findById(e)?.size??0)-(this.snaps.findById(i)?.size??0))}updateAriaSlider(){this.aria.setValue(this.allowedIdsBySize(),this.activeId)}registerInStack(){this.teardowns.add(O.push({id:this.id,setZIndex:e=>{this.stackZ=e,this.element.style.zIndex=String(e),this.backdrop&&(this.backdrop.style.zIndex=String(e-1));for(let i of this.anchors)i.syncZ(e+1)},setIsTop:e=>{this.isTopSheet=e},isOpen:()=>this.size>0||this.opening,setDepth:e=>this.applyStackDepth(e)}))}applyStackDepth(e){if(!this.stackEffectEnabled)return;if(this.element.setAttribute("data-stack-depth",String(e)),!this.stackEffectPrimed){this.stackEffectPrimed=!0;let n=this.mode==="bottom"||this.mode==="top";this.element.style.transformOrigin=n?"50% 100%":"0% 50%",this.element.style.transition="scale 320ms cubic-bezier(0.29, 1.04, 0.84, 0.99)"}let i=Math.max(1-e*.04,.86);this.element.style.scale=i===1?"":String(i)}buildGestureDeps(e,i){return{handle:e,element:this.element,mode:this.mode,gestureOptions:i,getRoot:()=>this.rootEl,getDragContext:()=>{let n=this.dragContextBuf,s=this.getAllowedRange();return n.size=this.size,n.maxAxisSize=this.snaps.getMaxAxisSize(),n.range.min=s.min,n.range.max=s.max,n.rubberBandEnabled=this.rubberBandEnabled,n},getDisableDrag:()=>this.disableDragFlag,cancelAnimation:()=>this.animation.cancel(),applySize:n=>this.applySize(n),animateTo:(n,s)=>this.animation.animateTo(n,s),settleAfterDrag:(n,s,r)=>this.settleAfterDrag(n,s,r),emit:(n,s)=>this.emit(n,s),listenerCount:n=>this.bus.listenerCount(n)}}isContentDragAllowed(){return this.disableDragFlag?!1:this.snapPointsRaw.find(i=>i.id===this.activeId)?.dragFromContent??this.dragFromContentDefault}decideContentDrag(e,i,n,s){if(this.destroyed||i.pointerType==="mouse"||this.gesture?.isDragging||!this.isContentDragAllowed()||!it(i.target,"sheet"))return!1;let r=Ni({delta:n,crossDelta:s,sharesScrollAxis:this.mode==="bottom"||this.mode==="top",scrollTop:e.scrollTop,atMaxSnap:this.size>=this.getAllowedRange().max-.5});return r==="pending"?null:r==="drag"}attachDragSurface(e,i){if(this.destroyed||i!=="content"||this.contentGesture)return;let n=new J(this.buildGestureDeps(e,{manageTouchAction:!1,deferStart:(o,l,c)=>this.decideContentDrag(e,o,l,c)}));this.contentGesture=n;let s=n.install(),r=st(e,()=>n.isDragging);return()=>{r(),s(),this.contentGesture===n&&(this.contentGesture=void 0)}}sheetDragSurface(){return this.dragFromMode==="handle"?this.handle:this.element}canStartSheetDrag(e){if(this.contentGesture?.isDragging)return!1;let i=e.target,n=typeof i?.closest=="function";return n&&i.closest(tt)?!1:this.handle!==this.element&&n&&this.handle.contains(i)?!0:it(e.target,this.dragFromMode)?this.dragFromMode==="handle"?!0:!(this.scrollContainer&&n&&this.scrollContainer.contains(i)&&!i.closest(et)):!1}mountSheetGesture(){let e=this.sheetDragSurface(),i=new J(this.buildGestureDeps(e,{shouldStart:r=>this.canStartSheetDrag(r),manageTouchAction:this.dragFromMode==="handle"}));this.gesture=i;let n=i.install(),s=this.dragFromMode==="handle"?null:st(e,()=>i.isDragging);this.detachSheetGesture=()=>{s?.(),n()}}attach(){this.mountSheetGesture(),this.teardowns.add(()=>{this.detachSheetGesture?.(),this.detachSheetGesture=null});try{this.attachFeatures()}catch(e){this.teardowns.drain();try{this.scrim.destroy()}catch(i){queueMicrotask(()=>{throw i})}try{this.animation.destroy()}catch(i){queueMicrotask(()=>{throw i})}try{this.lifecycle.destroy()}catch(i){queueMicrotask(()=>{throw i})}throw this.destroyed=!0,e}}attachFeatures(){if(this.runFeatureStage("attach"),typeof window<"u"&&(this.teardowns.add(jt({element:this.element,getMode:()=>this.mode,isDestroyed:()=>this.destroyed,isDragging:()=>this.isDraggingAny(),resolveActiveSnap:()=>this.snaps.findById(this.activeId),getMaxAxisSize:()=>this.snaps.getMaxAxisSize(),getSize:()=>this.size,setMaxAxisSize:e=>{this.snaps.setMaxAxisSize(e)},setSize:e=>{this.size=e},recomputeSnaps:()=>this.recomputeSnaps(),applySize:e=>this.applySize(e),cancelInFlight:()=>{this.animation.cancel()},newCycle:()=>{this.newCycle()},isAnimating:()=>this.animation.isAnimating,resyncAfterCancel:()=>this.resyncAfterResize()})),this.lifecycle.closeOnEscape)){let e=i=>{this.destroyed||i.defaultPrevented||this.canDismiss()&&i.key==="Escape"&&this.isTopSheet&&this.size>0&&this.close("escape")};document.addEventListener("keydown",e),this.teardowns.add(()=>document.removeEventListener("keydown",e))}this.mountSliderKeyboard(),this.scrim.attach()}mountSliderKeyboard(){let e=ri({handle:this.handle,mode:this.mode,isDestroyed:()=>this.destroyed,getAllowedIds:()=>this.allowedIdsBySize(),getActiveId:()=>this.activeId,snapTo:i=>{this.snapTo(i)}});this.detachSliderKeyboard=e,this.teardowns.add(()=>{this.detachSliderKeyboard?.(),this.detachSliderKeyboard=null})}settleAfterDrag(e,i,n="touch"){let s=this.newCycle(),r=this.snaps.findDragSettleTarget({delta:e,velocity:i,pointerKind:n,size:this.size,activeId:this.activeId,flickVelocity:this.flickVelocity,dragThreshold:this.dragThreshold});if(!r){this.clearWillChangeIfIdle();return}let o=this.activeId;if(r.id===o&&r.size===this.size){this.clearWillChangeIfIdle();return}if(this.emitBeforeSnap(r,o)){let h=this.snaps.findById(o);h&&this.animation.animateTo(h.size,0);return}let l=this.size,c=this.snaps.findById(o)?.size;this.scrollCache.cache(o,l,r.size),this.activeId=r.id,c===0&&r.size>0&&(this.opening=!0,this.promotedForOpen=!0,O.promote(this.id));let u=this.snaps.getMaxAxisSize(),d=u>0?Math.min(r.size,u):r.size;this.allowOvershoot=!0,this.animation.animateTo(d,i).then(()=>{s.aborted||(this.allowOvershoot=!1,this.opening=!1,this.completeSnap(r.id,r.size,l,c===0,!0))})}isDraggingAny(){return(this.gesture?.isDragging??!1)||(this.contentGesture?.isDragging??!1)}clearWillChangeIfIdle(){this.animation.isAnimating||this.isDraggingAny()||(this.element.style.willChange="")}haptic(){if(typeof navigator<"u"&&"vibrate"in navigator)try{navigator.vibrate(Ms)}catch{}}applySize(e,i=!1){let n=this.snaps.getMaxAxisSize(),s=n>0&&e>n&&!this.isDraggingAny()&&!this.allowOvershoot?n:e;this.size=s,s>0&&this.setRestClosed(!1);let r=n-s,o=this.element.style;i||(o.transform=this.transformTemplate(r));let l=this.sizeWriteSentinel.shouldWrite(s,this.animation.isAnimating||this.isDraggingAny()?.5:0);l&&(o.setProperty("--bs-size",`${s}px`),this.scrimParent&&this.scrimParent.style.setProperty("--bs-size",`${s}px`),this.anchorHost&&this.anchorHost!==this.scrimParent&&this.anchorHost.style.setProperty("--bs-size",`${s}px`),this.rootEl&&this.rootEl!==this.scrimParent&&this.rootEl!==this.anchorHost&&this.rootEl.style.setProperty("--bs-size",`${s}px`));let c=this.computeProgress(s),u=this.progressWriteSentinel.shouldWrite(c,.005);u&&(o.setProperty("--bs-progress",String(c)),this.anchorHost&&this.anchorHost.style.setProperty("--bs-progress",String(c)),this.rootEl&&this.rootEl!==this.anchorHost&&this.rootEl.style.setProperty("--bs-progress",String(c))),this.scrim.applyOpacity(c,u),(u||l)&&this.bus.listenerCount("progress")>0&&(this.progressPayload.value=c,this.progressPayload.size=s,this.emit("progress",this.progressPayload))}computeProgress(e){let{min:i,max:n}=this.getAllowedRange(),s=Math.min(n,this.snaps.getMaxAxisSize());return s<=i?0:Math.min(Math.max((e-i)/(s-i),0),1)}handleOpen(){this.promotedForOpen?this.promotedForOpen=!1:O.promote(this.id);try{this.lifecycle.install()}catch(e){this.destroyed||this.newCycle(),this.handleClose(),this.applySize(0),this.activeId=this.snapPointsRaw.find(i=>i.id==="closed")?.id??this.activeId,this.size=0,queueMicrotask(()=>{throw e})}}resyncAfterResize(){if(this.destroyed)return;let e=this.snaps.findById(this.activeId);e&&(this.updateAriaSlider(),this.emit("snap",{id:e.id,size:this.size,progress:this.computeProgress(this.size)}),e.size>0&&!this.lifecycle.isInstalled?this.emitOpenSequence(e.id):e.size===0&&this.lifecycle.isInstalled&&this.emitCloseSequence())}handleClose(){this.opening=!1,this.promotedForOpen=!1,this.lifecycle.release(),O.update()}}});function tn(){if(K>0){K-=1;let n=dt.shift();n&&n(),N();return}if(T.length===0){ct(),N();return}let t=null,e=-1;for(let n=T.length-1;n>=0;n-=1){let s=T[n];if(s.surface.isOpen()&&(t||(t=s,e=n),s.surface.isTop())){t=s,e=n;break}}if(!t){let n=T.pop();n&&(n.live=!1),N();return}t.live=!1,T.splice(e,1);let i=t;Promise.resolve(i.surface.close()).then(()=>{i.surface.isOpen()&&Rs(i)}),N()}function Rs(t){!V()||!ne()||(t.live=!0,Le(()=>{try{history.pushState(ut(t.surface),"",t.surface.url)}catch{t.live=!1}}),t.live&&(T.push(t),ht()))}function nn(t){let e={surface:t,priorUrl:void 0,live:!1};return!V()||!ne()||(e.priorUrl=t.url!==void 0?location.href:void 0,Le(()=>{try{history.pushState(ut(t),"",t.url),e.live=!0}catch{e.live=!1}}),e.live&&(T.push(e),ht())),e}function pt(t){if(!V()||!ne())return;let e=t,i=T.indexOf(e);if(i===-1||!e.live)return;let n=T.length-1;e.live=!1,T.splice(i,1);let s=null;if(i!==n){let r=T[T.length-1].surface,o=e.priorUrl;s=()=>{Le(()=>{history.replaceState(ut(r),"",o!==void 0?o:location.href)})}}dt.push(s),K+=1,Le(()=>{try{history.back()}catch{K=Math.max(0,K-1),dt.pop()}}),N()}function sn(t){return!V()||!ne()?()=>{}:(L.add(t),L.size===1&&Cs(),ht(),()=>{L.has(t)&&(L.delete(t),L.size===0&&zs(),N())})}var T,L,K,Re,dt,De,ke,te,ie,Oe,Ie,V,ne,ut,Le,ct,ht,N,Cs,zs,rn=m(()=>{"use strict";T=[],L=new Set,K=0,Re=0,dt=[],De=!1,ke=!1,te=null,ie=null,Oe=null,Ie=null,V=()=>typeof window<"u",ne=()=>typeof history<"u",ut=t=>({...t.markerState(),__bs:!0}),Le=t=>{Re+=1;try{t()}finally{Re-=1}},ct=()=>{let t=Array.from(L);for(let e of t)e()},ht=()=>{De||!V()||(window.addEventListener("popstate",tn),De=!0)},N=()=>{De&&(T.length>0||L.size>0||K>0||(V()&&window.removeEventListener("popstate",tn),De=!1))},Cs=()=>{ke||!ne()||(te=history.pushState,ie=history.replaceState,Oe=function(...t){te.apply(this,t),Re===0&&ct()},Ie=function(...t){ie.apply(this,t),Re===0&&ct()},history.pushState=Oe,history.replaceState=Ie,ke=!0)},zs=()=>{ke&&(history.pushState===Oe&&te&&(history.pushState=te),history.replaceState===Ie&&ie&&(history.replaceState=ie),te=null,ie=null,Oe=null,Ie=null,ke=!1)}});function on(t){if(typeof window>"u")return()=>{};if(!t.routedTo&&!t.closeOnBack)return()=>{};let e=null,i=()=>{e||(e=nn({isOpen:()=>!t.isDestroyed()&&t.getSize()>0,isTop:t.isTopSheet,close:t.close,markerState:()=>t.routedTo!==void 0?{__bsRouted:t.sheetId}:{__bsSheet:t.sheetId},url:t.routedTo}))},n=()=>{e&&(pt(e),e=null)},s=t.on("open",i),r=t.on("close",n);return t.getSize()>0&&i(),()=>{s(),r(),e&&(pt(e),e=null)}}function an(t){return sn(()=>{t.isDestroyed()||t.getSize()<=0||t.close()})}var ln=m(()=>{"use strict";rn()});function dn(t,e){return t.on("snap",({id:n})=>{if(!(typeof window>"u")&&!(typeof localStorage>"u"))try{localStorage.setItem(e,n)}catch{}})}var cn=m(()=>{"use strict"});function un(t){let{ms:e}=t;if(e===void 0||e<=0)return()=>{};let i=null,n=()=>{i!==null&&(clearTimeout(i),i=null)},s=()=>{if(t.isDestroyed()||t.isDragging())return;let l=t.resolveSnap(t.getActiveId());if(!l||l.size===0)return;let c=null;for(let u of t.getAllowedIds()){let d=t.resolveSnap(u);!d||d.size<=0||(!c||d.size<c.size)&&(c=d)}c&&(c.id===l.id||c.size>=l.size||t.snapTo(c.id))},r=()=>{n(),!t.isDestroyed()&&(i=setTimeout(()=>{i=null,s()},e))},o=t.on("snap",()=>r());return(t.resolveSnap(t.getActiveId())?.size??0)>0&&r(),()=>{n(),o()}}var hn=m(()=>{"use strict"});function pn(t){let e=t.attachDragSurface(t.container,"content");return()=>e?.()}var mn=m(()=>{"use strict"});function fn(t){if(typeof window>"u"||!window.visualViewport)return()=>{};let e=window.visualViewport,i=null,n=()=>{i===null&&(i=requestAnimationFrame(()=>{if(i=null,t.isDestroyed())return;t.recomputeSnaps();let s=t.isVerticalAxis(),r=s?e.height:e.width,o=s?window.innerHeight:window.innerWidth,l=Math.max(0,Math.min(o,r)-8);l<t.getMaxAxisSize()&&t.setMaxAxisSize(l);let c=t.isAnimating?.()??!1;t.cancelInFlight(),t.newCycle();let u=t.getMaxAxisSize();t.setSize(Math.min(t.getSize(),u));let d=t.resolveActiveSnap();d&&!t.isDragging()?(t.applySize(Math.min(d.size,u)),c&&t.resyncAfterCancel?.()):t.applySize(t.getSize())}))};return e.addEventListener("resize",n),()=>{e.removeEventListener("resize",n),i!==null&&cancelAnimationFrame(i)}}var gn=m(()=>{"use strict"});function bn(){return{name:"route",install:t=>{let e=new B;return t.options.closeOnRouteChange&&e.add(an({isDestroyed:t.isDestroyed,getSize:t.getSize,close:()=>t.close()})),e.add(on({routedTo:t.options.routedTo,closeOnBack:t.options.closeOnBack,isTopSheet:t.isTopSheet,getSize:t.getSize,isDestroyed:t.isDestroyed,close:()=>t.close("back"),on:t.on,sheetId:t.sheetId})),()=>e.drain()}}}function vn(){return{name:"persist",install:t=>{let e=t.options.persistKey;if(e)return dn({on:t.on},e)}}}function yn(){return{name:"auto-collapse",install:t=>un({ms:t.options.autoCollapseAfter,isDestroyed:t.isDestroyed,isDragging:t.isDragging,getAllowedIds:t.getAllowedIds,getActiveId:t.getActiveId,resolveSnap:t.resolveSnap,snapTo:t.snapTo,on:t.on})}}function Sn(){return{name:"content-swipe",stage:"attach",install:t=>{if(t.scrollContainer)return pn({container:t.scrollContainer,attachDragSurface:t.attachDragSurface})}}}function xn(){return{name:"visual-viewport",install:t=>{if(!(typeof window>"u"))return fn({element:t.element,isVerticalAxis:t.isVerticalAxis,isDestroyed:t.isDestroyed,isDragging:t.isDragging,recomputeSnaps:t.recomputeSnaps,resolveActiveSnap:t.resolveActiveSnap,getMaxAxisSize:t.getMaxAxisSize,getSize:t.getSize,setMaxAxisSize:t.setMaxAxisSize,setSize:t.setSize,applySize:t.applySize,cancelInFlight:t.cancelInFlight,newCycle:t.newCycle,isAnimating:t.isAnimating,resyncAfterCancel:t.resyncAfterResize})}}}var An=m(()=>{"use strict";ln();cn();hn();mn();gn();lt()});function Mn(){return{name:"content-fit",install:t=>{let e=t.scrollContainer;if(!t.options.fitContentToSnap||!e||typeof window>"u")return;let i=t.element,n=t.options.settleAnimation==="waapi",s=0,r=-1,o=0,l=!1,c=0,u=null,d=null,h=(f,S)=>i.style.setProperty(f,`${S}px`),p=f=>i.dataset.mode==="bottom"?Math.max(0,t.getMaxAxisSize()-f):0,v=f=>{r<0&&(r=e.scrollHeight-e.clientHeight-s,o=e.scrollTop);let S=Math.max(0,r+p(f));o>S&&(e.scrollTop>S&&(e.scrollTop=S),o=S)},g=()=>{d?.cancel(),d=null,u=null},b=()=>{if(u?.playState==="running")return;let f=i.getAnimations?.().find(w=>w.id===Te),S=i.querySelector(".bs-footer");if(!f||!S)return;let q=f.effect;g();let z=S.animate(q.getKeyframes().map(w=>({offset:w.computedOffset,transform:`translateY(${-Math.min(Math.max(0,parseFloat(String(w.transform).split(",")[1])||0),c)}px)`})),{duration:q.getTiming().duration,easing:"linear",fill:"forwards"});d=z,u=f;let k=()=>{u===f&&g()};f.ready.then(()=>{d===z&&(z.startTime=f.startTime)},k),f.finished.then(k,k)},y=()=>{if(t.isDestroyed())return;g();let f=t.getSize();l||(r=-1,v(f)),s=p(f),h(Tn,s),h(En,t.getMaxAxisSize()),l||(l=!0,i.setAttribute(mt,"rest")),r=-1},E=f=>{l&&(l=!1,i.setAttribute(mt,"moving"),c=e.offsetHeight,h(wn,c)),v(f),n&&t.isAnimating()&&i.dataset.mode==="bottom"&&b()},C=()=>t.isAnimating()||t.isDragging(),R=()=>{C()||y()};y();let U=t.on("progress",f=>C()?E(f.size):y()),$=t.on("snap",y),F=t.on("dragstart",()=>E(t.getSize())),me=t.on("before-snap",()=>{queueMicrotask(()=>{!t.isDestroyed()&&t.isAnimating()&&E(t.getSize())})}),fe=typeof ResizeObserver>"u"?null:new ResizeObserver(R);return fe?.observe(document.documentElement),window.addEventListener("orientationchange",R),()=>{g(),U(),$(),F(),me(),fe?.disconnect(),window.removeEventListener("orientationchange",R),i.removeAttribute(mt);for(let f of[Tn,En,wn])i.style.removeProperty(f)}}}}var Tn,En,wn,mt,Cn=m(()=>{"use strict";Xe();Tn="--bs-content-inset",En="--bs-max-size",wn="--bs-footer-lift-max",mt="data-bs-fit-content"});function zn(){return[Sn(),xn(),vn(),yn(),bn(),Mn()]}var Rn=m(()=>{"use strict";An();Cn()});var Pe,Dn=m(()=>{"use strict";en();Rn();Pe=class extends ze{constructor(e){super({...e,features:[...zn(),...e.features??[]]})}}});var kn,On=m(()=>{"use strict";kn=':where(.bs-root){--bs-surface-d:#ffffff;--bs-surface-border-d:rgba(225,227,237,1);--bs-radius-d:20px;--bs-handle-color-d:rgba(26,22,20,0.3);--bs-handle-width:40px;--bs-handle-height:5px;--bs-z-backdrop:90;--bs-z-sheet:100;--bs-backdrop-color-d:rgba(0,0,0,0.5);--bs-scrim-color-d:transparent;--bs-scrim-blur:0px;--bs-z-scrim:calc(var(--bs-z-sheet) - 1);--bs-size:0px;--bs-progress:0}.bs-backdrop{position:fixed;inset:0;background:var(--bs-backdrop-color,var(--bs-backdrop-color-d));opacity:0;pointer-events:none;z-index:var(--bs-z-backdrop);transition:opacity 0.24s cubic-bezier(0.22,1,0.36,1);will-change:opacity}.bs-root[data-dragging="true"] .bs-backdrop,.bs-root[data-animating="true"] .bs-backdrop{transition:none}.bs-sheet{position:fixed;background:var(--bs-surface,var(--bs-surface-d));box-shadow:var(--bs-shadow,var(--bs-shadow-auto,none));--bs-shadow-fade:clamp(0,calc(var(--bs-progress,0) * 8),1);z-index:var(--bs-z-sheet);pointer-events:auto;overflow:hidden;display:flex;flex-direction:column;-webkit-tap-highlight-color:transparent;user-select:none;overscroll-behavior:contain}.bs-sheet[data-mode="bottom"]{left:0;right:0;bottom:0;width:100%;border-top-left-radius:var(--bs-radius,var(--bs-radius-d));border-top-right-radius:var(--bs-radius,var(--bs-radius-d));border-top:1px solid var(--bs-surface-border,var(--bs-surface-border-d));padding-bottom:env(safe-area-inset-bottom);--bs-shadow-auto:0 calc(var(--bs-progress,0) * -2px - 3px) calc(var(--bs-progress,0) * 18px + 12px) rgba( 0,0,0,calc(var(--bs-shadow-fade) * (var(--bs-progress,0) * 0.15 + 0.12)) )}.bs-sheet[data-mode="top"]{left:0;right:0;top:0;width:100%;border-bottom-left-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-right-radius:var(--bs-radius,var(--bs-radius-d));border-bottom:1px solid var(--bs-surface-border,var(--bs-surface-border-d));flex-direction:column-reverse;--bs-shadow-auto:0 3px 12px rgba(0,0,0,calc(var(--bs-shadow-fade) * 0.12));padding-top:env(safe-area-inset-top)}.bs-sheet[data-mode="left"]{top:0;bottom:0;left:0;height:100%;border-top-right-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-right-radius:var(--bs-radius,var(--bs-radius-d));border-right:1px solid var(--bs-surface-border,var(--bs-surface-border-d));--bs-shadow-auto:3px 0 12px rgba(0,0,0,calc(var(--bs-shadow-fade) * 0.12))}.bs-sheet[data-mode="right"]{top:0;bottom:0;right:0;height:100%;border-top-left-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-left-radius:var(--bs-radius,var(--bs-radius-d));border-left:1px solid var(--bs-surface-border,var(--bs-surface-border-d));--bs-shadow-auto:-3px 0 12px rgba(0,0,0,calc(var(--bs-shadow-fade) * 0.12))}.bs-sheet[data-bs-rest="closed"]{box-shadow:none;visibility:hidden}.bs-sheet[data-bs-webgl="on"],.bs-sheet[data-bs-webgl="on"] .bs-handle,.bs-sheet[data-bs-webgl="on"] .bs-header,.bs-sheet[data-bs-webgl="on"] .bs-footer{background:transparent;box-shadow:none}.bs-sheet[data-mode="left"] .bs-content{padding-right:36px}.bs-sheet[data-mode="right"] .bs-content{padding-left:36px}.bs-handle{flex-shrink:0;min-height:44px;display:flex;flex-direction:column;justify-content:center;padding:var(--bs-handle-padding,8px 16px 4px);cursor:grab;touch-action:none;user-select:none;background:var(--bs-surface,var(--bs-surface-d));-webkit-tap-highlight-color:transparent;outline:none;position:relative}.bs-handle:active{cursor:grabbing}.bs-handle:focus-visible{outline:2px solid currentColor;outline-offset:-2px;border-radius:var(--bs-radius,var(--bs-radius-d))}.bs-handle::before{content:"";display:block;width:var(--bs-handle-width);height:var(--bs-handle-height);background:var(--bs-handle-color,var(--bs-handle-color-d));border-radius:calc(var(--bs-handle-height) / 2);margin:0 auto 8px;transition:width 0.15s ease,background 0.15s ease,transform 0.15s ease;pointer-events:none}.bs-sheet[data-mode="left"] .bs-handle,.bs-sheet[data-mode="right"] .bs-handle{position:absolute;top:0;bottom:0;width:28px;min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;background:var(--bs-surface,var(--bs-surface-d));z-index:1;overflow:hidden}.bs-sheet[data-mode="left"] .bs-handle>*,.bs-sheet[data-mode="right"] .bs-handle>*{display:none}.bs-sheet[data-mode="left"] .bs-handle{right:0;border-left:1px solid var(--bs-surface-border,var(--bs-surface-border-d))}.bs-sheet[data-mode="right"] .bs-handle{left:0;border-right:1px solid var(--bs-surface-border,var(--bs-surface-border-d))}.bs-sheet[data-mode="left"] .bs-handle::before,.bs-sheet[data-mode="right"] .bs-handle::before{width:var(--bs-handle-height);height:var(--bs-handle-width);margin:0}.bs-sheet:hover .bs-handle::before{background:color-mix(in oklab,var(--bs-handle-color,var(--bs-handle-color-d)),#000 15%)}.bs-handle:active::before{background:color-mix(in oklab,var(--bs-handle-color,var(--bs-handle-color-d)),#000 35%);transform:scaleX(1.15)}.bs-handle.bs-handle--ticks::after{content:"";display:block;position:absolute;left:50%;bottom:6px;transform:translateX(-50%);width:calc(var(--bs-handle-width) * 2);height:3px;background-image:radial-gradient( circle,var(--bs-handle-color,var(--bs-handle-color-d)) 0 1.5px,transparent 1.6px );background-size:8px 3px;background-repeat:repeat-x;background-position:center;opacity:0;transition:opacity 0.18s ease-out;pointer-events:none}.bs-root[data-dragging="true"] .bs-handle.bs-handle--ticks::after{opacity:0.4}.bs-sheet[data-mode="top"] .bs-handle.bs-handle--ticks::after{bottom:auto;top:6px}.bs-sheet[data-mode="left"] .bs-handle.bs-handle--ticks::after,.bs-sheet[data-mode="right"] .bs-handle.bs-handle--ticks::after{left:50%;top:50%;bottom:auto;transform:translate(-50%,-50%);width:3px;height:calc(var(--bs-handle-width) * 2);background-size:3px 8px;background-repeat:repeat-y;margin-left:calc(var(--bs-handle-height) + 6px)}.bs-sheet[data-mode="right"] .bs-handle.bs-handle--ticks::after{margin-left:calc(-1 * (var(--bs-handle-height) + 6px))}.bs-header{flex:0 0 auto;min-height:var(--bs-header-min-height,0px);padding:var(--bs-header-padding,0 16px 8px);background:var(--bs-surface,var(--bs-surface-d))}.bs-content{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;user-select:text;padding:var(--bs-content-padding,0 16px 16px)}.bs-sheet[data-bs-fit-content="moving"] .bs-content{scroll-padding-bottom:var(--bs-content-inset,0px)}.bs-sheet[data-bs-fit-content="moving"] .bs-content::after{content:"";display:block;flex:none;height:var(--bs-content-inset,0px)}.bs-sheet[data-bs-fit-content="rest"][data-mode="bottom"]::after{content:"";flex:0 1 max(0px,var(--bs-max-size,0px) - var(--bs-size,0px))}.bs-footer{flex:0 0 auto;padding:var(--bs-footer-padding,12px 16px calc(12px + env(safe-area-inset-bottom)));border-top:1px solid var(--bs-surface-border,var(--bs-surface-border-d));background:var(--bs-surface,var(--bs-surface-d))}.bs-sheet[data-bs-fit-content="moving"][data-mode="bottom"] .bs-footer{transform:translateY( clamp( calc(-1 * var(--bs-footer-lift-max,0px)),calc(var(--bs-size,0px) - var(--bs-max-size,0px)),0px ) )}.bs-sheet[data-bs-fit-content="moving"][data-mode="bottom"][data-bs-webgl="on"] .bs-footer{background:var(--bs-surface,var(--bs-surface-d))}.bs-sheet[data-mode="bottom"]:has(.bs-footer:not([hidden]):has(*)){padding-bottom:0}.bs-header:not(:has(*)),.bs-footer:not(:has(*)),.bs-header[hidden],.bs-footer[hidden]{display:none}.bs-screen{position:absolute;inset:0;pointer-events:none;z-index:var(--bs-z-scrim);background:var(--bs-scrim-color,var(--bs-scrim-color-d));backdrop-filter:blur(var(--bs-scrim-blur,0px));-webkit-backdrop-filter:blur(var(--bs-scrim-blur,0px));transition:opacity 0.24s cubic-bezier(0.22,1,0.36,1);will-change:opacity}.bs-root[data-dragging="true"] .bs-screen,.bs-root[data-animating="true"] .bs-screen{transition:none}.bs-scrim-overlay{z-index:calc(var(--bs-z-sheet) + 1);pointer-events:none}.bs-button-slot{position:fixed;z-index:calc(var(--bs-z-sheet) + 1);pointer-events:auto}.bs-button-slot[data-side="left"]{left:16px;bottom:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-side="right"]{right:16px;bottom:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-mode="top"]{bottom:auto;top:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-mode="left"]{left:calc(var(--bs-size,0px) + 12px);right:auto;bottom:auto;top:16px}.bs-button-slot[data-mode="right"]{right:calc(var(--bs-size,0px) + 12px);left:auto;bottom:auto;top:16px}@media (prefers-reduced-motion:reduce){.bs-backdrop,.bs-handle::before,.bs-button-slot[data-side="left"],.bs-button-slot[data-side="right"]{transition:none !important}}@media (prefers-color-scheme:dark){:where(.bs-root){--bs-surface-d:#1a1a1d;--bs-surface-border-d:rgba(255,255,255,0.08);--bs-handle-color-d:rgba(255,255,255,0.45);--bs-shadow-auto:0 -3px 16px rgba(0,0,0,0.5)}}@media (forced-colors:active){.bs-sheet{border:1px solid CanvasText}.bs-handle::before{background:CanvasText;forced-color-adjust:none}.bs-backdrop,.bs-screen{forced-color-adjust:none}}.bs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:where(.ovl-root){--ovl-surface:var(--bs-surface,var(--bs-surface-d,#ffffff));--ovl-surface-border:var(--bs-surface-border,var(--bs-surface-border-d,rgba(0,0,0,0.08)));--ovl-shadow:0 -8px 40px rgba(0,0,0,0.35);--ovl-radius:var(--bs-radius,var(--bs-radius-d,20px));--ovl-backdrop-color:rgba(0,0,0,0.5);--ovl-z-backdrop:200;--ovl-z-panel:201}.ovl-backdrop{position:fixed;inset:0;background:var(--ovl-backdrop-color);opacity:0;pointer-events:none;z-index:var(--ovl-z-backdrop)}.ovl-panel{position:fixed;background:var(--ovl-surface);box-shadow:var(--ovl-shadow);z-index:var(--ovl-z-panel);-webkit-tap-highlight-color:transparent;outline:none;transition:transform 0.32s cubic-bezier(0.29,1.24,0.84,0.99),opacity 0.32s ease-out}.ovl-panel[data-state="open"]{transform:translate3d(0,0,0);opacity:1}@starting-style{.ovl-panel[data-edge="bottom"][data-state="open"]{transform:translate3d(0,100%,0);opacity:0}.ovl-panel[data-edge="top"][data-state="open"]{transform:translate3d(0,-100%,0);opacity:0}.ovl-panel[data-edge="left"][data-state="open"]{transform:translate3d(-100%,0,0);opacity:0}.ovl-panel[data-edge="right"][data-state="open"]{transform:translate3d(100%,0,0);opacity:0}}.ovl-panel[data-edge="bottom"]{left:0;right:0;bottom:0;width:100%;border-top-left-radius:var(--ovl-radius);border-top-right-radius:var(--ovl-radius);border-top:1px solid var(--ovl-surface-border);padding-bottom:env(safe-area-inset-bottom)}.ovl-panel[data-edge="top"]{left:0;right:0;top:0;width:100%;border-bottom-left-radius:var(--ovl-radius);border-bottom-right-radius:var(--ovl-radius);border-bottom:1px solid var(--ovl-surface-border);padding-top:env(safe-area-inset-top)}.ovl-panel[data-edge="left"]{top:0;bottom:0;left:0;height:100%;border-top-right-radius:var(--ovl-radius);border-bottom-right-radius:var(--ovl-radius);border-right:1px solid var(--ovl-surface-border)}.ovl-panel[data-edge="right"]{top:0;bottom:0;right:0;height:100%;border-top-left-radius:var(--ovl-radius);border-bottom-left-radius:var(--ovl-radius);border-left:1px solid var(--ovl-surface-border)}@media (prefers-reduced-motion:reduce){.ovl-panel,.ovl-backdrop{transition:none !important}}'});var Fe,In,Ln,Pn=m(()=>{"use strict";Fe=t=>{let e=document.createElement("slot");return e.name=t,e},In=(t,e)=>{let i=document.createElement("div");i.className=e,i.setAttribute("part",t);let n=Fe(t);i.appendChild(n);let s=()=>{i.hidden=n.assignedNodes({flatten:!0}).length===0};return n.addEventListener("slotchange",s),s(),i},Ln=()=>{let t=document.createElement("div");t.className="bs-root";let e=document.createElement("div");e.className="bs-backdrop",e.setAttribute("part","backdrop");let i=document.createElement("div");i.className="bs-screen",i.setAttribute("part","screen"),i.appendChild(Fe("screen"));let n=document.createElement("section");n.className="bs-sheet",n.setAttribute("part","sheet"),n.setAttribute("role","dialog"),n.setAttribute("aria-modal","false");let s=document.createElement("div");s.className="bs-button-slot",s.setAttribute("data-side","left"),s.setAttribute("part","left-button"),s.appendChild(Fe("leftButton"));let r=document.createElement("div");r.className="bs-button-slot",r.setAttribute("data-side","right"),r.setAttribute("part","right-button"),r.appendChild(Fe("rightButton"));let o=document.createElement("div");o.className="bs-handle",o.setAttribute("part","handle"),o.setAttribute("role","slider"),o.setAttribute("tabindex","0"),o.setAttribute("aria-label","Resize sheet");let l=In("header","bs-header"),c=document.createElement("div");c.className="bs-content",c.setAttribute("part","content"),c.setAttribute("tabindex","0"),c.setAttribute("role","region"),c.setAttribute("aria-label","Sheet content");let u=document.createElement("slot");c.appendChild(u);let d=In("footer","bs-footer"),h=document.createElement("span");h.className="bs-sr-announce",h.setAttribute("role","status"),h.setAttribute("aria-live","polite"),h.setAttribute("aria-atomic","true"),h.style.cssText="position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);",n.append(o,l,c,d),t.append(e,i,n,s,r,h);let p=document.createDocumentFragment();return p.appendChild(t),{fragment:p,refs:{sheet:n,handle:o,header:l,content:c,footer:d,backdrop:e,screen:i,leftButton:s,rightButton:r,announcer:h}}}});var ft,gt,bt,se,vt,Hn,yt,St,xt,At,Tt,Et,re,oe,ae,le,G,_e,wt,de,ce,Mt,ue,he,P,_n,Bn,Ds,Fn,Nn,ks,Os,Ct,Kn,Is,zt,He,pe,Ls,Ps,Vn,Gn=m(()=>{"use strict";ft="snap-points",gt="allowed",bt="initial",se="mode",vt="backdrop",Hn="stylesheet",yt="animation",St="focus-trap",xt="close-on-escape",At="lock-body-scroll",Tt="sheet-label",Et="stack-effect",re="persistent",oe="disable-close",ae="disable-drag",le="drag-from",G="drag-from-content",_e="fit-content-to-snap",wt="close-on-route-change",de="radius",ce="max-height",Mt="return-focus-to",ue="backdrop-color",he="scrim-color",P="snap",_n=new Set([se,de,ce,ue,he,P,re,oe,ae,le,G]),Bn=[ft,gt,bt,se,vt,yt,St,xt,At,Tt,Et,re,oe,ae,le,G,_e,wt,de,ce,Mt,ue,he,P],Ds=t=>!!t&&typeof t=="object"&&typeof t.id=="string"&&(typeof t.size=="number"||typeof t.size=="string"),Fn=[{id:"full",size:"full"}],Nn=t=>{if(!t)return Fn;try{let e=JSON.parse(t);if(Array.isArray(e)&&e.length>0&&e.every(Ds))return e;if(Array.isArray(e))return Fn}catch{}return t.split(",").map(e=>e.trim()).filter(Boolean).map(e=>{let[i,n]=e.split(":").map(o=>o.trim()),s=Number(n),r=Number.isFinite(s)?s:n;return{id:i??"default",size:r}})},ks=["bottom","top","left","right"],Os=["spring","tween","ios-spring","material-bounce","linear","snappy"],Ct=t=>t&&ks.includes(t)?t:"bottom",Kn=t=>t&&Os.includes(t)?t:void 0,Is=["handle","sheet","zones"],zt=t=>t&&Is.includes(t)?t:void 0,He=t=>t?t.split(",").map(e=>e.trim()).filter(Boolean):void 0,pe=t=>{if(t===null)return;let e=Number(t);return Number.isFinite(e)&&t.trim()!==""?e:t},Ls=["top-left","top-center","top-right","center-left","center","center-right","bottom-left","bottom-center","bottom-right","sheet-top-left","sheet-top-center","sheet-top-right","dock-bottom","dock-top"],Ps=["fade","scale","slide","pop","none"],Vn=t=>{let e=t.getAttribute("data-position"),i=t.getAttribute("data-animation"),n=He(t.getAttribute("data-show-on")),s=He(t.getAttribute("data-fade-range")),r=s?.length===2&&s.every(o=>Number.isFinite(Number(o)))?[Number(s[0]),Number(s[1])]:void 0;return{position:e&&Ls.includes(e)?e:void 0,inset:t.getAttribute("data-inset")??void 0,showOn:n,fadeRange:r,interactive:t.getAttribute("data-interactive")!=="false",animation:i&&Ps.includes(i)?i:void 0}}});var Wn={};It(Wn,{BottomSheetElement:()=>W,defineBottomSheet:()=>Rt});var Fs,W,Rt,Dt=m(()=>{"use strict";Dn();On();Pn();Gn();Fs=typeof HTMLElement<"u"?HTMLElement:class{},W=class extends Fs{constructor(){super();a(this,"engine",null);a(this,"root");a(this,"offHandlers",[]);a(this,"refs");a(this,"backdropClickHandler",null);a(this,"stylesheetLinked",!1);a(this,"declarativeAnchors",[]);a(this,"lastActiveId",null);this.root=this.attachShadow({mode:"open"});let i=document.createElement("style");i.textContent=kn,this.root.appendChild(i);let n=document.createElement("style");n.textContent=[":host { display: contents; }",".bs-handle:focus-visible {"," outline: 2px solid currentColor;"," outline-offset: -2px;"," border-radius: var(--bs-radius, 20px);","}","@media (forced-colors: active) {"," .bs-handle:focus-visible { outline: 2px solid CanvasText; }","}"].join(`
2
+ `),this.root.appendChild(n);let{fragment:s,refs:r}=Ln();this.refs=r,this.root.appendChild(s)}static get observedAttributes(){return Bn.slice()}connectedCallback(){if(!this.stylesheetLinked){this.stylesheetLinked=!0;let i=this.getAttribute(Hn);if(i){let n=document.createElement("link");n.rel="stylesheet",n.href=i,this.root.appendChild(n)}}this.initEngine()}disconnectedCallback(){this.teardownEngine()}attributeChangedCallback(i,n,s){if(this.engine){if(_n.has(i)){this.applyLiveAttribute(i,s);return}this.teardownEngine(),this.initEngine()}}applyLiveAttribute(i,n){if(this.engine)switch(i){case de:{let s=pe(n);s!==void 0&&this.engine.setRadius(s);break}case ce:{let s=pe(n);s!==void 0&&this.engine.setMaxHeight(s);break}case ue:case he:this.engine.setScrimColor(n);break;case re:this.engine.setPersistent(n==="true");break;case oe:this.engine.setDisableClose(n==="true");break;case ae:this.engine.setDisableDrag(n==="true");break;case G:this.engine.setDragFromContent(n!=="false");break;case le:{let s=zt(n);s&&this.engine.setDragFrom(s);break}case se:this.engine.setMode(Ct(n));break;case P:n&&n!==this.engine.state.activeId&&this.engine.snapTo(n);break}}getEngine(){return this.engine}teardownEngine(){this.lastActiveId=this.engine?.state.activeId??this.lastActiveId,this.offHandlers.forEach(i=>i()),this.offHandlers=[],this.backdropClickHandler&&(this.refs.backdrop.removeEventListener("click",this.backdropClickHandler),this.backdropClickHandler=null),this.engine?.destroy(),this.engine=null;for(let i of this.declarativeAnchors)this.appendChild(i);this.declarativeAnchors=[]}initEngine(){let{sheet:i,handle:n,content:s,backdrop:r,announcer:o}=this.refs,l=Ct(this.getAttribute(se));i.setAttribute("data-mode",l),this.refs.leftButton.setAttribute("data-mode",l),this.refs.rightButton.setAttribute("data-mode",l);let c=this.getAttribute(St)==="true";c?i.setAttribute("aria-modal","true"):i.removeAttribute("aria-modal"),i.setAttribute("aria-label",this.getAttribute(Tt)??"Bottom sheet");let u=this.getAttribute(vt)!=="false";r.style.display=u?"":"none",u&&(this.backdropClickHandler=()=>{this.engine?.canDismiss()&&this.engine.close("backdrop")},r.addEventListener("click",this.backdropClickHandler));let d=Nn(this.getAttribute(ft)),h=this.getAttribute(bt)??void 0,p=this.lastActiveId&&d.some(b=>b.id===this.lastActiveId)?this.lastActiveId:h,v={element:i,handle:n,scrollContainer:s,backdrop:u?r:void 0,scrim:this.refs.screen,mode:l,snapPoints:d,allowed:He(this.getAttribute(gt)),initial:p,animation:Kn(this.getAttribute(yt)),focusTrap:c,closeOnEscape:this.getAttribute(xt)!=="false",lockBodyScroll:this.getAttribute(At)!=="false",stackEffect:this.getAttribute(Et)==="true",persistent:this.getAttribute(re)==="true",disableClose:this.getAttribute(oe)==="true",disableDrag:this.getAttribute(ae)==="true",dragFrom:zt(this.getAttribute(le)),dragFromContent:this.getAttribute(G)===null?void 0:this.getAttribute(G)!=="false",fitContentToSnap:this.hasAttribute(_e)&&this.getAttribute(_e)!=="false",closeOnRouteChange:this.getAttribute(wt)==="true",radius:pe(this.getAttribute(de)),maxHeight:pe(this.getAttribute(ce)),returnFocusTo:this.getAttribute(Mt)??void 0};this.engine=new Pe(v),i.setAttribute("data-active",this.engine.state.activeId);let g=this.getAttribute(he)??this.getAttribute(ue);g!==null&&this.engine.setScrimColor(g);for(let b of Array.from(this.querySelectorAll('[slot="anchor"]')))this.declarativeAnchors.push(b),this.engine.addAnchor({...Vn(b),element:b});this.offHandlers=[this.engine.on("snap",b=>{i.setAttribute("data-active",b.id),o.textContent=b.id,this.dispatchEvent(new CustomEvent("snap",{detail:b}))}),this.engine.on("before-snap",b=>{this.dispatchEvent(new CustomEvent("before-snap",{detail:b,cancelable:!0}))||b.cancel()}),this.engine.on("open",b=>this.dispatchEvent(new CustomEvent("open",{detail:b}))),this.engine.on("close",()=>this.dispatchEvent(new CustomEvent("close"))),this.engine.on("progress",b=>this.dispatchEvent(new CustomEvent("progress",{detail:b}))),this.engine.on("before-close",b=>{this.dispatchEvent(new CustomEvent("before-close",{detail:b,cancelable:!0}))||b.cancel()}),this.engine.on("opened",b=>this.dispatchEvent(new CustomEvent("opened",{detail:b}))),this.engine.on("closed",()=>this.dispatchEvent(new CustomEvent("closed"))),this.engine.on("dragstart",b=>this.dispatchEvent(new CustomEvent("drag-start",{detail:b}))),this.engine.on("dragend",b=>this.dispatchEvent(new CustomEvent("drag-end",{detail:b}))),this.engine.on("drag",b=>this.dispatchEvent(new CustomEvent("drag",{detail:b})))]}snapTo(i){return this.engine?.snapTo(i)??Promise.resolve()}open(i){return this.engine?.open(i)??Promise.resolve()}close(i){return this.engine?.close(i)??Promise.resolve()}expand(){return this.engine?.expand()??Promise.resolve()}collapse(){return this.engine?.collapse()??Promise.resolve()}isTop(){return this.engine?.isTop()??!1}depth(){return this.engine?.depth()??0}canDismiss(){return this.engine?.canDismiss()??!1}setRadius(i){this.engine?.setRadius(i)}setMaxHeight(i){this.engine?.setMaxHeight(i)}setAllowed(i,n){this.engine?.setAllowed(i,n)}addAnchor(i){return this.engine?.addAnchor(i)??(()=>{})}setScrimStages(i){return this.engine?.setScrimStages(i)??(()=>{})}recompute(){this.engine?.recompute()}get sheetState(){return this.engine?.state??null}get snap(){return this.engine?.state.activeId??this.getAttribute(P)}set snap(i){if(i===null){this.removeAttribute(P);return}this.engine?i!==this.engine.state.activeId&&this.engine.snapTo(i):this.setAttribute(P,i)}},Rt=(t="bottom-sheet")=>{typeof customElements>"u"||customElements.get(t)||customElements.define(t,class extends W{})}});var Hs={};It(Hs,{BottomSheetElement:()=>W,defineBottomSheet:()=>Rt});Dt();typeof window<"u"&&typeof customElements<"u"&&Promise.resolve().then(()=>(Dt(),Wn)).then(({defineBottomSheet:t})=>{t()});return Xn(Hs);})();
3
3
  //# sourceMappingURL=element.iife.global.js.map