@zazz-ui/core 0.13.1 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/README.md +5 -9
  3. package/dist/sri.json +34 -30
  4. package/dist/zazz.css +1 -1
  5. package/dist/zazz.js +1 -1
  6. package/editor/zazz.css-data.json +173 -3
  7. package/editor/zazz.html-data.json +138 -0
  8. package/editor/zazz.language-data.json +313 -125
  9. package/editor/zazz.lint-data.json +1501 -1383
  10. package/package.json +1 -5
  11. package/src/base/_defaults.css +1 -1
  12. package/src/base/_reset.css +16 -2
  13. package/src/base/_variables.css +43 -31
  14. package/src/base/carousel-scroll.d.ts +161 -0
  15. package/src/base/carousel-scroll.d.ts.map +1 -0
  16. package/src/base/carousel-scroll.js +1035 -0
  17. package/src/base/carousel-scroll.ts +1227 -0
  18. package/src/base/carousel.d.ts +34 -0
  19. package/src/base/carousel.d.ts.map +1 -0
  20. package/src/base/carousel.js +279 -0
  21. package/src/base/carousel.ts +292 -0
  22. package/src/base/dialog-lifecycle.js +1 -1
  23. package/src/base/dialog-lifecycle.ts +1 -1
  24. package/src/base/gesture.d.ts +201 -0
  25. package/src/base/gesture.d.ts.map +1 -0
  26. package/src/base/gesture.js +317 -0
  27. package/src/base/gesture.ts +494 -0
  28. package/src/base/kit-styling.d.ts.map +1 -1
  29. package/src/base/kit-styling.js +182 -162
  30. package/src/base/kit-styling.ts +182 -162
  31. package/src/base/utils.d.ts +1 -1
  32. package/src/base/utils.js +2 -2
  33. package/src/base/utils.ts +2 -2
  34. package/src/globals.d.ts +7 -30
  35. package/src/head.d.ts.map +1 -1
  36. package/src/head.js +1 -25
  37. package/src/head.ts +1 -25
  38. package/src/index.css +1 -0
  39. package/src/index.d.ts +6 -5
  40. package/src/index.d.ts.map +1 -1
  41. package/src/index.js +6 -5
  42. package/src/index.ts +6 -5
  43. package/src/manifest.d.ts +1 -1
  44. package/src/manifest.d.ts.map +1 -1
  45. package/src/manifest.js +25 -13
  46. package/src/manifest.ts +26 -14
  47. package/src/primitives/button/button.css +1 -1
  48. package/src/primitives/carousel/carousel.css +103 -20
  49. package/src/primitives/carousel/carousel.d.ts +4 -32
  50. package/src/primitives/carousel/carousel.d.ts.map +1 -1
  51. package/src/primitives/carousel/carousel.js +39 -14
  52. package/src/primitives/carousel/carousel.ts +21 -25
  53. package/src/primitives/dialog/dialog.css +14 -8
  54. package/src/primitives/drawer/drawer-indent.html +27 -0
  55. package/src/primitives/drawer/drawer-nested.html +72 -0
  56. package/src/primitives/drawer/drawer-responsive-dialog.html +44 -0
  57. package/src/primitives/drawer/drawer-snap.html +26 -0
  58. package/src/primitives/drawer/drawer.css +528 -0
  59. package/src/primitives/drawer/drawer.d.ts +24 -0
  60. package/src/primitives/drawer/drawer.d.ts.map +1 -0
  61. package/src/primitives/drawer/drawer.html +42 -0
  62. package/src/primitives/drawer/drawer.js +765 -0
  63. package/src/primitives/drawer/drawer.ts +823 -0
  64. package/src/primitives/fields/fields.css +4 -2
  65. package/src/primitives/input/input.css +1 -1
  66. package/src/primitives/input-group/input-group.css +5 -5
  67. package/src/primitives/lightbox/lightbox.css +2 -2
  68. package/src/primitives/lightbox/lightbox.d.ts.map +1 -1
  69. package/src/primitives/lightbox/lightbox.js +9 -8
  70. package/src/primitives/lightbox/lightbox.ts +9 -8
  71. package/src/primitives/password-group/password-group.css +5 -5
  72. package/src/primitives/radio/radio.css +15 -10
  73. package/src/primitives/slider/slider.css +2 -2
  74. package/src/primitives/switch/switch.css +6 -6
  75. package/src/primitives/tabs/tabs.css +10 -10
  76. package/src/primitives/toaster/toaster.css +29 -1
  77. package/src/primitives/toaster/toaster.d.ts.map +1 -1
  78. package/src/primitives/toaster/toaster.js +117 -9
  79. package/src/primitives/toaster/toaster.ts +136 -9
  80. package/src/primitives/tooltip/tooltip.css +93 -10
  81. package/src/base/embla.d.ts +0 -90
  82. package/src/base/embla.d.ts.map +0 -1
  83. package/src/base/embla.js +0 -878
  84. package/src/base/embla.ts +0 -1066
package/dist/zazz.js CHANGED
@@ -1 +1 @@
1
- import e from"embla-carousel";import t from"embla-carousel-autoplay";import n from"embla-carousel-auto-scroll";import r from"embla-carousel-class-names";import{Signal as i}from"signal-polyfill";function a(e){if(e===`true`)return!0;if(e===`false`)return!1;if(!Number.isNaN(Number(e))&&e.trim()!==``)return Number(e);if(e.startsWith(`[`)&&e.endsWith(`]`))try{return JSON.parse(e)}catch{return e}return e}const o={parseValue:a,parseDataAttributes:(e,t)=>{let n={};for(let r of e.attributes)if(r.name.startsWith(t)){let e=r.name.replace(t,``).replace(/-([a-z])/g,(e,t)=>t.toUpperCase());n[e]=a(r.value)}return n}};typeof window<`u`&&(window.Utils=o);var s=class extends HTMLElement{#e=null;connectedCallback(){this.#e||(this.#e=new AbortController,this.setup(this.#e.signal))}connectedMoveCallback(){}disconnectedCallback(){this.#e?.abort(),this.#e=null,this.teardown?.()}};function c(e,t){typeof window<`u`&&(customElements.get(e)||customElements.define(e,t))}const l=[];function u(e){l.push(e)}function d(e){for(let t of l)t(e)}function f(e){return getComputedStyle(document.documentElement).getPropertyValue(e).trim()}const p=typeof CSS<`u`&&CSS.supports(`top`,`calc(sibling-index() * 1px)`);function m(e){let t=e.trim();return t?/^-?\d*\.?\d+ms$/.test(t)?parseFloat(t):/^-?\d*\.?\d+s$/.test(t)?parseFloat(t)*1e3:parseInt(t,10)||0:0}var h=class e{static#e(){return{margin:`0px`,threshold:.2,duration:f(`--ui-reveal-global-duration`)||`1000ms`,ease:f(`--ui-reveal-global-timing-function`)||`cubic-bezier(0.4, 0, 0.2, 1)`,wait:m(f(`--ui-reveal-global-wait`)),distance:f(`--ui-reveal-global-distance`)||`2rem`,step:f(`--ui-reveal-global-stagger-step`)||`120ms`,grow:parseFloat(f(`--ui-reveal-global-grow`))||.97,shrink:parseFloat(f(`--ui-reveal-global-shrink`))||1.03}}static get defaultConfig(){return e.#e()}#t=/* @__PURE__ */ new Map;config;constructor(t={}){this.config={...e.defaultConfig,...t.config},this.init()}#n(e){let t=JSON.stringify(e),n=this.#t.get(t);return n||(n=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(e.target.setAttribute(`data-reveal-state`,`in-view`),t.unobserve(e.target))})},e),this.#t.set(t,n)),n}#r(e){let t=e.dataset.revealMargin||this.config.margin,n=parseFloat(e.dataset.revealThreshold||this.config.threshold.toString());return{rootMargin:t,threshold:Math.min(Math.max(n,0),1)}}#i(e){let t=e.toString().trim();return/^-?\d*\.?\d+(ms|s)$/.test(t)?t:`${Math.max(0,parseInt(t,10)||0)}ms`}#a(e,t){Object.entries(t).forEach(([t,n])=>{n!=null&&e.style.setProperty(t,n.toString())})}#o(e){let t=e.dataset,n=this.#r(e),r=this.#n(n),i=t.revealStep?Math.max(0,m(t.revealStep)):null,a=t.revealWait?Math.max(0,m(t.revealWait)):null,o={duration:t.revealDuration?Math.max(0,parseInt(t.revealDuration,10)||0):this.config.duration,ease:t.revealEase||this.config.ease,distance:t.revealDistance||this.config.distance,order:t.revealOrder},s=Array.from(e.children),c=o.order===`reversed`?s.reverse():s;this.#a(e,{"--ui-reveal-stagger-base":a===null?null:`${a}ms`,"--ui-reveal-stagger-step":i===null?null:`${i}ms`});let l=0,u=0;if(!p){let t=getComputedStyle(e),n=(e,n)=>Math.max(0,m(t.getPropertyValue(e)||t.getPropertyValue(n)));l=n(`--ui-reveal-stagger-base`,`--ui-reveal-global-wait`),u=n(`--ui-reveal-stagger-step`,`--ui-reveal-global-stagger-step`)}c.forEach((e,n)=>{e instanceof HTMLElement&&(this.#a(e,{"--ui-reveal-duration":this.#i(o.duration),"--ui-reveal-ease":o.ease,"--ui-reveal-wait":p?null:`${l+u*n}ms`,"--ui-reveal-distance":o.distance,"--ui-reveal-scale":t.revealScale||null}),r.observe(e))})}#s(e){let t=e.dataset,n=this.#r(e),r=this.#n(n),i=t.revealDuration?Math.max(0,parseInt(t.revealDuration,10)||0):null,a=t.revealWait?Math.max(0,parseInt(t.revealWait,10)||0):null;this.#a(e,{"--ui-reveal-duration":i===null?null:this.#i(i),"--ui-reveal-wait":a===null?null:this.#i(a),"--ui-reveal-ease":t.revealEase||null,"--ui-reveal-distance":t.revealDistance||null,"--ui-reveal-scale":t.revealScale||null}),r.observe(e)}init(){this.#t.forEach(e=>e.disconnect()),this.#t.clear();let e=document.documentElement.style;e.setProperty(`--ui-reveal-global-duration`,this.#i(this.config.duration)),e.setProperty(`--ui-reveal-global-timing-function`,this.config.ease),e.setProperty(`--ui-reveal-global-wait`,this.#i(this.config.wait)),e.setProperty(`--ui-reveal-global-distance`,this.config.distance),e.setProperty(`--ui-reveal-global-grow`,this.config.grow.toString()),e.setProperty(`--ui-reveal-global-shrink`,this.config.shrink.toString()),e.setProperty(`--ui-reveal-global-stagger-step`,this.#i(this.config.step)),document.querySelectorAll(`[data-reveal]`).forEach(e=>{e instanceof HTMLElement&&this.#s(e)}),document.querySelectorAll(`[data-reveal-each]`).forEach(e=>{e instanceof HTMLElement&&this.#o(e)})}refresh(){this.init()}};if(typeof window<`u`&&typeof document<`u`){let e=null,t=()=>{e||=new h};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,t):t(),u(()=>h.getAutoInstance()?.refresh()),h.disableAutoInit=()=>{e=`disabled`},h.getAutoInstance=()=>e===`disabled`?null:e}typeof window<`u`&&(window.Reveal=h);function g(e,t){e.dispatchEvent(new Event(t,{bubbles:!0}))}function ee(){if(typeof HTMLDialogElement>`u`||!(`closedBy`in HTMLDialogElement.prototype))return!1;let e=document.createElement(`dialog`);return e.setAttribute(`closedby`,`any`),e.closedBy===`any`}function _(e){let t=e.target;if(!(t instanceof HTMLDialogElement)||!t.open||t.getAttribute(`closedby`)!==`any`)return null;let{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom?t:null}function te(){let e=null;document.addEventListener(`pointerdown`,t=>{e=_(t)},!0),document.addEventListener(`pointerup`,t=>{let n=_(t);n&&n===e&&(typeof n.requestClose==`function`?n.requestClose():n.close()),e=null},!0)}const v=function(){v._bound||(v._bound=!0,new MutationObserver(function(e){for(let t of e)t.type===`attributes`&&t.attributeName===`open`&&t.target instanceof HTMLDialogElement&&t.target.hasAttribute(`open`)&&g(t.target,`zazz:dialog-open`)}).observe(document.documentElement,{attributes:!0,attributeFilter:[`open`],subtree:!0}),document.addEventListener(`close`,function(e){e.target instanceof HTMLDialogElement&&g(e.target,`zazz:dialog-close`)},!0),ee()||te())};typeof window<`u`&&typeof document<`u`&&(document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,v):v());function ne(e){return e?e.trim().split(/\s+/).filter(Boolean):[]}const re={autoplay:e=>t(b(e,`data-carousel-autoplay-`)),"auto-scroll":e=>n(b(e,`data-carousel-auto-scroll-`)),"class-names":e=>r(y(e,`data-carousel-class-names-`))};function y(e,t){return o.parseDataAttributes(e,t)}const ie=[{key:`autoplay`,prefix:`data-carousel-autoplay-`,interaction:`autoplay:interaction`},{key:`autoScroll`,prefix:`data-carousel-auto-scroll-`,interaction:`autoscroll:interaction`}];function b(e,t){let n=o.parseDataAttributes(e,t);return delete n.playOnInit,delete n.stopOnInteraction,{...n,defaultInteraction:!1}}const x=/* @__PURE__ */ new WeakMap,ae=[`INPUT`,`SELECT`,`TEXTAREA`];function oe(e){return e instanceof MouseEvent&&e.button!==0?!1:!(e.target instanceof Element&&ae.includes(e.target.nodeName))}function se(e,t,n){let r=[];for(let{key:i,prefix:a,interaction:o}of ie){let s=n.find(e=>e.name===i);if(!s)continue;let{playOnInit:c,stopOnInteraction:l}=y(t,a),u=l===!1,d=c!==!1,f=``,p=!1,m=()=>{!d||e.snapList().length<=1||e.internalEngine().options.active&&(s.play(),d=!s.isPlaying())},h=s.destroy;s.destroy=()=>{p=s.isPlaying(),h()},e.on(`reinit`,()=>{d||=p,p=!1,f===`pointer`&&(f=``,d=!0),f||m()}),e.on(o,(e,{detail:t})=>{let{interaction:n,originalEvent:r}=t;if(n===`pointerdown`||n===`slidefocus`){let e=r instanceof Event?null:r.detail;if(n===`pointerdown`&&e&&!oe(e)||!s.isPlaying()&&!f)return;f=u?n===`pointerdown`?`pointer`:`focus`:``,d=!1,s.stop()}else(n===`pointerup`&&f===`pointer`||n===`slidefocusout`&&f===`focus`)&&(f=``,s.play())}),r.push(()=>{d=!1,u?s.reset():s.stop()}),m()}r.length&&x.set(e,r)}function ce(e,t){let n=e.ownerDocument.documentElement,r,i=t=>{C(e,`dragging`,t),n.toggleAttribute(`data-ui-dragging`,t)},a=(e,{detail:n})=>{if(t&&!e.canGoToPrev()&&!e.canGoToNext())return!1;oe(n)&&i(!0)},o=()=>i(!1);return{name:`zazzDrag`,options:{},init(e){r=e,e.on(`pointerdown`,a).on(`pointerup`,o)},destroy(){r?.off(`pointerdown`,a).off(`pointerup`,o),i(!1)}}}function S(e){for(let t of x.get(e)??[])t()}function C(e,t,n){let r=(e.getAttribute(`data-carousel-state`)??``).split(/\s+/).filter(Boolean),i=n?[.../* @__PURE__ */ new Set([...r,t])]:r.filter(e=>e!==t);i.length?e.setAttribute(`data-carousel-state`,i.join(` `)):e.removeAttribute(`data-carousel-state`)}function le(e){let t=()=>{let t=e.slideNodes(),n=new Set(e.slidesInView()),r=new Set(e.internalEngine().scrollSnapList.slidesBySnap[e.selectedSnap()]??[]);t.forEach((e,t)=>{C(e,`in-view`,n.has(t)),C(e,`snapped`,r.has(t))})};e.on(`reinit`,t).on(`select`,t).on(`slidesinview`,t),t()}function ue(e,t,n={}){e.forEach((e,r)=>{let i=r===t;C(e,`active`,i),n.ariaCurrent&&(i?e.setAttribute(`aria-current`,`true`):e.removeAttribute(`aria-current`))})}const w=(e,t,n)=>{if(!t)return;let r=t.querySelector(`[data-carousel-slot~="dot"]`);if(!r)return;let i=[],a=()=>{let a=e.snapList().length;if(t.innerHTML=``,a<=1)i=[];else{i=[];for(let o=0;o<a;o++){let a=r.cloneNode(!0);i.push(a),t.appendChild(a),a.addEventListener(`click`,()=>{S(e),e.goTo(o)},{signal:n})}}},o=()=>{i.length&&ue(i,e.selectedSnap())};return e.on(`reinit`,a).on(`reinit`,o).on(`select`,o),a(),o(),()=>{t.innerHTML=``}},T=(e,t,n)=>{t.slideNodes().forEach((t,r)=>{t.addEventListener(`click`,()=>{S(e),e.goTo(r)},{signal:n})})},de=(e,t)=>{let n=t.slideNodes(),r=()=>{let r=e.selectedSnap();t.goTo(r),ue(n,r,{ariaCurrent:!0})};e.on(`select`,r),r()};let E=0;function D(e,t,n,r={},i){let a=r.dragThresholdPx??6,o=n.includes(`commandfor`),s=!1,c=!1,l=0,u=0,d=0,f=0,p=0,m=0,h=()=>Math.hypot(d-l,f-u);e.addEventListener(`pointerdown`,e=>{e instanceof PointerEvent&&(e.pointerType!==`mouse`||e.button===0)&&(s=!0,c=!1,l=e.clientX,u=e.clientY,d=e.clientX,f=e.clientY,p=t.selectedSnap())},{passive:!0,signal:i}),e.addEventListener(`pointermove`,e=>{s&&e instanceof PointerEvent&&(d=e.clientX,f=e.clientY,c||h()>=a&&(c=!0))},{passive:!0,signal:i});let g=()=>{s&&c&&(m=performance.now()+250,o&&(E=m)),s=!1,c=!1};e.addEventListener(`pointerup`,g,{passive:!0,signal:i}),e.addEventListener(`pointercancel`,g,{passive:!0,signal:i}),t.on(`pointerup`,g),t.on(`scroll`,()=>{s&&(o?(h()>=a||t.selectedSnap()!==p)&&(c=!0):c=!0)}),e.addEventListener(`click`,t=>{if(performance.now()>m)return;let r=t.target instanceof Element?t.target.closest(n):null;r&&e.contains(r)&&(t.preventDefault(),t.stopImmediatePropagation())},{capture:!0,signal:i})}let O=!1;function fe(){O||(O=!0,document.addEventListener(`command`,e=>{e.cancelable&&performance.now()<=E&&e.preventDefault()},!0))}function pe(t){if(t.hasAttribute(`data-carousel-init`)||t.closest(`dialog:not([open])`))return;t.setAttribute(`data-carousel-init`,``);let n=t.querySelector(`[data-carousel-slot~="thumbs"]`),r=n?t.querySelector(`[data-carousel-slot~="viewport"]:not([data-carousel-slot~="thumbs"] *)`):t.querySelector(`[data-carousel-slot~="viewport"]`),i=t.querySelector(`[data-carousel-slot~="prev"]`),a=t.querySelector(`[data-carousel-slot~="next"]`),o=t.querySelector(`[data-carousel-slot~="dots"]`);if(!r)return;r.hasAttribute(`tabindex`)||r.setAttribute(`tabindex`,`0`);let s=y(t,`data-carousel-`);Object.keys(s).forEach(function(e){(e===`name`||e===`keyboard`||e===`plugins`||e.startsWith(`autoplay`)||e.startsWith(`autoScroll`)||e.startsWith(`classNames`))&&delete s[e]});let c=[ce(r,!(`draggable`in s))];for(let e of ne(t.getAttribute(`data-carousel-plugins`))){let n=re[e];n&&c.push(n(t))}let l=e(r,s,c);le(l),se(l,t,c),t._emblaApi=l;let u=new AbortController,{signal:d}=u;if(t._emblaController=u,i&&i.addEventListener(`click`,()=>{S(l),l.goToPrev()},{signal:d}),a&&a.addEventListener(`click`,()=>{S(l),l.goToNext()},{signal:d}),o&&w(l,o,d),t.querySelector(`[data-carousel-slot~="slide"][commandfor]`)&&D(t,l,`[data-carousel-slot~="slide"][commandfor]`,{dragThresholdPx:14},d),n){let r=n.querySelector(`[data-carousel-slot~="viewport"]`);if(r){let i={containScroll:`keepSnaps`,dragFree:!0},a=y(n,`data-carousel-thumbs-`),o=e(r,{...i,...a});t._emblaApiThumb=o,T(l,o,d),de(l,o),D(n,o,`[data-carousel-slot~="slide"]`,{},d)}}}function k(e){(e||document).querySelectorAll(`:is(ui-carousel, [data-ui~="carousel"])`).forEach(function(e){e.closest(`ui-carousel`)||pe(e)})}function me(){document.addEventListener(`zazz:dialog-open`,function(e){if(!(e.target instanceof HTMLDialogElement))return;let t=e.target;k(t),t.querySelectorAll(`:is(ui-carousel, [data-ui~="carousel"])`).forEach(function(e){let t=e.getAttribute(`data-carousel-start-index`);t!=null&&e._emblaApi&&(e._emblaApi.goTo(Number(t),!0),e.removeAttribute(`data-carousel-start-index`));let n=e.querySelector(`[data-carousel-slot~="viewport"]`);n instanceof HTMLElement&&n.focus({preventScroll:!0})})})}function he(){let e=document.querySelector(`dialog[open]`);if(e){let t=e.querySelector(`:is(ui-carousel, [data-ui~="carousel"])[data-carousel-init]`);if(t?._emblaApi&&t.getAttribute(`data-carousel-keyboard`)!==`false`)return t}let t=document.activeElement?.closest(`:is(ui-carousel, [data-ui~="carousel"])[data-carousel-init]`);return t?._emblaApi&&t.getAttribute(`data-carousel-keyboard`)!==`false`?t:null}const A=function(){A._bound||(A._bound=!0,document.addEventListener(`keydown`,function(e){if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`||e.defaultPrevented)return;let t=e.target;if(!(t instanceof HTMLElement)||t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||t.isContentEditable)return;let n=he();n&&(e.preventDefault(),S(n._emblaApi),e.key===`ArrowLeft`?n._emblaApi.goToPrev():n._emblaApi.goToNext())}))},ge={init:k,initRoot:pe,addDotBtnsAndClickHandlers:w,addThumbClickHandlers:T,addTogglethumbsActive:de};function _e(){document.addEventListener(`click`,function(e){if(!(e.target instanceof HTMLElement))return;let t=e.target.closest(`[data-carousel-start], [data-carousel-slot~='slide'][commandfor]`);if(!t)return;let n=t.getAttribute(`data-carousel-start`);if(n==null&&t.hasAttribute(`commandfor`)){let e=t.closest(`:is(ui-carousel, [data-ui~="carousel"])`);e?._emblaApi&&(n=String(e._emblaApi.selectedSnap()))}let r=t.getAttribute(`commandfor`);if(!r)return;let i=document.getElementById(r);if(!i)return;let a=i.querySelector(`:is(ui-carousel, [data-ui~="carousel"])`);a&&(a._emblaApi?a._emblaApi.goTo(Number(n),!0):n!=null&&a.setAttribute(`data-carousel-start-index`,n))})}typeof window<`u`&&typeof document<`u`&&(u(e=>k(e)),document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,function(){k(),me(),_e(),A(),fe()}):(k(),me(),_e(),A(),fe())),typeof window<`u`&&(window.EmblaInit=ge);const j=.1,M=.999,ve=/[\\/_+.#"@[({&]/,ye=/[\\/_+.#"@[({&]/g,be=/[\s-]/,N=/[\s-]/g;function P(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?1:.99;let s=`${i},${a}`,c=o[s];if(c!==void 0)return c;let l=r.charAt(a),u=n.indexOf(l,i),d=0;for(;u>=0;){let s=P(e,t,n,r,u+1,a+1,o);if(s>d){if(u===i)s*=1;else if(ve.test(e.charAt(u-1))){s*=.8;let t=e.slice(i,u-1).match(ye);t&&i>0&&(s*=M**t.length)}else if(be.test(e.charAt(u-1))){s*=.9;let t=e.slice(i,u-1).match(N);t&&i>0&&(s*=M**t.length)}else s*=.17,i>0&&(s*=M**(u-i));e.charAt(u)!==t.charAt(a)&&(s*=.9999)}if(s<j&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a)){let i=P(e,t,n,r,u+1,a+2,o);i*j>s&&(s=i*j)}s>d&&(d=s),u=n.indexOf(l,u+1)}return o[s]=d,d}function F(e){return e.toLowerCase().replace(N,` `)}function xe(e,t,n=[]){let r=n.length>0?`${e} ${n.join(` `)}`:e;return P(r,t,F(r),F(t),0,0,{})}Symbol.dispose??=Symbol(`Symbol.dispose`);function I(e,t){return new i.State(e,t)}function L(e,t){return new i.Computed(e,t)}let R=!0;const z=new i.subtle.Watcher(()=>{R&&(R=!1,queueMicrotask(Se))});function Se(){R=!0;for(let e of z.getPending())e.get();z.watch()}function B(e,t={}){let n,r=!1,a=new i.Computed(()=>{typeof n==`function`&&n(),n=e()});z.watch(a),a.get();let o=()=>{r||(r=!0,z.unwatch(a),typeof n==`function`&&n(),n=void 0)};return t.signal?.addEventListener(`abort`,o,{once:!0}),Object.assign(o,{[Symbol.dispose]:o})}typeof window<`u`&&(window.Signals={state:I,computed:L,effect:B});function Ce(e,t){let n=e.trim();return t.map((e,t)=>{let r=n===``?1:xe(e.value,n,e.keywords);return{index:t,score:r,hidden:r<=0}})}function we(e,t,n){if(n===0)return-1;switch(t){case`ArrowDown`:return e<0?0:(e+1)%n;case`ArrowUp`:return e<0?n-1:(e-1+n)%n;case`Home`:return 0;case`End`:return n-1;default:return e}}let Te=0;var V=class extends s{partSelector(e){return`[data-${this.slotPrefix}-slot~="${e}"]`}config(e){return this.getAttribute(`data-${this.slotPrefix}-${e}`)}managesPanel=!0;openOnFocus=!0;get sortByScore(){return this.config(`sort`)===`score`}autoHighlight=!1;get filtersItems(){return this.config(`filter`)!==`none`}get ordersByScore(){return this.sortByScore&&this.filtersItems}searchInput=null;panel=null;query=I(``);open=I(!1);activeIndex=I(-1);itemsVersion=I(0);setup(e){let t=this.slotPrefix,n=this.querySelector(this.partSelector(`panel`)),r=this.querySelector(`input[role="combobox"]`)??this.querySelector(this.partSelector(`input`));if(!(n instanceof HTMLElement)||!(r instanceof HTMLInputElement))return;this.panel=n,this.searchInput=r;let i=n.querySelector(this.partSelector(`list`));i instanceof HTMLElement&&(i.id||=`ui-${t}-list-${++Te}`,r.setAttribute(`aria-controls`,i.id));let a=this.partSelector(`item`),o=e=>e instanceof Element&&(e.matches(a)||e.querySelector(a)!==null),s=new MutationObserver(e=>{e.some(e=>[...e.addedNodes,...e.removedNodes].some(o))&&(this.itemsVersion.set(this.itemsVersion.get()+1),this.autoHighlight&&this.activeIndex.set(0))});s.observe(i??n,{childList:!0,subtree:!0}),e.addEventListener(`abort`,()=>s.disconnect(),{once:!0}),r.addEventListener(`input`,()=>{this.query.set(r.value),this.activeIndex.set(this.autoHighlight?0:-1),this.managesPanel&&!this.#n()&&this.open.set(r.value.length>=this.#t())},{signal:e}),r.addEventListener(`keydown`,e=>this.#i(e),{signal:e}),this.#n()?(this.open.set(!0),r.setAttribute(`aria-expanded`,`true`)):this.managesPanel?(this.openOnFocus&&r.addEventListener(`focus`,()=>{r.value.length>=this.#t()&&this.open.set(!0)},{signal:e}),document.addEventListener(`pointerdown`,e=>{e.target instanceof Node&&(this.contains(e.target)||this.open.set(!1))},{signal:e}),this.addEventListener(`focusout`,e=>{let t=e.relatedTarget;t instanceof Node&&this.contains(t)||this.open.set(!1)},{signal:e})):n instanceof HTMLDialogElement?(this.addEventListener(`zazz:dialog-open`,e=>{e.target===n&&(this.open.set(!0),r.focus())},{signal:e}),this.addEventListener(`zazz:dialog-close`,e=>{e.target===n&&this.open.set(!1)},{signal:e})):n.addEventListener(`toggle`,e=>{let t=e.newState===`open`;this.open.set(t),t&&r.focus()},{signal:e}),n.addEventListener(`mousedown`,e=>{e.target instanceof Element&&(e.target.closest(`input, textarea, select, [contenteditable]`)||e.target.closest(this.partSelector(`list`))&&e.preventDefault())},{signal:e}),n.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let t=e.target.closest(this.partSelector(`item`));t&&!t.hidden&&this.commit(t,`pointer`)},{signal:e}),this.#n()||(this.managesPanel?B(()=>{let e=this.open.get();r.setAttribute(`aria-expanded`,String(e)),e&&!this.#r()?n.showPopover():!e&&this.#r()&&n.hidePopover(),e||this.activeIndex.set(-1)},{signal:e}):B(()=>{r.setAttribute(`aria-expanded`,String(this.open.get()))},{signal:e})),B(()=>{let e=this.open.get(),n=this.query.get(),i=this.activeIndex.get();if(!e&&this.managesPanel&&!this.#n()){r.removeAttribute(`aria-activedescendant`);return}let{items:a,ranked:o,visible:s}=this.#e(n),c=this.ordersByScore;for(let e of o){let t=a[e.index];t.hidden=e.hidden,c?t.style.order=String(-Math.round(e.score*1e3)):t.style.order&&t.style.removeProperty(`order`)}s.forEach((e,n)=>{e.id||=`ui-${t}-item-${++Te}`,n===i?e.setAttribute(`data-${this.slotPrefix}-state`,`highlighted`):e.removeAttribute(`data-${this.slotPrefix}-state`)});let l=i>=0?s[i]:void 0;l?(r.setAttribute(`aria-activedescendant`,l.id),l.scrollIntoView({block:`nearest`})):r.removeAttribute(`aria-activedescendant`)},{signal:e})}items(){let e=this.panel;return e?Array.from(e.querySelectorAll(this.partSelector(`item`))).filter(e=>e instanceof HTMLElement):[]}visibleItems(e,t){let n=t.filter(e=>!e.hidden);return this.ordersByScore&&n.sort((e,t)=>t.score-e.score||e.index-t.index),n.map(t=>e[t.index])}#e(e){this.itemsVersion.get();let t=this.items(),n=Ce(this.filtersItems?e:``,t.map(e=>({value:this.itemValue(e),keywords:(e.getAttribute(`data-${this.slotPrefix}-keywords`)??``).split(/\s+/).filter(Boolean)})));return{items:t,ranked:n,visible:this.visibleItems(t,n)}}itemValue(e){let t=e.getAttribute(`data-${this.slotPrefix}-value`);if(t!==null)return t;if(!e.querySelector(`kbd, ui-kbd-group`))return e.textContent?.trim()??``;let n=e.cloneNode(!0);for(let e of n.querySelectorAll(`kbd, ui-kbd-group`))e.remove();return n.textContent?.trim()??``}clearQuery(){let e=this.searchInput;e&&(e.value=``,this.query.set(``))}#t(){let e=Number(this.config(`min-length`));return Number.isFinite(e)&&e>0?e:0}#n(){return this.managesPanel&&this.panel!==null&&!this.panel.hasAttribute(`popover`)}#r(){return this.panel?.matches(`:popover-open`)??!1}#i(e){let t=this.searchInput;if(t){if(e.key===`Escape`&&this.managesPanel)this.open.get()&&!this.#n()?(e.preventDefault(),this.open.set(!1)):t.value&&(e.preventDefault(),this.clearQuery());else if([`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key)){if((e.key===`Home`||e.key===`End`)&&this.activeIndex.get()<0)return;e.preventDefault(),this.managesPanel&&!this.open.get()&&this.open.set(!0);let t=this.#e(this.query.get()).visible.length;this.activeIndex.set(we(this.activeIndex.get(),e.key,t))}else if(e.key===`Enter`){let t=this.activeIndex.get(),n=t>=0?this.#e(this.query.get()).visible[t]:void 0;n&&(e.preventDefault(),this.commit(n,`keyboard`))}}}};c(`ui-autocomplete`,class extends V{slotPrefix=`autocomplete`;commit(e,t){let n=this.searchInput;n&&(n.value=this.itemValue(e),this.query.set(n.value),this.open.set(!1),n.focus(),n.dispatchEvent(new Event(`change`,{bubbles:!0})))}});const H=`data-checkbox-controls`;function Ee(e){let t=e.filter(Boolean).length;return t===0?`none`:t===e.length?`all`:`some`}function U(e){let t=e.getAttribute(H);if(!t)return[];let n=(e.form??e.ownerDocument).querySelectorAll(`input[type="checkbox"]`);return Array.from(n).filter(n=>n.name===t&&n!==e)}function De(e){if(!e.name)return null;let t=(e.form??e.ownerDocument).querySelectorAll(`input[type="checkbox"][${H}]`);for(let n of t)if(n.getAttribute(H)===e.name&&n!==e)return n;return null}const W=/* @__PURE__ */ new Map;function G(e){W.get(e)?.members.set(U(e).map(e=>e.checked))}function K(e){let t=I(U(e).map(e=>e.checked)),n=L(()=>Ee(t.get())),r=B(()=>{let r=n.get(),i=t.get();e.checked=r===`all`,e.indeterminate=r===`some`,U(e).forEach((e,t)=>{let n=e.closest(`tr`);n&&(i[t]?n.setAttribute(`data-table-state`,`selected`):n.getAttribute(`data-table-state`)===`selected`&&n.removeAttribute(`data-table-state`))})});W.set(e,{members:t,dispose:r})}function Oe(e){let t=e.target;if(!(t instanceof HTMLInputElement)||t.type!==`checkbox`)return;if(t.hasAttribute(H)){W.has(t)||K(t);for(let e of U(t))e.checked=t.checked;G(t);return}let n=De(t);n&&(W.has(n)||K(n),G(n))}function q(e=document){for(let[e,t]of W)e.isConnected||(t.dispose(),W.delete(e));let t=e.querySelectorAll(`input[type="checkbox"][${H}]`);for(let e of t)W.has(e)?G(e):K(e)}typeof window<`u`&&typeof document<`u`&&(document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,()=>q()):q(),document.addEventListener(`change`,Oe),u(q));let J=null;function ke(){return J||(J=document.createElement(`template`),J.innerHTML=`<span data-ui="badge" data-combobox-slot="tag"><span data-combobox-slot="tag-label"></span><button type="button" tabindex="-1" data-combobox-slot="tag-remove"></button></span>`),J}function Ae(e,t,n){return n?{value:``,clear:!1}:e===``?{value:``,clear:!0}:{value:t,clear:!1}}function je(e,t){return e.replace(`{label}`,t)}c(`ui-combobox`,class extends V{slotPrefix=`combobox`;openOnFocus=!1;#e=``;#t=``;#n=[];#r=``;setup(e){super.setup(e);let t=this.searchInput;if(!t)return;let n=this.#i();this.#t=t.getAttribute(`placeholder`)??``,n&&this.querySelector(`[data-combobox-slot~="list"]`)?.setAttribute(`aria-multiselectable`,`true`);let r=this.#u();if(r!==null&&r.value!==``&&this.#o().length===0&&this.items().find(e=>this.#c(e)===r.value)?.setAttribute(`aria-selected`,`true`),n)for(let e of this.items())e.getAttribute(`aria-selected`)!==`true`&&e.setAttribute(`aria-selected`,`false`);this.#n=this.#o().map(e=>this.#c(e)),this.#e=n?``:this.#s()??``,t.value=this.#e,this.#d(!1);let i=t.closest(`[data-combobox-slot~="control"]`);t.addEventListener(`click`,()=>this.#a(),{signal:e}),i?.addEventListener(`mousedown`,e=>{e.target instanceof Element&&e.target!==t&&(e.preventDefault(),t.focus(),e.target.closest(`[data-combobox-slot~="trigger"], [data-combobox-slot~="tag"]`)||this.#a())},{signal:e}),i?.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let n=e.target.closest(`[data-combobox-slot~="tag-remove"]`);if(!n)return;e.preventDefault();let r=n.closest(`[data-combobox-slot~="tag"]`)?.getAttribute(`data-combobox-value`);this.#l(this.items().find(e=>this.#c(e)===r)),t.focus()},{signal:e});let a=this.querySelector(`[data-combobox-slot~="trigger"]`);a instanceof HTMLElement&&a.addEventListener(`click`,()=>{this.open.get()?this.open.set(!1):this.#a()},{signal:e}),n&&t.addEventListener(`keydown`,e=>{if(e.key!==`Backspace`||t.value!==``)return;let n=this.#o().at(-1);n&&(e.preventDefault(),this.#l(n))},{signal:e}),this.addEventListener(`focusout`,e=>{let n=e.relatedTarget;if(n instanceof Node&&this.contains(n))return;let r=Ae(t.value,this.#e,this.#i());t.value=r.value,this.query.set(``),r.clear&&this.#m()},{signal:e}),(r??t).form?.addEventListener(`reset`,()=>queueMicrotask(()=>this.#h()),{signal:e})}teardown(){for(let e of this.querySelectorAll(`[data-combobox-slot~="tag"], [data-combobox-state~="stamped"]`))e.remove();this.searchInput&&(this.searchInput.placeholder=this.#t)}itemValue(e){return e.textContent?.trim()??``}clearQuery(){let e=this.searchInput;e&&(e.value=this.#i()?``:this.#e,this.query.set(``))}commit(e,t){let n=this.searchInput;if(n){if(this.#i())e.setAttribute(`aria-selected`,String(e.getAttribute(`aria-selected`)!==`true`)),n.value=``,this.query.set(``),this.activeIndex.set(this.items().indexOf(e)),this.#d(!0),n.focus();else{this.#e=this.itemValue(e),n.value=this.#e,this.query.set(``);for(let e of this.items())e.removeAttribute(`aria-selected`);e.setAttribute(`aria-selected`,`true`),this.#d(!0),n.focus(),this.panel?.hasAttribute(`popover`)?this.open.set(!1):n.select()}}}#i(){return this.config(`variant`)===`multiselect`}#a(){let e=this.searchInput;if(e&&!this.open.get()){if(this.#i())e.value=``,this.activeIndex.set(-1);else{e.value=this.#e;let t=this.#o()[0];this.activeIndex.set(t?this.items().indexOf(t):-1),e.value!==``&&e.select()}this.query.set(``),this.open.set(!0)}}#o(){return this.items().filter(e=>e.getAttribute(`aria-selected`)===`true`)}#s(){let e=this.#o()[0];return e?this.itemValue(e):void 0}#c(e){return e.getAttribute(`data-combobox-value`)??this.itemValue(e)}#l(e){e&&(e.setAttribute(`aria-selected`,`false`),this.#d(!0))}#u(){let e=this.querySelector(`[data-combobox-slot~="value"]:not([data-combobox-state~="stamped"])`);return e instanceof HTMLInputElement?e:null}#d(e){let t=this.searchInput,n=this.#o().map(e=>this.#c(e)),r=JSON.stringify(n),i=r!==this.#r;this.#r=r,t&&this.#i()&&this.#p(t);let a=this.#u();if(!a)return;a.value=n[0]??``;for(let e of this.querySelectorAll(`[data-combobox-state~="stamped"]`))e.remove();let o=a;for(let e of n.slice(1)){let t=document.createElement(`input`);t.type=`hidden`,t.setAttribute(`data-combobox-slot`,`value`),t.setAttribute(`data-combobox-state`,`stamped`),a.name&&(t.name=a.name),t.value=e,o.after(t),o=t}e&&i&&a.dispatchEvent(new Event(`change`,{bubbles:!0}))}#f(){let e=this.querySelector(`[data-combobox-slot~="tag-template"]`),t=(e instanceof HTMLTemplateElement?e:ke()).content.firstElementChild;return t instanceof HTMLElement?t:null}#p(e){let t=e.closest(`[data-combobox-slot~="control"]`);if(!t)return;for(let e of t.querySelectorAll(`[data-combobox-slot~="tag"]`))e.remove();let n=this.#f();if(!n)return;let r=this.config(`label-remove`)??`Remove {label}`,i=this.#o().map(e=>{let t=this.itemValue(e),i=n.cloneNode(!0);if(i.setAttribute(`data-combobox-value`,this.#c(e)),!i.matches(`[data-combobox-slot~="tag"]`)){let e=i.getAttribute(`data-combobox-slot`);i.setAttribute(`data-combobox-slot`,e?`${e} tag`:`tag`)}let a=i.querySelector(`[data-combobox-slot~="tag-label"]`);return a?a.textContent=t:i.prepend(document.createTextNode(t)),i.querySelector(`[data-combobox-slot~="tag-remove"]`)?.setAttribute(`aria-label`,je(r,t)),i});e.before(...i),e.placeholder=i.length>0?``:this.#t}#m(e=!0){this.#e=``;let t=this.#i();for(let e of this.items())t?e.setAttribute(`aria-selected`,`false`):e.removeAttribute(`aria-selected`);this.searchInput&&(this.searchInput.value=``),this.query.set(``),this.#d(e)}get value(){let e=this.#o()[0];return e?this.#c(e):``}set value(e){let t=this.items().find(t=>this.#c(t)===e);if(!t){this.#m(!1);return}let n=this.#i();for(let e of this.items())n?e.setAttribute(`aria-selected`,`false`):e.removeAttribute(`aria-selected`);t.setAttribute(`aria-selected`,`true`),this.#e=n?``:this.itemValue(t);let r=this.searchInput;r&&(r.value=this.#e),this.query.set(``),this.#d(!1)}#h(){let e=this.searchInput;if(!e)return;let t=this.#i();for(let e of this.items()){let n=this.#n.includes(this.#c(e));t?e.setAttribute(`aria-selected`,String(n)):n?e.setAttribute(`aria-selected`,`true`):e.removeAttribute(`aria-selected`)}this.#e=t?``:this.#s()??``,e.value=this.#e,this.query.set(``),this.#d(!0)}});function Me(e){let t=e.split(`+`).map(e=>e.trim().toLowerCase()).filter(e=>e.length>0);if(t.length===0)return null;let n={key:``,ctrl:!1,alt:!1,shift:!1,meta:!1,mod:!1};for(let e of t.slice(0,-1))switch(e){case`mod`:n.mod=!0;break;case`ctrl`:case`control`:n.ctrl=!0;break;case`alt`:case`option`:n.alt=!0;break;case`shift`:n.shift=!0;break;case`meta`:case`cmd`:case`super`:n.meta=!0;break;default:return null}return n.key=t[t.length-1],n}function Ne(){return typeof navigator>`u`?!1:/mac|iphone|ipad|ipod/i.test(navigator.platform||navigator.userAgent)}function Pe(e,t,n=Ne()){let r=t.meta||t.mod&&n,i=t.ctrl||t.mod&&!n;return e.metaKey!==r||e.ctrlKey!==i||e.altKey!==t.alt||e.shiftKey!==t.shift?!1:e.key.toLowerCase()===t.key}function Fe(e){return e instanceof HTMLElement?e.isContentEditable?!0:e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement:!1}function Ie(e){return!e.ctrl&&!e.alt&&!e.meta&&!e.mod}function Le(e,t,n={}){let r=Me(e);return!r||typeof document>`u`?!1:(document.addEventListener(`keydown`,e=>{e.defaultPrevented||e.repeat||Ie(r)&&Fe(e.target)||Pe(e,r)&&(e.preventDefault(),t(e))},{signal:n.signal}),!0)}c(`ui-command`,class extends V{slotPrefix=`command`;managesPanel=!1;autoHighlight=!0;get sortByScore(){return this.config(`sort`)!==`document`}setup(e){super.setup(e);let t=this.searchInput,n=this.panel;if(!t||!n)return;let r=this.getAttribute(`data-command-hotkey`);r&&Le(r,()=>this.#n(),{signal:e});for(let t of this.items()){let n=t.getAttribute(`data-command-hotkey`);n&&Le(n,()=>this.#t(t,!0),{signal:e})}let i=()=>{t.value=``,this.query.set(``),this.activeIndex.set(0)};n instanceof HTMLDialogElement?this.addEventListener(`zazz:dialog-close`,e=>{e.target===n&&i()},{signal:e}):n.addEventListener(`toggle`,e=>{e.newState===`closed`&&i()},{signal:e})}commit(e,t){this.#e||this.#t(e,t===`keyboard`)}#e=!1;#t(e,t){if(this.dispatchEvent(new CustomEvent(`zazz:command-select`,{bubbles:!0,detail:{item:e,value:this.itemValue(e)}})),t){this.#e=!0;try{e.click()}finally{this.#e=!1}}e.hasAttribute(`data-command-stay-open`)||this.#r()}#n(){let e=this.panel;e&&(e instanceof HTMLDialogElement?e.open?e.close():e.showModal():e.togglePopover())}#r(){let e=this.panel;e&&(e instanceof HTMLDialogElement?e.open&&e.close():e.matches(`:popover-open`)&&e.hidePopover())}});var Re=class extends s{setup(e){let t=this.closest(`dialog`);t&&!t.open?t.addEventListener(`zazz:dialog-open`,()=>this.init(),{signal:e}):this.init()}teardown(){this._emblaController?.abort(),delete this._emblaController,this._emblaApi?.destroy(),this._emblaApiThumb?.destroy(),delete this._emblaApi,delete this._emblaApiThumb,this.removeAttribute(`data-carousel-init`)}init(){ge.initRoot(this)}get api(){return this._emblaApi??null}};c(`ui-carousel`,Re),c(`ui-lightbox`,class extends s{setup(e){let t=this.querySelector(`dialog`);t instanceof HTMLDialogElement&&(this.addEventListener(`zazz:dialog-open`,e=>{e.target===t&&this.#t(t)},{signal:e}),this.addEventListener(`zazz:dialog-close`,e=>{e.target===t&&this.#n(t)},{signal:e}))}#e(){return this.querySelector(`[data-lightbox-slot~="gallery"] :is(ui-carousel, [data-ui~="carousel"])`)}#t(e){let t=e.querySelector(`:is(ui-carousel, [data-ui~="carousel"])`);if(!t)return;t instanceof Re&&t.init();let n=this.#e()?._emblaApi;t._emblaApi&&n&&t._emblaApi.goTo(n.selectedSnap(),!0);let r=t.querySelector(`[data-carousel-slot~="viewport"]`);r instanceof HTMLElement&&r.focus({preventScroll:!0})}#n(e){let t=e.querySelector(`:is(ui-carousel, [data-ui~="carousel"])`)?._emblaApi,n=this.#e()?._emblaApi;t&&n&&n.goTo(t.selectedSnap())}}),c(`ui-menu`,class extends s{setup(e){this.addEventListener(`keydown`,e=>this.#n(e),{signal:e})}#e(){let e=this.querySelector(`:scope > [data-menu-slot~="popover"]`);return e instanceof HTMLElement?e:null}#t(e){return Array.from(e.querySelectorAll(`a[href], button`)).filter(e=>e instanceof HTMLElement).filter(e=>!e.hasAttribute(`disabled`)&&e.getAttribute(`aria-disabled`)!==`true`&&e.closest(`ui-menu, [data-ui~="menu"]`)===this)}#n(e){if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=e.target;if(!(t instanceof HTMLElement)||t.closest(`ui-menu, [data-ui~="menu"]`)!==this)return;let n=this.#e();if(!n)return;let r=t.parentElement===this&&(t.hasAttribute(`popovertarget`)||t.hasAttribute(`interestfor`)),i=n.matches(`:popover-open`);if(r&&!i&&(e.key===`ArrowDown`||e.key===`ArrowUp`)){e.preventDefault(),n.showPopover();let t=this.#t(n);t[e.key===`ArrowDown`?0:t.length-1]?.focus();return}if(!i||!n.contains(t))return;let a=this.#t(n);if(a.length===0)return;let o=a.indexOf(t),s;switch(e.key){case`ArrowDown`:s=o===-1?0:(o+1)%a.length;break;case`ArrowUp`:s=o===-1?a.length-1:(o-1+a.length)%a.length;break;case`Home`:s=0;break;case`End`:s=a.length-1;break;default:return}e.preventDefault(),a[s].focus()}});function ze(e,t){if(!e)return[t];let n=e.split(`-`).map(e=>Number.parseInt(e,10)).filter(e=>Number.isFinite(e)&&e>0);return n.reduce((e,t)=>e+t,0)===t&&n.length>0?n:[t]}function Be(e,t,n){let r;switch(t){case`numeric`:r=/[^0-9]/g;break;case`alpha`:r=/[^a-zA-Z]/g;break;case`alphanumeric`:r=/[^a-zA-Z0-9]/g;break;case`none`:r=/\s/g}return e.replace(r,``).slice(0,n)}function Ve(e,t,n,r,i){let a=r?Math.min(n,t-1):-1;return Array.from({length:t},(t,n)=>{let r=e.charAt(n);return{char:r===``?``:i?`•`:r,filled:r!==``,active:n===a}})}function He(e,t){return t>0&&e.length===t}c(`ui-otp`,class extends s{#e=null;#t=``;setup(e){let t=this.querySelector(`input`);if(!(t instanceof HTMLInputElement))return;let n=t.maxLength>0?t.maxLength:6,r=this.getAttribute(`data-otp-type`)??`numeric`,i=this.hasAttribute(`data-otp-mask`),a=ze(this.getAttribute(`data-otp-groups`),n),o=this.#n(a);this.setAttribute(`data-otp-ready`,``);let s=I(Be(t.value,r,n)),c=I(t.selectionStart??0),l=I(document.activeElement===t);t.addEventListener(`input`,()=>{let e=Be(t.value,r,n);t.value!==e&&(t.value=e),s.set(e),c.set(t.selectionStart??e.length)},{signal:e}),document.addEventListener(`selectionchange`,()=>{document.activeElement===t&&c.set(t.selectionStart??0)},{signal:e}),t.addEventListener(`focus`,()=>l.set(!0),{signal:e}),t.addEventListener(`blur`,()=>l.set(!1),{signal:e}),o.addEventListener(`pointerdown`,e=>{let r=e.target instanceof Element?e.target.closest(`[data-otp-index]`):null;e.preventDefault(),t.focus();let i=r?Number(r.getAttribute(`data-otp-index`)):n,a=Math.min(i,t.value.length);t.setSelectionRange(a,a),c.set(a)},{signal:e}),B(()=>{let e=Ve(s.get(),n,c.get(),l.get(),i),r=o.querySelectorAll(`[data-otp-index]`);e.forEach((e,t)=>{let n=r[t];if(!(n instanceof HTMLElement))return;n.textContent=e.char;let i=[e.filled&&`filled`,e.active&&`active`].filter(Boolean).join(` `);i?n.setAttribute(`data-otp-state`,i):n.removeAttribute(`data-otp-state`)});let a=He(s.get(),n);a?this.setAttribute(`data-otp-complete`,``):this.removeAttribute(`data-otp-complete`),a&&this.hasAttribute(`data-otp-auto-submit`)&&this.#t!==s.get()&&(this.#t=s.get(),t.form?.requestSubmit())},{signal:e})}teardown(){this.#e?.remove(),this.#e=null,this.removeAttribute(`data-otp-ready`),this.removeAttribute(`data-otp-complete`)}#n(e){let t=document.createElement(`div`);t.setAttribute(`data-otp-slot`,`rail`),t.setAttribute(`aria-hidden`,`true`);let n=0;return e.forEach((e,r)=>{if(r>0){let e=document.createElement(`span`);e.setAttribute(`data-otp-slot`,`separator`),e.setAttribute(`aria-role`,`presentation`),e.textContent=`–`,t.append(e)}for(let r=0;r<e;r++){let e=document.createElement(`span`);e.setAttribute(`data-otp-slot`,`cell`),e.setAttribute(`data-otp-index`,String(n++)),t.append(e)}}),this.append(t),this.#e=t,t}});function Ue(e,t,n){return{type:e?`text`:`password`,ariaPressed:e?`true`:`false`,ariaLabel:e?n:t}}c(`ui-password`,class extends s{setup(e){let t=this.querySelector(`input[type="password"], input[type="text"]`),n=this.querySelector(`[data-password-group-slot~="toggle"]`);if(!(t instanceof HTMLInputElement)||!(n instanceof HTMLElement))return;let r=I(t.type===`text`);n.addEventListener(`click`,()=>r.set(!r.get()),{signal:e}),B(()=>{let e=this.getAttribute(`data-password-group-label-show`)||`Show password`,i=this.getAttribute(`data-password-group-label-hide`)||`Hide password`,a=Ue(r.get(),e,i);t.type=a.type,n.setAttribute(`aria-pressed`,a.ariaPressed),n.setAttribute(`aria-label`,a.ariaLabel)},{signal:e})}});function We(e,t,n){return e.length===0?t:e.length===1?e[0]:`${e[0]} ${n.replace(`{n}`,String(e.length-1))}`}let Ge=0;c(`ui-multiselect`,class extends s{#e=[];#t=null;setup(e){let t=this.querySelector(`select[multiple]`);if(!(t instanceof HTMLSelectElement))return;this.#t=t;let n=this.getAttribute(`data-multiselect-placeholder`)??`Select…`,r=this.getAttribute(`data-multiselect-label-more`)??`(+{n} more)`,{trigger:i,label:a,panel:o,checkboxes:s}=this.#n(t);t.setAttribute(`data-multiselect-state`,`enhanced`);let c=()=>Array.from(t.selectedOptions).map(e=>e.label),l=I(c());s.forEach((n,r)=>{n.addEventListener(`change`,()=>{let e=t.options[r];e&&(e.selected=n.checked),l.set(c()),t.dispatchEvent(new Event(`change`,{bubbles:!0}))},{signal:e})}),t.addEventListener(`change`,()=>l.set(c()),{signal:e}),t.form?.addEventListener(`reset`,()=>queueMicrotask(()=>l.set(c())),{signal:e}),o.addEventListener(`toggle`,e=>{i.setAttribute(`aria-expanded`,String(e.newState===`open`))},{signal:e}),B(()=>{l.get(),a.textContent=We(c(),n,r),s.forEach((e,n)=>{let r=t.options[n];r&&e.checked!==r.selected&&(e.checked=r.selected)})},{signal:e})}teardown(){for(let e of this.#e)e.remove();this.#e=[],this.#t?.removeAttribute(`data-multiselect-state`),this.#t=null}#n(e){let t=`ui-multiselect-panel-${++Ge}`,n=document.createElement(`button`);n.type=`button`,n.dataset.ui=`select`,n.setAttribute(`data-multiselect-slot`,`trigger`),n.setAttribute(`popovertarget`,t),n.setAttribute(`aria-expanded`,`false`);let r=document.createElement(`span`);r.setAttribute(`data-multiselect-slot`,`label`);let i=document.createElement(`span`);i.setAttribute(`data-multiselect-slot`,`icon`),i.setAttribute(`aria-hidden`,`true`),n.append(r,i);let a=document.createElement(`div`);a.id=t,a.setAttribute(`data-multiselect-slot`,`panel`),a.setAttribute(`popover`,`auto`);let o=this.getAttribute(`data-multiselect-side`),s=this.getAttribute(`data-multiselect-align`);o&&a.setAttribute(`data-popover-side`,o),s&&a.setAttribute(`data-popover-align`,s);let c=[];for(let[n,r]of Array.from(e.options).entries()){let e=document.createElement(`label`);e.setAttribute(`data-multiselect-slot`,`option`);let i=document.createElement(`input`);i.type=`checkbox`,i.id=`${t}-${n}`,i.checked=r.selected,i.disabled=r.disabled,e.append(i,document.createTextNode(r.label)),a.append(e),c.push(i)}return e.after(n,a),this.#e=[n,a],{trigger:n,label:r,panel:a,checkboxes:c}}}),c(`ui-tabs`,class extends s{setup(e){this.addEventListener(`keydown`,e=>this.#e(e),{signal:e})}#e(e){let t=e.target;if(!(t instanceof HTMLInputElement)||t.type!==`radio`)return;let n=t.closest(`[role="tablist"], [data-tabs-slot~="list"]`);if(!n||n.closest(`ui-tabs, [data-ui~="tabs"]`)!==this)return;let r=Array.from(n.querySelectorAll(`input[type="radio"]`)).filter(e=>e instanceof HTMLInputElement).filter(e=>!e.disabled);if(r.length<2)return;let i=this.getAttribute(`data-tabs-orientation`)===`vertical`,a=i?`ArrowUp`:`ArrowLeft`,o=i?`ArrowDown`:`ArrowRight`,s=r.indexOf(t);if(s===-1)return;let c;switch(e.key){case a:c=(s-1+r.length)%r.length;break;case o:c=(s+1)%r.length;break;case`Home`:c=0;break;case`End`:c=r.length-1;break;default:return}e.preventDefault();let l=r[c];l.checked=!0,l.focus(),l.dispatchEvent(new Event(`change`,{bubbles:!0}))}});function Ke(){var e=typeof SuppressedError==`function`?SuppressedError:function(e,t){var n=Error();return n.name=`SuppressedError`,n.error=e,n.suppressed=t,n},t={},n=[];function r(e,t){if(t!=null){if(Object(t)!==t)throw TypeError(`using declarations can only be used with objects, functions, null, or undefined.`);if(e)var r=t[Symbol.asyncDispose||Symbol.for(`Symbol.asyncDispose`)];if(r===void 0&&(r=t[Symbol.dispose||Symbol.for(`Symbol.dispose`)],e))var i=r;if(typeof r!=`function`)throw TypeError(`Object is not disposable.`);i&&(r=function(){try{i.call(t)}catch(e){return Promise.reject(e)}}),n.push({v:t,d:r,a:e})}else e&&n.push({d:t,a:e});return t}return{e:t,u:r.bind(null,!1),a:r.bind(null,!0),d:function(){var r,i=this.e,a=0;function o(){for(;r=n.pop();)try{if(!r.a&&a===1)return a=0,n.push(r),Promise.resolve().then(o);if(r.d){var e=r.d.call(r.v);if(r.a)return a|=2,Promise.resolve(e).then(o,s)}else a|=1}catch(e){return s(e)}if(a===1)return i===t?Promise.resolve():Promise.reject(i);if(i!==t)throw i}function s(n){return i=i===t?n:new e(n,i),o()}return o()}}}Symbol.dispose??=Symbol(`Symbol.dispose`);const qe=[`success`,`info`,`warning`,`destructive`],Je={success:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"/></svg>`,info:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"/></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z" clip-rule="evenodd"/></svg>`,destructive:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"/></svg>`,close:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>`};function Ye(e){for(let t of e)t.style.blockSize=`auto`;return{[Symbol.dispose](){for(let t of e)t.style.removeProperty(`block-size`)}}}function Xe(e){let t=e.length,n=Array.from({length:t}),r=0;for(let i=t-1;i>=0;i--){let a=t-1-i;n[i]={stackIndex:a,offsetPx:r,zIndex:t-a,front:a===0,visible:a<3},r+=e[i]}return{toasts:n,frontToastHeightPx:t>0?e[t-1]:null}}function Y(e,t,n){let r=(e.getAttribute(`data-toaster-state`)??``).split(/\s+/).filter(Boolean),i=n?[.../* @__PURE__ */ new Set([...r,t])]:r.filter(e=>e!==t);i.length?e.setAttribute(`data-toaster-state`,i.join(` `)):e.removeAttribute(`data-toaster-state`)}function X(e){return e.matches(`[data-toaster-state~="removed"]`)}var Z=class extends s{#e=/* @__PURE__ */ new Map;#t=0;#n=0;#r=null;#i=0;#a=I(!1);#o=I(typeof document<`u`&&document.hidden);#s=L(()=>this.#a.get()||this.#o.get());#c=I([]);#l=L(()=>Xe(this.#c.get().map(e=>e.height)));setup(e){if(this.hasAttribute(`popover`)||this.setAttribute(`popover`,`manual`),this.hasAttribute(`role`)||this.setAttribute(`role`,`region`),this.hasAttribute(`aria-label`)||this.setAttribute(`aria-label`,`Notifications`),this.hasAttribute(`tabindex`)||this.setAttribute(`tabindex`,`-1`),!this.querySelector(`[data-toaster-slot~="list"]`)){let e=document.createElement(`ol`);e.setAttribute(`data-toaster-slot`,`list`),e.setAttribute(`aria-live`,`polite`),e.setAttribute(`aria-relevant`,`additions text`),e.setAttribute(`aria-atomic`,`false`),this.append(e)}this.addEventListener(`command`,e=>this.#u(e),{signal:e}),this.addEventListener(`mouseenter`,()=>this.#h(!0),{signal:e}),this.addEventListener(`mouseleave`,()=>this.#g(),{signal:e}),this.addEventListener(`focusin`,()=>this.#h(!0),{signal:e}),this.addEventListener(`focusout`,()=>this.#g(),{signal:e}),document.addEventListener(`visibilitychange`,()=>this.#o.set(document.hidden),{signal:e}),window.addEventListener(`resize`,()=>{cancelAnimationFrame(this.#n),this.#n=requestAnimationFrame(()=>this.#f())},{signal:e}),B(()=>{Y(this,`expanded`,this.#a.get())},{signal:e}),B(()=>{this.#s.get()?this.#y():this.#b()},{signal:e}),B(()=>{let e=this.#c.get(),{toasts:t,frontToastHeightPx:n}=this.#l.get();for(let n=0;n<e.length;n++){let{node:r,height:i}=e[n],a=t[n];Y(r,`front`,a.front),Y(r,`visible`,a.visible),r.style.zIndex=String(a.zIndex),r.style.setProperty(`--toasts-before`,String(a.stackIndex)),r.style.setProperty(`--initial-height`,`${i}px`),r.style.setProperty(`--offset`,`calc(${a.offsetPx}px + var(--ui-toaster-gap) * ${a.stackIndex})`)}n!==null&&this.style.setProperty(`--front-toast-height`,`${n}px`)},{signal:e})}teardown(){cancelAnimationFrame(this.#n),window.clearTimeout(this.#i);for(let e of this.#e.values())clearTimeout(e.timeoutId);this.#e.clear()}addToast(e={}){let t=`toast-${++this.#t}`,n=this.#p();return this.#x(),n.append(this.#d(e,t)),this.#f(),this.#_(t,e.duration??4e3),t}dismiss(e){if(e===void 0){this.dismissAll();return}let t=this.#p().querySelector(`[data-toaster-id="${CSS.escape(e)}"]`);if(!(t instanceof HTMLElement)||X(t))return;let n=this.#e.get(e);n&&clearTimeout(n.timeoutId),this.#e.delete(e),Y(t,`removed`,!0);let r=document.activeElement;r instanceof HTMLElement&&t.contains(r)&&r.matches(`:focus-visible`)&&this.#m().filter(e=>!X(e)).at(-1)?.focus({preventScroll:!0}),this.#f(),this.#C(t)}dismissAll(){for(let e of this.#m()){let t=e.dataset.toasterId;t&&this.dismiss(t)}}#u(e){let t=e.command;if(typeof t!=`string`||!t.startsWith(`--toast`))return;let n=this.#r;if(n&&n.source===e.source&&n.command===t)return;this.#r={source:e.source,command:t},window.setTimeout(()=>{this.#r=null},0);let r=e.source,i={},a=t.slice(8);if(qe.includes(a)&&(i.variant=a),r instanceof HTMLElement){let{toasterTitle:e,toasterDescription:t,toasterVariant:n,toasterDuration:a,toasterCloseButton:o}=r.dataset;if(e&&(i.title=e),t&&(i.description=t),!i.variant&&n&&qe.includes(n)&&(i.variant=n),a!==void 0){let e=a.trim()===``?NaN:Number(a);Number.isNaN(e)||(i.duration=e)}o!==void 0&&(i.closeButton=o!==`false`)}this.addToast(i)}#d(e,t){let n=document.createElement(`li`);if(n.setAttribute(`data-toaster-slot`,`toast`),n.dataset.toasterId=t,n.tabIndex=0,e.variant&&(n.dataset.toasterVariant=e.variant),e.variant){let t=document.createElement(`span`);t.setAttribute(`data-toaster-slot`,`icon`),t.setAttribute(`aria-hidden`,`true`),t.innerHTML=Je[e.variant],n.append(t)}let r=document.createElement(`div`);if(r.setAttribute(`data-toaster-slot`,`content`),e.title){let t=document.createElement(`div`);t.setAttribute(`data-toaster-slot`,`title`),t.textContent=e.title,r.append(t)}if(e.description){let t=document.createElement(`div`);t.setAttribute(`data-toaster-slot`,`description`),t.textContent=e.description,r.append(t)}n.append(r);let i=e.action;if(i){let e=document.createElement(`button`);e.type=`button`,e.dataset.ui=`button`,e.setAttribute(`data-toaster-slot`,`action`),e.dataset.buttonSize=`sm`,e.textContent=i.label,e.addEventListener(`click`,e=>{i.onClick?.(e),e.defaultPrevented||this.dismiss(t)}),n.append(e)}if(e.closeButton!==!1){let e=document.createElement(`button`);e.type=`button`,e.dataset.ui=`button`,e.setAttribute(`data-toaster-slot`,`close`),e.dataset.buttonVariant=`ghost`,e.dataset.buttonSize=`icon-sm`,e.setAttribute(`aria-label`,`Close notification`),e.innerHTML=Je.close,e.addEventListener(`click`,()=>this.dismiss(t)),n.append(e)}return n}#f(){try{var e=Ke();let t=this.#m().filter(e=>!X(e));e.u(Ye(t));let n=t.map(e=>({node:e,height:e.offsetHeight}));this.#c.set(n)}catch(t){e.e=t}finally{e.d()}}#p(){let e=this.querySelector(`[data-toaster-slot~="list"]`);return e instanceof HTMLOListElement||(e=document.createElement(`ol`),e.setAttribute(`data-toaster-slot`,`list`),this.append(e)),e}#m(){return Array.from(this.#p().children).filter(e=>e instanceof HTMLElement).filter(e=>e.matches(`[data-toaster-slot~="toast"]`))}#h(e){e&&window.clearTimeout(this.#i),this.#a.set(e)}#g(){window.clearTimeout(this.#i),this.#i=window.setTimeout(()=>{let e=document.activeElement,t=e instanceof Node&&this.contains(e);!this.matches(`:hover`)&&!t&&this.#h(!1)},100)}#_(e,t){if(t===1/0||Number.isNaN(t))return;let n={remaining:t,startedAt:0,timeoutId:0};this.#e.set(e,n),this.#s.get()||this.#v(e,n)}#v(e,t){t.startedAt=Date.now(),t.timeoutId=window.setTimeout(()=>this.dismiss(e),t.remaining)}#y(){for(let e of this.#e.values())e.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=0,e.remaining=Math.max(0,e.remaining-(Date.now()-e.startedAt)))}#b(){if(!this.#s.get())for(let[e,t]of this.#e)t.timeoutId||this.#v(e,t)}#x(){try{this.matches(`:popover-open`)||this.showPopover()}catch{}}#S(){try{this.matches(`:popover-open`)&&this.hidePopover()}catch{}}#C(e){let t=!1,n=()=>{t||(t=!0,e.remove(),this.#m().length===0&&(this.#h(!1),this.#S()))};e.addEventListener(`transitionend`,t=>{t.target===e&&n()});let r=getComputedStyle(e).transitionDuration.split(`,`).reduce((e,t)=>Math.max(e,Number.parseFloat(t)||0),0);window.setTimeout(n,Math.max(600,r*1e3+100))}};function Ze(e){let t=e instanceof Element?e:typeof e==`string`?document.getElementById(e):document.querySelector(`ui-toaster, [data-ui~="toaster"]`);return t instanceof Z?t:(console.warn('Toaster: no <ui-toaster> found. Add `<ui-toaster popover="manual"></ui-toaster>` to the page.'),null)}function Qe(e){return typeof e==`string`?{title:e}:e??{}}const Q={toast(e){let t=Qe(e),n=Ze(t.region);return n?n.addToast(t):null},success(e,t){return Q.toast({...t,title:e,variant:`success`})},info(e,t){return Q.toast({...t,title:e,variant:`info`})},warning(e,t){return Q.toast({...t,title:e,variant:`warning`})},error(e,t){return Q.toast({...t,title:e,variant:`destructive`})},dismiss(e){for(let t of document.querySelectorAll(`ui-toaster, [data-ui~="toaster"]`))t instanceof Z&&t.dismiss(e)}};c(`ui-toaster`,Z),typeof window<`u`&&(window.Toaster=Q);function $(e){return e.documentElement.getAttribute(`data-ui-navigation`)===`swap`}function $e(e){let t=[];for(let n of[e,...e.querySelectorAll(`*`)])(n.scrollTop||n.scrollLeft)&&t.push([n,n.scrollTop,n.scrollLeft]);return t}function et(e,t){let n=/* @__PURE__ */ new Map;for(let e of t.querySelectorAll(`a[href], area[href]`)){let t=e.getAttribute(`href`);n.set(t,[...n.get(t)??[],e])}for(let t of e.querySelectorAll(`a[href], area[href]`)){let e=(n.get(t.getAttribute(`href`))?.shift())?.getAttribute(`aria-current`);e==null?t.removeAttribute(`aria-current`):t.setAttribute(`aria-current`,e)}}function tt(e){let t=document.body,n=/* @__PURE__ */ new Map,r=[];for(let e of t.querySelectorAll(`[data-ui-persist]`)){let t=e.getAttribute(`data-ui-persist`);t&&!n.has(t)&&n.set(t,e)}for(let e of n.values())r.push(...$e(e));let i=/* @__PURE__ */ new Map;for(let e of t.querySelectorAll(`[data-ui-persist-scroll]`)){let t=e.getAttribute(`data-ui-persist-scroll`);t&&!i.has(t)&&i.set(t,[e.scrollTop,e.scrollLeft])}let a=document.importNode(e,!0),o=[];for(let e of a.querySelectorAll(`[data-ui-persist]`)){let t=n.get(e.getAttribute(`data-ui-persist`)??``);t&&o.push([e,t])}for(let e of a.querySelectorAll(`[data-ui-persist-scroll]`)){let t=e.getAttribute(`data-ui-persist-scroll`)??``,n=i.get(t);i.delete(t),n&&r.push([e,...n])}t.before(a);for(let[e,t]of o){let n=e.parentNode;n&&(et(t,e),typeof n.moveBefore==`function`?n.moveBefore(t,e):n.insertBefore(t,e),e.remove())}t.remove();for(let[e,t,n]of r)e.scrollTo({top:t,left:n,behavior:`instant`});return a}function nt(e){let t=e.querySelector(`main`),n=t?.querySelector(`h1`)??t??e;n instanceof HTMLElement&&(n.hasAttribute(`tabindex`)||(n.tabIndex=-1),n.focus({preventScroll:!0}))}let rt=0,it=``;function at(){let e=document.documentElement.style;rt++===0&&(it=e.scrollBehavior,e.scrollBehavior=`auto`);let t=!0;return()=>{t&&(t=!1,--rt===0&&(e.scrollBehavior=it))}}function ot(e){return new URL(e,location.href).origin===location.origin}function st(e){let t=/\.([a-z0-9]+)$/i.exec(new URL(e,location.href).pathname)?.[1];return!t||/^x?html?$/i.test(t)}if(`navigation`in window){let e=null;function t(t){e=t,location.replace(t)}window.navigation.addEventListener(`navigate`,n=>{e!==null&&n.destination.url===e?e=null:$(document)&&n.canIntercept&&n.navigationType!==`reload`&&(!n.destination.sameDocument||n.navigationType===`traverse`)&&!n.hashChange&&n.downloadRequest===null&&n.formData===null&&ot(n.destination.url)&&st(n.destination.url)&&n.intercept({async handler(){let e;try{let t=await fetch(n.destination.url,{signal:n.signal});if(!t.ok)throw Error(t.statusText);if(!t.headers.get(`content-type`)?.includes(`html`))throw Error(`not a page`);e=new DOMParser().parseFromString(await t.text(),`text/html`)}catch{if(n.signal.aborted)return;t(n.destination.url);return}if(n.signal.aborted)return;if(!$(e)||!(e.body instanceof HTMLElement)){t(n.destination.url);return}let r=document.body,i=()=>{r=tt(e.body),document.title=e.title,n.scroll()},a=at();if(document.startViewTransition)try{await document.startViewTransition(i).finished}finally{a()}else try{i()}finally{requestAnimationFrame(()=>requestAnimationFrame(a))}d(r),nt(r)}})})}else $(document)&&console.warn(`Navigation API not supported: data-ui-navigation falls back to full page loads.`);typeof CSS<`u`&&!CSS.supports(`container-type`,`scroll-state`)&&import(`./scroll-state-C8mA5gq6.js`);function ct(){for(let e of document.querySelectorAll(`[style]`))if(e.getAttribute(`style`)?.includes(`:`)&&e.style.length===0)return!0;return!1}if(typeof document<`u`){let e=()=>{ct()&&import(`./csp-LRx1fynI.js`)};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,e):e()}export{u as t};
1
+ import{Signal as e}from"signal-polyfill";function t(e){if(e===`true`)return!0;if(e===`false`)return!1;if(!Number.isNaN(Number(e))&&e.trim()!==``)return Number(e);if(e.startsWith(`[`)&&e.endsWith(`]`))try{return JSON.parse(e)}catch{return e}return e}const n={parseValue:t,parseDataAttributes:(e,n)=>{let r={};for(let i of e.attributes)if(i.name.startsWith(n)){let e=i.name.replace(n,``).replace(/-([a-z])/g,(e,t)=>t.toUpperCase());r[e]=t(i.value)}return r}};typeof window<`u`&&(window.Utils=n);var r=class extends HTMLElement{#e=null;connectedCallback(){this.#e||(this.#e=new AbortController,this.setup(this.#e.signal))}connectedMoveCallback(){}disconnectedCallback(){this.#e?.abort(),this.#e=null,this.teardown?.()}};function i(e,t){typeof window<`u`&&(customElements.get(e)||customElements.define(e,t))}const a=[];function o(e){a.push(e)}function s(e){for(let t of a)t(e)}function c(e){return getComputedStyle(document.documentElement).getPropertyValue(e).trim()}const l=typeof CSS<`u`&&CSS.supports(`top`,`calc(sibling-index() * 1px)`);function u(e){let t=e.trim();return t?/^-?\d*\.?\d+ms$/.test(t)?parseFloat(t):/^-?\d*\.?\d+s$/.test(t)?parseFloat(t)*1e3:parseInt(t,10)||0:0}var d=class e{static#e(){return{margin:`0px`,threshold:.2,duration:c(`--ui-reveal-global-duration`)||`1000ms`,ease:c(`--ui-reveal-global-timing-function`)||`cubic-bezier(0.4, 0, 0.2, 1)`,wait:u(c(`--ui-reveal-global-wait`)),distance:c(`--ui-reveal-global-distance`)||`2rem`,step:c(`--ui-reveal-global-stagger-step`)||`120ms`,grow:parseFloat(c(`--ui-reveal-global-grow`))||.97,shrink:parseFloat(c(`--ui-reveal-global-shrink`))||1.03}}static get defaultConfig(){return e.#e()}#t=/* @__PURE__ */ new Map;config;constructor(t={}){this.config={...e.defaultConfig,...t.config},this.init()}#n(e){let t=JSON.stringify(e),n=this.#t.get(t);return n||(n=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(e.target.setAttribute(`data-reveal-state`,`in-view`),t.unobserve(e.target))})},e),this.#t.set(t,n)),n}#r(e){let t=e.dataset.revealMargin||this.config.margin,n=parseFloat(e.dataset.revealThreshold||this.config.threshold.toString());return{rootMargin:t,threshold:Math.min(Math.max(n,0),1)}}#i(e){let t=e.toString().trim();return/^-?\d*\.?\d+(ms|s)$/.test(t)?t:`${Math.max(0,parseInt(t,10)||0)}ms`}#a(e,t){Object.entries(t).forEach(([t,n])=>{n!=null&&e.style.setProperty(t,n.toString())})}#o(e){let t=e.dataset,n=this.#r(e),r=this.#n(n),i=t.revealStep?Math.max(0,u(t.revealStep)):null,a=t.revealWait?Math.max(0,u(t.revealWait)):null,o={duration:t.revealDuration?Math.max(0,parseInt(t.revealDuration,10)||0):this.config.duration,ease:t.revealEase||this.config.ease,distance:t.revealDistance||this.config.distance,order:t.revealOrder},s=Array.from(e.children),c=o.order===`reversed`?s.reverse():s;this.#a(e,{"--ui-reveal-stagger-base":a===null?null:`${a}ms`,"--ui-reveal-stagger-step":i===null?null:`${i}ms`});let d=0,f=0;if(!l){let t=getComputedStyle(e),n=(e,n)=>Math.max(0,u(t.getPropertyValue(e)||t.getPropertyValue(n)));d=n(`--ui-reveal-stagger-base`,`--ui-reveal-global-wait`),f=n(`--ui-reveal-stagger-step`,`--ui-reveal-global-stagger-step`)}c.forEach((e,n)=>{e instanceof HTMLElement&&(this.#a(e,{"--ui-reveal-duration":this.#i(o.duration),"--ui-reveal-ease":o.ease,"--ui-reveal-wait":l?null:`${d+f*n}ms`,"--ui-reveal-distance":o.distance,"--ui-reveal-scale":t.revealScale||null}),r.observe(e))})}#s(e){let t=e.dataset,n=this.#r(e),r=this.#n(n),i=t.revealDuration?Math.max(0,parseInt(t.revealDuration,10)||0):null,a=t.revealWait?Math.max(0,parseInt(t.revealWait,10)||0):null;this.#a(e,{"--ui-reveal-duration":i===null?null:this.#i(i),"--ui-reveal-wait":a===null?null:this.#i(a),"--ui-reveal-ease":t.revealEase||null,"--ui-reveal-distance":t.revealDistance||null,"--ui-reveal-scale":t.revealScale||null}),r.observe(e)}init(){this.#t.forEach(e=>e.disconnect()),this.#t.clear();let e=document.documentElement.style;e.setProperty(`--ui-reveal-global-duration`,this.#i(this.config.duration)),e.setProperty(`--ui-reveal-global-timing-function`,this.config.ease),e.setProperty(`--ui-reveal-global-wait`,this.#i(this.config.wait)),e.setProperty(`--ui-reveal-global-distance`,this.config.distance),e.setProperty(`--ui-reveal-global-grow`,this.config.grow.toString()),e.setProperty(`--ui-reveal-global-shrink`,this.config.shrink.toString()),e.setProperty(`--ui-reveal-global-stagger-step`,this.#i(this.config.step)),document.querySelectorAll(`[data-reveal]`).forEach(e=>{e instanceof HTMLElement&&this.#s(e)}),document.querySelectorAll(`[data-reveal-each]`).forEach(e=>{e instanceof HTMLElement&&this.#o(e)})}refresh(){this.init()}};if(typeof window<`u`&&typeof document<`u`){let e=null,t=()=>{e||=new d};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,t):t(),o(()=>d.getAutoInstance()?.refresh()),d.disableAutoInit=()=>{e=`disabled`},d.getAutoInstance=()=>e===`disabled`?null:e}typeof window<`u`&&(window.Reveal=d);function f(e,t){e.dispatchEvent(new Event(t,{bubbles:!0}))}function p(){if(typeof HTMLDialogElement>`u`||!(`closedBy`in HTMLDialogElement.prototype))return!1;let e=document.createElement(`dialog`);return e.setAttribute(`closedby`,`any`),e.closedBy===`any`}function m(e){let t=e.target;if(!(t instanceof HTMLDialogElement)||!t.open||t.getAttribute(`closedby`)!==`any`)return null;let{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom?t:null}function h(){let e=null;document.addEventListener(`pointerdown`,t=>{e=m(t)},!0),document.addEventListener(`pointerup`,t=>{let n=m(t);n&&n===e&&(typeof n.requestClose==`function`?n.requestClose():n.close()),e=null},!0)}const g=function(){g._bound||(g._bound=!0,new MutationObserver(function(e){for(let t of e)t.type===`attributes`&&t.attributeName===`open`&&t.target instanceof HTMLDialogElement&&t.target.hasAttribute(`open`)&&f(t.target,`zazz:dialog-open`)}).observe(document.documentElement,{attributes:!0,attributeFilter:[`open`],subtree:!0}),document.addEventListener(`close`,function(e){e.target instanceof HTMLDialogElement&&f(e.target,`zazz:dialog-close`)},!0),p()||h())};typeof window<`u`&&typeof document<`u`&&(document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,g):g());function _(){let e=[];return{add(t,n,r){e.push({time:t,x:n,y:r}),e=e.filter(e=>t-e.time<=100)},velocity(){let t=e[0],n=e.at(-1);if(!t||!n)return{x:0,y:0};let r=n.time-t.time;return r<=0?{x:0,y:0}:{x:(n.x-t.x)/r,y:(n.y-t.y)/r}}}}function ee(e,t,n=.55){if(t<=0||e===0)return 0;let r=Math.abs(e);return Math.sign(e)*(r*t*n)/(t+n*r)}function te(e){let{offset:t,velocity:n,distance:r,velocityThreshold:i}=e;return t<=0?!1:n>i||t>=r&&n>-i}function ne(e){let{stops:t,position:n,velocity:r,active:i,size:a,sequential:o=!1}=e,{closeRatio:s=.25,flick:c=.4,fling:l=2}=e,u=t.length-1;if(u<0)return-1;let d=Math.abs(r),f=r>0;if(!o&&d>l)return f?-1:u;let p=t[Math.min(Math.max(i,0),u)]??0;if(d>c&&Math.abs(n-p)<a*.4)return f?i-1:Math.min(u,i+1);let m=t[0]??0;if(n>m)return n-m>=(a-m)*s&&r>-c?-1:0;let h=0;for(let e=1;e<=u;e++)Math.abs((t[e]??0)-n)<Math.abs((t[h]??0)-n)&&(h=e);return h}function v(e,t,n){let r=Math.abs(t);return r===0||n<=0?Math.max(0,n):Math.min(n,Math.max(Math.min(120,n),Math.abs(e)/r))}function y(e){return getComputedStyle(e).transitionDuration.split(`,`).reduce((e,t)=>Math.max(e,Number.parseFloat(t)||0),0)*1e3}function re(e){let[t=0,n=0]=getComputedStyle(e).translate.split(/\s+/).map(e=>Number.parseFloat(e)||0);return{x:t,y:n}}function ie(){let e=e=>{e.preventDefault(),e.stopPropagation()};document.addEventListener(`click`,e,{capture:!0,once:!0}),window.setTimeout(()=>document.removeEventListener(`click`,e,{capture:!0}),50)}function ae(e,t){let{signal:n}=t;if(n.aborted)return;let r=null,i=(e,t)=>{let n=e.axis===`x`,r=e.tracker.velocity();return{axis:e.axis,offset:n?t.clientX-e.originX:t.clientY-e.originY,velocity:n?r.x:r.y,startX:e.startX,startY:e.startY,target:e.target,pointerType:e.pointerType,event:t}},a=()=>{document.removeEventListener(`pointermove`,s),document.removeEventListener(`pointerup`,c),document.removeEventListener(`pointercancel`,l),r=null},o=e=>{if(r||!e.isPrimary||e.pointerType===`mouse`&&e.button!==0)return;let n=e.target;if(!(n instanceof Element)||n.closest(`input, select, textarea, [contenteditable]:not([contenteditable="false"]), [data-ui-no-drag]`))return;let i=_();i.add(e.timeStamp,e.clientX,e.clientY),r={phase:`pending`,pointerId:e.pointerId,pointerType:e.pointerType,target:n,startX:e.clientX,startY:e.clientY,originX:e.clientX,originY:e.clientY,axis:t.axis===`x`?`x`:`y`,tracker:i,selection:document.getSelection()?.toString()??``},document.addEventListener(`pointermove`,s),document.addEventListener(`pointerup`,c),document.addEventListener(`pointercancel`,l)},s=n=>{let a=r;if(a&&n.pointerId===a.pointerId){if(a.tracker.add(n.timeStamp,n.clientX,n.clientY),a.phase===`pending`){let r=n.clientX-a.startX,o=n.clientY-a.startY,s=t.slop??(a.pointerType===`mouse`?6:0);if(r===0&&o===0||Math.hypot(r,o)<s)return;let c=Math.abs(r)>Math.abs(o)?`x`:`y`;a.axis=t.axis===`both`?c:t.axis;let l=document.getSelection()?.toString()??``,u=l.length>0&&l!==a.selection;if(c!==a.axis||u||t.canStart&&!t.canStart(i(a,n))){a.phase=`rejected`;return}a.phase=`dragging`,a.originX=n.clientX,a.originY=n.clientY;try{e.setPointerCapture(a.pointerId)}catch{}t.onStart?.(i(a,n))}else a.phase===`dragging`&&t.onMove(i(a,n))}},c=e=>{let n=r;n&&e.pointerId===n.pointerId&&(n.tracker.add(e.timeStamp,e.clientX,e.clientY),a(),n.phase===`dragging`&&(ie(),t.onEnd(i(n,e))))},l=e=>{let n=r;n&&e.pointerId===n.pointerId&&(a(),n.phase===`dragging`&&(t.onCancel??t.onEnd)(i(n,e)))};e.addEventListener(`pointerdown`,o,{signal:n}),e.addEventListener(`touchmove`,e=>{r?.phase===`dragging`&&e.cancelable&&e.preventDefault()},{passive:!1,signal:n}),n.addEventListener(`abort`,()=>{let e=r;if(!e||(a(),e.phase!==`dragging`))return;let n=new PointerEvent(`pointercancel`,{pointerId:e.pointerId,clientX:e.originX,clientY:e.originY});(t.onCancel??t.onEnd)(i(e,n))},{once:!0})}function b(e,t,n){let r=(e.getAttribute(`data-carousel-state`)??``).split(/\s+/).filter(Boolean);if(r.includes(t)===n)return;let i=n?[...r,t]:r.filter(e=>e!==t);i.length?e.setAttribute(`data-carousel-state`,i.join(` `)):e.removeAttribute(`data-carousel-state`)}function oe(e,t=.0025){return Math.sign(e)*e*e/(2*t)}function x(e,t){let n=0,r=1/0;return e.forEach((e,i)=>{let a=Math.abs(e.pos-t);a<r&&(r=a,n=i)}),n}function se(e,t,n=Math.floor(e/2)){return Array.from({length:e},(r,i)=>((i-t+n)%e+e)%e)}function ce(e,t){return Math.max(1,Math.floor((e-Math.max(1,t))/2))}function le(e,t,n){let r=Math.min(t.first,n.first),i=Math.max(t.last,n.last);if(r>=0&&i<=e-1)return 0;let a=i-r+1;return a>e?null:Math.floor((e-a)/2)-r}function ue(e,t,n,r,i=!1){let a=x(e,n);return a===t&&Math.abs(r)>.3&&(a=t+(r>0?-1:1)),i||(a=Math.min(t+1,Math.max(t-1,a))),Math.min(e.length-1,Math.max(0,a))}function de(e){let t=(e.getAttribute(`data-carousel-plugins`)??``).split(/[\s,]+/),r=t.includes(`auto-scroll`)?`auto-scroll`:t.includes(`autoplay`)?`autoplay`:null;if(!r)return null;let i=n.parseDataAttributes(e,r===`autoplay`?`data-carousel-autoplay-`:`data-carousel-auto-scroll-`),a=(e,t)=>typeof e==`number`&&e>=0?e:t;return{mode:r,delay:a(i.delay,4e3),speed:a(i.speed,2),startDelay:a(i.startDelay,1e3),backward:i.direction===`backward`,playOnInit:i.playOnInit!==!1,stopOnInteraction:i.stopOnInteraction!==!1,stopOnMouseEnter:i.stopOnMouseEnter===!0,stopOnLastSnap:i.stopOnLastSnap===!0}}function S(e,t,r,i={}){let a=t.querySelector(`[data-carousel-slot~="container"]`);if(!a)return null;let o=[...a.querySelectorAll(`:scope > [data-carousel-slot~="slide"]`)],{prefix:s=`data-carousel-`,defaults:c={},controls:l=!0}=i,u=n.parseDataAttributes(e,s),d=(e,t)=>typeof e==`boolean`?e:t,f={loop:d(u.loop,c.loop??!1)&&o.length>=3,draggable:d(u.draggable,!0),dragFree:d(u.dragFree,c.dragFree??!1),skipSnaps:d(u.skipSnaps,!1),startSnap:typeof u.startSnap==`number`?u.startSnap:0,vertical:u.axis===`y`},p=null,m=1,h={back:0,ahead:0},g=-1,_=null,te=null,ne=/* @__PURE__ */ new Set,v=o.map(()=>0),y=!1,re=!1,ie=null,S=!1,C=!1,w=window.matchMedia(`(prefers-reduced-motion: reduce)`),fe=e=>e||w.matches?`auto`:`smooth`,T=f.vertical,pe=!T&&getComputedStyle(t).direction===`rtl`,me=pe?-1:1,E=()=>T?t.scrollTop:t.scrollLeft*me,D=e=>{T?t.scrollTop=e:t.scrollLeft=e*me},he=(e,n)=>t.scrollTo(T?{top:e,behavior:n}:{left:e*me,behavior:n}),O=()=>T?t.clientHeight:t.clientWidth,k=()=>Math.max(0,(T?t.scrollHeight:t.scrollWidth)-O()),ge=e=>Math.min(k(),Math.max(0,e)),_e=(e,t)=>T?e.top-t.top:pe?t.right-e.right:e.left-t.left,ve=e=>T?e.height:e.width,ye=e=>T?e:e*me,A=e=>{y||re?D(e):(b(t,`jumping`,!0),D(e),b(t,`jumping`,!1))},be=e=>{y=e,b(t,`gliding`,e)},xe=()=>{let e=t.getBoundingClientRect(),n=getComputedStyle(t),r=Number.parseFloat(T?n.scrollPaddingBlockStart:n.scrollPaddingInlineStart)||0,i=Number.parseFloat(T?n.scrollPaddingBlockEnd:n.scrollPaddingInlineEnd)||0,a=k(),s=O(),c=E(),l=0,u=`start`,d=o.map((t,n)=>{let o=t.getBoundingClientRect(),d=ve(o);n===0&&(l=d);let f=_e(o,e)+c,p=getComputedStyle(t).scrollSnapAlign.split(` `),m=T?p[0]:p.at(-1);n===0&&(u=m??`start`);let h=m===`center`?f+d/2-s/2:m===`end`?f+d-s+i:f-r;return{index:n,pos:Math.round(Math.min(a,Math.max(0,h)))}});m=l>0?Math.max(1,Math.round(s/l)):1;let f=m-1,p=+(l*m<s-1);h=u===`center`?{back:Math.floor(m/2)+p,ahead:Math.floor(m/2)+p}:u===`end`?{back:f,ahead:0}:{back:0,ahead:f},d.sort((e,t)=>e.pos-t.pos);let g=[];for(let{index:e,pos:t}of d){let n=g.at(-1);n&&Math.abs(n.pos-t)<1?n.slides.push(e):g.push({pos:t,slides:[e]})}return g},j=()=>p??=xe(),Se=()=>{p=null},Ce=()=>(j(),m),M=e=>f.loop?j()[e]?.slides[0]??0:e,we=e=>Math.max(0,j().findIndex(t=>t.slides.includes(e))),N=[],Te=l?e.querySelector(`[data-carousel-slot~="dots"]`):null,Ee=Te?.querySelector(`[data-carousel-slot~="dot"]`)?.cloneNode(!0),De=()=>{if(!Te||!(Ee instanceof HTMLElement))return;let e=f.loop?o.length:j().length;if(e!==N.length&&(Te.replaceChildren(),N=[],!(e<=1))){for(let t=0;t<e;t++){let e=Ee.cloneNode(!0);e.addEventListener(`click`,()=>{Q.interact(),Q.goTo(t)},{signal:r}),N.push(e)}Te.append(...N)}},Oe=e=>{let t=M(e),n=new Set(j()[e]?.slides??[]);o.forEach((e,t)=>b(e,`snapped`,n.has(t))),N.forEach((e,n)=>b(e,`active`,n===t))},P=t=>{t!==g&&(g=t,Oe(t),e.dispatchEvent(new CustomEvent(`zazz:carousel-select`,{detail:{index:M(t)}})))},ke=()=>{if(!f.loop)return;let e=j()[g]?.slides[0]??0,t=v[e]??0;o.forEach((n,r)=>{n.inert=(v[r]<t?r>e:r<e)&&!ne.has(r)})},F=0,Ae=(e,n,r=!0)=>{if(e.every((e,t)=>e===v[t]))return;let i=o[n],a=t.getBoundingClientRect(),s=_e(i.getBoundingClientRect(),a),c=r?++F:F;r&&(re=!0,b(t,`settling`,!0)),o.forEach((t,n)=>{v[n]!==e[n]&&(t.style.order=String(e[n]))}),v=e;let l=_e(i.getBoundingClientRect(),a)-s;A(E()+l),Se(),r&&requestAnimationFrame(()=>requestAnimationFrame(()=>{if(c!==F)return;re=!1,b(t,`settling`,!1);let e=ie;ie=null,e?.()}))},I=(e,t=!0)=>Ae(se(o.length,e,ce(o.length,Ce())),e,t),je=()=>{let e=t.getBoundingClientRect(),n=O(),r=1/0,i=-1/0;return o.forEach((t,a)=>{let o=t.getBoundingClientRect(),s=_e(o,e);s+ve(o)<=1||s>=n-1||(r=Math.min(r,v[a]),i=Math.max(i,v[a]))}),{first:r,last:i}},Me=0,Ne=()=>{V.has(`pointer`)&&(Fe=!0),Me||=requestAnimationFrame(()=>{Me=0,_==null&&!S&&P(x(j(),E()))})},L=()=>{if(S||C||Y)return;let e=_==null?null:j()[_];if(e&&Math.abs(E()-e.pos)>1)return;_=null;let t=x(j(),E());y&&!f.dragFree&&Math.abs(E()-j()[t].pos)>1?R(t):(be(!1),P(t),f.loop&&(I(j()[g]?.slides[0]??0),g=x(j(),E()),ke()),Ve())};if(t.addEventListener(`scroll`,Ne,{passive:!0,signal:r}),`onscrollend`in window)t.addEventListener(`scrollend`,L,{signal:r});else{let e=0;t.addEventListener(`scroll`,()=>{clearTimeout(e),e=window.setTimeout(L,120)},{passive:!0,signal:r}),r.addEventListener(`abort`,()=>clearTimeout(e),{once:!0})}let R=(e,t,n=null)=>{Je();let r=j(),i=Math.min(r.length-1,Math.max(0,e));if(re){_=i,te=n,P(i),ie=()=>R(e,t,n);return}let a=r[i]?.pos??0;Math.abs(E()-a)<1?L():(_=i,te=n,P(i),t?(A(a),L()):he(a,fe()))},Pe=e=>{let t=_??g;if(!f.loop){R(t+e);return}let n=o.length,r=(_==null?null:te)??M(t),i=(r+e+n)%n,a=v[r]+e,s=je(),c=le(n,s,{first:a-h.back,last:a+h.ahead});if(c!=null){if(c){let e=M(Math.max(0,g));_=null,Ae(v.map(e=>((e+c)%n+n)%n),Math.max(0,v.indexOf(s.first))),g=we(e),ke()}R(we(i),!1,i)}},z=l?de(e):null,B=!1,V=/* @__PURE__ */ new Set,Fe=!1,Ie=!0,Le=!1,H=0,U=0,Re=0,W=0,ze=()=>{H=0;let e=_??g;!f.loop&&e>=j().length-1?z?.stopOnLastSnap?(B=!1,q()):R(0):Pe(1)},Be=e=>{if(!z)return;U=requestAnimationFrame(Be);let t=Re?Math.min(50,e-Re):0;Re=e,W+=(z.backward?-z.speed:z.speed)*t/16.666666666666668;let n=Math.trunc(W);if(!n)return;W-=n;let r=E()+n;if(!f.loop&&(r<=0||r>=k())){D(ge(r)),B=!1,q();return}D(r);let i=x(j(),E());P(i),f.loop&&(I(j()[i]?.slides[0]??0,!1),g=x(j(),E()))},G=()=>{clearTimeout(H),cancelAnimationFrame(U),H=0,U=0,C&&(C=!1,L())},K=()=>{z&&(H=z.mode===`autoplay`?window.setTimeout(ze,z.delay):window.setTimeout(()=>{H=0,_=null,be(!0),C=!0,Re=0,W=0,U=requestAnimationFrame(Be)},z.startDelay))};function q(t=!1){let n=!!z&&B&&V.size===0&&Ie&&!document.hidden&&k()>0&&j().length>1;z&&b(e,`playing`,B),(n!==Le||t)&&(Le=n,G(),n&&K())}function Ve(){z&&(V.delete(`pointer`)?q():Le&&z.mode===`autoplay`&&(clearTimeout(H),H=window.setTimeout(ze,z.delay)))}let He=e=>{z&&B&&(z.stopOnInteraction?B=!1:V.add(e),e===`pointer`&&(Fe=!1,C&&(cancelAnimationFrame(U),U=0,C=!1,be(!1))),q())},Ue=e=>{V.delete(e)&&q()},We=t.closest(`[data-carousel-keyboard="false"]`)!==null,Ge=e=>{e instanceof KeyboardEvent&&e.key.startsWith(`Arrow`)&&!We||e instanceof MouseEvent&&e.button!==0||(He(`pointer`),_=null,Je()&&L())};for(let e of[`pointerdown`,`wheel`,`touchstart`,`keydown`])t.addEventListener(e,Ge,{passive:!0,signal:r});z&&(t.addEventListener(`pointerup`,()=>{Fe||Ue(`pointer`)},{signal:r}),t.addEventListener(`focusin`,e=>{e.target!==t&&He(`focus`)},{signal:r}),t.addEventListener(`focusout`,e=>{e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||Ue(`focus`)},{signal:r}),z.stopOnMouseEnter&&(e.addEventListener(`mouseenter`,()=>He(`hover`),{signal:r}),e.addEventListener(`mouseleave`,()=>Ue(`hover`),{signal:r})),document.addEventListener(`visibilitychange`,()=>q(),{signal:r}));let Ke=0,qe=0,J=e=>{S=e,b(t,`dragging`,e)},Y=0,Je=()=>Y?(cancelAnimationFrame(Y),Y=0,!0):!1,X=e=>{let t=E(),n=ge(t-oe(e)),r=n-t;if(w.matches||Math.abs(r)<1){L();return}let i=Math.min(.02,Math.abs(e)/Math.abs(r)),a=performance.now(),o=e=>{let t=r*Math.exp(-i*Math.max(0,e-a));Math.abs(t)<.5?(Y=0,D(n),L()):(D(n-t),Y=requestAnimationFrame(o))};Y=requestAnimationFrame(o)},Z=e=>{J(!1),a.style.translate&&E()>=k()-1&&a.addEventListener(`transitionend`,()=>{!S&&!Y&&_==null&&A(k())},{once:!0,signal:r}),a.style.translate=``;let t=E()-oe(e);f.dragFree?X(e):R(ue(j(),qe,t,e,f.skipSnaps))};f.draggable&&(ae(t,{axis:T?`y`:`x`,signal:r,canStart:({pointerType:e})=>e===`mouse`&&k()>0,onStart:()=>{_=null,Je(),Ke=E(),qe=x(j(),Ke),be(!0),J(!0)},onMove:({offset:e})=>{let t=Ke-ye(e),n=ge(t);A(n);let r=ee(n-t,O()/4);a.style.translate=r?T?`0 ${r}px`:`${r*me}px 0`:``},onEnd:({velocity:e})=>Z(ye(e)),onCancel:()=>Z(0)}),t.addEventListener(`dragstart`,e=>e.preventDefault(),{signal:r}));let Ye=new IntersectionObserver(e=>{ne=new Set(ne);for(let t of e){let e=o.indexOf(t.target);t.isIntersecting?ne.add(e):ne.delete(e),b(t.target,`in-view`,t.isIntersecting)}ke()},{root:t,rootMargin:T?`-1px 0px`:`0px -1px`});o.forEach(e=>Ye.observe(e));let Xe=z?new IntersectionObserver(([e])=>{Ie=e?.isIntersecting??!0,q()}):null;Xe?.observe(e);let Ze=new ResizeObserver(()=>{Se(),De(),_==null&&!S&&!C&&P(x(j(),E())),Oe(g),q()});Ze.observe(t),o.forEach(e=>Ze.observe(e));let Q={goTo(e,t){R(f.loop?we(e):e,t,f.loop?e:null)},goToNext:()=>Pe(1),goToPrev:()=>Pe(-1),selectedSnap:()=>M(Math.max(0,g)),snapList:()=>j().map(e=>e.pos),revealSlide(e,n){let r=o[e];if(!r)return;let i=E(),a=_e(r.getBoundingClientRect(),t.getBoundingClientRect())+i,s=a+ve(r.getBoundingClientRect()),c=ge(a<i?a:s>i+O()?s-O():i);Math.abs(c-i)<1||(n?A(c):he(c,fe()))},play(){B=!0,q()},stop(){B=!1,q()},isPlaying:()=>Le,interact(){z&&B&&(z.stopOnInteraction?(B=!1,q()):q(!0))},vertical:T,rtl:pe};if(l)for(let[t,n]of[[`prev`,-1],[`next`,1]])e.querySelector(`[data-carousel-slot~="${t}"]`)?.addEventListener(`click`,()=>{Q.interact(),Pe(n)},{signal:r});b(t,`free`,f.dragFree),De(),f.loop&&I(f.startSnap%o.length,!1);let Qe=f.loop?we(f.startSnap):f.startSnap;return A(j()[Qe]?.pos??0),P(x(j(),E())),ke(),z&&(B=z.playOnInit&&!(z.mode===`auto-scroll`&&w.matches),q()),r.addEventListener(`abort`,()=>{cancelAnimationFrame(Me),cancelAnimationFrame(Y),clearTimeout(H),cancelAnimationFrame(U),Ye.disconnect(),Xe?.disconnect(),Ze.disconnect(),S&&J(!1);for(let e of[`gliding`,`settling`,`free`])b(t,e,!1);b(e,`playing`,!1),a.style.translate=``;for(let e of o)e.style.order=``,e.inert=!1,b(e,`in-view`,!1),b(e,`snapped`,!1);Ee&&Te?.replaceChildren(Ee),delete e._carousel},{once:!0}),e._carousel=Q,Q}function C(e,t,n,r){let i=n.querySelector(`[data-carousel-slot~="viewport"]`);if(!i)return null;let a=S(n,i,r,{prefix:`data-carousel-thumbs-`,defaults:{dragFree:!0},controls:!1});if(!a)return null;let o=[...i.querySelectorAll(`[data-carousel-slot~="container"] > [data-carousel-slot~="slide"]`)];o.forEach((t,n)=>t.addEventListener(`click`,()=>{e.interact(),e.goTo(n)},{signal:r}));let s=(e,t)=>{o.forEach((t,n)=>{b(t,`active`,n===e),n===e?t.setAttribute(`aria-current`,`true`):t.removeAttribute(`aria-current`)}),a.revealSlide(e,t)};return t.addEventListener(`zazz:carousel-select`,e=>s(e.detail.index),{signal:r}),s(e.selectedSnap(),!0),r.addEventListener(`abort`,()=>{for(let e of o)b(e,`active`,!1),e.removeAttribute(`aria-current`)},{once:!0}),a}const w=`:is(ui-carousel, [data-ui~="carousel"])`;function fe(e){if(e.hasAttribute(`data-carousel-init`)||e.closest(`dialog:not([open])`)||e.matches(`[data-carousel-slot~="thumbs"]`))return;let t=e.querySelector(`[data-carousel-slot~="thumbs"]`),n=e.querySelector(t?`[data-carousel-slot~="viewport"]:not([data-carousel-slot~="thumbs"] *)`:`[data-carousel-slot~="viewport"]`);if(!n)return;e.setAttribute(`data-carousel-init`,``),n.hasAttribute(`tabindex`)||n.setAttribute(`tabindex`,`0`);let r=new AbortController;e._carouselController=r;let i=S(e,n,r.signal);i&&t&&C(i,e,t,r.signal)}function T(e){for(let t of(e??document).querySelectorAll(w))t.closest(`ui-carousel`)||fe(t)}function pe(){document.addEventListener(`zazz:dialog-open`,e=>{if(!(e.target instanceof HTMLDialogElement))return;let t=e.target;T(t);for(let e of t.querySelectorAll(w)){let t=e.getAttribute(`data-carousel-start-index`);t!=null&&e._carousel&&(e._carousel.goTo(Number(t),!0),e.removeAttribute(`data-carousel-start-index`));let n=e.querySelector(`[data-carousel-slot~="viewport"]`);n instanceof HTMLElement&&n.focus({preventScroll:!0})}})}function me(){let e=e=>!!e?._carousel&&e.getAttribute(`data-carousel-keyboard`)!==`false`,t=document.querySelector(`dialog[open]`)?.querySelector(`${w}[data-carousel-init]`);if(e(t))return t;let n=document.activeElement?.closest(`${w}[data-carousel-init]`);return e(n)?n:null}function E(){document.addEventListener(`keydown`,e=>{if(!e.key.startsWith(`Arrow`)||e.defaultPrevented)return;let t=e.target;if(!(t instanceof HTMLElement)||t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||t.isContentEditable)return;let n=me()?._carousel;if(!n)return;let[r,i]=n.vertical?[`ArrowUp`,`ArrowDown`]:n.rtl?[`ArrowRight`,`ArrowLeft`]:[`ArrowLeft`,`ArrowRight`];(e.key===r||e.key===i)&&(e.preventDefault(),n.interact(),e.key===r?n.goToPrev():n.goToNext())})}function D(){document.addEventListener(`click`,e=>{if(!(e.target instanceof HTMLElement))return;let t=e.target.closest(`[data-carousel-start], [data-carousel-slot~='slide'][commandfor]`);if(!t)return;let n=t.getAttribute(`data-carousel-start`);if(n==null){let e=t.closest(w)?._carousel;e&&(n=String(e.selectedSnap()))}let r=t.getAttribute(`commandfor`),i=r?document.getElementById(r)?.querySelector(w):null;i&&n!=null&&(i._carousel?i._carousel.goTo(Number(n),!0):i.setAttribute(`data-carousel-start-index`,n))})}const he={init:T,initRoot:fe};if(typeof window<`u`&&typeof document<`u`){o(e=>T(e));let e=()=>{T(),pe(),D(),E()};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,e):e(),window.Carousel=he}const O=.1,k=.999,ge=/[\\/_+.#"@[({&]/,_e=/[\\/_+.#"@[({&]/g,ve=/[\s-]/,ye=/[\s-]/g;function A(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?1:.99;let s=`${i},${a}`,c=o[s];if(c!==void 0)return c;let l=r.charAt(a),u=n.indexOf(l,i),d=0;for(;u>=0;){let s=A(e,t,n,r,u+1,a+1,o);if(s>d){if(u===i)s*=1;else if(ge.test(e.charAt(u-1))){s*=.8;let t=e.slice(i,u-1).match(_e);t&&i>0&&(s*=k**t.length)}else if(ve.test(e.charAt(u-1))){s*=.9;let t=e.slice(i,u-1).match(ye);t&&i>0&&(s*=k**t.length)}else s*=.17,i>0&&(s*=k**(u-i));e.charAt(u)!==t.charAt(a)&&(s*=.9999)}if(s<O&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a)){let i=A(e,t,n,r,u+1,a+2,o);i*O>s&&(s=i*O)}s>d&&(d=s),u=n.indexOf(l,u+1)}return o[s]=d,d}function be(e){return e.toLowerCase().replace(ye,` `)}function xe(e,t,n=[]){let r=n.length>0?`${e} ${n.join(` `)}`:e;return A(r,t,be(r),be(t),0,0,{})}Symbol.dispose??=Symbol(`Symbol.dispose`);function j(t,n){return new e.State(t,n)}function Se(t,n){return new e.Computed(t,n)}let Ce=!0;const M=new e.subtle.Watcher(()=>{Ce&&(Ce=!1,queueMicrotask(we))});function we(){Ce=!0;for(let e of M.getPending())e.get();M.watch()}function N(t,n={}){let r,i=!1,a=new e.Computed(()=>{typeof r==`function`&&r(),r=t()});M.watch(a),a.get();let o=()=>{i||(i=!0,M.unwatch(a),typeof r==`function`&&r(),r=void 0)};return n.signal?.addEventListener(`abort`,o,{once:!0}),Object.assign(o,{[Symbol.dispose]:o})}typeof window<`u`&&(window.Signals={state:j,computed:Se,effect:N});function Te(e,t){let n=e.trim();return t.map((e,t)=>{let r=n===``?1:xe(e.value,n,e.keywords);return{index:t,score:r,hidden:r<=0}})}function Ee(e,t,n){if(n===0)return-1;switch(t){case`ArrowDown`:return e<0?0:(e+1)%n;case`ArrowUp`:return e<0?n-1:(e-1+n)%n;case`Home`:return 0;case`End`:return n-1;default:return e}}let De=0;var Oe=class extends r{partSelector(e){return`[data-${this.slotPrefix}-slot~="${e}"]`}config(e){return this.getAttribute(`data-${this.slotPrefix}-${e}`)}managesPanel=!0;openOnFocus=!0;get sortByScore(){return this.config(`sort`)===`score`}autoHighlight=!1;get filtersItems(){return this.config(`filter`)!==`none`}get ordersByScore(){return this.sortByScore&&this.filtersItems}searchInput=null;panel=null;query=j(``);open=j(!1);activeIndex=j(-1);itemsVersion=j(0);setup(e){let t=this.slotPrefix,n=this.querySelector(this.partSelector(`panel`)),r=this.querySelector(`input[role="combobox"]`)??this.querySelector(this.partSelector(`input`));if(!(n instanceof HTMLElement)||!(r instanceof HTMLInputElement))return;this.panel=n,this.searchInput=r;let i=n.querySelector(this.partSelector(`list`));i instanceof HTMLElement&&(i.id||=`ui-${t}-list-${++De}`,r.setAttribute(`aria-controls`,i.id));let a=this.partSelector(`item`),o=e=>e instanceof Element&&(e.matches(a)||e.querySelector(a)!==null),s=new MutationObserver(e=>{e.some(e=>[...e.addedNodes,...e.removedNodes].some(o))&&(this.itemsVersion.set(this.itemsVersion.get()+1),this.autoHighlight&&this.activeIndex.set(0))});s.observe(i??n,{childList:!0,subtree:!0}),e.addEventListener(`abort`,()=>s.disconnect(),{once:!0}),r.addEventListener(`input`,()=>{this.query.set(r.value),this.activeIndex.set(this.autoHighlight?0:-1),this.managesPanel&&!this.#n()&&this.open.set(r.value.length>=this.#t())},{signal:e}),r.addEventListener(`keydown`,e=>this.#i(e),{signal:e}),this.#n()?(this.open.set(!0),r.setAttribute(`aria-expanded`,`true`)):this.managesPanel?(this.openOnFocus&&r.addEventListener(`focus`,()=>{r.value.length>=this.#t()&&this.open.set(!0)},{signal:e}),document.addEventListener(`pointerdown`,e=>{e.target instanceof Node&&(this.contains(e.target)||this.open.set(!1))},{signal:e}),this.addEventListener(`focusout`,e=>{let t=e.relatedTarget;t instanceof Node&&this.contains(t)||this.open.set(!1)},{signal:e})):n instanceof HTMLDialogElement?(this.addEventListener(`zazz:dialog-open`,e=>{e.target===n&&(this.open.set(!0),r.focus())},{signal:e}),this.addEventListener(`zazz:dialog-close`,e=>{e.target===n&&this.open.set(!1)},{signal:e})):n.addEventListener(`toggle`,e=>{let t=e.newState===`open`;this.open.set(t),t&&r.focus()},{signal:e}),n.addEventListener(`mousedown`,e=>{e.target instanceof Element&&(e.target.closest(`input, textarea, select, [contenteditable]`)||e.target.closest(this.partSelector(`list`))&&e.preventDefault())},{signal:e}),n.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let t=e.target.closest(this.partSelector(`item`));t&&!t.hidden&&this.commit(t,`pointer`)},{signal:e}),this.#n()||(this.managesPanel?N(()=>{let e=this.open.get();r.setAttribute(`aria-expanded`,String(e)),e&&!this.#r()?n.showPopover():!e&&this.#r()&&n.hidePopover(),e||this.activeIndex.set(-1)},{signal:e}):N(()=>{r.setAttribute(`aria-expanded`,String(this.open.get()))},{signal:e})),N(()=>{let e=this.open.get(),n=this.query.get(),i=this.activeIndex.get();if(!e&&this.managesPanel&&!this.#n()){r.removeAttribute(`aria-activedescendant`);return}let{items:a,ranked:o,visible:s}=this.#e(n),c=this.ordersByScore;for(let e of o){let t=a[e.index];t.hidden=e.hidden,c?t.style.order=String(-Math.round(e.score*1e3)):t.style.order&&t.style.removeProperty(`order`)}s.forEach((e,n)=>{e.id||=`ui-${t}-item-${++De}`,n===i?e.setAttribute(`data-${this.slotPrefix}-state`,`highlighted`):e.removeAttribute(`data-${this.slotPrefix}-state`)});let l=i>=0?s[i]:void 0;l?(r.setAttribute(`aria-activedescendant`,l.id),l.scrollIntoView({block:`nearest`})):r.removeAttribute(`aria-activedescendant`)},{signal:e})}items(){let e=this.panel;return e?Array.from(e.querySelectorAll(this.partSelector(`item`))).filter(e=>e instanceof HTMLElement):[]}visibleItems(e,t){let n=t.filter(e=>!e.hidden);return this.ordersByScore&&n.sort((e,t)=>t.score-e.score||e.index-t.index),n.map(t=>e[t.index])}#e(e){this.itemsVersion.get();let t=this.items(),n=Te(this.filtersItems?e:``,t.map(e=>({value:this.itemValue(e),keywords:(e.getAttribute(`data-${this.slotPrefix}-keywords`)??``).split(/\s+/).filter(Boolean)})));return{items:t,ranked:n,visible:this.visibleItems(t,n)}}itemValue(e){let t=e.getAttribute(`data-${this.slotPrefix}-value`);if(t!==null)return t;if(!e.querySelector(`kbd, ui-kbd-group`))return e.textContent?.trim()??``;let n=e.cloneNode(!0);for(let e of n.querySelectorAll(`kbd, ui-kbd-group`))e.remove();return n.textContent?.trim()??``}clearQuery(){let e=this.searchInput;e&&(e.value=``,this.query.set(``))}#t(){let e=Number(this.config(`min-length`));return Number.isFinite(e)&&e>0?e:0}#n(){return this.managesPanel&&this.panel!==null&&!this.panel.hasAttribute(`popover`)}#r(){return this.panel?.matches(`:popover-open`)??!1}#i(e){let t=this.searchInput;if(t){if(e.key===`Escape`&&this.managesPanel)this.open.get()&&!this.#n()?(e.preventDefault(),this.open.set(!1)):t.value&&(e.preventDefault(),this.clearQuery());else if([`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key)){if((e.key===`Home`||e.key===`End`)&&this.activeIndex.get()<0)return;e.preventDefault(),this.managesPanel&&!this.open.get()&&this.open.set(!0);let t=this.#e(this.query.get()).visible.length;this.activeIndex.set(Ee(this.activeIndex.get(),e.key,t))}else if(e.key===`Enter`){let t=this.activeIndex.get(),n=t>=0?this.#e(this.query.get()).visible[t]:void 0;n&&(e.preventDefault(),this.commit(n,`keyboard`))}}}};i(`ui-autocomplete`,class extends Oe{slotPrefix=`autocomplete`;commit(e,t){let n=this.searchInput;n&&(n.value=this.itemValue(e),this.query.set(n.value),this.open.set(!1),n.focus(),n.dispatchEvent(new Event(`change`,{bubbles:!0})))}});const P=`data-checkbox-controls`;function ke(e){let t=e.filter(Boolean).length;return t===0?`none`:t===e.length?`all`:`some`}function F(e){let t=e.getAttribute(P);if(!t)return[];let n=(e.form??e.ownerDocument).querySelectorAll(`input[type="checkbox"]`);return Array.from(n).filter(n=>n.name===t&&n!==e)}function Ae(e){if(!e.name)return null;let t=(e.form??e.ownerDocument).querySelectorAll(`input[type="checkbox"][${P}]`);for(let n of t)if(n.getAttribute(P)===e.name&&n!==e)return n;return null}const I=/* @__PURE__ */ new Map;function je(e){I.get(e)?.members.set(F(e).map(e=>e.checked))}function Me(e){let t=j(F(e).map(e=>e.checked)),n=Se(()=>ke(t.get())),r=N(()=>{let r=n.get(),i=t.get();e.checked=r===`all`,e.indeterminate=r===`some`,F(e).forEach((e,t)=>{let n=e.closest(`tr`);n&&(i[t]?n.setAttribute(`data-table-state`,`selected`):n.getAttribute(`data-table-state`)===`selected`&&n.removeAttribute(`data-table-state`))})});I.set(e,{members:t,dispose:r})}function Ne(e){let t=e.target;if(!(t instanceof HTMLInputElement)||t.type!==`checkbox`)return;if(t.hasAttribute(P)){I.has(t)||Me(t);for(let e of F(t))e.checked=t.checked;je(t);return}let n=Ae(t);n&&(I.has(n)||Me(n),je(n))}function L(e=document){for(let[e,t]of I)e.isConnected||(t.dispose(),I.delete(e));let t=e.querySelectorAll(`input[type="checkbox"][${P}]`);for(let e of t)I.has(e)?je(e):Me(e)}typeof window<`u`&&typeof document<`u`&&(document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,()=>L()):L(),document.addEventListener(`change`,Ne),o(L));let R=null;function Pe(){return R||(R=document.createElement(`template`),R.innerHTML=`<span data-ui="badge" data-combobox-slot="tag"><span data-combobox-slot="tag-label"></span><button type="button" tabindex="-1" data-combobox-slot="tag-remove"></button></span>`),R}function z(e,t,n){return n?{value:``,clear:!1}:e===``?{value:``,clear:!0}:{value:t,clear:!1}}function B(e,t){return e.replace(`{label}`,t)}i(`ui-combobox`,class extends Oe{slotPrefix=`combobox`;openOnFocus=!1;#e=``;#t=``;#n=[];#r=``;setup(e){super.setup(e);let t=this.searchInput;if(!t)return;let n=this.#i();this.#t=t.getAttribute(`placeholder`)??``,n&&this.querySelector(`[data-combobox-slot~="list"]`)?.setAttribute(`aria-multiselectable`,`true`);let r=this.#u();if(r!==null&&r.value!==``&&this.#o().length===0&&this.items().find(e=>this.#c(e)===r.value)?.setAttribute(`aria-selected`,`true`),n)for(let e of this.items())e.getAttribute(`aria-selected`)!==`true`&&e.setAttribute(`aria-selected`,`false`);this.#n=this.#o().map(e=>this.#c(e)),this.#e=n?``:this.#s()??``,t.value=this.#e,this.#d(!1);let i=t.closest(`[data-combobox-slot~="control"]`);t.addEventListener(`click`,()=>this.#a(),{signal:e}),i?.addEventListener(`mousedown`,e=>{e.target instanceof Element&&e.target!==t&&(e.preventDefault(),t.focus(),e.target.closest(`[data-combobox-slot~="trigger"], [data-combobox-slot~="tag"]`)||this.#a())},{signal:e}),i?.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let n=e.target.closest(`[data-combobox-slot~="tag-remove"]`);if(!n)return;e.preventDefault();let r=n.closest(`[data-combobox-slot~="tag"]`)?.getAttribute(`data-combobox-value`);this.#l(this.items().find(e=>this.#c(e)===r)),t.focus()},{signal:e});let a=this.querySelector(`[data-combobox-slot~="trigger"]`);a instanceof HTMLElement&&a.addEventListener(`click`,()=>{this.open.get()?this.open.set(!1):this.#a()},{signal:e}),n&&t.addEventListener(`keydown`,e=>{if(e.key!==`Backspace`||t.value!==``)return;let n=this.#o().at(-1);n&&(e.preventDefault(),this.#l(n))},{signal:e}),this.addEventListener(`focusout`,e=>{let n=e.relatedTarget;if(n instanceof Node&&this.contains(n))return;let r=z(t.value,this.#e,this.#i());t.value=r.value,this.query.set(``),r.clear&&this.#m()},{signal:e}),(r??t).form?.addEventListener(`reset`,()=>queueMicrotask(()=>this.#h()),{signal:e})}teardown(){for(let e of this.querySelectorAll(`[data-combobox-slot~="tag"], [data-combobox-state~="stamped"]`))e.remove();this.searchInput&&(this.searchInput.placeholder=this.#t)}itemValue(e){return e.textContent?.trim()??``}clearQuery(){let e=this.searchInput;e&&(e.value=this.#i()?``:this.#e,this.query.set(``))}commit(e,t){let n=this.searchInput;if(n){if(this.#i())e.setAttribute(`aria-selected`,String(e.getAttribute(`aria-selected`)!==`true`)),n.value=``,this.query.set(``),this.activeIndex.set(this.items().indexOf(e)),this.#d(!0),n.focus();else{this.#e=this.itemValue(e),n.value=this.#e,this.query.set(``);for(let e of this.items())e.removeAttribute(`aria-selected`);e.setAttribute(`aria-selected`,`true`),this.#d(!0),n.focus(),this.panel?.hasAttribute(`popover`)?this.open.set(!1):n.select()}}}#i(){return this.config(`variant`)===`multiselect`}#a(){let e=this.searchInput;if(e&&!this.open.get()){if(this.#i())e.value=``,this.activeIndex.set(-1);else{e.value=this.#e;let t=this.#o()[0];this.activeIndex.set(t?this.items().indexOf(t):-1),e.value!==``&&e.select()}this.query.set(``),this.open.set(!0)}}#o(){return this.items().filter(e=>e.getAttribute(`aria-selected`)===`true`)}#s(){let e=this.#o()[0];return e?this.itemValue(e):void 0}#c(e){return e.getAttribute(`data-combobox-value`)??this.itemValue(e)}#l(e){e&&(e.setAttribute(`aria-selected`,`false`),this.#d(!0))}#u(){let e=this.querySelector(`[data-combobox-slot~="value"]:not([data-combobox-state~="stamped"])`);return e instanceof HTMLInputElement?e:null}#d(e){let t=this.searchInput,n=this.#o().map(e=>this.#c(e)),r=JSON.stringify(n),i=r!==this.#r;this.#r=r,t&&this.#i()&&this.#p(t);let a=this.#u();if(!a)return;a.value=n[0]??``;for(let e of this.querySelectorAll(`[data-combobox-state~="stamped"]`))e.remove();let o=a;for(let e of n.slice(1)){let t=document.createElement(`input`);t.type=`hidden`,t.setAttribute(`data-combobox-slot`,`value`),t.setAttribute(`data-combobox-state`,`stamped`),a.name&&(t.name=a.name),t.value=e,o.after(t),o=t}e&&i&&a.dispatchEvent(new Event(`change`,{bubbles:!0}))}#f(){let e=this.querySelector(`[data-combobox-slot~="tag-template"]`),t=(e instanceof HTMLTemplateElement?e:Pe()).content.firstElementChild;return t instanceof HTMLElement?t:null}#p(e){let t=e.closest(`[data-combobox-slot~="control"]`);if(!t)return;for(let e of t.querySelectorAll(`[data-combobox-slot~="tag"]`))e.remove();let n=this.#f();if(!n)return;let r=this.config(`label-remove`)??`Remove {label}`,i=this.#o().map(e=>{let t=this.itemValue(e),i=n.cloneNode(!0);if(i.setAttribute(`data-combobox-value`,this.#c(e)),!i.matches(`[data-combobox-slot~="tag"]`)){let e=i.getAttribute(`data-combobox-slot`);i.setAttribute(`data-combobox-slot`,e?`${e} tag`:`tag`)}let a=i.querySelector(`[data-combobox-slot~="tag-label"]`);return a?a.textContent=t:i.prepend(document.createTextNode(t)),i.querySelector(`[data-combobox-slot~="tag-remove"]`)?.setAttribute(`aria-label`,B(r,t)),i});e.before(...i),e.placeholder=i.length>0?``:this.#t}#m(e=!0){this.#e=``;let t=this.#i();for(let e of this.items())t?e.setAttribute(`aria-selected`,`false`):e.removeAttribute(`aria-selected`);this.searchInput&&(this.searchInput.value=``),this.query.set(``),this.#d(e)}get value(){let e=this.#o()[0];return e?this.#c(e):``}set value(e){let t=this.items().find(t=>this.#c(t)===e);if(!t){this.#m(!1);return}let n=this.#i();for(let e of this.items())n?e.setAttribute(`aria-selected`,`false`):e.removeAttribute(`aria-selected`);t.setAttribute(`aria-selected`,`true`),this.#e=n?``:this.itemValue(t);let r=this.searchInput;r&&(r.value=this.#e),this.query.set(``),this.#d(!1)}#h(){let e=this.searchInput;if(!e)return;let t=this.#i();for(let e of this.items()){let n=this.#n.includes(this.#c(e));t?e.setAttribute(`aria-selected`,String(n)):n?e.setAttribute(`aria-selected`,`true`):e.removeAttribute(`aria-selected`)}this.#e=t?``:this.#s()??``,e.value=this.#e,this.query.set(``),this.#d(!0)}});function V(e){let t=e.split(`+`).map(e=>e.trim().toLowerCase()).filter(e=>e.length>0);if(t.length===0)return null;let n={key:``,ctrl:!1,alt:!1,shift:!1,meta:!1,mod:!1};for(let e of t.slice(0,-1))switch(e){case`mod`:n.mod=!0;break;case`ctrl`:case`control`:n.ctrl=!0;break;case`alt`:case`option`:n.alt=!0;break;case`shift`:n.shift=!0;break;case`meta`:case`cmd`:case`super`:n.meta=!0;break;default:return null}return n.key=t[t.length-1],n}function Fe(){return typeof navigator>`u`?!1:/mac|iphone|ipad|ipod/i.test(navigator.platform||navigator.userAgent)}function Ie(e,t,n=Fe()){let r=t.meta||t.mod&&n,i=t.ctrl||t.mod&&!n;return e.metaKey!==r||e.ctrlKey!==i||e.altKey!==t.alt||e.shiftKey!==t.shift?!1:e.key.toLowerCase()===t.key}function Le(e){return e instanceof HTMLElement?e.isContentEditable?!0:e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement:!1}function H(e){return!e.ctrl&&!e.alt&&!e.meta&&!e.mod}function U(e,t,n={}){let r=V(e);return!r||typeof document>`u`?!1:(document.addEventListener(`keydown`,e=>{e.defaultPrevented||e.repeat||H(r)&&Le(e.target)||Ie(e,r)&&(e.preventDefault(),t(e))},{signal:n.signal}),!0)}i(`ui-command`,class extends Oe{slotPrefix=`command`;managesPanel=!1;autoHighlight=!0;get sortByScore(){return this.config(`sort`)!==`document`}setup(e){super.setup(e);let t=this.searchInput,n=this.panel;if(!t||!n)return;let r=this.getAttribute(`data-command-hotkey`);r&&U(r,()=>this.#n(),{signal:e});for(let t of this.items()){let n=t.getAttribute(`data-command-hotkey`);n&&U(n,()=>this.#t(t,!0),{signal:e})}let i=()=>{t.value=``,this.query.set(``),this.activeIndex.set(0)};n instanceof HTMLDialogElement?this.addEventListener(`zazz:dialog-close`,e=>{e.target===n&&i()},{signal:e}):n.addEventListener(`toggle`,e=>{e.newState===`closed`&&i()},{signal:e})}commit(e,t){this.#e||this.#t(e,t===`keyboard`)}#e=!1;#t(e,t){if(this.dispatchEvent(new CustomEvent(`zazz:command-select`,{bubbles:!0,detail:{item:e,value:this.itemValue(e)}})),t){this.#e=!0;try{e.click()}finally{this.#e=!1}}e.hasAttribute(`data-command-stay-open`)||this.#r()}#n(){let e=this.panel;e&&(e instanceof HTMLDialogElement?e.open?e.close():e.showModal():e.togglePopover())}#r(){let e=this.panel;e&&(e instanceof HTMLDialogElement?e.open&&e.close():e.matches(`:popover-open`)&&e.hidePopover())}});var Re=class extends r{setup(e){let t=this.closest(`dialog`);t&&!t.open?t.addEventListener(`zazz:dialog-open`,()=>this.init(),{signal:e}):this.init()}teardown(){this._carouselController?.abort(),delete this._carouselController,this.removeAttribute(`data-carousel-init`)}init(){he.initRoot(this)}get api(){return this._carousel??null}};i(`ui-carousel`,Re);const W=1e3,ze=`dialog[data-ui~="drawer"]`,Be=`[data-drawer-slot~="handle"]`,G=`data-drawer-indent-state`;function K(e,t,n,r){let i=new Set((e.getAttribute(t)??``).split(/\s+/).filter(Boolean));i.has(n)!==r&&(r?i.add(n):i.delete(n),i.size?e.setAttribute(t,[...i].join(` `)):e.removeAttribute(t))}function q(e,t,n){K(e,`data-drawer-state`,t,n)}function Ve(e,t){q(e,`dragging`,t)}function He(e){Ve(e,!1),e.style.removeProperty(`translate`),e.style.removeProperty(`--_drawer-backdrop`)}function Ue(e,t){let n=e.getAttribute(`data-drawer-snap`)?.trim();if(!n)return[0];let r=Number.parseFloat(getComputedStyle(document.documentElement).fontSize)||16,i=/* @__PURE__ */ new Set;for(let e of n.split(/\s+/)){let n=Number.parseFloat(e);if(!Number.isFinite(n)||n<=0)continue;let a=n*t;e.endsWith(`rem`)?a=n*r:(e.endsWith(`px`)||n>1)&&(a=n),i.add(Math.round(t-Math.min(t,Math.max(1,a))))}return i.size?[...i].sort((e,t)=>t-e):[0]}function We(e){try{let t=e.animate([{opacity:1},{opacity:0}],{pseudoElement:`::backdrop`,duration:W,fill:`both`});return t.pause(),t}catch{return null}}function Ge(e){return getComputedStyle(e).getPropertyValue(`--_drawer-mode`).trim()===`1`}function Ke(e){if(e.scrollHeight<=e.clientHeight)return!1;let t=getComputedStyle(e).overflowY;return t===`auto`||t===`scroll`}function qe(e,t,n,r){if(!Ge(e))return!1;let i=e.getBoundingClientRect();if(t.startY<i.top||t.startX<i.left||t.startX>i.right)return!1;if(t.target.closest(Be)||r)return!0;let a=t.offset>0;for(let n=t.target;n&&e.contains(n);n=n.parentElement)if(Ke(n)&&(n.scrollTop>0||!a))return!1;return performance.now()-n>=100}const J=[];function Y(){for(let e=J.length-1;e>=0;e--){let t=J[e];t.isConnected&&t.open||J.splice(e,1)}J.forEach((e,t)=>{let n=J.length-1-t;q(e,`following`,!1),q(e,`stacked`,n>0),q(e,`nested`,t>0),n>0?e.style.setProperty(`--_drawer-depth`,String(n)):e.style.removeProperty(`--_drawer-depth`)}),Xe(J.length>0)}function Je(e,t,n){let r=J.indexOf(e);for(let e=0;e<r;e++){let i=J[e];i.style.setProperty(`--_drawer-depth`,String(r-e-t)),q(i,`following`,n)}}let X=null,Z=null;function Ye(e){let t=e.getBoundingClientRect(),n=e.offsetWidth||1,r=Number.parseFloat(getComputedStyle(e).getPropertyValue(`--_drawer-indent-inset`))||0,i=Math.max(0,-t.top),a=Math.max(0,e.offsetHeight-i-window.innerHeight);e.style.setProperty(`--_drawer-indent-scale`,String(Math.max(0,1-r*2/n))),e.style.setProperty(`--_drawer-indent-top`,`${i}px`),e.style.setProperty(`--_drawer-indent-bottom`,`${a}px`)}function Xe(e){X&&!X.isConnected&&(Z?.(),X=null);let t=X??document.querySelector(`ui-drawer-indent, [data-ui~="drawer-indent"]`);if(!t)return;if(e){Z?.(),X!==t&&(Ye(t),X=t),K(t,G,`on`,!0),K(t,G,`active`,!0);return}if(!X||Z)return;K(t,G,`dragging`,!1),t.style.removeProperty(`--_drawer-indent-amount`),K(t,G,`active`,!1);let n=()=>{Z?.(),t.removeAttribute(G);for(let e of[`scale`,`top`,`bottom`])t.style.removeProperty(`--_drawer-indent-${e}`);X=null},r=y(t);if(r<=0){n();return}let i=e=>{e.target===t&&e.propertyName===`scale`&&n()},a=window.setTimeout(n,r+100);t.addEventListener(`transitionend`,i),Z=()=>{window.clearTimeout(a),t.removeEventListener(`transitionend`,i),Z=null}}function Ze(e,t){X&&(K(X,G,`dragging`,t),t?X.style.setProperty(`--_drawer-indent-amount`,String(1-e)):X.style.removeProperty(`--_drawer-indent-amount`))}const Q=`--_drawer-keyboard`,Qe=/^(?:button|checkbox|color|file|hidden|image|radio|range|reset|submit|date|datetime-local|month|time|week)$/;function $e(e){return e instanceof HTMLTextAreaElement?!e.readOnly:e instanceof HTMLInputElement?!e.readOnly&&!Qe.test(e.type):e instanceof HTMLElement&&e.isContentEditable}function et(){let e=window.visualViewport;if(!e||Math.abs(e.scale-1)>.01)return 0;let t=Math.max(0,e.offsetTop)+e.height;return Math.max(0,Math.round(window.innerHeight-Math.min(window.innerHeight,t)))}function tt(e,t,n){let r=window.visualViewport;if(!r)return;let i=()=>J[J.length-1]===e,a=window.scrollX,o=window.scrollY,s=0,c=0,l=()=>{s=0;let t=i()?et():0;t!==c&&(c=t,t>0?e.style.setProperty(Q,`${t}px`):e.style.removeProperty(Q),n())},u=()=>{s||=requestAnimationFrame(l)},d=t=>{if(!e.contains(t)||document.activeElement!==t)return;let n=t.parentElement;for(;n&&e.contains(n)&&!Ke(n);)n=n.parentElement;if(!n||!e.contains(n))return;let i=n.getBoundingClientRect(),a=t.getBoundingClientRect(),o=Math.min(i.bottom,r.offsetTop+r.height)-16,s=Math.max(i.top,r.offsetTop)+16,c=0;if(a.bottom>o&&(c=a.bottom-o),a.top-c<s&&(c=a.top-s),Math.abs(c)<1)return;let l=matchMedia(`(prefers-reduced-motion: reduce)`).matches;n.scrollBy({top:c,behavior:l?`instant`:`smooth`})};r.addEventListener(`resize`,u,{signal:t}),r.addEventListener(`scroll`,u,{signal:t}),window.addEventListener(`scroll`,()=>{!i()||window.scrollX===a&&window.scrollY===o||window.scrollTo({left:a,top:o,behavior:`instant`})},{passive:!0,signal:t}),e.addEventListener(`focusin`,e=>{let n=e.target;if(n instanceof Element&&$e(n)&&i())for(let e of[100,350]){let r=window.setTimeout(()=>{l(),d(n)},e);t.addEventListener(`abort`,()=>window.clearTimeout(r),{once:!0})}},{signal:t}),t.addEventListener(`abort`,()=>{cancelAnimationFrame(s),e.style.removeProperty(Q)}),l()}const nt=/* @__PURE__ */ new WeakMap,rt=/* @__PURE__ */ new WeakMap;function it(e){if(nt.has(e))return;let t=new AbortController,{signal:n}=t;rt.get(e)?.cancel(),rt.delete(e),He(e);let r=e.hasAttribute(`data-drawer-snap`),i=0,a=0,o=1,s=0,c=[0],l=0,u=null,d=null,f=()=>{s=Math.max(0,-Number.parseFloat(getComputedStyle(e).marginBlockEnd)||0),o=Math.max(1,e.offsetHeight-s),c=r?Ue(e,o):[0],l=Math.min(l,c.length-1)},p=()=>{if(!r)return;let t=l===c.length-1;e.style.setProperty(`--_drawer-snap`,`${c[l]??0}px`),q(e,`expanded`,t),q(e,`partial`,!t)},m=(t,n)=>{Je(e,t,n),J.length===1&&J[0]===e&&Ze(t,n)},h=(t,n)=>{e.style.removeProperty(`--_drawer-backdrop`);let r=u;if(!r)return;let i=()=>{t||u!==r||r.playState!==`finished`||(r.cancel(),rt.delete(e),u=null)},a=Number(r.currentTime)||0,o=t?W-a:a;n<=0||o<=0?(r.playbackRate=t?1:-1,r.finish(),i()):(r.playbackRate=(t?1:-1)*o/n,r.play(),r.finished.then(i,()=>{}))},g=t=>{let n=Math.min(Math.max(t,0),c.length-1),r=n!==l;l=n,p(),Ve(e,!1),h(!1,y(e)),e.style.removeProperty(`translate`),m(0,!1),r&&e.dispatchEvent(new CustomEvent(`zazz:drawer-snap`,{bubbles:!0,detail:{index:l,value:o-(c[l]??0)}}))},_=()=>g(l),te=()=>{e.open&&(typeof e.requestClose==`function`?e.requestClose():e.close(),e.open&&(J.length===1&&Xe(!0),_()))},v=t=>{if(e.style.translate=`0 ${o+s}px`,h(!0,t),Je(e,1,!1),J.length===1&&J[0]===e&&Xe(!1),t<=0){te();return}let n=t=>{t.target===e&&t.propertyName===`translate`&&r()},r=()=>{d?.(),te()},i=window.setTimeout(r,t+100);e.addEventListener(`transitionend`,n),d=()=>{window.clearTimeout(i),e.removeEventListener(`transitionend`,n),d=null}};nt.set(e,{controller:t,snapTo:g}),Ge(e)&&(f(),p(),J.push(e),Y(),tt(e,n,()=>{f(),p()})),n.addEventListener(`abort`,()=>{d?.(),u?.playState===`paused`&&(u.cancel(),rt.delete(e))}),e.addEventListener(`scroll`,()=>{i=performance.now()},{capture:!0,passive:!0,signal:n}),e.addEventListener(`click`,e=>{c.length<2||!(e.target instanceof Element)||e.target.closest(Be)&&g((l+1)%c.length)},{signal:n}),window.addEventListener(`resize`,()=>{J.includes(e)&&(f(),p())},{signal:n}),ae(e,{axis:`y`,signal:n,canStart:t=>qe(e,t,i,l<c.length-1),onStart:()=>{d&&J.length===1&&Xe(!0),d?.(),a=re(e).y,f(),u||(u=We(e),u&&rt.set(e,u)),u?.pause(),Ve(e,!0)},onMove:({offset:t})=>{let n=a+t,r=c[c.length-1]??0,i=n>=r?n:r+ee(n-r,s+r);e.style.translate=`0 ${i}px`;let l=c[0]??0,d=Math.min(1,Math.max(0,(i-l)/Math.max(1,o-l)));u?u.currentTime=d*W:e.style.setProperty(`--_drawer-backdrop`,String(1-d)),m(d,!0)},onEnd:({offset:t,velocity:n})=>{let r=ne({stops:c,position:a+t,velocity:n,active:l,size:o,closeRatio:.25,flick:.4,fling:2,sequential:e.hasAttribute(`data-drawer-snap-sequential`)});Ve(e,!1),r<0?v(y(e)):g(r)},onCancel:_})}function at(e){nt.get(e)?.controller.abort(),nt.delete(e),e.removeAttribute(`data-drawer-state`),e.style.removeProperty(`--_drawer-depth`);let t=J.indexOf(e);t<0||(J.splice(t,1),Y())}const ot=function(){if(!ot._bound){ot._bound=!0,document.addEventListener(`zazz:dialog-open`,e=>{e.target instanceof HTMLDialogElement&&e.target.matches(ze)&&it(e.target)}),document.addEventListener(`zazz:dialog-close`,e=>{e.target instanceof HTMLDialogElement&&at(e.target)}),window.addEventListener(`resize`,()=>{X&&Ye(X)});for(let e of document.querySelectorAll(`${ze}[open]`))it(e)}};typeof window<`u`&&typeof document<`u`&&(document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,ot):ot()),i(`ui-lightbox`,class extends r{setup(e){let t=this.querySelector(`dialog`);t instanceof HTMLDialogElement&&(this.addEventListener(`zazz:dialog-open`,e=>{e.target===t&&this.#t(t)},{signal:e}),this.addEventListener(`zazz:dialog-close`,e=>{e.target===t&&this.#n(t)},{signal:e}))}#e(){return this.querySelector(`[data-lightbox-slot~="gallery"] :is(ui-carousel, [data-ui~="carousel"])`)}#t(e){let t=e.querySelector(`:is(ui-carousel, [data-ui~="carousel"])`);if(!t)return;t instanceof Re&&t.init();let n=t._carousel,r=this.#e()?._carousel;n&&r&&n.goTo(r.selectedSnap(),!0);let i=t.querySelector(`[data-carousel-slot~="viewport"]`);i instanceof HTMLElement&&i.focus({preventScroll:!0})}#n(e){let t=e.querySelector(`:is(ui-carousel, [data-ui~="carousel"])`)?._carousel,n=this.#e()?._carousel;t&&n&&n.goTo(t.selectedSnap())}}),i(`ui-menu`,class extends r{setup(e){this.addEventListener(`keydown`,e=>this.#n(e),{signal:e})}#e(){let e=this.querySelector(`:scope > [data-menu-slot~="popover"]`);return e instanceof HTMLElement?e:null}#t(e){return Array.from(e.querySelectorAll(`a[href], button`)).filter(e=>e instanceof HTMLElement).filter(e=>!e.hasAttribute(`disabled`)&&e.getAttribute(`aria-disabled`)!==`true`&&e.closest(`ui-menu, [data-ui~="menu"]`)===this)}#n(e){if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=e.target;if(!(t instanceof HTMLElement)||t.closest(`ui-menu, [data-ui~="menu"]`)!==this)return;let n=this.#e();if(!n)return;let r=t.parentElement===this&&(t.hasAttribute(`popovertarget`)||t.hasAttribute(`interestfor`)),i=n.matches(`:popover-open`);if(r&&!i&&(e.key===`ArrowDown`||e.key===`ArrowUp`)){e.preventDefault(),n.showPopover();let t=this.#t(n);t[e.key===`ArrowDown`?0:t.length-1]?.focus();return}if(!i||!n.contains(t))return;let a=this.#t(n);if(a.length===0)return;let o=a.indexOf(t),s;switch(e.key){case`ArrowDown`:s=o===-1?0:(o+1)%a.length;break;case`ArrowUp`:s=o===-1?a.length-1:(o-1+a.length)%a.length;break;case`Home`:s=0;break;case`End`:s=a.length-1;break;default:return}e.preventDefault(),a[s].focus()}});function st(e,t){if(!e)return[t];let n=e.split(`-`).map(e=>Number.parseInt(e,10)).filter(e=>Number.isFinite(e)&&e>0);return n.reduce((e,t)=>e+t,0)===t&&n.length>0?n:[t]}function ct(e,t,n){let r;switch(t){case`numeric`:r=/[^0-9]/g;break;case`alpha`:r=/[^a-zA-Z]/g;break;case`alphanumeric`:r=/[^a-zA-Z0-9]/g;break;case`none`:r=/\s/g}return e.replace(r,``).slice(0,n)}function lt(e,t,n,r,i){let a=r?Math.min(n,t-1):-1;return Array.from({length:t},(t,n)=>{let r=e.charAt(n);return{char:r===``?``:i?`•`:r,filled:r!==``,active:n===a}})}function ut(e,t){return t>0&&e.length===t}i(`ui-otp`,class extends r{#e=null;#t=``;setup(e){let t=this.querySelector(`input`);if(!(t instanceof HTMLInputElement))return;let n=t.maxLength>0?t.maxLength:6,r=this.getAttribute(`data-otp-type`)??`numeric`,i=this.hasAttribute(`data-otp-mask`),a=st(this.getAttribute(`data-otp-groups`),n),o=this.#n(a);this.setAttribute(`data-otp-ready`,``);let s=j(ct(t.value,r,n)),c=j(t.selectionStart??0),l=j(document.activeElement===t);t.addEventListener(`input`,()=>{let e=ct(t.value,r,n);t.value!==e&&(t.value=e),s.set(e),c.set(t.selectionStart??e.length)},{signal:e}),document.addEventListener(`selectionchange`,()=>{document.activeElement===t&&c.set(t.selectionStart??0)},{signal:e}),t.addEventListener(`focus`,()=>l.set(!0),{signal:e}),t.addEventListener(`blur`,()=>l.set(!1),{signal:e}),o.addEventListener(`pointerdown`,e=>{let r=e.target instanceof Element?e.target.closest(`[data-otp-index]`):null;e.preventDefault(),t.focus();let i=r?Number(r.getAttribute(`data-otp-index`)):n,a=Math.min(i,t.value.length);t.setSelectionRange(a,a),c.set(a)},{signal:e}),N(()=>{let e=lt(s.get(),n,c.get(),l.get(),i),r=o.querySelectorAll(`[data-otp-index]`);e.forEach((e,t)=>{let n=r[t];if(!(n instanceof HTMLElement))return;n.textContent=e.char;let i=[e.filled&&`filled`,e.active&&`active`].filter(Boolean).join(` `);i?n.setAttribute(`data-otp-state`,i):n.removeAttribute(`data-otp-state`)});let a=ut(s.get(),n);a?this.setAttribute(`data-otp-complete`,``):this.removeAttribute(`data-otp-complete`),a&&this.hasAttribute(`data-otp-auto-submit`)&&this.#t!==s.get()&&(this.#t=s.get(),t.form?.requestSubmit())},{signal:e})}teardown(){this.#e?.remove(),this.#e=null,this.removeAttribute(`data-otp-ready`),this.removeAttribute(`data-otp-complete`)}#n(e){let t=document.createElement(`div`);t.setAttribute(`data-otp-slot`,`rail`),t.setAttribute(`aria-hidden`,`true`);let n=0;return e.forEach((e,r)=>{if(r>0){let e=document.createElement(`span`);e.setAttribute(`data-otp-slot`,`separator`),e.setAttribute(`aria-role`,`presentation`),e.textContent=`–`,t.append(e)}for(let r=0;r<e;r++){let e=document.createElement(`span`);e.setAttribute(`data-otp-slot`,`cell`),e.setAttribute(`data-otp-index`,String(n++)),t.append(e)}}),this.append(t),this.#e=t,t}});function dt(e,t,n){return{type:e?`text`:`password`,ariaPressed:e?`true`:`false`,ariaLabel:e?n:t}}i(`ui-password`,class extends r{setup(e){let t=this.querySelector(`input[type="password"], input[type="text"]`),n=this.querySelector(`[data-password-group-slot~="toggle"]`);if(!(t instanceof HTMLInputElement)||!(n instanceof HTMLElement))return;let r=j(t.type===`text`);n.addEventListener(`click`,()=>r.set(!r.get()),{signal:e}),N(()=>{let e=this.getAttribute(`data-password-group-label-show`)||`Show password`,i=this.getAttribute(`data-password-group-label-hide`)||`Hide password`,a=dt(r.get(),e,i);t.type=a.type,n.setAttribute(`aria-pressed`,a.ariaPressed),n.setAttribute(`aria-label`,a.ariaLabel)},{signal:e})}});function ft(e,t,n){return e.length===0?t:e.length===1?e[0]:`${e[0]} ${n.replace(`{n}`,String(e.length-1))}`}let pt=0;i(`ui-multiselect`,class extends r{#e=[];#t=null;setup(e){let t=this.querySelector(`select[multiple]`);if(!(t instanceof HTMLSelectElement))return;this.#t=t;let n=this.getAttribute(`data-multiselect-placeholder`)??`Select…`,r=this.getAttribute(`data-multiselect-label-more`)??`(+{n} more)`,{trigger:i,label:a,panel:o,checkboxes:s}=this.#n(t);t.setAttribute(`data-multiselect-state`,`enhanced`);let c=()=>Array.from(t.selectedOptions).map(e=>e.label),l=j(c());s.forEach((n,r)=>{n.addEventListener(`change`,()=>{let e=t.options[r];e&&(e.selected=n.checked),l.set(c()),t.dispatchEvent(new Event(`change`,{bubbles:!0}))},{signal:e})}),t.addEventListener(`change`,()=>l.set(c()),{signal:e}),t.form?.addEventListener(`reset`,()=>queueMicrotask(()=>l.set(c())),{signal:e}),o.addEventListener(`toggle`,e=>{i.setAttribute(`aria-expanded`,String(e.newState===`open`))},{signal:e}),N(()=>{l.get(),a.textContent=ft(c(),n,r),s.forEach((e,n)=>{let r=t.options[n];r&&e.checked!==r.selected&&(e.checked=r.selected)})},{signal:e})}teardown(){for(let e of this.#e)e.remove();this.#e=[],this.#t?.removeAttribute(`data-multiselect-state`),this.#t=null}#n(e){let t=`ui-multiselect-panel-${++pt}`,n=document.createElement(`button`);n.type=`button`,n.dataset.ui=`select`,n.setAttribute(`data-multiselect-slot`,`trigger`),n.setAttribute(`popovertarget`,t),n.setAttribute(`aria-expanded`,`false`);let r=document.createElement(`span`);r.setAttribute(`data-multiselect-slot`,`label`);let i=document.createElement(`span`);i.setAttribute(`data-multiselect-slot`,`icon`),i.setAttribute(`aria-hidden`,`true`),n.append(r,i);let a=document.createElement(`div`);a.id=t,a.setAttribute(`data-multiselect-slot`,`panel`),a.setAttribute(`popover`,`auto`);let o=this.getAttribute(`data-multiselect-side`),s=this.getAttribute(`data-multiselect-align`);o&&a.setAttribute(`data-popover-side`,o),s&&a.setAttribute(`data-popover-align`,s);let c=[];for(let[n,r]of Array.from(e.options).entries()){let e=document.createElement(`label`);e.setAttribute(`data-multiselect-slot`,`option`);let i=document.createElement(`input`);i.type=`checkbox`,i.id=`${t}-${n}`,i.checked=r.selected,i.disabled=r.disabled,e.append(i,document.createTextNode(r.label)),a.append(e),c.push(i)}return e.after(n,a),this.#e=[n,a],{trigger:n,label:r,panel:a,checkboxes:c}}}),i(`ui-tabs`,class extends r{setup(e){this.addEventListener(`keydown`,e=>this.#e(e),{signal:e})}#e(e){let t=e.target;if(!(t instanceof HTMLInputElement)||t.type!==`radio`)return;let n=t.closest(`[role="tablist"], [data-tabs-slot~="list"]`);if(!n||n.closest(`ui-tabs, [data-ui~="tabs"]`)!==this)return;let r=Array.from(n.querySelectorAll(`input[type="radio"]`)).filter(e=>e instanceof HTMLInputElement).filter(e=>!e.disabled);if(r.length<2)return;let i=this.getAttribute(`data-tabs-orientation`)===`vertical`,a=i?`ArrowUp`:`ArrowLeft`,o=i?`ArrowDown`:`ArrowRight`,s=r.indexOf(t);if(s===-1)return;let c;switch(e.key){case a:c=(s-1+r.length)%r.length;break;case o:c=(s+1)%r.length;break;case`Home`:c=0;break;case`End`:c=r.length-1;break;default:return}e.preventDefault();let l=r[c];l.checked=!0,l.focus(),l.dispatchEvent(new Event(`change`,{bubbles:!0}))}});function mt(){var e=typeof SuppressedError==`function`?SuppressedError:function(e,t){var n=Error();return n.name=`SuppressedError`,n.error=e,n.suppressed=t,n},t={},n=[];function r(e,t){if(t!=null){if(Object(t)!==t)throw TypeError(`using declarations can only be used with objects, functions, null, or undefined.`);if(e)var r=t[Symbol.asyncDispose||Symbol.for(`Symbol.asyncDispose`)];if(r===void 0&&(r=t[Symbol.dispose||Symbol.for(`Symbol.dispose`)],e))var i=r;if(typeof r!=`function`)throw TypeError(`Object is not disposable.`);i&&(r=function(){try{i.call(t)}catch(e){return Promise.reject(e)}}),n.push({v:t,d:r,a:e})}else e&&n.push({d:t,a:e});return t}return{e:t,u:r.bind(null,!1),a:r.bind(null,!0),d:function(){var r,i=this.e,a=0;function o(){for(;r=n.pop();)try{if(!r.a&&a===1)return a=0,n.push(r),Promise.resolve().then(o);if(r.d){var e=r.d.call(r.v);if(r.a)return a|=2,Promise.resolve(e).then(o,s)}else a|=1}catch(e){return s(e)}if(a===1)return i===t?Promise.resolve():Promise.reject(i);if(i!==t)throw i}function s(n){return i=i===t?n:new e(n,i),o()}return o()}}}Symbol.dispose??=Symbol(`Symbol.dispose`);const ht=[`success`,`info`,`warning`,`destructive`],gt={success:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"/></svg>`,info:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"/></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z" clip-rule="evenodd"/></svg>`,destructive:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"/></svg>`,close:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>`};function _t(e){for(let t of e)t.style.blockSize=`auto`;return{[Symbol.dispose](){for(let t of e)t.style.removeProperty(`block-size`)}}}function vt(e){let t=e.length,n=Array.from({length:t}),r=0;for(let i=t-1;i>=0;i--){let a=t-1-i;n[i]={stackIndex:a,offsetPx:r,zIndex:t-a,front:a===0,visible:a<3},r+=e[i]}return{toasts:n,frontToastHeightPx:t>0?e[t-1]:null}}function $(e,t,n){let r=(e.getAttribute(`data-toaster-state`)??``).split(/\s+/).filter(Boolean),i=n?[.../* @__PURE__ */ new Set([...r,t])]:r.filter(e=>e!==t);i.length?e.setAttribute(`data-toaster-state`,i.join(` `)):e.removeAttribute(`data-toaster-state`)}function yt(e){return e.matches(`[data-toaster-state~="removed"]`)}var bt=class extends r{#e=/* @__PURE__ */ new Map;#t=0;#n=0;#r=null;#i=0;#a=j(!1);#o=j(typeof document<`u`&&document.hidden);#s=j(!1);#c=Se(()=>this.#a.get()||this.#o.get()||this.#s.get());#l=null;#u=j([]);#d=Se(()=>vt(this.#u.get().map(e=>e.height)));setup(e){if(this.#l=e,this.hasAttribute(`popover`)||this.setAttribute(`popover`,`manual`),this.hasAttribute(`role`)||this.setAttribute(`role`,`region`),this.hasAttribute(`aria-label`)||this.setAttribute(`aria-label`,`Notifications`),this.hasAttribute(`tabindex`)||this.setAttribute(`tabindex`,`-1`),!this.querySelector(`[data-toaster-slot~="list"]`)){let e=document.createElement(`ol`);e.setAttribute(`data-toaster-slot`,`list`),e.setAttribute(`aria-live`,`polite`),e.setAttribute(`aria-relevant`,`additions text`),e.setAttribute(`aria-atomic`,`false`),this.append(e)}this.addEventListener(`command`,e=>this.#f(e),{signal:e}),this.addEventListener(`mouseenter`,()=>this.#y(!0),{signal:e}),this.addEventListener(`mouseleave`,()=>this.#b(),{signal:e}),this.addEventListener(`focusin`,()=>this.#y(!0),{signal:e}),this.addEventListener(`focusout`,()=>this.#b(),{signal:e}),document.addEventListener(`visibilitychange`,()=>this.#o.set(document.hidden),{signal:e}),window.addEventListener(`resize`,()=>{cancelAnimationFrame(this.#n),this.#n=requestAnimationFrame(()=>this.#g())},{signal:e}),N(()=>{$(this,`expanded`,this.#a.get())},{signal:e}),N(()=>{this.#c.get()?this.#C():this.#w()},{signal:e}),N(()=>{let e=this.#u.get(),{toasts:t,frontToastHeightPx:n}=this.#d.get();for(let n=0;n<e.length;n++){let{node:r,height:i}=e[n],a=t[n];$(r,`front`,a.front),$(r,`visible`,a.visible),r.style.zIndex=String(a.zIndex),r.style.setProperty(`--toasts-before`,String(a.stackIndex)),r.style.setProperty(`--initial-height`,`${i}px`),r.style.setProperty(`--offset`,`calc(${a.offsetPx}px + var(--ui-toaster-gap) * ${a.stackIndex})`)}n!==null&&this.style.setProperty(`--front-toast-height`,`${n}px`)},{signal:e})}teardown(){cancelAnimationFrame(this.#n),window.clearTimeout(this.#i);for(let e of this.#e.values())clearTimeout(e.timeoutId);this.#e.clear()}addToast(e={}){let t=`toast-${++this.#t}`,n=this.#_();this.#T();let r=this.#p(e,t);return n.append(r),this.#m(r,t),this.#g(),this.#x(t,e.duration??4e3),t}dismiss(e){if(e===void 0){this.dismissAll();return}let t=this.#_().querySelector(`[data-toaster-id="${CSS.escape(e)}"]`);if(!(t instanceof HTMLElement)||yt(t))return;let n=this.#e.get(e);n&&clearTimeout(n.timeoutId),this.#e.delete(e),$(t,`removed`,!0);let r=document.activeElement;r instanceof HTMLElement&&t.contains(r)&&r.matches(`:focus-visible`)&&this.#v().filter(e=>!yt(e)).at(-1)?.focus({preventScroll:!0}),this.#g(),this.#D(t)}dismissAll(){for(let e of this.#v()){let t=e.dataset.toasterId;t&&this.dismiss(t)}}#f(e){let t=e.command;if(typeof t!=`string`||!t.startsWith(`--toast`))return;let n=this.#r;if(n&&n.source===e.source&&n.command===t)return;this.#r={source:e.source,command:t},window.setTimeout(()=>{this.#r=null},0);let r=e.source,i={},a=t.slice(8);if(ht.includes(a)&&(i.variant=a),r instanceof HTMLElement){let{toasterTitle:e,toasterDescription:t,toasterVariant:n,toasterDuration:a,toasterCloseButton:o}=r.dataset;if(e&&(i.title=e),t&&(i.description=t),!i.variant&&n&&ht.includes(n)&&(i.variant=n),a!==void 0){let e=a.trim()===``?NaN:Number(a);Number.isNaN(e)||(i.duration=e)}o!==void 0&&(i.closeButton=o!==`false`)}this.addToast(i)}#p(e,t){let n=document.createElement(`li`);if(n.setAttribute(`data-toaster-slot`,`toast`),n.dataset.toasterId=t,n.tabIndex=0,e.variant&&(n.dataset.toasterVariant=e.variant),e.variant){let t=document.createElement(`span`);t.setAttribute(`data-toaster-slot`,`icon`),t.setAttribute(`aria-hidden`,`true`),t.innerHTML=gt[e.variant],n.append(t)}let r=document.createElement(`div`);if(r.setAttribute(`data-toaster-slot`,`content`),e.title){let t=document.createElement(`div`);t.setAttribute(`data-toaster-slot`,`title`),t.textContent=e.title,r.append(t)}if(e.description){let t=document.createElement(`div`);t.setAttribute(`data-toaster-slot`,`description`),t.textContent=e.description,r.append(t)}n.append(r);let i=e.action;if(i){let e=document.createElement(`button`);e.type=`button`,e.dataset.ui=`button`,e.setAttribute(`data-toaster-slot`,`action`),e.dataset.buttonSize=`sm`,e.textContent=i.label,e.addEventListener(`click`,e=>{i.onClick?.(e),e.defaultPrevented||this.dismiss(t)}),n.append(e)}if(e.closeButton!==!1){let e=document.createElement(`button`);e.type=`button`,e.dataset.ui=`button`,e.setAttribute(`data-toaster-slot`,`close`),e.dataset.buttonVariant=`ghost`,e.dataset.buttonSize=`icon-sm`,e.setAttribute(`aria-label`,`Close notification`),e.innerHTML=gt.close,e.addEventListener(`click`,()=>this.dismiss(t)),n.append(e)}return n}#m(e,t){if(!this.#l)return;let n=0,r=(t,n)=>{let r=typeof n==`number`?`${n}px`:n;e.style.translate=t===`x`?`${r} 0`:`0 ${r}`},i=()=>{$(e,`swiping`,!1),e.style.removeProperty(`translate`),this.#s.set(!1),this.#b()};ae(e,{axis:`both`,signal:this.#l,canStart:()=>!yt(e)&&(this.#a.get()||e.matches(`[data-toaster-state~="front"]`)),onStart:({axis:t})=>{let r=re(e);n=t===`x`?r.x:r.y,$(e,`swiping`,!0),this.#s.set(!0)},onMove:({axis:e,offset:t})=>{let i=n+t,a=this.#h(e);r(e,a===0||Math.sign(i)===a?i:ee(i,24))},onEnd:({axis:a,offset:o,velocity:s})=>{let c=n+o,l=this.#h(a)||Math.sign(c)||1;if(!te({offset:c*l,velocity:s*l,distance:45,velocityThreshold:.11})){i();return}$(e,`swiped`,!0),$(e,`swiping`,!1);let u=v(a===`x`?e.offsetWidth:e.offsetHeight,s,y(e));e.style.transitionDuration=`${u}ms`,r(a,`calc(${c}px + ${l*100}%)`),this.#s.set(!1),this.dismiss(t),this.#b()},onCancel:i})}#h(e){let t=this.getAttribute(`data-toaster-position`)??`bottom-end`;if(e===`y`)return t.startsWith(`top`)?-1:1;if(t.endsWith(`center`))return 0;let n=t.endsWith(`start`)?-1:1;return getComputedStyle(this).direction===`rtl`?-n:n}#g(){try{var e=mt();let t=this.#v().filter(e=>!yt(e));e.u(_t(t));let n=t.map(e=>({node:e,height:e.offsetHeight}));this.#u.set(n)}catch(t){e.e=t}finally{e.d()}}#_(){let e=this.querySelector(`[data-toaster-slot~="list"]`);return e instanceof HTMLOListElement||(e=document.createElement(`ol`),e.setAttribute(`data-toaster-slot`,`list`),this.append(e)),e}#v(){return Array.from(this.#_().children).filter(e=>e instanceof HTMLElement).filter(e=>e.matches(`[data-toaster-slot~="toast"]`))}#y(e){e&&window.clearTimeout(this.#i),this.#a.set(e)}#b(){window.clearTimeout(this.#i),this.#i=window.setTimeout(()=>{let e=document.activeElement,t=e instanceof Node&&this.contains(e);!this.matches(`:hover`)&&!t&&this.#y(!1)},100)}#x(e,t){if(t===1/0||Number.isNaN(t))return;let n={remaining:t,startedAt:0,timeoutId:0};this.#e.set(e,n),this.#c.get()||this.#S(e,n)}#S(e,t){t.startedAt=Date.now(),t.timeoutId=window.setTimeout(()=>this.dismiss(e),t.remaining)}#C(){for(let e of this.#e.values())e.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=0,e.remaining=Math.max(0,e.remaining-(Date.now()-e.startedAt)))}#w(){if(!this.#c.get())for(let[e,t]of this.#e)t.timeoutId||this.#S(e,t)}#T(){try{this.matches(`:popover-open`)||this.showPopover()}catch{}}#E(){try{this.matches(`:popover-open`)&&this.hidePopover()}catch{}}#D(e){let t=!1,n=()=>{t||(t=!0,e.remove(),this.#v().length===0&&(this.#y(!1),this.#E()))};e.addEventListener(`transitionend`,t=>{t.target===e&&n()}),window.setTimeout(n,Math.max(600,y(e)+100))}};function xt(e){let t=e instanceof Element?e:typeof e==`string`?document.getElementById(e):document.querySelector(`ui-toaster, [data-ui~="toaster"]`);return t instanceof bt?t:(console.warn('Toaster: no <ui-toaster> found. Add `<ui-toaster popover="manual"></ui-toaster>` to the page.'),null)}function St(e){return typeof e==`string`?{title:e}:e??{}}const Ct={toast(e){let t=St(e),n=xt(t.region);return n?n.addToast(t):null},success(e,t){return Ct.toast({...t,title:e,variant:`success`})},info(e,t){return Ct.toast({...t,title:e,variant:`info`})},warning(e,t){return Ct.toast({...t,title:e,variant:`warning`})},error(e,t){return Ct.toast({...t,title:e,variant:`destructive`})},dismiss(e){for(let t of document.querySelectorAll(`ui-toaster, [data-ui~="toaster"]`))t instanceof bt&&t.dismiss(e)}};i(`ui-toaster`,bt),typeof window<`u`&&(window.Toaster=Ct);function wt(e){return e.documentElement.getAttribute(`data-ui-navigation`)===`swap`}function Tt(e){let t=[];for(let n of[e,...e.querySelectorAll(`*`)])(n.scrollTop||n.scrollLeft)&&t.push([n,n.scrollTop,n.scrollLeft]);return t}function Et(e,t){let n=/* @__PURE__ */ new Map;for(let e of t.querySelectorAll(`a[href], area[href]`)){let t=e.getAttribute(`href`);n.set(t,[...n.get(t)??[],e])}for(let t of e.querySelectorAll(`a[href], area[href]`)){let e=(n.get(t.getAttribute(`href`))?.shift())?.getAttribute(`aria-current`);e==null?t.removeAttribute(`aria-current`):t.setAttribute(`aria-current`,e)}}function Dt(e){let t=document.body,n=/* @__PURE__ */ new Map,r=[];for(let e of t.querySelectorAll(`[data-ui-persist]`)){let t=e.getAttribute(`data-ui-persist`);t&&!n.has(t)&&n.set(t,e)}for(let e of n.values())r.push(...Tt(e));let i=/* @__PURE__ */ new Map;for(let e of t.querySelectorAll(`[data-ui-persist-scroll]`)){let t=e.getAttribute(`data-ui-persist-scroll`);t&&!i.has(t)&&i.set(t,[e.scrollTop,e.scrollLeft])}let a=document.importNode(e,!0),o=[];for(let e of a.querySelectorAll(`[data-ui-persist]`)){let t=n.get(e.getAttribute(`data-ui-persist`)??``);t&&o.push([e,t])}for(let e of a.querySelectorAll(`[data-ui-persist-scroll]`)){let t=e.getAttribute(`data-ui-persist-scroll`)??``,n=i.get(t);i.delete(t),n&&r.push([e,...n])}t.before(a);for(let[e,t]of o){let n=e.parentNode;n&&(Et(t,e),typeof n.moveBefore==`function`?n.moveBefore(t,e):n.insertBefore(t,e),e.remove())}t.remove();for(let[e,t,n]of r)e.scrollTo({top:t,left:n,behavior:`instant`});return a}function Ot(e){let t=e.querySelector(`main`),n=t?.querySelector(`h1`)??t??e;n instanceof HTMLElement&&(n.hasAttribute(`tabindex`)||(n.tabIndex=-1),n.focus({preventScroll:!0}))}let kt=0,At=``;function jt(){let e=document.documentElement.style;kt++===0&&(At=e.scrollBehavior,e.scrollBehavior=`auto`);let t=!0;return()=>{t&&(t=!1,--kt===0&&(e.scrollBehavior=At))}}function Mt(e){return new URL(e,location.href).origin===location.origin}function Nt(e){let t=/\.([a-z0-9]+)$/i.exec(new URL(e,location.href).pathname)?.[1];return!t||/^x?html?$/i.test(t)}if(`navigation`in window){let e=null;function t(t){e=t,location.replace(t)}window.navigation.addEventListener(`navigate`,n=>{e!==null&&n.destination.url===e?e=null:wt(document)&&n.canIntercept&&n.navigationType!==`reload`&&(!n.destination.sameDocument||n.navigationType===`traverse`)&&!n.hashChange&&n.downloadRequest===null&&n.formData===null&&Mt(n.destination.url)&&Nt(n.destination.url)&&n.intercept({async handler(){let e;try{let t=await fetch(n.destination.url,{signal:n.signal});if(!t.ok)throw Error(t.statusText);if(!t.headers.get(`content-type`)?.includes(`html`))throw Error(`not a page`);e=new DOMParser().parseFromString(await t.text(),`text/html`)}catch{if(n.signal.aborted)return;t(n.destination.url);return}if(n.signal.aborted)return;if(!wt(e)||!(e.body instanceof HTMLElement)){t(n.destination.url);return}let r=document.body,i=()=>{r=Dt(e.body),document.title=e.title,n.scroll()},a=jt();if(document.startViewTransition)try{await document.startViewTransition(i).finished}finally{a()}else try{i()}finally{requestAnimationFrame(()=>requestAnimationFrame(a))}s(r),Ot(r)}})})}else wt(document)&&console.warn(`Navigation API not supported: data-ui-navigation falls back to full page loads.`);typeof CSS<`u`&&!CSS.supports(`container-type`,`scroll-state`)&&import(`./scroll-state-C8mA5gq6.js`);function Pt(){for(let e of document.querySelectorAll(`[style]`))if(e.getAttribute(`style`)?.includes(`:`)&&e.style.length===0)return!0;return!1}if(typeof document<`u`){let e=()=>{Pt()&&import(`./csp-LRx1fynI.js`)};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,e):e()}export{o as t};
@@ -10674,6 +10674,9 @@
10674
10674
  {
10675
10675
  "name": "var(--tracking-2xl)"
10676
10676
  },
10677
+ {
10678
+ "name": "var(--tracking-body-modifier)"
10679
+ },
10677
10680
  {
10678
10681
  "name": "var(--tracking-display)"
10679
10682
  },
@@ -10697,6 +10700,12 @@
10697
10700
  },
10698
10701
  {
10699
10702
  "name": "var(--tracking-h6)"
10703
+ },
10704
+ {
10705
+ "name": "var(--tracking-heading-modifier)"
10706
+ },
10707
+ {
10708
+ "name": "var(--tracking-modifier)"
10700
10709
  }
10701
10710
  ]
10702
10711
  },
@@ -10725,6 +10734,9 @@
10725
10734
  {
10726
10735
  "name": "var(--tracking-2xl)"
10727
10736
  },
10737
+ {
10738
+ "name": "var(--tracking-body-modifier)"
10739
+ },
10728
10740
  {
10729
10741
  "name": "var(--tracking-display)"
10730
10742
  },
@@ -10748,6 +10760,12 @@
10748
10760
  },
10749
10761
  {
10750
10762
  "name": "var(--tracking-h6)"
10763
+ },
10764
+ {
10765
+ "name": "var(--tracking-heading-modifier)"
10766
+ },
10767
+ {
10768
+ "name": "var(--tracking-modifier)"
10751
10769
  }
10752
10770
  ]
10753
10771
  },
@@ -10776,6 +10794,9 @@
10776
10794
  {
10777
10795
  "name": "var(--tracking-2xl)"
10778
10796
  },
10797
+ {
10798
+ "name": "var(--tracking-body-modifier)"
10799
+ },
10779
10800
  {
10780
10801
  "name": "var(--tracking-display)"
10781
10802
  },
@@ -10799,6 +10820,12 @@
10799
10820
  },
10800
10821
  {
10801
10822
  "name": "var(--tracking-h6)"
10823
+ },
10824
+ {
10825
+ "name": "var(--tracking-heading-modifier)"
10826
+ },
10827
+ {
10828
+ "name": "var(--tracking-modifier)"
10802
10829
  }
10803
10830
  ]
10804
10831
  },
@@ -10827,6 +10854,9 @@
10827
10854
  {
10828
10855
  "name": "var(--tracking-2xl)"
10829
10856
  },
10857
+ {
10858
+ "name": "var(--tracking-body-modifier)"
10859
+ },
10830
10860
  {
10831
10861
  "name": "var(--tracking-display)"
10832
10862
  },
@@ -10850,6 +10880,12 @@
10850
10880
  },
10851
10881
  {
10852
10882
  "name": "var(--tracking-h6)"
10883
+ },
10884
+ {
10885
+ "name": "var(--tracking-heading-modifier)"
10886
+ },
10887
+ {
10888
+ "name": "var(--tracking-modifier)"
10853
10889
  }
10854
10890
  ]
10855
10891
  },
@@ -10878,6 +10914,9 @@
10878
10914
  {
10879
10915
  "name": "var(--tracking-2xl)"
10880
10916
  },
10917
+ {
10918
+ "name": "var(--tracking-body-modifier)"
10919
+ },
10881
10920
  {
10882
10921
  "name": "var(--tracking-display)"
10883
10922
  },
@@ -10901,6 +10940,12 @@
10901
10940
  },
10902
10941
  {
10903
10942
  "name": "var(--tracking-h6)"
10943
+ },
10944
+ {
10945
+ "name": "var(--tracking-heading-modifier)"
10946
+ },
10947
+ {
10948
+ "name": "var(--tracking-modifier)"
10904
10949
  }
10905
10950
  ]
10906
10951
  },
@@ -10929,6 +10974,9 @@
10929
10974
  {
10930
10975
  "name": "var(--tracking-2xl)"
10931
10976
  },
10977
+ {
10978
+ "name": "var(--tracking-body-modifier)"
10979
+ },
10932
10980
  {
10933
10981
  "name": "var(--tracking-display)"
10934
10982
  },
@@ -10952,6 +11000,12 @@
10952
11000
  },
10953
11001
  {
10954
11002
  "name": "var(--tracking-h6)"
11003
+ },
11004
+ {
11005
+ "name": "var(--tracking-heading-modifier)"
11006
+ },
11007
+ {
11008
+ "name": "var(--tracking-modifier)"
10955
11009
  }
10956
11010
  ]
10957
11011
  },
@@ -129675,6 +129729,14 @@
129675
129729
  "name": "--ui-carousel-gap",
129676
129730
  "description": "Primitive hook: the public override surface."
129677
129731
  },
129732
+ {
129733
+ "name": "--ui-carousel-settle-duration",
129734
+ "description": "Primitive hook: the public override surface."
129735
+ },
129736
+ {
129737
+ "name": "--ui-carousel-settle-ease",
129738
+ "description": "Primitive hook: the public override surface."
129739
+ },
129678
129740
  {
129679
129741
  "name": "--ui-carousel-slide-basis",
129680
129742
  "description": "Primitive hook: the public override surface."
@@ -129684,7 +129746,7 @@
129684
129746
  "description": "Primitive hook: the public override surface."
129685
129747
  },
129686
129748
  {
129687
- "name": "--ui-carousel-touch-action",
129749
+ "name": "--ui-carousel-snap-align",
129688
129750
  "description": "Primitive hook: the public override surface."
129689
129751
  },
129690
129752
  {
@@ -130012,7 +130074,95 @@
130012
130074
  "description": "Primitive hook: the public override surface."
130013
130075
  },
130014
130076
  {
130015
- "name": "--ui-field-addon-p",
130077
+ "name": "--ui-drawer-bg",
130078
+ "description": "Primitive hook: the public override surface."
130079
+ },
130080
+ {
130081
+ "name": "--ui-drawer-corner-shape",
130082
+ "description": "Primitive hook: the public override surface."
130083
+ },
130084
+ {
130085
+ "name": "--ui-drawer-handle-bg",
130086
+ "description": "Primitive hook: the public override surface."
130087
+ },
130088
+ {
130089
+ "name": "--ui-drawer-handle-bg--active",
130090
+ "description": "Primitive hook: the public override surface."
130091
+ },
130092
+ {
130093
+ "name": "--ui-drawer-handle-bg--dragging",
130094
+ "description": "Primitive hook: the public override surface."
130095
+ },
130096
+ {
130097
+ "name": "--ui-drawer-handle-bg--hover",
130098
+ "description": "Primitive hook: the public override surface."
130099
+ },
130100
+ {
130101
+ "name": "--ui-drawer-handle-h",
130102
+ "description": "Primitive hook: the public override surface."
130103
+ },
130104
+ {
130105
+ "name": "--ui-drawer-handle-w",
130106
+ "description": "Primitive hook: the public override surface."
130107
+ },
130108
+ {
130109
+ "name": "--ui-drawer-indent-backing",
130110
+ "description": "Primitive hook: the public override surface."
130111
+ },
130112
+ {
130113
+ "name": "--ui-drawer-indent-bg",
130114
+ "description": "Primitive hook: the public override surface."
130115
+ },
130116
+ {
130117
+ "name": "--ui-drawer-indent-inset",
130118
+ "description": "Primitive hook: the public override surface."
130119
+ },
130120
+ {
130121
+ "name": "--ui-drawer-indent-offset",
130122
+ "description": "Primitive hook: the public override surface."
130123
+ },
130124
+ {
130125
+ "name": "--ui-drawer-indent-radius",
130126
+ "description": "Primitive hook: the public override surface."
130127
+ },
130128
+ {
130129
+ "name": "--ui-drawer-max-h",
130130
+ "description": "Primitive hook: the public override surface."
130131
+ },
130132
+ {
130133
+ "name": "--ui-drawer-nested-backdrop-color",
130134
+ "description": "Primitive hook: the public override surface."
130135
+ },
130136
+ {
130137
+ "name": "--ui-drawer-radius",
130138
+ "description": "Primitive hook: the public override surface."
130139
+ },
130140
+ {
130141
+ "name": "--ui-drawer-shadow",
130142
+ "description": "Primitive hook: the public override surface."
130143
+ },
130144
+ {
130145
+ "name": "--ui-drawer-stack-lift",
130146
+ "description": "Primitive hook: the public override surface."
130147
+ },
130148
+ {
130149
+ "name": "--ui-drawer-stack-scale",
130150
+ "description": "Primitive hook: the public override surface."
130151
+ },
130152
+ {
130153
+ "name": "--ui-drawer-text",
130154
+ "description": "Primitive hook: the public override surface."
130155
+ },
130156
+ {
130157
+ "name": "--ui-drawer-transition-duration",
130158
+ "description": "Primitive hook: the public override surface."
130159
+ },
130160
+ {
130161
+ "name": "--ui-drawer-transition-timing-function",
130162
+ "description": "Primitive hook: the public override surface."
130163
+ },
130164
+ {
130165
+ "name": "--ui-drawer-w",
130016
130166
  "description": "Primitive hook: the public override surface."
130017
130167
  },
130018
130168
  {
@@ -130132,7 +130282,11 @@
130132
130282
  "description": "Primitive hook: the public override surface."
130133
130283
  },
130134
130284
  {
130135
- "name": "--ui-field-inset-child-radius",
130285
+ "name": "--ui-field-inset-p",
130286
+ "description": "Primitive hook: the public override surface."
130287
+ },
130288
+ {
130289
+ "name": "--ui-field-inset-radius",
130136
130290
  "description": "Primitive hook: the public override surface."
130137
130291
  },
130138
130292
  {
@@ -131903,14 +132057,30 @@
131903
132057
  "name": "--ui-tooltip-border-color",
131904
132058
  "description": "Primitive hook: the public override surface."
131905
132059
  },
132060
+ {
132061
+ "name": "--ui-tooltip-border-style",
132062
+ "description": "Primitive hook: the public override surface."
132063
+ },
132064
+ {
132065
+ "name": "--ui-tooltip-border-width",
132066
+ "description": "Primitive hook: the public override surface."
132067
+ },
131906
132068
  {
131907
132069
  "name": "--ui-tooltip-corner-shape",
131908
132070
  "description": "Primitive hook: the public override surface."
131909
132071
  },
132072
+ {
132073
+ "name": "--ui-tooltip-display",
132074
+ "description": "Primitive hook: the public override surface."
132075
+ },
131910
132076
  {
131911
132077
  "name": "--ui-tooltip-font-family",
131912
132078
  "description": "Primitive hook: the public override surface."
131913
132079
  },
132080
+ {
132081
+ "name": "--ui-tooltip-font-settings",
132082
+ "description": "Primitive hook: the public override surface."
132083
+ },
131914
132084
  {
131915
132085
  "name": "--ui-tooltip-font-size",
131916
132086
  "description": "Primitive hook: the public override surface."