@boxcustodia/library 2.0.0-alpha.13 → 2.0.0-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -138
- package/dist/index.d.ts +1083 -717
- package/dist/index.es.js +7059 -56179
- package/dist/theme.css +1 -1
- package/package.json +34 -26
- package/src/__doc__/Changelog.mdx +6 -6
- package/src/__doc__/Examples.tsx +1 -1
- package/src/__doc__/Intro.mdx +3 -3
- package/src/__doc__/Tabs.mdx +112 -0
- package/src/__doc__/V2.mdx +1245 -0
- package/src/components/accordion/accordion.stories.tsx +143 -0
- package/src/components/accordion/accordion.tsx +135 -0
- package/src/components/accordion/index.ts +1 -0
- package/src/components/alert/alert.stories.tsx +24 -4
- package/src/components/alert/alert.tsx +17 -9
- package/src/components/alert-dialog/alert-dialog.stories.tsx +24 -0
- package/src/components/alert-dialog/alert-dialog.test.tsx +1 -1
- package/src/components/alert-dialog/alert-dialog.tsx +58 -10
- package/src/components/auto-complete/auto-complete.stories.tsx +615 -200
- package/src/components/auto-complete/auto-complete.tsx +420 -68
- package/src/components/auto-complete/index.ts +0 -1
- package/src/components/avatar/avatar.stories.tsx +162 -21
- package/src/components/avatar/avatar.tsx +79 -20
- package/src/components/button/button.stories.tsx +236 -294
- package/src/components/button/button.test.tsx +10 -17
- package/src/components/button/button.tsx +53 -18
- package/src/components/button/components/base-button.tsx +25 -53
- package/src/components/button/index.ts +0 -1
- package/src/components/calendar/calendar.stories.tsx +1 -1
- package/src/components/calendar/calendar.tsx +4 -4
- package/src/components/card/card.stories.tsx +140 -69
- package/src/components/card/card.tsx +155 -54
- package/src/components/center/center.stories.tsx +22 -39
- package/src/components/checkbox/checkbox.stories.tsx +25 -5
- package/src/components/checkbox/checkbox.tsx +76 -15
- package/src/components/checkbox-group/checkbox-group.stories.tsx +116 -28
- package/src/components/checkbox-group/checkbox-group.tsx +84 -3
- package/src/components/combobox/combobox.stories.tsx +33 -23
- package/src/components/combobox/combobox.tsx +120 -104
- package/src/components/date-picker/date-input.stories.tsx +14 -6
- package/src/components/date-picker/date-input.tsx +3 -3
- package/src/components/date-picker/date-picker.model.ts +13 -4
- package/src/components/date-picker/date-picker.stories.tsx +38 -12
- package/src/components/date-picker/date-picker.tsx +29 -15
- package/src/components/dialog/dialog.stories.tsx +18 -0
- package/src/components/dialog/dialog.test.tsx +1 -1
- package/src/components/dialog/dialog.tsx +51 -20
- package/src/components/divider/divider.stories.tsx +6 -0
- package/src/components/dropzone/dropzone.stories.tsx +70 -90
- package/src/components/dropzone/dropzone.tsx +383 -105
- package/src/components/dropzone/index.ts +0 -1
- package/src/components/empty/empty.stories.tsx +164 -0
- package/src/components/empty/empty.tsx +156 -0
- package/src/components/empty/index.ts +1 -0
- package/src/components/field/field.stories.tsx +226 -3
- package/src/components/field/field.tsx +77 -42
- package/src/components/form/form.stories.tsx +320 -197
- package/src/components/form/form.tsx +3 -23
- package/src/components/index.ts +2 -6
- package/src/components/input/input.stories.tsx +5 -5
- package/src/components/input/input.tsx +5 -5
- package/src/components/kbd/kbd.stories.tsx +1 -0
- package/src/components/label/label.stories.tsx +16 -0
- package/src/components/label/label.tsx +13 -2
- package/src/components/loader/loader.stories.tsx +7 -5
- package/src/components/loader/loader.tsx +8 -3
- package/src/components/menu/menu-primitives.tsx +207 -196
- package/src/components/menu/menu.stories.tsx +275 -146
- package/src/components/menu/menu.tsx +146 -54
- package/src/components/number-input/number-input.stories.tsx +27 -4
- package/src/components/number-input/number-input.test.tsx +2 -2
- package/src/components/number-input/number-input.tsx +29 -33
- package/src/components/otp/index.ts +1 -0
- package/src/components/otp/otp.stories.tsx +209 -0
- package/src/components/otp/otp.tsx +100 -0
- package/src/components/pagination/index.ts +1 -0
- package/src/components/pagination/pagination.model.ts +2 -0
- package/src/components/pagination/pagination.stories.tsx +153 -59
- package/src/components/pagination/pagination.test.tsx +122 -57
- package/src/components/pagination/pagination.tsx +575 -77
- package/src/components/password/password.stories.tsx +18 -3
- package/src/components/password/password.tsx +26 -10
- package/src/components/popover/popover.stories.tsx +26 -5
- package/src/components/popover/popover.tsx +15 -23
- package/src/components/progress/progress.stories.tsx +1 -0
- package/src/components/radio-group/index.ts +1 -0
- package/src/components/radio-group/radio-group.stories.tsx +251 -0
- package/src/components/radio-group/radio-group.tsx +212 -0
- package/src/components/scroll-area/scroll-area.stories.tsx +1 -0
- package/src/components/select/select.stories.tsx +118 -19
- package/src/components/select/select.tsx +67 -62
- package/src/components/skeleton/skeleton.stories.tsx +1 -0
- package/src/components/stack/stack.stories.tsx +179 -89
- package/src/components/stack/stack.tsx +2 -2
- package/src/components/stepper/index.ts +1 -1
- package/src/components/stepper/stepper.stories.tsx +766 -83
- package/src/components/stepper/stepper.test.tsx +18 -18
- package/src/components/stepper/stepper.tsx +554 -0
- package/src/components/switch/switch.stories.tsx +15 -1
- package/src/components/switch/switch.tsx +17 -4
- package/src/components/table/index.ts +0 -2
- package/src/components/table/table.stories.tsx +131 -18
- package/src/components/table/table.test.tsx +1 -1
- package/src/components/table/table.tsx +183 -77
- package/src/components/tabs/tabs.stories.tsx +372 -155
- package/src/components/tabs/tabs.test.tsx +12 -12
- package/src/components/tabs/tabs.tsx +72 -149
- package/src/components/tag/index.ts +0 -1
- package/src/components/tag/tag.stories.tsx +147 -120
- package/src/components/tag/tag.tsx +47 -95
- package/src/components/textarea/textarea.stories.tsx +8 -22
- package/src/components/textarea/textarea.tsx +17 -79
- package/src/components/timeline/timeline.stories.tsx +322 -42
- package/src/components/timeline/timeline.tsx +359 -132
- package/src/components/toast/toast.stories.tsx +1 -0
- package/src/components/tooltip/tooltip.tsx +11 -9
- package/src/components/tree/index.ts +0 -1
- package/src/components/tree/tree.stories.tsx +364 -408
- package/src/components/tree/tree.test.tsx +163 -0
- package/src/components/tree/tree.tsx +212 -36
- package/src/hooks/useAsync/__doc__/useAsync.stories.tsx +5 -5
- package/src/hooks/useClipboard/__doc__/useClipboard.stories.tsx +1 -3
- package/src/hooks/useDebounceCallback/__doc__/useDebouncedCallback.stories.tsx +6 -6
- package/src/hooks/useDocumentTitle/__doc__/useDocumentTitle.stories.tsx +1 -1
- package/src/hooks/useEventListener/__test__/useEventListener.test.tsx +1 -1
- package/src/hooks/useLocalStorage/__doc__/useLocalStorage.stories.tsx +1 -1
- package/src/hooks/usePagination/usePagination.tsx +36 -24
- package/src/styles/theme.css +1 -1
- package/src/utils/form.tsx +69 -37
- package/src/utils/index.ts +1 -1
- package/src/__doc__/Migration.mdx +0 -451
- package/src/components/auto-complete/auto-complete-primitives.tsx +0 -155
- package/src/components/background-image/background-image.stories.tsx +0 -21
- package/src/components/background-image/background-image.test.tsx +0 -29
- package/src/components/background-image/background-image.tsx +0 -23
- package/src/components/background-image/index.ts +0 -1
- package/src/components/button/button.variants.ts +0 -44
- package/src/components/button/components/loader-overlay.tsx +0 -21
- package/src/components/button/components/loading-icon.tsx +0 -47
- package/src/components/dropzone/upload-primitives.tsx +0 -310
- package/src/components/dropzone/use-dropzone.ts +0 -122
- package/src/components/empty-state/empty-state.stories.tsx +0 -56
- package/src/components/empty-state/empty-state.tsx +0 -39
- package/src/components/empty-state/index.ts +0 -1
- package/src/components/heading/heading.stories.tsx +0 -74
- package/src/components/heading/heading.tsx +0 -28
- package/src/components/heading/heading.variants.ts +0 -27
- package/src/components/heading/index.ts +0 -1
- package/src/components/kbd/kbd.variants.ts +0 -26
- package/src/components/menu/util/render-menu-item.tsx +0 -54
- package/src/components/multi-select/hooks/use-multi-select.ts +0 -66
- package/src/components/multi-select/index.ts +0 -1
- package/src/components/multi-select/multi-select.stories.tsx +0 -294
- package/src/components/multi-select/multi-select.tsx +0 -300
- package/src/components/multi-select/multi-select.variants.ts +0 -22
- package/src/components/pagination/components/pagination-option.tsx +0 -27
- package/src/components/show/index.ts +0 -1
- package/src/components/show/show.stories.tsx +0 -197
- package/src/components/show/show.test.tsx +0 -41
- package/src/components/show/show.tsx +0 -16
- package/src/components/stepper/Stepper.tsx +0 -190
- package/src/components/stepper/context/stepper-context.tsx +0 -11
- package/src/components/table/table-primitives.tsx +0 -122
- package/src/components/table/table.model.ts +0 -20
- package/src/components/table-pagination/index.ts +0 -2
- package/src/components/table-pagination/table-pagination.model.ts +0 -2
- package/src/components/table-pagination/table-pagination.stories.tsx +0 -23
- package/src/components/table-pagination/table-pagination.test.tsx +0 -32
- package/src/components/table-pagination/table-pagination.tsx +0 -108
- package/src/components/tabs/context/tabs-context.tsx +0 -14
- package/src/components/tag/tag.variants.ts +0 -31
- package/src/components/timeline/timeline-status.ts +0 -5
- package/src/components/tree/hooks/use-controllable-tree-state.ts +0 -80
- package/src/components/tree/tree-primitives.tsx +0 -126
package/dist/index.cjs.js
CHANGED
|
@@ -1,138 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("react"),_o=require("react-dom"),C=require("react/jsx-runtime"),q9=require("react-dom/test-utils");require("react-dom/client");function UE(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const h=UE(M),Rn=UE(_o),B9=UE(q9);function xp(e){const t=h.useRef(!0);t.current&&(t.current=!1,e())}const z1={};function fn(e,t){const n=h.useRef(z1);return n.current===z1&&(n.current=e(t)),n}const xy=h[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],V9=xy&&xy!==h.useLayoutEffect?xy:e=>e();function Re(e){const t=fn(W9).current;return t.next=e,V9(t.effect),t.trampoline}function W9(){const e={next:void 0,callback:H9,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function H9(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}function lv(){return typeof window<"u"}function rr(e){return zE(e)?(e.nodeName||"").toLowerCase():"#document"}function Ft(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function li(e){var t;return(t=(zE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zE(e){return lv()?e instanceof Node||e instanceof Ft(e).Node:!1}function Ct(e){return lv()?e instanceof Element||e instanceof Ft(e).Element:!1}function Zt(e){return lv()?e instanceof HTMLElement||e instanceof Ft(e).HTMLElement:!1}function Fl(e){return!lv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ft(e).ShadowRoot}function js(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Or(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function K9(e){return/^(table|td|th)$/.test(rr(e))}function uv(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const U9=/transform|translate|scale|rotate|perspective|filter/,z9=/paint|layout|strict|content/,la=e=>!!e&&e!=="none";let Ey;function GE(e){const t=Ct(e)?Or(e):e;return la(t.transform)||la(t.translate)||la(t.scale)||la(t.rotate)||la(t.perspective)||!cv()&&(la(t.backdropFilter)||la(t.filter))||U9.test(t.willChange||"")||z9.test(t.contain||"")}function G9(e){let t=Ui(e);for(;Zt(t)&&!Wi(t);){if(GE(t))return t;if(uv(t))return null;t=Ui(t)}return null}function cv(){return Ey==null&&(Ey=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ey}function Wi(e){return/^(html|body|#document)$/.test(rr(e))}function Or(e){return Ft(e).getComputedStyle(e)}function dv(e){return Ct(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ui(e){if(rr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fl(e)&&e.host||li(e);return Fl(t)?t.host:t}function DD(e){const t=Ui(e);return Wi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zt(t)&&js(t)?t:DD(t)}function Zf(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=DD(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ft(o);if(i){const a=Dx(s);return t.concat(s,s.visualViewport||[],js(o)?o:[],a&&n?Zf(a):[])}else return t.concat(o,Zf(o,[],n))}function Dx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ut(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}const Da=typeof navigator<"u",wy=X9(),AD=J9(),YE=Z9(),Ul=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),fv=wy.platform==="MacIntel"&&wy.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(wy.platform),Ax=Da&&/firefox/i.test(YE),kD=Da&&/apple/i.test(navigator.vendor),bg=Da&&/android/i.test(AD)||/android/i.test(YE),Y9=Da&&AD.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,$D=YE.includes("jsdom/");function X9(){if(!Da)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function Z9(){if(!Da)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function J9(){if(!Da)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}function mt(e){return e?.ownerDocument||document}const Q9=()=>{},Ne=typeof document<"u"?h.useLayoutEffect:Q9,eH=[];function zl(e){h.useEffect(e,eH)}const Bu=0;class gr{static create(){return new gr}currentId=Bu;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Bu,n()},t)}isStarted(){return this.currentId!==Bu}clear=()=>{this.currentId!==Bu&&(clearTimeout(this.currentId),this.currentId=Bu)};disposeEffect=()=>this.clear}function nn(){const e=fn(gr.create).current;return zl(e.disposeEffect),e}const ah=null;let G1=globalThis.requestAnimationFrame;class tH{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&G1!==requestAnimationFrame&&(G1=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const lh=new tH;class Go{static create(){return new Go}static request(t){return lh.request(t)}static cancel(t){return lh.cancel(t)}currentId=ah;request(t){this.cancel(),this.currentId=lh.request(()=>{this.currentId=ah,t()})}cancel=()=>{this.currentId!==ah&&(lh.cancel(this.currentId),this.currentId=ah)};disposeEffect=()=>this.cancel}function Gl(){const e=fn(Go.create).current;return zl(e.disposeEffect),e}function Dt(){}const ws=Object.freeze([]),rn=Object.freeze({});let Y1={},X1={},Z1="";function nH(e){if(typeof document>"u")return!1;const t=mt(e);return Ft(t).innerWidth-t.documentElement.clientWidth>0}function rH(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=mt(e),r=n.documentElement,o=n.body,i=js(r)?r:o,s=i.style.overflowY,a=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",i.style.overflowY="scroll";const l=i.offsetWidth;i.style.overflowY="hidden";const c=i.offsetWidth;return i.style.overflowY=s,r.style.scrollbarGutter=a,l===c}function oH(e){const t=mt(e),n=t.documentElement,r=t.body,o=js(n)?n:r,i={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,i)}}function iH(e){const t=mt(e),n=t.documentElement,r=t.body,o=Ft(n);let i=0,s=0,a=!1;const l=Go.create();if(Ul&&(o.visualViewport?.scale??1)!==1)return()=>{};function c(){const g=o.getComputedStyle(n),v=o.getComputedStyle(r),y=(g.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,s=n.scrollLeft,Y1={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Z1=n.style.scrollBehavior,X1={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const _=n.scrollHeight>n.clientHeight,w=n.scrollWidth>n.clientWidth,T=g.overflowY==="scroll"||v.overflowY==="scroll",R=g.overflowX==="scroll"||v.overflowX==="scroll",S=Math.max(0,o.innerWidth-r.clientWidth),P=Math.max(0,o.innerHeight-r.clientHeight),N=parseFloat(v.marginTop)+parseFloat(v.marginBottom),F=parseFloat(v.marginLeft)+parseFloat(v.marginRight),W=js(n)?n:r;if(a=rH(e),a){n.style.scrollbarGutter=y,W.style.overflowY="hidden",W.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:y,overflowY:"hidden",overflowX:"hidden"}),(_||T)&&(n.style.overflowY="scroll"),(w||R)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:N||P?`calc(100dvh - ${N+P}px)`:"100dvh",width:F||S?`calc(100vw - ${F+S}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=s,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function d(){Object.assign(n.style,Y1),Object.assign(r.style,X1),a||(n.scrollTop=i,n.scrollLeft=s,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Z1)}function f(){d(),l.request(c)}c();const m=ut(o,"resize",f);return()=>{l.cancel(),d(),typeof o.removeEventListener=="function"&&m()}}class sH{lockCount=0;restore=null;timeoutLock=gr.create();timeoutUnlock=gr.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=mt(t).documentElement,o=Ft(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=Dt;return}const i=fv||!nH(t);this.restore=i?oH(t):iH(t)}}const aH=new sH;function FD(e=!0,t=null){Ne(()=>{if(e)return aH.acquire(t)},[e,t])}function gn(e){e.preventDefault(),e.stopPropagation()}function lH(e){return"nativeEvent"in e}function LD(e){return e.pointerType===""&&e.isTrusted?!0:bg&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function jD(e){return $D?!1:!bg&&e.width===0&&e.height===0||bg&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ll(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function qD(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function uH(e,t){return t!=null&&!Ll(t)?0:typeof e=="function"?e():e}function yg(e,t,n){const r=uH(e,n);return typeof r=="number"?r:r?.[t]}function J1(e){return typeof e=="function"?e():e}function BD(e,t){return t||e==="click"||e==="mousedown"}const cH=500,dH={style:{transition:"none"}},XE="data-base-ui-click-trigger",fH="data-base-ui-swipe-ignore",pH="data-swipe-ignore",mH=`[${fH}]`,hH=`[${pH}]`,VD={fallbackAxisSide:"none"},ZE={fallbackAxisSide:"end"},gH={clipPath:"inset(50%)",position:"fixed",top:0,left:0},vn="none",Os="trigger-press",Gn="trigger-hover",ng="trigger-focus",pv="outside-press",rg="item-press",JE="close-press",Q1="clear-press",vH="chip-remove-press",bH="increment-press",yH="decrement-press",Li="input-change",Br="input-clear",xg="input-blur",kx="input-paste",WD="input-press",Ms="focus-out",Ep="escape-key",Yf="list-navigation",Vu="keyboard",eT="scrub",xH="cancel-open",EH="disabled",ei="imperative-action",wH="window-resize";function je(e,t,n,r){let o=!1,i=!1;const s=r??rn;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...s}}function so(e,t,n){const r=n??rn;return{reason:e,event:t??new Event("base-ui"),...r}}const QE=h.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new gr,currentIdRef:{current:null},currentContextRef:{current:null}});process.env.NODE_ENV!=="production"&&(QE.displayName="FloatingDelayGroupContext");function CH(e){const{children:t,delay:n,timeoutMs:r=0}=e,o=h.useRef(n),i=h.useRef(n),s=h.useRef(null),a=h.useRef(null),l=nn();return C.jsx(QE.Provider,{value:h.useMemo(()=>({hasProvider:!0,delayRef:o,initialDelayRef:i,currentIdRef:s,timeoutMs:r,currentContextRef:a,timeout:l}),[r,l]),children:t})}function RH(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{open:o}=t,i=h.useContext(QE),{currentIdRef:s,delayRef:a,timeoutMs:l,initialDelayRef:c,currentContextRef:d,hasProvider:f,timeout:m}=i,[g,v]=h.useState(!1);return Ne(()=>{function b(){v(!1),d.current?.setIsInstantPhase(!1),s.current=null,d.current=null,a.current=c.current}if(s.current&&!o&&s.current===r){if(v(!1),l){const x=r;return m.start(l,()=>{n.select("open")||s.current&&s.current!==x||b()}),()=>{m.clear()}}b()}},[o,r,s,a,l,c,d,m,n]),Ne(()=>{if(!o)return;const b=d.current,x=s.current;m.clear(),d.current={onOpenChange:n.setOpen,setIsInstantPhase:v},s.current=r,a.current={open:0,close:yg(c.current,"close")},x!==null&&x!==r?(v(!0),b?.setIsInstantPhase(!0),b?.onOpenChange(!1,je(vn))):(v(!1),b?.setIsInstantPhase(!1))},[o,r,n,s,a,l,c,d,m]),Ne(()=>()=>{d.current=null},[d]),h.useMemo(()=>({hasProvider:f,delayRef:a,isInstantPhase:g}),[f,a,g])}function po(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function Io(e,t,n,r){const o=fn(HD).current;return PH(o,e,t,n,r)&&KD(o,[e,t,n,r]),o.callback}function SH(e){const t=fn(HD).current;return TH(t,e)&&KD(t,e),t.callback}function HD(){return{callback:null,cleanup:null,refs:[]}}function PH(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function TH(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function KD(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=i(n);typeof s=="function"&&(r[o]=s);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=r[o];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}}}}}}}function dn(e){const t=fn(_H,e).current;return t.next=e,Ne(t.effect),t}function _H(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const UD={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},qs={...UD,position:"fixed",top:0,left:0},Yl={...UD,position:"absolute"},ti=h.forwardRef(function(t,n){const[r,o]=h.useState();Ne(()=>{kD&&o("button")},[]);const i={tabIndex:0,role:r};return C.jsx("span",{...t,ref:n,style:qs,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(ti.displayName="FocusGuard");const $x="data-base-ui-focusable",zD="active",GD="selected",YD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Ps="ArrowLeft",Ts="ArrowRight",ew="ArrowUp",wp="ArrowDown";function Bn(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Xe(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Fl(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ht(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Eg(e,t){if(!Ct(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(Xe(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function Eo(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function NH(e){return e.matches("html,body")}function mv(e){return Zt(e)&&e.matches(YD)}function XD(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${YD}`)!=null}function Fx(e){return e?e.getAttribute("role")==="combobox"&&mv(e):!1}function wg(e){if(!e||$D)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Jf(e){return e?e.hasAttribute($x)?e:e.querySelector(`[${$x}]`)||e:null}const OH=["top","right","bottom","left"],jl=Math.min,Vr=Math.max,ql=Math.round,va=Math.floor,ni=e=>({x:e,y:e}),MH={left:"right",right:"left",bottom:"top",top:"bottom"};function Lx(e,t,n){return Vr(e,jl(t,n))}function zi(e,t){return typeof e=="function"?e(t):e}function _r(e){return e.split("-")[0]}function Bs(e){return e.split("-")[1]}function tw(e){return e==="x"?"y":"x"}function nw(e){return e==="y"?"height":"width"}function ao(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function rw(e){return tw(ao(e))}function IH(e,t,n){n===void 0&&(n=!1);const r=Bs(e),o=rw(e),i=nw(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Cg(s)),[s,Cg(s)]}function DH(e){const t=Cg(e);return[jx(e),t,jx(t)]}function jx(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const tT=["left","right"],nT=["right","left"],AH=["top","bottom"],kH=["bottom","top"];function $H(e,t,n){switch(e){case"top":case"bottom":return n?t?nT:tT:t?tT:nT;case"left":case"right":return t?AH:kH;default:return[]}}function FH(e,t,n,r){const o=Bs(e);let i=$H(_r(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(jx)))),i}function Cg(e){const t=_r(e);return MH[t]+e.slice(t.length)}function LH(e){return{top:0,right:0,bottom:0,left:0,...e}}function ZD(e){return typeof e!="number"?LH(e):{top:e,right:e,bottom:e,left:e}}function Qf(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function uh(e,t,n){return Math.floor(e/t)!==n}function Rg(e,t){return t<0||t>=e.length}function Cy(e,t){return mr(e.current,{disabledIndices:t})}function rT(e,t){return mr(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function mr(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let i=t;do i+=n?-o:o;while(i>=0&&i<=e.length-1&&_l(e,i,r));return i}function jH(e,{event:t,orientation:n,loopFocus:r,onLoop:o,rtl:i,cols:s,disabledIndices:a,minIndex:l,maxIndex:c,prevIndex:d,stopEvent:f=!1}){let m=d,g;if(t.key===ew?g="up":t.key===wp&&(g="down"),g){const v=[],b=[];let x=!1,y=0;{let F=null,W=-1;e.forEach((I,B)=>{if(I==null)return;y+=1;const $=I.closest('[role="row"]');$&&(x=!0),($!==F||W===-1)&&(F=$,W+=1,v[W]=[]),v[W].push(B),b[B]=W})}let _=!1,w=0;if(x)for(const F of v){const W=F.length;W>w&&(w=W),W!==s&&(_=!0)}const T=_&&y<e.length,R=w||s,S=F=>{if(!_||d===-1)return;const W=b[d];if(W==null)return;const I=v[W].indexOf(d),B=F==="up"?-1:1;for(let $=W+B,k=0;k<v.length;k+=1,$+=B){if($<0||$>=v.length){if(!r||T)return;if($=$<0?v.length-1:0,o){const D=Math.min(I,v[$].length-1),A=v[$][D]??v[$][0],L=o(t,d,A);$=b[L]??$}}const j=v[$];for(let D=Math.min(I,j.length-1);D>=0;D-=1){const A=j[D];if(!_l(e,A,a))return A}}},P=F=>{if(!T||d===-1)return;const W=d%R,I=F==="up"?-R:R,B=c-c%R,$=va(c/R)+1;for(let k=d-W+I,j=0;j<$;j+=1,k+=I){if(k<0||k>c){if(!r)return;k=k<0?B:0}const D=Math.min(k+R-1,c);for(let A=Math.min(k+W,D);A>=k;A-=1)if(!_l(e,A,a))return A}};f&&gn(t);const N=S(g)??P(g);if(N!==void 0)m=N;else if(d===-1)m=g==="up"?c:l;else if(m=mr(e,{startingIndex:d,amount:R,decrement:g==="up",disabledIndices:a}),r){if(g==="up"&&(d-R<l||m<0)){const F=d%R,W=c%R,I=c-(W-F);W===F?m=c:m=W>F?I:I-R,o&&(m=o(t,d,m))}g==="down"&&d+R>c&&(m=mr(e,{startingIndex:d%R-R,amount:R,disabledIndices:a}),o&&(m=o(t,d,m)))}Rg(e,m)&&(m=d)}if(n==="both"){const v=va(d/s);t.key===(i?Ps:Ts)&&(f&&gn(t),d%s!==s-1?(m=mr(e,{startingIndex:d,disabledIndices:a}),r&&uh(m,s,v)&&(m=mr(e,{startingIndex:d-d%s-1,disabledIndices:a}),o&&(m=o(t,d,m)))):r&&(m=mr(e,{startingIndex:d-d%s-1,disabledIndices:a}),o&&(m=o(t,d,m))),uh(m,s,v)&&(m=d)),t.key===(i?Ts:Ps)&&(f&&gn(t),d%s!==0?(m=mr(e,{startingIndex:d,decrement:!0,disabledIndices:a}),r&&uh(m,s,v)&&(m=mr(e,{startingIndex:d+(s-d%s),decrement:!0,disabledIndices:a}),o&&(m=o(t,d,m)))):r&&(m=mr(e,{startingIndex:d+(s-d%s),decrement:!0,disabledIndices:a}),o&&(m=o(t,d,m))),uh(m,s,v)&&(m=d));const b=va(c/s)===v;Rg(e,m)&&(r&&b?(m=t.key===(i?Ts:Ps)?c:mr(e,{startingIndex:d-d%s-1,disabledIndices:a}),o&&(m=o(t,d,m))):m=d)}return m}function qH(e,t,n){const r=[];let o=0;return e.forEach(({width:i,height:s},a)=>{if(i>t&&process.env.NODE_ENV!=="production")throw new Error(`[Floating UI]: Invalid grid - item width at index ${a} is greater than grid columns`);let l=!1;for(;!l;){const c=[];for(let d=0;d<i;d+=1)for(let f=0;f<s;f+=1)c.push(o+d+f*t);o%t+i<=t&&c.every(d=>r[d]==null)?(c.forEach(d=>{r[d]=a}),l=!0):o+=1}}),[...r]}function BH(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e);default:return-1}}function VH(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function _l(e,t,n){if(typeof n=="function"?n(t):n?.includes(t)??!1)return!0;const o=e[t];return o?hv(o)?!n&&(o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"):!0:!1}function hv(e){return typeof e.checkVisibility=="function"?e.checkVisibility():Or(e).display!=="none"}const WH='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function HH(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return Fl(n)?n.host:null}function qx(e){for(const t of Array.from(e.children))if(rr(t)==="summary")return t;return null}function KH(e,t){const n=qx(t);return!!n&&(e===n||Xe(n,e))}function JD(e){const t=e?rr(e):"";return e!=null&&e.matches(WH)&&(t!=="summary"||e.parentElement!=null&&rr(e.parentElement)==="details"&&qx(e.parentElement)===e)&&(t!=="details"||qx(e)==null)&&(t!=="input"||e.type!=="hidden")}function QD(e){if(!JD(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=HH(t)){const n=rr(t)==="slot";if(t.hasAttribute("inert")||t!==e&&rr(t)==="details"&&!t.open&&!KH(e,t)||t.hasAttribute("hidden")||!n&&!hv(t))return!1}return!0}function eA(e){const t=e.tabIndex;if(t<0){const n=rr(e);if(n==="details"||n==="audio"||n==="video"||Zt(e)&&e.isContentEditable)return 0}return t}function Ry(e){if(rr(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function UH(e,t){const n=Ry(e);if(!n)return!0;const r=t.find(o=>{const i=Ry(o);return i?.name===n.name&&i.form===n.form&&i.checked});return r?r===n:t.find(o=>{const i=Ry(o);return i?.name===n.name&&i.form===n.form})===n}function tA(e){if(Zt(e)&&rr(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Zt(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function nA(e,t){tA(e).forEach(n=>{JD(n)&&t.push(n),nA(n,t)})}function rA(e,t,n){tA(e).forEach(r=>{Zt(r)&&r.matches(t)&&n.push(r),rA(r,t,n)})}function ow(e){return QD(e)&&eA(e)>=0}function oA(e){const t=[];return nA(e,t),t.filter(QD)}function Cp(e){const t=oA(e);return t.filter(n=>eA(n)>=0&&UH(n,t))}function iA(e,t){const n=Cp(e),r=n.length;if(r===0)return;const o=Bn(mt(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function iw(e){return iA(mt(e).body,1)||e}function sA(e){return iA(mt(e).body,-1)||e}function aA(e,t){if(!e)return null;const n=Cp(mt(e).body),r=n.length;if(r===0)return null;const o=n.indexOf(e);if(o===-1)return null;const i=(o+t+r)%r;return n[i]}function zH(e){return aA(e,1)}function GH(e){return aA(e,-1)}function Nl(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Xe(n,r)}function YH(e){Cp(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function oT(e){const t=[];rA(e,"[data-tabindex]",t),t.forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function ri(e,t,n=!0){return e.filter(o=>o.parentId===t).flatMap(o=>[...!n||o.context?.open?[o]:[],...ri(e,o.id,n)])}function iT(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(i=>i.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function ep(e){return`data-base-ui-${e}`}let ch=0;function og(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(ch);const i=()=>e?.focus({preventScroll:n});if(o)return i(),Dt;const s=requestAnimationFrame(i);return ch=s,()=>{ch===s&&(cancelAnimationFrame(s),ch=0)}}const Sy={inert:new WeakMap,"aria-hidden":new WeakMap},sT="data-base-ui-inert",Bx={inert:new WeakSet,"aria-hidden":new WeakSet};let Wu=new WeakMap,Py=0;function XH(e){return Bx[e]}function lA(e){return e?Fl(e)?e.host:lA(e.parentNode):null}const Ty=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=lA(n);return e.contains(r)?r:null}).filter(n=>n!=null),aT=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},lT=(e,t,n)=>{const r=[],o=i=>{!i||n.has(i)||Array.from(i.children).forEach(s=>{rr(s)!=="script"&&(t.has(s)?o(s):r.push(s))})};return o(e),r};function ZH(e,t,n,r,{mark:o=!0,markerIgnoreElements:i=[]}){const s=r?"inert":n?"aria-hidden":null;let a=null,l=null;const c=Ty(t,e),d=o?Ty(t,i):[],f=new Set(d),m=o?lT(t,aT(c),new Set(c)).filter(b=>!f.has(b)):[],g=[],v=[];if(s){const b=Sy[s],x=XH(s);l=x,a=b;const y=Ty(t,Array.from(t.querySelectorAll("[aria-live]"))),_=c.concat(y);lT(t,aT(_),new Set(_)).forEach(T=>{const R=T.getAttribute(s),S=R!==null&&R!=="false",P=(b.get(T)||0)+1;b.set(T,P),g.push(T),P===1&&S&&x.add(T),S||T.setAttribute(s,s==="inert"?"":"true")})}return o&&m.forEach(b=>{const x=(Wu.get(b)||0)+1;Wu.set(b,x),v.push(b),x===1&&b.setAttribute(sT,"")}),Py+=1,()=>{a&&g.forEach(b=>{const y=(a.get(b)||0)-1;a.set(b,y),y||(!l?.has(b)&&s&&b.removeAttribute(s),l?.delete(b))}),o&&v.forEach(b=>{const x=(Wu.get(b)||0)-1;Wu.set(b,x),x||b.removeAttribute(sT)}),Py-=1,Py||(Sy.inert=new WeakMap,Sy["aria-hidden"]=new WeakMap,Bx.inert=new WeakSet,Bx["aria-hidden"]=new WeakSet,Wu=new WeakMap)}}function uT(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:o=!0,markerIgnoreElements:i=[]}=t,s=mt(e[0]).body;return ZH(e,s,n,r,{mark:o,markerIgnoreElements:i})}const Bl={...h};let cT=0;function JH(e,t="mui"){const[n,r]=h.useState(e),o=e||n;return h.useEffect(()=>{n==null&&(cT+=1,r(`${t}-${cT}`))},[n,t]),o}const dT=Bl.useId;function Vs(e,t){if(dT!==void 0){const n=dT();return e??(t?`${t}-${n}`:n)}return JH(e,t)}function QH(e,t){return function(r,...o){const i=new URL(e);return i.searchParams.set("code",r.toString()),o.forEach(s=>i.searchParams.append("args[]",s)),`${t} error #${r}; visit ${i} for the full message.`}}const gt=QH("https://base-ui.com/production-error","Base UI"),eK=parseInt(h.version,10);function sw(e){return eK>=e}function fT(e){if(!h.isValidElement(e))return null;const t=e,n=t.props;return(sw(19)?n?.ref:t.ref)??null}function Vx(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}let Wx;process.env.NODE_ENV!=="production"&&(Wx=new Set);function tK(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Wx.has(t)||(Wx.add(t),console.warn(`Base UI: ${t}`))}}function nK(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function rK(e,t){return typeof e=="function"?e(t):e}function oK(e,t){return typeof e=="function"?e(t):e}const aw={};function Kr(e,t,n,r,o){if(!n&&!r&&!o&&!e)return Sg(t);let i=Sg(e);return t&&(i=Lf(i,t)),n&&(i=Lf(i,n)),r&&(i=Lf(i,r)),o&&(i=Lf(i,o)),i}function iK(e){if(e.length===0)return aw;if(e.length===1)return Sg(e[0]);let t=Sg(e[0]);for(let n=1;n<e.length;n+=1)t=Lf(t,e[n]);return t}function Sg(e){return lw(e)?{...cA(e,aw)}:sK(e)}function Lf(e,t){return lw(t)?cA(t,e):aK(e,t)}function sK(e){const t={...e};for(const n in t){const r=t[n];uA(n,r)&&(t[n]=dA(r))}return t}function aK(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Vx(e.style,r);break}case"className":{e[n]=fA(e.className,r);break}default:uA(n,r)?e[n]=lK(e[n],r):e[n]=r}}return e}function uA(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function lw(e){return typeof e=="function"}function cA(e,t){return lw(e)?e(t):e??aw}function lK(e,t){return t?e?n=>{if(pA(n)){const o=n;Pg(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:dA(t):e}function dA(e){return e&&(t=>(pA(t)&&Pg(t),e(t)))}function Pg(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function fA(e,t){return t?e?t+" "+e:t:e}function pA(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function $e(e,t,n={}){const r=t.render,o=uK(t,n);if(n.enabled===!1)return null;const i=n.state??rn;return mK(e,r,o,i)}function uK(e,t={}){const{className:n,style:r,render:o}=e,{state:i=rn,ref:s,props:a,stateAttributesMapping:l,enabled:c=!0}=t,d=c?rK(n,i):void 0,f=c?oK(r,i):void 0,m=c?nK(i,l):rn,g=c&&a?cK(a):void 0,v=c?Vx(m,g)??{}:rn;return typeof document<"u"&&(c?Array.isArray(s)?v.ref=SH([v.ref,fT(o),...s]):v.ref=Io(v.ref,fT(o),s):Io(null,null)),c?(d!==void 0&&(v.className=fA(v.className,d)),f!==void 0&&(v.style=Vx(v.style,f)),v):rn}function cK(e){return Array.isArray(e)?iK(e):Kr(void 0,e)}const dK=Symbol.for("react.lazy"),fK=/^[A-Z][A-Za-z0-9$]*$/,pK=/[a-z]/;function mK(e,t,n,r){if(t){if(typeof t=="function")return process.env.NODE_ENV!=="production"&&hK(t),t(n,r);const o=Kr(n,t.props);o.ref=n.ref;let i=t;if(i?.$$typeof===dK&&(i=h.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!h.isValidElement(i))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
|
|
2
|
-
`));return h.cloneElement(i,o)}if(e&&typeof e=="string")return gK(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":gt(8))}function hK(e){const t=e.name;t.length!==0&&fK.test(t)&&pK.test(t)&&tK(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`,"This usually means a React component was passed directly as `render={Component}`.","Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.","If this is an intentional render callback, rename it to start with a lowercase letter.","Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.","https://base-ui.com/r/invalid-render-prop")}function gK(e,t){return e==="button"?M.createElement("button",{type:"button",...t,key:t.key}):e==="img"?M.createElement("img",{alt:"",...t,key:t.key}):h.createElement(e,t)}const uw=h.createContext(null);process.env.NODE_ENV!=="production"&&(uw.displayName="PortalContext");const mA=()=>h.useContext(uw),vK=ep("portal");function hA(e={}){const{ref:t,container:n,componentProps:r=rn,elementProps:o}=e,i=Vs(),a=mA()?.portalNode,[l,c]=h.useState(null),[d,f]=h.useState(null),m=Re(x=>{x!==null&&f(x)}),g=h.useRef(null);Ne(()=>{if(n===null){g.current&&(g.current=null,f(null),c(null));return}if(i==null)return;const x=(n&&(zE(n)?n:n.current))??a??document.body;if(x==null){g.current&&(g.current=null,f(null),c(null));return}g.current!==x&&(g.current=x,f(null),c(x))},[n,a,i]);const v=$e("div",r,{ref:[t,m],props:[{id:i,[vK]:""},o]});return{portalNode:d,portalSubtree:l&&v?Rn.createPortal(v,l):null}}const Rp=h.forwardRef(function(t,n){const{children:r,container:o,className:i,render:s,renderGuards:a,style:l,...c}=t,{portalNode:d,portalSubtree:f}=hA({container:o,ref:n,componentProps:t,elementProps:c}),m=h.useRef(null),g=h.useRef(null),v=h.useRef(null),b=h.useRef(null),[x,y]=h.useState(null),_=h.useRef(!1),w=x?.modal,T=x?.open,R=typeof a=="boolean"?a:!!x&&!x.modal&&x.open&&!!d;h.useEffect(()=>{if(!d||w)return;function P(N){d&&N.relatedTarget&&Nl(N)&&(N.type==="focusin"?_.current&&(oT(d),_.current=!1):(YH(d),_.current=!0))}return po(ut(d,"focusin",P,!0),ut(d,"focusout",P,!0))},[d,w]),h.useEffect(()=>{!d||T!==!1||(oT(d),_.current=!1)},[T,d]);const S=h.useMemo(()=>({beforeOutsideRef:m,afterOutsideRef:g,beforeInsideRef:v,afterInsideRef:b,portalNode:d,setFocusManagerState:y}),[d]);return C.jsxs(h.Fragment,{children:[f,C.jsxs(uw.Provider,{value:S,children:[R&&d&&C.jsx(ti,{"data-type":"outside",ref:m,onFocus:P=>{if(Nl(P,d))v.current?.focus();else{const N=x?x.domReference:null;sA(N)?.focus()}}}),R&&d&&C.jsx("span",{"aria-owns":d.id,style:gH}),d&&Rn.createPortal(r,d),R&&d&&C.jsx(ti,{"data-type":"outside",ref:g,onFocus:P=>{if(Nl(P,d))b.current?.focus();else{const N=x?x.domReference:null;iw(N)?.focus(),x?.closeOnFocusOut&&x?.onOpenChange(!1,je(Ms,P.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(Rp.displayName="FloatingPortal");function gA(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}class bK{nodesRef={current:[]};events=gA();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const cw=h.createContext(null);process.env.NODE_ENV!=="production"&&(cw.displayName="FloatingNodeContext");const dw=h.createContext(null);process.env.NODE_ENV!=="production"&&(dw.displayName="FloatingTreeContext");const Ws=()=>h.useContext(cw)?.id||null,Aa=e=>{const t=h.useContext(dw);return e??t};function yK(e){const t=Vs(),n=Aa(e),r=Ws();return Ne(()=>{if(!t)return;const o={id:t,parentId:r};return n?.addNode(o),()=>{n?.removeNode(o)}},[n,t,r]),t}function xK(e){const{children:t,id:n}=e,r=Ws();return C.jsx(cw.Provider,{value:h.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function EK(e){const{children:t,externalTree:n}=e,r=fn(()=>n??new bK).current;return C.jsx(dw.Provider,{value:r,children:t})}function ki(e){return e==null?e:"current"in e?e.current:e}function wK(e,t){const n=Ft(Ht(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const pT=20;let Cs=[];function fw(){Cs=Cs.filter(e=>e.deref()?.isConnected)}function CK(e){fw(),e&&rr(e)!=="body"&&(Cs.push(new WeakRef(e)),Cs.length>pT&&(Cs=Cs.slice(-pT)))}function _y(){return fw(),Cs[Cs.length-1]?.deref()}function RK(e){return e?ow(e)?e:Cp(e)[0]||e:null}function SK(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():hv(e)}function mT(e,t){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const r=oA(e).filter(i=>{const s=i.getAttribute("data-tabindex")||"";return ow(i)||i.hasAttribute("data-tabindex")&&!s.startsWith("-")}),o=e.getAttribute("tabindex");t.current.includes("floating")||r.length===0?o!=="0"&&e.setAttribute("tabindex","0"):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function gv(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:i=!0,restoreFocus:s=!1,modal:a=!0,closeOnFocusOut:l=!0,openInteractionType:c="",nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:m,externalTree:g,getInsideElements:v}=e,b="rootStore"in t?t.rootStore:t,x=b.useState("open"),y=b.useState("domReferenceElement"),_=b.useState("floatingElement"),{events:w,dataRef:T}=b.context,R=Re(()=>T.current.floatingContext?.nodeId),S=o===!1,P=Fx(y)&&S,N=h.useRef(["content"]),F=dn(o),W=dn(i),I=dn(c),B=Aa(g),$=mA(),k=h.useRef(!1),j=h.useRef(!1),D=h.useRef(!1),A=h.useRef(null),L=h.useRef(""),H=h.useRef(""),V=h.useRef(null),X=h.useRef(null),K=Io(V,m,$?.beforeInsideRef),G=Io(X,$?.afterInsideRef),ee=nn(),Z=nn(),te=Gl(),J=$!=null,ne=Jf(_),U=Re((Q=ne)=>Q?Cp(Q):[]),ie=Re(()=>v?.().filter(Q=>Q!=null)??[]);h.useEffect(()=>{if(r||!a)return;function Q(ve){ve.key==="Tab"&&Xe(ne,Bn(mt(ne)))&&U().length===0&&!P&&gn(ve)}const me=mt(ne);return ut(me,"keydown",Q)},[r,y,ne,a,N,P,U]),h.useEffect(()=>{if(r||!x)return;const Q=mt(ne);function me(){D.current=!1}function ve(be){const Ce=Ht(be),qe=ie(),Te=Xe(_,Ce)||Xe(y,Ce)||Xe($?.portalNode,Ce)||qe.some(ke=>ke===Ce||Xe(ke,Ce));D.current=!Te,H.current=be.pointerType||"keyboard",Ce?.closest(`[${XE}]`)&&(j.current=!0)}function xe(){H.current="keyboard"}return po(ut(Q,"pointerdown",ve,!0),ut(Q,"pointerup",me,!0),ut(Q,"pointercancel",me,!0),ut(Q,"keydown",xe,!0))},[r,_,y,ne,x,$,ie]),h.useEffect(()=>{if(r||!l)return;const Q=mt(ne);function me(){j.current=!0,Z.start(0,()=>{j.current=!1})}function ve(qe){const Te=Ht(qe);ow(Te)&&(A.current=Te)}function xe(qe){const Te=qe.relatedTarget,ke=qe.currentTarget,ce=Ht(qe);queueMicrotask(()=>{const he=R(),re=b.context.triggerElements,le=ie(),Oe=Te?.hasAttribute(ep("focus-guard"))&&[V.current,X.current,$?.beforeInsideRef.current,$?.afterInsideRef.current,$?.beforeOutsideRef.current,$?.afterOutsideRef.current,ki(f),ki(d)].includes(Te),De=!(Xe(y,Te)||Xe(_,Te)||Xe(Te,_)||Xe($?.portalNode,Te)||le.some(Fe=>Fe===Te||Xe(Fe,Te))||Te!=null&&re.hasElement(Te)||re.hasMatchingElement(Fe=>Xe(Fe,Te))||Oe||B&&(ri(B.nodesRef.current,he).find(Fe=>Xe(Fe.context?.elements.floating,Te)||Xe(Fe.context?.elements.domReference,Te))||iT(B.nodesRef.current,he).find(Fe=>[Fe.context?.elements.floating,Jf(Fe.context?.elements.floating)].includes(Te)||Fe.context?.elements.domReference===Te)));if(ke===y&&ne&&mT(ne,N),s&&ke!==y&&!SK(ce)&&Bn(Q)===Q.body){if(Zt(ne)&&(ne.focus(),s==="popup")){te.request(()=>{ne.focus()});return}const Fe=U(),We=A.current,ze=(We&&Fe.includes(We)?We:null)||Fe[Fe.length-1]||ne;Zt(ze)&&ze.focus()}if(T.current.insideReactTree){T.current.insideReactTree=!1;return}(P||!a)&&Te&&De&&!j.current&&(P||Te!==_y())&&(k.current=!0,b.setOpen(!1,je(Ms,qe)))})}function be(){D.current||(T.current.insideReactTree=!0,ee.start(0,()=>{T.current.insideReactTree=!1}))}const Ce=Zt(y)?y:null;if(!(!_&&!Ce))return po(Ce&&ut(Ce,"focusout",xe),Ce&&ut(Ce,"pointerdown",me),_&&ut(_,"focusin",ve),_&&ut(_,"focusout",xe),_&&$&&ut(_,"focusout",be,!0))},[r,y,_,ne,a,B,$,b,l,s,U,P,R,N,T,ee,Z,te,d,f,ie]),h.useEffect(()=>{if(r||!_||!x)return;const Q=Array.from($?.portalNode?.querySelectorAll(`[${ep("portal")}]`)||[]),ve=(B?iT(B.nodesRef.current,R()):[]).find(ke=>Fx(ke.context?.elements.domReference||null))?.context?.elements.domReference,be=[...[_,...Q,V.current,X.current,$?.beforeOutsideRef.current,$?.afterOutsideRef.current,...ie()],ve,ki(f),ki(d),P?y:null].filter(ke=>ke!=null),Ce=uT(be,{ariaHidden:a||P,mark:!1}),qe=[_,...Q].filter(ke=>ke!=null),Te=uT(qe);return()=>{Te(),Ce()}},[x,r,y,_,a,N,$,P,B,R,d,f,ie]),Ne(()=>{if(!x||r||!Zt(ne))return;const Q=mt(ne),me=Bn(Q);queueMicrotask(()=>{const ve=F.current,xe=typeof ve=="function"?ve(I.current||""):ve;if(xe===void 0||xe===!1||Xe(ne,me))return;let Ce=null;const qe=()=>(Ce==null&&(Ce=U(ne)),Ce[0]||ne);let Te;xe===!0||xe===null?Te=qe():Te=ki(xe),Te=Te||qe(),og(Te,{preventScroll:Te===ne})})},[r,x,ne,S,U,F,I]),Ne(()=>{if(r||!ne)return;const Q=mt(ne),me=Bn(Q);CK(me);function ve(be){if(be.open||(L.current=wK(be.nativeEvent,H.current)),be.reason===Gn&&be.nativeEvent.type==="mouseleave"&&(k.current=!0),be.reason===pv)if(be.nested)k.current=!1;else if(LD(be.nativeEvent)||jD(be.nativeEvent))k.current=!1;else{let Ce=!1;mt(ne).createElement("div").focus({get preventScroll(){return Ce=!0,!1}}),Ce?k.current=!1:k.current=!0}}w.on("openchange",ve);function xe(){const be=W.current;let Ce=typeof be=="function"?be(L.current):be;if(Ce===void 0||Ce===!1)return null;if(Ce===null&&(Ce=!0),typeof Ce=="boolean"){const Te=y||_y();return Te&&Te.isConnected?Te:null}const qe=y||_y();return ki(Ce)||qe||null}return()=>{w.off("openchange",ve);const be=Bn(Q),Ce=ie(),qe=Xe(_,be)||Ce.some(ce=>ce===be||Xe(ce,be))||B&&ri(B.nodesRef.current,R(),!1).some(ce=>Xe(ce.context?.elements.floating,be)),Te=W.current,ke=xe();queueMicrotask(()=>{const ce=RK(ke),he=typeof Te!="boolean";Te&&!k.current&&Zt(ce)&&(!(!he&&ce!==be&&be!==Q.body)||qe)&&ce.focus({preventScroll:!0}),k.current=!1})}},[r,_,ne,W,T,w,B,y,R,ie]),Ne(()=>{if(!Ul||x||!_)return;const Q=Bn(mt(_));!Zt(Q)||!mv(Q)||Xe(_,Q)&&Q.blur()},[x,_]),Ne(()=>{if(!(r||!$))return $.setFocusManagerState({modal:a,closeOnFocusOut:l,open:x,onOpenChange:b.setOpen,domReference:y}),()=>{$.setFocusManagerState(null)}},[r,$,a,x,b,l,y]),Ne(()=>{if(!(r||!ne))return mT(ne,N),()=>{queueMicrotask(fw)}},[r,ne,N]);const se=!r&&(a?!P:!0)&&(J||a);return C.jsxs(h.Fragment,{children:[se&&C.jsx(ti,{"data-type":"inside",ref:K,onFocus:Q=>{if(a){const me=U();og(me[me.length-1])}else $?.portalNode&&(k.current=!1,Nl(Q,$.portalNode)?iw(y)?.focus():ki(f??$.beforeOutsideRef)?.focus())}}),n,se&&C.jsx(ti,{"data-type":"inside",ref:G,onFocus:Q=>{a?og(U()[0]):$?.portalNode&&(l&&(k.current=!0),Nl(Q,$.portalNode)?sA(y)?.focus():ki(d??$.afterOutsideRef)?.focus())}})]})}function Sp(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:i="click",toggle:s=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:c=0,reason:d=Os}=t,f=h.useRef(void 0),m=Gl(),g=nn(),v=h.useMemo(()=>({onPointerDown(b){f.current=b.pointerType},onMouseDown(b){const x=f.current,y=b.nativeEvent,_=n.select("open");if(b.button!==0||i==="click"||Ll(x,!0)&&a)return;const w=r.current.openEvent,T=w?.type,R=n.select("domReferenceElement")!==b.currentTarget,S=_&&R||!(_&&s&&(!(w&&l)||T==="click"||T==="mousedown")),P=Ht(y);if(mv(P)){const F=je(d,y,P);S&&x==="touch"&&c>0?g.start(c,()=>{n.setOpen(!0,F)}):n.setOpen(S,F);return}const N=b.currentTarget;m.request(()=>{const F=je(d,y,N);S&&x==="touch"&&c>0?g.start(c,()=>{n.setOpen(!0,F)}):n.setOpen(S,F)})},onClick(b){if(i==="mousedown-only")return;const x=f.current;if(i==="mousedown"&&x){f.current=void 0;return}if(Ll(x,!0)&&a)return;const y=n.select("open"),_=r.current.openEvent,w=n.select("domReferenceElement")!==b.currentTarget,T=y&&w||!(y&&s&&(!(_&&l)||qD(_))),R=je(d,b.nativeEvent,b.currentTarget);T&&x==="touch"&&c>0?g.start(c,()=>{n.setOpen(!0,R)}):n.setOpen(T,R)},onKeyDown(){f.current=void 0}}),[r,i,a,n,l,s,m,g,c,d]);return h.useMemo(()=>o?{reference:v}:rn,[o,v])}function PK(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){const i=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",a=t.axis==="y"||t.axis==="both",l=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let c=i.width,d=i.height,f=i.x,m=i.y;return n==null&&t.x&&s&&(n=i.x-t.x),r==null&&t.y&&a&&(r=i.y-t.y),f-=n||0,m-=r||0,c=0,d=0,!o||l?(c=t.axis==="y"?i.width:0,d=t.axis==="x"?i.height:0,f=s&&t.x!=null?t.x:f,m=a&&t.y!=null?t.y:m):o&&!l&&(d=t.axis==="x"?i.height:d,c=t.axis==="y"?i.width:c),o=!0,{width:c,height:d,x:f,y:m,top:m,right:f+c,bottom:m+d,left:f}}}}function hT(e){return e!=null&&e.clientX!=null}function TK(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("domReferenceElement"),s=n.context.dataRef,{enabled:a=!0,axis:l="both"}=t,c=h.useRef(!1),d=h.useRef(null),[f,m]=h.useState(),[g,v]=h.useState([]),b=Re((T,R,S)=>{c.current||s.current.openEvent&&!hT(s.current.openEvent)||n.set("positionReference",PK(S??i,{x:T,y:R,axis:l,dataRef:s,pointerType:f}))}),x=Re(T=>{r?d.current||v([]):b(T.clientX,T.clientY,T.currentTarget)}),y=Ll(f)?o:r,_=h.useCallback(()=>{if(!y||!a)return;const T=Ft(o);function R(S){const P=Ht(S);Xe(o,P)?(d.current?.(),d.current=null):b(S.clientX,S.clientY)}if(!s.current.openEvent||hT(s.current.openEvent)){const S=()=>{d.current?.(),d.current=null};return d.current=ut(T,"mousemove",R),S}n.set("positionReference",i)},[y,a,o,s,i,n,b]);h.useEffect(()=>_(),[_,g]),h.useEffect(()=>{a&&!o&&(c.current=!1)},[a,o]),h.useEffect(()=>{!a&&r&&(c.current=!0)},[a,r]);const w=h.useMemo(()=>{function T(R){m(R.pointerType)}return{onPointerDown:T,onPointerEnter:T,onMouseMove:x,onMouseEnter:x}},[x]);return h.useMemo(()=>a?{reference:w,trigger:w}:{},[a,w])}const _K={intentional:"onClick",sloppy:"onPointerDown"};function NK(){return!1}function OK(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Pp(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),{dataRef:i}=n.context,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="sloppy",referencePress:d=NK,referencePressEvent:f="sloppy",bubbles:m,externalTree:g}=t,v=Aa(g),b=Re(typeof l=="function"?l:()=>!1),x=typeof l=="function"?b:l,y=x!==!1,_=Re(()=>c),w=h.useRef(!1),T=h.useRef(!1),R=h.useRef(!1),{escapeKey:S,outsidePress:P}=OK(m),N=h.useRef(null),F=nn(),W=nn(),I=Re(()=>{W.clear(),i.current.insideReactTree=!1}),B=h.useRef(!1),$=h.useRef(""),k=Re(d),j=Re(X=>{if(!r||!s||!a||X.key!=="Escape"||B.current)return;const K=i.current.floatingContext?.nodeId,G=v?ri(v.nodesRef.current,K):[];if(!S&&G.length>0){let te=!0;if(G.forEach(J=>{J.context?.open&&!J.context.dataRef.current.__escapeKeyBubbles&&(te=!1)}),!te)return}const ee=lH(X)?X.nativeEvent:X,Z=je(Ep,ee);n.setOpen(!1,Z),!S&&!Z.isPropagationAllowed&&X.stopPropagation()}),D=Re(()=>{i.current.insideReactTree=!0,W.start(0,I)});h.useEffect(()=>{if(!r||!s)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=P;const X=new gr,K=new gr;function G(){X.clear(),B.current=!0}function ee(){X.start(cv()?5:0,()=>{B.current=!1})}function Z(){R.current=!0,K.start(0,()=>{R.current=!1})}function te(){w.current=!1,T.current=!1}function J(){const re=$.current,le=re==="pen"||!re?"mouse":re,Oe=_(),De=typeof Oe=="function"?Oe():Oe;return typeof De=="string"?De:De[le]}function ne(re){const le=J();return le==="intentional"&&re.type!=="click"||le==="sloppy"&&re.type==="click"}function U(re){const le=i.current.floatingContext?.nodeId,Oe=v&&ri(v.nodesRef.current,le).some(De=>Eo(re,De.context?.elements.floating));return Eo(re,n.select("floatingElement"))||Eo(re,n.select("domReferenceElement"))||Oe}function ie(re){if(ne(re)){I();return}if(i.current.insideReactTree){I();return}const le=Ht(re),Oe=`[${ep("inert")}]`,De=Ct(le)?le.getRootNode():null,Fe=Array.from((Fl(De)?De:mt(n.select("floatingElement"))).querySelectorAll(Oe)),We=n.context.triggerElements;if(le&&(We.hasElement(le)||We.hasMatchingElement(nt=>Xe(nt,le))))return;let ze=Ct(le)?le:null;for(;ze&&!Wi(ze);){const nt=Ui(ze);if(Wi(nt)||!Ct(nt))break;ze=nt}if(Fe.length&&Ct(le)&&!NH(le)&&!Xe(le,n.select("floatingElement"))&&Fe.every(nt=>!Xe(ze,nt)))return;if(Zt(le)&&!("touches"in re)){const nt=Wi(le),ht=Or(le),Je=/auto|scroll/,Ge=nt||Je.test(ht.overflowX),dt=nt||Je.test(ht.overflowY),rt=Ge&&le.clientWidth>0&&le.scrollWidth>le.clientWidth,Ve=dt&&le.clientHeight>0&&le.scrollHeight>le.clientHeight,Me=ht.direction==="rtl",Be=Ve&&(Me?re.offsetX<=le.offsetWidth-le.clientWidth:re.offsetX>le.clientWidth),Ie=rt&&re.offsetY>le.clientHeight;if(Be||Ie)return}if(U(re))return;if(J()==="intentional"&&R.current){K.clear(),R.current=!1;return}if(typeof x=="function"&&!x(re))return;const He=i.current.floatingContext?.nodeId,Ze=v?ri(v.nodesRef.current,He):[];if(Ze.length>0){let nt=!0;if(Ze.forEach(ht=>{ht.context?.open&&!ht.context.dataRef.current.__outsidePressBubbles&&(nt=!1)}),!nt)return}n.setOpen(!1,je(pv,re)),I()}function se(re){J()!=="sloppy"||re.pointerType==="touch"||!n.select("open")||!s||Eo(re,n.select("floatingElement"))||Eo(re,n.select("domReferenceElement"))||ie(re)}function Q(re){if(J()!=="sloppy"||!n.select("open")||!s||Eo(re,n.select("floatingElement"))||Eo(re,n.select("domReferenceElement")))return;const le=re.touches[0];le&&(N.current={startTime:Date.now(),startX:le.clientX,startY:le.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},F.start(1e3,()=>{N.current&&(N.current.dismissOnTouchEnd=!1,N.current.dismissOnMouseDown=!1)}))}function me(re,le){const Oe=Ht(re);if(!Oe)return;const De=ut(Oe,re.type,()=>{le(re),De()})}function ve(re){$.current="touch",me(re,Q)}function xe(re){F.clear(),re.type==="pointerdown"&&($.current=re.pointerType),!(re.type==="mousedown"&&N.current&&!N.current.dismissOnMouseDown)&&me(re,le=>{le.type==="pointerdown"?se(le):ie(le)})}function be(re){if(!w.current)return;const le=T.current;if(te(),J()==="intentional"){if(re.type==="pointercancel"){le&&Z();return}if(!U(re)){if(le){Z();return}typeof x=="function"&&!x(re)||(K.clear(),R.current=!0,I())}}}function Ce(re){if(J()!=="sloppy"||!N.current||Eo(re,n.select("floatingElement"))||Eo(re,n.select("domReferenceElement")))return;const le=re.touches[0];if(!le)return;const Oe=Math.abs(le.clientX-N.current.startX),De=Math.abs(le.clientY-N.current.startY),Fe=Math.sqrt(Oe*Oe+De*De);Fe>5&&(N.current.dismissOnTouchEnd=!0),Fe>10&&(ie(re),F.clear(),N.current=null)}function qe(re){me(re,Ce)}function Te(re){J()!=="sloppy"||!N.current||Eo(re,n.select("floatingElement"))||Eo(re,n.select("domReferenceElement"))||(N.current.dismissOnTouchEnd&&ie(re),F.clear(),N.current=null)}function ke(re){me(re,Te)}const ce=mt(o),he=po(a&&po(ut(ce,"keydown",j),ut(ce,"compositionstart",G),ut(ce,"compositionend",ee)),y&&po(ut(ce,"click",xe,!0),ut(ce,"pointerdown",xe,!0),ut(ce,"pointerup",be,!0),ut(ce,"pointercancel",be,!0),ut(ce,"mousedown",xe,!0),ut(ce,"mouseup",be,!0),ut(ce,"touchstart",ve,!0),ut(ce,"touchmove",qe,!0),ut(ce,"touchend",ke,!0)));return()=>{he(),X.clear(),K.clear(),te(),R.current=!1}},[i,o,a,y,x,r,s,S,P,j,I,_,v,n,F]),h.useEffect(I,[x,I]);const A=h.useMemo(()=>({onKeyDown:j,[_K[f]]:X=>{k()&&n.setOpen(!1,je(Os,X.nativeEvent))},...f!=="intentional"&&{onClick(X){k()&&n.setOpen(!1,je(Os,X.nativeEvent))}}}),[j,n,f,k]),L=Re(X=>{if(!r||!s||X.button!==0)return;const K=Ht(X.nativeEvent);Xe(n.select("floatingElement"),K)&&(w.current||(w.current=!0,T.current=!1))}),H=Re(X=>{!r||!s||(X.defaultPrevented||X.nativeEvent.defaultPrevented)&&w.current&&(T.current=!0)}),V=h.useMemo(()=>({onKeyDown:j,onPointerDown:H,onMouseDown:H,onClickCapture:D,onMouseDownCapture(X){D(),L(X)},onPointerDownCapture(X){D(),L(X)},onMouseUpCapture:D,onTouchEndCapture:D,onTouchMoveCapture:D}),[j,D,L,H]);return h.useMemo(()=>s?{reference:A,floating:V,trigger:A}:{},[s,A,V])}function gT(e,t,n){let{reference:r,floating:o}=e;const i=ao(t),s=rw(t),a=nw(s),l=_r(t),c=i==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,m=r[a]/2-o[a]/2;let g;switch(l){case"top":g={x:d,y:r.y-o.height};break;case"bottom":g={x:d,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-o.width,y:f};break;default:g={x:r.x,y:r.y}}switch(Bs(t)){case"start":g[s]-=m*(n&&c?-1:1);break;case"end":g[s]+=m*(n&&c?-1:1);break}return g}async function MK(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:g=0}=zi(t,e),v=ZD(g),x=a[m?f==="floating"?"reference":"floating":f],y=Qf(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),_=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),T=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},R=Qf(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:w,strategy:l}):_);return{top:(y.top-R.top+v.top)/T.y,bottom:(R.bottom-y.bottom+v.bottom)/T.y,left:(y.left-R.left+v.left)/T.x,right:(R.right-y.right+v.right)/T.x}}const IK=50,DK=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:MK},l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=gT(c,r,l),m=r,g=0;const v={};for(let b=0;b<i.length;b++){const x=i[b];if(!x)continue;const{name:y,fn:_}=x,{x:w,y:T,data:R,reset:S}=await _({x:d,y:f,initialPlacement:r,placement:m,strategy:o,middlewareData:v,rects:c,platform:a,elements:{reference:e,floating:t}});d=w??d,f=T??f,v[y]={...v[y],...R},S&&g<IK&&(g++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(c=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:d,y:f}=gT(c,m,l)),b=-1)}return{x:d,y:f,placement:m,strategy:o,middlewareData:v}},AK=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:b=!0,...x}=zi(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=_r(o),_=ao(a),w=_r(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),R=m||(w||!b?[Cg(a)]:DH(a)),S=v!=="none";!m&&S&&R.push(...FH(a,b,v,T));const P=[a,...R],N=await l.detectOverflow(t,x),F=[];let W=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&F.push(N[y]),f){const k=IH(o,s,T);F.push(N[k[0]],N[k[1]])}if(W=[...W,{placement:o,overflows:F}],!F.every(k=>k<=0)){var I,B;const k=(((I=i.flip)==null?void 0:I.index)||0)+1,j=P[k];if(j&&(!(f==="alignment"?_!==ao(j):!1)||W.every(L=>ao(L.placement)===_?L.overflows[0]>0:!0)))return{data:{index:k,overflows:W},reset:{placement:j}};let D=(B=W.filter(A=>A.overflows[0]<=0).sort((A,L)=>A.overflows[1]-L.overflows[1])[0])==null?void 0:B.placement;if(!D)switch(g){case"bestFit":{var $;const A=($=W.filter(L=>{if(S){const H=ao(L.placement);return H===_||H==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(H=>H>0).reduce((H,V)=>H+V,0)]).sort((L,H)=>L[1]-H[1])[0])==null?void 0:$[0];A&&(D=A);break}case"initialPlacement":D=a;break}if(o!==D)return{reset:{placement:D}}}return{}}}};function vT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bT(e){return OH.some(t=>e[t]>=0)}const kK=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=zi(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=vT(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:bT(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=vT(s,n.floating);return{data:{escapedOffsets:a,escaped:bT(a)}}}default:return{}}}}},vA=new Set(["left","top"]);async function $K(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=_r(n),a=Bs(n),l=ao(n)==="y",c=vA.has(s)?-1:1,d=i&&l?-1:1,f=zi(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(g=a==="end"?v*-1:v),l?{x:g*d,y:m*c}:{x:m*c,y:g*d}}const FK=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await $K(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},LK=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x:_,y:w}=y;return{x:_,y:w}}},...c}=zi(e,t),d={x:n,y:r},f=await i.detectOverflow(t,c),m=ao(_r(o)),g=tw(m);let v=d[g],b=d[m];if(s){const y=g==="y"?"top":"left",_=g==="y"?"bottom":"right",w=v+f[y],T=v-f[_];v=Lx(w,v,T)}if(a){const y=m==="y"?"top":"left",_=m==="y"?"bottom":"right",w=b+f[y],T=b-f[_];b=Lx(w,b,T)}const x=l.fn({...t,[g]:v,[m]:b});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[g]:s,[m]:a}}}}}},jK=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=zi(e,t),d={x:n,y:r},f=ao(o),m=tw(f);let g=d[m],v=d[f];const b=zi(a,t),x=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(l){const w=m==="y"?"height":"width",T=i.reference[m]-i.floating[w]+x.mainAxis,R=i.reference[m]+i.reference[w]-x.mainAxis;g<T?g=T:g>R&&(g=R)}if(c){var y,_;const w=m==="y"?"width":"height",T=vA.has(_r(o)),R=i.reference[f]-i.floating[w]+(T&&((y=s.offset)==null?void 0:y[f])||0)+(T?0:x.crossAxis),S=i.reference[f]+i.reference[w]+(T?0:((_=s.offset)==null?void 0:_[f])||0)-(T?x.crossAxis:0);v<R?v=R:v>S&&(v=S)}return{[m]:g,[f]:v}}}},qK=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=zi(e,t),d=await s.detectOverflow(t,c),f=_r(o),m=Bs(o),g=ao(o)==="y",{width:v,height:b}=i.floating;let x,y;f==="top"||f==="bottom"?(x=f,y=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,x=m==="end"?"top":"bottom");const _=b-d.top-d.bottom,w=v-d.left-d.right,T=jl(b-d[x],_),R=jl(v-d[y],w),S=!t.middlewareData.shift;let P=T,N=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=_),S&&!m){const W=Vr(d.left,0),I=Vr(d.right,0),B=Vr(d.top,0),$=Vr(d.bottom,0);g?N=v-2*(W!==0||I!==0?W+I:Vr(d.left,d.right)):P=b-2*(B!==0||$!==0?B+$:Vr(d.top,d.bottom))}await l({...t,availableWidth:N,availableHeight:P});const F=await s.getDimensions(a.floating);return v!==F.width||b!==F.height?{reset:{rects:!0}}:{}}}};function bA(e){const t=Or(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Zt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=ql(n)!==i||ql(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function pw(e){return Ct(e)?e:e.contextElement}function Ol(e){const t=pw(e);if(!Zt(t))return ni(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=bA(t);let s=(i?ql(n.width):n.width)/r,a=(i?ql(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const BK=ni(0);function yA(e){const t=Ft(e);return!cv()||!t.visualViewport?BK:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function VK(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ft(e)?!1:t}function wa(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=pw(e);let s=ni(1);t&&(r?Ct(r)&&(s=Ol(r)):s=Ol(e));const a=VK(i,n,r)?yA(i):ni(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,f=o.height/s.y;if(i){const m=Ft(i),g=r&&Ct(r)?Ft(r):r;let v=m,b=Dx(v);for(;b&&r&&g!==v;){const x=Ol(b),y=b.getBoundingClientRect(),_=Or(b),w=y.left+(b.clientLeft+parseFloat(_.paddingLeft))*x.x,T=y.top+(b.clientTop+parseFloat(_.paddingTop))*x.y;l*=x.x,c*=x.y,d*=x.x,f*=x.y,l+=w,c+=T,v=Ft(b),b=Dx(v)}}return Qf({width:d,height:f,x:l,y:c})}function vv(e,t){const n=dv(e).scrollLeft;return t?t.left+n:wa(li(e)).left+n}function xA(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-vv(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function WK(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=li(r),a=t?uv(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ni(1);const d=ni(0),f=Zt(r);if((f||!f&&!i)&&((rr(r)!=="body"||js(s))&&(l=dv(r)),f)){const g=wa(r);c=Ol(r),d.x=g.x+r.clientLeft,d.y=g.y+r.clientTop}const m=s&&!f&&!i?xA(s,l):ni(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+m.x,y:n.y*c.y-l.scrollTop*c.y+d.y+m.y}}function HK(e){return Array.from(e.getClientRects())}function KK(e){const t=li(e),n=dv(e),r=e.ownerDocument.body,o=Vr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Vr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+vv(e);const a=-n.scrollTop;return Or(r).direction==="rtl"&&(s+=Vr(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const yT=25;function UK(e,t){const n=Ft(e),r=li(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const d=cv();(!d||d&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=vv(r);if(c<=0){const d=r.ownerDocument,f=d.body,m=getComputedStyle(f),g=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,v=Math.abs(r.clientWidth-f.clientWidth-g);v<=yT&&(i-=v)}else c<=yT&&(i+=c);return{width:i,height:s,x:a,y:l}}function zK(e,t){const n=wa(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Zt(e)?Ol(e):ni(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function xT(e,t,n){let r;if(t==="viewport")r=UK(e,n);else if(t==="document")r=KK(li(e));else if(Ct(t))r=zK(t,n);else{const o=yA(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Qf(r)}function EA(e,t){const n=Ui(e);return n===t||!Ct(n)||Wi(n)?!1:Or(n).position==="fixed"||EA(n,t)}function GK(e,t){const n=t.get(e);if(n)return n;let r=Zf(e,[],!1).filter(a=>Ct(a)&&rr(a)!=="body"),o=null;const i=Or(e).position==="fixed";let s=i?Ui(e):e;for(;Ct(s)&&!Wi(s);){const a=Or(s),l=GE(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||js(s)&&!l&&EA(e,s))?r=r.filter(d=>d!==s):o=a,s=Ui(s)}return t.set(e,r),r}function YK(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?uv(t)?[]:GK(t,this._c):[].concat(n),r],a=xT(t,s[0],o);let l=a.top,c=a.right,d=a.bottom,f=a.left;for(let m=1;m<s.length;m++){const g=xT(t,s[m],o);l=Vr(g.top,l),c=jl(g.right,c),d=jl(g.bottom,d),f=Vr(g.left,f)}return{width:c-f,height:d-l,x:f,y:l}}function XK(e){const{width:t,height:n}=bA(e);return{width:t,height:n}}function ZK(e,t,n){const r=Zt(t),o=li(t),i=n==="fixed",s=wa(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=ni(0);function c(){l.x=vv(o)}if(r||!r&&!i)if((rr(t)!=="body"||js(o))&&(a=dv(t)),r){const g=wa(t,!0,i,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else o&&c();i&&!r&&o&&c();const d=o&&!r&&!i?xA(o,a):ni(0),f=s.left+a.scrollLeft-l.x-d.x,m=s.top+a.scrollTop-l.y-d.y;return{x:f,y:m,width:s.width,height:s.height}}function Ny(e){return Or(e).position==="static"}function ET(e,t){if(!Zt(e)||Or(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return li(e)===n&&(n=n.ownerDocument.body),n}function wA(e,t){const n=Ft(e);if(uv(e))return n;if(!Zt(e)){let o=Ui(e);for(;o&&!Wi(o);){if(Ct(o)&&!Ny(o))return o;o=Ui(o)}return n}let r=ET(e,t);for(;r&&K9(r)&&Ny(r);)r=ET(r,t);return r&&Wi(r)&&Ny(r)&&!GE(r)?n:r||G9(e)||n}const JK=async function(e){const t=this.getOffsetParent||wA,n=this.getDimensions,r=await n(e.floating);return{reference:ZK(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function QK(e){return Or(e).direction==="rtl"}const CA={convertOffsetParentRelativeRectToViewportRelativeRect:WK,getDocumentElement:li,getClippingRect:YK,getOffsetParent:wA,getElementRects:JK,getClientRects:HK,getDimensions:XK,getScale:Ol,isElement:Ct,isRTL:QK};function RA(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eU(e,t){let n=null,r;const o=li(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:f,width:m,height:g}=c;if(a||t(),!m||!g)return;const v=va(f),b=va(o.clientWidth-(d+m)),x=va(o.clientHeight-(f+g)),y=va(d),w={rootMargin:-v+"px "+-b+"px "+-x+"px "+-y+"px",threshold:Vr(0,jl(1,l))||1};let T=!0;function R(S){const P=S[0].intersectionRatio;if(P!==l){if(!T)return s();P?s(!1,P):r=setTimeout(()=>{s(!1,1e-7)},1e3)}P===1&&!RA(c,e.getBoundingClientRect())&&s(),T=!1}try{n=new IntersectionObserver(R,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,w)}n.observe(e)}return s(!0),i}function wT(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=pw(e),d=o||i?[...c?Zf(c):[],...t?Zf(t):[]]:[];d.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const f=c&&a?eU(c,n):null;let m=-1,g=null;s&&(g=new ResizeObserver(y=>{let[_]=y;_&&_.target===c&&g&&t&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=g)==null||w.observe(t)})),n()}),c&&!l&&g.observe(c),t&&g.observe(t));let v,b=l?wa(e):null;l&&x();function x(){const y=wa(e);b&&!RA(b,y)&&n(),b=y,v=requestAnimationFrame(x)}return n(),()=>{var y;d.forEach(_=>{o&&_.removeEventListener("scroll",n),i&&_.removeEventListener("resize",n)}),f?.(),(y=g)==null||y.disconnect(),g=null,l&&cancelAnimationFrame(v)}}const tU=FK,nU=LK,rU=AK,oU=qK,iU=kK,sU=jK,aU=(e,t,n)=>{const r=new Map,o={platform:CA,...n},i={...o.platform,_c:r};return DK(e,t,{...o,platform:i})};var lU=typeof document<"u",uU=function(){},ig=lU?M.useLayoutEffect:uU;function Tg(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Tg(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Tg(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function SA(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function CT(e,t){const n=SA(e);return Math.round(t*n)/n}function Oy(e){const t=h.useRef(e);return ig(()=>{t.current=e}),t}function cU(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,f]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=h.useState(r);Tg(m,r)||g(r);const[v,b]=h.useState(null),[x,y]=h.useState(null),_=h.useCallback(L=>{L!==S.current&&(S.current=L,b(L))},[]),w=h.useCallback(L=>{L!==P.current&&(P.current=L,y(L))},[]),T=i||v,R=s||x,S=h.useRef(null),P=h.useRef(null),N=h.useRef(d),F=l!=null,W=Oy(l),I=Oy(o),B=Oy(c),$=h.useCallback(()=>{if(!S.current||!P.current)return;const L={placement:t,strategy:n,middleware:m};I.current&&(L.platform=I.current),aU(S.current,P.current,L).then(H=>{const V={...H,isPositioned:B.current!==!1};k.current&&!Tg(N.current,V)&&(N.current=V,Rn.flushSync(()=>{f(V)}))})},[m,t,n,I,B]);ig(()=>{c===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,f(L=>({...L,isPositioned:!1})))},[c]);const k=h.useRef(!1);ig(()=>(k.current=!0,()=>{k.current=!1}),[]),ig(()=>{if(T&&(S.current=T),R&&(P.current=R),T&&R){if(W.current)return W.current(T,R,$);$()}},[T,R,$,W,F]);const j=h.useMemo(()=>({reference:S,floating:P,setReference:_,setFloating:w}),[_,w]),D=h.useMemo(()=>({reference:T,floating:R}),[T,R]),A=h.useMemo(()=>{const L={position:n,left:0,top:0};if(!D.floating)return L;const H=CT(D.floating,d.x),V=CT(D.floating,d.y);return a?{...L,transform:"translate("+H+"px, "+V+"px)",...SA(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:V}},[n,a,D.floating,d.x,d.y]);return h.useMemo(()=>({...d,update:$,refs:j,elements:D,floatingStyles:A}),[d,$,j,D,A])}const dU=(e,t)=>{const n=tU(e);return{name:n.name,fn:n.fn,options:[e,t]}},fU=(e,t)=>{const n=nU(e);return{name:n.name,fn:n.fn,options:[e,t]}},pU=(e,t)=>({fn:sU(e).fn,options:[e,t]}),mU=(e,t)=>{const n=rU(e);return{name:n.name,fn:n.fn,options:[e,t]}},hU=(e,t)=>{const n=oU(e);return{name:n.name,fn:n.fn,options:[e,t]}},gU=(e,t)=>{const n=iU(e);return{name:n.name,fn:n.fn,options:[e,t]}},ye=(e,t,n,r,o,i,...s)=>{if(s.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":gt(1));let a;if(e&&t&&n&&r&&o&&i)a=(l,c,d,f)=>{const m=e(l,c,d,f),g=t(l,c,d,f),v=n(l,c,d,f),b=r(l,c,d,f),x=o(l,c,d,f);return i(m,g,v,b,x,c,d,f)};else if(e&&t&&n&&r&&o)a=(l,c,d,f)=>{const m=e(l,c,d,f),g=t(l,c,d,f),v=n(l,c,d,f),b=r(l,c,d,f);return o(m,g,v,b,c,d,f)};else if(e&&t&&n&&r)a=(l,c,d,f)=>{const m=e(l,c,d,f),g=t(l,c,d,f),v=n(l,c,d,f);return r(m,g,v,c,d,f)};else if(e&&t&&n)a=(l,c,d,f)=>{const m=e(l,c,d,f),g=t(l,c,d,f);return n(m,g,c,d,f)};else if(e&&t)a=(l,c,d,f)=>{const m=e(l,c,d,f);return t(m,c,d,f)};else if(e)a=e;else throw new Error("Missing arguments");return a};var vU=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(i){({stack:o}=i)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
3
|
-
\`createSelector([state => state.todos], todos => todos)\`
|
|
4
|
-
This could lead to inefficient memoization and unnecessary re-renders.
|
|
5
|
-
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},bU=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:i,inputSelectorResultsCopy:s}=e,a=r(()=>({}),...o);if(!(a.apply(null,i)===a.apply(null,s))){let c;try{throw new Error}catch(d){({stack:c}=d)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
6
|
-
This means your output selector will likely run more frequently than intended.
|
|
7
|
-
Avoid returning a new reference inside your input selector, e.g.
|
|
8
|
-
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:i,secondInputs:s,stack:c})}},yU={inputStabilityCheck:"once",identityFunctionCheck:"once"},_g=Symbol("NOT_FOUND");function xU(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function EU(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function wU(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var RT=e=>Array.isArray(e)?e:[e];function CU(e){const t=Array.isArray(e[0])?e[0]:e;return wU(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ST(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var RU=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...yU,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:vU},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:bU}}};function SU(e){let t;return{get(n){return t&&e(t.key,n)?t.value:_g},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function PU(e,t){let n=[];function r(a){const l=n.findIndex(c=>t(a,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return _g}function o(a,l){r(a)===_g&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var TU=(e,t)=>e===t;function _U(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;i<o;i++)if(!e(n[i],r[i]))return!1;return!0}}function NU(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=TU,maxSize:o=1,resultEqualityCheck:i}=n,s=_U(r);let a=0;const l=o<=1?SU(s):PU(o,s);function c(){let d=l.get(arguments);if(d===_g){if(d=e.apply(null,arguments),a++,i){const m=l.getEntries().find(g=>i(g.value,d));m&&(d=m.value,a!==0&&a--)}l.put(arguments,d)}return d}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>a,c.resetResultsCount=()=>{a=0},c}var OU=class{constructor(e){this.value=e}deref(){return this.value}},MU=typeof WeakRef<"u"?WeakRef:OU,IU=0,PT=1;function dh(){return{s:IU,v:void 0,o:null,p:null}}function PA(e,t={}){let n=dh();const{resultEqualityCheck:r}=t;let o,i=0;function s(){let a=n;const{length:l}=arguments;for(let f=0,m=l;f<m;f++){const g=arguments[f];if(typeof g=="function"||typeof g=="object"&&g!==null){let v=a.o;v===null&&(a.o=v=new WeakMap);const b=v.get(g);b===void 0?(a=dh(),v.set(g,a)):a=b}else{let v=a.p;v===null&&(a.p=v=new Map);const b=v.get(g);b===void 0?(a=dh(),v.set(g,a)):a=b}}const c=a;let d;if(a.s===PT)d=a.v;else if(d=e.apply(null,arguments),i++,r){const f=o?.deref?.()??o;f!=null&&r(f,d)&&(d=f,i!==0&&i--),o=typeof d=="object"&&d!==null||typeof d=="function"?new MU(d):d}return c.s=PT,c.v=d,d}return s.clearCache=()=>{n=dh(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function TA(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,s=0,a,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),xU(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const d={...n,...l},{memoize:f,memoizeOptions:m=[],argsMemoize:g=PA,argsMemoizeOptions:v=[],devModeChecks:b={}}=d,x=RT(m),y=RT(v),_=CU(o),w=f(function(){return i++,c.apply(null,arguments)},...x);let T=!0;const R=g(function(){s++;const P=ST(_,arguments);if(a=w.apply(null,P),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:N,inputStabilityCheck:F}=RU(T,b);if(N.shouldRun&&N.run(c,P,a),F.shouldRun){const W=ST(_,arguments);F.run({inputSelectorResults:P,inputSelectorResultsCopy:W},{memoize:f,memoizeOptions:x},arguments)}T&&(T=!1)}return a},...y);return Object.assign(R,{resultFunc:c,memoizedResultFunc:w,dependencies:_,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:f,argsMemoize:g})};return Object.assign(r,{withTypes:()=>r}),r}var DU=TA(PA),AU=Object.assign((e,t=DU)=>{EU(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((s,a,l)=>(s[n[l]]=a,s),{}))},{withTypes:()=>AU});const kU=TA({memoize:NU,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),$U=(...e)=>{const t=new WeakMap;let n=1;const r=e[e.length-1],o=e.length-1||1,i=r.length-o;if(i>3)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of arguments":gt(2));return(a,l,c,d)=>{let f=a.__cacheKey__;f||(f={id:n},a.__cacheKey__=f,n+=1);let m=t.get(f);if(!m){let g=e;const v=[void 0,void 0,void 0];switch(i){case 0:break;case 1:{g=[...e.slice(0,-1),()=>v[0],r];break}case 2:{g=[...e.slice(0,-1),()=>v[0],()=>v[1],r];break}case 3:{g=[...e.slice(0,-1),()=>v[0],()=>v[1],()=>v[2],r];break}default:throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of arguments":gt(2))}m=kU(...g),m.selectorArgs=v,t.set(f,m)}switch(m.selectorArgs[0]=l,m.selectorArgs[1]=c,m.selectorArgs[2]=d,i){case 0:return m(a);case 1:return m(a,l);case 2:return m(a,l,c);case 3:return m(a,l,c,d);default:throw new Error("unreachable")}}};var fh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _A(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ph={exports:{}},My={};var TT;function FU(){if(TT)return My;TT=1;var e=M;function t(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(f,m){var g=m(),v=r({inst:{value:g,getSnapshot:m}}),b=v[0].inst,x=v[1];return i(function(){b.value=g,b.getSnapshot=m,l(b)&&x({inst:b})},[f,g,m]),o(function(){return l(b)&&x({inst:b}),f(function(){l(b)&&x({inst:b})})},[f]),s(g),g}function l(f){var m=f.getSnapshot;f=f.value;try{var g=m();return!n(f,g)}catch{return!0}}function c(f,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return My.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,My}var Iy={};var _T;function LU(){return _T||(_T=1,process.env.NODE_ENV!=="production"&&(function(){function e(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}function t(g,v){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var b=v();if(!f){var x=v();i(b,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}x=s({inst:{value:b,getSnapshot:v}});var y=x[0].inst,_=x[1];return l(function(){y.value=b,y.getSnapshot=v,n(y)&&_({inst:y})},[g,b,v]),a(function(){return n(y)&&_({inst:y}),g(function(){n(y)&&_({inst:y})})},[g]),c(b),b}function n(g){var v=g.getSnapshot;g=g.value;try{var b=v();return!i(g,b)}catch{return!0}}function r(g,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=M,i=typeof Object.is=="function"?Object.is:e,s=o.useState,a=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,d=!1,f=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Iy.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Iy}var NT;function mw(){return NT||(NT=1,process.env.NODE_ENV==="production"?ph.exports=FU():ph.exports=LU()),ph.exports}var NA=mw(),mh={exports:{}},Dy={};var OT;function jU(){if(OT)return Dy;OT=1;var e=M,t=mw();function n(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return Dy.useSyncExternalStoreWithSelector=function(c,d,f,m,g){var v=i(null);if(v.current===null){var b={hasValue:!1,value:null};v.current=b}else b=v.current;v=a(function(){function y(S){if(!_){if(_=!0,w=S,S=m(S),g!==void 0&&b.hasValue){var P=b.value;if(g(P,S))return T=P}return T=S}if(P=T,r(w,S))return P;var N=m(S);return g!==void 0&&g(P,N)?(w=S,P):(w=S,T=N)}var _=!1,w,T,R=f===void 0?null:f;return[function(){return y(d())},R===null?void 0:function(){return y(R())}]},[d,f,m,g]);var x=o(c,v[0],v[1]);return s(function(){b.hasValue=!0,b.value=x},[x]),l(x),x},Dy}var Ay={};var MT;function qU(){return MT||(MT=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=M,n=mw(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;Ay.useSyncExternalStoreWithSelector=function(c,d,f,m,g){var v=i(null);if(v.current===null){var b={hasValue:!1,value:null};v.current=b}else b=v.current;v=a(function(){function y(S){if(!_){if(_=!0,w=S,S=m(S),g!==void 0&&b.hasValue){var P=b.value;if(g(P,S))return T=P}return T=S}if(P=T,r(w,S))return P;var N=m(S);return g!==void 0&&g(P,N)?(w=S,P):(w=S,T=N)}var _=!1,w,T,R=f===void 0?null:f;return[function(){return y(d())},R===null?void 0:function(){return y(R())}]},[d,f,m,g]);var x=o(c,v[0],v[1]);return s(function(){b.hasValue=!0,b.value=x},[x]),l(x),x},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Ay}var IT;function BU(){return IT||(IT=1,process.env.NODE_ENV==="production"?mh.exports=jU():mh.exports=qU()),mh.exports}var VU=BU();const Hx=[];let Kx;function WU(){return Kx}function HU(e){Hx.push(e)}function OA(e){const t=(n,r)=>{const o=fn(UU).current;let i;try{Kx=o;for(const s of Hx)s.before(o);i=e(n,r);for(const s of Hx)s.after(o);o.didInitialize=!0}finally{Kx=void 0}return i};return t.displayName=e.displayName||e.name,t}function KU(e){return h.forwardRef(OA(e))}function UU(){return{didInitialize:!1}}const zU=sw(19),GU=zU?XU:ZU;function pe(e,t,n,r,o){return GU(e,t,n,r,o)}function YU(e,t,n,r,o){const i=h.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return NA.useSyncExternalStore(e.subscribe,i,i)}HU({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],o=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,o))&&(t=!0,r.value=o,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const o of e.syncHooks)n.add(o.store);const r=[];for(const o of n)r.push(o.subscribe(t));return()=>{for(const o of r)o()}}),NA.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function XU(e,t,n,r,o){const i=WU();if(!i)return YU(e,t,n,r,o);const s=i.syncIndex;i.syncIndex+=1;let a;return i.didInitialize?(a=i.syncHooks[s],(a.store!==e||a.selector!==t||!Object.is(a.a1,n)||!Object.is(a.a2,r)||!Object.is(a.a3,o))&&(a.store!==e&&(i.didChangeStore=!0),a.store=e,a.selector=t,a.a1=n,a.a2=r,a.a3=o,a.didChange=!0)):(a={store:e,selector:t,a1:n,a2:r,a3:o,value:t(e.getSnapshot(),n,r,o),didChange:!1},i.syncHooks.push(a)),a.value}function ZU(e,t,n,r,o){return VU.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}class hw{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,o){return pe(this,t,n,r,o)}}class Tp extends hw{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){h.useDebugValue(t),Ne(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;Ne(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this;if(process.env.NODE_ENV!=="production"){h.useDebugValue(t,s=>Object.keys(s));const o=h.useRef(Object.keys(t)).current,i=Object.keys(t);(o.length!==i.length||o.some((s,a)=>s!==i[a]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);Ne(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){h.useDebugValue(t);const r=n!==void 0;if(Ne(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r]),process.env.NODE_ENV!=="production"){const o=this.controlledValues??=new Map;o.has(t)||o.set(t,r);const i=o.get(t);i!==void 0&&i!==r&&console.error(`A component is changing the ${r?"":"un"}controlled state of ${t.toString()} to be ${r?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(t,n,r,o){const i=this.selectors[t];return i(this.state,n,r,o)}useState(t,n,r,o){return h.useDebugValue(t),pe(this,this.selectors[t],n,r,o)}useContextCallback(t,n){h.useDebugValue(t);const r=Re(n??Dt);this.context[t]=r}useStateSetter(t){const n=h.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(i=>{const s=r(i);if(!Object.is(o,s)){const a=o;o=s,n(s,a,this)}})}}function JU(){const[,e]=h.useState({});return h.useCallback(()=>{e({})},[])}const QU={open:ye(e=>e.open),transitionStatus:ye(e=>e.transitionStatus),domReferenceElement:ye(e=>e.domReferenceElement),referenceElement:ye(e=>e.positionReference??e.referenceElement),floatingElement:ye(e=>e.floatingElement),floatingId:ye(e=>e.floatingId)};class gw extends Tp{constructor(t){const{syncOnly:n,nested:r,onOpenChange:o,triggerElements:i,...s}=t;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:gA(),nested:r,triggerElements:i},QU),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&qD(n))&&(this.context.dataRef.current.openEvent=t?n:void 0)};dispatchOpenChange=(t,n)=>{this.syncOpenEvent(t,n.event);const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)};setOpen=(t,n)=>{if(this.syncOnly){this.context.onOpenChange?.(t,n);return}this.dispatchOpenChange(t,n),this.context.onOpenChange?.(t,n)}}function $o(e,t=!1,n=!1){const[r,o]=h.useState(e&&t?"idle":void 0),[i,s]=h.useState(e);return e&&!i&&(s(!0),o("starting")),!e&&i&&r!=="ending"&&!n&&o("ending"),!e&&!i&&r==="ending"&&o(void 0),Ne(()=>{if(!e&&i&&r!=="ending"&&n){const a=Go.request(()=>{o("ending")});return()=>{Go.cancel(a)}}},[e,i,r,n]),Ne(()=>{if(!e||t)return;const a=Go.request(()=>{o(void 0)});return()=>{Go.cancel(a)}},[t,e]),Ne(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&o("starting");const a=Go.request(()=>{o("idle")});return()=>{Go.cancel(a)}},[t,e,i,r]),{mounted:i,setMounted:s,transitionStatus:r}}let tp=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const ez={[tp.startingStyle]:""},tz={[tp.endingStyle]:""},Hn={transitionStatus(e){return e==="starting"?ez:e==="ending"?tz:null}};function bv(e,t=!1,n=!0){const r=Gl();return Re((o,i=null)=>{r.cancel();const s=ki(e);if(s==null)return;const a=s,l=()=>{Rn.flushSync(o)};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){o();return}function c(){Promise.all(a.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||l()}).catch(()=>{if(n){i?.aborted||l();return}const d=a.getAnimations();!i?.aborted&&d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&c()})}if(t){const d=tp.startingStyle;if(!a.hasAttribute(d)){r.request(c);return}const f=new MutationObserver(()=>{a.hasAttribute(d)||(f.disconnect(),c())});f.observe(a,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0});return}r.request(c)})}function sr(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=Re(o),s=bv(r,n,!1);h.useEffect(()=>{if(!t)return;const a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,n,i,s])}function nz(e,t){const n=h.useRef(null),r=h.useRef(null);return h.useCallback(o=>{if(e!==void 0){if(n.current!==null){const i=n.current,s=r.current,a=t.context.triggerElements.getById(i);s&&a===s&&t.context.triggerElements.delete(i),n.current=null,r.current=null}o!==null&&(n.current=e,r.current=o,t.context.triggerElements.add(e,o))}},[t,e])}function vw(e,t,n,r){const o=n.useState("isMountedByTrigger",e),i=nz(e,n),s=Re(a=>{if(i(a),!a||!n.select("open"))return;const l=n.select("activeTriggerId");if(l===e){n.update({activeTriggerElement:a,...r});return}l==null&&n.update({activeTriggerId:e,activeTriggerElement:a,...r})});return Ne(()=>{o&&n.update({activeTriggerElement:t.current,...r})},[o,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:o}}function bw(e){const t=e.useState("open");Ne(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,o]=n.value;e.update({activeTriggerId:r,activeTriggerElement:o})}}},[t,e])}function yw(e,t,n){const{mounted:r,setMounted:o,transitionStatus:i}=$o(e);t.useSyncedValues({mounted:r,transitionStatus:i});const s=Re(()=>{o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),a=t.useState("preventUnmountingOnClose");return sr({enabled:!a,open:e,ref:t.context.popupRef,onComplete(){e||s()}}),{forceUnmount:s,transitionStatus:i}}class _p{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);if(r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n),process.env.NODE_ENV!=="production"&&this.elementsSet.size!==this.idMap.size))throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.")}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function rz(){return new gw({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new _p,floatingId:"",syncOnly:!1,nested:!1,onOpenChange:void 0})}function xw(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:rz(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:rn,inactiveTriggerProps:rn,popupProps:rn}}const hh=ye(e=>e.triggerIdProp??e.activeTriggerId),Ew={open:ye(e=>e.openProp??e.open),mounted:ye(e=>e.mounted),transitionStatus:ye(e=>e.transitionStatus),floatingRootContext:ye(e=>e.floatingRootContext),preventUnmountingOnClose:ye(e=>e.preventUnmountingOnClose),payload:ye(e=>e.payload),activeTriggerId:hh,activeTriggerElement:ye(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:ye((e,t)=>t!==void 0&&hh(e)===t),isOpenedByTrigger:ye((e,t)=>t!==void 0&&hh(e)===t&&e.open),isMountedByTrigger:ye((e,t)=>t!==void 0&&hh(e)===t&&e.mounted),triggerProps:ye((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:ye(e=>e.popupProps),popupElement:ye(e=>e.popupElement),positionerElement:ye(e=>e.positionerElement)};function yv(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=Vs(),i=Ws()!=null;if(process.env.NODE_ENV!=="production"){const a=r.reference;a&&!Ct(a)&&console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`","instead.")}const s=fn(()=>new gw({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new _p,floatingId:o,syncOnly:!1,nested:i})).current;return Ne(()=>{const a={open:t,floatingId:o};r.reference!==void 0&&(a.referenceElement=r.reference,a.domReferenceElement=Ct(r.reference)?r.reference:null),r.floating!==void 0&&(a.floatingElement=r.floating),s.update(a)},[t,o,r.reference,r.floating,s]),s.context.onOpenChange=n,s.context.nested=i,s}function oz(e={}){const{nodeId:t,externalTree:n}=e,r=yv(e),o=e.rootContext||r,i={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[s,a]=h.useState(null),l=h.useRef(null),c=Aa(n);Ne(()=>{i.domReference&&(l.current=i.domReference)},[i.domReference]);const d=cU({...e,elements:{...i,...s&&{reference:s}}}),f=h.useCallback(N=>{const F=Ct(N)?{getBoundingClientRect:()=>N.getBoundingClientRect(),getClientRects:()=>N.getClientRects(),contextElement:N}:N;a(F),d.refs.setReference(F)},[d.refs]),[m,g]=h.useState(void 0),[v,b]=h.useState(null);o.useSyncedValue("referenceElement",m??null);const x=Ct(m)?m:null;o.useSyncedValue("domReferenceElement",m===void 0?i.domReference:x),o.useSyncedValue("floatingElement",v);const y=h.useCallback(N=>{(Ct(N)||N===null)&&(l.current=N,g(N)),(Ct(d.refs.reference.current)||d.refs.reference.current===null||N!==null&&!Ct(N))&&d.refs.setReference(N)},[d.refs,g]),_=h.useCallback(N=>{b(N),d.refs.setFloating(N)},[d.refs]),w=h.useMemo(()=>({...d.refs,setReference:y,setFloating:_,setPositionReference:f,domReference:l}),[d.refs,y,_,f]),T=h.useMemo(()=>({...d.elements,domReference:i.domReference}),[d.elements,i.domReference]),R=o.useState("open"),S=o.useState("floatingId"),P=h.useMemo(()=>({...d,dataRef:o.context.dataRef,open:R,onOpenChange:o.setOpen,events:o.context.events,floatingId:S,refs:w,elements:T,nodeId:t,rootStore:o}),[d,w,T,t,o,R,S]);return Ne(()=>{o.context.dataRef.current.floatingContext=P;const N=c?.nodesRef.current.find(F=>F.id===t);N&&(N.context=P)}),h.useMemo(()=>({...d,context:P,refs:w,elements:T,rootStore:o}),[d,w,T,P,o])}function ww(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,onOpenChange:r}=e,o=Vs(),i=Ws()!=null,s=t.useState("open"),a=t.useState("activeTriggerElement"),l=t.useState(n?"popupElement":"positionerElement"),c=t.context.triggerElements,d=fn(()=>new gw({open:s,transitionStatus:void 0,referenceElement:a,floatingElement:l,triggerElements:c,onOpenChange:r,floatingId:o,syncOnly:!0,nested:i})).current;return Ne(()=>{const f={open:s,floatingId:o,referenceElement:a,floatingElement:l};Ct(a)&&(f.domReferenceElement=a),d.state.positionReference===d.state.referenceElement&&(f.positionReference=a),d.update(f)},[s,o,a,l,d]),d.context.onOpenChange=r,d.context.nested=i,d}const ky=Y9&&kD;function iz(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:o}=n.context,{enabled:i=!0,delay:s}=t,a=h.useRef(!1),l=h.useRef(null),c=nn(),d=h.useRef(!0);h.useEffect(()=>{const m=n.select("domReferenceElement");if(!i)return;const g=Ft(m);function v(){const y=n.select("domReferenceElement");!n.select("open")&&Zt(y)&&y===Bn(mt(y))&&(a.current=!0)}function b(){d.current=!0}function x(){d.current=!1}return po(ut(g,"blur",v),ky&&ut(g,"keydown",b,!0),ky&&ut(g,"pointerdown",x,!0))},[n,i]),h.useEffect(()=>{if(!i)return;function m(g){if(g.reason===Os||g.reason===Ep){const v=n.select("domReferenceElement");Ct(v)&&(l.current=v,a.current=!0)}}return r.on("openchange",m),()=>{r.off("openchange",m)}},[r,i,n]);const f=h.useMemo(()=>({onMouseLeave(){a.current=!1,l.current=null},onFocus(m){const g=m.currentTarget;if(a.current){if(l.current===g)return;a.current=!1,l.current=null}const v=Ht(m.nativeEvent);if(Ct(v)){if(ky&&!m.relatedTarget){if(!d.current&&!mv(v))return}else if(!wg(v))return}const b=Eg(m.relatedTarget,n.context.triggerElements),{nativeEvent:x,currentTarget:y}=m,_=typeof s=="function"?s():s;if(n.select("open")&&b||_===0||_===void 0){n.setOpen(!0,je(ng,x,y));return}c.start(_,()=>{a.current||n.setOpen(!0,je(ng,x,y))})},onBlur(m){a.current=!1,l.current=null;const g=m.relatedTarget,v=m.nativeEvent,b=Ct(g)&&g.hasAttribute(ep("focus-guard"))&&g.getAttribute("data-type")==="outside";c.start(0,()=>{const x=n.select("domReferenceElement"),y=Bn(mt(x));!g&&y===x||Xe(o.current.floatingContext?.refs.floating.current,y)||Xe(x,y)||b||Eg(g??y,n.context.triggerElements)||n.setOpen(!1,je(ng,v))})}}),[o,n,c,s]);return h.useMemo(()=>i?{reference:f,trigger:f}:{},[i,f])}class Cw{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new gr,this.restTimeout=new gr,this.handleCloseOptions=void 0}static create(){return new Cw}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const Ng=new WeakMap;function Og(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Ng.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Ng.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function MA(e,t){const{scopeElement:n,referenceElement:r,floatingElement:o}=t,i=Ng.get(n);i&&i!==e&&Og(i),Og(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=o,Ng.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",o.style.pointerEvents="auto"}function IA(e){const t=fn(Cw.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),zl(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function DA(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("domReferenceElement"),{dataRef:s}=n.context,{enabled:a=!0,closeDelay:l=0,nodeId:c}=t,d=IA(n),f=Aa(),m=Ws(),g=Re(()=>BD(s.current.openEvent?.type,d.interactedInside)),v=Re(()=>{const T=s.current.openEvent?.type;return T?.includes("mouse")&&T!=="mousedown"}),b=Re(T=>Eg(T,n.context.triggerElements)),x=h.useCallback(T=>{const R=yg(l,"close",d.pointerType),S=()=>{n.setOpen(!1,je(Gn,T)),f?.events.emit("floating.closed",T)};R?d.openChangeTimeout.start(R,S):(d.openChangeTimeout.clear(),S())},[l,n,d,f]),y=Re(()=>{Og(d)}),_=Re(T=>{const R=Ht(T);if(!XD(R)){d.interactedInside=!1;return}d.interactedInside=R?.closest("[aria-haspopup]")!=null});Ne(()=>{r||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,y())},[r,d,y]),h.useEffect(()=>y,[y]),Ne(()=>{if(a&&r&&d.handleCloseOptions?.blockPointerEvents&&v()&&Ct(i)&&o){const T=i,R=o,S=mt(o),P=f?.nodesRef.current.find(F=>F.id===m)?.context?.elements.floating;P&&(P.style.pointerEvents="");const N=d.handleCloseOptions?.getScope?.()??d.pointerEventsScopeElement??P??T.closest("[data-rootownerid]")??S.body;return MA(d,{scopeElement:N,referenceElement:T,floatingElement:R}),()=>{y()}}},[a,r,i,o,d,v,f,m,y]);const w=nn();h.useEffect(()=>{if(!a)return;function T(){d.openChangeTimeout.clear(),w.clear(),f?.events.off("floating.closed",S),y()}function R(N){if(f&&m&&ri(f.nodesRef.current,m).length>0){f.events.on("floating.closed",S);return}if(b(N.relatedTarget))return;const F=s.current.floatingContext?.nodeId??c,W=N.relatedTarget;if(!(f&&F&&Ct(W)&&ri(f.nodesRef.current,F,!1).some(B=>Xe(B.context?.elements.floating,W)))){if(d.handler){d.handler(N);return}y(),g()||x(N)}}function S(N){!f||!m||ri(f.nodesRef.current,m).length>0||w.start(0,()=>{f.events.off("floating.closed",S),n.setOpen(!1,je(Gn,N)),f.events.emit("floating.closed",N)})}const P=o;return po(P&&ut(P,"mouseenter",T),P&&ut(P,"mouseleave",R),P&&ut(P,"pointerdown",_,!0),()=>{f?.events.off("floating.closed",S)})},[a,o,n,s,c,g,b,x,y,_,d,f,m,w])}const sz={current:null};function AA(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:o}=n.context,{enabled:i=!0,delay:s=0,handleClose:a=null,mouseOnly:l=!1,restMs:c=0,move:d=!0,triggerElementRef:f=sz,externalTree:m,isActiveTrigger:g=!0,getHandleCloseContext:v,isClosing:b}=t,x=Aa(m),y=IA(n),_=h.useRef(!1),w=dn(a),T=dn(s),R=dn(c),S=dn(i),P=dn(b);g&&(y.handleCloseOptions=w.current?.__options);const N=Re(()=>BD(r.current.openEvent?.type,y.interactedInside)),F=Re(k=>Eg(k,n.context.triggerElements)),W=Re((k,j,D)=>{const A=n.context.triggerElements;if(A.hasElement(j))return!k||!Xe(k,j);if(!Ct(D))return!1;const L=D;return A.hasMatchingElement(H=>Xe(H,L))&&(!k||!Xe(k,L))}),I=Re((k,j=!0)=>{const D=yg(T.current,"close",y.pointerType);D?y.openChangeTimeout.start(D,()=>{n.setOpen(!1,je(Gn,k)),x?.events.emit("floating.closed",k)}):j&&(y.openChangeTimeout.clear(),n.setOpen(!1,je(Gn,k)),x?.events.emit("floating.closed",k))}),B=Re(()=>{if(!y.handler)return;mt(n.select("domReferenceElement")).removeEventListener("mousemove",y.handler),y.handler=void 0}),$=Re(()=>{Og(y)});return h.useEffect(()=>B,[B]),h.useEffect(()=>{if(!i)return;function k(j){j.open?_.current=!1:(_.current=j.reason===Gn,B(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}return o.on("openchange",k),()=>{o.off("openchange",k)}},[i,o,y,B]),h.useEffect(()=>{if(!i)return;const k=f.current??(g?n.select("domReferenceElement"):null);if(!Ct(k))return;function j(A){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,l&&!Ll(y.pointerType))return;const L=J1(R.current),H=yg(T.current,"open",y.pointerType),V=Ht(A),X=A.currentTarget??null,K=n.select("domReferenceElement");let G=X;if(Ct(V)&&!n.context.triggerElements.hasElement(V)){for(const Q of n.context.triggerElements.elements())if(Xe(Q,V)){G=Q;break}}Ct(X)&&Ct(K)&&!n.context.triggerElements.hasElement(X)&&Xe(X,K)&&(G=K);const ee=G==null?!1:W(K,G,V),Z=n.select("open"),te=P.current?.()??n.select("transitionStatus")==="ending",J=!Z&&te&&_.current,ne=!ee&&Ct(G)&&Ct(K)&&Xe(K,G)&&J,U=L>0&&!H,ie=ee&&(Z||J)||ne,se=!Z||ee;if(ie){n.setOpen(!0,je(Gn,A,G));return}U||(H?y.openChangeTimeout.start(H,()=>{se&&n.setOpen(!0,je(Gn,A,G))}):se&&n.setOpen(!0,je(Gn,A,G)))}function D(A){if(N()){$();return}B();const L=n.select("domReferenceElement"),H=mt(L);y.restTimeout.clear(),y.restTimeoutPending=!1;const V=r.current.floatingContext??v?.();if(F(A.relatedTarget))return;if(w.current&&V){n.select("open")||y.openChangeTimeout.clear();const G=f.current;y.handler=w.current({...V,tree:x,x:A.clientX,y:A.clientY,onClose(){$(),B(),S.current&&!N()&&G===n.select("domReferenceElement")&&I(A,!0)}}),H.addEventListener("mousemove",y.handler),y.handler(A);return}(y.pointerType!=="touch"||!Xe(n.select("floatingElement"),A.relatedTarget))&&I(A)}return d?po(ut(k,"mousemove",j,{once:!0}),ut(k,"mouseenter",j),ut(k,"mouseleave",D)):po(ut(k,"mouseenter",j),ut(k,"mouseleave",D))},[B,$,r,T,I,n,i,w,y,g,W,N,F,l,d,R,f,x,S,v,P]),h.useMemo(()=>{if(!i)return;function k(j){y.pointerType=j.pointerType}return{onPointerDown:k,onPointerEnter:k,onMouseMove(j){const{nativeEvent:D}=j,A=j.currentTarget,L=n.select("domReferenceElement"),H=n.select("open"),V=W(L,A,j.target);if(l&&!Ll(y.pointerType))return;if(H&&V&&y.handleCloseOptions?.blockPointerEvents){const G=n.select("floatingElement");if(G){const ee=y.handleCloseOptions?.getScope?.()??A.ownerDocument.body;MA(y,{scopeElement:ee,referenceElement:A,floatingElement:G})}}const X=J1(R.current);if(H&&!V||X===0||!V&&y.restTimeoutPending&&j.movementX**2+j.movementY**2<2)return;y.restTimeout.clear();function K(){if(y.restTimeoutPending=!1,N())return;const G=n.select("open");!y.blockMouseMove&&(!G||V)&&n.setOpen(!0,je(Gn,D,A))}y.pointerType==="touch"?Rn.flushSync(()=>{K()}):V&&H?K():(y.restTimeoutPending=!0,y.restTimeout.start(X,K))}}},[i,y,N,W,l,n,R])}function ka(e=[]){const t=e.map(c=>c?.reference),n=e.map(c=>c?.floating),r=e.map(c=>c?.item),o=e.map(c=>c?.trigger),i=h.useCallback(c=>gh(c,e,"reference"),t),s=h.useCallback(c=>gh(c,e,"floating"),n),a=h.useCallback(c=>gh(c,e,"item"),r),l=h.useCallback(c=>gh(c,e,"trigger"),o);return h.useMemo(()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:a,getTriggerProps:l}),[i,s,a,l])}function gh(e,t,n){const r=new Map,o=n==="item",i={};n==="floating"&&(i.tabIndex=-1,i[$x]="");for(const s in e)o&&e&&(s===zD||s===GD)||(i[s]=e[s]);for(let s=0;s<t.length;s+=1){let a;const l=t[s]?.[n];typeof l=="function"?a=e?l(e):null:a=l,a&&DT(i,a,o,r)}return DT(i,e,o,r),i}function DT(e,t,n,r){for(const o in t){const i=t[o];n&&(o===zD||o===GD)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof i=="function"&&(r.get(o)?.push(i),e[o]=(...s)=>r.get(o)?.map(a=>a(...s)).find(a=>a!==void 0))):e[o]=i)}}function az(e){const t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}const lz="Escape";function xv(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function vh(e,t){return xv(t,e===ew||e===wp,e===Ps||e===Ts)}function $y(e,t,n){return xv(t,e===wp,n?e===Ps:e===Ts)||e==="Enter"||e===" "||e===""}function uz(e,t,n){return xv(t,n?e===Ps:e===Ts,e===wp)}function cz(e,t,n,r){const o=n?e===Ts:e===Ps,i=e===ew;return t==="both"||t==="horizontal"&&r&&r>1?e===lz:xv(t,o,i)}function kA(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("domReferenceElement"),s=n.context.dataRef,{listRef:a,activeIndex:l,onNavigate:c=()=>{},enabled:d=!0,selectedIndex:f=null,allowEscape:m=!1,loopFocus:g=!1,nested:v=!1,rtl:b=!1,virtual:x=!1,focusItemOnOpen:y="auto",focusItemOnHover:_=!0,openOnArrowKeyDown:w=!0,disabledIndices:T=void 0,orientation:R="vertical",parentOrientation:S,cols:P=1,id:N,resetOnPointerLeave:F=!0,externalTree:W}=t;process.env.NODE_ENV!=="production"&&(m&&(g||console.warn("`useListNavigation` looping must be enabled to allow escaping."),x||console.warn("`useListNavigation` must be virtual to allow escaping.")),R==="vertical"&&P>1&&console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=Jf(o),B=dn(I),$=Ws(),k=Aa(W);Ne(()=>{s.current.orientation=R},[s,R]);const j=Fx(i),D=h.useRef(y),A=h.useRef(f??-1),L=h.useRef(null),H=h.useRef(!0),V=Re(ce=>{c(A.current===-1?null:A.current,ce)}),X=h.useRef(V),K=h.useRef(!!o),G=h.useRef(r),ee=h.useRef(!1),Z=h.useRef(!1),te=h.useRef(null),J=dn(T),ne=dn(r),U=dn(f),ie=dn(F),se=Re(()=>{function ce(Oe){x?k?.events.emit("virtualfocus",Oe):te.current=og(Oe,{sync:ee.current,preventScroll:!0})}const he=a.current[A.current],re=Z.current;he&&ce(he),(ee.current?Oe=>Oe():requestAnimationFrame)(()=>{const Oe=a.current[A.current]||he;if(!Oe)return;he||ce(Oe),ve&&(re||!H.current)&&Oe.scrollIntoView?.({block:"nearest",inline:"nearest"})})});Ne(()=>{d&&(r&&o?(A.current=f??-1,D.current&&f!=null&&(Z.current=!0,V())):K.current&&(A.current=-1,X.current()))},[d,r,o,f,V]),Ne(()=>{if(d){if(!r){ee.current=!1;return}if(o)if(l==null){if(ee.current=!1,U.current!=null)return;if(K.current&&(A.current=-1,se()),(!G.current||!K.current)&&D.current&&(L.current!=null||D.current===!0&&L.current==null)){let ce=0;const he=()=>{a.current[0]==null?(ce<2&&(ce?requestAnimationFrame:queueMicrotask)(he),ce+=1):(A.current=L.current==null||$y(L.current,R,b)||v?Cy(a):rT(a),L.current=null,V())};he()}}else Rg(a.current,l)||(A.current=l,se(),Z.current=!1)}},[d,r,o,l,U,v,a,R,b,V,se,J]),Ne(()=>{if(!d||o||!k||x||!K.current)return;const ce=k.nodesRef.current,he=ce.find(Oe=>Oe.id===$)?.context?.elements.floating,re=Bn(mt(o)),le=ce.some(Oe=>Oe.context&&Xe(Oe.context.elements.floating,re));he&&!le&&H.current&&he.focus({preventScroll:!0})},[d,o,k,$,x]),Ne(()=>{X.current=V,G.current=r,K.current=!!o}),Ne(()=>{r||(L.current=null,D.current=y)},[r,y]);const Q=l!=null,me=Re(ce=>{if(!ne.current)return;const he=a.current.indexOf(ce.currentTarget);he!==-1&&(A.current!==he||l!==he)&&(A.current=he,V(ce))}),ve=h.useMemo(()=>({onFocus(he){ee.current=!0,me(he)},onClick:({currentTarget:he})=>he.focus({preventScroll:!0}),onMouseMove(he){ee.current=!0,Z.current=!1,_&&me(he)},onPointerLeave(he){if(!ne.current||!H.current||he.pointerType==="touch")return;ee.current=!0;const re=he.relatedTarget;if(!az(he)&&!(!_||a.current.includes(re))&&ie.current&&(te.current?.(),te.current=null,A.current=-1,V(he),!x)){const le=B.current,Oe=Bn(mt(le));le&&Xe(le,Oe)&&le.focus({preventScroll:!0})}}}),[me,ne,B,_,a,V,ie,x]),xe=h.useCallback(()=>S??k?.nodesRef.current.find(ce=>ce.id===$)?.context?.dataRef?.current.orientation,[$,k,S]),be=Re(ce=>{if(H.current=!1,ee.current=!0,ce.which===229||!ne.current&&ce.currentTarget===B.current)return;if(v&&cz(ce.key,R,b,P)){vh(ce.key,xe())||gn(ce),n.setOpen(!1,je(Yf,ce.nativeEvent)),Zt(i)&&(x?k?.events.emit("virtualfocus",i):i.focus());return}const he=A.current,re=Cy(a,T),le=rT(a,T);if(j||(ce.key==="Home"&&(gn(ce),A.current=re,V(ce)),ce.key==="End"&&(gn(ce),A.current=le,V(ce))),P>1){const Oe=Array.from({length:a.current.length},()=>({width:1,height:1})),De=qH(Oe,P),Fe=De.findIndex(He=>He!=null&&!_l(a.current,He,T)),We=De.reduce((He,Ze,nt)=>Ze!=null&&!_l(a.current,Ze,T)?nt:He,-1),ze=De[jH(De.map(He=>He!=null?a.current[He]:null),{event:ce,orientation:R,loopFocus:g,rtl:b,cols:P,disabledIndices:VH([...(typeof T!="function"?T:null)||a.current.map((He,Ze)=>_l(a.current,Ze,T)?Ze:void 0),void 0],De),minIndex:Fe,maxIndex:We,prevIndex:BH(A.current>le?re:A.current,Oe,De,P,ce.key===wp?"bl":ce.key===(b?Ps:Ts)?"tr":"tl"),stopEvent:!0})];if(ze!=null&&(A.current=ze,V(ce)),R==="both")return}if(vh(ce.key,R)){if(gn(ce),r&&!x&&Bn(ce.currentTarget.ownerDocument)===ce.currentTarget){A.current=$y(ce.key,R,b)?re:le,V(ce);return}$y(ce.key,R,b)?g?he>=le?m&&he!==a.current.length?A.current=-1:(ee.current=!1,A.current=re):A.current=mr(a.current,{startingIndex:he,disabledIndices:T}):A.current=Math.min(le,mr(a.current,{startingIndex:he,disabledIndices:T})):g?he<=re?m&&he!==-1?A.current=a.current.length:(ee.current=!1,A.current=le):A.current=mr(a.current,{startingIndex:he,decrement:!0,disabledIndices:T}):A.current=Math.max(re,mr(a.current,{startingIndex:he,decrement:!0,disabledIndices:T})),Rg(a.current,A.current)&&(A.current=-1),V(ce)}}),Ce=h.useMemo(()=>x&&r&&Q&&{"aria-activedescendant":`${N}-${l}`},[x,r,Q,N,l]),qe=h.useMemo(()=>({"aria-orientation":R==="both"?void 0:R,...j?{}:Ce,onKeyDown(ce){if(ce.key==="Tab"&&ce.shiftKey&&r&&!x){const he=Ht(ce.nativeEvent);if(he&&!Xe(B.current,he))return;gn(ce),n.setOpen(!1,je(Ms,ce.nativeEvent)),Zt(i)&&i.focus();return}be(ce)},onPointerMove(){H.current=!0}}),[Ce,be,B,R,j,n,r,x,i]),Te=h.useMemo(()=>{function ce(re){y==="auto"&&LD(re.nativeEvent)&&(D.current=!x)}function he(re){D.current=y,y==="auto"&&jD(re.nativeEvent)&&(D.current=!0)}return{onKeyDown(re){const le=n.select("open");H.current=!1;const Oe=re.key.startsWith("Arrow"),De=uz(re.key,xe(),b),Fe=vh(re.key,R),We=(v?De:Fe)||re.key==="Enter"||re.key.trim()==="";if(x&&le)return be(re);if(!(!le&&!w&&Oe)){if(We){const ze=vh(re.key,xe());L.current=v&&ze?null:re.key}if(v){De&&(gn(re),le?(A.current=Cy(a,J.current),V(re)):n.setOpen(!0,je(Yf,re.nativeEvent,re.currentTarget)));return}Fe&&(U.current!=null&&(A.current=U.current),gn(re),!le&&w?n.setOpen(!0,je(Yf,re.nativeEvent,re.currentTarget)):be(re),le&&V(re))}},onFocus(re){n.select("open")&&!x&&(A.current=-1,V(re))},onPointerDown:he,onPointerEnter:he,onMouseDown:ce,onClick:ce}},[be,J,y,a,v,V,n,w,R,xe,b,U,x]),ke=h.useMemo(()=>({...Ce,...Te}),[Ce,Te]);return h.useMemo(()=>d?{reference:ke,floating:qe,item:ve,trigger:Te}:{},[d,ke,qe,Te,ve])}const dz=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function $A(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingId"),i=n.useState("domReferenceElement"),s=n.useState("floatingElement"),{role:a="dialog"}=t,l=Vs(),c=i?.id||l,d=h.useMemo(()=>Jf(s)?.id||o,[s,o]),f=dz.get(a)??a,g=Ws()!=null,v=h.useMemo(()=>f==="tooltip"||a==="label"?rn:{"aria-haspopup":f==="alertdialog"?"dialog":f,"aria-expanded":"false",...f==="listbox"&&{role:"combobox"},...f==="menu"&&g&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[f,g,a]),b=h.useMemo(()=>f==="tooltip"||a==="label"?{[`aria-${a==="label"?"labelledby":"describedby"}`]:r?d:void 0}:{...v,"aria-expanded":r?"true":"false","aria-controls":r?d:void 0,...f==="menu"&&{id:c}},[f,d,r,c,a,v]),x=h.useMemo(()=>{const _={id:d,...f&&{role:f}};return f==="tooltip"||a==="label"?_:{..._,...f==="menu"&&{"aria-labelledby":c}}},[f,d,c,a]),y=h.useCallback(({active:_,selected:w})=>{const T={role:"option",..._&&{id:`${d}-fui-option`}};switch(a){case"select":case"combobox":return{...T,"aria-selected":w}}return{}},[d,a]);return h.useMemo(()=>({reference:b,floating:x,item:y,trigger:v}),[b,x,v,y])}function FA(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,o=n.useState("open"),{listRef:i,elementsRef:s,activeIndex:a,onMatch:l,onTypingChange:c,enabled:d=!0,resetMs:f=750,selectedIndex:m=null}=t,g=nn(),v=h.useRef(""),b=h.useRef(m??a??-1),x=h.useRef(null);Ne(()=>{!o&&m!==null||(g.clear(),x.current=null,v.current!==""&&(v.current=""))},[o,m,g]),Ne(()=>{o&&v.current===""&&(b.current=m??a??-1)},[o,m,a]);const y=Re(S=>{S?r.current.typing||(r.current.typing=S,c?.(S)):r.current.typing&&(r.current.typing=S,c?.(S))}),_=Re(S=>{function P(j){const D=s?.current[j];return!D||hv(D)}function N(j,D,A=0){if(j.length===0)return-1;const L=(A%j.length+j.length)%j.length,H=D.toLocaleLowerCase();for(let V=0;V<j.length;V+=1){const X=(L+V)%j.length;if(!(!j[X]?.toLocaleLowerCase().startsWith(H)||!P(X)))return X}return-1}const F=i.current;if(v.current.length>0&&S.key===" "&&(gn(S),y(!0)),v.current.length>0&&v.current[0]!==" "&&N(F,v.current)===-1&&S.key!==" "&&y(!1),F==null||S.key.length!==1||S.ctrlKey||S.metaKey||S.altKey)return;o&&S.key!==" "&&(gn(S),y(!0));const W=v.current==="";W&&(b.current=m??a??-1),F.every(j=>j?j[0]?.toLocaleLowerCase()!==j[1]?.toLocaleLowerCase():!0)&&v.current===S.key&&(v.current="",b.current=x.current),v.current+=S.key,g.start(f,()=>{v.current="",b.current=x.current,y(!1)});const $=((W?m??a??-1:b.current)??0)+1,k=N(F,v.current,$);k!==-1?(l?.(k),x.current=k):S.key!==" "&&(v.current="",y(!1))}),w=Re(S=>{const P=S.relatedTarget,N=n.select("domReferenceElement"),F=n.select("floatingElement"),W=Xe(N,P),I=Xe(F,P);W||I||(g.clear(),v.current="",b.current=x.current,y(!1))}),T=h.useMemo(()=>({onKeyDown:_,onBlur:w}),[_,w]),R=h.useMemo(()=>({onKeyDown:_,onBlur:w}),[_,w]);return h.useMemo(()=>d?{reference:T,floating:R}:{},[d,T,R])}const AT=.1,fz=AT*AT,Gt=.5;function bh(e,t,n,r,o,i){return r>=t!=i>=t&&e<=(o-n)*(t-r)/(i-r)+n}function yh(e,t,n,r,o,i,s,a,l,c){let d=!1;return bh(e,t,n,r,o,i)&&(d=!d),bh(e,t,o,i,s,a)&&(d=!d),bh(e,t,s,a,l,c)&&(d=!d),bh(e,t,l,c,n,r)&&(d=!d),d}function pz(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function xh(e,t,n,r,o,i){const s=Math.min(n,o),a=Math.max(n,o),l=Math.min(r,i),c=Math.max(r,i);return e>=s&&e<=a&&t>=l&&t<=c}function LA(e={}){const{blockPointerEvents:t=!1}=e,n=new gr,r=({x:o,y:i,placement:s,elements:a,onClose:l,nodeId:c,tree:d})=>{const f=s?.split("-")[0];let m=!1,g=null,v=null,b=typeof performance<"u"?performance.now():0;function x(_,w){const T=performance.now(),R=T-b;if(g===null||v===null||R===0)return g=_,v=w,b=T,!1;const S=_-g,P=w-v,N=S*S+P*P,F=R*R*fz;return g=_,v=w,b=T,N<F}function y(){n.clear(),l()}return function(w){n.clear();const T=a.domReference,R=a.floating;if(!T||!R||f==null||o==null||i==null)return;const{clientX:S,clientY:P}=w,N=Ht(w),F=w.type==="mouseleave",W=Xe(R,N),I=Xe(T,N);if(W&&(m=!0,!F))return;if(I&&(m=!1,!F)){m=!0;return}if(F&&Ct(w.relatedTarget)&&Xe(R,w.relatedTarget))return;function B(){return!!(d&&ri(d.nodesRef.current,c).length>0)}function $(){B()||y()}if(B())return;const k=T.getBoundingClientRect(),j=R.getBoundingClientRect(),D=o>j.right-j.width/2,A=i>j.bottom-j.height/2,L=j.width>k.width,H=j.height>k.height,V=(L?k:j).left,X=(L?k:j).right,K=(H?k:j).top,G=(H?k:j).bottom;if(f==="top"&&i>=k.bottom-1||f==="bottom"&&i<=k.top+1||f==="left"&&o>=k.right-1||f==="right"&&o<=k.left+1){$();return}let ee=!1;switch(f){case"top":ee=xh(S,P,V,k.top+1,X,j.bottom-1);break;case"bottom":ee=xh(S,P,V,j.top+1,X,k.bottom-1);break;case"left":ee=xh(S,P,j.right-1,G,k.left+1,K);break;case"right":ee=xh(S,P,k.right-1,G,j.left+1,K);break}if(ee)return;if(m&&!pz(S,P,k)){$();return}if(!F&&x(S,P)){$();return}let Z=!1;switch(f){case"top":{const te=L?Gt/2:Gt*4,J=L||D?o+te:o-te,ne=L?o-te:D?o+te:o-te,U=i+Gt+1,ie=D||L?j.bottom-Gt:j.top,se=D?L?j.bottom-Gt:j.top:j.bottom-Gt;Z=yh(S,P,J,U,ne,U,j.left,ie,j.right,se);break}case"bottom":{const te=L?Gt/2:Gt*4,J=L||D?o+te:o-te,ne=L?o-te:D?o+te:o-te,U=i-Gt,ie=D||L?j.top+Gt:j.bottom,se=D?L?j.top+Gt:j.bottom:j.top+Gt;Z=yh(S,P,J,U,ne,U,j.left,ie,j.right,se);break}case"left":{const te=H?Gt/2:Gt*4,J=H||A?i+te:i-te,ne=H?i-te:A?i+te:i-te,U=o+Gt+1,ie=A||H?j.right-Gt:j.left,se=A?H?j.right-Gt:j.left:j.right-Gt;Z=yh(S,P,ie,j.top,se,j.bottom,U,J,U,ne);break}case"right":{const te=H?Gt/2:Gt*4,J=H||A?i+te:i-te,ne=H?i-te:A?i+te:i-te,U=o-Gt,ie=A||H?j.left+Gt:j.right,se=A?H?j.left+Gt:j.right:j.left+Gt;Z=yh(S,P,U,J,U,ne,ie,j.top,se,j.bottom);break}}Z?m||n.start(40,$):$()}};return r.__options={...e,blockPointerEvents:t},r}function mz(e){const t=h.useRef(""),n=h.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:h.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o?e(o,o.pointerType):e(o,t.current),t.current=""},[e]),onPointerDown:n}}function No(e,t){const n=h.useRef(e),r=Re(t);Ne(()=>{n.current!==e&&r(n.current)},[e,r]),Ne(()=>{n.current=e},[e])}function Ev(e){const[t,n]=h.useState(null),r=Re((s,a)=>{e||n(a||(fv?"touch":""))});No(e,s=>{s&&!e&&n(null)});const{onClick:o,onPointerDown:i}=mz(r);return h.useMemo(()=>({openMethod:t,triggerProps:{onClick:o,onPointerDown:i}}),[t,o,i])}function jA(e){const{store:t,parentContext:n,actionsRef:r,isDrawer:o}=e,i=t.useState("open"),s=t.useState("disablePointerDismissal"),a=t.useState("modal"),l=t.useState("popupElement"),{openMethod:c,triggerProps:d}=Ev(i);bw(t);const{forceUnmount:f}=yw(i,t),m=Re(B=>{const $=je(B);return $.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},$}),g=h.useCallback(()=>{t.setOpen(!1,m(ei))},[t,m]);h.useImperativeHandle(r,()=>({unmount:f,close:g}),[f,g]);const v=ww({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0}),[b,x]=h.useState(0),[y,_]=h.useState(0),w=b===0,T=$A(v),R=Pp(v,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(B){if(!t.context.outsidePressEnabledRef.current||"button"in B&&B.button!==0||"touches"in B&&B.touches.length!==1)return!1;const $=Ht(B);if(w&&!s){const k=$;return a&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===k||t.context.backdropRef.current===k||Xe(k,l)&&!k?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:w});FD(i&&a===!0,l);const{getReferenceProps:S,getFloatingProps:P,getTriggerProps:N}=ka([T,R]);t.useContextCallback("onNestedDialogOpen",(B,$)=>{x(B),_($)}),t.useContextCallback("onNestedDialogClose",()=>{x(0),_(0)}),h.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(b+1,y+(o?1:0)),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[o,i,b,y,n]);const F=h.useMemo(()=>S(d),[S,d]),W=h.useMemo(()=>N(d),[N,d]),I=h.useMemo(()=>P(),[P]);t.useSyncedValues({openMethod:c,activeTriggerProps:F,inactiveTriggerProps:W,popupProps:I,floatingRootContext:v,nestedOpenDialogCount:b,nestedOpenDrawerCount:y})}const wv=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(wv.displayName="DialogRootContext");function ui(e){const t=h.useContext(wv);if(e===!1&&t===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.":gt(27));return t}const hz={...Ew,modal:ye(e=>e.modal),nested:ye(e=>e.nested),nestedOpenDialogCount:ye(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:ye(e=>e.nestedOpenDrawerCount),disablePointerDismissal:ye(e=>e.disablePointerDismissal),openMethod:ye(e=>e.openMethod),descriptionElementId:ye(e=>e.descriptionElementId),titleElementId:ye(e=>e.titleElementId),viewportElement:ye(e=>e.viewportElement),role:ye(e=>e.role)};class Xl extends Tp{constructor(t){super(gz(t),{popupRef:h.createRef(),backdropRef:h.createRef(),internalBackdropRef:h.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new _p,onOpenChange:void 0,onOpenChangeComplete:void 0},hz)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,n);const r={open:t},o=n.trigger?.id??null;(o||t)&&(r.activeTriggerId=o,r.activeTriggerElement=n.trigger??null),this.update(r)};static useStore(t,n){const r=fn(()=>new Xl(n)).current;return t??r}}function gz(e={}){return{...xw(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}const Mg=h.createContext(!1);process.env.NODE_ENV!=="production"&&(Mg.displayName="IsDrawerContext");function qA(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:i,disablePointerDismissal:s=!1,modal:a=!0,actionsRef:l,handle:c,triggerId:d,defaultTriggerId:f=null}=e,m=ui(!0),g=h.useContext(Mg),v=!!m,b=Xl.useStore(c?.store,{open:r,openProp:n,activeTriggerId:f,triggerIdProp:d,modal:a,disablePointerDismissal:s,nested:v});xp(()=>{n===void 0&&b.state.open===!1&&r===!0&&b.update({open:!0,activeTriggerId:f})}),b.useControlledProp("openProp",n),b.useControlledProp("triggerIdProp",d),b.useSyncedValues({disablePointerDismissal:s,nested:v,modal:a}),b.useContextCallback("onOpenChange",o),b.useContextCallback("onOpenChangeComplete",i);const x=b.useState("payload");jA({store:b,actionsRef:l,parentContext:m?.store.context,isDrawer:g});const y=h.useMemo(()=>({store:b}),[b]);return C.jsx(Mg.Provider,{value:!1,children:C.jsx(wv.Provider,{value:y,children:typeof t=="function"?t({payload:x}):t})})}function BA(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:i,actionsRef:s,handle:a,triggerId:l,defaultTriggerId:c=null}=e,d=ui(!0),f=!!d,m=Xl.useStore(a?.store,{open:r,openProp:n,activeTriggerId:c,triggerIdProp:l,modal:!0,disablePointerDismissal:!0,nested:f,role:"alertdialog"});m.useControlledProp("openProp",n),m.useControlledProp("triggerIdProp",l),m.useSyncedValue("nested",f),m.useContextCallback("onOpenChange",o),m.useContextCallback("onOpenChangeComplete",i);const g=m.useState("payload");jA({store:m,actionsRef:s,parentContext:d?.store.context,isDrawer:!1});const v=h.useMemo(()=>({store:m}),[m]);return C.jsx(Mg.Provider,{value:!1,children:C.jsx(wv.Provider,{value:v,children:typeof t=="function"?t({payload:g}):t})})}let Oo=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=tp.startingStyle]="startingStyle",e[e.endingStyle=tp.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),Ig=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const vz={[Ig.popupOpen]:""},bz={[Ig.popupOpen]:"",[Ig.pressed]:""},yz={[Oo.open]:""},xz={[Oo.closed]:""},Ez={[Oo.anchorHidden]:""},Np={open(e){return e?vz:null}},Rw={open(e){return e?bz:null}},br={open(e){return e?yz:xz},anchorHidden(e){return e?Ez:null}},wz={...br,...Hn},Op=h.forwardRef(function(t,n){const{render:r,className:o,style:i,forceRender:s=!1,...a}=t,{store:l}=ui(),c=l.useState("open"),d=l.useState("nested"),f=l.useState("mounted"),m=l.useState("transitionStatus");return $e("div",t,{state:{open:c,transitionStatus:m},ref:[l.context.backdropRef,n],stateAttributesMapping:wz,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},a],enabled:s||!d})});process.env.NODE_ENV!=="production"&&(Op.displayName="DialogBackdrop");let Ux;process.env.NODE_ENV!=="production"&&(Ux=new Set);function Ca(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Ux.has(t)||(Ux.add(t),console.error(`Base UI: ${t}`))}}const VA=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(VA.displayName="CompositeRootContext");function Cz(e=!1){const t=h.useContext(VA);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":gt(16));return t}function Rz(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,s=r&&t!==!1,a=r&&t===!1;return{props:h.useMemo(()=>{const c={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return r||(c.tabIndex=o,!i&&n&&(c.tabIndex=t?o:-1)),(i&&(t||s)||!i&&n)&&(c["aria-disabled"]=n),i&&(!t||a)&&(c.disabled=n),c},[r,n,t,s,a,i,o])}}function Yn(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0,composite:i}=e,s=h.useRef(null),a=Cz(!0),l=i??a!==void 0,{props:c}=Rz({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&h.useEffect(()=>{if(!s.current)return;const g=Eh(s.current);if(o){if(!g){const v=Bl.captureOwnerStack?.()||"";Ca(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${v}`)}}else if(g){const v=Bl.captureOwnerStack?.()||"";Ca(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${v}`)}},[o]);const d=h.useCallback(()=>{const g=s.current;Eh(g)&&l&&t&&c.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,c.disabled,l]);Ne(d,[d]);const f=h.useCallback((g={})=>{const{onClick:v,onMouseDown:b,onKeyUp:x,onKeyDown:y,onPointerDown:_,...w}=g;return Kr({type:o?"button":void 0,onClick(R){if(t){R.preventDefault();return}v?.(R)},onMouseDown(R){t||b?.(R)},onKeyDown(R){if(t||(Pg(R),y?.(R),R.baseUIHandlerPrevented))return;const S=R.target===R.currentTarget,P=R.currentTarget,N=Eh(P),F=!o&&Sz(P),W=S&&(o?N:!F),I=R.key==="Enter",B=R.key===" ",$=P.getAttribute("role"),k=$?.startsWith("menuitem")||$==="option"||$==="gridcell";if(S&&l&&B){if(R.defaultPrevented&&k)return;R.preventDefault(),F||o&&N?(P.click(),R.preventBaseUIHandler()):W&&(v?.(R),R.preventBaseUIHandler());return}W&&(!o&&(B||I)&&R.preventDefault(),!o&&I&&v?.(R))},onKeyUp(R){if(!t){if(Pg(R),x?.(R),R.target===R.currentTarget&&o&&l&&Eh(R.currentTarget)&&R.key===" "){R.preventDefault();return}R.baseUIHandlerPrevented||R.target===R.currentTarget&&!o&&!l&&R.key===" "&&v?.(R)}},onPointerDown(R){if(t){R.preventDefault();return}_?.(R)}},o?void 0:{role:"button"},c,w)},[t,c,l,o]),m=Re(g=>{s.current=g,d()});return{getButtonProps:f,buttonRef:m}}function Eh(e){return Zt(e)&&e.tagName==="BUTTON"}function Sz(e){return!!(e?.tagName==="A"&&e?.href)}const Zl=h.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:s=!0,style:a,...l}=t,{store:c}=ui(),d=c.useState("open");function f(b){d&&c.setOpen(!1,je(JE,b.nativeEvent))}const{getButtonProps:m,buttonRef:g}=Yn({disabled:i,native:s});return $e("button",t,{state:{disabled:i},ref:[n,g],props:[{onClick:f},l,m]})});process.env.NODE_ENV!=="production"&&(Zl.displayName="DialogClose");function bn(e){return Vs(e,"base-ui")}const Mp=h.forwardRef(function(t,n){const{render:r,className:o,style:i,id:s,...a}=t,{store:l}=ui(),c=bn(s);return l.useSyncedValueWithCleanup("descriptionElementId",c),$e("p",t,{ref:n,props:[{id:c},a]})});process.env.NODE_ENV!=="production"&&(Mp.displayName="DialogDescription");let Pz=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),Tz=(function(e){return e[e.open=Oo.open]="open",e[e.closed=Oo.closed]="closed",e[e.startingStyle=Oo.startingStyle]="startingStyle",e[e.endingStyle=Oo.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const Sw=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(Sw.displayName="DialogPortalContext");function WA(){const e=h.useContext(Sw);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Dialog.Portal> is missing.":gt(26));return e}const HA="ArrowUp",KA="ArrowDown",UA="ArrowLeft",zA="ArrowRight",GA="Home",YA="End",_z=new Set([UA,zA]),Nz=new Set([HA,KA]),Oz=new Set([..._z,...Nz]);[...Oz];const Pw=new Set([HA,KA,UA,zA,GA,YA]),Mz={...br,...Hn,nestedDialogOpen(e){return e?{[Tz.nestedDialogOpen]:""}:null}},Ip=h.forwardRef(function(t,n){const{className:r,finalFocus:o,initialFocus:i,render:s,style:a,...l}=t,{store:c}=ui(),d=c.useState("descriptionElementId"),f=c.useState("disablePointerDismissal"),m=c.useState("floatingRootContext"),g=c.useState("popupProps"),v=c.useState("modal"),b=c.useState("mounted"),x=c.useState("nested"),y=c.useState("nestedOpenDialogCount"),_=c.useState("open"),w=c.useState("openMethod"),T=c.useState("titleElementId"),R=c.useState("transitionStatus"),S=c.useState("role");WA(),sr({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});function P(B){return B==="touch"?c.context.popupRef.current:!0}const N=i===void 0?P:i,F=y>0,I=$e("div",t,{state:{open:_,nested:x,transitionStatus:R,nestedDialogOpen:F},props:[g,{"aria-labelledby":T??void 0,"aria-describedby":d??void 0,role:S,tabIndex:-1,hidden:!b,onKeyDown(B){Pw.has(B.key)&&B.stopPropagation()},style:{[Pz.nestedDialogs]:y}},l],ref:[n,c.context.popupRef,c.useStateSetter("popupElement")],stateAttributesMapping:Mz});return C.jsx(gv,{context:m,openInteractionType:w,disabled:!b,closeOnFocusOut:!f,initialFocus:N,returnFocus:o,modal:v!==!1,restoreFocus:"popup",children:I})});process.env.NODE_ENV!=="production"&&(Ip.displayName="DialogPopup");function Jl(e){return sw(19)?e:e?"true":void 0}const Dp=h.forwardRef(function(t,n){const{cutout:r,...o}=t;let i;if(r){const s=r.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${s.left}px ${s.top}px,${s.left}px ${s.bottom}px,${s.right}px ${s.bottom}px,${s.right}px ${s.top}px,${s.left}px ${s.top}px)`}return C.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})});process.env.NODE_ENV!=="production"&&(Dp.displayName="InternalBackdrop");const Ap=h.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:i}=ui(),s=i.useState("mounted"),a=i.useState("modal"),l=i.useState("open");return s||r?C.jsx(Sw.Provider,{value:r,children:C.jsxs(Rp,{ref:n,...o,children:[s&&a===!0&&C.jsx(Dp,{ref:i.context.internalBackdropRef,inert:Jl(!l)}),t.children]})}):null});process.env.NODE_ENV!=="production"&&(Ap.displayName="DialogPortal");const kp=h.forwardRef(function(t,n){const{render:r,className:o,style:i,id:s,...a}=t,{store:l}=ui(),c=bn(s);return l.useSyncedValueWithCleanup("titleElementId",c),$e("h2",t,{ref:n,props:[{id:c},a]})});process.env.NODE_ENV!=="production"&&(kp.displayName="DialogTitle");const $p=h.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:s=!0,id:a,payload:l,handle:c,style:d,...f}=t,m=ui(!0),g=c?.store??m?.store;if(!g)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.":gt(79));const v=bn(a),b=g.useState("floatingRootContext"),x=g.useState("isOpenedByTrigger",v),y=h.useRef(null),{registerTrigger:_,isMountedByThisTrigger:w}=vw(v,y,g,{payload:l}),{getButtonProps:T,buttonRef:R}=Yn({disabled:i,native:s}),S=Sp(b,{enabled:b!=null}),P=ka([S]),N={disabled:i,open:x},F=g.useState("triggerProps",w);return $e("button",t,{state:N,ref:[R,n,_,y],props:[P.getReferenceProps(),F,{[XE]:"",id:v},f,T],stateAttributesMapping:Np})});process.env.NODE_ENV!=="production"&&($p.displayName="DialogTrigger");let kT=(function(e){return e[e.open=Oo.open]="open",e[e.closed=Oo.closed]="closed",e[e.startingStyle=Oo.startingStyle]="startingStyle",e[e.endingStyle=Oo.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const Iz={...br,...Hn,nested(e){return e?{[kT.nested]:""}:null},nestedDialogOpen(e){return e?{[kT.nestedDialogOpen]:""}:null}},Fp=h.forwardRef(function(t,n){const{className:r,render:o,children:i,style:s,...a}=t,l=WA(),{store:c}=ui(),d=c.useState("open"),f=c.useState("nested"),m=c.useState("transitionStatus"),g=c.useState("nestedOpenDialogCount"),v=c.useState("mounted"),b=g>0;return $e("div",t,{enabled:l||v,state:{open:d,nested:f,transitionStatus:m,nestedDialogOpen:b},ref:[n,c.useStateSetter("viewportElement")],stateAttributesMapping:Iz,props:[{role:"presentation",hidden:!v,style:{pointerEvents:d?void 0:"none"},children:i},a]})});process.env.NODE_ENV!=="production"&&(Fp.displayName="DialogViewport");class Cv{constructor(t){this.store=t??new Xl}open(t){const n=t?this.store.context.triggerElements.getById(t):void 0;process.env.NODE_ENV!=="production"&&t&&!n&&console.warn(`Base UI: DialogHandle.open: No trigger found with id "${t}". The dialog will open, but the trigger will not be associated with the dialog.`),this.store.setOpen(!0,je(ei,void 0,n))}openWithPayload(t){this.store.set("payload",t),this.store.setOpen(!0,je(ei,void 0,void 0))}close(){this.store.setOpen(!1,je(ei,void 0,void 0))}get isOpen(){return this.store.state.open}}function Dz(){return new Cv}function Az(){return new Cv(new Xl({modal:!0,disablePointerDismissal:!0,role:"alertdialog"}))}const kz=Object.freeze(Object.defineProperty({__proto__:null,Backdrop:Op,Close:Zl,Description:Mp,Handle:Cv,Popup:Ip,Portal:Ap,Root:BA,Title:kp,Trigger:$p,Viewport:Fp,createHandle:Az},Symbol.toStringTag,{value:"Module"}));function XA(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=XA(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Tw(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=XA(e))&&(r&&(r+=" "),r+=t);return r}const $z=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Fz=(e,t)=>({classGroupId:e,validator:t}),ZA=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Dg="-",$T=[],Lz="arbitrary..",jz=e=>{const t=Bz(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return qz(s);const a=s.split(Dg),l=a[0]===""&&a.length>1?1:0;return JA(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=r[s],c=n[s];return l?c?$z(c,l):l:c||$T}return n[s]||$T}}},JA=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=JA(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(Dg):e.slice(t).join(Dg),l=s.length;for(let c=0;c<l;c++){const d=s[c];if(d.validator(a))return d.classGroupId}},qz=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Lz+r:void 0})(),Bz=e=>{const{theme:t,classGroups:n}=e;return Vz(n,t)},Vz=(e,t)=>{const n=ZA();for(const r in e){const o=e[r];_w(o,n,r,t)}return n},_w=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Wz(s,t,n,r)}},Wz=(e,t,n,r)=>{if(typeof e=="string"){Hz(e,t,n);return}if(typeof e=="function"){Kz(e,t,n,r);return}Uz(e,t,n,r)},Hz=(e,t,n)=>{const r=e===""?t:QA(t,e);r.classGroupId=n},Kz=(e,t,n,r)=>{if(zz(e)){_w(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Fz(n,e))},Uz=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];_w(l,QA(t,a),n,r)}},QA=(e,t)=>{let n=e;const r=t.split(Dg),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=ZA(),n.nextPart.set(s,a)),n=a}return n},zz=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Gz=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},zx="!",FT=":",Yz=[],LT=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Xz=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,c;const d=o.length;for(let b=0;b<d;b++){const x=o[b];if(s===0&&a===0){if(x===FT){i.push(o.slice(l,b)),l=b+1;continue}if(x==="/"){c=b;continue}}x==="["?s++:x==="]"?s--:x==="("?a++:x===")"&&a--}const f=i.length===0?o:o.slice(l);let m=f,g=!1;f.endsWith(zx)?(m=f.slice(0,-1),g=!0):f.startsWith(zx)&&(m=f.slice(1),g=!0);const v=c&&c>l?c-l:void 0;return LT(i,g,m,v)};if(t){const o=t+FT,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):LT(Yz,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Zz=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},Jz=e=>({cache:Gz(e.cacheSize),parseClassName:Xz(e),sortModifiers:Zz(e),...jz(e)}),Qz=/\s+/,eG=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(Qz);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:f,modifiers:m,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:b}=n(d);if(f){l=d+(l.length>0?" "+l:l);continue}let x=!!b,y=r(x?v.substring(0,b):v);if(!y){if(!x){l=d+(l.length>0?" "+l:l);continue}if(y=r(v),!y){l=d+(l.length>0?" "+l:l);continue}x=!1}const _=m.length===0?"":m.length===1?m[0]:i(m).join(":"),w=g?_+zx:_,T=w+y;if(s.indexOf(T)>-1)continue;s.push(T);const R=o(y,x);for(let S=0;S<R.length;++S){const P=R[S];s.push(w+P)}l=d+(l.length>0?" "+l:l)}return l},tG=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=ek(n))&&(o&&(o+=" "),o+=r);return o},ek=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ek(e[r]))&&(n&&(n+=" "),n+=t);return n},Gx=(e,...t)=>{let n,r,o,i;const s=l=>{const c=t.reduce((d,f)=>f(d),e());return n=Jz(c),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const c=r(l);if(c)return c;const d=eG(l,n);return o(l,d),d};return i=s,(...l)=>i(tG(...l))},nG=[],qn=e=>{const t=n=>n[e]||nG;return t.isThemeGetter=!0,t},tk=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nk=/^\((?:(\w[\w-]*):)?(.+)\)$/i,rG=/^\d+\/\d+$/,oG=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,iG=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,sG=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,aG=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lG=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,dl=e=>rG.test(e),Tt=e=>!!e&&!Number.isNaN(Number(e)),cs=e=>!!e&&Number.isInteger(Number(e)),Fy=e=>e.endsWith("%")&&Tt(e.slice(0,-1)),Ti=e=>oG.test(e),uG=()=>!0,cG=e=>iG.test(e)&&!sG.test(e),rk=()=>!1,dG=e=>aG.test(e),fG=e=>lG.test(e),pG=e=>!Qe(e)&&!et(e),mG=e=>Ql(e,sk,rk),Qe=e=>tk.test(e),ua=e=>Ql(e,ak,cG),Ly=e=>Ql(e,yG,Tt),jT=e=>Ql(e,ok,rk),hG=e=>Ql(e,ik,fG),wh=e=>Ql(e,lk,dG),et=e=>nk.test(e),Hu=e=>eu(e,ak),gG=e=>eu(e,xG),qT=e=>eu(e,ok),vG=e=>eu(e,sk),bG=e=>eu(e,ik),Ch=e=>eu(e,lk,!0),Ql=(e,t,n)=>{const r=tk.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},eu=(e,t,n=!1)=>{const r=nk.exec(e);return r?r[1]?t(r[1]):n:!1},ok=e=>e==="position"||e==="percentage",ik=e=>e==="image"||e==="url",sk=e=>e==="length"||e==="size"||e==="bg-size",ak=e=>e==="length",yG=e=>e==="number",xG=e=>e==="family-name",lk=e=>e==="shadow",Yx=()=>{const e=qn("color"),t=qn("font"),n=qn("text"),r=qn("font-weight"),o=qn("tracking"),i=qn("leading"),s=qn("breakpoint"),a=qn("container"),l=qn("spacing"),c=qn("radius"),d=qn("shadow"),f=qn("inset-shadow"),m=qn("text-shadow"),g=qn("drop-shadow"),v=qn("blur"),b=qn("perspective"),x=qn("aspect"),y=qn("ease"),_=qn("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...T(),et,Qe],S=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],N=()=>[et,Qe,l],F=()=>[dl,"full","auto",...N()],W=()=>[cs,"none","subgrid",et,Qe],I=()=>["auto",{span:["full",cs,et,Qe]},cs,et,Qe],B=()=>[cs,"auto",et,Qe],$=()=>["auto","min","max","fr",et,Qe],k=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],j=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...N()],A=()=>[dl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],L=()=>[e,et,Qe],H=()=>[...T(),qT,jT,{position:[et,Qe]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",vG,mG,{size:[et,Qe]}],K=()=>[Fy,Hu,ua],G=()=>["","none","full",c,et,Qe],ee=()=>["",Tt,Hu,ua],Z=()=>["solid","dashed","dotted","double"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>[Tt,Fy,qT,jT],ne=()=>["","none",v,et,Qe],U=()=>["none",Tt,et,Qe],ie=()=>["none",Tt,et,Qe],se=()=>[Tt,et,Qe],Q=()=>[dl,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ti],breakpoint:[Ti],color:[uG],container:[Ti],"drop-shadow":[Ti],ease:["in","out","in-out"],font:[pG],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ti],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ti],shadow:[Ti],spacing:["px",Tt],text:[Ti],"text-shadow":[Ti],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",dl,Qe,et,x]}],container:["container"],columns:[{columns:[Tt,Qe,et,a]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:R()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{start:F()}],end:[{end:F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[cs,"auto",et,Qe]}],basis:[{basis:[dl,"full","auto",a,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Tt,dl,"auto","initial","none",Qe]}],grow:[{grow:["",Tt,et,Qe]}],shrink:[{shrink:["",Tt,et,Qe]}],order:[{order:[cs,"first","last","none",et,Qe]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...k(),"normal"]}],"justify-items":[{"justify-items":[...j(),"normal"]}],"justify-self":[{"justify-self":["auto",...j()]}],"align-content":[{content:["normal",...k()]}],"align-items":[{items:[...j(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...j(),{baseline:["","last"]}]}],"place-content":[{"place-content":k()}],"place-items":[{"place-items":[...j(),"baseline"]}],"place-self":[{"place-self":["auto",...j()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:A()}],w:[{w:[a,"screen",...A()]}],"min-w":[{"min-w":[a,"screen","none",...A()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...A()]}],h:[{h:["screen","lh",...A()]}],"min-h":[{"min-h":["screen","lh","none",...A()]}],"max-h":[{"max-h":["screen","lh",...A()]}],"font-size":[{text:["base",n,Hu,ua]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,et,Ly]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Fy,Qe]}],"font-family":[{font:[gG,Qe,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,et,Qe]}],"line-clamp":[{"line-clamp":[Tt,"none",et,Ly]}],leading:[{leading:[i,...N()]}],"list-image":[{"list-image":["none",et,Qe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",et,Qe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[Tt,"from-font","auto",et,ua]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Tt,"auto",et,Qe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",et,Qe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",et,Qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},cs,et,Qe],radial:["",et,Qe],conic:[cs,et,Qe]},bG,hG]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Tt,et,Qe]}],"outline-w":[{outline:["",Tt,Hu,ua]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",d,Ch,wh]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",f,Ch,wh]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Tt,ua]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",m,Ch,wh]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Tt,et,Qe]}],"mix-blend":[{"mix-blend":[...te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":te()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Tt]}],"mask-image-linear-from-pos":[{"mask-linear-from":J()}],"mask-image-linear-to-pos":[{"mask-linear-to":J()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":J()}],"mask-image-t-to-pos":[{"mask-t-to":J()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":J()}],"mask-image-r-to-pos":[{"mask-r-to":J()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":J()}],"mask-image-b-to-pos":[{"mask-b-to":J()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":J()}],"mask-image-l-to-pos":[{"mask-l-to":J()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":J()}],"mask-image-x-to-pos":[{"mask-x-to":J()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":J()}],"mask-image-y-to-pos":[{"mask-y-to":J()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[et,Qe]}],"mask-image-radial-from-pos":[{"mask-radial-from":J()}],"mask-image-radial-to-pos":[{"mask-radial-to":J()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[Tt]}],"mask-image-conic-from-pos":[{"mask-conic-from":J()}],"mask-image-conic-to-pos":[{"mask-conic-to":J()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",et,Qe]}],filter:[{filter:["","none",et,Qe]}],blur:[{blur:ne()}],brightness:[{brightness:[Tt,et,Qe]}],contrast:[{contrast:[Tt,et,Qe]}],"drop-shadow":[{"drop-shadow":["","none",g,Ch,wh]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Tt,et,Qe]}],"hue-rotate":[{"hue-rotate":[Tt,et,Qe]}],invert:[{invert:["",Tt,et,Qe]}],saturate:[{saturate:[Tt,et,Qe]}],sepia:[{sepia:["",Tt,et,Qe]}],"backdrop-filter":[{"backdrop-filter":["","none",et,Qe]}],"backdrop-blur":[{"backdrop-blur":ne()}],"backdrop-brightness":[{"backdrop-brightness":[Tt,et,Qe]}],"backdrop-contrast":[{"backdrop-contrast":[Tt,et,Qe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Tt,et,Qe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Tt,et,Qe]}],"backdrop-invert":[{"backdrop-invert":["",Tt,et,Qe]}],"backdrop-opacity":[{"backdrop-opacity":[Tt,et,Qe]}],"backdrop-saturate":[{"backdrop-saturate":[Tt,et,Qe]}],"backdrop-sepia":[{"backdrop-sepia":["",Tt,et,Qe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",et,Qe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Tt,"initial",et,Qe]}],ease:[{ease:["linear","initial",y,et,Qe]}],delay:[{delay:[Tt,et,Qe]}],animate:[{animate:["none",_,et,Qe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,et,Qe]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:U()}],"rotate-x":[{"rotate-x":U()}],"rotate-y":[{"rotate-y":U()}],"rotate-z":[{"rotate-z":U()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[et,Qe,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Q()}],"translate-x":[{"translate-x":Q()}],"translate-y":[{"translate-y":Q()}],"translate-z":[{"translate-z":Q()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",et,Qe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",et,Qe]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Tt,Hu,ua,Ly]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},EG=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:o={},override:i={}})=>(jf(e,"cacheSize",t),jf(e,"prefix",n),jf(e,"experimentalParseClassName",r),Rh(e.theme,i.theme),Rh(e.classGroups,i.classGroups),Rh(e.conflictingClassGroups,i.conflictingClassGroups),Rh(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),jf(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),Sh(e.theme,o.theme),Sh(e.classGroups,o.classGroups),Sh(e.conflictingClassGroups,o.conflictingClassGroups),Sh(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),uk(e,o,"orderSensitiveModifiers"),e),jf=(e,t,n)=>{n!==void 0&&(e[t]=n)},Rh=(e,t)=>{if(t)for(const n in t)jf(e,n,t[n])},Sh=(e,t)=>{if(t)for(const n in t)uk(e,t,n)},uk=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},ck=(e,...t)=>typeof e=="function"?Gx(Yx,e,...t):Gx(()=>EG(Yx(),e),...t),wG=Gx(Yx),dk=ck({});function ue(...e){return dk(Tw(e))}const fk={},pk=M.createContext({theme:fk}),mk=()=>M.useContext(pk),CG=({children:e,theme:t=fk})=>C.jsx(pk.Provider,{value:{theme:t},children:e}),hk=(e,t,n={})=>{const{theme:r}=mk(),o=r[e]||{};return{...n,...o,...t}},BT=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,VT=Tw,Hs=(e,t)=>n=>{var r;if(t?.variants==null)return VT(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const d=n?.[c],f=i?.[c];if(d===null)return null;const m=BT(d)||BT(f);return o[c][m]}),a=n&&Object.entries(n).reduce((c,d)=>{let[f,m]=d;return m===void 0||(c[f]=m),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:f,className:m,...g}=d;return Object.entries(g).every(v=>{let[b,x]=v;return Array.isArray(x)?x.includes({...i,...a}[b]):{...i,...a}[b]===x})?[...c,f,m]:c},[]);return VT(e,s,l,n?.class,n?.className)},gk=Hs(["inline-flex items-center justify-center gap-2","text-sm font-medium transition-all","ring-offset-background","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","hover:brightness-105"],{variants:{variant:{default:"bg-primary text-primary-foreground",error:"bg-error text-error-foreground",success:"bg-success text-success-foreground",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:brightness-100 hover:bg-secondary/80",ghost:"hover:bg-accent hover:brightness-100 hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"w-10 aspect-square"},shape:{rounded:"rounded-md",square:"rounded-none",circle:"rounded-full"}},defaultVariants:{variant:"default",size:"default",shape:"rounded"}});function WT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function kn(...e){return t=>{let n=!1;const r=e.map(o=>{const i=WT(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():WT(e[o],null)}}}}function Nn(...e){return h.useCallback(kn(...e),e)}var RG=Symbol.for("react.lazy"),Ag=h[" use ".trim().toString()];function SG(e){return typeof e=="object"&&e!==null&&"then"in e}function vk(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===RG&&"_payload"in e&&SG(e._payload)}function PG(e){const t=TG(e),n=h.forwardRef((r,o)=>{let{children:i,...s}=r;vk(i)&&typeof Ag=="function"&&(i=Ag(i._payload));const a=h.Children.toArray(i),l=a.find(OG);if(l){const c=l.props.children,d=a.map(f=>f===l?h.Children.count(c)>1?h.Children.only(null):h.isValidElement(c)?c.props.children:null:f);return C.jsx(t,{...s,ref:o,children:h.isValidElement(c)?h.cloneElement(c,void 0,d):null})}return C.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var Nw=PG("Slot");function TG(e){const t=h.forwardRef((n,r)=>{let{children:o,...i}=n;if(vk(o)&&typeof Ag=="function"&&(o=Ag(o._payload)),h.isValidElement(o)){const s=IG(o),a=MG(i,o.props);return o.type!==h.Fragment&&(a.ref=r?kn(r,s):s),h.cloneElement(o,a)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var bk=Symbol("radix.slottable");function _G(e){const t=({children:n})=>C.jsx(C.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=bk,t}var NG=_G("Slottable");function OG(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bk}function MG(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function IG(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Do=globalThis?.document?h.useLayoutEffect:()=>{},DG=h[" useInsertionEffect ".trim().toString()]||Do;function vr({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=AG({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const d=h.useRef(e!==void 0);h.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const c=h.useCallback(d=>{if(a){const f=kG(d)?d(e):d;f!==e&&s.current?.(f)}else i(d)},[a,e,i,s]);return[l,c]}function AG({defaultProp:e,onChange:t}){const[n,r]=h.useState(e),o=h.useRef(n),i=h.useRef(t);return DG(()=>{i.current=t},[t]),h.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function kG(e){return typeof e=="function"}const $G=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),FG=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),HT=e=>{const t=FG(e);return t.charAt(0).toUpperCase()+t.slice(1)},yk=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),LG=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var jG={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const qG=M.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>M.createElement("svg",{ref:l,...jG,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:yk("lucide",o),...!i&&!LG(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,d])=>M.createElement(c,d)),...Array.isArray(i)?i:[i]]));const xn=(e,t)=>{const n=M.forwardRef(({className:r,...o},i)=>M.createElement(qG,{ref:i,iconNode:t,className:yk(`lucide-${$G(HT(e))}`,`lucide-${e}`,r),...o}));return n.displayName=HT(e),n};const BG=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],xk=xn("calendar",BG);const VG=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Xx=xn("check",VG);const WG=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ek=xn("chevron-down",WG);const HG=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ow=xn("chevron-left",HG);const KG=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Lp=xn("chevron-right",KG);const UG=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],wk=xn("chevron-up",UG);const zG=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],GG=xn("chevrons-left",zG);const YG=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],XG=xn("chevrons-right",YG);const ZG=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Ra=xn("chevrons-up-down",ZG);const JG=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],QG=xn("circle-check",JG);const eY=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],tY=xn("circle-x",eY);const nY=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],rY=xn("circle",nY);const oY=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],iY=xn("cloud-upload",oY);const sY=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],aY=xn("eye-off",sY);const lY=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],uY=xn("eye",lY);const cY=[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]],dY=xn("folder-search",cY);const fY=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Ck=xn("info",fY);const pY=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Zx=xn("loader-circle",pY);const mY=[["path",{d:"M5 12h14",key:"1ays0h"}]],hY=xn("minus",mY);const gY=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],vY=xn("plus",gY);const bY=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],yY=xn("search",bY);const xY=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],EY=xn("triangle-alert",xY);const wY=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],$a=xn("x",wY);function kg(){return kg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kg.apply(null,arguments)}function Rk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Jx(e,t){return Jx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Jx(e,t)}function Sk(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Jx(e,t)}var Ph={exports:{}},Th={exports:{}},Bt={};var KT;function CY(){if(KT)return Bt;KT=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function w(R){if(typeof R=="object"&&R!==null){var S=R.$$typeof;switch(S){case t:switch(R=R.type,R){case l:case c:case r:case i:case o:case f:return R;default:switch(R=R&&R.$$typeof,R){case a:case d:case v:case g:case s:return R;default:return S}}case n:return S}}}function T(R){return w(R)===c}return Bt.AsyncMode=l,Bt.ConcurrentMode=c,Bt.ContextConsumer=a,Bt.ContextProvider=s,Bt.Element=t,Bt.ForwardRef=d,Bt.Fragment=r,Bt.Lazy=v,Bt.Memo=g,Bt.Portal=n,Bt.Profiler=i,Bt.StrictMode=o,Bt.Suspense=f,Bt.isAsyncMode=function(R){return T(R)||w(R)===l},Bt.isConcurrentMode=T,Bt.isContextConsumer=function(R){return w(R)===a},Bt.isContextProvider=function(R){return w(R)===s},Bt.isElement=function(R){return typeof R=="object"&&R!==null&&R.$$typeof===t},Bt.isForwardRef=function(R){return w(R)===d},Bt.isFragment=function(R){return w(R)===r},Bt.isLazy=function(R){return w(R)===v},Bt.isMemo=function(R){return w(R)===g},Bt.isPortal=function(R){return w(R)===n},Bt.isProfiler=function(R){return w(R)===i},Bt.isStrictMode=function(R){return w(R)===o},Bt.isSuspense=function(R){return w(R)===f},Bt.isValidElementType=function(R){return typeof R=="string"||typeof R=="function"||R===r||R===c||R===i||R===o||R===f||R===m||typeof R=="object"&&R!==null&&(R.$$typeof===v||R.$$typeof===g||R.$$typeof===s||R.$$typeof===a||R.$$typeof===d||R.$$typeof===x||R.$$typeof===y||R.$$typeof===_||R.$$typeof===b)},Bt.typeOf=w,Bt}var Vt={};var UT;function RY(){return UT||(UT=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function w(Q){return typeof Q=="string"||typeof Q=="function"||Q===r||Q===c||Q===i||Q===o||Q===f||Q===m||typeof Q=="object"&&Q!==null&&(Q.$$typeof===v||Q.$$typeof===g||Q.$$typeof===s||Q.$$typeof===a||Q.$$typeof===d||Q.$$typeof===x||Q.$$typeof===y||Q.$$typeof===_||Q.$$typeof===b)}function T(Q){if(typeof Q=="object"&&Q!==null){var me=Q.$$typeof;switch(me){case t:var ve=Q.type;switch(ve){case l:case c:case r:case i:case o:case f:return ve;default:var xe=ve&&ve.$$typeof;switch(xe){case a:case d:case v:case g:case s:return xe;default:return me}}case n:return me}}}var R=l,S=c,P=a,N=s,F=t,W=d,I=r,B=v,$=g,k=n,j=i,D=o,A=f,L=!1;function H(Q){return L||(L=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),V(Q)||T(Q)===l}function V(Q){return T(Q)===c}function X(Q){return T(Q)===a}function K(Q){return T(Q)===s}function G(Q){return typeof Q=="object"&&Q!==null&&Q.$$typeof===t}function ee(Q){return T(Q)===d}function Z(Q){return T(Q)===r}function te(Q){return T(Q)===v}function J(Q){return T(Q)===g}function ne(Q){return T(Q)===n}function U(Q){return T(Q)===i}function ie(Q){return T(Q)===o}function se(Q){return T(Q)===f}Vt.AsyncMode=R,Vt.ConcurrentMode=S,Vt.ContextConsumer=P,Vt.ContextProvider=N,Vt.Element=F,Vt.ForwardRef=W,Vt.Fragment=I,Vt.Lazy=B,Vt.Memo=$,Vt.Portal=k,Vt.Profiler=j,Vt.StrictMode=D,Vt.Suspense=A,Vt.isAsyncMode=H,Vt.isConcurrentMode=V,Vt.isContextConsumer=X,Vt.isContextProvider=K,Vt.isElement=G,Vt.isForwardRef=ee,Vt.isFragment=Z,Vt.isLazy=te,Vt.isMemo=J,Vt.isPortal=ne,Vt.isProfiler=U,Vt.isStrictMode=ie,Vt.isSuspense=se,Vt.isValidElementType=w,Vt.typeOf=T})()),Vt}var zT;function Pk(){return zT||(zT=1,process.env.NODE_ENV==="production"?Th.exports=CY():Th.exports=RY()),Th.exports}var jy,GT;function SY(){if(GT)return jy;GT=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(d){c[d]=d}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return jy=o()?Object.assign:function(i,s){for(var a,l=r(i),c,d=1;d<arguments.length;d++){a=Object(arguments[d]);for(var f in a)t.call(a,f)&&(l[f]=a[f]);if(e){c=e(a);for(var m=0;m<c.length;m++)n.call(a,c[m])&&(l[c[m]]=a[c[m]])}}return l},jy}var qy,YT;function Mw(){if(YT)return qy;YT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return qy=e,qy}var By,XT;function Tk(){return XT||(XT=1,By=Function.call.bind(Object.prototype.hasOwnProperty)),By}var Vy,ZT;function PY(){if(ZT)return Vy;ZT=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Mw(),n={},r=Tk();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var d in i)if(r(i,d)){var f;try{if(typeof i[d]!="function"){var m=Error((l||"React class")+": "+a+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}f=i[d](s,d,l,a,null,t)}catch(v){f=v}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var g=c?c():"";e("Failed "+a+" type: "+f.message+(g??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Vy=o,Vy}var Wy,JT;function TY(){if(JT)return Wy;JT=1;var e=Pk(),t=SY(),n=Mw(),r=Tk(),o=PY(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Wy=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(V){var X=V&&(c&&V[c]||V[d]);if(typeof X=="function")return X}var m="<<anonymous>>",g={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:_(),arrayOf:w,element:T(),elementType:R(),instanceOf:S,node:W(),objectOf:N,oneOf:P,oneOfType:F,shape:B,exact:$};function v(V,X){return V===X?V!==0||1/V===1/X:V!==V&&X!==X}function b(V,X){this.message=V,this.data=X&&typeof X=="object"?X:{},this.stack=""}b.prototype=Error.prototype;function x(V){if(process.env.NODE_ENV!=="production")var X={},K=0;function G(Z,te,J,ne,U,ie,se){if(ne=ne||m,ie=ie||J,se!==n){if(l){var Q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Q.name="Invariant Violation",Q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var me=ne+":"+J;!X[me]&&K<3&&(i("You are manually calling a React.PropTypes validation function for the `"+ie+"` prop on `"+ne+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),X[me]=!0,K++)}}return te[J]==null?Z?te[J]===null?new b("The "+U+" `"+ie+"` is marked as required "+("in `"+ne+"`, but its value is `null`.")):new b("The "+U+" `"+ie+"` is marked as required in "+("`"+ne+"`, but its value is `undefined`.")):null:V(te,J,ne,U,ie)}var ee=G.bind(null,!1);return ee.isRequired=G.bind(null,!0),ee}function y(V){function X(K,G,ee,Z,te,J){var ne=K[G],U=D(ne);if(U!==V){var ie=A(ne);return new b("Invalid "+Z+" `"+te+"` of type "+("`"+ie+"` supplied to `"+ee+"`, expected ")+("`"+V+"`."),{expectedType:V})}return null}return x(X)}function _(){return x(s)}function w(V){function X(K,G,ee,Z,te){if(typeof V!="function")return new b("Property `"+te+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var J=K[G];if(!Array.isArray(J)){var ne=D(J);return new b("Invalid "+Z+" `"+te+"` of type "+("`"+ne+"` supplied to `"+ee+"`, expected an array."))}for(var U=0;U<J.length;U++){var ie=V(J,U,ee,Z,te+"["+U+"]",n);if(ie instanceof Error)return ie}return null}return x(X)}function T(){function V(X,K,G,ee,Z){var te=X[K];if(!a(te)){var J=D(te);return new b("Invalid "+ee+" `"+Z+"` of type "+("`"+J+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return x(V)}function R(){function V(X,K,G,ee,Z){var te=X[K];if(!e.isValidElementType(te)){var J=D(te);return new b("Invalid "+ee+" `"+Z+"` of type "+("`"+J+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return x(V)}function S(V){function X(K,G,ee,Z,te){if(!(K[G]instanceof V)){var J=V.name||m,ne=H(K[G]);return new b("Invalid "+Z+" `"+te+"` of type "+("`"+ne+"` supplied to `"+ee+"`, expected ")+("instance of `"+J+"`."))}return null}return x(X)}function P(V){if(!Array.isArray(V))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function X(K,G,ee,Z,te){for(var J=K[G],ne=0;ne<V.length;ne++)if(v(J,V[ne]))return null;var U=JSON.stringify(V,function(se,Q){var me=A(Q);return me==="symbol"?String(Q):Q});return new b("Invalid "+Z+" `"+te+"` of value `"+String(J)+"` "+("supplied to `"+ee+"`, expected one of "+U+"."))}return x(X)}function N(V){function X(K,G,ee,Z,te){if(typeof V!="function")return new b("Property `"+te+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var J=K[G],ne=D(J);if(ne!=="object")return new b("Invalid "+Z+" `"+te+"` of type "+("`"+ne+"` supplied to `"+ee+"`, expected an object."));for(var U in J)if(r(J,U)){var ie=V(J,U,ee,Z,te+"."+U,n);if(ie instanceof Error)return ie}return null}return x(X)}function F(V){if(!Array.isArray(V))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var X=0;X<V.length;X++){var K=V[X];if(typeof K!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+L(K)+" at index "+X+"."),s}function G(ee,Z,te,J,ne){for(var U=[],ie=0;ie<V.length;ie++){var se=V[ie],Q=se(ee,Z,te,J,ne,n);if(Q==null)return null;Q.data&&r(Q.data,"expectedType")&&U.push(Q.data.expectedType)}var me=U.length>0?", expected one of type ["+U.join(", ")+"]":"";return new b("Invalid "+J+" `"+ne+"` supplied to "+("`"+te+"`"+me+"."))}return x(G)}function W(){function V(X,K,G,ee,Z){return k(X[K])?null:new b("Invalid "+ee+" `"+Z+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return x(V)}function I(V,X,K,G,ee){return new b((V||"React class")+": "+X+" type `"+K+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function B(V){function X(K,G,ee,Z,te){var J=K[G],ne=D(J);if(ne!=="object")return new b("Invalid "+Z+" `"+te+"` of type `"+ne+"` "+("supplied to `"+ee+"`, expected `object`."));for(var U in V){var ie=V[U];if(typeof ie!="function")return I(ee,Z,te,U,A(ie));var se=ie(J,U,ee,Z,te+"."+U,n);if(se)return se}return null}return x(X)}function $(V){function X(K,G,ee,Z,te){var J=K[G],ne=D(J);if(ne!=="object")return new b("Invalid "+Z+" `"+te+"` of type `"+ne+"` "+("supplied to `"+ee+"`, expected `object`."));var U=t({},K[G],V);for(var ie in U){var se=V[ie];if(r(V,ie)&&typeof se!="function")return I(ee,Z,te,ie,A(se));if(!se)return new b("Invalid "+Z+" `"+te+"` key `"+ie+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(K[G],null," ")+`
|
|
9
|
-
Valid keys: `+JSON.stringify(Object.keys(V),null," "));var Q=se(J,ie,ee,Z,te+"."+ie,n);if(Q)return Q}return null}return x(X)}function k(V){switch(typeof V){case"number":case"string":case"undefined":return!0;case"boolean":return!V;case"object":if(Array.isArray(V))return V.every(k);if(V===null||a(V))return!0;var X=f(V);if(X){var K=X.call(V),G;if(X!==V.entries){for(;!(G=K.next()).done;)if(!k(G.value))return!1}else for(;!(G=K.next()).done;){var ee=G.value;if(ee&&!k(ee[1]))return!1}}else return!1;return!0;default:return!1}}function j(V,X){return V==="symbol"?!0:X?X["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&X instanceof Symbol:!1}function D(V){var X=typeof V;return Array.isArray(V)?"array":V instanceof RegExp?"object":j(X,V)?"symbol":X}function A(V){if(typeof V>"u"||V===null)return""+V;var X=D(V);if(X==="object"){if(V instanceof Date)return"date";if(V instanceof RegExp)return"regexp"}return X}function L(V){var X=A(V);switch(X){case"array":case"object":return"an "+X;case"boolean":case"date":case"regexp":return"a "+X;default:return X}}function H(V){return!V.constructor||!V.constructor.name?m:V.constructor.name}return g.checkPropTypes=o,g.resetWarningCache=o.resetWarningCache,g.PropTypes=g,g},Wy}var Hy,QT;function _Y(){if(QT)return Hy;QT=1;var e=Mw();function t(){}function n(){}return n.resetWarningCache=t,Hy=function(){function r(s,a,l,c,d,f){if(f!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Hy}var e_;function NY(){if(e_)return Ph.exports;if(e_=1,process.env.NODE_ENV!=="production"){var e=Pk(),t=!0;Ph.exports=TY()(e.isElement,t)}else Ph.exports=_Y()();return Ph.exports}var OY=NY();const bt=_A(OY);function MY(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function IY(e,t){e.classList?e.classList.add(t):MY(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function t_(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function DY(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=t_(e.className,t):e.setAttribute("class",t_(e.className&&e.className.baseVal||"",t))}const n_={disabled:!1};var AY=process.env.NODE_ENV!=="production"?bt.oneOfType([bt.number,bt.shape({enter:bt.number,exit:bt.number,appear:bt.number}).isRequired]):null,kY=process.env.NODE_ENV!=="production"?bt.oneOfType([bt.string,bt.shape({enter:bt.string,exit:bt.string,active:bt.string}),bt.shape({enter:bt.string,enterDone:bt.string,enterActive:bt.string,exit:bt.string,exitDone:bt.string,exitActive:bt.string})]):null;const _k=M.createContext(null);var Nk=function(t){return t.scrollTop},qf="unmounted",pa="exited",ma="entering",El="entered",Qx="exiting",ci=(function(e){Sk(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var s=o,a=s&&!s.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?a?(l=pa,i.appearStatus=ma):l=El:r.unmountOnExit||r.mountOnEnter?l=qf:l=pa,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var s=o.in;return s&&i.status===qf?{status:pa}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==ma&&s!==El&&(i=ma):(s===ma||s===El)&&(i=Qx)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,s,a;return i=s=a=o,o!=null&&typeof o!="number"&&(i=o.exit,s=o.enter,a=o.appear!==void 0?o.appear:s),{exit:i,enter:s,appear:a}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===ma){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:_o.findDOMNode(this);s&&Nk(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===pa&&this.setState({status:qf})},n.performEnter=function(o){var i=this,s=this.props.enter,a=this.context?this.context.isMounting:o,l=this.props.nodeRef?[a]:[_o.findDOMNode(this),a],c=l[0],d=l[1],f=this.getTimeouts(),m=a?f.appear:f.enter;if(!o&&!s||n_.disabled){this.safeSetState({status:El},function(){i.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:ma},function(){i.props.onEntering(c,d),i.onTransitionEnd(m,function(){i.safeSetState({status:El},function(){i.props.onEntered(c,d)})})})},n.performExit=function(){var o=this,i=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:_o.findDOMNode(this);if(!i||n_.disabled){this.safeSetState({status:pa},function(){o.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Qx},function(){o.props.onExiting(a),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:pa},function(){o.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,i.nextCallback=null,o(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:_o.findDOMNode(this),a=o==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],d=l[1];this.props.addEndListener(c,d)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===qf)return null;var i=this.props,s=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var a=Rk(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return M.createElement(_k.Provider,{value:null},typeof s=="function"?s(o,a):M.cloneElement(M.Children.only(s),a))},t})(M.Component);ci.contextType=_k;ci.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:bt.shape({current:typeof Element>"u"?bt.any:function(e,t,n,r,o,i){var s=e[t];return bt.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,t,n,r,o,i)}}),children:bt.oneOfType([bt.func.isRequired,bt.element.isRequired]).isRequired,in:bt.bool,mountOnEnter:bt.bool,unmountOnExit:bt.bool,appear:bt.bool,enter:bt.bool,exit:bt.bool,timeout:function(t){var n=AY;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return n.apply(void 0,[t].concat(o))},addEndListener:bt.func,onEnter:bt.func,onEntering:bt.func,onEntered:bt.func,onExit:bt.func,onExiting:bt.func,onExited:bt.func}:{};function fl(){}ci.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:fl,onEntering:fl,onEntered:fl,onExit:fl,onExiting:fl,onExited:fl};ci.UNMOUNTED=qf;ci.EXITED=pa;ci.ENTERING=ma;ci.ENTERED=El;ci.EXITING=Qx;var $Y=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return IY(t,r)})},Ky=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return DY(t,r)})},Iw=(function(e){Sk(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=e.call.apply(e,[this].concat(i))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(a,l){var c=r.resolveArguments(a,l),d=c[0],f=c[1];r.removeClasses(d,"exit"),r.addClass(d,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,l)},r.onEntering=function(a,l){var c=r.resolveArguments(a,l),d=c[0],f=c[1],m=f?"appear":"enter";r.addClass(d,m,"active"),r.props.onEntering&&r.props.onEntering(a,l)},r.onEntered=function(a,l){var c=r.resolveArguments(a,l),d=c[0],f=c[1],m=f?"appear":"enter";r.removeClasses(d,m),r.addClass(d,m,"done"),r.props.onEntered&&r.props.onEntered(a,l)},r.onExit=function(a){var l=r.resolveArguments(a),c=l[0];r.removeClasses(c,"appear"),r.removeClasses(c,"enter"),r.addClass(c,"exit","base"),r.props.onExit&&r.props.onExit(a)},r.onExiting=function(a){var l=r.resolveArguments(a),c=l[0];r.addClass(c,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var l=r.resolveArguments(a),c=l[0];r.removeClasses(c,"exit"),r.addClass(c,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,l){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,l]},r.getClassNames=function(a){var l=r.props.classNames,c=typeof l=="string",d=c&&l?l+"-":"",f=c?""+d+a:l[a],m=c?f+"-active":l[a+"Active"],g=c?f+"-done":l[a+"Done"];return{baseClassName:f,activeClassName:m,doneClassName:g}},r}var n=t.prototype;return n.addClass=function(o,i,s){var a=this.getClassNames(i)[s+"ClassName"],l=this.getClassNames("enter"),c=l.doneClassName;i==="appear"&&s==="done"&&c&&(a+=" "+c),s==="active"&&o&&Nk(o),a&&(this.appliedClasses[i][s]=a,$Y(o,a))},n.removeClasses=function(o,i){var s=this.appliedClasses[i],a=s.base,l=s.active,c=s.done;this.appliedClasses[i]={},a&&Ky(o,a),l&&Ky(o,l),c&&Ky(o,c)},n.render=function(){var o=this.props;o.classNames;var i=Rk(o,["classNames"]);return M.createElement(ci,kg({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t})(M.Component);Iw.defaultProps={classNames:""};Iw.propTypes=process.env.NODE_ENV!=="production"?kg({},ci.propTypes,{classNames:kY,onEnter:bt.func,onEntering:bt.func,onEntered:bt.func,onExit:bt.func,onExiting:bt.func,onExited:bt.func}):{};const eE=({loading:e,animate:t=!0,...n})=>{const r=M.useRef(null);return t?C.jsx(Iw,{unmountOnExit:!0,mountOnEnter:!0,timeout:200,in:e,classNames:"btn-loader",nodeRef:r,children:C.jsx(Zx,{...n,ref:r,"data-testid":"btn-loader",className:ue("animate-spin",n.className)})}):e?C.jsx(Zx,{...n,"data-testid":"btn-loader",className:ue("animate-spin",n.className)}):null},FY=({loading:e})=>C.jsx("span",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",background:"inherit",borderRadius:"inherit"},children:C.jsx(eE,{loading:e,animate:!1})}),LY={display:"inline-flex",alignItems:"center",gap:"0.5rem"},Ok=({asChild:e=!1,onClick:t,loading:n,showLoader:r=!0,icon:o,iconPosition:i="start",loaderReplace:s,style:a,...l})=>{const c=e?Nw:"button",[d=!1,f]=vr({prop:n,defaultProp:!1}),m=async x=>{if(!t||d)return;const y=t(x);y instanceof Promise&&(r&&f(!0),await y.finally(()=>f(!1)))},g=x=>{if(x!==i)return null;const y=s?!1:d;return C.jsxs(C.Fragment,{children:[C.jsx(eE,{loading:y&&!o,animate:!0}),o&&C.jsx(eE,{loading:y,animate:!1}),o&&!y&&o]})},b=s&&(d&&r);return C.jsxs(c,{type:"button","data-slot":"button",...l,onClick:m,style:{...LY,position:b?"relative":void 0,...a},children:[g("start"),C.jsx(NG,{children:l.children}),g("end"),b&&C.jsx(FY,{loading:!0})]})},Is=e=>{const{variant:t,size:n,shape:r,className:o,...i}=hk("Button",e);return C.jsx(Ok,{...i,className:ue(gk({variant:t,size:n,shape:r}),o),"data-variant":t||"default"})};function Mk(e){return C.jsx(BA,{...e})}function Ik({className:e,...t}){return C.jsx($p,{"data-slot":"alert-dialog-trigger",className:ue(e),...t})}function Dk({className:e,...t}){return C.jsx(Op,{"data-slot":"alert-dialog-backdrop",forceRender:!0,className:ue("fixed inset-0 z-overlay bg-black/50","transition-opacity duration-200","data-starting-style:opacity-0 data-ending-style:opacity-0",e),...t})}function Ak({className:e,...t}){return C.jsx(Fp,{"data-slot":"alert-dialog-viewport",className:ue("fixed inset-0 z-overlay flex items-center justify-center p-4",e),...t})}function kk({className:e,portalProps:t,...n}){return C.jsxs(Ap,{...t,children:[C.jsx(Dk,{}),C.jsx(Ak,{children:C.jsx(Ip,{"data-slot":"alert-dialog-popup",className:ue("relative flex w-full max-w-lg flex-col gap-4 rounded-lg border bg-background p-6 shadow-lg","transition-[scale,opacity] duration-200 ease-out","data-starting-style:scale-95 data-starting-style:opacity-0","data-ending-style:scale-95 data-ending-style:opacity-0",e),...n})})]})}function tE({className:e,...t}){return C.jsx(Zl,{"data-slot":"alert-dialog-close",className:ue(e),...t})}function $k({className:e,...t}){return C.jsx(kp,{"data-slot":"alert-dialog-title",className:ue("text-lg font-semibold leading-none tracking-tight",e),...t})}function Fk({className:e,...t}){return C.jsx(Mp,{"data-slot":"alert-dialog-description",className:ue("text-sm text-muted-foreground",e),...t})}function Lk({className:e,...t}){return C.jsx("div",{"data-slot":"alert-dialog-header",className:ue("flex flex-col gap-2",e),...t})}function jk({className:e,...t}){return C.jsx("div",{"data-slot":"alert-dialog-footer",className:ue("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function jY({trigger:e,title:t,description:n,children:r,onClose:o,onAction:i,variant:s="default",closeText:a="Cancel",actionText:l="Confirm",className:c,...d}){return C.jsxs(Mk,{...d,children:[e&&C.jsx(Ik,{render:e}),C.jsxs(kk,{className:c,children:[(t||n)&&C.jsxs(Lk,{children:[t&&C.jsx($k,{children:t}),n&&C.jsx(Fk,{children:n})]}),r,C.jsxs(jk,{children:[C.jsx(tE,{render:C.jsx(Is,{variant:"secondary",children:a}),onClick:o}),C.jsx(tE,{render:C.jsx(Is,{variant:s??"default",children:l}),onClick:i})]})]})]})}const qY=({items:e,placeholder:t="Buscar...",emptyMessage:n="No se encontraron resultados",onSelect:r,containerClassName:o,containerProps:i,inputClassName:s,inputProps:a,listClassName:l,listProps:c,itemClassName:d,itemProps:f,emptyClassName:m,emptyProps:g})=>C.jsxs(Tv,{className:o,...i,children:[C.jsx(Bw,{placeholder:t,className:s,...a}),C.jsx(Vw,{className:l,...c,children:e.map(v=>C.jsxs(Fg,{className:d,onSelect:()=>r?.(v.value,v),...f,children:[v.label,v.shortcut&&C.jsx(O$,{children:v.shortcut})]},v.value))}),C.jsx(Ww,{className:m,...g,children:n})]});var r_=1,BY=.9,VY=.8,WY=.17,Uy=.1,zy=.999,HY=.9999,KY=.99,UY=/[\\\/_+.#"@\[\(\{&]/,zY=/[\\\/_+.#"@\[\(\{&]/g,GY=/[\s-]/,qk=/[\s-]/g;function nE(e,t,n,r,o,i,s){if(i===t.length)return o===e.length?r_:KY;var a=`${o},${i}`;if(s[a]!==void 0)return s[a];for(var l=r.charAt(i),c=n.indexOf(l,o),d=0,f,m,g,v;c>=0;)f=nE(e,t,n,r,c+1,i+1,s),f>d&&(c===o?f*=r_:UY.test(e.charAt(c-1))?(f*=VY,g=e.slice(o,c-1).match(zY),g&&o>0&&(f*=Math.pow(zy,g.length))):GY.test(e.charAt(c-1))?(f*=BY,v=e.slice(o,c-1).match(qk),v&&o>0&&(f*=Math.pow(zy,v.length))):(f*=WY,o>0&&(f*=Math.pow(zy,c-o))),e.charAt(c)!==t.charAt(i)&&(f*=HY)),(f<Uy&&n.charAt(c-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&n.charAt(c-1)!==r.charAt(i))&&(m=nE(e,t,n,r,c+1,i+2,s),m*Uy>f&&(f=m*Uy)),f>d&&(d=f),c=n.indexOf(l,c+1);return s[a]=d,d}function o_(e){return e.toLowerCase().replace(qk," ")}function YY(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,nE(e,t,o_(e),o_(t),0,0,{})}function _s(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function XY(e,t){const n=h.createContext(t),r=i=>{const{children:s,...a}=i,l=h.useMemo(()=>a,Object.values(a));return C.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(i){const s=h.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function tu(e,t=[]){let n=[];function r(i,s){const a=h.createContext(s),l=n.length;n=[...n,s];const c=f=>{const{scope:m,children:g,...v}=f,b=m?.[e]?.[l]||a,x=h.useMemo(()=>v,Object.values(v));return C.jsx(b.Provider,{value:x,children:g})};c.displayName=i+"Provider";function d(f,m){const g=m?.[e]?.[l]||a,v=h.useContext(g);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[c,d]}const o=()=>{const i=n.map(s=>h.createContext(s));return function(a){const l=a?.[e]||i;return h.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,ZY(o,...t)]}function ZY(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...a,...f}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var JY=h[" useId ".trim().toString()]||(()=>{}),QY=0;function Nr(e){const[t,n]=h.useState(JY());return Do(()=>{n(r=>r??String(QY++))},[e]),e||(t?`radix-${t}`:"")}function or(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...n)=>t.current?.(...n),[])}function eX({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=tX({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,a=or(n),l=h.useCallback(c=>{if(i){const f=typeof c=="function"?c(e):c;f!==e&&a(f)}else o(c)},[i,e,o,a]);return[s,l]}function tX({defaultProp:e,onChange:t}){const n=h.useState(e),[r]=n,o=h.useRef(r),i=or(t);return h.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function nX(e){const t=rX(e),n=h.forwardRef((r,o)=>{const{children:i,...s}=r,a=h.Children.toArray(i),l=a.find(iX);if(l){const c=l.props.children,d=a.map(f=>f===l?h.Children.count(c)>1?h.Children.only(null):h.isValidElement(c)?c.props.children:null:f);return C.jsx(t,{...s,ref:o,children:h.isValidElement(c)?h.cloneElement(c,void 0,d):null})}return C.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function rX(e){const t=h.forwardRef((n,r)=>{const{children:o,...i}=n;if(h.isValidElement(o)){const s=aX(o),a=sX(i,o.props);return o.type!==h.Fragment&&(a.ref=r?kn(r,s):s),h.cloneElement(o,a)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var oX=Symbol("radix.slottable");function iX(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oX}function sX(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function aX(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var lX=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Xn=lX.reduce((e,t)=>{const n=nX(`Primitive.${t}`),r=h.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function uX(e,t){e&&Rn.flushSync(()=>e.dispatchEvent(t))}function Bk(e,t=globalThis?.document){const n=or(e);h.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var cX="DismissableLayer",rE="dismissableLayer.update",dX="dismissableLayer.pointerDownOutside",fX="dismissableLayer.focusOutside",i_,Vk=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wk=h.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,c=h.useContext(Vk),[d,f]=h.useState(null),m=d?.ownerDocument??globalThis?.document,[,g]=h.useState({}),v=Nn(t,P=>f(P)),b=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=b.indexOf(x),_=d?b.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,T=_>=y,R=hX(P=>{const N=P.target,F=[...c.branches].some(W=>W.contains(N));!T||F||(o?.(P),s?.(P),P.defaultPrevented||a?.())},m),S=gX(P=>{const N=P.target;[...c.branches].some(W=>W.contains(N))||(i?.(P),s?.(P),P.defaultPrevented||a?.())},m);return Bk(P=>{_===c.layers.size-1&&(r?.(P),!P.defaultPrevented&&a&&(P.preventDefault(),a()))},m),h.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(i_=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),s_(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=i_)}},[d,m,n,c]),h.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),s_())},[d,c]),h.useEffect(()=>{const P=()=>g({});return document.addEventListener(rE,P),()=>document.removeEventListener(rE,P)},[]),C.jsx(Xn.div,{...l,ref:v,style:{pointerEvents:w?T?"auto":"none":void 0,...e.style},onFocusCapture:_s(e.onFocusCapture,S.onFocusCapture),onBlurCapture:_s(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:_s(e.onPointerDownCapture,R.onPointerDownCapture)})});Wk.displayName=cX;var pX="DismissableLayerBranch",mX=h.forwardRef((e,t)=>{const n=h.useContext(Vk),r=h.useRef(null),o=Nn(t,r);return h.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),C.jsx(Xn.div,{...e,ref:o})});mX.displayName=pX;function hX(e,t=globalThis?.document){const n=or(e),r=h.useRef(!1),o=h.useRef(()=>{});return h.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){Hk(dX,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function gX(e,t=globalThis?.document){const n=or(e),r=h.useRef(!1);return h.useEffect(()=>{const o=i=>{i.target&&!r.current&&Hk(fX,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function s_(){const e=new CustomEvent(rE);document.dispatchEvent(e)}function Hk(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?uX(o,i):o.dispatchEvent(i)}var Gy="focusScope.autoFocusOnMount",Yy="focusScope.autoFocusOnUnmount",a_={bubbles:!1,cancelable:!0},vX="FocusScope",Kk=h.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=h.useState(null),c=or(o),d=or(i),f=h.useRef(null),m=Nn(t,b=>l(b)),g=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let b=function(w){if(g.paused||!a)return;const T=w.target;a.contains(T)?f.current=T:gs(f.current,{select:!0})},x=function(w){if(g.paused||!a)return;const T=w.relatedTarget;T!==null&&(a.contains(T)||gs(f.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const R of w)R.removedNodes.length>0&&gs(a)};document.addEventListener("focusin",b),document.addEventListener("focusout",x);const _=new MutationObserver(y);return a&&_.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",x),_.disconnect()}}},[r,a,g.paused]),h.useEffect(()=>{if(a){u_.add(g);const b=document.activeElement;if(!a.contains(b)){const y=new CustomEvent(Gy,a_);a.addEventListener(Gy,c),a.dispatchEvent(y),y.defaultPrevented||(bX(CX(Uk(a)),{select:!0}),document.activeElement===b&&gs(a))}return()=>{a.removeEventListener(Gy,c),setTimeout(()=>{const y=new CustomEvent(Yy,a_);a.addEventListener(Yy,d),a.dispatchEvent(y),y.defaultPrevented||gs(b??document.body,{select:!0}),a.removeEventListener(Yy,d),u_.remove(g)},0)}}},[a,c,d,g]);const v=h.useCallback(b=>{if(!n&&!r||g.paused)return;const x=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,y=document.activeElement;if(x&&y){const _=b.currentTarget,[w,T]=yX(_);w&&T?!b.shiftKey&&y===T?(b.preventDefault(),n&&gs(w,{select:!0})):b.shiftKey&&y===w&&(b.preventDefault(),n&&gs(T,{select:!0})):y===_&&b.preventDefault()}},[n,r,g.paused]);return C.jsx(Xn.div,{tabIndex:-1,...s,ref:m,onKeyDown:v})});Kk.displayName=vX;function bX(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(gs(r,{select:t}),document.activeElement!==n)return}function yX(e){const t=Uk(e),n=l_(t,e),r=l_(t.reverse(),e);return[n,r]}function Uk(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function l_(e,t){for(const n of e)if(!xX(n,{upTo:t}))return n}function xX(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function EX(e){return e instanceof HTMLInputElement&&"select"in e}function gs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&EX(e)&&t&&e.select()}}var u_=wX();function wX(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=c_(e,t),e.unshift(t)},remove(t){e=c_(e,t),e[0]?.resume()}}}function c_(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function CX(e){return e.filter(t=>t.tagName!=="A")}var RX="Portal",zk=h.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=h.useState(!1);Do(()=>i(!0),[]);const s=n||o&&globalThis?.document?.body;return s?_o.createPortal(C.jsx(Xn.div,{...r,ref:t}),s):null});zk.displayName=RX;function SX(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var Rv=e=>{const{present:t,children:n}=e,r=PX(t),o=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),i=Nn(r.ref,TX(o));return typeof n=="function"||r.isPresent?h.cloneElement(o,{ref:i}):null};Rv.displayName="Presence";function PX(e){const[t,n]=h.useState(),r=h.useRef({}),o=h.useRef(e),i=h.useRef("none"),s=e?"mounted":"unmounted",[a,l]=SX(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const c=_h(r.current);i.current=a==="mounted"?c:"none"},[a]),Do(()=>{const c=r.current,d=o.current;if(d!==e){const m=i.current,g=_h(c);e?l("MOUNT"):g==="none"||c?.display==="none"?l("UNMOUNT"):l(d&&m!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Do(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=g=>{const b=_h(r.current).includes(g.animationName);if(g.target===t&&b&&(l("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=g=>{g.target===t&&(i.current=_h(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:h.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function _h(e){return e?.animationName||"none"}function TX(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xy=0;function _X(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??d_()),document.body.insertAdjacentElement("beforeend",e[1]??d_()),Xy++,()=>{Xy===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Xy--}},[])}function d_(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Yo=function(){return Yo=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Yo.apply(this,arguments)};function Gk(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function NX(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var sg="right-scroll-bar-position",ag="width-before-scroll-bar",OX="with-scroll-bars-hidden",MX="--removed-body-scroll-bar-size";function Zy(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function IX(e,t){var n=M.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var DX=typeof window<"u"?h.useLayoutEffect:h.useEffect,f_=new WeakMap;function AX(e,t){var n=IX(null,function(r){return e.forEach(function(o){return Zy(o,r)})});return DX(function(){var r=f_.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||Zy(a,null)}),i.forEach(function(a){o.has(a)||Zy(a,s)})}f_.set(n,e)},[e]),n}function kX(e){return e}function $X(e,t){t===void 0&&(t=kX);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var l=function(){var d=s;s=[],d.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(d){s.push(d),c()},filter:function(d){return s=s.filter(d),n}}}};return o}function FX(e){e===void 0&&(e={});var t=$X(null);return t.options=Yo({async:!0,ssr:!1},e),t}var Yk=function(e){var t=e.sideCar,n=Gk(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return h.createElement(r,Yo({},n))};Yk.isSideCarExport=!0;function LX(e,t){return e.useMedium(t),Yk}var Xk=FX(),Jy=function(){},Sv=h.forwardRef(function(e,t){var n=h.useRef(null),r=h.useState({onScrollCapture:Jy,onWheelCapture:Jy,onTouchMoveCapture:Jy}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,g=e.noIsolation,v=e.inert,b=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,_=e.gapMode,w=Gk(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=m,R=AX([n,t]),S=Yo(Yo({},w),o);return h.createElement(h.Fragment,null,d&&h.createElement(T,{sideCar:Xk,removeScrollBar:c,shards:f,noIsolation:g,inert:v,setCallbacks:i,allowPinchZoom:!!b,lockRef:n,gapMode:_}),s?h.cloneElement(h.Children.only(a),Yo(Yo({},S),{ref:R})):h.createElement(y,Yo({},S,{className:l,ref:R}),a))});Sv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Sv.classNames={fullWidth:ag,zeroRight:sg};var jX=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function qX(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=jX();return t&&e.setAttribute("nonce",t),e}function BX(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function VX(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var WX=function(){var e=0,t=null;return{add:function(n){e==0&&(t=qX())&&(BX(t,n),VX(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},HX=function(){var e=WX();return function(t,n){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Zk=function(){var e=HX(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},KX={left:0,top:0,right:0,gap:0},Qy=function(e){return parseInt(e||"",10)||0},UX=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Qy(n),Qy(r),Qy(o)]},zX=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return KX;var t=UX(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},GX=Zk(),Ml="data-scroll-locked",YX=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
10
|
-
.`.concat(OX,` {
|
|
11
|
-
overflow: hidden `).concat(r,`;
|
|
12
|
-
padding-right: `).concat(a,"px ").concat(r,`;
|
|
13
|
-
}
|
|
14
|
-
body[`).concat(Ml,`] {
|
|
15
|
-
overflow: hidden `).concat(r,`;
|
|
16
|
-
overscroll-behavior: contain;
|
|
17
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
18
|
-
padding-left: `.concat(o,`px;
|
|
19
|
-
padding-top: `).concat(i,`px;
|
|
20
|
-
padding-right: `).concat(s,`px;
|
|
21
|
-
margin-left:0;
|
|
22
|
-
margin-top:0;
|
|
23
|
-
margin-right: `).concat(a,"px ").concat(r,`;
|
|
24
|
-
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.`).concat(sg,` {
|
|
28
|
-
right: `).concat(a,"px ").concat(r,`;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.`).concat(ag,` {
|
|
32
|
-
margin-right: `).concat(a,"px ").concat(r,`;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.`).concat(sg," .").concat(sg,` {
|
|
36
|
-
right: 0 `).concat(r,`;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.`).concat(ag," .").concat(ag,` {
|
|
40
|
-
margin-right: 0 `).concat(r,`;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
body[`).concat(Ml,`] {
|
|
44
|
-
`).concat(MX,": ").concat(a,`px;
|
|
45
|
-
}
|
|
46
|
-
`)},p_=function(){var e=parseInt(document.body.getAttribute(Ml)||"0",10);return isFinite(e)?e:0},XX=function(){h.useEffect(function(){return document.body.setAttribute(Ml,(p_()+1).toString()),function(){var e=p_()-1;e<=0?document.body.removeAttribute(Ml):document.body.setAttribute(Ml,e.toString())}},[])},ZX=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;XX();var i=h.useMemo(function(){return zX(o)},[o]);return h.createElement(GX,{styles:YX(i,!t,o,n?"":"!important")})},oE=!1;if(typeof window<"u")try{var Nh=Object.defineProperty({},"passive",{get:function(){return oE=!0,!0}});window.addEventListener("test",Nh,Nh),window.removeEventListener("test",Nh,Nh)}catch{oE=!1}var pl=oE?{passive:!1}:!1,JX=function(e){return e.tagName==="TEXTAREA"},Jk=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!JX(e)&&n[t]==="visible")},QX=function(e){return Jk(e,"overflowY")},eZ=function(e){return Jk(e,"overflowX")},m_=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Qk(e,r);if(o){var i=e$(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},tZ=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},nZ=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Qk=function(e,t){return e==="v"?QX(t):eZ(t)},e$=function(e,t){return e==="v"?tZ(t):nZ(t)},rZ=function(e,t){return e==="h"&&t==="rtl"?-1:1},oZ=function(e,t,n,r,o){var i=rZ(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),c=!1,d=s>0,f=0,m=0;do{var g=e$(e,a),v=g[0],b=g[1],x=g[2],y=b-x-i*v;(v||y)&&Qk(e,a)&&(f+=y,m+=v),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(f)<1||!d&&Math.abs(m)<1)&&(c=!0),c},Oh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},h_=function(e){return[e.deltaX,e.deltaY]},g_=function(e){return e&&"current"in e?e.current:e},iZ=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sZ=function(e){return`
|
|
47
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
48
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
49
|
-
`)},aZ=0,ml=[];function lZ(e){var t=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),o=h.useState(aZ++)[0],i=h.useState(Zk)[0],s=h.useRef(e);h.useEffect(function(){s.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var b=NX([e.lockRef.current],(e.shards||[]).map(g_),!0).filter(Boolean);return b.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),b.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=h.useCallback(function(b,x){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!s.current.allowPinchZoom;var y=Oh(b),_=n.current,w="deltaX"in b?b.deltaX:_[0]-y[0],T="deltaY"in b?b.deltaY:_[1]-y[1],R,S=b.target,P=Math.abs(w)>Math.abs(T)?"h":"v";if("touches"in b&&P==="h"&&S.type==="range")return!1;var N=m_(P,S);if(!N)return!0;if(N?R=P:(R=P==="v"?"h":"v",N=m_(P,S)),!N)return!1;if(!r.current&&"changedTouches"in b&&(w||T)&&(r.current=R),!R)return!0;var F=r.current||R;return oZ(F,x,b,F==="h"?w:T)},[]),l=h.useCallback(function(b){var x=b;if(!(!ml.length||ml[ml.length-1]!==i)){var y="deltaY"in x?h_(x):Oh(x),_=t.current.filter(function(R){return R.name===x.type&&(R.target===x.target||x.target===R.shadowParent)&&iZ(R.delta,y)})[0];if(_&&_.should){x.cancelable&&x.preventDefault();return}if(!_){var w=(s.current.shards||[]).map(g_).filter(Boolean).filter(function(R){return R.contains(x.target)}),T=w.length>0?a(x,w[0]):!s.current.noIsolation;T&&x.cancelable&&x.preventDefault()}}},[]),c=h.useCallback(function(b,x,y,_){var w={name:b,delta:x,target:y,should:_,shadowParent:uZ(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(T){return T!==w})},1)},[]),d=h.useCallback(function(b){n.current=Oh(b),r.current=void 0},[]),f=h.useCallback(function(b){c(b.type,h_(b),b.target,a(b,e.lockRef.current))},[]),m=h.useCallback(function(b){c(b.type,Oh(b),b.target,a(b,e.lockRef.current))},[]);h.useEffect(function(){return ml.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,pl),document.addEventListener("touchmove",l,pl),document.addEventListener("touchstart",d,pl),function(){ml=ml.filter(function(b){return b!==i}),document.removeEventListener("wheel",l,pl),document.removeEventListener("touchmove",l,pl),document.removeEventListener("touchstart",d,pl)}},[]);var g=e.removeScrollBar,v=e.inert;return h.createElement(h.Fragment,null,v?h.createElement(i,{styles:sZ(o)}):null,g?h.createElement(ZX,{gapMode:e.gapMode}):null)}function uZ(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const cZ=LX(Xk,lZ);var Dw=h.forwardRef(function(e,t){return h.createElement(Sv,Yo({},e,{ref:t,sideCar:cZ}))});Dw.classNames=Sv.classNames;var dZ=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},hl=new WeakMap,Mh=new WeakMap,Ih={},ex=0,t$=function(e){return e&&(e.host||t$(e.parentNode))},fZ=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=t$(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},pZ=function(e,t,n,r){var o=fZ(t,Array.isArray(e)?e:[e]);Ih[n]||(Ih[n]=new WeakMap);var i=Ih[n],s=[],a=new Set,l=new Set(o),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};o.forEach(c);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(m){if(a.has(m))d(m);else try{var g=m.getAttribute(r),v=g!==null&&g!=="false",b=(hl.get(m)||0)+1,x=(i.get(m)||0)+1;hl.set(m,b),i.set(m,x),s.push(m),b===1&&v&&Mh.set(m,!0),x===1&&m.setAttribute(n,"true"),v||m.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",m,y)}})};return d(t),a.clear(),ex++,function(){s.forEach(function(f){var m=hl.get(f)-1,g=i.get(f)-1;hl.set(f,m),i.set(f,g),m||(Mh.has(f)||f.removeAttribute(r),Mh.delete(f)),g||f.removeAttribute(n)}),ex--,ex||(hl=new WeakMap,hl=new WeakMap,Mh=new WeakMap,Ih={})}},n$=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=dZ(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),pZ(r,o,n,"aria-hidden")):function(){return null}};function mZ(e){const t=hZ(e),n=h.forwardRef((r,o)=>{const{children:i,...s}=r,a=h.Children.toArray(i),l=a.find(vZ);if(l){const c=l.props.children,d=a.map(f=>f===l?h.Children.count(c)>1?h.Children.only(null):h.isValidElement(c)?c.props.children:null:f);return C.jsx(t,{...s,ref:o,children:h.isValidElement(c)?h.cloneElement(c,void 0,d):null})}return C.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function hZ(e){const t=h.forwardRef((n,r)=>{const{children:o,...i}=n;if(h.isValidElement(o)){const s=yZ(o),a=bZ(i,o.props);return o.type!==h.Fragment&&(a.ref=r?kn(r,s):s),h.cloneElement(o,a)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gZ=Symbol("radix.slottable");function vZ(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gZ}function bZ(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function yZ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Aw="Dialog",[r$]=tu(Aw),[xZ,Fo]=r$(Aw),o$=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=h.useRef(null),l=h.useRef(null),[c=!1,d]=eX({prop:r,defaultProp:o,onChange:i});return C.jsx(xZ,{scope:t,triggerRef:a,contentRef:l,contentId:Nr(),titleId:Nr(),descriptionId:Nr(),open:c,onOpenChange:d,onOpenToggle:h.useCallback(()=>d(f=>!f),[d]),modal:s,children:n})};o$.displayName=Aw;var i$="DialogTrigger",EZ=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Fo(i$,n),i=Nn(t,o.triggerRef);return C.jsx(Xn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Fw(o.open),...r,ref:i,onClick:_s(e.onClick,o.onOpenToggle)})});EZ.displayName=i$;var kw="DialogPortal",[wZ,s$]=r$(kw,{forceMount:void 0}),a$=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Fo(kw,t);return C.jsx(wZ,{scope:t,forceMount:n,children:h.Children.map(r,s=>C.jsx(Rv,{present:n||i.open,children:C.jsx(zk,{asChild:!0,container:o,children:s})}))})};a$.displayName=kw;var $g="DialogOverlay",l$=h.forwardRef((e,t)=>{const n=s$($g,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Fo($g,e.__scopeDialog);return i.modal?C.jsx(Rv,{present:r||i.open,children:C.jsx(RZ,{...o,ref:t})}):null});l$.displayName=$g;var CZ=mZ("DialogOverlay.RemoveScroll"),RZ=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Fo($g,n);return C.jsx(Dw,{as:CZ,allowPinchZoom:!0,shards:[o.contentRef],children:C.jsx(Xn.div,{"data-state":Fw(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Sa="DialogContent",u$=h.forwardRef((e,t)=>{const n=s$(Sa,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Fo(Sa,e.__scopeDialog);return C.jsx(Rv,{present:r||i.open,children:i.modal?C.jsx(SZ,{...o,ref:t}):C.jsx(PZ,{...o,ref:t})})});u$.displayName=Sa;var SZ=h.forwardRef((e,t)=>{const n=Fo(Sa,e.__scopeDialog),r=h.useRef(null),o=Nn(t,n.contentRef,r);return h.useEffect(()=>{const i=r.current;if(i)return n$(i)},[]),C.jsx(c$,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_s(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:_s(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:_s(e.onFocusOutside,i=>i.preventDefault())})}),PZ=h.forwardRef((e,t)=>{const n=Fo(Sa,e.__scopeDialog),r=h.useRef(!1),o=h.useRef(!1);return C.jsx(c$,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;n.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),c$=h.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=Fo(Sa,n),l=h.useRef(null),c=Nn(t,l);return _X(),C.jsxs(C.Fragment,{children:[C.jsx(Kk,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:C.jsx(Wk,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Fw(a.open),...s,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),C.jsxs(C.Fragment,{children:[C.jsx(OZ,{titleId:a.titleId}),C.jsx(IZ,{contentRef:l,descriptionId:a.descriptionId})]})]})}),$w="DialogTitle",TZ=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Fo($w,n);return C.jsx(Xn.h2,{id:o.titleId,...r,ref:t})});TZ.displayName=$w;var d$="DialogDescription",_Z=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Fo(d$,n);return C.jsx(Xn.p,{id:o.descriptionId,...r,ref:t})});_Z.displayName=d$;var f$="DialogClose",NZ=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Fo(f$,n);return C.jsx(Xn.button,{type:"button",...r,ref:t,onClick:_s(e.onClick,()=>o.onOpenChange(!1))})});NZ.displayName=f$;function Fw(e){return e?"open":"closed"}var p$="DialogTitleWarning",[Qxe,m$]=XY(p$,{contentName:Sa,titleName:$w,docsSlug:"dialog"}),OZ=({titleId:e})=>{const t=m$(p$),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
50
|
-
|
|
51
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
52
|
-
|
|
53
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return h.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},MZ="DialogDescriptionWarning",IZ=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${m$(MZ).contentName}}.`;return h.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},DZ=o$,AZ=a$,kZ=l$,$Z=u$,Ku='[cmdk-group=""]',tx='[cmdk-group-items=""]',FZ='[cmdk-group-heading=""]',h$='[cmdk-item=""]',v_=`${h$}:not([aria-disabled="true"])`,iE="cmdk-item-select",wl="data-value",LZ=(e,t,n)=>YY(e,t,n),g$=h.createContext(void 0),jp=()=>h.useContext(g$),v$=h.createContext(void 0),Lw=()=>h.useContext(v$),b$=h.createContext(void 0),y$=h.forwardRef((e,t)=>{let n=Cl(()=>{var K,G;return{search:"",value:(G=(K=e.value)!=null?K:e.defaultValue)!=null?G:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Cl(()=>new Set),o=Cl(()=>new Map),i=Cl(()=>new Map),s=Cl(()=>new Set),a=x$(e),{label:l,children:c,value:d,onValueChange:f,filter:m,shouldFilter:g,loop:v,disablePointerSelection:b=!1,vimBindings:x=!0,...y}=e,_=Nr(),w=Nr(),T=Nr(),R=h.useRef(null),S=YZ();Pa(()=>{if(d!==void 0){let K=d.trim();n.current.value=K,P.emit()}},[d]),Pa(()=>{S(6,$)},[]);let P=h.useMemo(()=>({subscribe:K=>(s.current.add(K),()=>s.current.delete(K)),snapshot:()=>n.current,setState:(K,G,ee)=>{var Z,te,J,ne;if(!Object.is(n.current[K],G)){if(n.current[K]=G,K==="search")B(),W(),S(1,I);else if(K==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let U=document.getElementById(T);U?U.focus():(Z=document.getElementById(_))==null||Z.focus()}if(S(7,()=>{var U;n.current.selectedItemId=(U=k())==null?void 0:U.id,P.emit()}),ee||S(5,$),((te=a.current)==null?void 0:te.value)!==void 0){let U=G??"";(ne=(J=a.current).onValueChange)==null||ne.call(J,U);return}}P.emit()}},emit:()=>{s.current.forEach(K=>K())}}),[]),N=h.useMemo(()=>({value:(K,G,ee)=>{var Z;G!==((Z=i.current.get(K))==null?void 0:Z.value)&&(i.current.set(K,{value:G,keywords:ee}),n.current.filtered.items.set(K,F(G,ee)),S(2,()=>{W(),P.emit()}))},item:(K,G)=>(r.current.add(K),G&&(o.current.has(G)?o.current.get(G).add(K):o.current.set(G,new Set([K]))),S(3,()=>{B(),W(),n.current.value||I(),P.emit()}),()=>{i.current.delete(K),r.current.delete(K),n.current.filtered.items.delete(K);let ee=k();S(4,()=>{B(),ee?.getAttribute("id")===K&&I(),P.emit()})}),group:K=>(o.current.has(K)||o.current.set(K,new Set),()=>{i.current.delete(K),o.current.delete(K)}),filter:()=>a.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:_,inputId:T,labelId:w,listInnerRef:R}),[]);function F(K,G){var ee,Z;let te=(Z=(ee=a.current)==null?void 0:ee.filter)!=null?Z:LZ;return K?te(K,n.current.search,G):0}function W(){if(!n.current.search||a.current.shouldFilter===!1)return;let K=n.current.filtered.items,G=[];n.current.filtered.groups.forEach(Z=>{let te=o.current.get(Z),J=0;te.forEach(ne=>{let U=K.get(ne);J=Math.max(U,J)}),G.push([Z,J])});let ee=R.current;j().sort((Z,te)=>{var J,ne;let U=Z.getAttribute("id"),ie=te.getAttribute("id");return((J=K.get(ie))!=null?J:0)-((ne=K.get(U))!=null?ne:0)}).forEach(Z=>{let te=Z.closest(tx);te?te.appendChild(Z.parentElement===te?Z:Z.closest(`${tx} > *`)):ee.appendChild(Z.parentElement===ee?Z:Z.closest(`${tx} > *`))}),G.sort((Z,te)=>te[1]-Z[1]).forEach(Z=>{var te;let J=(te=R.current)==null?void 0:te.querySelector(`${Ku}[${wl}="${encodeURIComponent(Z[0])}"]`);J?.parentElement.appendChild(J)})}function I(){let K=j().find(ee=>ee.getAttribute("aria-disabled")!=="true"),G=K?.getAttribute(wl);P.setState("value",G||void 0)}function B(){var K,G,ee,Z;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let te=0;for(let J of r.current){let ne=(G=(K=i.current.get(J))==null?void 0:K.value)!=null?G:"",U=(Z=(ee=i.current.get(J))==null?void 0:ee.keywords)!=null?Z:[],ie=F(ne,U);n.current.filtered.items.set(J,ie),ie>0&&te++}for(let[J,ne]of o.current)for(let U of ne)if(n.current.filtered.items.get(U)>0){n.current.filtered.groups.add(J);break}n.current.filtered.count=te}function $(){var K,G,ee;let Z=k();Z&&(((K=Z.parentElement)==null?void 0:K.firstChild)===Z&&((ee=(G=Z.closest(Ku))==null?void 0:G.querySelector(FZ))==null||ee.scrollIntoView({block:"nearest"})),Z.scrollIntoView({block:"nearest"}))}function k(){var K;return(K=R.current)==null?void 0:K.querySelector(`${h$}[aria-selected="true"]`)}function j(){var K;return Array.from(((K=R.current)==null?void 0:K.querySelectorAll(v_))||[])}function D(K){let G=j()[K];G&&P.setState("value",G.getAttribute(wl))}function A(K){var G;let ee=k(),Z=j(),te=Z.findIndex(ne=>ne===ee),J=Z[te+K];(G=a.current)!=null&&G.loop&&(J=te+K<0?Z[Z.length-1]:te+K===Z.length?Z[0]:Z[te+K]),J&&P.setState("value",J.getAttribute(wl))}function L(K){let G=k(),ee=G?.closest(Ku),Z;for(;ee&&!Z;)ee=K>0?zZ(ee,Ku):GZ(ee,Ku),Z=ee?.querySelector(v_);Z?P.setState("value",Z.getAttribute(wl)):A(K)}let H=()=>D(j().length-1),V=K=>{K.preventDefault(),K.metaKey?H():K.altKey?L(1):A(1)},X=K=>{K.preventDefault(),K.metaKey?D(0):K.altKey?L(-1):A(-1)};return h.createElement(Xn.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:K=>{var G;(G=y.onKeyDown)==null||G.call(y,K);let ee=K.nativeEvent.isComposing||K.keyCode===229;if(!(K.defaultPrevented||ee))switch(K.key){case"n":case"j":{x&&K.ctrlKey&&V(K);break}case"ArrowDown":{V(K);break}case"p":case"k":{x&&K.ctrlKey&&X(K);break}case"ArrowUp":{X(K);break}case"Home":{K.preventDefault(),D(0);break}case"End":{K.preventDefault(),H();break}case"Enter":{K.preventDefault();let Z=k();if(Z){let te=new Event(iE);Z.dispatchEvent(te)}}}}},h.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:ZZ},l),Pv(e,K=>h.createElement(v$.Provider,{value:P},h.createElement(g$.Provider,{value:N},K))))}),jZ=h.forwardRef((e,t)=>{var n,r;let o=Nr(),i=h.useRef(null),s=h.useContext(b$),a=jp(),l=x$(e),c=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s?.forceMount;Pa(()=>{if(!c)return a.item(o,s?.id)},[c]);let d=E$(o,i,[e.value,e.children,i],e.keywords),f=Lw(),m=Ds(S=>S.value&&S.value===d.current),g=Ds(S=>c||a.filter()===!1?!0:S.search?S.filtered.items.get(o)>0:!0);h.useEffect(()=>{let S=i.current;if(!(!S||e.disabled))return S.addEventListener(iE,v),()=>S.removeEventListener(iE,v)},[g,e.onSelect,e.disabled]);function v(){var S,P;b(),(P=(S=l.current).onSelect)==null||P.call(S,d.current)}function b(){f.setState("value",d.current,!0)}if(!g)return null;let{disabled:x,value:y,onSelect:_,forceMount:w,keywords:T,...R}=e;return h.createElement(Xn.div,{ref:kn(i,t),...R,id:o,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!m,"data-disabled":!!x,"data-selected":!!m,onPointerMove:x||a.getDisablePointerSelection()?void 0:b,onClick:x?void 0:v},e.children)}),qZ=h.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...i}=e,s=Nr(),a=h.useRef(null),l=h.useRef(null),c=Nr(),d=jp(),f=Ds(g=>o||d.filter()===!1?!0:g.search?g.filtered.groups.has(s):!0);Pa(()=>d.group(s),[]),E$(s,a,[e.value,e.heading,l]);let m=h.useMemo(()=>({id:s,forceMount:o}),[o]);return h.createElement(Xn.div,{ref:kn(a,t),...i,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},n&&h.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),Pv(e,g=>h.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},h.createElement(b$.Provider,{value:m},g))))}),BZ=h.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=h.useRef(null),i=Ds(s=>!s.search);return!n&&!i?null:h.createElement(Xn.div,{ref:kn(o,t),...r,"cmdk-separator":"",role:"separator"})}),VZ=h.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,i=Lw(),s=Ds(c=>c.search),a=Ds(c=>c.selectedItemId),l=jp();return h.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),h.createElement(Xn.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":a,id:l.inputId,type:"text",value:o?e.value:s,onChange:c=>{o||i.setState("search",c.target.value),n?.(c.target.value)}})}),WZ=h.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,i=h.useRef(null),s=h.useRef(null),a=Ds(c=>c.selectedItemId),l=jp();return h.useEffect(()=>{if(s.current&&i.current){let c=s.current,d=i.current,f,m=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let g=c.offsetHeight;d.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return m.observe(c),()=>{cancelAnimationFrame(f),m.unobserve(c)}}},[]),h.createElement(Xn.div,{ref:kn(i,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":r,id:l.listId},Pv(e,c=>h.createElement("div",{ref:kn(s,l.listInnerRef),"cmdk-list-sizer":""},c)))}),HZ=h.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:i,container:s,...a}=e;return h.createElement(DZ,{open:n,onOpenChange:r},h.createElement(AZ,{container:s},h.createElement(kZ,{"cmdk-overlay":"",className:o}),h.createElement($Z,{"aria-label":e.label,"cmdk-dialog":"",className:i},h.createElement(y$,{ref:t,...a}))))}),KZ=h.forwardRef((e,t)=>Ds(n=>n.filtered.count===0)?h.createElement(Xn.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),UZ=h.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...i}=e;return h.createElement(Xn.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Pv(e,s=>h.createElement("div",{"aria-hidden":!0},s)))}),Fa=Object.assign(y$,{List:WZ,Item:jZ,Input:VZ,Group:qZ,Separator:BZ,Dialog:HZ,Empty:KZ,Loading:UZ});function zZ(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function GZ(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function x$(e){let t=h.useRef(e);return Pa(()=>{t.current=e}),t}var Pa=typeof window>"u"?h.useEffect:h.useLayoutEffect;function Cl(e){let t=h.useRef();return t.current===void 0&&(t.current=e()),t}function Ds(e){let t=Lw(),n=()=>e(t.snapshot());return h.useSyncExternalStore(t.subscribe,n,n)}function E$(e,t,n,r=[]){let o=h.useRef(),i=jp();return Pa(()=>{var s;let a=(()=>{var c;for(let d of n){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?(c=d.current.textContent)==null?void 0:c.trim():o.current}})(),l=r.map(c=>c.trim());i.value(e,a,l),(s=t.current)==null||s.setAttribute(wl,a),o.current=a}),o}var YZ=()=>{let[e,t]=h.useState(),n=Cl(()=>new Map);return Pa(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function XZ(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Pv({asChild:e,children:t},n){return e&&h.isValidElement(t)?h.cloneElement(XZ(t),{ref:t.ref},n(t.props.children)):n(t)}var ZZ={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const JZ=Object.freeze(Object.defineProperty({__proto__:null,Backdrop:Op,Close:Zl,Description:Mp,Handle:Cv,Popup:Ip,Portal:Ap,Root:qA,Title:kp,Trigger:$p,Viewport:Fp,createHandle:Dz},Symbol.toStringTag,{value:"Module"}));function jw(e){return C.jsx(qA,{...e})}function w$({className:e,...t}){return C.jsx($p,{"data-slot":"dialog-trigger",className:ue(e),...t})}function C$({className:e,...t}){return C.jsx(Op,{"data-slot":"dialog-backdrop",forceRender:!0,className:ue("fixed inset-0 z-overlay bg-black/50","transition-opacity duration-200","data-starting-style:opacity-0 data-ending-style:opacity-0",e),...t})}function R$({className:e,...t}){return C.jsx(Fp,{"data-slot":"dialog-viewport",className:ue("fixed inset-0 z-overlay flex items-center justify-center p-4",e),...t})}function qw({className:e,children:t,hideClose:n,closeProps:r,portalProps:o,...i}){return C.jsxs(Ap,{...o,children:[C.jsx(C$,{}),C.jsx(R$,{children:C.jsxs(Ip,{"data-slot":"dialog-popup",className:ue("relative flex w-full max-w-lg flex-col gap-4 rounded-lg border bg-background p-6 shadow-lg","transition-[scale,opacity] duration-200 ease-out","data-starting-style:scale-95 data-starting-style:opacity-0","data-ending-style:scale-95 data-ending-style:opacity-0",e),...i,children:[t,!n&&C.jsx(Zl,{"aria-label":"Close",className:"absolute right-2 top-2",render:C.jsx(Is,{size:"icon",variant:"ghost"}),...r,children:C.jsx($a,{className:"size-4"})})]})})]})}function QZ({className:e,...t}){return C.jsx(Zl,{"data-slot":"dialog-close",className:ue(e),...t})}function S$({className:e,...t}){return C.jsx(kp,{"data-slot":"dialog-title",className:ue("text-lg font-semibold leading-none tracking-tight",e),...t})}function P$({className:e,...t}){return C.jsx(Mp,{"data-slot":"dialog-description",className:ue("text-sm text-muted-foreground",e),...t})}function T$({className:e,...t}){return C.jsx("div",{"data-slot":"dialog-header",className:ue("flex flex-col gap-2",e),...t})}function _$({className:e,...t}){return C.jsx("div",{"data-slot":"dialog-footer",className:ue("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function eJ({trigger:e,title:t,description:n,children:r,footer:o,onClose:i,hideClose:s,closeProps:a,portalProps:l,className:c,onOpenChange:d,...f}){return C.jsxs(jw,{onOpenChange:(m,g)=>{m||i?.(),d?.(m,g)},...f,children:[e&&C.jsx(w$,{render:e}),C.jsxs(qw,{className:c,hideClose:s,closeProps:a,portalProps:l,children:[(t||n)&&C.jsxs(T$,{children:[t&&C.jsx(S$,{children:t}),n&&C.jsx(P$,{children:n})]}),r,o&&C.jsx(_$,{children:o})]})]})}const Tv=({className:e,...t})=>C.jsx(Fa,{"data-slot":"auto-complete",className:ue("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}),tJ=({children:e,...t})=>C.jsx(jw,{...t,"data-slot":"auto-complete-dialog",children:C.jsx(qw,{className:"p-0 overflow-hidden shadow-lg","data-slot":"auto-complete-dialog-content",children:C.jsx(Tv,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Bw=({className:e,...t})=>C.jsxs("div",{className:"flex items-center px-3 border-b","data-slot":"auto-complete-input-container",children:[C.jsx(yY,{className:"w-4 h-4 mr-2 opacity-50 shrink-0","data-slot":"auto-complete-input-icon"}),C.jsx(Fa.Input,{"data-slot":"auto-complete-input",className:ue("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}),Vw=({className:e,...t})=>C.jsx(Fa.List,{"data-slot":"auto-complete-list",className:ue("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}),Ww=e=>C.jsx(Fa.Empty,{className:"py-6 text-sm text-center","data-slot":"auto-complete-empty",...e}),N$=({className:e,...t})=>C.jsx(Fa.Group,{"data-slot":"auto-complete-group",className:ue("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}),nJ=({className:e,...t})=>C.jsx(Fa.Separator,{"data-slot":"auto-complete-separator",className:ue("-mx-1 h-px bg-input",e),...t}),Fg=({className:e,...t})=>C.jsx(Fa.Item,{"data-slot":"auto-complete-item",className:ue("aria-selected:bg-accent aria-selected:text-accent-foreground","aria-disabled:pointer-events-none aria-disabled:opacity-50","relative flex gap-2 cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none",e),...t}),O$=({className:e,...t})=>C.jsx("span",{"data-slot":"auto-complete-shortcut",className:ue("ml-auto text-xs tracking-widest text-muted-foreground",e),...t}),Hw=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(Hw.displayName="AvatarRootContext");function M$(){const e=h.useContext(Hw);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: AvatarRootContext is missing. Avatar parts must be placed within <Avatar.Root>.":gt(13));return e}const Kw={imageLoadingStatus:()=>null},Uw=h.forwardRef(function(t,n){const{className:r,render:o,style:i,...s}=t,[a,l]=h.useState("idle"),c={imageLoadingStatus:a},d=h.useMemo(()=>({imageLoadingStatus:a,setImageLoadingStatus:l}),[a,l]),f=$e("span",t,{state:c,ref:n,props:s,stateAttributesMapping:Kw});return C.jsx(Hw.Provider,{value:d,children:f})});process.env.NODE_ENV!=="production"&&(Uw.displayName="AvatarRoot");function rJ(e,{referrerPolicy:t,crossOrigin:n}){const[r,o]=h.useState("idle");return Ne(()=>{if(!e)return o("error"),Dt;let i=!0;const s=new window.Image,a=l=>()=>{i&&o(l)};return o("loading"),s.onload=a("loaded"),s.onerror=a("error"),t&&(s.referrerPolicy=t),s.crossOrigin=n??null,s.src=e,s.complete&&o(s.naturalWidth>0?"loaded":"error"),()=>{i=!1}},[e,n,t]),r}const oJ={...Kw,...Hn},zw=h.forwardRef(function(t,n){const{className:r,render:o,onLoadingStatusChange:i,referrerPolicy:s,crossOrigin:a,style:l,...c}=t,d=M$(),f=rJ(t.src,{referrerPolicy:s,crossOrigin:a}),m=f==="loaded",{mounted:g,transitionStatus:v,setMounted:b}=$o(m),x=h.useRef(null),y=Re(T=>{i?.(T),d.setImageLoadingStatus(T)});Ne(()=>{f!=="idle"&&y(f)},[f,y]);const _={imageLoadingStatus:f,transitionStatus:v};sr({open:m,ref:x,onComplete(){m||b(!1)}});const w=$e("img",t,{state:_,ref:[n,x],props:c,stateAttributesMapping:oJ,enabled:g});return g?w:null});process.env.NODE_ENV!=="production"&&(zw.displayName="AvatarImage");const Gw=h.forwardRef(function(t,n){const{className:r,render:o,delay:i,style:s,...a}=t,{imageLoadingStatus:l}=M$(),[c,d]=h.useState(i===void 0),f=nn();return h.useEffect(()=>(i!==void 0&&f.start(i,()=>d(!0)),f.clear),[f,i]),$e("span",t,{state:{imageLoadingStatus:l},ref:n,props:a,stateAttributesMapping:Kw,enabled:l!=="loaded"&&c})});process.env.NODE_ENV!=="production"&&(Gw.displayName="AvatarFallback");const iJ=Object.freeze(Object.defineProperty({__proto__:null,Fallback:Gw,Image:zw,Root:Uw},Symbol.toStringTag,{value:"Module"})),Yw=()=>{const e=M.createContext(null);return[()=>{const n=M.useContext(e);if(n===null)throw new Error("Context value is null");return n},e.Provider]},sJ=({children:e,as:t="div",props:n})=>{let r;return typeof e=="string"?r=C.jsx(t,{children:e}):M.isValidElement(e)?r=e:typeof e=="function"?r=e(n):r=C.jsx(t,{children:e}),M.isValidElement(r)?r:C.jsx(t,{children:r})},aJ=e=>{e.preventDefault();const t=e.currentTarget.elements,n={};return Array.from(t).forEach(r=>{const o=r;o.name&&(n[o.name]=o.value)}),n};function lJ(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}const I$=e=>e.split(" ").map(t=>t.charAt(0)).join("");var Ho={},lg={exports:{}};lg.exports;var b_;function D$(){return b_||(b_=1,(function(e){const n=(i=0)=>s=>`\x1B[${38+i};5;${s}m`,r=(i=0)=>(s,a,l)=>`\x1B[${38+i};2;${s};${a};${l}m`;function o(){const i=new Map,s={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};s.color.gray=s.color.blackBright,s.bgColor.bgGray=s.bgColor.bgBlackBright,s.color.grey=s.color.blackBright,s.bgColor.bgGrey=s.bgColor.bgBlackBright;for(const[a,l]of Object.entries(s)){for(const[c,d]of Object.entries(l))s[c]={open:`\x1B[${d[0]}m`,close:`\x1B[${d[1]}m`},l[c]=s[c],i.set(d[0],d[1]);Object.defineProperty(s,a,{value:l,enumerable:!1})}return Object.defineProperty(s,"codes",{value:i,enumerable:!1}),s.color.close="\x1B[39m",s.bgColor.close="\x1B[49m",s.color.ansi256=n(),s.color.ansi16m=r(),s.bgColor.ansi256=n(10),s.bgColor.ansi16m=r(10),Object.defineProperties(s,{rgbToAnsi256:{value:(a,l,c)=>a===l&&l===c?a<8?16:a>248?231:Math.round((a-8)/247*24)+232:16+36*Math.round(a/255*5)+6*Math.round(l/255*5)+Math.round(c/255*5),enumerable:!1},hexToRgb:{value:a=>{const l=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(a.toString(16));if(!l)return[0,0,0];let{colorString:c}=l.groups;c.length===3&&(c=c.split("").map(f=>f+f).join(""));const d=Number.parseInt(c,16);return[d>>16&255,d>>8&255,d&255]},enumerable:!1},hexToAnsi256:{value:a=>s.rgbToAnsi256(...s.hexToRgb(a)),enumerable:!1}}),s}Object.defineProperty(e,"exports",{enumerable:!0,get:o})})(lg)),lg.exports}var ca={},y_;function _v(){if(y_)return ca;y_=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.printIteratorEntries=t,ca.printIteratorValues=n,ca.printListItems=r,ca.printObjectProperties=o;const e=(i,s)=>{const a=Object.keys(i).sort(s);return Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(i).forEach(l=>{Object.getOwnPropertyDescriptor(i,l).enumerable&&a.push(l)}),a};function t(i,s,a,l,c,d,f=": "){let m="",g=i.next();if(!g.done){m+=s.spacingOuter;const v=a+s.indent;for(;!g.done;){const b=d(g.value[0],s,v,l,c),x=d(g.value[1],s,v,l,c);m+=v+b+f+x,g=i.next(),g.done?s.min||(m+=","):m+=","+s.spacingInner}m+=s.spacingOuter+a}return m}function n(i,s,a,l,c,d){let f="",m=i.next();if(!m.done){f+=s.spacingOuter;const g=a+s.indent;for(;!m.done;)f+=g+d(m.value,s,g,l,c),m=i.next(),m.done?s.min||(f+=","):f+=","+s.spacingInner;f+=s.spacingOuter+a}return f}function r(i,s,a,l,c,d){let f="";if(i.length){f+=s.spacingOuter;const m=a+s.indent;for(let g=0;g<i.length;g++)f+=m,g in i&&(f+=d(i[g],s,m,l,c)),g<i.length-1?f+=","+s.spacingInner:s.min||(f+=",");f+=s.spacingOuter+a}return f}function o(i,s,a,l,c,d){let f="";const m=e(i,s.compareKeys);if(m.length){f+=s.spacingOuter;const g=a+s.indent;for(let v=0;v<m.length;v++){const b=m[v],x=d(b,s,g,l,c),y=d(i[b],s,g,l,c);f+=g+x+": "+y,v<m.length-1?f+=","+s.spacingInner:s.min||(f+=",")}f+=s.spacingOuter+a}return f}return ca}var _i={},x_;function uJ(){if(x_)return _i;x_=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.test=_i.serialize=_i.default=void 0;var e=_v(),t=(function(){return typeof globalThis<"u"?globalThis:typeof t<"u"?t:typeof self<"u"?self:typeof window<"u"?window:Function("return this")()})(),n=t["jest-symbol-do-not-touch"]||t.Symbol;const r=typeof n=="function"&&n.for?n.for("jest.asymmetricMatcher"):1267621,o=" ",i=(c,d,f,m,g,v)=>{const b=c.toString();return b==="ArrayContaining"||b==="ArrayNotContaining"?++m>d.maxDepth?"["+b+"]":b+o+"["+(0,e.printListItems)(c.sample,d,f,m,g,v)+"]":b==="ObjectContaining"||b==="ObjectNotContaining"?++m>d.maxDepth?"["+b+"]":b+o+"{"+(0,e.printObjectProperties)(c.sample,d,f,m,g,v)+"}":b==="StringMatching"||b==="StringNotMatching"||b==="StringContaining"||b==="StringNotContaining"?b+o+v(c.sample,d,f,m,g):c.toAsymmetricMatcher()};_i.serialize=i;const s=c=>c&&c.$$typeof===r;_i.test=s;var l={serialize:i,test:s};return _i.default=l,_i}var Ni={},nx,E_;function cJ(){return E_||(E_=1,nx=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}),nx}var w_;function dJ(){if(w_)return Ni;w_=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.test=Ni.serialize=Ni.default=void 0;var e=n(cJ()),t=n(D$());function n(l){return l&&l.__esModule?l:{default:l}}const r=l=>l.replace((0,e.default)(),c=>{switch(c){case t.default.red.close:case t.default.green.close:case t.default.cyan.close:case t.default.gray.close:case t.default.white.close:case t.default.yellow.close:case t.default.bgRed.close:case t.default.bgGreen.close:case t.default.bgYellow.close:case t.default.inverse.close:case t.default.dim.close:case t.default.bold.close:case t.default.reset.open:case t.default.reset.close:return"</>";case t.default.red.open:return"<red>";case t.default.green.open:return"<green>";case t.default.cyan.open:return"<cyan>";case t.default.gray.open:return"<gray>";case t.default.white.open:return"<white>";case t.default.yellow.open:return"<yellow>";case t.default.bgRed.open:return"<bgRed>";case t.default.bgGreen.open:return"<bgGreen>";case t.default.bgYellow.open:return"<bgYellow>";case t.default.inverse.open:return"<inverse>";case t.default.dim.open:return"<dim>";case t.default.bold.open:return"<bold>";default:return""}}),o=l=>typeof l=="string"&&!!l.match((0,e.default)());Ni.test=o;const i=(l,c,d,f,m,g)=>g(r(l),c,d,f,m);Ni.serialize=i;var a={serialize:i,test:o};return Ni.default=a,Ni}var Oi={},C_;function fJ(){if(C_)return Oi;C_=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.test=Oi.serialize=Oi.default=void 0;var e=_v();const t=" ",n=["DOMStringMap","NamedNodeMap"],r=/^(HTML\w*Collection|NodeList)$/,o=d=>n.indexOf(d)!==-1||r.test(d),i=d=>d&&d.constructor&&!!d.constructor.name&&o(d.constructor.name);Oi.test=i;const s=d=>d.constructor.name==="NamedNodeMap",a=(d,f,m,g,v,b)=>{const x=d.constructor.name;return++g>f.maxDepth?"["+x+"]":(f.min?"":x+t)+(n.indexOf(x)!==-1?"{"+(0,e.printObjectProperties)(s(d)?Array.from(d).reduce((y,_)=>(y[_.name]=_.value,y),{}):{...d},f,m,g,v,b)+"}":"["+(0,e.printListItems)(Array.from(d),f,m,g,v,b)+"]")};Oi.serialize=a;var c={serialize:a,test:i};return Oi.default=c,Oi}var Mi={},pr={},Dh={},R_;function pJ(){if(R_)return Dh;R_=1,Object.defineProperty(Dh,"__esModule",{value:!0}),Dh.default=e;function e(t){return t.replace(/</g,"<").replace(/>/g,">")}return Dh}var S_;function Xw(){if(S_)return pr;S_=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.printText=pr.printProps=pr.printElementAsLeaf=pr.printElement=pr.printComment=pr.printChildren=void 0;var e=t(pJ());function t(l){return l&&l.__esModule?l:{default:l}}const n=(l,c,d,f,m,g,v)=>{const b=f+d.indent,x=d.colors;return l.map(y=>{const _=c[y];let w=v(_,d,b,m,g);return typeof _!="string"&&(w.indexOf(`
|
|
54
|
-
`)!==-1&&(w=d.spacingOuter+b+w+d.spacingOuter+f),w="{"+w+"}"),d.spacingInner+f+x.prop.open+y+x.prop.close+"="+x.value.open+w+x.value.close}).join("")};pr.printProps=n;const r=(l,c,d,f,m,g)=>l.map(v=>c.spacingOuter+d+(typeof v=="string"?o(v,c):g(v,c,d,f,m))).join("");pr.printChildren=r;const o=(l,c)=>{const d=c.colors.content;return d.open+(0,e.default)(l)+d.close};pr.printText=o;const i=(l,c)=>{const d=c.colors.comment;return d.open+"<!--"+(0,e.default)(l)+"-->"+d.close};pr.printComment=i;const s=(l,c,d,f,m)=>{const g=f.colors.tag;return g.open+"<"+l+(c&&g.close+c+f.spacingOuter+m+g.open)+(d?">"+g.close+d+f.spacingOuter+m+g.open+"</"+l:(c&&!f.min?"":" ")+"/")+">"+g.close};pr.printElement=s;const a=(l,c)=>{const d=c.colors.tag;return d.open+"<"+l+d.close+" …"+d.open+" />"+d.close};return pr.printElementAsLeaf=a,pr}var P_;function mJ(){if(P_)return Mi;P_=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.test=Mi.serialize=Mi.default=void 0;var e=Xw();const t=1,n=3,r=8,o=11,i=/^((HTML|SVG)\w*)?Element$/,s=b=>{try{return typeof b.hasAttribute=="function"&&b.hasAttribute("is")}catch{return!1}},a=b=>{const x=b.constructor.name,{nodeType:y,tagName:_}=b,w=typeof _=="string"&&_.includes("-")||s(b);return y===t&&(i.test(x)||w)||y===n&&x==="Text"||y===r&&x==="Comment"||y===o&&x==="DocumentFragment"},l=b=>{var x;return(b==null||(x=b.constructor)===null||x===void 0?void 0:x.name)&&a(b)};Mi.test=l;function c(b){return b.nodeType===n}function d(b){return b.nodeType===r}function f(b){return b.nodeType===o}const m=(b,x,y,_,w,T)=>{if(c(b))return(0,e.printText)(b.data,x);if(d(b))return(0,e.printComment)(b.data,x);const R=f(b)?"DocumentFragment":b.tagName.toLowerCase();return++_>x.maxDepth?(0,e.printElementAsLeaf)(R,x):(0,e.printElement)(R,(0,e.printProps)(f(b)?[]:Array.from(b.attributes).map(S=>S.name).sort(),f(b)?{}:Array.from(b.attributes).reduce((S,P)=>(S[P.name]=P.value,S),{}),x,y+x.indent,_,w,T),(0,e.printChildren)(Array.prototype.slice.call(b.childNodes||b.children),x,y+x.indent,_,w,T),x,y)};Mi.serialize=m;var v={serialize:m,test:l};return Mi.default=v,Mi}var Ii={},T_;function hJ(){if(T_)return Ii;T_=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.test=Ii.serialize=Ii.default=void 0;var e=_v();const t="@@__IMMUTABLE_ITERABLE__@@",n="@@__IMMUTABLE_LIST__@@",r="@@__IMMUTABLE_KEYED__@@",o="@@__IMMUTABLE_MAP__@@",i="@@__IMMUTABLE_ORDERED__@@",s="@@__IMMUTABLE_RECORD__@@",a="@@__IMMUTABLE_SEQ__@@",l="@@__IMMUTABLE_SET__@@",c="@@__IMMUTABLE_STACK__@@",d=P=>"Immutable."+P,f=P=>"["+P+"]",m=" ",g="…",v=(P,N,F,W,I,B,$)=>++W>N.maxDepth?f(d($)):d($)+m+"{"+(0,e.printIteratorEntries)(P.entries(),N,F,W,I,B)+"}";function b(P){let N=0;return{next(){if(N<P._keys.length){const F=P._keys[N++];return{done:!1,value:[F,P.get(F)]}}return{done:!0,value:void 0}}}}const x=(P,N,F,W,I,B)=>{const $=d(P._name||"Record");return++W>N.maxDepth?f($):$+m+"{"+(0,e.printIteratorEntries)(b(P),N,F,W,I,B)+"}"},y=(P,N,F,W,I,B)=>{const $=d("Seq");return++W>N.maxDepth?f($):P[r]?$+m+"{"+(P._iter||P._object?(0,e.printIteratorEntries)(P.entries(),N,F,W,I,B):g)+"}":$+m+"["+(P._iter||P._array||P._collection||P._iterable?(0,e.printIteratorValues)(P.values(),N,F,W,I,B):g)+"]"},_=(P,N,F,W,I,B,$)=>++W>N.maxDepth?f(d($)):d($)+m+"["+(0,e.printIteratorValues)(P.values(),N,F,W,I,B)+"]",w=(P,N,F,W,I,B)=>P[o]?v(P,N,F,W,I,B,P[i]?"OrderedMap":"Map"):P[n]?_(P,N,F,W,I,B,"List"):P[l]?_(P,N,F,W,I,B,P[i]?"OrderedSet":"Set"):P[c]?_(P,N,F,W,I,B,"Stack"):P[a]?y(P,N,F,W,I,B):x(P,N,F,W,I,B);Ii.serialize=w;const T=P=>P&&(P[t]===!0||P[s]===!0);Ii.test=T;var S={serialize:w,test:T};return Ii.default=S,Ii}var Di={},Ah={exports:{}},Yt={};var __;function gJ(){if(__)return Yt;__=1;var e=60103,t=60106,n=60107,r=60108,o=60114,i=60109,s=60110,a=60112,l=60113,c=60120,d=60115,f=60116,m=60121,g=60122,v=60117,b=60129,x=60131;if(typeof Symbol=="function"&&Symbol.for){var y=Symbol.for;e=y("react.element"),t=y("react.portal"),n=y("react.fragment"),r=y("react.strict_mode"),o=y("react.profiler"),i=y("react.provider"),s=y("react.context"),a=y("react.forward_ref"),l=y("react.suspense"),c=y("react.suspense_list"),d=y("react.memo"),f=y("react.lazy"),m=y("react.block"),g=y("react.server.block"),v=y("react.fundamental"),b=y("react.debug_trace_mode"),x=y("react.legacy_hidden")}function _($){if(typeof $=="object"&&$!==null){var k=$.$$typeof;switch(k){case e:switch($=$.type,$){case n:case o:case r:case l:case c:return $;default:switch($=$&&$.$$typeof,$){case s:case a:case f:case d:case i:return $;default:return k}}case t:return k}}}var w=i,T=e,R=a,S=n,P=f,N=d,F=t,W=o,I=r,B=l;return Yt.ContextConsumer=s,Yt.ContextProvider=w,Yt.Element=T,Yt.ForwardRef=R,Yt.Fragment=S,Yt.Lazy=P,Yt.Memo=N,Yt.Portal=F,Yt.Profiler=W,Yt.StrictMode=I,Yt.Suspense=B,Yt.isAsyncMode=function(){return!1},Yt.isConcurrentMode=function(){return!1},Yt.isContextConsumer=function($){return _($)===s},Yt.isContextProvider=function($){return _($)===i},Yt.isElement=function($){return typeof $=="object"&&$!==null&&$.$$typeof===e},Yt.isForwardRef=function($){return _($)===a},Yt.isFragment=function($){return _($)===n},Yt.isLazy=function($){return _($)===f},Yt.isMemo=function($){return _($)===d},Yt.isPortal=function($){return _($)===t},Yt.isProfiler=function($){return _($)===o},Yt.isStrictMode=function($){return _($)===r},Yt.isSuspense=function($){return _($)===l},Yt.isValidElementType=function($){return typeof $=="string"||typeof $=="function"||$===n||$===o||$===b||$===r||$===l||$===c||$===x||typeof $=="object"&&$!==null&&($.$$typeof===f||$.$$typeof===d||$.$$typeof===i||$.$$typeof===s||$.$$typeof===a||$.$$typeof===v||$.$$typeof===m||$[0]===g)},Yt.typeOf=_,Yt}var Xt={};var N_;function vJ(){return N_||(N_=1,process.env.NODE_ENV!=="production"&&(function(){var e=60103,t=60106,n=60107,r=60108,o=60114,i=60109,s=60110,a=60112,l=60113,c=60120,d=60115,f=60116,m=60121,g=60122,v=60117,b=60129,x=60131;if(typeof Symbol=="function"&&Symbol.for){var y=Symbol.for;e=y("react.element"),t=y("react.portal"),n=y("react.fragment"),r=y("react.strict_mode"),o=y("react.profiler"),i=y("react.provider"),s=y("react.context"),a=y("react.forward_ref"),l=y("react.suspense"),c=y("react.suspense_list"),d=y("react.memo"),f=y("react.lazy"),m=y("react.block"),g=y("react.server.block"),v=y("react.fundamental"),y("react.scope"),y("react.opaque.id"),b=y("react.debug_trace_mode"),y("react.offscreen"),x=y("react.legacy_hidden")}var _=!1;function w(se){return!!(typeof se=="string"||typeof se=="function"||se===n||se===o||se===b||se===r||se===l||se===c||se===x||_||typeof se=="object"&&se!==null&&(se.$$typeof===f||se.$$typeof===d||se.$$typeof===i||se.$$typeof===s||se.$$typeof===a||se.$$typeof===v||se.$$typeof===m||se[0]===g))}function T(se){if(typeof se=="object"&&se!==null){var Q=se.$$typeof;switch(Q){case e:var me=se.type;switch(me){case n:case o:case r:case l:case c:return me;default:var ve=me&&me.$$typeof;switch(ve){case s:case a:case f:case d:case i:return ve;default:return Q}}case t:return Q}}}var R=s,S=i,P=e,N=a,F=n,W=f,I=d,B=t,$=o,k=r,j=l,D=!1,A=!1;function L(se){return D||(D=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H(se){return A||(A=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function V(se){return T(se)===s}function X(se){return T(se)===i}function K(se){return typeof se=="object"&&se!==null&&se.$$typeof===e}function G(se){return T(se)===a}function ee(se){return T(se)===n}function Z(se){return T(se)===f}function te(se){return T(se)===d}function J(se){return T(se)===t}function ne(se){return T(se)===o}function U(se){return T(se)===r}function ie(se){return T(se)===l}Xt.ContextConsumer=R,Xt.ContextProvider=S,Xt.Element=P,Xt.ForwardRef=N,Xt.Fragment=F,Xt.Lazy=W,Xt.Memo=I,Xt.Portal=B,Xt.Profiler=$,Xt.StrictMode=k,Xt.Suspense=j,Xt.isAsyncMode=L,Xt.isConcurrentMode=H,Xt.isContextConsumer=V,Xt.isContextProvider=X,Xt.isElement=K,Xt.isForwardRef=G,Xt.isFragment=ee,Xt.isLazy=Z,Xt.isMemo=te,Xt.isPortal=J,Xt.isProfiler=ne,Xt.isStrictMode=U,Xt.isSuspense=ie,Xt.isValidElementType=w,Xt.typeOf=T})()),Xt}var O_;function bJ(){return O_||(O_=1,process.env.NODE_ENV==="production"?Ah.exports=gJ():Ah.exports=vJ()),Ah.exports}var M_;function yJ(){if(M_)return Di;M_=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.test=Di.serialize=Di.default=void 0;var e=r(bJ()),t=Xw();function n(f){if(typeof WeakMap!="function")return null;var m=new WeakMap,g=new WeakMap;return(n=function(v){return v?g:m})(f)}function r(f,m){if(f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var g=n(m);if(g&&g.has(f))return g.get(f);var v={},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in f)if(x!=="default"&&Object.prototype.hasOwnProperty.call(f,x)){var y=b?Object.getOwnPropertyDescriptor(f,x):null;y&&(y.get||y.set)?Object.defineProperty(v,x,y):v[x]=f[x]}return v.default=f,g&&g.set(f,v),v}const o=(f,m=[])=>(Array.isArray(f)?f.forEach(g=>{o(g,m)}):f!=null&&f!==!1&&m.push(f),m),i=f=>{const m=f.type;if(typeof m=="string")return m;if(typeof m=="function")return m.displayName||m.name||"Unknown";if(e.isFragment(f))return"React.Fragment";if(e.isSuspense(f))return"React.Suspense";if(typeof m=="object"&&m!==null){if(e.isContextProvider(f))return"Context.Provider";if(e.isContextConsumer(f))return"Context.Consumer";if(e.isForwardRef(f)){if(m.displayName)return m.displayName;const g=m.render.displayName||m.render.name||"";return g!==""?"ForwardRef("+g+")":"ForwardRef"}if(e.isMemo(f)){const g=m.displayName||m.type.displayName||m.type.name||"";return g!==""?"Memo("+g+")":"Memo"}}return"UNDEFINED"},s=f=>{const{props:m}=f;return Object.keys(m).filter(g=>g!=="children"&&m[g]!==void 0).sort()},a=(f,m,g,v,b,x)=>++v>m.maxDepth?(0,t.printElementAsLeaf)(i(f),m):(0,t.printElement)(i(f),(0,t.printProps)(s(f),f.props,m,g+m.indent,v,b,x),(0,t.printChildren)(o(f.props.children),m,g+m.indent,v,b,x),m,g);Di.serialize=a;const l=f=>f!=null&&e.isElement(f);Di.test=l;var d={serialize:a,test:l};return Di.default=d,Di}var Ai={},I_;function xJ(){if(I_)return Ai;I_=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.test=Ai.serialize=Ai.default=void 0;var e=Xw(),t=(function(){return typeof globalThis<"u"?globalThis:typeof t<"u"?t:typeof self<"u"?self:typeof window<"u"?window:Function("return this")()})(),n=t["jest-symbol-do-not-touch"]||t.Symbol;const r=typeof n=="function"&&n.for?n.for("react.test.json"):245830487,o=c=>{const{props:d}=c;return d?Object.keys(d).filter(f=>d[f]!==void 0).sort():[]},i=(c,d,f,m,g,v)=>++m>d.maxDepth?(0,e.printElementAsLeaf)(c.type,d):(0,e.printElement)(c.type,c.props?(0,e.printProps)(o(c),c.props,d,f+d.indent,m,g,v):"",c.children?(0,e.printChildren)(c.children,d,f+d.indent,m,g,v):"",d,f);Ai.serialize=i;const s=c=>c&&c.$$typeof===r;Ai.test=s;var l={serialize:i,test:s};return Ai.default=l,Ai}var D_;function EJ(){if(D_)return Ho;D_=1,Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.default=Ho.DEFAULT_OPTIONS=void 0,Ho.format=te,Ho.plugins=void 0;var e=c(D$()),t=_v(),n=c(uJ()),r=c(dJ()),o=c(fJ()),i=c(mJ()),s=c(hJ()),a=c(yJ()),l=c(xJ());function c(U){return U&&U.__esModule?U:{default:U}}const d=Object.prototype.toString,f=Date.prototype.toISOString,m=Error.prototype.toString,g=RegExp.prototype.toString,v=U=>typeof U.constructor=="function"&&U.constructor.name||"Object",b=U=>typeof window<"u"&&U===window,x=/^Symbol\((.*)\)(.*)$/,y=/\n/gi;class _ extends Error{constructor(ie,se){super(ie),this.stack=se,this.name=this.constructor.name}}function w(U){return U==="[object Array]"||U==="[object ArrayBuffer]"||U==="[object DataView]"||U==="[object Float32Array]"||U==="[object Float64Array]"||U==="[object Int8Array]"||U==="[object Int16Array]"||U==="[object Int32Array]"||U==="[object Uint8Array]"||U==="[object Uint8ClampedArray]"||U==="[object Uint16Array]"||U==="[object Uint32Array]"}function T(U){return Object.is(U,-0)?"-0":String(U)}function R(U){return`${U}n`}function S(U,ie){return ie?"[Function "+(U.name||"anonymous")+"]":"[Function]"}function P(U){return String(U).replace(x,"Symbol($1)")}function N(U){return"["+m.call(U)+"]"}function F(U,ie,se,Q){if(U===!0||U===!1)return""+U;if(U===void 0)return"undefined";if(U===null)return"null";const me=typeof U;if(me==="number")return T(U);if(me==="bigint")return R(U);if(me==="string")return Q?'"'+U.replace(/"|\\/g,"\\$&")+'"':'"'+U+'"';if(me==="function")return S(U,ie);if(me==="symbol")return P(U);const ve=d.call(U);return ve==="[object WeakMap]"?"WeakMap {}":ve==="[object WeakSet]"?"WeakSet {}":ve==="[object Function]"||ve==="[object GeneratorFunction]"?S(U,ie):ve==="[object Symbol]"?P(U):ve==="[object Date]"?isNaN(+U)?"Date { NaN }":f.call(U):ve==="[object Error]"?N(U):ve==="[object RegExp]"?se?g.call(U).replace(/[\\^$*+?.()|[\]{}]/g,"\\$&"):g.call(U):U instanceof Error?N(U):null}function W(U,ie,se,Q,me,ve){if(me.indexOf(U)!==-1)return"[Circular]";me=me.slice(),me.push(U);const xe=++Q>ie.maxDepth,be=ie.min;if(ie.callToJSON&&!xe&&U.toJSON&&typeof U.toJSON=="function"&&!ve)return k(U.toJSON(),ie,se,Q,me,!0);const Ce=d.call(U);return Ce==="[object Arguments]"?xe?"[Arguments]":(be?"":"Arguments ")+"["+(0,t.printListItems)(U,ie,se,Q,me,k)+"]":w(Ce)?xe?"["+U.constructor.name+"]":(be||!ie.printBasicPrototype&&U.constructor.name==="Array"?"":U.constructor.name+" ")+"["+(0,t.printListItems)(U,ie,se,Q,me,k)+"]":Ce==="[object Map]"?xe?"[Map]":"Map {"+(0,t.printIteratorEntries)(U.entries(),ie,se,Q,me,k," => ")+"}":Ce==="[object Set]"?xe?"[Set]":"Set {"+(0,t.printIteratorValues)(U.values(),ie,se,Q,me,k)+"}":xe||b(U)?"["+v(U)+"]":(be||!ie.printBasicPrototype&&v(U)==="Object"?"":v(U)+" ")+"{"+(0,t.printObjectProperties)(U,ie,se,Q,me,k)+"}"}function I(U){return U.serialize!=null}function B(U,ie,se,Q,me,ve){let xe;try{xe=I(U)?U.serialize(ie,se,Q,me,ve,k):U.print(ie,be=>k(be,se,Q,me,ve),be=>{const Ce=Q+se.indent;return Ce+be.replace(y,`
|
|
55
|
-
`+Ce)},{edgeSpacing:se.spacingOuter,min:se.min,spacing:se.spacingInner},se.colors)}catch(be){throw new _(be.message,be.stack)}if(typeof xe!="string")throw new Error(`pretty-format: Plugin must return type "string" but instead returned "${typeof xe}".`);return xe}function $(U,ie){for(let se=0;se<U.length;se++)try{if(U[se].test(ie))return U[se]}catch(Q){throw new _(Q.message,Q.stack)}return null}function k(U,ie,se,Q,me,ve){const xe=$(ie.plugins,U);if(xe!==null)return B(xe,U,ie,se,Q,me);const be=F(U,ie.printFunctionName,ie.escapeRegex,ie.escapeString);return be!==null?be:W(U,ie,se,Q,me,ve)}const j={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},D=Object.keys(j),A={callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:1/0,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,theme:j};Ho.DEFAULT_OPTIONS=A;function L(U){if(Object.keys(U).forEach(ie=>{if(!A.hasOwnProperty(ie))throw new Error(`pretty-format: Unknown option "${ie}".`)}),U.min&&U.indent!==void 0&&U.indent!==0)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.');if(U.theme!==void 0){if(U.theme===null)throw new Error('pretty-format: Option "theme" must not be null.');if(typeof U.theme!="object")throw new Error(`pretty-format: Option "theme" must be of type "object" but instead received "${typeof U.theme}".`)}}const H=U=>D.reduce((ie,se)=>{const Q=U.theme&&U.theme[se]!==void 0?U.theme[se]:j[se],me=Q&&e.default[Q];if(me&&typeof me.close=="string"&&typeof me.open=="string")ie[se]=me;else throw new Error(`pretty-format: Option "theme" has a key "${se}" whose value "${Q}" is undefined in ansi-styles.`);return ie},Object.create(null)),V=()=>D.reduce((U,ie)=>(U[ie]={close:"",open:""},U),Object.create(null)),X=U=>U&&U.printFunctionName!==void 0?U.printFunctionName:A.printFunctionName,K=U=>U&&U.escapeRegex!==void 0?U.escapeRegex:A.escapeRegex,G=U=>U&&U.escapeString!==void 0?U.escapeString:A.escapeString,ee=U=>{var ie;return{callToJSON:U&&U.callToJSON!==void 0?U.callToJSON:A.callToJSON,colors:U&&U.highlight?H(U):V(),compareKeys:U&&typeof U.compareKeys=="function"?U.compareKeys:A.compareKeys,escapeRegex:K(U),escapeString:G(U),indent:U&&U.min?"":Z(U&&U.indent!==void 0?U.indent:A.indent),maxDepth:U&&U.maxDepth!==void 0?U.maxDepth:A.maxDepth,min:U&&U.min!==void 0?U.min:A.min,plugins:U&&U.plugins!==void 0?U.plugins:A.plugins,printBasicPrototype:(ie=U?.printBasicPrototype)!==null&&ie!==void 0?ie:!0,printFunctionName:X(U),spacingInner:U&&U.min?" ":`
|
|
56
|
-
`,spacingOuter:U&&U.min?"":`
|
|
57
|
-
`}};function Z(U){return new Array(U+1).join(" ")}function te(U,ie){if(ie&&(L(ie),ie.plugins)){const Q=$(ie.plugins,U);if(Q!==null)return B(Q,U,ee(ie),"",0,[])}const se=F(U,X(ie),K(ie),G(ie));return se!==null?se:W(U,ee(ie),"",0,[])}const J={AsymmetricMatcher:n.default,ConvertAnsi:r.default,DOMCollection:o.default,DOMElement:i.default,Immutable:s.default,ReactElement:a.default,ReactTestComponent:l.default};Ho.plugins=J;var ne=te;return Ho.default=ne,Ho}var A$=EJ(),wJ=Object.prototype.toString;function CJ(e){return typeof e=="function"||wJ.call(e)==="[object Function]"}function RJ(e){var t=Number(e);return isNaN(t)?0:t===0||!isFinite(t)?t:(t>0?1:-1)*Math.floor(Math.abs(t))}var SJ=Math.pow(2,53)-1;function PJ(e){var t=RJ(e);return Math.min(Math.max(t,0),SJ)}function So(e,t){var n=Array,r=Object(e);if(e==null)throw new TypeError("Array.from requires an array-like object - not null or undefined");for(var o=PJ(r.length),i=CJ(n)?Object(new n(o)):new Array(o),s=0,a;s<o;)a=r[s],i[s]=a,s+=1;return i.length=o,i}function np(e){"@babel/helpers - typeof";return np=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},np(e)}function TJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _J(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,k$(r.key),r)}}function NJ(e,t,n){return t&&_J(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function OJ(e,t,n){return t=k$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k$(e){var t=MJ(e,"string");return np(t)==="symbol"?t:String(t)}function MJ(e,t){if(np(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(np(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var IJ=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];TJ(this,e),OJ(this,"items",void 0),this.items=t}return NJ(e,[{key:"add",value:function(n){return this.has(n)===!1&&this.items.push(n),this}},{key:"clear",value:function(){this.items=[]}},{key:"delete",value:function(n){var r=this.items.length;return this.items=this.items.filter(function(o){return o!==n}),r!==this.items.length}},{key:"forEach",value:function(n){var r=this;this.items.forEach(function(o){n(o,o,r)})}},{key:"has",value:function(n){return this.items.indexOf(n)!==-1}},{key:"size",get:function(){return this.items.length}}]),e})();const DJ=typeof Set>"u"?Set:IJ;function ir(e){var t;return(t=e.localName)!==null&&t!==void 0?t:e.tagName.toLowerCase()}var AJ={article:"article",aside:"complementary",button:"button",datalist:"listbox",dd:"definition",details:"group",dialog:"dialog",dt:"term",fieldset:"group",figure:"figure",form:"form",footer:"contentinfo",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",header:"banner",hr:"separator",html:"document",legend:"legend",li:"listitem",math:"math",main:"main",menu:"list",nav:"navigation",ol:"list",optgroup:"group",option:"option",output:"status",progress:"progressbar",section:"region",summary:"button",table:"table",tbody:"rowgroup",textarea:"textbox",tfoot:"rowgroup",td:"cell",th:"columnheader",thead:"rowgroup",tr:"row",ul:"list"},kJ={caption:new Set(["aria-label","aria-labelledby"]),code:new Set(["aria-label","aria-labelledby"]),deletion:new Set(["aria-label","aria-labelledby"]),emphasis:new Set(["aria-label","aria-labelledby"]),generic:new Set(["aria-label","aria-labelledby","aria-roledescription"]),insertion:new Set(["aria-label","aria-labelledby"]),paragraph:new Set(["aria-label","aria-labelledby"]),presentation:new Set(["aria-label","aria-labelledby"]),strong:new Set(["aria-label","aria-labelledby"]),subscript:new Set(["aria-label","aria-labelledby"]),superscript:new Set(["aria-label","aria-labelledby"])};function $J(e,t){return["aria-atomic","aria-busy","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-flowto","aria-grabbed","aria-hidden","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-relevant","aria-roledescription"].some(function(n){var r;return e.hasAttribute(n)&&!((r=kJ[t])!==null&&r!==void 0&&r.has(n))})}function $$(e,t){return $J(e,t)}function FJ(e){var t=jJ(e);if(t===null||t==="presentation"){var n=LJ(e);if(t!=="presentation"||$$(e,n||""))return n}return t}function LJ(e){var t=AJ[ir(e)];if(t!==void 0)return t;switch(ir(e)){case"a":case"area":case"link":if(e.hasAttribute("href"))return"link";break;case"img":return e.getAttribute("alt")===""&&!$$(e,"img")?"presentation":"img";case"input":{var n=e,r=n.type;switch(r){case"button":case"image":case"reset":case"submit":return"button";case"checkbox":case"radio":return r;case"range":return"slider";case"email":case"tel":case"text":case"url":return e.hasAttribute("list")?"combobox":"textbox";case"search":return e.hasAttribute("list")?"combobox":"searchbox";case"number":return"spinbutton";default:return null}}case"select":return e.hasAttribute("multiple")||e.size>1?"listbox":"combobox"}return null}function jJ(e){var t=e.getAttribute("role");if(t!==null){var n=t.trim().split(" ")[0];if(n.length>0)return n}return null}function cn(e){return e!==null&&e.nodeType===e.ELEMENT_NODE}function F$(e){return cn(e)&&ir(e)==="caption"}function ug(e){return cn(e)&&ir(e)==="input"}function qJ(e){return cn(e)&&ir(e)==="optgroup"}function BJ(e){return cn(e)&&ir(e)==="select"}function VJ(e){return cn(e)&&ir(e)==="table"}function WJ(e){return cn(e)&&ir(e)==="textarea"}function HJ(e){var t=e.ownerDocument===null?e:e.ownerDocument,n=t.defaultView;if(n===null)throw new TypeError("no window available");return n}function KJ(e){return cn(e)&&ir(e)==="fieldset"}function UJ(e){return cn(e)&&ir(e)==="legend"}function zJ(e){return cn(e)&&ir(e)==="slot"}function GJ(e){return cn(e)&&e.ownerSVGElement!==void 0}function YJ(e){return cn(e)&&ir(e)==="svg"}function XJ(e){return GJ(e)&&ir(e)==="title"}function Lg(e,t){if(cn(e)&&e.hasAttribute(t)){var n=e.getAttribute(t).split(" "),r=e.getRootNode?e.getRootNode():e.ownerDocument;return n.map(function(o){return r.getElementById(o)}).filter(function(o){return o!==null})}return[]}function ji(e,t){return cn(e)?t.indexOf(FJ(e))!==-1:!1}function ZJ(e){return e.trim().replace(/\s\s+/g," ")}function JJ(e,t){if(!cn(e))return!1;if(e.hasAttribute("hidden")||e.getAttribute("aria-hidden")==="true")return!0;var n=t(e);return n.getPropertyValue("display")==="none"||n.getPropertyValue("visibility")==="hidden"}function QJ(e){return ji(e,["button","combobox","listbox","textbox"])||L$(e,"range")}function L$(e,t){if(!cn(e))return!1;switch(t){case"range":return ji(e,["meter","progressbar","scrollbar","slider","spinbutton"]);default:throw new TypeError("No knowledge about abstract role '".concat(t,"'. This is likely a bug :("))}}function A_(e,t){var n=So(e.querySelectorAll(t));return Lg(e,"aria-owns").forEach(function(r){n.push.apply(n,So(r.querySelectorAll(t)))}),n}function eQ(e){return BJ(e)?e.selectedOptions||A_(e,"[selected]"):A_(e,'[aria-selected="true"]')}function tQ(e){return ji(e,["none","presentation"])}function nQ(e){return F$(e)}function rQ(e){return ji(e,["button","cell","checkbox","columnheader","gridcell","heading","label","legend","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"])}function oQ(e){return!1}function iQ(e){return ug(e)||WJ(e)?e.value:e.textContent||""}function k_(e){var t=e.getPropertyValue("content");return/^["'].*["']$/.test(t)?t.slice(1,-1):""}function j$(e){var t=ir(e);return t==="button"||t==="input"&&e.getAttribute("type")!=="hidden"||t==="meter"||t==="output"||t==="progress"||t==="select"||t==="textarea"}function q$(e){if(j$(e))return e;var t=null;return e.childNodes.forEach(function(n){if(t===null&&cn(n)){var r=q$(n);r!==null&&(t=r)}}),t}function sQ(e){if(e.control!==void 0)return e.control;var t=e.getAttribute("for");return t!==null?e.ownerDocument.getElementById(t):q$(e)}function aQ(e){var t=e.labels;if(t===null)return t;if(t!==void 0)return So(t);if(!j$(e))return null;var n=e.ownerDocument;return So(n.querySelectorAll("label")).filter(function(r){return sQ(r)===e})}function lQ(e){var t=e.assignedNodes();return t.length===0?So(e.childNodes):t}function B$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new DJ,r=HJ(e),o=t.compute,i=o===void 0?"name":o,s=t.computedStyleSupportsPseudoElements,a=s===void 0?t.getComputedStyle!==void 0:s,l=t.getComputedStyle,c=l===void 0?r.getComputedStyle.bind(r):l,d=t.hidden,f=d===void 0?!1:d;function m(y,_){var w="";if(cn(y)&&a){var T=c(y,"::before"),R=k_(T);w="".concat(R," ").concat(w)}var S=zJ(y)?lQ(y):So(y.childNodes).concat(Lg(y,"aria-owns"));if(S.forEach(function(F){var W=x(F,{isEmbeddedInLabel:_.isEmbeddedInLabel,isReferenced:!1,recursion:!0}),I=cn(F)?c(F).getPropertyValue("display"):"inline",B=I!=="inline"?" ":"";w+="".concat(B).concat(W).concat(B)}),cn(y)&&a){var P=c(y,"::after"),N=k_(P);w="".concat(w," ").concat(N)}return w.trim()}function g(y,_){var w=y.getAttributeNode(_);return w!==null&&!n.has(w)&&w.value.trim()!==""?(n.add(w),w.value):null}function v(y){return cn(y)?g(y,"title"):null}function b(y){if(!cn(y))return null;if(KJ(y)){n.add(y);for(var _=So(y.childNodes),w=0;w<_.length;w+=1){var T=_[w];if(UJ(T))return x(T,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(VJ(y)){n.add(y);for(var R=So(y.childNodes),S=0;S<R.length;S+=1){var P=R[S];if(F$(P))return x(P,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(YJ(y)){n.add(y);for(var N=So(y.childNodes),F=0;F<N.length;F+=1){var W=N[F];if(XJ(W))return W.textContent}return null}else if(ir(y)==="img"||ir(y)==="area"){var I=g(y,"alt");if(I!==null)return I}else if(qJ(y)){var B=g(y,"label");if(B!==null)return B}if(ug(y)&&(y.type==="button"||y.type==="submit"||y.type==="reset")){var $=g(y,"value");if($!==null)return $;if(y.type==="submit")return"Submit";if(y.type==="reset")return"Reset"}var k=aQ(y);if(k!==null&&k.length!==0)return n.add(y),So(k).map(function(L){return x(L,{isEmbeddedInLabel:!0,isReferenced:!1,recursion:!0})}).filter(function(L){return L.length>0}).join(" ");if(ug(y)&&y.type==="image"){var j=g(y,"alt");if(j!==null)return j;var D=g(y,"title");return D!==null?D:"Submit Query"}if(ji(y,["button"])){var A=m(y,{isEmbeddedInLabel:!1});if(A!=="")return A}return null}function x(y,_){if(n.has(y))return"";if(!f&&JJ(y,c)&&!_.isReferenced)return n.add(y),"";var w=cn(y)?y.getAttributeNode("aria-labelledby"):null,T=w!==null&&!n.has(w)?Lg(y,"aria-labelledby"):[];if(i==="name"&&!_.isReferenced&&T.length>0)return n.add(w),T.map(function(I){return x(I,{isEmbeddedInLabel:_.isEmbeddedInLabel,isReferenced:!0,recursion:!1})}).join(" ");var R=_.recursion&&QJ(y)&&i==="name";if(!R){var S=(cn(y)&&y.getAttribute("aria-label")||"").trim();if(S!==""&&i==="name")return n.add(y),S;if(!tQ(y)){var P=b(y);if(P!==null)return n.add(y),P}}if(ji(y,["menu"]))return n.add(y),"";if(R||_.isEmbeddedInLabel||_.isReferenced){if(ji(y,["combobox","listbox"])){n.add(y);var N=eQ(y);return N.length===0?ug(y)?y.value:"":So(N).map(function(I){return x(I,{isEmbeddedInLabel:_.isEmbeddedInLabel,isReferenced:!1,recursion:!0})}).join(" ")}if(L$(y,"range"))return n.add(y),y.hasAttribute("aria-valuetext")?y.getAttribute("aria-valuetext"):y.hasAttribute("aria-valuenow")?y.getAttribute("aria-valuenow"):y.getAttribute("value")||"";if(ji(y,["textbox"]))return n.add(y),iQ(y)}if(rQ(y)||cn(y)&&_.isReferenced||nQ(y)||oQ()){var F=m(y,{isEmbeddedInLabel:_.isEmbeddedInLabel});if(F!=="")return n.add(y),F}if(y.nodeType===y.TEXT_NODE)return n.add(y),y.textContent||"";if(_.recursion)return n.add(y),m(y,{isEmbeddedInLabel:_.isEmbeddedInLabel});var W=v(y);return W!==null?(n.add(y),W):(n.add(y),"")}return ZJ(x(e,{isEmbeddedInLabel:!1,isReferenced:i==="description",recursion:!1}))}function rp(e){"@babel/helpers - typeof";return rp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rp(e)}function $_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function F_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$_(Object(n),!0).forEach(function(r){uQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uQ(e,t,n){return t=cQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cQ(e){var t=dQ(e,"string");return rp(t)==="symbol"?t:String(t)}function dQ(e,t){if(rp(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rp(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function V$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Lg(e,"aria-describedby").map(function(o){return B$(o,F_(F_({},t),{},{compute:"description"}))}).join(" ");if(n===""){var r=e.getAttribute("title");n=r===null?"":r}return n}function fQ(e){return ji(e,["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"])}function Zw(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return fQ(e)?"":B$(e,t)}var jr={},Uu={},kh={},zu={},L_;function pQ(){if(L_)return zu;L_=1,Object.defineProperty(zu,"__esModule",{value:!0}),zu.default=void 0;function e(){var n=this,r=0,o={"@@iterator":function(){return o},next:function(){if(r<n.length){var s=n[r];return r=r+1,{done:!1,value:s}}else return{done:!0}}};return o}var t=e;return zu.default=t,zu}var j_;function qp(){if(j_)return kh;j_=1,Object.defineProperty(kh,"__esModule",{value:!0}),kh.default=r;var e=t(pQ());function t(o){return o&&o.__esModule?o:{default:o}}function n(o){"@babel/helpers - typeof";return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},n(o)}function r(o,i){return typeof Symbol=="function"&&n(Symbol.iterator)==="symbol"&&Object.defineProperty(o,Symbol.iterator,{value:e.default.bind(i)}),o}return kh}var q_;function mQ(){if(q_)return Uu;q_=1,Object.defineProperty(Uu,"__esModule",{value:!0}),Uu.default=void 0;var e=t(qp());function t(m){return m&&m.__esModule?m:{default:m}}function n(m,g){return i(m)||o(m,g)||a(m,g)||r()}function r(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
58
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o(m,g){var v=m==null?null:typeof Symbol<"u"&&m[Symbol.iterator]||m["@@iterator"];if(v!=null){var b=[],x=!0,y=!1,_,w;try{for(v=v.call(m);!(x=(_=v.next()).done)&&(b.push(_.value),!(g&&b.length===g));x=!0);}catch(T){y=!0,w=T}finally{try{!x&&v.return!=null&&v.return()}finally{if(y)throw w}}return b}}function i(m){if(Array.isArray(m))return m}function s(m,g){var v=typeof Symbol<"u"&&m[Symbol.iterator]||m["@@iterator"];if(!v){if(Array.isArray(m)||(v=a(m))||g){v&&(m=v);var b=0,x=function(){};return{s:x,n:function(){return b>=m.length?{done:!0}:{done:!1,value:m[b++]}},e:function(R){throw R},f:x}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
59
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var y=!0,_=!1,w;return{s:function(){v=v.call(m)},n:function(){var R=v.next();return y=R.done,R},e:function(R){_=!0,w=R},f:function(){try{!y&&v.return!=null&&v.return()}finally{if(_)throw w}}}}function a(m,g){if(m){if(typeof m=="string")return l(m,g);var v=Object.prototype.toString.call(m).slice(8,-1);if(v==="Object"&&m.constructor&&(v=m.constructor.name),v==="Map"||v==="Set")return Array.from(m);if(v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v))return l(m,g)}}function l(m,g){(g==null||g>m.length)&&(g=m.length);for(var v=0,b=new Array(g);v<g;v++)b[v]=m[v];return b}var c=[["aria-activedescendant",{type:"id"}],["aria-atomic",{type:"boolean"}],["aria-autocomplete",{type:"token",values:["inline","list","both","none"]}],["aria-braillelabel",{type:"string"}],["aria-brailleroledescription",{type:"string"}],["aria-busy",{type:"boolean"}],["aria-checked",{type:"tristate"}],["aria-colcount",{type:"integer"}],["aria-colindex",{type:"integer"}],["aria-colspan",{type:"integer"}],["aria-controls",{type:"idlist"}],["aria-current",{type:"token",values:["page","step","location","date","time",!0,!1]}],["aria-describedby",{type:"idlist"}],["aria-description",{type:"string"}],["aria-details",{type:"id"}],["aria-disabled",{type:"boolean"}],["aria-dropeffect",{type:"tokenlist",values:["copy","execute","link","move","none","popup"]}],["aria-errormessage",{type:"id"}],["aria-expanded",{type:"boolean",allowundefined:!0}],["aria-flowto",{type:"idlist"}],["aria-grabbed",{type:"boolean",allowundefined:!0}],["aria-haspopup",{type:"token",values:[!1,!0,"menu","listbox","tree","grid","dialog"]}],["aria-hidden",{type:"boolean",allowundefined:!0}],["aria-invalid",{type:"token",values:["grammar",!1,"spelling",!0]}],["aria-keyshortcuts",{type:"string"}],["aria-label",{type:"string"}],["aria-labelledby",{type:"idlist"}],["aria-level",{type:"integer"}],["aria-live",{type:"token",values:["assertive","off","polite"]}],["aria-modal",{type:"boolean"}],["aria-multiline",{type:"boolean"}],["aria-multiselectable",{type:"boolean"}],["aria-orientation",{type:"token",values:["vertical","undefined","horizontal"]}],["aria-owns",{type:"idlist"}],["aria-placeholder",{type:"string"}],["aria-posinset",{type:"integer"}],["aria-pressed",{type:"tristate"}],["aria-readonly",{type:"boolean"}],["aria-relevant",{type:"tokenlist",values:["additions","all","removals","text"]}],["aria-required",{type:"boolean"}],["aria-roledescription",{type:"string"}],["aria-rowcount",{type:"integer"}],["aria-rowindex",{type:"integer"}],["aria-rowspan",{type:"integer"}],["aria-selected",{type:"boolean",allowundefined:!0}],["aria-setsize",{type:"integer"}],["aria-sort",{type:"token",values:["ascending","descending","none","other"]}],["aria-valuemax",{type:"number"}],["aria-valuemin",{type:"number"}],["aria-valuenow",{type:"number"}],["aria-valuetext",{type:"string"}]],d={entries:function(){return c},forEach:function(g){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,b=s(c),x;try{for(b.s();!(x=b.n()).done;){var y=n(x.value,2),_=y[0],w=y[1];g.call(v,w,_,c)}}catch(T){b.e(T)}finally{b.f()}},get:function(g){var v=c.find(function(b){return b[0]===g});return v&&v[1]},has:function(g){return!!d.get(g)},keys:function(){return c.map(function(g){var v=n(g,1),b=v[0];return b})},values:function(){return c.map(function(g){var v=n(g,2),b=v[1];return b})}},f=(0,e.default)(d,d.entries());return Uu.default=f,Uu}var Gu={},B_;function hQ(){if(B_)return Gu;B_=1,Object.defineProperty(Gu,"__esModule",{value:!0}),Gu.default=void 0;var e=t(qp());function t(m){return m&&m.__esModule?m:{default:m}}function n(m,g){return i(m)||o(m,g)||a(m,g)||r()}function r(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
60
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o(m,g){var v=m==null?null:typeof Symbol<"u"&&m[Symbol.iterator]||m["@@iterator"];if(v!=null){var b=[],x=!0,y=!1,_,w;try{for(v=v.call(m);!(x=(_=v.next()).done)&&(b.push(_.value),!(g&&b.length===g));x=!0);}catch(T){y=!0,w=T}finally{try{!x&&v.return!=null&&v.return()}finally{if(y)throw w}}return b}}function i(m){if(Array.isArray(m))return m}function s(m,g){var v=typeof Symbol<"u"&&m[Symbol.iterator]||m["@@iterator"];if(!v){if(Array.isArray(m)||(v=a(m))||g){v&&(m=v);var b=0,x=function(){};return{s:x,n:function(){return b>=m.length?{done:!0}:{done:!1,value:m[b++]}},e:function(R){throw R},f:x}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
61
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var y=!0,_=!1,w;return{s:function(){v=v.call(m)},n:function(){var R=v.next();return y=R.done,R},e:function(R){_=!0,w=R},f:function(){try{!y&&v.return!=null&&v.return()}finally{if(_)throw w}}}}function a(m,g){if(m){if(typeof m=="string")return l(m,g);var v=Object.prototype.toString.call(m).slice(8,-1);if(v==="Object"&&m.constructor&&(v=m.constructor.name),v==="Map"||v==="Set")return Array.from(m);if(v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v))return l(m,g)}}function l(m,g){(g==null||g>m.length)&&(g=m.length);for(var v=0,b=new Array(g);v<g;v++)b[v]=m[v];return b}var c=[["a",{reserved:!1}],["abbr",{reserved:!1}],["acronym",{reserved:!1}],["address",{reserved:!1}],["applet",{reserved:!1}],["area",{reserved:!1}],["article",{reserved:!1}],["aside",{reserved:!1}],["audio",{reserved:!1}],["b",{reserved:!1}],["base",{reserved:!0}],["bdi",{reserved:!1}],["bdo",{reserved:!1}],["big",{reserved:!1}],["blink",{reserved:!1}],["blockquote",{reserved:!1}],["body",{reserved:!1}],["br",{reserved:!1}],["button",{reserved:!1}],["canvas",{reserved:!1}],["caption",{reserved:!1}],["center",{reserved:!1}],["cite",{reserved:!1}],["code",{reserved:!1}],["col",{reserved:!0}],["colgroup",{reserved:!0}],["content",{reserved:!1}],["data",{reserved:!1}],["datalist",{reserved:!1}],["dd",{reserved:!1}],["del",{reserved:!1}],["details",{reserved:!1}],["dfn",{reserved:!1}],["dialog",{reserved:!1}],["dir",{reserved:!1}],["div",{reserved:!1}],["dl",{reserved:!1}],["dt",{reserved:!1}],["em",{reserved:!1}],["embed",{reserved:!1}],["fieldset",{reserved:!1}],["figcaption",{reserved:!1}],["figure",{reserved:!1}],["font",{reserved:!1}],["footer",{reserved:!1}],["form",{reserved:!1}],["frame",{reserved:!1}],["frameset",{reserved:!1}],["h1",{reserved:!1}],["h2",{reserved:!1}],["h3",{reserved:!1}],["h4",{reserved:!1}],["h5",{reserved:!1}],["h6",{reserved:!1}],["head",{reserved:!0}],["header",{reserved:!1}],["hgroup",{reserved:!1}],["hr",{reserved:!1}],["html",{reserved:!0}],["i",{reserved:!1}],["iframe",{reserved:!1}],["img",{reserved:!1}],["input",{reserved:!1}],["ins",{reserved:!1}],["kbd",{reserved:!1}],["keygen",{reserved:!1}],["label",{reserved:!1}],["legend",{reserved:!1}],["li",{reserved:!1}],["link",{reserved:!0}],["main",{reserved:!1}],["map",{reserved:!1}],["mark",{reserved:!1}],["marquee",{reserved:!1}],["menu",{reserved:!1}],["menuitem",{reserved:!1}],["meta",{reserved:!0}],["meter",{reserved:!1}],["nav",{reserved:!1}],["noembed",{reserved:!0}],["noscript",{reserved:!0}],["object",{reserved:!1}],["ol",{reserved:!1}],["optgroup",{reserved:!1}],["option",{reserved:!1}],["output",{reserved:!1}],["p",{reserved:!1}],["param",{reserved:!0}],["picture",{reserved:!0}],["pre",{reserved:!1}],["progress",{reserved:!1}],["q",{reserved:!1}],["rp",{reserved:!1}],["rt",{reserved:!1}],["rtc",{reserved:!1}],["ruby",{reserved:!1}],["s",{reserved:!1}],["samp",{reserved:!1}],["script",{reserved:!0}],["section",{reserved:!1}],["select",{reserved:!1}],["small",{reserved:!1}],["source",{reserved:!0}],["spacer",{reserved:!1}],["span",{reserved:!1}],["strike",{reserved:!1}],["strong",{reserved:!1}],["style",{reserved:!0}],["sub",{reserved:!1}],["summary",{reserved:!1}],["sup",{reserved:!1}],["table",{reserved:!1}],["tbody",{reserved:!1}],["td",{reserved:!1}],["textarea",{reserved:!1}],["tfoot",{reserved:!1}],["th",{reserved:!1}],["thead",{reserved:!1}],["time",{reserved:!1}],["title",{reserved:!0}],["tr",{reserved:!1}],["track",{reserved:!0}],["tt",{reserved:!1}],["u",{reserved:!1}],["ul",{reserved:!1}],["var",{reserved:!1}],["video",{reserved:!1}],["wbr",{reserved:!1}],["xmp",{reserved:!1}]],d={entries:function(){return c},forEach:function(g){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,b=s(c),x;try{for(b.s();!(x=b.n()).done;){var y=n(x.value,2),_=y[0],w=y[1];g.call(v,w,_,c)}}catch(T){b.e(T)}finally{b.f()}},get:function(g){var v=c.find(function(b){return b[0]===g});return v&&v[1]},has:function(g){return!!d.get(g)},keys:function(){return c.map(function(g){var v=n(g,1),b=v[0];return b})},values:function(){return c.map(function(g){var v=n(g,2),b=v[1];return b})}},f=(0,e.default)(d,d.entries());return Gu.default=f,Gu}var Yu={},Xu={},Zu={},V_;function gQ(){if(V_)return Zu;V_=1,Object.defineProperty(Zu,"__esModule",{value:!0}),Zu.default=void 0;var e={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget"]]},t=e;return Zu.default=t,Zu}var Ju={},W_;function vQ(){if(W_)return Ju;W_=1,Object.defineProperty(Ju,"__esModule",{value:!0}),Ju.default=void 0;var e={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-activedescendant":null,"aria-disabled":null},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget"]]},t=e;return Ju.default=t,Ju}var Qu={},H_;function bQ(){if(H_)return Qu;H_=1,Object.defineProperty(Qu,"__esModule",{value:!0}),Qu.default=void 0;var e={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null},relatedConcepts:[{concept:{name:"input"},module:"XForms"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget"]]},t=e;return Qu.default=t,Qu}var ec={},K_;function yQ(){if(K_)return ec;K_=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.default=void 0;var e={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return ec.default=t,ec}var tc={},U_;function xQ(){if(U_)return tc;U_=1,Object.defineProperty(tc,"__esModule",{value:!0}),tc.default=void 0;var e={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure"]]},t=e;return tc.default=t,tc}var nc={},z_;function EQ(){if(z_)return nc;z_=1,Object.defineProperty(nc,"__esModule",{value:!0}),nc.default=void 0;var e={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:[],prohibitedProps:[],props:{"aria-atomic":null,"aria-busy":null,"aria-controls":null,"aria-current":null,"aria-describedby":null,"aria-details":null,"aria-dropeffect":null,"aria-flowto":null,"aria-grabbed":null,"aria-hidden":null,"aria-keyshortcuts":null,"aria-label":null,"aria-labelledby":null,"aria-live":null,"aria-owns":null,"aria-relevant":null,"aria-roledescription":null},relatedConcepts:[{concept:{name:"role"},module:"XHTML"},{concept:{name:"type"},module:"Dublin Core"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[]},t=e;return nc.default=t,nc}var rc={},G_;function wQ(){if(G_)return rc;G_=1,Object.defineProperty(rc,"__esModule",{value:!0}),rc.default=void 0;var e={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:[],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"frontmatter"},module:"DTB"},{concept:{name:"level"},module:"DTB"},{concept:{name:"level"},module:"SMIL"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure"]]},t=e;return rc.default=t,rc}var oc={},Y_;function CQ(){if(Y_)return oc;Y_=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.default=void 0;var e={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure"]]},t=e;return oc.default=t,oc}var ic={},X_;function RQ(){if(X_)return ic;X_=1,Object.defineProperty(ic,"__esModule",{value:!0}),ic.default=void 0;var e={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-orientation":null},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","composite"],["roletype","structure","section","group"]]},t=e;return ic.default=t,ic}var sc={},Z_;function SQ(){if(Z_)return sc;Z_=1,Object.defineProperty(sc,"__esModule",{value:!0}),sc.default=void 0;var e={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:[],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype"]]},t=e;return sc.default=t,sc}var ac={},J_;function PQ(){if(J_)return ac;J_=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.default=void 0;var e={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:[],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype"]]},t=e;return ac.default=t,ac}var lc={},Q_;function TQ(){if(Q_)return lc;Q_=1,Object.defineProperty(lc,"__esModule",{value:!0}),lc.default=void 0;var e={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-modal":null},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype"]]},t=e;return lc.default=t,lc}var eN;function _Q(){if(eN)return Xu;eN=1,Object.defineProperty(Xu,"__esModule",{value:!0}),Xu.default=void 0;var e=m(gQ()),t=m(vQ()),n=m(bQ()),r=m(yQ()),o=m(xQ()),i=m(EQ()),s=m(wQ()),a=m(CQ()),l=m(RQ()),c=m(SQ()),d=m(PQ()),f=m(TQ());function m(b){return b&&b.__esModule?b:{default:b}}var g=[["command",e.default],["composite",t.default],["input",n.default],["landmark",r.default],["range",o.default],["roletype",i.default],["section",s.default],["sectionhead",a.default],["select",l.default],["structure",c.default],["widget",d.default],["window",f.default]],v=g;return Xu.default=v,Xu}var uc={},cc={},tN;function NQ(){if(tN)return cc;tN=1,Object.defineProperty(cc,"__esModule",{value:!0}),cc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-atomic":"true","aria-live":"assertive"},relatedConcepts:[{concept:{name:"alert"},module:"XForms"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return cc.default=t,cc}var dc={},nN;function OQ(){if(nN)return dc;nN=1,Object.defineProperty(dc,"__esModule",{value:!0}),dc.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"alert"},module:"XForms"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","alert"],["roletype","window","dialog"]]},t=e;return dc.default=t,dc}var fc={},rN;function MQ(){if(rN)return fc;rN=1,Object.defineProperty(fc,"__esModule",{value:!0}),fc.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-activedescendant":null,"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"Device Independence Delivery Unit"}}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure"]]},t=e;return fc.default=t,fc}var pc={},oN;function IQ(){if(oN)return pc;oN=1,Object.defineProperty(pc,"__esModule",{value:!0}),pc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-posinset":null,"aria-setsize":null},relatedConcepts:[{concept:{name:"article"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","document"]]},t=e;return pc.default=t,pc}var mc={},iN;function DQ(){if(iN)return mc;iN=1,Object.defineProperty(mc,"__esModule",{value:!0}),mc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{constraints:["scoped to the body element"],name:"header"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return mc.default=t,mc}var hc={},sN;function AQ(){if(sN)return hc;sN=1,Object.defineProperty(hc,"__esModule",{value:!0}),hc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"blockquote"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return hc.default=t,hc}var gc={},aN;function kQ(){if(aN)return gc;aN=1,Object.defineProperty(gc,"__esModule",{value:!0}),gc.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-disabled":null,"aria-expanded":null,"aria-haspopup":null,"aria-pressed":null},relatedConcepts:[{concept:{attributes:[{name:"type",value:"button"}],name:"input"},module:"HTML"},{concept:{attributes:[{name:"type",value:"image"}],name:"input"},module:"HTML"},{concept:{attributes:[{name:"type",value:"reset"}],name:"input"},module:"HTML"},{concept:{attributes:[{name:"type",value:"submit"}],name:"input"},module:"HTML"},{concept:{name:"button"},module:"HTML"},{concept:{name:"trigger"},module:"XForms"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","command"]]},t=e;return gc.default=t,gc}var vc={},lN;function $Q(){if(lN)return vc;lN=1,Object.defineProperty(vc,"__esModule",{value:!0}),vc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"caption"},module:"HTML"}],requireContextRole:["figure","grid","table"],requiredContextRole:["figure","grid","table"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return vc.default=t,vc}var bc={},uN;function FQ(){if(uN)return bc;uN=1,Object.defineProperty(bc,"__esModule",{value:!0}),bc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-colindex":null,"aria-colspan":null,"aria-rowindex":null,"aria-rowspan":null},relatedConcepts:[{concept:{constraints:["ancestor table element has table role"],name:"td"},module:"HTML"}],requireContextRole:["row"],requiredContextRole:["row"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return bc.default=t,bc}var yc={},cN;function LQ(){if(cN)return yc;cN=1,Object.defineProperty(yc,"__esModule",{value:!0}),yc.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-checked":null,"aria-errormessage":null,"aria-expanded":null,"aria-invalid":null,"aria-readonly":null,"aria-required":null},relatedConcepts:[{concept:{attributes:[{name:"type",value:"checkbox"}],name:"input"},module:"HTML"},{concept:{name:"option"},module:"ARIA"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{"aria-checked":null},superClass:[["roletype","widget","input"]]},t=e;return yc.default=t,yc}var xc={},dN;function jQ(){if(dN)return xc;dN=1,Object.defineProperty(xc,"__esModule",{value:!0}),xc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"code"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return xc.default=t,xc}var Ec={},fN;function qQ(){if(fN)return Ec;fN=1,Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-sort":null},relatedConcepts:[{concept:{name:"th"},module:"HTML"},{concept:{attributes:[{name:"scope",value:"col"}],name:"th"},module:"HTML"},{concept:{attributes:[{name:"scope",value:"colgroup"}],name:"th"},module:"HTML"}],requireContextRole:["row"],requiredContextRole:["row"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","cell"],["roletype","structure","section","cell","gridcell"],["roletype","widget","gridcell"],["roletype","structure","sectionhead"]]},t=e;return Ec.default=t,Ec}var wc={},pN;function BQ(){if(pN)return wc;pN=1,Object.defineProperty(wc,"__esModule",{value:!0}),wc.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-activedescendant":null,"aria-autocomplete":null,"aria-errormessage":null,"aria-invalid":null,"aria-readonly":null,"aria-required":null,"aria-expanded":"false","aria-haspopup":"listbox"},relatedConcepts:[{concept:{attributes:[{constraints:["set"],name:"list"},{name:"type",value:"email"}],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"list"},{name:"type",value:"search"}],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"list"},{name:"type",value:"tel"}],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"list"},{name:"type",value:"text"}],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"list"},{name:"type",value:"url"}],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"list"},{name:"type",value:"url"}],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["undefined"],name:"multiple"},{constraints:["undefined"],name:"size"}],constraints:["the multiple attribute is not set and the size attribute does not have a value greater than 1"],name:"select"},module:"HTML"},{concept:{name:"select"},module:"XForms"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{"aria-controls":null,"aria-expanded":"false"},superClass:[["roletype","widget","input"]]},t=e;return wc.default=t,wc}var Cc={},mN;function VQ(){if(mN)return Cc;mN=1,Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"aside"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"aria-label"}],constraints:["scoped to a sectioning content element","scoped to a sectioning root element other than body"],name:"aside"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"aria-labelledby"}],constraints:["scoped to a sectioning content element","scoped to a sectioning root element other than body"],name:"aside"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return Cc.default=t,Cc}var Rc={},hN;function WQ(){if(hN)return Rc;hN=1,Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{constraints:["scoped to the body element"],name:"footer"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return Rc.default=t,Rc}var Sc={},gN;function HQ(){if(gN)return Sc;gN=1,Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"dd"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return Sc.default=t,Sc}var Pc={},vN;function KQ(){if(vN)return Pc;vN=1,Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"del"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return Pc.default=t,Pc}var Tc={},bN;function UQ(){if(bN)return Tc;bN=1,Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"dialog"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","window"]]},t=e;return Tc.default=t,Tc}var _c={},yN;function zQ(){if(yN)return _c;yN=1,Object.defineProperty(_c,"__esModule",{value:!0}),_c.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{module:"DAISY Guide"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","list"]]},t=e;return _c.default=t,_c}var Nc={},xN;function GQ(){if(xN)return Nc;xN=1,Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"Device Independence Delivery Unit"}},{concept:{name:"html"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure"]]},t=e;return Nc.default=t,Nc}var Oc={},EN;function YQ(){if(EN)return Oc;EN=1,Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"em"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return Oc.default=t,Oc}var Mc={},wN;function XQ(){if(wN)return Mc;wN=1,Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["article"]],requiredProps:{},superClass:[["roletype","structure","section","list"]]},t=e;return Mc.default=t,Mc}var Ic={},CN;function ZQ(){if(CN)return Ic;CN=1,Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"figure"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return Ic.default=t,Ic}var Dc={},RN;function JQ(){if(RN)return Dc;RN=1,Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{attributes:[{constraints:["set"],name:"aria-label"}],name:"form"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"aria-labelledby"}],name:"form"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"name"}],name:"form"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return Dc.default=t,Dc}var Ac={},SN;function QQ(){if(SN)return Ac;SN=1,Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"a"},module:"HTML"},{concept:{name:"area"},module:"HTML"},{concept:{name:"aside"},module:"HTML"},{concept:{name:"b"},module:"HTML"},{concept:{name:"bdo"},module:"HTML"},{concept:{name:"body"},module:"HTML"},{concept:{name:"data"},module:"HTML"},{concept:{name:"div"},module:"HTML"},{concept:{constraints:["scoped to the main element","scoped to a sectioning content element","scoped to a sectioning root element other than body"],name:"footer"},module:"HTML"},{concept:{constraints:["scoped to the main element","scoped to a sectioning content element","scoped to a sectioning root element other than body"],name:"header"},module:"HTML"},{concept:{name:"hgroup"},module:"HTML"},{concept:{name:"i"},module:"HTML"},{concept:{name:"pre"},module:"HTML"},{concept:{name:"q"},module:"HTML"},{concept:{name:"samp"},module:"HTML"},{concept:{name:"section"},module:"HTML"},{concept:{name:"small"},module:"HTML"},{concept:{name:"span"},module:"HTML"},{concept:{name:"u"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure"]]},t=e;return Ac.default=t,Ac}var kc={},PN;function eee(){if(PN)return kc;PN=1,Object.defineProperty(kc,"__esModule",{value:!0}),kc.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-multiselectable":null,"aria-readonly":null},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["row"],["row","rowgroup"]],requiredProps:{},superClass:[["roletype","widget","composite"],["roletype","structure","section","table"]]},t=e;return kc.default=t,kc}var $c={},TN;function tee(){if(TN)return $c;TN=1,Object.defineProperty($c,"__esModule",{value:!0}),$c.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null,"aria-readonly":null,"aria-required":null,"aria-selected":null},relatedConcepts:[{concept:{constraints:["ancestor table element has grid role","ancestor table element has treegrid role"],name:"td"},module:"HTML"}],requireContextRole:["row"],requiredContextRole:["row"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","cell"],["roletype","widget"]]},t=e;return $c.default=t,$c}var Fc={},_N;function nee(){if(_N)return Fc;_N=1,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-activedescendant":null,"aria-disabled":null},relatedConcepts:[{concept:{name:"details"},module:"HTML"},{concept:{name:"fieldset"},module:"HTML"},{concept:{name:"optgroup"},module:"HTML"},{concept:{name:"address"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return Fc.default=t,Fc}var Lc={},NN;function ree(){if(NN)return Lc;NN=1,Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-level":"2"},relatedConcepts:[{concept:{name:"h1"},module:"HTML"},{concept:{name:"h2"},module:"HTML"},{concept:{name:"h3"},module:"HTML"},{concept:{name:"h4"},module:"HTML"},{concept:{name:"h5"},module:"HTML"},{concept:{name:"h6"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{"aria-level":"2"},superClass:[["roletype","structure","sectionhead"]]},t=e;return Lc.default=t,Lc}var jc={},ON;function oee(){if(ON)return jc;ON=1,Object.defineProperty(jc,"__esModule",{value:!0}),jc.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{attributes:[{constraints:["set"],name:"alt"}],name:"img"},module:"HTML"},{concept:{attributes:[{constraints:["undefined"],name:"alt"}],name:"img"},module:"HTML"},{concept:{name:"imggroup"},module:"DTB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return jc.default=t,jc}var qc={},MN;function iee(){if(MN)return qc;MN=1,Object.defineProperty(qc,"__esModule",{value:!0}),qc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"ins"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return qc.default=t,qc}var Bc={},IN;function see(){if(IN)return Bc;IN=1,Object.defineProperty(Bc,"__esModule",{value:!0}),Bc.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-disabled":null,"aria-expanded":null,"aria-haspopup":null},relatedConcepts:[{concept:{attributes:[{constraints:["set"],name:"href"}],name:"a"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"href"}],name:"area"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","command"]]},t=e;return Bc.default=t,Bc}var Vc={},DN;function aee(){if(DN)return Vc;DN=1,Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"menu"},module:"HTML"},{concept:{name:"ol"},module:"HTML"},{concept:{name:"ul"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["listitem"]],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return Vc.default=t,Vc}var Wc={},AN;function lee(){if(AN)return Wc;AN=1,Object.defineProperty(Wc,"__esModule",{value:!0}),Wc.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-expanded":null,"aria-invalid":null,"aria-multiselectable":null,"aria-readonly":null,"aria-required":null,"aria-orientation":"vertical"},relatedConcepts:[{concept:{attributes:[{constraints:[">1"],name:"size"}],constraints:["the size attribute value is greater than 1"],name:"select"},module:"HTML"},{concept:{attributes:[{name:"multiple"}],name:"select"},module:"HTML"},{concept:{name:"datalist"},module:"HTML"},{concept:{name:"list"},module:"ARIA"},{concept:{name:"select"},module:"XForms"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["option","group"],["option"]],requiredProps:{},superClass:[["roletype","widget","composite","select"],["roletype","structure","section","group","select"]]},t=e;return Wc.default=t,Wc}var Hc={},kN;function uee(){if(kN)return Hc;kN=1,Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-level":null,"aria-posinset":null,"aria-setsize":null},relatedConcepts:[{concept:{constraints:["direct descendant of ol","direct descendant of ul","direct descendant of menu"],name:"li"},module:"HTML"},{concept:{name:"item"},module:"XForms"}],requireContextRole:["directory","list"],requiredContextRole:["directory","list"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return Hc.default=t,Hc}var Kc={},$N;function cee(){if($N)return Kc;$N=1,Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-live":"polite"},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return Kc.default=t,Kc}var Uc={},FN;function dee(){if(FN)return Uc;FN=1,Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"main"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return Uc.default=t,Uc}var zc={},LN;function fee(){if(LN)return zc;LN=1,Object.defineProperty(zc,"__esModule",{value:!0}),zc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:[],props:{"aria-braillelabel":null,"aria-brailleroledescription":null,"aria-description":null},relatedConcepts:[{concept:{name:"mark"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return zc.default=t,zc}var Gc={},jN;function pee(){if(jN)return Gc;jN=1,Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return Gc.default=t,Gc}var Yc={},qN;function mee(){if(qN)return Yc;qN=1,Object.defineProperty(Yc,"__esModule",{value:!0}),Yc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"math"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return Yc.default=t,Yc}var Xc={},BN;function hee(){if(BN)return Xc;BN=1,Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-orientation":"vertical"},relatedConcepts:[{concept:{name:"MENU"},module:"JAPI"},{concept:{name:"list"},module:"ARIA"},{concept:{name:"select"},module:"XForms"},{concept:{name:"sidebar"},module:"DTB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["menuitem","group"],["menuitemradio","group"],["menuitemcheckbox","group"],["menuitem"],["menuitemcheckbox"],["menuitemradio"]],requiredProps:{},superClass:[["roletype","widget","composite","select"],["roletype","structure","section","group","select"]]},t=e;return Xc.default=t,Xc}var Zc={},VN;function gee(){if(VN)return Zc;VN=1,Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-orientation":"horizontal"},relatedConcepts:[{concept:{name:"toolbar"},module:"ARIA"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["menuitem","group"],["menuitemradio","group"],["menuitemcheckbox","group"],["menuitem"],["menuitemcheckbox"],["menuitemradio"]],requiredProps:{},superClass:[["roletype","widget","composite","select","menu"],["roletype","structure","section","group","select","menu"]]},t=e;return Zc.default=t,Zc}var Jc={},WN;function vee(){if(WN)return Jc;WN=1,Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-disabled":null,"aria-expanded":null,"aria-haspopup":null,"aria-posinset":null,"aria-setsize":null},relatedConcepts:[{concept:{name:"MENU_ITEM"},module:"JAPI"},{concept:{name:"listitem"},module:"ARIA"},{concept:{name:"option"},module:"ARIA"}],requireContextRole:["group","menu","menubar"],requiredContextRole:["group","menu","menubar"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","command"]]},t=e;return Jc.default=t,Jc}var Qc={},HN;function bee(){if(HN)return Qc;HN=1,Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author","contents"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"menuitem"},module:"ARIA"}],requireContextRole:["group","menu","menubar"],requiredContextRole:["group","menu","menubar"],requiredOwnedElements:[],requiredProps:{"aria-checked":null},superClass:[["roletype","widget","input","checkbox"],["roletype","widget","command","menuitem"]]},t=e;return Qc.default=t,Qc}var ed={},KN;function yee(){if(KN)return ed;KN=1,Object.defineProperty(ed,"__esModule",{value:!0}),ed.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author","contents"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"menuitem"},module:"ARIA"}],requireContextRole:["group","menu","menubar"],requiredContextRole:["group","menu","menubar"],requiredOwnedElements:[],requiredProps:{"aria-checked":null},superClass:[["roletype","widget","input","checkbox","menuitemcheckbox"],["roletype","widget","command","menuitem","menuitemcheckbox"],["roletype","widget","input","radio"]]},t=e;return ed.default=t,ed}var td={},UN;function xee(){if(UN)return td;UN=1,Object.defineProperty(td,"__esModule",{value:!0}),td.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author"],prohibitedProps:[],props:{"aria-valuetext":null,"aria-valuemax":"100","aria-valuemin":"0"},relatedConcepts:[{concept:{name:"meter"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{"aria-valuenow":null},superClass:[["roletype","structure","range"]]},t=e;return td.default=t,td}var nd={},zN;function Eee(){if(zN)return nd;zN=1,Object.defineProperty(nd,"__esModule",{value:!0}),nd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"nav"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return nd.default=t,nd}var rd={},GN;function wee(){if(GN)return rd;GN=1,Object.defineProperty(rd,"__esModule",{value:!0}),rd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:[],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[]},t=e;return rd.default=t,rd}var od={},YN;function Cee(){if(YN)return od;YN=1,Object.defineProperty(od,"__esModule",{value:!0}),od.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return od.default=t,od}var id={},XN;function Ree(){if(XN)return id;XN=1,Object.defineProperty(id,"__esModule",{value:!0}),id.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-checked":null,"aria-posinset":null,"aria-setsize":null,"aria-selected":"false"},relatedConcepts:[{concept:{name:"item"},module:"XForms"},{concept:{name:"listitem"},module:"ARIA"},{concept:{name:"option"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{"aria-selected":"false"},superClass:[["roletype","widget","input"]]},t=e;return id.default=t,id}var sd={},ZN;function See(){if(ZN)return sd;ZN=1,Object.defineProperty(sd,"__esModule",{value:!0}),sd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"p"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return sd.default=t,sd}var ad={},JN;function Pee(){if(JN)return ad;JN=1,Object.defineProperty(ad,"__esModule",{value:!0}),ad.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{attributes:[{name:"alt",value:""}],name:"img"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure"]]},t=e;return ad.default=t,ad}var ld={},QN;function Tee(){if(QN)return ld;QN=1,Object.defineProperty(ld,"__esModule",{value:!0}),ld.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author"],prohibitedProps:[],props:{"aria-valuetext":null},relatedConcepts:[{concept:{name:"progress"},module:"HTML"},{concept:{name:"status"},module:"ARIA"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","range"],["roletype","widget"]]},t=e;return ld.default=t,ld}var ud={},eO;function _ee(){if(eO)return ud;eO=1,Object.defineProperty(ud,"__esModule",{value:!0}),ud.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-checked":null,"aria-posinset":null,"aria-setsize":null},relatedConcepts:[{concept:{attributes:[{name:"type",value:"radio"}],name:"input"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{"aria-checked":null},superClass:[["roletype","widget","input"]]},t=e;return ud.default=t,ud}var cd={},tO;function Nee(){if(tO)return cd;tO=1,Object.defineProperty(cd,"__esModule",{value:!0}),cd.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-invalid":null,"aria-readonly":null,"aria-required":null},relatedConcepts:[{concept:{name:"list"},module:"ARIA"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["radio"]],requiredProps:{},superClass:[["roletype","widget","composite","select"],["roletype","structure","section","group","select"]]},t=e;return cd.default=t,cd}var dd={},nO;function Oee(){if(nO)return dd;nO=1,Object.defineProperty(dd,"__esModule",{value:!0}),dd.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{attributes:[{constraints:["set"],name:"aria-label"}],name:"section"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"aria-labelledby"}],name:"section"},module:"HTML"},{concept:{name:"Device Independence Glossart perceivable unit"}}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return dd.default=t,dd}var fd={},rO;function Mee(){if(rO)return fd;rO=1,Object.defineProperty(fd,"__esModule",{value:!0}),fd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-colindex":null,"aria-expanded":null,"aria-level":null,"aria-posinset":null,"aria-rowindex":null,"aria-selected":null,"aria-setsize":null},relatedConcepts:[{concept:{name:"tr"},module:"HTML"}],requireContextRole:["grid","rowgroup","table","treegrid"],requiredContextRole:["grid","rowgroup","table","treegrid"],requiredOwnedElements:[["cell"],["columnheader"],["gridcell"],["rowheader"]],requiredProps:{},superClass:[["roletype","structure","section","group"],["roletype","widget"]]},t=e;return fd.default=t,fd}var pd={},oO;function Iee(){if(oO)return pd;oO=1,Object.defineProperty(pd,"__esModule",{value:!0}),pd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"tbody"},module:"HTML"},{concept:{name:"tfoot"},module:"HTML"},{concept:{name:"thead"},module:"HTML"}],requireContextRole:["grid","table","treegrid"],requiredContextRole:["grid","table","treegrid"],requiredOwnedElements:[["row"]],requiredProps:{},superClass:[["roletype","structure"]]},t=e;return pd.default=t,pd}var md={},iO;function Dee(){if(iO)return md;iO=1,Object.defineProperty(md,"__esModule",{value:!0}),md.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-sort":null},relatedConcepts:[{concept:{attributes:[{name:"scope",value:"row"}],name:"th"},module:"HTML"},{concept:{attributes:[{name:"scope",value:"rowgroup"}],name:"th"},module:"HTML"}],requireContextRole:["row","rowgroup"],requiredContextRole:["row","rowgroup"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","cell"],["roletype","structure","section","cell","gridcell"],["roletype","widget","gridcell"],["roletype","structure","sectionhead"]]},t=e;return md.default=t,md}var hd={},sO;function Aee(){if(sO)return hd;sO=1,Object.defineProperty(hd,"__esModule",{value:!0}),hd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!0,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-valuetext":null,"aria-orientation":"vertical","aria-valuemax":"100","aria-valuemin":"0"},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{"aria-controls":null,"aria-valuenow":null},superClass:[["roletype","structure","range"],["roletype","widget"]]},t=e;return hd.default=t,hd}var gd={},aO;function kee(){if(aO)return gd;aO=1,Object.defineProperty(gd,"__esModule",{value:!0}),gd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return gd.default=t,gd}var vd={},lO;function $ee(){if(lO)return vd;lO=1,Object.defineProperty(vd,"__esModule",{value:!0}),vd.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{attributes:[{constraints:["undefined"],name:"list"},{name:"type",value:"search"}],constraints:["the list attribute is not set"],name:"input"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","input","textbox"]]},t=e;return vd.default=t,vd}var bd={},uO;function Fee(){if(uO)return bd;uO=1,Object.defineProperty(bd,"__esModule",{value:!0}),bd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!0,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-orientation":"horizontal","aria-valuemax":"100","aria-valuemin":"0","aria-valuenow":null,"aria-valuetext":null},relatedConcepts:[{concept:{name:"hr"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure"]]},t=e;return bd.default=t,bd}var yd={},cO;function Lee(){if(cO)return yd;cO=1,Object.defineProperty(yd,"__esModule",{value:!0}),yd.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-haspopup":null,"aria-invalid":null,"aria-readonly":null,"aria-valuetext":null,"aria-orientation":"horizontal","aria-valuemax":"100","aria-valuemin":"0"},relatedConcepts:[{concept:{attributes:[{name:"type",value:"range"}],name:"input"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{"aria-valuenow":null},superClass:[["roletype","widget","input"],["roletype","structure","range"]]},t=e;return yd.default=t,yd}var xd={},dO;function jee(){if(dO)return xd;dO=1,Object.defineProperty(xd,"__esModule",{value:!0}),xd.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-invalid":null,"aria-readonly":null,"aria-required":null,"aria-valuetext":null,"aria-valuenow":"0"},relatedConcepts:[{concept:{attributes:[{name:"type",value:"number"}],name:"input"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","composite"],["roletype","widget","input"],["roletype","structure","range"]]},t=e;return xd.default=t,xd}var Ed={},fO;function qee(){if(fO)return Ed;fO=1,Object.defineProperty(Ed,"__esModule",{value:!0}),Ed.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-atomic":"true","aria-live":"polite"},relatedConcepts:[{concept:{name:"output"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return Ed.default=t,Ed}var wd={},pO;function Bee(){if(pO)return wd;pO=1,Object.defineProperty(wd,"__esModule",{value:!0}),wd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"strong"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return wd.default=t,wd}var Cd={},mO;function Vee(){if(mO)return Cd;mO=1,Object.defineProperty(Cd,"__esModule",{value:!0}),Cd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"sub"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return Cd.default=t,Cd}var Rd={},hO;function Wee(){if(hO)return Rd;hO=1,Object.defineProperty(Rd,"__esModule",{value:!0}),Rd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"sup"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return Rd.default=t,Rd}var Sd={},gO;function Hee(){if(gO)return Sd;gO=1,Object.defineProperty(Sd,"__esModule",{value:!0}),Sd.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author","contents"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"button"},module:"ARIA"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{"aria-checked":null},superClass:[["roletype","widget","input","checkbox"]]},t=e;return Sd.default=t,Sd}var Pd={},vO;function Kee(){if(vO)return Pd;vO=1,Object.defineProperty(Pd,"__esModule",{value:!0}),Pd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!0,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-disabled":null,"aria-expanded":null,"aria-haspopup":null,"aria-posinset":null,"aria-setsize":null,"aria-selected":"false"},relatedConcepts:[],requireContextRole:["tablist"],requiredContextRole:["tablist"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","sectionhead"],["roletype","widget"]]},t=e;return Pd.default=t,Pd}var Td={},bO;function Uee(){if(bO)return Td;bO=1,Object.defineProperty(Td,"__esModule",{value:!0}),Td.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-colcount":null,"aria-rowcount":null},relatedConcepts:[{concept:{name:"table"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["row"],["row","rowgroup"]],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return Td.default=t,Td}var _d={},yO;function zee(){if(yO)return _d;yO=1,Object.defineProperty(_d,"__esModule",{value:!0}),_d.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-level":null,"aria-multiselectable":null,"aria-orientation":"horizontal"},relatedConcepts:[{module:"DAISY",concept:{name:"guide"}}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["tab"]],requiredProps:{},superClass:[["roletype","widget","composite"]]},t=e;return _d.default=t,_d}var Nd={},xO;function Gee(){if(xO)return Nd;xO=1,Object.defineProperty(Nd,"__esModule",{value:!0}),Nd.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return Nd.default=t,Nd}var Od={},EO;function Yee(){if(EO)return Od;EO=1,Object.defineProperty(Od,"__esModule",{value:!0}),Od.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"dfn"},module:"HTML"},{concept:{name:"dt"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return Od.default=t,Od}var Md={},wO;function Xee(){if(wO)return Md;wO=1,Object.defineProperty(Md,"__esModule",{value:!0}),Md.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-activedescendant":null,"aria-autocomplete":null,"aria-errormessage":null,"aria-haspopup":null,"aria-invalid":null,"aria-multiline":null,"aria-placeholder":null,"aria-readonly":null,"aria-required":null},relatedConcepts:[{concept:{attributes:[{constraints:["undefined"],name:"type"},{constraints:["undefined"],name:"list"}],constraints:["the list attribute is not set"],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["undefined"],name:"list"},{name:"type",value:"email"}],constraints:["the list attribute is not set"],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["undefined"],name:"list"},{name:"type",value:"tel"}],constraints:["the list attribute is not set"],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["undefined"],name:"list"},{name:"type",value:"text"}],constraints:["the list attribute is not set"],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["undefined"],name:"list"},{name:"type",value:"url"}],constraints:["the list attribute is not set"],name:"input"},module:"HTML"},{concept:{name:"input"},module:"XForms"},{concept:{name:"textarea"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","input"]]},t=e;return Md.default=t,Md}var Id={},CO;function Zee(){if(CO)return Id;CO=1,Object.defineProperty(Id,"__esModule",{value:!0}),Id.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"time"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return Id.default=t,Id}var Dd={},RO;function Jee(){if(RO)return Dd;RO=1,Object.defineProperty(Dd,"__esModule",{value:!0}),Dd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","status"]]},t=e;return Dd.default=t,Dd}var Ad={},SO;function Qee(){if(SO)return Ad;SO=1,Object.defineProperty(Ad,"__esModule",{value:!0}),Ad.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-orientation":"horizontal"},relatedConcepts:[{concept:{name:"menubar"},module:"ARIA"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","group"]]},t=e;return Ad.default=t,Ad}var kd={},PO;function ete(){if(PO)return kd;PO=1,Object.defineProperty(kd,"__esModule",{value:!0}),kd.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return kd.default=t,kd}var $d={},TO;function tte(){if(TO)return $d;TO=1,Object.defineProperty($d,"__esModule",{value:!0}),$d.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-invalid":null,"aria-multiselectable":null,"aria-required":null,"aria-orientation":"vertical"},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["treeitem","group"],["treeitem"]],requiredProps:{},superClass:[["roletype","widget","composite","select"],["roletype","structure","section","group","select"]]},t=e;return $d.default=t,$d}var Fd={},_O;function nte(){if(_O)return Fd;_O=1,Object.defineProperty(Fd,"__esModule",{value:!0}),Fd.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["row"],["row","rowgroup"]],requiredProps:{},superClass:[["roletype","widget","composite","grid"],["roletype","structure","section","table","grid"],["roletype","widget","composite","select","tree"],["roletype","structure","section","group","select","tree"]]},t=e;return Fd.default=t,Fd}var Ld={},NO;function rte(){if(NO)return Ld;NO=1,Object.defineProperty(Ld,"__esModule",{value:!0}),Ld.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-expanded":null,"aria-haspopup":null},relatedConcepts:[],requireContextRole:["group","tree"],requiredContextRole:["group","tree"],requiredOwnedElements:[],requiredProps:{"aria-selected":null},superClass:[["roletype","structure","section","listitem"],["roletype","widget","input","option"]]},t=e;return Ld.default=t,Ld}var OO;function ote(){if(OO)return uc;OO=1,Object.defineProperty(uc,"__esModule",{value:!0}),uc.default=void 0;var e=Ee(NQ()),t=Ee(OQ()),n=Ee(MQ()),r=Ee(IQ()),o=Ee(DQ()),i=Ee(AQ()),s=Ee(kQ()),a=Ee($Q()),l=Ee(FQ()),c=Ee(LQ()),d=Ee(jQ()),f=Ee(qQ()),m=Ee(BQ()),g=Ee(VQ()),v=Ee(WQ()),b=Ee(HQ()),x=Ee(KQ()),y=Ee(UQ()),_=Ee(zQ()),w=Ee(GQ()),T=Ee(YQ()),R=Ee(XQ()),S=Ee(ZQ()),P=Ee(JQ()),N=Ee(QQ()),F=Ee(eee()),W=Ee(tee()),I=Ee(nee()),B=Ee(ree()),$=Ee(oee()),k=Ee(iee()),j=Ee(see()),D=Ee(aee()),A=Ee(lee()),L=Ee(uee()),H=Ee(cee()),V=Ee(dee()),X=Ee(fee()),K=Ee(pee()),G=Ee(mee()),ee=Ee(hee()),Z=Ee(gee()),te=Ee(vee()),J=Ee(bee()),ne=Ee(yee()),U=Ee(xee()),ie=Ee(Eee()),se=Ee(wee()),Q=Ee(Cee()),me=Ee(Ree()),ve=Ee(See()),xe=Ee(Pee()),be=Ee(Tee()),Ce=Ee(_ee()),qe=Ee(Nee()),Te=Ee(Oee()),ke=Ee(Mee()),ce=Ee(Iee()),he=Ee(Dee()),re=Ee(Aee()),le=Ee(kee()),Oe=Ee($ee()),De=Ee(Fee()),Fe=Ee(Lee()),We=Ee(jee()),ze=Ee(qee()),He=Ee(Bee()),Ze=Ee(Vee()),nt=Ee(Wee()),ht=Ee(Hee()),Je=Ee(Kee()),Ge=Ee(Uee()),dt=Ee(zee()),rt=Ee(Gee()),Ve=Ee(Yee()),Me=Ee(Xee()),Be=Ee(Zee()),Ie=Ee(Jee()),tt=Ee(Qee()),at=Ee(ete()),Le=Ee(tte()),En=Ee(nte()),zt=Ee(rte());function Ee(yt){return yt&&yt.__esModule?yt:{default:yt}}var Rt=[["alert",e.default],["alertdialog",t.default],["application",n.default],["article",r.default],["banner",o.default],["blockquote",i.default],["button",s.default],["caption",a.default],["cell",l.default],["checkbox",c.default],["code",d.default],["columnheader",f.default],["combobox",m.default],["complementary",g.default],["contentinfo",v.default],["definition",b.default],["deletion",x.default],["dialog",y.default],["directory",_.default],["document",w.default],["emphasis",T.default],["feed",R.default],["figure",S.default],["form",P.default],["generic",N.default],["grid",F.default],["gridcell",W.default],["group",I.default],["heading",B.default],["img",$.default],["insertion",k.default],["link",j.default],["list",D.default],["listbox",A.default],["listitem",L.default],["log",H.default],["main",V.default],["mark",X.default],["marquee",K.default],["math",G.default],["menu",ee.default],["menubar",Z.default],["menuitem",te.default],["menuitemcheckbox",J.default],["menuitemradio",ne.default],["meter",U.default],["navigation",ie.default],["none",se.default],["note",Q.default],["option",me.default],["paragraph",ve.default],["presentation",xe.default],["progressbar",be.default],["radio",Ce.default],["radiogroup",qe.default],["region",Te.default],["row",ke.default],["rowgroup",ce.default],["rowheader",he.default],["scrollbar",re.default],["search",le.default],["searchbox",Oe.default],["separator",De.default],["slider",Fe.default],["spinbutton",We.default],["status",ze.default],["strong",He.default],["subscript",Ze.default],["superscript",nt.default],["switch",ht.default],["tab",Je.default],["table",Ge.default],["tablist",dt.default],["tabpanel",rt.default],["term",Ve.default],["textbox",Me.default],["time",Be.default],["timer",Ie.default],["toolbar",tt.default],["tooltip",at.default],["tree",Le.default],["treegrid",En.default],["treeitem",zt.default]],wn=Rt;return uc.default=wn,uc}var jd={},qd={},MO;function ite(){if(MO)return qd;MO=1,Object.defineProperty(qd,"__esModule",{value:!0}),qd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"abstract [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return qd.default=t,qd}var Bd={},IO;function ste(){if(IO)return Bd;IO=1,Object.defineProperty(Bd,"__esModule",{value:!0}),Bd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"acknowledgments [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return Bd.default=t,Bd}var Vd={},DO;function ate(){if(DO)return Vd;DO=1,Object.defineProperty(Vd,"__esModule",{value:!0}),Vd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"afterword [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return Vd.default=t,Vd}var Wd={},AO;function lte(){if(AO)return Wd;AO=1,Object.defineProperty(Wd,"__esModule",{value:!0}),Wd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"appendix [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return Wd.default=t,Wd}var Hd={},kO;function ute(){if(kO)return Hd;kO=1,Object.defineProperty(Hd,"__esModule",{value:!0}),Hd.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"referrer [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","command","link"]]},t=e;return Hd.default=t,Hd}var Kd={},$O;function cte(){if($O)return Kd;$O=1,Object.defineProperty(Kd,"__esModule",{value:!0}),Kd.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"EPUB biblioentry [EPUB-SSV]"},module:"EPUB"}],requireContextRole:["doc-bibliography"],requiredContextRole:["doc-bibliography"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","listitem"]]},t=e;return Kd.default=t,Kd}var Ud={},FO;function dte(){if(FO)return Ud;FO=1,Object.defineProperty(Ud,"__esModule",{value:!0}),Ud.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"bibliography [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["doc-biblioentry"]],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return Ud.default=t,Ud}var zd={},LO;function fte(){if(LO)return zd;LO=1,Object.defineProperty(zd,"__esModule",{value:!0}),zd.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"biblioref [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","command","link"]]},t=e;return zd.default=t,zd}var Gd={},jO;function pte(){if(jO)return Gd;jO=1,Object.defineProperty(Gd,"__esModule",{value:!0}),Gd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"chapter [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return Gd.default=t,Gd}var Yd={},qO;function mte(){if(qO)return Yd;qO=1,Object.defineProperty(Yd,"__esModule",{value:!0}),Yd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"colophon [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return Yd.default=t,Yd}var Xd={},BO;function hte(){if(BO)return Xd;BO=1,Object.defineProperty(Xd,"__esModule",{value:!0}),Xd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"conclusion [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return Xd.default=t,Xd}var Zd={},VO;function gte(){if(VO)return Zd;VO=1,Object.defineProperty(Zd,"__esModule",{value:!0}),Zd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"cover [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","img"]]},t=e;return Zd.default=t,Zd}var Jd={},WO;function vte(){if(WO)return Jd;WO=1,Object.defineProperty(Jd,"__esModule",{value:!0}),Jd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"credit [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return Jd.default=t,Jd}var Qd={},HO;function bte(){if(HO)return Qd;HO=1,Object.defineProperty(Qd,"__esModule",{value:!0}),Qd.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"credits [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return Qd.default=t,Qd}var ef={},KO;function yte(){if(KO)return ef;KO=1,Object.defineProperty(ef,"__esModule",{value:!0}),ef.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"dedication [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return ef.default=t,ef}var tf={},UO;function xte(){if(UO)return tf;UO=1,Object.defineProperty(tf,"__esModule",{value:!0}),tf.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"rearnote [EPUB-SSV]"},module:"EPUB"}],requireContextRole:["doc-endnotes"],requiredContextRole:["doc-endnotes"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","listitem"]]},t=e;return tf.default=t,tf}var nf={},zO;function Ete(){if(zO)return nf;zO=1,Object.defineProperty(nf,"__esModule",{value:!0}),nf.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"rearnotes [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["doc-endnote"]],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return nf.default=t,nf}var rf={},GO;function wte(){if(GO)return rf;GO=1,Object.defineProperty(rf,"__esModule",{value:!0}),rf.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"epigraph [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return rf.default=t,rf}var of={},YO;function Cte(){if(YO)return of;YO=1,Object.defineProperty(of,"__esModule",{value:!0}),of.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"epilogue [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return of.default=t,of}var sf={},XO;function Rte(){if(XO)return sf;XO=1,Object.defineProperty(sf,"__esModule",{value:!0}),sf.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"errata [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return sf.default=t,sf}var af={},ZO;function Ste(){if(ZO)return af;ZO=1,Object.defineProperty(af,"__esModule",{value:!0}),af.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return af.default=t,af}var lf={},JO;function Pte(){if(JO)return lf;JO=1,Object.defineProperty(lf,"__esModule",{value:!0}),lf.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"footnote [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return lf.default=t,lf}var uf={},QO;function Tte(){if(QO)return uf;QO=1,Object.defineProperty(uf,"__esModule",{value:!0}),uf.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"foreword [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return uf.default=t,uf}var cf={},eM;function _te(){if(eM)return cf;eM=1,Object.defineProperty(cf,"__esModule",{value:!0}),cf.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"glossary [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["definition"],["term"]],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return cf.default=t,cf}var df={},tM;function Nte(){if(tM)return df;tM=1,Object.defineProperty(df,"__esModule",{value:!0}),df.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"glossref [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","command","link"]]},t=e;return df.default=t,df}var ff={},nM;function Ote(){if(nM)return ff;nM=1,Object.defineProperty(ff,"__esModule",{value:!0}),ff.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"index [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark","navigation"]]},t=e;return ff.default=t,ff}var pf={},rM;function Mte(){if(rM)return pf;rM=1,Object.defineProperty(pf,"__esModule",{value:!0}),pf.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"introduction [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return pf.default=t,pf}var mf={},oM;function Ite(){if(oM)return mf;oM=1,Object.defineProperty(mf,"__esModule",{value:!0}),mf.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"noteref [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","command","link"]]},t=e;return mf.default=t,mf}var hf={},iM;function Dte(){if(iM)return hf;iM=1,Object.defineProperty(hf,"__esModule",{value:!0}),hf.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"notice [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","note"]]},t=e;return hf.default=t,hf}var gf={},sM;function Ate(){if(sM)return gf;sM=1,Object.defineProperty(gf,"__esModule",{value:!0}),gf.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"pagebreak [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","separator"]]},t=e;return gf.default=t,gf}var vf={},aM;function kte(){if(aM)return vf;aM=1,Object.defineProperty(vf,"__esModule",{value:!0}),vf.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"page-list [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark","navigation"]]},t=e;return vf.default=t,vf}var bf={},lM;function $te(){if(lM)return bf;lM=1,Object.defineProperty(bf,"__esModule",{value:!0}),bf.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"part [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return bf.default=t,bf}var yf={},uM;function Fte(){if(uM)return yf;uM=1,Object.defineProperty(yf,"__esModule",{value:!0}),yf.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"preface [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return yf.default=t,yf}var xf={},cM;function Lte(){if(cM)return xf;cM=1,Object.defineProperty(xf,"__esModule",{value:!0}),xf.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"prologue [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]},t=e;return xf.default=t,xf}var Ef={},dM;function jte(){if(dM)return Ef;dM=1,Object.defineProperty(Ef,"__esModule",{value:!0}),Ef.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"pullquote [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["none"]]},t=e;return Ef.default=t,Ef}var wf={},fM;function qte(){if(fM)return wf;fM=1,Object.defineProperty(wf,"__esModule",{value:!0}),wf.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"qna [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]},t=e;return wf.default=t,wf}var Cf={},pM;function Bte(){if(pM)return Cf;pM=1,Object.defineProperty(Cf,"__esModule",{value:!0}),Cf.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"subtitle [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","sectionhead"]]},t=e;return Cf.default=t,Cf}var Rf={},mM;function Vte(){if(mM)return Rf;mM=1,Object.defineProperty(Rf,"__esModule",{value:!0}),Rf.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"help [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","note"]]},t=e;return Rf.default=t,Rf}var Sf={},hM;function Wte(){if(hM)return Sf;hM=1,Object.defineProperty(Sf,"__esModule",{value:!0}),Sf.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"toc [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark","navigation"]]},t=e;return Sf.default=t,Sf}var gM;function Hte(){if(gM)return jd;gM=1,Object.defineProperty(jd,"__esModule",{value:!0}),jd.default=void 0;var e=G(ite()),t=G(ste()),n=G(ate()),r=G(lte()),o=G(ute()),i=G(cte()),s=G(dte()),a=G(fte()),l=G(pte()),c=G(mte()),d=G(hte()),f=G(gte()),m=G(vte()),g=G(bte()),v=G(yte()),b=G(xte()),x=G(Ete()),y=G(wte()),_=G(Cte()),w=G(Rte()),T=G(Ste()),R=G(Pte()),S=G(Tte()),P=G(_te()),N=G(Nte()),F=G(Ote()),W=G(Mte()),I=G(Ite()),B=G(Dte()),$=G(Ate()),k=G(kte()),j=G($te()),D=G(Fte()),A=G(Lte()),L=G(jte()),H=G(qte()),V=G(Bte()),X=G(Vte()),K=G(Wte());function G(te){return te&&te.__esModule?te:{default:te}}var ee=[["doc-abstract",e.default],["doc-acknowledgments",t.default],["doc-afterword",n.default],["doc-appendix",r.default],["doc-backlink",o.default],["doc-biblioentry",i.default],["doc-bibliography",s.default],["doc-biblioref",a.default],["doc-chapter",l.default],["doc-colophon",c.default],["doc-conclusion",d.default],["doc-cover",f.default],["doc-credit",m.default],["doc-credits",g.default],["doc-dedication",v.default],["doc-endnote",b.default],["doc-endnotes",x.default],["doc-epigraph",y.default],["doc-epilogue",_.default],["doc-errata",w.default],["doc-example",T.default],["doc-footnote",R.default],["doc-foreword",S.default],["doc-glossary",P.default],["doc-glossref",N.default],["doc-index",F.default],["doc-introduction",W.default],["doc-noteref",I.default],["doc-notice",B.default],["doc-pagebreak",$.default],["doc-pagelist",k.default],["doc-part",j.default],["doc-preface",D.default],["doc-prologue",A.default],["doc-pullquote",L.default],["doc-qna",H.default],["doc-subtitle",V.default],["doc-tip",X.default],["doc-toc",K.default]],Z=ee;return jd.default=Z,jd}var Pf={},Tf={},vM;function Kte(){if(vM)return Tf;vM=1,Object.defineProperty(Tf,"__esModule",{value:!0}),Tf.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{module:"GRAPHICS",concept:{name:"graphics-object"}},{module:"ARIA",concept:{name:"img"}},{module:"ARIA",concept:{name:"article"}}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","document"]]},t=e;return Tf.default=t,Tf}var _f={},bM;function Ute(){if(bM)return _f;bM=1,Object.defineProperty(_f,"__esModule",{value:!0}),_f.default=void 0;var e={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{module:"GRAPHICS",concept:{name:"graphics-document"}},{module:"ARIA",concept:{name:"group"}},{module:"ARIA",concept:{name:"img"}},{module:"GRAPHICS",concept:{name:"graphics-symbol"}}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","group"]]},t=e;return _f.default=t,_f}var Nf={},yM;function zte(){if(yM)return Nf;yM=1,Object.defineProperty(Nf,"__esModule",{value:!0}),Nf.default=void 0;var e={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","img"]]},t=e;return Nf.default=t,Nf}var xM;function Gte(){if(xM)return Pf;xM=1,Object.defineProperty(Pf,"__esModule",{value:!0}),Pf.default=void 0;var e=r(Kte()),t=r(Ute()),n=r(zte());function r(s){return s&&s.__esModule?s:{default:s}}var o=[["graphics-document",e.default],["graphics-object",t.default],["graphics-symbol",n.default]],i=o;return Pf.default=i,Pf}var EM;function Jw(){if(EM)return Yu;EM=1,Object.defineProperty(Yu,"__esModule",{value:!0}),Yu.default=void 0;var e=i(_Q()),t=i(ote()),n=i(Hte()),r=i(Gte()),o=i(qp());function i(y){return y&&y.__esModule?y:{default:y}}function s(y,_,w){return _ in y?Object.defineProperty(y,_,{value:w,enumerable:!0,configurable:!0,writable:!0}):y[_]=w,y}function a(y,_){var w=typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(!w){if(Array.isArray(y)||(w=d(y))||_){w&&(y=w);var T=0,R=function(){};return{s:R,n:function(){return T>=y.length?{done:!0}:{done:!1,value:y[T++]}},e:function(W){throw W},f:R}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
62
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var S=!0,P=!1,N;return{s:function(){w=w.call(y)},n:function(){var W=w.next();return S=W.done,W},e:function(W){P=!0,N=W},f:function(){try{!S&&w.return!=null&&w.return()}finally{if(P)throw N}}}}function l(y,_){return g(y)||m(y,_)||d(y,_)||c()}function c(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
63
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(y,_){if(y){if(typeof y=="string")return f(y,_);var w=Object.prototype.toString.call(y).slice(8,-1);if(w==="Object"&&y.constructor&&(w=y.constructor.name),w==="Map"||w==="Set")return Array.from(y);if(w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w))return f(y,_)}}function f(y,_){(_==null||_>y.length)&&(_=y.length);for(var w=0,T=new Array(_);w<_;w++)T[w]=y[w];return T}function m(y,_){var w=y==null?null:typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(w!=null){var T=[],R=!0,S=!1,P,N;try{for(w=w.call(y);!(R=(P=w.next()).done)&&(T.push(P.value),!(_&&T.length===_));R=!0);}catch(F){S=!0,N=F}finally{try{!R&&w.return!=null&&w.return()}finally{if(S)throw N}}return T}}function g(y){if(Array.isArray(y))return y}var v=[].concat(e.default,t.default,n.default,r.default);v.forEach(function(y){var _=l(y,2),w=_[1],T=a(w.superClass),R;try{for(T.s();!(R=T.n()).done;){var S=R.value,P=a(S),N;try{var F=function(){var I=N.value,B=v.find(function(A){var L=l(A,1),H=L[0];return H===I});if(B)for(var $=B[1],k=0,j=Object.keys($.props);k<j.length;k++){var D=j[k];Object.prototype.hasOwnProperty.call(w.props,D)||Object.assign(w.props,s({},D,$.props[D]))}};for(P.s();!(N=P.n()).done;)F()}catch(W){P.e(W)}finally{P.f()}}}catch(W){T.e(W)}finally{T.f()}});var b={entries:function(){return v},forEach:function(_){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,T=a(v),R;try{for(T.s();!(R=T.n()).done;){var S=l(R.value,2),P=S[0],N=S[1];_.call(w,N,P,v)}}catch(F){T.e(F)}finally{T.f()}},get:function(_){var w=v.find(function(T){return T[0]===_});return w&&w[1]},has:function(_){return!!b.get(_)},keys:function(){return v.map(function(_){var w=l(_,1),T=w[0];return T})},values:function(){return v.map(function(_){var w=l(_,2),T=w[1];return T})}},x=(0,o.default)(b,b.entries());return Yu.default=x,Yu}var Of={},rx={},wM;function Yte(){if(wM)return rx;wM=1;var e=Object.prototype.hasOwnProperty;function t(n,r){var o,i;if(n===r)return!0;if(n&&r&&(o=n.constructor)===r.constructor){if(o===Date)return n.getTime()===r.getTime();if(o===RegExp)return n.toString()===r.toString();if(o===Array){if((i=n.length)===r.length)for(;i--&&t(n[i],r[i]););return i===-1}if(!o||typeof n=="object"){i=0;for(o in n)if(e.call(n,o)&&++i&&!e.call(r,o)||!(o in r)||!t(n[o],r[o]))return!1;return Object.keys(r).length===i}}return n!==n&&r!==r}return rx.dequal=t,rx}var CM;function Xte(){if(CM)return Of;CM=1,Object.defineProperty(Of,"__esModule",{value:!0}),Of.default=void 0;var e=Yte(),t=r(qp()),n=r(Jw());function r(R){return R&&R.__esModule?R:{default:R}}function o(R,S){return a(R)||s(R,S)||c(R,S)||i()}function i(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
64
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s(R,S){var P=R==null?null:typeof Symbol<"u"&&R[Symbol.iterator]||R["@@iterator"];if(P!=null){var N=[],F=!0,W=!1,I,B;try{for(P=P.call(R);!(F=(I=P.next()).done)&&(N.push(I.value),!(S&&N.length===S));F=!0);}catch($){W=!0,B=$}finally{try{!F&&P.return!=null&&P.return()}finally{if(W)throw B}}return N}}function a(R){if(Array.isArray(R))return R}function l(R,S){var P=typeof Symbol<"u"&&R[Symbol.iterator]||R["@@iterator"];if(!P){if(Array.isArray(R)||(P=c(R))||S){P&&(R=P);var N=0,F=function(){};return{s:F,n:function(){return N>=R.length?{done:!0}:{done:!1,value:R[N++]}},e:function(k){throw k},f:F}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
65
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var W=!0,I=!1,B;return{s:function(){P=P.call(R)},n:function(){var k=P.next();return W=k.done,k},e:function(k){I=!0,B=k},f:function(){try{!W&&P.return!=null&&P.return()}finally{if(I)throw B}}}}function c(R,S){if(R){if(typeof R=="string")return d(R,S);var P=Object.prototype.toString.call(R).slice(8,-1);if(P==="Object"&&R.constructor&&(P=R.constructor.name),P==="Map"||P==="Set")return Array.from(R);if(P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P))return d(R,S)}}function d(R,S){(S==null||S>R.length)&&(S=R.length);for(var P=0,N=new Array(S);P<S;P++)N[P]=R[P];return N}for(var f=[],m=n.default.keys(),g=0;g<m.length;g++){var v=m[g],b=n.default.get(v);if(b)for(var x=[].concat(b.baseConcepts,b.relatedConcepts),y=0;y<x.length;y++){var _=x[y];_.module==="HTML"&&(function(){var R=_.concept;if(R){var S=f.find(function(W){return(0,e.dequal)(W,R)}),P;S?P=S[1]:P=[];for(var N=!0,F=0;F<P.length;F++)if(P[F]===v){N=!1;break}N&&P.push(v),f.push([R,P])}})()}}var w={entries:function(){return f},forEach:function(S){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,N=l(f),F;try{for(N.s();!(F=N.n()).done;){var W=o(F.value,2),I=W[0],B=W[1];S.call(P,B,I,f)}}catch($){N.e($)}finally{N.f()}},get:function(S){var P=f.find(function(N){return S.name===N[0].name&&(0,e.dequal)(S.attributes,N[0].attributes)});return P&&P[1]},has:function(S){return!!w.get(S)},keys:function(){return f.map(function(S){var P=o(S,1),N=P[0];return N})},values:function(){return f.map(function(S){var P=o(S,2),N=P[1];return N})}},T=(0,t.default)(w,w.entries());return Of.default=T,Of}var Mf={},RM;function Zte(){if(RM)return Mf;RM=1,Object.defineProperty(Mf,"__esModule",{value:!0}),Mf.default=void 0;var e=n(qp()),t=n(Jw());function n(S){return S&&S.__esModule?S:{default:S}}function r(S,P){return s(S)||i(S,P)||l(S,P)||o()}function o(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
66
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i(S,P){var N=S==null?null:typeof Symbol<"u"&&S[Symbol.iterator]||S["@@iterator"];if(N!=null){var F=[],W=!0,I=!1,B,$;try{for(N=N.call(S);!(W=(B=N.next()).done)&&(F.push(B.value),!(P&&F.length===P));W=!0);}catch(k){I=!0,$=k}finally{try{!W&&N.return!=null&&N.return()}finally{if(I)throw $}}return F}}function s(S){if(Array.isArray(S))return S}function a(S,P){var N=typeof Symbol<"u"&&S[Symbol.iterator]||S["@@iterator"];if(!N){if(Array.isArray(S)||(N=l(S))||P){N&&(S=N);var F=0,W=function(){};return{s:W,n:function(){return F>=S.length?{done:!0}:{done:!1,value:S[F++]}},e:function(j){throw j},f:W}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
67
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var I=!0,B=!1,$;return{s:function(){N=N.call(S)},n:function(){var j=N.next();return I=j.done,j},e:function(j){B=!0,$=j},f:function(){try{!I&&N.return!=null&&N.return()}finally{if(B)throw $}}}}function l(S,P){if(S){if(typeof S=="string")return c(S,P);var N=Object.prototype.toString.call(S).slice(8,-1);if(N==="Object"&&S.constructor&&(N=S.constructor.name),N==="Map"||N==="Set")return Array.from(S);if(N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N))return c(S,P)}}function c(S,P){(P==null||P>S.length)&&(P=S.length);for(var N=0,F=new Array(P);N<P;N++)F[N]=S[N];return F}for(var d=[],f=t.default.keys(),m=0;m<f.length;m++){var g=f[m],v=t.default.get(g),b=[];if(v){for(var x=[].concat(v.baseConcepts,v.relatedConcepts),y=0;y<x.length;y++){var _=x[y];if(_.module==="HTML"){var w=_.concept;w!=null&&b.push(w)}}b.length>0&&d.push([g,b])}}var T={entries:function(){return d},forEach:function(P){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,F=a(d),W;try{for(F.s();!(W=F.n()).done;){var I=r(W.value,2),B=I[0],$=I[1];P.call(N,$,B,d)}}catch(k){F.e(k)}finally{F.f()}},get:function(P){var N=d.find(function(F){return F[0]===P});return N&&N[1]},has:function(P){return!!T.get(P)},keys:function(){return d.map(function(P){var N=r(P,1),F=N[0];return F})},values:function(){return d.map(function(P){var N=r(P,2),F=N[1];return F})}},R=(0,e.default)(T,T.entries());return Mf.default=R,Mf}var SM;function Jte(){if(SM)return jr;SM=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.roles=jr.roleElements=jr.elementRoles=jr.dom=jr.aria=void 0;var e=i(mQ()),t=i(hQ()),n=i(Jw()),r=i(Xte()),o=i(Zte());function i(f){return f&&f.__esModule?f:{default:f}}var s=e.default;jr.aria=s;var a=t.default;jr.dom=a;var l=n.default;jr.roles=l;var c=r.default;jr.elementRoles=c;var d=o.default;return jr.roleElements=d,jr}var no=Jte(),ox={exports:{}},PM;function Qte(){return PM||(PM=1,(function(e){var t=(function(){var n=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",i={};function s(l,c){if(!i[l]){i[l]={};for(var d=0;d<l.length;d++)i[l][l.charAt(d)]=d}return i[l][c]}var a={compressToBase64:function(l){if(l==null)return"";var c=a._compress(l,6,function(d){return r.charAt(d)});switch(c.length%4){default:case 0:return c;case 1:return c+"===";case 2:return c+"==";case 3:return c+"="}},decompressFromBase64:function(l){return l==null?"":l==""?null:a._decompress(l.length,32,function(c){return s(r,l.charAt(c))})},compressToUTF16:function(l){return l==null?"":a._compress(l,15,function(c){return n(c+32)})+" "},decompressFromUTF16:function(l){return l==null?"":l==""?null:a._decompress(l.length,16384,function(c){return l.charCodeAt(c)-32})},compressToUint8Array:function(l){for(var c=a.compress(l),d=new Uint8Array(c.length*2),f=0,m=c.length;f<m;f++){var g=c.charCodeAt(f);d[f*2]=g>>>8,d[f*2+1]=g%256}return d},decompressFromUint8Array:function(l){if(l==null)return a.decompress(l);for(var c=new Array(l.length/2),d=0,f=c.length;d<f;d++)c[d]=l[d*2]*256+l[d*2+1];var m=[];return c.forEach(function(g){m.push(n(g))}),a.decompress(m.join(""))},compressToEncodedURIComponent:function(l){return l==null?"":a._compress(l,6,function(c){return o.charAt(c)})},decompressFromEncodedURIComponent:function(l){return l==null?"":l==""?null:(l=l.replace(/ /g,"+"),a._decompress(l.length,32,function(c){return s(o,l.charAt(c))}))},compress:function(l){return a._compress(l,16,function(c){return n(c)})},_compress:function(l,c,d){if(l==null)return"";var f,m,g={},v={},b="",x="",y="",_=2,w=3,T=2,R=[],S=0,P=0,N;for(N=0;N<l.length;N+=1)if(b=l.charAt(N),Object.prototype.hasOwnProperty.call(g,b)||(g[b]=w++,v[b]=!0),x=y+b,Object.prototype.hasOwnProperty.call(g,x))y=x;else{if(Object.prototype.hasOwnProperty.call(v,y)){if(y.charCodeAt(0)<256){for(f=0;f<T;f++)S=S<<1,P==c-1?(P=0,R.push(d(S)),S=0):P++;for(m=y.charCodeAt(0),f=0;f<8;f++)S=S<<1|m&1,P==c-1?(P=0,R.push(d(S)),S=0):P++,m=m>>1}else{for(m=1,f=0;f<T;f++)S=S<<1|m,P==c-1?(P=0,R.push(d(S)),S=0):P++,m=0;for(m=y.charCodeAt(0),f=0;f<16;f++)S=S<<1|m&1,P==c-1?(P=0,R.push(d(S)),S=0):P++,m=m>>1}_--,_==0&&(_=Math.pow(2,T),T++),delete v[y]}else for(m=g[y],f=0;f<T;f++)S=S<<1|m&1,P==c-1?(P=0,R.push(d(S)),S=0):P++,m=m>>1;_--,_==0&&(_=Math.pow(2,T),T++),g[x]=w++,y=String(b)}if(y!==""){if(Object.prototype.hasOwnProperty.call(v,y)){if(y.charCodeAt(0)<256){for(f=0;f<T;f++)S=S<<1,P==c-1?(P=0,R.push(d(S)),S=0):P++;for(m=y.charCodeAt(0),f=0;f<8;f++)S=S<<1|m&1,P==c-1?(P=0,R.push(d(S)),S=0):P++,m=m>>1}else{for(m=1,f=0;f<T;f++)S=S<<1|m,P==c-1?(P=0,R.push(d(S)),S=0):P++,m=0;for(m=y.charCodeAt(0),f=0;f<16;f++)S=S<<1|m&1,P==c-1?(P=0,R.push(d(S)),S=0):P++,m=m>>1}_--,_==0&&(_=Math.pow(2,T),T++),delete v[y]}else for(m=g[y],f=0;f<T;f++)S=S<<1|m&1,P==c-1?(P=0,R.push(d(S)),S=0):P++,m=m>>1;_--,_==0&&(_=Math.pow(2,T),T++)}for(m=2,f=0;f<T;f++)S=S<<1|m&1,P==c-1?(P=0,R.push(d(S)),S=0):P++,m=m>>1;for(;;)if(S=S<<1,P==c-1){R.push(d(S));break}else P++;return R.join("")},decompress:function(l){return l==null?"":l==""?null:a._decompress(l.length,32768,function(c){return l.charCodeAt(c)})},_decompress:function(l,c,d){var f=[],m=4,g=4,v=3,b="",x=[],y,_,w,T,R,S,P,N={val:d(0),position:c,index:1};for(y=0;y<3;y+=1)f[y]=y;for(w=0,R=Math.pow(2,2),S=1;S!=R;)T=N.val&N.position,N.position>>=1,N.position==0&&(N.position=c,N.val=d(N.index++)),w|=(T>0?1:0)*S,S<<=1;switch(w){case 0:for(w=0,R=Math.pow(2,8),S=1;S!=R;)T=N.val&N.position,N.position>>=1,N.position==0&&(N.position=c,N.val=d(N.index++)),w|=(T>0?1:0)*S,S<<=1;P=n(w);break;case 1:for(w=0,R=Math.pow(2,16),S=1;S!=R;)T=N.val&N.position,N.position>>=1,N.position==0&&(N.position=c,N.val=d(N.index++)),w|=(T>0?1:0)*S,S<<=1;P=n(w);break;case 2:return""}for(f[3]=P,_=P,x.push(P);;){if(N.index>l)return"";for(w=0,R=Math.pow(2,v),S=1;S!=R;)T=N.val&N.position,N.position>>=1,N.position==0&&(N.position=c,N.val=d(N.index++)),w|=(T>0?1:0)*S,S<<=1;switch(P=w){case 0:for(w=0,R=Math.pow(2,8),S=1;S!=R;)T=N.val&N.position,N.position>>=1,N.position==0&&(N.position=c,N.val=d(N.index++)),w|=(T>0?1:0)*S,S<<=1;f[g++]=n(w),P=g-1,m--;break;case 1:for(w=0,R=Math.pow(2,16),S=1;S!=R;)T=N.val&N.position,N.position>>=1,N.position==0&&(N.position=c,N.val=d(N.index++)),w|=(T>0?1:0)*S,S<<=1;f[g++]=n(w),P=g-1,m--;break;case 2:return x.join("")}if(m==0&&(m=Math.pow(2,v),v++),f[P])b=f[P];else if(P===g)b=_+_.charAt(0);else return null;x.push(b),f[g++]=_+b.charAt(0),m--,_=b,m==0&&(m=Math.pow(2,v),v++)}}};return a})();e!=null?e.exports=t:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return t})})(ox)),ox.exports}var ene=Qte();const tne=_A(ene);function W$(e){return e.replace(/</g,"<").replace(/>/g,">")}const nne=(e,t,n,r,o,i,s)=>{const a=r+n.indent,l=n.colors;return e.map(c=>{const d=t[c];let f=s(d,n,a,o,i);return typeof d!="string"&&(f.indexOf(`
|
|
68
|
-
`)!==-1&&(f=n.spacingOuter+a+f+n.spacingOuter+r),f="{"+f+"}"),n.spacingInner+r+l.prop.open+c+l.prop.close+"="+l.value.open+f+l.value.close}).join("")},rne=3,one=(e,t,n,r,o,i)=>e.map(s=>{const a=typeof s=="string"?H$(s,t):i(s,t,n,r,o);return a===""&&typeof s=="object"&&s!==null&&s.nodeType!==rne?"":t.spacingOuter+n+a}).join(""),H$=(e,t)=>{const n=t.colors.content;return n.open+W$(e)+n.close},ine=(e,t)=>{const n=t.colors.comment;return n.open+"<!--"+W$(e)+"-->"+n.close},sne=(e,t,n,r,o)=>{const i=r.colors.tag;return i.open+"<"+e+(t&&i.close+t+r.spacingOuter+o+i.open)+(n?">"+i.close+n+r.spacingOuter+o+i.open+"</"+e:(t&&!r.min?"":" ")+"/")+">"+i.close},ane=(e,t)=>{const n=t.colors.tag;return n.open+"<"+e+n.close+" …"+n.open+" />"+n.close},lne=1,K$=3,U$=8,z$=11,une=/^((HTML|SVG)\w*)?Element$/,G$=e=>{const{tagName:t}=e;return!!(typeof t=="string"&&t.includes("-")||typeof e.hasAttribute=="function"&&e.hasAttribute("is"))},cne=e=>{const t=e.constructor.name,{nodeType:n}=e;return n===lne&&(une.test(t)||G$(e))||n===K$&&t==="Text"||n===U$&&t==="Comment"||n===z$&&t==="DocumentFragment"};function dne(e){return e.nodeType===K$}function fne(e){return e.nodeType===U$}function ix(e){return e.nodeType===z$}function pne(e){return{test:t=>{var n;return((t==null||(n=t.constructor)==null?void 0:n.name)||G$(t))&&cne(t)},serialize:(t,n,r,o,i,s)=>{if(dne(t))return H$(t.data,n);if(fne(t))return ine(t.data,n);const a=ix(t)?"DocumentFragment":t.tagName.toLowerCase();return++o>n.maxDepth?ane(a,n):sne(a,nne(ix(t)?[]:Array.from(t.attributes).map(l=>l.name).sort(),ix(t)?{}:Array.from(t.attributes).reduce((l,c)=>(l[c.name]=c.value,l),{}),n,r+n.indent,o,i,s),one(Array.prototype.slice.call(t.childNodes||t.children).filter(e),n,r+n.indent,o,i,s),n,r)}}}let Y$=null,Qw=null,eC=null;try{const e=module&&module.require;Qw=e.call(module,"fs").readFileSync,eC=e.call(module,"@babel/code-frame").codeFrameColumns,Y$=e.call(module,"chalk")}catch{}function mne(e){const t=e.indexOf("(")+1,n=e.indexOf(")"),r=e.slice(t,n),o=r.split(":"),[i,s,a]=[o[0],parseInt(o[1],10),parseInt(o[2],10)];let l="";try{l=Qw(i,"utf-8")}catch{return""}const c=eC(l,{start:{line:s,column:a}},{highlightCode:!0,linesBelow:0});return Y$.dim(r)+`
|
|
69
|
-
`+c+`
|
|
70
|
-
`}function hne(){if(!Qw||!eC)return"";const t=new Error().stack.split(`
|
|
71
|
-
`).slice(1).find(n=>!n.includes("node_modules/"));return mne(t)}const X$=3;function sx(){return typeof jest<"u"&&jest!==null?setTimeout._isMockFunction===!0||Object.prototype.hasOwnProperty.call(setTimeout,"clock"):!1}function tC(){if(typeof window>"u")throw new Error("Could not find default container");return window.document}function Z$(e){if(e.defaultView)return e.defaultView;if(e.ownerDocument&&e.ownerDocument.defaultView)return e.ownerDocument.defaultView;if(e.window)return e.window;throw e.ownerDocument&&e.ownerDocument.defaultView===null?new Error("It looks like the window object is not available for the provided node."):e.then instanceof Function?new Error("It looks like you passed a Promise object instead of a DOM node. Did you do something like `fireEvent.click(screen.findBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`, or await the findBy query `fireEvent.click(await screen.findBy...`?"):Array.isArray(e)?new Error("It looks like you passed an Array instead of a DOM node. Did you do something like `fireEvent.click(screen.getAllBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`?"):typeof e.debug=="function"&&typeof e.logTestingPlaygroundURL=="function"?new Error("It looks like you passed a `screen` object. Did you do something like `fireEvent.click(screen, ...` when you meant to use a query, e.g. `fireEvent.click(screen.getBy..., `?"):new Error("The given node is not an Element, the node type is: "+typeof e+".")}function Ji(e){if(!e||typeof e.querySelector!="function"||typeof e.querySelectorAll!="function")throw new TypeError("Expected container to be an Element, a Document or a DocumentFragment but got "+t(e)+".");function t(n){return typeof n=="object"?n===null?"null":n.constructor.name:typeof n}}const gne=()=>{if(typeof process>"u")return!1;let e;try{var t;const n=(t=process.env)==null?void 0:t.COLORS;n&&(e=JSON.parse(n))}catch{}return typeof e=="boolean"?e:process.versions!==void 0&&process.versions.node!==void 0},{DOMCollection:vne}=A$.plugins,bne=1,yne=8;function xne(e){return e.nodeType!==yne&&(e.nodeType!==bne||!e.matches(en().defaultIgnore))}function jg(e,t,n){if(n===void 0&&(n={}),e||(e=tC().body),typeof t!="number"&&(t=typeof process<"u"&&typeof process.env<"u"&&process.env.DEBUG_PRINT_LIMIT||7e3),t===0)return"";e.documentElement&&(e=e.documentElement);let r=typeof e;if(r==="object"?r=e.constructor.name:e={},!("outerHTML"in e))throw new TypeError("Expected an element or document but got "+r);const{filterNode:o=xne,...i}=n,s=A$.format(e,{plugins:[pne(o),vne],printFunctionName:!1,highlight:gne(),...i});return t!==void 0&&e.outerHTML.length>t?s.slice(0,t)+"...":s}const TM=function(){const e=hne();console.log(e?jg(...arguments)+`
|
|
72
|
-
|
|
73
|
-
`+e:jg(...arguments))};let Ea={testIdAttribute:"data-testid",asyncUtilTimeout:1e3,asyncWrapper:e=>e(),unstable_advanceTimersWrapper:e=>e(),eventWrapper:e=>e(),defaultHidden:!1,defaultIgnore:"script, style",showOriginalStackTrace:!1,throwSuggestions:!1,getElementError(e,t){const n=jg(t),r=new Error([e,"Ignored nodes: comments, "+Ea.defaultIgnore+`
|
|
74
|
-
`+n].filter(Boolean).join(`
|
|
75
|
-
|
|
76
|
-
`));return r.name="TestingLibraryElementError",r},_disableExpensiveErrorDiagnostics:!1,computedStyleSupportsPseudoElements:!1};function Ene(e){try{return Ea._disableExpensiveErrorDiagnostics=!0,e()}finally{Ea._disableExpensiveErrorDiagnostics=!1}}function wne(e){typeof e=="function"&&(e=e(Ea)),Ea={...Ea,...e}}function en(){return Ea}const Cne=["button","meter","output","progress","select","textarea","input"];function J$(e){return Cne.includes(e.nodeName.toLowerCase())?"":e.nodeType===X$?e.textContent:Array.from(e.childNodes).map(t=>J$(t)).join("")}function sE(e){let t;return e.tagName.toLowerCase()==="label"?t=J$(e):t=e.value||e.textContent,t}function Q$(e){if(e.labels!==void 0){var t;return(t=e.labels)!=null?t:[]}if(!Rne(e))return[];const n=e.ownerDocument.querySelectorAll("label");return Array.from(n).filter(r=>r.control===e)}function Rne(e){return/BUTTON|METER|OUTPUT|PROGRESS|SELECT|TEXTAREA/.test(e.tagName)||e.tagName==="INPUT"&&e.getAttribute("type")!=="hidden"}function eF(e,t,n){let{selector:r="*"}=n===void 0?{}:n;const o=t.getAttribute("aria-labelledby"),i=o?o.split(" "):[];return i.length?i.map(s=>{const a=e.querySelector('[id="'+s+'"]');return a?{content:sE(a),formControl:null}:{content:"",formControl:null}}):Array.from(Q$(t)).map(s=>{const a=sE(s),c=Array.from(s.querySelectorAll("button, input, meter, output, progress, select, textarea")).filter(d=>d.matches(r))[0];return{content:a,formControl:c}})}function tF(e){if(e==null)throw new Error("It looks like "+e+" was passed instead of a matcher. Did you do something like getByText("+e+")?")}function nu(e,t,n,r){if(typeof e!="string")return!1;tF(n);const o=r(e);return typeof n=="string"||typeof n=="number"?o.toLowerCase().includes(n.toString().toLowerCase()):typeof n=="function"?n(o,t):rF(n,o)}function Hi(e,t,n,r){if(typeof e!="string")return!1;tF(n);const o=r(e);return n instanceof Function?n(o,t):n instanceof RegExp?rF(n,o):o===String(n)}function nF(e){let{trim:t=!0,collapseWhitespace:n=!0}=e===void 0?{}:e;return r=>{let o=r;return o=t?o.trim():o,o=n?o.replace(/\s+/g," "):o,o}}function La(e){let{trim:t,collapseWhitespace:n,normalizer:r}=e;if(!r)return nF({trim:t,collapseWhitespace:n});if(typeof t<"u"||typeof n<"u")throw new Error('trim and collapseWhitespace are not supported with a normalizer. If you want to use the default trim and collapseWhitespace logic in your normalizer, use "getDefaultNormalizer({trim, collapseWhitespace})" and compose that into your normalizer');return r}function rF(e,t){const n=e.test(t);return e.global&&e.lastIndex!==0&&(console.warn("To match all elements we had to reset the lastIndex of the RegExp because the global flag is enabled. We encourage to remove the global flag from the RegExp."),e.lastIndex=0),n}function Nv(e){return e.matches("input[type=submit], input[type=button], input[type=reset]")?e.value:Array.from(e.childNodes).filter(t=>t.nodeType===X$&&!!t.textContent).map(t=>t.textContent).join("")}const Sne=Pne(no.elementRoles);function oF(e){return e.hidden===!0||e.getAttribute("aria-hidden")==="true"||e.ownerDocument.defaultView.getComputedStyle(e).display==="none"}function nC(e,t){t===void 0&&(t={});const{isSubtreeInaccessible:n=oF}=t;if(e.ownerDocument.defaultView.getComputedStyle(e).visibility==="hidden")return!0;let o=e;for(;o;){if(n(o))return!0;o=o.parentElement}return!1}function rC(e){for(const{match:t,roles:n}of Sne)if(t(e))return[...n];return[]}function Pne(e){function t(s){let{name:a,attributes:l}=s;return""+a+l.map(c=>{let{name:d,value:f,constraints:m=[]}=c;const g=m.indexOf("undefined")!==-1,v=m.indexOf("set")!==-1;return typeof f<"u"?"["+d+'="'+f+'"]':g?":not(["+d+"])":v?"["+d+"]:not(["+d+'=""])':"["+d+"]"}).join("")}function n(s){let{attributes:a=[]}=s;return a.length}function r(s,a){let{specificity:l}=s,{specificity:c}=a;return c-l}function o(s){let{attributes:a=[]}=s;const l=a.findIndex(d=>d.value&&d.name==="type"&&d.value==="text");l>=0&&(a=[...a.slice(0,l),...a.slice(l+1)]);const c=t({...s,attributes:a});return d=>l>=0&&d.type!=="text"?!1:d.matches(c)}let i=[];for(const[s,a]of e.entries())i=[...i,{match:o(s),roles:Array.from(a),specificity:n(s)}];return i.sort(r)}function Tne(e,t){let{hidden:n=!1}=t===void 0?{}:t;function r(o){return[o,...Array.from(o.children).reduce((i,s)=>[...i,...r(s)],[])]}return r(e).filter(o=>n===!1?nC(o)===!1:!0).reduce((o,i)=>{let s=[];return i.hasAttribute("role")?s=i.getAttribute("role").split(" ").slice(0,1):s=rC(i),s.reduce((a,l)=>Array.isArray(a[l])?{...a,[l]:[...a[l],i]}:{...a,[l]:[i]},o)},{})}function _ne(e,t){let{hidden:n,includeDescription:r}=t;const o=Tne(e,{hidden:n});return Object.entries(o).filter(i=>{let[s]=i;return s!=="generic"}).map(i=>{let[s,a]=i;const l="-".repeat(50),c=a.map(d=>{const f='Name "'+Zw(d,{computedStyleSupportsPseudoElements:en().computedStyleSupportsPseudoElements})+`":
|
|
77
|
-
`,m=jg(d.cloneNode(!1));if(r){const g='Description "'+V$(d,{computedStyleSupportsPseudoElements:en().computedStyleSupportsPseudoElements})+`":
|
|
78
|
-
`;return""+f+g+m}return""+f+m}).join(`
|
|
79
|
-
|
|
80
|
-
`);return s+`:
|
|
81
|
-
|
|
82
|
-
`+c+`
|
|
83
|
-
|
|
84
|
-
`+l}).join(`
|
|
85
|
-
`)}function Nne(e){return e.tagName==="OPTION"?e.selected:Bp(e,"aria-selected")}function One(e){return e.getAttribute("aria-busy")==="true"}function Mne(e){if(!("indeterminate"in e&&e.indeterminate))return"checked"in e?e.checked:Bp(e,"aria-checked")}function Ine(e){return Bp(e,"aria-pressed")}function Dne(e){var t,n;return(t=(n=Bp(e,"aria-current"))!=null?n:e.getAttribute("aria-current"))!=null?t:!1}function Ane(e){return Bp(e,"aria-expanded")}function Bp(e,t){const n=e.getAttribute(t);if(n==="true")return!0;if(n==="false")return!1}function kne(e){const t={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6};return e.getAttribute("aria-level")&&Number(e.getAttribute("aria-level"))||t[e.tagName]}function $ne(e){const t=e.getAttribute("aria-valuenow");return t===null?void 0:+t}function Fne(e){const t=e.getAttribute("aria-valuemax");return t===null?void 0:+t}function Lne(e){const t=e.getAttribute("aria-valuemin");return t===null?void 0:+t}function jne(e){const t=e.getAttribute("aria-valuetext");return t===null?void 0:t}const _M=nF();function qne(e){return e.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&")}function NM(e){return new RegExp(qne(e.toLowerCase()),"i")}function ds(e,t,n,r){let{variant:o,name:i}=r,s="";const a={},l=[["Role","TestId"].includes(e)?n:NM(n)];i&&(a.name=NM(i)),e==="Role"&&nC(t)&&(a.hidden=!0,s=`Element is inaccessible. This means that the element and all its children are invisible to screen readers.
|
|
86
|
-
If you are using the aria-hidden prop, make sure this is the right choice for your case.
|
|
87
|
-
`),Object.keys(a).length>0&&l.push(a);const c=o+"By"+e;return{queryName:e,queryMethod:c,queryArgs:l,variant:o,warning:s,toString(){s&&console.warn(s);let[d,f]=l;return d=typeof d=="string"?"'"+d+"'":d,f=f?", { "+Object.entries(f).map(m=>{let[g,v]=m;return g+": "+v}).join(", ")+" }":"",c+"("+d+f+")"}}}function fs(e,t,n){return n&&!0}function aE(e,t,n){var r,o;if(t===void 0&&(t="get"),e.matches(en().defaultIgnore))return;const i=(r=e.getAttribute("role"))!=null?r:(o=rC(e))==null?void 0:o[0];if(i!=="generic"&&fs("Role",n,i))return ds("Role",e,i,{variant:t,name:Zw(e,{computedStyleSupportsPseudoElements:en().computedStyleSupportsPseudoElements})});const s=eF(document,e).map(m=>m.content).join(" ");if(fs("LabelText",n,s))return ds("LabelText",e,s,{variant:t});const a=e.getAttribute("placeholder");if(fs("PlaceholderText",n,a))return ds("PlaceholderText",e,a,{variant:t});const l=_M(Nv(e));if(fs("Text",n,l))return ds("Text",e,l,{variant:t});if(fs("DisplayValue",n,e.value))return ds("DisplayValue",e,_M(e.value),{variant:t});const c=e.getAttribute("alt");if(fs("AltText",n,c))return ds("AltText",e,c,{variant:t});const d=e.getAttribute("title");if(fs("Title",n,d))return ds("Title",e,d,{variant:t});const f=e.getAttribute(en().testIdAttribute);if(fs("TestId",n,f))return ds("TestId",e,f,{variant:t})}function $h(e,t){e.stack=t.stack.replace(t.message,e.message)}function Bne(e,t){let{container:n=tC(),timeout:r=en().asyncUtilTimeout,showOriginalStackTrace:o=en().showOriginalStackTrace,stackTraceError:i,interval:s=50,onTimeout:a=c=>(Object.defineProperty(c,"message",{value:en().getElementError(c.message,n).message}),c),mutationObserverOptions:l={subtree:!0,childList:!0,attributes:!0,characterData:!0}}=t;if(typeof e!="function")throw new TypeError("Received `callback` arg must be a function");return new Promise(async(c,d)=>{let f,m,g,v=!1,b="idle";const x=setTimeout(R,r),y=sx();if(y){const{unstable_advanceTimersWrapper:S}=en();for(T();!v;){if(!sx()){const P=new Error("Changed from using fake timers to real timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to real timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830");o||$h(P,i),d(P);return}if(await S(async()=>{jest.advanceTimersByTime(s)}),v)break;T()}}else{try{Ji(n)}catch(P){d(P);return}m=setInterval(w,s);const{MutationObserver:S}=Z$(n);g=new S(w),g.observe(n,l),T()}function _(S,P){v=!0,clearTimeout(x),y||(clearInterval(m),g.disconnect()),S?d(S):c(P)}function w(){if(sx()){const S=new Error("Changed from using real timers to fake timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to fake timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830");return o||$h(S,i),d(S)}else return T()}function T(){if(b!=="pending")try{const S=Ene(e);typeof S?.then=="function"?(b="pending",S.then(P=>{b="resolved",_(null,P)},P=>{b="rejected",f=P})):_(null,S)}catch(S){f=S}}function R(){let S;f?(S=f,!o&&S.name==="TestingLibraryElementError"&&$h(S,i)):(S=new Error("Timed out in waitFor."),o||$h(S,i)),_(a(S),null)}})}function Vne(e,t){const n=new Error("STACK_TRACE_MESSAGE");return en().asyncWrapper(()=>Bne(e,{stackTraceError:n,...t}))}function iF(e,t){return en().getElementError(e,t)}function Wne(e,t){return iF(e+"\n\n(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).",t)}function Ov(e,t,n,r){let{exact:o=!0,collapseWhitespace:i,trim:s,normalizer:a}=r===void 0?{}:r;const l=o?Hi:nu,c=La({collapseWhitespace:i,trim:s,normalizer:a});return Array.from(t.querySelectorAll("["+e+"]")).filter(d=>l(d.getAttribute(e),d,n,c))}function qg(e,t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];const s=e(n,...o);if(s.length>1){const a=s.map(l=>iF(null,l).message).join(`
|
|
88
|
-
|
|
89
|
-
`);throw Wne(t(n,...o)+`
|
|
90
|
-
|
|
91
|
-
Here are the matching elements:
|
|
92
|
-
|
|
93
|
-
`+a,n)}return s[0]||null}}function sF(e,t){return en().getElementError(`A better query is available, try this:
|
|
94
|
-
`+e.toString()+`
|
|
95
|
-
`,t)}function Hne(e,t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];const s=e(n,...o);if(!s.length)throw en().getElementError(t(n,...o),n);return s}}function Bg(e){return(t,n,r,o)=>Vne(()=>e(t,n,r),{container:t,...o})}const Il=(e,t,n)=>function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];const a=e(r,...i),[{suggest:l=en().throwSuggestions}={}]=i.slice(-1);if(a&&l){const c=aE(a,n);if(c&&!t.endsWith(c.queryName))throw sF(c.toString(),r)}return a},ho=(e,t,n)=>function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];const a=e(r,...i),[{suggest:l=en().throwSuggestions}={}]=i.slice(-1);if(a.length&&l){const c=[...new Set(a.map(d=>{var f;return(f=aE(d,n))==null?void 0:f.toString()}))];if(c.length===1&&!t.endsWith(aE(a[0],n).queryName))throw sF(c[0],r)}return a};function ja(e,t,n){const r=Il(qg(e,t),e.name,"query"),o=Hne(e,n),i=qg(o,t),s=Il(i,e.name,"get"),a=ho(o,e.name.replace("query","get"),"getAll"),l=Bg(ho(o,e.name,"findAll")),c=Bg(Il(i,e.name,"find"));return[r,a,s,l,c]}function Kne(e){return Array.from(e.querySelectorAll("label,input")).map(t=>({node:t,textToMatch:sE(t)})).filter(t=>{let{textToMatch:n}=t;return n!==null})}const Une=function(e,t,n){let{exact:r=!0,trim:o,collapseWhitespace:i,normalizer:s}=n===void 0?{}:n;const a=r?Hi:nu,l=La({collapseWhitespace:i,trim:o,normalizer:s});return Kne(e).filter(d=>{let{node:f,textToMatch:m}=d;return a(m,f,t,l)}).map(d=>{let{node:f}=d;return f})},op=function(e,t,n){let{selector:r="*",exact:o=!0,collapseWhitespace:i,trim:s,normalizer:a}=n===void 0?{}:n;Ji(e);const l=o?Hi:nu,c=La({collapseWhitespace:i,trim:s,normalizer:a}),d=Array.from(e.querySelectorAll("*")).filter(f=>Q$(f).length||f.hasAttribute("aria-labelledby")).reduce((f,m)=>{const g=eF(e,m,{selector:r});g.filter(b=>!!b.formControl).forEach(b=>{l(b.content,b.formControl,t,c)&&b.formControl&&f.push(b.formControl)});const v=g.filter(b=>!!b.content).map(b=>b.content);return l(v.join(" "),m,t,c)&&f.push(m),v.length>1&&v.forEach((b,x)=>{l(b,m,t,c)&&f.push(m);const y=[...v];y.splice(x,1),y.length>1&&l(y.join(" "),m,t,c)&&f.push(m)}),f},[]).concat(Ov("aria-label",e,t,{exact:o,normalizer:c}));return Array.from(new Set(d)).filter(f=>f.matches(r))},Ta=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];const i=op(e,t,...r);if(!i.length){const s=Une(e,t,...r);if(s.length){const a=s.map(l=>zne(e,l)).filter(l=>!!l);throw a.length?en().getElementError(a.map(l=>"Found a label with the text of: "+t+", however the element associated with this label (<"+l+" />) is non-labellable [https://html.spec.whatwg.org/multipage/forms.html#category-label]. If you really need to label a <"+l+" />, you can use aria-label or aria-labelledby instead.").join(`
|
|
96
|
-
|
|
97
|
-
`),e):en().getElementError("Found a label with the text of: "+t+`, however no form control was found associated to that label. Make sure you're using the "for" attribute or "aria-labelledby" attribute correctly.`,e)}else throw en().getElementError("Unable to find a label with the text of: "+t,e)}return i};function zne(e,t){const n=t.getAttribute("for");if(!n)return null;const r=e.querySelector('[id="'+n+'"]');return r?r.tagName.toLowerCase():null}const aF=(e,t)=>"Found multiple elements with the text of: "+t,Gne=Il(qg(op,aF),op.name,"query"),lF=qg(Ta,aF),Yne=Bg(ho(Ta,Ta.name,"findAll")),Xne=Bg(Il(lF,Ta.name,"find")),Zne=ho(Ta,Ta.name,"getAll"),Jne=Il(lF,Ta.name,"get"),Qne=ho(op,op.name,"queryAll"),lE=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ji(t[0]),Ov("placeholder",...t)},ere=(e,t)=>"Found multiple elements with the placeholder text of: "+t,tre=(e,t)=>"Unable to find an element with the placeholder text of: "+t,nre=ho(lE,lE.name,"queryAll"),[rre,ore,ire,sre,are]=ja(lE,ere,tre),uE=function(e,t,n){let{selector:r="*",exact:o=!0,collapseWhitespace:i,trim:s,ignore:a=en().defaultIgnore,normalizer:l}=n===void 0?{}:n;Ji(e);const c=o?Hi:nu,d=La({collapseWhitespace:i,trim:s,normalizer:l});let f=[];return typeof e.matches=="function"&&e.matches(r)&&(f=[e]),[...f,...Array.from(e.querySelectorAll(r))].filter(m=>!a||!m.matches(a)).filter(m=>c(Nv(m),m,t,d))},lre=(e,t)=>"Found multiple elements with the text: "+t,ure=function(e,t,n){n===void 0&&(n={});const{collapseWhitespace:r,trim:o,normalizer:i,selector:s}=n,l=La({collapseWhitespace:r,trim:o,normalizer:i})(t.toString()),c=l!==t.toString(),d=(s??"*")!=="*";return"Unable to find an element with the text: "+(c?l+" (normalized from '"+t+"')":t)+(d?", which matches selector '"+s+"'":"")+". This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible."},cre=ho(uE,uE.name,"queryAll"),[dre,fre,pre,mre,hre]=ja(uE,lre,ure),cE=function(e,t,n){let{exact:r=!0,collapseWhitespace:o,trim:i,normalizer:s}=n===void 0?{}:n;Ji(e);const a=r?Hi:nu,l=La({collapseWhitespace:o,trim:i,normalizer:s});return Array.from(e.querySelectorAll("input,textarea,select")).filter(c=>c.tagName==="SELECT"?Array.from(c.options).filter(f=>f.selected).some(f=>a(Nv(f),f,t,l)):a(c.value,c,t,l))},gre=(e,t)=>"Found multiple elements with the display value: "+t+".",vre=(e,t)=>"Unable to find an element with the display value: "+t+".",bre=ho(cE,cE.name,"queryAll"),[yre,xre,Ere,wre,Cre]=ja(cE,gre,vre),Rre=/^(img|input|area|.+-.+)$/i,dE=function(e,t,n){return n===void 0&&(n={}),Ji(e),Ov("alt",e,t,n).filter(r=>Rre.test(r.tagName))},Sre=(e,t)=>"Found multiple elements with the alt text: "+t,Pre=(e,t)=>"Unable to find an element with the alt text: "+t,Tre=ho(dE,dE.name,"queryAll"),[_re,Nre,Ore,Mre,Ire]=ja(dE,Sre,Pre),Dre=e=>{var t;return e.tagName.toLowerCase()==="title"&&((t=e.parentElement)==null?void 0:t.tagName.toLowerCase())==="svg"},fE=function(e,t,n){let{exact:r=!0,collapseWhitespace:o,trim:i,normalizer:s}=n===void 0?{}:n;Ji(e);const a=r?Hi:nu,l=La({collapseWhitespace:o,trim:i,normalizer:s});return Array.from(e.querySelectorAll("[title], svg > title")).filter(c=>a(c.getAttribute("title"),c,t,l)||Dre(c)&&a(Nv(c),c,t,l))},Are=(e,t)=>"Found multiple elements with the title: "+t+".",kre=(e,t)=>"Unable to find an element with the title: "+t+".",$re=ho(fE,fE.name,"queryAll"),[Fre,Lre,jre,qre,Bre]=ja(fE,Are,kre),pE=function(e,t,n){let{hidden:r=en().defaultHidden,name:o,description:i,queryFallbacks:s=!1,selected:a,busy:l,checked:c,pressed:d,current:f,level:m,expanded:g,value:{now:v,min:b,max:x,text:y}={}}=n===void 0?{}:n;if(Ji(e),a!==void 0){var _;if(((_=no.roles.get(t))==null?void 0:_.props["aria-selected"])===void 0)throw new Error('"aria-selected" is not supported on role "'+t+'".')}if(l!==void 0){var w;if(((w=no.roles.get(t))==null?void 0:w.props["aria-busy"])===void 0)throw new Error('"aria-busy" is not supported on role "'+t+'".')}if(c!==void 0){var T;if(((T=no.roles.get(t))==null?void 0:T.props["aria-checked"])===void 0)throw new Error('"aria-checked" is not supported on role "'+t+'".')}if(d!==void 0){var R;if(((R=no.roles.get(t))==null?void 0:R.props["aria-pressed"])===void 0)throw new Error('"aria-pressed" is not supported on role "'+t+'".')}if(f!==void 0){var S;if(((S=no.roles.get(t))==null?void 0:S.props["aria-current"])===void 0)throw new Error('"aria-current" is not supported on role "'+t+'".')}if(m!==void 0&&t!=="heading")throw new Error('Role "'+t+'" cannot have "level" property.');if(v!==void 0){var P;if(((P=no.roles.get(t))==null?void 0:P.props["aria-valuenow"])===void 0)throw new Error('"aria-valuenow" is not supported on role "'+t+'".')}if(x!==void 0){var N;if(((N=no.roles.get(t))==null?void 0:N.props["aria-valuemax"])===void 0)throw new Error('"aria-valuemax" is not supported on role "'+t+'".')}if(b!==void 0){var F;if(((F=no.roles.get(t))==null?void 0:F.props["aria-valuemin"])===void 0)throw new Error('"aria-valuemin" is not supported on role "'+t+'".')}if(y!==void 0){var W;if(((W=no.roles.get(t))==null?void 0:W.props["aria-valuetext"])===void 0)throw new Error('"aria-valuetext" is not supported on role "'+t+'".')}if(g!==void 0){var I;if(((I=no.roles.get(t))==null?void 0:I.props["aria-expanded"])===void 0)throw new Error('"aria-expanded" is not supported on role "'+t+'".')}const B=new WeakMap;function $(k){return B.has(k)||B.set(k,oF(k)),B.get(k)}return Array.from(e.querySelectorAll(Vre(t))).filter(k=>{if(k.hasAttribute("role")){const A=k.getAttribute("role");if(s)return A.split(" ").filter(Boolean).some(H=>H===t);const[L]=A.split(" ");return L===t}return rC(k).some(A=>A===t)}).filter(k=>{if(a!==void 0)return a===Nne(k);if(l!==void 0)return l===One(k);if(c!==void 0)return c===Mne(k);if(d!==void 0)return d===Ine(k);if(f!==void 0)return f===Dne(k);if(g!==void 0)return g===Ane(k);if(m!==void 0)return m===kne(k);if(v!==void 0||x!==void 0||b!==void 0||y!==void 0){let D=!0;if(v!==void 0&&D&&(D=v===$ne(k)),x!==void 0&&D&&(D=x===Fne(k)),b!==void 0&&D&&(D=b===Lne(k)),y!==void 0){var j;D&&(D=Hi((j=jne(k))!=null?j:null,k,y,A=>A))}return D}return!0}).filter(k=>o===void 0?!0:Hi(Zw(k,{computedStyleSupportsPseudoElements:en().computedStyleSupportsPseudoElements}),k,o,j=>j)).filter(k=>i===void 0?!0:Hi(V$(k,{computedStyleSupportsPseudoElements:en().computedStyleSupportsPseudoElements}),k,i,j=>j)).filter(k=>r===!1?nC(k,{isSubtreeInaccessible:$})===!1:!0)};function Vre(e){var t;const n='*[role~="'+e+'"]',r=(t=no.roleElements.get(e))!=null?t:new Set,o=new Set(Array.from(r).map(i=>{let{name:s}=i;return s}));return[n].concat(Array.from(o)).join(",")}const uF=e=>{let t="";return e===void 0?t="":typeof e=="string"?t=' and name "'+e+'"':t=" and name `"+e+"`",t},Wre=function(e,t,n){let{name:r}=n===void 0?{}:n;return'Found multiple elements with the role "'+t+'"'+uF(r)},Hre=function(e,t,n){let{hidden:r=en().defaultHidden,name:o,description:i}=n===void 0?{}:n;if(en()._disableExpensiveErrorDiagnostics)return'Unable to find role="'+t+'"'+uF(o);let s="";Array.from(e.children).forEach(d=>{s+=_ne(d,{hidden:r,includeDescription:i!==void 0})});let a;s.length===0?r===!1?a="There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole":a="There are no available roles.":a=(`
|
|
98
|
-
Here are the `+(r===!1?"accessible":"available")+` roles:
|
|
99
|
-
|
|
100
|
-
`+s.replace(/\n/g,`
|
|
101
|
-
`).replace(/\n\s\s\n/g,`
|
|
102
|
-
|
|
103
|
-
`)+`
|
|
104
|
-
`).trim();let l="";o===void 0?l="":typeof o=="string"?l=' and name "'+o+'"':l=" and name `"+o+"`";let c="";return i===void 0?c="":typeof i=="string"?c=' and description "'+i+'"':c=" and description `"+i+"`",(`
|
|
105
|
-
Unable to find an `+(r===!1?"accessible ":"")+'element with the role "'+t+'"'+l+c+`
|
|
106
|
-
|
|
107
|
-
`+a).trim()},Kre=ho(pE,pE.name,"queryAll"),[Ure,zre,Gre,Yre,Xre]=ja(pE,Wre,Hre),oC=()=>en().testIdAttribute,mE=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ji(t[0]),Ov(oC(),...t)},Zre=(e,t)=>"Found multiple elements by: ["+oC()+'="'+t+'"]',Jre=(e,t)=>"Unable to find an element by: ["+oC()+'="'+t+'"]',Qre=ho(mE,mE.name,"queryAll"),[eoe,toe,noe,roe,ooe]=ja(mE,Zre,Jre);var hE=Object.freeze({__proto__:null,queryAllByLabelText:Qne,queryByLabelText:Gne,getAllByLabelText:Zne,getByLabelText:Jne,findAllByLabelText:Yne,findByLabelText:Xne,queryByPlaceholderText:rre,queryAllByPlaceholderText:nre,getByPlaceholderText:ire,getAllByPlaceholderText:ore,findAllByPlaceholderText:sre,findByPlaceholderText:are,queryByText:dre,queryAllByText:cre,getByText:pre,getAllByText:fre,findAllByText:mre,findByText:hre,queryByDisplayValue:yre,queryAllByDisplayValue:bre,getByDisplayValue:Ere,getAllByDisplayValue:xre,findAllByDisplayValue:wre,findByDisplayValue:Cre,queryByAltText:_re,queryAllByAltText:Tre,getByAltText:Ore,getAllByAltText:Nre,findAllByAltText:Mre,findByAltText:Ire,queryByTitle:Fre,queryAllByTitle:$re,getByTitle:jre,getAllByTitle:Lre,findAllByTitle:qre,findByTitle:Bre,queryByRole:Ure,queryAllByRole:Kre,getAllByRole:zre,getByRole:Gre,findAllByRole:Yre,findByRole:Xre,queryByTestId:eoe,queryAllByTestId:Qre,getByTestId:noe,getAllByTestId:toe,findAllByTestId:roe,findByTestId:ooe});function ioe(e,t,n){return t===void 0&&(t=hE),n===void 0&&(n={}),Object.keys(t).reduce((r,o)=>{const i=t[o];return r[o]=i.bind(null,e),r},n)}const OM={copy:{EventType:"ClipboardEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},cut:{EventType:"ClipboardEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},paste:{EventType:"ClipboardEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},compositionEnd:{EventType:"CompositionEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},compositionStart:{EventType:"CompositionEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},compositionUpdate:{EventType:"CompositionEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},keyDown:{EventType:"KeyboardEvent",defaultInit:{bubbles:!0,cancelable:!0,charCode:0,composed:!0}},keyPress:{EventType:"KeyboardEvent",defaultInit:{bubbles:!0,cancelable:!0,charCode:0,composed:!0}},keyUp:{EventType:"KeyboardEvent",defaultInit:{bubbles:!0,cancelable:!0,charCode:0,composed:!0}},focus:{EventType:"FocusEvent",defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},blur:{EventType:"FocusEvent",defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},focusIn:{EventType:"FocusEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},focusOut:{EventType:"FocusEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},change:{EventType:"Event",defaultInit:{bubbles:!0,cancelable:!1}},input:{EventType:"InputEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},invalid:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!0}},submit:{EventType:"Event",defaultInit:{bubbles:!0,cancelable:!0}},reset:{EventType:"Event",defaultInit:{bubbles:!0,cancelable:!0}},click:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,button:0,composed:!0}},contextMenu:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dblClick:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},drag:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dragEnd:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},dragEnter:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dragExit:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},dragLeave:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},dragOver:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dragStart:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},drop:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseDown:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseEnter:{EventType:"MouseEvent",defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},mouseLeave:{EventType:"MouseEvent",defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},mouseMove:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseOut:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseOver:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseUp:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},select:{EventType:"Event",defaultInit:{bubbles:!0,cancelable:!1}},touchCancel:{EventType:"TouchEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},touchEnd:{EventType:"TouchEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},touchMove:{EventType:"TouchEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},touchStart:{EventType:"TouchEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},resize:{EventType:"UIEvent",defaultInit:{bubbles:!1,cancelable:!1}},scroll:{EventType:"UIEvent",defaultInit:{bubbles:!1,cancelable:!1}},wheel:{EventType:"WheelEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},abort:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},canPlay:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},canPlayThrough:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},durationChange:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},emptied:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},encrypted:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},ended:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},loadedData:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},loadedMetadata:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},loadStart:{EventType:"ProgressEvent",defaultInit:{bubbles:!1,cancelable:!1}},pause:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},play:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},playing:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},progress:{EventType:"ProgressEvent",defaultInit:{bubbles:!1,cancelable:!1}},rateChange:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},seeked:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},seeking:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},stalled:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},suspend:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},timeUpdate:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},volumeChange:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},waiting:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},load:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},error:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},animationStart:{EventType:"AnimationEvent",defaultInit:{bubbles:!0,cancelable:!1}},animationEnd:{EventType:"AnimationEvent",defaultInit:{bubbles:!0,cancelable:!1}},animationIteration:{EventType:"AnimationEvent",defaultInit:{bubbles:!0,cancelable:!1}},transitionCancel:{EventType:"TransitionEvent",defaultInit:{bubbles:!0,cancelable:!1}},transitionEnd:{EventType:"TransitionEvent",defaultInit:{bubbles:!0,cancelable:!0}},transitionRun:{EventType:"TransitionEvent",defaultInit:{bubbles:!0,cancelable:!1}},transitionStart:{EventType:"TransitionEvent",defaultInit:{bubbles:!0,cancelable:!1}},pointerOver:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerEnter:{EventType:"PointerEvent",defaultInit:{bubbles:!1,cancelable:!1}},pointerDown:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerMove:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerUp:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerCancel:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},pointerOut:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerLeave:{EventType:"PointerEvent",defaultInit:{bubbles:!1,cancelable:!1}},gotPointerCapture:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},lostPointerCapture:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},popState:{EventType:"PopStateEvent",defaultInit:{bubbles:!0,cancelable:!1}},offline:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},online:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},pageHide:{EventType:"PageTransitionEvent",defaultInit:{bubbles:!0,cancelable:!0}},pageShow:{EventType:"PageTransitionEvent",defaultInit:{bubbles:!0,cancelable:!0}}},MM={doubleClick:"dblClick"};function _a(e,t){return en().eventWrapper(()=>{if(!t)throw new Error("Unable to fire an event - please provide an event object.");if(!e)throw new Error('Unable to fire a "'+t.type+'" event - please provide a DOM element.');return e.dispatchEvent(t)})}function ax(e,t,n,r){let{EventType:o="Event",defaultInit:i={}}=r===void 0?{}:r;if(!t)throw new Error('Unable to fire a "'+e+'" event - please provide a DOM element.');const s={...i,...n},{target:{value:a,files:l,...c}={}}=s;a!==void 0&&soe(t,a),l!==void 0&&Object.defineProperty(t,"files",{configurable:!0,enumerable:!0,writable:!0,value:l}),Object.assign(t,c);const d=Z$(t),f=d[o]||d.Event;let m;if(typeof f=="function")m=new f(e,s);else{m=d.document.createEvent(o);const{bubbles:v,cancelable:b,detail:x,...y}=s;m.initEvent(e,v,b,x),Object.keys(y).forEach(_=>{m[_]=y[_]})}return["dataTransfer","clipboardData"].forEach(v=>{const b=s[v];typeof b=="object"&&(typeof d.DataTransfer=="function"?Object.defineProperty(m,v,{value:Object.getOwnPropertyNames(b).reduce((x,y)=>(Object.defineProperty(x,y,{value:b[y]}),x),new d.DataTransfer)}):Object.defineProperty(m,v,{value:b}))}),m}Object.keys(OM).forEach(e=>{const{EventType:t,defaultInit:n}=OM[e],r=e.toLowerCase();ax[e]=(o,i)=>ax(r,o,i,{EventType:t,defaultInit:n}),_a[e]=(o,i)=>_a(o,ax[e](o,i))});function soe(e,t){const{set:n}=Object.getOwnPropertyDescriptor(e,"value")||{},r=Object.getPrototypeOf(e),{set:o}=Object.getOwnPropertyDescriptor(r,"value")||{};if(o&&n!==o)o.call(e,t);else if(n)n.call(e,t);else throw new Error("The given element does not have a value setter")}Object.keys(MM).forEach(e=>{const t=MM[e];_a[e]=function(){return _a[t](...arguments)}});function aoe(e){return e.replace(/[ \t]*[\n][ \t]*/g,`
|
|
108
|
-
`)}function loe(e){return tne.compressToEncodedURIComponent(aoe(e))}function uoe(e){return"https://testing-playground.com/#markup="+loe(e)}const coe=(e,t,n)=>Array.isArray(e)?e.forEach(r=>TM(r,t,n)):TM(e,t,n),doe=function(e){if(e===void 0&&(e=tC().body),!e||!("innerHTML"in e)){console.log("The element you're providing isn't a valid DOM element.");return}if(!e.innerHTML){console.log("The provided element doesn't have any children.");return}const t=uoe(e.innerHTML);return console.log(`Open this URL in your browser
|
|
109
|
-
|
|
110
|
-
`+t),t},IM={debug:coe,logTestingPlaygroundURL:doe};typeof document<"u"&&document.body?ioe(document.body,hE,IM):Object.keys(hE).reduce((e,t)=>(e[t]=()=>{throw new TypeError("For queries bound to document.body a global document has to be available... Learn more: https://testing-library.com/s/screen-global-error")},e),IM);const foe=typeof h.act=="function"?h.act:B9.act;function cF(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}function Fi(e){cF().IS_REACT_ACT_ENVIRONMENT=e}function Vg(){return cF().IS_REACT_ACT_ENVIRONMENT}function poe(e){return t=>{const n=Vg();Fi(!0);try{let r=!1;const o=e(()=>{const i=t();return i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r=!0),i});if(r){const i=o;return{then:(s,a)=>{i.then(l=>{Fi(n),s(l)},l=>{Fi(n),a(l)})}}}else return Fi(n),o}catch(r){throw Fi(n),r}}}const ip=poe(foe),yn=function(){return _a(...arguments)};Object.keys(_a).forEach(e=>{yn[e]=function(){return _a[e](...arguments)}});const moe=yn.mouseEnter,hoe=yn.mouseLeave;yn.mouseEnter=function(){return moe(...arguments),yn.mouseOver(...arguments)};yn.mouseLeave=function(){return hoe(...arguments),yn.mouseOut(...arguments)};const goe=yn.pointerEnter,voe=yn.pointerLeave;yn.pointerEnter=function(){return goe(...arguments),yn.pointerOver(...arguments)};yn.pointerLeave=function(){return voe(...arguments),yn.pointerOut(...arguments)};const boe=yn.select;yn.select=(e,t)=>{boe(e,t),e.focus(),yn.keyUp(e,t)};const yoe=yn.blur,xoe=yn.focus;yn.blur=function(){return yn.focusOut(...arguments),yoe(...arguments)};yn.focus=function(){return yn.focusIn(...arguments),xoe(...arguments)};function Eoe(){return typeof jest<"u"&&jest!==null?setTimeout._isMockFunction===!0||Object.prototype.hasOwnProperty.call(setTimeout,"clock"):!1}wne({unstable_advanceTimersWrapper:e=>ip(e),asyncWrapper:async e=>{const t=Vg();Fi(!1);try{const n=await e();return await new Promise(r=>{setTimeout(()=>{r()},0),Eoe()&&jest.advanceTimersByTime(0)}),n}finally{Fi(t)}},eventWrapper:e=>{let t;return ip(()=>{t=e()}),t}});const woe=new Set,DM=[];function AM(){DM.forEach(e=>{let{root:t,container:n}=e;ip(()=>{t.unmount()}),n.parentNode===document.body&&document.body.removeChild(n)}),DM.length=0,woe.clear()}if((typeof process>"u"||!process.env?.RTL_SKIP_AUTO_CLEANUP)&&(typeof afterEach=="function"?afterEach(()=>{AM()}):typeof teardown=="function"&&teardown(()=>{AM()}),typeof beforeAll=="function"&&typeof afterAll=="function")){let e=Vg();beforeAll(()=>{e=Vg(),Fi(!0)}),afterAll(()=>{Fi(e)})}const Coe=e=>ip(()=>e.click()),Roe=(e,t)=>ip(()=>{yn.change(e,{target:{value:t}})}),Soe=Hs("overflow-hidden aspect-square bg-muted grid place-items-center font-semibold shrink-0 select-none",{variants:{shape:{circle:"rounded-full",square:"rounded-xl"},size:{xs:"size-6 text-[10px]",sm:"size-8 text-xs",md:"size-10 text-sm",lg:"size-14 text-base",xl:"size-20 text-xl"}},defaultVariants:{shape:"circle",size:"md"}});function dF({className:e,shape:t,size:n,...r}){return C.jsx(Uw,{className:ue(Soe({shape:t,size:n}),e),"data-slot":"avatar",...r})}function fF({className:e,...t}){return C.jsx(zw,{className:ue("size-full object-cover",e),"data-slot":"avatar-image",...t})}function pF({className:e,...t}){return C.jsx(Gw,{className:ue("flex size-full items-center justify-center",e),"data-slot":"avatar-fallback",...t})}function Poe({src:e,alt:t,fallback:n,delay:r,shape:o,size:i,className:s,imageProps:a,fallbackProps:l,...c}){return C.jsxs(dF,{shape:o,size:i,className:s,...c,children:[C.jsx(fF,{src:e,alt:t,...a}),C.jsx(pF,{delay:r,...l,children:n??I$(t)})]})}const Toe=({src:e,...t})=>C.jsx("div",{...t,"data-slot":"background-image",className:ue("w-full block bg-cover bg-center",t.className),style:{...t.style,backgroundImage:`url(${e})`}});function Dl(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function Xo(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):s;o=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}function Zo(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?Noe(a,f=>f.test(s)):_oe(a,f=>f.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const d=t.slice(s.length);return{value:c,rest:d}}}function _oe(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Noe(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function mF(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(o.length);return{value:s,rest:a}}}const hF=6048e5,Ooe=864e5,kM=Symbol.for("constructDateFrom");function $n(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&kM in e?e[kM](t):e instanceof Date?new e.constructor(t):new Date(t)}function ru(e,...t){const n=$n.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}let Moe={};function Vp(){return Moe}function Jt(e,t){return $n(t||e,e)}function Vl(e,t){const n=Vp(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Jt(e,t?.in),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}const Ioe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Doe=(e,t,n)=>{let r;const o=Ioe[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},Aoe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},koe=(e,t,n,r)=>Aoe[e],$oe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Foe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Loe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},joe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},qoe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Boe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Voe=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Woe={ordinalNumber:Voe,era:Xo({values:$oe,defaultWidth:"wide"}),quarter:Xo({values:Foe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Xo({values:Loe,defaultWidth:"wide"}),day:Xo({values:joe,defaultWidth:"wide"}),dayPeriod:Xo({values:qoe,defaultWidth:"wide",formattingValues:Boe,defaultFormattingWidth:"wide"})},Hoe=/^(\d+)(th|st|nd|rd)?/i,Koe=/\d+/i,Uoe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},zoe={any:[/^b/i,/^(a|c)/i]},Goe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Yoe={any:[/1/i,/2/i,/3/i,/4/i]},Xoe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Zoe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Joe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Qoe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},eie={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},tie={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},nie={ordinalNumber:mF({matchPattern:Hoe,parsePattern:Koe,valueCallback:e=>parseInt(e,10)}),era:Zo({matchPatterns:Uoe,defaultMatchWidth:"wide",parsePatterns:zoe,defaultParseWidth:"any"}),quarter:Zo({matchPatterns:Goe,defaultMatchWidth:"wide",parsePatterns:Yoe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Zo({matchPatterns:Xoe,defaultMatchWidth:"wide",parsePatterns:Zoe,defaultParseWidth:"any"}),day:Zo({matchPatterns:Joe,defaultMatchWidth:"wide",parsePatterns:Qoe,defaultParseWidth:"any"}),dayPeriod:Zo({matchPatterns:eie,defaultMatchWidth:"any",parsePatterns:tie,defaultParseWidth:"any"})},rie={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},oie={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},iie={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},sie={date:Dl({formats:rie,defaultWidth:"full"}),time:Dl({formats:oie,defaultWidth:"full"}),dateTime:Dl({formats:iie,defaultWidth:"full"})},Rl={code:"en-US",formatDistance:Doe,formatLong:sie,formatRelative:koe,localize:Woe,match:nie,options:{weekStartsOn:0,firstWeekContainsDate:1}},aie={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},lie=(e,t,n)=>{let r;const o=aie[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"en "+r:"hace "+r:r},uie={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},cie={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},die={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},fie={date:Dl({formats:uie,defaultWidth:"full"}),time:Dl({formats:cie,defaultWidth:"full"}),dateTime:Dl({formats:die,defaultWidth:"full"})},pie={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},mie={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},hie=(e,t,n,r)=>t.getHours()!==1?mie[e]:pie[e],gie={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},vie={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},bie={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},yie={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},xie={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},Eie={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},wie=(e,t)=>Number(e)+"º",Cie={ordinalNumber:wie,era:Xo({values:gie,defaultWidth:"wide"}),quarter:Xo({values:vie,defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:Xo({values:bie,defaultWidth:"wide"}),day:Xo({values:yie,defaultWidth:"wide"}),dayPeriod:Xo({values:xie,defaultWidth:"wide",formattingValues:Eie,defaultFormattingWidth:"wide"})},Rie=/^(\d+)(º)?/i,Sie=/\d+/i,Pie={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},Tie={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},_ie={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Nie={any:[/1/i,/2/i,/3/i,/4/i]},Oie={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},Mie={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},Iie={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},Die={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},Aie={narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},kie={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},$ie={ordinalNumber:mF({matchPattern:Rie,parsePattern:Sie,valueCallback:function(e){return parseInt(e,10)}}),era:Zo({matchPatterns:Pie,defaultMatchWidth:"wide",parsePatterns:Tie,defaultParseWidth:"any"}),quarter:Zo({matchPatterns:_ie,defaultMatchWidth:"wide",parsePatterns:Nie,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Zo({matchPatterns:Oie,defaultMatchWidth:"wide",parsePatterns:Mie,defaultParseWidth:"any"}),day:Zo({matchPatterns:Iie,defaultMatchWidth:"wide",parsePatterns:Die,defaultParseWidth:"any"}),dayPeriod:Zo({matchPatterns:Aie,defaultMatchWidth:"any",parsePatterns:kie,defaultParseWidth:"any"})},Fie={code:"es",formatDistance:lie,formatLong:fie,formatRelative:hie,localize:Cie,match:$ie,options:{weekStartsOn:1,firstWeekContainsDate:1}};function Lie(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const jie={},Bf={};function ba(e,t){try{const r=(jie[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return r in Bf?Bf[r]:$M(r,r.split(":"))}catch{if(e in Bf)return Bf[e];const n=e?.match(qie);return n?$M(e,n.slice(1)):NaN}}const qie=/([+-]\d\d):?(\d\d)?/;function $M(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return Bf[e]=n*60+r>0?n*60+r+o:n*60-r-o}class Jo extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(ba(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),gF(this),gE(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new Jo(...n,t):new Jo(Date.now(),t)}withTimeZone(t){return new Jo(+this,t)}getTimezoneOffset(){const t=-ba(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),gE(this),+this}[Symbol.for("constructDateFrom")](t){return new Jo(+new Date(t),this.timeZone)}}const FM=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!FM.test(e))return;const t=e.replace(FM,"$1UTC");Jo.prototype[t]&&(e.startsWith("get")?Jo.prototype[e]=function(){return this.internal[t]()}:(Jo.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Bie(this),+this},Jo.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),gE(this),+this}))});function gE(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-ba(e.timeZone,e)*60))}function Bie(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),gF(e)}function gF(e){const t=ba(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),i=-new Date(+r).getTimezoneOffset(),s=o-i,a=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();s&&a&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+s);const l=o-n;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const c=new Date(+e);c.setUTCSeconds(0);const d=o>0?c.getSeconds():(c.getSeconds()-60)%60,f=Math.round(-(ba(e.timeZone,e)*60))%60;(f||d)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+f),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+f+d));const m=ba(e.timeZone,e),g=m>0?Math.floor(m):Math.ceil(m),b=-new Date(+e).getTimezoneOffset()-g,x=g!==n,y=b-l;if(x&&y){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y);const _=ba(e.timeZone,e),w=_>0?Math.floor(_):Math.ceil(_),T=g-w;T&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+T),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+T))}}class tr extends Jo{static tz(t,...n){return n.length?new tr(...n,t):new tr(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${Lie(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new tr(+this,t)}[Symbol.for("constructDateFrom")](t){return new tr(+new Date(t),this.timeZone)}}function vF(e,t,n){const r=Jt(e,n?.in);return isNaN(t)?$n(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function bF(e,t,n){const r=Jt(e,n?.in);if(isNaN(t))return $n(e,NaN);if(!t)return r;const o=r.getDate(),i=$n(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const s=i.getDate();return o>=s?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function sp(e,t){return Vl(e,{...t,weekStartsOn:1})}function yF(e,t){const n=Jt(e,t?.in),r=n.getFullYear(),o=$n(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=sp(o),s=$n(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const a=sp(s);return n.getTime()>=i.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function LM(e){const t=Jt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function ap(e,t){const n=Jt(e,t?.in);return n.setHours(0,0,0,0),n}function iC(e,t,n){const[r,o]=ru(n?.in,e,t),i=ap(r),s=ap(o),a=+i-LM(i),l=+s-LM(s);return Math.round((a-l)/Ooe)}function Vie(e,t){const n=yF(e,t),r=$n(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),sp(r)}function Wie(e,t,n){return vF(e,t*7,n)}function Hie(e,t,n){return bF(e,t*12,n)}function Kie(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=$n.bind(null,o));const i=Jt(o,r);(!n||n<i||isNaN(+i))&&(n=i)}),$n(r,n||NaN)}function Uie(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=$n.bind(null,o));const i=Jt(o,r);(!n||n>i||isNaN(+i))&&(n=i)}),$n(r,n||NaN)}function zie(e,t,n){const[r,o]=ru(n?.in,e,t);return+ap(r)==+ap(o)}function As(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Gie(e){return!(!As(e)&&typeof e!="number"||isNaN(+Jt(e)))}function xF(e,t,n){const[r,o]=ru(n?.in,e,t),i=r.getFullYear()-o.getFullYear(),s=r.getMonth()-o.getMonth();return i*12+s}function Yie(e,t){const n=Jt(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function EF(e,t){const[n,r]=ru(e,t.start,t.end);return{start:n,end:r}}function Xie(e,t){const{start:n,end:r}=EF(t?.in,e);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setDate(1);let a=1;const l=[];for(;+s<=i;)l.push($n(n,s)),s.setMonth(s.getMonth()+a);return o?l.reverse():l}function Zie(e,t){const n=Jt(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Jie(e,t){const n=Jt(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function wF(e,t){const n=Jt(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Qie(e,t){const{start:n,end:r}=EF(t?.in,e);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setMonth(0,1);let a=1;const l=[];for(;+s<=i;)l.push($n(n,s)),s.setFullYear(s.getFullYear()+a);return o?l.reverse():l}function CF(e,t){const n=Vp(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Jt(e,t?.in),i=o.getDay(),s=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}function ese(e,t){return CF(e,{...t,weekStartsOn:1})}function tse(e,t){const n=Jt(e,t?.in);return iC(n,wF(n))+1}function sC(e,t){const n=Jt(e,t?.in),r=+sp(n)-+Vie(n);return Math.round(r/hF)+1}function RF(e,t){const n=Jt(e,t?.in),r=n.getFullYear(),o=Vp(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=$n(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=Vl(s,t),l=$n(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Vl(l,t);return+n>=+a?r+1:+n>=+c?r:r-1}function nse(e,t){const n=Vp(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=RF(e,t),i=$n(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Vl(i,t)}function aC(e,t){const n=Jt(e,t?.in),r=+Vl(n,t)-+nse(n,t);return Math.round(r/hF)+1}function Ut(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ps={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ut(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ut(n+1,2)},d(e,t){return Ut(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ut(e.getHours()%12||12,t.length)},H(e,t){return Ut(e.getHours(),t.length)},m(e,t){return Ut(e.getMinutes(),t.length)},s(e,t){return Ut(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ut(o,t.length)}},gl={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},jM={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return ps.y(e,t)},Y:function(e,t,n,r){const o=RF(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return Ut(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Ut(i,t.length)},R:function(e,t){const n=yF(e);return Ut(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ut(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ut(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ut(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ps.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ut(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=aC(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ut(o,t.length)},I:function(e,t,n){const r=sC(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ut(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ps.d(e,t)},D:function(e,t,n){const r=tse(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ut(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Ut(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Ut(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Ut(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=gl.noon:r===0?o=gl.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=gl.evening:r>=12?o=gl.afternoon:r>=4?o=gl.morning:o=gl.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ps.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ps.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ut(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ut(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ps.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ps.s(e,t)},S:function(e,t){return ps.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return BM(r);case"XXXX":case"XX":return ha(r);case"XXXXX":case"XXX":default:return ha(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return BM(r);case"xxxx":case"xx":return ha(r);case"xxxxx":case"xxx":default:return ha(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+qM(r,":");case"OOOO":default:return"GMT"+ha(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+qM(r,":");case"zzzz":default:return"GMT"+ha(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ut(r,t.length)},T:function(e,t,n){return Ut(+e,t.length)}};function qM(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+Ut(i,2)}function BM(e,t){return e%60===0?(e>0?"-":"+")+Ut(Math.abs(e)/60,2):ha(e,t)}function ha(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ut(Math.trunc(r/60),2),i=Ut(r%60,2);return n+o+t+i}const VM=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},SF=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},rse=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return VM(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",VM(r,t)).replace("{{time}}",SF(o,t))},ose={p:SF,P:rse},ise=/^D+$/,sse=/^Y+$/,ase=["D","DD","YY","YYYY"];function lse(e){return ise.test(e)}function use(e){return sse.test(e)}function cse(e,t,n){const r=dse(e,t,n);if(console.warn(r),ase.includes(e))throw new RangeError(r)}function dse(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const fse=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pse=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,mse=/^'([^]*?)'?$/,hse=/''/g,gse=/[a-zA-Z]/;function Qo(e,t,n){const r=Vp(),o=n?.locale??r.locale??Rl,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=Jt(e,n?.in);if(!Gie(a))throw new RangeError("Invalid time value");let l=t.match(pse).map(d=>{const f=d[0];if(f==="p"||f==="P"){const m=ose[f];return m(d,o.formatLong)}return d}).join("").match(fse).map(d=>{if(d==="''")return{isToken:!1,value:"'"};const f=d[0];if(f==="'")return{isToken:!1,value:vse(d)};if(jM[f])return{isToken:!0,value:d};if(f.match(gse))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:d}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map(d=>{if(!d.isToken)return d.value;const f=d.value;(!n?.useAdditionalWeekYearTokens&&use(f)||!n?.useAdditionalDayOfYearTokens&&lse(f))&&cse(f,t,String(e));const m=jM[f[0]];return m(a,f,o.localize,c)}).join("")}function vse(e){const t=e.match(mse);return t?t[1].replace(hse,"'"):e}function bse(e,t){const n=Jt(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=$n(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function yse(e,t){return Jt(e,t?.in).getMonth()}function xse(e,t){return Jt(e,t?.in).getFullYear()}function Ese(e,t){return+Jt(e)>+Jt(t)}function wse(e,t){return+Jt(e)<+Jt(t)}function Cse(e,t,n){const[r,o]=ru(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Rse(e,t,n){const[r,o]=ru(n?.in,e,t);return r.getFullYear()===o.getFullYear()}function Sse(e,t,n){const r=Jt(e,n?.in),o=r.getFullYear(),i=r.getDate(),s=$n(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const a=bse(s);return r.setMonth(t,Math.min(i,a)),r}function Pse(e,t,n){const r=Jt(e,n?.in);return isNaN(+r)?$n(e,NaN):(r.setFullYear(t),r)}const WM=5,Tse=4;function _se(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),i=t.addDays(o,WM*7-1);return t.getMonth(e)===t.getMonth(i)?WM:Tse}function PF(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function Nse(e,t){const n=PF(e,t),r=_se(e,t);return t.addDays(n,r*7-1)}const TF={...Rl,labels:{labelDayButton:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(s,a)=>Qo(s,a,{locale:Rl,...n});let i=o(e,"PPPP");return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,i)=>Qo(o,i,{locale:Rl,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(s,a)=>Qo(s,a,{locale:Rl,...n});let i=o(e,"PPPP");return t?.today&&(i=`Today, ${i}`),i},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,i)=>Qo(o,i,{locale:Rl,...t}),r(e,"cccc")}}};class Ur{constructor(t,n){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?tr.tz(this.options.timeZone):new this.Date,this.newDate=(r,o,i)=>this.overrides?.newDate?this.overrides.newDate(r,o,i):this.options.timeZone?new tr(r,o,i,this.options.timeZone):new Date(r,o,i),this.addDays=(r,o)=>this.overrides?.addDays?this.overrides.addDays(r,o):vF(r,o),this.addMonths=(r,o)=>this.overrides?.addMonths?this.overrides.addMonths(r,o):bF(r,o),this.addWeeks=(r,o)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,o):Wie(r,o),this.addYears=(r,o)=>this.overrides?.addYears?this.overrides.addYears(r,o):Hie(r,o),this.differenceInCalendarDays=(r,o)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):iC(r,o),this.differenceInCalendarMonths=(r,o)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):xF(r,o),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Xie(r),this.eachYearOfInterval=r=>{const o=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(r):Qie(r),i=new Set(o.map(a=>this.getYear(a)));if(i.size===o.length)return o;const s=[];return i.forEach(a=>{s.push(new Date(a,0,1))}),s},this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):Nse(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):ese(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):Yie(r),this.endOfWeek=(r,o)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,o):CF(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):Jie(r),this.format=(r,o,i)=>{const s=this.overrides?.format?this.overrides.format(r,o,this.options):Qo(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(s):s},this.getISOWeek=r=>this.overrides?.getISOWeek?this.overrides.getISOWeek(r):sC(r),this.getMonth=(r,o)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):yse(r,this.options),this.getYear=(r,o)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):xse(r,this.options),this.getWeek=(r,o)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):aC(r,this.options),this.isAfter=(r,o)=>this.overrides?.isAfter?this.overrides.isAfter(r,o):Ese(r,o),this.isBefore=(r,o)=>this.overrides?.isBefore?this.overrides.isBefore(r,o):wse(r,o),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):As(r),this.isSameDay=(r,o)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,o):zie(r,o),this.isSameMonth=(r,o)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,o):Cse(r,o),this.isSameYear=(r,o)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,o):Rse(r,o),this.max=r=>this.overrides?.max?this.overrides.max(r):Kie(r),this.min=r=>this.overrides?.min?this.overrides.min(r):Uie(r),this.setMonth=(r,o)=>this.overrides?.setMonth?this.overrides.setMonth(r,o):Sse(r,o),this.setYear=(r,o)=>this.overrides?.setYear?this.overrides.setYear(r,o):Pse(r,o),this.startOfBroadcastWeek=(r,o)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):PF(r,this),this.startOfDay=r=>this.overrides?.startOfDay?this.overrides.startOfDay(r):ap(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):sp(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):Zie(r),this.startOfWeek=(r,o)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):Vl(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):wF(r),this.options={locale:TF,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&Ur.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:o}=this.options,i=n?.code;if(i&&Ur.yearFirstLocales.has(i))try{return new Intl.DateTimeFormat(i,{month:"long",year:"numeric",timeZone:r,numberingSystem:o}).format(t)}catch{}const s=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,s)}}Ur.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const di=new Ur;class _F{constructor(t,n,r=di){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Ose{constructor(t,n){this.date=t,this.weeks=n}}class Mse{constructor(t,n){this.days=n,this.weekNumber=t}}function Ise(e){return M.createElement("button",{...e})}function Dse(e){return M.createElement("span",{...e})}function Ase(e){const{size:t=24,orientation:n="left",className:r}=e;return M.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&M.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&M.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&M.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&M.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function kse(e){const{day:t,modifiers:n,...r}=e;return M.createElement("td",{...r})}function $se(e){const{day:t,modifiers:n,...r}=e,o=M.useRef(null);return M.useEffect(()=>{n.focused&&o.current?.focus()},[n.focused]),M.createElement("button",{ref:o,...r})}var lt;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(lt||(lt={}));var hn;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(hn||(hn={}));var Mo;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Mo||(Mo={}));var qr;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(qr||(qr={}));function Fse(e){const{options:t,className:n,components:r,classNames:o,...i}=e,s=[o[lt.Dropdown],n].join(" "),a=t?.find(({value:l})=>l===i.value);return M.createElement("span",{"data-disabled":i.disabled,className:o[lt.DropdownRoot]},M.createElement(r.Select,{className:s,...i},t?.map(({value:l,label:c,disabled:d})=>M.createElement(r.Option,{key:l,value:l,disabled:d},c))),M.createElement("span",{className:o[lt.CaptionLabel],"aria-hidden":!0},a?.label,M.createElement(r.Chevron,{orientation:"down",size:18,className:o[lt.Chevron]})))}function Lse(e){return M.createElement("div",{...e})}function jse(e){return M.createElement("div",{...e})}function qse(e){const{calendarMonth:t,displayIndex:n,...r}=e;return M.createElement("div",{...r},e.children)}function Bse(e){const{calendarMonth:t,displayIndex:n,...r}=e;return M.createElement("div",{...r})}function Vse(e){return M.createElement("table",{...e})}function Wse(e){return M.createElement("div",{...e})}const NF=M.createContext(void 0);function Wp(){const e=M.useContext(NF);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Hse(e){const{components:t}=Wp();return M.createElement(t.Dropdown,{...e})}function Kse(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...i}=e,{components:s,classNames:a,labels:{labelPrevious:l,labelNext:c}}=Wp(),d=M.useCallback(m=>{o&&n?.(m)},[o,n]),f=M.useCallback(m=>{r&&t?.(m)},[r,t]);return M.createElement("nav",{...i},M.createElement(s.PreviousMonthButton,{type:"button",className:a[lt.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:f},M.createElement(s.Chevron,{disabled:r?void 0:!0,className:a[lt.Chevron],orientation:"left"})),M.createElement(s.NextMonthButton,{type:"button",className:a[lt.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":c(o),onClick:d},M.createElement(s.Chevron,{disabled:o?void 0:!0,orientation:"right",className:a[lt.Chevron]})))}function Use(e){const{components:t}=Wp();return M.createElement(t.Button,{...e})}function zse(e){return M.createElement("option",{...e})}function Gse(e){const{components:t}=Wp();return M.createElement(t.Button,{...e})}function Yse(e){const{rootRef:t,...n}=e;return M.createElement("div",{...n,ref:t})}function Xse(e){return M.createElement("select",{...e})}function Zse(e){const{week:t,...n}=e;return M.createElement("tr",{...n})}function Jse(e){return M.createElement("th",{...e})}function Qse(e){return M.createElement("thead",{"aria-hidden":!0},M.createElement("tr",{...e}))}function eae(e){const{week:t,...n}=e;return M.createElement("th",{...n})}function tae(e){return M.createElement("th",{...e})}function nae(e){return M.createElement("tbody",{...e})}function rae(e){const{components:t}=Wp();return M.createElement(t.Dropdown,{...e})}const oae=Object.freeze(Object.defineProperty({__proto__:null,Button:Ise,CaptionLabel:Dse,Chevron:Ase,Day:kse,DayButton:$se,Dropdown:Fse,DropdownNav:Lse,Footer:jse,Month:qse,MonthCaption:Bse,MonthGrid:Vse,Months:Wse,MonthsDropdown:Hse,Nav:Kse,NextMonthButton:Use,Option:zse,PreviousMonthButton:Gse,Root:Yse,Select:Xse,Week:Zse,WeekNumber:eae,WeekNumberHeader:tae,Weekday:Jse,Weekdays:Qse,Weeks:nae,YearsDropdown:rae},Symbol.toStringTag,{value:"Module"}));function qi(e,t,n=!1,r=di){let{from:o,to:i}=e;const{differenceInCalendarDays:s,isSameDay:a}=r;return o&&i?(s(i,o)<0&&([o,i]=[i,o]),s(t,o)>=(n?1:0)&&s(i,t)>=(n?1:0)):!n&&i?a(i,t):!n&&o?a(o,t):!1}function lC(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Mv(e){return!!(e&&typeof e=="object"&&"from"in e)}function uC(e){return!!(e&&typeof e=="object"&&"after"in e)}function cC(e){return!!(e&&typeof e=="object"&&"before"in e)}function OF(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function MF(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Bi(e,t,n=di){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:i,isAfter:s}=n;return r.some(a=>{if(typeof a=="boolean")return a;if(n.isDate(a))return o(e,a);if(MF(a,n))return a.some(l=>o(e,l));if(Mv(a))return qi(a,e,!1,n);if(OF(a))return Array.isArray(a.dayOfWeek)?a.dayOfWeek.includes(e.getDay()):a.dayOfWeek===e.getDay();if(lC(a)){const l=i(a.before,e),c=i(a.after,e),d=l>0,f=c<0;return s(a.before,a.after)?f&&d:d||f}return uC(a)?i(e,a.after)>0:cC(a)?i(a.before,e)>0:typeof a=="function"?a(e):!1})}function iae(e,t,n,r,o){const{disabled:i,hidden:s,modifiers:a,showOutsideDays:l,broadcastCalendar:c,today:d=o.today()}=t,{isSameDay:f,isSameMonth:m,startOfMonth:g,isBefore:v,endOfMonth:b,isAfter:x}=o,y=n&&g(n),_=r&&b(r),w={[hn.focused]:[],[hn.outside]:[],[hn.disabled]:[],[hn.hidden]:[],[hn.today]:[]},T={};for(const R of e){const{date:S,displayMonth:P}=R,N=!!(P&&!m(S,P)),F=!!(y&&v(S,y)),W=!!(_&&x(S,_)),I=!!(i&&Bi(S,i,o)),B=!!(s&&Bi(S,s,o))||F||W||!c&&!l&&N||c&&l===!1&&N,$=f(S,d);N&&w.outside.push(R),I&&w.disabled.push(R),B&&w.hidden.push(R),$&&w.today.push(R),a&&Object.keys(a).forEach(k=>{const j=a?.[k];j&&Bi(S,j,o)&&(T[k]?T[k].push(R):T[k]=[R])})}return R=>{const S={[hn.focused]:!1,[hn.disabled]:!1,[hn.hidden]:!1,[hn.outside]:!1,[hn.today]:!1},P={};for(const N in w){const F=w[N];S[N]=F.some(W=>W===R)}for(const N in T)P[N]=T[N].some(F=>F===R);return{...S,...P}}}function sae(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[i])=>(n[i]?o.push(n[i]):t[hn[i]]?o.push(t[hn[i]]):t[Mo[i]]&&o.push(t[Mo[i]]),o),[t[lt.Day]])}function aae(e){return{...oae,...e}}function lae(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function uae(){const e={};for(const t in lt)e[lt[t]]=`rdp-${lt[t]}`;for(const t in hn)e[hn[t]]=`rdp-${hn[t]}`;for(const t in Mo)e[Mo[t]]=`rdp-${Mo[t]}`;for(const t in qr)e[qr[t]]=`rdp-${qr[t]}`;return e}function IF(e,t,n){return(n??new Ur(t)).formatMonthYear(e)}const cae=IF;function dae(e,t,n){return(n??new Ur(t)).format(e,"d")}function fae(e,t=di){return t.format(e,"LLLL")}function pae(e,t,n){return(n??new Ur(t)).format(e,"cccccc")}function mae(e,t=di){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function hae(){return""}function DF(e,t=di){return t.format(e,"yyyy")}const gae=DF,vae=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:IF,formatDay:dae,formatMonthCaption:cae,formatMonthDropdown:fae,formatWeekNumber:mae,formatWeekNumberHeader:hae,formatWeekdayName:pae,formatYearCaption:gae,formatYearDropdown:DF},Symbol.toStringTag,{value:"Module"}));function bae(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...vae,...e}}function dC(e,t,n,r){let o=(r??new Ur(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const yae=dC;function fC(e,t,n){return(n??new Ur(t)).formatMonthYear(e)}const xae=fC;function AF(e,t,n,r){let o=(r??new Ur(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function kF(e){return"Choose the Month"}function $F(){return""}const Eae="Go to the Next Month";function FF(e,t){return Eae}function LF(e){return"Go to the Previous Month"}function jF(e,t,n){return(n??new Ur(t)).format(e,"cccc")}function qF(e,t){return`Week ${e}`}function BF(e){return"Week Number"}function VF(e){return"Choose the Year"}const wae=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:xae,labelDay:yae,labelDayButton:dC,labelGrid:fC,labelGridcell:AF,labelMonthDropdown:kF,labelNav:$F,labelNext:FF,labelPrevious:LF,labelWeekNumber:qF,labelWeekNumberHeader:BF,labelWeekday:jF,labelYearDropdown:VF},Symbol.toStringTag,{value:"Module"})),wo=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function Cae(e,t){const n=t.locale?.labels??{};return{...wae,...e??{},labelDayButton:wo(dC,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:wo(kF,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:wo(FF,e?.labelNext,n.labelNext),labelPrevious:wo(LF,e?.labelPrevious,n.labelPrevious),labelWeekNumber:wo(qF,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:wo(VF,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:wo(fC,e?.labelGrid,n.labelGrid),labelGridcell:wo(AF,e?.labelGridcell,n.labelGridcell),labelNav:wo($F,e?.labelNav,n.labelNav),labelWeekNumberHeader:wo(BF,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:wo(jF,e?.labelWeekday,n.labelWeekday)}}function Rae(e,t,n,r,o){const{startOfMonth:i,startOfYear:s,endOfYear:a,eachMonthOfInterval:l,getMonth:c}=o;return l({start:s(e),end:a(e)}).map(m=>{const g=r.formatMonthDropdown(m,o),v=c(m),b=t&&m<i(t)||n&&m>i(n)||!1;return{value:v,label:g,disabled:b}})}function Sae(e,t={},n={}){let r={...t?.[lt.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n?.[o]}}),r}function Pae(e,t,n,r){const o=r??e.today(),i=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),s=[];for(let a=0;a<7;a++){const l=e.addDays(i,a);s.push(l)}return s}function Tae(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:i,endOfYear:s,eachYearOfInterval:a,getYear:l}=r,c=i(e),d=s(t),f=a({start:c,end:d});return o&&f.reverse(),f.map(m=>{const g=n.formatYearDropdown(m,r);return{value:l(m),label:g,disabled:!1}})}function _ae(e,t={}){const{weekStartsOn:n,locale:r}=t,o=n??r?.options?.weekStartsOn??0,i=a=>{const l=typeof a=="number"||typeof a=="string"?new Date(a):a;return new tr(l.getFullYear(),l.getMonth(),l.getDate(),12,0,0,e)},s=a=>{const l=i(a);return new Date(l.getFullYear(),l.getMonth(),l.getDate(),0,0,0,0)};return{today:()=>i(tr.tz(e)),newDate:(a,l,c)=>new tr(a,l,c,12,0,0,e),startOfDay:a=>i(a),startOfWeek:(a,l)=>{const c=i(a),d=l?.weekStartsOn??o,f=(c.getDay()-d+7)%7;return c.setDate(c.getDate()-f),c},startOfISOWeek:a=>{const l=i(a),c=(l.getDay()-1+7)%7;return l.setDate(l.getDate()-c),l},startOfMonth:a=>{const l=i(a);return l.setDate(1),l},startOfYear:a=>{const l=i(a);return l.setMonth(0,1),l},endOfWeek:(a,l)=>{const c=i(a),m=(((l?.weekStartsOn??o)+6)%7-c.getDay()+7)%7;return c.setDate(c.getDate()+m),c},endOfISOWeek:a=>{const l=i(a),c=(7-l.getDay())%7;return l.setDate(l.getDate()+c),l},endOfMonth:a=>{const l=i(a);return l.setMonth(l.getMonth()+1,0),l},endOfYear:a=>{const l=i(a);return l.setMonth(11,31),l},eachMonthOfInterval:a=>{const l=i(a.start),c=i(a.end),d=[],f=new tr(l.getFullYear(),l.getMonth(),1,12,0,0,e),m=c.getFullYear()*12+c.getMonth();for(;f.getFullYear()*12+f.getMonth()<=m;)d.push(new tr(f,e)),f.setMonth(f.getMonth()+1,1);return d},addDays:(a,l)=>{const c=i(a);return c.setDate(c.getDate()+l),c},addWeeks:(a,l)=>{const c=i(a);return c.setDate(c.getDate()+l*7),c},addMonths:(a,l)=>{const c=i(a);return c.setMonth(c.getMonth()+l),c},addYears:(a,l)=>{const c=i(a);return c.setFullYear(c.getFullYear()+l),c},eachYearOfInterval:a=>{const l=i(a.start),c=i(a.end),d=[],f=new tr(l.getFullYear(),0,1,12,0,0,e);for(;f.getFullYear()<=c.getFullYear();)d.push(new tr(f,e)),f.setFullYear(f.getFullYear()+1,0,1);return d},getWeek:(a,l)=>{const c=s(a);return aC(c,{weekStartsOn:l?.weekStartsOn??o,firstWeekContainsDate:l?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1})},getISOWeek:a=>{const l=s(a);return sC(l)},differenceInCalendarDays:(a,l)=>{const c=s(a),d=s(l);return iC(c,d)},differenceInCalendarMonths:(a,l)=>{const c=s(a),d=s(l);return xF(c,d)}}}const Hp=e=>e instanceof HTMLElement?e:null,lx=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Nae=e=>Hp(e.querySelector("[data-animated-month]")),ux=e=>Hp(e.querySelector("[data-animated-caption]")),cx=e=>Hp(e.querySelector("[data-animated-weeks]")),Oae=e=>Hp(e.querySelector("[data-animated-nav]")),Mae=e=>Hp(e.querySelector("[data-animated-weekdays]"));function Iae(e,t,{classNames:n,months:r,focused:o,dateLib:i}){const s=M.useRef(null),a=M.useRef(r),l=M.useRef(!1);M.useLayoutEffect(()=>{const c=a.current;if(a.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||c.length===0||r.length!==c.length)return;const d=i.isSameMonth(r[0].date,c[0].date),f=i.isAfter(r[0].date,c[0].date),m=f?n[qr.caption_after_enter]:n[qr.caption_before_enter],g=f?n[qr.weeks_after_enter]:n[qr.weeks_before_enter],v=s.current,b=e.current.cloneNode(!0);if(b instanceof HTMLElement?(lx(b).forEach(w=>{if(!(w instanceof HTMLElement))return;const T=Nae(w);T&&w.contains(T)&&w.removeChild(T);const R=ux(w);R&&R.classList.remove(m);const S=cx(w);S&&S.classList.remove(g)}),s.current=b):s.current=null,l.current||d||o)return;const x=v instanceof HTMLElement?lx(v):[],y=lx(e.current);if(y?.every(_=>_ instanceof HTMLElement)&&x&&x.every(_=>_ instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const _=Oae(e.current);_&&(_.style.zIndex="1"),y.forEach((w,T)=>{const R=x[T];if(!R)return;w.style.position="relative",w.style.overflow="hidden";const S=ux(w);S&&S.classList.add(m);const P=cx(w);P&&P.classList.add(g);const N=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),_&&(_.style.zIndex=""),S&&S.classList.remove(m),P&&P.classList.remove(g),w.style.position="",w.style.overflow="",w.contains(R)&&w.removeChild(R)};R.style.pointerEvents="none",R.style.position="absolute",R.style.overflow="hidden",R.setAttribute("aria-hidden","true");const F=Mae(R);F&&(F.style.opacity="0");const W=ux(R);W&&(W.classList.add(f?n[qr.caption_before_exit]:n[qr.caption_after_exit]),W.addEventListener("animationend",N));const I=cx(R);I&&I.classList.add(f?n[qr.weeks_before_exit]:n[qr.weeks_after_exit]),w.insertBefore(R,w.firstChild)})}})}function Dae(e,t,n,r){const o=e[0],i=e[e.length-1],{ISOWeek:s,fixedWeeks:a,broadcastCalendar:l}=n??{},{addDays:c,differenceInCalendarDays:d,differenceInCalendarMonths:f,endOfBroadcastWeek:m,endOfISOWeek:g,endOfMonth:v,endOfWeek:b,isAfter:x,startOfBroadcastWeek:y,startOfISOWeek:_,startOfWeek:w}=r,T=l?y(o,r):s?_(o):w(o),R=l?m(i):s?g(v(i)):b(v(i)),S=t&&(l?m(t):s?g(t):b(t)),P=S&&x(R,S)?S:R,N=d(P,T),F=f(i,o)+1,W=[];for(let $=0;$<=N;$++){const k=c(T,$);W.push(k)}const B=(l?35:42)*F;if(a&&W.length<B){const $=B-W.length;for(let k=0;k<$;k++){const j=c(W[W.length-1],1);W.push(j)}}return W}function Aae(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((i,s)=>i.concat(s.days.slice()),t.slice());return n.concat(o.slice())},t.slice())}function kae(e,t,n,r){const{numberOfMonths:o=1}=n,i=[];for(let s=0;s<o;s++){const a=r.addMonths(e,s);if(t&&a>t)break;i.push(a)}return i}function HM(e,t,n,r){const{month:o,defaultMonth:i,today:s=r.today(),numberOfMonths:a=1}=e;let l=o||i||s;const{differenceInCalendarMonths:c,addMonths:d,startOfMonth:f}=r;if(n&&c(n,l)<a-1){const m=-1*(a-1);l=d(n,m)}return t&&c(l,t)<0&&(l=t),f(l)}function $ae(e,t,n,r){const{addDays:o,endOfBroadcastWeek:i,endOfISOWeek:s,endOfMonth:a,endOfWeek:l,getISOWeek:c,getWeek:d,startOfBroadcastWeek:f,startOfISOWeek:m,startOfWeek:g}=r,v=e.reduce((b,x)=>{const y=n.broadcastCalendar?f(x,r):n.ISOWeek?m(x):g(x),_=n.broadcastCalendar?i(x):n.ISOWeek?s(a(x)):l(a(x)),w=t.filter(P=>P>=y&&P<=_),T=n.broadcastCalendar?35:42;if(n.fixedWeeks&&w.length<T){const P=t.filter(N=>{const F=T-w.length;return N>_&&N<=o(_,F)});w.push(...P)}const R=w.reduce((P,N)=>{const F=n.ISOWeek?c(N):d(N),W=P.find(B=>B.weekNumber===F),I=new _F(N,x,r);return W?W.days.push(I):P.push(new Mse(F,[I])),P},[]),S=new Ose(x,R);return b.push(S),b},[]);return n.reverseMonths?v.reverse():v}function Fae(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:i,startOfMonth:s,endOfMonth:a,addYears:l,endOfYear:c,newDate:d,today:f}=t,{fromYear:m,toYear:g,fromMonth:v,toMonth:b}=e;!n&&v&&(n=v),!n&&m&&(n=t.newDate(m,0,1)),!r&&b&&(r=b),!r&&g&&(r=d(g,11,31));const x=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=s(n):m?n=d(m,0,1):!n&&x&&(n=o(l(e.today??f(),-100))),r?r=a(r):g?r=d(g,11,31):!r&&x&&(r=c(e.today??f())),[n&&i(n),r&&i(r)]}function Lae(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i=1}=n,{startOfMonth:s,addMonths:a,differenceInCalendarMonths:l}=r,c=o?i:1,d=s(e);if(!t)return a(d,c);if(!(l(t,e)<i))return a(d,c)}function jae(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i}=n,{startOfMonth:s,addMonths:a,differenceInCalendarMonths:l}=r,c=o?i??1:1,d=s(e);if(!t)return a(d,-c);if(!(l(d,t)<=0))return a(d,-c)}function qae(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function Iv(e,t){const[n,r]=M.useState(e);return[t===void 0?n:t,r]}function Bae(e,t){const[n,r]=Fae(e,t),{startOfMonth:o,endOfMonth:i}=t,s=HM(e,n,r,t),[a,l]=Iv(s,e.month?s:void 0);M.useEffect(()=>{const T=HM(e,n,r,t);l(T)},[e.timeZone]);const{months:c,weeks:d,days:f,previousMonth:m,nextMonth:g}=M.useMemo(()=>{const T=kae(a,r,{numberOfMonths:e.numberOfMonths},t),R=Dae(T,e.endMonth?i(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),S=$ae(T,R,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),P=qae(S),N=Aae(S),F=jae(a,n,e,t),W=Lae(a,r,e,t);return{months:S,weeks:P,days:N,previousMonth:F,nextMonth:W}},[t,a.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:v,onMonthChange:b}=e,x=T=>d.some(R=>R.days.some(S=>S.isEqualTo(T))),y=T=>{if(v)return;let R=o(T);n&&R<o(n)&&(R=o(n)),r&&R>o(r)&&(R=o(r)),l(R),b?.(R)};return{months:c,weeks:d,days:f,navStart:n,navEnd:r,previousMonth:m,nextMonth:g,goToMonth:y,goToDay:T=>{x(T)||y(T.date)}}}var zo;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(zo||(zo={}));function KM(e){return!e[hn.disabled]&&!e[hn.hidden]&&!e[hn.outside]}function Vae(e,t,n,r){let o,i=-1;for(const s of e){const a=t(s);KM(a)&&(a[hn.focused]&&i<zo.FocusedModifier?(o=s,i=zo.FocusedModifier):r?.isEqualTo(s)&&i<zo.LastFocused?(o=s,i=zo.LastFocused):n(s.date)&&i<zo.Selected?(o=s,i=zo.Selected):a[hn.today]&&i<zo.Today&&(o=s,i=zo.Today))}return o||(o=e.find(s=>KM(t(s)))),o}function Wae(e,t,n,r,o,i,s){const{ISOWeek:a,broadcastCalendar:l}=i,{addDays:c,addMonths:d,addWeeks:f,addYears:m,endOfBroadcastWeek:g,endOfISOWeek:v,endOfWeek:b,max:x,min:y,startOfBroadcastWeek:_,startOfISOWeek:w,startOfWeek:T}=s;let S={day:c,week:f,month:d,year:m,startOfWeek:P=>l?_(P,s):a?w(P):T(P),endOfWeek:P=>l?g(P):a?v(P):b(P)}[e](n,t==="after"?1:-1);return t==="before"&&r?S=x([r,S]):t==="after"&&o&&(S=y([o,S])),S}function WF(e,t,n,r,o,i,s,a=0){if(a>365)return;const l=Wae(e,t,n.date,r,o,i,s),c=!!(i.disabled&&Bi(l,i.disabled,s)),d=!!(i.hidden&&Bi(l,i.hidden,s)),f=l,m=new _F(l,f,s);return!c&&!d?m:WF(e,t,m,r,o,i,s,a+1)}function Hae(e,t,n,r,o){const{autoFocus:i}=e,[s,a]=M.useState(),l=Vae(t.days,n,r||(()=>!1),s),[c,d]=M.useState(i?l:void 0);return{isFocusTarget:b=>!!l?.isEqualTo(b),setFocused:d,focused:c,blur:()=>{a(c),d(void 0)},moveFocus:(b,x)=>{if(!c)return;const y=WF(b,x,c,t.navStart,t.navEnd,e,o);y&&(e.disableNavigation&&!t.days.some(w=>w.isEqualTo(y))||(t.goToDay(y),d(y)))}}}function Kae(e,t){const{selected:n,required:r,onSelect:o}=e,[i,s]=Iv(n,o?n:void 0),a=o?n:i,{isSameDay:l}=t,c=g=>a?.some(v=>l(v,g))??!1,{min:d,max:f}=e;return{selected:a,select:(g,v,b)=>{let x=[...a??[]];if(c(g)){if(a?.length===d||r&&a?.length===1)return;x=a?.filter(y=>!l(y,g))}else a?.length===f?x=[g]:x=[...x,g];return o||s(x),o?.(x,g,v,b),x},isSelected:c}}function Uae(e,t,n=0,r=0,o=!1,i=di){const{from:s,to:a}=t||{},{isSameDay:l,isAfter:c,isBefore:d}=i;let f;if(!s&&!a)f={from:e,to:n>0?void 0:e};else if(s&&!a)l(s,e)?n===0?f={from:s,to:e}:o?f={from:s,to:void 0}:f=void 0:d(e,s)?f={from:e,to:s}:f={from:s,to:e};else if(s&&a)if(l(s,e)&&l(a,e))o?f={from:s,to:a}:f=void 0;else if(l(s,e))f={from:s,to:n>0?void 0:e};else if(l(a,e))f={from:e,to:n>0?void 0:e};else if(d(e,s))f={from:e,to:a};else if(c(e,s))f={from:s,to:e};else if(c(e,a))f={from:s,to:e};else throw new Error("Invalid range");if(f?.from&&f?.to){const m=i.differenceInCalendarDays(f.to,f.from);r>0&&m>r?f={from:e,to:void 0}:n>1&&m<n&&(f={from:e,to:void 0})}return f}function zae(e,t,n=di){const r=Array.isArray(t)?t:[t];let o=e.from;const i=n.differenceInCalendarDays(e.to,e.from),s=Math.min(i,6);for(let a=0;a<=s;a++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function UM(e,t,n=di){return qi(e,t.from,!1,n)||qi(e,t.to,!1,n)||qi(t,e.from,!1,n)||qi(t,e.to,!1,n)}function Gae(e,t,n=di){const r=Array.isArray(t)?t:[t];if(r.filter(a=>typeof a!="function").some(a=>typeof a=="boolean"?a:n.isDate(a)?qi(e,a,!1,n):MF(a,n)?a.some(l=>qi(e,l,!1,n)):Mv(a)?a.from&&a.to?UM(e,{from:a.from,to:a.to},n):!1:OF(a)?zae(e,a.dayOfWeek,n):lC(a)?n.isAfter(a.before,a.after)?UM(e,{from:n.addDays(a.after,1),to:n.addDays(a.before,-1)},n):Bi(e.from,a,n)||Bi(e.to,a,n):uC(a)||cC(a)?Bi(e.from,a,n)||Bi(e.to,a,n):!1))return!0;const s=r.filter(a=>typeof a=="function");if(s.length){let a=e.from;const l=n.differenceInCalendarDays(e.to,e.from);for(let c=0;c<=l;c++){if(s.some(d=>d(a)))return!0;a=n.addDays(a,1)}}return!1}function Yae(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:o,selected:i,required:s,onSelect:a}=e,[l,c]=Iv(i,a?i:void 0),d=a?i:l;return{selected:d,select:(g,v,b)=>{const{min:x,max:y}=e;let _;if(g){const w=d?.from,T=d?.to,R=!!w&&!!T,S=!!w&&!!T&&t.isSameDay(w,T)&&t.isSameDay(g,w);o&&(R||!d?.from)?!s&&S?_=void 0:_={from:g,to:void 0}:_=Uae(g,d,x,y,s,t)}return r&&n&&_?.from&&_.to&&Gae({from:_.from,to:_.to},n,t)&&(_.from=g,_.to=void 0),a||c(_),a?.(_,g,v,b),_},isSelected:g=>d&&qi(d,g,!1,t)}}function Xae(e,t){const{selected:n,required:r,onSelect:o}=e,[i,s]=Iv(n,o?n:void 0),a=o?n:i,{isSameDay:l}=t;return{selected:a,select:(f,m,g)=>{let v=f;return!r&&a&&a&&l(f,a)&&(v=void 0),o||s(v),o?.(v,f,m,g),v},isSelected:f=>a?l(a,f):!1}}function Zae(e,t){const n=Xae(e,t),r=Kae(e,t),o=Yae(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function ro(e,t){return e instanceof tr&&e.timeZone===t?e:new tr(e,t)}function vl(e,t,n){return ro(e,t)}function zM(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?vl(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?vl(r,t):r):Mv(e)?{...e,from:e.from?ro(e.from,t):e.from,to:e.to?ro(e.to,t):e.to}:lC(e)?{before:vl(e.before,t),after:vl(e.after,t)}:uC(e)?{after:vl(e.after,t)}:cC(e)?{before:vl(e.before,t)}:e}function dx(e,t,n){return e&&(Array.isArray(e)?e.map(r=>zM(r,t)):zM(e,t))}function Jae(e){let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=ro(t.today,n)),t.month&&(t.month=ro(t.month,n)),t.defaultMonth&&(t.defaultMonth=ro(t.defaultMonth,n)),t.startMonth&&(t.startMonth=ro(t.startMonth,n)),t.endMonth&&(t.endMonth=ro(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=ro(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(Me=>ro(Me,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?ro(t.selected.from,n):t.selected.from,to:t.selected.to?ro(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=dx(t.disabled,n)),t.hidden!==void 0&&(t.hidden=dx(t.hidden,n)),t.modifiers)){const Me={};Object.keys(t.modifiers).forEach(Be=>{Me[Be]=dx(t.modifiers?.[Be],n)}),t.modifiers=Me}const{components:r,formatters:o,labels:i,dateLib:s,locale:a,classNames:l}=M.useMemo(()=>{const Me={...TF,...t.locale},Be=t.broadcastCalendar?1:t.weekStartsOn,Ie=t.noonSafe&&t.timeZone?_ae(t.timeZone,{weekStartsOn:Be,locale:Me}):void 0,tt=t.dateLib&&Ie?{...Ie,...t.dateLib}:t.dateLib??Ie,at=new Ur({locale:Me,weekStartsOn:Be,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},tt);return{dateLib:at,components:aae(t.components),formatters:bae(t.formatters),labels:Cae(t.labels,at.options),locale:Me,classNames:{...uae(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:s.today()});const{captionLayout:c,mode:d,navLayout:f,numberOfMonths:m=1,onDayBlur:g,onDayClick:v,onDayFocus:b,onDayKeyDown:x,onDayMouseEnter:y,onDayMouseLeave:_,onNextClick:w,onPrevClick:T,showWeekNumber:R,styles:S}=t,{formatCaption:P,formatDay:N,formatMonthDropdown:F,formatWeekNumber:W,formatWeekNumberHeader:I,formatWeekdayName:B,formatYearDropdown:$}=o,k=Bae(t,s),{days:j,months:D,navStart:A,navEnd:L,previousMonth:H,nextMonth:V,goToMonth:X}=k,K=iae(j,t,A,L,s),{isSelected:G,select:ee,selected:Z}=Zae(t,s)??{},{blur:te,focused:J,isFocusTarget:ne,moveFocus:U,setFocused:ie}=Hae(t,k,K,G??(()=>!1),s),{labelDayButton:se,labelGridcell:Q,labelGrid:me,labelMonthDropdown:ve,labelNav:xe,labelPrevious:be,labelNext:Ce,labelWeekday:qe,labelWeekNumber:Te,labelWeekNumberHeader:ke,labelYearDropdown:ce}=i,he=M.useMemo(()=>Pae(s,t.ISOWeek,t.broadcastCalendar,t.today),[s,t.ISOWeek,t.broadcastCalendar,t.today]),re=d!==void 0||v!==void 0,le=M.useCallback(()=>{H&&(X(H),T?.(H))},[H,X,T]),Oe=M.useCallback(()=>{V&&(X(V),w?.(V))},[X,V,w]),De=M.useCallback((Me,Be)=>Ie=>{Ie.preventDefault(),Ie.stopPropagation(),ie(Me),!Be.disabled&&(ee?.(Me.date,Be,Ie),v?.(Me.date,Be,Ie))},[ee,v,ie]),Fe=M.useCallback((Me,Be)=>Ie=>{ie(Me),b?.(Me.date,Be,Ie)},[b,ie]),We=M.useCallback((Me,Be)=>Ie=>{te(),g?.(Me.date,Be,Ie)},[te,g]),ze=M.useCallback((Me,Be)=>Ie=>{const tt={ArrowLeft:[Ie.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[Ie.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[Ie.shiftKey?"year":"week","after"],ArrowUp:[Ie.shiftKey?"year":"week","before"],PageUp:[Ie.shiftKey?"year":"month","before"],PageDown:[Ie.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(tt[Ie.key]){Ie.preventDefault(),Ie.stopPropagation();const[at,Le]=tt[Ie.key];U(at,Le)}x?.(Me.date,Be,Ie)},[U,x,t.dir]),He=M.useCallback((Me,Be)=>Ie=>{y?.(Me.date,Be,Ie)},[y]),Ze=M.useCallback((Me,Be)=>Ie=>{_?.(Me.date,Be,Ie)},[_]),nt=M.useCallback(Me=>Be=>{const Ie=Number(Be.target.value),tt=s.setMonth(s.startOfMonth(Me),Ie);X(tt)},[s,X]),ht=M.useCallback(Me=>Be=>{const Ie=Number(Be.target.value),tt=s.setYear(s.startOfMonth(Me),Ie);X(tt)},[s,X]),{className:Je,style:Ge}=M.useMemo(()=>({className:[l[lt.Root],t.className].filter(Boolean).join(" "),style:{...S?.[lt.Root],...t.style}}),[l,t.className,t.style,S]),dt=lae(t),rt=M.useRef(null);Iae(rt,!!t.animate,{classNames:l,months:D,focused:J,dateLib:s});const Ve={dayPickerProps:t,selected:Z,select:ee,isSelected:G,months:D,nextMonth:V,previousMonth:H,goToMonth:X,getModifiers:K,components:r,classNames:l,styles:S,labels:i,formatters:o};return M.createElement(NF.Provider,{value:Ve},M.createElement(r.Root,{rootRef:t.animate?rt:void 0,className:Je,style:Ge,dir:t.dir,id:t.id,lang:t.lang??a.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...dt},M.createElement(r.Months,{className:l[lt.Months],style:S?.[lt.Months]},!t.hideNavigation&&!f&&M.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[lt.Nav],style:S?.[lt.Nav],"aria-label":xe(),onPreviousClick:le,onNextClick:Oe,previousMonth:H,nextMonth:V}),D.map((Me,Be)=>M.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:l[lt.Month],style:S?.[lt.Month],key:Be,displayIndex:Be,calendarMonth:Me},f==="around"&&!t.hideNavigation&&Be===0&&M.createElement(r.PreviousMonthButton,{type:"button",className:l[lt.PreviousMonthButton],tabIndex:H?void 0:-1,"aria-disabled":H?void 0:!0,"aria-label":be(H),onClick:le,"data-animated-button":t.animate?"true":void 0},M.createElement(r.Chevron,{disabled:H?void 0:!0,className:l[lt.Chevron],orientation:t.dir==="rtl"?"right":"left"})),M.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[lt.MonthCaption],style:S?.[lt.MonthCaption],calendarMonth:Me,displayIndex:Be},c?.startsWith("dropdown")?M.createElement(r.DropdownNav,{className:l[lt.Dropdowns],style:S?.[lt.Dropdowns]},(()=>{const Ie=c==="dropdown"||c==="dropdown-months"?M.createElement(r.MonthsDropdown,{key:"month",className:l[lt.MonthsDropdown],"aria-label":ve(),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:nt(Me.date),options:Rae(Me.date,A,L,o,s),style:S?.[lt.Dropdown],value:s.getMonth(Me.date)}):M.createElement("span",{key:"month"},F(Me.date,s)),tt=c==="dropdown"||c==="dropdown-years"?M.createElement(r.YearsDropdown,{key:"year",className:l[lt.YearsDropdown],"aria-label":ce(s.options),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:ht(Me.date),options:Tae(A,L,o,s,!!t.reverseYears),style:S?.[lt.Dropdown],value:s.getYear(Me.date)}):M.createElement("span",{key:"year"},$(Me.date,s));return s.getMonthYearOrder()==="year-first"?[tt,Ie]:[Ie,tt]})(),M.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},P(Me.date,s.options,s))):M.createElement(r.CaptionLabel,{className:l[lt.CaptionLabel],role:"status","aria-live":"polite"},P(Me.date,s.options,s))),f==="around"&&!t.hideNavigation&&Be===m-1&&M.createElement(r.NextMonthButton,{type:"button",className:l[lt.NextMonthButton],tabIndex:V?void 0:-1,"aria-disabled":V?void 0:!0,"aria-label":Ce(V),onClick:Oe,"data-animated-button":t.animate?"true":void 0},M.createElement(r.Chevron,{disabled:V?void 0:!0,className:l[lt.Chevron],orientation:t.dir==="rtl"?"left":"right"})),Be===m-1&&f==="after"&&!t.hideNavigation&&M.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[lt.Nav],style:S?.[lt.Nav],"aria-label":xe(),onPreviousClick:le,onNextClick:Oe,previousMonth:H,nextMonth:V}),M.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":d==="multiple"||d==="range","aria-label":me(Me.date,s.options,s)||void 0,className:l[lt.MonthGrid],style:S?.[lt.MonthGrid]},!t.hideWeekdays&&M.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[lt.Weekdays],style:S?.[lt.Weekdays]},R&&M.createElement(r.WeekNumberHeader,{"aria-label":ke(s.options),className:l[lt.WeekNumberHeader],style:S?.[lt.WeekNumberHeader],scope:"col"},I()),he.map(Ie=>M.createElement(r.Weekday,{"aria-label":qe(Ie,s.options,s),className:l[lt.Weekday],key:String(Ie),style:S?.[lt.Weekday],scope:"col"},B(Ie,s.options,s)))),M.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[lt.Weeks],style:S?.[lt.Weeks]},Me.weeks.map(Ie=>M.createElement(r.Week,{className:l[lt.Week],key:Ie.weekNumber,style:S?.[lt.Week],week:Ie},R&&M.createElement(r.WeekNumber,{week:Ie,style:S?.[lt.WeekNumber],"aria-label":Te(Ie.weekNumber,{locale:a}),className:l[lt.WeekNumber],scope:"row",role:"rowheader"},W(Ie.weekNumber,s)),Ie.days.map(tt=>{const{date:at}=tt,Le=K(tt);if(Le[hn.focused]=!Le.hidden&&!!J?.isEqualTo(tt),Le[Mo.selected]=G?.(at)||Le.selected,Mv(Z)){const{from:Rt,to:wn}=Z;Le[Mo.range_start]=!!(Rt&&wn&&s.isSameDay(at,Rt)),Le[Mo.range_end]=!!(Rt&&wn&&s.isSameDay(at,wn)),Le[Mo.range_middle]=qi(Z,at,!0,s)}const En=Sae(Le,S,t.modifiersStyles),zt=sae(Le,l,t.modifiersClassNames),Ee=!re&&!Le.hidden?Q(at,Le,s.options,s):void 0;return M.createElement(r.Day,{key:`${tt.isoDate}_${tt.displayMonthId}`,day:tt,modifiers:Le,className:zt.join(" "),style:En,role:"gridcell","aria-selected":Le.selected||void 0,"aria-label":Ee,"data-day":tt.isoDate,"data-month":tt.outside?tt.dateMonthId:void 0,"data-selected":Le.selected||void 0,"data-disabled":Le.disabled||void 0,"data-hidden":Le.hidden||void 0,"data-outside":tt.outside||void 0,"data-focused":Le.focused||void 0,"data-today":Le.today||void 0},!Le.hidden&&re?M.createElement(r.DayButton,{className:l[lt.DayButton],style:S?.[lt.DayButton],type:"button",day:tt,modifiers:Le,disabled:!Le.focused&&Le.disabled||void 0,"aria-disabled":Le.focused&&Le.disabled||void 0,tabIndex:ne(tt)?0:-1,"aria-label":se(at,Le,s.options,s),onClick:De(tt,Le),onBlur:We(tt,Le),onFocus:Fe(tt,Le),onKeyDown:ze(tt,Le),onMouseEnter:He(tt,Le),onMouseLeave:Ze(tt,Le)},N(at,s.options,s)):!Le.hidden&&N(tt.date,s.options,s))})))))))),t.footer&&M.createElement(r.Footer,{className:l[lt.Footer],style:S?.[lt.Footer],role:"status","aria-live":"polite"},t.footer)))}function HF(e){const[t,n]=h.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}function oi({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=h.useRef(e!==void 0),[i,s]=h.useState(t),a=o?e:i;if(process.env.NODE_ENV!=="production"){h.useEffect(()=>{o!==(e!==void 0)&&Ca([`A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
111
|
-
`))},[r,n,e]);const{current:c}=h.useRef(t);h.useEffect(()=>{!o&&GM(c)!==GM(t)&&Ca([`A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
112
|
-
`))},[t])}const l=h.useCallback(c=>{o||s(c)},[]);return[a,l]}function GM(e){let t=0;const n=new WeakMap;try{return JSON.stringify(e,function(i,s){if(!(i==="_owner"&&this!=null&&typeof this=="object"&&"$$typeof"in this)){if(typeof s=="bigint")return`__bigint__:${s}`;if(s!==null&&typeof s=="object"){const a=n.get(s);if(a!==void 0)return`__object__:${a}`;n.set(s,t),t+=1}return s}})??`__top__:${typeof e}`}catch{return"__unserializable__"}}const pC=h.createContext(null);process.env.NODE_ENV!=="production"&&(pC.displayName="SelectRootContext");const mC=h.createContext(null);process.env.NODE_ENV!=="production"&&(mC.displayName="SelectFloatingContext");function zr(){const e=h.useContext(pC);if(e===null)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.":gt(60));return e}function KF(){const e=h.useContext(mC);if(e===null)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.":gt(61));return e}let YM=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const Dv={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Pl={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Qae={disabled:!1,...Pl},ar={valid(e){return e===null?null:e?{[YM.valid]:""}:{[YM.invalid]:""}}},hC=h.createContext({invalid:void 0,name:void 0,validityData:{state:Dv,errors:[],error:"",value:"",initialValue:null},setValidityData:Dt,disabled:void 0,touched:Pl.touched,setTouched:Dt,dirty:Pl.dirty,setDirty:Dt,filled:Pl.filled,setFilled:Dt,focused:Pl.focused,setFocused:Dt,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:Qae,markedDirtyRef:{current:!1},registerFieldControl:Dt,validation:{getValidationProps:(e=rn)=>e,getInputValidationProps:(e=rn)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(hC.displayName="FieldRootContext");function Sn(e=!0){const t=h.useContext(hC);if(t.setValidityData===Dt&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":gt(28));return t}function qa(e,t){const{enabled:n=!0,getValue:r,id:o,value:i}=t,{registerFieldControl:s}=Sn(),a=h.useRef(null);a.current||(a.current=Symbol()),Ne(()=>{const l=a.current;if(!(!l||!n))return s(l,{controlRef:e,getValue:r,id:o,value:i}),()=>{s(l,void 0)}},[e,n,r,o,s,i])}const gC=h.createContext({controlId:void 0,registerControlId:Dt,labelId:void 0,setLabelId:Dt,messageIds:[],setMessageIds:Dt,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(gC.displayName="LabelableContext");function yr(){return h.useContext(gC)}function Ba(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:i}=yr(),s=bn(t),a=n?o:void 0,l=fn(()=>Symbol("labelable-control")),c=h.useRef(!1),d=h.useRef(t!=null),f=Re(()=>{!c.current||i===Dt||(c.current=!1,i(l.current,void 0))});return Ne(()=>{if(i===Dt)return;let m;if(n){const g=r?.current;Ct(g)&&g.closest("label")!=null?m=t??null:m=a??s}else if(t!=null)d.current=!0,m=t;else if(d.current)m=s;else{f();return}if(m===void 0){f();return}c.current=!0,i(l.current,m)},[t,r,a,i,n,s,l,f]),h.useEffect(()=>f,[f]),o??s}const UF=(e,t)=>Object.is(e,t);function si(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function zF(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:si(t,r,n))}function Ki(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:si(r,t,n))}function GF(e,t,n){return e.filter(r=>!si(t,r,n))}function vE(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function vC(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function YF(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(vC(t)){for(const n of t)for(const r of n.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function er(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return vE(e)}function Po(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?vE(e.value):vE(e)}function bC(e,t,n){function r(){return er(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){const o=t,i=vC(o)?o.flatMap(s=>s.items):o;if(e==null||typeof e!="object"){const s=i.find(a=>a.value===e);return s&&s.label!=null?s.label:r()}if("value"in e){const s=i.find(a=>a&&a.value===e.value);if(s&&s.label!=null)return s.label}}return r()}function XF(e,t,n){return e.reduce((r,o,i)=>(i>0&&r.push(", "),r.push(C.jsx(h.Fragment,{children:bC(o,t,n)},i)),r),[])}const st={id:ye(e=>e.id),labelId:ye(e=>e.labelId),modal:ye(e=>e.modal),multiple:ye(e=>e.multiple),items:ye(e=>e.items),itemToStringLabel:ye(e=>e.itemToStringLabel),itemToStringValue:ye(e=>e.itemToStringValue),isItemEqualToValue:ye(e=>e.isItemEqualToValue),value:ye(e=>e.value),hasSelectedValue:ye(e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Po(t,r)!==""}),hasNullItemLabel:ye((e,t)=>t?YF(e.items):!1),open:ye(e=>e.open),mounted:ye(e=>e.mounted),forceMount:ye(e=>e.forceMount),transitionStatus:ye(e=>e.transitionStatus),openMethod:ye(e=>e.openMethod),activeIndex:ye(e=>e.activeIndex),selectedIndex:ye(e=>e.selectedIndex),isActive:ye((e,t)=>e.activeIndex===t),isSelected:ye((e,t,n)=>{const r=e.isItemEqualToValue,o=e.value;return e.multiple?Array.isArray(o)&&o.some(i=>si(n,i,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:si(n,o,r)}),isSelectedByFocus:ye((e,t)=>e.selectedIndex===t),popupProps:ye(e=>e.popupProps),triggerProps:ye(e=>e.triggerProps),triggerElement:ye(e=>e.triggerElement),positionerElement:ye(e=>e.positionerElement),listElement:ye(e=>e.listElement),scrollUpArrowVisible:ye(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:ye(e=>e.scrollDownArrowVisible),hasScrollArrows:ye(e=>e.hasScrollArrows)},yC=h.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Dt,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(yC.displayName="FormContext");function fi(){return h.useContext(yC)}function To(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const Co=1;function xC(e,t){return Math.max(0,e-t)}function Wl(e,t){if(t<=0)return 0;const n=To(e,0,t),r=n,o=t-n,i=r<=Co,s=o<=Co;return i&&s?r<=o?0:t:i?0:s?t:n}function ZF(e){const{id:t,value:n,defaultValue:r=null,onValueChange:o,open:i,defaultOpen:s=!1,onOpenChange:a,name:l,form:c,autoComplete:d,disabled:f=!1,readOnly:m=!1,required:g=!1,modal:v=!0,actionsRef:b,inputRef:x,onOpenChangeComplete:y,items:_,multiple:w=!1,itemToStringLabel:T,itemToStringValue:R,isItemEqualToValue:S=UF,highlightItemOnHover:P=!0,children:N}=e,{clearErrors:F}=fi(),{setDirty:W,setTouched:I,setFocused:B,shouldValidateOnChange:$,validityData:k,setFilled:j,name:D,disabled:A,validation:L,validationMode:H}=Sn(),V=Ba({id:t}),X=A||f,K=D??l,[G,ee]=oi({controlled:n,default:w?r??ws:r,name:"Select",state:"value"}),[Z,te]=oi({controlled:i,default:s,name:"Select",state:"open"}),J=h.useRef([]),ne=h.useRef([]),U=h.useRef(null),ie=h.useRef(null),se=h.useRef(0),Q=h.useRef(null),me=h.useRef([]),ve=h.useRef(!1),xe=h.useRef(!1),be=h.useRef(null),Ce=h.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),qe=h.useRef(!1),{mounted:Te,setMounted:ke,transitionStatus:ce}=$o(Z),{openMethod:he,triggerProps:re}=Ev(Z),le=fn(()=>new hw({id:V,labelId:void 0,modal:v,multiple:w,itemToStringLabel:T,itemToStringValue:R,isItemEqualToValue:S,value:G,open:Z,mounted:Te,transitionStatus:ce,items:_,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Oe=pe(le,st.activeIndex),De=pe(le,st.selectedIndex),Fe=pe(le,st.triggerElement),We=pe(le,st.positionerElement),ze=HF(he),He=he??ze,Ze=h.useMemo(()=>w&&Array.isArray(G)&&G.length===0?"":Po(G,R),[w,G,R]),nt=h.useMemo(()=>w&&Array.isArray(G)?G.map(St=>Po(St,R)):Po(G,R),[w,G,R]),ht=dn(le.state.triggerElement),Je=Re(()=>nt);qa(ht,{id:V,value:G,getValue:Je});const Ge=h.useRef(G);Ne(()=>{G!==Ge.current&&le.set("forceMount",!0)},[le,G]),Ne(()=>{j(w?Array.isArray(G)&&G.length>0:G!=null)},[w,G,j]),Ne(function(){if(Z)return;const Lt=me.current;if(w){const ur=Array.isArray(G)?G:[];if(ur.length===0){le.set("selectedIndex",null);return}const Mn=ur[ur.length-1],Mr=Ki(Lt,Mn,S);le.set("selectedIndex",Mr===-1?null:Mr);return}const Fn=Ki(Lt,G,S);le.set("selectedIndex",Fn===-1?null:Fn)},[w,Z,G,me,S,le]),No(G,()=>{F(K),W(G!==k.initialValue),$()?L.commit(G):L.commit(G,!0)});const dt=Re((St,Lt)=>{if(a?.(St,Lt),!Lt.isCanceled&&(te(St),!St&&(Lt.reason===Ms||Lt.reason===pv)&&(I(!0),B(!1),H==="onBlur"&&L.commit(G)),!St&&le.state.activeIndex!==null)){const Fn=J.current[le.state.activeIndex];queueMicrotask(()=>{Fn?.setAttribute("tabindex","-1")})}}),rt=Re(()=>{ke(!1),le.update({activeIndex:null,openMethod:null}),y?.(!1)});sr({enabled:!b,open:Z,ref:U,onComplete(){Z||rt()}}),h.useImperativeHandle(b,()=>({unmount:rt}),[rt]);const Ve=Re((St,Lt)=>{o?.(St,Lt),!Lt.isCanceled&&ee(St)}),Me=Re(()=>{const St=le.state.listElement||U.current;if(!St)return;const Lt=xC(St.scrollHeight,St.clientHeight),Fn=Wl(St.scrollTop,Lt),ur=Fn>0,Mn=Fn<Lt;le.state.scrollUpArrowVisible!==ur&&le.set("scrollUpArrowVisible",ur),le.state.scrollDownArrowVisible!==Mn&&le.set("scrollDownArrowVisible",Mn)}),Be=yv({open:Z,onOpenChange:dt,elements:{reference:Fe,floating:We}}),Ie=Sp(Be,{enabled:!m&&!X,event:"mousedown"}),tt=Pp(Be,{bubbles:!1}),at=kA(Be,{enabled:!m&&!X,listRef:J,activeIndex:Oe,selectedIndex:De,disabledIndices:ws,onNavigate(St){St===null&&!Z||le.set("activeIndex",St)},focusItemOnHover:P}),Le=FA(Be,{enabled:!m&&!X&&(Z||!w),listRef:ne,activeIndex:Oe,selectedIndex:De,onMatch(St){Z?le.set("activeIndex",St):Ve(me.current[St],je("none"))},onTypingChange(St){ve.current=St}}),{getReferenceProps:En,getFloatingProps:zt,getItemProps:Ee}=ka([Ie,tt,at,Le]),Rt=h.useMemo(()=>Kr(En(),re,V?{id:V}:rn),[En,re,V]);xp(()=>{le.update({popupProps:zt(),triggerProps:Rt})}),Ne(()=>{le.update({id:V,modal:v,multiple:w,value:G,open:Z,mounted:Te,transitionStatus:ce,popupProps:zt(),triggerProps:Rt,items:_,itemToStringLabel:T,itemToStringValue:R,isItemEqualToValue:S,openMethod:He})},[le,V,v,w,G,Z,Te,ce,zt,Rt,_,T,R,S,He]);const wn=h.useMemo(()=>({store:le,name:K,required:g,disabled:X,readOnly:m,multiple:w,itemToStringLabel:T,itemToStringValue:R,highlightItemOnHover:P,setValue:Ve,setOpen:dt,listRef:J,popupRef:U,scrollHandlerRef:ie,handleScrollArrowVisibility:Me,scrollArrowsMountedCountRef:se,getItemProps:Ee,events:Be.context.events,valueRef:Q,valuesRef:me,labelsRef:ne,typingRef:ve,selectionRef:Ce,selectedItemTextRef:be,validation:L,onOpenChangeComplete:y,keyboardActiveRef:xe,alignItemWithTriggerActiveRef:qe,initialValueRef:Ge}),[le,K,g,X,m,w,T,R,P,Ve,dt,Ee,Be.context.events,L,y,Me]),yt=Io(x,L.inputRef),Zn=w&&Array.isArray(G)&&G.length>0,On=w?void 0:K,an=h.useMemo(()=>!w||!Array.isArray(G)||!K?null:G.map(St=>{const Lt=Po(St,R);return C.jsx("input",{type:"hidden",form:c,name:K,value:Lt},Lt)}),[w,G,c,K,R]);return C.jsx(pC.Provider,{value:wn,children:C.jsxs(mC.Provider,{value:Be,children:[N,C.jsx("input",{...L.getInputValidationProps({onFocus(){le.state.triggerElement?.focus({focusVisible:!0})},onChange(St){if(St.nativeEvent.defaultPrevented)return;const Lt=St.currentTarget.value,Fn=je(vn,St.nativeEvent);function ur(){if(w)return;const Mn=me.current.find(Mr=>Po(Mr,R).toLowerCase()===Lt.toLowerCase()||er(Mr,T).toLowerCase()===Lt.toLowerCase());Mn!=null&&(W(Mn!==k.initialValue),Ve(Mn,Fn),$()&&L.commit(Mn))}le.set("forceMount",!0),queueMicrotask(ur)}}),id:V&&On==null?`${V}-hidden-input`:void 0,form:c,name:On,autoComplete:d,value:Ze,disabled:X,required:g&&!Zn,readOnly:m,ref:yt,style:K?Yl:qs,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),an]})})}function JF(e,t){const n=bn(e);return Ne(()=>(t(n),()=>{t(void 0)}),[n,t]),n}function EC(e={}){const{id:t,fallbackControlId:n,native:r=!1,setLabelId:o,focusControl:i}=e,{controlId:s,setLabelId:a}=yr(),l=Re(g=>{a(g),o?.(g)}),c=JF(t,l),d=s??n;function f(g){if(i){i(g,d);return}if(!d)return;const v=mt(g.currentTarget).getElementById(d);Zt(v)&&ele(v)}function m(g){Ht(g.nativeEvent)?.closest("button,input,select,textarea")||(!g.defaultPrevented&&g.detail>1&&g.preventDefault(),!r&&f(g))}return r?{id:c,htmlFor:d??void 0,onMouseDown:m}:{id:c,onClick:m,onPointerDown(g){g.preventDefault()}}}function ele(e){e.focus({focusVisible:!0})}function QF(e){return e==null?void 0:`${e}-label`}function wC(e,t){return e??t}const CC=h.forwardRef(function(t,n){const{render:r,className:o,style:i,...s}=t,a=s;delete a.id;const l=Sn(),{store:c}=zr(),d=pe(c,st.triggerElement),f=pe(c,st.id),m=QF(f),g=EC({id:m,fallbackControlId:d?.id??f,setLabelId(v){c.set("labelId",v)}});return $e("div",t,{ref:n,state:l.state,props:[g,s],stateAttributesMapping:ar})});process.env.NODE_ENV!=="production"&&(CC.displayName="SelectLabel");function eL(e){const t=e.getBoundingClientRect();if(process.env.NODE_ENV!=="production")return t;const n=Ft(e),r=n.getComputedStyle(e,"::before"),o=n.getComputedStyle(e,"::after");if(!(r.content!=="none"||o.content!=="none"))return t;const s=parseFloat(r.width)||0,a=parseFloat(r.height)||0,l=parseFloat(o.width)||0,c=parseFloat(o.height)||0,d=Math.max(t.width,s,l),f=Math.max(t.height,a,c),m=d-t.width,g=f-t.height;return{left:t.left-m/2,right:t.right+m/2,top:t.top-g/2,bottom:t.bottom+g/2}}const Fh=2,tle=400,XM=200,nle={...Rw,...ar,value:()=>null},RC=h.forwardRef(function(t,n){const{render:r,className:o,id:i,disabled:s=!1,nativeButton:a=!0,style:l,...c}=t,{setTouched:d,setFocused:f,validationMode:m,state:g,disabled:v}=Sn(),{labelId:b}=yr(),{store:x,setOpen:y,selectionRef:_,validation:w,readOnly:T,required:R,alignItemWithTriggerActiveRef:S,disabled:P,keyboardActiveRef:N}=zr(),F=v||P||s,W=pe(x,st.open),I=pe(x,st.value),B=pe(x,st.triggerProps),$=pe(x,st.positionerElement),k=pe(x,st.listElement),j=pe(x,st.id),D=pe(x,st.labelId),A=pe(x,st.hasSelectedValue),L=!A&&W,H=pe(x,st.hasNullItemLabel,L),V=i??j,X=wC(b,D);Ba({id:V});const K=dn($),G=h.useRef(null),{getButtonProps:ee,buttonRef:Z}=Yn({disabled:F,native:a}),te=Re(xe=>{x.set("triggerElement",xe)}),J=Io(n,G,Z,te),ne=nn(),U=nn(),ie=nn(),se=nn();h.useEffect(()=>{if(W)return!(A||H)?ie.start(tle,()=>{_.current.allowUnselectedMouseUp=!0,_.current.allowSelectedMouseUp=!0}):se.start(XM,()=>{_.current.allowUnselectedMouseUp=!0,ie.start(XM,()=>{_.current.allowSelectedMouseUp=!0})}),()=>{ie.clear(),se.clear()};_.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},U.clear()},[W,A,H,_,U,ie,se]);const Q=h.useMemo(()=>k?.id??Jf($)?.id,[k,$]),me=Kr(B,{id:V,role:"combobox","aria-expanded":W?"true":"false","aria-haspopup":"listbox","aria-controls":W?Q:void 0,"aria-labelledby":X,"aria-readonly":T||void 0,"aria-required":R||void 0,tabIndex:F?-1:0,ref:J,onFocus(xe){f(!0),W&&S.current&&y(!1,je(vn,xe.nativeEvent)),ne.start(0,()=>{x.set("forceMount",!0)})},onBlur(xe){Xe($,xe.relatedTarget)||(d(!0),f(!1),m==="onBlur"&&w.commit(I))},onPointerMove(){N.current=!1},onKeyDown(){N.current=!0},onMouseDown(xe){if(W)return;const be=mt(xe.currentTarget);function Ce(qe){if(!G.current)return;const Te=qe.target;if(Xe(G.current,Te)||Xe(K.current,Te)||Te===G.current)return;const ke=eL(G.current);qe.clientX>=ke.left-Fh&&qe.clientX<=ke.right+Fh&&qe.clientY>=ke.top-Fh&&qe.clientY<=ke.bottom+Fh||y(!1,je(xH,qe))}U.start(0,()=>{be.addEventListener("mouseup",Ce,{once:!0})})}},w.getValidationProps,c,ee);me.role="combobox";const ve={...g,open:W,disabled:F,value:I,readOnly:T,placeholder:!A};return $e("button",t,{ref:[n,G],state:ve,stateAttributesMapping:nle,props:me})});process.env.NODE_ENV!=="production"&&(RC.displayName="SelectTrigger");const rle={value:()=>null},SC=h.forwardRef(function(t,n){const{className:r,render:o,children:i,placeholder:s,style:a,...l}=t,{store:c,valueRef:d}=zr(),f=pe(c,st.value),m=pe(c,st.items),g=pe(c,st.itemToStringLabel),v=pe(c,st.hasSelectedValue),b=!v&&s!=null&&i==null,x=pe(c,st.hasNullItemLabel,b),y={value:f,placeholder:!v};let _=null;return typeof i=="function"?_=i(f):i!=null?_=i:!v&&s!=null&&!x?_=s:Array.isArray(f)?_=XF(f,m,g):_=bC(f,m,g),$e("span",t,{state:y,ref:[n,d],props:[{children:_},l],stateAttributesMapping:rle})});process.env.NODE_ENV!=="production"&&(SC.displayName="SelectValue");const PC=h.forwardRef(function(t,n){const{className:r,render:o,style:i,...s}=t,{store:a}=zr(),c={open:pe(a,st.open)};return $e("span",t,{state:c,ref:n,props:[{"aria-hidden":!0,children:"▼"},s],stateAttributesMapping:Np})});process.env.NODE_ENV!=="production"&&(PC.displayName="SelectIcon");const tL=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(tL.displayName="SelectPortalContext");const TC=h.forwardRef(function(t,n){const{store:r}=zr(),o=pe(r,st.mounted),i=pe(r,st.forceMount);return o||i?C.jsx(tL.Provider,{value:!0,children:C.jsx(Rp,{ref:n,...t})}):null});process.env.NODE_ENV!=="production"&&(TC.displayName="SelectPortal");const ole={...br,...Hn},nL=h.forwardRef(function(t,n){const{className:r,render:o,style:i,...s}=t,{store:a}=zr(),l=pe(a,st.open),c=pe(a,st.mounted),d=pe(a,st.transitionStatus);return $e("div",t,{state:{open:l,transitionStatus:d},ref:n,props:[{role:"presentation",hidden:!c,style:{userSelect:"none",WebkitUserSelect:"none"}},s],stateAttributesMapping:ole})});process.env.NODE_ENV!=="production"&&(nL.displayName="SelectBackdrop");const _C=h.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(_C.displayName="CompositeListContext");function ile(){return h.useContext(_C)}function NC(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=Re(o),s=h.useRef(0),a=fn(ale).current,l=fn(sle).current,[c,d]=h.useState(0),f=h.useRef(c),m=Re((y,_)=>{l.set(y,_??null),f.current+=1,d(f.current)}),g=Re(y=>{l.delete(y),f.current+=1,d(f.current)}),v=h.useMemo(()=>{const y=new Map;return Array.from(l.keys()).filter(w=>w.isConnected).sort(lle).forEach((w,T)=>{const R=l.get(w)??{};y.set(w,{...R,index:T})}),y},[l,c]);Ne(()=>{if(typeof MutationObserver!="function"||v.size===0)return;const y=new MutationObserver(_=>{const w=new Set,T=R=>w.has(R)?w.delete(R):w.add(R);_.forEach(R=>{R.removedNodes.forEach(T),R.addedNodes.forEach(T)}),w.size===0&&(f.current+=1,d(f.current))});return v.forEach((_,w)=>{w.parentElement&&y.observe(w.parentElement,{childList:!0})}),()=>{y.disconnect()}},[v]),Ne(()=>{f.current===c&&(n.current.length!==v.size&&(n.current.length=v.size),r&&r.current.length!==v.size&&(r.current.length=v.size),s.current=v.size),i(v)},[i,v,n,r,c]),Ne(()=>()=>{n.current=[]},[n]),Ne(()=>()=>{r&&(r.current=[])},[r]);const b=Re(y=>(a.add(y),()=>{a.delete(y)}));Ne(()=>{a.forEach(y=>y(v))},[a,v]);const x=h.useMemo(()=>({register:m,unregister:g,subscribeMapChange:b,elementsRef:n,labelsRef:r,nextIndexRef:s}),[m,g,b,n,r,s]);return C.jsx(_C.Provider,{value:x,children:t})}function sle(){return new Map}function ale(){return new Set}function lle(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const rL=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(rL.displayName="DirectionContext");function ou(){return h.useContext(rL)?.direction??"ltr"}const ule=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:d=0,offsetParent:f="real"}=zi(e,t)||{};if(c==null)return{};const m=ZD(d),g={x:n,y:r},v=rw(o),b=nw(v),x=await s.getDimensions(c),y=v==="y",_=y?"top":"left",w=y?"bottom":"right",T=y?"clientHeight":"clientWidth",R=i.reference[b]+i.reference[v]-g[v]-i.floating[b],S=g[v]-i.reference[v],P=f==="real"?await s.getOffsetParent?.(c):a.floating;let N=a.floating[T]||i.floating[b];(!N||!await s.isElement?.(P))&&(N=a.floating[T]||i.floating[b]);const F=R/2-S/2,W=N/2-x[b]/2-1,I=Math.min(m[_],W),B=Math.min(m[w],W),$=I,k=N-x[b]-B,j=N/2-x[b]/2+F,D=Lx($,j,k),A=!l.arrow&&Bs(o)!=null&&j!==D&&i.reference[b]/2-(j<$?I:B)-x[b]/2<0,L=A?j<$?j-$:j-k:0;return{[v]:g[v]+L,data:{[v]:D,centerOffset:j-D-L,...A&&{alignmentOffset:L}},reset:A}}}),cle=(e,t)=>({...ule(e),options:[e,t]}),dle={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,i=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await gU().fn(e)).data?.referenceHidden||i}}}},cg={sideX:"left",sideY:"top"},oL={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:o},platform:i,strategy:s,placement:a}=e,l=Ft(o),c=l.getComputedStyle(o);if(!(c.transitionDuration!=="0s"&&c.transitionDuration!==""))return{x:t,y:n,data:cg};const f=await i.getOffsetParent?.(o);let m={width:0,height:0};if(s==="fixed"&&l?.visualViewport)m={width:l.visualViewport.width,height:l.visualViewport.height};else if(f===l){const _=mt(o);m={width:_.documentElement.clientWidth,height:_.documentElement.clientHeight}}else await i.isElement?.(f)&&(m=await i.getDimensions(f));const g=_r(a);let v=t,b=n;g==="left"&&(v=m.width-(t+r.width)),g==="top"&&(b=m.height-(n+r.height));const x=g==="left"?"right":cg.sideX,y=g==="top"?"bottom":cg.sideY;return{x:v,y:b,data:{sideX:x,sideY:y}}}};function iL(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function ZM(e,t,n){const{rects:r,placement:o}=e;return{side:iL(t,_r(o),n),align:Bs(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Kp(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,collisionBoundary:a,collisionPadding:l=5,sticky:c=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,keepMounted:m=!1,floatingRootContext:g,mounted:v,collisionAvoidance:b,shiftCrossAxis:x=!1,nodeId:y,adaptiveOrigin:_,lazyFlip:w=!1,externalTree:T}=e,[R,S]=h.useState(null);!v&&R!==null&&S(null);const P=b.side||"flip",N=b.align||"flip",F=b.fallbackAxisSide||"end",W=typeof t=="function"?t:void 0,I=Re(W),B=W?I:t,$=dn(t),k=dn(v),D=ou()==="rtl",A=R||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":D?"left":"right","inline-start":D?"right":"left"}[r],L=i==="center"?A:`${A}-${i}`;let H=l;const V=1,X=r==="bottom"?V:0,K=r==="top"?V:0,G=r==="right"?V:0,ee=r==="left"?V:0;typeof H=="number"?H={top:H+X,right:H+ee,bottom:H+K,left:H+G}:H&&(H={top:(H.top||0)+X,right:(H.right||0)+ee,bottom:(H.bottom||0)+K,left:(H.left||0)+G});const Z={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:H},te=h.useRef(null),J=dn(o),ne=dn(s),se=[dU(Ve=>{const Me=ZM(Ve,r,D),Be=typeof J.current=="function"?J.current(Me):J.current,Ie=typeof ne.current=="function"?ne.current(Me):ne.current;return{mainAxis:Be,crossAxis:Ie,alignmentAxis:Ie}},[typeof o!="function"?o:0,typeof s!="function"?s:0,D,r])],Q=N==="none"&&P!=="shift",me=!Q&&(c||x||P==="shift"),ve=P==="none"?null:mU({...Z,padding:{top:H.top+V,right:H.right+V,bottom:H.bottom+V,left:H.left+V},mainAxis:!x&&P==="flip",crossAxis:N==="flip"?"alignment":!1,fallbackAxisSideDirection:F}),xe=Q?null:fU(Ve=>{const Me=mt(Ve.elements.floating).documentElement;return{...Z,rootBoundary:x?{x:0,y:0,width:Me.clientWidth,height:Me.clientHeight}:void 0,mainAxis:N!=="none",crossAxis:me,limiter:c||x?void 0:pU(Be=>{if(!te.current)return{};const{width:Ie,height:tt}=te.current.getBoundingClientRect(),at=ao(_r(Be.placement)),Le=at==="y"?Ie:tt,En=at==="y"?H.left+H.right:H.top+H.bottom;return{offset:Le/2+En/2}})}},[Z,c,x,H,N]);P==="shift"||N==="shift"||i==="center"?se.push(xe,ve):se.push(ve,xe),se.push(hU({...Z,apply({elements:{floating:Ve},availableWidth:Me,availableHeight:Be,rects:Ie}){if(!k.current)return;const tt=Ve.style;tt.setProperty("--available-width",`${Me}px`),tt.setProperty("--available-height",`${Be}px`);const at=Ft(Ve).devicePixelRatio||1,{x:Le,y:En,width:zt,height:Ee}=Ie.reference,Rt=(Math.round((Le+zt)*at)-Math.round(Le*at))/at,wn=(Math.round((En+Ee)*at)-Math.round(En*at))/at;tt.setProperty("--anchor-width",`${Rt}px`),tt.setProperty("--anchor-height",`${wn}px`)}}),cle(()=>({element:te.current||mt(te.current).createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(Ve){const{elements:Me,middlewareData:Be,placement:Ie,rects:tt,y:at}=Ve,Le=_r(Ie),En=ao(Le),zt=te.current,Ee=Be.arrow?.x||0,Rt=Be.arrow?.y||0,wn=zt?.clientWidth||0,yt=zt?.clientHeight||0,Zn=Ee+wn/2,On=Rt+yt/2,an=Math.abs(Be.shift?.y||0),St=tt.reference.height/2,Lt=typeof o=="function"?o(ZM(Ve,r,D)):o,Fn=an>Lt,ur={top:`${Zn}px calc(100% + ${Lt}px)`,bottom:`${Zn}px ${-Lt}px`,left:`calc(100% + ${Lt}px) ${On}px`,right:`${-Lt}px ${On}px`}[Le],Mn=`${Zn}px ${tt.reference.y+St-at}px`;return Me.floating.style.setProperty("--transform-origin",me&&En==="y"&&Fn?Mn:ur),{}}},dle,_),Ne(()=>{!v&&g&&g.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[v,g]);const be=h.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:Ce,elements:qe,x:Te,y:ke,middlewareData:ce,update:he,placement:re,context:le,isPositioned:Oe,floatingStyles:De}=oz({rootContext:g,open:m?v:void 0,placement:L,middleware:se,strategy:n,whileElementsMounted:m?void 0:(...Ve)=>wT(...Ve,be),nodeId:y,externalTree:T}),{sideX:Fe,sideY:We}=ce.adaptiveOrigin||cg,ze=Oe?n:"fixed",He=h.useMemo(()=>{const Ve=_?{position:ze,[Fe]:Te,[We]:ke}:{position:ze,...De};return Oe||(Ve.opacity=0),Ve},[_,ze,Fe,Te,We,ke,De,Oe]),Ze=h.useRef(null);Ne(()=>{if(!v)return;const Ve=$.current,Me=typeof Ve=="function"?Ve():Ve,Ie=(JM(Me)?Me.current:Me)||null||null;Ie!==Ze.current&&(Ce.setPositionReference(Ie),Ze.current=Ie)},[v,Ce,B,$]),h.useEffect(()=>{if(!v)return;const Ve=$.current;typeof Ve!="function"&&JM(Ve)&&Ve.current!==Ze.current&&(Ce.setPositionReference(Ve.current),Ze.current=Ve.current)},[v,Ce,B,$]),h.useEffect(()=>{if(m&&v&&qe.domReference&&qe.floating)return wT(qe.domReference,qe.floating,he,be)},[m,v,qe,he,be]);const nt=_r(re),ht=iL(r,nt,D),Je=Bs(re)||"center",Ge=!!ce.hide?.referenceHidden;Ne(()=>{w&&v&&Oe&&S(nt)},[w,v,Oe,nt]);const dt=h.useMemo(()=>({position:"absolute",top:ce.arrow?.y,left:ce.arrow?.x}),[ce.arrow]),rt=ce.arrow?.centerOffset!==0;return h.useMemo(()=>({positionerStyles:He,arrowStyles:dt,arrowRef:te,arrowUncentered:rt,side:ht,align:Je,physicalSide:nt,anchorHidden:Ge,refs:Ce,context:le,isPositioned:Oe,update:he}),[He,dt,te,rt,ht,Je,nt,Ge,Ce,le,Oe,he])}function JM(e){return e!=null&&"current"in e}const OC=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(OC.displayName="SelectPositionerContext");function Av(){const e=h.useContext(OC);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.":gt(59));return e}function Wg(e,t){e&&Object.assign(e.style,t)}const sL={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"};function Up(e){return e==="starting"?dH:rn}function zp(e,t,{styles:n,transitionStatus:r,props:o,refs:i,hidden:s,inert:a=!1}){const l={...n};return a&&(l.pointerEvents="none"),$e("div",e,{state:t,ref:i,props:[{role:"presentation",hidden:s,style:l},Up(r),o],stateAttributesMapping:br})}const fle=20;function MC(e,t,n,r){const[o,i]=h.useState(!1);Ne(()=>{if(!e||!t||n==null){i(!1);return}const s=mt(n).documentElement.clientWidth,a=n.offsetWidth;i(s>0&&a>0&&a>=s-fle)},[e,t,n]),FD(e&&(!t||o),r)}const ple={position:"fixed"},IC=h.forwardRef(function(t,n){const{anchor:r,positionMethod:o="absolute",className:i,render:s,side:a="bottom",align:l="center",sideOffset:c=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:m,arrowPadding:g=5,sticky:v=!1,disableAnchorTracking:b,alignItemWithTrigger:x=!0,collisionAvoidance:y=VD,style:_,...w}=t,{store:T,listRef:R,labelsRef:S,alignItemWithTriggerActiveRef:P,selectedItemTextRef:N,valuesRef:F,initialValueRef:W,popupRef:I,setValue:B}=zr(),$=KF(),k=pe(T,st.open),j=pe(T,st.mounted),D=pe(T,st.modal),A=pe(T,st.value),L=pe(T,st.openMethod),H=pe(T,st.positionerElement),V=pe(T,st.triggerElement),X=pe(T,st.isItemEqualToValue),K=pe(T,st.transitionStatus),G=h.useRef(null),ee=h.useRef(null),[Z,te]=h.useState(x),J=j&&Z&&L!=="touch";!j&&Z!==x&&te(x),Ne(()=>{j||(st.scrollUpArrowVisible(T.state)&&T.set("scrollUpArrowVisible",!1),st.scrollDownArrowVisible(T.state)&&T.set("scrollDownArrowVisible",!1))},[T,j]),h.useImperativeHandle(P,()=>J),MC((J||D)&&k,L==="touch",H,V);const ne=Kp({anchor:r,floatingRootContext:$,positionMethod:o,mounted:j,side:a,sideOffset:c,align:l,alignOffset:d,arrowPadding:g,collisionBoundary:f,collisionPadding:m,sticky:v,disableAnchorTracking:b??J,collisionAvoidance:y,keepMounted:!0}),U=J?"none":ne.side,ie=J?ple:ne.positionerStyles,se={open:k,side:U,align:ne.align,anchorHidden:ne.anchorHidden},Q=Re(Ce=>{T.set("positionerElement",Ce)}),me=zp(t,se,{styles:ie,transitionStatus:K,props:w,refs:[n,Q],hidden:!j,inert:!k}),ve=h.useRef(0),xe=Re(Ce=>{if(Ce.size===0&&ve.current===0||F.current.length===0)return;const qe=ve.current;if(ve.current=Ce.size,Ce.size===qe)return;const Te=je(vn);if(qe!==0&&!T.state.multiple&&A!==null&&Ki(F.current,A,X)===-1){const ce=W.current,re=ce!=null&&Ki(F.current,ce,X)!==-1?ce:null;B(re,Te),re===null&&(T.set("selectedIndex",null),N.current=null)}if(qe!==0&&T.state.multiple&&Array.isArray(A)){const ke=he=>Ki(F.current,he,X)!==-1,ce=A.filter(he=>ke(he));(ce.length!==A.length||ce.some(he=>!zF(A,he,X)))&&(B(ce,Te),ce.length===0&&(T.set("selectedIndex",null),N.current=null))}if(k&&J){T.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ke={height:""};Wg(H,ke),Wg(I.current,ke)}}),be=h.useMemo(()=>({...ne,side:U,alignItemWithTriggerActive:J,setControlledAlignItemWithTrigger:te,scrollUpArrowRef:G,scrollDownArrowRef:ee}),[ne,U,J,te]);return C.jsx(NC,{elementsRef:R,labelsRef:S,onMapChange:xe,children:C.jsxs(OC.Provider,{value:be,children:[j&&D&&C.jsx(Dp,{inert:Jl(!k),cutout:V}),me]})})});process.env.NODE_ENV!=="production"&&(IC.displayName="SelectPositioner");const Lh="base-ui-disable-scrollbar",Hl={className:Lh,getElement(e){return C.jsx("style",{nonce:e,href:Lh,precedence:"base-ui:low",children:`.${Lh}{scrollbar-width:none}.${Lh}::-webkit-scrollbar{display:none}`})}};process.env.NODE_ENV!=="production"&&(Hl.getElement.displayName="styleDisableScrollbar.getElement");const aL=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(aL.displayName="ToolbarRootContext");function lL(e){return h.useContext(aL)}const uL=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(uL.displayName="CSPContext");const mle={disableStyleElements:!1};function cL(){return h.useContext(uL)??mle}const hle={...br,...Hn},DC=h.forwardRef(function(t,n){const{render:r,className:o,style:i,finalFocus:s,...a}=t,{store:l,popupRef:c,onOpenChangeComplete:d,setOpen:f,valueRef:m,selectedItemTextRef:g,keyboardActiveRef:v,multiple:b,handleScrollArrowVisibility:x,scrollHandlerRef:y,listRef:_,highlightItemOnHover:w}=zr(),{side:T,align:R,alignItemWithTriggerActive:S,isPositioned:P,setControlledAlignItemWithTrigger:N,scrollDownArrowRef:F,scrollUpArrowRef:W}=Av(),I=lL()!=null,B=KF(),$=ou(),{nonce:k,disableStyleElements:j}=cL(),D=pe(l,st.id),A=pe(l,st.open),L=pe(l,st.mounted),H=pe(l,st.popupProps),V=pe(l,st.transitionStatus),X=pe(l,st.triggerElement),K=pe(l,st.positionerElement),G=pe(l,st.listElement),ee=h.useRef(!1),Z=h.useRef(!1),te=h.useRef({}),J=Gl(),ne=Re(Q=>{if(!K||!c.current||!Z.current)return;if(ee.current||!S){x();return}const me=K.style.top==="0px",ve=K.style.bottom==="0px";if(!me&&!ve){x();return}const xe=eI(K),be=Vf(K.getBoundingClientRect().height,"y",xe),Ce=mt(K),qe=getComputedStyle(K),Te=parseFloat(qe.marginTop),ke=parseFloat(qe.marginBottom),ce=QM(getComputedStyle(c.current)),he=Math.min(Ce.documentElement.clientHeight-Te-ke,ce),re=Q.scrollTop,le=jh(Q);let Oe=0,De=null,Fe=!1,We=!1;const ze=ht=>{K.style.height=`${ht}px`},He=(ht,Je)=>{const Ge=To(ht,0,he-be);Ge>0&&ze(be+Ge),Q.scrollTop=Je,he-(be+Ge)<=Co&&(ee.current=!0),x()},Ze=me?le-re:re,nt=Math.min(be+Ze,he);if(Oe=nt,Ze<=Co){He(Ze,me?le:0);return}if(he-nt>Co)me?We=!0:De=0;else if(Fe=!0,ve&&re<le){const ht=be+Ze-he;De=re-(Ze-ht)}if(Oe=Math.ceil(Oe),Oe!==0&&ze(Oe),We||De!=null){const ht=jh(Q),Je=We?ht:To(De,0,ht);Math.abs(Q.scrollTop-Je)>Co&&(Q.scrollTop=Je)}(Fe||Oe>=he-Co)&&(ee.current=!0),x()});h.useImperativeHandle(y,()=>ne,[ne]),sr({open:A,ref:c,onComplete(){A&&d?.(!0)}});const U={open:A,transitionStatus:V,side:T,align:R};Ne(()=>{!K||!c.current||Object.keys(te.current).length||(te.current={top:K.style.top||"0",left:K.style.left||"0",right:K.style.right,height:K.style.height,bottom:K.style.bottom,minHeight:K.style.minHeight,maxHeight:K.style.maxHeight,marginTop:K.style.marginTop,marginBottom:K.style.marginBottom})},[c,K]),Ne(()=>{A||S||(Z.current=!1,ee.current=!1,Wg(K,te.current))},[A,S,K,c]),Ne(()=>{const Q=c.current;if(!A||!X||!K||!Q||S&&!P||l.state.transitionStatus==="ending")return;if(!S){Z.current=!0,J.request(x),Q.style.removeProperty("--transform-origin");return}const me=gle(Q);Q.style.removeProperty("--transform-origin");try{const ve=g.current,xe=m.current,be=getComputedStyle(K),Ce=getComputedStyle(Q),qe=mt(X),Te=Ft(K),ke=eI(X),ce=qh(X.getBoundingClientRect(),ke),he=qh(K.getBoundingClientRect(),ke),re=ce.height,le=G||Q,Oe=le.scrollHeight,De=parseFloat(Ce.borderBottomWidth),Fe=parseFloat(be.marginTop)||10,We=parseFloat(be.marginBottom)||10,ze=parseFloat(be.minHeight)||100,He=QM(Ce),Ze=5,nt=5,ht=20,Je=qe.documentElement.clientHeight-Fe-We,Ge=qe.documentElement.clientWidth,dt=Je-ce.bottom+re;let rt,Ve=$==="rtl"?ce.right-he.width:ce.left,Me=0;if(ve&&xe){const yt=qh(xe.getBoundingClientRect(),ke);rt=qh(ve.getBoundingClientRect(),ke),Ve=he.left+($==="rtl"?yt.right-rt.right:yt.left-rt.left);const Zn=yt.top-ce.top+yt.height/2;Me=rt.top-he.top+rt.height/2-Zn}const Be=dt+Me+We+De;let Ie=Math.min(Je,Be);const tt=Je-Fe-We,at=Be-Ie,Le=Ge-nt;K.style.left=`${To(Ve,Ze,Le-he.width)}px`,K.style.height=`${Ie}px`,K.style.maxHeight="auto",K.style.marginTop=`${Fe}px`,K.style.marginBottom=`${We}px`,Q.style.height="100%";const En=jh(le),zt=at>=En-Co;zt&&(Ie=Math.min(Je,he.height)-(at-En));const Ee=ce.top<ht||ce.bottom>Je-ht||Math.ceil(Ie)+Co<Math.min(Oe,ze),Rt=(Te.visualViewport?.scale??1)!==1&&Ul;if(Ee||Rt){Z.current=!0,Wg(K,te.current),N(!1);return}const wn=Math.max(ze,Ie);if(zt){const yt=Math.max(0,Je-Be);K.style.top=he.height>=tt?"0":`${yt}px`,K.style.height=`${Ie}px`,le.scrollTop=jh(le)}else K.style.bottom="0",le.scrollTop=at;if(rt){const yt=he.top,Zn=he.height,On=rt.top+rt.height/2,an=Zn>0?(On-yt)/Zn*100:50,St=To(an,0,100);Q.style.setProperty("--transform-origin",`50% ${St}%`)}(wn===Je||Ie>=He)&&(ee.current=!0),x(),w&&l.state.selectedIndex===null&&l.state.activeIndex===null&&_.current[0]!=null&&l.set("activeIndex",0),Z.current=!0}finally{me()}},[l,A,K,X,m,g,c,x,S,N,J,F,W,G,_,w,$,P]),h.useEffect(()=>{if(!S||!K||!A)return;const Q=Ft(K);function me(ve){f(!1,je(wH,ve))}return ut(Q,"resize",me)},[f,S,K,A]);const ie={...G?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":b||void 0,id:`${D}-list`},onKeyDown(Q){v.current=!0,I&&Pw.has(Q.key)&&Q.stopPropagation()},onMouseMove(){v.current=!1},onScroll(Q){G||ne(Q.currentTarget)},...S&&{style:G?{height:"100%"}:sL}},se=$e("div",t,{ref:[n,c],state:U,stateAttributesMapping:hle,props:[H,ie,Up(V),{className:!G&&S?Hl.className:void 0},a]});return C.jsxs(h.Fragment,{children:[!j&&Hl.getElement(k),C.jsx(gv,{context:B,modal:!1,disabled:!L,returnFocus:s,restoreFocus:!0,children:se})]})});process.env.NODE_ENV!=="production"&&(DC.displayName="SelectPopup");function QM(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function jh(e){return xC(e.scrollHeight,e.clientHeight)}function eI(e){return CA.getScale(e)}function Vf(e,t,n){return e/n[t]}function qh(e,t){return Qf({x:Vf(e.x,"x",t),y:Vf(e.y,"y",t),width:Vf(e.width,"x",t),height:Vf(e.height,"y",t)})}const tI=[["transform","none"],["scale","1"],["translate","0 0"]];function gle(e){const{style:t}=e,n={};for(const[r,o]of tI)n[r]=t.getPropertyValue(r),t.setProperty(r,o,"important");return()=>{for(const[r]of tI){const o=n[r];o?t.setProperty(r,o):t.removeProperty(r)}}}const AC=h.forwardRef(function(t,n){const{className:r,render:o,style:i,...s}=t,{store:a,scrollHandlerRef:l}=zr(),{alignItemWithTriggerActive:c}=Av(),d=pe(a,st.hasScrollArrows),f=pe(a,st.openMethod),m=pe(a,st.multiple),v={id:`${pe(a,st.id)}-list`,role:"listbox","aria-multiselectable":m||void 0,onScroll(x){l.current?.(x.currentTarget)},...c&&{style:sL},className:d&&f!=="touch"?Hl.className:void 0},b=Re(x=>{a.set("listElement",x)});return $e("div",t,{ref:[n,b],props:[v,s]})});process.env.NODE_ENV!=="production"&&(AC.displayName="SelectList");let kC=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function $C(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:s,unregister:a,subscribeMapChange:l,elementsRef:c,labelsRef:d,nextIndexRef:f}=ile(),m=h.useRef(-1),[g,v]=h.useState(i??(o===kC.GuessFromOrder?()=>{if(m.current===-1){const y=f.current;f.current+=1,m.current=y}return m.current}:-1)),b=h.useRef(null),x=h.useCallback(y=>{if(b.current=y,g!==-1&&y!==null&&(c.current[g]=y,d)){const _=t!==void 0;d.current[g]=_?t:r?.current?.textContent??y.textContent}},[g,c,d,t,r]);return Ne(()=>{if(i!=null)return;const y=b.current;if(y)return s(y,n),()=>{a(y)}},[i,s,a,n]),Ne(()=>{if(i==null)return l(y=>{const _=b.current?y.get(b.current)?.index:null;_!=null&&v(_)})},[i,l,v]),h.useMemo(()=>({ref:x,index:g}),[g,x])}const FC=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(FC.displayName="SelectItemContext");function LC(){const e=h.useContext(FC);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.":gt(57));return e}const jC=h.memo(h.forwardRef(function(t,n){const{render:r,className:o,value:i=null,label:s,disabled:a=!1,nativeButton:l=!1,style:c,...d}=t,f=h.useRef(null),m=$C({label:s,textRef:f,indexGuessBehavior:kC.GuessFromOrder}),{store:g,getItemProps:v,setOpen:b,setValue:x,selectionRef:y,typingRef:_,valuesRef:w,multiple:T,selectedItemTextRef:R}=zr(),S=pe(g,st.isActive,m.index),P=pe(g,st.isSelected,m.index,i),N=pe(g,st.isSelectedByFocus,m.index),F=pe(g,st.isItemEqualToValue),W=m.index,I=W!==-1,B=h.useRef(null),$=dn(W);Ne(()=>{if(!I)return;const Z=w.current;return Z[W]=i,()=>{delete Z[W]}},[I,W,i,w]),Ne(()=>{if(!I)return;const Z=g.state.value;let te=Z;T&&Array.isArray(Z)&&Z.length>0&&(te=Z[Z.length-1]),te!==void 0&&si(i,te,F)&&(g.set("selectedIndex",W),f.current&&(R.current=f.current))},[I,W,T,F,g,i,R]);const k={disabled:a,selected:P,highlighted:S},j=v({active:S,selected:P});j.id=void 0;const D=h.useRef(null),A=h.useRef("mouse"),L=h.useRef(!1),{getButtonProps:H,buttonRef:V}=Yn({disabled:a,focusableWhenDisabled:!0,native:l,composite:!0});function X(Z){const te=g.state.value;if(T){const J=Array.isArray(te)?te:[],ne=P?GF(J,i,F):[...J,i];x(ne,je(rg,Z))}else x(i,je(rg,Z)),b(!1,je(rg,Z))}const K={role:"option","aria-selected":P,tabIndex:S?0:-1,onTouchStart(){y.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(Z){D.current=Z.key,g.set("activeIndex",W),Z.key===" "&&_.current&&Z.preventDefault()},onClick(Z){L.current=!1,!(Z.type==="keydown"&&D.current===null)&&(a||Z.type==="keydown"&&D.current===" "&&_.current||A.current!=="touch"&&!S||(D.current=null,X(Z.nativeEvent)))},onPointerEnter(Z){A.current=Z.pointerType},onPointerDown(Z){A.current=Z.pointerType,L.current=!0},onMouseUp(){if(a)return;if(L.current){L.current=!1;return}const Z=!y.current.allowSelectedMouseUp&&P,te=!y.current.allowUnselectedMouseUp&&!P;Z||te||A.current!=="touch"&&!S||B.current?.click()}},G=$e("div",t,{ref:[V,n,m.ref,B],state:k,props:[j,K,d,H]}),ee=h.useMemo(()=>({selected:P,indexRef:$,textRef:f,selectedByFocus:N,hasRegistered:I}),[P,$,f,N,I]);return C.jsx(FC.Provider,{value:ee,children:G})}));process.env.NODE_ENV!=="production"&&(jC.displayName="SelectItem");const qC=h.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:o}=LC();return r||o?C.jsx(dL,{...t,ref:n}):null});process.env.NODE_ENV!=="production"&&(qC.displayName="SelectItemIndicator");const dL=h.memo(h.forwardRef((e,t)=>{const{render:n,className:r,style:o,keepMounted:i,...s}=e,{selected:a}=LC(),l=h.useRef(null),{transitionStatus:c,setMounted:d}=$o(a),m=$e("span",e,{ref:[t,l],state:{selected:a,transitionStatus:c},props:[{"aria-hidden":!0,children:"✔️"},s],stateAttributesMapping:Hn});return sr({open:a,ref:l,onComplete(){a||d(!1)}}),m}));process.env.NODE_ENV!=="production"&&(dL.displayName="Inner");const BC=h.memo(h.forwardRef(function(t,n){const{indexRef:r,textRef:o,selectedByFocus:i,hasRegistered:s}=LC(),{selectedItemTextRef:a}=zr(),{className:l,render:c,style:d,...f}=t,m=h.useCallback(v=>{if(!v||!s)return;const b=a.current===null||!a.current.isConnected;(i||b&&r.current===0)&&(a.current=v)},[a,r,i,s]);return $e("div",t,{ref:[m,n,o],props:f})}));process.env.NODE_ENV!=="production"&&(BC.displayName="SelectItemText");const vle={...br,...Hn},fL=h.forwardRef(function(t,n){const{className:r,render:o,style:i,...s}=t,{store:a}=zr(),{side:l,align:c,arrowRef:d,arrowStyles:f,arrowUncentered:m,alignItemWithTriggerActive:g}=Av(),b={open:pe(a,st.open,!0),side:l,align:c,uncentered:m},x=$e("div",t,{state:b,ref:[d,n],props:[{style:f,"aria-hidden":!0},s],stateAttributesMapping:vle});return g?null:x});process.env.NODE_ENV!=="production"&&(fL.displayName="SelectArrow");const VC=h.forwardRef(function(t,n){const{render:r,className:o,style:i,direction:s,keepMounted:a=!1,...l}=t,c=s==="up",{store:d,popupRef:f,listRef:m,handleScrollArrowVisibility:g,scrollArrowsMountedCountRef:v}=zr(),{side:b,scrollDownArrowRef:x,scrollUpArrowRef:y}=Av(),_=c?st.scrollUpArrowVisible:st.scrollDownArrowVisible,w=pe(d,_),T=pe(d,st.openMethod),R=w&&T!=="touch",S=nn(),P=c?y:x,{transitionStatus:N,setMounted:F}=$o(R);Ne(()=>(v.current+=1,d.state.hasScrollArrows||d.set("hasScrollArrows",!0),()=>{v.current=Math.max(0,v.current-1),v.current===0&&d.state.hasScrollArrows&&d.set("hasScrollArrows",!1)}),[d,v]),sr({open:R,ref:P,onComplete(){R||F(!1)}});const B=$e("div",t,{ref:[n,P],state:{direction:s,visible:R,side:b,transitionStatus:N},props:[{"aria-hidden":!0,children:c?"▲":"▼",style:{position:"absolute"},onMouseMove(k){if(k.movementX===0&&k.movementY===0||S.isStarted())return;d.set("activeIndex",null);function j(){const D=d.state.listElement??f.current;if(!D)return;d.set("activeIndex",null),g();const A=xC(D.scrollHeight,D.clientHeight),L=Wl(D.scrollTop,A),H=L===(c?0:A),V=m.current;if(L!==D.scrollTop&&(D.scrollTop=L),V.length===0&&d.set(c?"scrollUpArrowVisible":"scrollDownArrowVisible",!H),H){S.clear();return}if(V.length>0){const X=P.current?.offsetHeight||0;D.scrollTop=ble(V,c,L,D.clientHeight,X,A)}S.start(40,j)}S.start(40,j)},onMouseLeave(){S.clear()}},l]});return R||a?B:null});process.env.NODE_ENV!=="production"&&(VC.displayName="SelectScrollArrow");function ble(e,t,n,r,o,i){if(t){let d=0;const f=n+o-Co;for(let v=0;v<e.length;v+=1){const b=e[v];if(b&&b.offsetTop>=f){d=v;break}}const m=Math.max(0,d-1),g=e[m];return m<d&&g?Wl(g.offsetTop-o,i):0}let s=e.length-1;const a=n+r-o+Co;for(let d=0;d<e.length;d+=1){const f=e[d];if(f&&f.offsetTop+f.offsetHeight>a){s=Math.max(0,d-1);break}}const l=Math.min(e.length-1,s+1),c=e[l];return l>s&&c?Wl(c.offsetTop+c.offsetHeight-r+o,i):i}const WC=h.forwardRef(function(t,n){return C.jsx(VC,{...t,ref:n,direction:"down"})});process.env.NODE_ENV!=="production"&&(WC.displayName="SelectScrollDownArrow");const HC=h.forwardRef(function(t,n){return C.jsx(VC,{...t,ref:n,direction:"up"})});process.env.NODE_ENV!=="production"&&(HC.displayName="SelectScrollUpArrow");const KC=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(KC.displayName="SelectGroupContext");function yle(){const e=h.useContext(KC);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.":gt(56));return e}const UC=h.forwardRef(function(t,n){const{className:r,render:o,style:i,...s}=t,[a,l]=h.useState(),c=h.useMemo(()=>({labelId:a,setLabelId:l}),[a,l]),d=$e("div",t,{ref:n,props:[{role:"group","aria-labelledby":a},s]});return C.jsx(KC.Provider,{value:c,children:d})});process.env.NODE_ENV!=="production"&&(UC.displayName="SelectGroup");const zC=h.forwardRef(function(t,n){const{className:r,render:o,id:i,style:s,...a}=t,{setLabelId:l}=yle(),c=bn(i);return Ne(()=>{l(c)},[c,l]),$e("div",t,{ref:n,props:[{id:c},a]})});process.env.NODE_ENV!=="production"&&(zC.displayName="SelectGroupLabel");const Va=h.forwardRef(function(t,n){const{className:r,render:o,orientation:i="horizontal",style:s,...a}=t;return $e("div",t,{state:{orientation:i},ref:n,props:[{role:"separator","aria-orientation":i},a]})});process.env.NODE_ENV!=="production"&&(Va.displayName="Separator");const xle=Object.freeze(Object.defineProperty({__proto__:null,Arrow:fL,Backdrop:nL,Group:UC,GroupLabel:zC,Icon:PC,Item:jC,ItemIndicator:qC,ItemText:BC,Label:CC,List:AC,Popup:DC,Portal:TC,Positioner:IC,Root:ZF,ScrollDownArrow:WC,ScrollUpArrow:HC,Separator:Va,Trigger:RC,Value:SC},Symbol.toStringTag,{value:"Module"}));function pL(e){return $e(e.defaultTagName??"div",e,e)}const GC=h.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});process.env.NODE_ENV!=="production"&&(GC.displayName="FieldsetRootContext");function mL(e=!1){const t=h.useContext(GC);if(!t&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldsetRootContext is missing. Fieldset parts must be placed within <Fieldset.Root>.":gt(86));return t}const YC=function(t){const n=bn(),r=t.controlId===void 0?n:t.controlId,[o,i]=h.useState(r),[s,a]=h.useState(t.labelId),[l,c]=h.useState([]),d=fn(()=>new Map),{messageIds:f}=yr(),m=Re((b,x)=>{const y=d.current;if(x===void 0){y.delete(b);return}y.set(b,x),i(_=>{if(y.size===0)return;let w;for(const T of y.values()){if(_!==void 0&&T===_)return _;w===void 0&&(w=T)}return w})}),g=h.useCallback(b=>Kr({"aria-describedby":f.concat(l).join(" ")||void 0},b),[f,l]),v=h.useMemo(()=>({controlId:o,registerControlId:m,labelId:s,setLabelId:a,messageIds:l,setMessageIds:c,getDescriptionProps:g}),[o,m,s,a,l,c,g]);return C.jsx(gC.Provider,{value:v,children:t.children})};process.env.NODE_ENV!=="production"&&(YC.displayName="LabelableProvider");function lp(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const dg=Object.keys(Dv);function Ele(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(const n of dg)n!=="valid"&&(n==="valueMissing"&&(t=e[n]),e[n]&&(t=!1));return t}function wle(e){const{formRef:t,clearErrors:n}=fi(),{setValidityData:r,validate:o,validityData:i,validationDebounceTime:s,invalid:a,markedDirtyRef:l,state:c,name:d,shouldValidateOnChange:f}=e,{controlId:m,getDescriptionProps:g}=yr(),v=nn(),b=h.useRef(null),x=Re(async(w,T=!1)=>{const R=b.current;if(!R)return;if(T){if(c.valid!==!1)return;const $=R.validity;if(!$.valueMissing){const j={value:w,state:{...Dv,valid:!0},error:"",errors:[],initialValue:i.initialValue};if(R.setCustomValidity(""),m){const D=t.current.fields.get(m);D&&t.current.fields.set(m,{...D,...lp(j,!1)})}r(j);return}const k=dg.reduce((j,D)=>(j[D]=$[D],j),{});if(!k.valid&&!Ele(k))return}function S($){const k=dg.reduce((D,A)=>(D[A]=$.validity[A],D),{});let j=!1;for(const D of dg)if(D!=="valid"){if(D==="valueMissing"&&k[D])j=!0;else if(k[D])return k}return j&&!l.current&&(k.valid=!0,k.valueMissing=!1),k}v.clear();let P=null,N=[];const F=S(R);let W;const I=f();if(R.validationMessage&&!I)W=R.validationMessage,N=[R.validationMessage];else{const $=Array.from(t.current.fields.values()).reduce((j,D)=>(D.name&&(j[D.name]=D.getValue()),j),{}),k=o(w,$);typeof k=="object"&&k!==null&&"then"in k?P=await k:P=k,P!==null?(F.valid=!1,F.customError=!0,Array.isArray(P)?(N=P,R.setCustomValidity(P.join(`
|
|
113
|
-
`))):P&&(N=[P],R.setCustomValidity(P))):I&&(R.setCustomValidity(""),F.customError=!1,R.validationMessage?(W=R.validationMessage,N=[R.validationMessage]):R.validity.valid&&!F.valid&&(F.valid=!0))}const B={value:w,state:F,error:W??(Array.isArray(P)?P[0]:P??""),errors:N,initialValue:i.initialValue};if(m){const $=t.current.fields.get(m);$&&t.current.fields.set(m,{...$,...lp(B,a)})}r(B)}),y=h.useCallback((w={})=>Kr(g,c.valid===!1?{"aria-invalid":!0}:rn,w),[g,c.valid]),_=h.useCallback((w={})=>Kr({onChange(T){if(T.nativeEvent.defaultPrevented)return;if(n(d),!f()){x(T.currentTarget.value,!0);return}const R=T.currentTarget;if(R.value===""){x(R.value);return}v.clear(),s?v.start(s,()=>{x(R.value)}):x(R.value)}},y(w)),[y,n,d,v,x,s,f]);return h.useMemo(()=>({getValidationProps:y,getInputValidationProps:_,inputRef:b,commit:x}),[y,_,x])}function Cle(e){const{commit:t,invalid:n,markedDirtyRef:r,name:o,setValidityData:i,validityData:s}=e,{formRef:a}=fi(),l=h.useRef(null),c=h.useRef(null),d=h.useRef(null),f=Re(()=>{const x=c.current;if(x)return x.getValue?x.getValue():x.value}),m=Re((x=!0)=>{const y=c.current;if(!y)return;let _=y.value;_===void 0&&(_=f()),r.current=!0,x?Rn.flushSync(()=>t(_)):t(_)});function g(){const x=c.current;!x||!x.id||a.current.fields.set(x.id,{getValue:f,name:o,controlRef:x.controlRef??d,validityData:lp(s,n),validate:m})}function v(x=c.current?.id){x&&a.current.fields.delete(x)}function b(){const x=c.current;if(!x)return;let y=x.value;y===void 0&&(y=f()),s.initialValue===null&&y!==null&&i(_=>({..._,initialValue:y}))}return Ne(()=>{const x=c.current;!x||!x.id||a.current.fields.set(x.id,{getValue:f,name:o,controlRef:x.controlRef??d,validityData:lp(s,n),validate:m})},[a,f,n,o,m,s]),Ne(()=>{const x=a.current.fields;return()=>{const y=c.current?.id;y&&x.delete(y)}},[a]),Re((x,y)=>{if(!y){l.current===x&&(l.current=null,v(),c.current=null);return}const _=c.current?.id;l.current=x,c.current=y,_&&_!==y.id&&v(_),b(),g()})}const hL=h.forwardRef(function(t,n){const{errors:r,validationMode:o,submitAttemptedRef:i}=fi(),{render:s,className:a,validate:l,validationDebounceTime:c=0,validationMode:d=o,name:f,disabled:m=!1,invalid:g,dirty:v,touched:b,actionsRef:x,style:y,..._}=t,{disabled:w}=mL(),T=Re(l||(()=>null)),R=w||m,[S,P]=h.useState(!1),[N,F]=h.useState(!1),[W,I]=h.useState(!1),[B,$]=h.useState(!1),k=v??N,j=b??S,D=h.useRef(!1),A=Re(se=>{v===void 0&&(se&&(D.current=!0),F(se))}),L=Re(se=>{b===void 0&&P(se)}),H=Re(()=>d==="onChange"||d==="onSubmit"&&i.current),V=!!f&&Object.hasOwn(r,f)&&r[f]!==void 0,X=g===!0||V,[K,G]=h.useState({state:Dv,error:"",errors:[],value:null,initialValue:null}),ee=!X&&K.state.valid,Z=h.useMemo(()=>({disabled:R,touched:j,dirty:k,valid:ee,filled:W,focused:B}),[R,j,k,ee,W,B]),te=wle({setValidityData:G,validate:T,validityData:K,validationDebounceTime:c,invalid:X,markedDirtyRef:D,state:Z,name:f,shouldValidateOnChange:H}),J=h.useCallback(()=>{D.current=!0,te.commit(K.value)},[te,K]),ne=Cle({commit:te.commit,invalid:X,markedDirtyRef:D,name:f,setValidityData:G,validityData:K});h.useImperativeHandle(x,()=>({validate:J}),[J]);const U=h.useMemo(()=>({invalid:X,name:f,validityData:K,setValidityData:G,disabled:R,touched:j,setTouched:L,dirty:k,setDirty:A,filled:W,setFilled:I,focused:B,setFocused:$,validate:T,validationMode:d,validationDebounceTime:c,shouldValidateOnChange:H,state:Z,markedDirtyRef:D,registerFieldControl:ne,validation:te}),[X,f,K,R,j,L,k,A,W,I,B,$,T,d,c,H,Z,ne,te]),ie=$e("div",t,{ref:n,state:Z,props:_,stateAttributesMapping:ar});return C.jsx(hC.Provider,{value:U,children:ie})});process.env.NODE_ENV!=="production"&&(hL.displayName="FieldRootInner");const kv=h.forwardRef(function(t,n){return C.jsx(YC,{children:C.jsx(hL,{...t,ref:n})})});process.env.NODE_ENV!=="production"&&(kv.displayName="FieldRoot");const XC=h.forwardRef(function(t,n){const{render:r,className:o,style:i,id:s,nativeLabel:a=!0,...l}=t,c=Sn(!1),{labelId:d}=yr(),f=h.useRef(null),m=EC({id:d??s,native:a});return process.env.NODE_ENV!=="production"&&h.useEffect(()=>{if(!f.current)return;const v=f.current.tagName==="LABEL";if(a){if(!v){const b=Bl.captureOwnerStack?.()||"";Ca(`<Field.Label> expected a <label> element because the \`nativeLabel\` prop is true. Rendering a non-<label> disables native label association, so \`htmlFor\` will not work. Use a real <label> in the \`render\` prop, or set \`nativeLabel\` to \`false\`.${b}`)}}else if(v){const b=Bl.captureOwnerStack?.()||"";Ca(`<Field.Label> expected a non-<label> element because the \`nativeLabel\` prop is false. Rendering a <label> assumes native label behavior while Base UI treats it as non-native, which can cause unexpected pointer behavior. Use a non-<label> in the \`render\` prop, or set \`nativeLabel\` to \`true\`.${b}`)}},[a]),$e("label",t,{ref:[n,f],state:c.state,props:[m,l],stateAttributesMapping:ar})});process.env.NODE_ENV!=="production"&&(XC.displayName="FieldLabel");const Rle={...ar,...Hn},ZC=h.forwardRef(function(t,n){const{render:r,id:o,className:i,match:s,style:a,...l}=t,c=bn(o),{validityData:d,state:f,name:m}=Sn(!1),{setMessageIds:g}=yr(),{errors:v}=fi(),b=m?v[m]:null,x=typeof s=="string";let y=!1;s===!0?y=!0:x?y=!!d.state[s]:y=!!b||d.state.valid===!1;const{mounted:_,transitionStatus:w,setMounted:T}=$o(y);Ne(()=>{if(!(!y||!c))return g(j=>j.concat(c)),()=>{g(j=>j.filter(D=>D!==c))}},[y,c,g]);const R=h.useRef(null),[S,P]=h.useState(null),[N,F]=h.useState(null),W=d.errors.length>1?C.jsx("ul",{children:d.errors.map(j=>C.jsx("li",{children:j},j))}):d.error,I=x?W:b||W;let B=d.error;b!=null?B=Array.isArray(b)?JSON.stringify(b):b:d.errors.length>1&&(B=JSON.stringify(d.errors)),y&&B!==N&&(F(B),P(I)),sr({open:y,ref:R,onComplete(){y||T(!1)}});const $={...f,transitionStatus:w},k=$e("div",t,{ref:[n,R],state:$,props:[{id:c,children:y?I:S},l],stateAttributesMapping:Rle,enabled:_});return _?k:null});process.env.NODE_ENV!=="production"&&(ZC.displayName="FieldError");const JC=h.forwardRef(function(t,n){const{render:r,id:o,className:i,style:s,...a}=t,l=bn(o),c=Sn(!1),{setMessageIds:d}=yr();return Ne(()=>{if(l)return d(m=>m.concat(l)),()=>{d(m=>m.filter(g=>g!==l))}},[l,d]),$e("p",t,{ref:n,state:c.state,props:[{id:l},a],stateAttributesMapping:ar})});process.env.NODE_ENV!=="production"&&(JC.displayName="FieldDescription");const Gp=h.forwardRef(function(t,n){const{render:r,className:o,id:i,name:s,value:a,disabled:l=!1,onValueChange:c,defaultValue:d,autoFocus:f=!1,style:m,...g}=t,{state:v,name:b,disabled:x,setTouched:y,setDirty:_,validityData:w,setFocused:T,setFilled:R,validationMode:S,validation:P}=Sn(),N=x||l,F=b??s,W={...v,disabled:N},{labelId:I}=yr(),B=Ba({id:i});Ne(()=>{const H=a!=null;P.inputRef.current?.value||H&&a!==""?R(!0):H&&a===""&&R(!1)},[P.inputRef,R,a]);const $=h.useRef(null);Ne(()=>{f&&$.current===Bn(mt($.current))&&T(!0)},[f,T]);const[k]=oi({controlled:a,default:d,name:"FieldControl",state:"value"}),j=a!==void 0,D=j?k:void 0,A=Re(()=>P.inputRef.current?.value);return qa(P.inputRef,{id:B,value:D,getValue:A}),$e("input",t,{ref:[n,$],state:W,props:[{id:B,disabled:N,name:F,ref:P.inputRef,"aria-labelledby":I,autoFocus:f,...j?{value:D}:{defaultValue:d},onChange(H){const V=H.currentTarget.value;c?.(V,je(vn,H.nativeEvent)),_(V!==w.initialValue),R(V!=="")},onFocus(){T(!0)},onBlur(H){y(!0),T(!1),S==="onBlur"&&P.commit(H.currentTarget.value)},onKeyDown(H){H.currentTarget.tagName==="INPUT"&&H.key==="Enter"&&(y(!0),P.commit(H.currentTarget.value))}},P.getInputValidationProps(),g],stateAttributesMapping:ar})});process.env.NODE_ENV!=="production"&&(Gp.displayName="FieldControl");const $v=function(t){const{children:n}=t,{validityData:r,invalid:o}=Sn(!1),i=h.useMemo(()=>lp(r,o),[r,o]),s=i.state.valid===!1,{transitionStatus:a}=$o(s),l=h.useMemo(()=>({...i,validity:i.state,transitionStatus:a}),[i,a]);return C.jsx(h.Fragment,{children:n(l)})};process.env.NODE_ENV!=="production"&&($v.displayName="FieldValidity");const QC=h.createContext({disabled:!1});process.env.NODE_ENV!=="production"&&(QC.displayName="FieldItemContext");function Sle(){return h.useContext(QC)}const e0=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(e0.displayName="CheckboxGroupContext");function gL(e=!0){const t=h.useContext(e0);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CheckboxGroupContext is missing. CheckboxGroup parts must be placed within <CheckboxGroup>.":gt(3));return t}const t0=h.forwardRef(function(t,n){const{render:r,className:o,style:i,disabled:s=!1,...a}=t,{state:l,disabled:c}=Sn(!1),d=c||s,f=gL(),m=f?.parent.id,v=f?.allValues!==void 0?m:void 0,b=h.useMemo(()=>({disabled:d}),[d]),x=$e("div",t,{ref:n,state:l,props:a,stateAttributesMapping:ar});return C.jsx(YC,{controlId:v,children:C.jsx(QC.Provider,{value:b,children:x})})});process.env.NODE_ENV!=="production"&&(t0.displayName="FieldItem");const Ple=Object.freeze(Object.defineProperty({__proto__:null,Control:Gp,Description:JC,Error:ZC,Item:t0,Label:XC,Root:kv,Validity:$v},Symbol.toStringTag,{value:"Module"})),Fv=h.forwardRef(function(t,n){return C.jsx(Gp,{ref:n,...t})});process.env.NODE_ENV!=="production"&&(Fv.displayName="Input");const iu="h-10 w-full px-3 py-2 rounded-md border border-input bg-background text-sm outline-none transition-shadow placeholder:text-muted-foreground";function vL({className:e,nativeInput:t=!1,onChange:n,...r}){const o=ue(iu,"focus-visible:border-ring","aria-invalid:border-error focus-visible:aria-invalid:ring-error/20","has-aria-invalid:border-error has-focus-visible:has-aria-invalid:ring-error/20","disabled:cursor-not-allowed disabled:opacity-50",r.type==="number"&&["[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:appearance-none","[-moz-appearance:textfield]"],r.type==="search"&&["[&::-webkit-search-cancel-button]:appearance-none","[&::-webkit-search-decoration]:appearance-none","[&::-webkit-search-results-button]:appearance-none","[&::-webkit-search-results-decoration]:appearance-none"],r.type==="file"&&["text-muted-foreground","file:me-3 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm"],e),i=n?s=>n(s.target.value,s):void 0;return t?C.jsx("input",{autoComplete:"off",className:o,"data-slot":"input",onChange:i,...r}):C.jsx(Fv,{autoComplete:"off",className:o,"data-slot":"input",onChange:i,...r})}const n0=ue(iu,"relative inline-flex items-center justify-between gap-2 select-none text-left text-foreground","focus-visible:border-ring","aria-invalid:border-error focus-visible:aria-invalid:ring-error/20","has-aria-invalid:border-error has-focus-visible:has-aria-invalid:ring-error/20","data-disabled:cursor-not-allowed data-disabled:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0"),r0="-me-1 size-4.5 opacity-80 sm:size-4";function bL({onChange:e,...t}){return C.jsx(ZF,{onValueChange:e,...t})}function yL({className:e,children:t,...n}){return C.jsxs(RC,{className:ue(n0,e),"data-slot":"select-trigger",...n,children:[t,C.jsx(PC,{"data-slot":"select-icon",className:"text-muted-foreground hover:text-foreground transition-colors",children:C.jsx(Ra,{className:r0})})]})}function Tle({className:e,render:t,children:n,...r}){const o=t?void 0:"button",i={children:C.jsxs(C.Fragment,{children:[C.jsx("span",{className:"flex-1 truncate in-data-placeholder:text-muted-foreground/72",children:n}),C.jsx(Ra,{className:r0})]}),className:ue(n0,"min-w-0",e),"data-slot":"select-button",type:o};return pL({defaultTagName:"button",props:Kr(i,r),render:t})}function xL({className:e,...t}){return C.jsx(SC,{className:ue("flex-1 truncate data-placeholder:text-muted-foreground",e),"data-slot":"select-value",...t})}function o0({className:e,children:t,side:n="bottom",sideOffset:r=4,align:o="start",alignOffset:i=0,alignItemWithTrigger:s=!0,anchor:a,portalProps:l,...c}){return C.jsx(TC,{...l,children:C.jsx(IC,{align:o,alignItemWithTrigger:s,alignOffset:i,anchor:a,className:"z-50 select-none","data-slot":"select-positioner",side:n,sideOffset:r,children:C.jsxs(DC,{className:"origin-(--transform-origin) text-foreground outline-none","data-slot":"select-popup",...c,children:[C.jsx(HC,{className:"top-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:top-px before:h-[200%] before:rounded-t-[calc(var(--radius-lg)-1px)] before:bg-linear-to-b before:from-50% before:from-popover","data-slot":"select-scroll-up-arrow",children:C.jsx(wk,{className:"relative size-4.5 sm:size-4"})}),C.jsx("div",{className:"relative h-full min-w-(--anchor-width) rounded-lg border bg-popover not-dark:bg-clip-padding shadow-lg/5 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]",children:C.jsx(AC,{className:ue("max-h-(--available-height) overflow-y-auto p-1",e),"data-slot":"select-list",children:t})}),C.jsx(WC,{className:"bottom-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:bottom-px before:h-[200%] before:rounded-b-[calc(var(--radius-lg)-1px)] before:bg-linear-to-t before:from-50% before:from-popover","data-slot":"select-scroll-down-arrow",children:C.jsx(Ek,{className:"relative size-4.5 sm:size-4"})})]})})})}function EL({className:e,children:t,...n}){return C.jsxs(jC,{className:ue("grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[1fr_1rem] items-center gap-2 rounded-sm py-1 px-2 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),"data-slot":"select-item",...n,children:[C.jsx(BC,{className:"col-start-1 min-w-0",children:t}),C.jsx(qC,{className:"col-start-2",children:C.jsx("svg",{"aria-hidden":"true",fill:"none",height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{d:"M5.252 12.7 10.2 18.63 18.748 5.37"})})})]})}function _le({className:e,...t}){return C.jsx(Va,{className:ue("mx-2 my-1 h-px bg-border",e),"data-slot":"select-separator",...t})}function Nle(e){return C.jsx(UC,{"data-slot":"select-group",...e})}function Ole(e){return C.jsx(zC,{className:"px-2 py-1.5 font-medium text-muted-foreground text-xs","data-slot":"select-group-label",...e})}function Mle({className:e,...t}){return C.jsx(CC,{className:ue("not-in-data-[slot=field]:mb-2 inline-flex cursor-default items-center gap-2 font-medium text-base/4.5 text-foreground sm:text-sm/4",e),"data-slot":"select-label",...t})}function Ile(e){return e==null?"":typeof e=="string"||typeof e=="number"?String(e):typeof e=="object"&&"label"in e?String(e.label):String(e)}function Dle(e){return e==null?"":typeof e=="string"||typeof e=="number"?String(e):typeof e=="object"&&"value"in e?String(e.value):String(e)}function wL(e){const{items:t,getLabel:n,getValue:r,renderItem:o,placeholder:i,onChange:s,value:a,defaultValue:l,multiple:c,triggerProps:d,popupProps:f,itemProps:m,itemClassName:g,className:v,popupClassName:b,...x}=e,y=n??Ile,_=r??Dle,w=c?a?.map(_):a!=null?_(a):void 0,T=c?l?.map(_):l!=null?_(l):void 0,R=P=>{if(c){const F=(P??[]).map(W=>t.find(I=>_(I)===W)??null).filter(Boolean);s?.(F)}else{if(P==null){s?.(null);return}const N=t.find(F=>_(F)===P)??null;s?.(N)}},S=P=>{const N=t.find(F=>_(F)===P);return N?y(N):P};return C.jsxs(bL,{itemToStringLabel:S,multiple:c,value:w,defaultValue:T,onChange:R,...x,children:[C.jsx(yL,{className:v,...d,children:C.jsx(xL,{placeholder:i})}),C.jsx(o0,{className:b,...f,children:t.map(P=>C.jsx(EL,{value:_(P),className:g,...m,children:o?o(P):y(P)},_(P)))})]})}const CL=new Date().getFullYear(),Ale=new Date(CL-100,0),kle=new Date(CL+10,11);function $le({options:e=[],value:t,onChange:n}){const r=e.map(i=>({label:i.label??"",value:i.value??0})),o=r.find(i=>i.value===Number(t))??null;return C.jsx(wL,{items:r,value:o,className:"py-1",getLabel:i=>i.label,getValue:i=>String(i.value),onChange:i=>{!n||i===null||n({target:{value:String(i.value)}})}})}const fx="relative flex size-(--cell-size) text-base sm:text-sm items-center justify-center rounded-lg text-foreground not-in-data-selected:hover:bg-accent disabled:pointer-events-none disabled:opacity-64 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0";function Yp({className:e,classNames:t,showOutsideDays:n=!0,components:r,mode:o="single",captionLayout:i="dropdown",startMonth:s=Ale,endMonth:a=kle,...l}){const c={button_next:fx,button_previous:fx,caption_label:"text-base sm:text-sm font-medium flex items-center gap-2 h-full",day:"size-(--cell-size) text-sm py-px",day_button:ue(fx,"in-data-disabled:pointer-events-none in-[.range-middle]:rounded-none in-[.range-end:not(.range-start)]:rounded-s-none in-[.range-start:not(.range-end)]:rounded-e-none in-[.range-middle]:in-data-selected:bg-accent in-data-selected:bg-primary in-[.range-middle]:in-data-selected:text-foreground in-data-disabled:text-muted-foreground/72 in-data-outside:text-muted-foreground/72 in-data-selected:in-data-outside:text-primary-foreground in-data-selected:text-primary-foreground in-data-disabled:line-through outline-none in-[[data-selected]:not(.range-middle)]:transition-[color,background-color,border-radius,box-shadow] focus-visible:z-1 focus-visible:ring-[3px] focus-visible:ring-ring/50"),dropdown:"absolute bg-popover inset-0 opacity-0",dropdown_root:"relative has-focus:border-ring has-focus:ring-ring/50 has-focus:ring-[3px] border border-input shadow-xs/5 rounded-lg px-[calc(--spacing(3)-1px)] h-9 sm:h-8 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-me-1",dropdowns:"w-full flex items-center text-base sm:text-sm justify-center h-(--cell-size) gap-1.5 *:[span]:font-medium",hidden:"invisible",month:"w-full",month_caption:"relative mx-(--cell-size) px-1 mb-1 flex h-(--cell-size) items-center justify-center z-2",months:"relative flex flex-col sm:flex-row gap-2",nav:"absolute top-0 flex w-full justify-between z-1",outside:"text-muted-foreground data-selected:bg-accent/50 data-selected:text-muted-foreground",range_end:"range-end",range_middle:"range-middle",range_start:"range-start",today:"*:after:pointer-events-none *:after:absolute *:after:bottom-1 *:after:start-1/2 *:after:z-1 *:after:size-[3px] *:after:-translate-x-1/2 *:after:rounded-full *:after:bg-primary [&[data-selected]:not(.range-middle)>*]:after:bg-background [&[data-disabled]>*]:after:bg-foreground/30 *:after:transition-colors",week_number:"size-(--cell-size) p-0 text-xs font-medium text-muted-foreground/72",weekday:"size-(--cell-size) p-0 text-xs font-medium text-muted-foreground/72"},d=Object.keys(c).reduce((v,b)=>{const x=t?.[b],y=c[b];return v[b]=x?ue(y,x):y,v},{...c}),m={...{Dropdown:$le,Chevron:({className:v,orientation:b,...x})=>b==="left"?C.jsx(Ow,{className:ue(v,"rtl:rotate-180"),...x,"aria-hidden":"true"}):b==="right"?C.jsx(Lp,{className:ue(v,"rtl:rotate-180"),...x,"aria-hidden":"true"}):C.jsx(Ra,{className:v,...x,"aria-hidden":"true"})},...r},g={className:ue("w-fit [--cell-size:--spacing(10)] sm:[--cell-size:--spacing(9)]",e),classNames:d,components:m,"data-slot":"calendar",formatters:{formatMonthDropdown:v=>v.toLocaleString("es",{month:"short"})},locale:Fie,weekStartsOn:1,captionLayout:i,startMonth:s,endMonth:a,mode:o,showOutsideDays:n,...l};return C.jsx(Jae,{...g})}const Fle=({className:e,...t})=>C.jsx("div",{className:ue("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t,"data-slot":"card"}),Lle=({className:e,...t})=>C.jsx("div",{className:ue("flex flex-col space-y-1 p-6",e),...t,"data-slot":"card-header"}),jle=({className:e,...t})=>C.jsx("h3",{className:ue("text-2xl font-semibold leading-none tracking-tight",e),...t,"data-slot":"card-title"}),qle=({className:e,...t})=>C.jsx("p",{className:ue("text-sm text-muted-foreground",e),...t,"data-slot":"card-description"}),Ble=({className:e,...t})=>C.jsx("div",{className:ue("p-6 pt-0",e),...t,"data-slot":"card-content"}),Vle=({className:e,...t})=>C.jsx("div",{className:ue("flex items-center p-6 pt-0",e),...t,"data-slot":"card-footer"}),Wle=({as:e="div",inline:t=!1,className:n,...r})=>C.jsx(e,{className:ue(t?"inline-flex":"flex","items-center justify-center",n),...r,"data-slot":"center"});let nI=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});function RL(e){return h.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[nI.checked]:""}:{[nI.unchecked]:""}},...ar}),[e.indeterminate])}function SL(e,t,n,r=!0,o){const[i,s]=h.useState(),a=bn(o?`${o}-label`:void 0),l=e??t??i;return Ne(()=>{const c=e||t||!r?void 0:Hle(n.current,a);i!==c&&s(c)}),l}function Hle(e,t){const n=Kle(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function Kle(e){if(!e)return;const t=e.parentElement;if(t&&t.tagName==="LABEL")return t;const n=e.id;if(n){const o=e.nextElementSibling;if(o&&o.htmlFor===n)return o}const r=e.labels;return r&&r[0]}const i0=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(i0.displayName="CheckboxRootContext");function Ule(){const e=h.useContext(i0);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CheckboxRootContext is missing. Checkbox parts must be placed within <Checkbox.Root>.":gt(14));return e}const PL="data-parent",s0=h.forwardRef(function(t,n){const{checked:r,className:o,defaultChecked:i=!1,"aria-labelledby":s,disabled:a=!1,form:l,id:c,indeterminate:d=!1,inputRef:f,name:m,onCheckedChange:g,parent:v=!1,readOnly:b=!1,render:x,required:y=!1,uncheckedValue:_,value:w,nativeButton:T=!1,style:R,...S}=t,{clearErrors:P}=fi(),{disabled:N,name:F,setDirty:W,setFilled:I,setFocused:B,setTouched:$,state:k,validationMode:j,validityData:D,shouldValidateOnChange:A,validation:L}=Sn(),H=Sle(),{labelId:V,controlId:X,registerControlId:K,getDescriptionProps:G}=yr(),ee=gL(),Z=ee?.parent,te=Z&&ee.allValues,J=N||H.disabled||ee?.disabled||a,ne=F??m,U=w??ne,ie=bn(),se=bn();let Q=X;te?Q=v?se:`${Z.id}-${U}`:c&&(Q=c);let me={};te&&(v?me=ee.parent.getParentProps():U&&(me=ee.parent.getChildProps(U)));const ve=Re(g),{checked:xe=r,indeterminate:be=d,onCheckedChange:Ce,...qe}=me,Te=ee?.value,ke=ee?.setValue,ce=ee?.defaultValue,he=h.useRef(null),re=fn(()=>Symbol("checkbox-control")),le=h.useRef(!1),{getButtonProps:Oe,buttonRef:De}=Yn({disabled:J,native:T}),Fe=ee?.validation??L,[We,ze]=oi({controlled:U&&Te&&!v?Te.includes(U):xe,default:U&&ce&&!v?ce.includes(U):i,name:"Checkbox",state:"checked"});Ne(()=>{K!==Dt&&(le.current=!0,K(re.current,Q))},[Q,ee,K,v,re]),h.useEffect(()=>{const Me=re.current;return()=>{!le.current||K===Dt||(le.current=!1,K(Me,void 0))}},[K,re]),qa(he,{enabled:!ee,id:ie,value:We});const He=h.useRef(null),Ze=Io(f,He,Fe.inputRef),nt=SL(s,V,He,!T,Q??void 0);Ne(()=>{He.current&&(He.current.indeterminate=be,We&&I(!0))},[We,be,I]),No(We,()=>{ee&&!v||(P(ne),I(We),W(We!==D.initialValue),A()?Fe.commit(We):Fe.commit(We,!0))});const ht=Kr({checked:We,disabled:J,form:l,name:v?void 0:ne,id:T?void 0:Q??void 0,required:y,ref:Ze,style:ne?Yl:qs,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(Me){if(Me.nativeEvent.defaultPrevented)return;if(b){Me.preventDefault();return}const Be=Me.currentTarget.checked,Ie=je(vn,Me.nativeEvent);if(Ce?.(Be,Ie),ve(Be,Ie),!Ie.isCanceled&&(ze(Be),U&&Te&&ke&&!v&&!te)){const tt=Be?[...Te,U]:Te.filter(at=>at!==U);ke(tt,Ie)}},onFocus(){he.current?.focus()}},w!==void 0?{value:(ee?We&&w:w)||""}:rn,G,ee?Fe.getValidationProps:Fe.getInputValidationProps),Je=te?!!xe:We,Ge=te&&be||d;h.useEffect(()=>{if(!Z||!U)return;const Me=Z.disabledStatesRef.current;return Me.set(U,J),()=>{Me.delete(U)}},[Z,J,U]);const dt=h.useMemo(()=>({...k,checked:Je,disabled:J,readOnly:b,required:y,indeterminate:Ge}),[k,Je,J,b,y,Ge]),rt=RL(dt),Ve=$e("span",t,{state:dt,ref:[De,he,n,ee?.registerControlRef],props:[{id:T?Q??void 0:ie,role:"checkbox","aria-checked":be?"mixed":We,"aria-readonly":b||void 0,"aria-required":y||void 0,"aria-labelledby":nt,[PL]:v?"":void 0,onFocus(){B(!0)},onBlur(){const Me=He.current;Me&&($(!0),B(!1),j==="onBlur"&&Fe.commit(ee?Te:Me.checked))},onClick(Me){b||J||(Me.preventDefault(),He.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:Me.shiftKey,ctrlKey:Me.ctrlKey,altKey:Me.altKey,metaKey:Me.metaKey})))}},G,Fe.getValidationProps,S,qe,Oe],stateAttributesMapping:rt});return C.jsxs(i0.Provider,{value:dt,children:[Ve,!We&&!ee&&ne&&!v&&_!==void 0&&C.jsx("input",{type:"hidden",form:l,name:ne,value:_}),C.jsx("input",{...ht,suppressHydrationWarning:!0})]})});process.env.NODE_ENV!=="production"&&(s0.displayName="CheckboxRoot");const a0=h.forwardRef(function(t,n){const{render:r,className:o,style:i,keepMounted:s=!1,...a}=t,l=Ule(),c=l.checked||l.indeterminate,{mounted:d,transitionStatus:f,setMounted:m}=$o(c),g=h.useRef(null),v={...l,transitionStatus:f};sr({open:c,ref:g,onComplete(){c||m(!1)}});const b=RL(l),x=h.useMemo(()=>({...b,...Hn,...ar}),[b]),y=s||d,_=$e("span",t,{ref:[n,g],state:v,stateAttributesMapping:x,props:a});return y?_:null});process.env.NODE_ENV!=="production"&&(a0.displayName="CheckboxIndicator");const zle=Object.freeze(Object.defineProperty({__proto__:null,Indicator:a0,Root:s0},Symbol.toStringTag,{value:"Module"})),rI=[];function Gle(e){const{allValues:t=rI,value:n=rI,onValueChange:r}=e,o=h.useRef(n),i=h.useRef(new Map),[s,a]=h.useState("mixed"),l=bn(),c=n.length===t.length,d=n.length!==t.length&&n.length>0,f=Re(r),m=h.useCallback(()=>({id:l,indeterminate:d,checked:c,"aria-controls":t.map(v=>`${l}-${v}`).join(" "),onCheckedChange(v,b){const x=o.current,y=t.filter(T=>i.current.get(T)&&x.includes(T)),_=t.filter(T=>!i.current.get(T)||i.current.get(T)&&x.includes(T));if(x.length===_.length||x.length===0){n.length===_.length?f(y,b):f(_,b);return}s==="mixed"?(f(_,b),a("on")):s==="on"?(f(y,b),a("off")):s==="off"&&(f(x,b),a("mixed"))}}),[t,c,l,d,f,s,n.length]),g=h.useCallback(v=>({checked:n.includes(v),onCheckedChange(b,x){const y=n.slice();b?y.push(v):y.splice(y.indexOf(v),1),o.current=y,f(y,x),a("mixed")}}),[f,n]);return h.useMemo(()=>({id:l,indeterminate:d,getParentProps:m,getChildProps:g,disabledStatesRef:i}),[l,d,m,g])}function Yle(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const l0=h.forwardRef(function(t,n){const{allValues:r,className:o,defaultValue:i,disabled:s=!1,id:a,onValueChange:l,render:c,value:d,style:f,...m}=t,{disabled:g,name:v,state:b,validation:x,setFilled:y,setDirty:_,shouldValidateOnChange:w,validityData:T}=Sn(),{labelId:R,getDescriptionProps:S}=yr(),{clearErrors:P}=fi(),N=g||s,F=h.useMemo(()=>{if(d===void 0)return i??[]},[d,i]),[W,I]=oi({controlled:d,default:F,name:"CheckboxGroup",state:"value"}),B=Re((X,K)=>{l?.(X,K),!K.isCanceled&&I(X)}),$=Gle({allValues:r,value:W,onValueChange:B}),k=bn(a),j=h.useRef(null),D=h.useCallback(X=>{j.current==null&&X!=null&&!X.hasAttribute(PL)&&(j.current=X)},[]);qa(j,{enabled:!!v,id:k,value:W});const A=W??ws;No(A,()=>{v&&P(v);const X=Array.isArray(T.initialValue)?T.initialValue:ws;y(A.length>0),_(!Yle(A,X)),w()?x.commit(A):x.commit(A,!0)});const L={...b,disabled:N},H=h.useMemo(()=>({allValues:r,value:W,defaultValue:F,setValue:B,parent:$,disabled:N,validation:x,registerControlRef:D}),[r,W,F,B,$,N,x,D]),V=$e("div",t,{state:L,ref:n,props:[{role:"group","aria-labelledby":R},S,m],stateAttributesMapping:ar});return C.jsx(e0.Provider,{value:H,children:V})});process.env.NODE_ENV!=="production"&&(l0.displayName="CheckboxGroup");const TL=h.forwardRef(function(t,n){const{render:r,className:o,style:i,disabled:s=!1,...a}=t,[l,c]=h.useState(void 0),f=$e("fieldset",t,{ref:n,state:{disabled:s},props:[{"aria-labelledby":l},a]}),m=h.useMemo(()=>({legendId:l,setLegendId:c,disabled:s}),[l,c,s]);return C.jsx(GC.Provider,{value:m,children:f})});process.env.NODE_ENV!=="production"&&(TL.displayName="FieldsetRoot");const _L=h.forwardRef(function(t,n){const{render:r,className:o,style:i,id:s,...a}=t,{disabled:l,setLegendId:c}=mL(),d=bn(s);return Ne(()=>(c(d),()=>{c(void 0)}),[c,d]),$e("div",t,{state:{disabled:l??!1},ref:n,props:[{id:d},a]})});process.env.NODE_ENV!=="production"&&(_L.displayName="FieldsetLegend");const u0=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(u0.displayName="TooltipRootContext");function su(e){const t=h.useContext(u0);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.":gt(72));return t}const Xle={...Ew,disabled:ye(e=>e.disabled),instantType:ye(e=>e.instantType),isInstantPhase:ye(e=>e.isInstantPhase),trackCursorAxis:ye(e=>e.trackCursorAxis),disableHoverablePopup:ye(e=>e.disableHoverablePopup),lastOpenChangeReason:ye(e=>e.openChangeReason),closeOnClick:ye(e=>e.closeOnClick),closeDelay:ye(e=>e.closeDelay),hasViewport:ye(e=>e.hasViewport)};class Lv extends Tp{constructor(t){super({...Zle(),...t},{popupRef:h.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new _p},Xle)}setOpen=(t,n)=>{const r=n.reason,o=r===Gn,i=t&&r===ng,s=!t&&(r===Os||r===Ep);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,n);const a=()=>{const l={open:t,openChangeReason:r};i?l.instantType="focus":s?l.instantType="dismiss":r===Gn&&(l.instantType=void 0);const c=n.trigger?.id??null;(c||t)&&(l.activeTriggerId=c,l.activeTriggerElement=n.trigger??null),this.update(l)};o?Rn.flushSync(a):a()};static useStore(t,n){const r=fn(()=>new Lv(n)).current,o=t??r,i=ww({popupStore:o,onOpenChange:o.setOpen});return o.state.floatingRootContext=i,o}}function Zle(){return{...xw(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}const c0=OA(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:o,disableHoverablePopup:i=!1,trackCursorAxis:s="none",actionsRef:a,onOpenChange:l,onOpenChangeComplete:c,handle:d,triggerId:f,defaultTriggerId:m=null,children:g}=t,v=Lv.useStore(d?.store,{open:r,openProp:o,activeTriggerId:m,triggerIdProp:f});xp(()=>{o===void 0&&v.state.open===!1&&r===!0&&v.update({open:!0,activeTriggerId:m})}),v.useControlledProp("openProp",o),v.useControlledProp("triggerIdProp",f),v.useContextCallback("onOpenChange",l),v.useContextCallback("onOpenChangeComplete",c);const b=v.useState("open"),x=!n&&b,y=v.useState("activeTriggerId"),_=v.useState("payload");v.useSyncedValues({trackCursorAxis:s,disableHoverablePopup:i}),Ne(()=>{b&&n&&v.setOpen(!1,je(EH))},[b,n,v]),v.useSyncedValue("disabled",n),bw(v);const{forceUnmount:w,transitionStatus:T}=yw(x,v),R=v.select("floatingRootContext"),S=v.useState("isInstantPhase"),P=v.useState("instantType"),N=v.useState("lastOpenChangeReason"),F=h.useRef(null);Ne(()=>{T==="ending"&&N===vn||T!=="ending"&&S?(P!=="delay"&&(F.current=P),v.set("instantType","delay")):F.current!==null&&(v.set("instantType",F.current),F.current=null)},[T,S,N,P,v]),Ne(()=>{x&&y==null&&v.set("payload",void 0)},[v,y,x]);const W=h.useCallback(()=>{v.setOpen(!1,Jle(v,ei))},[v]);h.useImperativeHandle(a,()=>({unmount:w,close:W}),[w,W]);const I=Pp(R,{enabled:!n,referencePress:()=>v.select("closeOnClick")}),B=TK(R,{enabled:!n&&s!=="none",axis:s==="none"?void 0:s}),{getReferenceProps:$,getFloatingProps:k,getTriggerProps:j}=ka([I,B]),D=h.useMemo(()=>$(),[$]),A=h.useMemo(()=>j(),[j]),L=h.useMemo(()=>k(),[k]);return v.useSyncedValues({activeTriggerProps:D,inactiveTriggerProps:A,popupProps:L}),C.jsx(u0.Provider,{value:v,children:typeof g=="function"?g({payload:_}):g})});process.env.NODE_ENV!=="production"&&(c0.displayName="TooltipRoot");function Jle(e,t){const n=je(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}const d0=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(d0.displayName="TooltipProviderContext");function Qle(){return h.useContext(d0)}let eue=(function(e){return e[e.popupOpen=Ig.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const tue=600,f0=KU(function(t,n){const{className:r,render:o,handle:i,payload:s,disabled:a,delay:l,closeOnClick:c=!0,closeDelay:d,id:f,style:m,...g}=t,v=su(!0),b=i?.store??v;if(!b)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.":gt(82));const x=bn(f),y=b.useState("isTriggerActive",x),_=b.useState("isOpenedByTrigger",x),w=b.useState("floatingRootContext"),T=h.useRef(null),R=l??tue,S=d??0,{registerTrigger:P,isMountedByThisTrigger:N}=vw(x,T,b,{payload:s,closeOnClick:c,closeDelay:S}),F=Qle(),{delayRef:W,isInstantPhase:I,hasProvider:B}=RH(w,{open:_});b.useSyncedValue("isInstantPhase",I);const $=b.useState("disabled"),k=a??$,j=b.useState("trackCursorAxis"),D=b.useState("disableHoverablePopup"),A=AA(w,{enabled:!k,mouseOnly:!0,move:!1,handleClose:!D&&j!=="both"?LA():null,restMs(){const K=F?.delay,G=typeof W.current=="object"?W.current.open:void 0;let ee=R;return B&&(G!==0?ee=l??K??R:ee=0),ee},delay(){const K=typeof W.current=="object"?W.current.close:void 0;let G=S;return d==null&&B&&(G=K),{close:G}},triggerElementRef:T,isActiveTrigger:y,isClosing:()=>b.select("transitionStatus")==="ending"}),L=iz(w,{enabled:!k}).reference,H={open:_},V=b.useState("triggerProps",N);return $e("button",t,{state:H,ref:[n,P,T],props:[A,L,V,{onPointerDown(){b.set("closeOnClick",c)},id:x,[eue.triggerDisabled]:k?"":void 0},g],stateAttributesMapping:Np})});process.env.NODE_ENV!=="production"&&(f0.displayName="TooltipTrigger");const p0=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(p0.displayName="TooltipPortalContext");function nue(){const e=h.useContext(p0);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Tooltip.Portal> is missing.":gt(70));return e}const m0=h.forwardRef(function(t,n){const{children:r,container:o,className:i,render:s,style:a,...l}=t,{portalNode:c,portalSubtree:d}=hA({container:o,ref:n,componentProps:t,elementProps:l});return!d&&!c?null:C.jsxs(h.Fragment,{children:[d,c&&Rn.createPortal(r,c)]})});process.env.NODE_ENV!=="production"&&(m0.displayName="FloatingPortalLite");const h0=h.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t;return su().useState("mounted")||r?C.jsx(p0.Provider,{value:r,children:C.jsx(m0,{ref:n,...o})}):null});process.env.NODE_ENV!=="production"&&(h0.displayName="TooltipPortal");const g0=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(g0.displayName="TooltipPositionerContext");function v0(){const e=h.useContext(g0);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.":gt(71));return e}const b0=h.forwardRef(function(t,n){const{render:r,className:o,anchor:i,positionMethod:s="absolute",side:a="top",align:l="center",sideOffset:c=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:m=5,arrowPadding:g=5,sticky:v=!1,disableAnchorTracking:b=!1,collisionAvoidance:x=ZE,style:y,..._}=t,w=su(),T=nue(),R=w.useState("open"),S=w.useState("mounted"),P=w.useState("trackCursorAxis"),N=w.useState("disableHoverablePopup"),F=w.useState("floatingRootContext"),W=w.useState("instantType"),I=w.useState("transitionStatus"),B=w.useState("hasViewport"),$=Kp({anchor:i,positionMethod:s,floatingRootContext:F,mounted:S,side:a,sideOffset:c,align:l,alignOffset:d,collisionBoundary:f,collisionPadding:m,sticky:v,arrowPadding:g,disableAnchorTracking:b,keepMounted:T,collisionAvoidance:x,adaptiveOrigin:B?oL:void 0}),k=h.useMemo(()=>({open:R,side:$.side,align:$.align,anchorHidden:$.anchorHidden,instant:P!=="none"?"tracking-cursor":W}),[R,$.side,$.align,$.anchorHidden,P,W]),j=zp(t,k,{styles:$.positionerStyles,transitionStatus:I,props:_,refs:[n,w.useStateSetter("positionerElement")],hidden:!S,inert:!R||P==="both"||N});return C.jsx(g0.Provider,{value:$,children:j})});process.env.NODE_ENV!=="production"&&(b0.displayName="TooltipPositioner");const rue={...br,...Hn},y0=h.forwardRef(function(t,n){const{className:r,render:o,style:i,...s}=t,a=su(),{side:l,align:c}=v0(),d=a.useState("open"),f=a.useState("instantType"),m=a.useState("transitionStatus"),g=a.useState("popupProps"),v=a.useState("floatingRootContext");sr({open:d,ref:a.context.popupRef,onComplete(){d&&a.context.onOpenChangeComplete?.(!0)}});const b=a.useState("disabled"),x=a.useState("closeDelay");return DA(v,{enabled:!b,closeDelay:x}),$e("div",t,{state:{open:d,side:l,align:c,instant:f,transitionStatus:m},ref:[n,a.context.popupRef,a.useStateSetter("popupElement")],props:[g,Up(m),s],stateAttributesMapping:rue})});process.env.NODE_ENV!=="production"&&(y0.displayName="TooltipPopup");const x0=h.forwardRef(function(t,n){const{className:r,render:o,style:i,...s}=t,a=su(),l=a.useState("open"),c=a.useState("instantType"),{arrowRef:d,side:f,align:m,arrowUncentered:g,arrowStyles:v}=v0();return $e("div",t,{state:{open:l,side:f,align:m,uncentered:g,instant:c},ref:[n,d],props:[{style:v,"aria-hidden":!0},s],stateAttributesMapping:br})});process.env.NODE_ENV!=="production"&&(x0.displayName="TooltipArrow");const E0=function(t){const{delay:n,closeDelay:r,timeout:o=400}=t,i=h.useMemo(()=>({delay:n,closeDelay:r}),[n,r]),s=h.useMemo(()=>({open:n,close:r}),[n,r]);return C.jsx(d0.Provider,{value:i,children:C.jsx(CH,{delay:s,timeoutMs:o,children:t.children})})};process.env.NODE_ENV!=="production"&&(E0.displayName="TooltipProvider");let oue=(function(e){return e.popupWidth="--popup-width",e.popupHeight="--popup-height",e})({});function oI(e){const t=Or(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Zt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r;return(ql(n)!==i||ql(r)!==s)&&(n=i,r=s),{width:n,height:r}}const iue=()=>!0;function sue(e){const{popupElement:t,positionerElement:n,content:r,mounted:o,enabled:i=iue,onMeasureLayout:s,onMeasureLayoutComplete:a,side:l,direction:c}=e,d=bv(t,!0,!1),f=Gl(),m=h.useRef(null),g=h.useRef(null),v=h.useRef(!0),b=h.useRef(Dt),x=Re(s),y=Re(a),_=h.useMemo(()=>{let w=l==="top",T=l==="left";return c==="rtl"?(w=w||l==="inline-end",T=T||l==="inline-end"):(w=w||l==="inline-start",T=T||l==="inline-start"),w?{position:"absolute",[l==="top"?"bottom":"top"]:"0",[T?"right":"left"]:"0"}:rn},[l,c]);Ne(()=>{if(!o||!i()||typeof ResizeObserver!="function"){b.current=Dt,v.current=!0,m.current=null,g.current=null;return}if(!t||!n)return;b.current=iI(t,_);const w=new ResizeObserver($=>{const k=$[0];k&&(g.current={width:Math.ceil(k.borderBoxSize[0].inlineSize),height:Math.ceil(k.borderBoxSize[0].blockSize)})});w.observe(t),Bh(t,"auto");const T=fg(t,"position","static"),R=fg(t,"transform","none"),S=fg(t,"scale","1"),P=iI(n,{"--available-width":"max-content","--available-height":"max-content"});function N(){T(),R(),P()}function F(){N(),S()}if(x?.(),v.current||m.current===null){If(n,"max-content");const $=oI(t);return m.current=$,If(n,$),F(),y?.(null,$),v.current=!1,()=>{w.disconnect(),b.current(),b.current=Dt}}Bh(t,"auto"),If(n,"max-content");const W=m.current??g.current,I=oI(t);if(m.current=I,!W)return If(n,I),F(),y?.(null,I),()=>{w.disconnect(),f.cancel(),b.current(),b.current=Dt};Bh(t,W),F(),y?.(W,I),If(n,I);const B=new AbortController;return f.request(()=>{Bh(t,I),d(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},B.signal)}),()=>{w.disconnect(),B.abort(),f.cancel(),b.current(),b.current=Dt}},[r,t,n,d,f,i,o,x,y,_])}function fg(e,t,n){const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r)}}function iI(e,t){const n=[];for(const[r,o]of Object.entries(t))n.push(fg(e,r,o));return n.length?()=>{n.forEach(r=>r())}:Dt}function Bh(e,t){const n=t==="auto"?"auto":`${t.width}px`,r=t==="auto"?"auto":`${t.height}px`;e.style.setProperty("--popup-width",n),e.style.setProperty("--popup-height",r)}function If(e,t){const n=t==="max-content"?"max-content":`${t.width}px`,r=t==="max-content"?"max-content":`${t.height}px`;e.style.setProperty("--positioner-width",n),e.style.setProperty("--positioner-height",r)}function NL(e){const{store:t,side:n,cssVars:r,children:o}=e,i=ou(),s=t.useState("activeTriggerElement"),a=t.useState("activeTriggerId"),l=t.useState("open"),c=t.useState("payload"),d=t.useState("mounted"),f=t.useState("popupElement"),m=t.useState("positionerElement"),g=HF(l?s:null),v=uue(a,c),b=h.useRef(null),[x,y]=h.useState(null),[_,w]=h.useState(null),T=h.useRef(null),R=h.useRef(null),S=bv(T,!0,!1),P=Gl(),[N,F]=h.useState(null),[W,I]=h.useState(!1);Ne(()=>(t.set("hasViewport",!0),()=>{t.set("hasViewport",!1)}),[t]);const B=Re(()=>{T.current?.style.setProperty("animation","none"),T.current?.style.setProperty("transition","none"),R.current?.style.setProperty("display","none")}),$=Re(L=>{T.current?.style.removeProperty("animation"),T.current?.style.removeProperty("transition"),R.current?.style.removeProperty("display"),L&&F(L)}),k=h.useRef(null);Ne(()=>{if(s&&g&&s!==g&&k.current!==s&&b.current){y(b.current),I(!0);const L=lue(g,s);w(L),P.request(()=>{Rn.flushSync(()=>{I(!1)}),S(()=>{y(null),F(null),b.current=null})}),k.current=s}},[s,g,x,S,P]),Ne(()=>{const L=T.current;if(!L)return;const H=mt(L).createElement("div");for(const V of Array.from(L.childNodes))H.appendChild(V.cloneNode(!0));b.current=H});const j=x!=null;let D;j?D=C.jsxs(h.Fragment,{children:[C.jsx("div",{"data-previous":!0,inert:Jl(!0),ref:R,style:{...N?{[r.popupWidth]:`${N.width}px`,[r.popupHeight]:`${N.height}px`}:null,position:"absolute"},"data-ending-style":W?void 0:""},"previous"),C.jsx("div",{"data-current":!0,ref:T,"data-starting-style":W?"":void 0,children:o},v)]}):D=C.jsx("div",{"data-current":!0,ref:T,children:o},v),Ne(()=>{const L=R.current;!L||!x||L.replaceChildren(...Array.from(x.childNodes))},[x]),sue({popupElement:f,positionerElement:m,mounted:d,content:c,onMeasureLayout:B,onMeasureLayoutComplete:$,side:n,direction:i});const A={activationDirection:aue(_),transitioning:j};return{children:D,state:A}}function aue(e){if(e)return`${sI(e.horizontal,5,"right","left")} ${sI(e.vertical,5,"down","up")}`}function sI(e,t,n,r){return e>t?n:e<-t?r:""}function lue(e,t){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o={x:n.left+n.width/2,y:n.top+n.height/2},i={x:r.left+r.width/2,y:r.top+r.height/2};return{horizontal:i.x-o.x,vertical:i.y-o.y}}function uue(e,t){const[n,r]=h.useState(0),o=h.useRef(e),i=h.useRef(t),s=h.useRef(!1);return Ne(()=>{const a=o.current,l=i.current,c=e!==a,d=t!==l;c?(r(f=>f+1),s.current=!d):s.current&&d&&(r(f=>f+1),s.current=!1),o.current=e,i.current=t},[e,t]),`${e??"current"}-${n}`}const cue={activationDirection:e=>e?{"data-activation-direction":e}:null},OL=h.forwardRef(function(t,n){const{render:r,className:o,style:i,children:s,...a}=t,l=su(),c=v0(),d=l.useState("instantType"),{children:f,state:m}=NL({store:l,side:c.side,cssVars:oue,children:s}),g={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:d};return $e("div",t,{state:g,ref:n,props:[a,{children:f}],stateAttributesMapping:cue})});process.env.NODE_ENV!=="production"&&(OL.displayName="TooltipViewport");class ML{constructor(){this.store=new Lv}open(t){const n=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!n)throw new Error(process.env.NODE_ENV!=="production"?`Base UI: TooltipHandle.open: No trigger found with id "${t}".`:gt(81,t));this.store.setOpen(!0,je(ei,void 0,n))}close(){this.store.setOpen(!1,je(ei,void 0,void 0))}get isOpen(){return this.store.state.open}}function due(){return new ML}const fue=Object.freeze(Object.defineProperty({__proto__:null,Arrow:x0,Handle:ML,Popup:y0,Portal:h0,Positioner:b0,Provider:E0,Root:c0,Trigger:f0,Viewport:OL,createHandle:due},Symbol.toStringTag,{value:"Module"}));function pue(e){return C.jsx("svg",{width:"20",height:"10",viewBox:"0 0 20 10",fill:"none",...e,children:C.jsx("path",{d:"M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z",fill:"currentColor"})})}function IL(e){return C.jsx(E0,{...e})}function DL(e){return C.jsx(c0,{...e})}function AL({className:e,...t}){return C.jsx(f0,{"data-slot":"tooltip-trigger",className:ue(e),...t})}function kL({className:e,...t}){return C.jsx(y0,{"data-slot":"tooltip-popup",className:ue("flex origin-[var(--transform-origin)] flex-col rounded-md bg-popover px-2.5 py-1.5 text-xs text-popover-foreground drop-shadow-md","transition-[scale,opacity] duration-150 ease-out","data-starting-style:scale-98 data-starting-style:opacity-0","data-ending-style:scale-98 data-ending-style:opacity-0","data-instant:duration-0",e),...t})}function $L({className:e,...t}){return C.jsx(x0,{"data-slot":"tooltip-arrow",className:ue("flex text-popover","data-[side=bottom]:top-[-8px]","data-[side=left]:right-[-13px] data-[side=left]:rotate-90","data-[side=right]:left-[-13px] data-[side=right]:-rotate-90","data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180",e),...t,children:C.jsx(pue,{})})}function FL({content:e,children:t,open:n,defaultOpen:r,onOpenChange:o,side:i="top",align:s,offset:a=10,delay:l,closeDelay:c,className:d,arrowClassName:f,...m}){return C.jsxs(DL,{open:n,defaultOpen:r,onOpenChange:o,children:[C.jsx(AL,{delay:l,closeDelay:c,render:t,...m}),C.jsx(h0,{children:C.jsx(b0,{side:i,align:s,sideOffset:a,className:"z-float",children:C.jsxs(kL,{className:d,children:[C.jsx($L,{className:f}),e]})})})]})}function Xp({className:e,render:t,required:n,tooltip:r,children:o,...i}){const s=n||r?C.jsxs(C.Fragment,{children:[o,n&&C.jsx("span",{"aria-hidden":!0,className:"text-error",children:"*"}),r&&C.jsx(FL,{content:r,children:C.jsx("button",{type:"button","aria-label":"More information",className:"inline-flex cursor-default items-center text-muted-foreground hover:text-foreground transition-all ml-1",children:C.jsx(Ck,{className:"size-3.5"})})})]}):o,a={className:ue("inline-flex items-center font-medium text-sm leading-none","peer-data-disabled:cursor-not-allowed peer-data-disabled:opacity-70",e),"data-slot":"label",children:s};return pL({defaultTagName:"label",props:Kr(a,i),render:t})}function w0({className:e,...t}){return C.jsx(s0,{className:ue("peer relative inline-flex size-4.5 shrink-0 items-center justify-center rounded-[.25rem] border border-input bg-background not-dark:bg-clip-padding shadow-xs/5 outline-none ring-ring transition-shadow","before:pointer-events-none before:absolute before:inset-0 before:rounded-[3px]","not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)]","focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-offset-background","aria-invalid:border-error focus-visible:aria-invalid:border-error focus-visible:aria-invalid:ring-error","data-disabled:cursor-not-allowed data-disabled:opacity-64","sm:size-4","dark:not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]","[[data-disabled],[data-checked],[aria-invalid]]:shadow-none",e),"data-slot":"checkbox",...t})}function C0({className:e,...t}){return C.jsx(a0,{className:ue("absolute -inset-px flex items-center justify-center rounded-[.25rem] text-primary-foreground","data-unchecked:hidden data-checked:bg-primary data-indeterminate:text-foreground",e),"data-slot":"checkbox-indicator",render:(n,r)=>C.jsx("span",{...n,children:r.indeterminate?C.jsx("svg",{"aria-hidden":"true",className:"size-3.5 sm:size-3",fill:"none",height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{d:"M5.252 12h13.496"})}):C.jsx("svg",{"aria-hidden":"true",className:"size-3.5 sm:size-3",fill:"none",height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{d:"M5.252 12.7 10.2 18.63 18.748 5.37"})})}),...t})}const LL=M.createContext({controlFirst:!0,invalid:!1});function mue({className:e,indicatorProps:t,label:n,children:r,tooltip:o,controlFirst:i=!0,required:s,id:a,...l}){const c=M.useId(),d=a??c,f=n??r,m=C.jsx(w0,{id:d,className:e,required:s,...l,children:C.jsx(C0,{...t})});return f!==void 0?C.jsxs("div",{className:ue("flex select-none items-center gap-x-2",!i&&"flex-row-reverse justify-end"),children:[m,C.jsx(Xp,{htmlFor:d,required:s,tooltip:o,children:f})]}):m}function hue({className:e,label:t,id:n,...r}){const{controlFirst:o,invalid:i}=M.useContext(LL),s=M.useId(),a=n??s;return C.jsx(kv,{invalid:i,children:C.jsxs("div",{className:ue("flex select-none items-center gap-x-2",!o&&"flex-row-reverse justify-end"),children:[C.jsx(w0,{id:a,className:e,...r,children:C.jsx(C0,{})}),C.jsx(Xp,{htmlFor:a,children:t})]})})}function jL({children:e,className:t}){return C.jsx(_L,{className:ue("text-sm font-medium leading-none",t),children:e})}function gue({legend:e,children:t,error:n,description:r,defaultValue:o,value:i,onChange:s,allValues:a,disabled:l,controlFirst:c=!0,className:d}){return C.jsx(LL.Provider,{value:{controlFirst:c,invalid:!!n},children:C.jsx(l0,{defaultValue:o,value:i,onValueChange:s,allValues:a,disabled:l,children:C.jsxs(TL,{className:ue("flex flex-col gap-3",d),children:[e&&C.jsx(jL,{children:e}),C.jsx("div",{className:"flex flex-col gap-2",children:t}),n&&C.jsx("p",{className:"text-sm font-medium text-error",children:n}),!n&&r&&C.jsx("p",{className:"text-sm text-muted-foreground",children:r})]})})})}const vue=Object.assign(mue,{Item:hue,Group:gue,Legend:jL});function bue({className:e,...t}){return C.jsx(l0,{className:ue("flex flex-col items-start gap-3",e),"data-slot":"checkbox-group",...t})}const R0=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(R0.displayName="ComboboxRootContext");const S0=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(S0.displayName="ComboboxFloatingContext");const P0=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(P0.displayName="ComboboxDerivedItemsContext");const T0=h.createContext("");process.env.NODE_ENV!=="production"&&(T0.displayName="ComboboxInputValueContext");function Kn(){const e=h.useContext(R0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.":gt(22));return e}function jv(){const e=h.useContext(S0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.":gt(23));return e}function pi(){const e=h.useContext(P0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.":gt(24));return e}function _0(){return h.useContext(T0)}const _e={id:ye(e=>e.id),labelId:ye(e=>e.labelId),items:ye(e=>e.items),selectedValue:ye(e=>e.selectedValue),hasSelectionChips:ye(e=>{const t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:ye(e=>{const{selectedValue:t,selectionMode:n}=e;return t==null?!1:n==="multiple"&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:ye((e,t)=>t?YF(e.items):!1),open:ye(e=>e.open),mounted:ye(e=>e.mounted),forceMounted:ye(e=>e.forceMounted),inline:ye(e=>e.inline),activeIndex:ye(e=>e.activeIndex),selectedIndex:ye(e=>e.selectedIndex),isActive:ye((e,t)=>e.activeIndex===t),isSelected:ye((e,t)=>{const n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(o=>si(t,o,n)):si(t,r,n)}),transitionStatus:ye(e=>e.transitionStatus),popupProps:ye(e=>e.popupProps),inputProps:ye(e=>e.inputProps),triggerProps:ye(e=>e.triggerProps),getItemProps:ye(e=>e.getItemProps),positionerElement:ye(e=>e.positionerElement),listElement:ye(e=>e.listElement),triggerElement:ye(e=>e.triggerElement),inputElement:ye(e=>e.inputElement),inputGroupElement:ye(e=>e.inputGroupElement),popupSide:ye(e=>e.popupSide),openMethod:ye(e=>e.openMethod),inputInsidePopup:ye(e=>e.inputInsidePopup),selectionMode:ye(e=>e.selectionMode),name:ye(e=>e.name),form:ye(e=>e.form),disabled:ye(e=>e.disabled),readOnly:ye(e=>e.readOnly),required:ye(e=>e.required),grid:ye(e=>e.grid),virtualized:ye(e=>e.virtualized),itemToStringLabel:ye(e=>e.itemToStringLabel),isItemEqualToValue:ye(e=>e.isItemEqualToValue),modal:ye(e=>e.modal),autoHighlight:ye(e=>e.autoHighlight),submitOnItemClick:ye(e=>e.submitOnItemClick)};function qL(e,t){return(n,r)=>{if(n==null)return!1;const o=er(n,t);return e.contains(o,r)}}function BL(e,t,n){return(r,o)=>{if(r==null)return!1;if(!o)return!0;const i=er(r,t),s=n!=null?er(n,t):"";return s&&e.contains(s,o)&&s.length===o.length?!0:e.contains(i,o)}}const aI=new Map;function VL(e){return Array.isArray(e)?e.map(t=>VL(t)).join(","):e==null?"":String(e)}function WL(e={}){const t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${VL(e.locale)}|${JSON.stringify(t)}`,r=aI.get(n);if(r)return r;const o=new Intl.Collator(e.locale,t),i={contains(s,a,l){if(!a)return!0;const c=er(s,l);for(let d=0;d<=c.length-a.length;d+=1)if(o.compare(c.slice(d,d+a.length),a)===0)return!0;return!1},startsWith(s,a,l){if(!a)return!0;const c=er(s,l);return o.compare(c.slice(0,a.length),a)===0},endsWith(s,a,l){if(!a)return!0;const c=er(s,l),d=a.length;return c.length>=d&&o.compare(c.slice(c.length-d),a)===0}};return aI.set(n,i),i}const yue=WL;function HL(e={}){const{multiple:t=!1,value:n,...r}=e,o=WL(r),i=h.useCallback((s,a,l)=>t?qL(o,l)(s,a):BL(o,l,n)(s,a),[o,n,t]);return h.useMemo(()=>({contains:i,startsWith:o.startsWith,endsWith:o.endsWith}),[i,o])}const KL=Symbol("none"),da={value:KL,index:-1};function xue(e){const{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:o,onSelectedValueChange:i,defaultInputValue:s,inputValue:a,open:l,defaultOpen:c=!1,selectionMode:d="none",onItemHighlighted:f,name:m,form:g,disabled:v=!1,readOnly:b=!1,required:x=!1,inputRef:y,grid:_=!1,items:w,filteredItems:T,filter:R,openOnInputClick:S=!0,autoHighlight:P=!1,keepHighlight:N=!1,highlightItemOnHover:F=!0,loopFocus:W=!0,itemToStringLabel:I,itemToStringValue:B,isItemEqualToValue:$=UF,virtualized:k=!1,inline:j=!1,fillInputOnItemPress:D=!0,modal:A=!1,limit:L=-1,autoComplete:H="list",formAutoComplete:V,locale:X,submitOnItemClick:K=!1}=e,{clearErrors:G}=fi(),{setDirty:ee,validityData:Z,shouldValidateOnChange:te,setFilled:J,name:ne,disabled:U,setTouched:ie,setFocused:se,validationMode:Q,validation:me}=Sn(),ve=Ba({id:t}),xe=yue({locale:X}),[be,Ce]=h.useState(!1),[qe,Te]=h.useState(null),ke=h.useRef([]),ce=h.useRef([]),he=h.useRef(null),re=h.useRef(null),le=h.useRef(null),Oe=h.useRef(null),De=h.useRef(null),Fe=h.useRef(!0),We=h.useRef(!1),ze=h.useRef(null),He=h.useRef(null),Ze=h.useRef(null),nt=h.useRef(da),ht=h.useRef(null),Je=h.useRef([]),Ge=h.useRef([]),dt=U||v,rt=ne??m,Ve=d==="multiple",Me=d==="single",Be=a!==void 0||s!==void 0,Ie=w!==void 0,tt=T!==void 0;let at;P==="always"?at="always":at=P?"input-change":!1;const[Le,En]=oi({controlled:o,default:Ve?r??ws:r,name:"Combobox",state:"selectedValue"}),zt=h.useMemo(()=>R===null?()=>!0:R!==void 0?R:Me&&!be?BL(xe,I,Le):qL(xe,I),[R,Me,Le,be,xe,I]),Ee=fn(()=>Be?s??"":Me?er(Le,I):"").current,[Rt,wn]=oi({controlled:a,default:Ee,name:"Combobox",state:"inputValue"}),[yt,Zn]=oi({controlled:l,default:c,name:"Combobox",state:"open"}),On=vC(w),an=qe??(Rt===""?"":String(Rt).trim()),St=Me?er(Le,I):"",Lt=Me&&!be&&an!==""&&St!==""&&St.length===an.length&&xe.contains(St,an),Fn=Lt?"":an,ur=Ie&&tt&&Lt,Mn=h.useMemo(()=>w?On?w.flatMap(Ue=>Ue.items):w:ws,[w,On]),Mr=h.useMemo(()=>{if(T&&!ur)return T;if(!w)return ws;if(On){const it=w,Mt=[];let jt=0;for(const In of it){if(L>-1&&jt>=L)break;const pn=Fn===""?In.items:In.items.filter(Za=>zt(Za,Fn,I));if(pn.length===0)continue;const vi=L>-1?L-jt:1/0,qo=pn.slice(0,vi);if(qo.length>0){const Za={...In,items:qo};Mt.push(Za),jt+=qo.length}}return Mt}if(Fn==="")return L>-1?Mn.slice(0,L):Mn;const Ue=[];for(const it of Mn){if(L>-1&&Ue.length>=L)break;zt(it,Fn,I)&&Ue.push(it)}return Ue},[T,ur,w,On,Fn,L,zt,I,Mn]),xr=h.useMemo(()=>On?Mr.flatMap(it=>it.items):Mr,[Mr,On]),_t=fn(()=>new hw({id:ve,labelId:void 0,selectedValue:Le,open:yt,filter:zt,query:an,items:w,selectionMode:d,listRef:ke,labelsRef:ce,popupRef:he,emptyRef:De,inputRef:re,startDismissRef:le,endDismissRef:Oe,keyboardActiveRef:Fe,chipsContainerRef:ze,clearRef:He,valuesRef:Je,allValuesRef:Ge,selectionEventRef:Ze,name:rt,form:g,disabled:dt,readOnly:b,required:x,grid:_,isGrouped:On,virtualized:k,openOnInputClick:S,itemToStringLabel:I,isItemEqualToValue:$,modal:A,autoHighlight:at,submitOnItemClick:K,hasInputValue:Be,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:j,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},positionerElement:null,listElement:null,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,onOpenChangeComplete:n||Dt,setOpen:Dt,setInputValue:Dt,setSelectedValue:Dt,setIndices:Dt,onItemHighlighted:Dt,handleSelection:Dt,getItemProps:()=>rn,forceMount:Dt,requestSubmit:Dt})).current,hi=d==="none"?Rt:Le,lb=h.useMemo(()=>d==="none"?hi:Array.isArray(Le)?Le.map(Ue=>Po(Ue,B)):Po(Le,B),[hi,B,d,Le]),hu=Re(f),gu=Re(n),Ka=pe(_t,_e.activeIndex),ub=pe(_t,_e.selectedIndex),Ua=pe(_t,_e.positionerElement),Us=pe(_t,_e.listElement),zs=pe(_t,_e.triggerElement),gi=pe(_t,_e.inputElement),cb=pe(_t,_e.inputGroupElement),Ir=pe(_t,_e.inline),jo=pe(_t,_e.inputInsidePopup),fm=dn(zs),{mounted:vu,setMounted:pm,transitionStatus:bu}=$o(yt),{openMethod:mm,triggerProps:yu}=Ev(yt),db=Re(()=>lb);qa(jo?fm:re,{id:ve,value:hi,getValue:db});const Gs=Re(()=>{w?ce.current=xr.map(Ue=>er(Ue,I)):_t.set("forceMounted",!0)}),hm=h.useRef(Le);Ne(()=>{Le!==hm.current&&Gs()},[Gs,Le]);const Er=Re(Ue=>{_t.update(Ue);const it=Ue.type||"none";if(Ue.activeIndex!==void 0)if(Ue.activeIndex===null)nt.current!==da&&(nt.current=da,hu(void 0,so(it,void 0,{index:-1})));else{const Mt=Je.current[Ue.activeIndex];nt.current={value:Mt,index:Ue.activeIndex},hu(Mt,so(it,void 0,{index:Ue.activeIndex}))}}),wr=Re((Ue,it)=>{if(We.current=it.reason===Br,e.onInputValueChange?.(Ue,it),!it.isCanceled){if(it.reason===Li){const Mt=it.event,jt=Mt.inputType;if(Mt.type==="compositionend"||jt!=null&&jt!==""&&jt!=="insertReplacementText"){const pn=Ue.trim()!=="";pn&&Ce(!0),ht.current={hasQuery:pn},pn&&at&&_t.state.activeIndex==null&&_t.set("activeIndex",0)}}wn(Ue)}}),Ys=Re((Ue,it)=>{if(yt!==Ue&&(it.reason==="escape-key"&&Ie&&xr.length===0&&!_t.state.emptyRef.current&&it.allowPropagation(),e.onOpenChange?.(Ue,it),!it.isCanceled&&(!Ue&&be&&(Me?(Ir||Te(an),an===""&&Ce(!1)):Ve&&(Ir||jo?Er({activeIndex:null}):Te(an),wr("",je(Br,it.event)))),Zn(Ue),!Ue&&jo&&(it.reason===Ms||it.reason===pv)&&(ie(!0),se(!1),Q==="onBlur")))){const Mt=d==="none"?Rt:Le;me.commit(Mt)}}),Xs=Re((Ue,it)=>{if(i?.(Ue,it),it.isCanceled)return;En(Ue),(d==="none"&&he.current&&D||Me&&!_t.state.inputInsidePopup)&&wr(er(Ue,I),je(it.reason,it.event)),Me&&Ue!=null&&it.reason!==Li&&be&&!Ir&&Te(an)}),za=Re((Ue,it)=>{let Mt=it;if(Mt===void 0){if(Ka===null)return;Mt=Je.current[Ka]}const jt=Ht(Ue),In=Ze.current??Ue;Ze.current=null;const pn=je(rg,In),vi=jt?.closest("a")?.getAttribute("href");if(vi){vi.startsWith("#")&&Ys(!1,pn);return}if(Ve){const qo=Array.isArray(Le)?Le:[],mb=zF(qo,Mt,_t.state.isItemEqualToValue)?GF(qo,Mt,_t.state.isItemEqualToValue):[...qo,Mt];if(Xs(mb,pn),!(re.current?re.current.value.trim()!=="":!1))return;_t.state.inputInsidePopup?wr("",je(Br,pn.event)):Ys(!1,pn)}else Xs(Mt,pn),Ys(!1,pn)}),Ga=Re(()=>{if(!_t.state.submitOnItemClick)return;const Ue=me.inputRef.current?.form??_t.state.inputElement?.form;Ue&&typeof Ue.requestSubmit=="function"&&Ue.requestSubmit()}),xu=Re(()=>{if(pm(!1),gu?.(!1),Ce(!1),Te(null),Er(d==="none"?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Ve&&re.current&&re.current.value!==""&&!We.current&&wr("",je(Br)),Me)if(_t.state.inputInsidePopup)re.current&&re.current.value!==""&&wr("",je(Br));else{const Ue=er(Le,I);re.current&&re.current.value!==Ue&&wr(Ue,je(Ue===""?Br:vn))}}),gm=h.useMemo(()=>Ir&&Ua?{current:Ua.closest('[role="dialog"]')}:he,[Ir,Ua]);sr({enabled:!e.actionsRef,open:yt,ref:gm,onComplete(){yt||xu()}}),h.useImperativeHandle(e.actionsRef,()=>({unmount:xu}),[xu]),Ne(function(){if(yt||d==="none")return;const it=w?Mn:Ge.current;if(Ve){const Mt=Array.isArray(Le)?Le:[],jt=Mt[Mt.length-1],In=Ki(it,jt,$);Er({selectedIndex:In===-1?null:In})}else{const Mt=Ki(it,Le,$);Er({selectedIndex:Mt===-1?null:Mt})}},[yt,Le,w,d,Mn,Ve,$,Er]),Ne(()=>{w&&(Je.current=xr,ke.current.length=xr.length)},[w,xr]),Ne(()=>{const Ue=ht.current;if(Ue&&(Ue.hasQuery?at&&_t.set("activeIndex",0):at==="always"&&_t.set("activeIndex",0),ht.current=null),!yt&&!Ir)return;const Mt=Ie||tt?xr:Je.current,jt=_t.state.activeIndex;if(jt==null){if(at==="always"&&Mt.length>0){_t.set("activeIndex",0);return}nt.current!==da&&(nt.current=da,_t.state.onItemHighlighted(void 0,so(vn,void 0,{index:-1})));return}if(jt>=Mt.length){nt.current!==da&&(nt.current=da,_t.state.onItemHighlighted(void 0,so(vn,void 0,{index:-1}))),_t.set("activeIndex",null);return}const In=Mt[jt],pn=nt.current.value,vi=pn!==KL&&si(In,pn,_t.state.isItemEqualToValue);(nt.current.index!==jt||!vi)&&(nt.current={value:In,index:jt},_t.state.onItemHighlighted(In,so(vn,void 0,{index:jt})))},[Ka,at,tt,Ie,xr,Ir,yt,_t]),Ne(()=>{if(d==="none"){J(String(Rt)!=="");return}J(Ve?Array.isArray(Le)&&Le.length>0:Le!=null)},[J,d,Rt,Le,Ve]),h.useEffect(()=>{Ie&&at&&xr.length===0&&Er({activeIndex:null})},[Ie,at,xr.length,Er]),No(an,()=>{!yt||an===""||an===String(Ee)||Ce(!0)}),No(Le,()=>{if(d!=="none"&&(G(rt),ee(Le!==Z.initialValue),te()?me.commit(Le):me.commit(Le,!0),Me&&!Be&&!jo)){const Ue=er(Le,I);Rt!==Ue&&wr(Ue,je(vn))}}),No(Rt,()=>{d==="none"&&(G(rt),ee(Rt!==Z.initialValue),te()?me.commit(Rt):me.commit(Rt,!0))}),No(w,()=>{if(!Me||Be||jo||be)return;const Ue=er(Le,I);Rt!==Ue&&wr(Ue,je(vn))});const Zs=yv({open:Ir?!0:yt,onOpenChange:Ys,elements:{reference:jo?zs:gi,floating:Ua}});let Js,Eu;Ir||(Js=_?"grid":"listbox",Eu=yt?"true":"false");const vm=h.useMemo(()=>{const Ue=gi?.tagName==="INPUT",it=gi==null||Ue,Mt=it||yt,jt=it?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return Mt&&(jt.role="combobox",jt["aria-expanded"]=Eu,jt["aria-haspopup"]=Js,jt["aria-controls"]=yt?Us?.id:void 0,jt["aria-autocomplete"]=H),{reference:jt,floating:{role:"presentation"}}},[gi,yt,Eu,Js,Us?.id,H]),wu=Sp(Zs,{enabled:!b&&!dt&&S,event:"mousedown-only",toggle:!1,touchOpenDelay:jo?0:100,reason:WD}),Cu=Pp(Zs,{enabled:!b&&!dt&&!Ir,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:Ir?!0:void 0,outsidePress(Ue){const it=Ht(Ue);return!Xe(zs,it)&&!Xe(He.current,it)&&!Xe(ze.current,it)&&!Xe(cb,it)}}),es=kA(Zs,{enabled:!b&&!dt,id:ve,listRef:ke,activeIndex:Ka,selectedIndex:ub,virtual:!0,loopFocus:W,allowEscape:W&&!at,focusItemOnOpen:be||d==="none"&&!at?!1:"auto",focusItemOnHover:F,resetOnPointerLeave:!N,cols:_?2:1,orientation:_?"horizontal":void 0,disabledIndices:ws,onNavigate(Ue,it){!it&&!yt||bu==="ending"||Er(it?{activeIndex:Ue,type:Fe.current?"keyboard":"pointer"}:{activeIndex:Ue})}}),{getReferenceProps:Ya,getFloatingProps:Xa,getItemProps:Ru}=ka([vm,wu,Cu,es]);xp(()=>{_t.update({inline:j,popupProps:Xa(),inputProps:Ya(),triggerProps:yu,getItemProps:Ru,setOpen:Ys,setInputValue:wr,setSelectedValue:Xs,setIndices:Er,onItemHighlighted:hu,handleSelection:za,forceMount:Gs,requestSubmit:Ga})}),Ne(()=>{_t.update({id:ve,selectedValue:Le,open:yt,mounted:vu,transitionStatus:bu,items:w,inline:j,popupProps:Xa(),inputProps:Ya(),triggerProps:yu,openMethod:mm,getItemProps:Ru,selectionMode:d,name:rt,form:g,disabled:dt,readOnly:b,required:x,grid:_,isGrouped:On,virtualized:k,onOpenChangeComplete:gu,openOnInputClick:S,itemToStringLabel:I,modal:A,autoHighlight:at,isItemEqualToValue:$,submitOnItemClick:K,hasInputValue:Be,requestSubmit:Ga})},[_t,ve,Le,yt,vu,bu,w,Xa,Ya,Ru,mm,yu,d,rt,dt,b,x,me,_,On,k,gu,S,I,A,$,K,Be,j,Ga,at,g]);const bm=Io(y,me.inputRef),ym=h.useMemo(()=>({query:an,hasItems:Ie,filteredItems:Mr,flatFilteredItems:xr}),[an,Ie,Mr,xr]),xm=h.useMemo(()=>Array.isArray(hi)?"":Po(hi,B),[hi,B]),Em=Ve&&Array.isArray(Le)&&Le.length>0,Su=Ve||d==="none"?void 0:rt,fb=h.useMemo(()=>!Ve||!Array.isArray(Le)||!rt?null:Le.map(Ue=>{const it=Po(Ue,B);return C.jsx("input",{type:"hidden",form:g,name:rt,value:it},it)}),[Ve,Le,g,rt,B]),pb=C.jsxs(h.Fragment,{children:[e.children,C.jsx("input",{...me.getInputValidationProps({onFocus(){if(jo){zs?.focus();return}(re.current||zs)?.focus()},onChange(Ue){if(Ue.nativeEvent.defaultPrevented)return;const it=Ue.currentTarget.value,Mt=je(vn,Ue.nativeEvent);function jt(){if(Ve)return;if(d==="none"){ee(it!==Z.initialValue),wr(it,Mt),te()&&me.commit(it);return}const In=Je.current.find(pn=>Po(pn,B).toLowerCase()===it.toLowerCase()||er(pn,I).toLowerCase()===it.toLowerCase());In!=null&&(ee(In!==Z.initialValue),Xs?.(In,Mt),te()&&me.commit(In))}w?jt():(Gs(),queueMicrotask(jt))}}),id:ve&&Su==null?`${ve}-hidden-input`:void 0,form:g,name:Su,autoComplete:V,disabled:dt,required:x&&!Em,readOnly:b,value:xm,ref:bm,style:Su?Yl:qs,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),fb]});return C.jsx(R0.Provider,{value:_t,children:C.jsx(S0.Provider,{value:Zs,children:C.jsx(P0.Provider,{value:ym,children:C.jsx(T0.Provider,{value:Rt,children:pb})})})})}function UL(e){const{multiple:t=!1,defaultValue:n,value:r,onValueChange:o,autoComplete:i,...s}=e;return C.jsx(xue,{...s,selectionMode:t?"multiple":"single",selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:o,formAutoComplete:i})}const zL=h.forwardRef(function(t,n){const{render:r,className:o,style:i,...s}=t,a=s;delete a.id;const l=Sn(),c=Kn(),d=pe(c,_e.inputInsidePopup),f=pe(c,_e.triggerElement),m=pe(c,_e.inputElement),g=pe(c,_e.id),v=QF(g),b=f?.id??(d?g:void 0);process.env.NODE_ENV!=="production"&&h.useEffect(()=>{if(!m||d)return;const y=Bl.captureOwnerStack?.()||"";Ca(`<Combobox.Label> labels <Combobox.Trigger> only. When <Combobox.Input> is the form control, use a native <label> or <Field.Label> instead.${y}`)},[m,d]);const x=EC({id:v,fallbackControlId:b,setLabelId(y){c.set("labelId",y)}});return $e("div",t,{ref:n,state:l.state,props:[x,s],stateAttributesMapping:ar})});process.env.NODE_ENV!=="production"&&(zL.displayName="ComboboxLabel");function Hg(e){const{children:t,placeholder:n}=e,r=Kn(),o=pe(r,_e.itemToStringLabel),i=pe(r,_e.selectedValue),s=pe(r,_e.items),a=pe(r,_e.selectionMode)==="multiple",l=pe(r,_e.hasSelectedValue),c=!l&&n!=null&&t==null,d=pe(r,_e.hasNullItemLabel,c);let f=null;return typeof t=="function"?f=t(i):t!=null?f=t:!l&&n!=null&&!d?f=n:a&&Array.isArray(i)?f=XF(i,s,o):f=bC(i,s,o),C.jsx(h.Fragment,{children:f})}const N0={...Rw,...ar,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null},O0=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(O0.displayName="ComboboxChipsContext");function GL(){return h.useContext(O0)}const M0=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(M0.displayName="ComboboxPositionerContext");function qv(e){const t=h.useContext(M0);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Popup> and <Combobox.Arrow> must be used within the <Combobox.Positioner> component":gt(21));return t}const I0=h.forwardRef(function(t,n){const r=Kn(),{buttonRef:o,getButtonProps:i}=Yn({native:!1}),s=Io(n,o),a=Re(c=>{r.state.setOpen(!1,je(JE,c.nativeEvent,c.currentTarget))}),l=i({onClick:a});return C.jsx("span",{ref:s,...l,"aria-label":"Dismiss",tabIndex:void 0,style:Yl})});process.env.NODE_ENV!=="production"&&(I0.displayName="ComboboxInternalDismissButton");const Zp=h.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,id:s,style:a,...l}=t,{state:c,disabled:d,setTouched:f,setFocused:m,validationMode:g,validation:v}=Sn(),{labelId:b}=yr(),x=GL(),_=!!qv(!0),w=Kn(),{filteredItems:T}=pi(),R=_0(),S=ou(),P=pe(w,_e.required),N=pe(w,_e.disabled),F=pe(w,_e.readOnly),W=pe(w,_e.name),I=pe(w,_e.form),B=pe(w,_e.selectionMode),$=pe(w,_e.autoHighlight),k=pe(w,_e.inputProps),j=pe(w,_e.triggerProps),D=pe(w,_e.open),A=pe(w,_e.mounted),L=pe(w,_e.selectedValue),H=pe(w,_e.popupSide),V=pe(w,_e.positionerElement),X=pe(w,_e.id),K=pe(w,_e.inline),G=pe(w,_e.modal),ee=!!$,Z=A&&V?H:null,te=d||N||i,J=T.length===0,ne=_||K,U=!ne||G,ie=bn(s??(ne?void 0:X)),se=wC(b,void 0),Q=_?Pl:c,[me,ve]=h.useState(null),xe=h.useRef(!1),be=h.useRef(null),Ce=h.useRef(!1),qe=Re(re=>{const le=_||w.state.inline;le&&!w.state.hasInputValue&&w.state.setInputValue("",je(vn)),w.update({inputElement:re,inputInsidePopup:le})}),Te=_||!v?l:v.getValidationProps(l),ke={...Q,open:D,disabled:te,readOnly:F,popupSide:Z,listEmpty:J};function ce(re){if(!x)return;let le;const{highlightedChipIndex:Oe}=x,De=x.chipsRef.current.length;if(Oe!==void 0){if(re.key==="ArrowLeft")re.preventDefault(),Oe>0?le=Oe-1:le=void 0;else if(re.key==="ArrowRight")re.preventDefault(),Oe<De-1?le=Oe+1:le=void 0;else if(re.key==="Backspace"||re.key==="Delete"){re.preventDefault();const Fe=Oe>=L.length-1?L.length-2:Oe;le=Fe>=0?Fe:void 0,w.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return le}return re.key==="ArrowLeft"&&(re.currentTarget.selectionStart??0)===0&&L.length>0?(re.preventDefault(),le=De>0?De-1:void 0):re.key==="Backspace"&&re.currentTarget.value===""&&L.length>0&&(w.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),re.preventDefault()),le}const he=$e("input",t,{state:ke,ref:[n,w.state.inputRef,qe],props:[k,j,{type:"text",value:t.value??me??R,"aria-readonly":F||void 0,"aria-required":P||void 0,"aria-labelledby":se,disabled:te,readOnly:F,required:B==="none"?P:void 0,form:I,...B==="none"&&W&&{name:W},id:ie,onFocus(){if(m(!0),!K||!Ce.current)return;Ce.current=!1;const re=be.current;re==null||!Object.hasOwn(w.state.valuesRef.current,re)||w.state.setIndices({activeIndex:re})},onBlur(){f(!0),m(!1);const re=w.state.activeIndex;if(K&&re!==null&&$!=="always"&&(be.current=re,Ce.current=!0,w.state.setIndices({activeIndex:null})),g==="onBlur"){const le=B==="none"?R:L;v.commit(le)}},onCompositionStart(re){bg||(xe.current=!0,ve(re.currentTarget.value))},onCompositionEnd(re){xe.current=!1;const le=re.currentTarget.value;ve(null),w.state.setInputValue(le,je(Li,re.nativeEvent))},onChange(re){const le=re.nativeEvent.inputType,Oe=!le||le==="insertReplacementText",De=xe.current||!Oe;if(xe.current){const He=re.currentTarget.value;ve(He),He===""&&!w.state.openOnInputClick&&!w.state.inputInsidePopup&&w.state.setOpen(!1,je(Br,re.nativeEvent));const Ze=He.trim(),nt=ee&&Ze!=="";!F&&!te&&Ze&&De&&(w.state.setOpen(!0,je(Li,re.nativeEvent)),ee||w.state.setIndices({activeIndex:null,selectedIndex:null,type:w.state.keyboardActiveRef.current?"keyboard":"pointer"})),D&&w.state.activeIndex!==null&&!nt&&w.state.setIndices({activeIndex:null,selectedIndex:null,type:w.state.keyboardActiveRef.current?"keyboard":"pointer"});return}w.state.setInputValue(re.currentTarget.value,je(Li,re.nativeEvent));const Fe=re.currentTarget.value==="",We=je(Br,re.nativeEvent);Fe&&!w.state.inputInsidePopup&&(B==="single"&&w.state.setSelectedValue(null,We),w.state.openOnInputClick||w.state.setOpen(!1,We));const ze=re.currentTarget.value.trim();!F&&!te&&ze&&De&&(w.state.setOpen(!0,je(Li,re.nativeEvent)),ee||w.state.setIndices({activeIndex:null,selectedIndex:null,type:w.state.keyboardActiveRef.current?"keyboard":"pointer"})),D&&w.state.activeIndex!==null&&!ee&&w.state.setIndices({activeIndex:null,selectedIndex:null,type:w.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(re){if(te||F||re.ctrlKey||re.shiftKey||re.altKey||re.metaKey)return;w.state.keyboardActiveRef.current=!0;const le=re.currentTarget,Oe=le.scrollWidth-le.clientWidth,De=S==="rtl";if(re.key==="Home"){gn(re);const ze=Ax&&De?le.value.length:0;le.setSelectionRange(ze,ze),le.scrollLeft=0;return}if(re.key==="End"){gn(re);const ze=Ax&&De?0:le.value.length;le.setSelectionRange(ze,ze),le.scrollLeft=De?-Oe:Oe;return}if(!A&&re.key==="Escape"){const ze=B==="multiple"&&Array.isArray(L)?L.length===0:L===null,He=je(Ep,re.nativeEvent),Ze=B==="multiple"?[]:null;w.state.setInputValue("",He),w.state.setSelectedValue(Ze,He),!ze&&!w.state.inline&&!He.isPropagationAllowed&&re.stopPropagation();return}if(x&&re.key==="Backspace"&&le.value===""&&x.highlightedChipIndex===void 0&&Array.isArray(L)&&L.length>0){const ze=x.chipsRef.current.length,He=ze>0?ze-1:L.length-1,Ze=L.filter((nt,ht)=>ht!==He);w.state.setIndices({activeIndex:null,selectedIndex:null,type:w.state.keyboardActiveRef.current?"keyboard":"pointer"}),w.state.setSelectedValue(Ze,je(vn,re.nativeEvent));return}const Fe=x?.highlightedChipIndex!==void 0,We=ce(re);if(x?.setHighlightedChipIndex(We),We!==void 0?x?.chipsRef.current[We]?.focus():Fe&&w.state.inputRef.current?.focus(),re.which!==229&&re.key==="Enter"&&D){const ze=w.state.activeIndex,He=re.nativeEvent;if(ze===null){if(K)return;w.state.setOpen(!1,je(vn,He));return}gn(re);const Ze=w.state.listRef.current[ze];Ze&&(w.state.selectionEventRef.current=He,Ze.click(),w.state.selectionEventRef.current=null)}},onPointerMove(){w.state.keyboardActiveRef.current=!1},onPointerDown(){w.state.keyboardActiveRef.current=!1}},Te],stateAttributesMapping:N0});return C.jsxs(h.Fragment,{children:[D&&U&&C.jsx(I0,{ref:w.state.startDismissRef}),he]})});process.env.NODE_ENV!=="production"&&(Zp.displayName="ComboboxInput");function YL(e,t,n,r,o){if(e.baseUIHandlerPrevented||r)return;const i=Ht(e.nativeEvent),s=Ct(i)?i:null;s!==e.currentTarget&&(o?.(s)||XD(s))||(e.preventDefault(),!n&&(t.state.inputRef.current?.focus(),t.state.openOnInputClick&&t.state.setOpen(!0,je(WD,e.nativeEvent))))}const D0=h.forwardRef(function(t,n){const{render:r,className:o,style:i,...s}=t,{state:a}=Sn(),l=Kn(),{filteredItems:c}=pi(),d=pe(l,_e.open),f=pe(l,_e.mounted),m=pe(l,_e.popupSide),g=pe(l,_e.positionerElement),v=pe(l,_e.disabled),b=pe(l,_e.readOnly),x=pe(l,_e.hasSelectedValue),y=pe(l,_e.selectionMode),_=f&&g?m:null,w=v,T=c.length===0,S={...a,open:d,disabled:w,readOnly:b,popupSide:_,listEmpty:T,placeholder:y==="none"?!1:!x},P=Re(N=>{l.set("inputGroupElement",N)});return $e("div",t,{ref:[n,P],props:[{role:"group",onMouseDown(N){YL(N,l,w,b,F=>Xe(l.state.chipsContainerRef.current,F))}},s],state:S,stateAttributesMapping:N0})});process.env.NODE_ENV!=="production"&&(D0.displayName="ComboboxInputGroup");const Vh=2,up=h.forwardRef(function(t,n){const{render:r,className:o,nativeButton:i=!0,disabled:s=!1,id:a,style:l,...c}=t,{state:d,disabled:f,setTouched:m,setFocused:g,validationMode:v,validation:b}=Sn(),{labelId:x}=yr(),y=Kn(),{filteredItems:_}=pi(),w=pe(y,_e.selectionMode),T=pe(y,_e.disabled),R=pe(y,_e.readOnly),S=pe(y,_e.required),P=pe(y,_e.mounted),N=pe(y,_e.popupSide),F=pe(y,_e.positionerElement),W=pe(y,_e.listElement),I=pe(y,_e.triggerProps),B=pe(y,_e.triggerElement),$=pe(y,_e.inputInsidePopup),k=pe(y,_e.id),j=pe(y,_e.labelId),D=pe(y,_e.open),A=pe(y,_e.selectedValue),L=pe(y,_e.activeIndex),H=pe(y,_e.selectedIndex),V=pe(y,_e.hasSelectedValue),X=jv(),K=_0(),G=nn(),ee=f||T||s,Z=_.length===0,te=P&&F?N:null;Ba({id:$?a:void 0});const J=$?a??k:a,ne=wC(x,j),U=h.useRef("");function ie(Te){U.current=Te.pointerType}const se=X.useState("domReferenceElement");h.useEffect(()=>{$&&B&&B!==se&&X.set("domReferenceElement",B)},[B,se,X,$]);const{reference:Q}=FA(X,{enabled:!D&&!R&&!T&&w==="single",listRef:y.state.labelsRef,activeIndex:L,selectedIndex:H,onMatch(Te){const ke=y.state.valuesRef.current[Te];ke!==void 0&&y.state.setSelectedValue(ke,je("none"))}}),{reference:me}=Sp(X,{enabled:!R&&!T,event:"mousedown"}),{buttonRef:ve,getButtonProps:xe}=Yn({native:i,disabled:ee}),be={...d,open:D,disabled:ee,popupSide:te,listEmpty:Z,placeholder:w==="none"?!1:!V},Ce=Re(Te=>{y.set("triggerElement",Te)});return $e("button",t,{ref:[n,ve,Ce],state:be,props:[I,me,Q,{id:J,tabIndex:$?0:-1,role:$?"combobox":void 0,"aria-expanded":D?"true":"false","aria-haspopup":$?"dialog":"listbox","aria-controls":D?W?.id:void 0,"aria-required":$&&S||void 0,"aria-labelledby":ne,onPointerDown:ie,onPointerEnter:ie,onFocus(){g(!0),!(ee||R)&&G.start(0,y.state.forceMount)},onBlur(Te){if(!Xe(F,Te.relatedTarget)&&(m(!0),g(!1),v==="onBlur")){const ke=w==="none"?K:A;b.commit(ke)}},onMouseDown(Te){if(ee||R||($||X.set("domReferenceElement",Te.currentTarget),y.state.forceMount(),U.current!=="touch"&&(y.state.inputRef.current?.focus(),$||Te.preventDefault()),D))return;const ke=mt(Te.currentTarget);function ce(he){if(!B)return;const re=Ht(he),le=y.state.positionerElement,Oe=y.state.listElement;if(Xe(B,re)||Xe(le,re)||Xe(Oe,re)||re===B)return;const De=eL(B),Fe=he.clientX>=De.left-Vh&&he.clientX<=De.right+Vh,We=he.clientY>=De.top-Vh&&he.clientY<=De.bottom+Vh;Fe&&We||y.state.setOpen(!1,je("cancel-open",he))}$&&ke.addEventListener("mouseup",ce,{once:!0})},onKeyDown(Te){ee||R||(Te.key==="ArrowDown"||Te.key==="ArrowUp")&&(gn(Te),y.state.setOpen(!0,je(Yf,Te.nativeEvent)),y.state.inputRef.current?.focus())}},b?b.getValidationProps(c):c,xe],stateAttributesMapping:N0})});process.env.NODE_ENV!=="production"&&(up.displayName="ComboboxTrigger");const A0=h.createContext(null);process.env.NODE_ENV!=="production"&&(A0.displayName="GroupCollectionContext");function Eue(){return h.useContext(A0)}function wue(e){const{children:t,items:n}=e,r=h.useMemo(()=>({items:n}),[n]);return C.jsx(A0.Provider,{value:r,children:t})}function k0(e){const{children:t}=e,{filteredItems:n}=pi(),r=Eue(),o=r?r.items:n;return o?C.jsx(h.Fragment,{children:o.map(t)}):null}const $0=h.forwardRef(function(t,n){var r;const{render:o,className:i,style:s,children:a,...l}=t,c=Kn(),d=jv(),f=!!qv(!0),{filteredItems:m,hasItems:g}=pi(),v=pe(c,_e.selectionMode),b=pe(c,_e.grid),x=pe(c,_e.popupProps),y=pe(c,_e.virtualized),_=v==="multiple",w=m.length===0,T=Re(W=>{c.set("positionerElement",W)}),R=Re(W=>{c.set("listElement",W)}),S=h.useMemo(()=>typeof a=="function"?r||(r=C.jsx(k0,{children:a})):a,[a]),P={empty:w},N=d.useState("floatingId"),F=$e("div",t,{state:P,ref:[n,R,f?null:T],props:[x,{children:S,tabIndex:-1,id:N,role:b?"grid":"listbox","aria-multiselectable":_?"true":void 0,onKeyDown(W){if(!(c.state.disabled||c.state.readOnly)&&W.key==="Enter"){const I=c.state.activeIndex;if(I==null)return;gn(W);const B=W.nativeEvent,$=c.state.listRef.current[I];$&&(c.state.selectionEventRef.current=B,$.click(),c.state.selectionEventRef.current=null)}},onKeyDownCapture(){c.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){c.state.keyboardActiveRef.current=!1}},l]});return y?F:C.jsx(NC,{elementsRef:c.state.listRef,labelsRef:g?void 0:c.state.labelsRef,children:F})});process.env.NODE_ENV!=="production"&&($0.displayName="ComboboxList");const Cue="",Rue=200;function Sue(e){const t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT);let n=null;for(;t.nextNode();){const r=t.currentNode;r.nodeValue!==""&&(n=r)}return n}function XL(){const e=nn(),t=h.useRef(null);return h.useEffect(()=>{if(fv)return;const n=t.current;if(n==null)return;const r=Sue(n);if(r==null)return;const o=r.nodeValue??"",i=`${o}${Cue}`;return r.nodeValue=i,e.start(Rue,()=>{r.nodeValue===i&&(r.nodeValue=o)}),()=>{e.clear(),r.nodeValue===i&&(r.nodeValue=o)}},[t,e]),t}const F0=h.forwardRef(function(t,n){const{render:r,className:o,style:i,children:s,...a}=t,l=XL();return $e("div",t,{ref:[n,l],props:[{children:s,role:"status","aria-live":"polite","aria-atomic":!0},a]})});process.env.NODE_ENV!=="production"&&(F0.displayName="ComboboxStatus");const L0=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(L0.displayName="ComboboxPortalContext");function Pue(){const e=h.useContext(L0);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Portal> is missing.":gt(20));return e}const j0=h.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,i=Kn(),s=pe(i,_e.mounted),a=pe(i,_e.forceMounted);return s||r||a?C.jsx(L0.Provider,{value:r,children:C.jsx(Rp,{ref:n,...o})}):null});process.env.NODE_ENV!=="production"&&(j0.displayName="ComboboxPortal");const Tue={...br,...Hn},ZL=h.forwardRef(function(t,n){const{className:r,render:o,style:i,...s}=t,a=Kn(),l=pe(a,_e.open),c=pe(a,_e.mounted),d=pe(a,_e.transitionStatus);return $e("div",t,{state:{open:l,transitionStatus:d},ref:n,stateAttributesMapping:Tue,props:[{role:"presentation",hidden:!c,style:{userSelect:"none",WebkitUserSelect:"none"}},s]})});process.env.NODE_ENV!=="production"&&(ZL.displayName="ComboboxBackdrop");const q0=h.forwardRef(function(t,n){const{render:r,className:o,anchor:i,positionMethod:s="absolute",side:a="bottom",align:l="center",sideOffset:c=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:m=5,arrowPadding:g=5,sticky:v=!1,disableAnchorTracking:b=!1,collisionAvoidance:x=VD,style:y,..._}=t,w=Kn(),{filteredItems:T}=pi(),R=jv(),S=Pue(),P=pe(w,_e.modal),N=pe(w,_e.open),F=pe(w,_e.mounted),W=pe(w,_e.openMethod),I=pe(w,_e.positionerElement),B=pe(w,_e.triggerElement),$=pe(w,_e.inputElement),k=pe(w,_e.inputGroupElement),j=pe(w,_e.inputInsidePopup),D=pe(w,_e.transitionStatus),A=T.length===0,H=Kp({anchor:i??(j?B:k??$),floatingRootContext:R,positionMethod:s,mounted:F,side:a,sideOffset:c,align:l,alignOffset:d,arrowPadding:g,collisionBoundary:f,collisionPadding:m,sticky:v,disableAnchorTracking:b,keepMounted:S,collisionAvoidance:x,lazyFlip:!0});MC(N&&P,W==="touch",I,B);const V={open:N,side:H.side,align:H.align,anchorHidden:H.anchorHidden,empty:A};Ne(()=>{w.set("popupSide",H.side)},[w,H.side]);const X=Re(G=>{w.set("positionerElement",G)}),K=zp(t,V,{styles:H.positionerStyles,transitionStatus:D,props:_,refs:[n,X],hidden:!F,inert:!N});return C.jsxs(M0.Provider,{value:H,children:[F&&P&&C.jsx(Dp,{inert:Jl(!N),cutout:k??$??B}),K]})});process.env.NODE_ENV!=="production"&&(q0.displayName="ComboboxPositioner");const _ue={...br,...Hn},B0=h.forwardRef(function(t,n){const{render:r,className:o,style:i,initialFocus:s,finalFocus:a,...l}=t,c=Kn(),d=qv(),f=jv(),{filteredItems:m}=pi(),g=pe(c,_e.mounted),v=pe(c,_e.open),b=pe(c,_e.openMethod),x=pe(c,_e.transitionStatus),y=pe(c,_e.inputInsidePopup),_=pe(c,_e.inputElement),w=pe(c,_e.modal),T=m.length===0;sr({open:v,ref:c.state.popupRef,onComplete(){v&&c.state.onOpenChangeComplete(!0)}});const R={open:v,side:d.side,align:d.align,anchorHidden:d.anchorHidden,transitionStatus:x,empty:T},S=$e("div",t,{state:R,ref:[n,c.state.popupRef],props:[{role:y?"dialog":"presentation",tabIndex:-1,onFocus(I){const B=Ht(I.nativeEvent);b!=="touch"&&(Xe(c.state.listElement,B)||B===I.currentTarget)&&c.state.inputRef.current?.focus()}},Up(x),l],stateAttributesMapping:_ue}),N=s===void 0?y?I=>I==="touch"?c.state.popupRef.current:_:!1:s;let F;a!=null?F=a:F=y?void 0:!1;const W=!y||w;return C.jsx(gv,{context:f,disabled:!g,modal:W,openInteractionType:b,initialFocus:N,returnFocus:F,getInsideElements:()=>[c.state.startDismissRef.current,c.state.endDismissRef.current],children:C.jsxs(h.Fragment,{children:[S,W&&C.jsx(I0,{ref:c.state.endDismissRef})]})})});process.env.NODE_ENV!=="production"&&(B0.displayName="ComboboxPopup");const JL=h.forwardRef(function(t,n){const{className:r,render:o,style:i,...s}=t,a=Kn(),{arrowRef:l,side:c,align:d,arrowUncentered:f,arrowStyles:m}=qv(),v={open:pe(a,_e.open),side:c,align:d,uncentered:f};return $e("div",t,{ref:[l,n],stateAttributesMapping:br,state:v,props:{style:m,"aria-hidden":!0,...s}})});process.env.NODE_ENV!=="production"&&(JL.displayName="ComboboxArrow");const V0=h.forwardRef(function(t,n){const{className:r,render:o,style:i,...s}=t;return $e("span",t,{ref:n,props:[{"aria-hidden":!0,children:"▼"},s]})});process.env.NODE_ENV!=="production"&&(V0.displayName="ComboboxIcon");const W0=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(W0.displayName="ComboboxGroupContext");function Nue(){const e=h.useContext(W0);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxGroupContext is missing. ComboboxGroup parts must be placed within <Combobox.Group>.":gt(18));return e}const H0=h.forwardRef(function(t,n){const{render:r,className:o,style:i,items:s,...a}=t,[l,c]=h.useState(),d=h.useMemo(()=>({labelId:l,setLabelId:c,items:s}),[l,c,s]),f=$e("div",t,{ref:n,props:[{role:"group","aria-labelledby":l},a]}),m=C.jsx(W0.Provider,{value:d,children:f});return s?C.jsx(wue,{items:s,children:m}):m});process.env.NODE_ENV!=="production"&&(H0.displayName="ComboboxGroup");const K0=h.forwardRef(function(t,n){const{render:r,className:o,style:i,id:s,...a}=t,{setLabelId:l}=Nue(),c=bn(s);return Ne(()=>(l(c),()=>{l(void 0)}),[c,l]),$e("div",t,{ref:n,props:[{id:c},a]})});process.env.NODE_ENV!=="production"&&(K0.displayName="ComboboxGroupLabel");const U0=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(U0.displayName="ComboboxItemContext");function QL(){const e=h.useContext(U0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxItemContext is missing. ComboboxItem parts must be placed within <Combobox.Item>.":gt(19));return e}const z0=h.createContext(!1);process.env.NODE_ENV!=="production"&&(z0.displayName="ComboboxRowContext");function Oue(){return h.useContext(z0)}const G0=h.memo(h.forwardRef(function(t,n){const{render:r,className:o,value:i=null,index:s,disabled:a=!1,nativeButton:l=!1,style:c,...d}=t,f=h.useRef(!1),m=h.useRef(null),g=$C({index:s,textRef:m,indexGuessBehavior:kC.GuessFromOrder}),v=Kn(),b=Oue(),{flatFilteredItems:x,hasItems:y}=pi(),_=pe(v,_e.open),w=pe(v,_e.selectionMode),T=pe(v,_e.readOnly),R=pe(v,_e.virtualized),S=pe(v,_e.isItemEqualToValue),P=w!=="none",N=s??(R?Ki(x,i,S):g.index),F=g.index!==-1,W=pe(v,_e.id),I=pe(v,_e.isActive,N),B=pe(v,_e.isSelected,i),$=pe(v,_e.getItemProps),k=h.useRef(null),j=W!=null&&F?`${W}-${N}`:void 0,D=B&&P;Ne(()=>{if(!(F&&(R||s!=null)))return;const te=v.state.listRef.current;return te[N]=k.current,()=>{delete te[N]}},[F,R,N,s,v]),Ne(()=>{if(!F||y)return;const Z=v.state.valuesRef.current;return Z[N]=i,w!=="none"&&v.state.allValuesRef.current.push(i),()=>{delete Z[N]}},[F,y,N,i,v,w]),Ne(()=>{if(!_){f.current=!1;return}if(!F||y)return;const Z=v.state.selectedValue,te=Array.isArray(Z)?Z[Z.length-1]:Z;si(i,te,S)&&v.set("selectedIndex",N)},[F,y,_,v,N,i,S]);const A={disabled:a,selected:D,highlighted:I},L=$({active:I,selected:D});L.id=void 0,L.onFocus=void 0;const{getButtonProps:H,buttonRef:V}=Yn({disabled:a,focusableWhenDisabled:!0,native:l,composite:!0});function X(Z){function te(){v.state.handleSelection(Z,i)}v.state.submitOnItemClick?(Rn.flushSync(te),v.state.requestSubmit()):te()}const K={id:j,role:b?"gridcell":"option","aria-selected":P?D:void 0,tabIndex:void 0,onPointerDownCapture(Z){f.current=!0,Z.preventDefault()},onMouseDown(Z){Z.preventDefault()},onClick(Z){a||T||X(Z.nativeEvent)},onMouseUp(Z){const te=f.current;f.current=!1,!(a||T||Z.button!==0||te||!I)&&X(Z.nativeEvent)}},G=$e("div",t,{ref:[V,n,g.ref,k],state:A,props:[L,K,d,H]}),ee=h.useMemo(()=>({selected:D,textRef:m}),[D,m]);return C.jsx(U0.Provider,{value:ee,children:G})}));process.env.NODE_ENV!=="production"&&(G0.displayName="ComboboxItem");const Y0=h.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:o}=QL();return r||o?C.jsx(e2,{...t,ref:n}):null});process.env.NODE_ENV!=="production"&&(Y0.displayName="ComboboxItemIndicator");const e2=h.memo(h.forwardRef((e,t)=>{const{render:n,className:r,style:o,keepMounted:i,...s}=e,{selected:a}=QL(),l=h.useRef(null),{transitionStatus:c,setMounted:d}=$o(a),m=$e("span",e,{ref:[t,l],state:{selected:a,transitionStatus:c},props:[{"aria-hidden":!0,children:"✔️"},s],stateAttributesMapping:Hn});return sr({open:a,ref:l,onComplete(){a||d(!1)}}),m}));process.env.NODE_ENV!=="production"&&(e2.displayName="Inner");const X0=h.forwardRef(function(t,n){const{render:r,className:o,style:i,...s}=t,a=Kn(),l=pe(a,_e.open),c=pe(a,_e.hasSelectionChips),[d,f]=h.useState(void 0);l&&d!==void 0&&f(void 0);const m=h.useRef([]),g=$e("div",t,{ref:[n,a.state.chipsContainerRef],props:[c?{role:"toolbar"}:rn,{onMouseDown(b){YL(b,a,a.state.disabled,a.state.readOnly)}},s]}),v=h.useMemo(()=>({highlightedChipIndex:d,setHighlightedChipIndex:f,chipsRef:m}),[d,f,m]);return C.jsx(O0.Provider,{value:v,children:C.jsx(NC,{elementsRef:m,children:g})})});process.env.NODE_ENV!=="production"&&(X0.displayName="ComboboxChips");const Z0=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(Z0.displayName="ComboboxChipContext");function Mue(){const e=h.useContext(Z0);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"useComboboxChipContext must be used within a ComboboxChip":gt(17));return e}const J0=h.forwardRef(function(t,n){const{render:r,className:o,style:i,...s}=t,a=Kn(),{setHighlightedChipIndex:l,chipsRef:c}=GL(),d=pe(a,_e.disabled),f=pe(a,_e.readOnly),m=pe(a,_e.selectedValue),{ref:g,index:v}=$C();function b(w){let T=v;if(w.key==="ArrowLeft")w.preventDefault(),v>0?T=v-1:T=void 0;else if(w.key==="ArrowRight")w.preventDefault(),v<c.current.length-1?T=v+1:T=void 0;else if(w.key==="Backspace"||w.key==="Delete"){const R=v>=m.length-1?m.length-2:v;T=R>=0?R:void 0,gn(w),a.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),a.state.setSelectedValue(m.filter((S,P)=>P!==v),je(vn,w.nativeEvent))}else w.key==="Enter"||w.key===" "?(gn(w),T=void 0):w.key==="ArrowDown"||w.key==="ArrowUp"?(gn(w),a.state.setOpen(!0,je(Yf,w.nativeEvent)),T=void 0):w.key.length===1&&!w.ctrlKey&&!w.metaKey&&!w.altKey&&(T=void 0);return T}const y=$e("div",t,{ref:[n,g],state:{disabled:d},props:[{tabIndex:-1,"aria-disabled":d||void 0,"aria-readonly":f||void 0,onKeyDown(w){if(d||f)return;const T=b(w);Rn.flushSync(()=>{l(T)}),T===void 0?a.state.inputRef.current?.focus():c.current[T]?.focus()}},s]}),_=h.useMemo(()=>({index:v}),[v]);return C.jsx(Z0.Provider,{value:_,children:y})});process.env.NODE_ENV!=="production"&&(J0.displayName="ComboboxChip");const Q0=h.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:s=!0,style:a,...l}=t,c=Kn(),{index:d}=Mue(),f=pe(c,_e.disabled),m=pe(c,_e.readOnly),g=pe(c,_e.selectedValue),v=pe(c,_e.isItemEqualToValue),b=f||i,{buttonRef:x,getButtonProps:y}=Yn({native:s,disabled:b||m,focusableWhenDisabled:!0}),_={disabled:b};function w(S){const P=c.state.activeIndex;if(P==null)return;const N=Ki(c.state.valuesRef.current,S,v);N!==-1&&P===N&&c.state.setIndices({activeIndex:null,type:c.state.keyboardActiveRef.current?"keyboard":"pointer"})}function T(S){const P=je(vH,S.nativeEvent),N=g[d];return w(N),c.state.setSelectedValue(g.filter((F,W)=>W!==d),P),c.state.inputRef.current?.focus(),P}return $e("button",t,{ref:[n,x],state:_,props:[{tabIndex:-1,onMouseDown(S){S.preventDefault()},onClick(S){if(b||m)return;T(S).isPropagationAllowed||S.stopPropagation()},onKeyDown(S){b||m||(S.key==="Enter"||S.key===" ")&&(T(S).isPropagationAllowed||gn(S))}},l,y]})});process.env.NODE_ENV!=="production"&&(Q0.displayName="ComboboxChipRemove");const eR=h.forwardRef(function(t,n){const{render:r,className:o,style:i,...s}=t,a=$e("div",t,{ref:n,props:[{role:"row"},s]});return C.jsx(z0.Provider,{value:!0,children:a})});process.env.NODE_ENV!=="production"&&(eR.displayName="ComboboxRow");const tR=h.forwardRef(function(t,n){const{render:r,className:o,style:i,children:s,...a}=t,{filteredItems:l}=pi(),c=Kn(),d=XL(),f=l.length===0?s:null;return $e("div",t,{ref:[n,c.state.emptyRef,d],props:[{children:f,role:"status","aria-live":"polite","aria-atomic":!0},a]})});process.env.NODE_ENV!=="production"&&(tR.displayName="ComboboxEmpty");const Iue={...Hn,...Np},nR=h.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:s=!0,keepMounted:a=!1,style:l,...c}=t,{disabled:d}=Sn(),f=Kn(),m=pe(f,_e.selectionMode),g=pe(f,_e.disabled),v=pe(f,_e.readOnly),b=pe(f,_e.open),x=pe(f,_e.selectedValue),y=pe(f,_e.hasSelectionChips),_=_0();let w=!1;m==="none"?w=_!=="":m==="single"?w=x!=null:w=y;const T=d||g||i,{buttonRef:R,getButtonProps:S}=Yn({native:s,disabled:T}),{mounted:P,transitionStatus:N,setMounted:F}=$o(w),W={disabled:T,open:b,transitionStatus:N};sr({open:w,ref:f.state.clearRef,onComplete(){w||F(!1)}});const I=$e("button",t,{state:W,ref:[n,R,f.state.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown($){$.preventDefault()},onClick($){if(T||v)return;const k=f.state.keyboardActiveRef;f.state.setInputValue("",je(Q1,$.nativeEvent)),m!=="none"?(f.state.setSelectedValue(Array.isArray(x)?[]:null,je(Q1,$.nativeEvent)),f.state.setIndices({activeIndex:null,selectedIndex:null,type:k.current?"keyboard":"pointer"})):f.state.setIndices({activeIndex:null,type:k.current?"keyboard":"pointer"}),f.state.inputRef.current?.focus()}},c,S],stateAttributesMapping:Iue});return a||P?I:null});process.env.NODE_ENV!=="production"&&(nR.displayName="ComboboxClear");function Due(){return pi().filteredItems}const Aue=Object.freeze(Object.defineProperty({__proto__:null,Arrow:JL,Backdrop:ZL,Chip:J0,ChipRemove:Q0,Chips:X0,Clear:nR,Collection:k0,Empty:tR,Group:H0,GroupLabel:K0,Icon:V0,Input:Zp,InputGroup:D0,Item:G0,ItemIndicator:Y0,Label:zL,List:$0,Popup:B0,Portal:j0,Positioner:q0,Root:UL,Row:eR,Separator:Va,Status:F0,Trigger:up,Value:Hg,useFilter:HL,useFilteredItems:Due},Symbol.toStringTag,{value:"Module"})),rR=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(rR.displayName="ScrollAreaRootContext");function Jp(){const e=h.useContext(rR);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ScrollAreaRootContext is missing. ScrollArea parts must be placed within <ScrollArea.Root>.":gt(53));return e}let Kg=(function(e){return e.scrollAreaCornerHeight="--scroll-area-corner-height",e.scrollAreaCornerWidth="--scroll-area-corner-width",e})({});const Wh=500,lI=16;function lo(e,t,n){if(!e)return 0;const r=getComputedStyle(e),o=n==="x"?"Inline":"Block";return n==="x"&&t==="margin"?parseFloat(r[`${t}InlineStart`])*2:parseFloat(r[`${t}${o}Start`])+parseFloat(r[`${t}${o}End`])}let kue=(function(e){return e.orientation="data-orientation",e.hovering="data-hovering",e.scrolling="data-scrolling",e.hasOverflowX="data-has-overflow-x",e.hasOverflowY="data-has-overflow-y",e.overflowXStart="data-overflow-x-start",e.overflowXEnd="data-overflow-x-end",e.overflowYStart="data-overflow-y-start",e.overflowYEnd="data-overflow-y-end",e})({}),bl=(function(e){return e.scrolling="data-scrolling",e.hasOverflowX="data-has-overflow-x",e.hasOverflowY="data-has-overflow-y",e.overflowXStart="data-overflow-x-start",e.overflowXEnd="data-overflow-x-end",e.overflowYStart="data-overflow-y-start",e.overflowYEnd="data-overflow-y-end",e})({});const Bv={hasOverflowX:e=>e?{[bl.hasOverflowX]:""}:null,hasOverflowY:e=>e?{[bl.hasOverflowY]:""}:null,overflowXStart:e=>e?{[bl.overflowXStart]:""}:null,overflowXEnd:e=>e?{[bl.overflowXEnd]:""}:null,overflowYStart:e=>e?{[bl.overflowYStart]:""}:null,overflowYEnd:e=>e?{[bl.overflowYEnd]:""}:null,cornerHidden:()=>null},$ue={x:0,y:0},uI={width:0,height:0},Fue={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},Lue={x:!0,y:!0,corner:!0},oR=h.forwardRef(function(t,n){const{render:r,className:o,overflowEdgeThreshold:i,style:s,...a}=t,l=jue(i),c=bn(),d=nn(),f=nn(),{nonce:m,disableStyleElements:g}=cL(),[v,b]=h.useState(!1),[x,y]=h.useState(!1),[_,w]=h.useState(!1),[T,R]=h.useState(!1),[S,P]=h.useState(!1),[N,F]=h.useState(uI),[W,I]=h.useState(uI),[B,$]=h.useState(Fue),[k,j]=h.useState(Lue),D=h.useRef(null),A=h.useRef(null),L=h.useRef(null),H=h.useRef(null),V=h.useRef(null),X=h.useRef(null),K=h.useRef(null),G=h.useRef(!1),ee=h.useRef(0),Z=h.useRef(0),te=h.useRef(0),J=h.useRef(0),ne=h.useRef("vertical"),U=h.useRef($ue),ie=Re(ke=>{const ce=ke.x-U.current.x,he=ke.y-U.current.y;U.current=ke,he!==0&&(w(!0),d.start(Wh,()=>{w(!1)})),ce!==0&&(y(!0),f.start(Wh,()=>{y(!1)}))}),se=Re(ke=>{ke.button===0&&(G.current=!0,ee.current=ke.clientY,Z.current=ke.clientX,ne.current=ke.currentTarget.getAttribute(kue.orientation),A.current&&(te.current=A.current.scrollTop,J.current=A.current.scrollLeft),V.current&&ne.current==="vertical"&&V.current.setPointerCapture(ke.pointerId),X.current&&ne.current==="horizontal"&&X.current.setPointerCapture(ke.pointerId))}),Q=Re(ke=>{if(!G.current)return;const ce=ke.clientY-ee.current,he=ke.clientX-Z.current;if(A.current){const re=A.current.scrollHeight,le=A.current.clientHeight,Oe=A.current.scrollWidth,De=A.current.clientWidth;if(V.current&&L.current&&ne.current==="vertical"){const Fe=lo(L.current,"padding","y"),We=lo(V.current,"margin","y"),ze=V.current.offsetHeight,He=L.current.offsetHeight-ze-Fe-We,Ze=ce/He;A.current.scrollTop=te.current+Ze*(re-le),ke.preventDefault(),w(!0),d.start(Wh,()=>{w(!1)})}if(X.current&&H.current&&ne.current==="horizontal"){const Fe=lo(H.current,"padding","x"),We=lo(X.current,"margin","x"),ze=X.current.offsetWidth,He=H.current.offsetWidth-ze-Fe-We,Ze=he/He;A.current.scrollLeft=J.current+Ze*(Oe-De),ke.preventDefault(),y(!0),f.start(Wh,()=>{y(!1)})}}}),me=Re(ke=>{G.current=!1,V.current&&ne.current==="vertical"&&V.current.releasePointerCapture(ke.pointerId),X.current&&ne.current==="horizontal"&&X.current.releasePointerCapture(ke.pointerId)});function ve(ke){R(ke.pointerType==="touch")}function xe(ke){if(ve(ke),ke.pointerType!=="touch"){const ce=Xe(D.current,ke.target);b(ce)}}const be=h.useMemo(()=>({scrolling:x||_,hasOverflowX:!k.x,hasOverflowY:!k.y,overflowXStart:B.xStart,overflowXEnd:B.xEnd,overflowYStart:B.yStart,overflowYEnd:B.yEnd,cornerHidden:k.corner}),[x,_,k.x,k.y,k.corner,B]),Ce={role:"presentation",onPointerEnter:xe,onPointerMove:xe,onPointerDown:ve,onPointerLeave(){b(!1)},style:{position:"relative",[Kg.scrollAreaCornerHeight]:`${N.height}px`,[Kg.scrollAreaCornerWidth]:`${N.width}px`}},qe=$e("div",t,{state:be,ref:[n,D],props:[Ce,a],stateAttributesMapping:Bv}),Te=h.useMemo(()=>({handlePointerDown:se,handlePointerMove:Q,handlePointerUp:me,handleScroll:ie,cornerSize:N,setCornerSize:F,thumbSize:W,setThumbSize:I,hasMeasuredScrollbar:S,setHasMeasuredScrollbar:P,touchModality:T,cornerRef:K,scrollingX:x,setScrollingX:y,scrollingY:_,setScrollingY:w,hovering:v,setHovering:b,viewportRef:A,rootRef:D,scrollbarYRef:L,scrollbarXRef:H,thumbYRef:V,thumbXRef:X,rootId:c,hiddenState:k,setHiddenState:j,overflowEdges:B,setOverflowEdges:$,viewportState:be,overflowEdgeThreshold:l}),[se,Q,me,ie,N,W,S,T,x,y,_,w,v,b,c,k,B,be,l]);return C.jsxs(rR.Provider,{value:Te,children:[!g&&Hl.getElement(m),qe]})});process.env.NODE_ENV!=="production"&&(oR.displayName="ScrollAreaRoot");function jue(e){if(typeof e=="number"){const t=Math.max(0,e);return{xStart:t,xEnd:t,yStart:t,yEnd:t}}return{xStart:Math.max(0,e?.xStart||0),xEnd:Math.max(0,e?.xEnd||0),yStart:Math.max(0,e?.yStart||0),yEnd:Math.max(0,e?.yEnd||0)}}const iR=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(iR.displayName="ScrollAreaViewportContext");function que(){const e=h.useContext(iR);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ScrollAreaViewportContext missing. ScrollAreaViewport parts must be placed within <ScrollArea.Viewport>.":gt(55));return e}let Rs=(function(e){return e.scrollAreaOverflowXStart="--scroll-area-overflow-x-start",e.scrollAreaOverflowXEnd="--scroll-area-overflow-x-end",e.scrollAreaOverflowYStart="--scroll-area-overflow-y-start",e.scrollAreaOverflowYEnd="--scroll-area-overflow-y-end",e})({}),cI=!1;function Bue(){cI||Ul||(typeof CSS<"u"&&"registerProperty"in CSS&&[Rs.scrollAreaOverflowXStart,Rs.scrollAreaOverflowXEnd,Rs.scrollAreaOverflowYStart,Rs.scrollAreaOverflowYEnd].forEach(e=>{try{CSS.registerProperty({name:e,syntax:"<length>",inherits:!1,initialValue:"0px"})}catch{}}),cI=!0)}const sR=h.forwardRef(function(t,n){const{render:r,className:o,style:i,...s}=t,{viewportRef:a,scrollbarYRef:l,scrollbarXRef:c,thumbYRef:d,thumbXRef:f,cornerRef:m,cornerSize:g,setCornerSize:v,setThumbSize:b,rootId:x,setHiddenState:y,hiddenState:_,setHasMeasuredScrollbar:w,handleScroll:T,setHovering:R,setOverflowEdges:S,overflowEdges:P,overflowEdgeThreshold:N,scrollingX:F,scrollingY:W}=Jp(),I=ou(),B=h.useRef(!0),$=h.useRef([NaN,NaN,NaN,NaN]),k=nn(),j=nn(),D=Re(()=>{const K=a.current,G=l.current,ee=c.current,Z=d.current,te=f.current,J=m.current;if(!K)return;const ne=K.scrollHeight,U=K.scrollWidth,ie=K.clientHeight,se=K.clientWidth,Q=K.scrollTop,me=K.scrollLeft,ve=$.current,xe=Number.isNaN(ve[0]);if(ve[0]=ie,ve[1]=ne,ve[2]=se,ve[3]=U,xe&&w(!0),ne===0||U===0)return;const be=Vue(K),Ce=be.y,qe=be.x,Te=se/U,ke=ie/ne,ce=Math.max(0,U-se),he=Math.max(0,ne-ie);let re=0,le=0;if(!qe){let Ee=0;I==="rtl"?Ee=To(-me,0,ce):Ee=To(me,0,ce),re=Wl(Ee,ce),le=ce-re}const Oe=Ce?0:To(Q,0,he),De=Ce?0:Wl(Oe,he),Fe=Ce?0:he-De,We=qe?0:se,ze=Ce?0:ie;let He=0,Ze=0;!qe&&!Ce&&(He=G?.offsetWidth||0,Ze=ee?.offsetHeight||0);const nt=g.width===0&&g.height===0,ht=nt?He:0,Je=nt?Ze:0,Ge=lo(ee,"padding","x"),dt=lo(G,"padding","y"),rt=lo(te,"margin","x"),Ve=lo(Z,"margin","y"),Me=We-Ge-rt,Be=ze-dt-Ve,Ie=ee?Math.min(ee.offsetWidth-ht,Me):Me,tt=G?Math.min(G.offsetHeight-Je,Be):Be,at=Math.max(lI,Ie*Te),Le=Math.max(lI,tt*ke);if(b(Ee=>Ee.height===Le&&Ee.width===at?Ee:{width:at,height:Le}),G&&Z){const Ee=G.offsetHeight-Le-dt-Ve,Rt=ne-ie,wn=Rt===0?0:Q/Rt,yt=Math.min(Ee,Math.max(0,wn*Ee));Z.style.transform=`translate3d(0,${yt}px,0)`}if(ee&&te){const Ee=ee.offsetWidth-at-Ge-rt,Rt=U-se,wn=Rt===0?0:me/Rt,yt=I==="rtl"?To(wn*Ee,-Ee,0):To(wn*Ee,0,Ee);te.style.transform=`translate3d(${yt}px,0,0)`}const En=[[Rs.scrollAreaOverflowXStart,re],[Rs.scrollAreaOverflowXEnd,le],[Rs.scrollAreaOverflowYStart,De],[Rs.scrollAreaOverflowYEnd,Fe]];for(const[Ee,Rt]of En)K.style.setProperty(Ee,`${Rt}px`);J&&(qe||Ce?v({width:0,height:0}):!qe&&!Ce&&v({width:He,height:Ze})),y(Ee=>Wue(Ee,be));const zt={xStart:!qe&&re>N.xStart,xEnd:!qe&&le>N.xEnd,yStart:!Ce&&De>N.yStart,yEnd:!Ce&&Fe>N.yEnd};S(Ee=>Ee.xStart===zt.xStart&&Ee.xEnd===zt.xEnd&&Ee.yStart===zt.yStart&&Ee.yEnd===zt.yEnd?Ee:zt)});Ne(()=>{a.current&&Bue()},[a]),Ne(()=>{queueMicrotask(D)},[D,_,I]),Ne(()=>{a.current?.matches(":hover")&&R(!0)},[a,R]),h.useEffect(()=>{const K=a.current;if(typeof ResizeObserver>"u"||!K)return;let G=!1;const ee=new ResizeObserver(()=>{if(!G){G=!0;const Z=$.current;if(Z[0]===K.clientHeight&&Z[1]===K.scrollHeight&&Z[2]===K.clientWidth&&Z[3]===K.scrollWidth)return}D()});return ee.observe(K),j.start(0,()=>{const Z=K.getAnimations({subtree:!0});Z.length!==0&&Promise.allSettled(Z.map(te=>te.finished)).then(D).catch(()=>{})}),()=>{ee.disconnect(),j.clear()}},[D,a,j]);function A(){B.current=!1}const L={role:"presentation",...x&&{"data-id":`${x}-viewport`},tabIndex:_.x&&_.y?-1:0,className:Hl.className,style:{overflow:"scroll"},onScroll(){a.current&&(D(),B.current||T({x:a.current.scrollLeft,y:a.current.scrollTop}),k.start(100,()=>{B.current=!0}))},onWheel:A,onTouchMove:A,onPointerMove:A,onPointerEnter:A,onKeyDown:A},H=h.useMemo(()=>({scrolling:F||W,hasOverflowX:!_.x,hasOverflowY:!_.y,overflowXStart:P.xStart,overflowXEnd:P.xEnd,overflowYStart:P.yStart,overflowYEnd:P.yEnd,cornerHidden:_.corner}),[F,W,_.x,_.y,_.corner,P]),V=$e("div",t,{ref:[n,a],state:H,props:[L,s],stateAttributesMapping:Bv}),X=h.useMemo(()=>({computeThumbPosition:D}),[D]);return C.jsx(iR.Provider,{value:X,children:V})});process.env.NODE_ENV!=="production"&&(sR.displayName="ScrollAreaViewport");function Vue(e){const t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function Wue(e,t){return e.y===t.y&&e.x===t.x&&e.corner===t.corner?e:t}const aR=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(aR.displayName="ScrollAreaScrollbarContext");function Hue(){const e=h.useContext(aR);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ScrollAreaScrollbarContext is missing. ScrollAreaScrollbar parts must be placed within <ScrollArea.Scrollbar>.":gt(54));return e}let Ug=(function(e){return e.scrollAreaThumbHeight="--scroll-area-thumb-height",e.scrollAreaThumbWidth="--scroll-area-thumb-width",e})({});const lR=h.forwardRef(function(t,n){const{render:r,className:o,orientation:i="vertical",keepMounted:s=!1,style:a,...l}=t,{hovering:c,scrollingX:d,scrollingY:f,hiddenState:m,overflowEdges:g,scrollbarYRef:v,scrollbarXRef:b,viewportRef:x,thumbYRef:y,thumbXRef:_,handlePointerDown:w,handlePointerUp:T,rootId:R,thumbSize:S,hasMeasuredScrollbar:P}=Jp(),N={hovering:c,scrolling:{horizontal:d,vertical:f}[i],orientation:i,hasOverflowX:!m.x,hasOverflowY:!m.y,overflowXStart:g.xStart,overflowXEnd:g.xEnd,overflowYStart:g.yStart,overflowYEnd:g.yEnd,cornerHidden:m.corner},F=ou(),W=!P&&!s;h.useEffect(()=>{const D=x.current,A=i==="vertical"?v.current:b.current;if(!A)return;function L(H){if(!(!D||!A||H.ctrlKey)){if(H.preventDefault(),i==="vertical"){if(D.scrollTop===0&&H.deltaY<0)return}else if(D.scrollLeft===0&&H.deltaX<0)return;if(i==="vertical"){if(D.scrollTop===D.scrollHeight-D.clientHeight&&H.deltaY>0)return}else if(D.scrollLeft===D.scrollWidth-D.clientWidth&&H.deltaX>0)return;i==="vertical"?D.scrollTop+=H.deltaY:D.scrollLeft+=H.deltaX}}return ut(A,"wheel",L,{passive:!1})},[i,b,v,x]);const I={...R&&{"data-id":`${R}-scrollbar`},onPointerDown(D){if(D.button!==0)return;const A=Ht(D.nativeEvent),L=i==="vertical"?y.current:_.current;if(!(L&&Xe(L,A))&&x.current){if(y.current&&v.current&&i==="vertical"){const H=lo(y.current,"margin","y"),V=lo(v.current,"padding","y"),X=y.current.offsetHeight,K=v.current.getBoundingClientRect(),G=D.clientY-K.top-X/2-V+H/2,ee=x.current.scrollHeight,Z=x.current.clientHeight,te=v.current.offsetHeight-X-V-H,ne=G/te*(ee-Z);x.current.scrollTop=ne}if(_.current&&b.current&&i==="horizontal"){const H=lo(_.current,"margin","x"),V=lo(b.current,"padding","x"),X=_.current.offsetWidth,K=b.current.getBoundingClientRect(),G=D.clientX-K.left-X/2-V+H/2,ee=x.current.scrollWidth,Z=x.current.clientWidth,te=b.current.offsetWidth-X-V-H,J=G/te;let ne;F==="rtl"?(ne=(1-J)*(ee-Z),x.current.scrollLeft<=0&&(ne=-ne)):ne=J*(ee-Z),x.current.scrollLeft=ne}w(D)}},onPointerUp:T,style:{position:"absolute",touchAction:"none",WebkitUserSelect:"none",userSelect:"none",visibility:W?"hidden":void 0,...i==="vertical"&&{top:0,bottom:`var(${Kg.scrollAreaCornerHeight})`,insetInlineEnd:0,[Ug.scrollAreaThumbHeight]:`${S.height}px`},...i==="horizontal"&&{insetInlineStart:0,insetInlineEnd:`var(${Kg.scrollAreaCornerWidth})`,bottom:0,[Ug.scrollAreaThumbWidth]:`${S.width}px`}}},B=$e("div",t,{ref:[n,i==="vertical"?v:b],state:N,props:[I,l],stateAttributesMapping:Bv}),$=h.useMemo(()=>({orientation:i}),[i]),k=i==="vertical"?m.y:m.x;return s||!k?C.jsx(aR.Provider,{value:$,children:B}):null});process.env.NODE_ENV!=="production"&&(lR.displayName="ScrollAreaScrollbar");const t2=h.forwardRef(function(t,n){const{render:r,className:o,style:i,...s}=t,a=h.useRef(null),{computeThumbPosition:l}=que(),{viewportState:c}=Jp();return Ne(()=>{if(typeof ResizeObserver>"u")return;let f=!1;const m=new ResizeObserver(()=>{if(!f){f=!0;return}l()});return a.current&&m.observe(a.current),()=>{m.disconnect()}},[l]),$e("div",t,{ref:[n,a],state:c,stateAttributesMapping:Bv,props:[{role:"presentation",style:{minWidth:"fit-content"}},s]})});process.env.NODE_ENV!=="production"&&(t2.displayName="ScrollAreaContent");const uR=h.forwardRef(function(t,n){const{render:r,className:o,style:i,...s}=t,{thumbYRef:a,thumbXRef:l,handlePointerDown:c,handlePointerMove:d,handlePointerUp:f,setScrollingX:m,setScrollingY:g,hasMeasuredScrollbar:v}=Jp(),{orientation:b}=Hue();return $e("div",t,{ref:[n,b==="vertical"?a:l],state:{orientation:b},props:[{onPointerDown:c,onPointerMove:d,onPointerUp(_){b==="vertical"&&g(!1),b==="horizontal"&&m(!1),f(_)},style:{visibility:v?void 0:"hidden",...b==="vertical"&&{height:`var(${Ug.scrollAreaThumbHeight})`},...b==="horizontal"&&{width:`var(${Ug.scrollAreaThumbWidth})`}}},s]})});process.env.NODE_ENV!=="production"&&(uR.displayName="ScrollAreaThumb");const cR=h.forwardRef(function(t,n){const{render:r,className:o,style:i,...s}=t,{cornerRef:a,cornerSize:l,hiddenState:c}=Jp(),d=$e("div",t,{ref:[n,a],props:[{style:{position:"absolute",bottom:0,insetInlineEnd:0,width:l.width,height:l.height}},s]});return c.corner?null:d});process.env.NODE_ENV!=="production"&&(cR.displayName="ScrollAreaCorner");const Kue=Object.freeze(Object.defineProperty({__proto__:null,Content:t2,Corner:cR,Root:oR,Scrollbar:lR,Thumb:uR,Viewport:sR},Symbol.toStringTag,{value:"Module"}));function n2({className:e,children:t,scrollFade:n=!1,scrollbarGutter:r=!1,...o}){return C.jsxs(oR,{className:ue("size-full min-h-0",e),...o,children:[C.jsx(sR,{className:ue("h-full rounded-[inherit] outline-none transition-shadows focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background data-has-overflow-y:overscroll-y-contain data-has-overflow-x:overscroll-x-contain",n&&"mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]",r&&"data-has-overflow-y:pe-2.5 data-has-overflow-x:pb-2.5"),"data-slot":"scroll-area-viewport",children:t}),C.jsx(bE,{orientation:"vertical"}),C.jsx(bE,{orientation:"horizontal"}),C.jsx(cR,{"data-slot":"scroll-area-corner"})]})}function bE({className:e,orientation:t="vertical",...n}){return C.jsx(lR,{className:ue("m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100",e),"data-slot":"scroll-area-scrollbar",orientation:t,...n,children:C.jsx(uR,{className:"relative flex-1 rounded-full bg-foreground/20","data-slot":"scroll-area-thumb"})})}const Qp=h.createContext({chipsRef:null,multiple:!1});function r2({onChange:e,...t}){const n=h.useRef(null);return C.jsx(Qp.Provider,{value:{chipsRef:n,multiple:!!t.multiple},children:C.jsx(UL,{onValueChange:e,...t})})}function o2({className:e,...t}){return C.jsx(Zp,{className:ue("min-w-12 flex-1 text-base outline-none placeholder:text-muted-foreground sm:text-sm [[data-slot=combobox-chip]+&]:ps-0.5",e),"data-slot":"combobox-chips-input",...t})}function i2({className:e,showTrigger:t=!0,showClear:n=!1,startAddon:r,triggerProps:o,clearProps:i,...s}){return C.jsxs(D0,{className:"relative not-has-[>*.w-full]:w-fit w-full text-foreground has-disabled:opacity-64","data-slot":"combobox-input-group",children:[r&&C.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-y-0 start-px z-10 flex items-center ps-[calc(--spacing(3)-1px)] opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:-mx-0.5","data-slot":"combobox-start-addon",children:r}),C.jsx(Zp,{className:ue(r&&"*:data-[slot=combobox-input]:ps-[calc(--spacing(8.5)-1px)] sm:*:data-[slot=combobox-input]:ps-[calc(--spacing(8)-1px)]","pr-6",e),"data-slot":"combobox-input",render:a=>C.jsx(vL,{className:"has-disabled:opacity-100",nativeInput:!0,...a,onChange:(l,c)=>a?.onChange?.(c)}),...s}),C.jsx(dR,{showTrigger:t,showClear:n,triggerProps:o,clearProps:i})]})}function s2({className:e,children:t,...n}){return C.jsx(up,{className:e,"data-slot":"combobox-trigger",...n,children:t})}function Uue({className:e,placeholder:t,children:n,showClear:r,clearProps:o,...i}){const s=C.jsx(up,{className:ue("relative flex w-full items-center rounded-md border border-input bg-background px-3 py-2 pe-9 text-sm outline-none transition-shadow","focus-visible:border-ring","aria-invalid:border-error focus-visible:aria-invalid:ring-error/20","data-disabled:cursor-not-allowed data-disabled:opacity-50","data-placeholder:text-muted-foreground",e),"data-slot":"combobox-select-trigger",...i,children:n??C.jsx(Hg,{placeholder:t})});return r?C.jsxs("div",{className:"relative w-full text-foreground has-disabled:opacity-64","data-slot":"combobox-select-trigger-group",children:[s,C.jsx(dR,{showTrigger:!0,showClear:!0,clearProps:o})]}):C.jsx(up,{className:ue("relative flex w-full items-center rounded-md border border-input bg-background px-3 py-2 pe-9 text-sm outline-none transition-shadow","focus-visible:border-ring","aria-invalid:border-error focus-visible:aria-invalid:ring-error/20","data-disabled:cursor-not-allowed data-disabled:opacity-50","data-placeholder:text-muted-foreground",e),"data-slot":"combobox-select-trigger",...i,children:n??C.jsxs(C.Fragment,{children:[C.jsx(Hg,{placeholder:t}),C.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute end-0.5 top-1/2 inline-flex size-8 -translate-y-1/2 items-center justify-center text-muted-foreground opacity-80 sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4",children:C.jsx(Ra,{})})]})})}function zue({className:e,...t}){return C.jsx("div",{className:"border-b p-2","data-slot":"combobox-search-input-wrapper",children:C.jsx(Zp,{className:ue("flex h-9 w-full rounded-md bg-transparent text-base placeholder:text-muted-foreground outline-none disabled:cursor-not-allowed disabled:opacity-64 sm:h-8 sm:text-sm",e),autoComplete:"off","data-slot":"combobox-search-input",...t})})}function a2({className:e,children:t,side:n="bottom",sideOffset:r=4,alignOffset:o,align:i="start",anchor:s,portalProps:a,...l}){const{chipsRef:c}=h.useContext(Qp),d=s??c;return C.jsx(j0,{...a,children:C.jsx(q0,{align:i,alignOffset:o,anchor:d,className:"z-50 select-none","data-slot":"combobox-positioner",side:n,sideOffset:r,children:C.jsx("span",{className:ue("relative flex max-h-full min-w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) rounded-lg border bg-popover not-dark:bg-clip-padding shadow-lg/5 transition-[scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]",e),children:C.jsx(B0,{className:"flex max-h-[min(var(--available-height),23rem)] flex-1 flex-col text-foreground","data-slot":"combobox-popup",...l,children:t})})})})}function l2({className:e,children:t,...n}){return C.jsxs(G0,{className:ue("flex justify-between min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[1rem_1fr] items-center gap-2 rounded-sm py-1 px-2 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),"data-slot":"combobox-item",...n,children:[t,C.jsx(Y0,{className:"col-end-1",children:C.jsx("svg",{"aria-hidden":"true",fill:"none",height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{d:"M5.252 12.7 10.2 18.63 18.748 5.37"})})})]})}function Gue({className:e,...t}){return C.jsx(Va,{className:ue("mx-2 my-1 h-px bg-border last:hidden",e),"data-slot":"combobox-separator",...t})}function Yue({className:e,...t}){return C.jsx(H0,{className:ue("[[role=group]+&]:mt-1.5",e),"data-slot":"combobox-group",...t})}function Xue({className:e,...t}){return C.jsx(K0,{className:ue("px-2 py-1.5 font-medium text-muted-foreground text-xs",e),"data-slot":"combobox-group-label",...t})}function u2({className:e,...t}){return C.jsx(tR,{className:ue("not-empty:p-2 text-center text-base text-muted-foreground sm:text-sm",e),"data-slot":"combobox-empty",...t})}function Zue({className:e,...t}){return C.jsx(eR,{className:e,"data-slot":"combobox-row",...t})}function c2({...e}){return C.jsx(Hg,{"data-slot":"combobox-value",...e})}function d2({className:e,...t}){return C.jsx(n2,{scrollbarGutter:!0,scrollFade:!0,children:C.jsx($0,{className:ue("not-empty:scroll-py-1 not-empty:px-1 not-empty:py-1 in-data-has-overflow-y:pe-3",e),"data-slot":"combobox-list",...t})})}function f2({className:e,...t}){return C.jsx(nR,{className:e,"data-slot":"combobox-clear",...t})}const dI="absolute end-0.5 top-1/2 inline-flex size-8 shrink-0 -translate-y-1/2 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0";function dR({showTrigger:e=!0,showClear:t=!1,triggerProps:n,clearProps:r}){return!e&&!t?null:C.jsxs("div",{className:"text-muted-foreground hover:text-foreground transition-colors",children:[e&&C.jsx(s2,{className:ue(dI,"text-muted-foreground has-[+[data-slot=combobox-clear]]:hidden"),...n,children:C.jsx(V0,{"data-slot":"combobox-icon",children:C.jsx(Ra,{})})}),t&&C.jsx(f2,{className:dI,...r,children:C.jsx($a,{})})]})}function Jue({className:e,...t}){return C.jsx(F0,{className:ue("px-3 py-2 font-medium text-muted-foreground text-xs empty:m-0 empty:p-0",e),"data-slot":"combobox-status",...t})}function Que(e){return C.jsx(k0,{"data-slot":"combobox-collection",...e})}function p2({className:e,children:t,startAddon:n,...r}){const{chipsRef:o}=h.useContext(Qp);return C.jsx($v,{children:({validity:i})=>C.jsxs(X0,{"aria-invalid":i.valid===!1?!0:void 0,className:ue(iu,"relative inline-flex pr-6 w-full flex-wrap gap-1","placeholder:text-muted-foreground","focus-within:border-ring","aria-invalid:border-error focus-within:aria-invalid:ring-error/20","has-disabled:cursor-not-allowed has-disabled:opacity-50",e),"data-slot":"combobox-chips",ref:o,...r,children:[n&&C.jsx("div",{"aria-hidden":"true",className:"flex shrink-0 items-center ps-2 opacity-80 has-[+[data-slot=combobox-chip]]:pe-2 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-ms-0.5 [&_svg]:-me-1.5","data-slot":"combobox-start-addon",children:n}),t]})})}function m2({children:e,removeProps:t,...n}){return C.jsxs(J0,{className:"flex items-center pl-1 rounded-[calc(var(--radius-md)-1px)] bg-accent font-medium text-accent-foreground text-sm outline-none sm:text-xs/(--text-xs--line-height) [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5","data-slot":"combobox-chip",...n,children:[e,C.jsx(h2,{...t})]})}function h2(e){return C.jsx(Q0,{"aria-label":"Remove",className:"h-full shrink-0 cursor-pointer px-1 opacity-80 hover:opacity-100 [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5","data-slot":"combobox-chip-remove",...e,children:C.jsx($a,{})})}const px=4,ece=24,tce=36,nce=68;function fI(e,t){const n=e-ece-tce;let r=0,o=0;for(let i=0;i<t.length;i++){const s=t[i],a=i<t.length-1;if(r+(i>0?px:0)+s+(a?px+nce:0)>n)break;r+=(i>0?px:0)+s,o++}return o}function rce(e,t){const[n,r]=h.useState(null),o=h.useRef([]),i=n===null||n.items!==e;return h.useLayoutEffect(()=>{if(!i)return;const s=t?.current;if(!s)return;const a=s.querySelectorAll('[data-slot="combobox-chip"]');o.current=Array.from(a).map(c=>c.offsetWidth);const l=fI(s.clientWidth,o.current);r({items:e,visible:l})},[i,e,t]),h.useEffect(()=>{const s=t?.current;if(!s)return;const a=new ResizeObserver(()=>{if(!o.current.length)return;const l=fI(s.clientWidth,o.current);r(c=>c?{...c,visible:l}:null)});return a.observe(s),()=>a.disconnect()},[t]),{visibleCount:n?.visible??e,isMeasuring:i}}function oce({value:e,getLabel:t,getValue:n}){const{chipsRef:r}=h.useContext(Qp),{visibleCount:o,isMeasuring:i}=rce(e.length,r),s=i?e:e.slice(0,o),a=i?0:e.length-o;return C.jsxs(C.Fragment,{children:[s.map(l=>C.jsx(m2,{"aria-label":t(l),children:t(l)},n(l))),a>0&&C.jsxs("span",{className:"flex items-center whitespace-nowrap px-1 text-sm text-muted-foreground",children:["+",a," más"]})]})}function ice(e){return e==null?"":typeof e=="string"||typeof e=="number"?String(e):typeof e=="object"&&"label"in e?String(e.label):String(e)}function sce(e){return e==null?"":typeof e=="string"||typeof e=="number"?String(e):typeof e=="object"&&"value"in e?String(e.value):String(e)}function ace({placeholder:e,showClear:t,inputProps:n}){return C.jsx(i2,{placeholder:e,showClear:t,...n})}function lce({getLabel:e,getValue:t,chipsProps:n,showClear:r,clearProps:o}){return C.jsxs(p2,{...n,children:[C.jsx(c2,{children:i=>C.jsx(oce,{value:i,getLabel:e,getValue:t})}),C.jsx(dR,{showTrigger:!r,showClear:r,clearProps:o})]})}function uce(e){const{items:t,getLabel:n,getValue:r,renderItem:o,placeholder:i,emptyText:s="Sin resultados.",multiple:a,onChange:l,value:c,defaultValue:d,inputProps:f,chipsProps:m,chipsInputProps:g,popupProps:v,itemProps:b,listProps:x,showClear:y=!0,..._}=e,w=n??ice,T=r??sce;return C.jsxs(r2,{items:t,itemToStringLabel:w,itemToStringValue:T,multiple:a,onChange:l,value:c,defaultValue:d,autoHighlight:!0,loopFocus:!0,..._,children:[a?C.jsx(lce,{getLabel:w,getValue:T,chipsProps:m,showClear:y}):C.jsx(ace,{placeholder:i,showClear:y,inputProps:f}),C.jsxs(a2,{...v,children:[a&&C.jsx("div",{className:"border-b p-2","data-slot":"combobox-chips-input-wrapper",children:C.jsx(o2,{placeholder:i,...g})}),C.jsx(u2,{children:s}),C.jsx(d2,{...x,children:R=>C.jsx(l2,{value:R,...b,children:o?o(R):w(R)},T(R))})]})]})}const cce=HL,cp="dd/MM/yyyy",pI=(e,t)=>!e||!As(e)?t:Qo(e,cp),mI=(e,t)=>{if(!e)return t;const{start:n,end:r}=e;if(!n&&!r)return t;const o=n&&As(n)?Qo(n,cp):"...",i=r&&As(r)?Qo(r,cp):"...";return`${o} → ${i}`},hI=(e,t)=>!e||e.length===0?t:e.length===1?Qo(e[0],cp):`${e.length} fechas seleccionadas`,Df=e=>As(e)?Qo(e,cp):"",dce=e=>{const t=e.trim();if(!t)return null;const n=/^(\d{1,2})\/(\d{1,2})\/(\d{1,4})$/.exec(t);if(!n)return null;const[,r,o,i]=n,s=Number(r),a=Number(o),l=i;let c=Number(l);if(Number.isNaN(s)||Number.isNaN(a)||Number.isNaN(c)||(l.length<=2&&(c=2e3+c),s<1||s>31||a<1||a>12))return null;const d=new Date(c,a-1,s);return d.getFullYear()!==c||d.getMonth()!==a-1||d.getDate()!==s?null:d},fce=(e,t)=>{const n=(t.lastKey==="Backspace"||t.lastKey==="Delete")&&e.length<t.previousValue.length,r=e.includes("/"),o=e.trim().endsWith("/");if((e.match(/\//g)??[]).length>=2){const x=e.split("/"),y=(x[0]??"").replace(/\D/g,"").slice(0,2),_=(x[1]??"").replace(/\D/g,"").slice(0,2),w=(x[2]??"").replace(/\D/g,"").slice(0,4);return!y&&!_&&!w?"":`${y}/${_}/${w}`}const s=e.replace(/\D/g,"").slice(0,8);if(!s)return"";if(s.length<=2){let x=s;if(s.length===1&&(r||o)&&!n){let y=Number(x);Number.isNaN(y)&&(y=1),y<1&&(y=1),y>31&&(y=31),x=y.toString().padStart(2,"0"),x+="/"}else if(s.length===2&&!n){let y=Number(x);Number.isNaN(y)&&(y=1),y<1&&(y=1),y>31&&(y=31),x=y.toString().padStart(2,"0"),x+="/"}return x}const a=s.slice(0,2);let l=Number(a);Number.isNaN(l)&&(l=1),l<1&&(l=1),l>31&&(l=31);const c=l.toString().padStart(2,"0"),d=s.slice(2,4),f=s.slice(4);let m="";if(d.length===0)m="";else if(d.length===1&&f.length===0){const x=o&&!n&&d.length===1;if(d==="0"||d==="1")if(x){let y=Number(d);Number.isNaN(y)&&(y=1),y<1&&(y=1),y>12&&(y=12),m=y.toString().padStart(2,"0")}else m=d;else{let y=Number(d);Number.isNaN(y)&&(y=1),y<1&&(y=1),y>12&&(y=12),m=y.toString().padStart(2,"0")}}else{let x=Number(d);Number.isNaN(x)&&(x=1),x<1&&(x=1),x>12&&(x=12),m=x.toString().padStart(2,"0")}const g=`${c}/${m}`,v=!f&&m.length===2&&!n;return f?`${g}/${f}`:v?`${g}/`:g},pce=e=>{const{date:t,onDateChange:n,disabledDate:r}=e,[o,i]=M.useState(""),s=M.useRef(null),a=M.useRef("");M.useEffect(()=>{const v=Df(t??null);i(v),a.current=v},[t]);const l=()=>{const v=o.trim();if(!v){n(null),i(""),a.current="";return}const b=dce(v);if(!b){n(null),i(""),a.current="";return}if(r?.(b)){const y=Df(t??null);i(y),a.current=y;return}n(b);const x=Df(b);i(x),a.current=x};return{inputValue:o,handleChange:v=>{const b=v.target.value,x={lastKey:s.current,previousValue:a.current},y=fce(b,x);i(y),a.current=y},handleBlur:()=>{l()},handleKeyDown:v=>{if(s.current=v.key,v.key==="Enter"){v.preventDefault(),l();return}if(v.key==="Escape"){v.preventDefault();const b=Df(t??null);i(b),a.current=b}},clear:()=>{n(null),i(""),a.current=""},setFromExternalDate:v=>{n(v);const b=Df(v??null);i(b),a.current=b}}},mce=(e={})=>{const{disabled:t}=e,[n,r]=M.useState(!1),o=M.useRef(null),i=M.useCallback(s=>{if(!t){if(s.key===" "||s.key==="Spacebar"){s.preventDefault(),r(!0);return}s.key==="Escape"&&(r(!1),requestAnimationFrame(()=>{o.current?.focus()}))}},[t]);return{open:n,setOpen:r,handleInputKeyDown:i,inputRef:o}},hce=e=>{const{placeholder:t,value:n,onChange:r,defaultValue:o,autoComplete:i,className:s,disabledDate:a,renderFooter:l,disabled:c,onBlur:d,...f}=e,[m,g]=vr({prop:n,onChange:B=>r?.(B??null),defaultProp:o??null}),{inputValue:v,handleChange:b,handleBlur:x,handleKeyDown:y,clear:_,setFromExternalDate:w}=pce({date:m??null,onDateChange:B=>g(B),disabledDate:a}),{open:T,setOpen:R,handleInputKeyDown:S,inputRef:P}=mce({disabled:c}),N=B=>{y(B),S(B)},I=l?.({value:m??null,clear:()=>{w(null),_()},selectToday:()=>{const B=new Date;a?.(B)||w(B)},setValue:B=>{const $=B&&As(B)?B:null;g($),w($)}});return C.jsxs(sm,{"data-slot":"date-input",open:T,onOpenChange:R,children:[C.jsxs("div",{className:ue(iu,"flex items-center gap-2 h-10","has-[:focus-visible]:border-ring","aria-invalid:border-error has-[:focus-visible]:aria-invalid:ring-error/20","has-aria-invalid:border-error has-[:focus-visible]:has-aria-invalid:ring-error/20","has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50",!m&&"text-muted-foreground",s,"field-error"),onClick:B=>{B.target===B.currentTarget&&P.current?.focus()},children:[C.jsxs(am,{type:"button",disabled:c,"data-slot":"date-input-trigger",className:"flex shrink-0 items-center justify-center text-muted-foreground hover:text-foreground",children:[C.jsx(xk,{"data-slot":"date-input-icon"}),C.jsx("span",{className:"sr-only",children:"Seleccionar fecha"})]}),C.jsx(mR,{render:C.jsx("input",{type:"text",value:v,onChange:b,onBlur:B=>{x(),d?.(B)},onKeyDown:N,placeholder:t??"dd/mm/aaaa",autoComplete:i??"off",disabled:c,className:"flex-1 min-w-0 bg-transparent outline-none text-start truncate pt-px","aria-label":t,ref:P,...f})})]}),C.jsxs(cu,{className:"w-auto p-0",align:"start","data-slot":"date-input-content",children:[C.jsx(Yp,{className:"border-none",mode:"single",selected:m??void 0,onSelect:B=>{if(!B||!As(B)){w(null);return}a?.(B)||(w(B),R(!1))},disabled:a}),I&&C.jsx("div",{className:"p-2","data-slot":"date-input-footer",children:I})]})]})},gce=e=>e.mode==="range"?C.jsx(bce,{...e}):e.mode==="multiple"?C.jsx(yce,{...e}):C.jsx(vce,{...e}),fR=({open:e,onOpenChange:t,displayText:n,hasValue:r,disabled:o,className:i,children:s,footer:a,slot:l,formValue:c,required:d})=>{const f=M.useRef(null);return C.jsxs(sm,{"data-slot":l,open:e,onOpenChange:t,children:[C.jsxs(am,{render:C.jsx("button",{ref:f,disabled:o,className:ue(iu,"inline-flex items-center gap-2 h-10 cursor-pointer text-left","focus-visible:border-ring","aria-invalid:border-error focus-visible:aria-invalid:ring-error/20","group-data-[invalid]:border-error focus-visible:group-data-[invalid]:ring-error/20","disabled:cursor-not-allowed disabled:opacity-50",!r&&"text-muted-foreground",i)}),children:[C.jsx(xk,{className:"shrink-0"}),C.jsx("span",{className:"truncate",children:n})]}),C.jsx(mR,{render:C.jsx("input",{type:"text",tabIndex:-1,"aria-hidden":"true",className:"sr-only",value:c,onChange:()=>{},required:d,onFocus:()=>f.current?.focus()})}),C.jsxs(cu,{className:"w-auto p-0",align:"start","data-slot":`${l}-content`,children:[s,a&&C.jsx("div",{className:"p-2","data-slot":`${l}-footer`,children:a})]})]})},vce=({value:e,defaultValue:t,onChange:n,placeholder:r="Seleccionar fecha",disabled:o,disabledDate:i,renderFooter:s,className:a,required:l})=>{const[c,d]=M.useState(!1),[f,m]=vr({prop:e,onChange:v=>n?.(v??null),defaultProp:t??null}),g={mode:"single",value:f??null,clear:()=>m(null),selectToday:()=>{const v=new Date;i?.(v)||m(v)},setValue:v=>m(v)};return C.jsx(fR,{slot:"date-picker",open:c,onOpenChange:d,displayText:pI(f,r),hasValue:!!f,disabled:o,className:a,footer:s?.(g),formValue:pI(f,""),required:l,children:C.jsx(Yp,{className:"border-none",mode:"single",selected:f??void 0,onSelect:v=>{i&&v&&i(v)||(m(v??null),d(!1))},disabled:i})})},Hh={start:null,end:null},bce=({value:e,defaultValue:t,onChange:n,placeholder:r="Seleccionar rango",disabled:o,disabledDate:i,renderFooter:s,className:a,required:l})=>{const[c,d]=M.useState(!1),[f,m]=vr({prop:e,onChange:b=>n?.(b??Hh),defaultProp:t??Hh}),g=f??Hh,v={mode:"range",value:g,clear:()=>m(Hh),setValue:b=>m(b)};return C.jsx(fR,{slot:"date-picker",open:c,onOpenChange:d,displayText:mI(g.start||g.end?g:void 0,r),hasValue:!!(g.start||g.end),disabled:o,className:a,footer:s?.(v),formValue:mI(g.start||g.end?g:void 0,""),required:l,children:C.jsx(Yp,{className:"border-none",mode:"range",selected:{from:g.start??void 0,to:g.end??void 0},onSelect:b=>{m({start:b?.from??null,end:b?.to??null})},disabled:i})})},yce=({value:e,defaultValue:t,onChange:n,placeholder:r="Seleccionar fechas",disabled:o,disabledDate:i,renderFooter:s,className:a,required:l})=>{const[c,d]=M.useState(!1),[f,m]=vr({prop:e,onChange:v=>n?.(v??[]),defaultProp:t??[]}),g={mode:"multiple",value:f??[],clear:()=>m([]),setValue:v=>m(v)};return C.jsx(fR,{slot:"date-picker",open:c,onOpenChange:d,displayText:hI(f,r),hasValue:(f?.length??0)>0,disabled:o,className:a,footer:s?.(g),formValue:hI(f,""),required:l,children:C.jsx(Yp,{className:"border-none",mode:"multiple",selected:f??[],onSelect:v=>{m(v??[])},disabled:i})})};var xce=/\s+/g,Ece=e=>typeof e!="string"||!e?e:e.replace(xce," ").trim(),zg=(...e)=>{const t=[],n=r=>{if(!r&&r!==0&&r!==0n)return;if(Array.isArray(r)){for(let i=0,s=r.length;i<s;i++)n(r[i]);return}const o=typeof r;if(o==="string"||o==="number"||o==="bigint"){if(o==="number"&&r!==r)return;t.push(String(r))}else if(o==="object"){const i=Object.keys(r);for(let s=0,a=i.length;s<a;s++){const l=i[s];r[l]&&t.push(l)}}};for(let r=0,o=e.length;r<o;r++){const i=e[r];i!=null&&n(i)}return t.length>0?Ece(t.join(" ")):void 0},gI=e=>e===!1?"false":e===!0?"true":e===0?"0":e,Tr=e=>{if(!e||typeof e!="object")return!0;for(const t in e)return!1;return!0},wce=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++){const i=n[o];if(!r.includes(i)||e[i]!==t[i])return!1}return!0},Cce=(e,t)=>{for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const r=t[n];n in e?e[n]=zg(e[n],r):e[n]=r}return e},g2=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];Array.isArray(r)?g2(r,t):r&&t.push(r)}},v2=(...e)=>{const t=[];g2(e,t);const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},yE=(e,t)=>{const n={};for(const r in e){const o=e[r];if(r in t){const i=t[r];Array.isArray(o)||Array.isArray(i)?n[r]=v2(i,o):typeof o=="object"&&typeof i=="object"&&o&&i?n[r]=yE(o,i):n[r]=i+" "+o}else n[r]=o}for(const r in t)r in e||(n[r]=t[r]);return n},Rce={twMerge:!0,twMergeConfig:{}};function Sce(){let e=null,t={},n=!1;return{get cachedTwMerge(){return e},set cachedTwMerge(r){e=r},get cachedTwMergeConfig(){return t},set cachedTwMergeConfig(r){t=r},get didTwMergeConfigChange(){return n},set didTwMergeConfigChange(r){n=r},reset(){e=null,t={},n=!1}}}var $i=Sce(),Pce=e=>{const t=(r,o)=>{const{extend:i=null,slots:s={},variants:a={},compoundVariants:l=[],compoundSlots:c=[],defaultVariants:d={}}=r,f={...Rce,...o},m=i?.base?zg(i.base,r?.base):r?.base,g=i?.variants&&!Tr(i.variants)?yE(a,i.variants):a,v=i?.defaultVariants&&!Tr(i.defaultVariants)?{...i.defaultVariants,...d}:d;!Tr(f.twMergeConfig)&&!wce(f.twMergeConfig,$i.cachedTwMergeConfig)&&($i.didTwMergeConfigChange=!0,$i.cachedTwMergeConfig=f.twMergeConfig);const b=Tr(i?.slots),x=Tr(s)?{}:{base:zg(r?.base,b&&i?.base),...s},y=b?x:Cce({...i?.slots},Tr(x)?{base:r?.base}:x),_=Tr(i?.compoundVariants)?l:v2(i?.compoundVariants,l),w=R=>{if(Tr(g)&&Tr(s)&&b)return e(m,R?.class,R?.className)(f);if(_&&!Array.isArray(_))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof _}`);if(c&&!Array.isArray(c))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof c}`);const S=(k,j=g,D=null,A=null)=>{const L=j[k];if(!L||Tr(L))return null;const H=A?.[k]??R?.[k];if(H===null)return null;const V=gI(H);if(typeof V=="object")return null;const X=v?.[k],K=V??gI(X);return L[K||"false"]},P=()=>{if(!g)return null;const k=Object.keys(g),j=[];for(let D=0;D<k.length;D++){const A=S(k[D],g);A&&j.push(A)}return j},N=(k,j)=>{if(!g||typeof g!="object")return null;const D=[];for(const A in g){const L=S(A,g,k,j),H=k==="base"&&typeof L=="string"?L:L&&L[k];H&&D.push(H)}return D},F={};for(const k in R){const j=R[k];j!==void 0&&(F[k]=j)}const W=(k,j)=>{const D=typeof R?.[k]=="object"?{[k]:R[k]?.initial}:{};return{...v,...F,...D,...j}},I=(k=[],j)=>{const D=[],A=k.length;for(let L=0;L<A;L++){const{class:H,className:V,...X}=k[L];let K=!0;const G=W(null,j);for(const ee in X){const Z=X[ee],te=G[ee];if(Array.isArray(Z)){if(!Z.includes(te)){K=!1;break}}else{if((Z==null||Z===!1)&&(te==null||te===!1))continue;if(te!==Z){K=!1;break}}}K&&(H&&D.push(H),V&&D.push(V))}return D},B=k=>{const j=I(_,k);if(!Array.isArray(j))return j;const D={},A=e;for(let L=0;L<j.length;L++){const H=j[L];if(typeof H=="string")D.base=A(D.base,H)(f);else if(typeof H=="object")for(const V in H)D[V]=A(D[V],H[V])(f)}return D},$=k=>{if(c.length<1)return null;const j={},D=W(null,k);for(let A=0;A<c.length;A++){const{slots:L=[],class:H,className:V,...X}=c[A];if(!Tr(X)){let K=!0;for(const G in X){const ee=D[G],Z=X[G];if(ee===void 0||(Array.isArray(Z)?!Z.includes(ee):Z!==ee)){K=!1;break}}if(!K)continue}for(let K=0;K<L.length;K++){const G=L[K];j[G]||(j[G]=[]),j[G].push([H,V])}}return j};if(!Tr(s)||!b){const k={};if(typeof y=="object"&&!Tr(y)){const j=e;for(const D in y)k[D]=A=>{const L=B(A),H=$(A);return j(y[D],N(D,A),L?L[D]:void 0,H?H[D]:void 0,A?.class,A?.className)(f)}}return k}return e(m,P(),I(_),R?.class,R?.className)(f)},T=()=>{if(!(!g||typeof g!="object"))return Object.keys(g)};return w.variantKeys=T(),w.extend=i,w.base=m,w.slots=y,w.variants=g,w.defaultVariants=v,w.compoundSlots=c,w.compoundVariants=_,w};return{tv:t,createTV:r=>(o,i)=>t(o,i?yE(r,i):r)}},Tce=e=>Tr(e)?wG:ck({...e,extend:{theme:e.theme,classGroups:e.classGroups,conflictingClassGroupModifiers:e.conflictingClassGroupModifiers,conflictingClassGroups:e.conflictingClassGroups,...e.extend}}),b2=(e,t)=>{const n=zg(e);return!n||!(t?.twMerge??!0)?n:((!$i.cachedTwMerge||$i.didTwMergeConfigChange)&&($i.didTwMergeConfigChange=!1,$i.cachedTwMerge=Tce($i.cachedTwMergeConfig)),$i.cachedTwMerge(n)||void 0)},_ce=(...e)=>b2(e,{}),Nce=(...e)=>t=>b2(e,t),{tv:y2}=Pce(Nce);function x2({className:e,orientation:t="horizontal",...n}){return C.jsx(Va,{className:_ce("shrink-0 bg-input data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:not-[[class^='h-']]:not-[[class*='_h-']]:self-stretch",e),"data-slot":"separator",orientation:t,...n})}const Oce=({onDrop:e,onError:t,allowedExtensions:n=[],maxFileSize:r=5*1024*1024,maxFiles:o=1/0})=>{const[i,s]=M.useState(!1),a=M.useCallback(m=>{m.preventDefault(),m.stopPropagation()},[]),l=M.useCallback(m=>{m.preventDefault(),m.stopPropagation(),s(!0)},[]),c=M.useCallback(m=>{m.preventDefault(),m.stopPropagation(),s(!1)},[]),d=m=>{const[g=[],v=[],b=[]]=m.reduce(([x,y,_],w)=>n.length>0&&!n.includes(w.type)?(x.push(w),_.push({file:w,errorMessage:"Extensión no permitida",errorCode:"INVALID_EXTENSION"}),[x,y,_]):w.size>r?(x.push(w),_.push({file:w,errorMessage:"Archivo demasiado grande",errorCode:"FILE_TOO_LARGE"}),[x,y,_]):o&&o<y.length+1?(x.push(w),_.push({file:w,errorMessage:"Límite de archivos excedido",errorCode:"MAX_FILES_EXCEEDED"}),[x,y,_]):(y.push(w),[x,y,_]),[[],[],[]]);return b.length>0&&t&&t(b),[g,v,b]},f=M.useCallback(m=>{m.preventDefault(),m.stopPropagation(),s(!1);const g=Array.from(m.dataTransfer.files),[v=[],b=[]]=d(g);e(b,v)},[n,r,o,e,t]);return{isDragActive:i,validateFiles:d,dropzoneProps:{onDragOver:a,onDragEnter:l,onDragLeave:c,onDrop:f}}},E2=M.createContext(null),pR=()=>{const e=M.useContext(E2);if(!e)throw new Error("useUploadContext must be used within a UploadContextProvider");return e},w2=({onFileAdd:e,onFileRemove:t,onChangeFiles:n,files:r,maxFiles:o=1,allowedExtensions:i=[],maxFileSize:s=5*1024*1024,multiple:a,children:l,onError:c,...d})=>{const[f=[],m]=vr({defaultProp:[],prop:r,onChange:n}),[g,v]=M.useState([]),{isDragActive:b,validateFiles:x,dropzoneProps:y}=Oce({onDrop:(T,R)=>{m([...f,...T]),v(S=>[...S,...R]),e?.(T)},allowedExtensions:i,maxFileSize:s,maxFiles:o,onError:c}),_=T=>{const[R=[],S=[]]=x(T);if(o===1||!a){m(S.slice(0,1)),v([...R,...S.slice(1)]),e?.(S.slice(0,1));return}const P=o-f.length;if(P<=0){v(W=>[...W,...S]),e?.([]);return}const N=S.slice(0,P),F=S.slice(P);m([...f,...N]),v(W=>[...W,...R,...F]),e?.(N)},w=(T,R)=>{R==="accepted"?m(f.filter((S,P)=>P!==T)):v(S=>S.filter((P,N)=>N!==T)),t?.(T,R)};return C.jsx(E2.Provider,{value:{files:f,rejectedFiles:g,handleFileAdd:_,handleFileRemove:w,inputProps:{accept:i.join(","),multiple:a},isDragActive:b,dropzoneProps:y},children:C.jsx("div",{...d,"data-slot":"upload",children:l})})},C2=({asChild:e,...t})=>{const{handleFileAdd:n,inputProps:r,dropzoneProps:o,isDragActive:i}=pR(),s=M.useRef(null),a=e?Nw:"button";return C.jsxs(C.Fragment,{children:[C.jsx(a,{"data-slot":"upload-trigger",...t,...o,"data-drag-active":i||!1,onClick:l=>{t.onClick?.(l),s.current?.click()}}),C.jsx("input",{type:"file",className:"hidden","data-slot":"upload-input",...r,ref:s,onChange:l=>n(Array.from(l.target.files||[]))})]})},R2=({className:e,...t})=>C.jsx("div",{...t,className:ue("mt-2 space-y-2",e),"data-slot":"upload-content"}),S2=({files:e,handleFileRemove:t,fileType:n,children:r,renderFile:o,...i})=>e.length===0?null:C.jsxs("div",{className:"mt-2 space-y-2",...i,"data-slot":"upload-files-list",children:[r,e.map((s,a)=>o?o(s,()=>t(a,n)):C.jsx(_2,{file:s,onRemove:()=>t(a,n)},s.name))]}),P2=e=>{const{files:t,handleFileRemove:n}=pR();return C.jsx(S2,{"data-slot":"upload-accepted-files",files:t,handleFileRemove:n,fileType:"accepted",...e})},T2=e=>{const{rejectedFiles:t,handleFileRemove:n}=pR();return C.jsx(S2,{"data-slot":"upload-rejected-files",files:t,handleFileRemove:n,fileType:"rejected",...e})},_2=({file:e,onRemove:t,className:n,renderIcon:r,...o})=>C.jsxs("div",{className:ue("flex items-center gap-2 mb-2",n),...o,"data-slot":"upload-item",children:[r?.(e),e.name,C.jsx(Is,{variant:"ghost",size:"icon",type:"button",className:"h-6 w-6",onClick:t,"data-slot":"upload-item-remove",children:C.jsx($a,{"data-slot":"upload-item-remove-icon"})})]}),Mce=({onFileAdd:e,onFileRemove:t,onChangeFiles:n=()=>{},files:r,maxFiles:o=1,allowedExtensions:i=[],maxFileSize:s=5*1024*1024,multiple:a,renderAcceptedFile:l,renderRejectedFile:c,showRejected:d=!1,className:f,icon:m=iY,iconSize:g=40,onError:v,...b})=>{const x=M.useMemo(()=>i.map(y=>y.split("/")?.[1]).join(", "),[i]);return C.jsxs(w2,{onFileAdd:e,onFileRemove:t,files:r,onChangeFiles:n,maxFiles:o,allowedExtensions:i,maxFileSize:s,multiple:a?!0:void 0,className:ue("w-full",f),onError:v,...b,children:[C.jsx(C2,{asChild:!0,children:C.jsxs("div",{className:ue("w-full min-h-[150px] border-2 border-dashed rounded-lg border-muted p-4","hover:bg-muted/50 data-[drag-active=true]:border-primary data-[drag-active=true]:bg-primary/10","transition-colors flex flex-col items-center justify-center gap-4","pointer-events-auto"),children:[C.jsx(m,{className:"text-muted-foreground pointer-events-none",style:{width:g,height:g}}),C.jsxs("div",{className:"text-center text-muted-foreground pointer-events-none",children:[C.jsx("p",{children:"Arrastra y suelta archivos aquí o haz clic para seleccionar"}),i.length>0&&C.jsxs("p",{className:"text-sm",children:["Tipos permitidos: ",x]}),C.jsxs("p",{className:"text-sm",children:["Tamaño máximo: ",Math.floor(s/1024/1024),"MB"]})]})]})}),C.jsxs(R2,{children:[C.jsx(P2,{renderFile:l}),d&&C.jsx(T2,{renderFile:c})]})]})},Dn={JPEG:"image/jpeg",JPG:"image/jpg",PNG:"image/png",GIF:"image/gif",WEBP:"image/webp",SVG:"image/svg+xml",PDF:"application/pdf",DOC:"application/msword",DOCX:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",XLS:"application/vnd.ms-excel",XLSX:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",PPT:"application/vnd.ms-powerpoint",PPTX:"application/vnd.openxmlformats-officedocument.presentationml.presentation",TXT:"text/plain",CSV:"text/csv",ZIP:"application/zip",RAR:"application/x-rar-compressed",MP3:"audio/mpeg",WAV:"audio/wav",MP4:"video/mp4",WEBM:"video/webm",JSON:"application/json",XML:"application/xml"},Ice={IMAGES:[Dn.JPEG,Dn.JPG,Dn.PNG,Dn.GIF,Dn.WEBP,Dn.SVG],DOCUMENTS:[Dn.PDF,Dn.DOC,Dn.DOCX,Dn.XLS,Dn.XLSX,Dn.PPT,Dn.PPTX],COMPRESSED:[Dn.ZIP,Dn.RAR],AUDIO:[Dn.MP3,Dn.WAV],VIDEO:[Dn.MP4,Dn.WEBM]},Dce=Hs([],{variants:{size:{sm:"text-[14px]",md:"text-[16px]",lg:"text-[18px]",xl:"text-[20px]","2xl":"text-[24px]","3xl":"text-[28px]","4xl":"text-[32px]","5xl":"text-[36px]","6xl":"text-[40px]"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{size:"xl",weight:"semibold"}}),N2=({className:e,size:t,weight:n,as:r,...o})=>{const i=r||"h2";return C.jsx(i,{className:ue(Dce({size:t,weight:n}),e),...o,"data-slot":"heading","data-size":t,"data-weight":n})},Ace=({icon:e=C.jsx(dY,{className:"w-12 h-12"}),title:t="No hay resultados",description:n,className:r,children:o,...i})=>C.jsxs("div",{className:ue("flex flex-col gap-2 justify-center items-center",r),"data-slot":"empty-state",...i,children:[C.jsx("div",{className:"text-muted-foreground","data-slot":"empty-state-icon",children:e}),C.jsx(N2,{className:"empty:hidden","data-slot":"empty-state-title",children:t}),C.jsx("p",{className:"py-1 text-sm text-center text-muted-foreground empty:hidden","data-slot":"empty-state-description",children:n}),o]});function O2({className:e,required:t,...n}){return C.jsx(kv,{className:ue("group flex flex-col gap-1",e),"data-slot":"field","data-required":t||void 0,...n})}function M2({className:e,...t}){return C.jsx(XC,{className:ue("inline-flex items-center font-medium text-base/4.5 text-foreground data-disabled:opacity-64 sm:text-sm/4",e),"data-slot":"field-label",...t})}function kce({className:e,...t}){return C.jsx(t0,{className:ue("flex items-center gap-2",e),"data-slot":"field-item",...t})}function I2({className:e,...t}){return C.jsx(JC,{className:ue("text-muted-foreground text-xs group-data-[invalid]:hidden",e),"data-slot":"field-description",...t})}function pg({className:e,...t}){return C.jsx(ZC,{className:ue("text-error text-xs",e),"data-slot":"field-error",...t})}const mR=Gp,D2=$v;function $ce(e){return e===void 0?[]:typeof e=="string"?[{message:e,match:!0}]:Array.isArray(e)?e:[e]}function Fce({label:e,description:t,error:n,required:r,tooltip:o,inline:i=!1,children:s,className:a,labelProps:l,labelClassName:c,descriptionProps:d,descriptionClassName:f,errorProps:m,errorClassName:g,invalid:v,...b}){const x=$ce(n),y=v||x.some(w=>w.match===!0)||void 0,_=e&&C.jsx(M2,{render:o?C.jsx(Xp,{tooltip:o}):void 0,className:c,...l,children:C.jsx("span",{className:"after:text-error group-has-[*:required]:after:content-['*'] group-data-[required]:after:content-['*']",children:e})});return C.jsxs(O2,{className:a,required:r,invalid:y,...b,children:[i?C.jsxs("div",{className:"flex items-center gap-1",children:[s,_]}):C.jsxs(C.Fragment,{children:[_,s]}),t&&C.jsx(I2,{className:f,...d,children:t}),x.map((w,T)=>C.jsx(pg,{match:w.match,className:g,...m,children:w.message},T)),!x.some(w=>w.match===void 0)&&(x.length===0?C.jsx(pg,{...m}):C.jsx(D2,{children:({validity:w,error:T})=>!w.valid&&T===""?C.jsx(pg,{...m}):null}))]})}const hR=h.forwardRef(function(t,n){const{render:r,className:o,validationMode:i="onSubmit",errors:s,onSubmit:a,onFormSubmit:l,actionsRef:c,style:d,...f}=t,m=h.useRef({fields:new Map}),g=h.useRef(!1),v=h.useRef(!1),b=Re(S=>{S&&(S.focus(),S.tagName==="INPUT"&&S.select())}),[x,y]=h.useState(s);No(s,()=>{y(s)}),h.useEffect(()=>{if(!g.current)return;g.current=!1;const S=Array.from(m.current.fields.values()).filter(P=>P.validityData.state.valid===!1);S.length&&b(S[0].controlRef.current)},[x,b]);const _=h.useCallback(S=>{const P=Array.from(m.current.fields.values());if(S){const N=P.find(F=>F.name===S);N&&N.validate(!1)}else P.forEach(N=>{N.validate(!1)})},[]);h.useImperativeHandle(c,()=>({validate:_}),[_]);const w=$e("form",t,{ref:n,props:[{noValidate:!0,onSubmit(S){v.current=!0;let P=Array.from(m.current.fields.values());P.forEach(F=>{F.validate()}),P=Array.from(m.current.fields.values());const N=P.filter(F=>!F.validityData.state.valid);if(N.length)S.preventDefault(),b(N[0].controlRef.current);else if(g.current=!0,a?.(S),l){S.preventDefault();const F=P.reduce((W,I)=>(I.name&&(W[I.name]=I.getValue()),W),{});l(F,so(vn,S.nativeEvent))}}},f]}),T=Re(S=>{if(S&&x&&rn.hasOwnProperty.call(x,S)){const P={...x};delete P[S],y(P)}}),R=h.useMemo(()=>({formRef:m,validationMode:i,errors:x??rn,clearErrors:T,submitAttemptedRef:v}),[m,i,x,T]);return C.jsx(yC.Provider,{value:R,children:w})});process.env.NODE_ENV!=="production"&&(hR.displayName="Form");function Lce({onSubmit:e,onFormSubmit:t,className:n,...r}){const o=e??t;return C.jsx(hR,{className:n,onFormSubmit:o,"data-slot":"form",...r})}function jce({className:e,...t}){return C.jsx("kbd",{className:ue("pointer-events-none inline-flex h-5 min-w-5 select-none items-center justify-center gap-1 rounded bg-muted px-1 font-medium font-sans text-muted-foreground text-xs [&_svg:not([class*='size-'])]:size-3",e),"data-slot":"kbd",...t})}function qce({className:e,...t}){return C.jsx("kbd",{className:ue("inline-flex items-center gap-1",e),"data-slot":"kbd-group",...t})}const Bce=Hs("animate-spin",{variants:{variant:{primary:"text-primary",secondary:"text-secondary",ghost:"text-muted-foreground",error:"text-error",success:"text-success",warning:"text-warning",info:"text-info"},size:{xs:"size-3",sm:"size-4",default:"size-7",lg:"size-10",xl:"size-14"}},defaultVariants:{variant:"primary",size:"default"}}),Vce=({center:e,containerClassName:t,variant:n,size:r,...o})=>C.jsx("div",{className:ue(t,e&&"fixed inset-0 grid place-items-center"),"data-slot":"loader",children:C.jsx(Zx,{"data-slot":"loader-icon",...o,className:ue(Bce({variant:n,size:r}),o.className)})});function At(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Wce(e){const t=Hce(e),n=h.forwardRef((r,o)=>{const{children:i,...s}=r,a=h.Children.toArray(i),l=a.find(Uce);if(l){const c=l.props.children,d=a.map(f=>f===l?h.Children.count(c)>1?h.Children.only(null):h.isValidElement(c)?c.props.children:null:f);return C.jsx(t,{...s,ref:o,children:h.isValidElement(c)?h.cloneElement(c,void 0,d):null})}return C.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Hce(e){const t=h.forwardRef((n,r)=>{const{children:o,...i}=n;if(h.isValidElement(o)){const s=Gce(o),a=zce(i,o.props);return o.type!==h.Fragment&&(a.ref=r?kn(r,s):s),h.cloneElement(o,a)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Kce=Symbol("radix.slottable");function Uce(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Kce}function zce(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Gce(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Yce=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Xce=Yce.reduce((e,t)=>{const n=Wce(`Primitive.${t}`),r=h.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function vI(e){const t=Zce(e),n=h.forwardRef((r,o)=>{const{children:i,...s}=r,a=h.Children.toArray(i),l=a.find(Qce);if(l){const c=l.props.children,d=a.map(f=>f===l?h.Children.count(c)>1?h.Children.only(null):h.isValidElement(c)?c.props.children:null:f);return C.jsx(t,{...s,ref:o,children:h.isValidElement(c)?h.cloneElement(c,void 0,d):null})}return C.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Zce(e){const t=h.forwardRef((n,r)=>{const{children:o,...i}=n;if(h.isValidElement(o)){const s=tde(o),a=ede(i,o.props);return o.type!==h.Fragment&&(a.ref=r?kn(r,s):s),h.cloneElement(o,a)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Jce=Symbol("radix.slottable");function Qce(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Jce}function ede(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function tde(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function A2(e){const t=e+"CollectionProvider",[n,r]=tu(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=b=>{const{scope:x,children:y}=b,_=M.useRef(null),w=M.useRef(new Map).current;return C.jsx(o,{scope:x,itemMap:w,collectionRef:_,children:y})};s.displayName=t;const a=e+"CollectionSlot",l=vI(a),c=M.forwardRef((b,x)=>{const{scope:y,children:_}=b,w=i(a,y),T=Nn(x,w.collectionRef);return C.jsx(l,{ref:T,children:_})});c.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",m=vI(d),g=M.forwardRef((b,x)=>{const{scope:y,children:_,...w}=b,T=M.useRef(null),R=Nn(x,T),S=i(d,y);return M.useEffect(()=>(S.itemMap.set(T,{ref:T,...w}),()=>{S.itemMap.delete(T)})),C.jsx(m,{[f]:"",ref:R,children:_})});g.displayName=d;function v(b){const x=i(e+"CollectionConsumer",b);return M.useCallback(()=>{const _=x.collectionRef.current;if(!_)return[];const w=Array.from(_.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((S,P)=>w.indexOf(S.ref.current)-w.indexOf(P.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:c,ItemSlot:g},v,r]}var nde=h.createContext(void 0);function k2(e){const t=h.useContext(nde);return e||t||"ltr"}function rde(e){const t=ode(e),n=h.forwardRef((r,o)=>{const{children:i,...s}=r,a=h.Children.toArray(i),l=a.find(sde);if(l){const c=l.props.children,d=a.map(f=>f===l?h.Children.count(c)>1?h.Children.only(null):h.isValidElement(c)?c.props.children:null:f);return C.jsx(t,{...s,ref:o,children:h.isValidElement(c)?h.cloneElement(c,void 0,d):null})}return C.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function ode(e){const t=h.forwardRef((n,r)=>{const{children:o,...i}=n;if(h.isValidElement(o)){const s=lde(o),a=ade(i,o.props);return o.type!==h.Fragment&&(a.ref=r?kn(r,s):s),h.cloneElement(o,a)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ide=Symbol("radix.slottable");function sde(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ide}function ade(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function lde(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ude=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$2=ude.reduce((e,t)=>{const n=rde(`Primitive.${t}`),r=h.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function cde(e,t){e&&Rn.flushSync(()=>e.dispatchEvent(t))}var dde="DismissableLayer",xE="dismissableLayer.update",fde="dismissableLayer.pointerDownOutside",pde="dismissableLayer.focusOutside",bI,F2=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),L2=h.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,c=h.useContext(F2),[d,f]=h.useState(null),m=d?.ownerDocument??globalThis?.document,[,g]=h.useState({}),v=Nn(t,P=>f(P)),b=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=b.indexOf(x),_=d?b.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,T=_>=y,R=gde(P=>{const N=P.target,F=[...c.branches].some(W=>W.contains(N));!T||F||(o?.(P),s?.(P),P.defaultPrevented||a?.())},m),S=vde(P=>{const N=P.target;[...c.branches].some(W=>W.contains(N))||(i?.(P),s?.(P),P.defaultPrevented||a?.())},m);return Bk(P=>{_===c.layers.size-1&&(r?.(P),!P.defaultPrevented&&a&&(P.preventDefault(),a()))},m),h.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(bI=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),yI(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=bI)}},[d,m,n,c]),h.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),yI())},[d,c]),h.useEffect(()=>{const P=()=>g({});return document.addEventListener(xE,P),()=>document.removeEventListener(xE,P)},[]),C.jsx($2.div,{...l,ref:v,style:{pointerEvents:w?T?"auto":"none":void 0,...e.style},onFocusCapture:At(e.onFocusCapture,S.onFocusCapture),onBlurCapture:At(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:At(e.onPointerDownCapture,R.onPointerDownCapture)})});L2.displayName=dde;var mde="DismissableLayerBranch",hde=h.forwardRef((e,t)=>{const n=h.useContext(F2),r=h.useRef(null),o=Nn(t,r);return h.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),C.jsx($2.div,{...e,ref:o})});hde.displayName=mde;function gde(e,t=globalThis?.document){const n=or(e),r=h.useRef(!1),o=h.useRef(()=>{});return h.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){j2(fde,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function vde(e,t=globalThis?.document){const n=or(e),r=h.useRef(!1);return h.useEffect(()=>{const o=i=>{i.target&&!r.current&&j2(pde,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function yI(){const e=new CustomEvent(xE);document.dispatchEvent(e)}function j2(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?cde(o,i):o.dispatchEvent(i)}var mx=0;function bde(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??xI()),document.body.insertAdjacentElement("beforeend",e[1]??xI()),mx++,()=>{mx===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),mx--}},[])}function xI(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}function yde(e){const t=xde(e),n=h.forwardRef((r,o)=>{const{children:i,...s}=r,a=h.Children.toArray(i),l=a.find(wde);if(l){const c=l.props.children,d=a.map(f=>f===l?h.Children.count(c)>1?h.Children.only(null):h.isValidElement(c)?c.props.children:null:f);return C.jsx(t,{...s,ref:o,children:h.isValidElement(c)?h.cloneElement(c,void 0,d):null})}return C.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function xde(e){const t=h.forwardRef((n,r)=>{const{children:o,...i}=n;if(h.isValidElement(o)){const s=Rde(o),a=Cde(i,o.props);return o.type!==h.Fragment&&(a.ref=r?kn(r,s):s),h.cloneElement(o,a)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ede=Symbol("radix.slottable");function wde(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ede}function Cde(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Rde(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Sde=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pde=Sde.reduce((e,t)=>{const n=yde(`Primitive.${t}`),r=h.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),hx="focusScope.autoFocusOnMount",gx="focusScope.autoFocusOnUnmount",EI={bubbles:!1,cancelable:!0},Tde="FocusScope",q2=h.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=h.useState(null),c=or(o),d=or(i),f=h.useRef(null),m=Nn(t,b=>l(b)),g=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let b=function(w){if(g.paused||!a)return;const T=w.target;a.contains(T)?f.current=T:vs(f.current,{select:!0})},x=function(w){if(g.paused||!a)return;const T=w.relatedTarget;T!==null&&(a.contains(T)||vs(f.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const R of w)R.removedNodes.length>0&&vs(a)};document.addEventListener("focusin",b),document.addEventListener("focusout",x);const _=new MutationObserver(y);return a&&_.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",x),_.disconnect()}}},[r,a,g.paused]),h.useEffect(()=>{if(a){CI.add(g);const b=document.activeElement;if(!a.contains(b)){const y=new CustomEvent(hx,EI);a.addEventListener(hx,c),a.dispatchEvent(y),y.defaultPrevented||(_de(Dde(B2(a)),{select:!0}),document.activeElement===b&&vs(a))}return()=>{a.removeEventListener(hx,c),setTimeout(()=>{const y=new CustomEvent(gx,EI);a.addEventListener(gx,d),a.dispatchEvent(y),y.defaultPrevented||vs(b??document.body,{select:!0}),a.removeEventListener(gx,d),CI.remove(g)},0)}}},[a,c,d,g]);const v=h.useCallback(b=>{if(!n&&!r||g.paused)return;const x=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,y=document.activeElement;if(x&&y){const _=b.currentTarget,[w,T]=Nde(_);w&&T?!b.shiftKey&&y===T?(b.preventDefault(),n&&vs(w,{select:!0})):b.shiftKey&&y===w&&(b.preventDefault(),n&&vs(T,{select:!0})):y===_&&b.preventDefault()}},[n,r,g.paused]);return C.jsx(Pde.div,{tabIndex:-1,...s,ref:m,onKeyDown:v})});q2.displayName=Tde;function _de(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(vs(r,{select:t}),document.activeElement!==n)return}function Nde(e){const t=B2(e),n=wI(t,e),r=wI(t.reverse(),e);return[n,r]}function B2(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function wI(e,t){for(const n of e)if(!Ode(n,{upTo:t}))return n}function Ode(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Mde(e){return e instanceof HTMLInputElement&&"select"in e}function vs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mde(e)&&t&&e.select()}}var CI=Ide();function Ide(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=RI(e,t),e.unshift(t)},remove(t){e=RI(e,t),e[0]?.resume()}}}function RI(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Dde(e){return e.filter(t=>t.tagName!=="A")}const Ade=["top","right","bottom","left"],ks=Math.min,Wr=Math.max,Gg=Math.round,Kh=Math.floor,ii=e=>({x:e,y:e}),kde={left:"right",right:"left",bottom:"top",top:"bottom"},$de={start:"end",end:"start"};function EE(e,t,n){return Wr(e,ks(t,n))}function Gi(e,t){return typeof e=="function"?e(t):e}function Yi(e){return e.split("-")[0]}function au(e){return e.split("-")[1]}function gR(e){return e==="x"?"y":"x"}function vR(e){return e==="y"?"height":"width"}function $s(e){return["top","bottom"].includes(Yi(e))?"y":"x"}function bR(e){return gR($s(e))}function Fde(e,t,n){n===void 0&&(n=!1);const r=au(e),o=bR(e),i=vR(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Yg(s)),[s,Yg(s)]}function Lde(e){const t=Yg(e);return[wE(e),t,wE(t)]}function wE(e){return e.replace(/start|end/g,t=>$de[t])}function jde(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function qde(e,t,n,r){const o=au(e);let i=jde(Yi(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(wE)))),i}function Yg(e){return e.replace(/left|right|bottom|top/g,t=>kde[t])}function Bde(e){return{top:0,right:0,bottom:0,left:0,...e}}function V2(e){return typeof e!="number"?Bde(e):{top:e,right:e,bottom:e,left:e}}function Xg(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function SI(e,t,n){let{reference:r,floating:o}=e;const i=$s(t),s=bR(t),a=vR(s),l=Yi(t),c=i==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,m=r[a]/2-o[a]/2;let g;switch(l){case"top":g={x:d,y:r.y-o.height};break;case"bottom":g={x:d,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-o.width,y:f};break;default:g={x:r.x,y:r.y}}switch(au(t)){case"start":g[s]-=m*(n&&c?-1:1);break;case"end":g[s]+=m*(n&&c?-1:1);break}return g}const Vde=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=SI(c,r,l),m=r,g={},v=0;for(let b=0;b<a.length;b++){const{name:x,fn:y}=a[b],{x:_,y:w,data:T,reset:R}=await y({x:d,y:f,initialPlacement:r,placement:m,strategy:o,middlewareData:g,rects:c,platform:s,elements:{reference:e,floating:t}});d=_??d,f=w??f,g={...g,[x]:{...g[x],...T}},R&&v<=50&&(v++,typeof R=="object"&&(R.placement&&(m=R.placement),R.rects&&(c=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:d,y:f}=SI(c,m,l)),b=-1)}return{x:d,y:f,placement:m,strategy:o,middlewareData:g}};async function dp(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:g=0}=Gi(t,e),v=V2(g),x=a[m?f==="floating"?"reference":"floating":f],y=Xg(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),_=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),T=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},R=Xg(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:w,strategy:l}):_);return{top:(y.top-R.top+v.top)/T.y,bottom:(R.bottom-y.bottom+v.bottom)/T.y,left:(y.left-R.left+v.left)/T.x,right:(R.right-y.right+v.right)/T.x}}const Wde=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=Gi(e,t)||{};if(c==null)return{};const f=V2(d),m={x:n,y:r},g=bR(o),v=vR(g),b=await s.getDimensions(c),x=g==="y",y=x?"top":"left",_=x?"bottom":"right",w=x?"clientHeight":"clientWidth",T=i.reference[v]+i.reference[g]-m[g]-i.floating[v],R=m[g]-i.reference[g],S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let P=S?S[w]:0;(!P||!await(s.isElement==null?void 0:s.isElement(S)))&&(P=a.floating[w]||i.floating[v]);const N=T/2-R/2,F=P/2-b[v]/2-1,W=ks(f[y],F),I=ks(f[_],F),B=W,$=P-b[v]-I,k=P/2-b[v]/2+N,j=EE(B,k,$),D=!l.arrow&&au(o)!=null&&k!==j&&i.reference[v]/2-(k<B?W:I)-b[v]/2<0,A=D?k<B?k-B:k-$:0;return{[g]:m[g]+A,data:{[g]:j,centerOffset:k-j-A,...D&&{alignmentOffset:A}},reset:D}}}),Hde=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:b=!0,...x}=Gi(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=Yi(o),_=$s(a),w=Yi(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),R=m||(w||!b?[Yg(a)]:Lde(a)),S=v!=="none";!m&&S&&R.push(...qde(a,b,v,T));const P=[a,...R],N=await dp(t,x),F=[];let W=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&F.push(N[y]),f){const k=Fde(o,s,T);F.push(N[k[0]],N[k[1]])}if(W=[...W,{placement:o,overflows:F}],!F.every(k=>k<=0)){var I,B;const k=(((I=i.flip)==null?void 0:I.index)||0)+1,j=P[k];if(j)return{data:{index:k,overflows:W},reset:{placement:j}};let D=(B=W.filter(A=>A.overflows[0]<=0).sort((A,L)=>A.overflows[1]-L.overflows[1])[0])==null?void 0:B.placement;if(!D)switch(g){case"bestFit":{var $;const A=($=W.filter(L=>{if(S){const H=$s(L.placement);return H===_||H==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(H=>H>0).reduce((H,V)=>H+V,0)]).sort((L,H)=>L[1]-H[1])[0])==null?void 0:$[0];A&&(D=A);break}case"initialPlacement":D=a;break}if(o!==D)return{reset:{placement:D}}}return{}}}};function PI(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function TI(e){return Ade.some(t=>e[t]>=0)}const Kde=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Gi(e,t);switch(r){case"referenceHidden":{const i=await dp(t,{...o,elementContext:"reference"}),s=PI(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:TI(s)}}}case"escaped":{const i=await dp(t,{...o,altBoundary:!0}),s=PI(i,n.floating);return{data:{escapedOffsets:s,escaped:TI(s)}}}default:return{}}}}};async function Ude(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Yi(n),a=au(n),l=$s(n)==="y",c=["left","top"].includes(s)?-1:1,d=i&&l?-1:1,f=Gi(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(g=a==="end"?v*-1:v),l?{x:g*d,y:m*c}:{x:m*c,y:g*d}}const zde=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await Ude(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Gde=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:x=>{let{x:y,y:_}=x;return{x:y,y:_}}},...l}=Gi(e,t),c={x:n,y:r},d=await dp(t,l),f=$s(Yi(o)),m=gR(f);let g=c[m],v=c[f];if(i){const x=m==="y"?"top":"left",y=m==="y"?"bottom":"right",_=g+d[x],w=g-d[y];g=EE(_,g,w)}if(s){const x=f==="y"?"top":"left",y=f==="y"?"bottom":"right",_=v+d[x],w=v-d[y];v=EE(_,v,w)}const b=a.fn({...t,[m]:g,[f]:v});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[m]:i,[f]:s}}}}}},Yde=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Gi(e,t),d={x:n,y:r},f=$s(o),m=gR(f);let g=d[m],v=d[f];const b=Gi(a,t),x=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(l){const w=m==="y"?"height":"width",T=i.reference[m]-i.floating[w]+x.mainAxis,R=i.reference[m]+i.reference[w]-x.mainAxis;g<T?g=T:g>R&&(g=R)}if(c){var y,_;const w=m==="y"?"width":"height",T=["top","left"].includes(Yi(o)),R=i.reference[f]-i.floating[w]+(T&&((y=s.offset)==null?void 0:y[f])||0)+(T?0:x.crossAxis),S=i.reference[f]+i.reference[w]+(T?0:((_=s.offset)==null?void 0:_[f])||0)-(T?x.crossAxis:0);v<R?v=R:v>S&&(v=S)}return{[m]:g,[f]:v}}}},Xde=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=Gi(e,t),d=await dp(t,c),f=Yi(o),m=au(o),g=$s(o)==="y",{width:v,height:b}=i.floating;let x,y;f==="top"||f==="bottom"?(x=f,y=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,x=m==="end"?"top":"bottom");const _=b-d.top-d.bottom,w=v-d.left-d.right,T=ks(b-d[x],_),R=ks(v-d[y],w),S=!t.middlewareData.shift;let P=T,N=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=_),S&&!m){const W=Wr(d.left,0),I=Wr(d.right,0),B=Wr(d.top,0),$=Wr(d.bottom,0);g?N=v-2*(W!==0||I!==0?W+I:Wr(d.left,d.right)):P=b-2*(B!==0||$!==0?B+$:Wr(d.top,d.bottom))}await l({...t,availableWidth:N,availableHeight:P});const F=await s.getDimensions(a.floating);return v!==F.width||b!==F.height?{reset:{rects:!0}}:{}}}};function Vv(){return typeof window<"u"}function lu(e){return W2(e)?(e.nodeName||"").toLowerCase():"#document"}function Hr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function mi(e){var t;return(t=(W2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function W2(e){return Vv()?e instanceof Node||e instanceof Hr(e).Node:!1}function Ao(e){return Vv()?e instanceof Element||e instanceof Hr(e).Element:!1}function ai(e){return Vv()?e instanceof HTMLElement||e instanceof Hr(e).HTMLElement:!1}function _I(e){return!Vv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Hr(e).ShadowRoot}function em(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ko(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Zde(e){return["table","td","th"].includes(lu(e))}function Wv(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function yR(e){const t=xR(),n=Ao(e)?ko(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Jde(e){let t=Fs(e);for(;ai(t)&&!Kl(t);){if(yR(t))return t;if(Wv(t))return null;t=Fs(t)}return null}function xR(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Kl(e){return["html","body","#document"].includes(lu(e))}function ko(e){return Hr(e).getComputedStyle(e)}function Hv(e){return Ao(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fs(e){if(lu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_I(e)&&e.host||mi(e);return _I(t)?t.host:t}function H2(e){const t=Fs(e);return Kl(t)?e.ownerDocument?e.ownerDocument.body:e.body:ai(t)&&em(t)?t:H2(t)}function fp(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=H2(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Hr(o);if(i){const a=CE(s);return t.concat(s,s.visualViewport||[],em(o)?o:[],a&&n?fp(a):[])}return t.concat(o,fp(o,[],n))}function CE(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function K2(e){const t=ko(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ai(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Gg(n)!==i||Gg(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function ER(e){return Ao(e)?e:e.contextElement}function Al(e){const t=ER(e);if(!ai(t))return ii(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=K2(t);let s=(i?Gg(n.width):n.width)/r,a=(i?Gg(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Qde=ii(0);function U2(e){const t=Hr(e);return!xR()||!t.visualViewport?Qde:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function efe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Hr(e)?!1:t}function Na(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=ER(e);let s=ii(1);t&&(r?Ao(r)&&(s=Al(r)):s=Al(e));const a=efe(i,n,r)?U2(i):ii(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,f=o.height/s.y;if(i){const m=Hr(i),g=r&&Ao(r)?Hr(r):r;let v=m,b=CE(v);for(;b&&r&&g!==v;){const x=Al(b),y=b.getBoundingClientRect(),_=ko(b),w=y.left+(b.clientLeft+parseFloat(_.paddingLeft))*x.x,T=y.top+(b.clientTop+parseFloat(_.paddingTop))*x.y;l*=x.x,c*=x.y,d*=x.x,f*=x.y,l+=w,c+=T,v=Hr(b),b=CE(v)}}return Xg({width:d,height:f,x:l,y:c})}function wR(e,t){const n=Hv(e).scrollLeft;return t?t.left+n:Na(mi(e)).left+n}function z2(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:wR(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function tfe(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=mi(r),a=t?Wv(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ii(1);const d=ii(0),f=ai(r);if((f||!f&&!i)&&((lu(r)!=="body"||em(s))&&(l=Hv(r)),ai(r))){const g=Na(r);c=Al(r),d.x=g.x+r.clientLeft,d.y=g.y+r.clientTop}const m=s&&!f&&!i?z2(s,l,!0):ii(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+m.x,y:n.y*c.y-l.scrollTop*c.y+d.y+m.y}}function nfe(e){return Array.from(e.getClientRects())}function rfe(e){const t=mi(e),n=Hv(e),r=e.ownerDocument.body,o=Wr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Wr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+wR(e);const a=-n.scrollTop;return ko(r).direction==="rtl"&&(s+=Wr(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function ofe(e,t){const n=Hr(e),r=mi(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=xR();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function ife(e,t){const n=Na(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ai(e)?Al(e):ii(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function NI(e,t,n){let r;if(t==="viewport")r=ofe(e,n);else if(t==="document")r=rfe(mi(e));else if(Ao(t))r=ife(t,n);else{const o=U2(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Xg(r)}function G2(e,t){const n=Fs(e);return n===t||!Ao(n)||Kl(n)?!1:ko(n).position==="fixed"||G2(n,t)}function sfe(e,t){const n=t.get(e);if(n)return n;let r=fp(e,[],!1).filter(a=>Ao(a)&&lu(a)!=="body"),o=null;const i=ko(e).position==="fixed";let s=i?Fs(e):e;for(;Ao(s)&&!Kl(s);){const a=ko(s),l=yR(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||em(s)&&!l&&G2(e,s))?r=r.filter(d=>d!==s):o=a,s=Fs(s)}return t.set(e,r),r}function afe(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Wv(t)?[]:sfe(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,d)=>{const f=NI(t,d,o);return c.top=Wr(f.top,c.top),c.right=ks(f.right,c.right),c.bottom=ks(f.bottom,c.bottom),c.left=Wr(f.left,c.left),c},NI(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function lfe(e){const{width:t,height:n}=K2(e);return{width:t,height:n}}function ufe(e,t,n){const r=ai(t),o=mi(t),i=n==="fixed",s=Na(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=ii(0);if(r||!r&&!i)if((lu(t)!=="body"||em(o))&&(a=Hv(t)),r){const m=Na(t,!0,i,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else o&&(l.x=wR(o));const c=o&&!r&&!i?z2(o,a):ii(0),d=s.left+a.scrollLeft-l.x-c.x,f=s.top+a.scrollTop-l.y-c.y;return{x:d,y:f,width:s.width,height:s.height}}function vx(e){return ko(e).position==="static"}function OI(e,t){if(!ai(e)||ko(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return mi(e)===n&&(n=n.ownerDocument.body),n}function Y2(e,t){const n=Hr(e);if(Wv(e))return n;if(!ai(e)){let o=Fs(e);for(;o&&!Kl(o);){if(Ao(o)&&!vx(o))return o;o=Fs(o)}return n}let r=OI(e,t);for(;r&&Zde(r)&&vx(r);)r=OI(r,t);return r&&Kl(r)&&vx(r)&&!yR(r)?n:r||Jde(e)||n}const cfe=async function(e){const t=this.getOffsetParent||Y2,n=this.getDimensions,r=await n(e.floating);return{reference:ufe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function dfe(e){return ko(e).direction==="rtl"}const ffe={convertOffsetParentRelativeRectToViewportRelativeRect:tfe,getDocumentElement:mi,getClippingRect:afe,getOffsetParent:Y2,getElementRects:cfe,getClientRects:nfe,getDimensions:lfe,getScale:Al,isElement:Ao,isRTL:dfe};function X2(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pfe(e,t){let n=null,r;const o=mi(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:f,width:m,height:g}=c;if(a||t(),!m||!g)return;const v=Kh(f),b=Kh(o.clientWidth-(d+m)),x=Kh(o.clientHeight-(f+g)),y=Kh(d),w={rootMargin:-v+"px "+-b+"px "+-x+"px "+-y+"px",threshold:Wr(0,ks(1,l))||1};let T=!0;function R(S){const P=S[0].intersectionRatio;if(P!==l){if(!T)return s();P?s(!1,P):r=setTimeout(()=>{s(!1,1e-7)},1e3)}P===1&&!X2(c,e.getBoundingClientRect())&&s(),T=!1}try{n=new IntersectionObserver(R,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,w)}n.observe(e)}return s(!0),i}function mfe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=ER(e),d=o||i?[...c?fp(c):[],...fp(t)]:[];d.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const f=c&&a?pfe(c,n):null;let m=-1,g=null;s&&(g=new ResizeObserver(y=>{let[_]=y;_&&_.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=g)==null||w.observe(t)})),n()}),c&&!l&&g.observe(c),g.observe(t));let v,b=l?Na(e):null;l&&x();function x(){const y=Na(e);b&&!X2(b,y)&&n(),b=y,v=requestAnimationFrame(x)}return n(),()=>{var y;d.forEach(_=>{o&&_.removeEventListener("scroll",n),i&&_.removeEventListener("resize",n)}),f?.(),(y=g)==null||y.disconnect(),g=null,l&&cancelAnimationFrame(v)}}const hfe=zde,gfe=Gde,vfe=Hde,bfe=Xde,yfe=Kde,MI=Wde,xfe=Yde,Efe=(e,t,n)=>{const r=new Map,o={platform:ffe,...n},i={...o.platform,_c:r};return Vde(e,t,{...o,platform:i})};var mg=typeof document<"u"?M.useLayoutEffect:M.useEffect;function Zg(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Zg(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Zg(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Z2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function II(e,t){const n=Z2(e);return Math.round(t*n)/n}function bx(e){const t=h.useRef(e);return mg(()=>{t.current=e}),t}function wfe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,f]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=h.useState(r);Zg(m,r)||g(r);const[v,b]=h.useState(null),[x,y]=h.useState(null),_=h.useCallback(L=>{L!==S.current&&(S.current=L,b(L))},[]),w=h.useCallback(L=>{L!==P.current&&(P.current=L,y(L))},[]),T=i||v,R=s||x,S=h.useRef(null),P=h.useRef(null),N=h.useRef(d),F=l!=null,W=bx(l),I=bx(o),B=bx(c),$=h.useCallback(()=>{if(!S.current||!P.current)return;const L={placement:t,strategy:n,middleware:m};I.current&&(L.platform=I.current),Efe(S.current,P.current,L).then(H=>{const V={...H,isPositioned:B.current!==!1};k.current&&!Zg(N.current,V)&&(N.current=V,Rn.flushSync(()=>{f(V)}))})},[m,t,n,I,B]);mg(()=>{c===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,f(L=>({...L,isPositioned:!1})))},[c]);const k=h.useRef(!1);mg(()=>(k.current=!0,()=>{k.current=!1}),[]),mg(()=>{if(T&&(S.current=T),R&&(P.current=R),T&&R){if(W.current)return W.current(T,R,$);$()}},[T,R,$,W,F]);const j=h.useMemo(()=>({reference:S,floating:P,setReference:_,setFloating:w}),[_,w]),D=h.useMemo(()=>({reference:T,floating:R}),[T,R]),A=h.useMemo(()=>{const L={position:n,left:0,top:0};if(!D.floating)return L;const H=II(D.floating,d.x),V=II(D.floating,d.y);return a?{...L,transform:"translate("+H+"px, "+V+"px)",...Z2(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:V}},[n,a,D.floating,d.x,d.y]);return h.useMemo(()=>({...d,update:$,refs:j,elements:D,floatingStyles:A}),[d,$,j,D,A])}const Cfe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?MI({element:r.current,padding:o}).fn(n):{}:r?MI({element:r,padding:o}).fn(n):{}}}},Rfe=(e,t)=>({...hfe(e),options:[e,t]}),Sfe=(e,t)=>({...gfe(e),options:[e,t]}),Pfe=(e,t)=>({...xfe(e),options:[e,t]}),Tfe=(e,t)=>({...vfe(e),options:[e,t]}),_fe=(e,t)=>({...bfe(e),options:[e,t]}),Nfe=(e,t)=>({...yfe(e),options:[e,t]}),Ofe=(e,t)=>({...Cfe(e),options:[e,t]});function Mfe(e){const t=Ife(e),n=h.forwardRef((r,o)=>{const{children:i,...s}=r,a=h.Children.toArray(i),l=a.find(Afe);if(l){const c=l.props.children,d=a.map(f=>f===l?h.Children.count(c)>1?h.Children.only(null):h.isValidElement(c)?c.props.children:null:f);return C.jsx(t,{...s,ref:o,children:h.isValidElement(c)?h.cloneElement(c,void 0,d):null})}return C.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Ife(e){const t=h.forwardRef((n,r)=>{const{children:o,...i}=n;if(h.isValidElement(o)){const s=$fe(o),a=kfe(i,o.props);return o.type!==h.Fragment&&(a.ref=r?kn(r,s):s),h.cloneElement(o,a)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Dfe=Symbol("radix.slottable");function Afe(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Dfe}function kfe(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function $fe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ffe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Lfe=Ffe.reduce((e,t)=>{const n=Mfe(`Primitive.${t}`),r=h.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),jfe="Arrow",J2=h.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return C.jsx(Lfe.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:C.jsx("polygon",{points:"0,0 30,0 15,10"})})});J2.displayName=jfe;var qfe=J2;function Bfe(e){const t=Vfe(e),n=h.forwardRef((r,o)=>{const{children:i,...s}=r,a=h.Children.toArray(i),l=a.find(Hfe);if(l){const c=l.props.children,d=a.map(f=>f===l?h.Children.count(c)>1?h.Children.only(null):h.isValidElement(c)?c.props.children:null:f);return C.jsx(t,{...s,ref:o,children:h.isValidElement(c)?h.cloneElement(c,void 0,d):null})}return C.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Vfe(e){const t=h.forwardRef((n,r)=>{const{children:o,...i}=n;if(h.isValidElement(o)){const s=Ufe(o),a=Kfe(i,o.props);return o.type!==h.Fragment&&(a.ref=r?kn(r,s):s),h.cloneElement(o,a)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Wfe=Symbol("radix.slottable");function Hfe(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wfe}function Kfe(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Ufe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var zfe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Q2=zfe.reduce((e,t)=>{const n=Bfe(`Primitive.${t}`),r=h.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Gfe(e){const[t,n]=h.useState(void 0);return Do(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var CR="Popper",[e4,t4]=tu(CR),[Yfe,n4]=e4(CR),r4=e=>{const{__scopePopper:t,children:n}=e,[r,o]=h.useState(null);return C.jsx(Yfe,{scope:t,anchor:r,onAnchorChange:o,children:n})};r4.displayName=CR;var o4="PopperAnchor",i4=h.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=n4(o4,n),s=h.useRef(null),a=Nn(t,s),l=h.useRef(null);return h.useEffect(()=>{const c=l.current;l.current=r?.current||s.current,c!==l.current&&i.onAnchorChange(l.current)}),r?null:C.jsx(Q2.div,{...o,ref:a})});i4.displayName=o4;var RR="PopperContent",[Xfe,Zfe]=e4(RR),s4=h.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:v,...b}=e,x=n4(RR,n),[y,_]=h.useState(null),w=Nn(t,J=>_(J)),[T,R]=h.useState(null),S=Gfe(T),P=S?.width??0,N=S?.height??0,F=r+(i!=="center"?"-"+i:""),W=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},I=Array.isArray(c)?c:[c],B=I.length>0,$={padding:W,boundary:I.filter(Qfe),altBoundary:B},{refs:k,floatingStyles:j,placement:D,isPositioned:A,middlewareData:L}=wfe({strategy:"fixed",placement:F,whileElementsMounted:(...J)=>mfe(...J,{animationFrame:g==="always"}),elements:{reference:x.anchor},middleware:[Rfe({mainAxis:o+N,alignmentAxis:s}),l&&Sfe({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Pfe():void 0,...$}),l&&Tfe({...$}),_fe({...$,apply:({elements:J,rects:ne,availableWidth:U,availableHeight:ie})=>{const{width:se,height:Q}=ne.reference,me=J.floating.style;me.setProperty("--radix-popper-available-width",`${U}px`),me.setProperty("--radix-popper-available-height",`${ie}px`),me.setProperty("--radix-popper-anchor-width",`${se}px`),me.setProperty("--radix-popper-anchor-height",`${Q}px`)}}),T&&Ofe({element:T,padding:a}),epe({arrowWidth:P,arrowHeight:N}),m&&Nfe({strategy:"referenceHidden",...$})]}),[H,V]=u4(D),X=or(v);Do(()=>{A&&X?.()},[A,X]);const K=L.arrow?.x,G=L.arrow?.y,ee=L.arrow?.centerOffset!==0,[Z,te]=h.useState();return Do(()=>{y&&te(window.getComputedStyle(y).zIndex)},[y]),C.jsx("div",{ref:k.setFloating,"data-radix-popper-content-wrapper":"",style:{...j,transform:A?j.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Z,"--radix-popper-transform-origin":[L.transformOrigin?.x,L.transformOrigin?.y].join(" "),...L.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:C.jsx(Xfe,{scope:n,placedSide:H,onArrowChange:R,arrowX:K,arrowY:G,shouldHideArrow:ee,children:C.jsx(Q2.div,{"data-side":H,"data-align":V,...b,ref:w,style:{...b.style,animation:A?void 0:"none"}})})})});s4.displayName=RR;var a4="PopperArrow",Jfe={top:"bottom",right:"left",bottom:"top",left:"right"},l4=h.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Zfe(a4,r),s=Jfe[i.placedSide];return C.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:C.jsx(qfe,{...o,ref:n,style:{...o.style,display:"block"}})})});l4.displayName=a4;function Qfe(e){return e!==null}var epe=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,s=o.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[c,d]=u4(n),f={start:"0%",center:"50%",end:"100%"}[d],m=(o.arrow?.x??0)+a/2,g=(o.arrow?.y??0)+l/2;let v="",b="";return c==="bottom"?(v=s?f:`${m}px`,b=`${-l}px`):c==="top"?(v=s?f:`${m}px`,b=`${r.floating.height+l}px`):c==="right"?(v=`${-l}px`,b=s?f:`${g}px`):c==="left"&&(v=`${r.floating.width+l}px`,b=s?f:`${g}px`),{data:{x:v,y:b}}}});function u4(e){const[t,n="center"]=e.split("-");return[t,n]}var c4=r4,tpe=i4,npe=s4,rpe=l4;function ope(e){const t=ipe(e),n=h.forwardRef((r,o)=>{const{children:i,...s}=r,a=h.Children.toArray(i),l=a.find(ape);if(l){const c=l.props.children,d=a.map(f=>f===l?h.Children.count(c)>1?h.Children.only(null):h.isValidElement(c)?c.props.children:null:f);return C.jsx(t,{...s,ref:o,children:h.isValidElement(c)?h.cloneElement(c,void 0,d):null})}return C.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function ipe(e){const t=h.forwardRef((n,r)=>{const{children:o,...i}=n;if(h.isValidElement(o)){const s=upe(o),a=lpe(i,o.props);return o.type!==h.Fragment&&(a.ref=r?kn(r,s):s),h.cloneElement(o,a)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var spe=Symbol("radix.slottable");function ape(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===spe}function lpe(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function upe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var cpe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],dpe=cpe.reduce((e,t)=>{const n=ope(`Primitive.${t}`),r=h.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),fpe="Portal",d4=h.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=h.useState(!1);Do(()=>i(!0),[]);const s=n||o&&globalThis?.document?.body;return s?_o.createPortal(C.jsx(dpe.div,{...r,ref:t}),s):null});d4.displayName=fpe;function ppe(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var uu=e=>{const{present:t,children:n}=e,r=mpe(t),o=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),i=Nn(r.ref,hpe(o));return typeof n=="function"||r.isPresent?h.cloneElement(o,{ref:i}):null};uu.displayName="Presence";function mpe(e){const[t,n]=h.useState(),r=h.useRef(null),o=h.useRef(e),i=h.useRef("none"),s=e?"mounted":"unmounted",[a,l]=ppe(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const c=Uh(r.current);i.current=a==="mounted"?c:"none"},[a]),Do(()=>{const c=r.current,d=o.current;if(d!==e){const m=i.current,g=Uh(c);e?l("MOUNT"):g==="none"||c?.display==="none"?l("UNMOUNT"):l(d&&m!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Do(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=g=>{const b=Uh(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&b&&(l("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=g=>{g.target===t&&(i.current=Uh(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:h.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Uh(e){return e?.animationName||"none"}function hpe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function f4(e){const t=gpe(e),n=h.forwardRef((r,o)=>{const{children:i,...s}=r,a=h.Children.toArray(i),l=a.find(bpe);if(l){const c=l.props.children,d=a.map(f=>f===l?h.Children.count(c)>1?h.Children.only(null):h.isValidElement(c)?c.props.children:null:f);return C.jsx(t,{...s,ref:o,children:h.isValidElement(c)?h.cloneElement(c,void 0,d):null})}return C.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function gpe(e){const t=h.forwardRef((n,r)=>{const{children:o,...i}=n;if(h.isValidElement(o)){const s=xpe(o),a=ype(i,o.props);return o.type!==h.Fragment&&(a.ref=r?kn(r,s):s),h.cloneElement(o,a)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vpe=Symbol("radix.slottable");function bpe(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vpe}function ype(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function xpe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Epe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tm=Epe.reduce((e,t)=>{const n=f4(`Primitive.${t}`),r=h.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function wpe(e,t){e&&Rn.flushSync(()=>e.dispatchEvent(t))}function Cpe(e){const t=Rpe(e),n=h.forwardRef((r,o)=>{const{children:i,...s}=r,a=h.Children.toArray(i),l=a.find(Ppe);if(l){const c=l.props.children,d=a.map(f=>f===l?h.Children.count(c)>1?h.Children.only(null):h.isValidElement(c)?c.props.children:null:f);return C.jsx(t,{...s,ref:o,children:h.isValidElement(c)?h.cloneElement(c,void 0,d):null})}return C.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Rpe(e){const t=h.forwardRef((n,r)=>{const{children:o,...i}=n;if(h.isValidElement(o)){const s=_pe(o),a=Tpe(i,o.props);return o.type!==h.Fragment&&(a.ref=r?kn(r,s):s),h.cloneElement(o,a)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Spe=Symbol("radix.slottable");function Ppe(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Spe}function Tpe(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function _pe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Npe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],p4=Npe.reduce((e,t)=>{const n=Cpe(`Primitive.${t}`),r=h.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),yx="rovingFocusGroup.onEntryFocus",Ope={bubbles:!1,cancelable:!0},nm="RovingFocusGroup",[RE,m4,Mpe]=A2(nm),[Ipe,h4]=tu(nm,[Mpe]),[Dpe,Ape]=Ipe(nm),g4=h.forwardRef((e,t)=>C.jsx(RE.Provider,{scope:e.__scopeRovingFocusGroup,children:C.jsx(RE.Slot,{scope:e.__scopeRovingFocusGroup,children:C.jsx(kpe,{...e,ref:t})})}));g4.displayName=nm;var kpe=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=e,m=h.useRef(null),g=Nn(t,m),v=k2(i),[b,x]=vr({prop:s,defaultProp:a??null,onChange:l,caller:nm}),[y,_]=h.useState(!1),w=or(c),T=m4(n),R=h.useRef(!1),[S,P]=h.useState(0);return h.useEffect(()=>{const N=m.current;if(N)return N.addEventListener(yx,w),()=>N.removeEventListener(yx,w)},[w]),C.jsx(Dpe,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:b,onItemFocus:h.useCallback(N=>x(N),[x]),onItemShiftTab:h.useCallback(()=>_(!0),[]),onFocusableItemAdd:h.useCallback(()=>P(N=>N+1),[]),onFocusableItemRemove:h.useCallback(()=>P(N=>N-1),[]),children:C.jsx(p4.div,{tabIndex:y||S===0?-1:0,"data-orientation":r,...f,ref:g,style:{outline:"none",...e.style},onMouseDown:At(e.onMouseDown,()=>{R.current=!0}),onFocus:At(e.onFocus,N=>{const F=!R.current;if(N.target===N.currentTarget&&F&&!y){const W=new CustomEvent(yx,Ope);if(N.currentTarget.dispatchEvent(W),!W.defaultPrevented){const I=T().filter(D=>D.focusable),B=I.find(D=>D.active),$=I.find(D=>D.id===b),j=[B,$,...I].filter(Boolean).map(D=>D.ref.current);y4(j,d)}}R.current=!1}),onBlur:At(e.onBlur,()=>_(!1))})})}),v4="RovingFocusGroupItem",b4=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:s,...a}=e,l=Nr(),c=i||l,d=Ape(v4,n),f=d.currentTabStopId===c,m=m4(n),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:b}=d;return h.useEffect(()=>{if(r)return g(),()=>v()},[r,g,v]),C.jsx(RE.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:C.jsx(p4.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:At(e.onMouseDown,x=>{r?d.onItemFocus(c):x.preventDefault()}),onFocus:At(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:At(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=Lpe(x,d.orientation,d.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let w=m().filter(T=>T.focusable).map(T=>T.ref.current);if(y==="last")w.reverse();else if(y==="prev"||y==="next"){y==="prev"&&w.reverse();const T=w.indexOf(x.currentTarget);w=d.loop?jpe(w,T+1):w.slice(T+1)}setTimeout(()=>y4(w))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:b!=null}):s})})});b4.displayName=v4;var $pe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Fpe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Lpe(e,t,n){const r=Fpe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return $pe[r]}function y4(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function jpe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var qpe=g4,Bpe=b4,SE=["Enter"," "],Vpe=["ArrowDown","PageUp","Home"],x4=["ArrowUp","PageDown","End"],Wpe=[...Vpe,...x4],Hpe={ltr:[...SE,"ArrowRight"],rtl:[...SE,"ArrowLeft"]},Kpe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},rm="Menu",[pp,Upe,zpe]=A2(rm),[Wa,E4]=tu(rm,[zpe,t4,h4]),om=t4(),w4=h4(),[C4,Ks]=Wa(rm),[Gpe,im]=Wa(rm),R4=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:s=!0}=e,a=om(t),[l,c]=h.useState(null),d=h.useRef(!1),f=or(i),m=k2(o);return h.useEffect(()=>{const g=()=>{d.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>d.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),C.jsx(c4,{...a,children:C.jsx(C4,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:c,children:C.jsx(Gpe,{scope:t,onClose:h.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:m,modal:s,children:r})})})};R4.displayName=rm;var Ype="MenuAnchor",SR=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=om(n);return C.jsx(tpe,{...o,...r,ref:t})});SR.displayName=Ype;var PR="MenuPortal",[Xpe,S4]=Wa(PR,{forceMount:void 0}),P4=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=Ks(PR,t);return C.jsx(Xpe,{scope:t,forceMount:n,children:C.jsx(uu,{present:n||i.open,children:C.jsx(d4,{asChild:!0,container:o,children:r})})})};P4.displayName=PR;var mo="MenuContent",[Zpe,TR]=Wa(mo),T4=h.forwardRef((e,t)=>{const n=S4(mo,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Ks(mo,e.__scopeMenu),s=im(mo,e.__scopeMenu);return C.jsx(pp.Provider,{scope:e.__scopeMenu,children:C.jsx(uu,{present:r||i.open,children:C.jsx(pp.Slot,{scope:e.__scopeMenu,children:s.modal?C.jsx(Jpe,{...o,ref:t}):C.jsx(Qpe,{...o,ref:t})})})})}),Jpe=h.forwardRef((e,t)=>{const n=Ks(mo,e.__scopeMenu),r=h.useRef(null),o=Nn(t,r);return h.useEffect(()=>{const i=r.current;if(i)return n$(i)},[]),C.jsx(_R,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:At(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Qpe=h.forwardRef((e,t)=>{const n=Ks(mo,e.__scopeMenu);return C.jsx(_R,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),eme=f4("MenuContent.ScrollLock"),_R=h.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:g,disableOutsideScroll:v,...b}=e,x=Ks(mo,n),y=im(mo,n),_=om(n),w=w4(n),T=Upe(n),[R,S]=h.useState(null),P=h.useRef(null),N=Nn(t,P,x.onContentChange),F=h.useRef(0),W=h.useRef(""),I=h.useRef(0),B=h.useRef(null),$=h.useRef("right"),k=h.useRef(0),j=v?Dw:h.Fragment,D=v?{as:eme,allowPinchZoom:!0}:void 0,A=H=>{const V=W.current+H,X=T().filter(J=>!J.disabled),K=document.activeElement,G=X.find(J=>J.ref.current===K)?.textValue,ee=X.map(J=>J.textValue),Z=fme(ee,V,G),te=X.find(J=>J.textValue===Z)?.ref.current;(function J(ne){W.current=ne,window.clearTimeout(F.current),ne!==""&&(F.current=window.setTimeout(()=>J(""),1e3))})(V),te&&setTimeout(()=>te.focus())};h.useEffect(()=>()=>window.clearTimeout(F.current),[]),bde();const L=h.useCallback(H=>$.current===B.current?.side&&mme(H,B.current?.area),[]);return C.jsx(Zpe,{scope:n,searchRef:W,onItemEnter:h.useCallback(H=>{L(H)&&H.preventDefault()},[L]),onItemLeave:h.useCallback(H=>{L(H)||(P.current?.focus(),S(null))},[L]),onTriggerLeave:h.useCallback(H=>{L(H)&&H.preventDefault()},[L]),pointerGraceTimerRef:I,onPointerGraceIntentChange:h.useCallback(H=>{B.current=H},[]),children:C.jsx(j,{...D,children:C.jsx(q2,{asChild:!0,trapped:o,onMountAutoFocus:At(i,H=>{H.preventDefault(),P.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:C.jsx(L2,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:g,children:C.jsx(qpe,{asChild:!0,...w,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:R,onCurrentTabStopIdChange:S,onEntryFocus:At(l,H=>{y.isUsingKeyboardRef.current||H.preventDefault()}),preventScrollOnEntryFocus:!0,children:C.jsx(npe,{role:"menu","aria-orientation":"vertical","data-state":H4(x.open),"data-radix-menu-content":"",dir:y.dir,..._,...b,ref:N,style:{outline:"none",...b.style},onKeyDown:At(b.onKeyDown,H=>{const X=H.target.closest("[data-radix-menu-content]")===H.currentTarget,K=H.ctrlKey||H.altKey||H.metaKey,G=H.key.length===1;X&&(H.key==="Tab"&&H.preventDefault(),!K&&G&&A(H.key));const ee=P.current;if(H.target!==ee||!Wpe.includes(H.key))return;H.preventDefault();const te=T().filter(J=>!J.disabled).map(J=>J.ref.current);x4.includes(H.key)&&te.reverse(),cme(te)}),onBlur:At(e.onBlur,H=>{H.currentTarget.contains(H.target)||(window.clearTimeout(F.current),W.current="")}),onPointerMove:At(e.onPointerMove,mp(H=>{const V=H.target,X=k.current!==H.clientX;if(H.currentTarget.contains(V)&&X){const K=H.clientX>k.current?"right":"left";$.current=K,k.current=H.clientX}}))})})})})})})});T4.displayName=mo;var tme="MenuGroup",NR=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return C.jsx(tm.div,{role:"group",...r,ref:t})});NR.displayName=tme;var nme="MenuLabel",_4=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return C.jsx(tm.div,{...r,ref:t})});_4.displayName=nme;var Jg="MenuItem",DI="menu.itemSelect",Kv=h.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=h.useRef(null),s=im(Jg,e.__scopeMenu),a=TR(Jg,e.__scopeMenu),l=Nn(t,i),c=h.useRef(!1),d=()=>{const f=i.current;if(!n&&f){const m=new CustomEvent(DI,{bubbles:!0,cancelable:!0});f.addEventListener(DI,g=>r?.(g),{once:!0}),wpe(f,m),m.defaultPrevented?c.current=!1:s.onClose()}};return C.jsx(N4,{...o,ref:l,disabled:n,onClick:At(e.onClick,d),onPointerDown:f=>{e.onPointerDown?.(f),c.current=!0},onPointerUp:At(e.onPointerUp,f=>{c.current||f.currentTarget?.click()}),onKeyDown:At(e.onKeyDown,f=>{const m=a.searchRef.current!=="";n||m&&f.key===" "||SE.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Kv.displayName=Jg;var N4=h.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,s=TR(Jg,n),a=w4(n),l=h.useRef(null),c=Nn(t,l),[d,f]=h.useState(!1),[m,g]=h.useState("");return h.useEffect(()=>{const v=l.current;v&&g((v.textContent??"").trim())},[i.children]),C.jsx(pp.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:C.jsx(Bpe,{asChild:!0,...a,focusable:!r,children:C.jsx(tm.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:c,onPointerMove:At(e.onPointerMove,mp(v=>{r?s.onItemLeave(v):(s.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:At(e.onPointerLeave,mp(v=>s.onItemLeave(v))),onFocus:At(e.onFocus,()=>f(!0)),onBlur:At(e.onBlur,()=>f(!1))})})})}),rme="MenuCheckboxItem",O4=h.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return C.jsx(k4,{scope:e.__scopeMenu,checked:n,children:C.jsx(Kv,{role:"menuitemcheckbox","aria-checked":Qg(n)?"mixed":n,...o,ref:t,"data-state":IR(n),onSelect:At(o.onSelect,()=>r?.(Qg(n)?!0:!n),{checkForDefaultPrevented:!1})})})});O4.displayName=rme;var M4="MenuRadioGroup",[ome,ime]=Wa(M4,{value:void 0,onValueChange:()=>{}}),I4=h.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=or(r);return C.jsx(ome,{scope:e.__scopeMenu,value:n,onValueChange:i,children:C.jsx(NR,{...o,ref:t})})});I4.displayName=M4;var D4="MenuRadioItem",A4=h.forwardRef((e,t)=>{const{value:n,...r}=e,o=ime(D4,e.__scopeMenu),i=n===o.value;return C.jsx(k4,{scope:e.__scopeMenu,checked:i,children:C.jsx(Kv,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":IR(i),onSelect:At(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});A4.displayName=D4;var OR="MenuItemIndicator",[k4,sme]=Wa(OR,{checked:!1}),$4=h.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=sme(OR,n);return C.jsx(uu,{present:r||Qg(i.checked)||i.checked===!0,children:C.jsx(tm.span,{...o,ref:t,"data-state":IR(i.checked)})})});$4.displayName=OR;var ame="MenuSeparator",F4=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return C.jsx(tm.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});F4.displayName=ame;var lme="MenuArrow",L4=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=om(n);return C.jsx(rpe,{...o,...r,ref:t})});L4.displayName=lme;var MR="MenuSub",[ume,j4]=Wa(MR),q4=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,i=Ks(MR,t),s=om(t),[a,l]=h.useState(null),[c,d]=h.useState(null),f=or(o);return h.useEffect(()=>(i.open===!1&&f(!1),()=>f(!1)),[i.open,f]),C.jsx(c4,{...s,children:C.jsx(C4,{scope:t,open:r,onOpenChange:f,content:c,onContentChange:d,children:C.jsx(ume,{scope:t,contentId:Nr(),triggerId:Nr(),trigger:a,onTriggerChange:l,children:n})})})};q4.displayName=MR;var Wf="MenuSubTrigger",B4=h.forwardRef((e,t)=>{const n=Ks(Wf,e.__scopeMenu),r=im(Wf,e.__scopeMenu),o=j4(Wf,e.__scopeMenu),i=TR(Wf,e.__scopeMenu),s=h.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=i,c={__scopeMenu:e.__scopeMenu},d=h.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return h.useEffect(()=>d,[d]),h.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),l(null)}},[a,l]),C.jsx(SR,{asChild:!0,...c,children:C.jsx(N4,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":H4(n.open),...e,ref:kn(t,o.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:At(e.onPointerMove,mp(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:At(e.onPointerLeave,mp(f=>{d();const m=n.content?.getBoundingClientRect();if(m){const g=n.content?.dataset.side,v=g==="right",b=v?-5:5,x=m[v?"left":"right"],y=m[v?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+b,y:f.clientY},{x,y:m.top},{x:y,y:m.top},{x:y,y:m.bottom},{x,y:m.bottom}],side:g}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:At(e.onKeyDown,f=>{const m=i.searchRef.current!=="";e.disabled||m&&f.key===" "||Hpe[r.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});B4.displayName=Wf;var V4="MenuSubContent",W4=h.forwardRef((e,t)=>{const n=S4(mo,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Ks(mo,e.__scopeMenu),s=im(mo,e.__scopeMenu),a=j4(V4,e.__scopeMenu),l=h.useRef(null),c=Nn(t,l);return C.jsx(pp.Provider,{scope:e.__scopeMenu,children:C.jsx(uu,{present:r||i.open,children:C.jsx(pp.Slot,{scope:e.__scopeMenu,children:C.jsx(_R,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:c,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{s.isUsingKeyboardRef.current&&l.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:At(e.onFocusOutside,d=>{d.target!==a.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:At(e.onEscapeKeyDown,d=>{s.onClose(),d.preventDefault()}),onKeyDown:At(e.onKeyDown,d=>{const f=d.currentTarget.contains(d.target),m=Kpe[s.dir].includes(d.key);f&&m&&(i.onOpenChange(!1),a.trigger?.focus(),d.preventDefault())})})})})})});W4.displayName=V4;function H4(e){return e?"open":"closed"}function Qg(e){return e==="indeterminate"}function IR(e){return Qg(e)?"indeterminate":e?"checked":"unchecked"}function cme(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function dme(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function fme(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=dme(e,Math.max(i,0));o.length===1&&(s=s.filter(c=>c!==n));const l=s.find(c=>c.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function pme(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],l=t[s],c=a.x,d=a.y,f=l.x,m=l.y;d>r!=m>r&&n<(f-c)*(r-d)/(m-d)+c&&(o=!o)}return o}function mme(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return pme(n,t)}function mp(e){return t=>t.pointerType==="mouse"?e(t):void 0}var hme=R4,gme=SR,vme=P4,bme=T4,yme=NR,xme=_4,Eme=Kv,wme=O4,Cme=I4,Rme=A4,Sme=$4,Pme=F4,Tme=L4,_me=q4,Nme=B4,Ome=W4,Uv="DropdownMenu",[Mme]=tu(Uv,[E4]),lr=E4(),[Ime,K4]=Mme(Uv),U4=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,l=lr(t),c=h.useRef(null),[d,f]=vr({prop:o,defaultProp:i??!1,onChange:s,caller:Uv});return C.jsx(Ime,{scope:t,triggerId:Nr(),triggerRef:c,contentId:Nr(),open:d,onOpenChange:f,onOpenToggle:h.useCallback(()=>f(m=>!m),[f]),modal:a,children:C.jsx(hme,{...l,open:d,onOpenChange:f,dir:r,modal:a,children:n})})};U4.displayName=Uv;var z4="DropdownMenuTrigger",G4=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=K4(z4,n),s=lr(n);return C.jsx(gme,{asChild:!0,...s,children:C.jsx(Xce.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:kn(t,i.triggerRef),onPointerDown:At(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(i.onOpenToggle(),i.open||a.preventDefault())}),onKeyDown:At(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&i.onOpenToggle(),a.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});G4.displayName=z4;var Dme="DropdownMenuPortal",Y4=e=>{const{__scopeDropdownMenu:t,...n}=e,r=lr(t);return C.jsx(vme,{...r,...n})};Y4.displayName=Dme;var X4="DropdownMenuContent",Z4=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=K4(X4,n),i=lr(n),s=h.useRef(!1);return C.jsx(bme,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:At(e.onCloseAutoFocus,a=>{s.current||o.triggerRef.current?.focus(),s.current=!1,a.preventDefault()}),onInteractOutside:At(e.onInteractOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;(!o.modal||d)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Z4.displayName=X4;var Ame="DropdownMenuGroup",J4=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lr(n);return C.jsx(yme,{...o,...r,ref:t})});J4.displayName=Ame;var kme="DropdownMenuLabel",Q4=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lr(n);return C.jsx(xme,{...o,...r,ref:t})});Q4.displayName=kme;var $me="DropdownMenuItem",e3=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lr(n);return C.jsx(Eme,{...o,...r,ref:t})});e3.displayName=$me;var Fme="DropdownMenuCheckboxItem",t3=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lr(n);return C.jsx(wme,{...o,...r,ref:t})});t3.displayName=Fme;var Lme="DropdownMenuRadioGroup",n3=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lr(n);return C.jsx(Cme,{...o,...r,ref:t})});n3.displayName=Lme;var jme="DropdownMenuRadioItem",r3=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lr(n);return C.jsx(Rme,{...o,...r,ref:t})});r3.displayName=jme;var qme="DropdownMenuItemIndicator",o3=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lr(n);return C.jsx(Sme,{...o,...r,ref:t})});o3.displayName=qme;var Bme="DropdownMenuSeparator",i3=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lr(n);return C.jsx(Pme,{...o,...r,ref:t})});i3.displayName=Bme;var Vme="DropdownMenuArrow",Wme=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lr(n);return C.jsx(Tme,{...o,...r,ref:t})});Wme.displayName=Vme;var Hme=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:i}=e,s=lr(t),[a,l]=vr({prop:r,defaultProp:i??!1,onChange:o,caller:"DropdownMenuSub"});return C.jsx(_me,{...s,open:a,onOpenChange:l,children:n})},Kme="DropdownMenuSubTrigger",s3=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lr(n);return C.jsx(Nme,{...o,...r,ref:t})});s3.displayName=Kme;var Ume="DropdownMenuSubContent",a3=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lr(n);return C.jsx(Ome,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});a3.displayName=Ume;var zme=U4,Gme=G4,l3=Y4,Yme=Z4,Xme=J4,Zme=Q4,Jme=e3,Qme=t3,ehe=n3,the=r3,u3=o3,nhe=i3,rhe=Hme,ohe=s3,ihe=a3,Hf={exports:{}};var she=Hf.exports,AI;function ahe(){return AI||(AI=1,(function(e,t){(function(){var n,r="4.17.21",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",c=500,d="__lodash_placeholder__",f=1,m=2,g=4,v=1,b=2,x=1,y=2,_=4,w=8,T=16,R=32,S=64,P=128,N=256,F=512,W=30,I="...",B=800,$=16,k=1,j=2,D=3,A=1/0,L=9007199254740991,H=17976931348623157e292,V=NaN,X=4294967295,K=X-1,G=X>>>1,ee=[["ary",P],["bind",x],["bindKey",y],["curry",w],["curryRight",T],["flip",F],["partial",R],["partialRight",S],["rearg",N]],Z="[object Arguments]",te="[object Array]",J="[object AsyncFunction]",ne="[object Boolean]",U="[object Date]",ie="[object DOMException]",se="[object Error]",Q="[object Function]",me="[object GeneratorFunction]",ve="[object Map]",xe="[object Number]",be="[object Null]",Ce="[object Object]",qe="[object Promise]",Te="[object Proxy]",ke="[object RegExp]",ce="[object Set]",he="[object String]",re="[object Symbol]",le="[object Undefined]",Oe="[object WeakMap]",De="[object WeakSet]",Fe="[object ArrayBuffer]",We="[object DataView]",ze="[object Float32Array]",He="[object Float64Array]",Ze="[object Int8Array]",nt="[object Int16Array]",ht="[object Int32Array]",Je="[object Uint8Array]",Ge="[object Uint8ClampedArray]",dt="[object Uint16Array]",rt="[object Uint32Array]",Ve=/\b__p \+= '';/g,Me=/\b(__p \+=) '' \+/g,Be=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ie=/&(?:amp|lt|gt|quot|#39);/g,tt=/[&<>"']/g,at=RegExp(Ie.source),Le=RegExp(tt.source),En=/<%-([\s\S]+?)%>/g,zt=/<%([\s\S]+?)%>/g,Ee=/<%=([\s\S]+?)%>/g,Rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wn=/^\w*$/,yt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zn=/[\\^$.*+?()[\]{}|]/g,On=RegExp(Zn.source),an=/^\s+/,St=/\s/,Lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Fn=/\{\n\/\* \[wrapped with (.+)\] \*/,ur=/,? & /,Mn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Mr=/[()=,{}\[\]\/\s]/,xr=/\\(\\)?/g,_t=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,hi=/\w*$/,lb=/^[-+]0x[0-9a-f]+$/i,hu=/^0b[01]+$/i,gu=/^\[object .+?Constructor\]$/,Ka=/^0o[0-7]+$/i,ub=/^(?:0|[1-9]\d*)$/,Ua=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Us=/($^)/,zs=/['\n\r\u2028\u2029\\]/g,gi="\\ud800-\\udfff",cb="\\u0300-\\u036f",Ir="\\ufe20-\\ufe2f",jo="\\u20d0-\\u20ff",fm=cb+Ir+jo,vu="\\u2700-\\u27bf",pm="a-z\\xdf-\\xf6\\xf8-\\xff",bu="\\xac\\xb1\\xd7\\xf7",mm="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",yu="\\u2000-\\u206f",db=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Gs="A-Z\\xc0-\\xd6\\xd8-\\xde",hm="\\ufe0e\\ufe0f",Er=bu+mm+yu+db,wr="['’]",Ys="["+gi+"]",Xs="["+Er+"]",za="["+fm+"]",Ga="\\d+",xu="["+vu+"]",gm="["+pm+"]",Zs="[^"+gi+Er+Ga+vu+pm+Gs+"]",Js="\\ud83c[\\udffb-\\udfff]",Eu="(?:"+za+"|"+Js+")",vm="[^"+gi+"]",wu="(?:\\ud83c[\\udde6-\\uddff]){2}",Cu="[\\ud800-\\udbff][\\udc00-\\udfff]",es="["+Gs+"]",Ya="\\u200d",Xa="(?:"+gm+"|"+Zs+")",Ru="(?:"+es+"|"+Zs+")",bm="(?:"+wr+"(?:d|ll|m|re|s|t|ve))?",ym="(?:"+wr+"(?:D|LL|M|RE|S|T|VE))?",xm=Eu+"?",Em="["+hm+"]?",Su="(?:"+Ya+"(?:"+[vm,wu,Cu].join("|")+")"+Em+xm+")*",fb="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",pb="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ue=Em+xm+Su,it="(?:"+[xu,wu,Cu].join("|")+")"+Ue,Mt="(?:"+[vm+za+"?",za,wu,Cu,Ys].join("|")+")",jt=RegExp(wr,"g"),In=RegExp(za,"g"),pn=RegExp(Js+"(?="+Js+")|"+Mt+Ue,"g"),vi=RegExp([es+"?"+gm+"+"+bm+"(?="+[Xs,es,"$"].join("|")+")",Ru+"+"+ym+"(?="+[Xs,es+Xa,"$"].join("|")+")",es+"?"+Xa+"+"+bm,es+"+"+ym,pb,fb,Ga,it].join("|"),"g"),qo=RegExp("["+Ya+gi+fm+hm+"]"),Za=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,mb=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],jS=-1,on={};on[ze]=on[He]=on[Ze]=on[nt]=on[ht]=on[Je]=on[Ge]=on[dt]=on[rt]=!0,on[Z]=on[te]=on[Fe]=on[ne]=on[We]=on[U]=on[se]=on[Q]=on[ve]=on[xe]=on[Ce]=on[ke]=on[ce]=on[he]=on[Oe]=!1;var tn={};tn[Z]=tn[te]=tn[Fe]=tn[We]=tn[ne]=tn[U]=tn[ze]=tn[He]=tn[Ze]=tn[nt]=tn[ht]=tn[ve]=tn[xe]=tn[Ce]=tn[ke]=tn[ce]=tn[he]=tn[re]=tn[Je]=tn[Ge]=tn[dt]=tn[rt]=!0,tn[se]=tn[Q]=tn[Oe]=!1;var nV={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},rV={"&":"&","<":"<",">":">",'"':""","'":"'"},oV={"&":"&","<":"<",">":">",""":'"',"'":"'"},iV={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},sV=parseFloat,aV=parseInt,qS=typeof fh=="object"&&fh&&fh.Object===Object&&fh,lV=typeof self=="object"&&self&&self.Object===Object&&self,Un=qS||lV||Function("return this")(),hb=t&&!t.nodeType&&t,Qs=hb&&!0&&e&&!e.nodeType&&e,BS=Qs&&Qs.exports===hb,gb=BS&&qS.process,Gr=(function(){try{var de=Qs&&Qs.require&&Qs.require("util").types;return de||gb&&gb.binding&&gb.binding("util")}catch{}})(),VS=Gr&&Gr.isArrayBuffer,WS=Gr&&Gr.isDate,HS=Gr&&Gr.isMap,KS=Gr&&Gr.isRegExp,US=Gr&&Gr.isSet,zS=Gr&&Gr.isTypedArray;function Dr(de,we,ge){switch(ge.length){case 0:return de.call(we);case 1:return de.call(we,ge[0]);case 2:return de.call(we,ge[0],ge[1]);case 3:return de.call(we,ge[0],ge[1],ge[2])}return de.apply(we,ge)}function uV(de,we,ge,Ye){for(var vt=-1,kt=de==null?0:de.length;++vt<kt;){var Ln=de[vt];we(Ye,Ln,ge(Ln),de)}return Ye}function Yr(de,we){for(var ge=-1,Ye=de==null?0:de.length;++ge<Ye&&we(de[ge],ge,de)!==!1;);return de}function cV(de,we){for(var ge=de==null?0:de.length;ge--&&we(de[ge],ge,de)!==!1;);return de}function GS(de,we){for(var ge=-1,Ye=de==null?0:de.length;++ge<Ye;)if(!we(de[ge],ge,de))return!1;return!0}function ts(de,we){for(var ge=-1,Ye=de==null?0:de.length,vt=0,kt=[];++ge<Ye;){var Ln=de[ge];we(Ln,ge,de)&&(kt[vt++]=Ln)}return kt}function wm(de,we){var ge=de==null?0:de.length;return!!ge&&Ja(de,we,0)>-1}function vb(de,we,ge){for(var Ye=-1,vt=de==null?0:de.length;++Ye<vt;)if(ge(we,de[Ye]))return!0;return!1}function ln(de,we){for(var ge=-1,Ye=de==null?0:de.length,vt=Array(Ye);++ge<Ye;)vt[ge]=we(de[ge],ge,de);return vt}function ns(de,we){for(var ge=-1,Ye=we.length,vt=de.length;++ge<Ye;)de[vt+ge]=we[ge];return de}function bb(de,we,ge,Ye){var vt=-1,kt=de==null?0:de.length;for(Ye&&kt&&(ge=de[++vt]);++vt<kt;)ge=we(ge,de[vt],vt,de);return ge}function dV(de,we,ge,Ye){var vt=de==null?0:de.length;for(Ye&&vt&&(ge=de[--vt]);vt--;)ge=we(ge,de[vt],vt,de);return ge}function yb(de,we){for(var ge=-1,Ye=de==null?0:de.length;++ge<Ye;)if(we(de[ge],ge,de))return!0;return!1}var fV=xb("length");function pV(de){return de.split("")}function mV(de){return de.match(Mn)||[]}function YS(de,we,ge){var Ye;return ge(de,function(vt,kt,Ln){if(we(vt,kt,Ln))return Ye=kt,!1}),Ye}function Cm(de,we,ge,Ye){for(var vt=de.length,kt=ge+(Ye?1:-1);Ye?kt--:++kt<vt;)if(we(de[kt],kt,de))return kt;return-1}function Ja(de,we,ge){return we===we?PV(de,we,ge):Cm(de,XS,ge)}function hV(de,we,ge,Ye){for(var vt=ge-1,kt=de.length;++vt<kt;)if(Ye(de[vt],we))return vt;return-1}function XS(de){return de!==de}function ZS(de,we){var ge=de==null?0:de.length;return ge?wb(de,we)/ge:V}function xb(de){return function(we){return we==null?n:we[de]}}function Eb(de){return function(we){return de==null?n:de[we]}}function JS(de,we,ge,Ye,vt){return vt(de,function(kt,Ln,Qt){ge=Ye?(Ye=!1,kt):we(ge,kt,Ln,Qt)}),ge}function gV(de,we){var ge=de.length;for(de.sort(we);ge--;)de[ge]=de[ge].value;return de}function wb(de,we){for(var ge,Ye=-1,vt=de.length;++Ye<vt;){var kt=we(de[Ye]);kt!==n&&(ge=ge===n?kt:ge+kt)}return ge}function Cb(de,we){for(var ge=-1,Ye=Array(de);++ge<de;)Ye[ge]=we(ge);return Ye}function vV(de,we){return ln(we,function(ge){return[ge,de[ge]]})}function QS(de){return de&&de.slice(0,rP(de)+1).replace(an,"")}function Ar(de){return function(we){return de(we)}}function Rb(de,we){return ln(we,function(ge){return de[ge]})}function Pu(de,we){return de.has(we)}function eP(de,we){for(var ge=-1,Ye=de.length;++ge<Ye&&Ja(we,de[ge],0)>-1;);return ge}function tP(de,we){for(var ge=de.length;ge--&&Ja(we,de[ge],0)>-1;);return ge}function bV(de,we){for(var ge=de.length,Ye=0;ge--;)de[ge]===we&&++Ye;return Ye}var yV=Eb(nV),xV=Eb(rV);function EV(de){return"\\"+iV[de]}function wV(de,we){return de==null?n:de[we]}function Qa(de){return qo.test(de)}function CV(de){return Za.test(de)}function RV(de){for(var we,ge=[];!(we=de.next()).done;)ge.push(we.value);return ge}function Sb(de){var we=-1,ge=Array(de.size);return de.forEach(function(Ye,vt){ge[++we]=[vt,Ye]}),ge}function nP(de,we){return function(ge){return de(we(ge))}}function rs(de,we){for(var ge=-1,Ye=de.length,vt=0,kt=[];++ge<Ye;){var Ln=de[ge];(Ln===we||Ln===d)&&(de[ge]=d,kt[vt++]=ge)}return kt}function Rm(de){var we=-1,ge=Array(de.size);return de.forEach(function(Ye){ge[++we]=Ye}),ge}function SV(de){var we=-1,ge=Array(de.size);return de.forEach(function(Ye){ge[++we]=[Ye,Ye]}),ge}function PV(de,we,ge){for(var Ye=ge-1,vt=de.length;++Ye<vt;)if(de[Ye]===we)return Ye;return-1}function TV(de,we,ge){for(var Ye=ge+1;Ye--;)if(de[Ye]===we)return Ye;return Ye}function el(de){return Qa(de)?NV(de):fV(de)}function vo(de){return Qa(de)?OV(de):pV(de)}function rP(de){for(var we=de.length;we--&&St.test(de.charAt(we)););return we}var _V=Eb(oV);function NV(de){for(var we=pn.lastIndex=0;pn.test(de);)++we;return we}function OV(de){return de.match(pn)||[]}function MV(de){return de.match(vi)||[]}var IV=(function de(we){we=we==null?Un:tl.defaults(Un.Object(),we,tl.pick(Un,mb));var ge=we.Array,Ye=we.Date,vt=we.Error,kt=we.Function,Ln=we.Math,Qt=we.Object,Pb=we.RegExp,DV=we.String,Xr=we.TypeError,Sm=ge.prototype,AV=kt.prototype,nl=Qt.prototype,Pm=we["__core-js_shared__"],Tm=AV.toString,Kt=nl.hasOwnProperty,kV=0,oP=(function(){var u=/[^.]+$/.exec(Pm&&Pm.keys&&Pm.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""})(),_m=nl.toString,$V=Tm.call(Qt),FV=Un._,LV=Pb("^"+Tm.call(Kt).replace(Zn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Nm=BS?we.Buffer:n,os=we.Symbol,Om=we.Uint8Array,iP=Nm?Nm.allocUnsafe:n,Mm=nP(Qt.getPrototypeOf,Qt),sP=Qt.create,aP=nl.propertyIsEnumerable,Im=Sm.splice,lP=os?os.isConcatSpreadable:n,Tu=os?os.iterator:n,ea=os?os.toStringTag:n,Dm=(function(){try{var u=ia(Qt,"defineProperty");return u({},"",{}),u}catch{}})(),jV=we.clearTimeout!==Un.clearTimeout&&we.clearTimeout,qV=Ye&&Ye.now!==Un.Date.now&&Ye.now,BV=we.setTimeout!==Un.setTimeout&&we.setTimeout,Am=Ln.ceil,km=Ln.floor,Tb=Qt.getOwnPropertySymbols,VV=Nm?Nm.isBuffer:n,uP=we.isFinite,WV=Sm.join,HV=nP(Qt.keys,Qt),jn=Ln.max,Jn=Ln.min,KV=Ye.now,UV=we.parseInt,cP=Ln.random,zV=Sm.reverse,_b=ia(we,"DataView"),_u=ia(we,"Map"),Nb=ia(we,"Promise"),rl=ia(we,"Set"),Nu=ia(we,"WeakMap"),Ou=ia(Qt,"create"),$m=Nu&&new Nu,ol={},GV=sa(_b),YV=sa(_u),XV=sa(Nb),ZV=sa(rl),JV=sa(Nu),Fm=os?os.prototype:n,Mu=Fm?Fm.valueOf:n,dP=Fm?Fm.toString:n;function z(u){if(Cn(u)&&!xt(u)&&!(u instanceof Ot)){if(u instanceof Zr)return u;if(Kt.call(u,"__wrapped__"))return f1(u)}return new Zr(u)}var il=(function(){function u(){}return function(p){if(!mn(p))return{};if(sP)return sP(p);u.prototype=p;var E=new u;return u.prototype=n,E}})();function Lm(){}function Zr(u,p){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!p,this.__index__=0,this.__values__=n}z.templateSettings={escape:En,evaluate:zt,interpolate:Ee,variable:"",imports:{_:z}},z.prototype=Lm.prototype,z.prototype.constructor=z,Zr.prototype=il(Lm.prototype),Zr.prototype.constructor=Zr;function Ot(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=X,this.__views__=[]}function QV(){var u=new Ot(this.__wrapped__);return u.__actions__=Cr(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Cr(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Cr(this.__views__),u}function e5(){if(this.__filtered__){var u=new Ot(this);u.__dir__=-1,u.__filtered__=!0}else u=this.clone(),u.__dir__*=-1;return u}function t5(){var u=this.__wrapped__.value(),p=this.__dir__,E=xt(u),O=p<0,q=E?u.length:0,Y=p6(0,q,this.__views__),oe=Y.start,ae=Y.end,fe=ae-oe,Se=O?ae:oe-1,Pe=this.__iteratees__,Ae=Pe.length,Ke=0,ot=Jn(fe,this.__takeCount__);if(!E||!O&&q==fe&&ot==fe)return kP(u,this.__actions__);var ft=[];e:for(;fe--&&Ke<ot;){Se+=p;for(var wt=-1,pt=u[Se];++wt<Ae;){var Nt=Pe[wt],It=Nt.iteratee,Fr=Nt.type,fr=It(pt);if(Fr==j)pt=fr;else if(!fr){if(Fr==k)continue e;break e}}ft[Ke++]=pt}return ft}Ot.prototype=il(Lm.prototype),Ot.prototype.constructor=Ot;function ta(u){var p=-1,E=u==null?0:u.length;for(this.clear();++p<E;){var O=u[p];this.set(O[0],O[1])}}function n5(){this.__data__=Ou?Ou(null):{},this.size=0}function r5(u){var p=this.has(u)&&delete this.__data__[u];return this.size-=p?1:0,p}function o5(u){var p=this.__data__;if(Ou){var E=p[u];return E===l?n:E}return Kt.call(p,u)?p[u]:n}function i5(u){var p=this.__data__;return Ou?p[u]!==n:Kt.call(p,u)}function s5(u,p){var E=this.__data__;return this.size+=this.has(u)?0:1,E[u]=Ou&&p===n?l:p,this}ta.prototype.clear=n5,ta.prototype.delete=r5,ta.prototype.get=o5,ta.prototype.has=i5,ta.prototype.set=s5;function bi(u){var p=-1,E=u==null?0:u.length;for(this.clear();++p<E;){var O=u[p];this.set(O[0],O[1])}}function a5(){this.__data__=[],this.size=0}function l5(u){var p=this.__data__,E=jm(p,u);if(E<0)return!1;var O=p.length-1;return E==O?p.pop():Im.call(p,E,1),--this.size,!0}function u5(u){var p=this.__data__,E=jm(p,u);return E<0?n:p[E][1]}function c5(u){return jm(this.__data__,u)>-1}function d5(u,p){var E=this.__data__,O=jm(E,u);return O<0?(++this.size,E.push([u,p])):E[O][1]=p,this}bi.prototype.clear=a5,bi.prototype.delete=l5,bi.prototype.get=u5,bi.prototype.has=c5,bi.prototype.set=d5;function yi(u){var p=-1,E=u==null?0:u.length;for(this.clear();++p<E;){var O=u[p];this.set(O[0],O[1])}}function f5(){this.size=0,this.__data__={hash:new ta,map:new(_u||bi),string:new ta}}function p5(u){var p=Zm(this,u).delete(u);return this.size-=p?1:0,p}function m5(u){return Zm(this,u).get(u)}function h5(u){return Zm(this,u).has(u)}function g5(u,p){var E=Zm(this,u),O=E.size;return E.set(u,p),this.size+=E.size==O?0:1,this}yi.prototype.clear=f5,yi.prototype.delete=p5,yi.prototype.get=m5,yi.prototype.has=h5,yi.prototype.set=g5;function na(u){var p=-1,E=u==null?0:u.length;for(this.__data__=new yi;++p<E;)this.add(u[p])}function v5(u){return this.__data__.set(u,l),this}function b5(u){return this.__data__.has(u)}na.prototype.add=na.prototype.push=v5,na.prototype.has=b5;function bo(u){var p=this.__data__=new bi(u);this.size=p.size}function y5(){this.__data__=new bi,this.size=0}function x5(u){var p=this.__data__,E=p.delete(u);return this.size=p.size,E}function E5(u){return this.__data__.get(u)}function w5(u){return this.__data__.has(u)}function C5(u,p){var E=this.__data__;if(E instanceof bi){var O=E.__data__;if(!_u||O.length<o-1)return O.push([u,p]),this.size=++E.size,this;E=this.__data__=new yi(O)}return E.set(u,p),this.size=E.size,this}bo.prototype.clear=y5,bo.prototype.delete=x5,bo.prototype.get=E5,bo.prototype.has=w5,bo.prototype.set=C5;function fP(u,p){var E=xt(u),O=!E&&aa(u),q=!E&&!O&&us(u),Y=!E&&!O&&!q&&ul(u),oe=E||O||q||Y,ae=oe?Cb(u.length,DV):[],fe=ae.length;for(var Se in u)(p||Kt.call(u,Se))&&!(oe&&(Se=="length"||q&&(Se=="offset"||Se=="parent")||Y&&(Se=="buffer"||Se=="byteLength"||Se=="byteOffset")||Ci(Se,fe)))&&ae.push(Se);return ae}function pP(u){var p=u.length;return p?u[qb(0,p-1)]:n}function R5(u,p){return Jm(Cr(u),ra(p,0,u.length))}function S5(u){return Jm(Cr(u))}function Ob(u,p,E){(E!==n&&!yo(u[p],E)||E===n&&!(p in u))&&xi(u,p,E)}function Iu(u,p,E){var O=u[p];(!(Kt.call(u,p)&&yo(O,E))||E===n&&!(p in u))&&xi(u,p,E)}function jm(u,p){for(var E=u.length;E--;)if(yo(u[E][0],p))return E;return-1}function P5(u,p,E,O){return is(u,function(q,Y,oe){p(O,q,E(q),oe)}),O}function mP(u,p){return u&&Vo(p,Wn(p),u)}function T5(u,p){return u&&Vo(p,Sr(p),u)}function xi(u,p,E){p=="__proto__"&&Dm?Dm(u,p,{configurable:!0,enumerable:!0,value:E,writable:!0}):u[p]=E}function Mb(u,p){for(var E=-1,O=p.length,q=ge(O),Y=u==null;++E<O;)q[E]=Y?n:dy(u,p[E]);return q}function ra(u,p,E){return u===u&&(E!==n&&(u=u<=E?u:E),p!==n&&(u=u>=p?u:p)),u}function Jr(u,p,E,O,q,Y){var oe,ae=p&f,fe=p&m,Se=p&g;if(E&&(oe=q?E(u,O,q,Y):E(u)),oe!==n)return oe;if(!mn(u))return u;var Pe=xt(u);if(Pe){if(oe=h6(u),!ae)return Cr(u,oe)}else{var Ae=Qn(u),Ke=Ae==Q||Ae==me;if(us(u))return LP(u,ae);if(Ae==Ce||Ae==Z||Ke&&!q){if(oe=fe||Ke?{}:r1(u),!ae)return fe?o6(u,T5(oe,u)):r6(u,mP(oe,u))}else{if(!tn[Ae])return q?u:{};oe=g6(u,Ae,ae)}}Y||(Y=new bo);var ot=Y.get(u);if(ot)return ot;Y.set(u,oe),I1(u)?u.forEach(function(pt){oe.add(Jr(pt,p,E,pt,u,Y))}):O1(u)&&u.forEach(function(pt,Nt){oe.set(Nt,Jr(pt,p,E,Nt,u,Y))});var ft=Se?fe?Zb:Xb:fe?Sr:Wn,wt=Pe?n:ft(u);return Yr(wt||u,function(pt,Nt){wt&&(Nt=pt,pt=u[Nt]),Iu(oe,Nt,Jr(pt,p,E,Nt,u,Y))}),oe}function _5(u){var p=Wn(u);return function(E){return hP(E,u,p)}}function hP(u,p,E){var O=E.length;if(u==null)return!O;for(u=Qt(u);O--;){var q=E[O],Y=p[q],oe=u[q];if(oe===n&&!(q in u)||!Y(oe))return!1}return!0}function gP(u,p,E){if(typeof u!="function")throw new Xr(s);return ju(function(){u.apply(n,E)},p)}function Du(u,p,E,O){var q=-1,Y=wm,oe=!0,ae=u.length,fe=[],Se=p.length;if(!ae)return fe;E&&(p=ln(p,Ar(E))),O?(Y=vb,oe=!1):p.length>=o&&(Y=Pu,oe=!1,p=new na(p));e:for(;++q<ae;){var Pe=u[q],Ae=E==null?Pe:E(Pe);if(Pe=O||Pe!==0?Pe:0,oe&&Ae===Ae){for(var Ke=Se;Ke--;)if(p[Ke]===Ae)continue e;fe.push(Pe)}else Y(p,Ae,O)||fe.push(Pe)}return fe}var is=WP(Bo),vP=WP(Db,!0);function N5(u,p){var E=!0;return is(u,function(O,q,Y){return E=!!p(O,q,Y),E}),E}function qm(u,p,E){for(var O=-1,q=u.length;++O<q;){var Y=u[O],oe=p(Y);if(oe!=null&&(ae===n?oe===oe&&!$r(oe):E(oe,ae)))var ae=oe,fe=Y}return fe}function O5(u,p,E,O){var q=u.length;for(E=Et(E),E<0&&(E=-E>q?0:q+E),O=O===n||O>q?q:Et(O),O<0&&(O+=q),O=E>O?0:A1(O);E<O;)u[E++]=p;return u}function bP(u,p){var E=[];return is(u,function(O,q,Y){p(O,q,Y)&&E.push(O)}),E}function zn(u,p,E,O,q){var Y=-1,oe=u.length;for(E||(E=b6),q||(q=[]);++Y<oe;){var ae=u[Y];p>0&&E(ae)?p>1?zn(ae,p-1,E,O,q):ns(q,ae):O||(q[q.length]=ae)}return q}var Ib=HP(),yP=HP(!0);function Bo(u,p){return u&&Ib(u,p,Wn)}function Db(u,p){return u&&yP(u,p,Wn)}function Bm(u,p){return ts(p,function(E){return Ri(u[E])})}function oa(u,p){p=as(p,u);for(var E=0,O=p.length;u!=null&&E<O;)u=u[Wo(p[E++])];return E&&E==O?u:n}function xP(u,p,E){var O=p(u);return xt(u)?O:ns(O,E(u))}function cr(u){return u==null?u===n?le:be:ea&&ea in Qt(u)?f6(u):S6(u)}function Ab(u,p){return u>p}function M5(u,p){return u!=null&&Kt.call(u,p)}function I5(u,p){return u!=null&&p in Qt(u)}function D5(u,p,E){return u>=Jn(p,E)&&u<jn(p,E)}function kb(u,p,E){for(var O=E?vb:wm,q=u[0].length,Y=u.length,oe=Y,ae=ge(Y),fe=1/0,Se=[];oe--;){var Pe=u[oe];oe&&p&&(Pe=ln(Pe,Ar(p))),fe=Jn(Pe.length,fe),ae[oe]=!E&&(p||q>=120&&Pe.length>=120)?new na(oe&&Pe):n}Pe=u[0];var Ae=-1,Ke=ae[0];e:for(;++Ae<q&&Se.length<fe;){var ot=Pe[Ae],ft=p?p(ot):ot;if(ot=E||ot!==0?ot:0,!(Ke?Pu(Ke,ft):O(Se,ft,E))){for(oe=Y;--oe;){var wt=ae[oe];if(!(wt?Pu(wt,ft):O(u[oe],ft,E)))continue e}Ke&&Ke.push(ft),Se.push(ot)}}return Se}function A5(u,p,E,O){return Bo(u,function(q,Y,oe){p(O,E(q),Y,oe)}),O}function Au(u,p,E){p=as(p,u),u=a1(u,p);var O=u==null?u:u[Wo(eo(p))];return O==null?n:Dr(O,u,E)}function EP(u){return Cn(u)&&cr(u)==Z}function k5(u){return Cn(u)&&cr(u)==Fe}function $5(u){return Cn(u)&&cr(u)==U}function ku(u,p,E,O,q){return u===p?!0:u==null||p==null||!Cn(u)&&!Cn(p)?u!==u&&p!==p:F5(u,p,E,O,ku,q)}function F5(u,p,E,O,q,Y){var oe=xt(u),ae=xt(p),fe=oe?te:Qn(u),Se=ae?te:Qn(p);fe=fe==Z?Ce:fe,Se=Se==Z?Ce:Se;var Pe=fe==Ce,Ae=Se==Ce,Ke=fe==Se;if(Ke&&us(u)){if(!us(p))return!1;oe=!0,Pe=!1}if(Ke&&!Pe)return Y||(Y=new bo),oe||ul(u)?e1(u,p,E,O,q,Y):c6(u,p,fe,E,O,q,Y);if(!(E&v)){var ot=Pe&&Kt.call(u,"__wrapped__"),ft=Ae&&Kt.call(p,"__wrapped__");if(ot||ft){var wt=ot?u.value():u,pt=ft?p.value():p;return Y||(Y=new bo),q(wt,pt,E,O,Y)}}return Ke?(Y||(Y=new bo),d6(u,p,E,O,q,Y)):!1}function L5(u){return Cn(u)&&Qn(u)==ve}function $b(u,p,E,O){var q=E.length,Y=q,oe=!O;if(u==null)return!Y;for(u=Qt(u);q--;){var ae=E[q];if(oe&&ae[2]?ae[1]!==u[ae[0]]:!(ae[0]in u))return!1}for(;++q<Y;){ae=E[q];var fe=ae[0],Se=u[fe],Pe=ae[1];if(oe&&ae[2]){if(Se===n&&!(fe in u))return!1}else{var Ae=new bo;if(O)var Ke=O(Se,Pe,fe,u,p,Ae);if(!(Ke===n?ku(Pe,Se,v|b,O,Ae):Ke))return!1}}return!0}function wP(u){if(!mn(u)||x6(u))return!1;var p=Ri(u)?LV:gu;return p.test(sa(u))}function j5(u){return Cn(u)&&cr(u)==ke}function q5(u){return Cn(u)&&Qn(u)==ce}function B5(u){return Cn(u)&&oh(u.length)&&!!on[cr(u)]}function CP(u){return typeof u=="function"?u:u==null?Pr:typeof u=="object"?xt(u)?PP(u[0],u[1]):SP(u):K1(u)}function Fb(u){if(!Lu(u))return HV(u);var p=[];for(var E in Qt(u))Kt.call(u,E)&&E!="constructor"&&p.push(E);return p}function V5(u){if(!mn(u))return R6(u);var p=Lu(u),E=[];for(var O in u)O=="constructor"&&(p||!Kt.call(u,O))||E.push(O);return E}function Lb(u,p){return u<p}function RP(u,p){var E=-1,O=Rr(u)?ge(u.length):[];return is(u,function(q,Y,oe){O[++E]=p(q,Y,oe)}),O}function SP(u){var p=Qb(u);return p.length==1&&p[0][2]?i1(p[0][0],p[0][1]):function(E){return E===u||$b(E,u,p)}}function PP(u,p){return ty(u)&&o1(p)?i1(Wo(u),p):function(E){var O=dy(E,u);return O===n&&O===p?fy(E,u):ku(p,O,v|b)}}function Vm(u,p,E,O,q){u!==p&&Ib(p,function(Y,oe){if(q||(q=new bo),mn(Y))W5(u,p,oe,E,Vm,O,q);else{var ae=O?O(ry(u,oe),Y,oe+"",u,p,q):n;ae===n&&(ae=Y),Ob(u,oe,ae)}},Sr)}function W5(u,p,E,O,q,Y,oe){var ae=ry(u,E),fe=ry(p,E),Se=oe.get(fe);if(Se){Ob(u,E,Se);return}var Pe=Y?Y(ae,fe,E+"",u,p,oe):n,Ae=Pe===n;if(Ae){var Ke=xt(fe),ot=!Ke&&us(fe),ft=!Ke&&!ot&&ul(fe);Pe=fe,Ke||ot||ft?xt(ae)?Pe=ae:Pn(ae)?Pe=Cr(ae):ot?(Ae=!1,Pe=LP(fe,!0)):ft?(Ae=!1,Pe=jP(fe,!0)):Pe=[]:qu(fe)||aa(fe)?(Pe=ae,aa(ae)?Pe=k1(ae):(!mn(ae)||Ri(ae))&&(Pe=r1(fe))):Ae=!1}Ae&&(oe.set(fe,Pe),q(Pe,fe,O,Y,oe),oe.delete(fe)),Ob(u,E,Pe)}function TP(u,p){var E=u.length;if(E)return p+=p<0?E:0,Ci(p,E)?u[p]:n}function _P(u,p,E){p.length?p=ln(p,function(Y){return xt(Y)?function(oe){return oa(oe,Y.length===1?Y[0]:Y)}:Y}):p=[Pr];var O=-1;p=ln(p,Ar(ct()));var q=RP(u,function(Y,oe,ae){var fe=ln(p,function(Se){return Se(Y)});return{criteria:fe,index:++O,value:Y}});return gV(q,function(Y,oe){return n6(Y,oe,E)})}function H5(u,p){return NP(u,p,function(E,O){return fy(u,O)})}function NP(u,p,E){for(var O=-1,q=p.length,Y={};++O<q;){var oe=p[O],ae=oa(u,oe);E(ae,oe)&&$u(Y,as(oe,u),ae)}return Y}function K5(u){return function(p){return oa(p,u)}}function jb(u,p,E,O){var q=O?hV:Ja,Y=-1,oe=p.length,ae=u;for(u===p&&(p=Cr(p)),E&&(ae=ln(u,Ar(E)));++Y<oe;)for(var fe=0,Se=p[Y],Pe=E?E(Se):Se;(fe=q(ae,Pe,fe,O))>-1;)ae!==u&&Im.call(ae,fe,1),Im.call(u,fe,1);return u}function OP(u,p){for(var E=u?p.length:0,O=E-1;E--;){var q=p[E];if(E==O||q!==Y){var Y=q;Ci(q)?Im.call(u,q,1):Wb(u,q)}}return u}function qb(u,p){return u+km(cP()*(p-u+1))}function U5(u,p,E,O){for(var q=-1,Y=jn(Am((p-u)/(E||1)),0),oe=ge(Y);Y--;)oe[O?Y:++q]=u,u+=E;return oe}function Bb(u,p){var E="";if(!u||p<1||p>L)return E;do p%2&&(E+=u),p=km(p/2),p&&(u+=u);while(p);return E}function Pt(u,p){return oy(s1(u,p,Pr),u+"")}function z5(u){return pP(cl(u))}function G5(u,p){var E=cl(u);return Jm(E,ra(p,0,E.length))}function $u(u,p,E,O){if(!mn(u))return u;p=as(p,u);for(var q=-1,Y=p.length,oe=Y-1,ae=u;ae!=null&&++q<Y;){var fe=Wo(p[q]),Se=E;if(fe==="__proto__"||fe==="constructor"||fe==="prototype")return u;if(q!=oe){var Pe=ae[fe];Se=O?O(Pe,fe,ae):n,Se===n&&(Se=mn(Pe)?Pe:Ci(p[q+1])?[]:{})}Iu(ae,fe,Se),ae=ae[fe]}return u}var MP=$m?function(u,p){return $m.set(u,p),u}:Pr,Y5=Dm?function(u,p){return Dm(u,"toString",{configurable:!0,enumerable:!1,value:my(p),writable:!0})}:Pr;function X5(u){return Jm(cl(u))}function Qr(u,p,E){var O=-1,q=u.length;p<0&&(p=-p>q?0:q+p),E=E>q?q:E,E<0&&(E+=q),q=p>E?0:E-p>>>0,p>>>=0;for(var Y=ge(q);++O<q;)Y[O]=u[O+p];return Y}function Z5(u,p){var E;return is(u,function(O,q,Y){return E=p(O,q,Y),!E}),!!E}function Wm(u,p,E){var O=0,q=u==null?O:u.length;if(typeof p=="number"&&p===p&&q<=G){for(;O<q;){var Y=O+q>>>1,oe=u[Y];oe!==null&&!$r(oe)&&(E?oe<=p:oe<p)?O=Y+1:q=Y}return q}return Vb(u,p,Pr,E)}function Vb(u,p,E,O){var q=0,Y=u==null?0:u.length;if(Y===0)return 0;p=E(p);for(var oe=p!==p,ae=p===null,fe=$r(p),Se=p===n;q<Y;){var Pe=km((q+Y)/2),Ae=E(u[Pe]),Ke=Ae!==n,ot=Ae===null,ft=Ae===Ae,wt=$r(Ae);if(oe)var pt=O||ft;else Se?pt=ft&&(O||Ke):ae?pt=ft&&Ke&&(O||!ot):fe?pt=ft&&Ke&&!ot&&(O||!wt):ot||wt?pt=!1:pt=O?Ae<=p:Ae<p;pt?q=Pe+1:Y=Pe}return Jn(Y,K)}function IP(u,p){for(var E=-1,O=u.length,q=0,Y=[];++E<O;){var oe=u[E],ae=p?p(oe):oe;if(!E||!yo(ae,fe)){var fe=ae;Y[q++]=oe===0?0:oe}}return Y}function DP(u){return typeof u=="number"?u:$r(u)?V:+u}function kr(u){if(typeof u=="string")return u;if(xt(u))return ln(u,kr)+"";if($r(u))return dP?dP.call(u):"";var p=u+"";return p=="0"&&1/u==-A?"-0":p}function ss(u,p,E){var O=-1,q=wm,Y=u.length,oe=!0,ae=[],fe=ae;if(E)oe=!1,q=vb;else if(Y>=o){var Se=p?null:l6(u);if(Se)return Rm(Se);oe=!1,q=Pu,fe=new na}else fe=p?[]:ae;e:for(;++O<Y;){var Pe=u[O],Ae=p?p(Pe):Pe;if(Pe=E||Pe!==0?Pe:0,oe&&Ae===Ae){for(var Ke=fe.length;Ke--;)if(fe[Ke]===Ae)continue e;p&&fe.push(Ae),ae.push(Pe)}else q(fe,Ae,E)||(fe!==ae&&fe.push(Ae),ae.push(Pe))}return ae}function Wb(u,p){return p=as(p,u),u=a1(u,p),u==null||delete u[Wo(eo(p))]}function AP(u,p,E,O){return $u(u,p,E(oa(u,p)),O)}function Hm(u,p,E,O){for(var q=u.length,Y=O?q:-1;(O?Y--:++Y<q)&&p(u[Y],Y,u););return E?Qr(u,O?0:Y,O?Y+1:q):Qr(u,O?Y+1:0,O?q:Y)}function kP(u,p){var E=u;return E instanceof Ot&&(E=E.value()),bb(p,function(O,q){return q.func.apply(q.thisArg,ns([O],q.args))},E)}function Hb(u,p,E){var O=u.length;if(O<2)return O?ss(u[0]):[];for(var q=-1,Y=ge(O);++q<O;)for(var oe=u[q],ae=-1;++ae<O;)ae!=q&&(Y[q]=Du(Y[q]||oe,u[ae],p,E));return ss(zn(Y,1),p,E)}function $P(u,p,E){for(var O=-1,q=u.length,Y=p.length,oe={};++O<q;){var ae=O<Y?p[O]:n;E(oe,u[O],ae)}return oe}function Kb(u){return Pn(u)?u:[]}function Ub(u){return typeof u=="function"?u:Pr}function as(u,p){return xt(u)?u:ty(u,p)?[u]:d1(qt(u))}var J5=Pt;function ls(u,p,E){var O=u.length;return E=E===n?O:E,!p&&E>=O?u:Qr(u,p,E)}var FP=jV||function(u){return Un.clearTimeout(u)};function LP(u,p){if(p)return u.slice();var E=u.length,O=iP?iP(E):new u.constructor(E);return u.copy(O),O}function zb(u){var p=new u.constructor(u.byteLength);return new Om(p).set(new Om(u)),p}function Q5(u,p){var E=p?zb(u.buffer):u.buffer;return new u.constructor(E,u.byteOffset,u.byteLength)}function e6(u){var p=new u.constructor(u.source,hi.exec(u));return p.lastIndex=u.lastIndex,p}function t6(u){return Mu?Qt(Mu.call(u)):{}}function jP(u,p){var E=p?zb(u.buffer):u.buffer;return new u.constructor(E,u.byteOffset,u.length)}function qP(u,p){if(u!==p){var E=u!==n,O=u===null,q=u===u,Y=$r(u),oe=p!==n,ae=p===null,fe=p===p,Se=$r(p);if(!ae&&!Se&&!Y&&u>p||Y&&oe&&fe&&!ae&&!Se||O&&oe&&fe||!E&&fe||!q)return 1;if(!O&&!Y&&!Se&&u<p||Se&&E&&q&&!O&&!Y||ae&&E&&q||!oe&&q||!fe)return-1}return 0}function n6(u,p,E){for(var O=-1,q=u.criteria,Y=p.criteria,oe=q.length,ae=E.length;++O<oe;){var fe=qP(q[O],Y[O]);if(fe){if(O>=ae)return fe;var Se=E[O];return fe*(Se=="desc"?-1:1)}}return u.index-p.index}function BP(u,p,E,O){for(var q=-1,Y=u.length,oe=E.length,ae=-1,fe=p.length,Se=jn(Y-oe,0),Pe=ge(fe+Se),Ae=!O;++ae<fe;)Pe[ae]=p[ae];for(;++q<oe;)(Ae||q<Y)&&(Pe[E[q]]=u[q]);for(;Se--;)Pe[ae++]=u[q++];return Pe}function VP(u,p,E,O){for(var q=-1,Y=u.length,oe=-1,ae=E.length,fe=-1,Se=p.length,Pe=jn(Y-ae,0),Ae=ge(Pe+Se),Ke=!O;++q<Pe;)Ae[q]=u[q];for(var ot=q;++fe<Se;)Ae[ot+fe]=p[fe];for(;++oe<ae;)(Ke||q<Y)&&(Ae[ot+E[oe]]=u[q++]);return Ae}function Cr(u,p){var E=-1,O=u.length;for(p||(p=ge(O));++E<O;)p[E]=u[E];return p}function Vo(u,p,E,O){var q=!E;E||(E={});for(var Y=-1,oe=p.length;++Y<oe;){var ae=p[Y],fe=O?O(E[ae],u[ae],ae,E,u):n;fe===n&&(fe=u[ae]),q?xi(E,ae,fe):Iu(E,ae,fe)}return E}function r6(u,p){return Vo(u,ey(u),p)}function o6(u,p){return Vo(u,t1(u),p)}function Km(u,p){return function(E,O){var q=xt(E)?uV:P5,Y=p?p():{};return q(E,u,ct(O,2),Y)}}function sl(u){return Pt(function(p,E){var O=-1,q=E.length,Y=q>1?E[q-1]:n,oe=q>2?E[2]:n;for(Y=u.length>3&&typeof Y=="function"?(q--,Y):n,oe&&dr(E[0],E[1],oe)&&(Y=q<3?n:Y,q=1),p=Qt(p);++O<q;){var ae=E[O];ae&&u(p,ae,O,Y)}return p})}function WP(u,p){return function(E,O){if(E==null)return E;if(!Rr(E))return u(E,O);for(var q=E.length,Y=p?q:-1,oe=Qt(E);(p?Y--:++Y<q)&&O(oe[Y],Y,oe)!==!1;);return E}}function HP(u){return function(p,E,O){for(var q=-1,Y=Qt(p),oe=O(p),ae=oe.length;ae--;){var fe=oe[u?ae:++q];if(E(Y[fe],fe,Y)===!1)break}return p}}function i6(u,p,E){var O=p&x,q=Fu(u);function Y(){var oe=this&&this!==Un&&this instanceof Y?q:u;return oe.apply(O?E:this,arguments)}return Y}function KP(u){return function(p){p=qt(p);var E=Qa(p)?vo(p):n,O=E?E[0]:p.charAt(0),q=E?ls(E,1).join(""):p.slice(1);return O[u]()+q}}function al(u){return function(p){return bb(W1(V1(p).replace(jt,"")),u,"")}}function Fu(u){return function(){var p=arguments;switch(p.length){case 0:return new u;case 1:return new u(p[0]);case 2:return new u(p[0],p[1]);case 3:return new u(p[0],p[1],p[2]);case 4:return new u(p[0],p[1],p[2],p[3]);case 5:return new u(p[0],p[1],p[2],p[3],p[4]);case 6:return new u(p[0],p[1],p[2],p[3],p[4],p[5]);case 7:return new u(p[0],p[1],p[2],p[3],p[4],p[5],p[6])}var E=il(u.prototype),O=u.apply(E,p);return mn(O)?O:E}}function s6(u,p,E){var O=Fu(u);function q(){for(var Y=arguments.length,oe=ge(Y),ae=Y,fe=ll(q);ae--;)oe[ae]=arguments[ae];var Se=Y<3&&oe[0]!==fe&&oe[Y-1]!==fe?[]:rs(oe,fe);if(Y-=Se.length,Y<E)return XP(u,p,Um,q.placeholder,n,oe,Se,n,n,E-Y);var Pe=this&&this!==Un&&this instanceof q?O:u;return Dr(Pe,this,oe)}return q}function UP(u){return function(p,E,O){var q=Qt(p);if(!Rr(p)){var Y=ct(E,3);p=Wn(p),E=function(ae){return Y(q[ae],ae,q)}}var oe=u(p,E,O);return oe>-1?q[Y?p[oe]:oe]:n}}function zP(u){return wi(function(p){var E=p.length,O=E,q=Zr.prototype.thru;for(u&&p.reverse();O--;){var Y=p[O];if(typeof Y!="function")throw new Xr(s);if(q&&!oe&&Xm(Y)=="wrapper")var oe=new Zr([],!0)}for(O=oe?O:E;++O<E;){Y=p[O];var ae=Xm(Y),fe=ae=="wrapper"?Jb(Y):n;fe&&ny(fe[0])&&fe[1]==(P|w|R|N)&&!fe[4].length&&fe[9]==1?oe=oe[Xm(fe[0])].apply(oe,fe[3]):oe=Y.length==1&&ny(Y)?oe[ae]():oe.thru(Y)}return function(){var Se=arguments,Pe=Se[0];if(oe&&Se.length==1&&xt(Pe))return oe.plant(Pe).value();for(var Ae=0,Ke=E?p[Ae].apply(this,Se):Pe;++Ae<E;)Ke=p[Ae].call(this,Ke);return Ke}})}function Um(u,p,E,O,q,Y,oe,ae,fe,Se){var Pe=p&P,Ae=p&x,Ke=p&y,ot=p&(w|T),ft=p&F,wt=Ke?n:Fu(u);function pt(){for(var Nt=arguments.length,It=ge(Nt),Fr=Nt;Fr--;)It[Fr]=arguments[Fr];if(ot)var fr=ll(pt),Lr=bV(It,fr);if(O&&(It=BP(It,O,q,ot)),Y&&(It=VP(It,Y,oe,ot)),Nt-=Lr,ot&&Nt<Se){var Tn=rs(It,fr);return XP(u,p,Um,pt.placeholder,E,It,Tn,ae,fe,Se-Nt)}var xo=Ae?E:this,Pi=Ke?xo[u]:u;return Nt=It.length,ae?It=P6(It,ae):ft&&Nt>1&&It.reverse(),Pe&&fe<Nt&&(It.length=fe),this&&this!==Un&&this instanceof pt&&(Pi=wt||Fu(Pi)),Pi.apply(xo,It)}return pt}function GP(u,p){return function(E,O){return A5(E,u,p(O),{})}}function zm(u,p){return function(E,O){var q;if(E===n&&O===n)return p;if(E!==n&&(q=E),O!==n){if(q===n)return O;typeof E=="string"||typeof O=="string"?(E=kr(E),O=kr(O)):(E=DP(E),O=DP(O)),q=u(E,O)}return q}}function Gb(u){return wi(function(p){return p=ln(p,Ar(ct())),Pt(function(E){var O=this;return u(p,function(q){return Dr(q,O,E)})})})}function Gm(u,p){p=p===n?" ":kr(p);var E=p.length;if(E<2)return E?Bb(p,u):p;var O=Bb(p,Am(u/el(p)));return Qa(p)?ls(vo(O),0,u).join(""):O.slice(0,u)}function a6(u,p,E,O){var q=p&x,Y=Fu(u);function oe(){for(var ae=-1,fe=arguments.length,Se=-1,Pe=O.length,Ae=ge(Pe+fe),Ke=this&&this!==Un&&this instanceof oe?Y:u;++Se<Pe;)Ae[Se]=O[Se];for(;fe--;)Ae[Se++]=arguments[++ae];return Dr(Ke,q?E:this,Ae)}return oe}function YP(u){return function(p,E,O){return O&&typeof O!="number"&&dr(p,E,O)&&(E=O=n),p=Si(p),E===n?(E=p,p=0):E=Si(E),O=O===n?p<E?1:-1:Si(O),U5(p,E,O,u)}}function Ym(u){return function(p,E){return typeof p=="string"&&typeof E=="string"||(p=to(p),E=to(E)),u(p,E)}}function XP(u,p,E,O,q,Y,oe,ae,fe,Se){var Pe=p&w,Ae=Pe?oe:n,Ke=Pe?n:oe,ot=Pe?Y:n,ft=Pe?n:Y;p|=Pe?R:S,p&=~(Pe?S:R),p&_||(p&=-4);var wt=[u,p,q,ot,Ae,ft,Ke,ae,fe,Se],pt=E.apply(n,wt);return ny(u)&&l1(pt,wt),pt.placeholder=O,u1(pt,u,p)}function Yb(u){var p=Ln[u];return function(E,O){if(E=to(E),O=O==null?0:Jn(Et(O),292),O&&uP(E)){var q=(qt(E)+"e").split("e"),Y=p(q[0]+"e"+(+q[1]+O));return q=(qt(Y)+"e").split("e"),+(q[0]+"e"+(+q[1]-O))}return p(E)}}var l6=rl&&1/Rm(new rl([,-0]))[1]==A?function(u){return new rl(u)}:vy;function ZP(u){return function(p){var E=Qn(p);return E==ve?Sb(p):E==ce?SV(p):vV(p,u(p))}}function Ei(u,p,E,O,q,Y,oe,ae){var fe=p&y;if(!fe&&typeof u!="function")throw new Xr(s);var Se=O?O.length:0;if(Se||(p&=-97,O=q=n),oe=oe===n?oe:jn(Et(oe),0),ae=ae===n?ae:Et(ae),Se-=q?q.length:0,p&S){var Pe=O,Ae=q;O=q=n}var Ke=fe?n:Jb(u),ot=[u,p,E,O,q,Pe,Ae,Y,oe,ae];if(Ke&&C6(ot,Ke),u=ot[0],p=ot[1],E=ot[2],O=ot[3],q=ot[4],ae=ot[9]=ot[9]===n?fe?0:u.length:jn(ot[9]-Se,0),!ae&&p&(w|T)&&(p&=-25),!p||p==x)var ft=i6(u,p,E);else p==w||p==T?ft=s6(u,p,ae):(p==R||p==(x|R))&&!q.length?ft=a6(u,p,E,O):ft=Um.apply(n,ot);var wt=Ke?MP:l1;return u1(wt(ft,ot),u,p)}function JP(u,p,E,O){return u===n||yo(u,nl[E])&&!Kt.call(O,E)?p:u}function QP(u,p,E,O,q,Y){return mn(u)&&mn(p)&&(Y.set(p,u),Vm(u,p,n,QP,Y),Y.delete(p)),u}function u6(u){return qu(u)?n:u}function e1(u,p,E,O,q,Y){var oe=E&v,ae=u.length,fe=p.length;if(ae!=fe&&!(oe&&fe>ae))return!1;var Se=Y.get(u),Pe=Y.get(p);if(Se&&Pe)return Se==p&&Pe==u;var Ae=-1,Ke=!0,ot=E&b?new na:n;for(Y.set(u,p),Y.set(p,u);++Ae<ae;){var ft=u[Ae],wt=p[Ae];if(O)var pt=oe?O(wt,ft,Ae,p,u,Y):O(ft,wt,Ae,u,p,Y);if(pt!==n){if(pt)continue;Ke=!1;break}if(ot){if(!yb(p,function(Nt,It){if(!Pu(ot,It)&&(ft===Nt||q(ft,Nt,E,O,Y)))return ot.push(It)})){Ke=!1;break}}else if(!(ft===wt||q(ft,wt,E,O,Y))){Ke=!1;break}}return Y.delete(u),Y.delete(p),Ke}function c6(u,p,E,O,q,Y,oe){switch(E){case We:if(u.byteLength!=p.byteLength||u.byteOffset!=p.byteOffset)return!1;u=u.buffer,p=p.buffer;case Fe:return!(u.byteLength!=p.byteLength||!Y(new Om(u),new Om(p)));case ne:case U:case xe:return yo(+u,+p);case se:return u.name==p.name&&u.message==p.message;case ke:case he:return u==p+"";case ve:var ae=Sb;case ce:var fe=O&v;if(ae||(ae=Rm),u.size!=p.size&&!fe)return!1;var Se=oe.get(u);if(Se)return Se==p;O|=b,oe.set(u,p);var Pe=e1(ae(u),ae(p),O,q,Y,oe);return oe.delete(u),Pe;case re:if(Mu)return Mu.call(u)==Mu.call(p)}return!1}function d6(u,p,E,O,q,Y){var oe=E&v,ae=Xb(u),fe=ae.length,Se=Xb(p),Pe=Se.length;if(fe!=Pe&&!oe)return!1;for(var Ae=fe;Ae--;){var Ke=ae[Ae];if(!(oe?Ke in p:Kt.call(p,Ke)))return!1}var ot=Y.get(u),ft=Y.get(p);if(ot&&ft)return ot==p&&ft==u;var wt=!0;Y.set(u,p),Y.set(p,u);for(var pt=oe;++Ae<fe;){Ke=ae[Ae];var Nt=u[Ke],It=p[Ke];if(O)var Fr=oe?O(It,Nt,Ke,p,u,Y):O(Nt,It,Ke,u,p,Y);if(!(Fr===n?Nt===It||q(Nt,It,E,O,Y):Fr)){wt=!1;break}pt||(pt=Ke=="constructor")}if(wt&&!pt){var fr=u.constructor,Lr=p.constructor;fr!=Lr&&"constructor"in u&&"constructor"in p&&!(typeof fr=="function"&&fr instanceof fr&&typeof Lr=="function"&&Lr instanceof Lr)&&(wt=!1)}return Y.delete(u),Y.delete(p),wt}function wi(u){return oy(s1(u,n,h1),u+"")}function Xb(u){return xP(u,Wn,ey)}function Zb(u){return xP(u,Sr,t1)}var Jb=$m?function(u){return $m.get(u)}:vy;function Xm(u){for(var p=u.name+"",E=ol[p],O=Kt.call(ol,p)?E.length:0;O--;){var q=E[O],Y=q.func;if(Y==null||Y==u)return q.name}return p}function ll(u){var p=Kt.call(z,"placeholder")?z:u;return p.placeholder}function ct(){var u=z.iteratee||hy;return u=u===hy?CP:u,arguments.length?u(arguments[0],arguments[1]):u}function Zm(u,p){var E=u.__data__;return y6(p)?E[typeof p=="string"?"string":"hash"]:E.map}function Qb(u){for(var p=Wn(u),E=p.length;E--;){var O=p[E],q=u[O];p[E]=[O,q,o1(q)]}return p}function ia(u,p){var E=wV(u,p);return wP(E)?E:n}function f6(u){var p=Kt.call(u,ea),E=u[ea];try{u[ea]=n;var O=!0}catch{}var q=_m.call(u);return O&&(p?u[ea]=E:delete u[ea]),q}var ey=Tb?function(u){return u==null?[]:(u=Qt(u),ts(Tb(u),function(p){return aP.call(u,p)}))}:by,t1=Tb?function(u){for(var p=[];u;)ns(p,ey(u)),u=Mm(u);return p}:by,Qn=cr;(_b&&Qn(new _b(new ArrayBuffer(1)))!=We||_u&&Qn(new _u)!=ve||Nb&&Qn(Nb.resolve())!=qe||rl&&Qn(new rl)!=ce||Nu&&Qn(new Nu)!=Oe)&&(Qn=function(u){var p=cr(u),E=p==Ce?u.constructor:n,O=E?sa(E):"";if(O)switch(O){case GV:return We;case YV:return ve;case XV:return qe;case ZV:return ce;case JV:return Oe}return p});function p6(u,p,E){for(var O=-1,q=E.length;++O<q;){var Y=E[O],oe=Y.size;switch(Y.type){case"drop":u+=oe;break;case"dropRight":p-=oe;break;case"take":p=Jn(p,u+oe);break;case"takeRight":u=jn(u,p-oe);break}}return{start:u,end:p}}function m6(u){var p=u.match(Fn);return p?p[1].split(ur):[]}function n1(u,p,E){p=as(p,u);for(var O=-1,q=p.length,Y=!1;++O<q;){var oe=Wo(p[O]);if(!(Y=u!=null&&E(u,oe)))break;u=u[oe]}return Y||++O!=q?Y:(q=u==null?0:u.length,!!q&&oh(q)&&Ci(oe,q)&&(xt(u)||aa(u)))}function h6(u){var p=u.length,E=new u.constructor(p);return p&&typeof u[0]=="string"&&Kt.call(u,"index")&&(E.index=u.index,E.input=u.input),E}function r1(u){return typeof u.constructor=="function"&&!Lu(u)?il(Mm(u)):{}}function g6(u,p,E){var O=u.constructor;switch(p){case Fe:return zb(u);case ne:case U:return new O(+u);case We:return Q5(u,E);case ze:case He:case Ze:case nt:case ht:case Je:case Ge:case dt:case rt:return jP(u,E);case ve:return new O;case xe:case he:return new O(u);case ke:return e6(u);case ce:return new O;case re:return t6(u)}}function v6(u,p){var E=p.length;if(!E)return u;var O=E-1;return p[O]=(E>1?"& ":"")+p[O],p=p.join(E>2?", ":" "),u.replace(Lt,`{
|
|
114
|
-
/* [wrapped with `+p+`] */
|
|
115
|
-
`)}function b6(u){return xt(u)||aa(u)||!!(lP&&u&&u[lP])}function Ci(u,p){var E=typeof u;return p=p??L,!!p&&(E=="number"||E!="symbol"&&ub.test(u))&&u>-1&&u%1==0&&u<p}function dr(u,p,E){if(!mn(E))return!1;var O=typeof p;return(O=="number"?Rr(E)&&Ci(p,E.length):O=="string"&&p in E)?yo(E[p],u):!1}function ty(u,p){if(xt(u))return!1;var E=typeof u;return E=="number"||E=="symbol"||E=="boolean"||u==null||$r(u)?!0:wn.test(u)||!Rt.test(u)||p!=null&&u in Qt(p)}function y6(u){var p=typeof u;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?u!=="__proto__":u===null}function ny(u){var p=Xm(u),E=z[p];if(typeof E!="function"||!(p in Ot.prototype))return!1;if(u===E)return!0;var O=Jb(E);return!!O&&u===O[0]}function x6(u){return!!oP&&oP in u}var E6=Pm?Ri:yy;function Lu(u){var p=u&&u.constructor,E=typeof p=="function"&&p.prototype||nl;return u===E}function o1(u){return u===u&&!mn(u)}function i1(u,p){return function(E){return E==null?!1:E[u]===p&&(p!==n||u in Qt(E))}}function w6(u){var p=nh(u,function(O){return E.size===c&&E.clear(),O}),E=p.cache;return p}function C6(u,p){var E=u[1],O=p[1],q=E|O,Y=q<(x|y|P),oe=O==P&&E==w||O==P&&E==N&&u[7].length<=p[8]||O==(P|N)&&p[7].length<=p[8]&&E==w;if(!(Y||oe))return u;O&x&&(u[2]=p[2],q|=E&x?0:_);var ae=p[3];if(ae){var fe=u[3];u[3]=fe?BP(fe,ae,p[4]):ae,u[4]=fe?rs(u[3],d):p[4]}return ae=p[5],ae&&(fe=u[5],u[5]=fe?VP(fe,ae,p[6]):ae,u[6]=fe?rs(u[5],d):p[6]),ae=p[7],ae&&(u[7]=ae),O&P&&(u[8]=u[8]==null?p[8]:Jn(u[8],p[8])),u[9]==null&&(u[9]=p[9]),u[0]=p[0],u[1]=q,u}function R6(u){var p=[];if(u!=null)for(var E in Qt(u))p.push(E);return p}function S6(u){return _m.call(u)}function s1(u,p,E){return p=jn(p===n?u.length-1:p,0),function(){for(var O=arguments,q=-1,Y=jn(O.length-p,0),oe=ge(Y);++q<Y;)oe[q]=O[p+q];q=-1;for(var ae=ge(p+1);++q<p;)ae[q]=O[q];return ae[p]=E(oe),Dr(u,this,ae)}}function a1(u,p){return p.length<2?u:oa(u,Qr(p,0,-1))}function P6(u,p){for(var E=u.length,O=Jn(p.length,E),q=Cr(u);O--;){var Y=p[O];u[O]=Ci(Y,E)?q[Y]:n}return u}function ry(u,p){if(!(p==="constructor"&&typeof u[p]=="function")&&p!="__proto__")return u[p]}var l1=c1(MP),ju=BV||function(u,p){return Un.setTimeout(u,p)},oy=c1(Y5);function u1(u,p,E){var O=p+"";return oy(u,v6(O,T6(m6(O),E)))}function c1(u){var p=0,E=0;return function(){var O=KV(),q=$-(O-E);if(E=O,q>0){if(++p>=B)return arguments[0]}else p=0;return u.apply(n,arguments)}}function Jm(u,p){var E=-1,O=u.length,q=O-1;for(p=p===n?O:p;++E<p;){var Y=qb(E,q),oe=u[Y];u[Y]=u[E],u[E]=oe}return u.length=p,u}var d1=w6(function(u){var p=[];return u.charCodeAt(0)===46&&p.push(""),u.replace(yt,function(E,O,q,Y){p.push(q?Y.replace(xr,"$1"):O||E)}),p});function Wo(u){if(typeof u=="string"||$r(u))return u;var p=u+"";return p=="0"&&1/u==-A?"-0":p}function sa(u){if(u!=null){try{return Tm.call(u)}catch{}try{return u+""}catch{}}return""}function T6(u,p){return Yr(ee,function(E){var O="_."+E[0];p&E[1]&&!wm(u,O)&&u.push(O)}),u.sort()}function f1(u){if(u instanceof Ot)return u.clone();var p=new Zr(u.__wrapped__,u.__chain__);return p.__actions__=Cr(u.__actions__),p.__index__=u.__index__,p.__values__=u.__values__,p}function _6(u,p,E){(E?dr(u,p,E):p===n)?p=1:p=jn(Et(p),0);var O=u==null?0:u.length;if(!O||p<1)return[];for(var q=0,Y=0,oe=ge(Am(O/p));q<O;)oe[Y++]=Qr(u,q,q+=p);return oe}function N6(u){for(var p=-1,E=u==null?0:u.length,O=0,q=[];++p<E;){var Y=u[p];Y&&(q[O++]=Y)}return q}function O6(){var u=arguments.length;if(!u)return[];for(var p=ge(u-1),E=arguments[0],O=u;O--;)p[O-1]=arguments[O];return ns(xt(E)?Cr(E):[E],zn(p,1))}var M6=Pt(function(u,p){return Pn(u)?Du(u,zn(p,1,Pn,!0)):[]}),I6=Pt(function(u,p){var E=eo(p);return Pn(E)&&(E=n),Pn(u)?Du(u,zn(p,1,Pn,!0),ct(E,2)):[]}),D6=Pt(function(u,p){var E=eo(p);return Pn(E)&&(E=n),Pn(u)?Du(u,zn(p,1,Pn,!0),n,E):[]});function A6(u,p,E){var O=u==null?0:u.length;return O?(p=E||p===n?1:Et(p),Qr(u,p<0?0:p,O)):[]}function k6(u,p,E){var O=u==null?0:u.length;return O?(p=E||p===n?1:Et(p),p=O-p,Qr(u,0,p<0?0:p)):[]}function $6(u,p){return u&&u.length?Hm(u,ct(p,3),!0,!0):[]}function F6(u,p){return u&&u.length?Hm(u,ct(p,3),!0):[]}function L6(u,p,E,O){var q=u==null?0:u.length;return q?(E&&typeof E!="number"&&dr(u,p,E)&&(E=0,O=q),O5(u,p,E,O)):[]}function p1(u,p,E){var O=u==null?0:u.length;if(!O)return-1;var q=E==null?0:Et(E);return q<0&&(q=jn(O+q,0)),Cm(u,ct(p,3),q)}function m1(u,p,E){var O=u==null?0:u.length;if(!O)return-1;var q=O-1;return E!==n&&(q=Et(E),q=E<0?jn(O+q,0):Jn(q,O-1)),Cm(u,ct(p,3),q,!0)}function h1(u){var p=u==null?0:u.length;return p?zn(u,1):[]}function j6(u){var p=u==null?0:u.length;return p?zn(u,A):[]}function q6(u,p){var E=u==null?0:u.length;return E?(p=p===n?1:Et(p),zn(u,p)):[]}function B6(u){for(var p=-1,E=u==null?0:u.length,O={};++p<E;){var q=u[p];O[q[0]]=q[1]}return O}function g1(u){return u&&u.length?u[0]:n}function V6(u,p,E){var O=u==null?0:u.length;if(!O)return-1;var q=E==null?0:Et(E);return q<0&&(q=jn(O+q,0)),Ja(u,p,q)}function W6(u){var p=u==null?0:u.length;return p?Qr(u,0,-1):[]}var H6=Pt(function(u){var p=ln(u,Kb);return p.length&&p[0]===u[0]?kb(p):[]}),K6=Pt(function(u){var p=eo(u),E=ln(u,Kb);return p===eo(E)?p=n:E.pop(),E.length&&E[0]===u[0]?kb(E,ct(p,2)):[]}),U6=Pt(function(u){var p=eo(u),E=ln(u,Kb);return p=typeof p=="function"?p:n,p&&E.pop(),E.length&&E[0]===u[0]?kb(E,n,p):[]});function z6(u,p){return u==null?"":WV.call(u,p)}function eo(u){var p=u==null?0:u.length;return p?u[p-1]:n}function G6(u,p,E){var O=u==null?0:u.length;if(!O)return-1;var q=O;return E!==n&&(q=Et(E),q=q<0?jn(O+q,0):Jn(q,O-1)),p===p?TV(u,p,q):Cm(u,XS,q,!0)}function Y6(u,p){return u&&u.length?TP(u,Et(p)):n}var X6=Pt(v1);function v1(u,p){return u&&u.length&&p&&p.length?jb(u,p):u}function Z6(u,p,E){return u&&u.length&&p&&p.length?jb(u,p,ct(E,2)):u}function J6(u,p,E){return u&&u.length&&p&&p.length?jb(u,p,n,E):u}var Q6=wi(function(u,p){var E=u==null?0:u.length,O=Mb(u,p);return OP(u,ln(p,function(q){return Ci(q,E)?+q:q}).sort(qP)),O});function e7(u,p){var E=[];if(!(u&&u.length))return E;var O=-1,q=[],Y=u.length;for(p=ct(p,3);++O<Y;){var oe=u[O];p(oe,O,u)&&(E.push(oe),q.push(O))}return OP(u,q),E}function iy(u){return u==null?u:zV.call(u)}function t7(u,p,E){var O=u==null?0:u.length;return O?(E&&typeof E!="number"&&dr(u,p,E)?(p=0,E=O):(p=p==null?0:Et(p),E=E===n?O:Et(E)),Qr(u,p,E)):[]}function n7(u,p){return Wm(u,p)}function r7(u,p,E){return Vb(u,p,ct(E,2))}function o7(u,p){var E=u==null?0:u.length;if(E){var O=Wm(u,p);if(O<E&&yo(u[O],p))return O}return-1}function i7(u,p){return Wm(u,p,!0)}function s7(u,p,E){return Vb(u,p,ct(E,2),!0)}function a7(u,p){var E=u==null?0:u.length;if(E){var O=Wm(u,p,!0)-1;if(yo(u[O],p))return O}return-1}function l7(u){return u&&u.length?IP(u):[]}function u7(u,p){return u&&u.length?IP(u,ct(p,2)):[]}function c7(u){var p=u==null?0:u.length;return p?Qr(u,1,p):[]}function d7(u,p,E){return u&&u.length?(p=E||p===n?1:Et(p),Qr(u,0,p<0?0:p)):[]}function f7(u,p,E){var O=u==null?0:u.length;return O?(p=E||p===n?1:Et(p),p=O-p,Qr(u,p<0?0:p,O)):[]}function p7(u,p){return u&&u.length?Hm(u,ct(p,3),!1,!0):[]}function m7(u,p){return u&&u.length?Hm(u,ct(p,3)):[]}var h7=Pt(function(u){return ss(zn(u,1,Pn,!0))}),g7=Pt(function(u){var p=eo(u);return Pn(p)&&(p=n),ss(zn(u,1,Pn,!0),ct(p,2))}),v7=Pt(function(u){var p=eo(u);return p=typeof p=="function"?p:n,ss(zn(u,1,Pn,!0),n,p)});function b7(u){return u&&u.length?ss(u):[]}function y7(u,p){return u&&u.length?ss(u,ct(p,2)):[]}function x7(u,p){return p=typeof p=="function"?p:n,u&&u.length?ss(u,n,p):[]}function sy(u){if(!(u&&u.length))return[];var p=0;return u=ts(u,function(E){if(Pn(E))return p=jn(E.length,p),!0}),Cb(p,function(E){return ln(u,xb(E))})}function b1(u,p){if(!(u&&u.length))return[];var E=sy(u);return p==null?E:ln(E,function(O){return Dr(p,n,O)})}var E7=Pt(function(u,p){return Pn(u)?Du(u,p):[]}),w7=Pt(function(u){return Hb(ts(u,Pn))}),C7=Pt(function(u){var p=eo(u);return Pn(p)&&(p=n),Hb(ts(u,Pn),ct(p,2))}),R7=Pt(function(u){var p=eo(u);return p=typeof p=="function"?p:n,Hb(ts(u,Pn),n,p)}),S7=Pt(sy);function P7(u,p){return $P(u||[],p||[],Iu)}function T7(u,p){return $P(u||[],p||[],$u)}var _7=Pt(function(u){var p=u.length,E=p>1?u[p-1]:n;return E=typeof E=="function"?(u.pop(),E):n,b1(u,E)});function y1(u){var p=z(u);return p.__chain__=!0,p}function N7(u,p){return p(u),u}function Qm(u,p){return p(u)}var O7=wi(function(u){var p=u.length,E=p?u[0]:0,O=this.__wrapped__,q=function(Y){return Mb(Y,u)};return p>1||this.__actions__.length||!(O instanceof Ot)||!Ci(E)?this.thru(q):(O=O.slice(E,+E+(p?1:0)),O.__actions__.push({func:Qm,args:[q],thisArg:n}),new Zr(O,this.__chain__).thru(function(Y){return p&&!Y.length&&Y.push(n),Y}))});function M7(){return y1(this)}function I7(){return new Zr(this.value(),this.__chain__)}function D7(){this.__values__===n&&(this.__values__=D1(this.value()));var u=this.__index__>=this.__values__.length,p=u?n:this.__values__[this.__index__++];return{done:u,value:p}}function A7(){return this}function k7(u){for(var p,E=this;E instanceof Lm;){var O=f1(E);O.__index__=0,O.__values__=n,p?q.__wrapped__=O:p=O;var q=O;E=E.__wrapped__}return q.__wrapped__=u,p}function $7(){var u=this.__wrapped__;if(u instanceof Ot){var p=u;return this.__actions__.length&&(p=new Ot(this)),p=p.reverse(),p.__actions__.push({func:Qm,args:[iy],thisArg:n}),new Zr(p,this.__chain__)}return this.thru(iy)}function F7(){return kP(this.__wrapped__,this.__actions__)}var L7=Km(function(u,p,E){Kt.call(u,E)?++u[E]:xi(u,E,1)});function j7(u,p,E){var O=xt(u)?GS:N5;return E&&dr(u,p,E)&&(p=n),O(u,ct(p,3))}function q7(u,p){var E=xt(u)?ts:bP;return E(u,ct(p,3))}var B7=UP(p1),V7=UP(m1);function W7(u,p){return zn(eh(u,p),1)}function H7(u,p){return zn(eh(u,p),A)}function K7(u,p,E){return E=E===n?1:Et(E),zn(eh(u,p),E)}function x1(u,p){var E=xt(u)?Yr:is;return E(u,ct(p,3))}function E1(u,p){var E=xt(u)?cV:vP;return E(u,ct(p,3))}var U7=Km(function(u,p,E){Kt.call(u,E)?u[E].push(p):xi(u,E,[p])});function z7(u,p,E,O){u=Rr(u)?u:cl(u),E=E&&!O?Et(E):0;var q=u.length;return E<0&&(E=jn(q+E,0)),ih(u)?E<=q&&u.indexOf(p,E)>-1:!!q&&Ja(u,p,E)>-1}var G7=Pt(function(u,p,E){var O=-1,q=typeof p=="function",Y=Rr(u)?ge(u.length):[];return is(u,function(oe){Y[++O]=q?Dr(p,oe,E):Au(oe,p,E)}),Y}),Y7=Km(function(u,p,E){xi(u,E,p)});function eh(u,p){var E=xt(u)?ln:RP;return E(u,ct(p,3))}function X7(u,p,E,O){return u==null?[]:(xt(p)||(p=p==null?[]:[p]),E=O?n:E,xt(E)||(E=E==null?[]:[E]),_P(u,p,E))}var Z7=Km(function(u,p,E){u[E?0:1].push(p)},function(){return[[],[]]});function J7(u,p,E){var O=xt(u)?bb:JS,q=arguments.length<3;return O(u,ct(p,4),E,q,is)}function Q7(u,p,E){var O=xt(u)?dV:JS,q=arguments.length<3;return O(u,ct(p,4),E,q,vP)}function eW(u,p){var E=xt(u)?ts:bP;return E(u,rh(ct(p,3)))}function tW(u){var p=xt(u)?pP:z5;return p(u)}function nW(u,p,E){(E?dr(u,p,E):p===n)?p=1:p=Et(p);var O=xt(u)?R5:G5;return O(u,p)}function rW(u){var p=xt(u)?S5:X5;return p(u)}function oW(u){if(u==null)return 0;if(Rr(u))return ih(u)?el(u):u.length;var p=Qn(u);return p==ve||p==ce?u.size:Fb(u).length}function iW(u,p,E){var O=xt(u)?yb:Z5;return E&&dr(u,p,E)&&(p=n),O(u,ct(p,3))}var sW=Pt(function(u,p){if(u==null)return[];var E=p.length;return E>1&&dr(u,p[0],p[1])?p=[]:E>2&&dr(p[0],p[1],p[2])&&(p=[p[0]]),_P(u,zn(p,1),[])}),th=qV||function(){return Un.Date.now()};function aW(u,p){if(typeof p!="function")throw new Xr(s);return u=Et(u),function(){if(--u<1)return p.apply(this,arguments)}}function w1(u,p,E){return p=E?n:p,p=u&&p==null?u.length:p,Ei(u,P,n,n,n,n,p)}function C1(u,p){var E;if(typeof p!="function")throw new Xr(s);return u=Et(u),function(){return--u>0&&(E=p.apply(this,arguments)),u<=1&&(p=n),E}}var ay=Pt(function(u,p,E){var O=x;if(E.length){var q=rs(E,ll(ay));O|=R}return Ei(u,O,p,E,q)}),R1=Pt(function(u,p,E){var O=x|y;if(E.length){var q=rs(E,ll(R1));O|=R}return Ei(p,O,u,E,q)});function S1(u,p,E){p=E?n:p;var O=Ei(u,w,n,n,n,n,n,p);return O.placeholder=S1.placeholder,O}function P1(u,p,E){p=E?n:p;var O=Ei(u,T,n,n,n,n,n,p);return O.placeholder=P1.placeholder,O}function T1(u,p,E){var O,q,Y,oe,ae,fe,Se=0,Pe=!1,Ae=!1,Ke=!0;if(typeof u!="function")throw new Xr(s);p=to(p)||0,mn(E)&&(Pe=!!E.leading,Ae="maxWait"in E,Y=Ae?jn(to(E.maxWait)||0,p):Y,Ke="trailing"in E?!!E.trailing:Ke);function ot(Tn){var xo=O,Pi=q;return O=q=n,Se=Tn,oe=u.apply(Pi,xo),oe}function ft(Tn){return Se=Tn,ae=ju(Nt,p),Pe?ot(Tn):oe}function wt(Tn){var xo=Tn-fe,Pi=Tn-Se,U1=p-xo;return Ae?Jn(U1,Y-Pi):U1}function pt(Tn){var xo=Tn-fe,Pi=Tn-Se;return fe===n||xo>=p||xo<0||Ae&&Pi>=Y}function Nt(){var Tn=th();if(pt(Tn))return It(Tn);ae=ju(Nt,wt(Tn))}function It(Tn){return ae=n,Ke&&O?ot(Tn):(O=q=n,oe)}function Fr(){ae!==n&&FP(ae),Se=0,O=fe=q=ae=n}function fr(){return ae===n?oe:It(th())}function Lr(){var Tn=th(),xo=pt(Tn);if(O=arguments,q=this,fe=Tn,xo){if(ae===n)return ft(fe);if(Ae)return FP(ae),ae=ju(Nt,p),ot(fe)}return ae===n&&(ae=ju(Nt,p)),oe}return Lr.cancel=Fr,Lr.flush=fr,Lr}var lW=Pt(function(u,p){return gP(u,1,p)}),uW=Pt(function(u,p,E){return gP(u,to(p)||0,E)});function cW(u){return Ei(u,F)}function nh(u,p){if(typeof u!="function"||p!=null&&typeof p!="function")throw new Xr(s);var E=function(){var O=arguments,q=p?p.apply(this,O):O[0],Y=E.cache;if(Y.has(q))return Y.get(q);var oe=u.apply(this,O);return E.cache=Y.set(q,oe)||Y,oe};return E.cache=new(nh.Cache||yi),E}nh.Cache=yi;function rh(u){if(typeof u!="function")throw new Xr(s);return function(){var p=arguments;switch(p.length){case 0:return!u.call(this);case 1:return!u.call(this,p[0]);case 2:return!u.call(this,p[0],p[1]);case 3:return!u.call(this,p[0],p[1],p[2])}return!u.apply(this,p)}}function dW(u){return C1(2,u)}var fW=J5(function(u,p){p=p.length==1&&xt(p[0])?ln(p[0],Ar(ct())):ln(zn(p,1),Ar(ct()));var E=p.length;return Pt(function(O){for(var q=-1,Y=Jn(O.length,E);++q<Y;)O[q]=p[q].call(this,O[q]);return Dr(u,this,O)})}),ly=Pt(function(u,p){var E=rs(p,ll(ly));return Ei(u,R,n,p,E)}),_1=Pt(function(u,p){var E=rs(p,ll(_1));return Ei(u,S,n,p,E)}),pW=wi(function(u,p){return Ei(u,N,n,n,n,p)});function mW(u,p){if(typeof u!="function")throw new Xr(s);return p=p===n?p:Et(p),Pt(u,p)}function hW(u,p){if(typeof u!="function")throw new Xr(s);return p=p==null?0:jn(Et(p),0),Pt(function(E){var O=E[p],q=ls(E,0,p);return O&&ns(q,O),Dr(u,this,q)})}function gW(u,p,E){var O=!0,q=!0;if(typeof u!="function")throw new Xr(s);return mn(E)&&(O="leading"in E?!!E.leading:O,q="trailing"in E?!!E.trailing:q),T1(u,p,{leading:O,maxWait:p,trailing:q})}function vW(u){return w1(u,1)}function bW(u,p){return ly(Ub(p),u)}function yW(){if(!arguments.length)return[];var u=arguments[0];return xt(u)?u:[u]}function xW(u){return Jr(u,g)}function EW(u,p){return p=typeof p=="function"?p:n,Jr(u,g,p)}function wW(u){return Jr(u,f|g)}function CW(u,p){return p=typeof p=="function"?p:n,Jr(u,f|g,p)}function RW(u,p){return p==null||hP(u,p,Wn(p))}function yo(u,p){return u===p||u!==u&&p!==p}var SW=Ym(Ab),PW=Ym(function(u,p){return u>=p}),aa=EP((function(){return arguments})())?EP:function(u){return Cn(u)&&Kt.call(u,"callee")&&!aP.call(u,"callee")},xt=ge.isArray,TW=VS?Ar(VS):k5;function Rr(u){return u!=null&&oh(u.length)&&!Ri(u)}function Pn(u){return Cn(u)&&Rr(u)}function _W(u){return u===!0||u===!1||Cn(u)&&cr(u)==ne}var us=VV||yy,NW=WS?Ar(WS):$5;function OW(u){return Cn(u)&&u.nodeType===1&&!qu(u)}function MW(u){if(u==null)return!0;if(Rr(u)&&(xt(u)||typeof u=="string"||typeof u.splice=="function"||us(u)||ul(u)||aa(u)))return!u.length;var p=Qn(u);if(p==ve||p==ce)return!u.size;if(Lu(u))return!Fb(u).length;for(var E in u)if(Kt.call(u,E))return!1;return!0}function IW(u,p){return ku(u,p)}function DW(u,p,E){E=typeof E=="function"?E:n;var O=E?E(u,p):n;return O===n?ku(u,p,n,E):!!O}function uy(u){if(!Cn(u))return!1;var p=cr(u);return p==se||p==ie||typeof u.message=="string"&&typeof u.name=="string"&&!qu(u)}function AW(u){return typeof u=="number"&&uP(u)}function Ri(u){if(!mn(u))return!1;var p=cr(u);return p==Q||p==me||p==J||p==Te}function N1(u){return typeof u=="number"&&u==Et(u)}function oh(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=L}function mn(u){var p=typeof u;return u!=null&&(p=="object"||p=="function")}function Cn(u){return u!=null&&typeof u=="object"}var O1=HS?Ar(HS):L5;function kW(u,p){return u===p||$b(u,p,Qb(p))}function $W(u,p,E){return E=typeof E=="function"?E:n,$b(u,p,Qb(p),E)}function FW(u){return M1(u)&&u!=+u}function LW(u){if(E6(u))throw new vt(i);return wP(u)}function jW(u){return u===null}function qW(u){return u==null}function M1(u){return typeof u=="number"||Cn(u)&&cr(u)==xe}function qu(u){if(!Cn(u)||cr(u)!=Ce)return!1;var p=Mm(u);if(p===null)return!0;var E=Kt.call(p,"constructor")&&p.constructor;return typeof E=="function"&&E instanceof E&&Tm.call(E)==$V}var cy=KS?Ar(KS):j5;function BW(u){return N1(u)&&u>=-L&&u<=L}var I1=US?Ar(US):q5;function ih(u){return typeof u=="string"||!xt(u)&&Cn(u)&&cr(u)==he}function $r(u){return typeof u=="symbol"||Cn(u)&&cr(u)==re}var ul=zS?Ar(zS):B5;function VW(u){return u===n}function WW(u){return Cn(u)&&Qn(u)==Oe}function HW(u){return Cn(u)&&cr(u)==De}var KW=Ym(Lb),UW=Ym(function(u,p){return u<=p});function D1(u){if(!u)return[];if(Rr(u))return ih(u)?vo(u):Cr(u);if(Tu&&u[Tu])return RV(u[Tu]());var p=Qn(u),E=p==ve?Sb:p==ce?Rm:cl;return E(u)}function Si(u){if(!u)return u===0?u:0;if(u=to(u),u===A||u===-A){var p=u<0?-1:1;return p*H}return u===u?u:0}function Et(u){var p=Si(u),E=p%1;return p===p?E?p-E:p:0}function A1(u){return u?ra(Et(u),0,X):0}function to(u){if(typeof u=="number")return u;if($r(u))return V;if(mn(u)){var p=typeof u.valueOf=="function"?u.valueOf():u;u=mn(p)?p+"":p}if(typeof u!="string")return u===0?u:+u;u=QS(u);var E=hu.test(u);return E||Ka.test(u)?aV(u.slice(2),E?2:8):lb.test(u)?V:+u}function k1(u){return Vo(u,Sr(u))}function zW(u){return u?ra(Et(u),-L,L):u===0?u:0}function qt(u){return u==null?"":kr(u)}var GW=sl(function(u,p){if(Lu(p)||Rr(p)){Vo(p,Wn(p),u);return}for(var E in p)Kt.call(p,E)&&Iu(u,E,p[E])}),$1=sl(function(u,p){Vo(p,Sr(p),u)}),sh=sl(function(u,p,E,O){Vo(p,Sr(p),u,O)}),YW=sl(function(u,p,E,O){Vo(p,Wn(p),u,O)}),XW=wi(Mb);function ZW(u,p){var E=il(u);return p==null?E:mP(E,p)}var JW=Pt(function(u,p){u=Qt(u);var E=-1,O=p.length,q=O>2?p[2]:n;for(q&&dr(p[0],p[1],q)&&(O=1);++E<O;)for(var Y=p[E],oe=Sr(Y),ae=-1,fe=oe.length;++ae<fe;){var Se=oe[ae],Pe=u[Se];(Pe===n||yo(Pe,nl[Se])&&!Kt.call(u,Se))&&(u[Se]=Y[Se])}return u}),QW=Pt(function(u){return u.push(n,QP),Dr(F1,n,u)});function e8(u,p){return YS(u,ct(p,3),Bo)}function t8(u,p){return YS(u,ct(p,3),Db)}function n8(u,p){return u==null?u:Ib(u,ct(p,3),Sr)}function r8(u,p){return u==null?u:yP(u,ct(p,3),Sr)}function o8(u,p){return u&&Bo(u,ct(p,3))}function i8(u,p){return u&&Db(u,ct(p,3))}function s8(u){return u==null?[]:Bm(u,Wn(u))}function a8(u){return u==null?[]:Bm(u,Sr(u))}function dy(u,p,E){var O=u==null?n:oa(u,p);return O===n?E:O}function l8(u,p){return u!=null&&n1(u,p,M5)}function fy(u,p){return u!=null&&n1(u,p,I5)}var u8=GP(function(u,p,E){p!=null&&typeof p.toString!="function"&&(p=_m.call(p)),u[p]=E},my(Pr)),c8=GP(function(u,p,E){p!=null&&typeof p.toString!="function"&&(p=_m.call(p)),Kt.call(u,p)?u[p].push(E):u[p]=[E]},ct),d8=Pt(Au);function Wn(u){return Rr(u)?fP(u):Fb(u)}function Sr(u){return Rr(u)?fP(u,!0):V5(u)}function f8(u,p){var E={};return p=ct(p,3),Bo(u,function(O,q,Y){xi(E,p(O,q,Y),O)}),E}function p8(u,p){var E={};return p=ct(p,3),Bo(u,function(O,q,Y){xi(E,q,p(O,q,Y))}),E}var m8=sl(function(u,p,E){Vm(u,p,E)}),F1=sl(function(u,p,E,O){Vm(u,p,E,O)}),h8=wi(function(u,p){var E={};if(u==null)return E;var O=!1;p=ln(p,function(Y){return Y=as(Y,u),O||(O=Y.length>1),Y}),Vo(u,Zb(u),E),O&&(E=Jr(E,f|m|g,u6));for(var q=p.length;q--;)Wb(E,p[q]);return E});function g8(u,p){return L1(u,rh(ct(p)))}var v8=wi(function(u,p){return u==null?{}:H5(u,p)});function L1(u,p){if(u==null)return{};var E=ln(Zb(u),function(O){return[O]});return p=ct(p),NP(u,E,function(O,q){return p(O,q[0])})}function b8(u,p,E){p=as(p,u);var O=-1,q=p.length;for(q||(q=1,u=n);++O<q;){var Y=u==null?n:u[Wo(p[O])];Y===n&&(O=q,Y=E),u=Ri(Y)?Y.call(u):Y}return u}function y8(u,p,E){return u==null?u:$u(u,p,E)}function x8(u,p,E,O){return O=typeof O=="function"?O:n,u==null?u:$u(u,p,E,O)}var j1=ZP(Wn),q1=ZP(Sr);function E8(u,p,E){var O=xt(u),q=O||us(u)||ul(u);if(p=ct(p,4),E==null){var Y=u&&u.constructor;q?E=O?new Y:[]:mn(u)?E=Ri(Y)?il(Mm(u)):{}:E={}}return(q?Yr:Bo)(u,function(oe,ae,fe){return p(E,oe,ae,fe)}),E}function w8(u,p){return u==null?!0:Wb(u,p)}function C8(u,p,E){return u==null?u:AP(u,p,Ub(E))}function R8(u,p,E,O){return O=typeof O=="function"?O:n,u==null?u:AP(u,p,Ub(E),O)}function cl(u){return u==null?[]:Rb(u,Wn(u))}function S8(u){return u==null?[]:Rb(u,Sr(u))}function P8(u,p,E){return E===n&&(E=p,p=n),E!==n&&(E=to(E),E=E===E?E:0),p!==n&&(p=to(p),p=p===p?p:0),ra(to(u),p,E)}function T8(u,p,E){return p=Si(p),E===n?(E=p,p=0):E=Si(E),u=to(u),D5(u,p,E)}function _8(u,p,E){if(E&&typeof E!="boolean"&&dr(u,p,E)&&(p=E=n),E===n&&(typeof p=="boolean"?(E=p,p=n):typeof u=="boolean"&&(E=u,u=n)),u===n&&p===n?(u=0,p=1):(u=Si(u),p===n?(p=u,u=0):p=Si(p)),u>p){var O=u;u=p,p=O}if(E||u%1||p%1){var q=cP();return Jn(u+q*(p-u+sV("1e-"+((q+"").length-1))),p)}return qb(u,p)}var N8=al(function(u,p,E){return p=p.toLowerCase(),u+(E?B1(p):p)});function B1(u){return py(qt(u).toLowerCase())}function V1(u){return u=qt(u),u&&u.replace(Ua,yV).replace(In,"")}function O8(u,p,E){u=qt(u),p=kr(p);var O=u.length;E=E===n?O:ra(Et(E),0,O);var q=E;return E-=p.length,E>=0&&u.slice(E,q)==p}function M8(u){return u=qt(u),u&&Le.test(u)?u.replace(tt,xV):u}function I8(u){return u=qt(u),u&&On.test(u)?u.replace(Zn,"\\$&"):u}var D8=al(function(u,p,E){return u+(E?"-":"")+p.toLowerCase()}),A8=al(function(u,p,E){return u+(E?" ":"")+p.toLowerCase()}),k8=KP("toLowerCase");function $8(u,p,E){u=qt(u),p=Et(p);var O=p?el(u):0;if(!p||O>=p)return u;var q=(p-O)/2;return Gm(km(q),E)+u+Gm(Am(q),E)}function F8(u,p,E){u=qt(u),p=Et(p);var O=p?el(u):0;return p&&O<p?u+Gm(p-O,E):u}function L8(u,p,E){u=qt(u),p=Et(p);var O=p?el(u):0;return p&&O<p?Gm(p-O,E)+u:u}function j8(u,p,E){return E||p==null?p=0:p&&(p=+p),UV(qt(u).replace(an,""),p||0)}function q8(u,p,E){return(E?dr(u,p,E):p===n)?p=1:p=Et(p),Bb(qt(u),p)}function B8(){var u=arguments,p=qt(u[0]);return u.length<3?p:p.replace(u[1],u[2])}var V8=al(function(u,p,E){return u+(E?"_":"")+p.toLowerCase()});function W8(u,p,E){return E&&typeof E!="number"&&dr(u,p,E)&&(p=E=n),E=E===n?X:E>>>0,E?(u=qt(u),u&&(typeof p=="string"||p!=null&&!cy(p))&&(p=kr(p),!p&&Qa(u))?ls(vo(u),0,E):u.split(p,E)):[]}var H8=al(function(u,p,E){return u+(E?" ":"")+py(p)});function K8(u,p,E){return u=qt(u),E=E==null?0:ra(Et(E),0,u.length),p=kr(p),u.slice(E,E+p.length)==p}function U8(u,p,E){var O=z.templateSettings;E&&dr(u,p,E)&&(p=n),u=qt(u),p=sh({},p,O,JP);var q=sh({},p.imports,O.imports,JP),Y=Wn(q),oe=Rb(q,Y),ae,fe,Se=0,Pe=p.interpolate||Us,Ae="__p += '",Ke=Pb((p.escape||Us).source+"|"+Pe.source+"|"+(Pe===Ee?_t:Us).source+"|"+(p.evaluate||Us).source+"|$","g"),ot="//# sourceURL="+(Kt.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++jS+"]")+`
|
|
116
|
-
`;u.replace(Ke,function(pt,Nt,It,Fr,fr,Lr){return It||(It=Fr),Ae+=u.slice(Se,Lr).replace(zs,EV),Nt&&(ae=!0,Ae+=`' +
|
|
117
|
-
__e(`+Nt+`) +
|
|
118
|
-
'`),fr&&(fe=!0,Ae+=`';
|
|
119
|
-
`+fr+`;
|
|
120
|
-
__p += '`),It&&(Ae+=`' +
|
|
121
|
-
((__t = (`+It+`)) == null ? '' : __t) +
|
|
122
|
-
'`),Se=Lr+pt.length,pt}),Ae+=`';
|
|
123
|
-
`;var ft=Kt.call(p,"variable")&&p.variable;if(!ft)Ae=`with (obj) {
|
|
124
|
-
`+Ae+`
|
|
125
|
-
}
|
|
126
|
-
`;else if(Mr.test(ft))throw new vt(a);Ae=(fe?Ae.replace(Ve,""):Ae).replace(Me,"$1").replace(Be,"$1;"),Ae="function("+(ft||"obj")+`) {
|
|
127
|
-
`+(ft?"":`obj || (obj = {});
|
|
128
|
-
`)+"var __t, __p = ''"+(ae?", __e = _.escape":"")+(fe?`, __j = Array.prototype.join;
|
|
129
|
-
function print() { __p += __j.call(arguments, '') }
|
|
130
|
-
`:`;
|
|
131
|
-
`)+Ae+`return __p
|
|
132
|
-
}`;var wt=H1(function(){return kt(Y,ot+"return "+Ae).apply(n,oe)});if(wt.source=Ae,uy(wt))throw wt;return wt}function z8(u){return qt(u).toLowerCase()}function G8(u){return qt(u).toUpperCase()}function Y8(u,p,E){if(u=qt(u),u&&(E||p===n))return QS(u);if(!u||!(p=kr(p)))return u;var O=vo(u),q=vo(p),Y=eP(O,q),oe=tP(O,q)+1;return ls(O,Y,oe).join("")}function X8(u,p,E){if(u=qt(u),u&&(E||p===n))return u.slice(0,rP(u)+1);if(!u||!(p=kr(p)))return u;var O=vo(u),q=tP(O,vo(p))+1;return ls(O,0,q).join("")}function Z8(u,p,E){if(u=qt(u),u&&(E||p===n))return u.replace(an,"");if(!u||!(p=kr(p)))return u;var O=vo(u),q=eP(O,vo(p));return ls(O,q).join("")}function J8(u,p){var E=W,O=I;if(mn(p)){var q="separator"in p?p.separator:q;E="length"in p?Et(p.length):E,O="omission"in p?kr(p.omission):O}u=qt(u);var Y=u.length;if(Qa(u)){var oe=vo(u);Y=oe.length}if(E>=Y)return u;var ae=E-el(O);if(ae<1)return O;var fe=oe?ls(oe,0,ae).join(""):u.slice(0,ae);if(q===n)return fe+O;if(oe&&(ae+=fe.length-ae),cy(q)){if(u.slice(ae).search(q)){var Se,Pe=fe;for(q.global||(q=Pb(q.source,qt(hi.exec(q))+"g")),q.lastIndex=0;Se=q.exec(Pe);)var Ae=Se.index;fe=fe.slice(0,Ae===n?ae:Ae)}}else if(u.indexOf(kr(q),ae)!=ae){var Ke=fe.lastIndexOf(q);Ke>-1&&(fe=fe.slice(0,Ke))}return fe+O}function Q8(u){return u=qt(u),u&&at.test(u)?u.replace(Ie,_V):u}var e9=al(function(u,p,E){return u+(E?" ":"")+p.toUpperCase()}),py=KP("toUpperCase");function W1(u,p,E){return u=qt(u),p=E?n:p,p===n?CV(u)?MV(u):mV(u):u.match(p)||[]}var H1=Pt(function(u,p){try{return Dr(u,n,p)}catch(E){return uy(E)?E:new vt(E)}}),t9=wi(function(u,p){return Yr(p,function(E){E=Wo(E),xi(u,E,ay(u[E],u))}),u});function n9(u){var p=u==null?0:u.length,E=ct();return u=p?ln(u,function(O){if(typeof O[1]!="function")throw new Xr(s);return[E(O[0]),O[1]]}):[],Pt(function(O){for(var q=-1;++q<p;){var Y=u[q];if(Dr(Y[0],this,O))return Dr(Y[1],this,O)}})}function r9(u){return _5(Jr(u,f))}function my(u){return function(){return u}}function o9(u,p){return u==null||u!==u?p:u}var i9=zP(),s9=zP(!0);function Pr(u){return u}function hy(u){return CP(typeof u=="function"?u:Jr(u,f))}function a9(u){return SP(Jr(u,f))}function l9(u,p){return PP(u,Jr(p,f))}var u9=Pt(function(u,p){return function(E){return Au(E,u,p)}}),c9=Pt(function(u,p){return function(E){return Au(u,E,p)}});function gy(u,p,E){var O=Wn(p),q=Bm(p,O);E==null&&!(mn(p)&&(q.length||!O.length))&&(E=p,p=u,u=this,q=Bm(p,Wn(p)));var Y=!(mn(E)&&"chain"in E)||!!E.chain,oe=Ri(u);return Yr(q,function(ae){var fe=p[ae];u[ae]=fe,oe&&(u.prototype[ae]=function(){var Se=this.__chain__;if(Y||Se){var Pe=u(this.__wrapped__),Ae=Pe.__actions__=Cr(this.__actions__);return Ae.push({func:fe,args:arguments,thisArg:u}),Pe.__chain__=Se,Pe}return fe.apply(u,ns([this.value()],arguments))})}),u}function d9(){return Un._===this&&(Un._=FV),this}function vy(){}function f9(u){return u=Et(u),Pt(function(p){return TP(p,u)})}var p9=Gb(ln),m9=Gb(GS),h9=Gb(yb);function K1(u){return ty(u)?xb(Wo(u)):K5(u)}function g9(u){return function(p){return u==null?n:oa(u,p)}}var v9=YP(),b9=YP(!0);function by(){return[]}function yy(){return!1}function y9(){return{}}function x9(){return""}function E9(){return!0}function w9(u,p){if(u=Et(u),u<1||u>L)return[];var E=X,O=Jn(u,X);p=ct(p),u-=X;for(var q=Cb(O,p);++E<u;)p(E);return q}function C9(u){return xt(u)?ln(u,Wo):$r(u)?[u]:Cr(d1(qt(u)))}function R9(u){var p=++kV;return qt(u)+p}var S9=zm(function(u,p){return u+p},0),P9=Yb("ceil"),T9=zm(function(u,p){return u/p},1),_9=Yb("floor");function N9(u){return u&&u.length?qm(u,Pr,Ab):n}function O9(u,p){return u&&u.length?qm(u,ct(p,2),Ab):n}function M9(u){return ZS(u,Pr)}function I9(u,p){return ZS(u,ct(p,2))}function D9(u){return u&&u.length?qm(u,Pr,Lb):n}function A9(u,p){return u&&u.length?qm(u,ct(p,2),Lb):n}var k9=zm(function(u,p){return u*p},1),$9=Yb("round"),F9=zm(function(u,p){return u-p},0);function L9(u){return u&&u.length?wb(u,Pr):0}function j9(u,p){return u&&u.length?wb(u,ct(p,2)):0}return z.after=aW,z.ary=w1,z.assign=GW,z.assignIn=$1,z.assignInWith=sh,z.assignWith=YW,z.at=XW,z.before=C1,z.bind=ay,z.bindAll=t9,z.bindKey=R1,z.castArray=yW,z.chain=y1,z.chunk=_6,z.compact=N6,z.concat=O6,z.cond=n9,z.conforms=r9,z.constant=my,z.countBy=L7,z.create=ZW,z.curry=S1,z.curryRight=P1,z.debounce=T1,z.defaults=JW,z.defaultsDeep=QW,z.defer=lW,z.delay=uW,z.difference=M6,z.differenceBy=I6,z.differenceWith=D6,z.drop=A6,z.dropRight=k6,z.dropRightWhile=$6,z.dropWhile=F6,z.fill=L6,z.filter=q7,z.flatMap=W7,z.flatMapDeep=H7,z.flatMapDepth=K7,z.flatten=h1,z.flattenDeep=j6,z.flattenDepth=q6,z.flip=cW,z.flow=i9,z.flowRight=s9,z.fromPairs=B6,z.functions=s8,z.functionsIn=a8,z.groupBy=U7,z.initial=W6,z.intersection=H6,z.intersectionBy=K6,z.intersectionWith=U6,z.invert=u8,z.invertBy=c8,z.invokeMap=G7,z.iteratee=hy,z.keyBy=Y7,z.keys=Wn,z.keysIn=Sr,z.map=eh,z.mapKeys=f8,z.mapValues=p8,z.matches=a9,z.matchesProperty=l9,z.memoize=nh,z.merge=m8,z.mergeWith=F1,z.method=u9,z.methodOf=c9,z.mixin=gy,z.negate=rh,z.nthArg=f9,z.omit=h8,z.omitBy=g8,z.once=dW,z.orderBy=X7,z.over=p9,z.overArgs=fW,z.overEvery=m9,z.overSome=h9,z.partial=ly,z.partialRight=_1,z.partition=Z7,z.pick=v8,z.pickBy=L1,z.property=K1,z.propertyOf=g9,z.pull=X6,z.pullAll=v1,z.pullAllBy=Z6,z.pullAllWith=J6,z.pullAt=Q6,z.range=v9,z.rangeRight=b9,z.rearg=pW,z.reject=eW,z.remove=e7,z.rest=mW,z.reverse=iy,z.sampleSize=nW,z.set=y8,z.setWith=x8,z.shuffle=rW,z.slice=t7,z.sortBy=sW,z.sortedUniq=l7,z.sortedUniqBy=u7,z.split=W8,z.spread=hW,z.tail=c7,z.take=d7,z.takeRight=f7,z.takeRightWhile=p7,z.takeWhile=m7,z.tap=N7,z.throttle=gW,z.thru=Qm,z.toArray=D1,z.toPairs=j1,z.toPairsIn=q1,z.toPath=C9,z.toPlainObject=k1,z.transform=E8,z.unary=vW,z.union=h7,z.unionBy=g7,z.unionWith=v7,z.uniq=b7,z.uniqBy=y7,z.uniqWith=x7,z.unset=w8,z.unzip=sy,z.unzipWith=b1,z.update=C8,z.updateWith=R8,z.values=cl,z.valuesIn=S8,z.without=E7,z.words=W1,z.wrap=bW,z.xor=w7,z.xorBy=C7,z.xorWith=R7,z.zip=S7,z.zipObject=P7,z.zipObjectDeep=T7,z.zipWith=_7,z.entries=j1,z.entriesIn=q1,z.extend=$1,z.extendWith=sh,gy(z,z),z.add=S9,z.attempt=H1,z.camelCase=N8,z.capitalize=B1,z.ceil=P9,z.clamp=P8,z.clone=xW,z.cloneDeep=wW,z.cloneDeepWith=CW,z.cloneWith=EW,z.conformsTo=RW,z.deburr=V1,z.defaultTo=o9,z.divide=T9,z.endsWith=O8,z.eq=yo,z.escape=M8,z.escapeRegExp=I8,z.every=j7,z.find=B7,z.findIndex=p1,z.findKey=e8,z.findLast=V7,z.findLastIndex=m1,z.findLastKey=t8,z.floor=_9,z.forEach=x1,z.forEachRight=E1,z.forIn=n8,z.forInRight=r8,z.forOwn=o8,z.forOwnRight=i8,z.get=dy,z.gt=SW,z.gte=PW,z.has=l8,z.hasIn=fy,z.head=g1,z.identity=Pr,z.includes=z7,z.indexOf=V6,z.inRange=T8,z.invoke=d8,z.isArguments=aa,z.isArray=xt,z.isArrayBuffer=TW,z.isArrayLike=Rr,z.isArrayLikeObject=Pn,z.isBoolean=_W,z.isBuffer=us,z.isDate=NW,z.isElement=OW,z.isEmpty=MW,z.isEqual=IW,z.isEqualWith=DW,z.isError=uy,z.isFinite=AW,z.isFunction=Ri,z.isInteger=N1,z.isLength=oh,z.isMap=O1,z.isMatch=kW,z.isMatchWith=$W,z.isNaN=FW,z.isNative=LW,z.isNil=qW,z.isNull=jW,z.isNumber=M1,z.isObject=mn,z.isObjectLike=Cn,z.isPlainObject=qu,z.isRegExp=cy,z.isSafeInteger=BW,z.isSet=I1,z.isString=ih,z.isSymbol=$r,z.isTypedArray=ul,z.isUndefined=VW,z.isWeakMap=WW,z.isWeakSet=HW,z.join=z6,z.kebabCase=D8,z.last=eo,z.lastIndexOf=G6,z.lowerCase=A8,z.lowerFirst=k8,z.lt=KW,z.lte=UW,z.max=N9,z.maxBy=O9,z.mean=M9,z.meanBy=I9,z.min=D9,z.minBy=A9,z.stubArray=by,z.stubFalse=yy,z.stubObject=y9,z.stubString=x9,z.stubTrue=E9,z.multiply=k9,z.nth=Y6,z.noConflict=d9,z.noop=vy,z.now=th,z.pad=$8,z.padEnd=F8,z.padStart=L8,z.parseInt=j8,z.random=_8,z.reduce=J7,z.reduceRight=Q7,z.repeat=q8,z.replace=B8,z.result=b8,z.round=$9,z.runInContext=de,z.sample=tW,z.size=oW,z.snakeCase=V8,z.some=iW,z.sortedIndex=n7,z.sortedIndexBy=r7,z.sortedIndexOf=o7,z.sortedLastIndex=i7,z.sortedLastIndexBy=s7,z.sortedLastIndexOf=a7,z.startCase=H8,z.startsWith=K8,z.subtract=F9,z.sum=L9,z.sumBy=j9,z.template=U8,z.times=w9,z.toFinite=Si,z.toInteger=Et,z.toLength=A1,z.toLower=z8,z.toNumber=to,z.toSafeInteger=zW,z.toString=qt,z.toUpper=G8,z.trim=Y8,z.trimEnd=X8,z.trimStart=Z8,z.truncate=J8,z.unescape=Q8,z.uniqueId=R9,z.upperCase=e9,z.upperFirst=py,z.each=x1,z.eachRight=E1,z.first=g1,gy(z,(function(){var u={};return Bo(z,function(p,E){Kt.call(z.prototype,E)||(u[E]=p)}),u})(),{chain:!1}),z.VERSION=r,Yr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){z[u].placeholder=z}),Yr(["drop","take"],function(u,p){Ot.prototype[u]=function(E){E=E===n?1:jn(Et(E),0);var O=this.__filtered__&&!p?new Ot(this):this.clone();return O.__filtered__?O.__takeCount__=Jn(E,O.__takeCount__):O.__views__.push({size:Jn(E,X),type:u+(O.__dir__<0?"Right":"")}),O},Ot.prototype[u+"Right"]=function(E){return this.reverse()[u](E).reverse()}}),Yr(["filter","map","takeWhile"],function(u,p){var E=p+1,O=E==k||E==D;Ot.prototype[u]=function(q){var Y=this.clone();return Y.__iteratees__.push({iteratee:ct(q,3),type:E}),Y.__filtered__=Y.__filtered__||O,Y}}),Yr(["head","last"],function(u,p){var E="take"+(p?"Right":"");Ot.prototype[u]=function(){return this[E](1).value()[0]}}),Yr(["initial","tail"],function(u,p){var E="drop"+(p?"":"Right");Ot.prototype[u]=function(){return this.__filtered__?new Ot(this):this[E](1)}}),Ot.prototype.compact=function(){return this.filter(Pr)},Ot.prototype.find=function(u){return this.filter(u).head()},Ot.prototype.findLast=function(u){return this.reverse().find(u)},Ot.prototype.invokeMap=Pt(function(u,p){return typeof u=="function"?new Ot(this):this.map(function(E){return Au(E,u,p)})}),Ot.prototype.reject=function(u){return this.filter(rh(ct(u)))},Ot.prototype.slice=function(u,p){u=Et(u);var E=this;return E.__filtered__&&(u>0||p<0)?new Ot(E):(u<0?E=E.takeRight(-u):u&&(E=E.drop(u)),p!==n&&(p=Et(p),E=p<0?E.dropRight(-p):E.take(p-u)),E)},Ot.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Ot.prototype.toArray=function(){return this.take(X)},Bo(Ot.prototype,function(u,p){var E=/^(?:filter|find|map|reject)|While$/.test(p),O=/^(?:head|last)$/.test(p),q=z[O?"take"+(p=="last"?"Right":""):p],Y=O||/^find/.test(p);q&&(z.prototype[p]=function(){var oe=this.__wrapped__,ae=O?[1]:arguments,fe=oe instanceof Ot,Se=ae[0],Pe=fe||xt(oe),Ae=function(Nt){var It=q.apply(z,ns([Nt],ae));return O&&Ke?It[0]:It};Pe&&E&&typeof Se=="function"&&Se.length!=1&&(fe=Pe=!1);var Ke=this.__chain__,ot=!!this.__actions__.length,ft=Y&&!Ke,wt=fe&&!ot;if(!Y&&Pe){oe=wt?oe:new Ot(this);var pt=u.apply(oe,ae);return pt.__actions__.push({func:Qm,args:[Ae],thisArg:n}),new Zr(pt,Ke)}return ft&&wt?u.apply(this,ae):(pt=this.thru(Ae),ft?O?pt.value()[0]:pt.value():pt)})}),Yr(["pop","push","shift","sort","splice","unshift"],function(u){var p=Sm[u],E=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",O=/^(?:pop|shift)$/.test(u);z.prototype[u]=function(){var q=arguments;if(O&&!this.__chain__){var Y=this.value();return p.apply(xt(Y)?Y:[],q)}return this[E](function(oe){return p.apply(xt(oe)?oe:[],q)})}}),Bo(Ot.prototype,function(u,p){var E=z[p];if(E){var O=E.name+"";Kt.call(ol,O)||(ol[O]=[]),ol[O].push({name:p,func:E})}}),ol[Um(n,y).name]=[{name:"wrapper",func:n}],Ot.prototype.clone=QV,Ot.prototype.reverse=e5,Ot.prototype.value=t5,z.prototype.at=O7,z.prototype.chain=M7,z.prototype.commit=I7,z.prototype.next=D7,z.prototype.plant=k7,z.prototype.reverse=$7,z.prototype.toJSON=z.prototype.valueOf=z.prototype.value=F7,z.prototype.first=z.prototype.head,Tu&&(z.prototype[Tu]=A7),z}),tl=IV();Qs?((Qs.exports=tl)._=tl,hb._=tl):Un._=tl}).call(she)})(Hf,Hf.exports)),Hf.exports}var uo=ahe();function lhe(e){const[t=[],n]=M.useState(e);return[t,{insertAt:(m,g)=>{n((v=[])=>{const b=[...v];return b.splice(m,0,g),b})},removeAt:m=>{n((g=[])=>{const v=[...g];return v.splice(m,1),v})},updateAt:(m,g)=>{n((v=[])=>{const b=[...v];return b[m]=g,b})},clear:()=>n([]),reset:()=>n(e),push:m=>n((g=[])=>[...g,m]),set:m=>n(m),pop:()=>{n((m=[])=>{const g=[...m];return g.pop(),g})},update:(m,g)=>{n((v=[])=>{const b=[...v],x=uo.findIndex(b,m);return x===-1||(b[x]=uo.isFunction(g)?g(b[x]):g),b})}}]}function uhe({fn:e,dependencies:t=[],onError:n,onSuccess:r,onFinish:o}){const[i,s]=M.useState(!0),[a,l]=M.useState(null),[c,d]=M.useState(null),f=M.useCallback(()=>{s(!0),l(null),d(null),e().then(m=>{r?.(m),d(m)}).catch(m=>{n?.(m),l(m)}).finally(()=>{o?.(),s(!1)})},t);return M.useEffect(()=>{f()},[f]),{loading:i,error:a,data:c,refetch:f}}const che=(e,t=!0)=>{const n=M.useRef(null),r=o=>{n.current&&!n.current.contains(o.target)&&e()};return M.useEffect(()=>{if(t)return document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[t]),n};function dhe(){const[e,t]=M.useState(null),n=M.useCallback(async r=>{if(!navigator?.clipboard)return!1;try{return await navigator.clipboard.writeText(r),t(r),!0}catch(o){return console.error(o),t(null),!1}},[]);return[e,n]}function fhe(e,t){const n=M.useRef(null);return M.useCallback((...r)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(...r)},t)},[e,t])}function phe(e,t){const[n,r]=M.useState(e);return M.useEffect(()=>{const o=setTimeout(()=>{r(e)},t);return()=>clearTimeout(o)},[e,t]),n}function mhe(e=!1,t){const{onOpen:n,onClose:r}=t||{},[o,i]=M.useState(e),s=M.useCallback(()=>{i(c=>c||(n?.(),!0))},[n]),a=M.useCallback(()=>{i(c=>c&&(r?.(),!1))},[r]),l=M.useCallback(()=>{o?a():s()},[a,s,o]);return[o,{open:s,close:a,toggle:l}]}function hhe(e){M.useEffect(()=>{typeof e=="string"&&e.trim().length>0&&(document.title=e.trim())},[e])}function c3(e,t,n){const r=M.useRef(null);return M.useEffect(()=>{const o=r.current??document;return o.addEventListener(e,t,n),()=>{o.removeEventListener(e,t,n)}},[e,t,n]),r}const ghe=/input|select|textarea|button|object/,d3="a, input, select, textarea, button, object, [tabindex]";function vhe(e){return process.env.NODE_ENV==="test"?!1:e.style.display==="none"}function bhe(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let n=e;for(;n&&!(n===document.body||n.nodeType===11);){if(vhe(n))return!1;n=n.parentNode}return!0}function f3(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function PE(e){const t=e.nodeName.toLowerCase(),n=!Number.isNaN(f3(e));return(ghe.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||n)&&bhe(e)}function p3(e){const t=f3(e);return(Number.isNaN(t)||t>=0)&&PE(e)}function yhe(e){return Array.from(e.querySelectorAll(d3)).filter(p3)}function xhe(e,t){const n=yhe(e);if(!n.length){t.preventDefault();return}const r=n[t.shiftKey?0:n.length-1],o=e.getRootNode();let i=r===o.activeElement||e===o.activeElement;const s=o.activeElement;if(s.tagName==="INPUT"&&s.getAttribute("type")==="radio"&&(i=n.filter(d=>d.getAttribute("type")==="radio"&&d.getAttribute("name")===s.getAttribute("name")).includes(r)),!i)return;t.preventDefault();const l=n[t.shiftKey?n.length-1:0];l&&l.focus()}function Ehe(e=!0){const t=M.useRef(null),n=o=>{let i=o.querySelector("[data-autofocus]");if(!i){const s=Array.from(o.querySelectorAll(d3));i=s.find(p3)||s.find(PE)||null,!i&&PE(o)&&(i=o)}i&&i.focus({preventScroll:!0})},r=M.useCallback(o=>{e&&o!==null&&t.current!==o&&(o?(setTimeout(()=>{o.getRootNode()&&n(o)}),t.current=o):t.current=null)},[e]);return M.useEffect(()=>{if(!e)return;t.current&&setTimeout(()=>n(t.current));const o=i=>{i.key==="Tab"&&t.current&&xhe(t.current,i)};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[e]),r}const whe=e=>e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable,Che=(e,t)=>t&&whe(e.target),Rhe=e=>{const t=e.toLowerCase().split("+");return{mainKey:t.pop(),isShift:t.includes("shift"),isCtrl:t.includes("ctrl"),isAlt:t.includes("alt"),isMeta:t.includes("meta")}},She=(e,t)=>{const{mainKey:n,isShift:r,isCtrl:o,isAlt:i,isMeta:s}=Rhe(t);return e.key.toLowerCase()===n&&e.shiftKey===r&&e.ctrlKey===o&&e.altKey===i&&e.metaKey===s},Phe=(e,t,n,r,o)=>i=>{if(!o||Che(i,r))return;(Array.isArray(e)?e:[e]).some(l=>She(i,l))&&(n&&i.preventDefault(),t(i))};function m3(e,t,n={}){const{eventName:r="keydown",preventDefault:o=!0,ignoreInputFields:i=!0,watch:s=!0}=n,a=M.useCallback(Phe(e,t,o,i,s),[e,t,o,i,s]);return c3(r,a)}function The(e){const[t,n]=M.useState(!1),r=M.useRef(null);return M.useEffect(()=>{const o=a=>{n(!0),e?.onHoverStart?.(a)},i=a=>{n(!1),e?.onHoverEnd?.(a)},s=r.current;if(s)return s.addEventListener("mouseover",o),s.addEventListener("mouseout",i),()=>{s.removeEventListener("mouseover",o),s.removeEventListener("mouseout",i)}},[e]),{ref:r,isHovering:t}}function _he({onVisible:e,root:t=null,rootMargin:n="0px",threshold:r=0}={}){const[o,i]=M.useState(!1),s=M.useRef(null),a=M.useCallback(([l])=>{const c=l.isIntersecting;i(c)},[e]);return M.useEffect(()=>{if(s.current==null)return;const l=new IntersectionObserver(a,{root:t,rootMargin:n,threshold:r});return l.observe(s.current),()=>{s.current!=null&&l.unobserve(s.current)}},[s,t,n,r,a]),M.useEffect(()=>{o&&e?.()},[o]),{ref:s,isVisible:o}}function Nhe(e,t){const n=()=>{try{const a=localStorage.getItem(e);return a?JSON.parse(a):t!==void 0?t:void 0}catch(a){return console.error(`Error parsing localStorage key "${e}":`,a),t!==void 0?t:void 0}},[r,o]=M.useState(n);return M.useEffect(()=>{try{r!==void 0?localStorage.setItem(e,JSON.stringify(r)):localStorage.removeItem(e)}catch(a){console.error(`Error setting localStorage key "${e}":`,a)}},[e,r]),[r,a=>{o(a)},()=>{try{localStorage.removeItem(e),o(t!==void 0?t:void 0)}catch(a){console.error(`Error removing localStorage key "${e}":`,a)}}]}const Ohe=e=>{const[t,n]=M.useState(!1);return M.useEffect(()=>{const r=window.matchMedia(e),o=()=>n(r.matches);return o(),r.addEventListener("change",o),()=>{r.removeEventListener("change",o)}},[e]),t};function Mhe(e){uo.isFunction(e)||console.error(`useMemoizedFn expected parameter is a function, got ${typeof e}`);const t=M.useRef(e);t.current=M.useMemo(()=>e,[e]);const n=M.useRef(null);return n.current||(n.current=function(...r){return t.current.apply(this,r)}),n.current}const Ihe=e=>{const[t,n]=M.useState(!1),[r,o]=M.useState(null),[i,s]=M.useState(null);return{mutate:M.useCallback(async(...l)=>{n(!0),o(null),s(null);try{const c=await e.fn(...l);return e.onSuccess?.(c),s(c),c}catch(c){const d=c;throw e.onError?.(d),o(d),d}finally{e.onFinish?.(),n(!1)}},[e]),loading:t,error:r,data:i}};function Dhe(e){const[t,n]=M.useState(e),r=M.useCallback(()=>n(e),[e]),o=M.useCallback(i=>{n(s=>{if(uo.isFunction(i)){const a=i(s);return uo.isObject(a)?{...s,...a}:s}else if(uo.isObject(i))return{...s,...i};return s})},[]);return[t,o,r]}function DR({totalItems:e,pageSize:t,initialCurrentPage:n=1,onChange:r}){const[o,i]=M.useState(n),s=Math.ceil(e/t),a=o===s,l=o===1,c=(o-1)*t+1,d=Math.min(o*t,e),f=()=>{if(a)return;const b=Math.min(o+1,s);v(b)},m=()=>{if(l)return;const b=Math.max(o-1,1);v(b)},g=b=>{if(b===1&&l||b===s&&a)return;const x=Math.max(1,b),y=Math.min(x,s);v(y)},v=b=>{i(b),r?.({currentPage:b,pageSize:t})};return{next:f,prev:m,goTo:g,currentPage:o,maxPage:s,isFirstPage:l,isLastPage:a,range:{start:c,end:d}}}function Ahe(e){const t=()=>document.getElementById(e),n=()=>{const o=document.createElement("div");return o.id=e,o},r=M.useMemo(()=>{const o=t();return o||n()},[e]);return M.useEffect(()=>(document.getElementById(e)||document.body.appendChild(r),()=>{const o=document.getElementById(e);o&&document.body.removeChild(o)}),[e,r]),{render:o=>_o.createPortal(o,r)}}function khe({shouldPrevent:e,message:t="Es posible que no se guarden los cambios hayas hecho."}){const n=r=>{if(e)return r.preventDefault(),r.returnValue=t,t};M.useEffect(()=>(window.addEventListener("beforeunload",n),()=>window.removeEventListener("beforeunload",n)),[t,e])}const Ss="...",h3=({siblingCount:e=1,...t})=>{const n=DR(t),{currentPage:r,maxPage:o}=n,{totalItems:i,pageSize:s}=t,a=()=>{const f=2+3*e,m=1;if(f>=o)return uo.range(m,o+1);const g=Math.max(r-e,1),v=Math.min(r+e,o),b=g>2,x=v<o-2;if(b&&x){const y=uo.range(g,v+1);return[m,Ss,...y,Ss,o]}if(x)return[...uo.range(m,f+1),Ss,o];if(b){const y=uo.range(o-f+1,o+1);return[m,Ss,...y]}},l=M.useMemo(a,[i,s,r,e]);return{...n,paginationRange:l??[]}};function $he(e){const[t,n]=M.useState(new Set),r=M.useCallback(d=>t.has(d),[t]),o=M.useCallback(d=>{n(f=>new Set([...f,d]))},[]),i=M.useCallback(d=>{n(f=>{const m=new Set(f);return m.delete(d),m})},[]),s=M.useCallback(d=>{n(f=>{const m=new Set(f);return m.has(d)?m.delete(d):m.add(d),m})},[]),a=M.useCallback(d=>{n(new Set(d))},[]),l=M.useCallback(()=>{n(d=>d.size===e.length?new Set:new Set(e))},[e]),c=M.useCallback(()=>n(new Set),[]);return{isAllSelected:t.size===e.length,isSomeSelected:t.size>0&&t.size<e.length,isNoneSelected:t.size===0,isSelected:r,selected:[...t],setSelected:a,select:o,unselect:i,toggle:s,toggleAll:l,clear:c}}function Fhe(e,t){const[n,r]=M.useState(0),o=t??e.length,i=()=>{r(c=>c>=o-1?c:c+1)},s=()=>{r(c=>c<=0?c:c-1)},a=c=>{r(c)},l=c=>{const d=uo.findIndex(e,c);d!==-1&&a(d)};return{currentStepIndex:n,step:e[n],steps:e,isFirstStep:n===0,isLastStep:n===o-1,goTo:a,next:i,back:s,findAndGo:l}}function g3(e=!1){const[t,n]=M.useState(e);return[t,o=>{n(o===void 0?!t:o)}]}const v3=e=>C.jsx(zme,{"data-slot":"menu",...e}),b3=e=>C.jsx(Gme,{"data-slot":"menu-trigger",...e}),Lhe=e=>C.jsx(Xme,{"data-slot":"menu-group",...e}),jhe=e=>C.jsx(l3,{"data-slot":"menu-portal",...e}),y3=e=>C.jsx(rhe,{"data-slot":"menu-sub",...e}),qhe=e=>C.jsx(ehe,{"data-slot":"menu-radio-group",...e}),x3=({className:e,inset:t,children:n,...r})=>C.jsxs(ohe,{"data-slot":"menu-sub-trigger",className:ue("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state='open']:bg-accent",t&&"pl-8",e),...r,children:[n,C.jsx(Lp,{className:"ml-auto h-4 w-4"})]}),E3=({className:e,...t})=>C.jsx(ihe,{"data-slot":"menu-sub-content",className:ue("z-float min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state='open']:animate-in data-[state='closed']:animate-out data-[state='closed']:fade-out-0 data-[state='open']:fade-in-0 data-[state='closed']:zoom-out-95 data-[state='open']:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}),w3=({className:e,sideOffset:t=4,...n})=>C.jsx(l3,{"data-slot":"menu-portal",children:C.jsx(Yme,{"data-slot":"menu-content",sideOffset:t,className:ue("z-float min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state='open']:animate-in data-[state='closed']:animate-out data-[state='closed']:fade-out-0 data-[state='open']:fade-in-0 data-[state='closed']:zoom-out-95 data-[state='open']:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}),C3=({className:e,inset:t,...n})=>C.jsx(Jme,{"data-slot":"menu-item",className:ue("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}),R3=({className:e,children:t,checked:n,...r})=>C.jsxs(Qme,{"data-slot":"menu-checkbox-item",className:ue("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[C.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:C.jsx(u3,{children:C.jsx(Xx,{className:"h-4 w-4"})})}),t]}),S3=({className:e,children:t,...n})=>C.jsxs(the,{"data-slot":"menu-radio-item",className:ue("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[C.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:C.jsx(u3,{children:C.jsx(rY,{className:"h-2 w-2 fill-current"})})}),t]}),P3=({className:e,inset:t,...n})=>C.jsx(Zme,{"data-slot":"menu-label",className:ue("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}),T3=({className:e,...t})=>C.jsx(nhe,{"data-slot":"menu-separator",className:ue("-mx-1 my-1 h-px bg-muted",e),...t}),_3=({className:e,keys:t,handler:n,options:r={},...o})=>(m3(t,n,r),C.jsx("span",{"data-slot":"menu-shortcut",className:ue("ml-auto text-xs tracking-widest opacity-60",e),...o})),N3=(e,t)=>{switch(e.type){case"item":return C.jsxs(C3,{...e,children:[e.label," ",t]});case"checkbox":return C.jsxs(R3,{...e,children:[e.label," ",t]});case"radio":return C.jsxs(S3,{...e,children:[e.label," ",t]});case"label":return C.jsxs(P3,{...e,children:[e.label," "]});case"separator":return C.jsx(T3,{...e});case"submenu":return C.jsxs(y3,{children:[C.jsx(x3,{...e,children:e.label}),C.jsx(E3,{children:e.items?.map((n,r)=>C.jsx(M.Fragment,{children:N3(n)},r))})]});default:return null}},Bhe=({trigger:e,items:t,contentProps:n,side:r="bottom",offset:o})=>C.jsxs(v3,{children:[C.jsx(b3,{asChild:!0,children:e}),C.jsx(w3,{side:r,sideOffset:o,...n,children:t.map(({shortcut:i,onShortcut:s,shortcutOptions:a,...l},c)=>C.jsx(M.Fragment,{children:N3(l,i&&C.jsx(_3,{keys:i,handler:d=>s?.(d),options:a,children:i}))},c))})]}),O3=Hs("inline-flex items-center relative overflow-hidden bg-gray-100 gap-1 px-2.5 py-0.5 text-xs font-normal transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{rounded:{default:"rounded-(--radius-tag)",full:"rounded-full",square:"rounded-sm"},variant:{primary:"bg-primary border-primary text-primary-foreground hover:bg-primary/80",secondary:"bg-secondary border-secondary !text-secondary-foreground hover:bg-secondary/80",error:"bg-error border-error text-error-foreground hover:bg-error/80",success:"bg-success border-success text-success-foreground hover:bg-success/80",outline:"border border-foreground text-foreground",borderless:"text-foreground"}},defaultVariants:{rounded:"default",variant:"primary"}}),TE=({className:e,color:t,variant:n,rounded:r,icon:o,closable:i,onClose:s,children:a,...l})=>{const c=!!t&&(n==="outline"||n==="borderless"),d=!!t&&!n;return C.jsxs("div",{"data-slot":"tag",className:ue(O3({variant:n,rounded:r}),c&&"bg-white",d&&" text-white",!!o&&"pl-1.5",!!i&&"pr-1.5",e),style:{...c&&{color:t,borderColor:t},...d&&{borderColor:t,backgroundColor:t}},...l,children:[o,a,i&&C.jsx("button",{type:"button","data-slot":"tag-close",className:"z-10 h-4 w-4 cursor-pointer",onClick:f=>{f.stopPropagation(),s()},children:C.jsx($a,{"data-slot":"tag-close-icon"})}),C.jsx("span",{"data-slot":"tag-overlay",className:"w-full h-full absolute top-0 left-0",style:{...c&&{opacity:.13,backgroundColor:t}}})]})},AR=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(AR.displayName="PopoverRootContext");function Lo(e){const t=h.useContext(AR);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: PopoverRootContext is missing. Popover parts must be placed within <Popover.Root>.":gt(47));return t}function Vhe(){return{...xw(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}const Whe={...Ew,disabled:ye(e=>e.disabled),instantType:ye(e=>e.instantType),openMethod:ye(e=>e.openMethod),openChangeReason:ye(e=>e.openChangeReason),modal:ye(e=>e.modal),focusManagerModal:ye(e=>e.focusManagerModal),stickIfOpen:ye(e=>e.stickIfOpen),titleElementId:ye(e=>e.titleElementId),descriptionElementId:ye(e=>e.descriptionElementId),openOnHover:ye(e=>e.openOnHover),closeDelay:ye(e=>e.closeDelay),hasViewport:ye(e=>e.hasViewport)};class zv extends Tp{constructor(t){const n={...Vhe(),...t};n.open&&t?.mounted===void 0&&(n.mounted=!0),super(n,{popupRef:h.createRef(),backdropRef:h.createRef(),internalBackdropRef:h.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:h.createRef(),beforeContentFocusGuardRef:h.createRef(),stickIfOpenTimeout:new gr,triggerElements:new _p},Whe)}setOpen=(t,n)=>{const r=n.reason===Gn,o=n.reason===Os&&n.event.detail===0,i=!t&&(n.reason===Ep||n.reason==null);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,n);const s=()=>{const a={open:t,openChangeReason:n.reason},l=n.trigger?.id??null;(l||t)&&(a.activeTriggerId=l,a.activeTriggerElement=n.trigger??null),this.update(a)};r?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(cH,()=>{this.set("stickIfOpen",!1)}),Rn.flushSync(s)):s(),o||i?this.set("instantType",o?"click":"dismiss"):n.reason===Ms?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(t,n){const r=fn(()=>new zv(n)).current,o=t??r;return zl(r.disposeEffect),o}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}function kI({props:e}){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:i,modal:s=!1,handle:a,triggerId:l,defaultTriggerId:c=null}=e,d=zv.useStore(a?.store,{modal:s,open:r,openProp:n,activeTriggerId:c,triggerIdProp:l});xp(()=>{n===void 0&&d.state.open===!1&&r===!0&&d.update({open:!0,activeTriggerId:c})}),d.useControlledProp("openProp",n),d.useControlledProp("triggerIdProp",l);const f=d.useState("open"),m=d.useState("payload");d.useContextCallback("onOpenChange",o),d.useContextCallback("onOpenChangeComplete",i);const{openMethod:g,triggerProps:v}=Ev(f);bw(d);const{forceUnmount:b}=yw(f,d,()=>{d.update({stickIfOpen:!0,openChangeReason:null})});h.useEffect(()=>{f||d.context.stickIfOpenTimeout.clear()},[d,f]);const x=h.useCallback(B=>{const $=je(B);return $.preventUnmountOnClose=()=>{d.set("preventUnmountingOnClose",!0)},$},[d]),y=h.useCallback(()=>{d.setOpen(!1,x(ei))},[d,x]);h.useImperativeHandle(e.actionsRef,()=>({unmount:b,close:y}),[b,y]);const _=ww({popupStore:d,onOpenChange:d.setOpen}),w=Pp(_,{outsidePressEvent:{mouse:s==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),T=$A(_),{getReferenceProps:R,getFloatingProps:S,getTriggerProps:P}=ka([w,T]),N=h.useMemo(()=>R(v),[R,v]),F=h.useMemo(()=>P(v),[P,v]),W=h.useMemo(()=>S(),[S]);d.useSyncedValues({modal:s,openMethod:g,activeTriggerProps:N,inactiveTriggerProps:F,popupProps:W,floatingRootContext:_,nested:Ws()!=null});const I=h.useMemo(()=>({store:d}),[d]);return C.jsx(AR.Provider,{value:I,children:typeof t=="function"?t({payload:m}):t})}function M3(e){return Lo(!0)?C.jsx(kI,{props:e}):C.jsx(EK,{children:C.jsx(kI,{props:e})})}const Hhe=300;function Khe(e,t){const n=h.useRef(null),r=Re(i=>{Rn.flushSync(()=>{e.setOpen(!1,je(Ms,i.nativeEvent,i.currentTarget))}),GH(n.current)?.focus()}),o=Re(i=>{const s=e.select("positionerElement");if(s&&Nl(i,s))e.context.beforeContentFocusGuardRef.current?.focus();else{Rn.flushSync(()=>{e.setOpen(!1,je(Ms,i.nativeEvent,i.currentTarget))});let a=zH(e.context.triggerFocusTargetRef.current||t.current);for(;a!==null&&Xe(s,a);){const l=a;if(a=iw(a),a===l)break}a?.focus()}});return{preFocusGuardRef:n,handlePreFocusGuardFocus:r,handleFocusTargetFocus:o}}const kR=h.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:s=!0,handle:a,payload:l,openOnHover:c=!1,delay:d=Hhe,closeDelay:f=0,id:m,style:g,...v}=t,b=Lo(!0),x=a?.store??b?.store;if(!x)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Popover.Trigger> must be either used within a <Popover.Root> component or provided with a handle.":gt(74));const y=bn(m),_=x.useState("isTriggerActive",y),w=x.useState("floatingRootContext"),T=x.useState("isOpenedByTrigger",y),R=h.useRef(null),{registerTrigger:S,isMountedByThisTrigger:P}=vw(y,R,x,{payload:l,disabled:i,openOnHover:c,closeDelay:f}),N=x.useState("openChangeReason"),F=x.useState("stickIfOpen"),W=x.useState("openMethod"),I=x.useState("focusManagerModal"),B=AA(w,{enabled:w!=null&&c&&(W!=="touch"||N!==Os),mouseOnly:!0,move:!1,handleClose:LA(),restMs:d,delay:{close:f},triggerElementRef:R,isActiveTrigger:_,isClosing:()=>x.select("transitionStatus")==="ending"}),$=Sp(w,{enabled:w!=null,stickIfOpen:F}),k=ka([$]),j=x.useState("triggerProps",P),D={disabled:i,open:T},{getButtonProps:A,buttonRef:L}=Yn({disabled:i,native:s}),H=h.useMemo(()=>({open(ee){return ee&&N===Os?Rw.open(ee):Np.open(ee)}}),[N]),V=$e("button",t,{state:D,ref:[L,n,S,R],props:[k.getReferenceProps(),B,j,{[XE]:"",id:y},v,A],stateAttributesMapping:H}),{preFocusGuardRef:X,handlePreFocusGuardFocus:K,handleFocusTargetFocus:G}=Khe(x,R);return _&&!I?C.jsxs(h.Fragment,{children:[C.jsx(ti,{ref:X,onFocus:K}),C.jsx(h.Fragment,{children:V},y),C.jsx(ti,{ref:x.context.triggerFocusTargetRef,onFocus:G})]}):C.jsx(h.Fragment,{children:V},y)});process.env.NODE_ENV!=="production"&&(kR.displayName="PopoverTrigger");const $R=h.createContext(void 0);process.env.NODE_ENV!=="production"&&($R.displayName="PopoverPortalContext");function Uhe(){const e=h.useContext($R);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Popover.Portal> is missing.":gt(45));return e}const FR=h.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:i}=Lo();return i.useState("mounted")||r?C.jsx($R.Provider,{value:r,children:C.jsx(Rp,{ref:n,...o})}):null});process.env.NODE_ENV!=="production"&&(FR.displayName="PopoverPortal");const LR=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(LR.displayName="PopoverPositionerContext");function jR(){const e=h.useContext(LR);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: PopoverPositionerContext is missing. PopoverPositioner parts must be placed within <Popover.Positioner>.":gt(46));return e}const qR=h.forwardRef(function(t,n){const{render:r,className:o,anchor:i,positionMethod:s="absolute",side:a="bottom",align:l="center",sideOffset:c=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:m=5,arrowPadding:g=5,sticky:v=!1,disableAnchorTracking:b=!1,collisionAvoidance:x=ZE,style:y,..._}=t,{store:w}=Lo(),T=Uhe(),R=yK(),S=w.useState("floatingRootContext"),P=w.useState("mounted"),N=w.useState("open"),F=w.useState("openChangeReason"),W=w.useState("activeTriggerElement"),I=w.useState("modal"),B=w.useState("openMethod"),$=w.useState("positionerElement"),k=w.useState("instantType"),j=w.useState("transitionStatus"),D=w.useState("hasViewport"),A=h.useRef(null),L=bv($,!1,!1),H=Kp({anchor:i,floatingRootContext:S,positionMethod:s,mounted:P,side:a,sideOffset:c,align:l,alignOffset:d,arrowPadding:g,collisionBoundary:f,collisionPadding:m,sticky:v,disableAnchorTracking:b,keepMounted:T,nodeId:R,collisionAvoidance:x,adaptiveOrigin:D?oL:void 0}),V=S.useState("domReferenceElement");Ne(()=>{const ee=V,Z=A.current;if(ee&&(A.current=ee),Z&&ee&&ee!==Z){w.set("instantType",void 0);const te=new AbortController;return L(()=>{w.set("instantType","trigger-change")},te.signal),()=>{te.abort()}}},[V,L,w]);const X={open:N,side:H.side,align:H.align,anchorHidden:H.anchorHidden,instant:k};MC(N&&I===!0&&F!==Gn,B==="touch",$,W);const K=h.useCallback(ee=>{w.set("positionerElement",ee)},[w]),G=zp(t,X,{styles:H.positionerStyles,transitionStatus:j,props:_,refs:[n,K],hidden:!P,inert:!N});return C.jsxs(LR.Provider,{value:H,children:[P&&I===!0&&F!==Gn&&C.jsx(Dp,{ref:w.context.internalBackdropRef,inert:Jl(!N),cutout:W}),C.jsx(xK,{id:R,children:G})]})});process.env.NODE_ENV!=="production"&&(qR.displayName="PopoverPositioner");const BR=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(BR.displayName="ClosePartContext");function zhe(){const[e,t]=h.useState(0),n=Re(()=>(t(o=>o+1),()=>{t(o=>Math.max(0,o-1))}));return{context:h.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}function Ghe(e){const{value:t,children:n}=e;return C.jsx(BR.Provider,{value:t,children:n})}function Yhe(){const e=h.useContext(BR);Ne(()=>e?.register(),[e])}const Xhe={...br,...Hn},VR=h.forwardRef(function(t,n){const{className:r,render:o,initialFocus:i,finalFocus:s,style:a,...l}=t,{store:c}=Lo(),d=jR(),f=lL()!=null,{context:m,hasClosePart:g}=zhe(),v=c.useState("open"),b=c.useState("openMethod"),x=c.useState("instantType"),y=c.useState("transitionStatus"),_=c.useState("popupProps"),w=c.useState("titleElementId"),T=c.useState("descriptionElementId"),R=c.useState("modal"),S=c.useState("mounted"),P=c.useState("openChangeReason"),N=c.useState("activeTriggerElement"),F=c.useState("floatingRootContext");sr({open:v,ref:c.context.popupRef,onComplete(){v&&c.context.onOpenChangeComplete?.(!0)}});const W=c.useState("disabled"),I=c.useState("openOnHover"),B=c.useState("closeDelay");DA(F,{enabled:I&&!W,closeDelay:B});function $(H){return H==="touch"?c.context.popupRef.current:!0}const k=i===void 0?$:i,j={open:v,side:d.side,align:d.align,instant:x,transitionStatus:y},D=R!==!1&&g;c.useSyncedValue("focusManagerModal",D);const A=h.useCallback(H=>{c.set("popupElement",H)},[c]),L=$e("div",t,{state:j,ref:[n,c.context.popupRef,A],props:[_,{"aria-labelledby":w,"aria-describedby":T,onKeyDown(H){f&&Pw.has(H.key)&&H.stopPropagation()}},Up(y),l],stateAttributesMapping:Xhe});return C.jsx(gv,{context:F,openInteractionType:b,modal:D,disabled:!S||P===Gn,initialFocus:k,returnFocus:s,restoreFocus:"popup",previousFocusableElement:Zt(N)?N:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:C.jsx(Ghe,{value:m,children:L})})});process.env.NODE_ENV!=="production"&&(VR.displayName="PopoverPopup");const I3=h.forwardRef(function(t,n){const{className:r,render:o,style:i,...s}=t,{store:a}=Lo(),l=a.useState("open"),{arrowRef:c,side:d,align:f,arrowUncentered:m,arrowStyles:g}=jR();return $e("div",t,{state:{open:l,side:d,align:f,uncentered:m},ref:[n,c],props:[{style:g,"aria-hidden":!0},s],stateAttributesMapping:br})});process.env.NODE_ENV!=="production"&&(I3.displayName="PopoverArrow");const Zhe={...br,...Hn},D3=h.forwardRef(function(t,n){const{className:r,render:o,style:i,...s}=t,{store:a}=Lo(),l=a.useState("open"),c=a.useState("mounted"),d=a.useState("transitionStatus"),f=a.useState("openChangeReason");return $e("div",t,{state:{open:l,transitionStatus:d},ref:[a.context.backdropRef,n],props:[{role:"presentation",hidden:!c,style:{pointerEvents:f===Gn?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},s],stateAttributesMapping:Zhe})});process.env.NODE_ENV!=="production"&&(D3.displayName="PopoverBackdrop");const WR=h.forwardRef(function(t,n){const{render:r,className:o,style:i,...s}=t,{store:a}=Lo(),l=bn(s.id);return Ne(()=>(a.set("titleElementId",l),()=>{a.set("titleElementId",void 0)}),[a,l]),$e("h2",t,{ref:n,props:[{id:l},s]})});process.env.NODE_ENV!=="production"&&(WR.displayName="PopoverTitle");const HR=h.forwardRef(function(t,n){const{render:r,className:o,style:i,...s}=t,{store:a}=Lo(),l=bn(s.id);return Ne(()=>(a.set("descriptionElementId",l),()=>{a.set("descriptionElementId",void 0)}),[a,l]),$e("p",t,{ref:n,props:[{id:l},s]})});process.env.NODE_ENV!=="production"&&(HR.displayName="PopoverDescription");const KR=h.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:s=!0,style:a,...l}=t,{buttonRef:c,getButtonProps:d}=Yn({disabled:i,focusableWhenDisabled:!1,native:s}),{store:f}=Lo();return Yhe(),$e("button",t,{ref:[n,c],props:[{onClick(g){f.setOpen(!1,je(JE,g.nativeEvent,g.currentTarget))}},l,d]})});process.env.NODE_ENV!=="production"&&(KR.displayName="PopoverClose");let Jhe=(function(e){return e.popupWidth="--popup-width",e.popupHeight="--popup-height",e})({});const Qhe={activationDirection:e=>e?{"data-activation-direction":e}:null},UR=h.forwardRef(function(t,n){const{render:r,className:o,style:i,children:s,...a}=t,{store:l}=Lo(),{side:c}=jR(),d=l.useState("instantType"),{children:f,state:m}=NL({store:l,side:c,cssVars:Jhe,children:s}),g={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:d};return $e("div",t,{state:g,ref:n,props:[a,{children:f}],stateAttributesMapping:Qhe})});process.env.NODE_ENV!=="production"&&(UR.displayName="PopoverViewport");class A3{constructor(){this.store=new zv}open(t){const n=t?this.store.context.triggerElements.getById(t)??void 0:void 0;if(t&&!n)throw new Error(process.env.NODE_ENV!=="production"?`Base UI: PopoverHandle.open: No trigger found with id "${t}".`:gt(80,t));this.store.setOpen(!0,je(ei,void 0,n))}close(){this.store.setOpen(!1,je(ei,void 0,void 0))}get isOpen(){return this.store.state.open}}function k3(){return new A3}const ege=Object.freeze(Object.defineProperty({__proto__:null,Arrow:I3,Backdrop:D3,Close:KR,Description:HR,Handle:A3,Popup:VR,Portal:FR,Positioner:qR,Root:M3,Title:WR,Trigger:kR,Viewport:UR,createHandle:k3},Symbol.toStringTag,{value:"Module"})),tge=k3,sm=M3;function am({className:e,children:t,...n}){return C.jsx(kR,{className:e,"data-slot":"popover-trigger",...n,children:t})}function cu({children:e,className:t,side:n="bottom",align:r="center",sideOffset:o=4,alignOffset:i=0,tooltipStyle:s=!1,matchTriggerWidth:a=!1,anchor:l,portalProps:c,...d}){return C.jsx(FR,{...c,children:C.jsx(qR,{align:r,alignOffset:i,anchor:l,className:"z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom,transform] data-instant:transition-none","data-slot":"popover-positioner",side:n,sideOffset:o,style:a?{width:"var(--anchor-width)"}:void 0,children:C.jsx(VR,{className:ue("relative flex h-(--popup-height,auto) origin-(--transform-origin) rounded-lg border bg-popover not-dark:bg-clip-padding text-popover-foreground shadow-lg/5 outline-none transition-[width,height,scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] has-data-[slot=calendar]:rounded-xl has-data-[slot=calendar]:before:rounded-[calc(var(--radius-xl)-1px)] data-starting-style:scale-98 data-starting-style:opacity-0 dark:before:shadow-[0_-1px_--theme(--color-white/6%)]",a?"w-full":"w-(--popup-width,auto) max-w-72",s&&"w-fit text-balance rounded-md text-xs shadow-md/5 before:rounded-[calc(var(--radius-md)-1px)]",t),"data-slot":"popover-popup",...d,children:C.jsx(UR,{className:ue("relative size-full max-h-(--available-height) overflow-clip px-(--viewport-inline-padding) py-4 [--viewport-inline-padding:--spacing(4)] has-data-[slot=calendar]:p-2 data-instant:transition-none **:data-current:data-ending-style:opacity-0 **:data-current:data-starting-style:opacity-0 **:data-previous:data-ending-style:opacity-0 **:data-previous:data-starting-style:opacity-0 **:data-current:w-[calc(var(--popup-width)-2*var(--viewport-inline-padding)-2px)] **:data-previous:w-[calc(var(--popup-width)-2*var(--viewport-inline-padding)-2px)] **:data-current:opacity-100 **:data-previous:opacity-100 **:data-current:transition-opacity **:data-previous:transition-opacity",s?"py-1 [--viewport-inline-padding:--spacing(2)]":"not-data-transitioning:overflow-y-auto"),"data-slot":"popover-viewport",children:e})})})})}function nge({...e}){return C.jsx(KR,{"data-slot":"popover-close",...e})}function $3({className:e,...t}){return C.jsx(WR,{className:ue("font-semibold text-lg leading-none",e),"data-slot":"popover-title",...t})}function F3({className:e,...t}){return C.jsx(HR,{className:ue("text-muted-foreground text-sm",e),"data-slot":"popover-description",...t})}function rge({trigger:e,children:t,title:n,description:r,side:o,align:i,sideOffset:s,alignOffset:a,tooltipStyle:l,matchTriggerWidth:c,anchor:d,popupClassName:f,triggerProps:m,popupProps:g,...v}){return C.jsxs(sm,{...v,children:[e!==void 0&&C.jsx(am,{render:e,...m}),C.jsxs(cu,{...g,side:o,align:i,sideOffset:s,alignOffset:a,tooltipStyle:l,matchTriggerWidth:c,anchor:d,className:ue(g?.className,f),children:[(n??r)&&C.jsxs("div",{className:"mb-2",children:[n&&C.jsx($3,{children:n}),r&&C.jsx(F3,{children:r})]}),t]})]})}const oge=({valueKey:e,values:t,setValues:n,items:r,maxCount:o,setIsPopoverOpen:i})=>{const s=m=>{if(m.key==="Enter")i(!0);else if(m.key==="Backspace"&&!m.currentTarget.value){const g=[...t];g.pop(),n?.(g)}},a=m=>{const g=t.includes(m)?t.filter(v=>v!==m):[...t,m];n?.(g)},l=()=>{n?.([])};return{handleInputKeyDown:s,toggleOption:a,handleClear:l,handleTogglePopover:()=>{i(m=>!m)},clearExtraOptions:()=>{const m=t.slice(0,o);n?.(m)},toggleAll:()=>{const m=r.filter(g=>!g.disabled);if(t.length===m.length)l();else{const g=m.map(v=>v[e]);n?.(g)}}}},$I=Hs("m-1 transition ease-in-out delay-150 duration-300",{variants:{variant:{default:"border-foreground/10 border text-foreground bg-card hover:bg-card/80",primary:"border-foreground/10 border text-foreground bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-foreground/60 border bg-secondary text-secondary-foreground hover:bg-secondary/80",error:"border-transparent bg-error text-error-foreground hover:bg-error/80"}},defaultVariants:{variant:"default"}}),ige=({items:e=[],value:t,valueKey:n="value",labelKey:r="label",onChange:o,variant:i,defaultValue:s=[],placeholder:a="Seleccionar",maxCount:l=3,className:c,renderOption:d=x=>x[r],withCheckbox:f=!1,showSearch:m=!0,showSelectAll:g=!0,rootProps:v,...b})=>{const[x=[],y]=vr({prop:t,onChange:o,defaultProp:s}),[_,w]=vr({prop:b.open,onChange:b.onOpenChange,defaultProp:b.defaultOpen||!1}),T=h.useMemo(()=>e.filter(I=>!I.disabled),[e]),{handleInputKeyDown:R,toggleOption:S,handleClear:P,handleTogglePopover:N,clearExtraOptions:F,toggleAll:W}=oge({valueKey:n,values:x,setValues:y,items:e,maxCount:l,setIsPopoverOpen:w});return C.jsxs(sm,{open:_,onOpenChange:w,"data-slot":"multi-select",...v,children:[C.jsx(am,{...b,"data-slot":"multi-select-trigger",onClick:N,className:ue("flex w-full p-1 rounded-md border border-input min-h-10 h-auto items-center justify-between bg-inherit hover:bg-inherit",c),children:x.length>0?C.jsxs("div",{className:"flex justify-between items-center w-full",children:[C.jsxs("div",{className:"flex flex-wrap items-center","data-slot":"multi-select-tags",children:[x.slice(0,l).map(I=>{const B=e.find(k=>k[n]===I),$=B?.icon;return C.jsxs(TE,{"data-slot":"multi-select-tag",className:ue($I({variant:i})),closable:!0,onClose:()=>S(I),children:[$&&C.jsx($,{className:"h-4 w-4 mr-2"}),B&&d?.(B)]},I)}),x.length>l&&C.jsx(TE,{"data-slot":"multi-select-tag",className:ue($I({variant:i})),closable:!0,onClose:F,children:`+ ${x.length-l} más`})]}),C.jsxs("div",{className:"flex items-center justify-between",children:[C.jsx($a,{"data-slot":"multi-select-clear",className:"h-4 mx-2 cursor-pointer text-muted-foreground",onClick:I=>{I.stopPropagation(),P()}}),C.jsx(x2,{"data-slot":"multi-select-divider",orientation:"vertical",className:"flex min-h-6 h-full"}),C.jsx(Ra,{"data-slot":"multi-select-trigger-icon",className:"h-4 mx-2 cursor-pointer text-muted-foreground"})]})]}):C.jsxs("div",{className:"flex items-center justify-between w-full mx-auto","data-slot":"multi-select-trigger-empty",children:[C.jsx("span",{className:"text-sm text-foreground font-normal mx-2","data-slot":"multi-select-placeholder",children:a}),C.jsx(Ra,{"data-slot":"multi-select-trigger-icon",className:"h-4 cursor-pointer text-muted-foreground mx-2"})]})}),C.jsx(cu,{"data-slot":"multi-select-content",className:"p-0 min-w-(--anchor-width)",align:"start",children:C.jsxs(Tv,{children:[m&&C.jsx(Bw,{"data-slot":"multi-select-input",placeholder:"Buscar...",onKeyDown:R}),C.jsxs(Vw,{"data-slot":"multi-select-list",children:[C.jsx(Ww,{"data-slot":"multi-select-empty",children:"No results found."}),C.jsxs(N$,{"data-slot":"multi-select-group",children:[g&&C.jsxs(Fg,{"data-slot":"multi-select-item",onSelect:W,className:ue("cursor-pointer",!f&&x.length===T.length&&"bg-accent text-accent-foreground"),children:[f&&C.jsx("div",{className:ue("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",x.length===T.length?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:C.jsx(Xx,{className:"h-4 w-4"})}),C.jsx("span",{children:"(Seleccionar todo)"})]},"all"),e.map(I=>{const B=x.includes(I[n]);return C.jsxs(Fg,{"data-slot":"multi-select-item",onSelect:()=>!I.disabled&&S(I[n]),className:ue(I.disabled?"!bg-neutral-50 !text-neutral-400":"cursor-pointer",!f&&B&&"!bg-accent !text-accent-foreground"),children:[f&&C.jsx("div",{className:ue("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",B?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:C.jsx(Xx,{className:"h-4 w-4"})}),I.icon&&C.jsx(I.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),C.jsx("span",{children:d?.(I)})]},I[n])})]})]})]})})]})},zR=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(zR.displayName="NumberFieldRootContext");function du(){const e=h.useContext(zR);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.":gt(43));return e}const Ha={inputValue:()=>null,value:()=>null,...ar},FI=new Map;function hp(e,t){const n=JSON.stringify({locale:e,options:t}),r=FI.get(n);if(r)return r;const o=new Intl.NumberFormat(e,t);return FI.set(n,o),o}function Ns(e,t,n){return e==null?"":hp(t,n).format(e)}function L3(e,t,n){return Ns(e,t,{...n,maximumFractionDigits:20})}function sge(e,t,n){return e==null?"":n?Ns(e,t,n):Ns(e/100,t,{style:"percent"})}const age=["零","〇","一","二","三","四","五","六","七","八","九"],lge={零:"0","〇":"0",一:"1",二:"2",三:"3",四:"4",五:"5",六:"6",七:"7",八:"8",九:"9"},j3=["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],q3=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],GR=["0","1","2","3","4","5","6","7","8","9"],B3=["%","٪","%","﹪"],V3=["‰","؉"],W3=["−","-","‒","–","—","﹣"],H3=["+","﹢"],uge=".",cge=",",dge=new RegExp(`[${j3.join("")}]`,"g"),fge=new RegExp(`[${q3.join("")}]`,"g"),pge=new RegExp(`[${GR.join("")}]`,"g"),mge=new RegExp(`[${age.join("")}]`,"g"),hge=new RegExp(`[${B3.join("")}]`),gge=new RegExp(`[${V3.join("")}]`),_E=/[٠١٢٣٤٥٦٧٨٩]/,K3=/[۰۱۲۳۴۵۶۷۸۹]/,NE=/[零〇一二三四五六七八九]/,LI=new RegExp(`[${GR.join("")}]`),vge=[".",",",uge,cge,"٫","٬"],jI=new RegExp("\\p{Zs}","u"),bge=["+",...H3],yge=["-",...W3],zh=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),xge=e=>e.replace(/[-\\\]^]/g,t=>`\\${t}`),U3=e=>`[${e.map(xge).join("")}]`,z3=U3(["-"].concat(W3)),G3=U3(["+"].concat(H3)),Y3=new RegExp(z3,"gu"),X3=new RegExp(G3,"gu"),Af=new RegExp(z3),Gh=new RegExp(G3);function YR(e,t){const n=hp(e,t).formatToParts(11111.1),r={};return n.forEach(o=>{r[o.type]=o.value}),hp(e).formatToParts(.1).forEach(o=>{o.type==="decimal"&&(r[o.type]=o.value)}),r}function Kf(e,t,n){if(e==null)return null;let r=String(e).replace(new RegExp("\\p{Cf}","gu"),"").trim();r=r.replace(Y3,"-").replace(X3,"+");let o=!1;const i=r.match(/([+-])\s*$/);i&&(i[1]==="-"&&(o=!0),r=r.replace(/([+-])\s*$/,""));const s=r.match(/^\s*([+-])/);s&&(s[1]==="-"&&(o=!0),r=r.replace(/^\s*[+-]/,""));let a=t;a===void 0&&(_E.test(r)||K3.test(r)?a="ar":NE.test(r)&&(a="zh"));const{group:l,decimal:c,currency:d}=YR(a,n),f=hp(a,n).formatToParts(1).filter(P=>P.type==="unit").map(P=>zh(P.value)),m=f.length?new RegExp(f.join("|"),"g"):null;let g=null;l&&(new RegExp("\\p{Zs}","u").test(l)?g=new RegExp("\\p{Zs}","gu"):l==="'"||l==="’"?g=/['’]/g:g=new RegExp(zh(l),"g"));let b=[{regex:l?g:null,replacement:""},{regex:c?new RegExp(zh(c),"g"):null,replacement:"."},{regex:/./g,replacement:"."},{regex:/,/g,replacement:""},{regex:/٫/g,replacement:"."},{regex:/٬/g,replacement:""},{regex:d?new RegExp(zh(d),"g"):null,replacement:""},{regex:m,replacement:""},{regex:dge,replacement:P=>String(j3.indexOf(P))},{regex:fge,replacement:P=>String(q3.indexOf(P))},{regex:pge,replacement:P=>String(GR.indexOf(P))},{regex:mge,replacement:P=>lge[P]}].reduce((P,{regex:N,replacement:F})=>N?P.replace(N,F):P,r);const x=b.lastIndexOf(".");if(x!==-1&&(b=`${b.slice(0,x).replace(/\./g,"")}.${b.slice(x+1).replace(/\./g,"")}`),/^[-+]?Infinity$/i.test(r)||/[∞]/.test(r))return null;const y=(o?"-":"")+b;let _=parseFloat(y);const w=n?.style,T=w==="unit"&&n?.unit==="percent",R=hge.test(e)||w==="percent";return gge.test(e)?_/=1e3:!T&&R&&(_/=100),Number.isNaN(_)?null:_}const Ege=60,wge=400,Cge=8,gp=1,Rge=1e-10;function Sge(e){const t=hp("en-US").resolvedOptions(),n=e?.minimumFractionDigits??t.minimumFractionDigits??0;return{maximumFractionDigits:Math.max(e?.maximumFractionDigits??t.maximumFractionDigits??20,n),minimumFractionDigits:n}}function Pge(e,t){if(!Number.isFinite(e))return e;const n=Math.min(Math.max(t,0),20);return Number(e.toFixed(n))}function xx(e,t){const{maximumFractionDigits:n}=Sge(t);return Pge(e,n)}function Tge(e,t,n,r="directional"){if(n===0)return e;const o=Math.abs(n),i=Math.sign(n),s=o*Rge*i,a=r==="nearest"?n:o,l=(e-t+s)/a;let c;return r==="nearest"?c=Math.round(l):i>0?c=Math.floor(l):c=Math.ceil(l),t+c*(r==="nearest"?n:o)}function _ge(e,{step:t,minWithDefault:n,maxWithDefault:r,minWithZeroDefault:o,format:i,snapOnStep:s,small:a,clamp:l}){if(e===null)return e;const c=l?To(e,n,r):e;if(t!=null&&s){if(t===0)return xx(c,i);let d=o;!a&&n!==Number.MIN_SAFE_INTEGER&&(d=n);const f=Tge(c,d,t,a?"nearest":"directional");return xx(f,i)}return xx(c,i)}const XR=h.forwardRef(function(t,n){const{id:r,min:o,max:i,smallStep:s=.1,step:a=1,largeStep:l=10,required:c=!1,disabled:d=!1,readOnly:f=!1,form:m,name:g,defaultValue:v,value:b,onValueChange:x,onValueCommitted:y,allowWheelScrub:_=!1,snapOnStep:w=!1,allowOutOfRange:T=!1,format:R,locale:S,render:P,className:N,inputRef:F,style:W,...I}=t,{setDirty:B,validityData:$,disabled:k,setFilled:j,invalid:D,name:A,state:L,validation:H,shouldValidateOnChange:V}=Sn(),X=k||d,K=A??g,G=a==="any"?1:a,[ee,Z]=h.useState(!1),te=o??Number.MIN_SAFE_INTEGER,J=i??Number.MAX_SAFE_INTEGER,ne=o??0,U=R?.style,ie=h.useRef(null),se=Io(F,H.inputRef),Q=Ba({id:r}),[me,ve]=oi({controlled:b,default:v,name:"NumberField",state:"value"}),xe=me??null,be=dn(xe);Ne(()=>{j(xe!==null)},[j,xe]);const Ce=JU(),qe=dn(R),Te=h.useRef(!1),ke=Re((Je,Ge)=>{Te.current=!1,y?.(Je,Ge)}),ce=h.useRef(!0),he=h.useRef(null),[re,le]=h.useState(()=>b!==void 0?qI(xe,S,R):Ns(xe,S,R)),[Oe,De]=h.useState("numeric"),Fe=Re(()=>{const{decimal:Je,group:Ge,currency:dt,literal:rt}=YR(S,R),Ve=new Set;vge.forEach(Ie=>Ve.add(Ie)),Je&&Ve.add(Je),Ge&&(Ve.add(Ge),jI.test(Ge)&&Ve.add(" "));const Me=U==="percent"||U==="unit"&&R?.unit==="percent",Be=U==="percent"||U==="unit"&&R?.unit==="permille";return Me&&B3.forEach(Ie=>Ve.add(Ie)),Be&&V3.forEach(Ie=>Ve.add(Ie)),U==="currency"&&dt&&Ve.add(dt),rt&&(Array.from(rt).forEach(Ie=>Ve.add(Ie)),jI.test(rt)&&Ve.add(" ")),bge.forEach(Ie=>Ve.add(Ie)),te<0&&yge.forEach(Ie=>Ve.add(Ie)),Ve}),We=Re(Je=>Je?.altKey?s:Je?.shiftKey?l:G),ze=Re((Je,Ge)=>{const dt=Ge.event,rt=Ge.direction,Ve=Ge.reason,Me=!T||!(Ve===Li||Ve===xg||Ve===kx||Ve===Br||Ve===vn),Be=_ge(Je,{step:rt?We(dt)*rt:void 0,format:qe.current,minWithDefault:te,maxWithDefault:J,minWithZeroDefault:ne,snapOnStep:w,small:dt?.altKey??!1,clamp:Me}),Ie=Ge.reason===Li||Ge.reason===Br||Ge.reason===xg||Ge.reason===kx||Ge.reason===vn,tt=Be!==xe||Ie&&(Je!==xe||ce.current===!1);if(tt){if(he.current=Be,x?.(Be,Ge),Ge.isCanceled)return tt;ve(Be),B(Be!==$.initialValue),Te.current=!0}return ce.current&&le(Ns(Be,S,R)),Ce(),tt}),He=Re((Je,{direction:Ge,currentValue:dt,event:rt,reason:Ve})=>{const Me=dt??be.current,Be=typeof Me=="number"?Me+Je*Ge:Math.max(0,o??0);return ze(Be,je(Ve,rt,void 0,{direction:Ge}))});Ne(function(){if(!ce.current)return;const Ge=b!==void 0?qI(xe,S,R):Ns(xe,S,R);Ge!==re&&le(Ge)}),Ne(function(){if(!fv)return;let Ge="text";te>=0&&(Ge="decimal"),De(Ge)},[te,U]),h.useEffect(function(){const Ge=ie.current;if(X||f||!_||!Ge)return;function dt(rt){if(rt.ctrlKey||Bn(mt(ie.current))!==ie.current)return;rt.preventDefault();const Ve=We(rt)??gp;He(Ve,{direction:rt.deltaY>0?-1:1,event:rt,reason:"wheel"})}return ut(Ge,"wheel",dt)},[_,He,X,f,l,G,We]);const Ze=h.useMemo(()=>({...L,disabled:X,readOnly:f,required:c,value:xe,inputValue:re,scrubbing:ee}),[L,X,f,c,xe,re,ee]),nt=h.useMemo(()=>({inputRef:ie,inputValue:re,value:xe,minWithDefault:te,maxWithDefault:J,disabled:X,readOnly:f,id:Q,setValue:ze,incrementValue:He,getStepAmount:We,allowInputSyncRef:ce,formatOptionsRef:qe,valueRef:be,lastChangedValueRef:he,hasPendingCommitRef:Te,name:K,required:c,invalid:D,inputMode:Oe,getAllowedNonNumericKeys:Fe,min:o,max:i,setInputValue:le,locale:S,isScrubbing:ee,setIsScrubbing:Z,state:Ze,onValueCommitted:ke}),[ie,re,xe,te,J,X,f,Q,ze,He,We,qe,be,K,c,D,Oe,Fe,o,i,le,S,ee,Ze,ke]),ht=$e("div",t,{ref:n,state:Ze,props:I,stateAttributesMapping:Ha});return C.jsxs(zR.Provider,{value:nt,children:[ht,C.jsx("input",{...H.getInputValidationProps({onFocus(){ie.current?.focus()},onChange(Je){if(Je.nativeEvent.defaultPrevented)return;const Ge=Je.currentTarget.valueAsNumber,dt=Number.isNaN(Ge)?null:Ge,rt=je(vn,Je.nativeEvent);B(dt!==$.initialValue),ze(dt,rt),V()&&H.commit(dt)}}),ref:se,type:"number",form:m,name:K,value:xe??"",min:o,max:i,step:a,disabled:X,required:c,"aria-hidden":!0,tabIndex:-1,style:K?Yl:qs,suppressHydrationWarning:!0})]})});process.env.NODE_ENV!=="production"&&(XR.displayName="NumberFieldRoot");function qI(e,t,n){return n?.maximumFractionDigits!=null||n?.minimumFractionDigits!=null?Ns(e,t,n):L3(e,t,n)}const ZR=h.forwardRef(function(t,n){const{render:r,className:o,style:i,...s}=t,{state:a}=du();return $e("div",t,{ref:n,state:a,props:[{role:"group"},s],stateAttributesMapping:Ha})});process.env.NODE_ENV!=="production"&&(ZR.displayName="NumberFieldGroup");const BI=0;class JR extends gr{static create(){return new JR}start(t,n){this.clear(),this.currentId=setInterval(()=>{n()},t)}clear=()=>{this.currentId!==BI&&(clearInterval(this.currentId),this.currentId=BI)}}function Nge(){const e=fn(JR.create).current;return zl(e.disposeEffect),e}const Oge=60,Mge=400,Ige=8,Dge=50,Age=3;function kf(e){return e==="touch"||e==="pen"}function kge(e){const{disabled:t,readOnly:n=!1,tick:r,onStop:o,tickDelay:i=Oge,startDelay:s=Mge,scrollDistance:a=Ige,elementRef:l}=e,c=nn(),d=Nge(),f=nn(),m=h.useRef(!1),g=h.useRef(0),v=h.useRef({x:0,y:0}),b=h.useRef(!1),x=h.useRef(!1),y=h.useRef(""),_=h.useRef(()=>{}),w=Re(()=>{f.clear(),c.clear(),d.clear(),_.current(),g.current=0}),T=Re(P=>{w();const N=l.current;if(!N)return;const F=Ft(N);function W(I){I.preventDefault()}if(_.current=ut(F,"contextmenu",W),ut(F,"pointerup",I=>{m.current=!1,w(),o?.(I)},{once:!0}),!r(P)){w();return}c.start(s,()=>{d.start(i,()=>{r(P)||w()})})});h.useEffect(()=>()=>w(),[w]);const R={onTouchStart(){b.current=!0},onTouchEnd(){b.current=!1},onPointerDown(P){const N=!P.button||P.button===0;if(P.defaultPrevented||!N||t||n)return;y.current=P.pointerType,x.current=!1,m.current=!0,v.current={x:P.clientX,y:P.clientY},kf(P.pointerType)?f.start(Dge,()=>{const W=g.current;g.current=0,m.current&&W<Age?(T(P.nativeEvent),x.current=!0):(x.current=!1,w())}):(P.preventDefault(),T(P.nativeEvent))},onPointerUp(P){kf(P.pointerType)&&(m.current=!1)},onPointerMove(P){if(t||n||!kf(P.pointerType)||!m.current)return;g.current!=null&&(g.current+=1);const{x:N,y:F}=v.current,W=N-P.clientX,I=F-P.clientY;W**2+I**2>a**2&&w()},onMouseEnter(P){P.defaultPrevented||t||n||!m.current||b.current||kf(y.current)||T(P.nativeEvent)},onMouseLeave(){b.current||w()},onMouseUp(){b.current||w()}},S=Re(P=>P.defaultPrevented?!0:kf(y.current)?x.current:P.detail!==0);return{pointerHandlers:R,shouldSkipClick:S}}function $ge(e){return e==="touch"||e==="pen"}function Z3(e){const{allowInputSyncRef:t,disabled:n,formatOptionsRef:r,getStepAmount:o,id:i,incrementValue:s,inputRef:a,inputValue:l,isIncrement:c,locale:d,readOnly:f,setValue:m,valueRef:g,lastChangedValueRef:v,onValueCommitted:b}=e,x=c?bH:yH;function y(R){t.current=!0;const S=Kf(l,d,r.current);S!==null&&(g.current=S,m(S,je(x,R,void 0,{direction:c?1:-1})))}const{pointerHandlers:_,shouldSkipClick:w}=kge({disabled:n||f,elementRef:a,tickDelay:Ege,startDelay:wge,scrollDistance:Cge,tick(R){const S=o(R)??gp;return s(S,{direction:c?1:-1,event:R,reason:x})},onStop(R){const S=v.current??g.current;b(S,so(x,R))}});return{disabled:n,"aria-readonly":f||void 0,"aria-label":c?"Increase":"Decrease","aria-controls":i,tabIndex:-1,style:{WebkitUserSelect:"none",userSelect:"none"},..._,onClick(R){const S=n||f;if(R.defaultPrevented||S||w(R))return;y(R.nativeEvent);const P=o(R)??gp,N=g.current;s(P,{direction:c?1:-1,event:R.nativeEvent,reason:x});const F=v.current??g.current;F!==N&&b(F,so(x,R.nativeEvent))},onPointerDown(R){const S=!R.button||R.button===0;R.defaultPrevented||f||!S||n||(y(R.nativeEvent),$ge(R.pointerType)||a.current?.focus(),_.onPointerDown(R))}}}const QR=h.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:s=!0,style:a,...l}=t,{allowInputSyncRef:c,disabled:d,formatOptionsRef:f,getStepAmount:m,id:g,incrementValue:v,inputRef:b,inputValue:x,locale:y,maxWithDefault:_,readOnly:w,setValue:T,state:R,value:S,valueRef:P,lastChangedValueRef:N,onValueCommitted:F}=du(),W=S!=null&&S>=_,I=i||d||W,B=Z3({isIncrement:!0,inputRef:b,inputValue:x,disabled:I,readOnly:w,id:g,setValue:T,getStepAmount:m,incrementValue:v,allowInputSyncRef:c,formatOptionsRef:f,valueRef:P,locale:y,lastChangedValueRef:N,onValueCommitted:F}),{getButtonProps:$,buttonRef:k}=Yn({disabled:I,native:s,focusableWhenDisabled:!0}),j=h.useMemo(()=>({...R,disabled:I}),[R,I]);return $e("button",t,{ref:[n,k],state:j,props:[B,l,$],stateAttributesMapping:Ha})});process.env.NODE_ENV!=="production"&&(QR.displayName="NumberFieldIncrement");const eS=h.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:s=!0,style:a,...l}=t,{allowInputSyncRef:c,disabled:d,formatOptionsRef:f,getStepAmount:m,id:g,incrementValue:v,inputRef:b,inputValue:x,minWithDefault:y,readOnly:_,setValue:w,state:T,value:R,valueRef:S,locale:P,lastChangedValueRef:N,onValueCommitted:F}=du(),W=R!=null&&R<=y,I=i||d||W,B=Z3({isIncrement:!1,inputRef:b,inputValue:x,disabled:I,readOnly:_,id:g,setValue:w,getStepAmount:m,incrementValue:v,allowInputSyncRef:c,formatOptionsRef:f,valueRef:S,locale:P,lastChangedValueRef:N,onValueCommitted:F}),{getButtonProps:$,buttonRef:k}=Yn({disabled:I,native:s,focusableWhenDisabled:!0}),j=h.useMemo(()=>({...T,disabled:I}),[T,I]);return $e("button",t,{ref:[n,k],state:j,props:[B,l,$],stateAttributesMapping:Ha})});process.env.NODE_ENV!=="production"&&(eS.displayName="NumberFieldDecrement");const Fge={...ar,...Ha},Lge=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","Escape"]),tS=h.forwardRef(function(t,n){const{render:r,className:o,style:i,...s}=t,{allowInputSyncRef:a,disabled:l,formatOptionsRef:c,getAllowedNonNumericKeys:d,getStepAmount:f,id:m,incrementValue:g,inputMode:v,inputValue:b,max:x,min:y,name:_,readOnly:w,required:T,setValue:R,state:S,setInputValue:P,locale:N,inputRef:F,value:W,onValueCommitted:I,lastChangedValueRef:B,hasPendingCommitRef:$,valueRef:k}=du(),{clearErrors:j}=fi(),{validationMode:D,setTouched:A,setFocused:L,invalid:H,shouldValidateOnChange:V,validation:X}=Sn(),{labelId:K}=yr(),G=h.useRef(!1),ee=h.useRef(!1);return qa(F,{id:m,value:W}),No(W,J=>{const ne=V();if(j(_),ne&&X.commit(W),!(J===W||ne)){if(ee.current){ee.current=!1;return}X.commit(W,!0)}}),$e("input",t,{ref:[n,F],state:S,props:[{id:m,required:T,disabled:l,readOnly:w,inputMode:v,value:b,type:"text",autoComplete:"off",autoCorrect:"off",spellCheck:"false","aria-roledescription":"Number field","aria-invalid":H||void 0,"aria-labelledby":K,suppressHydrationWarning:!0,onFocus(J){if(J.defaultPrevented||w||l||(L(!0),G.current))return;G.current=!0;const ne=J.currentTarget,U=ne.value.length;ne.setSelectionRange(U,U)},onBlur(J){if(J.defaultPrevented||w||l)return;A(!0),L(!1);const ne=!a.current,U=$.current;if(a.current=!0,b.trim()===""){R(null,je(Br,J.nativeEvent)),D==="onBlur"&&X.commit(null),I(null,so(Br,J.nativeEvent));return}const ie=c.current,se=Kf(b,N,ie);if(se===null)return;const Q=ie?.maximumFractionDigits!=null||ie?.minimumFractionDigits!=null,me=ie?.maximumFractionDigits,ve=Q&&typeof me=="number"?Number(se.toFixed(me)):se,xe=so(xg,J.nativeEvent),be=W!==ve,Ce=ne||be||U;D==="onBlur"&&X.commit(ve),be&&(ee.current=!0,R(ve,je(xg,J.nativeEvent))),Ce&&I(ve,xe);const qe=Ns(ve,N,ie);!(!Q&&se===W&&b===L3(se,N,ie))&&b!==qe&&P(qe)},onChange(J){if(J.nativeEvent.defaultPrevented)return;a.current=!1;const ne=J.currentTarget.value;if(ne.trim()===""){P(ne),R(null,je(Br,J.nativeEvent));return}const U=d();if(!Array.from(ne).every(Q=>{const me=Q>="0"&&Q<="9",ve=_E.test(Q),xe=NE.test(Q),be=K3.test(Q),Ce=LI.test(Q),qe=Af.test(Q);return me||ve||xe||be||Ce||qe||U.has(Q)}))return;const se=Kf(ne,N,c.current);P(ne),se!==null&&R(se,je(Li,J.nativeEvent))},onKeyDown(J){if(J.defaultPrevented||w||l)return;const ne=J.nativeEvent;a.current=!0;const U=d();let ie=U.has(J.key);const{decimal:se,currency:Q,percentSign:me}=YR(N,c.current),ve=J.currentTarget.selectionStart,xe=J.currentTarget.selectionEnd,be=ve===0&&xe===b.length,Ce=De=>ve!=null&&xe!=null&&De>=ve&&De<xe;if(Af.test(J.key)&&Array.from(U).some(De=>Af.test(De||""))){const De=b.search(Y3),Fe=De!=null&&De!==-1&&Ce(De);ie=!(Af.test(b)||Gh.test(b))||be||Fe}if(Gh.test(J.key)&&Array.from(U).some(De=>Gh.test(De||""))){const De=b.search(X3),Fe=De!=null&&De!==-1&&Ce(De);ie=!(Af.test(b)||Gh.test(b))||be||Fe}[se,Q,me].forEach(De=>{if(J.key===De){const Fe=b.indexOf(De),We=Ce(Fe);ie=!b.includes(De)||be||We}});const qe=J.key>="0"&&J.key<="9",Te=_E.test(J.key),ke=NE.test(J.key),ce=LI.test(J.key),he=Lge.has(J.key);if(J.which===229||J.altKey||J.ctrlKey||J.metaKey||ie||qe||Te||ce||ke||he)return;const re=Kf(b,N,c.current),le=f(J)??gp;gn(J);const Oe=so(Vu,ne);J.key==="ArrowUp"?(g(le,{direction:1,currentValue:re,event:ne,reason:Vu}),I(B.current??k.current,Oe)):J.key==="ArrowDown"?(g(le,{direction:-1,currentValue:re,event:ne,reason:Vu}),I(B.current??k.current,Oe)):J.key==="Home"&&y!=null?(R(y,je(Vu,ne)),I(B.current??k.current,Oe)):J.key==="End"&&x!=null&&(R(x,je(Vu,ne)),I(B.current??k.current,Oe))},onPaste(J){if(J.defaultPrevented||w||l)return;J.preventDefault();const U=(J.clipboardData||window.Clipboard).getData("text/plain"),ie=Kf(U,N,c.current);ie!==null&&(a.current=!1,R(ie,je(kx,J.nativeEvent)),P(U))}},X.getValidationProps(),s],stateAttributesMapping:Fge})});process.env.NODE_ENV!=="production"&&(tS.displayName="NumberFieldInput");const nS=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(nS.displayName="NumberFieldScrubAreaContext");function jge(){const e=h.useContext(nS);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: NumberFieldScrubAreaContext is missing. NumberFieldScrubArea parts must be placed within <NumberField.ScrubArea>.":gt(44));return e}function qge(e,t){const n=Ft(t),r=t.getBoundingClientRect();if(r&&e!=null)return{x:r.left-e/2,y:r.top-e/2,width:r.right+e/2,height:r.bottom+e/2};const o=n.visualViewport;return o?{x:o.offsetLeft,y:o.offsetTop,width:o.offsetLeft+o.width,height:o.offsetTop+o.height}:{x:0,y:0,width:n.document.documentElement.clientWidth,height:n.document.documentElement.clientHeight}}function Bge(e,t){const n=Ft(e).visualViewport;if(!n)return()=>{};function r(){n&&(t.current=n.scale)}return r(),ut(n,"resize",r)}const rS=h.forwardRef(function(t,n){const{render:r,className:o,direction:i="horizontal",pixelSensitivity:s=2,teleportDistance:a,style:l,...c}=t,{state:d,setIsScrubbing:f,disabled:m,readOnly:g,inputRef:v,incrementValue:b,getStepAmount:x,onValueCommitted:y,lastChangedValueRef:_,valueRef:w}=du(),T=h.useRef(null),R=h.useRef(!1),S=h.useRef(!1),P=h.useRef(null),N=h.useRef(null),F=h.useRef({x:0,y:0}),W=h.useRef(1),I=nn(),[B,$]=h.useState(!1),[k,j]=h.useState(!1),[D,A]=h.useState(!1);h.useEffect(()=>{if(!(!D||!N.current))return Bge(N.current,W)},[D]);function L(ee,Z){N.current&&(N.current.style.transform=`translate3d(${ee}px,${Z}px,0) scale(${1/W.current})`)}const H=Re(({movementX:ee,movementY:Z})=>{const te=N.current,J=T.current;if(!te||!J)return;const ne=qge(a,J),U=F.current,ie={x:Math.round(U.x+ee),y:Math.round(U.y+Z)},se=te.offsetWidth,Q=te.offsetHeight;ie.x+se/2<ne.x?ie.x=ne.width-se/2:ie.x+se/2>ne.width&&(ie.x=ne.x-se/2),ie.y+Q/2<ne.y?ie.y=ne.height-Q/2:ie.y+Q/2>ne.height&&(ie.y=ne.y-Q/2),F.current=ie,L(ie.x,ie.y)}),V=Re((ee,{clientX:Z,clientY:te})=>{Rn.flushSync(()=>{A(ee),f(ee)});const J=N.current;if(!J||!ee)return;const ne={x:Z-J.offsetWidth/2,y:te-J.offsetHeight/2};F.current=ne,L(ne.x,ne.y)});h.useEffect(function(){if(!v.current||m||g||!D)return;let Z=0;function te(ie){function se(){try{mt(T.current).exitPointerLock()}catch{}finally{R.current=!1,V(!1,ie),y(_.current??w.current,so(eT,ie)),!S.current&&P.current!=null&&P.current.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),S.current=!1,P.current=null}}Ax?I.start(20,se):se()}function J(ie){if(!R.current)return;ie.preventDefault(),H(ie);const{movementX:se,movementY:Q}=ie;if(Z+=i==="vertical"?Q:se,Math.abs(Z)>=s){Z=0,S.current=!0;const me=i==="vertical"?-Q:se,ve=x(ie)??gp,xe=me*ve;xe!==0&&b(Math.abs(xe),{direction:xe>=0?1:-1,event:ie,reason:eT})}}const ne=Ft(v.current),U=po(ut(ne,"pointerup",te,!0),ut(ne,"pointermove",J,!0));return()=>{I.clear(),U()}},[m,g,b,D,x,v,V,H,i,s,_,y,w,I]),h.useEffect(function(){const Z=T.current;if(!Z||m||g)return;function te(J){J.touches.length===1&&J.preventDefault()}return ut(Z,"touchstart",te)},[m,g]);const K=$e("span",t,{ref:[n,T],state:d,props:[{role:"presentation",style:{touchAction:"none",WebkitUserSelect:"none",userSelect:"none"},async onPointerDown(ee){const Z=!ee.button||ee.button===0;if(ee.defaultPrevented||g||!Z||m)return;const te=ee.pointerType==="touch";if($(te),ee.pointerType==="mouse"&&(ee.preventDefault(),v.current?.focus()),R.current=!0,S.current=!1,P.current=Ht(ee.nativeEvent),V(!0,ee.nativeEvent),!te&&!Ul)try{await mt(T.current).body.requestPointerLock(),j(!1)}catch{j(!0)}finally{R.current&&Rn.flushSync(()=>{V(!0,ee.nativeEvent)})}}},c],stateAttributesMapping:Ha}),G=h.useMemo(()=>({isScrubbing:D,isTouchInput:B,isPointerLockDenied:k,scrubAreaCursorRef:N,scrubAreaRef:T,direction:i,pixelSensitivity:s,teleportDistance:a}),[D,B,k,i,s,a]);return C.jsx(nS.Provider,{value:G,children:K})});process.env.NODE_ENV!=="production"&&(rS.displayName="NumberFieldScrubArea");const oS=h.forwardRef(function(t,n){const{render:r,className:o,style:i,...s}=t,{state:a}=du(),{isScrubbing:l,isTouchInput:c,isPointerLockDenied:d,scrubAreaCursorRef:f}=jge(),[m,g]=h.useState(null),b=$e("span",t,{enabled:l&&!Ul&&!c&&!d,ref:[n,f,g],state:a,props:[{role:"presentation",style:{position:"fixed",top:0,left:0,pointerEvents:"none"}},s],stateAttributesMapping:Ha});return b&&Rn.createPortal(b,mt(m).body)});process.env.NODE_ENV!=="production"&&(oS.displayName="NumberFieldScrubAreaCursor");const Vge=Object.freeze(Object.defineProperty({__proto__:null,Decrement:eS,Group:ZR,Increment:QR,Input:tS,Root:XR,ScrubArea:rS,ScrubAreaCursor:oS},Symbol.toStringTag,{value:"Module"}));function J3({className:e,...t}){return C.jsx(XR,{className:ue("w-full",e),"data-slot":"number-input",...t})}function Q3({className:e,...t}){return C.jsx(ZR,{className:ue("flex h-10 w-full items-center overflow-hidden rounded-md bg-background text-sm transition-shadow","outline outline-1 outline-input [outline-offset:-1px]","focus-within:outline-ring","aria-invalid:outline-error focus-within:aria-invalid:ring-error/20","has-aria-invalid:outline-error focus-within:has-aria-invalid:ring-error/20","data-[invalid]:outline-error focus-within:data-[invalid]:ring-error/20","data-disabled:cursor-not-allowed data-disabled:opacity-50 data-disabled:pointer-events-none","[&_svg]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),"data-slot":"number-input-group",...t})}function ej({className:e,...t}){return C.jsx(tS,{className:ue("min-w-0 flex-1 bg-transparent px-3 py-2 text-left tabular-nums outline-none","placeholder:text-muted-foreground",e),"data-slot":"number-input-input",...t})}function tj({className:e,children:t,...n}){return C.jsx(eS,{className:ue("flex shrink-0 cursor-pointer items-center justify-center border-r border-input px-2 py-2 text-muted-foreground transition-colors","hover:bg-accent hover:text-foreground","disabled:pointer-events-none disabled:opacity-50",e),"data-slot":"number-input-decrement",...n,children:t??C.jsx(hY,{})})}function nj({className:e,children:t,...n}){return C.jsx(QR,{className:ue("flex shrink-0 cursor-pointer items-center justify-center border-l border-input px-2 py-2 text-muted-foreground transition-colors","hover:bg-accent hover:text-foreground","disabled:pointer-events-none disabled:opacity-50",e),"data-slot":"number-input-increment",...n,children:t??C.jsx(vY,{})})}function Wge({className:e,...t}){return C.jsx(rS,{className:ue("inline-flex cursor-ew-resize items-center",e),"data-slot":"number-input-scrub-area",...t})}function Hge({className:e,...t}){return C.jsx(oS,{className:ue("drop-shadow-[0_1px_1px_#0008] filter",e),...t})}function Kge(e){return C.jsx("svg",{"aria-hidden":"true",fill:"black",height:"14",stroke:"white",viewBox:"0 0 24 14",width:"26",xmlns:"http://www.w3.org/2000/svg",...e,children:C.jsx("path",{d:"M19.5 5.5L6.49737 5.51844V2L1 6.9999L6.5 12L6.49737 8.5L19.5 8.5V12L25 6.9999L19.5 2V5.5Z"})})}function Uge({className:e,hideControls:t=!1,onChange:n,onValueChange:r,invalid:o,placeholder:i,groupProps:s,inputProps:a,decrementProps:l,incrementProps:c,...d}){return C.jsx(J3,{onValueChange:(f,m)=>{n?.(f),r?.(f,m)},...d,children:C.jsxs(Q3,{"aria-invalid":o||void 0,...s,className:ue(e,s?.className),children:[C.jsx(ej,{...o?{"aria-invalid":!0}:{},placeholder:i,...a,className:ue("self-stretch",a?.className)}),!t&&C.jsxs("div",{className:"flex flex-col self-stretch divide-y divide-input border-l border-input",children:[C.jsx(nj,{"data-testid":"increment-trigger",...c,className:ue("flex-1 border-l-0 py-0 [&_svg]:size-3",c?.className),children:c?.children??C.jsx(wk,{})}),C.jsx(tj,{"data-testid":"decrement-trigger",...l,className:ue("flex-1 border-r-0 py-0 [&_svg]:size-3",l?.className),children:l?.children??C.jsx(Ek,{})})]})]})})}const yl=({isActive:e=!1,...t})=>C.jsx("button",{...t,"data-slot":"pagination-option","data-active":e,"data-dots":t.children===Ss,className:ue("transition-colors border py-2 px-4 w-[50px] h-full data-[active=false]:hover:bg-accent","data-[active=true]:bg-primary data-[active=true]:text-primary-foreground data-[active=true]:border-transparent data-[active=true]:hover:bg-primary/90",t.className)}),zge=({optionProps:e,className:t,containerProps:n,...r})=>{const{paginationRange:o,currentPage:i,goTo:s,maxPage:a,next:l,prev:c,isLastPage:d,isFirstPage:f}=h3(r);return C.jsxs("div",{...n,className:ue("flex items-end select-none h-10",n?.className,t),"data-slot":"pagination",children:[C.jsxs(yl,{...e,disabled:f,onClick:()=>s(1),className:ue("rounded-l-md",e?.className),children:[C.jsx(GG,{"data-slot":"pagination-option-icon"}),C.jsx("span",{className:"sr-only",children:"Ir a primera página"})]}),C.jsxs(yl,{...e,onClick:c,disabled:f,children:[C.jsx(Ow,{"data-slot":"pagination-option-icon"}),C.jsx("span",{className:"sr-only",children:"Ir a página anterior"})]}),o.map(m=>C.jsx(C.Fragment,{children:m===Ss?C.jsx(yl,{className:ue("pointer-events-none",e?.className),children:Ss},m):M.createElement(yl,{...e,isActive:m===i,onClick:()=>s(m),key:m},m,C.jsxs("span",{className:"sr-only",children:["Ir a la página ",m]}))})),C.jsxs(yl,{...e,onClick:l,disabled:d,children:[C.jsx(Lp,{"data-slot":"pagination-option-icon"}),C.jsx("span",{className:"sr-only",children:"Ir a próxima página"})]}),C.jsxs(yl,{...e,disabled:d,onClick:()=>s(a),className:ue("rounded-r-md",e?.className),children:[C.jsx(XG,{"data-slot":"pagination-option-icon"}),C.jsx("span",{className:"sr-only",children:"Ir a última página"})]})]})};function rj({className:e,showIcon:t=C.jsx(uY,{className:"h-4 w-4"}),hideIcon:n=C.jsx(aY,{className:"h-4 w-4"}),onShow:r,onHide:o,toggleable:i=!0,onChange:s,...a}){const[l,c]=g3(!1),d=()=>{c(),l?o?.():r?.()},f=s?m=>s(m.target.value,m):void 0;return C.jsxs("div",{className:ue("relative inline-flex w-full","has-disabled:cursor-not-allowed has-disabled:opacity-50",e),"data-slot":"password",children:[C.jsx(Fv,{...a,onChange:f,type:l?"text":"password",className:ue("h-10 w-full min-w-0 rounded-md border border-input bg-background","pl-3 pr-10 text-sm outline-none transition-shadow placeholder:text-muted-foreground","focus-visible:border-ring","aria-invalid:border-error focus-visible:aria-invalid:ring-error/20","disabled:cursor-not-allowed","[&::-ms-clear]:hidden [&::-ms-reveal]:hidden")}),C.jsx("button",{"data-slot":"password-toggle",type:"button",onClick:d,disabled:!i,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",children:l?n:t})]})}const iS=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(iS.displayName="ProgressRootContext");function Gv(){const e=h.useContext(iS);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.":gt(51));return e}let Ex=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const lm={status(e){return e==="progressing"?{[Ex.progressing]:""}:e==="complete"?{[Ex.complete]:""}:e==="indeterminate"?{[Ex.indeterminate]:""}:null}};function Gge(e,t){return t==null?"indeterminate progress":e||`${t}%`}const oj=h.forwardRef(function(t,n){const{format:r,getAriaValueText:o=Gge,locale:i,max:s=100,min:a=0,value:l,render:c,className:d,children:f,style:m,...g}=t,[v,b]=h.useState(),x=dn(r);let y="indeterminate";Number.isFinite(l)&&(y=l===s?"complete":"progressing");const _=sge(l,i,x.current),w=h.useMemo(()=>({status:y}),[y]),T={"aria-labelledby":v,"aria-valuemax":s,"aria-valuemin":a,"aria-valuenow":l??void 0,"aria-valuetext":o(_,l),role:"progressbar",children:C.jsxs(h.Fragment,{children:[f,C.jsx("span",{role:"presentation",style:qs,children:"x"})]})},R=h.useMemo(()=>({formattedValue:_,max:s,min:a,setLabelId:b,state:w,status:y,value:l}),[_,s,a,b,w,y,l]),S=$e("div",t,{state:w,ref:n,props:[T,g],stateAttributesMapping:lm});return C.jsx(iS.Provider,{value:R,children:S})});process.env.NODE_ENV!=="production"&&(oj.displayName="ProgressRoot");const ij=h.forwardRef(function(t,n){const{render:r,className:o,style:i,...s}=t,{state:a}=Gv();return $e("div",t,{state:a,ref:n,props:s,stateAttributesMapping:lm})});process.env.NODE_ENV!=="production"&&(ij.displayName="ProgressTrack");function Yge(e,t,n){return(e-t)*100/(n-t)}const sj=h.forwardRef(function(t,n){const{render:r,className:o,style:i,...s}=t,{max:a,min:l,value:c,state:d}=Gv(),f=Number.isFinite(c)&&c!==null?Yge(c,l,a):null,m=h.useCallback(()=>f==null?{}:{insetInlineStart:0,height:"inherit",width:`${f}%`},[f]);return $e("div",t,{state:d,ref:n,props:[{style:m()},s],stateAttributesMapping:lm})});process.env.NODE_ENV!=="production"&&(sj.displayName="ProgressIndicator");const aj=h.forwardRef(function(t,n){const{className:r,render:o,children:i,style:s,...a}=t,{value:l,formattedValue:c,state:d}=Gv(),f=l==null?"indeterminate":c,m=l==null?null:c;return $e("span",t,{state:d,ref:n,props:[{"aria-hidden":!0,children:typeof i=="function"?i(f,l):m},a],stateAttributesMapping:lm})});process.env.NODE_ENV!=="production"&&(aj.displayName="ProgressValue");const lj=h.forwardRef(function(t,n){const{render:r,className:o,style:i,id:s,...a}=t,{setLabelId:l,state:c}=Gv(),d=JF(s,l);return $e("span",t,{state:c,ref:n,props:[{id:d,role:"presentation"},a],stateAttributesMapping:lm})});process.env.NODE_ENV!=="production"&&(lj.displayName="ProgressLabel");const Xge=Hs("block w-full overflow-hidden rounded-full bg-input",{variants:{size:{sm:"h-1",md:"h-1.5",lg:"h-2.5"}},defaultVariants:{size:"md"}}),Zge=Hs("transition-all duration-500",{variants:{variant:{default:"bg-primary",success:"bg-success",error:"bg-error",warning:"bg-warning",info:"bg-info"}},defaultVariants:{variant:"default"}});function uj({className:e,...t}){return C.jsx(oj,{className:ue("flex w-full flex-col gap-2",e),"data-slot":"progress",...t})}function Jge({className:e,...t}){return C.jsx(lj,{className:ue("font-medium text-sm",e),"data-slot":"progress-label",...t})}function cj({className:e,size:t,...n}){return C.jsx(ij,{className:ue(Xge({size:t}),e),"data-slot":"progress-track",...n})}function dj({className:e,variant:t,...n}){return C.jsx(sj,{className:ue(Zge({variant:t}),e),"data-slot":"progress-indicator",...n})}function Qge({className:e,...t}){return C.jsx(aj,{className:ue("text-sm tabular-nums",e),"data-slot":"progress-value",...t})}function eve({size:e,variant:t,className:n,trackProps:r,indicatorProps:o,...i}){return C.jsx(uj,{className:n,...i,children:C.jsx(cj,{size:e,...r,children:C.jsx(dj,{variant:t,...o})})})}const tve=({when:e,...t})=>C.jsx(uu,{present:e,children:C.jsx(Nw,{...t,"data-state":e?"open":"closed","data-slot":"show"})});function nve({className:e,...t}){return C.jsx("div",{className:ue("animate-skeleton rounded-sm [--skeleton-highlight:--alpha(var(--color-white)/64%)] [background:linear-gradient(120deg,transparent_40%,var(--skeleton-highlight),transparent_60%)_var(--color-muted)_0_0/200%_100%_fixed] dark:[--skeleton-highlight:--alpha(var(--color-white)/4%)]",e),"data-slot":"skeleton",...t})}const rve=({as:e="div",inline:t=!1,direction:n="horizontal",reverse:r=!1,justify:o,align:i,gap:s=8,wrap:a,grow:l=!1,className:c,style:d,...f})=>{const m=`${n==="vertical"?"column":"row"}${r?"-reverse":""}`;return C.jsx(e,{className:ue(t?"inline-flex":"flex",l&&"flex-1",c),style:{flexDirection:m,justifyContent:o,alignItems:i,gap:s,flexWrap:a,...d},"data-slot":"stack",...f})},[fj,ove]=Yw();function ive({items:e=[],current:t,onChange:n,className:r,classNameList:o,classNameItem:i,classNameButton:s,classNameIndicator:a,classNameContent:l}){return C.jsxs(pj,{className:r,current:t,onChange:n,children:[C.jsx(mj,{className:o,children:e?.map((c,d)=>C.jsx(hj,{value:d,title:c?.title,indicator:c?.indicator,classNameItem:i,classNameButton:s,classNameIndicator:a},d))}),e?.map((c,d)=>C.jsx(gj,{className:l,value:d,children:c?.content},d))]})}function pj({current:e,onChange:t,className:n,...r}){const[o=0,i]=vr({prop:e,onChange:t,defaultProp:0});return C.jsx(ove,{value:{activeStep:o,setActiveStep:i},children:C.jsx("div",{"data-slot":"stepper",className:ue("flex flex-col items-center w-full transition-all ease-in delay-150",n),...r})})}function mj({children:e,className:t,...n}){return C.jsx("ul",{"data-slot":"stepper-list",className:ue("flex flex-col sm:flex-row sm:gap-0 gap-4 items-center w-full text-xs font-medium text-gray-900 sm:text-base mb-8",t),...n,children:e})}function hj({disabled:e,value:t,title:n,indicator:r,classNameItem:o,classNameButton:i,classNameIndicator:s}){const{activeStep:a,setActiveStep:l}=fj();return C.jsx("li",{"data-slot":"stepper-trigger",className:ue("flex relative text-primary transition-all ease-in delay-150","last:w-full last:sm:w-auto last:after:hidden",`w-full after:content-[''] sm:after:w-full after:h-full after:w-0.5 sm:after:h-0.5 ${a>t?"after:bg-primary":"after:bg-gray-300"} after:inline-block after:absolute after:top-5 sm:after:top-5 after:left-4 sm:after:left-10`,o),children:C.jsxs("button",{onClick:()=>!e&&l(t),className:ue("z-10 flex items-center justify-center sm:flex-col gap-3 flex-row whitespace-nowrap cursor-pointer group transition-color ease-in delay-150",a>=t?"text-primary":"text-gray-500",e&&"cursor-not-allowed",i),children:[C.jsx("span",{"data-slot":"stepper-trigger-indicator",className:ue("flex items-center transition-all overflow-hidden ease-in justify-center group-hover:scale-105 sm:w-10 sm:h-10 mx-auto text-sm border-2 rounded-full w-8 h-8",a>t&&"bg-primary border-primary text-primary-foreground",a===t&&"bg-gray-100 text-primary border-primary",a<t&&"bg-white text-gray-500 border-input",e&&"text-gray-300",s),children:a>t?"✓":r||t+1}),n]})})}function gj({value:e,className:t="w-full",...n}){const{activeStep:r}=fj();return r===e?C.jsx("div",{"data-slot":"stepper-content",className:t,...n}):null}const sS=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(sS.displayName="SwitchRootContext");function sve(){const e=h.useContext(sS);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SwitchRootContext is missing. Switch parts must be placed within <Switch.Root>.":gt(63));return e}let VI=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const vj={...ar,checked(e){return e?{[VI.checked]:""}:{[VI.unchecked]:""}}},bj=h.forwardRef(function(t,n){const{checked:r,className:o,defaultChecked:i,"aria-labelledby":s,form:a,id:l,inputRef:c,name:d,nativeButton:f=!1,onCheckedChange:m,readOnly:g=!1,required:v=!1,disabled:b=!1,render:x,uncheckedValue:y,value:_,style:w,...T}=t,{clearErrors:R}=fi(),{state:S,setTouched:P,setDirty:N,validityData:F,setFilled:W,setFocused:I,shouldValidateOnChange:B,validationMode:$,disabled:k,name:j,validation:D}=Sn(),{labelId:A}=yr(),L=k||b,H=j??d,V=Re(m),X=h.useRef(null),K=Io(X,c,D.inputRef),G=h.useRef(null),ee=bn(),Z=Ba({id:l,implicit:!1,controlRef:G}),te=f?void 0:Z,[J,ne]=oi({controlled:r,default:!!i,name:"Switch",state:"checked"});qa(G,{id:ee,value:J}),Ne(()=>{X.current&&W(X.current.checked)},[X,W]),No(J,()=>{R(H),N(J!==F.initialValue),W(J),B()?D.commit(J):D.commit(J,!0)});const{getButtonProps:U,buttonRef:ie}=Yn({disabled:L,native:f}),se=SL(s,A,X,!f,te),Q={id:f?Z:ee,role:"switch","aria-checked":J,"aria-readonly":g||void 0,"aria-required":v||void 0,"aria-labelledby":se,onFocus(){L||I(!0)},onBlur(){const be=X.current;!be||L||(P(!0),I(!1),$==="onBlur"&&D.commit(be.checked))},onClick(be){g||L||(be.preventDefault(),X.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:be.shiftKey,ctrlKey:be.ctrlKey,altKey:be.altKey,metaKey:be.metaKey})))}},me=h.useMemo(()=>Kr({checked:J,disabled:L,form:a,id:te,name:H,required:v,style:H?Yl:qs,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:K,onChange(be){if(be.nativeEvent.defaultPrevented)return;if(g){be.preventDefault();return}const Ce=be.currentTarget.checked,qe=je(vn,be.nativeEvent);V?.(Ce,qe),!qe.isCanceled&&ne(Ce)},onFocus(){G.current?.focus()}},D.getInputValidationProps,_!==void 0?{value:_}:rn),[J,L,a,K,te,H,V,g,v,ne,D,_]),ve=h.useMemo(()=>({...S,checked:J,disabled:L,readOnly:g,required:v}),[S,J,L,g,v]),xe=$e("span",t,{state:ve,ref:[n,G,ie],props:[Q,D.getValidationProps,T,U],stateAttributesMapping:vj});return C.jsxs(sS.Provider,{value:ve,children:[xe,!J&&H&&y!==void 0&&C.jsx("input",{type:"hidden",form:a,name:H,value:y}),C.jsx("input",{...me,suppressHydrationWarning:!0})]})});process.env.NODE_ENV!=="production"&&(bj.displayName="SwitchRoot");const yj=h.forwardRef(function(t,n){const{render:r,className:o,style:i,...s}=t,{state:a}=Sn(),l=sve(),c={...a,...l};return $e("span",t,{state:c,ref:n,stateAttributesMapping:vj,props:s})});process.env.NODE_ENV!=="production"&&(yj.displayName="SwitchThumb");function xj({className:e,...t}){return C.jsx(bj,{className:ue("peer inline-flex h-[calc(var(--thumb-size)+2px)] w-[calc(var(--thumb-size)*2-2px)] shrink-0 items-center rounded-full p-px outline-none transition-[background-color,box-shadow] duration-200","[--thumb-size:--spacing(5)] sm:[--thumb-size:--spacing(4)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background","data-checked:bg-primary data-unchecked:bg-input","data-disabled:cursor-not-allowed data-disabled:opacity-64",e),"data-slot":"switch",...t})}function Ej({className:e,...t}){return C.jsx(yj,{className:ue("pointer-events-none block aspect-square h-full rounded-(--thumb-size) bg-background shadow-sm/5 will-change-transform","origin-left [transition:translate_.15s,border-radius_.15s,scale_.1s_.1s,transform-origin_.15s]","data-checked:origin-[var(--thumb-size)_50%] data-checked:translate-x-[calc(var(--thumb-size)-4px)]","in-[[role=switch]:active,[data-slot=label]:active,[data-slot=field-label]:active]:not-data-disabled:scale-x-110","in-[[role=switch]:active,[data-slot=label]:active,[data-slot=field-label]:active]:rounded-[var(--thumb-size)/calc(var(--thumb-size)*1.1)]",e),"data-slot":"switch-thumb",...t})}function ave({children:e,label:t,className:n,id:r,thumbProps:o,controlFirst:i=!0,tooltip:s,...a}){const l=M.useId(),c=r??l,d=t??e;return C.jsxs("div",{className:ue("flex select-none items-center gap-x-2",!i&&"flex-row-reverse justify-end"),children:[C.jsx(xj,{id:c,className:n,...a,children:C.jsx(Ej,{...o})}),d&&C.jsx(Xp,{htmlFor:c,tooltip:s,children:d})]})}const wj=({className:e,containerClassName:t,containerProps:n,...r})=>C.jsx("div",{"data-slot":"table-container",className:ue("relative w-full overflow-auto rounded-md border",t),...n,children:C.jsx("table",{"data-slot":"table",className:ue("w-full caption-bottom text-sm",e),...r})}),Cj=({className:e,...t})=>C.jsx("thead",{"data-slot":"table-header",className:ue("[&_tr]:border-b",e),...t}),Rj=({className:e,...t})=>C.jsx("tbody",{"data-slot":"table-body",className:ue("[&_tr:last-child]:border-0",e),...t}),lve=({className:e,...t})=>C.jsx("tfoot",{"data-slot":"table-footer",className:ue("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}),OE=({className:e,...t})=>C.jsx("tr",{"data-slot":"table-row",className:ue("border-b transition-colors hover:bg-muted data-[selected=true]:bg-muted",e),...t}),Sj=({className:e,...t})=>C.jsx("th",{"data-slot":"table-head",className:ue("h-12 px-4 text-left align-middle font-medium text-muted-foreground sticky top-0 bg-background [&:has([role=checkbox])]:pr-0",e),...t}),Pj=({className:e,...t})=>C.jsx("td",{"data-slot":"table-cell",className:ue("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}),uve=({className:e,...t})=>C.jsx("caption",{"data-slot":"table-caption",className:ue("mt-4 text-sm text-muted-foreground",e),...t}),cve=({data:e=[],columns:t=[],onRowClick:n,onDoubleClick:r,selected:o,theadClassName:i,theadProps:s,tbodyClassName:a,tbodyProps:l,trClassName:c,trProps:d,thClassName:f,thProps:m,tdClassName:g,tdProps:v,...b})=>C.jsxs(wj,{...b,className:ue(b?.className),children:[C.jsx(Cj,{...s,className:ue(s?.className,i),children:C.jsx(OE,{...d,className:ue(d?.className,c),children:t.map((x,y)=>C.jsx(Sj,{...m,className:ue(m?.className,f),style:{width:x.width},children:uo.isFunction(x.header)?x.header?.():x.header},y))})}),C.jsx(Rj,{...l,className:ue(l?.className,a),children:e.map((x,y)=>C.jsx(OE,{...d,"data-selected":o?.(x),className:ue(d?.className,c),children:t.map((_,w)=>C.jsx(Pj,{...v,onClick:T=>{v?.onClick?.(T),n?.(x)},onDoubleClick:()=>r?.(x),className:ue(v?.className,g),children:_.cell?.(x,w)||x[_.key]},w))},y))})]}),hg=[10,25,50],dve=({containerClassName:e,containerProps:t,selectClassName:n,selectProps:r,sizes:o=hg,...i})=>{const[s=hg[0],a]=vr({onChange:i?.setPageSize,prop:i?.pageSize,defaultProp:hg[0]}),{range:l,next:c,prev:d,isFirstPage:f,isLastPage:m,goTo:g}=DR({...i,pageSize:s}),v=b=>{const{value:x}=b.target,y=Number(x);a(y),g(1)};return C.jsxs("div",{"data-slot":"table-pagination",...t,className:ue("flex justify-center items-center gap-x-4 bg-background border border-[#D9D9D9] rounded-2xl py-2",e),children:[o&&C.jsx("select",{"data-slot":"table-pagination-size-trigger",...r,value:s,onChange:v,className:ue("border border-input rounded-md w-fit min-w-[3rem] bg-background p-2 ring-offset-background","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n),children:o.map((b,x)=>C.jsx("option",{value:b,"data-slot":"table-pagination-size-option",children:b},x))}),C.jsxs("span",{"data-slot":"table-pagination-range",children:[l.start," - ",l.end," de ",i.totalItems]}),C.jsxs("div",{className:"flex gap-2",children:[C.jsx(Is,{"data-slot":"table-pagination-prev",size:"icon",variant:"ghost",disabled:f,onClick:d,children:C.jsx(Ow,{"data-slot":"table-pagination-prev-icon"})}),C.jsx(Is,{"data-slot":"table-pagination-next",size:"icon",variant:"ghost",disabled:m,onClick:c,children:C.jsx(Lp,{"data-slot":"table-pagination-next-icon"})})]})]})},[Yv,fve]=Yw(),pve=({children:e,value:t,onChange:n,defaultValue:r,variant:o="default",...i})=>{const[s="",a]=vr({prop:t,onChange:n,defaultProp:r}),[l,c]=M.useState(null);return C.jsx(fve,{value:{activeTab:s,setActiveTab:a,setTargetRef:c,targetRef:l,variant:o},children:C.jsx("div",{"data-slot":"tabs",...i,children:e})})},mve=({children:e,className:t,indicatorClassName:n})=>{const{targetRef:r}=Yv();return C.jsxs("div",{"data-slot":"tabs-list",className:ue("relative mb-4",t),children:[C.jsx("div",{"data-slot":"tabs-content",className:"flex",children:e}),C.jsx(vve,{targetRef:r,indicatorClassName:n})]})},hve=({value:e,className:t,...n})=>{const{activeTab:r,setActiveTab:o,setTargetRef:i,variant:s}=Yv(),a=r===e;return C.jsx("button",{"data-slot":"tabs-trigger",...n,type:"button",ref:l=>{a&&i(l)},onClick:()=>o(e),"data-tab":e,"data-selected":a,"aria-selected":a,className:ue("px-2 py-2 cursor-pointer w-full min-w-[100px] text-center rounded-t font-semibold select-none",s==="background"?"hover:bg-transparent aria-selected:text-primary-foreground rounded":"hover:bg-accent hover:text-accent-foreground",t)})},gve=({value:e,...t})=>{const{activeTab:n}=Yv();return n===e?C.jsx("div",{"data-slot":"tabs-content",...t}):null},vve=({targetRef:e,indicatorClassName:t})=>{const n=M.useRef(null),r=n?.current,o=M.useRef(null),{variant:i}=Yv(),s=()=>{if(!e||!r)return;const a=e.offsetLeft,l=e.offsetWidth;r.style.width=l+"px",r.style.left=a+"px"};return M.useEffect(()=>{if(e)return s(),o.current=new ResizeObserver(s),o.current.observe(e),()=>{o.current?.disconnect()}},[e]),C.jsx("div",{"data-slot":"tabs-indicator",ref:n,className:ue("transition-all duration-300 absolute rounded bg-primary",i==="background"?"inset-0 -z-10 h-full top-0":"top-full h-[3px]",t)})};function Tj({className:e,unstyled:t=!1,children:n,...r}){return C.jsx("span",{className:ue(!t&&"relative inline-flex w-full rounded-md border border-input bg-background text-sm transition-shadow has-focus-visible:border-ring has-aria-invalid:border-error has-focus-visible:has-aria-invalid:ring-error/20 has-disabled:cursor-not-allowed has-disabled:opacity-50",e)||void 0,"data-slot":"textarea-control",...r,children:n})}function _j({className:e,ref:t,onChange:n,...r}){const o=n?i=>n(i.target.value,i):void 0;return C.jsx(Gp,{ref:t,value:r.value,defaultValue:r.defaultValue,disabled:r.disabled,id:r.id,name:r.name,render:i=>C.jsx("textarea",{className:ue("field-sizing-content min-h-17.5 w-full rounded-[inherit] px-[calc(--spacing(3)-1px)] py-[calc(--spacing(1.5)-1px)] outline-none placeholder:text-muted-foreground max-sm:min-h-20.5",e),"data-slot":"textarea",...Kr(i,r),onChange:o})})}function bve({className:e,unstyled:t=!1,ref:n,controlProps:r,...o}){return C.jsx(Tj,{unstyled:t,className:e,...r,children:C.jsx(_j,{ref:n,...o})})}const yve={done:"var(--color-primary)",pending:"#cdcdcd",error:"var(--color-error)"},xve=({items:e,classNameContainer:t,containerProps:n,...r})=>C.jsx(Nj,{className:t,...n,children:e.map((o,i)=>C.jsx(Oj,{icon:o.icon,color:o.color,status:o.status,...r,children:o.content},i))}),Nj=e=>C.jsx("ul",{"data-slot":"timeline",...e,className:ue("relative flex justify-center flex-col border-input",e.className)}),Oj=({icon:e,status:t,color:n,classNameItemDot:r,classNameItemContainerDot:o,classNameItemContent:i,itemsProps:s,children:a,...l})=>C.jsxs("li",{"data-slot":"timeline-item",className:ue("rounded-lg w-full px-2 gap-1 grid hover:bg-muted transition-colors ease-in grid-cols-[minmax(auto,20px)_1fr]",l.className),...l,children:[C.jsx(Mj,{icon:e,status:t,color:n,classNameDot:r,classNameContainerDot:o}),C.jsx(Ij,{className:i,...s,children:a})]}),Mj=({icon:e,status:t="pending",color:n,classNameDot:r,classNameContainerDot:o})=>C.jsx("div",{"data-slot":"timeline-item-dot",className:ue("relative pb-6 last:after:hidden after:absolute after:top-0 after:bottom-0 after:left-1/2 after:w-px after:-translate-x-1/2 after:bg-gray-200",o),children:C.jsx("div",{"data-slot":"timeline-item-dot-icon",className:ue("relative z-10 flex text-white items-center justify-center rounded-full left-1/2 -translate-x-1/2",e?"aspect-square p-1.5 min-h-7 min-w-7 top-2":"size-2 top-4",r),style:{backgroundColor:n||yve?.[t]},children:e})}),Ij=e=>C.jsx("div",{"data-slot":"timeline-item-content",...e,className:ue("grow px-2 pb-4 pt-2",e.className)}),Xv=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(Xv.displayName="ToastContext");function Zv(){const e=h.useContext(Xv);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":gt(73));return e}let WI=0;function Dj(e){return WI+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${WI}`}function wx(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const Yh=$U(e=>e.toasts,e=>{const t=new Map;let n=0,r=0;return e.forEach((o,i)=>{const s=o.transitionStatus==="ending";t.set(o.id,{value:o,domIndex:i,visibleIndex:s?-1:n,offsetY:r}),r+=o.height||0,s||(n+=1)}),t}),Ko={toasts:ye(e=>e.toasts),isEmpty:ye(e=>e.toasts.length===0),toast:ye(Yh,(e,t)=>e.get(t)?.value),toastIndex:ye(Yh,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:ye(Yh,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:ye(Yh,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:ye(e=>e.hovering),focused:ye(e=>e.focused),expanded:ye(e=>e.hovering||e.focused),expandedOrOutOfFocus:ye(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:ye(e=>e.prevFocusElement)};class Eve extends Tp{timers=new Map;areTimersPaused=!1;constructor(t){super(t,{},Ko)}setFocused(t){this.set("focused",t)}setHovering(t){this.set("hovering",t)}setIsWindowFocused(t){this.set("isWindowFocused",t)}setPrevFocusElement(t){this.set("prevFocusElement",t)}setViewport=t=>{this.set("viewport",t)};disposeEffect=()=>()=>{this.timers.forEach(t=>{t.timeout?.clear()}),this.timers.clear()};removeToast(t,n={}){const r=Ko.toastIndex(this.state,t);if(r===-1)return;const o=this.state.toasts[r];n.skipOnRemove||o?.onRemove?.();const i=[...this.state.toasts];i.splice(r,1),this.setToasts(i)}addToast=t=>{const{timeout:n,limit:r}=this.state,o=t.id||Dj("toast");if(t.id){const c=Ko.toast(this.state,t.id);if(c)if(c.transitionStatus==="ending")this.removeToast(t.id,{skipOnRemove:!0});else{const{id:d,transitionStatus:f,...m}=t;return this.updateToastInternal(t.id,m,{resetTimer:!0,markUpdated:!0}),t.id}}const i={...t,id:o,updateKey:0,transitionStatus:"starting"},s=[i,...this.state.toasts],a=s.filter(c=>c.transitionStatus!=="ending");if(a.length>r){const c=a.length-r,d=a.slice(-c),f=new Set(d.map(m=>m.id));this.setToasts(s.map(m=>{const g=f.has(m.id);return m.limited!==g?{...m,limited:g}:m}))}else this.setToasts(s.map(c=>c.limited?{...c,limited:!1}:c));const l=i.timeout??n;return i.type!=="loading"&&l>0&&this.scheduleTimer(o,l,()=>this.closeToast(o)),Ko.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),o};updateToast=(t,n)=>{this.updateToastInternal(t,n,{markUpdated:!0})};updateToastInternal=(t,n,r={})=>{const{timeout:o,toasts:i}=this.state,s=Ko.toast(this.state,t)??null;if(!s||s.transitionStatus==="ending")return;const a={...s,...n,...r.markUpdated&&{updateKey:(s.updateKey??0)+1}};this.setToasts(i.map(b=>b.id===t?a:b));const l=a.timeout??o,c=s?.timeout??o,d=Object.hasOwn(n,"timeout"),f=a.transitionStatus!=="ending"&&a.type!=="loading"&&l>0,m=this.timers.has(t),g=c!==l,v=s?.type==="loading";if(!f&&m){this.timers.get(t)?.timeout?.clear(),this.timers.delete(t);return}if(f&&(!m||g||d||v||r.resetTimer)){const b=this.timers.get(t);b&&(b.timeout?.clear(),this.timers.delete(t)),this.scheduleTimer(t,l,()=>this.closeToast(t)),Ko.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=t=>{const n=t===void 0,{limit:r,toasts:o}=this.state;let i;if(n)i=o,this.timers.forEach(c=>{c.timeout?.clear()}),this.timers.clear();else{const c=Ko.toast(this.state,t);if(!c)return;i=[c];const d=this.timers.get(t);d?.timeout&&(d.timeout.clear(),this.timers.delete(t))}let s=0;const l={toasts:o.map(c=>{if(n||c.id===t)return{...c,transitionStatus:"ending",height:0};if(c.transitionStatus==="ending")return c;const d=s>=r;return s+=1,c.limited!==d?{...c,limited:d}:c})};(n||o.length===1)&&(l.hovering=!1,l.focused=!1),this.update(l),i.forEach(c=>{c.transitionStatus!=="ending"&&c.onClose?.()}),this.handleFocusManagement(t)};promiseToast=(t,n)=>{const r=wx(n.loading),o=this.addToast({...r,type:"loading"}),i=t.then(s=>{const a=wx(n.success,s);return this.updateToast(o,{...a,type:"success",timeout:a.timeout}),s}).catch(s=>{const a=wx(n.error,s);return this.updateToast(o,{...a,type:"error",timeout:a.timeout}),Promise.reject(s)});return{}.hasOwnProperty.call(n,"setPromise")&&n.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(t=>{if(t.timeout){t.timeout.clear();const n=Date.now()-t.start,r=t.delay-n;t.remaining=r>0?r:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((t,n)=>{t.remaining=t.remaining>0?t.remaining:t.delay,t.timeout??=gr.create(),t.timeout.start(t.remaining,()=>{this.timers.delete(n),t.callback()}),t.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=t=>{if(t.pointerType!=="touch")return;const n=Ht(t);Xe(this.state.viewport,n)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(t,n,r){const o=Date.now(),i=!Ko.expandedOrOutOfFocus(this.state),s=i?gr.create():void 0;s?.start(n,()=>{this.timers.delete(t),r()}),this.timers.set(t,{timeout:s,start:i?o:0,delay:n,remaining:n,callback:r})}setToasts(t){const n={toasts:t};t.length===0&&(n.hovering=!1,n.focused=!1),this.update(n)}handleFocusManagement(t){const n=Bn(mt(this.state.viewport));if(!this.state.viewport||!Xe(this.state.viewport,n)||!wg(n))return;if(t===void 0){this.restoreFocusToPrevElement();return}const r=Ko.toasts(this.state),o=Ko.toastIndex(this.state,t);let i=null,s=o+1;for(;s<r.length;){if(r[s].transitionStatus!=="ending"){i=r[s];break}s+=1}if(!i)for(s=o-1;s>=0;){if(r[s].transitionStatus!=="ending"){i=r[s];break}s-=1}i?i.ref?.current?.focus():this.restoreFocusToPrevElement()}}const aS=function(t){const{children:n,timeout:r=5e3,limit:o=3,toastManager:i}=t,s=fn(()=>new Eve({timeout:r,limit:o,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return zl(s.disposeEffect),h.useEffect(function(){return i?i[" subscribe"](({action:c,options:d})=>{const f=d.id;c==="promise"&&d.promise?s.promiseToast(d.promise,d):c==="update"&&f?s.updateToast(f,d):c==="close"?s.closeToast(f):s.addToast(d)}):void 0},[s,r,i]),s.useSyncedValues({timeout:r,limit:o}),C.jsx(Xv.Provider,{value:s,children:n})};process.env.NODE_ENV!=="production"&&(aS.displayName="ToastProvider");let wve=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const lS=h.forwardRef(function(t,n){const{render:r,className:o,style:i,children:s,...a}=t,l=Zv(),c=nn(),d=h.useRef(!1),f=h.useRef(!1),m=h.useRef(!1),g=l.useState("isEmpty"),v=l.useState("toasts"),b=l.useState("focused"),x=l.useState("expanded"),y=l.useState("prevFocusElement"),_=v[0]?.height??0,w=h.useMemo(()=>v.some(A=>A.transitionStatus==="ending"),[v]);h.useEffect(()=>{const A=l.state.viewport;if(!A)return;function L(V){g||V.key==="F6"&&Ht(V)!==A&&(V.preventDefault(),l.setPrevFocusElement(Bn(mt(A))),A?.focus({preventScroll:!0}),l.pauseTimers(),l.setFocused(!0))}const H=Ft(A);return ut(H,"keydown",L)},[l,g]),h.useEffect(()=>{const A=l.state.viewport;if(!A||g)return;const L=Ft(A);function H(X){Ht(X)===L&&(l.setIsWindowFocused(!1),l.pauseTimers())}function V(X){if(X.relatedTarget)return;const K=Ht(X),G=Bn(mt(A));(K===L||!Xe(A,K)||!wg(G))&&l.resumeTimers(),c.start(0,()=>l.setIsWindowFocused(!0))}return po(ut(L,"blur",H,!0),ut(L,"focus",V,!0))},[l,c,g]),h.useEffect(()=>{const A=l.state.viewport;if(!A||g)return;const L=mt(A);return ut(L,"pointerdown",l.handleDocumentPointerDown,!0)},[g,l]);function T(A){const L=l.state.viewport;L&&(d.current=!0,A.relatedTarget===L?v[0]?.ref?.current?.focus():l.restoreFocusToPrevElement())}function R(A){A.key==="Tab"&&A.shiftKey&&Ht(A.nativeEvent)===l.state.viewport&&(A.preventDefault(),l.restoreFocusToPrevElement(),l.resumeTimers())}function S(){const A=l.state.toasts.some(L=>L.transitionStatus==="ending");!l.state.isWindowFocused||A||m.current||!f.current||(l.resumeTimers(),l.setHovering(!1),f.current=!1)}h.useEffect(S,[w,l]);function P(){l.pauseTimers(),l.setHovering(!0),f.current=!1}function N(){w||m.current?f.current=!0:(l.resumeTimers(),l.setHovering(!1))}function F(A){A.pointerType==="touch"&&(m.current=!0)}function W(A){A.pointerType==="touch"&&(m.current=!1,S())}function I(){if(d.current){d.current=!1;return}b||wg(Bn(mt(l.state.viewport)))&&(l.setFocused(!0),l.pauseTimers())}function B(A){!b||Xe(l.state.viewport,A.relatedTarget)||(l.setFocused(!1),l.resumeTimers())}const $={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:P,onMouseMove:P,onMouseLeave:N,onFocus:I,onBlur:B,onKeyDown:R,onClick:I,onPointerDown:F,onPointerUp:W,onPointerCancel:W},k={expanded:x},j=$e("div",t,{ref:[n,l.setViewport],state:k,props:[$,{style:{[wve.frontmostHeight]:_?`${_}px`:void 0}},a,{children:C.jsxs(h.Fragment,{children:[!g&&y&&C.jsx(ti,{onFocus:T}),s,!g&&y&&C.jsx(ti,{onFocus:T})]})}]}),D=h.useMemo(()=>v.filter(A=>A.priority==="high"),[v]);return C.jsxs(h.Fragment,{children:[!g&&y&&C.jsx(ti,{onFocus:T}),j,!b&&D.length>0&&C.jsx("div",{style:qs,children:D.map(A=>C.jsxs("div",{role:"alert","aria-atomic":!0,children:[C.jsx("div",{children:A.title}),C.jsx("div",{children:A.description})]},A.id))})]})});process.env.NODE_ENV!=="production"&&(lS.displayName="ToastViewport");const uS=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(uS.displayName="ToastRootContext");function um(){const e=h.useContext(uS);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.":gt(66));return e}let bs=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const Cve={...Hn,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},$f=40,Rve=10,ms=.5,Sve=1,Pve=`${mH},${hH}`;function HI(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function Tve(e){const n=Ft(e).getComputedStyle(e).transform;let r=0,o=0,i=1;if(n&&n!=="none"){const s=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(s){const a=s[1].split(", ").map(parseFloat);a.length===6?(r=a[4],o=a[5],i=Math.sqrt(a[0]*a[0]+a[1]*a[1])):a.length===16&&(r=a[12],o=a[13],i=a[0])}}return{x:r,y:o,scale:i}}const cS=h.forwardRef(function(t,n){const{toast:r,render:o,className:i,swipeDirection:s=["down","right"],style:a,...l}=t,c=r.positionerProps?.anchor!==void 0;let d=[];c||(d=Array.isArray(s)?s:[s]);const f=d.length>0,m=Zv(),[g,v]=h.useState(void 0),[b,x]=h.useState(!1),[y,_]=h.useState(!1),[w,T]=h.useState(!1),[R,S]=h.useState({x:0,y:0}),[P,N]=h.useState({x:0,y:0,scale:1}),[F,W]=h.useState(),[I,B]=h.useState(),[$,k]=h.useState(null),j=h.useRef(null),D=h.useRef({x:0,y:0}),A=h.useRef({x:0,y:0,scale:1}),L=h.useRef(void 0),H=h.useRef(0),V=h.useRef(!1),X=h.useRef({x:0,y:0}),K=h.useRef(!1),G=m.useState("toastIndex",r.id),ee=m.useState("toastVisibleIndex",r.id),Z=m.useState("toastOffsetY",r.id),te=m.useState("focused"),J=m.useState("expanded");sr({open:r.transitionStatus!=="ending",ref:j,onComplete(){r.transitionStatus==="ending"&&m.removeToast(r.id)}});const ne=Re((ce=!1)=>{const he=j.current;if(!he)return;const re=he.style.height;he.style.height="auto";const le=he.offsetHeight;he.style.height=re;function Oe(){m.updateToastInternal(r.id,{ref:j,height:le,...r.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}ce?Rn.flushSync(Oe):Oe()});Ne(ne,[ne]);function U(ce,he){let re=ce,le=he;return!d.includes("left")&&!d.includes("right")?re=ce>0?ce**ms:-(Math.abs(ce)**ms):(!d.includes("right")&&ce>0&&(re=ce**ms),!d.includes("left")&&ce<0&&(re=-(Math.abs(ce)**ms))),!d.includes("up")&&!d.includes("down")?le=he>0?he**ms:-(Math.abs(he)**ms):(!d.includes("down")&&he>0&&(le=he**ms),!d.includes("up")&&he<0&&(le=-(Math.abs(he)**ms))),{x:re,y:le}}function ie(ce){if(ce.button!==0)return;ce.pointerType==="touch"&&m.pauseTimers();const he=Ht(ce.nativeEvent);if(!(he&&he.closest(`button,a,input,textarea,[role="button"],${Pve}`))){if(V.current=!1,L.current=void 0,H.current=0,D.current={x:ce.clientX,y:ce.clientY},X.current=D.current,j.current){const le=Tve(j.current);A.current=le,N(le),S({x:le.x,y:le.y})}m.setHovering(!0),x(!0),_(!1),k(null),K.current=!0,j.current?.setPointerCapture(ce.pointerId)}}function se(ce){if(!b)return;ce.preventDefault(),K.current&&(D.current={x:ce.clientX,y:ce.clientY},K.current=!1);const{clientY:he,clientX:re,movementX:le,movementY:Oe}=ce;(Oe<0&&he>X.current.y||Oe>0&&he<X.current.y)&&(X.current={x:X.current.x,y:he}),(le<0&&re>X.current.x||le>0&&re<X.current.x)&&(X.current={x:re,y:X.current.y});const De=re-D.current.x,Fe=he-D.current.y,We=he-X.current.y,ze=re-X.current.x;if(!y&&Math.sqrt(De*De+Fe*Fe)>=Sve&&(_(!0),$===null)){const Ge=d.includes("left")||d.includes("right"),dt=d.includes("up")||d.includes("down");if(Ge&&dt){const rt=Math.abs(De),Ve=Math.abs(Fe);k(rt>Ve?"horizontal":"vertical")}}let He;if(!L.current)$==="vertical"?Fe>0?He="down":Fe<0&&(He="up"):$==="horizontal"?De>0?He="right":De<0&&(He="left"):Math.abs(De)>=Math.abs(Fe)?He=De>0?"right":"left":He=Fe>0?"down":"up",He&&d.includes(He)&&(L.current=He,H.current=HI(He,De,Fe),v(He));else{const Je=L.current,Ge=HI(Je,ze,We);Ge>$f?(V.current=!1,v(Je)):!(d.includes("left")&&d.includes("right"))&&!(d.includes("up")&&d.includes("down"))&&H.current-Ge>=Rve&&(V.current=!0)}const Ze=U(De,Fe);let nt=A.current.x,ht=A.current.y;$==="horizontal"?(d.includes("left")||d.includes("right"))&&(nt+=Ze.x):($==="vertical"||(d.includes("left")||d.includes("right"))&&(nt+=Ze.x),(d.includes("up")||d.includes("down"))&&(ht+=Ze.y)),S({x:nt,y:ht})}function Q(ce){if(!b)return;if(x(!1),_(!1),k(null),j.current?.releasePointerCapture(ce.pointerId),V.current){S({x:P.x,y:P.y}),v(void 0);return}let he=!1;const re=R.x-P.x,le=R.y-P.y;let Oe;for(const De of d){switch(De){case"right":re>$f&&(he=!0,Oe="right");break;case"left":re<-$f&&(he=!0,Oe="left");break;case"down":le>$f&&(he=!0,Oe="down");break;case"up":le<-$f&&(he=!0,Oe="up");break}if(he)break}he?(v(Oe),T(!0),m.closeToast(r.id)):(S({x:P.x,y:P.y}),v(void 0))}function me(){b&&(x(!1),_(!1),k(null),S({x:P.x,y:P.y}),v(void 0))}function ve(ce){if(ce.key==="Escape"){if(!j.current||!Xe(j.current,Bn(mt(j.current))))return;m.closeToast(r.id)}}h.useEffect(()=>{if(!f)return;const ce=j.current;if(!ce)return;function he(re){Xe(ce,Ht(re))&&re.preventDefault()}return ut(ce,"touchmove",he,{passive:!1})},[f]);function xe(){if(!b&&R.x===P.x&&R.y===P.y&&!w)return{[bs.swipeMovementX]:"0px",[bs.swipeMovementY]:"0px"};const ce=R.x-P.x,he=R.y-P.y;return{transition:b?"none":void 0,transform:b?`translateX(${R.x}px) translateY(${R.y}px) scale(${P.scale})`:void 0,[bs.swipeMovementX]:`${ce}px`,[bs.swipeMovementY]:`${he}px`}}const be=r.priority==="high",Ce={role:be?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":F,"aria-describedby":I,"aria-hidden":be&&!te?!0:void 0,onPointerDown:f?ie:void 0,onPointerMove:f?se:void 0,onPointerUp:f?Q:void 0,onPointerCancel:f?me:void 0,onKeyDown:ve,inert:Jl(r.limited),style:{...xe(),[bs.index]:r.transitionStatus==="ending"?G:ee,[bs.offsetY]:`${Z}px`,[bs.height]:r.height?`${r.height}px`:void 0}},qe=h.useMemo(()=>({rootRef:j,toast:r,titleId:F,setTitleId:W,descriptionId:I,setDescriptionId:B,swiping:b,swipeDirection:g,recalculateHeight:ne,index:G,visibleIndex:ee,expanded:J}),[r,F,I,b,g,ne,G,ee,J]),Te={transitionStatus:r.transitionStatus,expanded:J,limited:r.limited||!1,type:r.type,swiping:qe.swiping,swipeDirection:qe.swipeDirection},ke=$e("div",t,{ref:[n,qe.rootRef],state:Te,stateAttributesMapping:Cve,props:[Ce,l]});return C.jsx(uS.Provider,{value:qe,children:ke})});process.env.NODE_ENV!=="production"&&(cS.displayName="ToastRoot");const dS=h.forwardRef(function(t,n){const{render:r,className:o,style:i,...s}=t,{visibleIndex:a,expanded:l,recalculateHeight:c}=um(),d=h.useRef(null);Ne(()=>{const v=d.current;if(!v||(c(),typeof ResizeObserver!="function"||typeof MutationObserver!="function"))return;const b=new ResizeObserver(()=>c(!0)),x=new MutationObserver(()=>c(!0));return b.observe(v),x.observe(v,{childList:!0,subtree:!0,characterData:!0}),()=>{b.disconnect(),x.disconnect()}},[c]);const f=a>0;return $e("div",t,{ref:[n,d],state:{expanded:l,behind:f},props:s})});process.env.NODE_ENV!=="production"&&(dS.displayName="ToastContent");const fS=h.forwardRef(function(t,n){const{render:r,className:o,style:i,id:s,children:a,...l}=t,{toast:c,setDescriptionId:d}=um(),f=a??c.description,m=!!f,g=Vs(s);Ne(()=>{if(m)return d(g),()=>{d(void 0)}},[m,g,d]);const v={type:c.type},b=$e("p",t,{ref:n,state:v,props:{...l,id:g,children:f}});return m?b:null});process.env.NODE_ENV!=="production"&&(fS.displayName="ToastDescription");const pS=h.forwardRef(function(t,n){const{render:r,className:o,style:i,id:s,children:a,...l}=t,{toast:c,setTitleId:d}=um(),f=a??c.title,m=!!f,g=Vs(s);Ne(()=>{if(m)return d(g),()=>{d(void 0)}},[m,g,d]);const v={type:c.type},b=$e("h2",t,{ref:n,state:v,props:{...l,id:g,children:f}});return m?b:null});process.env.NODE_ENV!=="production"&&(pS.displayName="ToastTitle");const mS=h.forwardRef(function(t,n){const{render:r,className:o,style:i,disabled:s,nativeButton:a=!0,...l}=t,c=Zv(),{toast:d}=um(),f=c.useState("expanded"),[m,g]=h.useState(!1),{getButtonProps:v,buttonRef:b}=Yn({disabled:s,native:a}),x={type:d.type};return $e("button",t,{ref:[n,b],state:x,props:[{"aria-hidden":!f&&!m,onClick(){c.closeToast(d.id)},onFocus(){g(!0)},onBlur(){g(!1)}},l,v]})});process.env.NODE_ENV!=="production"&&(mS.displayName="ToastClose");const Aj=h.forwardRef(function(t,n){const{render:r,className:o,style:i,disabled:s,nativeButton:a=!0,...l}=t,{toast:c}=um(),d=c.actionProps?.children??l.children,f=!!d,{getButtonProps:m,buttonRef:g}=Yn({disabled:s,native:a}),v={type:c.type},b=$e("button",t,{ref:[n,g],state:v,props:[l,c.actionProps,m,{children:d}]});return f?b:null});process.env.NODE_ENV!=="production"&&(Aj.displayName="ToastAction");const kj=m0,hS=h.createContext(void 0);process.env.NODE_ENV!=="production"&&(hS.displayName="ToastPositionerContext");function _ve(){const e=h.useContext(hS);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ToastPositionerContext is missing. ToastPositioner parts must be placed within <Toast.Positioner>.":gt(84));return e}const $j=h.forwardRef(function(t,n){const{toast:r,...o}=t,i=Zv(),s=r.positionerProps??rn,{render:a,className:l,anchor:c=s.anchor,positionMethod:d=s.positionMethod??"absolute",side:f=s.side??"top",align:m=s.align??"center",sideOffset:g=s.sideOffset??0,alignOffset:v=s.alignOffset??0,collisionBoundary:b=s.collisionBoundary??"clipping-ancestors",collisionPadding:x=s.collisionPadding??5,arrowPadding:y=s.arrowPadding??5,sticky:_=s.sticky??!1,disableAnchorTracking:w=s.disableAnchorTracking??!1,collisionAvoidance:T=s.collisionAvoidance??ZE,style:R,...S}=o,[P,N]=h.useState(null),F=i.useState("toastIndex",r.id),W=i.useState("toastVisibleIndex",r.id),I=Ct(c)?c:null,B=yv({open:!0,onOpenChange:Dt,elements:{floating:P,reference:I}}),$=Kp({anchor:I,positionMethod:d,floatingRootContext:B,mounted:!0,side:f,sideOffset:g,align:m,alignOffset:v,collisionBoundary:b,collisionPadding:x,sticky:_,arrowPadding:y,disableAnchorTracking:w,keepMounted:!0,collisionAvoidance:T}),k=h.useMemo(()=>({side:$.side,align:$.align,anchorHidden:$.anchorHidden}),[$.side,$.align,$.anchorHidden]),j=zp(t,k,{styles:{...$.positionerStyles,[bs.index]:r.transitionStatus==="ending"?F:W},transitionStatus:r.transitionStatus,props:S,refs:[n,N]});return C.jsx(hS.Provider,{value:$,children:j})});process.env.NODE_ENV!=="production"&&($j.displayName="ToastPositioner");const Fj=h.forwardRef(function(t,n){const{className:r,render:o,style:i,...s}=t,{arrowRef:a,side:l,align:c,arrowUncentered:d,arrowStyles:f}=_ve();return $e("div",t,{state:{side:l,align:c,uncentered:d},ref:[n,a],props:[{style:f,"aria-hidden":!0},s]})});process.env.NODE_ENV!=="production"&&(Fj.displayName="ToastArrow");function gS(){const e=h.useContext(Xv);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":gt(73));const t=e.useState("toasts");return h.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function Lj(){const e=new Set;function t(n){e.forEach(r=>r(n))}return{" subscribe":function(r){return e.add(r),()=>{e.delete(r)}},add(n){const r=n.id||Dj("toast"),o={...n,id:r,transitionStatus:"starting"};return t({action:"add",options:o}),r},close(n){t({action:"close",options:{id:n}})},update(n,r){t({action:"update",options:{...r,id:n}})},promise(n,r){let o=n;return t({action:"promise",options:{...r,promise:n,setPromise(i){o=i}}}),o}}}const Nve=Object.freeze(Object.defineProperty({__proto__:null,Action:Aj,Arrow:Fj,Close:mS,Content:dS,Description:fS,Portal:kj,Positioner:$j,Provider:aS,Root:cS,Title:pS,Viewport:lS,createToastManager:Lj,useToastManager:gS},Symbol.toStringTag,{value:"Module"})),Jv={default:{icon:null,ringClass:"ring-input",titleClass:"",bgClass:""},success:{icon:QG,ringClass:"ring-success",titleClass:"text-success",bgClass:"bg-success/5"},error:{icon:tY,ringClass:"ring-error",titleClass:"text-error",bgClass:"bg-error/5"},warning:{icon:EY,ringClass:"ring-warning",titleClass:"text-warning",bgClass:"bg-warning/5"},info:{icon:Ck,ringClass:"ring-info",titleClass:"text-info",bgClass:"bg-info/5"}};function jj({variant:e="default"}={}){return ue("rounded-xl ring-1 bg-clip-padding p-4 shadow-lg bg-background",Jv[e].ringClass)}function vS(e){return{...e,close:t=>e.close(t),add:t=>{if(t.id){const n=e.toasts;if(n){const r=n.find(o=>o.id===t.id);if(r&&r.transitionStatus!=="ending")return e.update(t.id,{bump:!1}),requestAnimationFrame(()=>{e.update(t.id,{bump:!0,...t.timeout!==void 0&&{timeout:t.timeout}})}),t.id;if(r&&r.transitionStatus==="ending")return t.id}}return e.add({...t})},update:(t,n)=>e.update(t,{...n}),promise:(t,n)=>e.promise(t,{loading:{...n.loading},success:typeof n.success=="function"?r=>({...n.success(r)}):{...n.success},error:typeof n.error=="function"?r=>({...n.error(r)}):{...n.error}})}}function qj(){const e=gS();return{...vS(e),toasts:e.toasts}}function Ove(){return vS(Lj())}let ys=null;function Ff(e){return typeof e=="string"?{title:e}:e}const Mve=Object.assign(e=>ys?.add({...Ff(e)}),{success:e=>ys?.add({variant:"success",...Ff(e)}),error:e=>ys?.add({variant:"error",...Ff(e)}),warning:e=>ys?.add({variant:"warning",...Ff(e)}),info:e=>ys?.add({variant:"info",...Ff(e)}),promise:(e,t)=>ys?.promise(e,t)});function Ive(){const e=gS();return ys=M.useMemo(()=>vS(e),[e]),M.useEffect(()=>()=>{ys=null},[]),null}function Bj({children:e,toastManager:t,container:n}){return C.jsxs(aS,{toastManager:t,children:[C.jsx(Ive,{}),e,C.jsx(kj,{container:n,children:C.jsx(lS,{className:"fixed top-auto right-4 bottom-4 mx-auto flex w-[calc(100%-2rem)] sm:right-8 sm:bottom-8 sm:w-[340px]",children:C.jsx(Dve,{})})})]})}function Dve(){const{toasts:e}=qj();return e.map(t=>C.jsxs(cS,{toast:t,"data-slot":"toast",className:ue("absolute right-0 bottom-0 left-auto z-[calc(var(--z-toast)-var(--toast-index))] mr-0 h-[var(--height)] w-full origin-bottom select-none",jj({variant:t.variant}),"[--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]","[transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))] [transition:transform_0.5s_cubic-bezier(0.22,1,0.36,1),opacity_0.5s,height_0.15s]","after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']","data-[ending-style]:opacity-0 data-[expanded]:h-[var(--toast-height)] data-[expanded]:[transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--offset-y)))] data-[limited]:opacity-0 data-[starting-style]:[transform:translateY(150%)]","data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))] data-[expanded]:data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]","data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))] data-[expanded]:data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]","data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))] data-[expanded]:data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]","data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))] data-[expanded]:data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]","[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(150%)]",t.bump&&"animate-toast-bump"),children:[C.jsx(Ave,{variant:t.variant}),C.jsxs(dS,{className:"isolate flex flex-col gap-1 transition-opacity [transition-duration:250ms] data-[behind]:pointer-events-none data-[behind]:opacity-0 data-[expanded]:pointer-events-auto data-[expanded]:opacity-100",children:[t.content??C.jsxs("div",{className:"flex items-start gap-2",children:[C.jsx(kve,{variant:t.variant}),C.jsxs("div",{className:"flex flex-col gap-1 overflow-hidden",children:[C.jsx(pS,{"data-slot":"toast-title",className:ue("text-[0.975rem] leading-5 font-medium text-foreground",Jv[t.variant??"default"].titleClass)}),C.jsx(fS,{"data-slot":"toast-description",className:"text-[0.925rem] leading-5 text-muted-foreground"}),!!t.actions?.length&&C.jsx("div",{className:"mt-2 flex min-w-0 flex-nowrap gap-2 overflow-x-auto p-px",children:t.actions.map((n,r)=>C.jsx(Is,{...n},r))})]})]}),C.jsx(mS,{className:"absolute top-2 right-2 flex h-4 w-4 items-center justify-center rounded border-none bg-transparent text-current/50 hover:bg-foreground/10 hover:text-current","aria-label":"Close",children:C.jsx($a,{className:"h-3 w-3"})})]})]},t.id))}function Ave({variant:e}){const t=e?Jv[e].bgClass:"";return C.jsx("div",{className:ue("absolute inset-0 rounded-[11px] bg-background/90",t)})}function kve({variant:e}){if(!e||e==="default")return null;const{icon:t,titleClass:n}=Jv[e];return t?C.jsx(t,{"data-slot":"toast-icon",className:ue("mt-0.5 h-4 w-4 shrink-0",n)}):null}const $ve=M.createContext(null);M.createContext(null);M.createContext(null);M.createContext(null);M.createContext(null);M.createContext({});M.createContext(null);M.createContext(null);const _n=typeof document<"u"?M.useLayoutEffect:()=>{};var Cx;const Fve=(Cx=M.useInsertionEffect)!==null&&Cx!==void 0?Cx:_n;function hr(e){const t=M.useRef(null);return Fve(()=>{t.current=e},[e]),M.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}function Lve(e){let[t,n]=M.useState(e),r=M.useRef(null),o=hr(()=>{if(!r.current)return;let s=r.current.next();if(s.done){r.current=null;return}t===s.value?o():n(s.value)});_n(()=>{r.current&&o()});let i=hr(s=>{r.current=s(t),o()});return[t,i]}const ev={prefix:String(Math.round(Math.random()*1e10)),current:0},Vj=M.createContext(ev),jve=M.createContext(!1);let qve=!!(typeof window<"u"&&window.document&&window.document.createElement),Rx=new WeakMap;function Bve(e=!1){let t=M.useContext(Vj),n=M.useRef(null);if(n.current===null&&!e){var r,o;let i=(o=M.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||o===void 0||(r=o.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(i){let s=Rx.get(i);s==null?Rx.set(i,{id:t.current,state:i.memoizedState}):i.memoizedState!==s.state&&(t.current=s.id,Rx.delete(i))}n.current=++t.current}return n.current}function Vve(e){let t=M.useContext(Vj);t===ev&&!qve&&process.env.NODE_ENV!=="production"&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=Bve(!!e),r=t===ev&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function Wve(e){let t=M.useId(),[n]=M.useState(cm()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${ev.prefix}`;return e||`${r}-${t}`}const Hve=typeof M.useId=="function"?Wve:Vve;function Kve(){return!1}function Uve(){return!0}function zve(e){return()=>{}}function cm(){return typeof M.useSyncExternalStore=="function"?M.useSyncExternalStore(zve,Kve,Uve):M.useContext(jve)}let Gve=!!(typeof window<"u"&&window.document&&window.document.createElement),kl=new Map,Uf;typeof FinalizationRegistry<"u"&&(Uf=new FinalizationRegistry(e=>{kl.delete(e)}));function Xi(e){let[t,n]=M.useState(e),r=M.useRef(null),o=Hve(t),i=M.useRef(null);if(Uf&&Uf.register(i,o),Gve){const s=kl.get(o);s&&!s.includes(r)?s.push(r):kl.set(o,[r])}return _n(()=>{let s=o;return()=>{Uf&&Uf.unregister(i),kl.delete(s)}},[o]),M.useEffect(()=>{let s=r.current;return s&&n(s),()=>{s&&(r.current=null)}}),o}function Yve(e,t){if(e===t)return e;let n=kl.get(e);if(n)return n.forEach(o=>o.current=t),t;let r=kl.get(t);return r?(r.forEach(o=>o.current=e),e):t}function Xve(e=[]){let t=Xi(),[n,r]=Lve(t),o=M.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return _n(o,[t,o,...e]),n}function Qv(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Wt=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},co=e=>e&&"window"in e&&e.window===e?e:Wt(e).defaultView||window;function Zve(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function Jve(e){return Zve(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let Qve=!1;function eb(){return Qve}function un(e,t){if(!eb())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:Jve(n)?n=n.host:n=n.parentNode}return!1}const nr=(e=document)=>{var t;if(!eb())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function $t(e){return eb()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}class ebe{get currentNode(){return this._currentNode}set currentNode(t){if(!un(this.root,t))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const n=[];let r=t,o=t;for(this._currentNode=t;r&&r!==this.root;)if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const s=r,a=this._doc.createTreeWalker(s,this.whatToShow,{acceptNode:this._acceptNode});n.push(a),a.currentNode=o,this._currentSetFor.add(a),r=o=s.host}else r=r.parentNode;const i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});n.push(i),i.currentNode=o,this._currentSetFor.add(i),this._walkerStack=n}get doc(){return this._doc}firstChild(){let t=this.currentNode,n=this.nextNode();return un(t,n)?(n&&(this.currentNode=n),n):(this.currentNode=t,null)}lastChild(){let n=this._walkerStack[0].lastChild();return n&&(this.currentNode=n),n}nextNode(){const t=this._walkerStack[0].nextNode();if(t){if(t.shadowRoot){var n;let o;if(typeof this.filter=="function"?o=this.filter(t):!((n=this.filter)===null||n===void 0)&&n.acceptNode&&(o=this.filter.acceptNode(t)),o===NodeFilter.FILTER_ACCEPT)return this.currentNode=t,t;let i=this.nextNode();return i&&(this.currentNode=i),i}return t&&(this.currentNode=t),t}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.nextNode();return r&&(this.currentNode=r),r}else return null}previousNode(){const t=this._walkerStack[0];if(t.currentNode===t.root){if(this._currentSetFor.has(t))if(this._currentSetFor.delete(t),this._walkerStack.length>1){this._walkerStack.shift();let o=this.previousNode();return o&&(this.currentNode=o),o}else return null;return null}const n=t.previousNode();if(n){if(n.shadowRoot){var r;let i;if(typeof this.filter=="function"?i=this.filter(n):!((r=this.filter)===null||r===void 0)&&r.acceptNode&&(i=this.filter.acceptNode(n)),i===NodeFilter.FILTER_ACCEPT)return n&&(this.currentNode=n),n;let s=this.lastChild();return s&&(this.currentNode=s),s}return n&&(this.currentNode=n),n}else if(this._walkerStack.length>1){this._walkerStack.shift();let o=this.previousNode();return o&&(this.currentNode=o),o}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}constructor(t,n,r,o){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=s=>{if(s.nodeType===Node.ELEMENT_NODE){const l=s.shadowRoot;if(l){const c=this._doc.createTreeWalker(l,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(c),NodeFilter.FILTER_ACCEPT}else{var a;if(typeof this.filter=="function")return this.filter(s);if(!((a=this.filter)===null||a===void 0)&&a.acceptNode)return this.filter.acceptNode(s);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=t,this.root=n,this.filter=o??null,this.whatToShow=r??NodeFilter.SHOW_ALL,this._currentNode=n,this._walkerStack.unshift(t.createTreeWalker(n,r,this._acceptNode));const i=n.shadowRoot;if(i){const s=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(s)}}}function tbe(e,t,n,r){return eb()?new ebe(e,t,n,r):e.createTreeWalker(t,n,r)}function Vn(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let o in r){let i=t[o],s=r[o];typeof i=="function"&&typeof s=="function"&&o[0]==="o"&&o[1]==="n"&&o.charCodeAt(2)>=65&&o.charCodeAt(2)<=90?t[o]=Qv(i,s):(o==="className"||o==="UNSAFE_className")&&typeof i=="string"&&typeof s=="string"?t[o]=Tw(i,s):o==="id"&&i&&s?t.id=Yve(i,s):t[o]=s!==void 0?s:i}}return t}function nbe(...e){return e.length===1&&e[0]?e[0]:t=>{let n=!1;const r=e.map(o=>{const i=KI(o,t);return n||(n=typeof i=="function"),i});if(n)return()=>{r.forEach((o,i)=>{typeof o=="function"?o():KI(e[i],null)})}}}function KI(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}const rbe=new Set(["id"]),obe=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),ibe=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),sbe=new Set(["dir","lang","hidden","inert","translate"]),UI=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),abe=/^(data-.*)$/;function fu(e,t={}){let{labelable:n,isLink:r,global:o,events:i=o,propNames:s}=t,a={};for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(rbe.has(l)||n&&obe.has(l)||r&&ibe.has(l)||o&&sbe.has(l)||i&&UI.has(l)||l.endsWith("Capture")&&UI.has(l.slice(0,-7))||s?.has(l)||abe.test(l))&&(a[l]=e[l]);return a}function Zi(e){if(lbe())e.focus({preventScroll:!0});else{let t=ube(e);e.focus(),cbe(t)}}let Xh=null;function lbe(){if(Xh==null){Xh=!1;try{document.createElement("div").focus({get preventScroll(){return Xh=!0,!0}})}catch{}}return Xh}function ube(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function cbe(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function tb(e){var t;if(typeof window>"u"||window.navigator==null)return!1;let n=(t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands;return Array.isArray(n)&&n.some(r=>e.test(r.brand))||e.test(window.navigator.userAgent)}function bS(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Qi(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const Oa=Qi(function(){return bS(/^Mac/i)}),dbe=Qi(function(){return bS(/^iPhone/i)}),Wj=Qi(function(){return bS(/^iPad/i)||Oa()&&navigator.maxTouchPoints>1}),yS=Qi(function(){return dbe()||Wj()}),fbe=Qi(function(){return Oa()||yS()}),pbe=Qi(function(){return tb(/AppleWebKit/i)&&!xS()}),xS=Qi(function(){return tb(/Chrome/i)}),ES=Qi(function(){return tb(/Android/i)}),mbe=Qi(function(){return tb(/Firefox/i)}),hbe=M.createContext({isNative:!0,open:vbe,useHref:e=>e});function wS(){return M.useContext(hbe)}function Ma(e,t,n=!0){var r,o;let{metaKey:i,ctrlKey:s,altKey:a,shiftKey:l}=t;mbe()&&(!((o=window.event)===null||o===void 0||(r=o.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Oa()?i=!0:s=!0);let c=pbe()&&Oa()&&!Wj()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:s,altKey:a,shiftKey:l}):new MouseEvent("click",{metaKey:i,ctrlKey:s,altKey:a,shiftKey:l,bubbles:!0,cancelable:!0});Ma.isOpening=n,Zi(e),e.dispatchEvent(c),Ma.isOpening=!1}Ma.isOpening=!1;function gbe(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function vbe(e,t){gbe(e,n=>Ma(n,t))}function bbe(e){let t=wS();var n;const r=t.useHref((n=e.href)!==null&&n!==void 0?n:"");return{"data-href":e.href?r:void 0,"data-target":e.target,"data-rel":e.rel,"data-download":e.download,"data-ping":e.ping,"data-referrer-policy":e.referrerPolicy}}let Es=new Map,ME=new Set;function zI(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let o=Es.get(r.target);o||(o=new Set,Es.set(r.target,o),r.target.addEventListener("transitioncancel",n,{once:!0})),o.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let o=Es.get(r.target);if(o&&(o.delete(r.propertyName),o.size===0&&(r.target.removeEventListener("transitioncancel",n),Es.delete(r.target)),Es.size===0)){for(let i of ME)i();ME.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?zI():document.addEventListener("DOMContentLoaded",zI));function ybe(){for(const[e]of Es)"isConnected"in e&&!e.isConnected&&Es.delete(e)}function Hj(e){requestAnimationFrame(()=>{ybe(),Es.size===0?e():ME.add(e)})}function nb(){let e=M.useRef(new Map),t=M.useCallback((o,i,s,a)=>{let l=a?.once?(...c)=>{e.current.delete(s),s(...c)}:s;e.current.set(s,{type:i,eventTarget:o,fn:l,options:a}),o.addEventListener(i,l,a)},[]),n=M.useCallback((o,i,s,a)=>{var l;let c=((l=e.current.get(s))===null||l===void 0?void 0:l.fn)||s;o.removeEventListener(i,c,a),e.current.delete(s)},[]),r=M.useCallback(()=>{e.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return M.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function xbe(e,t){let{id:n,"aria-label":r,"aria-labelledby":o}=e;return n=Xi(n),o&&r?o=[...new Set([n,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),!r&&!o&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":o}}function rb(e){const t=M.useRef(null),n=M.useRef(void 0),r=M.useCallback(o=>{if(typeof e=="function"){const i=e,s=i(o);return()=>{typeof s=="function"?s():i(null)}}else if(e)return e.current=o,()=>{e.current=null}},[e]);return M.useMemo(()=>({get current(){return t.current},set current(o){t.current=o,n.current&&(n.current(),n.current=void 0),o!=null&&(n.current=r(o))}}),[r])}function Ebe(e,t){const n=M.useRef(!0),r=M.useRef(null);M.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),M.useEffect(()=>{let o=r.current;n.current?n.current=!1:(!o||t.some((i,s)=>!Object.is(i,o[s])))&&e(),r.current=t},t)}function GI(e,t){const n=M.useRef(!0),r=M.useRef(null);_n(()=>(n.current=!0,()=>{n.current=!1}),[]),_n(()=>{n.current?n.current=!1:(!r.current||t.some((o,i)=>!Object.is(o,r[i])))&&e(),r.current=t},t)}function Kj(e,t){_n(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function vp(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function ga(e,t){let n=e;for(vp(n,t)&&(n=n.parentElement);n&&!vp(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function wbe(e,t){const n=[];for(;e&&e!==document.documentElement;)vp(e,t)&&n.push(e),e=e.parentElement;return n}function Sl(e){return Oa()?e.metaKey:e.ctrlKey}let Cbe=0;const Sx=new Map;function Uj(e){let[t,n]=M.useState();return _n(()=>{if(!e)return;let r=Sx.get(e);if(r)n(r.element.id);else{let o=`react-aria-description-${Cbe++}`;n(o);let i=document.createElement("div");i.id=o,i.style.display="none",i.textContent=e,document.body.appendChild(i),r={refCount:0,element:i},Sx.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Sx.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function Zh(e,t,n,r){let o=hr(n),i=n==null;M.useEffect(()=>{if(i||!e.current)return;let s=e.current;return s.addEventListener(t,o,r),()=>{s.removeEventListener(t,o,r)}},[e,t,r,i,o])}function zj(e,t){let n=YI(e,t,"left"),r=YI(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight,s=e.scrollLeft,a=e.scrollTop,{borderTopWidth:l,borderLeftWidth:c,scrollPaddingTop:d,scrollPaddingRight:f,scrollPaddingBottom:m,scrollPaddingLeft:g}=getComputedStyle(e),{scrollMarginTop:v,scrollMarginRight:b,scrollMarginBottom:x,scrollMarginLeft:y}=getComputedStyle(t),_=s+parseInt(c,10),w=a+parseInt(l,10),T=_+e.clientWidth,R=w+e.clientHeight,S=parseInt(d,10)||0,P=parseInt(m,10)||0,N=parseInt(f,10)||0,F=parseInt(g,10)||0,W=parseInt(v,10)||0,I=parseInt(x,10)||0,B=parseInt(b,10)||0,$=parseInt(y,10)||0,k=n-$,j=n+o+B,D=r-W,A=r+i+I,L=s+parseInt(c,10)+F,H=T-N,V=a+parseInt(l,10)+S,X=R-P;if((k>L||j<H)&&(k<=s+F?s=k-parseInt(c,10)-F:j>T-N&&(s+=j-T+N)),(D>V||A<X)&&(D<=w+S?a=D-parseInt(l,10)-S:A>R-P&&(a+=A-R+P)),process.env.NODE_ENV==="test"){e.scrollLeft=s,e.scrollTop=a;return}e.scrollTo({left:s,top:a})}function YI(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function xs(e,t){if(e&&document.contains(e)){let s=document.scrollingElement||document.documentElement;if(!(window.getComputedStyle(s).overflow==="hidden")&&!xS()){var n;let{left:l,top:c}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:d,top:f}=e.getBoundingClientRect();if(Math.abs(l-d)>1||Math.abs(c-f)>1){var r,o,i;t==null||(o=t.containingElement)===null||o===void 0||(r=o.scrollIntoView)===null||r===void 0||r.call(o,{block:"center",inline:"center"}),(i=e.scrollIntoView)===null||i===void 0||i.call(e,{block:"nearest"})}}else{let l=wbe(e);for(let c of l)zj(c,e)}}}function IE(e){return e.pointerType===""&&e.isTrusted?!0:ES()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Rbe(e){return!ES()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function Sbe(e,t){let{collection:n,onLoadMore:r,scrollOffset:o=1}=e,i=M.useRef(null),s=hr(a=>{for(let l of a)l.isIntersecting&&r&&r()});_n(()=>(t.current&&(i.current=new IntersectionObserver(s,{root:ga(t?.current),rootMargin:`0px ${100*o}% ${100*o}% ${100*o}%`}),i.current.observe(t.current)),()=>{i.current&&i.current.disconnect()}),[n,s,t,o])}function Pbe(e){const t=M.version.split(".");return parseInt(t[0],10)>=19?e:e?"true":void 0}const Tbe="react-aria-clear-focus",_be="react-aria-focus",Nbe=typeof Element<"u"&&"checkVisibility"in Element.prototype;function Obe(e){const t=co(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,o=n!=="none"&&r!=="hidden"&&r!=="collapse";if(o){const{getComputedStyle:i}=e.ownerDocument.defaultView;let{display:s,visibility:a}=i(e);o=s!=="none"&&a!=="hidden"&&a!=="collapse"}return o}function Mbe(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function CS(e,t){return Nbe?e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]"):e.nodeName!=="#comment"&&Obe(e)&&Mbe(e,t)&&(!e.parentElement||CS(e.parentElement,e))}const RS=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],Ibe=RS.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";RS.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Dbe=RS.join(':not([hidden]):not([tabindex="-1"]),');function Gj(e){return e.matches(Ibe)&&CS(e)&&!Yj(e)}function Abe(e){return e.matches(Dbe)&&CS(e)&&!Yj(e)}function Yj(e){let t=e;for(;t!=null;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function SS(e,t,n){let[r,o]=M.useState(e||t),i=M.useRef(e!==void 0),s=e!==void 0;M.useEffect(()=>{let c=i.current;c!==s&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${c?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),i.current=s},[s]);let a=s?e:r,l=M.useCallback((c,...d)=>{let f=(m,...g)=>{n&&(Object.is(a,m)||n(m,...g)),s||(a=m)};typeof c=="function"?(process.env.NODE_ENV!=="production"&&console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),o((g,...v)=>{let b=c(s?a:g,...v);return f(b,...d),s?g:b})):(s||o(c),f(c,...d))},[s,a,n]);return[a,l]}const Xj=Symbol("default");function Zj({values:e,children:t}){for(let[n,r]of e)t=M.createElement(n.Provider,{value:r},t);return t}function pu(e){let{className:t,style:n,children:r,defaultClassName:o,defaultChildren:i,defaultStyle:s,values:a}=e;return M.useMemo(()=>{let l,c,d;return typeof t=="function"?l=t({...a,defaultClassName:o}):l=t,typeof n=="function"?c=n({...a,defaultStyle:s||{}}):c=n,typeof r=="function"?d=r({...a,defaultChildren:i}):r==null?d=i:d=r,{className:l??o,style:c||s?{...s,...c}:void 0,children:d??i,"data-rac":""}},[t,n,r,o,i,s,a])}function Jj(e,t){return n=>t(typeof e=="function"?e(n):e,n)}function kbe(e,t){let n=M.useContext(e);if(t===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=t||Xj;if(!n.slots[r]){let o=new Intl.ListFormat().format(Object.keys(n.slots).map(s=>`"${s}"`)),i=t?`Invalid slot "${t}".`:"A slot prop is required.";throw new Error(`${i} Valid slot names are ${o}.`)}return n.slots[r]}return n}function Qj(e,t,n){let r=kbe(n,e.slot)||{},{ref:o,...i}=r,s=rb(M.useMemo(()=>nbe(t,o),[t,o])),a=Vn(i,e);return"style"in i&&i.style&&"style"in e&&e.style&&(typeof i.style=="function"||typeof e.style=="function"?a.style=l=>{let c=typeof i.style=="function"?i.style(l):i.style,d={...l.defaultStyle,...c},f=typeof e.style=="function"?e.style({...l,defaultStyle:d}):e.style;return{...d,...f}}:a.style={...i.style,...e.style}),[a,s]}const eq=7e3;let Uo=null;function DE(e,t="assertive",n=eq){Uo?Uo.announce(e,t,n):(Uo=new $be,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?Uo.announce(e,t,n):setTimeout(()=>{Uo?.isAttached()&&Uo?.announce(e,t,n)},100))}class $be{isAttached(){var t;return(t=this.node)===null||t===void 0?void 0:t.isConnected}createLog(t){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",t),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,n="assertive",r=eq){var o,i;if(!this.node)return;let s=document.createElement("div");typeof t=="object"?(s.setAttribute("role","img"),s.setAttribute("aria-labelledby",t["aria-labelledby"])):s.textContent=t,n==="assertive"?(o=this.assertiveLog)===null||o===void 0||o.appendChild(s):(i=this.politeLog)===null||i===void 0||i.appendChild(s),t!==""&&setTimeout(()=>{s.remove()},r)}clear(t){this.node&&((!t||t==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}const Fbe=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Lbe=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function jbe(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return Fbe.has(n.script)}let t=e.split("-")[0];return Lbe.has(t)}const qbe=Symbol.for("react-aria.i18n.locale");function tq(){let e=typeof window<"u"&&window[qbe]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:jbe(e)?"rtl":"ltr"}}let AE=tq(),zf=new Set;function XI(){AE=tq();for(let e of zf)e(AE)}function Bbe(){let e=cm(),[t,n]=M.useState(AE);return M.useEffect(()=>(zf.size===0&&window.addEventListener("languagechange",XI),zf.add(n),()=>{zf.delete(n),zf.size===0&&window.removeEventListener("languagechange",XI)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const Vbe=M.createContext(null);function dm(){let e=Bbe();return M.useContext(Vbe)||e}const Wbe=Symbol.for("react-aria.i18n.locale"),Hbe=Symbol.for("react-aria.i18n.strings");let xl;class ob{getStringForLocale(t,n){let o=this.getStringsForLocale(n)[t];if(!o)throw new Error(`Could not find intl message ${t} in ${n} locale`);return o}getStringsForLocale(t){let n=this.strings[t];return n||(n=Kbe(t,this.strings,this.defaultLocale),this.strings[t]=n),n}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let n=window[Wbe];if(xl===void 0){let o=window[Hbe];if(!o)return null;xl={};for(let i in o)xl[i]=new ob({[n]:o[i]},n)}let r=xl?.[t];if(!r)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(t,n="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,r])=>r)),this.defaultLocale=n}}function Kbe(e,t,n="en-US"){if(t[e])return t[e];let r=Ube(e);if(t[r])return t[r];for(let o in t)if(o.startsWith(r+"-"))return t[o];return t[n]}function Ube(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const ZI=new Map,JI=new Map;class zbe{format(t,n){let r=this.strings.getStringForLocale(t,this.locale);return typeof r=="function"?r(n,this):r}plural(t,n,r="cardinal"){let o=n["="+t];if(o)return typeof o=="function"?o():o;let i=this.locale+":"+r,s=ZI.get(i);s||(s=new Intl.PluralRules(this.locale,{type:r}),ZI.set(i,s));let a=s.select(t);return o=n[a]||n.other,typeof o=="function"?o():o}number(t){let n=JI.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),JI.set(this.locale,n)),n.format(t)}select(t,n){let r=t[n]||t.other;return typeof r=="function"?r():r}constructor(t,n){this.locale=t,this.strings=n}}const QI=new WeakMap;function Gbe(e){let t=QI.get(e);return t||(t=new ob(e),QI.set(e,t)),t}function Ybe(e,t){return t&&ob.getGlobalDictionaryForPackage(t)||Gbe(e)}function ib(e,t){let{locale:n}=dm(),r=Ybe(e,t);return M.useMemo(()=>new zbe(n,r),[n,r])}function Xbe(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Zbe(e,t,n){Xbe(e,t),t.set(e,n)}let Px=new Map;function nq(e){let{locale:t}=dm(),n=t+(e?Object.entries(e).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(Px.has(n))return Px.get(n);let r=new Intl.Collator(t,e);return Px.set(n,r),r}function PS(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function rq(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function oq(e){let t=M.useRef({isFocused:!1,observer:null});_n(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=hr(r=>{e?.(r)});return M.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,i=s=>{if(t.current.isFocused=!1,o.disabled){let a=PS(s);n(a)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let a=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let tv=!1;function eD(e){for(;e&&!Gj(e);)e=e.parentElement;let t=co(e),n=t.document.activeElement;if(!n||n===e)return;tv=!0;let r=!1,o=d=>{(d.target===n||r)&&d.stopImmediatePropagation()},i=d=>{(d.target===n||r)&&(d.stopImmediatePropagation(),!e&&!r&&(r=!0,Zi(n),l()))},s=d=>{(d.target===e||r)&&d.stopImmediatePropagation()},a=d=>{(d.target===e||r)&&(d.stopImmediatePropagation(),r||(r=!0,Zi(n),l()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",i,!0),t.addEventListener("focusin",a,!0),t.addEventListener("focus",s,!0);let l=()=>{cancelAnimationFrame(c),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",i,!0),t.removeEventListener("focusin",a,!0),t.removeEventListener("focus",s,!0),tv=!1,r=!1},c=requestAnimationFrame(l);return l}let Tl="default",kE="",gg=new WeakMap;function tD(e){if(yS()){if(Tl==="default"){const t=Wt(e);kE=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}Tl="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";gg.set(e,e.style[t]),e.style[t]="none"}}function Tx(e){if(yS()){if(Tl!=="disabled")return;Tl="restoring",setTimeout(()=>{Hj(()=>{if(Tl==="restoring"){const t=Wt(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=kE||""),kE="",Tl="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&gg.has(e)){let t=gg.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";e.style[n]==="none"&&(e.style[n]=t),e.getAttribute("style")===""&&e.removeAttribute("style"),gg.delete(e)}}const iq=M.createContext({register:()=>{}});iq.displayName="PressResponderContext";function Jbe(e,t){return t.get?t.get.call(e):t.value}function sq(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function Qbe(e,t){var n=sq(e,t,"get");return Jbe(e,n)}function eye(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function nD(e,t,n){var r=sq(e,t,"set");return eye(e,r,n),n}function tye(e){let t=M.useContext(iq);if(t){let{register:n,...r}=t;e=Vn(r,e),n()}return Kj(t,e.ref),e}var Jh=new WeakMap;class Qh{continuePropagation(){nD(this,Jh,!1)}get shouldStopPropagation(){return Qbe(this,Jh)}constructor(t,n,r,o){Zbe(this,Jh,{writable:!0,value:void 0}),nD(this,Jh,!0);var i;let s=(i=o?.target)!==null&&i!==void 0?i:r.currentTarget;const a=s?.getBoundingClientRect();let l,c=0,d,f=null;r.clientX!=null&&r.clientY!=null&&(d=r.clientX,f=r.clientY),a&&(d!=null&&f!=null?(l=d-a.left,c=f-a.top):(l=a.width/2,c=a.height/2)),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=l,this.y=c}}const rD=Symbol("linkClicked"),oD="react-aria-pressable-style",iD="data-react-aria-pressable";function TS(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:o,onPressUp:i,onClick:s,isDisabled:a,isPressed:l,preventFocusOnPress:c,shouldCancelOnPointerExit:d,allowTextSelectionOnPress:f,ref:m,...g}=tye(e),[v,b]=M.useState(!1),x=M.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:_}=nb(),w=hr((I,B)=>{let $=x.current;if(a||$.didFirePressStart)return!1;let k=!0;if($.isTriggeringEvent=!0,r){let j=new Qh("pressstart",B,I);r(j),k=j.shouldStopPropagation}return n&&n(!0),$.isTriggeringEvent=!1,$.didFirePressStart=!0,b(!0),k}),T=hr((I,B,$=!0)=>{let k=x.current;if(!k.didFirePressStart)return!1;k.didFirePressStart=!1,k.isTriggeringEvent=!0;let j=!0;if(o){let D=new Qh("pressend",B,I);o(D),j=D.shouldStopPropagation}if(n&&n(!1),b(!1),t&&$&&!a){let D=new Qh("press",B,I);t(D),j&&(j=D.shouldStopPropagation)}return k.isTriggeringEvent=!1,j}),R=hr((I,B)=>{let $=x.current;if(a)return!1;if(i){$.isTriggeringEvent=!0;let k=new Qh("pressup",B,I);return i(k),$.isTriggeringEvent=!1,k.shouldStopPropagation}return!0}),S=hr(I=>{let B=x.current;if(B.isPressed&&B.target){B.didFirePressStart&&B.pointerType!=null&&T(fa(B.target,I),B.pointerType,!1),B.isPressed=!1,B.isOverTarget=!1,B.activePointerId=null,B.pointerType=null,_(),f||Tx(B.target);for(let $ of B.disposables)$();B.disposables=[]}}),P=hr(I=>{d&&S(I)}),N=hr(I=>{a||s?.(I)}),F=hr((I,B)=>{if(!a&&s){let $=new MouseEvent("click",I);rq($,B),s(PS($))}}),W=M.useMemo(()=>{let I=x.current,B={onKeyDown(k){if(_x(k.nativeEvent,k.currentTarget)&&un(k.currentTarget,$t(k.nativeEvent))){var j;lD($t(k.nativeEvent),k.key)&&k.preventDefault();let D=!0;if(!I.isPressed&&!k.repeat){I.target=k.currentTarget,I.isPressed=!0,I.pointerType="keyboard",D=w(k,"keyboard");let A=k.currentTarget,L=H=>{_x(H,A)&&!H.repeat&&un(A,$t(H))&&I.target&&R(fa(I.target,H),"keyboard")};y(Wt(k.currentTarget),"keyup",Qv(L,$),!0)}D&&k.stopPropagation(),k.metaKey&&Oa()&&((j=I.metaKeyEvents)===null||j===void 0||j.set(k.key,k.nativeEvent))}else k.key==="Meta"&&(I.metaKeyEvents=new Map)},onClick(k){if(!(k&&!un(k.currentTarget,$t(k.nativeEvent)))&&k&&k.button===0&&!I.isTriggeringEvent&&!Ma.isOpening){let j=!0;if(a&&k.preventDefault(),!I.ignoreEmulatedMouseEvents&&!I.isPressed&&(I.pointerType==="virtual"||IE(k.nativeEvent))){let D=w(k,"virtual"),A=R(k,"virtual"),L=T(k,"virtual");N(k),j=D&&A&&L}else if(I.isPressed&&I.pointerType!=="keyboard"){let D=I.pointerType||k.nativeEvent.pointerType||"virtual",A=R(fa(k.currentTarget,k),D),L=T(fa(k.currentTarget,k),D,!0);j=A&&L,I.isOverTarget=!1,N(k),S(k)}I.ignoreEmulatedMouseEvents=!1,j&&k.stopPropagation()}}},$=k=>{var j;if(I.isPressed&&I.target&&_x(k,I.target)){var D;lD($t(k),k.key)&&k.preventDefault();let L=$t(k),H=un(I.target,$t(k));T(fa(I.target,k),"keyboard",H),H&&F(k,I.target),_(),k.key!=="Enter"&&_S(I.target)&&un(I.target,L)&&!k[rD]&&(k[rD]=!0,Ma(I.target,k,!1)),I.isPressed=!1,(D=I.metaKeyEvents)===null||D===void 0||D.delete(k.key)}else if(k.key==="Meta"&&(!((j=I.metaKeyEvents)===null||j===void 0)&&j.size)){var A;let L=I.metaKeyEvents;I.metaKeyEvents=void 0;for(let H of L.values())(A=I.target)===null||A===void 0||A.dispatchEvent(new KeyboardEvent("keyup",H))}};if(typeof PointerEvent<"u"){B.onPointerDown=D=>{if(D.button!==0||!un(D.currentTarget,$t(D.nativeEvent)))return;if(Rbe(D.nativeEvent)){I.pointerType="virtual";return}I.pointerType=D.pointerType;let A=!0;if(!I.isPressed){I.isPressed=!0,I.isOverTarget=!0,I.activePointerId=D.pointerId,I.target=D.currentTarget,f||tD(I.target),A=w(D,I.pointerType);let L=$t(D.nativeEvent);"releasePointerCapture"in L&&L.releasePointerCapture(D.pointerId),y(Wt(D.currentTarget),"pointerup",k,!1),y(Wt(D.currentTarget),"pointercancel",j,!1)}A&&D.stopPropagation()},B.onMouseDown=D=>{if(un(D.currentTarget,$t(D.nativeEvent))&&D.button===0){if(c){let A=eD(D.target);A&&I.disposables.push(A)}D.stopPropagation()}},B.onPointerUp=D=>{!un(D.currentTarget,$t(D.nativeEvent))||I.pointerType==="virtual"||D.button===0&&!I.isPressed&&R(D,I.pointerType||D.pointerType)},B.onPointerEnter=D=>{D.pointerId===I.activePointerId&&I.target&&!I.isOverTarget&&I.pointerType!=null&&(I.isOverTarget=!0,w(fa(I.target,D),I.pointerType))},B.onPointerLeave=D=>{D.pointerId===I.activePointerId&&I.target&&I.isOverTarget&&I.pointerType!=null&&(I.isOverTarget=!1,T(fa(I.target,D),I.pointerType,!1),P(D))};let k=D=>{if(D.pointerId===I.activePointerId&&I.isPressed&&D.button===0&&I.target){if(un(I.target,$t(D))&&I.pointerType!=null){let A=!1,L=setTimeout(()=>{I.isPressed&&I.target instanceof HTMLElement&&(A?S(D):(Zi(I.target),I.target.click()))},80);y(D.currentTarget,"click",()=>A=!0,!0),I.disposables.push(()=>clearTimeout(L))}else S(D);I.isOverTarget=!1}},j=D=>{S(D)};B.onDragStart=D=>{un(D.currentTarget,$t(D.nativeEvent))&&S(D)}}else if(process.env.NODE_ENV==="test"){B.onMouseDown=D=>{if(D.button!==0||!un(D.currentTarget,$t(D.nativeEvent)))return;if(I.ignoreEmulatedMouseEvents){D.stopPropagation();return}if(I.isPressed=!0,I.isOverTarget=!0,I.target=D.currentTarget,I.pointerType=IE(D.nativeEvent)?"virtual":"mouse",_o.flushSync(()=>w(D,I.pointerType))&&D.stopPropagation(),c){let L=eD(D.target);L&&I.disposables.push(L)}y(Wt(D.currentTarget),"mouseup",k,!1)},B.onMouseEnter=D=>{if(!un(D.currentTarget,$t(D.nativeEvent)))return;let A=!0;I.isPressed&&!I.ignoreEmulatedMouseEvents&&I.pointerType!=null&&(I.isOverTarget=!0,A=w(D,I.pointerType)),A&&D.stopPropagation()},B.onMouseLeave=D=>{if(!un(D.currentTarget,$t(D.nativeEvent)))return;let A=!0;I.isPressed&&!I.ignoreEmulatedMouseEvents&&I.pointerType!=null&&(I.isOverTarget=!1,A=T(D,I.pointerType,!1),P(D)),A&&D.stopPropagation()},B.onMouseUp=D=>{un(D.currentTarget,$t(D.nativeEvent))&&!I.ignoreEmulatedMouseEvents&&D.button===0&&!I.isPressed&&R(D,I.pointerType||"mouse")};let k=D=>{if(D.button===0){if(I.ignoreEmulatedMouseEvents){I.ignoreEmulatedMouseEvents=!1;return}I.target&&I.target.contains(D.target)&&I.pointerType!=null||S(D),I.isOverTarget=!1}};B.onTouchStart=D=>{if(!un(D.currentTarget,$t(D.nativeEvent)))return;let A=nye(D.nativeEvent);if(!A)return;I.activePointerId=A.identifier,I.ignoreEmulatedMouseEvents=!0,I.isOverTarget=!0,I.isPressed=!0,I.target=D.currentTarget,I.pointerType="touch",f||tD(I.target),w(hs(I.target,D),I.pointerType)&&D.stopPropagation(),y(co(D.currentTarget),"scroll",j,!0)},B.onTouchMove=D=>{if(!un(D.currentTarget,$t(D.nativeEvent)))return;if(!I.isPressed){D.stopPropagation();return}let A=sD(D.nativeEvent,I.activePointerId),L=!0;A&&aD(A,D.currentTarget)?!I.isOverTarget&&I.pointerType!=null&&(I.isOverTarget=!0,L=w(hs(I.target,D),I.pointerType)):I.isOverTarget&&I.pointerType!=null&&(I.isOverTarget=!1,L=T(hs(I.target,D),I.pointerType,!1),P(hs(I.target,D))),L&&D.stopPropagation()},B.onTouchEnd=D=>{if(!un(D.currentTarget,$t(D.nativeEvent)))return;if(!I.isPressed){D.stopPropagation();return}let A=sD(D.nativeEvent,I.activePointerId),L=!0;A&&aD(A,D.currentTarget)&&I.pointerType!=null?(R(hs(I.target,D),I.pointerType),L=T(hs(I.target,D),I.pointerType),F(D.nativeEvent,I.target)):I.isOverTarget&&I.pointerType!=null&&(L=T(hs(I.target,D),I.pointerType,!1)),L&&D.stopPropagation(),I.isPressed=!1,I.activePointerId=null,I.isOverTarget=!1,I.ignoreEmulatedMouseEvents=!0,I.target&&!f&&Tx(I.target),_()},B.onTouchCancel=D=>{un(D.currentTarget,$t(D.nativeEvent))&&(D.stopPropagation(),I.isPressed&&S(hs(I.target,D)))};let j=D=>{I.isPressed&&un($t(D),I.target)&&S({currentTarget:I.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};B.onDragStart=D=>{un(D.currentTarget,$t(D.nativeEvent))&&S(D)}}return B},[y,a,c,_,f,S,P,T,w,R,N,F]);return M.useEffect(()=>{if(!m||process.env.NODE_ENV==="test")return;const I=Wt(m.current);if(!I||!I.head||I.getElementById(oD))return;const B=I.createElement("style");B.id=oD,B.textContent=`
|
|
133
|
-
@layer {
|
|
134
|
-
[${iD}] {
|
|
135
|
-
touch-action: pan-x pan-y pinch-zoom;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
`.trim(),I.head.prepend(B)},[m]),M.useEffect(()=>{let I=x.current;return()=>{var B;f||Tx((B=I.target)!==null&&B!==void 0?B:void 0);for(let $ of I.disposables)$();I.disposables=[]}},[f]),{isPressed:l||v,pressProps:Vn(g,W,{[iD]:!0})}}function _S(e){return e.tagName==="A"&&e.hasAttribute("href")}function _x(e,t){const{key:n,code:r}=e,o=t,i=o.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(o instanceof co(o).HTMLInputElement&&!aq(o,n)||o instanceof co(o).HTMLTextAreaElement||o.isContentEditable)&&!((i==="link"||!i&&_S(o))&&n!=="Enter")}function nye(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function sD(e,t){const n=e.changedTouches;for(let r=0;r<n.length;r++){const o=n[r];if(o.identifier===t)return o}return null}function hs(e,t){let n=0,r=0;return t.targetTouches&&t.targetTouches.length===1&&(n=t.targetTouches[0].clientX,r=t.targetTouches[0].clientY),{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function fa(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function rye(e){let t=0,n=0;return e.width!==void 0?t=e.width/2:e.radiusX!==void 0&&(t=e.radiusX),e.height!==void 0?n=e.height/2:e.radiusY!==void 0&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function oye(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function aD(e,t){let n=t.getBoundingClientRect(),r=rye(e);return oye(n,r)}function iye(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!_S(e)}function lD(e,t){return e instanceof HTMLInputElement?!aq(e,t):iye(e)}const sye=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function aq(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":sye.has(e.type)}let Ls=null,bp=new Set,Xf=new Map,Ia=!1,$E=!1;const aye={Tab:!0,Escape:!0};function NS(e,t){for(let n of bp)n(e,t)}function lye(e){return!(e.metaKey||!Oa()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function nv(e){Ia=!0,lye(e)&&(Ls="keyboard",NS("keyboard",e))}function io(e){Ls="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Ia=!0,NS("pointer",e))}function lq(e){IE(e)&&(Ia=!0,Ls="virtual")}function uq(e){e.target===window||e.target===document||tv||!e.isTrusted||(!Ia&&!$E&&(Ls="virtual",NS("virtual",e)),Ia=!1,$E=!1)}function cq(){tv||(Ia=!1,$E=!0)}function rv(e){if(typeof window>"u"||typeof document>"u"||Xf.get(co(e)))return;const t=co(e),n=Wt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Ia=!0,r.apply(this,arguments)},n.addEventListener("keydown",nv,!0),n.addEventListener("keyup",nv,!0),n.addEventListener("click",lq,!0),t.addEventListener("focus",uq,!0),t.addEventListener("blur",cq,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",io,!0),n.addEventListener("pointermove",io,!0),n.addEventListener("pointerup",io,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",io,!0),n.addEventListener("mousemove",io,!0),n.addEventListener("mouseup",io,!0)),t.addEventListener("beforeunload",()=>{dq(e)},{once:!0}),Xf.set(t,{focus:r})}const dq=(e,t)=>{const n=co(e),r=Wt(e);t&&r.removeEventListener("DOMContentLoaded",t),Xf.has(n)&&(n.HTMLElement.prototype.focus=Xf.get(n).focus,r.removeEventListener("keydown",nv,!0),r.removeEventListener("keyup",nv,!0),r.removeEventListener("click",lq,!0),n.removeEventListener("focus",uq,!0),n.removeEventListener("blur",cq,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",io,!0),r.removeEventListener("pointermove",io,!0),r.removeEventListener("pointerup",io,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",io,!0),r.removeEventListener("mousemove",io,!0),r.removeEventListener("mouseup",io,!0)),Xf.delete(n))};function uye(e){const t=Wt(e);let n;return t.readyState!=="loading"?rv(e):(n=()=>{rv(e)},t.addEventListener("DOMContentLoaded",n)),()=>dq(e,n)}typeof document<"u"&&uye();function OS(){return Ls!=="pointer"}function ov(){return Ls}function cye(){rv();let[e,t]=M.useState(Ls);return M.useEffect(()=>{let n=()=>{t(Ls)};return bp.add(n),()=>{bp.delete(n)}},[]),cm()?null:e}const dye=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function fye(e,t,n){let r=Wt(n?.target);const o=typeof window<"u"?co(n?.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?co(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?co(n?.target).HTMLElement:HTMLElement,a=typeof window<"u"?co(n?.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof o&&!dye.has(r.activeElement.type)||r.activeElement instanceof i||r.activeElement instanceof s&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof a&&!aye[n.key])}function pye(e,t,n){rv(),M.useEffect(()=>{let r=(o,i)=>{fye(!!n?.isTextInput,o,i)&&e(OS())};return bp.add(r),()=>{bp.delete(r)}},t)}function oo(e){const t=Wt(e),n=nr(t);if(ov()==="virtual"){let r=n;Hj(()=>{nr(t)===r&&e.isConnected&&Zi(e)})}else Zi(e)}function fq(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=M.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),o&&o(!1),!0},[r,o]),s=oq(i),a=M.useCallback(l=>{const c=Wt(l.target),d=c?nr(c):nr();l.target===l.currentTarget&&d===$t(l.nativeEvent)&&(n&&n(l),o&&o(!0),s(l))},[o,n,s]);return{focusProps:{onFocus:!t&&(n||o||r)?a:void 0,onBlur:!t&&(r||o)?i:void 0}}}function uD(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){t&&process.env.NODE_ENV!=="production"?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(r),t&&n.stopPropagation()}}function mye(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:uD(e.onKeyDown),onKeyUp:uD(e.onKeyUp)}}}let FE=M.createContext(null);function hye(e){let t=M.useContext(FE)||{};Kj(t,e);let{ref:n,...r}=t;return r}function gye(e,t){let{focusProps:n}=fq(e),{keyboardProps:r}=mye(e),o=Vn(n,r),i=hye(t),s=e.isDisabled?{}:i,a=M.useRef(e.autoFocus);M.useEffect(()=>{a.current&&t.current&&oo(t.current),a.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:Vn({...o,tabIndex:l},s)}}function pq(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=M.useRef({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:a}=nb(),l=M.useCallback(f=>{f.currentTarget.contains(f.target)&&i.current.isFocusWithin&&!f.currentTarget.contains(f.relatedTarget)&&(i.current.isFocusWithin=!1,a(),n&&n(f),o&&o(!1))},[n,o,i,a]),c=oq(l),d=M.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const m=Wt(f.target),g=nr(m);if(!i.current.isFocusWithin&&g===$t(f.nativeEvent)){r&&r(f),o&&o(!0),i.current.isFocusWithin=!0,c(f);let v=f.currentTarget;s(m,"focus",b=>{if(i.current.isFocusWithin&&!un(v,b.target)){let x=new m.defaultView.FocusEvent("blur",{relatedTarget:b.target});rq(x,v);let y=PS(x);l(y)}},{capture:!0})}},[r,o,c,s,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:l}}}let iv=!1,eg=0;function LE(){iv=!0,setTimeout(()=>{iv=!1},50)}function cD(e){e.pointerType==="touch"&&LE()}function vye(){if(!(typeof document>"u"))return eg===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",cD):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",LE)),eg++,()=>{eg--,!(eg>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",cD):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",LE))}}function mq(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,s]=M.useState(!1),a=M.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;M.useEffect(vye,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=nb(),{hoverProps:d,triggerHoverEnd:f}=M.useMemo(()=>{let m=(b,x)=>{if(a.pointerType=x,o||x==="touch"||a.isHovered||!b.currentTarget.contains(b.target))return;a.isHovered=!0;let y=b.currentTarget;a.target=y,l(Wt(b.target),"pointerover",_=>{a.isHovered&&a.target&&!un(a.target,_.target)&&g(_,_.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:y,pointerType:x}),n&&n(!0),s(!0)},g=(b,x)=>{let y=a.target;a.pointerType="",a.target=null,!(x==="touch"||!a.isHovered||!y)&&(a.isHovered=!1,c(),r&&r({type:"hoverend",target:y,pointerType:x}),n&&n(!1),s(!1))},v={};return typeof PointerEvent<"u"?(v.onPointerEnter=b=>{iv&&b.pointerType==="mouse"||m(b,b.pointerType)},v.onPointerLeave=b=>{!o&&b.currentTarget.contains(b.target)&&g(b,b.pointerType)}):process.env.NODE_ENV==="test"&&(v.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},v.onMouseEnter=b=>{!a.ignoreEmulatedMouseEvents&&!iv&&m(b,"mouse"),a.ignoreEmulatedMouseEvents=!1},v.onMouseLeave=b=>{!o&&b.currentTarget.contains(b.target)&&g(b,"mouse")}),{hoverProps:v,triggerHoverEnd:g}},[t,n,r,o,a,l,c]);return M.useEffect(()=>{o&&f({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:d,isHovered:i}}const bye=500;function yye(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:o,threshold:i=bye,accessibilityDescription:s}=e;const a=M.useRef(void 0);let{addGlobalListener:l,removeGlobalListener:c}=nb(),{pressProps:d}=TS({isDisabled:t,onPressStart(m){if(m.continuePropagation(),(m.pointerType==="mouse"||m.pointerType==="touch")&&(n&&n({...m,type:"longpressstart"}),a.current=setTimeout(()=>{m.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),Wt(m.target).activeElement!==m.target&&Zi(m.target),o&&o({...m,type:"longpress"}),a.current=void 0},i),m.pointerType==="touch")){let g=v=>{v.preventDefault()};l(m.target,"contextmenu",g,{once:!0}),l(window,"pointerup",()=>{setTimeout(()=>{c(m.target,"contextmenu",g)},30)},{once:!0})}},onPressEnd(m){a.current&&clearTimeout(a.current),r&&(m.pointerType==="mouse"||m.pointerType==="touch")&&r({...m,type:"longpressend"})}}),f=Uj(o&&!t?s:void 0);return{longPressProps:Vn(d,f)}}const dD=M.createContext(null),jE="react-aria-focus-scope-restore";let sn=null;function xye(e){let{children:t,contain:n,restoreFocus:r,autoFocus:o}=e,i=M.useRef(null),s=M.useRef(null),a=M.useRef([]),{parentNode:l}=M.useContext(dD)||{},c=M.useMemo(()=>new BE({scopeRef:a}),[a]);_n(()=>{let m=l||An.root;if(An.getTreeNode(m.scopeRef)&&sn&&!sv(sn,m.scopeRef)){let g=An.getTreeNode(sn);g&&(m=g)}m.addChild(c),An.addNode(c)},[c,l]),_n(()=>{let m=An.getTreeNode(a);m&&(m.contain=!!n)},[n]),_n(()=>{var m;let g=(m=i.current)===null||m===void 0?void 0:m.nextSibling,v=[],b=x=>x.stopPropagation();for(;g&&g!==s.current;)v.push(g),g.addEventListener(jE,b),g=g.nextSibling;return a.current=v,()=>{for(let x of v)x.removeEventListener(jE,b)}},[t]),Sye(a,r,n),Cye(a,n),Pye(a,r,n),Rye(a,o),M.useEffect(()=>{const m=nr(Wt(a.current?a.current[0]:void 0));let g=null;if(go(m,a.current)){for(let v of An.traverse())v.scopeRef&&go(m,v.scopeRef.current)&&(g=v);g===An.getTreeNode(a)&&(sn=g.scopeRef)}},[a]),_n(()=>()=>{var m,g,v;let b=(v=(g=An.getTreeNode(a))===null||g===void 0||(m=g.parent)===null||m===void 0?void 0:m.scopeRef)!==null&&v!==void 0?v:null;(a===sn||sv(a,sn))&&(!b||An.getTreeNode(b))&&(sn=b),An.removeTreeNode(a)},[a]);let d=M.useMemo(()=>Eye(a),[]),f=M.useMemo(()=>({focusManager:d,parentNode:c}),[c,d]);return M.createElement(dD.Provider,{value:f},M.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:i}),t,M.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:s}))}function Eye(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:o,wrap:i,accept:s}=t;var a;let l=r||nr(Wt((a=n[0])!==null&&a!==void 0?a:void 0)),c=n[0].previousElementSibling,d=ya(n),f=fo(d,{tabbable:o,accept:s},n);f.currentNode=go(l,n)?l:c;let m=f.nextNode();return!m&&i&&(f.currentNode=c,m=f.nextNode()),m&&Vi(m,!0),m},focusPrevious(t={}){let n=e.current,{from:r,tabbable:o,wrap:i,accept:s}=t;var a;let l=r||nr(Wt((a=n[0])!==null&&a!==void 0?a:void 0)),c=n[n.length-1].nextElementSibling,d=ya(n),f=fo(d,{tabbable:o,accept:s},n);f.currentNode=go(l,n)?l:c;let m=f.previousNode();return!m&&i&&(f.currentNode=c,m=f.previousNode()),m&&Vi(m,!0),m},focusFirst(t={}){let n=e.current,{tabbable:r,accept:o}=t,i=ya(n),s=fo(i,{tabbable:r,accept:o},n);s.currentNode=n[0].previousElementSibling;let a=s.nextNode();return a&&Vi(a,!0),a},focusLast(t={}){let n=e.current,{tabbable:r,accept:o}=t,i=ya(n),s=fo(i,{tabbable:r,accept:o},n);s.currentNode=n[n.length-1].nextElementSibling;let a=s.previousNode();return a&&Vi(a,!0),a}}}function ya(e){return e[0].parentElement}function Gf(e){let t=An.getTreeNode(sn);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function wye(e){if(e.checked)return!0;let t=[];if(!e.form)t=[...Wt(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)].filter(i=>!i.form);else{var n,r;let i=(r=e.form)===null||r===void 0||(n=r.elements)===null||n===void 0?void 0:n.namedItem(e.name);t=[...i??[]]}return t?!t.some(i=>i.checked):!1}function Cye(e,t){let n=M.useRef(void 0),r=M.useRef(void 0);_n(()=>{let o=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const i=Wt(o?o[0]:void 0);let s=c=>{if(c.key!=="Tab"||c.altKey||c.ctrlKey||c.metaKey||!Gf(e)||c.isComposing)return;let d=nr(i),f=e.current;if(!f||!go(d,f))return;let m=ya(f),g=fo(m,{tabbable:!0},f);if(!d)return;g.currentNode=d;let v=c.shiftKey?g.previousNode():g.nextNode();v||(g.currentNode=c.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,v=c.shiftKey?g.previousNode():g.nextNode()),c.preventDefault(),v&&Vi(v,!0)},a=c=>{(!sn||sv(sn,e))&&go($t(c),e.current)?(sn=e,n.current=$t(c)):Gf(e)&&!xa($t(c),e)?n.current?n.current.focus():sn&&sn.current&&qE(sn.current):Gf(e)&&(n.current=$t(c))},l=c=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let d=ov(),f=(d==="virtual"||d===null)&&ES()&&xS(),m=nr(i);if(!f&&m&&Gf(e)&&!xa(m,e)){sn=e;let v=$t(c);if(v&&v.isConnected){var g;n.current=v,(g=n.current)===null||g===void 0||g.focus()}else sn.current&&qE(sn.current)}})};return i.addEventListener("keydown",s,!1),i.addEventListener("focusin",a,!1),o?.forEach(c=>c.addEventListener("focusin",a,!1)),o?.forEach(c=>c.addEventListener("focusout",l,!1)),()=>{i.removeEventListener("keydown",s,!1),i.removeEventListener("focusin",a,!1),o?.forEach(c=>c.removeEventListener("focusin",a,!1)),o?.forEach(c=>c.removeEventListener("focusout",l,!1))}},[e,t]),_n(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function hq(e){return xa(e)}function go(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function xa(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of An.traverse(An.getTreeNode(t)))if(n&&go(e,n.current))return!0;return!1}function sv(e,t){var n;let r=(n=An.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function Vi(e,t=!1){if(e!=null&&!t)try{oo(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function gq(e,t=!0){let n=e[0].previousElementSibling,r=ya(e),o=fo(r,{tabbable:t},e);o.currentNode=n;let i=o.nextNode();return t&&!i&&(r=ya(e),o=fo(r,{tabbable:!1},e),o.currentNode=n,i=o.nextNode()),i}function qE(e,t=!0){Vi(gq(e,t))}function Rye(e,t){const n=M.useRef(t);M.useEffect(()=>{if(n.current){sn=e;const r=Wt(e.current?e.current[0]:void 0);!go(nr(r),sn.current)&&e.current&&qE(e.current)}n.current=!1},[e])}function Sye(e,t,n){_n(()=>{if(t||n)return;let r=e.current;const o=Wt(r?r[0]:void 0);let i=s=>{let a=$t(s);go(a,e.current)?sn=e:hq(a)||(sn=null)};return o.addEventListener("focusin",i,!1),r?.forEach(s=>s.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),r?.forEach(s=>s.removeEventListener("focusin",i,!1))}},[e,t,n])}function fD(e){let t=An.getTreeNode(sn);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function Pye(e,t,n){const r=M.useRef(typeof document<"u"?nr(Wt(e.current?e.current[0]:void 0)):null);_n(()=>{let o=e.current;const i=Wt(o?o[0]:void 0);if(!t||n)return;let s=()=>{(!sn||sv(sn,e))&&go(nr(i),e.current)&&(sn=e)};return i.addEventListener("focusin",s,!1),o?.forEach(a=>a.addEventListener("focusin",s,!1)),()=>{i.removeEventListener("focusin",s,!1),o?.forEach(a=>a.removeEventListener("focusin",s,!1))}},[e,n]),_n(()=>{const o=Wt(e.current?e.current[0]:void 0);if(!t)return;let i=s=>{if(s.key!=="Tab"||s.altKey||s.ctrlKey||s.metaKey||!Gf(e)||s.isComposing)return;let a=o.activeElement;if(!xa(a,e)||!fD(e))return;let l=An.getTreeNode(e);if(!l)return;let c=l.nodeToRestore,d=fo(o.body,{tabbable:!0});d.currentNode=a;let f=s.shiftKey?d.previousNode():d.nextNode();if((!c||!c.isConnected||c===o.body)&&(c=void 0,l.nodeToRestore=void 0),(!f||!xa(f,e))&&c){d.currentNode=c;do f=s.shiftKey?d.previousNode():d.nextNode();while(xa(f,e));s.preventDefault(),s.stopPropagation(),f?Vi(f,!0):hq(c)?Vi(c,!0):a.blur()}};return n||o.addEventListener("keydown",i,!0),()=>{n||o.removeEventListener("keydown",i,!0)}},[e,t,n]),_n(()=>{const o=Wt(e.current?e.current[0]:void 0);if(!t)return;let i=An.getTreeNode(e);if(i){var s;return i.nodeToRestore=(s=r.current)!==null&&s!==void 0?s:void 0,()=>{let a=An.getTreeNode(e);if(!a)return;let l=a.nodeToRestore,c=nr(o);if(t&&l&&(c&&xa(c,e)||c===o.body&&fD(e))){let d=An.clone();requestAnimationFrame(()=>{if(o.activeElement===o.body){let f=d.getTreeNode(e);for(;f;){if(f.nodeToRestore&&f.nodeToRestore.isConnected){pD(f.nodeToRestore);return}f=f.parent}for(f=d.getTreeNode(e);f;){if(f.scopeRef&&f.scopeRef.current&&An.getTreeNode(f.scopeRef)){let m=gq(f.scopeRef.current,!0);pD(m);return}f=f.parent}}})}}}},[e,t])}function pD(e){e.dispatchEvent(new CustomEvent(jE,{bubbles:!0,cancelable:!0}))&&Vi(e)}function fo(e,t,n){let r=t?.tabbable?Abe:Gj,o=e?.nodeType===Node.ELEMENT_NODE?e:null,i=Wt(o),s=tbe(i,e||i,NodeFilter.SHOW_ELEMENT,{acceptNode(a){var l;return!(t==null||(l=t.from)===null||l===void 0)&&l.contains(a)||t?.tabbable&&a.tagName==="INPUT"&&a.getAttribute("type")==="radio"&&(!wye(a)||s.currentNode.tagName==="INPUT"&&s.currentNode.type==="radio"&&s.currentNode.name===a.name)?NodeFilter.FILTER_REJECT:r(a)&&(!n||go(a,n))&&(!t?.accept||t.accept(a))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(s.currentNode=t.from),s}class MS{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let o=this.fastMap.get(n??null);if(!o)return;let i=new BE({scopeRef:t});o.addChild(i),i.parent=o,this.fastMap.set(t,i),r&&(i.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let i of this.traverse())i!==n&&n.nodeToRestore&&i.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&go(i.nodeToRestore,n.scopeRef.current)&&(i.nodeToRestore=n.nodeToRestore);let o=n.children;r&&(r.removeChild(n),o.size>0&&o.forEach(i=>r&&r.addChild(i))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new MS;var r;for(let o of this.traverse())n.addTreeNode(o.scopeRef,(r=(t=o.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,o.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new BE({scopeRef:null}),this.fastMap.set(null,this.root)}}class BE{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let An=new MS;function av(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=M.useRef({isFocused:!1,isFocusVisible:t||OS()}),[i,s]=M.useState(!1),[a,l]=M.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=M.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),d=M.useCallback(g=>{o.current.isFocused=g,s(g),c()},[c]);pye(g=>{o.current.isFocusVisible=g,c()},[],{isTextInput:n});let{focusProps:f}=fq({isDisabled:r,onFocusChange:d}),{focusWithinProps:m}=pq({isDisabled:!r,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:a,focusProps:r?m:f}}function Tye(e,t){let n=t?.isDisabled,[r,o]=M.useState(!1);return _n(()=>{if(e?.current&&!n){let i=()=>{if(e.current){let a=fo(e.current,{tabbable:!0});o(!!a.nextNode())}};i();let s=new MutationObserver(i);return s.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{s.disconnect()}}}),n?!1:r}function vq(e){let t=Nye(Wt(e));t!==e&&(t&&_ye(t,e),e&&bq(e,t))}function _ye(e,t){e.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}function bq(e,t){e.dispatchEvent(new FocusEvent("focus",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:t}))}function Nye(e){let t=nr(e),n=t?.getAttribute("aria-activedescendant");return n&&e.getElementById(n)||t}const mD={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function IS(e={}){let{style:t,isFocusable:n}=e,[r,o]=M.useState(!1),{focusWithinProps:i}=pq({isDisabled:!n,onFocusWithinChange:a=>o(a)}),s=M.useMemo(()=>r?t:t?{...mD,...t}:mD,[r]);return{visuallyHiddenProps:{...i,style:s}}}function VE(e){return fbe()?e.altKey:e.ctrlKey}function vg(e,t){var n,r;let o=`[data-key="${CSS.escape(String(t))}"]`,i=(n=e.current)===null||n===void 0?void 0:n.dataset.collection;return i&&(o=`[data-collection="${CSS.escape(i)}"]${o}`),(r=e.current)===null||r===void 0?void 0:r.querySelector(o)}const yq=new WeakMap;function Oye(e){let t=Xi();return yq.set(e,t),t}function Mye(e){return yq.get(e)}const Iye=1e3;function Dye(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,o=M.useRef({search:"",timeout:void 0}).current,i=s=>{let a=Aye(s.key);if(!(!a||s.ctrlKey||s.metaKey||!s.currentTarget.contains(s.target)||o.search.length===0&&a===" ")){if(a===" "&&o.search.trim().length>0&&(s.preventDefault(),"continuePropagation"in s||s.stopPropagation()),o.search+=a,t.getKeyForSearch!=null){let l=t.getKeyForSearch(o.search,n.focusedKey);l==null&&(l=t.getKeyForSearch(o.search)),l!=null&&(n.setFocusedKey(l),r&&r(l))}clearTimeout(o.timeout),o.timeout=setTimeout(()=>{o.search=""},Iye)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?i:void 0}}}function Aye(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function kye(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:o=!1,shouldFocusWrap:i=!1,disallowEmptySelection:s=!1,disallowSelectAll:a=!1,escapeKeyBehavior:l="clearSelection",selectOnFocus:c=t.selectionBehavior==="replace",disallowTypeAhead:d=!1,shouldUseVirtualFocus:f,allowsTabNavigation:m=!1,isVirtualized:g,scrollRef:v=r,linkBehavior:b="action"}=e,{direction:x}=dm(),y=wS(),_=A=>{var L;if(A.altKey&&A.key==="Tab"&&A.preventDefault(),!(!((L=r.current)===null||L===void 0)&&L.contains(A.target)))return;const H=(Q,me)=>{if(Q!=null){if(t.isLink(Q)&&b==="selection"&&c&&!VE(A)){_o.flushSync(()=>{t.setFocusedKey(Q,me)});let ve=vg(r,Q),xe=t.getItemProps(Q);ve&&y.open(ve,A,xe.href,xe.routerOptions);return}if(t.setFocusedKey(Q,me),t.isLink(Q)&&b==="override")return;A.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Q):c&&!VE(A)&&t.replaceSelection(Q)}};switch(A.key){case"ArrowDown":if(n.getKeyBelow){var V,X,K;let Q=t.focusedKey!=null?(V=n.getKeyBelow)===null||V===void 0?void 0:V.call(n,t.focusedKey):(X=n.getFirstKey)===null||X===void 0?void 0:X.call(n);Q==null&&i&&(Q=(K=n.getFirstKey)===null||K===void 0?void 0:K.call(n,t.focusedKey)),Q!=null&&(A.preventDefault(),H(Q))}break;case"ArrowUp":if(n.getKeyAbove){var G,ee,Z;let Q=t.focusedKey!=null?(G=n.getKeyAbove)===null||G===void 0?void 0:G.call(n,t.focusedKey):(ee=n.getLastKey)===null||ee===void 0?void 0:ee.call(n);Q==null&&i&&(Q=(Z=n.getLastKey)===null||Z===void 0?void 0:Z.call(n,t.focusedKey)),Q!=null&&(A.preventDefault(),H(Q))}break;case"ArrowLeft":if(n.getKeyLeftOf){var te,J,ne;let Q=t.focusedKey!=null?(te=n.getKeyLeftOf)===null||te===void 0?void 0:te.call(n,t.focusedKey):null;Q==null&&i&&(Q=x==="rtl"?(J=n.getFirstKey)===null||J===void 0?void 0:J.call(n,t.focusedKey):(ne=n.getLastKey)===null||ne===void 0?void 0:ne.call(n,t.focusedKey)),Q!=null&&(A.preventDefault(),H(Q,x==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var U,ie,se;let Q=t.focusedKey!=null?(U=n.getKeyRightOf)===null||U===void 0?void 0:U.call(n,t.focusedKey):null;Q==null&&i&&(Q=x==="rtl"?(ie=n.getLastKey)===null||ie===void 0?void 0:ie.call(n,t.focusedKey):(se=n.getFirstKey)===null||se===void 0?void 0:se.call(n,t.focusedKey)),Q!=null&&(A.preventDefault(),H(Q,x==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(t.focusedKey===null&&A.shiftKey)return;A.preventDefault();let Q=n.getFirstKey(t.focusedKey,Sl(A));t.setFocusedKey(Q),Q!=null&&(Sl(A)&&A.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Q):c&&t.replaceSelection(Q))}break;case"End":if(n.getLastKey){if(t.focusedKey===null&&A.shiftKey)return;A.preventDefault();let Q=n.getLastKey(t.focusedKey,Sl(A));t.setFocusedKey(Q),Q!=null&&(Sl(A)&&A.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Q):c&&t.replaceSelection(Q))}break;case"PageDown":if(n.getKeyPageBelow&&t.focusedKey!=null){let Q=n.getKeyPageBelow(t.focusedKey);Q!=null&&(A.preventDefault(),H(Q))}break;case"PageUp":if(n.getKeyPageAbove&&t.focusedKey!=null){let Q=n.getKeyPageAbove(t.focusedKey);Q!=null&&(A.preventDefault(),H(Q))}break;case"a":Sl(A)&&t.selectionMode==="multiple"&&a!==!0&&(A.preventDefault(),t.selectAll());break;case"Escape":l==="clearSelection"&&!s&&t.selectedKeys.size!==0&&(A.stopPropagation(),A.preventDefault(),t.clearSelection());break;case"Tab":if(!m){if(A.shiftKey)r.current.focus();else{let Q=fo(r.current,{tabbable:!0}),me,ve;do ve=Q.lastChild(),ve&&(me=ve);while(ve);me&&!me.contains(document.activeElement)&&Zi(me)}break}}},w=M.useRef({top:0,left:0});Zh(v,"scroll",g?void 0:()=>{var A,L,H,V;w.current={top:(H=(A=v.current)===null||A===void 0?void 0:A.scrollTop)!==null&&H!==void 0?H:0,left:(V=(L=v.current)===null||L===void 0?void 0:L.scrollLeft)!==null&&V!==void 0?V:0}});let T=A=>{if(t.isFocused){A.currentTarget.contains(A.target)||t.setFocused(!1);return}if(A.currentTarget.contains(A.target)){if(t.setFocused(!0),t.focusedKey==null){var L,H;let K=ee=>{ee!=null&&(t.setFocusedKey(ee),c&&!t.isSelected(ee)&&t.replaceSelection(ee))},G=A.relatedTarget;var V,X;G&&A.currentTarget.compareDocumentPosition(G)&Node.DOCUMENT_POSITION_FOLLOWING?K((V=t.lastSelectedKey)!==null&&V!==void 0?V:(L=n.getLastKey)===null||L===void 0?void 0:L.call(n)):K((X=t.firstSelectedKey)!==null&&X!==void 0?X:(H=n.getFirstKey)===null||H===void 0?void 0:H.call(n))}else!g&&v.current&&(v.current.scrollTop=w.current.top,v.current.scrollLeft=w.current.left);if(t.focusedKey!=null&&v.current){let K=vg(r,t.focusedKey);K instanceof HTMLElement&&(!K.contains(document.activeElement)&&!f&&Zi(K),ov()==="keyboard"&&xs(K,{containingElement:r.current}))}}},R=A=>{A.currentTarget.contains(A.relatedTarget)||t.setFocused(!1)},S=M.useRef(!1);Zh(r,_be,f?A=>{let{detail:L}=A;A.stopPropagation(),t.setFocused(!0),L?.focusStrategy==="first"&&(S.current=!0)}:void 0);let P=hr(()=>{var A,L;let H=(L=(A=n.getFirstKey)===null||A===void 0?void 0:A.call(n))!==null&&L!==void 0?L:null;if(H==null){let V=nr();vq(r.current),bq(V,null),t.collection.size>0&&(S.current=!1)}else t.setFocusedKey(H),S.current=!1});GI(()=>{S.current&&P()},[t.collection,P]);let N=hr(()=>{t.collection.size>0&&(S.current=!1)});GI(()=>{N()},[t.focusedKey,N]),Zh(r,Tbe,f?A=>{var L;A.stopPropagation(),t.setFocused(!1),!((L=A.detail)===null||L===void 0)&&L.clearFocusKey&&t.setFocusedKey(null)}:void 0);const F=M.useRef(o),W=M.useRef(!1);M.useEffect(()=>{if(F.current){var A,L;let X=null;var H;o==="first"&&(X=(H=(A=n.getFirstKey)===null||A===void 0?void 0:A.call(n))!==null&&H!==void 0?H:null);var V;o==="last"&&(X=(V=(L=n.getLastKey)===null||L===void 0?void 0:L.call(n))!==null&&V!==void 0?V:null);let K=t.selectedKeys;if(K.size){for(let G of K)if(t.canSelectItem(G)){X=G;break}}t.setFocused(!0),t.setFocusedKey(X),X==null&&!f&&r.current&&oo(r.current),t.collection.size>0&&(F.current=!1,W.current=!0)}});let I=M.useRef(t.focusedKey),B=M.useRef(null);M.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==I.current||W.current)&&v.current&&r.current){let A=ov(),L=vg(r,t.focusedKey);if(!(L instanceof HTMLElement))return;(A==="keyboard"||W.current)&&(B.current&&cancelAnimationFrame(B.current),B.current=requestAnimationFrame(()=>{v.current&&(zj(v.current,L),A!=="virtual"&&xs(L,{containingElement:r.current}))}))}!f&&t.isFocused&&t.focusedKey==null&&I.current!=null&&r.current&&oo(r.current),I.current=t.focusedKey,W.current=!1}),M.useEffect(()=>()=>{B.current&&cancelAnimationFrame(B.current)},[]),Zh(r,"react-aria-focus-scope-restore",A=>{A.preventDefault(),t.setFocused(!0)});let $={onKeyDown:_,onFocus:T,onBlur:R,onMouseDown(A){v.current===A.target&&A.preventDefault()}},{typeSelectProps:k}=Dye({keyboardDelegate:n,selectionManager:t});d||($=Vn(k,$));let j;f||(j=t.focusedKey==null?0:-1);let D=Oye(t.collection);return{collectionProps:Vn($,{tabIndex:j,"data-collection":D})}}function $ye(e){let{id:t,selectionManager:n,key:r,ref:o,shouldSelectOnPressUp:i,shouldUseVirtualFocus:s,focus:a,isDisabled:l,onAction:c,allowsDifferentPressOrigin:d,linkBehavior:f="action"}=e,m=wS();t=Xi(t);let g=V=>{if(V.pointerType==="keyboard"&&VE(V))n.toggleSelection(r);else{if(n.selectionMode==="none")return;if(n.isLink(r)){if(f==="selection"&&o.current){let X=n.getItemProps(r);m.open(o.current,V,X.href,X.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(f==="override"||f==="none")return}n.selectionMode==="single"?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):V&&V.shiftKey?n.extendSelection(r):n.selectionBehavior==="toggle"||V&&(Sl(V)||V.pointerType==="touch"||V.pointerType==="virtual")?n.toggleSelection(r):n.replaceSelection(r)}};M.useEffect(()=>{r===n.focusedKey&&n.isFocused&&(s?vq(o.current):a?a():document.activeElement!==o.current&&o.current&&oo(o.current))},[o,r,n.focusedKey,n.childFocusStrategy,n.isFocused,s]),l=l||n.isDisabled(r);let v={};!s&&!l?v={tabIndex:r===n.focusedKey?0:-1,onFocus(V){V.target===o.current&&n.setFocusedKey(r)}}:l&&(v.onMouseDown=V=>{V.preventDefault()});let b=n.isLink(r)&&f==="override",x=c&&e.UNSTABLE_itemBehavior==="action",y=n.isLink(r)&&f!=="selection"&&f!=="none",_=!l&&n.canSelectItem(r)&&!b&&!x,w=(c||y)&&!l,T=w&&(n.selectionBehavior==="replace"?!_:!_||n.isEmpty),R=w&&_&&n.selectionBehavior==="replace",S=T||R,P=M.useRef(null),N=S&&_,F=M.useRef(!1),W=M.useRef(!1),I=n.getItemProps(r),B=V=>{if(c){var X;c(),(X=o.current)===null||X===void 0||X.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}))}y&&o.current&&m.open(o.current,V,I.href,I.routerOptions)},$={ref:o};if(i?($.onPressStart=V=>{P.current=V.pointerType,F.current=N,V.pointerType==="keyboard"&&(!S||gD())&&g(V)},d?($.onPressUp=T?void 0:V=>{V.pointerType==="mouse"&&_&&g(V)},$.onPress=T?B:V=>{V.pointerType!=="keyboard"&&V.pointerType!=="mouse"&&_&&g(V)}):$.onPress=V=>{if(T||R&&V.pointerType!=="mouse"){if(V.pointerType==="keyboard"&&!hD())return;B(V)}else V.pointerType!=="keyboard"&&_&&g(V)}):($.onPressStart=V=>{P.current=V.pointerType,F.current=N,W.current=T,_&&(V.pointerType==="mouse"&&!T||V.pointerType==="keyboard"&&(!w||gD()))&&g(V)},$.onPress=V=>{(V.pointerType==="touch"||V.pointerType==="pen"||V.pointerType==="virtual"||V.pointerType==="keyboard"&&S&&hD()||V.pointerType==="mouse"&&W.current)&&(S?B(V):_&&g(V))}),v["data-collection"]=Mye(n.collection),v["data-key"]=r,$.preventFocusOnPress=s,s&&($=Vn($,{onPressStart(V){V.pointerType!=="touch"&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(V){V.pointerType==="touch"&&(n.setFocused(!0),n.setFocusedKey(r))}})),I)for(let V of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])I[V]&&($[V]=Qv($[V],I[V]));let{pressProps:k,isPressed:j}=TS($),D=R?V=>{P.current==="mouse"&&(V.stopPropagation(),V.preventDefault(),B(V))}:void 0,{longPressProps:A}=yye({isDisabled:!N,onLongPress(V){V.pointerType==="touch"&&(g(V),n.setSelectionBehavior("toggle"))}}),L=V=>{P.current==="touch"&&F.current&&V.preventDefault()},H=f!=="none"&&n.isLink(r)?V=>{Ma.isOpening||V.preventDefault()}:void 0;return{itemProps:Vn(v,_||T||s&&!l?k:{},N?A:{},{onDoubleClick:D,onDragStartCapture:L,onClick:H,id:t},s?{onMouseDown:V=>V.preventDefault()}:void 0),isPressed:j,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:l,allowsSelection:_,hasAction:S}}function hD(){let e=window.event;return e?.key==="Enter"}function gD(){let e=window.event;return e?.key===" "||e?.code==="Space"}class vD{getItemRect(t){let n=this.ref.current;if(!n)return null;let r=t!=null?vg(this.ref,t):null;if(!r)return null;let o=n.getBoundingClientRect(),i=r.getBoundingClientRect();return{x:i.left-o.left-n.clientLeft+n.scrollLeft,y:i.top-o.top-n.clientTop+n.scrollTop,width:i.width,height:i.height}}getContentSize(){let t=this.ref.current;var n,r;return{width:(n=t?.scrollWidth)!==null&&n!==void 0?n:0,height:(r=t?.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let t=this.ref.current;var n,r,o,i;return{x:(n=t?.scrollLeft)!==null&&n!==void 0?n:0,y:(r=t?.scrollTop)!==null&&r!==void 0?r:0,width:(o=t?.clientWidth)!==null&&o!==void 0?o:0,height:(i=t?.clientHeight)!==null&&i!==void 0?i:0}}constructor(t){this.ref=t}}class xq{isDisabled(t){var n;return this.disabledBehavior==="all"&&(((n=t.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(t.key))}findNextNonDisabled(t,n){let r=t;for(;r!=null;){let o=this.collection.getItem(r);if(o?.type==="item"&&!this.isDisabled(o))return r;r=n(r)}return null}getNextKey(t){let n=t;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,r=>this.collection.getKeyAfter(r))}getPreviousKey(t){let n=t;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,r=>this.collection.getKeyBefore(r))}findKey(t,n,r){let o=t,i=this.layoutDelegate.getItemRect(o);if(!i||o==null)return null;let s=i;do{if(o=n(o),o==null)break;i=this.layoutDelegate.getItemRect(o)}while(i&&r(s,i)&&o!=null);return o}isSameRow(t,n){return t.y===n.y||t.x!==n.x}isSameColumn(t,n){return t.x===n.x||t.y!==n.y}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,n){return n?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyAfter(n))}getLastKey(){let t=this.collection.getLastKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!vp(n))return this.getFirstKey();let o=t;if(this.orientation==="horizontal"){let i=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>i&&o!=null;)o=this.getKeyAbove(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>i&&o!=null;)o=this.getKeyAbove(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getFirstKey()}getKeyPageBelow(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!vp(n))return this.getLastKey();let o=t;if(this.orientation==="horizontal"){let i=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<i&&o!=null;)o=this.getKeyBelow(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<i&&o!=null;)o=this.getKeyBelow(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getLastKey()}getKeyForSearch(t,n){if(!this.collator)return null;let r=this.collection,o=n||this.getFirstKey();for(;o!=null;){let i=r.getItem(o);if(!i)return null;let s=i.textValue.slice(0,t.length);if(i.textValue&&this.collator.compare(s,t)===0)return o;o=this.getNextKey(o)}return null}constructor(...t){if(t.length===1){let n=t[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new vD(n.ref)}else this.collection=t[0],this.disabledKeys=t[1],this.ref=t[2],this.collator=t[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new vD(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function Fye(e){let{selectionManager:t,collection:n,disabledKeys:r,ref:o,keyboardDelegate:i,layoutDelegate:s}=e,a=nq({usage:"search",sensitivity:"base"}),l=t.disabledBehavior,c=M.useMemo(()=>i||new xq({collection:n,disabledKeys:r,disabledBehavior:l,ref:o,collator:a,layoutDelegate:s}),[i,s,n,r,o,a,l]),{collectionProps:d}=kye({...e,ref:o,selectionManager:t,keyboardDelegate:c});return{listProps:d}}class Lye{build(t,n){return this.context=n,bD(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:n,items:r}=t;if(M.isValidElement(n)&&n.type===M.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let o=0;for(let i of r)yield*this.getFullNode({value:i,index:o},{renderer:n}),o++}else{let o=[];M.Children.forEach(n,s=>{s&&o.push(s)});let i=0;for(let s of o){let a=this.getFullNode({element:s,index:i},{});for(let l of a)i++,yield l}}}getKey(t,n,r,o){if(t.key!=null)return t.key;if(n.type==="cell"&&n.key!=null)return`${o}${n.key}`;let i=n.value;if(i!=null){var s;let a=(s=i.key)!==null&&s!==void 0?s:i.id;if(a==null)throw new Error("No key found for item");return a}return o?`${o}.${n.index}`:`$.${n.index}`}getChildState(t,n){return{renderer:n.renderer||t.renderer}}*getFullNode(t,n,r,o){if(M.isValidElement(t.element)&&t.element.type===M.Fragment){let x=[];M.Children.forEach(t.element.props.children,_=>{x.push(_)});var i;let y=(i=t.index)!==null&&i!==void 0?i:0;for(const _ of x)yield*this.getFullNode({element:_,index:y++},n,r,o);return}let s=t.element;if(!s&&t.value&&n&&n.renderer){let x=this.cache.get(t.value);if(x&&(!x.shouldInvalidate||!x.shouldInvalidate(this.context))){x.index=t.index,x.parentKey=o?o.key:null,yield x;return}s=n.renderer(t.value)}if(M.isValidElement(s)){let x=s.type;if(typeof x!="function"&&typeof x.getCollectionNode!="function"){let T=s.type;throw new Error(`Unknown element <${T}> in collection.`)}let y=x.getCollectionNode(s.props,this.context);var a;let _=(a=t.index)!==null&&a!==void 0?a:0,w=y.next();for(;!w.done&&w.value;){let T=w.value;t.index=_;var l;let R=(l=T.key)!==null&&l!==void 0?l:null;R==null&&(R=T.element?null:this.getKey(s,t,n,r));let P=[...this.getFullNode({...T,key:R,index:_,wrapper:jye(t.wrapper,T.wrapper)},this.getChildState(n,T),r?`${r}${s.key}`:s.key,o)];for(let N of P){var c,d;N.value=(d=(c=T.value)!==null&&c!==void 0?c:t.value)!==null&&d!==void 0?d:null,N.value&&this.cache.set(N.value,N);var f;if(t.type&&N.type!==t.type)throw new Error(`Unsupported type <${Nx(N.type)}> in <${Nx((f=o?.type)!==null&&f!==void 0?f:"unknown parent type")}>. Only <${Nx(t.type)}> is supported.`);_++,yield N}w=y.next(P)}return}if(t.key==null||t.type==null)return;let m=this;var g,v;let b={type:t.type,props:t.props,key:t.key,parentKey:o?o.key:null,value:(g=t.value)!==null&&g!==void 0?g:null,level:o?o.level+1:0,index:t.index,rendered:t.rendered,textValue:(v=t.textValue)!==null&&v!==void 0?v:"","aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes||!1,childNodes:bD(function*(){if(!t.hasChildNodes||!t.childNodes)return;let x=0;for(let y of t.childNodes()){y.key!=null&&(y.key=`${b.key}${y.key}`);let _=m.getFullNode({...y,index:x},m.getChildState(n,y),b.key,b);for(let w of _)x++,yield w}})};yield b}constructor(){this.cache=new WeakMap}}function bD(e){let t=[],n=null;return{*[Symbol.iterator](){for(let r of t)yield r;n||(n=e());for(let r of n)t.push(r),yield r}}}function jye(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function Nx(e){return e[0].toUpperCase()+e.slice(1)}function qye(e,t,n){let r=M.useMemo(()=>new Lye,[]),{children:o,items:i,collection:s}=e;return M.useMemo(()=>{if(s)return s;let l=r.build({children:o,items:i},n);return t(l)},[r,o,i,s,n,t])}function Bye(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function Vye(e){return Wye(e)}function Wye(e,t){for(let n of e)return n}function Ox(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...yD(e,t),t],o=[...yD(e,n),n],i=r.slice(0,o.length).findIndex((s,a)=>s!==o[a]);return i!==-1?(t=r[i],n=o[i],t.index-n.index):r.findIndex(s=>s===n)>=0?1:(o.findIndex(s=>s===t)>=0,-1)}function yD(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}class mu{get childNodes(){throw new Error("childNodes is not supported")}clone(){let t=new this.constructor(this.key);return t.value=this.value,t.level=this.level,t.hasChildNodes=this.hasChildNodes,t.rendered=this.rendered,t.textValue=this.textValue,t["aria-label"]=this["aria-label"],t.index=this.index,t.parentKey=this.parentKey,t.prevKey=this.prevKey,t.nextKey=this.nextKey,t.firstChildKey=this.firstChildKey,t.lastChildKey=this.lastChildKey,t.props=this.props,t.render=this.render,t.colSpan=this.colSpan,t.colIndex=this.colIndex,t}filter(t,n,r){let o=this.clone();return n.addDescendants(o,t),o}constructor(t){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=t}}class Eq extends mu{filter(t,n,r){let[o,i]=Cq(t,n,this.firstChildKey,r),s=this.clone();return s.firstChildKey=o,s.lastChildKey=i,s}}class Hye extends mu{}Hye.type="header";class wq extends mu{}wq.type="loader";class Kye extends Eq{filter(t,n,r){if(r(this.textValue,this)){let o=this.clone();return n.addDescendants(o,t),o}return null}}Kye.type="item";class Uye extends Eq{filter(t,n,r){let o=super.filter(t,n,r);if(o&&o.lastChildKey!==null){let i=t.getItem(o.lastChildKey);if(i&&i.type!=="header")return o}return null}}Uye.type="section";class zye{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let t=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;t;)yield t,t=t.nextKey!=null?this.keyMap.get(t.nextKey):void 0}getChildren(t){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(t),o=r?.firstChildKey!=null?n.get(r.firstChildKey):null;for(;o;)yield o,o=o.nextKey!=null?n.get(o.nextKey):void 0}}}getKeyBefore(t){let n=this.keyMap.get(t);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);var r;return(r=n?.key)!==null&&r!==void 0?r:null}return n.parentKey}getKeyAfter(t){let n=this.keyMap.get(t);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let t=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;t?.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);var n;return(n=t?.key)!==null&&n!==void 0?n:null}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(){throw new Error("Not implemented")}clone(){let t=this.constructor,n=new t;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n.itemCount=this.itemCount,n}addNode(t){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");t.type==="item"&&this.keyMap.get(t.key)==null&&this.itemCount++,this.keyMap.set(t.key,t)}addDescendants(t,n){this.addNode(t);let r=n.getChildren(t.key);for(let o of r)this.addDescendants(o,n)}removeNode(t){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");let n=this.keyMap.get(t);n!=null&&n.type==="item"&&this.itemCount--,this.keyMap.delete(t)}commit(t,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=t,this.lastKey=n,this.frozen=!r}filter(t){let n=new this.constructor,[r,o]=Cq(this,n,this.firstKey,t);return n?.commit(r,o),n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}}function Cq(e,t,n,r){if(n==null)return[null,null];let o=null,i=null,s=e.getItem(n);for(;s!=null;){let c=s.filter(e,t,r);c!=null&&(c.nextKey=null,i&&(c.prevKey=i.key,i.nextKey=c.key),o==null&&(o=c),t.addNode(c),i=c),s=s.nextKey?e.getItem(s.nextKey):null}if(i&&i.type==="separator"){let c=i.prevKey;t.removeNode(i.key),c?(i=t.getItem(c),i.nextKey=null):i=null}var a,l;return[(a=o?.key)!==null&&a!==void 0?a:null,(l=i?.key)!==null&&l!==void 0?l:null]}class Rq{*[Symbol.iterator](){let t=this.firstChild;for(;t;)yield t,t=t.nextSibling}get firstChild(){return this._firstChild}set firstChild(t){this._firstChild=t,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(t){this._lastChild=t,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(t){this._previousSibling=t,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(t){this._nextSibling=t,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(t){this._parentNode=t,this.ownerDocument.markDirty(this)}get isConnected(){var t;return((t=this.parentNode)===null||t===void 0?void 0:t.isConnected)||!1}invalidateChildIndices(t){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||t.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=t,this.ownerDocument.markDirty(this))}updateChildIndices(){let t=this._minInvalidChildIndex;for(;t;)t.index=t.previousSibling?t.previousSibling.index+1:0,t=t.nextSibling;this._minInvalidChildIndex=null}appendChild(t){t.parentNode&&t.parentNode.removeChild(t),this.firstChild==null&&(this.firstChild=t),this.lastChild?(this.lastChild.nextSibling=t,t.index=this.lastChild.index+1,t.previousSibling=this.lastChild):(t.previousSibling=null,t.index=0),t.parentNode=this,t.nextSibling=null,this.lastChild=t,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(t,n){if(n==null)return this.appendChild(t);t.parentNode&&t.parentNode.removeChild(t),t.nextSibling=n,t.previousSibling=n.previousSibling,t.index=n.index-1,this.firstChild===n?this.firstChild=t:n.previousSibling&&(n.previousSibling.nextSibling=t),n.previousSibling=t,t.parentNode=n.parentNode,this.invalidateChildIndices(t),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(t){t.parentNode===this&&(this._minInvalidChildIndex===t&&(this._minInvalidChildIndex=null),t.nextSibling&&(this.invalidateChildIndices(t.nextSibling),t.nextSibling.previousSibling=t.previousSibling),t.previousSibling&&(t.previousSibling.nextSibling=t.nextSibling),this.firstChild===t&&(this.firstChild=t.nextSibling),this.lastChild===t&&(this.lastChild=t.previousSibling),t.parentNode=null,t.nextSibling=null,t.previousSibling=null,t.index=0,this.ownerDocument.markDirty(t),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let t=this.previousSibling;for(;t&&t.isHidden;)t=t.previousSibling;return t}get nextVisibleSibling(){let t=this.nextSibling;for(;t&&t.isHidden;)t=t.nextSibling;return t}get firstVisibleChild(){let t=this.firstChild;for(;t&&t.isHidden;)t=t.nextSibling;return t}get lastVisibleChild(){let t=this.lastChild;for(;t&&t.isHidden;)t=t.previousSibling;return t}constructor(t){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=t}}class $l extends Rq{get index(){return this._index}set index(t){this._index=t,this.ownerDocument.markDirty(this)}get level(){var t;return this.parentNode instanceof $l?this.parentNode.level+(((t=this.node)===null||t===void 0?void 0:t.type)==="item"?1:0):0}getMutableNode(){return this.node==null?null:(this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){var t,n,r,o,i,s,a,l;let c=this.nextVisibleSibling,d=this.getMutableNode();if(d!=null){d.index=this.index,d.level=this.level;var f;d.parentKey=this.parentNode instanceof $l&&(f=(t=this.parentNode.node)===null||t===void 0?void 0:t.key)!==null&&f!==void 0?f:null;var m;d.prevKey=(m=(r=this.previousVisibleSibling)===null||r===void 0||(n=r.node)===null||n===void 0?void 0:n.key)!==null&&m!==void 0?m:null;var g;d.nextKey=(g=c==null||(o=c.node)===null||o===void 0?void 0:o.key)!==null&&g!==void 0?g:null,d.hasChildNodes=!!this.firstChild;var v;d.firstChildKey=(v=(s=this.firstVisibleChild)===null||s===void 0||(i=s.node)===null||i===void 0?void 0:i.key)!==null&&v!==void 0?v:null;var b;if(d.lastChildKey=(b=(l=this.lastVisibleChild)===null||l===void 0||(a=l.node)===null||a===void 0?void 0:a.key)!==null&&b!==void 0?b:null,(d.colSpan!=null||d.colIndex!=null)&&c){var x,y;let _=((x=d.colIndex)!==null&&x!==void 0?x:d.index)+((y=d.colSpan)!==null&&y!==void 0?y:1);if(c.node!=null&&_!==c.node.colIndex){let w=c.getMutableNode();w.colIndex=_}}}}setProps(t,n,r,o,i){let s,{value:a,textValue:l,id:c,...d}=t;if(this.node==null?(s=new r(c??`react-aria-${++this.ownerDocument.nodeId}`),this.node=s):s=this.getMutableNode(),d.ref=n,s.props=d,s.rendered=o,s.render=i,s.value=a,s.textValue=l||(typeof d.children=="string"?d.children:"")||t["aria-label"]||"",c!=null&&c!==s.key)throw new Error("Cannot change the id of an item");d.colSpan!=null&&(s.colSpan=d.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let t=this;return{get display(){return t.isHidden?"none":""},set display(n){let r=n==="none";if(t.isHidden!==r){var o,i;(((o=t.parentNode)===null||o===void 0?void 0:o.firstVisibleChild)===t||((i=t.parentNode)===null||i===void 0?void 0:i.lastVisibleChild)===t)&&t.ownerDocument.markDirty(t.parentNode);let s=t.previousVisibleSibling,a=t.nextVisibleSibling;s&&t.ownerDocument.markDirty(s),a&&t.ownerDocument.markDirty(a),t.isHidden=r,t.ownerDocument.markDirty(t)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(t,n){super(n),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}}class Gye extends Rq{get isConnected(){return!0}createElement(t){return new $l(t,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(t){this.dirtyNodes.add(t)}addNode(t){if(t.isHidden||t.node==null)return;let n=this.getMutableCollection();if(!n.getItem(t.node.key))for(let r of t)this.addNode(r);n.addNode(t.node)}removeNode(t){for(let n of t)this.removeNode(n);t.node&&this.getMutableCollection().removeNode(t.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let a of this.dirtyNodes)a instanceof $l&&(!a.isConnected||a.isHidden)?this.removeNode(a):a.updateChildIndices();for(let a of this.dirtyNodes)a instanceof $l?(a.isConnected&&!a.isHidden&&(a.updateNode(),this.addNode(a)),a.node&&this.dirtyNodes.delete(a),a.isMutated=!1):this.dirtyNodes.delete(a);if(this.nextCollection){var t,n,r,o,i,s;this.nextCollection.commit((i=(n=this.firstVisibleChild)===null||n===void 0||(t=n.node)===null||t===void 0?void 0:t.key)!==null&&i!==void 0?i:null,(s=(o=this.lastVisibleChild)===null||o===void 0||(r=o.node)===null||r===void 0?void 0:r.key)!==null&&s!==void 0?s:null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null)}}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let t of this.subscriptions)t();this.inSubscription=!1}}subscribe(t){return this.subscriptions.add(t),()=>this.subscriptions.delete(t)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(t){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=t,this.nextCollection=t}}function DS(e){let{children:t,items:n,idScope:r,addIdAndValue:o,dependencies:i=[]}=e,s=M.useMemo(()=>new WeakMap,i);return M.useMemo(()=>{if(n&&typeof t=="function"){let c=[];for(let d of n){let f=s.get(d);if(!f){f=t(d);var a,l;let m=(l=(a=f.props.id)!==null&&a!==void 0?a:d.key)!==null&&l!==void 0?l:d.id;if(m==null)throw new Error("Could not determine key for item");r&&(m=r+":"+m),f=M.cloneElement(f,o?{key:m,id:m,value:d}:{key:m}),s.set(d,f)}c.push(f)}return c}else if(typeof t!="function")return t},[t,n,s,r,o])}if(typeof HTMLTemplateElement<"u"){const e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}const WE=M.createContext(!1);function Yye(e){if(M.useContext(WE))return M.createElement(M.Fragment,null,e.children);let n=M.createElement(WE.Provider,{value:!0},e.children);return M.createElement("template",{"data-react-aria-hidden":!0},n)}function Xye(e){let t=(n,r)=>M.useContext(WE)?null:e(n,r);return t.displayName=e.displayName||e.name,M.forwardRef(t)}var tg={exports:{}},Mx={};var xD;function Zye(){if(xD)return Mx;xD=1;var e=M;function t(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(f,m){var g=m(),v=r({inst:{value:g,getSnapshot:m}}),b=v[0].inst,x=v[1];return i(function(){b.value=g,b.getSnapshot=m,l(b)&&x({inst:b})},[f,g,m]),o(function(){return l(b)&&x({inst:b}),f(function(){l(b)&&x({inst:b})})},[f]),s(g),g}function l(f){var m=f.getSnapshot;f=f.value;try{var g=m();return!n(f,g)}catch{return!0}}function c(f,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Mx.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Mx}var Ix={};var ED;function Jye(){return ED||(ED=1,process.env.NODE_ENV!=="production"&&(function(){function e(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}function t(g,v){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var b=v();if(!f){var x=v();i(b,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}x=s({inst:{value:b,getSnapshot:v}});var y=x[0].inst,_=x[1];return l(function(){y.value=b,y.getSnapshot=v,n(y)&&_({inst:y})},[g,b,v]),a(function(){return n(y)&&_({inst:y}),g(function(){n(y)&&_({inst:y})})},[g]),c(b),b}function n(g){var v=g.getSnapshot;g=g.value;try{var b=v();return!i(g,b)}catch{return!0}}function r(g,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=M,i=typeof Object.is=="function"?Object.is:e,s=o.useState,a=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,d=!1,f=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Ix.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Ix}var wD;function Qye(){return wD||(wD=1,process.env.NODE_ENV==="production"?tg.exports=Zye():tg.exports=Jye()),tg.exports}var exe=Qye();const Sq=M.createContext(!1),yp=M.createContext(null);function txe(e){if(M.useContext(yp))return e.content;let{collection:n,document:r}=ixe(e.createCollection);return M.createElement(M.Fragment,null,M.createElement(Yye,null,M.createElement(yp.Provider,{value:r},e.content)),M.createElement(nxe,{render:e.children,collection:n}))}function nxe({collection:e,render:t}){return t(e)}function rxe(e,t,n){let r=cm(),o=M.useRef(r);o.current=r;let i=M.useCallback(()=>o.current?n():t(),[t,n]);return exe.useSyncExternalStore(e,i)}const oxe=typeof M.useSyncExternalStore=="function"?M.useSyncExternalStore:rxe;function ixe(e){let[t]=M.useState(()=>new Gye(e?.()||new zye)),n=M.useCallback(s=>t.subscribe(s),[t]),r=M.useCallback(()=>{let s=t.getCollection();return t.isSSR&&t.resetAfterSSR(),s},[t]),o=M.useCallback(()=>(t.isSSR=!0,t.getCollection()),[t]);return{collection:oxe(n,r,o),document:t}}const HE=M.createContext(null);function sxe(e){var t;return t=class extends mu{},t.type=e,t}function Pq(e,t,n,r,o,i){typeof e=="string"&&(e=sxe(e));let s=M.useCallback(l=>{l?.setProps(t,n,e,r,i)},[t,n,r,i,e]),a=M.useContext(HE);if(a){let l=a.ownerDocument.nodesByProps.get(t);return l||(l=a.ownerDocument.createElement(e.type),l.setProps(t,n,e,r,i),a.appendChild(l),a.ownerDocument.updateCollection(),a.ownerDocument.nodesByProps.set(t,l)),o?M.createElement(HE.Provider,{value:l},o):null}return M.createElement(e.type,{ref:s},o)}function Tq(e,t){let n=({node:o})=>t(o.props,o.props.ref,o),r=M.forwardRef((o,i)=>{let s=M.useContext(FE);if(!M.useContext(Sq)){if(t.length>=3)throw new Error(t.name+" cannot be rendered outside a collection.");return t(o,i)}return Pq(e,o,i,"children"in o?o.children:null,null,l=>M.createElement(FE.Provider,{value:s},M.createElement(n,{node:l})))});return r.displayName=t.name,r}function axe(e,t,n=_q){let r=({node:i})=>t(i.props,i.props.ref,i),o=M.forwardRef((i,s)=>{let a=n(i);var l;return(l=Pq(e,i,s,null,a,c=>M.createElement(r,{node:c})))!==null&&l!==void 0?l:M.createElement(M.Fragment,null)});return o.displayName=t.name,o}function _q(e){return DS({...e,addIdAndValue:!0})}const CD=M.createContext(null);function AS(e){let t=M.useContext(CD),n=(t?.dependencies||[]).concat(e.dependencies),r=e.idScope||t?.idScope,o=_q({...e,idScope:r,dependencies:n});return M.useContext(yp)&&(o=M.createElement(lxe,null,o)),t=M.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),M.createElement(CD.Provider,{value:t},o)}function lxe({children:e}){let t=M.useContext(yp),n=M.useMemo(()=>M.createElement(yp.Provider,{value:null},M.createElement(Sq.Provider,{value:!0},e)),[e]);return cm()?M.createElement(HE.Provider,{value:t},n):_o.createPortal(n,t)}const Nq={CollectionRoot({collection:e,renderDropIndicator:t}){return RD(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return RD(e,t,n)}};function RD(e,t,n){return DS({items:t?e.getChildren(t.key):e,dependencies:[n],children(r){let o=r.render(r);return!n||r.type!=="item"?o:M.createElement(M.Fragment,null,n({type:"item",key:r.key,dropPosition:"before"}),o,uxe(e,r,n))}})}function uxe(e,t,n){let r=t.key,o=e.getKeyAfter(r),i=o!=null?e.getItem(o):null;for(;i!=null&&i.type!=="item";)o=e.getKeyAfter(i.key),i=o!=null?e.getItem(o):null;let s=t.nextKey!=null?e.getItem(t.nextKey):null;for(;s!=null&&s.type!=="item";)s=s.nextKey!=null?e.getItem(s.nextKey):null;let a=[];if(s==null){let l=t;for(;l&&(!i||l.parentKey!==i.parentKey&&i.level<l.level);){let c=n({type:"item",key:l.key,dropPosition:"after"});M.isValidElement(c)&&a.push(M.cloneElement(c,{key:`${l.key}-after`})),l=l.parentKey!=null?e.getItem(l.parentKey):null}}return a}const kS=M.createContext(Nq);function cxe(e,t){let{elementType:n="button",isDisabled:r,onPress:o,onPressStart:i,onPressEnd:s,onPressUp:a,onPressChange:l,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:f,href:m,target:g,rel:v,type:b="button"}=e,x;n==="button"?x={type:b,disabled:r,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:x={role:"button",href:n==="a"&&!r?m:void 0,target:n==="a"?g:void 0,type:n==="input"?b:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?v:void 0};let{pressProps:y,isPressed:_}=TS({onPressStart:i,onPressEnd:s,onPressChange:l,onPress:o,onPressUp:a,onClick:f,isDisabled:r,preventFocusOnPress:c,ref:t}),{focusableProps:w}=gye(e,t);d&&(w.tabIndex=r?-1:w.tabIndex);let T=Vn(w,y,fu(e,{labelable:!0}));return{isPressed:_,buttonProps:Vn(x,T,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}const $S=new WeakMap;function KE(e,t){var n;let{id:r}=(n=$S.get(e))!==null&&n!==void 0?n:{};if(!r)throw new Error("Unknown list");return`${r}-${dxe(t)}`}function dxe(e){return typeof e=="string"?e.replace(/\s*/g,""):""+e}var Oq={};Oq={deselectedItem:e=>`${e.item} غير المحدد`,longPressToSelect:"اضغط مطولًا للدخول إلى وضع التحديد.",select:"تحديد",selectedAll:"جميع العناصر المحددة.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"لم يتم تحديد عناصر",one:()=>`${t.number(e.count)} عنصر محدد`,other:()=>`${t.number(e.count)} عنصر محدد`})}.`,selectedItem:e=>`${e.item} المحدد`};var Mq={};Mq={deselectedItem:e=>`${e.item} не е избран.`,longPressToSelect:"Натиснете и задръжте за да влезете в избирателен режим.",select:"Изберете",selectedAll:"Всички елементи са избрани.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Няма избрани елементи",one:()=>`${t.number(e.count)} избран елемент`,other:()=>`${t.number(e.count)} избрани елементи`})}.`,selectedItem:e=>`${e.item} избран.`};var Iq={};Iq={deselectedItem:e=>`Položka ${e.item} není vybrána.`,longPressToSelect:"Dlouhým stisknutím přejdete do režimu výběru.",select:"Vybrat",selectedAll:"Vybrány všechny položky.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nevybrány žádné položky",one:()=>`Vybrána ${t.number(e.count)} položka`,other:()=>`Vybráno ${t.number(e.count)} položek`})}.`,selectedItem:e=>`Vybrána položka ${e.item}.`};var Dq={};Dq={deselectedItem:e=>`${e.item} ikke valgt.`,longPressToSelect:"Lav et langt tryk for at aktivere valgtilstand.",select:"Vælg",selectedAll:"Alle elementer valgt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ingen elementer valgt",one:()=>`${t.number(e.count)} element valgt`,other:()=>`${t.number(e.count)} elementer valgt`})}.`,selectedItem:e=>`${e.item} valgt.`};var Aq={};Aq={deselectedItem:e=>`${e.item} nicht ausgewählt.`,longPressToSelect:"Gedrückt halten, um Auswahlmodus zu öffnen.",select:"Auswählen",selectedAll:"Alle Elemente ausgewählt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Keine Elemente ausgewählt",one:()=>`${t.number(e.count)} Element ausgewählt`,other:()=>`${t.number(e.count)} Elemente ausgewählt`})}.`,selectedItem:e=>`${e.item} ausgewählt.`};var kq={};kq={deselectedItem:e=>`Δεν επιλέχθηκε το στοιχείο ${e.item}.`,longPressToSelect:"Πατήστε παρατεταμένα για να μπείτε σε λειτουργία επιλογής.",select:"Επιλογή",selectedAll:"Επιλέχθηκαν όλα τα στοιχεία.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Δεν επιλέχθηκαν στοιχεία",one:()=>`Επιλέχθηκε ${t.number(e.count)} στοιχείο`,other:()=>`Επιλέχθηκαν ${t.number(e.count)} στοιχεία`})}.`,selectedItem:e=>`Επιλέχθηκε το στοιχείο ${e.item}.`};var $q={};$q={deselectedItem:e=>`${e.item} not selected.`,select:"Select",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"No items selected",one:()=>`${t.number(e.count)} item selected`,other:()=>`${t.number(e.count)} items selected`})}.`,selectedAll:"All items selected.",selectedItem:e=>`${e.item} selected.`,longPressToSelect:"Long press to enter selection mode."};var Fq={};Fq={deselectedItem:e=>`${e.item} no seleccionado.`,longPressToSelect:"Mantenga pulsado para abrir el modo de selección.",select:"Seleccionar",selectedAll:"Todos los elementos seleccionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ningún elemento seleccionado",one:()=>`${t.number(e.count)} elemento seleccionado`,other:()=>`${t.number(e.count)} elementos seleccionados`})}.`,selectedItem:e=>`${e.item} seleccionado.`};var Lq={};Lq={deselectedItem:e=>`${e.item} pole valitud.`,longPressToSelect:"Valikurežiimi sisenemiseks vajutage pikalt.",select:"Vali",selectedAll:"Kõik üksused valitud.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Üksusi pole valitud",one:()=>`${t.number(e.count)} üksus valitud`,other:()=>`${t.number(e.count)} üksust valitud`})}.`,selectedItem:e=>`${e.item} valitud.`};var jq={};jq={deselectedItem:e=>`Kohdetta ${e.item} ei valittu.`,longPressToSelect:"Siirry valintatilaan painamalla pitkään.",select:"Valitse",selectedAll:"Kaikki kohteet valittu.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ei yhtään kohdetta valittu",one:()=>`${t.number(e.count)} kohde valittu`,other:()=>`${t.number(e.count)} kohdetta valittu`})}.`,selectedItem:e=>`${e.item} valittu.`};var qq={};qq={deselectedItem:e=>`${e.item} non sélectionné.`,longPressToSelect:"Appuyez de manière prolongée pour passer en mode de sélection.",select:"Sélectionner",selectedAll:"Tous les éléments sélectionnés.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Aucun élément sélectionné",one:()=>`${t.number(e.count)} élément sélectionné`,other:()=>`${t.number(e.count)} éléments sélectionnés`})}.`,selectedItem:e=>`${e.item} sélectionné.`};var Bq={};Bq={deselectedItem:e=>`${e.item} לא נבחר.`,longPressToSelect:"הקשה ארוכה לכניסה למצב בחירה.",select:"בחר",selectedAll:"כל הפריטים נבחרו.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"לא נבחרו פריטים",one:()=>`פריט ${t.number(e.count)} נבחר`,other:()=>`${t.number(e.count)} פריטים נבחרו`})}.`,selectedItem:e=>`${e.item} נבחר.`};var Vq={};Vq={deselectedItem:e=>`Stavka ${e.item} nije odabrana.`,longPressToSelect:"Dugo pritisnite za ulazak u način odabira.",select:"Odaberite",selectedAll:"Odabrane su sve stavke.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nije odabrana nijedna stavka",one:()=>`Odabrana je ${t.number(e.count)} stavka`,other:()=>`Odabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`Stavka ${e.item} je odabrana.`};var Wq={};Wq={deselectedItem:e=>`${e.item} nincs kijelölve.`,longPressToSelect:"Nyomja hosszan a kijelöléshez.",select:"Kijelölés",selectedAll:"Az összes elem kijelölve.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Egy elem sincs kijelölve",one:()=>`${t.number(e.count)} elem kijelölve`,other:()=>`${t.number(e.count)} elem kijelölve`})}.`,selectedItem:e=>`${e.item} kijelölve.`};var Hq={};Hq={deselectedItem:e=>`${e.item} non selezionato.`,longPressToSelect:"Premi a lungo per passare alla modalità di selezione.",select:"Seleziona",selectedAll:"Tutti gli elementi selezionati.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nessun elemento selezionato",one:()=>`${t.number(e.count)} elemento selezionato`,other:()=>`${t.number(e.count)} elementi selezionati`})}.`,selectedItem:e=>`${e.item} selezionato.`};var Kq={};Kq={deselectedItem:e=>`${e.item} が選択されていません。`,longPressToSelect:"長押しして選択モードを開きます。",select:"選択",selectedAll:"すべての項目を選択しました。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"項目が選択されていません",one:()=>`${t.number(e.count)} 項目を選択しました`,other:()=>`${t.number(e.count)} 項目を選択しました`})}。`,selectedItem:e=>`${e.item} を選択しました。`};var Uq={};Uq={deselectedItem:e=>`${e.item}이(가) 선택되지 않았습니다.`,longPressToSelect:"선택 모드로 들어가려면 길게 누르십시오.",select:"선택",selectedAll:"모든 항목이 선택되었습니다.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"선택된 항목이 없습니다",one:()=>`${t.number(e.count)}개 항목이 선택되었습니다`,other:()=>`${t.number(e.count)}개 항목이 선택되었습니다`})}.`,selectedItem:e=>`${e.item}이(가) 선택되었습니다.`};var zq={};zq={deselectedItem:e=>`${e.item} nepasirinkta.`,longPressToSelect:"Norėdami įjungti pasirinkimo režimą, paspauskite ir palaikykite.",select:"Pasirinkti",selectedAll:"Pasirinkti visi elementai.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nepasirinktas nė vienas elementas",one:()=>`Pasirinktas ${t.number(e.count)} elementas`,other:()=>`Pasirinkta elementų: ${t.number(e.count)}`})}.`,selectedItem:e=>`Pasirinkta: ${e.item}.`};var Gq={};Gq={deselectedItem:e=>`Vienums ${e.item} nav atlasīts.`,longPressToSelect:"Ilgi turiet nospiestu. lai ieslēgtu atlases režīmu.",select:"Atlasīt",selectedAll:"Atlasīti visi vienumi.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nav atlasīts neviens vienums",one:()=>`Atlasīto vienumu skaits: ${t.number(e.count)}`,other:()=>`Atlasīto vienumu skaits: ${t.number(e.count)}`})}.`,selectedItem:e=>`Atlasīts vienums ${e.item}.`};var Yq={};Yq={deselectedItem:e=>`${e.item} er ikke valgt.`,longPressToSelect:"Bruk et langt trykk for å gå inn i valgmodus.",select:"Velg",selectedAll:"Alle elementer er valgt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ingen elementer er valgt",one:()=>`${t.number(e.count)} element er valgt`,other:()=>`${t.number(e.count)} elementer er valgt`})}.`,selectedItem:e=>`${e.item} er valgt.`};var Xq={};Xq={deselectedItem:e=>`${e.item} niet geselecteerd.`,longPressToSelect:"Druk lang om de selectiemodus te openen.",select:"Selecteren",selectedAll:"Alle items geselecteerd.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Geen items geselecteerd",one:()=>`${t.number(e.count)} item geselecteerd`,other:()=>`${t.number(e.count)} items geselecteerd`})}.`,selectedItem:e=>`${e.item} geselecteerd.`};var Zq={};Zq={deselectedItem:e=>`Nie zaznaczono ${e.item}.`,longPressToSelect:"Naciśnij i przytrzymaj, aby wejść do trybu wyboru.",select:"Zaznacz",selectedAll:"Wszystkie zaznaczone elementy.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nie zaznaczono żadnych elementów",one:()=>`${t.number(e.count)} zaznaczony element`,other:()=>`${t.number(e.count)} zaznaczonych elementów`})}.`,selectedItem:e=>`Zaznaczono ${e.item}.`};var Jq={};Jq={deselectedItem:e=>`${e.item} não selecionado.`,longPressToSelect:"Mantenha pressionado para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nenhum item selecionado",one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var Qq={};Qq={deselectedItem:e=>`${e.item} não selecionado.`,longPressToSelect:"Prima continuamente para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nenhum item selecionado",one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var eB={};eB={deselectedItem:e=>`${e.item} neselectat.`,longPressToSelect:"Apăsați lung pentru a intra în modul de selectare.",select:"Selectare",selectedAll:"Toate elementele selectate.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Niciun element selectat",one:()=>`${t.number(e.count)} element selectat`,other:()=>`${t.number(e.count)} elemente selectate`})}.`,selectedItem:e=>`${e.item} selectat.`};var tB={};tB={deselectedItem:e=>`${e.item} не выбрано.`,longPressToSelect:"Нажмите и удерживайте для входа в режим выбора.",select:"Выбрать",selectedAll:"Выбраны все элементы.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Нет выбранных элементов",one:()=>`${t.number(e.count)} элемент выбран`,other:()=>`${t.number(e.count)} элементов выбрано`})}.`,selectedItem:e=>`${e.item} выбрано.`};var nB={};nB={deselectedItem:e=>`Nevybraté položky: ${e.item}.`,longPressToSelect:"Dlhším stlačením prejdite do režimu výberu.",select:"Vybrať",selectedAll:"Všetky vybraté položky.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Žiadne vybraté položky",one:()=>`${t.number(e.count)} vybratá položka`,other:()=>`Počet vybratých položiek:${t.number(e.count)}`})}.`,selectedItem:e=>`Vybraté položky: ${e.item}.`};var rB={};rB={deselectedItem:e=>`Element ${e.item} ni izbran.`,longPressToSelect:"Za izbirni način pritisnite in dlje časa držite.",select:"Izberite",selectedAll:"Vsi elementi so izbrani.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Noben element ni izbran",one:()=>`${t.number(e.count)} element je izbran`,other:()=>`${t.number(e.count)} elementov je izbranih`})}.`,selectedItem:e=>`Element ${e.item} je izbran.`};var oB={};oB={deselectedItem:e=>`${e.item} nije izabrano.`,longPressToSelect:"Dugo pritisnite za ulazak u režim biranja.",select:"Izaberite",selectedAll:"Izabrane su sve stavke.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nije izabrana nijedna stavka",one:()=>`Izabrana je ${t.number(e.count)} stavka`,other:()=>`Izabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`${e.item} je izabrano.`};var iB={};iB={deselectedItem:e=>`${e.item} ej markerat.`,longPressToSelect:"Tryck länge när du vill öppna väljarläge.",select:"Markera",selectedAll:"Alla markerade objekt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Inga markerade objekt",one:()=>`${t.number(e.count)} markerat objekt`,other:()=>`${t.number(e.count)} markerade objekt`})}.`,selectedItem:e=>`${e.item} markerat.`};var sB={};sB={deselectedItem:e=>`${e.item} seçilmedi.`,longPressToSelect:"Seçim moduna girmek için uzun basın.",select:"Seç",selectedAll:"Tüm ögeler seçildi.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Hiçbir öge seçilmedi",one:()=>`${t.number(e.count)} öge seçildi`,other:()=>`${t.number(e.count)} öge seçildi`})}.`,selectedItem:e=>`${e.item} seçildi.`};var aB={};aB={deselectedItem:e=>`${e.item} не вибрано.`,longPressToSelect:"Виконайте довге натиснення, щоб перейти в режим вибору.",select:"Вибрати",selectedAll:"Усі елементи вибрано.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Жодних елементів не вибрано",one:()=>`${t.number(e.count)} елемент вибрано`,other:()=>`Вибрано елементів: ${t.number(e.count)}`})}.`,selectedItem:e=>`${e.item} вибрано.`};var lB={};lB={deselectedItem:e=>`未选择 ${e.item}。`,longPressToSelect:"长按以进入选择模式。",select:"选择",selectedAll:"已选择所有项目。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"未选择项目",one:()=>`已选择 ${t.number(e.count)} 个项目`,other:()=>`已选择 ${t.number(e.count)} 个项目`})}。`,selectedItem:e=>`已选择 ${e.item}。`};var uB={};uB={deselectedItem:e=>`未選取「${e.item}」。`,longPressToSelect:"長按以進入選擇模式。",select:"選取",selectedAll:"已選取所有項目。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"未選取任何項目",one:()=>`已選取 ${t.number(e.count)} 個項目`,other:()=>`已選取 ${t.number(e.count)} 個項目`})}。`,selectedItem:e=>`已選取「${e.item}」。`};var sb={};sb={"ar-AE":Oq,"bg-BG":Mq,"cs-CZ":Iq,"da-DK":Dq,"de-DE":Aq,"el-GR":kq,"en-US":$q,"es-ES":Fq,"et-EE":Lq,"fi-FI":jq,"fr-FR":qq,"he-IL":Bq,"hr-HR":Vq,"hu-HU":Wq,"it-IT":Hq,"ja-JP":Kq,"ko-KR":Uq,"lt-LT":zq,"lv-LV":Gq,"nb-NO":Yq,"nl-NL":Xq,"pl-PL":Zq,"pt-BR":Jq,"pt-PT":Qq,"ro-RO":eB,"ru-RU":tB,"sk-SK":nB,"sl-SI":rB,"sr-SP":oB,"sv-SE":iB,"tr-TR":sB,"uk-UA":aB,"zh-CN":lB,"zh-TW":uB};function fxe(e){return e&&e.__esModule?e.default:e}function pxe(e,t){let{getRowText:n=a=>{var l,c,d,f;return(f=(l=(c=t.collection).getTextValue)===null||l===void 0?void 0:l.call(c,a))!==null&&f!==void 0?f:(d=t.collection.getItem(a))===null||d===void 0?void 0:d.textValue}}=e,r=ib(fxe(sb),"@react-aria/grid"),o=t.selectionManager.rawSelection,i=M.useRef(o),s=hr(()=>{var a;if(!t.selectionManager.isFocused||o===i.current){i.current=o;return}let l=SD(o,i.current),c=SD(i.current,o),d=t.selectionManager.selectionBehavior==="replace",f=[];if(t.selectionManager.selectedKeys.size===1&&d){let m=t.selectionManager.selectedKeys.keys().next().value;if(m!=null&&t.collection.getItem(m)){let g=n(m);g&&f.push(r.format("selectedItem",{item:g}))}}else if(l.size===1&&c.size===0){let m=l.keys().next().value;if(m!=null){let g=n(m);g&&f.push(r.format("selectedItem",{item:g}))}}else if(c.size===1&&l.size===0){let m=c.keys().next().value;if(m!=null&&t.collection.getItem(m)){let g=n(m);g&&f.push(r.format("deselectedItem",{item:g}))}}t.selectionManager.selectionMode==="multiple"&&(f.length===0||o==="all"||o.size>1||i.current==="all"||((a=i.current)===null||a===void 0?void 0:a.size)>1)&&f.push(o==="all"?r.format("selectedAll"):r.format("selectedCount",{count:o.size})),f.length>0&&DE(f.join(" ")),i.current=o});Ebe(()=>{if(t.selectionManager.isFocused)s();else{let a=requestAnimationFrame(s);return()=>cancelAnimationFrame(a)}},[o,t.selectionManager.isFocused])}function SD(e,t){let n=new Set;if(e==="all"||t==="all")return n;for(let r of e.keys())t.has(r)||n.add(r);return n}function mxe(e){return e&&e.__esModule?e.default:e}function hxe(e){let t=ib(mxe(sb),"@react-aria/grid"),n=cye(),r=(n==="pointer"||n==="virtual"||n==null)&&typeof window<"u"&&"ontouchstart"in window,o=M.useMemo(()=>{let s=e.selectionManager.selectionMode,a=e.selectionManager.selectionBehavior,l;return r&&(l=t.format("longPressToSelect")),a==="replace"&&s!=="none"&&e.hasItemActions?l:void 0},[e.selectionManager.selectionMode,e.selectionManager.selectionBehavior,e.hasItemActions,t,r]);return Uj(o)}function gxe(e){return e&&e.__esModule?e.default:e}function vxe(e,t){let{key:n}=e,r=t.selectionManager,o=Xi(),i=!t.selectionManager.canSelectItem(n),s=t.selectionManager.isSelected(n),a=()=>r.toggleSelection(n);const l=ib(gxe(sb),"@react-aria/grid");return{checkboxProps:{id:o,"aria-label":l.format("select"),isSelected:s,isDisabled:i,onChange:a}}}function bxe(e,t,n){let{isVirtualized:r,keyboardDelegate:o,layoutDelegate:i,onAction:s,disallowTypeAhead:a,linkBehavior:l="action",keyboardNavigationBehavior:c="arrow",escapeKeyBehavior:d="clearSelection",shouldSelectOnPressUp:f}=e;!e["aria-label"]&&!e["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let{listProps:m}=Fye({selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,ref:n,keyboardDelegate:o,layoutDelegate:i,isVirtualized:r,selectOnFocus:t.selectionManager.selectionBehavior==="replace",shouldFocusWrap:e.shouldFocusWrap,linkBehavior:l,disallowTypeAhead:a,autoFocus:e.autoFocus,escapeKeyBehavior:d}),g=Xi(e.id);$S.set(t,{id:g,onAction:s,linkBehavior:l,keyboardNavigationBehavior:c,shouldSelectOnPressUp:f});let v=hxe({selectionManager:t.selectionManager,hasItemActions:!!s}),b=Tye(n,{isDisabled:t.collection.size!==0}),x=fu(e,{labelable:!0}),y=Vn(x,{role:"grid",id:g,"aria-multiselectable":t.selectionManager.selectionMode==="multiple"?"true":void 0},t.collection.size===0?{tabIndex:b?-1:0}:m,v);return r&&(y["aria-rowcount"]=t.collection.size,y["aria-colcount"]=1),pxe({},t),{gridProps:y}}const PD={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function yxe(e,t,n){var r,o;let{node:i,isVirtualized:s}=e,{direction:a}=dm(),{onAction:l,linkBehavior:c,keyboardNavigationBehavior:d,shouldSelectOnPressUp:f}=$S.get(t),m=Xve(),g=M.useRef(null),v=()=>{var j;n.current!==null&&(g.current!=null&&i.key!==g.current||!(!((j=n.current)===null||j===void 0)&&j.contains(document.activeElement)))&&oo(n.current)},b={},x=e.hasChildItems,y=t.selectionManager.isLink(i.key);if(i!=null&&"expandedKeys"in t){var _,w;let j=(_=(w=t.collection).getChildren)===null||_===void 0?void 0:_.call(w,i.key);x=x||[...j??[]].length>1,l==null&&!y&&t.selectionManager.selectionMode==="none"&&x&&(l=()=>t.toggleKey(i.key));let D=x?t.expandedKeys.has(i.key):void 0,A=1;if(i.level>0&&i?.parentKey!=null){let L=t.collection.getItem(i.parentKey);if(L){var T,R;A=[...(T=(R=t.collection).getChildren)===null||T===void 0?void 0:T.call(R,L.key)].filter(V=>V.type==="item").length}}else A=[...t.collection].filter(L=>L.level===0&&L.type==="item").length;b={"aria-expanded":D,"aria-level":i.level+1,"aria-posinset":i?.index+1,"aria-setsize":A}}let{itemProps:S,...P}=$ye({selectionManager:t.selectionManager,key:i.key,ref:n,isVirtualized:s,shouldSelectOnPressUp:e.shouldSelectOnPressUp||f,onAction:l||!((r=i.props)===null||r===void 0)&&r.onAction?Qv((o=i.props)===null||o===void 0?void 0:o.onAction,l?()=>l(i.key):void 0):void 0,focus:v,linkBehavior:c}),N=j=>{if(!j.currentTarget.contains(j.target)||!n.current||!document.activeElement)return;let D=fo(n.current);if(D.currentNode=document.activeElement,"expandedKeys"in t&&document.activeElement===n.current){if(j.key===PD.expand[a]&&t.selectionManager.focusedKey===i.key&&x&&!t.expandedKeys.has(i.key)){t.toggleKey(i.key),j.stopPropagation();return}else if(j.key===PD.collapse[a]&&t.selectionManager.focusedKey===i.key&&x&&t.expandedKeys.has(i.key)){t.toggleKey(i.key),j.stopPropagation();return}}switch(j.key){case"ArrowLeft":if(d==="arrow"){let L=a==="rtl"?D.nextNode():D.previousNode();if(L)j.preventDefault(),j.stopPropagation(),oo(L),xs(L,{containingElement:ga(n.current)});else if(j.preventDefault(),j.stopPropagation(),a==="rtl")oo(n.current),xs(n.current,{containingElement:ga(n.current)});else{D.currentNode=n.current;let H=TD(D);H&&(oo(H),xs(H,{containingElement:ga(n.current)}))}}break;case"ArrowRight":if(d==="arrow"){let L=a==="rtl"?D.previousNode():D.nextNode();if(L)j.preventDefault(),j.stopPropagation(),oo(L),xs(L,{containingElement:ga(n.current)});else if(j.preventDefault(),j.stopPropagation(),a==="ltr")oo(n.current),xs(n.current,{containingElement:ga(n.current)});else{D.currentNode=n.current;let H=TD(D);H&&(oo(H),xs(H,{containingElement:ga(n.current)}))}}break;case"ArrowUp":case"ArrowDown":if(!j.altKey&&n.current.contains(j.target)){var A;j.stopPropagation(),j.preventDefault(),(A=n.current.parentElement)===null||A===void 0||A.dispatchEvent(new KeyboardEvent(j.nativeEvent.type,j.nativeEvent))}break}},F=j=>{if(g.current=i.key,j.target!==n.current){OS()||t.selectionManager.setFocusedKey(i.key);return}},W=j=>{if(!(!j.currentTarget.contains(j.target)||!n.current||!document.activeElement))switch(j.key){case"Tab":if(d==="tab"){let D=fo(n.current,{tabbable:!0});D.currentNode=document.activeElement,(j.shiftKey?D.previousNode():D.nextNode())&&j.stopPropagation()}}},I=bbe(i.props),B=P.hasAction?I:{},$=Vn(S,B,{role:"row",onKeyDownCapture:N,onKeyDown:W,onFocus:F,"aria-label":i.textValue||void 0,"aria-selected":t.selectionManager.canSelectItem(i.key)?t.selectionManager.isSelected(i.key):void 0,"aria-disabled":t.selectionManager.isDisabled(i.key)||void 0,"aria-labelledby":m&&i.textValue?`${KE(t,i.key)} ${m}`:void 0,id:KE(t,i.key)});if(s){let{collection:j}=t,D=[...j];$["aria-rowindex"]=D.find(A=>A.type==="section")?[...j.getKeys()].filter(A=>{var L;return((L=j.getItem(A))===null||L===void 0?void 0:L.type)!=="section"}).findIndex(A=>A===i.key)+1:i.index+1}let k={role:"gridcell","aria-colindex":1};return{rowProps:{...Vn($,b)},gridCellProps:k,descriptionProps:{id:m},...P}}function TD(e){let t=null,n=null;do n=e.lastChild(),n&&(t=n);while(n);return t}function xxe(e,t){let{key:n}=e;const{checkboxProps:r}=vxe(e,t);return{checkboxProps:{...r,"aria-labelledby":`${r.id} ${KE(t,n)}`}}}function Exe(e,t,n){let{gridProps:r}=bxe(e,t,n);return r.role="treegrid",{gridProps:r}}var cB={};cB={collapse:"طي",expand:"تمديد"};var dB={};dB={collapse:"Свиване",expand:"Разширяване"};var fB={};fB={collapse:"Sbalit",expand:"Roztáhnout"};var pB={};pB={collapse:"Skjul",expand:"Udvid"};var mB={};mB={collapse:"Reduzieren",expand:"Erweitern"};var hB={};hB={collapse:"Σύμπτυξη",expand:"Ανάπτυξη"};var gB={};gB={expand:"Expand",collapse:"Collapse"};var vB={};vB={collapse:"Contraer",expand:"Ampliar"};var bB={};bB={collapse:"Ahenda",expand:"Laienda"};var yB={};yB={collapse:"Pienennä",expand:"Laajenna"};var xB={};xB={collapse:"Réduire",expand:"Développer"};var EB={};EB={collapse:"כווץ",expand:"הרחב"};var wB={};wB={collapse:"Sažmi",expand:"Proširi"};var CB={};CB={collapse:"Összecsukás",expand:"Kibontás"};var RB={};RB={collapse:"Comprimi",expand:"Espandi"};var SB={};SB={collapse:"折りたたむ",expand:"展開"};var PB={};PB={collapse:"접기",expand:"펼치기"};var TB={};TB={collapse:"Sutraukti",expand:"Išskleisti"};var _B={};_B={collapse:"Sakļaut",expand:"Izvērst"};var NB={};NB={collapse:"Skjul",expand:"Utvid"};var OB={};OB={collapse:"Samenvouwen",expand:"Uitvouwen"};var MB={};MB={collapse:"Zwiń",expand:"Rozwiń"};var IB={};IB={collapse:"Recolher",expand:"Expandir"};var DB={};DB={collapse:"Colapsar",expand:"Expandir"};var AB={};AB={collapse:"Restrângeți",expand:"Extindeți"};var kB={};kB={collapse:"Свернуть",expand:"Развернуть"};var $B={};$B={collapse:"Zbaliť",expand:"Rozbaliť"};var FB={};FB={collapse:"Strni",expand:"Razširi"};var LB={};LB={collapse:" Skupi",expand:"Proširi"};var jB={};jB={collapse:"Dölj",expand:"Expandera"};var qB={};qB={collapse:"Daralt",expand:"Genişlet"};var BB={};BB={collapse:"Згорнути",expand:"Розгорнути"};var VB={};VB={collapse:"折叠",expand:"扩展"};var WB={};WB={collapse:"收合",expand:"展開"};var HB={};HB={"ar-AE":cB,"bg-BG":dB,"cs-CZ":fB,"da-DK":pB,"de-DE":mB,"el-GR":hB,"en-US":gB,"es-ES":vB,"et-EE":bB,"fi-FI":yB,"fr-FR":xB,"he-IL":EB,"hr-HR":wB,"hu-HU":CB,"it-IT":RB,"ja-JP":SB,"ko-KR":PB,"lt-LT":TB,"lv-LV":_B,"nb-NO":NB,"nl-NL":OB,"pl-PL":MB,"pt-BR":IB,"pt-PT":DB,"ro-RO":AB,"ru-RU":kB,"sk-SK":$B,"sl-SI":FB,"sr-SP":LB,"sv-SE":jB,"tr-TR":qB,"uk-UA":BB,"zh-CN":VB,"zh-TW":WB};function wxe(e){return e&&e.__esModule?e.default:e}function KB(e,t,n){let{node:r}=e,o=yxe(e,t,n),i=o.rowProps["aria-expanded"]===!0,s=ib(wxe(HB),"@react-aria/tree"),a=xbe({"aria-label":i?s.format("collapse"):s.format("expand"),"aria-labelledby":o.rowProps.id}),l={onPress:()=>{o.isDisabled||(t.toggleKey(r.key),t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(r.key))},excludeFromTabOrder:!0,preventFocusOnPress:!0,"data-react-aria-prevent-focus":!0,...a};return{...o,expandButtonProps:l}}const Cxe=M.createContext(null),UB=M.createContext({}),Rxe=Xye(function(t,n){[t,n]=Qj(t,n,UB);let r=t,{isPending:o}=r,{buttonProps:i,isPressed:s}=cxe(t,n);i=Sxe(i,o);let{focusProps:a,isFocused:l,isFocusVisible:c}=av(t),{hoverProps:d,isHovered:f}=mq({...t,isDisabled:t.isDisabled||o}),m={isHovered:f,isPressed:(r.isPressed||s)&&!o,isFocused:l,isFocusVisible:c,isDisabled:t.isDisabled||!1,isPending:o??!1},g=pu({...t,values:m,defaultClassName:"react-aria-Button"}),v=Xi(i.id),b=Xi(),x=i["aria-labelledby"];o&&(x?x=`${x} ${b}`:i["aria-label"]&&(x=`${v} ${b}`));let y=M.useRef(o);M.useEffect(()=>{let w={"aria-labelledby":x||v};(!y.current&&l&&o||y.current&&l&&!o)&&DE(w,"assertive"),y.current=o},[o,l,x,v]);let _=fu(t,{global:!0});return delete _.onClick,M.createElement("button",{...Vn(_,g,i,a,d),type:i.type==="submit"&&o?"button":i.type,id:v,ref:n,"aria-labelledby":x,slot:t.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":t.isDisabled||void 0,"data-pressed":m.isPressed||void 0,"data-hovered":f||void 0,"data-focused":l||void 0,"data-pending":o||void 0,"data-focus-visible":c||void 0},M.createElement(Cxe.Provider,{value:{id:b}},g.children))});function Sxe(e,t){if(t){for(const n in e)n.startsWith("on")&&!(n.includes("Focus")||n.includes("Blur"))&&(e[n]=void 0);e.href=void 0,e.target=void 0}return e}class Ro extends Set{constructor(t,n,r){super(t),t instanceof Ro?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function Pxe(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Txe(e){let{selectionMode:t="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:o="toggle",disabledBehavior:i="all"}=e,s=M.useRef(!1),[,a]=M.useState(!1),l=M.useRef(null),c=M.useRef(null),[,d]=M.useState(null),f=M.useMemo(()=>_D(e.selectedKeys),[e.selectedKeys]),m=M.useMemo(()=>_D(e.defaultSelectedKeys,new Ro),[e.defaultSelectedKeys]),[g,v]=SS(f,m,e.onSelectionChange),b=M.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[x,y]=M.useState(o);o==="replace"&&x==="toggle"&&typeof g=="object"&&g.size===0&&y("replace");let _=M.useRef(o);return M.useEffect(()=>{o!==_.current&&(y(o),_.current=o)},[o]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:x,setSelectionBehavior:y,get isFocused(){return s.current},setFocused(w){s.current=w,a(w)},get focusedKey(){return l.current},get childFocusStrategy(){return c.current},setFocusedKey(w,T="first"){l.current=w,c.current=T,d(w)},selectedKeys:g,setSelectedKeys(w){(r||!Pxe(w,g))&&v(w)},disabledKeys:b,disabledBehavior:i}}function _D(e,t){return e?e==="all"?"all":new Ro(e):t}class FS{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){if(this.state.selectionMode==="none")return!1;let n=this.getKey(t);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let o=this.collection.getItem(r);(!t||o&&Ox(this.collection,o,t)<0)&&(t=o)}var n;return(n=t?.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let o=this.collection.getItem(r);(!t||o&&Ox(this.collection,o,t)>0)&&(t=o)}var n;return(n=t?.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new Ro([n],n,n);else{let s=this.state.selectedKeys;var o;let a=(o=s.anchorKey)!==null&&o!==void 0?o:n;r=new Ro(s,a,n);var i;for(let l of this.getKeyRange(a,(i=s.currentKey)!==null&&i!==void 0?i:n))r.delete(l);for(let l of this.getKeyRange(n,a))this.canSelectItem(l)&&r.add(l)}this.state.setSelectedKeys(r)}getKeyRange(t,n){let r=this.collection.getItem(t),o=this.collection.getItem(n);return r&&o?Ox(this.collection,r,o)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,n);let o=[],i=t;for(;i!=null;){let s=this.collection.getItem(i);if(s&&(s.type==="item"||s.type==="cell"&&this.allowsCellSelection)&&o.push(i),i===n)return o;i=this.collection.getKeyAfter(i)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r=new Ro(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(t){if(this.selectionMode==="none")return;let n=this.getKey(t);if(n==null)return;let r=this.canSelectItem(n)?new Ro([n],n,n):new Ro;this.state.setSelectedKeys(r)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Ro;for(let r of t){let o=this.getKey(r);if(o!=null&&(n.add(o),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var o;let s=this.collection.getItem(r);s?.type==="item"&&t.push(r);var i;s?.hasChildNodes&&(this.allowsCellSelection||s.type!=="item")&&n((i=(o=Vye(Bye(s,this.collection)))===null||o===void 0?void 0:o.key)!==null&&i!==void 0?i:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Ro)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(t){var n;return(n=this.collection.getItem(t))===null||n===void 0?void 0:n.props}withCollection(t){return new FS(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(t,n,r){this.collection=t,this.state=n;var o;this.allowsCellSelection=(o=r?.allowsCellSelection)!==null&&o!==void 0?o:!1,this._isSelectAll=null,this.layoutDelegate=r?.layoutDelegate||null}}class _xe{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let n=this.keyMap.get(t);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}constructor(t,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t,n=n||new Set;let r=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&(a.type==="section"||n.has(a.key)))for(let l of a.childNodes)r(l)};for(let a of t)r(a);let o=null,i=0;for(let[a,l]of this.keyMap)o?(o.nextKey=a,l.prevKey=o.key):(this.firstKey=a,l.prevKey=void 0),l.type==="item"&&(l.index=i++),o=l,o.nextKey=void 0;var s;this.lastKey=(s=o?.key)!==null&&s!==void 0?s:null}}function Nxe(e){let{onExpandedChange:t}=e,[n,r]=SS(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),o=Txe(e),i=M.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),s=qye(e,M.useCallback(l=>new _xe(l,{expandedKeys:n}),[n]),null);return M.useEffect(()=>{o.focusedKey!=null&&!s.getItem(o.focusedKey)&&o.setFocusedKey(null)},[s,o.focusedKey]),{collection:s,expandedKeys:n,disabledKeys:i,toggleKey:l=>{r(Oxe(n,l))},setExpandedKeys:r,selectionManager:new FS(s,o)}}function Oxe(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}const ab=M.createContext({}),zB=M.createContext(null),Mxe=M.forwardRef(function(t,n){let{render:r}=M.useContext(zB);return M.createElement(M.Fragment,null,r(t,n))});function Ixe(e,t){var n;let r=e?.renderDropIndicator,o=e==null||(n=e.isVirtualDragging)===null||n===void 0?void 0:n.call(e),i=M.useCallback(s=>{if(o||t?.isDropTarget(s))return r?r(s):M.createElement(Mxe,{target:s})},[t?.target,o,r]);return e?.useDropIndicator?i:void 0}function Dxe(e,t,n){var r,o;let i=e.focusedKey,s=null;if(!(t==null||(r=t.isVirtualDragging)===null||r===void 0)&&r.call(t)&&(n==null||(o=n.target)===null||o===void 0?void 0:o.type)==="item"&&(s=n.target.key,n.target.dropPosition==="after")){let f=n.collection.getKeyAfter(s),m=null;if(f!=null){var a,l;let g=(l=(a=n.collection.getItem(s))===null||a===void 0?void 0:a.level)!==null&&l!==void 0?l:0;for(;f;){let v=n.collection.getItem(f);if(!v)break;if(v.type!=="item"){f=n.collection.getKeyAfter(f);continue}var c;if(((c=v.level)!==null&&c!==void 0?c:0)<=g)break;m=f,f=n.collection.getKeyAfter(f)}}var d;s=(d=f??m)!==null&&d!==void 0?d:s}return M.useMemo(()=>new Set([i,s].filter(f=>f!=null)),[i,s])}const Axe=M.createContext(null);function kxe(e){let t=M.useRef({});return M.createElement(Axe.Provider,{value:t},e.children)}const $xe=M.createContext({isSelected:!1}),ND=10,OD=5;class Fxe{setup(t,n,r){this.delegate=t,this.state=n,this.direction=r}getDropTargetFromPoint(t,n,r){let o=this.delegate.getDropTargetFromPoint(t,n,r);return!o||o.type==="root"?o:this.resolveDropTarget(o,t,n,r)}resolveDropTarget(t,n,r,o){let i=this.pointerTracking,s=r-i.lastY,a=n-i.lastX,l=i.yDirection,c=i.xDirection;if(Math.abs(s)>OD&&(l=s>0?"down":"up",i.yDirection=l,i.lastY=r),Math.abs(a)>ND&&(c=a>0?"right":"left",i.xDirection=c,i.lastX=n),t.dropPosition==="before"){let m=this.state.collection.getKeyBefore(t.key);if(m!=null){let g={type:"item",key:m,dropPosition:"after"};o(g)&&(t=g)}}let d=this.getPotentialTargets(t,o);if(d.length===0)return{type:"root"};let f;return d.length>1?f=this.selectTarget(d,t,n,r,l,c):(f=d[0],i.boundaryContext=null),f}getPotentialTargets(t,n){if(t.dropPosition==="on")return[t];let r=t,o=this.state.collection,i=o.getItem(r.key);for(;i&&i?.type!=="item"&&i.nextKey!=null;)r.key=i.nextKey,i=o.getItem(i.nextKey);let s=[r];if(i&&i.hasChildNodes&&this.state.expandedKeys.has(i.key)&&o.getChildren&&r.dropPosition==="after"){let c=null;for(let d of o.getChildren(i.key))if(d.type==="item"){c=d;break}if(c){const d={type:"item",key:c.key,dropPosition:"before"};return n(d)?[d]:[]}}if(i?.nextKey!=null)return[t];let a=i?.parentKey,l=[];for(;a;){let c=o.getItem(a),d=c?.nextKey?o.getItem(c.nextKey):null;if(!d||d.parentKey!==a){let m={type:"item",key:a,dropPosition:"after"};if(n(m)&&l.push(m),d)break}a=c?.parentKey}if(l.length>0&&s.push(...l),s.length===1){let c=o.getKeyAfter(r.key),d=c?o.getItem(c):null;if(c!=null&&d&&i&&d.level!=null&&i.level!=null&&d.level>i.level){let f={type:"item",key:c,dropPosition:"before"};if(n(f))return[f]}}return s.filter(n)}selectTarget(t,n,r,o,i,s){if(t.length<2)return t[0];let a=this.pointerTracking,l=this.state.collection.getItem(n.key),c=l?.parentKey;if(!c)return t[0];if(!a.boundaryContext||a.boundaryContext.parentKey!==c){let v=a.yDirection==="up"?t.length-1:0;a.boundaryContext={parentKey:c,preferredTargetIndex:v,lastSwitchY:o,lastSwitchX:r}}let d=a.boundaryContext,f=Math.abs(r-d.lastSwitchX);if(Math.abs(o-d.lastSwitchY)>OD&&i){let v=d.preferredTargetIndex||0;i==="down"&&v===0?d.preferredTargetIndex=t.length-1:i==="up"&&v===t.length-1&&(d.preferredTargetIndex=0),a.xDirection=null}if(f>ND&&s){let v=d.preferredTargetIndex||0;s==="left"?this.direction==="ltr"?v<t.length-1&&(d.preferredTargetIndex=v+1,d.lastSwitchX=r):v>0&&(d.preferredTargetIndex=v-1,d.lastSwitchX=r):s==="right"&&(this.direction==="ltr"?v>0&&(d.preferredTargetIndex=v-1,d.lastSwitchX=r):v<t.length-1&&(d.preferredTargetIndex=v+1,d.lastSwitchX=r)),a.yDirection=null}let g=Math.max(0,Math.min(d.preferredTargetIndex||0,t.length-1));return t[g]}constructor(){this.delegate=null,this.state=null,this.direction="ltr",this.pointerTracking={lastY:0,lastX:0,yDirection:null,xDirection:null,boundaryContext:null}}}class Lxe{*[Symbol.iterator](){yield*this.flattenedRows}get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}getItem(t){return this.keyMap.get(t)||null}at(t){return this.flattenedRows[t]}getFirstKey(){var t;return(t=this.flattenedRows[0])===null||t===void 0?void 0:t.key}getLastKey(){var t;return(t=this.flattenedRows[this.flattenedRows.length-1])===null||t===void 0?void 0:t.key}getKeyAfter(t){var n;let r=this.flattenedRows.findIndex(o=>o.key===t);return(n=this.flattenedRows[r+1])===null||n===void 0?void 0:n.key}getKeyBefore(t){var n;let r=this.flattenedRows.findIndex(o=>o.key===t);return(n=this.flattenedRows[r-1])===null||n===void 0?void 0:n.key}getChildren(t){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(t),o=r?.firstChildKey!=null?n.get(r.firstChildKey):null;for(;o;)yield o,o=o.nextKey!=null?n.get(o.nextKey):void 0}}}getTextValue(t){let n=this.getItem(t);return n?n.textValue:""}constructor(t){this.keyMap=new Map,this.itemCount=0;let{collection:n,expandedKeys:r}=t,{flattenedRows:o,keyMap:i,itemCount:s}=Hxe(n,{expandedKeys:r});this.flattenedRows=o,this.keyMap=i,this.itemCount=s}}const jxe=M.createContext(null),LS=M.createContext(null),qxe=M.forwardRef(function(t,n){return[t,n]=Qj(t,n,jxe),M.createElement(txe,{content:M.createElement(AS,t)},r=>M.createElement(Bxe,{props:t,collection:r,treeRef:n}))}),MD={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function Bxe({props:e,collection:t,treeRef:n}){const{dragAndDropHooks:r}=e;let{direction:o}=dm(),i=nq({usage:"search",sensitivity:"base"}),s=!!r?.useDraggableCollectionState,a=!!r?.useDroppableCollectionState,l=M.useRef(s),c=M.useRef(a);M.useEffect(()=>{l.current!==s&&console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."),c.current!==a&&console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.")},[s,a]);let{selectionMode:d="none",expandedKeys:f,defaultExpandedKeys:m,onExpandedChange:g,disabledBehavior:v="all"}=e,{CollectionRoot:b,isVirtualized:x,layoutDelegate:y,dropTargetDelegate:_}=M.useContext(kS),[w,T]=SS(f?ID(f):void 0,m?ID(m):new Set,g),R=M.useMemo(()=>new Lxe({collection:t,expandedKeys:w}),[t,w]),S=Nxe({...e,selectionMode:d,expandedKeys:w,onExpandedChange:T,collection:R,children:void 0,disabledBehavior:v}),{gridProps:P}=Exe({...e,isVirtualized:x,layoutDelegate:y},S,n),N,F,W,I=!1,B=null,$=M.useRef(null);if(s&&r){N=r.useDraggableCollectionState({collection:S.collection,selectionManager:S.selectionManager,preview:r.renderDragPreview?$:void 0}),r.useDraggableCollection({},N,n);let G=r.DragPreview;B=r.renderDragPreview?M.createElement(G,{ref:$},r.renderDragPreview):null}let[k]=M.useState(()=>new Fxe);if(a&&r){F=r.useDroppableCollectionState({collection:S.collection,selectionManager:S.selectionManager});let G=r.dropTargetDelegate||_||new r.ListDropTargetDelegate(S.collection,n,{direction:o});k.setup(G,S,o);let ee=new xq({collection:S.collection,collator:i,ref:n,disabledKeys:S.selectionManager.disabledKeys,disabledBehavior:S.selectionManager.disabledBehavior,direction:o,layoutDelegate:y});W=r.useDroppableCollection({keyboardDelegate:ee,dropTargetDelegate:k,onDropActivate:te=>{if(te.target.type==="item"){var J;let ne=te.target.key,U=S.collection.getItem(ne),ie=w!=="all"&&w.has(ne);U&&U.hasChildNodes&&(!ie||!(r==null||(J=r.isVirtualDragging)===null||J===void 0)&&J.call(r))&&S.toggleKey(ne)}},onKeyDown:te=>{let J=F?.target;if(J&&J.type==="item"&&J.dropPosition==="on"){let ne=S.collection.getItem(J.key);(te.key===MD.expand[o]&&ne?.hasChildNodes&&!S.expandedKeys.has(J.key)||te.key===MD.collapse[o]&&ne?.hasChildNodes&&S.expandedKeys.has(J.key))&&S.toggleKey(J.key)}}},F,n);let Z=F.getDropOperation;F.getDropOperation=te=>{let{target:J,isInternal:ne}=te;var U;let ie=(U=N?.draggingKeys)!==null&&U!==void 0?U:new Set;if(ne&&J.type==="item"&&ie.size>0){if(ie.has(J.key)&&J.dropPosition==="on")return"cancel";let se=J.key;for(;se!=null;){let Q=S.collection.getItem(se),me=Q?.parentKey;if(me!=null&&ie.has(me))return"cancel";se=me??null}}return Z(te)},I=F.isDropTarget({type:"root"})}let j=!!(s&&!N?.isDisabled),{focusProps:D,isFocused:A,isFocusVisible:L}=av(),H={isEmpty:S.collection.size===0,isFocused:A,isFocusVisible:L,isDropTarget:I,selectionMode:S.selectionManager.selectionMode,allowsDragging:!!j,state:S},V=pu({className:e.className,style:e.style,defaultClassName:"react-aria-Tree",values:H}),X=null;if(S.collection.size===0&&e.renderEmptyState){let{isEmpty:G,...ee}=H,Z=e.renderEmptyState({...ee}),te={"aria-level":1};X=M.createElement("div",{role:"row",style:{display:"contents"},...te},M.createElement("div",{role:"gridcell",style:{display:"contents"}},Z))}let K=fu(e,{global:!0});return M.createElement(M.Fragment,null,M.createElement(xye,null,M.createElement("div",{...Vn(K,V,P,D,W?.collectionProps),ref:n,slot:e.slot||void 0,"data-empty":S.collection.size===0||void 0,"data-focused":A||void 0,"data-drop-target":I||void 0,"data-focus-visible":L||void 0,"data-selection-mode":S.selectionManager.selectionMode==="none"?void 0:S.selectionManager.selectionMode,"data-allows-dragging":!!j||void 0},M.createElement(Zj,{values:[[LS,S],[ab,{dragAndDropHooks:r,dragState:N,dropState:F}],[zB,{render:Kxe}]]},a&&M.createElement(Gxe,null),M.createElement(kxe,null,M.createElement(b,{collection:S.collection,persistedKeys:Dxe(S.selectionManager,r,F),scrollRef:n,renderDropIndicator:Ixe(r,F)}))),X)),B)}class GB extends mu{}GB.type="content";const Vxe=Tq(GB,function(t){let n=M.useContext(YB),r=pu({children:t.children,values:n});return M.createElement(kS.Provider,{value:Nq},r.children)}),YB=M.createContext(null);class XB extends mu{}XB.type="item";const Wxe=axe(XB,(e,t,n)=>{var r;let o=M.useContext(LS);t=rb(t);let{dragAndDropHooks:i,dragState:s,dropState:a}=M.useContext(ab),{rowProps:l,gridCellProps:c,expandButtonProps:d,descriptionProps:f,...m}=KB({node:n,shouldSelectOnPressUp:!!s},o,t),g=l["aria-expanded"]===!0,v=e.hasChildItems||((r=[...o.collection.getChildren(n.key)])===null||r===void 0?void 0:r.length)>1,b=l["aria-level"]||1,{hoverProps:x,isHovered:y}=mq({isDisabled:!m.allowsSelection&&!m.hasAction,onHoverStart:e.onHoverStart,onHoverChange:e.onHoverChange,onHoverEnd:e.onHoverEnd}),{isFocusVisible:_,focusProps:w}=av(),{isFocusVisible:T,focusProps:R}=av({within:!0}),{checkboxProps:S}=xxe({key:n.key},o),P=null;s&&i&&(P=i.useDraggableItem({key:n.key,hasDragButton:!0},s));let N=null,F=M.useRef(null),W=M.useRef(null),I=M.useRef(null),{visuallyHiddenProps:B}=IS();a&&i&&(N=i.useDropIndicator({target:{type:"item",key:n.key,dropPosition:"on"},activateButtonRef:I},a,W));let $=s&&s.isDragging(n.key),k=N?.isDropTarget,j=o.selectionManager.selectionMode,D=o.selectionManager.selectionBehavior,A=M.useMemo(()=>({...m,isHovered:y,isFocusVisible:_,isExpanded:g,hasChildItems:v,level:b,selectionMode:j,selectionBehavior:D,isFocusVisibleWithin:T,state:o,id:n.key,allowsDragging:!!s,isDragging:$,isDropTarget:k}),[m,y,_,g,v,b,T,o,n.key,s,$,k,D,j]),L=pu({...e,id:void 0,children:n.rendered,defaultClassName:"react-aria-TreeItem",defaultStyle:{"--tree-item-level":b},values:A});M.useEffect(()=>{!n.textValue&&process.env.NODE_ENV!=="production"&&console.warn("A `textValue` prop is required for <TreeItem> elements in order to support accessibility features such as type to select.")},[n.textValue]),M.useEffect(()=>{v&&!F.current&&process.env.NODE_ENV!=="production"&&console.warn("Expandable tree items must contain a expand button so screen reader users can expand/collapse the item.")},[]);let H=M.useRef(null);M.useEffect(()=>{s&&!H.current&&process.env.NODE_ENV!=="production"&&console.warn('Draggable items in a Tree must contain a <Button slot="drag"> element so that keyboard and screen reader users can drag them.')},[]);let V=DS({items:o.collection.getChildren(n.key),children:G=>{switch(G.type){case"content":return G.render(G);case"loader":case"item":return M.createElement(M.Fragment,null);default:throw new Error("Unsupported element type in TreeRow: "+G.type)}}}),X=Xi(),K=fu(e,{global:!0});return delete K.id,delete K.onClick,M.createElement(M.Fragment,null,N&&!N.isHidden&&M.createElement("div",{role:"row","aria-level":l["aria-level"],"aria-expanded":l["aria-expanded"],"aria-label":N.dropIndicatorProps["aria-label"]},M.createElement("div",{role:"gridcell","aria-colindex":1,style:{display:"contents"}},M.createElement("div",{role:"button",...B,...N.dropIndicatorProps,ref:W}),l["aria-expanded"]!=null?M.createElement("div",{role:"button",...B,id:X,"aria-label":d["aria-label"],"aria-labelledby":`${X} ${l.id}`,tabIndex:-1,ref:I}):null)),M.createElement("div",{...Vn(K,l,w,x,R,P?.dragProps),...L,ref:t,"data-expanded":v&&g||void 0,"data-has-child-items":v||void 0,"data-level":b,"data-selected":m.isSelected||void 0,"data-disabled":m.isDisabled||void 0,"data-hovered":y||void 0,"data-focused":m.isFocused||void 0,"data-focus-visible":_||void 0,"data-pressed":m.isPressed||void 0,"data-selection-mode":o.selectionManager.selectionMode==="none"?void 0:o.selectionManager.selectionMode,"data-allows-dragging":!!s||void 0,"data-dragging":$||void 0,"data-drop-target":k||void 0},M.createElement("div",{...c,style:{display:"contents"}},M.createElement(Zj,{values:[[$ve,{slots:{selection:S}}],[UB,{slots:{[Xj]:{},chevron:{...d,ref:F},drag:{...P?.dragButtonProps,ref:H,style:{pointerEvents:"none"}}}}],[YB,{...A}],[$xe,{isSelected:m.isSelected}]]},V))))});Tq(wq,function(t,n,r){let{isVirtualized:o}=M.useContext(kS),i=M.useContext(LS),{isLoading:s,onLoadMore:a,scrollOffset:l,...c}=t,d=M.useRef(null),f=M.useMemo(()=>({onLoadMore:a,collection:i?.collection,sentinelRef:d,scrollOffset:l}),[a,l,i?.collection]);Sbe(f,d),n=rb(n);let{rowProps:m,gridCellProps:g}=KB({node:r},i,n),v=m["aria-level"]||1,b={role:"row","aria-level":m["aria-level"]},x=pu({...c,id:void 0,children:r.rendered,defaultClassName:"react-aria-TreeLoader",values:{level:v}}),y={};return o&&(y={display:"contents"}),M.createElement(M.Fragment,null,M.createElement("div",{style:{position:"relative",width:0,height:0},inert:Pbe(!0)},M.createElement("div",{"data-testid":"loadMoreSentinel",ref:d,style:{position:"absolute",height:1,width:1}})),s&&x.children&&M.createElement("div",{ref:n,...Vn(fu(t),b),...x,"data-level":v},M.createElement("div",{...g,style:y},x.children)))});function ID(e){return e?e==="all"?"all":new Set(e):new Set}function Hxe(e,t){let{expandedKeys:n=new Set}=t,r=new Map,o=[],i=0,s=new Map,a=l=>{if(l.type==="item"||l.type==="loader"){let c=l?.parentKey,d={...l};c!=null?([...e.getChildren(c)][0].type!=="item"&&(d.index=l?.index!=null?l?.index-1:0),l.type==="loader"&&(d.level=l.level+1),r.set(d.key,d)):r.set(l.key,l);let f=r.get(l.key)||l;(f.level===0||f.parentKey!=null&&n.has(f.parentKey)&&s.get(f.parentKey))&&(f.type==="item"&&i++,o.push(f),s.set(f.key,!0))}else l.type!==null&&r.set(l.key,l);for(let c of e.getChildren(l.key))a(c)};for(let l of e)a(l);return{flattenedRows:o,keyMap:r,itemCount:i}}function Kxe(e,t){var n;t=rb(t);let{dragAndDropHooks:r,dropState:o}=M.useContext(ab),i=M.useRef(null),{dropIndicatorProps:s,isHidden:a,isDropTarget:l}=r.useDropIndicator(e,o,i);if(a)return null;let c=o&&e.target.type==="item"?(((n=o.collection.getItem(e.target.key))===null||n===void 0?void 0:n.level)||0)+1:1;return M.createElement(zxe,{...e,dropIndicatorProps:s,isDropTarget:l,ref:t,buttonRef:i,level:c})}function Uxe(e,t){let{dropIndicatorProps:n,isDropTarget:r,buttonRef:o,level:i,...s}=e,{visuallyHiddenProps:a}=IS(),l=pu({...s,defaultClassName:"react-aria-DropIndicator",defaultStyle:{position:"relative","--tree-item-level":i},values:{isDropTarget:r}});return M.createElement("div",{...l,role:"row","aria-level":i,ref:t,"data-drop-target":r||void 0},M.createElement("div",{role:"gridcell"},M.createElement("div",{...a,role:"button",...n,ref:o}),l.children))}const zxe=M.forwardRef(Uxe);function Gxe(){let{dragAndDropHooks:e,dropState:t}=M.useContext(ab),n=M.useRef(null),{dropIndicatorProps:r}=e.useDropIndicator({target:{type:"root"}},t,n),o=t.isDropTarget({type:"root"}),{visuallyHiddenProps:i}=IS();return!o&&r["aria-hidden"]?null:M.createElement("div",{role:"row","aria-hidden":r["aria-hidden"],style:{position:"absolute"}},M.createElement("div",{role:"gridcell"},M.createElement("div",{role:"button",...i,...r,ref:n})))}const Yxe=y2({base:"flex py-2 rounded-lg bg-bg cursor-default lg:text-sm flex-col overflow-auto outline-none",variants:{isFocusVisible:{true:"outline-offset-[-1px] outline-2 outline-primary"}}}),ZB=({className:e,...t})=>C.jsx(qxe,{"data-slot":"tree",className:Jj(e,(n,r)=>Yxe({...r,className:n})),...t,children:t.children}),Xxe=y2({base:["[&_[data-expanded]_[slot=chevron]_[data-slot=icon]]:rotate-90 outline-none [--padding:20px] p-[0.286rem_0.286rem_0.286rem_0.571rem] pl-[calc((var(--tree-item-level)-1)*20px+0.571rem+var(--padding))]","[&_[slot=chevron]]:outline-none [&_[slot=chevron]_[data-slot=icon]]:text-muted-fg","data-[has-child-rows]:[--padding:0px]"],variants:{isExpanded:{true:"[&_[slot=chevron]_[data-slot=icon]]:text-fg [&_[slot=chevron]_[data-slot=icon]]:rotate-90 [&_[slot=chevron]_[data-slot=icon]]:transition [&_[slot=chevron]_[data-slot=icon]]:duration-200"},isFocusVisible:{true:"[&_[slot=chevron]_[data-slot=icon]]:text-fg focus:outline-none focus-visible:ring-1 focus-visible:ring-primary"},isDisabled:{true:"opacity-50 forced-colors:text-[GrayText]"},isSelected:{true:"bg-accent text-accent-foreground"}}}),JB=({className:e,...t})=>C.jsx(Wxe,{"data-slot":"tree-item","data-key":t.id,className:Jj(e,(n,r)=>Xxe({...r,className:n})),...t,children:t.children}),QB=e=>C.jsx(Vxe,{"data-slot":"tree-item-content",...e,"data-key":e.key,children:C.jsx("div",{className:"flex items-center gap-x-1",children:e.children})}),eV=()=>C.jsx(Rxe,{"data-slot":"tree-item-chevron",className:"shrink-0 relative",slot:"chevron",children:C.jsx(Lp,{className:"size-5","data-slot":"icon"})}),tV=e=>C.jsx("span",{"data-slot":"tree-item-label",...e});function Zxe({items:e,...t}){const n=r=>C.jsxs(JB,{id:r.id,textValue:r.title,children:[C.jsxs(QB,{children:[r.children?.length?C.jsx(eV,{}):null,C.jsx(tV,{children:r.title})]}),r.children?.length?C.jsx(AS,{items:r.children,children:n}):null]},r.id);return C.jsx(ZB,{items:e,...t,children:e.map(r=>n(r))})}function Jxe({children:e,tooltipDelay:t,...n}){return C.jsx(IL,{delay:t,children:C.jsx(Bj,{...n,children:e})})}exports.AlertDialog=jY;exports.AlertDialogBackdrop=Dk;exports.AlertDialogClose=tE;exports.AlertDialogDescription=Fk;exports.AlertDialogFooter=jk;exports.AlertDialogHeader=Lk;exports.AlertDialogPopup=kk;exports.AlertDialogPrimitive=kz;exports.AlertDialogRoot=Mk;exports.AlertDialogTitle=$k;exports.AlertDialogTrigger=Ik;exports.AlertDialogViewport=Ak;exports.AutoComplete=qY;exports.AutoCompleteDialog=tJ;exports.AutoCompleteEmpty=Ww;exports.AutoCompleteGroup=N$;exports.AutoCompleteInput=Bw;exports.AutoCompleteItem=Fg;exports.AutoCompleteList=Vw;exports.AutoCompleteRoot=Tv;exports.AutoCompleteSeparator=nJ;exports.AutoCompleteShortcut=O$;exports.Avatar=Poe;exports.AvatarFallback=pF;exports.AvatarImage=fF;exports.AvatarPrimitive=iJ;exports.AvatarRoot=dF;exports.BackgroundImage=Toe;exports.BaseButton=Ok;exports.Button=Is;exports.Calendar=Yp;exports.Card=Fle;exports.CardContent=Ble;exports.CardDescription=qle;exports.CardFooter=Vle;exports.CardHeader=Lle;exports.CardTitle=jle;exports.Center=Wle;exports.Checkbox=vue;exports.CheckboxGroup=bue;exports.CheckboxIndicator=C0;exports.CheckboxPrimitive=zle;exports.CheckboxRoot=w0;exports.Collection=AS;exports.Combobox=uce;exports.ComboboxChip=m2;exports.ComboboxChipRemove=h2;exports.ComboboxChips=p2;exports.ComboboxChipsInput=o2;exports.ComboboxClear=f2;exports.ComboboxCollection=Que;exports.ComboboxContext=Qp;exports.ComboboxEmpty=u2;exports.ComboboxGroup=Yue;exports.ComboboxGroupLabel=Xue;exports.ComboboxInput=i2;exports.ComboboxItem=l2;exports.ComboboxList=d2;exports.ComboboxPopup=a2;exports.ComboboxPrimitive=Aue;exports.ComboboxRoot=r2;exports.ComboboxRow=Zue;exports.ComboboxSearchInput=zue;exports.ComboboxSelectTrigger=Uue;exports.ComboboxSeparator=Gue;exports.ComboboxStatus=Jue;exports.ComboboxTrigger=s2;exports.ComboboxValue=c2;exports.DOTS=Ss;exports.DateInput=hce;exports.DatePicker=gce;exports.Dialog=eJ;exports.DialogBackdrop=C$;exports.DialogClose=QZ;exports.DialogDescription=P$;exports.DialogFooter=_$;exports.DialogHeader=T$;exports.DialogPopup=qw;exports.DialogPrimitive=JZ;exports.DialogRoot=jw;exports.DialogTitle=S$;exports.DialogTrigger=w$;exports.DialogViewport=R$;exports.Divider=x2;exports.Dropzone=Mce;exports.EmptyState=Ace;exports.Field=Fce;exports.FieldControl=mR;exports.FieldDescription=I2;exports.FieldError=pg;exports.FieldItem=kce;exports.FieldLabel=M2;exports.FieldPrimitive=Ple;exports.FieldRoot=O2;exports.FieldValidity=D2;exports.FileType=Dn;exports.FileTypeGroups=Ice;exports.Form=Lce;exports.FormPrimitive=hR;exports.Heading=N2;exports.Input=vL;exports.InputPrimitive=Fv;exports.Kbd=jce;exports.KbdGroup=qce;exports.Label=Xp;exports.LibraryProvider=Jxe;exports.Loader=Vce;exports.Menu=Bhe;exports.MenuCheckboxItem=R3;exports.MenuContent=w3;exports.MenuGroup=Lhe;exports.MenuItem=C3;exports.MenuLabel=P3;exports.MenuPortal=jhe;exports.MenuRadioGroup=qhe;exports.MenuRadioItem=S3;exports.MenuRoot=v3;exports.MenuSeparator=T3;exports.MenuShortcut=_3;exports.MenuSub=y3;exports.MenuSubContent=E3;exports.MenuSubTrigger=x3;exports.MenuTrigger=b3;exports.MultiSelect=ige;exports.NumberInput=Uge;exports.NumberInputCursorIcon=Kge;exports.NumberInputDecrement=tj;exports.NumberInputGroup=Q3;exports.NumberInputIncrement=nj;exports.NumberInputInput=ej;exports.NumberInputPrimitive=Vge;exports.NumberInputRoot=J3;exports.NumberInputScrubArea=Wge;exports.NumberInputScrubAreaCursor=Hge;exports.Pagination=zge;exports.Password=rj;exports.PasswordRoot=rj;exports.Popover=rge;exports.PopoverClose=nge;exports.PopoverContent=cu;exports.PopoverCreateHandle=tge;exports.PopoverDescription=F3;exports.PopoverPopup=cu;exports.PopoverPrimitive=ege;exports.PopoverRoot=sm;exports.PopoverTitle=$3;exports.PopoverTrigger=am;exports.Progress=eve;exports.ProgressIndicator=dj;exports.ProgressLabel=Jge;exports.ProgressRoot=uj;exports.ProgressTrack=cj;exports.ProgressValue=Qge;exports.ScrollArea=n2;exports.ScrollAreaPrimitive=Kue;exports.ScrollBar=bE;exports.Select=wL;exports.SelectButton=Tle;exports.SelectContent=o0;exports.SelectGroup=Nle;exports.SelectGroupLabel=Ole;exports.SelectItem=EL;exports.SelectLabel=Mle;exports.SelectPopup=o0;exports.SelectPrimitive=xle;exports.SelectRoot=bL;exports.SelectSeparator=_le;exports.SelectTrigger=yL;exports.SelectValue=xL;exports.SeparatorPrimitive=Va;exports.Show=tve;exports.Skeleton=nve;exports.Stack=rve;exports.Stepper=ive;exports.StepperContainer=pj;exports.StepperContent=gj;exports.StepperList=mj;exports.StepperTrigger=hj;exports.Switch=ave;exports.SwitchRoot=xj;exports.SwitchThumb=Ej;exports.TABLE_PAGE_SIZES=hg;exports.TabContent=gve;exports.TabList=mve;exports.TabTrigger=hve;exports.Table=cve;exports.TableBody=Rj;exports.TableCaption=uve;exports.TableCell=Pj;exports.TableFooter=lve;exports.TableHead=Sj;exports.TableHeader=Cj;exports.TablePagination=dve;exports.TableRoot=wj;exports.TableRow=OE;exports.Tabs=pve;exports.Tag=TE;exports.Textarea=bve;exports.TextareaControl=Tj;exports.TextareaField=_j;exports.ThemeProvider=CG;exports.Timeline=xve;exports.TimelineItemContent=Ij;exports.TimelineItemDot=Mj;exports.TimelineListItem=Oj;exports.TimelineRoot=Nj;exports.ToastPrimitive=Nve;exports.ToastProvider=Bj;exports.Tooltip=FL;exports.TooltipArrow=$L;exports.TooltipPopup=kL;exports.TooltipPrimitive=fue;exports.TooltipProvider=IL;exports.TooltipRoot=DL;exports.TooltipTrigger=AL;exports.Tree=Zxe;exports.TreeItem=JB;exports.TreeItemContent=QB;exports.TreeItemIndicator=eV;exports.TreeItemLabel=tV;exports.TreeRoot=ZB;exports.UploadAcceptedFiles=P2;exports.UploadContent=R2;exports.UploadItem=_2;exports.UploadRejectedFiles=T2;exports.UploadRoot=w2;exports.UploadTrigger=C2;exports.buttonVariants=gk;exports.click=Coe;exports.cn=ue;exports.createSafeContext=Yw;exports.createToastManager=Ove;exports.ensureReactElement=sJ;exports.extractInitials=I$;exports.getFormData=aJ;exports.inputBaseClasses=iu;exports.mergeRefs=lJ;exports.selectTriggerClasses=n0;exports.selectTriggerIconClassName=r0;exports.tagVariants=O3;exports.toast=Mve;exports.toastVariants=jj;exports.twMerge=dk;exports.type=Roe;exports.useArray=lhe;exports.useAsync=uhe;exports.useClickOutside=che;exports.useClipboard=dhe;exports.useComboboxFilter=cce;exports.useControllableState=vr;exports.useDebouncedCallback=fhe;exports.useDebouncedValue=phe;exports.useDisclosure=mhe;exports.useDocumentTitle=hhe;exports.useEventListener=c3;exports.useFocusTrap=Ehe;exports.useHotkey=m3;exports.useHover=The;exports.useIsVisible=_he;exports.useLocalStorage=Nhe;exports.useMediaQuery=Ohe;exports.useMemoizedFn=Mhe;exports.useMutation=Ihe;exports.useObject=Dhe;exports.usePagination=DR;exports.usePortal=Ahe;exports.usePreventCloseWindow=khe;exports.useRangePagination=h3;exports.useSelection=$he;exports.useStep=Fhe;exports.useTheme=mk;exports.useThemeProps=hk;exports.useToastManager=qj;exports.useToggle=g3;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("lodash"),f=require("react"),H=require("@radix-ui/react-use-controllable-state"),Sa=require("react-dom"),r=require("react/jsx-runtime"),oe=require("@base-ui/react/accordion"),y=require("lucide-react"),Pa=require("clsx"),Ta=require("tailwind-merge"),B=require("@base-ui/react/alert-dialog"),Z=require("class-variance-authority"),ka=require("@base-ui/react/button"),P=require("@base-ui/react/autocomplete"),$e=require("@base-ui/react/input"),re=require("@base-ui/react/scroll-area"),De=require("@base-ui/react/avatar"),za=require("date-fns/locale"),Ia=require("react-day-picker"),S=require("@base-ui/react/merge-props"),k=require("@base-ui/react/select"),C=require("@base-ui/react/use-render"),Xe=require("@base-ui/react/checkbox"),Ke=require("@base-ui/react/checkbox-group"),O=require("@base-ui/react/field"),ue=require("@base-ui/react/fieldset"),K=require("@base-ui/react/tooltip"),w=require("@base-ui/react/combobox"),L=require("date-fns"),M=require("@base-ui/react/popover"),V=require("@base-ui/react/dialog"),mt=require("@base-ui/react/separator"),Da=require("tailwind-variants"),Aa=require("react-dropzone"),ft=require("@base-ui/react/form"),I=require("@base-ui/react/menu"),W=require("@base-ui/react/number-field"),pe=require("@base-ui/react/progress"),gt=require("@base-ui/react/switch"),ae=require("@base-ui/react/tabs"),_=require("@base-ui/react/toast"),Ra=require("@hookform/resolvers/zod"),Ie=require("react-hook-form"),_a=require("zod");function Ea(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const $=Ea(f),xt=Ta.extendTailwindMerge({});function l(...e){return xt(Pa.clsx(e))}function bt({className:e,...t}){return r.jsx(oe.Accordion.Root,{"data-slot":"accordion",className:l("flex w-full flex-col",e),...t})}function ht({className:e,...t}){return r.jsx(oe.Accordion.Item,{"data-slot":"accordion-item",className:l("not-last:border-b",e),...t})}function vt({className:e,children:t,...o}){return r.jsx(oe.Accordion.Header,{className:"flex",children:r.jsxs(oe.Accordion.Trigger,{"data-slot":"accordion-trigger",className:l("group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",e),...o,children:[t,r.jsx(y.ChevronDownIcon,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"}),r.jsx(y.ChevronUpIcon,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"})]})})}function jt({className:e,children:t,...o}){return r.jsx(oe.Accordion.Panel,{"data-slot":"accordion-content",className:"h-(--accordion-panel-height) overflow-hidden text-sm transition-[height] duration-150 ease-out data-starting-style:h-0 data-ending-style:h-0",...o,children:r.jsx("div",{className:l("pb-2.5 pt-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),children:t})})}function Fa({items:e,className:t,classNames:o,...n}){return r.jsx(bt,{className:t,...n,children:e.map(({value:a,trigger:s,content:i,disabled:c})=>r.jsxs(ht,{value:a,disabled:c,className:o?.item,children:[r.jsx(vt,{className:o?.trigger,children:s}),r.jsx(jt,{className:o?.content,children:i})]},a))})}const yt=({onClick:e,loading:t,style:o,children:n,...a})=>{const[s=!1,i]=H.useControllableState({prop:t,defaultProp:!1}),c=async d=>{if(!e||s)return;const u=e(d);u instanceof Promise&&(i(!0),await u.finally(()=>i(!1)))};return r.jsxs(ka.Button,{"data-slot":"button","data-loading":s||void 0,"aria-busy":s||void 0,...a,onClick:c,style:o,children:[r.jsx("span",{"data-content":!0,className:"contents",children:n}),s&&r.jsx(y.LoaderCircle,{"data-loader":!0,"data-testid":"btn-loader",className:"absolute inset-0 m-auto size-4 animate-spin"})]})},wt=Z.cva(["group/button relative inline-flex shrink-0 items-center justify-center gap-1 rounded-lg border border-transparent bg-clip-padding","text-sm font-medium whitespace-nowrap transition-all outline-none select-none","focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50","active:not-aria-[haspopup]:translate-y-px","disabled:pointer-events-none disabled:opacity-50","aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","[&[data-loading]>[data-content]]:invisible","[&[data-loading]]:pointer-events-none"],{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border-border hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",error:"bg-error text-error-foreground hover:bg-error/90",success:"bg-success text-success-foreground hover:bg-success/90",warning:"bg-warning text-warning-foreground hover:bg-warning/90",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 px-2.5",xs:"h-6 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",sm:"h-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 px-2.5",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}}),U=({variant:e,size:t,className:o,...n})=>r.jsx(yt,{...n,className:l(wt({variant:e,size:t}),o),"data-variant":e||"default"});function Nt(e){return r.jsx(B.AlertDialog.Root,{...e})}function Ct({className:e,...t}){return r.jsx(B.AlertDialog.Trigger,{"data-slot":"alert-dialog-trigger",className:l(e),...t})}function St({className:e,...t}){return r.jsx(B.AlertDialog.Backdrop,{"data-slot":"alert-dialog-backdrop",forceRender:!0,className:l("fixed inset-0 z-overlay bg-black/50","transition-opacity duration-200","data-starting-style:opacity-0 data-ending-style:opacity-0",e),...t})}function Pt({className:e,...t}){return r.jsx(B.AlertDialog.Viewport,{"data-slot":"alert-dialog-viewport",className:l("fixed inset-0 z-overlay flex items-center justify-center p-4",e),...t})}function Tt({className:e,classNames:t,portalProps:o,...n}){return r.jsxs(B.AlertDialog.Portal,{...o,children:[r.jsx(St,{className:t?.backdrop}),r.jsx(Pt,{className:t?.viewport,children:r.jsx(B.AlertDialog.Popup,{"data-slot":"alert-dialog-popup",className:l("relative flex w-full max-w-lg flex-col gap-4 rounded-lg border bg-background p-6 shadow-lg","transition-[scale,opacity] duration-200 ease-out","data-starting-style:scale-95 data-starting-style:opacity-0","data-ending-style:scale-95 data-ending-style:opacity-0",e),...n})})]})}function Ve({className:e,...t}){return r.jsx(B.AlertDialog.Close,{"data-slot":"alert-dialog-close",className:l(e),...t})}function kt({className:e,...t}){return r.jsx(B.AlertDialog.Title,{"data-slot":"alert-dialog-title",className:l("text-lg font-semibold leading-none tracking-tight",e),...t})}function zt({className:e,...t}){return r.jsx(B.AlertDialog.Description,{"data-slot":"alert-dialog-description",className:l("text-sm text-muted-foreground",e),...t})}function It({className:e,...t}){return r.jsx("div",{"data-slot":"alert-dialog-header",className:l("flex flex-col gap-2",e),...t})}function Dt({className:e,...t}){return r.jsx("div",{"data-slot":"alert-dialog-footer",className:l("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function La({trigger:e,title:t,description:o,children:n,onClose:a,onAction:s,variant:i="default",closeText:c="Cancel",actionText:d="Confirm",className:u,classNames:p,...x}){return r.jsxs(Nt,{...x,children:[e&&r.jsx(Ct,{render:e}),r.jsxs(Tt,{className:u,classNames:{backdrop:p?.backdrop},children:[(t||o)&&r.jsxs(It,{className:p?.header,children:[t&&r.jsx(kt,{className:p?.title,children:t}),o&&r.jsx(zt,{className:p?.description,children:o})]}),n,r.jsxs(Dt,{className:p?.footer,children:[r.jsx(Ve,{render:r.jsx(U,{variant:"secondary",className:p?.closeButton,children:c}),onClick:a}),r.jsx(Ve,{render:r.jsx(U,{variant:i??"default",className:p?.actionButton,children:d}),onClick:s})]})]})]})}const Q="h-8 w-full px-3 rounded-md border border-input bg-background text-sm outline-none transition-shadow placeholder:text-muted-foreground";function At({className:e,nativeInput:t=!1,onValueChange:o,...n}){const a=l(Q,"focus-visible:border-ring","aria-invalid:border-error focus-visible:aria-invalid:ring-error/20","has-aria-invalid:border-error has-focus-visible:has-aria-invalid:ring-error/20","disabled:cursor-not-allowed disabled:opacity-50",n.type==="number"&&["[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:appearance-none","[-moz-appearance:textfield]"],n.type==="search"&&["[&::-webkit-search-cancel-button]:appearance-none","[&::-webkit-search-decoration]:appearance-none","[&::-webkit-search-results-button]:appearance-none","[&::-webkit-search-results-decoration]:appearance-none"],n.type==="file"&&["text-muted-foreground","file:me-3 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm"],e),s=o?i=>o(i.target.value,i):void 0;return t?r.jsx("input",{autoComplete:"off",className:a,"data-slot":"input",onChange:s,...n}):r.jsx($e.Input,{autoComplete:"off",className:a,"data-slot":"input",onChange:s,...n})}function Ue({className:e,children:t,scrollFade:o=!1,scrollbarGutter:n=!1,...a}){return r.jsxs(re.ScrollArea.Root,{className:l("size-full min-h-0",e),...a,children:[r.jsx(re.ScrollArea.Viewport,{className:l("h-full rounded-[inherit] outline-none transition-shadows focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background data-has-overflow-y:overscroll-y-contain data-has-overflow-x:overscroll-x-contain",o&&"mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]",n&&"data-has-overflow-y:pe-2.5 data-has-overflow-x:pb-2.5"),"data-slot":"scroll-area-viewport",children:t}),r.jsx(Oe,{orientation:"vertical"}),r.jsx(Oe,{orientation:"horizontal"}),r.jsx(re.ScrollArea.Corner,{"data-slot":"scroll-area-corner"})]})}function Oe({className:e,orientation:t="vertical",...o}){return r.jsx(re.ScrollArea.Scrollbar,{className:l("m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100",e),"data-slot":"scroll-area-scrollbar",orientation:t,...o,children:r.jsx(re.ScrollArea.Thumb,{className:"relative flex-1 rounded-full bg-foreground/20","data-slot":"scroll-area-thumb"})})}const Rt=P.Autocomplete.Root;function _t({className:e,adornment:t,startAddon:o,triggerProps:n,clearProps:a,...s}){return r.jsxs(P.Autocomplete.InputGroup,{className:"relative not-has-[>*.w-full]:w-fit w-full text-foreground has-disabled:opacity-64","data-slot":"autocomplete-input-group",children:[o&&r.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-y-0 start-px z-10 flex items-center ps-[calc(--spacing(3)-1px)] opacity-80 [&_svg:not([class*='size-'])]:size-4 [&_svg]:-mx-0.5","data-slot":"autocomplete-start-addon",children:o}),r.jsx(P.Autocomplete.Input,{className:l(Q,"focus-visible:border-ring","aria-invalid:border-error focus-visible:aria-invalid:ring-error/20","disabled:cursor-not-allowed disabled:opacity-50",o&&"ps-9",t&&"pe-9",e),"data-slot":"autocomplete-input",render:r.jsx("input",{autoComplete:"off","data-slot":"input"}),...s}),t==="clear"?r.jsx(Ot,{...a}):t==="trigger"?r.jsx(Vt,{...n}):null]})}function Et({className:e,children:t,side:o="bottom",sideOffset:n=4,alignOffset:a,align:s="start",anchor:i,portalProps:c,...d}){return r.jsx(P.Autocomplete.Portal,{...c,children:r.jsx(P.Autocomplete.Positioner,{align:s,alignOffset:a,anchor:i,className:"z-50 select-none","data-slot":"autocomplete-positioner",side:o,sideOffset:n,children:r.jsx("span",{className:l("relative flex max-h-full min-w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) rounded-lg border bg-popover shadow-lg/5 transition-[scale,opacity]",e),children:r.jsx(P.Autocomplete.Popup,{className:"flex max-h-[min(var(--available-height),23rem)] flex-1 flex-col text-foreground","data-slot":"autocomplete-popup",...d,children:t})})})})}function Ft({className:e,...t}){return r.jsx(Ue,{scrollbarGutter:!0,scrollFade:!0,children:r.jsx(P.Autocomplete.List,{className:l("not-empty:scroll-py-1 not-empty:p-1 in-data-has-overflow-y:pe-3",e),"data-slot":"autocomplete-list",...t})})}function Lt({className:e,children:t,...o}){return r.jsx(P.Autocomplete.Item,{className:l("flex min-h-8 cursor-default select-none items-center rounded-sm px-2 py-1 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm",e),"data-slot":"autocomplete-item",...o,children:t})}function Ma({className:e,...t}){return r.jsx(P.Autocomplete.Separator,{className:l("mx-2 my-1 h-px bg-border last:hidden",e),"data-slot":"autocomplete-separator",...t})}function Va({className:e,...t}){return r.jsx(P.Autocomplete.Group,{className:l("[[role=group]+&]:mt-1.5",e),"data-slot":"autocomplete-group",...t})}function Oa({className:e,...t}){return r.jsx(P.Autocomplete.GroupLabel,{className:l("px-2 py-1.5 font-medium text-muted-foreground text-xs",e),"data-slot":"autocomplete-group-label",...t})}function Mt({className:e,...t}){return r.jsx(P.Autocomplete.Empty,{className:l("p-2 text-center text-base text-muted-foreground sm:text-sm empty:hidden",e),"data-slot":"autocomplete-empty",...t})}function Vt({className:e,children:t,...o}){return r.jsx(P.Autocomplete.Trigger,{className:l("absolute end-0.5 top-1/2 inline-flex size-8 shrink-0 -translate-y-1/2 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-colors pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 sm:size-7 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),"data-slot":"autocomplete-trigger",...o,children:t??r.jsx(P.Autocomplete.Icon,{"data-slot":"autocomplete-icon",children:r.jsx(y.ChevronsUpDownIcon,{})})})}function Ot({className:e,children:t,...o}){return r.jsx(P.Autocomplete.Clear,{className:l("absolute end-0.5 top-1/2 inline-flex size-8 shrink-0 -translate-y-1/2 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-[color,background-color,box-shadow,opacity] pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 sm:size-7 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),"data-slot":"autocomplete-clear",...o,children:t??r.jsx(y.XIcon,{})})}function Ga({className:e,...t}){return r.jsx(P.Autocomplete.Row,{className:e,"data-slot":"autocomplete-row",...t})}function Ba({...e}){return r.jsx(P.Autocomplete.Value,{"data-slot":"autocomplete-value",...e})}function Gt({className:e,...t}){return r.jsx(P.Autocomplete.Status,{className:l("px-3 py-2 font-medium text-muted-foreground text-xs empty:m-0 empty:p-0",e),"data-slot":"autocomplete-status",...t})}function Ha({...e}){return r.jsx(P.Autocomplete.Collection,{"data-slot":"autocomplete-collection",...e})}const qa=P.Autocomplete.useFilter;function $a({items:e,value:t,defaultValue:o,onValueChange:n,disabled:a,readOnly:s,isLoading:i=!1,filter:c,autoHighlight:d,placeholder:u="Buscar...",emptyMessage:p="Sin resultados",loadingMessage:x="Cargando...",renderOption:m,adornment:j,startAddon:b,className:g,classNames:v}){return r.jsxs(Rt,{items:e,value:t?.label,defaultValue:o?.label,onValueChange:h=>n?.(h??null),disabled:a,readOnly:s,filter:c,autoHighlight:d,itemToStringValue:h=>h.label,children:[r.jsx(_t,{adornment:j,startAddon:b,placeholder:u,className:g}),r.jsxs(Et,{className:v?.popup,children:[r.jsx(Gt,{className:v?.status,children:i?x:void 0}),r.jsx(Ft,{className:v?.list,children:h=>r.jsx(Lt,{value:h,className:v?.item,children:m?m(h):h.label},h.value)}),!i&&r.jsx(Mt,{className:v?.empty,children:p})]})]})}function Xa(e,t){const o=e.safeParse(t);return o.success?{data:o.data,errors:{}}:{data:null,errors:_a.z.flattenError(o.error).fieldErrors}}function Ka(e,t){return Ie.useForm({...t,resolver:Ra.zodResolver(e)})}function Ua({form:e,onFormSubmit:t,children:o,...n}){return r.jsx(Ie.FormProvider,{...e,children:r.jsx(so,{onSubmit:a=>{a.preventDefault(),e.handleSubmit(t)()},...n,children:o})})}function Wa({name:e,rules:t,render:o,...n}){const{control:a}=Ie.useFormContext();return r.jsx(Ie.Controller,{name:e,control:a,rules:t,render:({field:s,fieldState:i})=>r.jsx(Nr,{...n,invalid:i.invalid,error:i.error?.message,children:o({...s,invalid:i.invalid})})})}const Ya=()=>{const e=f.createContext(null);return[()=>{const o=f.useContext(e);if(o===null)throw new Error("Context value is null");return o},e.Provider]},Ja=({children:e,as:t="div",props:o})=>{let n;return typeof e=="string"?n=r.jsx(t,{children:e}):f.isValidElement(e)?n=e:typeof e=="function"?n=e(o):n=r.jsx(t,{children:e}),f.isValidElement(n)?n:r.jsx(t,{children:n})},Za=e=>{e.preventDefault();const t=e.currentTarget.elements,o={};return Array.from(t).forEach(n=>{const a=n;a.name&&(o[a.name]=a.value)}),o};function Qa(e){return t=>{e.forEach(o=>{typeof o=="function"?o(t):o!=null&&(o.current=t)})}}const Bt=e=>e.split(" ").map(t=>t.charAt(0)).join(""),Ht=Z.cva("group/avatar relative flex aspect-square shrink-0 select-none rounded-full bg-muted items-center justify-center font-medium",{variants:{size:{xs:"size-6 text-[10px]",sm:"size-8 text-xs",md:"size-10 text-sm",lg:"size-14 text-base",xl:"size-20 text-xl"}},defaultVariants:{size:"md"}});function qt({className:e,size:t,...o}){return r.jsx(De.Avatar.Root,{className:l(Ht({size:t}),e),"data-slot":"avatar","data-size":t??"md",...o})}function $t({className:e,...t}){return r.jsx(De.Avatar.Image,{className:l("aspect-square size-full rounded-full object-cover",e),"data-slot":"avatar-image",...t})}function Xt({className:e,...t}){return r.jsx(De.Avatar.Fallback,{className:l("flex size-full items-center justify-center rounded-full bg-muted text-muted-foreground",e),"data-slot":"avatar-fallback",...t})}function Kt({className:e,...t}){return r.jsx("span",{"data-slot":"avatar-badge",className:l("absolute bottom-0 right-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground ring-2 ring-background select-none","group-data-[size=xs]/avatar:size-1.5 group-data-[size=xs]/avatar:[&>svg]:hidden","group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden","group-data-[size=md]/avatar:size-2.5 group-data-[size=md]/avatar:[&>svg]:size-2","group-data-[size=lg]/avatar:size-3.5 group-data-[size=lg]/avatar:[&>svg]:size-2.5","group-data-[size=xl]/avatar:size-4 group-data-[size=xl]/avatar:[&>svg]:size-3",e),...t})}function en({className:e,...t}){return r.jsx("div",{"data-slot":"avatar-group",className:l("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",e),...t})}function tn({className:e,size:t,...o}){return r.jsx("div",{"data-slot":"avatar-group-count",className:l(Ht({size:t}),"ring-2 ring-background bg-muted text-muted-foreground",e),...o})}function rn({src:e,alt:t,fallback:o,badge:n,delay:a,size:s,className:i,classNames:c,...d}){return r.jsxs(qt,{size:s,className:i,...d,children:[r.jsx($t,{src:e,alt:t,className:c?.image}),r.jsx(Xt,{delay:a,className:c?.fallback,children:o??Bt(t)}),n?r.jsx(Kt,{className:c?.badge,children:n}):null]})}const We=l(Q,"relative inline-flex items-center justify-between gap-2 select-none text-left text-foreground","focus-visible:border-ring","aria-invalid:border-error focus-visible:aria-invalid:ring-error/20","has-aria-invalid:border-error has-focus-visible:has-aria-invalid:ring-error/20","data-disabled:cursor-not-allowed data-disabled:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0"),Ye="-me-1 size-4.5 opacity-80 sm:size-4";function Ut({...e}){return r.jsx(k.Select.Root,{...e})}function Wt({className:e,children:t,...o}){return r.jsxs(k.Select.Trigger,{className:l(We,e),"data-slot":"select-trigger",...o,children:[t,r.jsx(k.Select.Icon,{"data-slot":"select-icon",className:"text-muted-foreground hover:text-foreground transition-colors",children:r.jsx(y.ChevronsUpDownIcon,{className:Ye})})]})}function on({className:e,render:t,children:o,...n}){const a=t?void 0:"button",s={children:r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"flex-1 truncate in-data-placeholder:text-muted-foreground/72",children:o}),r.jsx(y.ChevronsUpDownIcon,{className:Ye})]}),className:l(We,"min-w-0",e),"data-slot":"select-button",type:a};return C.useRender({defaultTagName:"button",props:S.mergeProps(s,n),render:t})}function Yt({className:e,...t}){return r.jsx(k.Select.Value,{className:l("flex-1 truncate data-placeholder:text-muted-foreground",e),"data-slot":"select-value",...t})}function Je({className:e,children:t,side:o="bottom",sideOffset:n=4,align:a="start",alignOffset:s=0,alignItemWithTrigger:i=!1,anchor:c,portalProps:d,...u}){return r.jsx(k.Select.Portal,{...d,children:r.jsx(k.Select.Positioner,{align:a,alignItemWithTrigger:i,alignOffset:s,anchor:c,className:"z-50 select-none","data-slot":"select-positioner",side:o,sideOffset:n,children:r.jsxs(k.Select.Popup,{className:"origin-(--transform-origin) text-foreground outline-none","data-slot":"select-popup",...u,children:[r.jsx(k.Select.ScrollUpArrow,{className:"top-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:top-px before:h-[200%] before:rounded-t-[calc(var(--radius-lg)-1px)] before:bg-linear-to-b before:from-50% before:from-popover","data-slot":"select-scroll-up-arrow",children:r.jsx(y.ChevronUpIcon,{className:"relative size-4.5 sm:size-4"})}),r.jsx("div",{className:"relative h-full min-w-(--anchor-width) rounded-lg border bg-popover not-dark:bg-clip-padding shadow-lg/5 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]",children:r.jsx(k.Select.List,{className:l("max-h-[min(24rem,var(--available-height))] overflow-y-auto p-1",e),"data-slot":"select-list",children:t})}),r.jsx(k.Select.ScrollDownArrow,{className:"bottom-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:bottom-px before:h-[200%] before:rounded-b-[calc(var(--radius-lg)-1px)] before:bg-linear-to-t before:from-50% before:from-popover","data-slot":"select-scroll-down-arrow",children:r.jsx(y.ChevronDownIcon,{className:"relative size-4.5 sm:size-4"})})]})})})}function Jt({className:e,children:t,...o}){return r.jsxs(k.Select.Item,{className:l("grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[1fr_1rem] items-center gap-2 rounded-sm py-1 px-2 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),"data-slot":"select-item",...o,children:[r.jsx(k.Select.ItemText,{className:"col-start-1 min-w-0",children:t}),r.jsx(k.Select.ItemIndicator,{className:"col-start-2",children:r.jsx("svg",{"aria-hidden":"true",fill:"none",height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M5.252 12.7 10.2 18.63 18.748 5.37"})})})]})}function an({className:e,...t}){return r.jsx(k.Select.Separator,{className:l("mx-2 my-1 h-px bg-border",e),"data-slot":"select-separator",...t})}function nn(e){return r.jsx(k.Select.Group,{"data-slot":"select-group",...e})}function sn(e){return r.jsx(k.Select.GroupLabel,{className:"px-2 py-1.5 font-medium text-muted-foreground text-xs","data-slot":"select-group-label",...e})}function ln({className:e,...t}){return r.jsx(k.Select.Label,{className:l("not-in-data-[slot=field]:mb-2 inline-flex cursor-default items-center gap-2 font-medium text-base/4.5 text-foreground sm:text-sm/4",e),"data-slot":"select-label",...t})}function cn(e){if(e==null)return"";if(typeof e=="string"||typeof e=="number")return String(e);if(typeof e=="object"){const t=e;if("label"in t)return String(t.label);if("name"in t)return String(t.name);if("title"in t)return String(t.title)}return String(e)}function dn(e){if(e==null)return"";if(typeof e=="string"||typeof e=="number")return String(e);if(typeof e=="object"){const t=e;if("id"in t)return String(t.id);if("value"in t)return String(t.value)}return String(e)}function un(e){return e!=null&&typeof e=="object"&&"disabled"in e?!!e.disabled:!1}function Zt(e){const{items:t,getLabel:o,getId:n,getDisabled:a,renderItem:s,placeholder:i,onValueChange:c,value:d,defaultValue:u,multiple:p,className:x,classNames:m,...j}=e,b=o??cn,g=n??dn,v=a??un,h=p?d?.map(g):d!=null?g(d):void 0,D=p?u?.map(g):u!=null?g(u):void 0,R=z=>{if(p){const G=(z??[]).map(ie=>t.find(he=>g(he)===ie)??null).filter(Boolean);c?.(G)}else{if(z==null){c?.(null);return}const q=t.find(G=>g(G)===z)??null;c?.(q)}},se=z=>{const q=t.find(G=>g(G)===z);return q?b(q):z};return r.jsxs(Ut,{itemToStringLabel:se,multiple:p,value:h,defaultValue:D,onValueChange:R,...j,children:[r.jsx(Wt,{className:x,children:r.jsx(Yt,{placeholder:i})}),r.jsx(Je,{className:m?.popup,children:t.map(z=>r.jsx(Jt,{value:g(z),disabled:v(z),className:m?.item,children:s?s(z):b(z)},g(z)))})]})}const Qt=new Date().getFullYear(),pn=new Date(Qt-100,0),mn=new Date(Qt+100,11);function fn({options:e=[],value:t,onChange:o}){const n=e.map(s=>({label:s.label??"",value:s.value??0})),a=n.find(s=>s.value===Number(t))??null;return r.jsx(Zt,{items:n,value:a,className:"py-1 h-7",getLabel:s=>s.label,getId:s=>String(s.value),onValueChange:s=>{!o||s===null||o({target:{value:String(s.value)}})}})}const Le="relative flex size-(--cell-size) text-base sm:text-sm items-center justify-center rounded-lg text-foreground not-in-data-selected:hover:bg-accent disabled:pointer-events-none disabled:opacity-64 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0";function me({className:e,classNames:t,showOutsideDays:o=!0,components:n,mode:a="single",captionLayout:s="dropdown",startMonth:i=pn,endMonth:c=mn,...d}){const u={button_next:Le,button_previous:Le,caption_label:"text-base sm:text-sm font-medium flex items-center gap-2 h-full",day:"size-(--cell-size) text-sm py-px",day_button:l(Le,"in-data-disabled:pointer-events-none in-[.range-middle]:rounded-none in-[.range-end:not(.range-start)]:rounded-s-none in-[.range-start:not(.range-end)]:rounded-e-none in-[.range-middle]:in-data-selected:bg-accent in-data-selected:bg-primary in-[.range-middle]:in-data-selected:text-foreground in-data-disabled:text-muted-foreground/72 in-data-outside:text-muted-foreground/72 in-data-selected:in-data-outside:text-primary-foreground in-data-selected:text-primary-foreground in-data-disabled:line-through outline-none in-[[data-selected]:not(.range-middle)]:transition-[color,background-color,border-radius,box-shadow] focus-visible:z-1 focus-visible:ring-[3px] focus-visible:ring-ring/50"),dropdown:"absolute bg-popover inset-0 opacity-0",dropdown_root:"relative has-focus:border-ring has-focus:ring-ring/50 has-focus:ring-[3px] border border-input shadow-xs/5 rounded-lg px-[calc(--spacing(3)-1px)] h-9 sm:h-8 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-me-1",dropdowns:"w-full flex items-center text-base sm:text-sm justify-center h-(--cell-size) gap-1.5 *:[span]:font-medium",hidden:"invisible",month:"w-full",month_caption:"relative mx-(--cell-size) px-1 mb-1 flex h-(--cell-size) items-center justify-center z-2",months:"relative flex flex-col sm:flex-row gap-2",nav:"absolute top-0 flex w-full justify-between z-1",outside:"text-muted-foreground data-selected:bg-accent/50 data-selected:text-muted-foreground",range_end:"range-end",range_middle:"range-middle",range_start:"range-start",today:"*:after:pointer-events-none *:after:absolute *:after:bottom-1 *:after:start-1/2 *:after:z-1 *:after:size-[3px] *:after:-translate-x-1/2 *:after:rounded-full *:after:bg-primary [&[data-selected]:not(.range-middle)>*]:after:bg-background [&[data-disabled]>*]:after:bg-foreground/30 *:after:transition-colors",week_number:"size-(--cell-size) p-0 text-xs font-medium text-muted-foreground/72",weekday:"size-(--cell-size) p-0 text-xs font-medium text-muted-foreground/72"},p=Object.keys(u).reduce((b,g)=>{const v=t?.[g],h=u[g];return b[g]=v?l(h,v):h,b},{...u}),m={...{Dropdown:fn,Chevron:({className:b,orientation:g,...v})=>g==="left"?r.jsx(y.ChevronLeftIcon,{className:l(b,"rtl:rotate-180"),...v,"aria-hidden":"true"}):g==="right"?r.jsx(y.ChevronRightIcon,{className:l(b,"rtl:rotate-180"),...v,"aria-hidden":"true"}):r.jsx(y.ChevronsUpDownIcon,{className:b,...v,"aria-hidden":"true"})},...n},j={className:l("w-fit [--cell-size:--spacing(10)] sm:[--cell-size:--spacing(9)]",e),classNames:p,components:m,"data-slot":"calendar",formatters:{formatMonthDropdown:b=>b.toLocaleString("es",{month:"short"})},locale:za.es,weekStartsOn:1,captionLayout:s,startMonth:i,endMonth:c,mode:a,showOutsideDays:o,...d};return r.jsx(Ia.DayPicker,{...j})}function er({className:e,size:t="default",...o}){return r.jsx("div",{"data-slot":"card","data-size":t,className:l("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...o})}function tr({className:e,...t}){return r.jsx("div",{"data-slot":"card-header",className:l("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",e),...t})}function rr({className:e,...t}){return r.jsx("div",{"data-slot":"card-title",className:l("cn-font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...t})}function or({className:e,...t}){return r.jsx("div",{"data-slot":"card-description",className:l("text-sm text-muted-foreground",e),...t})}function ar({className:e,...t}){return r.jsx("div",{"data-slot":"card-action",className:l("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function nr({className:e,...t}){return r.jsx("div",{"data-slot":"card-content",className:l("px-4 group-data-[size=sm]/card:px-3",e),...t})}function sr({className:e,...t}){return r.jsx("div",{"data-slot":"card-footer",className:l("flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3",e),...t})}function gn({title:e,description:t,action:o,footer:n,children:a,size:s,className:i,classNames:c,...d}){const u=e||t||o;return r.jsxs(er,{size:s,className:i,...d,children:[u&&r.jsxs(tr,{className:c?.header,children:[e&&r.jsx(rr,{className:c?.title,children:e}),t&&r.jsx(or,{className:c?.description,children:t}),o&&r.jsx(ar,{className:c?.action,children:o})]}),a&&r.jsx(nr,{className:c?.content,children:a}),n&&r.jsx(sr,{className:c?.footer,children:n})]})}const xn=({as:e="div",inline:t=!1,className:o,...n})=>r.jsx(e,{className:l(t?"inline-flex":"flex","items-center justify-center",o),...n,"data-slot":"center"});function bn(e){return r.jsx("svg",{width:"20",height:"10",viewBox:"0 0 20 10",fill:"none",...e,children:r.jsx("path",{d:"M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z",fill:"currentColor"})})}function ir(e){return r.jsx(K.Tooltip.Provider,{...e})}function lr(e){return r.jsx(K.Tooltip.Root,{...e})}function cr({className:e,...t}){return r.jsx(K.Tooltip.Trigger,{"data-slot":"tooltip-trigger",className:l(e),...t})}function dr({className:e,...t}){return r.jsx(K.Tooltip.Popup,{"data-slot":"tooltip-popup",className:l("flex origin-[var(--transform-origin)] flex-col rounded-md bg-popover px-2.5 py-1.5 text-xs text-popover-foreground drop-shadow-md","transition-[scale,opacity] duration-150 ease-out","data-starting-style:scale-98 data-starting-style:opacity-0","data-ending-style:scale-98 data-ending-style:opacity-0","data-instant:duration-0",e),...t})}function ur({className:e,...t}){return r.jsx(K.Tooltip.Arrow,{"data-slot":"tooltip-arrow",className:l("flex text-popover","data-[side=bottom]:top-[-8px]","data-[side=left]:right-[-13px] data-[side=left]:rotate-90","data-[side=right]:left-[-13px] data-[side=right]:-rotate-90","data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180",e),...t,children:r.jsx(bn,{})})}function pr({content:e,children:t,open:o,defaultOpen:n,onOpenChange:a,side:s="top",align:i,offset:c=10,delay:d,closeDelay:u,className:p,classNames:x,...m}){return r.jsxs(lr,{open:o,defaultOpen:n,onOpenChange:a,children:[r.jsx(cr,{delay:d,closeDelay:u,render:t,...m}),r.jsx(K.Tooltip.Portal,{children:r.jsx(K.Tooltip.Positioner,{side:s,align:i,sideOffset:c,className:"z-float",children:r.jsxs(dr,{className:p,children:[r.jsx(ur,{className:x?.arrow}),e]})})})]})}function fe({className:e,render:t,required:o,tooltip:n,classNames:a,children:s,...i}){const c=o||n?r.jsxs(r.Fragment,{children:[s,o&&r.jsx("span",{"aria-hidden":!0,className:l("text-error",a?.asterisk),children:"*"}),n&&r.jsx(pr,{content:n,children:r.jsx("button",{type:"button","aria-label":"More information",className:l("inline-flex cursor-default items-center text-muted-foreground hover:text-foreground transition-all ml-1",a?.tooltip),children:r.jsx(y.Info,{className:"size-3.5"})})})]}):s,d={className:l("inline-flex items-center font-medium text-sm leading-none","peer-data-disabled:cursor-not-allowed peer-data-disabled:opacity-70",e),"data-slot":"label",children:c};return C.useRender({defaultTagName:"label",props:S.mergeProps(d,i),render:t})}function Ze({className:e,...t}){return r.jsx(Xe.Checkbox.Root,{className:l("peer relative inline-flex size-4.5 shrink-0 items-center justify-center rounded-[.25rem] border border-input bg-background not-dark:bg-clip-padding shadow-xs/5 outline-none ring-ring transition-shadow","before:pointer-events-none before:absolute before:inset-0 before:rounded-[3px]","not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)]","focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-offset-background","aria-invalid:border-error focus-visible:aria-invalid:border-error focus-visible:aria-invalid:ring-error","data-disabled:cursor-not-allowed data-disabled:opacity-64","sm:size-4","dark:not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]","[[data-disabled],[data-checked],[aria-invalid]]:shadow-none",e),"data-slot":"checkbox",...t})}function Qe({className:e,...t}){return r.jsx(Xe.Checkbox.Indicator,{className:l("absolute -inset-px flex items-center justify-center rounded-[.25rem] text-primary-foreground","data-unchecked:hidden data-checked:bg-primary data-indeterminate:text-foreground",e),"data-slot":"checkbox-indicator",render:(o,n)=>r.jsx("span",{...o,children:n.indeterminate?r.jsx("svg",{"aria-hidden":"true",className:"size-3.5 sm:size-3",fill:"none",height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M5.252 12h13.496"})}):r.jsx("svg",{"aria-hidden":"true",className:"size-3.5 sm:size-3",fill:"none",height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M5.252 12.7 10.2 18.63 18.748 5.37"})})}),...t})}const Ae=f.createContext({controlFirst:!0,invalid:!1});function hn({className:e,classNames:t,label:o,children:n,tooltip:a,controlFirst:s=!0,required:i,id:c,...d}){const u=f.useId(),p=c??u,x=o??n,m=r.jsx(Ze,{id:p,className:e,required:i,...d,children:r.jsx(Qe,{className:t?.indicator})});return x!==void 0?r.jsxs("div",{className:l("flex select-none items-center gap-x-2",!s&&"flex-row-reverse justify-end",t?.wrapper),children:[m,r.jsx(fe,{htmlFor:p,required:i,tooltip:a,className:t?.label,children:x})]}):m}function vn({className:e,classNames:t,label:o,id:n,...a}){const{controlFirst:s,invalid:i}=f.useContext(Ae),c=f.useId(),d=n??c;return r.jsx(O.Field.Root,{invalid:i,children:r.jsxs("div",{className:l("flex select-none items-center gap-x-2",!s&&"flex-row-reverse justify-end",t?.wrapper),children:[r.jsx(Ze,{id:d,className:e,...a,children:r.jsx(Qe,{className:t?.indicator})}),r.jsx(fe,{htmlFor:d,className:t?.label,children:o})]})})}function mr({children:e,className:t}){return r.jsx(ue.Fieldset.Legend,{className:l("text-sm font-medium leading-none",t),children:e})}function jn({legend:e,children:t,error:o,description:n,defaultValue:a,value:s,onValueChange:i,allValues:c,disabled:d,controlFirst:u=!0,className:p,classNames:x}){return r.jsx(Ae.Provider,{value:{controlFirst:u,invalid:!!o},children:r.jsx(Ke.CheckboxGroup,{defaultValue:a,value:s,onValueChange:i,allValues:c,disabled:d,children:r.jsxs(ue.Fieldset.Root,{className:l("flex flex-col gap-3",p),children:[e&&r.jsx(mr,{className:x?.legend,children:e}),r.jsx("div",{className:l("flex flex-col gap-2",x?.items),children:t}),o&&r.jsx("p",{className:l("text-sm font-medium text-error",x?.error),children:o}),!o&&n&&r.jsx("p",{className:l("text-sm text-muted-foreground",x?.description),children:n})]})})})}const fr=Object.assign(hn,{Item:vn,Group:jn,Legend:mr}),gr=f.createContext(void 0);function yn(){return f.useContext(gr)}const xr=f.createContext(!1);function et(){return f.useContext(xr)}function br({className:e,required:t,name:o,...n}){return r.jsx(xr.Provider,{value:!0,children:r.jsx(gr.Provider,{value:o,children:r.jsx(O.Field.Root,{name:o,className:l("group flex flex-col gap-1",e),"data-slot":"field","data-required":t||void 0,...n})})})}function hr({className:e,...t}){return r.jsx(O.Field.Label,{className:l("inline-flex items-center font-medium text-base/4.5 text-foreground data-disabled:opacity-64 sm:text-sm/4",e),"data-slot":"field-label",...t})}function wn({className:e,...t}){return r.jsx(O.Field.Item,{className:l("flex items-center gap-2",e),"data-slot":"field-item",...t})}function vr({className:e,...t}){return r.jsx(O.Field.Description,{className:l("text-muted-foreground text-xs group-data-[invalid]:hidden",e),"data-slot":"field-description",...t})}function je({className:e,...t}){return r.jsx(O.Field.Error,{className:l("text-error text-xs",e),"data-slot":"field-error",...t})}const tt=O.Field.Control,rt=O.Field.Validity;function jr({className:e,...t}){return r.jsx(ue.Fieldset.Root,{className:l("flex flex-col gap-3",e),"data-slot":"fieldset",...t})}function yr({className:e,...t}){return r.jsx(ue.Fieldset.Legend,{className:l("text-sm font-medium leading-none",e),"data-slot":"fieldset-legend",...t})}function wr(e){return e===void 0?[]:typeof e=="string"?[{message:e,match:!0}]:Array.isArray(e)?e:[e]}function Nr({label:e,description:t,error:o,required:n,tooltip:a,inline:s=!1,children:i,className:c,classNames:d,invalid:u,...p}){const x=wr(o),m=u||x.some(b=>b.match===!0)||void 0,j=e&&r.jsx(hr,{render:a?r.jsx(fe,{tooltip:a}):void 0,className:d?.label,children:r.jsx("span",{className:"after:text-error group-has-[*:required]:after:content-['*'] group-data-[required]:after:content-['*']",children:e})});return r.jsxs(br,{className:c,required:n,invalid:m,...p,children:[s?r.jsxs("div",{className:"flex items-center gap-1",children:[i,j]}):r.jsxs(r.Fragment,{children:[j,i]}),t&&r.jsx(vr,{className:d?.description,children:t}),x.map((b,g)=>r.jsx(je,{match:b.match,className:d?.error,children:b.message},g)),!x.some(b=>b.match===void 0)&&(x.length===0?r.jsx(je,{className:d?.error}):r.jsx(rt,{children:({validity:b,error:g})=>!b.valid&&(g===""||b.customError)?r.jsx(je,{className:d?.error}):null}))]})}function Nn({className:e,...t}){return r.jsx(Ke.CheckboxGroup,{className:l("flex flex-col items-start gap-3",e),"data-slot":"checkbox-group",...t})}function Cn({legend:e,children:t,items:o,defaultValue:n,value:a,onValueChange:s,allValues:i,disabled:c,controlFirst:d=!0,className:u}){const p=et(),x=m=>r.jsx(Ae.Provider,{value:{controlFirst:d,invalid:m},children:r.jsx(Ke.CheckboxGroup,{defaultValue:n,value:a,onValueChange:s,allValues:i,disabled:c,children:r.jsxs(jr,{className:u,children:[e&&r.jsx(yr,{children:e}),r.jsx("div",{className:"flex flex-col gap-2",children:o?o.map(j=>r.jsx(fr.Item,{value:j.value,label:j.label,disabled:j.disabled},j.value)):t})]})})});return p?r.jsx(rt,{children:({validity:m})=>x(m.valid===!1)}):x(!1)}const ge=$.createContext({chipsRef:null,multiple:!1});function Cr({...e}){const t=$.useRef(null);return r.jsx(ge.Provider,{value:{chipsRef:t,multiple:!!e.multiple},children:r.jsx(w.Combobox.Root,{...e})})}function Sr({className:e,...t}){return r.jsx(w.Combobox.Input,{className:l("min-w-12 flex-1 text-base outline-none placeholder:text-muted-foreground sm:text-sm [[data-slot=combobox-chip]+&]:ps-0.5",e),"data-slot":"combobox-chips-input",...t})}function Pr({className:e,showTrigger:t=!0,showClear:o=!1,startAddon:n,triggerProps:a,clearProps:s,...i}){return r.jsxs(w.Combobox.InputGroup,{className:"relative not-has-[>*.w-full]:w-fit w-full text-foreground has-disabled:opacity-64","data-slot":"combobox-input-group",children:[n&&r.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-y-0 start-px z-10 flex items-center ps-[calc(--spacing(3)-1px)] opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:-mx-0.5","data-slot":"combobox-start-addon",children:n}),r.jsx(w.Combobox.Input,{className:l(n&&"*:data-[slot=combobox-input]:ps-[calc(--spacing(8.5)-1px)] sm:*:data-[slot=combobox-input]:ps-[calc(--spacing(8)-1px)]","pr-6",e),"data-slot":"combobox-input",render:c=>r.jsx(At,{className:"has-disabled:opacity-100",nativeInput:!0,...c}),...i}),r.jsx(ot,{showTrigger:t,showClear:o,triggerProps:a,clearProps:s})]})}function Tr({className:e,children:t,...o}){return r.jsx(w.Combobox.Trigger,{className:e,"data-slot":"combobox-trigger",...o,children:t})}function Sn({className:e,placeholder:t,children:o,showClear:n,clearProps:a,...s}){const i=r.jsx(w.Combobox.Trigger,{className:l("relative flex w-full items-center rounded-md border border-input bg-background px-3 py-2 pe-9 text-sm outline-none transition-shadow","focus-visible:border-ring","aria-invalid:border-error focus-visible:aria-invalid:ring-error/20","data-disabled:cursor-not-allowed data-disabled:opacity-50","data-placeholder:text-muted-foreground",e),"data-slot":"combobox-select-trigger",...s,children:o??r.jsx(w.Combobox.Value,{placeholder:t})});return n?r.jsxs("div",{className:"relative w-full text-foreground has-disabled:opacity-64","data-slot":"combobox-select-trigger-group",children:[i,r.jsx(ot,{showTrigger:!0,showClear:!0,clearProps:a})]}):r.jsx(w.Combobox.Trigger,{className:l("relative flex w-full items-center rounded-md border border-input bg-background px-3 py-2 pe-9 text-sm outline-none transition-shadow","focus-visible:border-ring","aria-invalid:border-error focus-visible:aria-invalid:ring-error/20","data-disabled:cursor-not-allowed data-disabled:opacity-50","data-placeholder:text-muted-foreground",e),"data-slot":"combobox-select-trigger",...s,children:o??r.jsxs(r.Fragment,{children:[r.jsx(w.Combobox.Value,{placeholder:t}),r.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute end-0.5 top-1/2 inline-flex size-8 -translate-y-1/2 items-center justify-center text-muted-foreground opacity-80 sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4",children:r.jsx(y.ChevronsUpDownIcon,{})})]})})}function Pn({className:e,...t}){return r.jsx("div",{className:"border-b p-2","data-slot":"combobox-search-input-wrapper",children:r.jsx(w.Combobox.Input,{className:l("flex h-9 w-full rounded-md bg-transparent text-base placeholder:text-muted-foreground outline-none disabled:cursor-not-allowed disabled:opacity-64 sm:h-8 sm:text-sm",e),autoComplete:"off","data-slot":"combobox-search-input",...t})})}function kr({className:e,children:t,side:o="bottom",sideOffset:n=4,alignOffset:a,align:s="start",anchor:i,portalProps:c,...d}){const{chipsRef:u}=$.useContext(ge),p=i??u;return r.jsx(w.Combobox.Portal,{...c,children:r.jsx(w.Combobox.Positioner,{align:s,alignOffset:a,anchor:p,className:"z-50 select-none","data-slot":"combobox-positioner",side:o,sideOffset:n,children:r.jsx("span",{className:l("relative flex max-h-full min-w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) rounded-lg border bg-popover not-dark:bg-clip-padding shadow-lg/5 transition-[scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]",e),children:r.jsx(w.Combobox.Popup,{className:"flex max-h-[min(var(--available-height),23rem)] flex-1 flex-col text-foreground","data-slot":"combobox-popup",...d,children:t})})})})}function zr({className:e,children:t,...o}){return r.jsxs(w.Combobox.Item,{className:l("flex justify-between min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[1rem_1fr] items-center gap-2 rounded-sm py-1 px-2 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),"data-slot":"combobox-item",...o,children:[t,r.jsx(w.Combobox.ItemIndicator,{className:"col-end-1",children:r.jsx("svg",{"aria-hidden":"true",fill:"none",height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M5.252 12.7 10.2 18.63 18.748 5.37"})})})]})}function Tn({className:e,...t}){return r.jsx(w.Combobox.Separator,{className:l("mx-2 my-1 h-px bg-border last:hidden",e),"data-slot":"combobox-separator",...t})}function kn({className:e,...t}){return r.jsx(w.Combobox.Group,{className:l("[[role=group]+&]:mt-1.5",e),"data-slot":"combobox-group",...t})}function zn({className:e,...t}){return r.jsx(w.Combobox.GroupLabel,{className:l("px-2 py-1.5 font-medium text-muted-foreground text-xs",e),"data-slot":"combobox-group-label",...t})}function Ir({className:e,...t}){return r.jsx(w.Combobox.Empty,{className:l("not-empty:p-2 text-center text-base text-muted-foreground sm:text-sm",e),"data-slot":"combobox-empty",...t})}function In({className:e,...t}){return r.jsx(w.Combobox.Row,{className:e,"data-slot":"combobox-row",...t})}function Dr({...e}){return r.jsx(w.Combobox.Value,{"data-slot":"combobox-value",...e})}function Ar({className:e,...t}){return r.jsx(Ue,{scrollbarGutter:!0,scrollFade:!0,children:r.jsx(w.Combobox.List,{className:l("not-empty:scroll-py-1 not-empty:px-1 not-empty:py-1 in-data-has-overflow-y:pe-3",e),"data-slot":"combobox-list",...t})})}function Rr({className:e,...t}){return r.jsx(w.Combobox.Clear,{className:e,"data-slot":"combobox-clear",...t})}const lt="absolute end-0.5 top-1/2 inline-flex size-8 shrink-0 -translate-y-1/2 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0";function ot({showTrigger:e=!0,showClear:t=!1,triggerProps:o,clearProps:n}){return!e&&!t?null:r.jsxs("div",{className:"text-muted-foreground hover:text-foreground transition-colors",children:[e&&r.jsx(Tr,{className:l(lt,"text-muted-foreground has-[+[data-slot=combobox-clear]]:hidden"),...o,children:r.jsx(w.Combobox.Icon,{"data-slot":"combobox-icon",children:r.jsx(y.ChevronsUpDownIcon,{})})}),t&&r.jsx(Rr,{className:lt,...n,children:r.jsx(y.XIcon,{})})]})}function Dn({className:e,...t}){return r.jsx(w.Combobox.Status,{className:l("px-3 py-2 font-medium text-muted-foreground text-xs empty:m-0 empty:p-0",e),"data-slot":"combobox-status",...t})}function An(e){return r.jsx(w.Combobox.Collection,{"data-slot":"combobox-collection",...e})}function _r({className:e,children:t,startAddon:o,...n}){const{chipsRef:a}=$.useContext(ge),s=et(),i=c=>r.jsxs(w.Combobox.Chips,{"aria-invalid":c,className:l(Q,"relative inline-flex pr-6 w-full flex-wrap gap-1","placeholder:text-muted-foreground","focus-within:border-ring","aria-invalid:border-error focus-within:aria-invalid:ring-error/20","has-disabled:cursor-not-allowed has-disabled:opacity-50",e),"data-slot":"combobox-chips",ref:a,...n,children:[o&&r.jsx("div",{"aria-hidden":"true",className:"flex shrink-0 items-center ps-2 opacity-80 has-[+[data-slot=combobox-chip]]:pe-2 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-ms-0.5 [&_svg]:-me-1.5","data-slot":"combobox-start-addon",children:o}),t]});return s?r.jsx(O.Field.Validity,{children:({validity:c})=>i(c.valid===!1?!0:void 0)}):i(void 0)}function Er({children:e,removeProps:t,...o}){return r.jsxs(w.Combobox.Chip,{className:"flex my-auto items-center pl-1 rounded-[calc(var(--radius-md)-1px)] bg-accent font-medium text-accent-foreground text-sm outline-none sm:text-xs/(--text-xs--line-height) [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5 h-6","data-slot":"combobox-chip",...o,children:[e,r.jsx(Fr,{...t})]})}function Fr(e){return r.jsx(w.Combobox.ChipRemove,{"aria-label":"Remove",className:"h-full shrink-0 cursor-pointer px-1 opacity-80 hover:opacity-100 [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5","data-slot":"combobox-chip-remove",...e,children:r.jsx(y.XIcon,{})})}const Me=4,Rn=24,_n=36,En=68;function ct(e,t){const o=e-Rn-_n;let n=0,a=0;for(let s=0;s<t.length;s++){const i=t[s],c=s<t.length-1;if(n+(s>0?Me:0)+i+(c?Me+En:0)>o)break;n+=(s>0?Me:0)+i,a++}return a}function Fn(e,t){const[o,n]=$.useState(null),a=$.useRef([]),s=o===null||o.items!==e;return $.useLayoutEffect(()=>{if(!s)return;const i=t?.current;if(!i)return;const c=i.querySelectorAll('[data-slot="combobox-chip"]');a.current=Array.from(c).map(u=>u.offsetWidth);const d=ct(i.clientWidth,a.current);n({items:e,visible:d})},[s,e,t]),$.useEffect(()=>{const i=t?.current;if(!i)return;const c=new ResizeObserver(()=>{if(!a.current.length)return;const d=ct(i.clientWidth,a.current);n(u=>u?{...u,visible:d}:null)});return c.observe(i),()=>c.disconnect()},[t]),{visibleCount:o?.visible??e,isMeasuring:s}}function Ln({value:e,getLabel:t,getId:o}){const{chipsRef:n}=$.useContext(ge),{visibleCount:a,isMeasuring:s}=Fn(e.length,n),i=s?e:e.slice(0,a),c=s?0:e.length-a;return r.jsxs(r.Fragment,{children:[i.map(d=>r.jsx(Er,{"aria-label":t(d),children:t(d)},o(d))),c>0&&r.jsxs("span",{className:"flex items-center whitespace-nowrap px-1 text-sm text-muted-foreground",children:["+",c," más"]})]})}function Mn(e){if(e==null)return"";if(typeof e=="string"||typeof e=="number")return String(e);if(typeof e=="object"){const t=e;if("label"in t)return String(t.label);if("name"in t)return String(t.name);if("title"in t)return String(t.title)}return String(e)}function Vn(e){if(e==null)return"";if(typeof e=="string"||typeof e=="number")return String(e);if(typeof e=="object"){const t=e;if("id"in t)return String(t.id);if("value"in t)return String(t.value)}return String(e)}function On({placeholder:e,showClear:t,startAddon:o,className:n}){return r.jsx(Pr,{className:n,placeholder:e,showClear:t,startAddon:o})}function Gn({getLabel:e,getId:t,showClear:o,startAddon:n,className:a}){return r.jsxs(_r,{className:a,startAddon:n,children:[r.jsx(Dr,{children:s=>r.jsx(Ln,{value:s,getLabel:e,getId:t})}),r.jsx(ot,{showTrigger:!o,showClear:o})]})}function Bn(e){const{items:t,getLabel:o,getId:n,renderItem:a,placeholder:s,emptyText:i="Sin resultados.",multiple:c,onValueChange:d,value:u,defaultValue:p,startAddon:x,classNames:m,showClear:j=!0,...b}=e,g=o??Mn,v=n??Vn;return r.jsxs(Cr,{items:t,itemToStringLabel:g,itemToStringValue:v,multiple:c,onValueChange:d,value:u,defaultValue:p,autoHighlight:!0,loopFocus:!0,...b,children:[c?r.jsx(Gn,{getLabel:g,getId:v,showClear:j,startAddon:x,className:m?.chips}):r.jsx(On,{placeholder:s,showClear:j,startAddon:x,className:m?.input}),r.jsxs(kr,{className:m?.popup,children:[c&&r.jsx("div",{className:"border-b p-2","data-slot":"combobox-chips-input-wrapper",children:r.jsx(Sr,{className:m?.chipsInput,placeholder:s})}),r.jsx(Ir,{className:m?.empty,children:i}),r.jsx(Ar,{className:m?.list,children:h=>r.jsx(zr,{value:h,className:m?.item,children:a?a(h):g(h)},v(h))})]})]})}const Hn=w.Combobox.useFilter,de="dd/MM/yyyy",dt=(e,t)=>!e||!L.isDate(e)?t:L.format(e,de),ut=(e,t)=>{if(!e)return t;const{start:o,end:n}=e;if(!o&&!n)return t;const a=o&&L.isDate(o)?L.format(o,de):"...",s=n&&L.isDate(n)?L.format(n,de):"...";return`${a} → ${s}`},pt=(e,t)=>!e||e.length===0?t:e.length===1?L.format(e[0],de):`${e.length} fechas seleccionadas`,le=e=>L.isDate(e)?L.format(e,de):"",qn=e=>{const t=e.trim();if(!t)return null;const o=/^(\d{1,2})\/(\d{1,2})\/(\d{1,4})$/.exec(t);if(!o)return null;const[,n,a,s]=o,i=Number(n),c=Number(a),d=s;let u=Number(d);if(Number.isNaN(i)||Number.isNaN(c)||Number.isNaN(u)||(d.length<=2&&(u=2e3+u),i<1||i>31||c<1||c>12))return null;const p=new Date(u,c-1,i);return p.getFullYear()!==u||p.getMonth()!==c-1||p.getDate()!==i?null:p},$n=(e,t)=>{const o=(t.lastKey==="Backspace"||t.lastKey==="Delete")&&e.length<t.previousValue.length,n=e.includes("/"),a=e.trim().endsWith("/");if((e.match(/\//g)??[]).length>=2){const v=e.split("/"),h=(v[0]??"").replace(/\D/g,"").slice(0,2),D=(v[1]??"").replace(/\D/g,"").slice(0,2),R=(v[2]??"").replace(/\D/g,"").slice(0,4);return!h&&!D&&!R?"":`${h}/${D}/${R}`}const i=e.replace(/\D/g,"").slice(0,8);if(!i)return"";if(i.length<=2){let v=i;if(i.length===1&&(n||a)&&!o){let h=Number(v);Number.isNaN(h)&&(h=1),h<1&&(h=1),h>31&&(h=31),v=h.toString().padStart(2,"0"),v+="/"}else if(i.length===2&&!o){let h=Number(v);Number.isNaN(h)&&(h=1),h<1&&(h=1),h>31&&(h=31),v=h.toString().padStart(2,"0"),v+="/"}return v}const c=i.slice(0,2);let d=Number(c);Number.isNaN(d)&&(d=1),d<1&&(d=1),d>31&&(d=31);const u=d.toString().padStart(2,"0"),p=i.slice(2,4),x=i.slice(4);let m="";if(p.length===0)m="";else if(p.length===1&&x.length===0){const v=a&&!o&&p.length===1;if(p==="0"||p==="1")if(v){let h=Number(p);Number.isNaN(h)&&(h=1),h<1&&(h=1),h>12&&(h=12),m=h.toString().padStart(2,"0")}else m=p;else{let h=Number(p);Number.isNaN(h)&&(h=1),h<1&&(h=1),h>12&&(h=12),m=h.toString().padStart(2,"0")}}else{let v=Number(p);Number.isNaN(v)&&(v=1),v<1&&(v=1),v>12&&(v=12),m=v.toString().padStart(2,"0")}const j=`${u}/${m}`,b=!x&&m.length===2&&!o;return x?`${j}/${x}`:b?`${j}/`:j},Xn=e=>{const{date:t,onDateChange:o,disabledDate:n}=e,[a,s]=f.useState(""),i=f.useRef(null),c=f.useRef("");f.useEffect(()=>{const b=le(t??null);s(b),c.current=b},[t]);const d=()=>{const b=a.trim();if(!b){o(null),s(""),c.current="";return}const g=qn(b);if(!g){o(null),s(""),c.current="";return}if(n?.(g)){const h=le(t??null);s(h),c.current=h;return}o(g);const v=le(g);s(v),c.current=v};return{inputValue:a,handleChange:b=>{const g=b.target.value,v={lastKey:i.current,previousValue:c.current},h=$n(g,v);s(h),c.current=h},handleBlur:()=>{d()},handleKeyDown:b=>{if(i.current=b.key,b.key==="Enter"){b.preventDefault(),d();return}if(b.key==="Escape"){b.preventDefault();const g=le(t??null);s(g),c.current=g}},clear:()=>{o(null),s(""),c.current=""},setFromExternalDate:b=>{o(b);const g=le(b??null);s(g),c.current=g}}},Kn=(e={})=>{const{disabled:t}=e,[o,n]=f.useState(!1),a=f.useRef(null),s=f.useCallback(i=>{if(!t){if(i.key===" "||i.key==="Spacebar"){i.preventDefault(),n(!0);return}i.key==="Escape"&&(n(!1),requestAnimationFrame(()=>{a.current?.focus()}))}},[t]);return{open:o,setOpen:n,handleInputKeyDown:s,inputRef:a}},Un=e=>{const{placeholder:t,value:o,onValueChange:n,defaultValue:a,autoComplete:s,className:i,disabledDate:c,renderFooter:d,disabled:u,onBlur:p,...x}=e,[m,j]=H.useControllableState({prop:o,onChange:N=>n?.(N??null),defaultProp:a??null}),{inputValue:b,handleChange:g,handleBlur:v,handleKeyDown:h,clear:D,setFromExternalDate:R}=Xn({date:m??null,onDateChange:N=>j(N),disabledDate:c}),{open:se,setOpen:z,handleInputKeyDown:q,inputRef:G}=Kn({disabled:u}),ie=N=>{h(N),q(N)},Y=d?.({value:m??null,clear:()=>{R(null),D()},selectToday:()=>{const N=new Date;c?.(N)||R(N)},setValue:N=>{const J=N&&L.isDate(N)?N:null;j(J),R(J)}});return r.jsxs(_e,{"data-slot":"date-input",open:se,onOpenChange:z,children:[r.jsxs("div",{className:l(Q,"flex items-center gap-2 h-8","has-[:focus-visible]:border-ring","aria-invalid:border-error has-[:focus-visible]:aria-invalid:ring-error/20","has-aria-invalid:border-error has-[:focus-visible]:has-aria-invalid:ring-error/20","has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50",!m&&"text-muted-foreground",i,"field-error"),onClick:N=>{N.target===N.currentTarget&&G.current?.focus()},children:[r.jsxs(Ee,{type:"button",disabled:u,"data-slot":"date-input-trigger",className:"flex shrink-0 items-center justify-center text-muted-foreground hover:text-foreground",children:[r.jsx(y.CalendarIcon,{"data-slot":"date-input-icon"}),r.jsx("span",{className:"sr-only",children:"Seleccionar fecha"})]}),r.jsx(tt,{render:r.jsx("input",{type:"text",value:b,onChange:g,onBlur:N=>{v(),p?.(N)},onKeyDown:ie,placeholder:t??"dd/mm/aaaa",autoComplete:s??"off",disabled:u,className:"flex-1 min-w-0 bg-transparent outline-none text-start truncate pt-px","aria-label":t,ref:G,...x})})]}),r.jsxs(be,{className:"w-auto p-0",align:"start","data-slot":"date-input-content",children:[r.jsx(me,{className:"border-none",mode:"single",selected:m??void 0,onSelect:N=>{if(!N||!L.isDate(N)){R(null);return}c?.(N)||(R(N),z(!1))},disabled:c}),Y&&r.jsx("div",{className:"p-2","data-slot":"date-input-footer",children:Y})]})]})};function Wn(e){return e.mode==="range"?r.jsx(Jn,{...e}):e.mode==="multiple"?r.jsx(Zn,{...e}):r.jsx(Yn,{...e})}const at=({open:e,onOpenChange:t,displayText:o,hasValue:n,disabled:a,className:s,classNames:i,children:c,footer:d,slot:u,formValue:p,required:x})=>{const m=f.useRef(null);return r.jsxs(_e,{"data-slot":u,open:e,onOpenChange:t,children:[r.jsxs(Ee,{render:r.jsx("button",{ref:m,disabled:a,className:l(Q,"inline-flex items-center gap-2 h-8 cursor-pointer text-left","focus-visible:border-ring","aria-invalid:border-error focus-visible:aria-invalid:ring-error/20","group-data-[invalid]:border-error focus-visible:group-data-[invalid]:ring-error/20","disabled:cursor-not-allowed disabled:opacity-50",!n&&"text-muted-foreground",s)}),children:[r.jsx(y.CalendarIcon,{className:"shrink-0"}),r.jsx("span",{className:"truncate",children:o})]}),r.jsx(tt,{render:r.jsx("input",{type:"text",tabIndex:-1,"aria-hidden":"true",className:"sr-only",value:p,onChange:()=>{},required:x,onFocus:()=>m.current?.focus()})}),r.jsxs(be,{className:l("w-auto p-0",i?.popup),align:"start","data-slot":`${u}-content`,children:[c,d&&r.jsx("div",{className:l("p-2",i?.footer),"data-slot":`${u}-footer`,children:d})]})]})},Yn=({value:e,defaultValue:t,onValueChange:o,placeholder:n="Seleccionar fecha",disabled:a,disabledDate:s,renderFooter:i,className:c,classNames:d,required:u})=>{const[p,x]=f.useState(!1),[m,j]=H.useControllableState({prop:e,onChange:g=>o?.(g??null),defaultProp:t??null}),b={mode:"single",value:m??null,clear:()=>j(null),selectToday:()=>{const g=new Date;s?.(g)||j(g)},setValue:g=>j(g)};return r.jsx(at,{slot:"date-picker",open:p,onOpenChange:x,displayText:dt(m,n),hasValue:!!m,disabled:a,className:c,classNames:d,footer:i?.(b),formValue:dt(m,""),required:u,children:r.jsx(me,{className:l("border-none",d?.calendar),mode:"single",selected:m??void 0,onSelect:g=>{s&&g&&s(g)||(j(g??null),x(!1))},disabled:s})})},ve={start:null,end:null},Jn=({value:e,defaultValue:t,onValueChange:o,placeholder:n="Seleccionar rango",disabled:a,disabledDate:s,renderFooter:i,className:c,classNames:d,required:u})=>{const[p,x]=f.useState(!1),[m,j]=H.useControllableState({prop:e,onChange:v=>o?.(v??ve),defaultProp:t??ve}),b=m??ve,g={mode:"range",value:b,clear:()=>j(ve),setValue:v=>j(v)};return r.jsx(at,{slot:"date-picker",open:p,onOpenChange:x,displayText:ut(b.start||b.end?b:void 0,n),hasValue:!!(b.start||b.end),disabled:a,className:c,classNames:d,footer:i?.(g),formValue:ut(b.start||b.end?b:void 0,""),required:u,children:r.jsx(me,{className:l("border-none",d?.calendar),mode:"range",selected:{from:b.start??void 0,to:b.end??void 0},onSelect:v=>{j({start:v?.from??null,end:v?.to??null})},disabled:s})})},Zn=({value:e,defaultValue:t,onValueChange:o,placeholder:n="Seleccionar fechas",disabled:a,disabledDate:s,renderFooter:i,className:c,classNames:d,required:u})=>{const[p,x]=f.useState(!1),[m,j]=H.useControllableState({prop:e,onChange:g=>o?.(g??[]),defaultProp:t??[]}),b={mode:"multiple",value:m??[],clear:()=>j([]),setValue:g=>j(g)};return r.jsx(at,{slot:"date-picker",open:p,onOpenChange:x,displayText:pt(m,n),hasValue:(m?.length??0)>0,disabled:a,className:c,classNames:d,footer:i?.(b),formValue:pt(m,""),required:u,children:r.jsx(me,{className:l("border-none",d?.calendar),mode:"multiple",selected:m??[],onSelect:g=>{j(g??[])},disabled:s})})};function Lr(e){return r.jsx(V.Dialog.Root,{...e})}function Mr({className:e,...t}){return r.jsx(V.Dialog.Trigger,{"data-slot":"dialog-trigger",className:l(e),...t})}function Vr({className:e,...t}){return r.jsx(V.Dialog.Backdrop,{"data-slot":"dialog-backdrop",forceRender:!0,className:l("fixed inset-0 z-overlay bg-black/50","transition-opacity duration-200","data-starting-style:opacity-0 data-ending-style:opacity-0",e),...t})}function Or({className:e,...t}){return r.jsx(V.Dialog.Viewport,{"data-slot":"dialog-viewport",className:l("fixed inset-0 z-overlay flex items-center justify-center p-4",e),...t})}function Gr({className:e,classNames:t,children:o,hideClose:n,portalProps:a,...s}){return r.jsxs(V.Dialog.Portal,{...a,children:[r.jsx(Vr,{className:t?.backdrop}),r.jsx(Or,{className:t?.viewport,children:r.jsxs(V.Dialog.Popup,{"data-slot":"dialog-popup",className:l("relative flex w-full max-w-lg flex-col gap-4 rounded-lg border bg-background p-6 shadow-lg","transition-[scale,opacity] duration-200 ease-out","data-starting-style:scale-95 data-starting-style:opacity-0","data-ending-style:scale-95 data-ending-style:opacity-0",e),...s,children:[o,!n&&r.jsx(V.Dialog.Close,{"aria-label":"Close",className:l("absolute right-2 top-2",t?.closeButton),render:r.jsx(U,{size:"icon",variant:"ghost"}),children:r.jsx(y.X,{className:"size-4"})})]})})]})}function Qn({className:e,...t}){return r.jsx(V.Dialog.Close,{"data-slot":"dialog-close",className:l(e),...t})}function Br({className:e,...t}){return r.jsx(V.Dialog.Title,{"data-slot":"dialog-title",className:l("text-lg font-semibold leading-none tracking-tight",e),...t})}function Hr({className:e,...t}){return r.jsx(V.Dialog.Description,{"data-slot":"dialog-description",className:l("text-sm text-muted-foreground",e),...t})}function qr({className:e,...t}){return r.jsx("div",{"data-slot":"dialog-header",className:l("flex flex-col gap-2",e),...t})}function $r({className:e,...t}){return r.jsx("div",{"data-slot":"dialog-footer",className:l("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function es({trigger:e,title:t,description:o,children:n,footer:a,onClose:s,hideClose:i,className:c,classNames:d,onOpenChange:u,...p}){return r.jsxs(Lr,{onOpenChange:(x,m)=>{x||s?.(),u?.(x,m)},...p,children:[e&&r.jsx(Mr,{render:e}),r.jsxs(Gr,{className:c,hideClose:i,classNames:{backdrop:d?.backdrop,viewport:d?.viewport,closeButton:d?.closeButton},children:[(t||o)&&r.jsxs(qr,{className:d?.header,children:[t&&r.jsx(Br,{className:d?.title,children:t}),o&&r.jsx(Hr,{className:d?.description,children:o})]}),n,a&&r.jsx($r,{className:d?.footer,children:a})]})]})}function ts({className:e,orientation:t="horizontal",...o}){return r.jsx(mt.Separator,{className:Da.cn("shrink-0 bg-input data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:not-[[class^='h-']]:not-[[class*='_h-']]:self-stretch",e),"data-slot":"separator",orientation:t,...o})}const rs={"file-too-large":"FILE_TOO_LARGE","too-many-files":"MAX_FILES_EXCEEDED","file-invalid-type":"INVALID_EXTENSION"};function os(e){const t=[],o=[];for(const{file:n,errors:a}of e){t.push(n);for(const s of a)o.push({file:n,errorMessage:s.message,errorCode:rs[s.code]??"INVALID_EXTENSION"})}return[t,o]}function as(e){const o=(e.split("/")[1]??e).split("+")[0],n=o.split(".");return n[n.length-1]??o}const Xr=f.createContext(null);function nt(){const e=f.useContext(Xr);if(!e)throw new Error("useDropzoneCtx must be used within DropzoneRoot");return e}function Kr({onFileAdd:e,onFileRemove:t,onFilesChange:o,files:n,maxFiles:a=1,allowedExtensions:s=[],maxFileSize:i=5*1024*1024,multiple:c,onError:d,children:u,className:p,...x}){const m=n!==void 0,[j,b]=f.useState([]),[g,v]=f.useState([]),h=m?n:j,D=A=>{m||b(A),o?.(A)},R=s.length>0?Object.fromEntries(s.map(A=>[A,[]])):void 0,{getRootProps:se,getInputProps:z,isDragActive:q,open:G}=Aa.useDropzone({onDrop(A,Y){const[N,J]=os(Y);D([...h,...A]),v(Ca=>[...Ca,...N]),e?.(A),J.length>0&&d?.(J)},accept:R,maxFiles:a,maxSize:i,multiple:c??a>1,noClick:!0}),ie=A=>{D(h.filter((Y,N)=>N!==A)),t?.(A,"accepted")},he=A=>{v(Y=>Y.filter((N,J)=>J!==A)),t?.(A,"rejected")};return r.jsx(Xr.Provider,{value:{acceptedFiles:h,rejectedFiles:g,removeAccepted:ie,removeRejected:he,isDragActive:q,getRootProps:se,getInputProps:z,open:G},children:r.jsx("div",{className:l("w-full",p),"data-slot":"dropzone",...x,children:u})})}function Ur({render:e,className:t,onClick:o,children:n,...a}){const{getRootProps:s,getInputProps:i,isDragActive:c,open:d}=nt(),u=C.useRender({defaultTagName:"div",render:e,props:{...s(),...a,className:t,"data-slot":"dropzone-trigger","data-drag-active":c||void 0,onClick:p=>{d(),o?.(p)},children:e?void 0:n}});return r.jsxs(r.Fragment,{children:[u,r.jsx("input",{...i(),className:"hidden","data-slot":"dropzone-input"})]})}function Wr({className:e,...t}){return r.jsx("div",{className:l("mt-2 space-y-2",e),"data-slot":"dropzone-content",...t})}function Yr({file:e,onRemove:t,className:o,renderIcon:n,...a}){return r.jsxs("div",{className:l("flex items-center gap-2 mb-2",o),"data-slot":"dropzone-item",...a,children:[n?.(e),e.name,r.jsx(U,{variant:"ghost",size:"icon",type:"button",className:"h-6 w-6",onClick:t,"data-slot":"dropzone-item-remove",children:r.jsx(y.X,{})})]})}function Jr({files:e,onRemove:t,renderFile:o}){return e.length===0?null:r.jsx("div",{className:"mt-2 space-y-2",children:e.map((n,a)=>o?r.jsx("div",{children:o(n,()=>t(a))},a):r.jsx(Yr,{file:n,onRemove:()=>t(a)},a))})}function Zr(e){const{acceptedFiles:t,removeAccepted:o}=nt();return r.jsx(Jr,{files:t,onRemove:o,...e})}function Qr(e){const{rejectedFiles:t,removeRejected:o}=nt();return r.jsx(Jr,{files:t,onRemove:o,...e})}function ns({onFileAdd:e,onFileRemove:t,onFilesChange:o,files:n,maxFiles:a=1,allowedExtensions:s=[],maxFileSize:i=5*1024*1024,multiple:c,renderAcceptedFile:d,renderRejectedFile:u,showRejected:p=!1,className:x,classNames:m,icon:j=y.UploadCloud,iconSize:b=40,onError:g,label:v="Arrastra y suelta archivos aquí o haz clic para seleccionar",...h}){const D=s.map(as).join(", ");return r.jsxs(Kr,{onFileAdd:e,onFileRemove:t,files:n,onFilesChange:o,maxFiles:a,allowedExtensions:s,maxFileSize:i,multiple:c,className:l("w-full",x),onError:g,...h,children:[r.jsx(Ur,{render:r.jsxs("div",{className:l("w-full min-h-[150px] border-2 border-dashed rounded-lg border-muted p-4","hover:bg-muted/50 data-[drag-active]:border-primary data-[drag-active]:bg-primary/10","transition-colors flex flex-col items-center justify-center gap-4 cursor-pointer",m?.trigger),children:[r.jsx(j,{className:l("text-muted-foreground",m?.icon),style:{width:b,height:b}}),r.jsxs("div",{className:l("text-center text-muted-foreground",m?.label),children:[r.jsx("p",{children:v}),s.length>0&&r.jsxs("p",{className:"text-sm",children:["Tipos permitidos: ",D]}),r.jsxs("p",{className:"text-sm",children:["Tamaño máximo: ",Math.floor(i/1024/1024),"MB"]})]})]})}),r.jsxs(Wr,{className:m?.content,children:[r.jsx(Zr,{renderFile:d}),p&&r.jsx(Qr,{renderFile:u})]})]})}const T={JPEG:"image/jpeg",JPG:"image/jpg",PNG:"image/png",GIF:"image/gif",WEBP:"image/webp",SVG:"image/svg+xml",PDF:"application/pdf",DOC:"application/msword",DOCX:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",XLS:"application/vnd.ms-excel",XLSX:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",PPT:"application/vnd.ms-powerpoint",PPTX:"application/vnd.openxmlformats-officedocument.presentationml.presentation",TXT:"text/plain",CSV:"text/csv",ZIP:"application/zip",RAR:"application/x-rar-compressed",MP3:"audio/mpeg",WAV:"audio/wav",MP4:"video/mp4",WEBM:"video/webm",JSON:"application/json",XML:"application/xml"},ss={IMAGES:[T.JPEG,T.JPG,T.PNG,T.GIF,T.WEBP,T.SVG],DOCUMENTS:[T.PDF,T.DOC,T.DOCX,T.XLS,T.XLSX,T.PPT,T.PPTX],COMPRESSED:[T.ZIP,T.RAR],AUDIO:[T.MP3,T.WAV],VIDEO:[T.MP4,T.WEBM]},is=Z.cva("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent text-muted-foreground [&_.lucide:not([class*='size-'])]:size-12",icon:"size-8 rounded-lg bg-muted text-foreground [&_.lucide:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});function eo({className:e,...t}){return r.jsx("div",{className:l("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl p-6 text-center text-balance",e),"data-slot":"empty",...t})}function to({className:e,...t}){return r.jsx("div",{className:l("flex max-w-sm flex-col items-center gap-2",e),"data-slot":"empty-header",...t})}function ro({className:e,variant:t,...o}){return r.jsx("div",{className:l(is({variant:t}),e),"data-slot":"empty-media","data-variant":t??"default",...o})}function oo({className:e,...t}){return r.jsx("div",{"data-slot":"empty-title",className:l("cn-font-heading text-sm font-medium tracking-tight",e),...t})}function ao({className:e,...t}){return r.jsx("div",{className:l("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),"data-slot":"empty-description",...t})}function no({className:e,...t}){return r.jsx("div",{className:l("flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5",e),"data-slot":"empty-content",...t})}function ls({icon:e=r.jsx(y.Inbox,{}),iconVariant:t="default",title:o="No hay datos",description:n,action:a,children:s,classNames:i,...c}){return r.jsxs(eo,{...c,children:[r.jsxs(to,{className:i?.header,children:[e&&r.jsx(ro,{variant:t,className:i?.media,children:e}),o&&r.jsx(oo,{className:i?.title,children:o}),n&&r.jsx(ao,{className:i?.description,children:n})]}),a!=null&&r.jsx(no,{className:i?.content,children:a}),s]})}function so(e){return r.jsx(ft.Form,{"data-slot":"form",...e})}function cs({className:e,...t}){return r.jsx("kbd",{className:l("pointer-events-none inline-flex h-5 min-w-5 select-none items-center justify-center gap-1 rounded bg-muted px-1 font-medium font-sans text-muted-foreground text-xs [&_svg:not([class*='size-'])]:size-3",e),"data-slot":"kbd",...t})}function ds({className:e,...t}){return r.jsx("kbd",{className:l("inline-flex items-center gap-1",e),"data-slot":"kbd-group",...t})}const us=Z.cva("animate-spin",{variants:{variant:{primary:"text-primary",secondary:"text-secondary",ghost:"text-muted-foreground",error:"text-error",success:"text-success",warning:"text-warning",info:"text-info"},size:{xs:"size-3",sm:"size-4",default:"size-7",lg:"size-10",xl:"size-14"}},defaultVariants:{variant:"primary",size:"default"}}),ps=({center:e,classNames:t,variant:o,size:n,...a})=>r.jsx("div",{className:l(t?.container,e&&"fixed inset-0 grid place-items-center"),"data-slot":"loader",children:r.jsx(y.LoaderCircle,{"data-slot":"loader-icon",...a,className:l(us({variant:o,size:n}),a.className)})});function io({...e}){return r.jsx(I.Menu.Root,{"data-slot":"menu",...e})}function ms({...e}){return r.jsx(I.Menu.Portal,{"data-slot":"menu-portal",...e})}function lo({...e}){return r.jsx(I.Menu.Trigger,{"data-slot":"menu-trigger",...e})}function st({align:e="start",alignOffset:t=0,side:o="bottom",sideOffset:n=4,className:a,...s}){return r.jsx(I.Menu.Portal,{children:r.jsx(I.Menu.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:t,side:o,sideOffset:n,children:r.jsx(I.Menu.Popup,{"data-slot":"menu-content",className:l("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",a),...s})})})}function Ge({...e}){return r.jsx(I.Menu.Group,{"data-slot":"menu-group",...e})}function Be({className:e,inset:t,...o}){return r.jsx(I.Menu.GroupLabel,{"data-slot":"menu-label","data-inset":t,className:l("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",e),...o})}function co({className:e,inset:t,variant:o="default",...n}){return r.jsx(I.Menu.Item,{"data-slot":"menu-item","data-inset":t,"data-variant":o,className:l("group/menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=error]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=error]:text-error data-[variant=error]:focus:bg-error/10 data-[variant=error]:focus:text-error dark:data-[variant=error]:focus:bg-error/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=error]:*:[svg]:text-error",e),...n})}function uo({...e}){return r.jsx(I.Menu.SubmenuRoot,{"data-slot":"menu-sub",...e})}function po({className:e,inset:t,children:o,...n}){return r.jsxs(I.Menu.SubmenuTrigger,{"data-slot":"menu-sub-trigger","data-inset":t,className:l("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=error]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[o,r.jsx(y.ChevronRightIcon,{className:"cn-rtl-flip ml-auto"})]})}function mo({align:e="start",alignOffset:t=-3,side:o="right",sideOffset:n=0,className:a,...s}){return r.jsx(st,{"data-slot":"menu-sub-content",className:l("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",a),align:e,alignOffset:t,side:o,sideOffset:n,...s})}function fo({className:e,children:t,checked:o,inset:n,...a}){return r.jsxs(I.Menu.CheckboxItem,{"data-slot":"menu-checkbox-item","data-inset":n,className:l("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:o,...a,children:[r.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"menu-checkbox-item-indicator",children:r.jsx(I.Menu.CheckboxItemIndicator,{children:r.jsx(y.CheckIcon,{})})}),t]})}function go({...e}){return r.jsx(I.Menu.RadioGroup,{"data-slot":"menu-radio-group",...e})}function xo({className:e,children:t,inset:o,...n}){return r.jsxs(I.Menu.RadioItem,{"data-slot":"menu-radio-item","data-inset":o,className:l("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[r.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"menu-radio-item-indicator",children:r.jsx(I.Menu.RadioItemIndicator,{children:r.jsx(y.CheckIcon,{})})}),t]})}function bo({className:e,...t}){return r.jsx(I.Menu.Separator,{"data-slot":"menu-separator",className:l("-mx-1 my-px h-px bg-input/50",e),...t})}function ye({className:e,...t}){return r.jsx("span",{"data-slot":"menu-shortcut",className:l("ml-auto text-xs tracking-widest text-muted-foreground group-focus/menu-item:text-accent-foreground",e),...t})}function we(e,t){switch(e.type){case"item":{const{type:o,label:n,shortcut:a,...s}=e;return r.jsxs(co,{...s,children:[n,a&&r.jsx(ye,{children:a})]},t)}case"checkbox":{const{type:o,label:n,shortcut:a,...s}=e;return r.jsxs(fo,{...s,children:[n,a&&r.jsx(ye,{children:a})]},t)}case"radio":{const{type:o,label:n,shortcut:a,...s}=e;return r.jsxs(xo,{...s,children:[n,a&&r.jsx(ye,{children:a})]},t)}case"radio-group":{const{type:o,value:n,onValueChange:a,items:s}=e;return r.jsx(go,{value:n,onValueChange:a,children:s.map((i,c)=>we(i,c))},t)}case"label":{const{type:o,label:n,...a}=e;return r.jsx(Ge,{children:r.jsx(Be,{...a,children:n})},t)}case"separator":{const{type:o,...n}=e;return r.jsx(bo,{...n},t)}case"group":{const{type:o,label:n,items:a}=e;return r.jsxs(Ge,{children:[n&&r.jsx(Be,{children:n}),a.map((s,i)=>we(s,i))]},t)}case"submenu":{const{type:o,label:n,items:a,...s}=e;return r.jsxs(uo,{children:[r.jsx(po,{...s,children:n}),r.jsx(mo,{children:a.map((i,c)=>we(i,c))})]},t)}}}const fs=({trigger:e,items:t,className:o,side:n="bottom",align:a="start",offset:s,alignOffset:i,classNames:c})=>r.jsxs(io,{children:[r.jsx(lo,{render:e}),r.jsx(st,{className:l(c?.popup,o),side:n,align:a,sideOffset:s,alignOffset:i,children:t.map((d,u)=>we(d,u))})]});function ho({className:e,...t}){return r.jsx(W.NumberField.Root,{className:l("w-full",e),"data-slot":"number-input",...t})}function vo({className:e,...t}){return r.jsx(W.NumberField.Group,{className:l("flex h-8 w-full items-center overflow-hidden rounded-md bg-background text-sm transition-shadow","outline outline-1 outline-input [outline-offset:-1px]","focus-within:outline-ring","aria-invalid:outline-error focus-within:aria-invalid:ring-error/20","has-aria-invalid:outline-error focus-within:has-aria-invalid:ring-error/20","data-[invalid]:outline-error focus-within:data-[invalid]:ring-error/20","data-disabled:cursor-not-allowed data-disabled:opacity-50 data-disabled:pointer-events-none","[&_svg]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),"data-slot":"number-input-group",...t})}function jo({className:e,...t}){return r.jsx(W.NumberField.Input,{className:l("min-w-0 flex-1 bg-transparent px-3 text-left tabular-nums outline-none","placeholder:text-muted-foreground",e),"data-slot":"number-input-input",...t})}function yo({className:e,children:t,...o}){return r.jsx(W.NumberField.Decrement,{className:l("flex shrink-0 cursor-pointer items-center justify-center border-r border-input px-2 text-muted-foreground transition-colors","hover:bg-accent hover:text-foreground","disabled:pointer-events-none disabled:opacity-50",e),"data-slot":"number-input-decrement",...o,children:t??r.jsx(y.MinusIcon,{})})}function wo({className:e,children:t,...o}){return r.jsx(W.NumberField.Increment,{className:l("flex shrink-0 cursor-pointer items-center justify-center border-l border-input px-2 text-muted-foreground transition-colors","hover:bg-accent hover:text-foreground","disabled:pointer-events-none disabled:opacity-50",e),"data-slot":"number-input-increment",...o,children:t??r.jsx(y.PlusIcon,{})})}function gs({className:e,...t}){return r.jsx(W.NumberField.ScrubArea,{className:l("inline-flex cursor-ew-resize items-center",e),"data-slot":"number-input-scrub-area",...t})}function xs({className:e,...t}){return r.jsx(W.NumberField.ScrubAreaCursor,{className:l("drop-shadow-[0_1px_1px_#0008] filter",e),...t})}function bs(e){return r.jsx("svg",{"aria-hidden":"true",fill:"black",height:"14",stroke:"white",viewBox:"0 0 24 14",width:"26",xmlns:"http://www.w3.org/2000/svg",...e,children:r.jsx("path",{d:"M19.5 5.5L6.49737 5.51844V2L1 6.9999L6.5 12L6.49737 8.5L19.5 8.5V12L25 6.9999L19.5 2V5.5Z"})})}function hs({className:e,hideControls:t=!1,onValueChange:o,invalid:n,placeholder:a,classNames:s,...i}){return r.jsx(ho,{onValueChange:o,...i,children:r.jsxs(vo,{"aria-invalid":n||void 0,className:e,children:[r.jsx(jo,{...n?{"aria-invalid":!0}:{},placeholder:a,className:l("self-stretch",s?.input)}),!t&&r.jsxs("div",{className:l("flex flex-col self-stretch divide-y divide-input border-l border-input",s?.controls),children:[r.jsx(wo,{"data-testid":"increment-trigger",className:l("flex-1 border-l-0 py-0 [&_svg]:size-3",s?.increment),children:r.jsx(y.ChevronUpIcon,{})}),r.jsx(yo,{"data-testid":"decrement-trigger",className:l("flex-1 border-r-0 py-0 [&_svg]:size-3",s?.decrement),children:r.jsx(y.ChevronDownIcon,{})})]})]})})}function vs(e){const[t=[],o]=f.useState(e);return[t,{insertAt:(m,j)=>{o((b=[])=>{const g=[...b];return g.splice(m,0,j),g})},removeAt:m=>{o((j=[])=>{const b=[...j];return b.splice(m,1),b})},updateAt:(m,j)=>{o((b=[])=>{const g=[...b];return g[m]=j,g})},clear:()=>o([]),reset:()=>o(e),push:m=>o((j=[])=>[...j,m]),set:m=>o(m),pop:()=>{o((m=[])=>{const j=[...m];return j.pop(),j})},update:(m,j)=>{o((b=[])=>{const g=[...b],v=F.findIndex(g,m);return v===-1||(g[v]=F.isFunction(j)?j(g[v]):j),g})}}]}function js({fn:e,dependencies:t=[],onError:o,onSuccess:n,onFinish:a}){const[s,i]=f.useState(!0),[c,d]=f.useState(null),[u,p]=f.useState(null),x=f.useCallback(()=>{i(!0),d(null),p(null),e().then(m=>{n?.(m),p(m)}).catch(m=>{o?.(m),d(m)}).finally(()=>{a?.(),i(!1)})},t);return f.useEffect(()=>{x()},[x]),{loading:s,error:c,data:u,refetch:x}}const ys=(e,t=!0)=>{const o=f.useRef(null),n=a=>{o.current&&!o.current.contains(a.target)&&e()};return f.useEffect(()=>{if(t)return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[t]),o};function ws(){const[e,t]=f.useState(null),o=f.useCallback(async n=>{if(!navigator?.clipboard)return!1;try{return await navigator.clipboard.writeText(n),t(n),!0}catch(a){return console.error(a),t(null),!1}},[]);return[e,o]}function Ns(e,t){const o=f.useRef(null);return f.useCallback((...n)=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{e(...n)},t)},[e,t])}function Cs(e,t){const[o,n]=f.useState(e);return f.useEffect(()=>{const a=setTimeout(()=>{n(e)},t);return()=>clearTimeout(a)},[e,t]),o}function Ss(e=!1,t){const{onOpen:o,onClose:n}=t||{},[a,s]=f.useState(e),i=f.useCallback(()=>{s(u=>u||(o?.(),!0))},[o]),c=f.useCallback(()=>{s(u=>u&&(n?.(),!1))},[n]),d=f.useCallback(()=>{a?c():i()},[c,i,a]);return[a,{open:i,close:c,toggle:d}]}function Ps(e){f.useEffect(()=>{typeof e=="string"&&e.trim().length>0&&(document.title=e.trim())},[e])}function No(e,t,o){const n=f.useRef(null);return f.useEffect(()=>{const a=n.current??document;return a.addEventListener(e,t,o),()=>{a.removeEventListener(e,t,o)}},[e,t,o]),n}const Ts=/input|select|textarea|button|object/,Co="a, input, select, textarea, button, object, [tabindex]";function ks(e){return process.env.NODE_ENV==="test"?!1:e.style.display==="none"}function zs(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let o=e;for(;o&&!(o===document.body||o.nodeType===11);){if(ks(o))return!1;o=o.parentNode}return!0}function So(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function He(e){const t=e.nodeName.toLowerCase(),o=!Number.isNaN(So(e));return(Ts.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||o)&&zs(e)}function Po(e){const t=So(e);return(Number.isNaN(t)||t>=0)&&He(e)}function Is(e){return Array.from(e.querySelectorAll(Co)).filter(Po)}function Ds(e,t){const o=Is(e);if(!o.length){t.preventDefault();return}const n=o[t.shiftKey?0:o.length-1],a=e.getRootNode();let s=n===a.activeElement||e===a.activeElement;const i=a.activeElement;if(i.tagName==="INPUT"&&i.getAttribute("type")==="radio"&&(s=o.filter(p=>p.getAttribute("type")==="radio"&&p.getAttribute("name")===i.getAttribute("name")).includes(n)),!s)return;t.preventDefault();const d=o[t.shiftKey?o.length-1:0];d&&d.focus()}function As(e=!0){const t=f.useRef(null),o=a=>{let s=a.querySelector("[data-autofocus]");if(!s){const i=Array.from(a.querySelectorAll(Co));s=i.find(Po)||i.find(He)||null,!s&&He(a)&&(s=a)}s&&s.focus({preventScroll:!0})},n=f.useCallback(a=>{e&&a!==null&&t.current!==a&&(a?(setTimeout(()=>{a.getRootNode()&&o(a)}),t.current=a):t.current=null)},[e]);return f.useEffect(()=>{if(!e)return;t.current&&setTimeout(()=>o(t.current));const a=s=>{s.key==="Tab"&&t.current&&Ds(t.current,s)};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e]),n}const Rs=e=>e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable,_s=(e,t)=>t&&Rs(e.target),Es=e=>{const t=e.toLowerCase().split("+");return{mainKey:t.pop(),isShift:t.includes("shift"),isCtrl:t.includes("ctrl"),isAlt:t.includes("alt"),isMeta:t.includes("meta")}},Fs=(e,t)=>{const{mainKey:o,isShift:n,isCtrl:a,isAlt:s,isMeta:i}=Es(t);return e.key.toLowerCase()===o&&e.shiftKey===n&&e.ctrlKey===a&&e.altKey===s&&e.metaKey===i},Ls=(e,t,o,n,a)=>s=>{if(!a||_s(s,n))return;(Array.isArray(e)?e:[e]).some(d=>Fs(s,d))&&(o&&s.preventDefault(),t(s))};function Ms(e,t,o={}){const{eventName:n="keydown",preventDefault:a=!0,ignoreInputFields:s=!0,watch:i=!0}=o,c=f.useCallback(Ls(e,t,a,s,i),[e,t,a,s,i]);return No(n,c)}function Vs(e){const[t,o]=f.useState(!1),n=f.useRef(null);return f.useEffect(()=>{const a=c=>{o(!0),e?.onHoverStart?.(c)},s=c=>{o(!1),e?.onHoverEnd?.(c)},i=n.current;if(i)return i.addEventListener("mouseover",a),i.addEventListener("mouseout",s),()=>{i.removeEventListener("mouseover",a),i.removeEventListener("mouseout",s)}},[e]),{ref:n,isHovering:t}}function Os({onVisible:e,root:t=null,rootMargin:o="0px",threshold:n=0}={}){const[a,s]=f.useState(!1),i=f.useRef(null),c=f.useCallback(([d])=>{const u=d.isIntersecting;s(u)},[e]);return f.useEffect(()=>{if(i.current==null)return;const d=new IntersectionObserver(c,{root:t,rootMargin:o,threshold:n});return d.observe(i.current),()=>{i.current!=null&&d.unobserve(i.current)}},[i,t,o,n,c]),f.useEffect(()=>{a&&e?.()},[a]),{ref:i,isVisible:a}}function Gs(e,t){const o=()=>{try{const c=localStorage.getItem(e);return c?JSON.parse(c):t!==void 0?t:void 0}catch(c){return console.error(`Error parsing localStorage key "${e}":`,c),t!==void 0?t:void 0}},[n,a]=f.useState(o);return f.useEffect(()=>{try{n!==void 0?localStorage.setItem(e,JSON.stringify(n)):localStorage.removeItem(e)}catch(c){console.error(`Error setting localStorage key "${e}":`,c)}},[e,n]),[n,c=>{a(c)},()=>{try{localStorage.removeItem(e),a(t!==void 0?t:void 0)}catch(c){console.error(`Error removing localStorage key "${e}":`,c)}}]}const Bs=e=>{const[t,o]=f.useState(!1);return f.useEffect(()=>{const n=window.matchMedia(e),a=()=>o(n.matches);return a(),n.addEventListener("change",a),()=>{n.removeEventListener("change",a)}},[e]),t};function Hs(e){F.isFunction(e)||console.error(`useMemoizedFn expected parameter is a function, got ${typeof e}`);const t=f.useRef(e);t.current=f.useMemo(()=>e,[e]);const o=f.useRef(null);return o.current||(o.current=function(...n){return t.current.apply(this,n)}),o.current}const qs=e=>{const[t,o]=f.useState(!1),[n,a]=f.useState(null),[s,i]=f.useState(null);return{mutate:f.useCallback(async(...d)=>{o(!0),a(null),i(null);try{const u=await e.fn(...d);return e.onSuccess?.(u),i(u),u}catch(u){const p=u;throw e.onError?.(p),a(p),p}finally{e.onFinish?.(),o(!1)}},[e]),loading:t,error:n,data:s}};function $s(e){const[t,o]=f.useState(e),n=f.useCallback(()=>o(e),[e]),a=f.useCallback(s=>{o(i=>{if(F.isFunction(s)){const c=s(i);return F.isObject(c)?{...i,...c}:i}else if(F.isObject(s))return{...i,...s};return i})},[]);return[t,a,n]}function To({totalItems:e,pageSize:t,currentPage:o,defaultCurrentPage:n,onCurrentPageChange:a,initialCurrentPage:s,onChange:i}){const[c=1,d]=H.useControllableState({prop:o,defaultProp:n??s??1,onChange:h=>{a?.(h),i?.({currentPage:h,pageSize:t})}}),u=Math.max(1,Math.ceil(e/t)),p=c>=u,x=c<=1,m=(c-1)*t+1,j=Math.min(c*t,e);return{next:()=>{p||d(Math.min(c+1,u))},prev:()=>{x||d(Math.max(c-1,1))},goTo:h=>{const D=Math.min(Math.max(1,h),u);D!==c&&d(D)},currentPage:c,maxPage:u,isFirstPage:x,isLastPage:p,range:{start:m,end:j}}}function Xs(e){const t=()=>document.getElementById(e),o=()=>{const a=document.createElement("div");return a.id=e,a},n=f.useMemo(()=>{const a=t();return a||o()},[e]);return f.useEffect(()=>(document.getElementById(e)||document.body.appendChild(n),()=>{const a=document.getElementById(e);a&&document.body.removeChild(a)}),[e,n]),{render:a=>Sa.createPortal(a,n)}}function Ks({shouldPrevent:e,message:t="Es posible que no se guarden los cambios hayas hecho."}){const o=n=>{if(e)return n.preventDefault(),n.returnValue=t,t};f.useEffect(()=>(window.addEventListener("beforeunload",o),()=>window.removeEventListener("beforeunload",o)),[t,e])}const te="...",ko=({siblingCount:e=1,...t})=>{const o=To(t),{currentPage:n,maxPage:a}=o,{totalItems:s,pageSize:i}=t,c=()=>{const x=2+3*e,m=1;if(x>=a)return F.range(m,a+1);const j=Math.max(n-e,1),b=Math.min(n+e,a),g=j>2,v=b<a-2;if(g&&v){const h=F.range(j,b+1);return[m,te,...h,te,a]}if(v)return[...F.range(m,x+1),te,a];if(g){const h=F.range(a-x+1,a+1);return[m,te,...h]}},d=f.useMemo(c,[s,i,n,e]);return{...o,paginationRange:d??[]}};function Us(e){const[t,o]=f.useState(new Set),n=f.useCallback(p=>t.has(p),[t]),a=f.useCallback(p=>{o(x=>new Set([...x,p]))},[]),s=f.useCallback(p=>{o(x=>{const m=new Set(x);return m.delete(p),m})},[]),i=f.useCallback(p=>{o(x=>{const m=new Set(x);return m.has(p)?m.delete(p):m.add(p),m})},[]),c=f.useCallback(p=>{o(new Set(p))},[]),d=f.useCallback(()=>{o(p=>p.size===e.length?new Set:new Set(e))},[e]),u=f.useCallback(()=>o(new Set),[]);return{isAllSelected:t.size===e.length,isSomeSelected:t.size>0&&t.size<e.length,isNoneSelected:t.size===0,isSelected:n,selected:[...t],setSelected:c,select:a,unselect:s,toggle:i,toggleAll:d,clear:u}}function Ws(e,t){const[o,n]=f.useState(0),a=t??e.length,s=()=>{n(u=>u>=a-1?u:u+1)},i=()=>{n(u=>u<=0?u:u-1)},c=u=>{n(u)},d=u=>{const p=F.findIndex(e,u);p!==-1&&c(p)};return{currentStepIndex:o,step:e[o],steps:e,isFirstStep:o===0,isLastStep:o===a-1,goTo:c,next:s,back:i,findAndGo:d}}function zo(e=!1){const[t,o]=f.useState(e);return[t,a=>{o(a===void 0?!t:a)}]}const Re=[10,25,50],Ys={goToFirst:"Ir a primera página",goToPrevious:"Ir a página anterior",goToNext:"Ir a próxima página",goToLast:"Ir a última página",goToPage:e=>`Ir a la página ${e}`,total:e=>`${e} resultados`,pageInfo:(e,t)=>`Página ${e} de ${t}`,range:(e,t,o)=>`${e} - ${t} de ${o}`,morePages:"Más páginas"},Io=f.createContext(null);function E(){const e=f.useContext(Io);if(!e)throw new Error("Pagination primitives must be used inside <PaginationRoot>");return e}function Do({totalItems:e,pageSize:t,defaultPageSize:o=Re[0],onPageSizeChange:n,currentPage:a,defaultCurrentPage:s=1,onCurrentPageChange:i,siblingCount:c=1,getPageHref:d,linkComponent:u="a",texts:p,className:x,children:m,...j}){const[b=o,g]=H.useControllableState({prop:t,defaultProp:o,onChange:n}),v=ko({totalItems:e,pageSize:b,currentPage:a,defaultCurrentPage:s,onCurrentPageChange:i,siblingCount:c}),h=f.useMemo(()=>({...Ys,...p}),[p]),D=f.useMemo(()=>({...v,pageSize:b,totalItems:e,setPageSize:g,getPageHref:d,linkComponent:u,texts:h}),[v,b,e,g,d,u,h]);return r.jsx(Io.Provider,{value:D,children:r.jsx("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:l("flex items-center gap-x-4",x),...j,children:m})})}function xe({page:e,isActive:t,disabled:o,ariaLabel:n,dataSlot:a,children:s,className:i,buttonProps:c}){const{goTo:d,getPageHref:u,pageSize:p,linkComponent:x}=E(),m=x,j=u?.({page:e,pageSize:Number(p)}),b=!!j&&!o,g=()=>{o||d(e)},v={"data-slot":a,"data-active":t?"true":"false","aria-current":t?"page":void 0,"aria-label":n,className:l("hover:bg-accent hover:text-accent-foreground",i)};return b&&j?r.jsx(U,{variant:t?"outline":"ghost",size:"icon",nativeButton:!1,render:r.jsx(m,{href:j,onClick:g,children:s}),...v,...c}):r.jsx(U,{variant:t?"outline":"ghost",size:"icon",disabled:o,onClick:g,...v,...c,children:s})}function Ao({page:e,isActive:t,className:o,children:n,buttonProps:a}){const{currentPage:s,texts:i}=E(),c=t??e===s;return r.jsx(xe,{page:e,isActive:c,ariaLabel:i.goToPage(e),dataSlot:"pagination-link",className:o,buttonProps:a,children:n??e})}function Js({className:e,buttonProps:t,children:o}){const{isFirstPage:n,texts:a}=E();return r.jsx(xe,{page:1,disabled:n,ariaLabel:a.goToFirst,dataSlot:"pagination-first",className:e,buttonProps:t,children:o??r.jsx(y.ChevronsLeft,{"data-slot":"pagination-icon"})})}function Ro({className:e,buttonProps:t,children:o}){const{currentPage:n,isFirstPage:a,texts:s}=E();return r.jsx(xe,{page:Math.max(1,n-1),disabled:a,ariaLabel:s.goToPrevious,dataSlot:"pagination-previous",className:e,buttonProps:t,children:o??r.jsx(y.ChevronLeft,{"data-slot":"pagination-icon"})})}function _o({className:e,buttonProps:t,children:o}){const{currentPage:n,maxPage:a,isLastPage:s,texts:i}=E();return r.jsx(xe,{page:Math.min(a,n+1),disabled:s,ariaLabel:i.goToNext,dataSlot:"pagination-next",className:e,buttonProps:t,children:o??r.jsx(y.ChevronRight,{"data-slot":"pagination-icon"})})}function Zs({className:e,buttonProps:t,children:o}){const{maxPage:n,isLastPage:a,texts:s}=E();return r.jsx(xe,{page:n,disabled:a,ariaLabel:s.goToLast,dataSlot:"pagination-last",className:e,buttonProps:t,children:o??r.jsx(y.ChevronsRight,{"data-slot":"pagination-icon"})})}function Eo({className:e,...t}){const{texts:o}=E();return r.jsxs("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis","data-dots":"true",className:l("flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4",e),...t,children:[r.jsx(y.MoreHorizontal,{}),r.jsx("span",{className:"sr-only",children:o.morePages})]})}function Qs({className:e,linkClassName:t,ellipsisClassName:o}){const{paginationRange:n}=E();return r.jsx("div",{role:"list","data-slot":"pagination-pages",className:l("flex items-center gap-1",e),children:n.map((a,s)=>a===te?r.jsx(Eo,{className:o},`dots-${s}`):r.jsx(Ao,{page:a,className:t},a))})}function ei({children:e,className:t,...o}){const{totalItems:n,texts:a}=E(),s=typeof e=="function"?e(n):e??a.total(n);return r.jsx("span",{"data-slot":"pagination-total",className:l("text-sm",t),...o,children:s})}function ti({children:e,className:t,...o}){const{currentPage:n,maxPage:a,texts:s}=E(),i=typeof e=="function"?e({page:n,max:a}):e??s.pageInfo(n,a);return r.jsx("span",{"data-slot":"pagination-page-info",className:l("text-sm",t),...o,children:i})}function Fo({children:e,className:t,...o}){const{range:n,totalItems:a,texts:s}=E(),i=typeof e=="function"?e({...n,total:a}):e??s.range(n.start,n.end,a);return r.jsx("span",{"data-slot":"pagination-range",className:l("text-sm",t),...o,children:i})}function Lo({sizes:e=Re,className:t,...o}){const{pageSize:n,setPageSize:a,goTo:s}=E(),i=c=>{const d=Number(c.target.value);a(d),s(1)};return r.jsx("select",{"data-slot":"pagination-size-select",value:n,onChange:i,className:l("border border-input rounded-md w-fit min-w-[3rem] bg-background p-2 ring-offset-background","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...o,children:e.map(c=>r.jsx("option",{value:c,"data-slot":"pagination-size-option",children:c},c))})}function ri({sizes:e=Re,selectClassName:t,rangeClassName:o,previousClassName:n,nextClassName:a,className:s,...i}){return r.jsxs(Do,{className:s,...i,children:[e&&r.jsx(Lo,{sizes:e,className:t}),r.jsx(Fo,{className:o}),r.jsx(Ro,{className:n}),r.jsx(_o,{className:a})]})}function Mo({className:e,showIcon:t=r.jsx(y.Eye,{className:"h-4 w-4"}),hideIcon:o=r.jsx(y.EyeOff,{className:"h-4 w-4"}),onShow:n,onHide:a,toggleable:s=!0,onValueChange:i,classNames:c,...d}){const[u,p]=zo(!1),x=()=>{p(),u?a?.():n?.()},m=i?j=>i(j.target.value,j):void 0;return r.jsxs("div",{className:l("relative inline-flex h-8 w-full items-center text-sm","rounded-md border border-input bg-background transition-shadow","focus-within:border-ring","aria-invalid:border-error focus-within:aria-invalid:ring-error/20","has-aria-invalid:border-error focus-within:has-aria-invalid:ring-error/20","has-disabled:cursor-not-allowed has-disabled:opacity-50","[&::-ms-clear]:hidden [&::-ms-reveal]:hidden",e),"data-slot":"password",children:[r.jsx($e.Input,{...d,onChange:m,type:u?"text":"password",className:l("min-w-0 flex-1 bg-transparent pl-3 outline-none","placeholder:text-muted-foreground","disabled:cursor-not-allowed",c?.input)}),r.jsx("button",{"data-slot":"password-toggle",type:"button",onClick:x,disabled:!s,className:l("flex shrink-0 items-center px-2 text-muted-foreground transition-colors","hover:text-foreground","disabled:cursor-not-allowed disabled:opacity-50",c?.toggle),children:u?o:t})]})}const oi=M.Popover.createHandle,_e=M.Popover.Root;function Ee({className:e,children:t,...o}){return r.jsx(M.Popover.Trigger,{className:e,"data-slot":"popover-trigger",...o,children:t})}function be({children:e,className:t,side:o="bottom",align:n="center",sideOffset:a=4,alignOffset:s=0,tooltipStyle:i=!1,matchTriggerWidth:c=!1,anchor:d,portalProps:u,viewportClassName:p,...x}){return r.jsx(M.Popover.Portal,{...u,children:r.jsx(M.Popover.Positioner,{align:n,alignOffset:s,anchor:d,className:"z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom,transform] data-instant:transition-none","data-slot":"popover-positioner",side:o,sideOffset:a,style:c?{width:"var(--anchor-width)"}:void 0,children:r.jsx(M.Popover.Popup,{className:l("relative flex h-(--popup-height,auto) origin-(--transform-origin) rounded-lg border bg-popover not-dark:bg-clip-padding text-popover-foreground shadow-lg/5 outline-none transition-[width,height,scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] has-data-[slot=calendar]:rounded-xl has-data-[slot=calendar]:before:rounded-[calc(var(--radius-xl)-1px)] data-starting-style:scale-98 data-starting-style:opacity-0 dark:before:shadow-[0_-1px_--theme(--color-white/6%)]",c?"w-full":"w-(--popup-width,auto) max-w-72",i&&"w-fit text-balance rounded-md text-xs shadow-md/5 before:rounded-[calc(var(--radius-md)-1px)]",t),"data-slot":"popover-popup",...x,children:r.jsx(M.Popover.Viewport,{className:l("relative size-full max-h-(--available-height) overflow-clip px-(--viewport-inline-padding) py-4 [--viewport-inline-padding:--spacing(4)] has-data-[slot=calendar]:p-2 data-instant:transition-none **:data-current:data-ending-style:opacity-0 **:data-current:data-starting-style:opacity-0 **:data-previous:data-ending-style:opacity-0 **:data-previous:data-starting-style:opacity-0 **:data-current:w-[calc(var(--popup-width)-2*var(--viewport-inline-padding)-2px)] **:data-previous:w-[calc(var(--popup-width)-2*var(--viewport-inline-padding)-2px)] **:data-current:opacity-100 **:data-previous:opacity-100 **:data-current:transition-opacity **:data-previous:transition-opacity",i?"py-1 [--viewport-inline-padding:--spacing(2)]":"not-data-transitioning:overflow-y-auto",p),"data-slot":"popover-viewport",children:e})})})})}function ai({...e}){return r.jsx(M.Popover.Close,{"data-slot":"popover-close",...e})}function Vo({className:e,...t}){return r.jsx(M.Popover.Title,{className:l("font-semibold text-lg leading-none",e),"data-slot":"popover-title",...t})}function Oo({className:e,...t}){return r.jsx(M.Popover.Description,{className:l("text-muted-foreground text-sm",e),"data-slot":"popover-description",...t})}function ni({trigger:e,children:t,title:o,description:n,side:a,align:s,sideOffset:i,alignOffset:c,tooltipStyle:d,matchTriggerWidth:u,anchor:p,className:x,classNames:m,...j}){return r.jsxs(_e,{...j,children:[e!==void 0&&r.jsx(Ee,{render:e}),r.jsxs(be,{side:a,align:s,sideOffset:i,alignOffset:c,tooltipStyle:d,matchTriggerWidth:u,anchor:p,className:x,viewportClassName:m?.viewport,children:[(o??n)&&r.jsxs("div",{className:"mb-2",children:[o&&r.jsx(Vo,{children:o}),n&&r.jsx(Oo,{children:n})]}),t]})]})}const si=Z.cva("block w-full overflow-hidden rounded-full bg-input",{variants:{size:{sm:"h-1",md:"h-1.5",lg:"h-2.5"}},defaultVariants:{size:"md"}}),ii=Z.cva("transition-all duration-500",{variants:{variant:{default:"bg-primary",success:"bg-success",error:"bg-error",warning:"bg-warning",info:"bg-info"}},defaultVariants:{variant:"default"}});function Go({className:e,...t}){return r.jsx(pe.Progress.Root,{className:l("flex w-full flex-col gap-2",e),"data-slot":"progress",...t})}function li({className:e,...t}){return r.jsx(pe.Progress.Label,{className:l("font-medium text-sm",e),"data-slot":"progress-label",...t})}function Bo({className:e,size:t,...o}){return r.jsx(pe.Progress.Track,{className:l(si({size:t}),e),"data-slot":"progress-track",...o})}function Ho({className:e,variant:t,...o}){return r.jsx(pe.Progress.Indicator,{className:l(ii({variant:t}),e),"data-slot":"progress-indicator",...o})}function ci({className:e,...t}){return r.jsx(pe.Progress.Value,{className:l("text-sm tabular-nums",e),"data-slot":"progress-value",...t})}function di({size:e,variant:t,className:o,trackProps:n,indicatorProps:a,...s}){return r.jsx(Go,{className:o,...s,children:r.jsx(Bo,{size:e,...n,children:r.jsx(Ho,{variant:t,...a})})})}function ui({className:e,...t}){return r.jsx("div",{className:l("animate-skeleton rounded-sm [--skeleton-highlight:--alpha(var(--color-white)/64%)] [background:linear-gradient(120deg,transparent_40%,var(--skeleton-highlight),transparent_60%)_var(--color-muted)_0_0/200%_100%_fixed] dark:[--skeleton-highlight:--alpha(var(--color-white)/4%)]",e),"data-slot":"skeleton",...t})}const pi=({as:e="div",inline:t=!1,direction:o="horizontal",reverse:n=!1,justify:a,align:s,gap:i=8,wrap:c,grow:d=!1,className:u,style:p,...x})=>{const m=`${o==="vertical"?"column":"row"}${n?"-reverse":""}`;return r.jsx(e,{className:l(t?"inline-flex":"flex",d&&"flex-1",u),style:{flexDirection:m,justifyContent:a,alignItems:s,gap:i,flexWrap:c===!0?"wrap":c===!1?void 0:c,...p},"data-slot":"stack",...x})};function mi(e,t,o){return o==="none"?!1:o==="both"?!0:o==="backward-only"?e<=t:e>=t}const qo=f.createContext(void 0);function ee(){const e=f.useContext(qo);if(!e)throw new Error("useStepper must be used within a StepperRoot");return e}const $o=f.createContext(void 0);function ne(){const e=f.useContext($o);if(!e)throw new Error("useStepItem must be used within a StepperItem");return e}function Xo({defaultValue:e=1,value:t,onValueChange:o,orientation:n="horizontal",indicators:a={},triggerMode:s="both",className:i,render:c,children:d,...u}){const[p=1,x]=H.useControllableState({prop:t,defaultProp:e,onChange:o}),m={className:l("flex w-full data-[orientation=horizontal]:flex-col data-[orientation=vertical]:flex-row data-[orientation=vertical]:gap-8",i),"data-orientation":n,"data-slot":"stepper",children:d};return r.jsx(qo.Provider,{value:{activeStep:p,setActiveStep:x,orientation:n,indicators:a,triggerMode:s},children:C.useRender({defaultTagName:"div",render:c,props:S.mergeProps(m,u)})})}function Ko({className:e,render:t,children:o,...n}){const{orientation:a}=ee(),s={role:"tablist","aria-orientation":a,"data-orientation":a,"data-slot":"stepper-nav",className:l("group/stepper-nav inline-flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col",e),children:o};return C.useRender({defaultTagName:"nav",render:t,props:S.mergeProps(s,n)})}function Uo({step:e,disabled:t=!1,loading:o=!1,className:n,render:a,children:s,...i}){const{activeStep:c}=ee(),d=e<c?"completed":e===c?"active":"inactive",u=o&&e===c,p={"data-state":d,"data-loading":u||void 0,"data-slot":"stepper-item",className:l("group/step flex items-center justify-center not-last:flex-1","group-data-[orientation=horizontal]/stepper-nav:flex-row group-data-[orientation=vertical]/stepper-nav:flex-col",n),children:s};return r.jsx($o.Provider,{value:{step:e,state:d,isDisabled:t,isLoading:u},children:C.useRender({defaultTagName:"div",render:a,props:S.mergeProps(p,i)})})}function Wo({className:e,render:t,children:o,...n}){const{activeStep:a,setActiveStep:s,triggerMode:i}=ee(),{step:c,state:d,isDisabled:u,isLoading:p}=ne(),x=a===c,m=mi(c,a,i),j=g=>{const v=Array.from(g.currentTarget.closest('[data-slot="stepper-nav"]')?.querySelectorAll('[data-slot="stepper-trigger"]:not([disabled]):not([aria-disabled="true"])')??[]),h=v.indexOf(g.currentTarget);if(h!==-1)switch(g.key){case"ArrowRight":case"ArrowDown":g.preventDefault(),v[(h+1)%v.length]?.focus();break;case"ArrowLeft":case"ArrowUp":g.preventDefault(),v[(h-1+v.length)%v.length]?.focus();break;case"Home":g.preventDefault(),v[0]?.focus();break;case"End":g.preventDefault(),v[v.length-1]?.focus();break}},b={type:"button",role:"tab",id:`stepper-tab-${c}`,"aria-selected":x,"aria-controls":`stepper-panel-${c}`,"aria-disabled":!m||void 0,tabIndex:x?0:-1,disabled:u,"data-state":d,"data-loading":p||void 0,"data-slot":"stepper-trigger",className:l("inline-flex items-center gap-2.5 rounded-full outline-none",m?"cursor-pointer":"cursor-default","focus-visible:z-10 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50","disabled:pointer-events-none disabled:opacity-60",e),onClick:()=>{m&&s(c)},onKeyDown:j,children:o};return C.useRender({defaultTagName:"button",render:t,props:S.mergeProps(b,n)})}function Yo({className:e,render:t,children:o,...n}){const{state:a,isLoading:s}=ne(),{indicators:i}=ee(),c=s&&i.loading||a==="completed"&&i.completed||a==="active"&&i.active||a==="inactive"&&i.inactive,d={"data-state":a,"data-loading":s||void 0,"data-slot":"stepper-indicator",className:l("relative flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full border-background bg-accent text-accent-foreground text-xs","data-[state=active]:bg-primary data-[state=active]:text-primary-foreground","data-[state=completed]:bg-primary data-[state=completed]:text-primary-foreground",e),children:r.jsx("div",{className:"absolute",children:c||o})};return C.useRender({defaultTagName:"div",render:t,props:S.mergeProps(d,n)})}function Jo({className:e,render:t,children:o,...n}){const{state:a}=ne(),s={"aria-hidden":!0,"data-state":a,"data-slot":"stepper-separator",className:l("m-0.5 rounded-sm bg-muted data-[state=completed]:bg-primary","group-data-[orientation=horizontal]/stepper-nav:h-0.5 group-data-[orientation=horizontal]/stepper-nav:flex-1","group-data-[orientation=vertical]/stepper-nav:h-12 group-data-[orientation=vertical]/stepper-nav:w-0.5",e),children:o};return C.useRender({defaultTagName:"div",render:t,props:S.mergeProps(s,n)})}function Zo({className:e,render:t,children:o,...n}){const{state:a}=ne(),s={"data-state":a,"data-slot":"stepper-title",className:l("font-medium text-sm leading-none",e),children:o};return C.useRender({defaultTagName:"h3",render:t,props:S.mergeProps(s,n)})}function Qo({className:e,render:t,children:o,...n}){const{state:a}=ne(),s={"data-state":a,"data-slot":"stepper-description",className:l("text-muted-foreground text-sm",e),children:o};return C.useRender({defaultTagName:"p",render:t,props:S.mergeProps(s,n)})}function ea({className:e,render:t,children:o,...n}){const{activeStep:a}=ee(),s={"data-state":a,"data-slot":"stepper-panel",className:l("w-full",e),children:o};return C.useRender({defaultTagName:"div",render:t,props:S.mergeProps(s,n)})}function ta({value:e,forceMount:t=!1,className:o,render:n,children:a,...s}){const{activeStep:i}=ee(),c=e===i;if(!t&&!c)return null;const d={role:"tabpanel",id:`stepper-panel-${e}`,"aria-labelledby":`stepper-tab-${e}`,hidden:!c,"data-state":c?"active":"inactive","data-slot":"stepper-content",className:l("w-full",o,!c&&"hidden"),children:a};return C.useRender({defaultTagName:"div",render:n,props:S.mergeProps(d,s)})}function fi({items:e,classNames:t,...o}){const n=e.some(a=>a.content!=null);return r.jsxs(Xo,{...o,children:[r.jsx(Ko,{className:t?.nav,children:e.map((a,s)=>{const i=s+1;return r.jsxs(Uo,{step:i,disabled:a.disabled,loading:a.loading,className:t?.item,children:[r.jsxs(Wo,{className:t?.trigger,children:[r.jsx(Yo,{className:t?.indicator,children:a.indicator??i}),(a.title||a.description)&&r.jsxs("div",{className:"flex flex-col gap-0.5 text-left",children:[a.title?r.jsx(Zo,{className:t?.title,children:a.title}):null,a.description?r.jsx(Qo,{className:t?.description,children:a.description}):null]})]}),s<e.length-1?r.jsx(Jo,{className:t?.separator}):null]},i)})}),n?r.jsx(ea,{className:t?.panel,children:e.map((a,s)=>a.content!=null?r.jsx(ta,{value:s+1,className:t?.content,children:a.content},s+1):null)}):null]})}function ra({className:e,...t}){return r.jsx(gt.Switch.Root,{className:l("peer inline-flex h-[calc(var(--thumb-size)+2px)] w-[calc(var(--thumb-size)*2-2px)] shrink-0 items-center rounded-full p-px outline-none transition-[background-color,box-shadow] duration-200","[--thumb-size:--spacing(5)] sm:[--thumb-size:--spacing(4)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background","data-checked:bg-primary data-unchecked:bg-input","data-disabled:cursor-not-allowed data-disabled:opacity-64",e),"data-slot":"switch",...t})}function oa({className:e,...t}){return r.jsx(gt.Switch.Thumb,{className:l("pointer-events-none block aspect-square h-full rounded-(--thumb-size) bg-background shadow-sm/5 will-change-transform","origin-left [transition:translate_.15s,border-radius_.15s,scale_.1s_.1s,transform-origin_.15s]","data-checked:origin-[var(--thumb-size)_50%] data-checked:translate-x-[calc(var(--thumb-size)-4px)]","in-[[role=switch]:active,[data-slot=label]:active,[data-slot=field-label]:active]:not-data-disabled:scale-x-110","in-[[role=switch]:active,[data-slot=label]:active,[data-slot=field-label]:active]:rounded-[var(--thumb-size)/calc(var(--thumb-size)*1.1)]",e),"data-slot":"switch-thumb",...t})}function gi({children:e,label:t,className:o,id:n,controlFirst:a=!0,tooltip:s,classNames:i,...c}){const d=f.useId(),u=n??d,p=t??e;return r.jsxs("div",{className:l("flex select-none items-center gap-x-2",!a&&"flex-row-reverse justify-end",i?.wrapper),children:[r.jsx(ra,{id:u,className:o,...c,children:r.jsx(oa,{className:i?.thumb})}),p&&r.jsx(fe,{htmlFor:u,tooltip:s,className:i?.label,children:p})]})}function aa({className:e,classNames:t,...o}){return r.jsx("div",{"data-slot":"table-container",className:l("relative w-full overflow-auto rounded-md border",t?.container),children:r.jsx("table",{"data-slot":"table",className:l("w-full caption-bottom text-sm",e),...o})})}function na({className:e,...t}){return r.jsx("thead",{"data-slot":"table-header",className:l("[&_tr]:border-b",e),...t})}function sa({className:e,...t}){return r.jsx("tbody",{"data-slot":"table-body",className:l("[&_tr:last-child]:border-0",e),...t})}function xi({className:e,...t}){return r.jsx("tfoot",{"data-slot":"table-footer",className:l("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})}function qe({className:e,...t}){return r.jsx("tr",{"data-slot":"table-row",className:l("border-b transition-colors hover:bg-muted data-[selected=true]:bg-muted",e),...t})}function ia({className:e,...t}){return r.jsx("th",{"data-slot":"table-head",className:l("h-12 px-4 text-left align-middle font-medium text-muted-foreground sticky top-0 bg-background [&:has([role=checkbox])]:pr-0",e),...t})}function la({className:e,...t}){return r.jsx("td",{"data-slot":"table-cell",className:l("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t})}function bi({className:e,...t}){return r.jsx("caption",{"data-slot":"table-caption",className:l("mt-4 text-sm text-muted-foreground",e),...t})}function hi({data:e=[],columns:t=[],getRowKey:o,onRowClick:n,onRowDoubleClick:a,selected:s,classNames:i,...c}){return r.jsxs(aa,{...c,classNames:{container:i?.container},children:[r.jsx(na,{className:i?.thead,children:r.jsx(qe,{className:i?.headerRow,children:t.map((d,u)=>r.jsx(ia,{className:i?.th,style:{width:d.width},children:typeof d.header=="function"?d.header():d.header},u))})}),r.jsx(sa,{className:i?.tbody,children:e.map((d,u)=>r.jsx(qe,{className:i?.tr,"data-selected":s?.(d),onClick:()=>n?.(d),onDoubleClick:()=>a?.(d),children:t.map((p,x)=>r.jsx(la,{className:i?.td,children:p.cell?p.cell(d,u):d[p.key]},x))},o?o(d,u):u))})]})}function vi({className:e,...t}){return r.jsx(ae.Tabs.Root,{className:l("flex flex-col gap-2 data-[orientation=vertical]:flex-row",e),"data-slot":"tabs",...t})}function ca({variant:e="underline",centered:t=!1,className:o,children:n,...a}){return r.jsxs(ae.Tabs.List,{"data-variant":e,className:l("group/tabs-list relative z-0 flex w-fit items-center justify-center gap-x-0.5 text-muted-foreground",t&&"mx-auto","data-[orientation=vertical]:flex-col data-[orientation=vertical]:justify-start",e==="background"?"rounded-lg border border-border p-0.5":"data-[orientation=vertical]:px-1 data-[orientation=horizontal]:py-1 *:data-[slot=tabs-tab]:hover:bg-accent",o),"data-slot":"tabs-list",...a,children:[n,r.jsx(ae.Tabs.Indicator,{className:l("absolute bottom-0 left-0 h-(--active-tab-height) w-(--active-tab-width) translate-x-(--active-tab-left) -translate-y-(--active-tab-bottom) transition-[width,translate] duration-200 ease-in-out",e==="background"?"-z-1 rounded-md bg-primary shadow-sm/5":"z-10 bg-primary data-[orientation=horizontal]:h-0.5 data-[orientation=vertical]:w-0.5 data-[orientation=vertical]:-translate-x-px data-[orientation=horizontal]:translate-y-px"),"data-slot":"tab-indicator"})]})}function da({className:e,...t}){return r.jsx(ae.Tabs.Tab,{className:l("relative flex h-9 shrink-0 grow cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap rounded-md border border-transparent px-[calc(--spacing(2.5)-1px)] font-medium text-base outline-none transition-[color,background-color,box-shadow] hover:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring data-disabled:pointer-events-none data-[orientation=vertical]:w-full data-[orientation=vertical]:grow-0 data-[orientation=vertical]:justify-start data-active:text-foreground data-disabled:opacity-64 group-data-[variant=background]/tabs-list:data-active:text-primary-foreground sm:h-8 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-mx-0.5 [&_svg]:shrink-0",e),"data-slot":"tabs-tab",...t})}function ua({className:e,...t}){return r.jsx(ae.Tabs.Panel,{className:l("flex-1 outline-none",e),"data-slot":"tabs-content",...t})}const pa=Z.cva("group/tag inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-error aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",error:"bg-error/10 text-error focus-visible:ring-error/20 dark:bg-error/20 dark:focus-visible:ring-error/40 [a]:hover:bg-error/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function ji({className:e,variant:t="default",render:o,...n}){return C.useRender({defaultTagName:"span",props:S.mergeProps({className:l(pa({variant:t}),e)},n),render:o,state:{slot:"tag",variant:t}})}function yi({className:e,onValueChange:t,...o}){const n=t?a=>t(a.target.value,a):void 0;return r.jsx(O.Field.Control,{render:r.jsx("textarea",{"data-slot":"textarea",className:l("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-background px-3 py-2 text-sm outline-none transition-shadow placeholder:text-muted-foreground focus-visible:border-ring aria-invalid:border-error focus-visible:aria-invalid:ring-error/20 disabled:cursor-not-allowed disabled:opacity-50",e),onChange:n,...o})})}const ma=f.createContext(void 0);function wi(){const e=f.useContext(ma);if(!e)throw new Error("useTimeline must be used within a TimelineRoot");return e}function fa({defaultValue:e=1,value:t,onValueChange:o,orientation:n="vertical",className:a,render:s,children:i,...c}){const[d=1,u]=H.useControllableState({prop:t,defaultProp:e,onChange:o}),p={className:l("group/timeline flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col",a),"data-orientation":n,"data-slot":"timeline",children:i};return r.jsx(ma.Provider,{value:{activeStep:d,setActiveStep:u},children:C.useRender({defaultTagName:"div",render:s,props:S.mergeProps(p,c)})})}function Ne({step:e,className:t,render:o,children:n,...a}){const{activeStep:s}=wi(),i={className:l("group/timeline-item relative flex flex-1 flex-col gap-0.5 group-data-[orientation=vertical]/timeline:ms-8 group-data-[orientation=horizontal]/timeline:mt-8 group-data-[orientation=horizontal]/timeline:not-last:pe-8 group-data-[orientation=vertical]/timeline:not-last:pb-6 has-[+[data-completed]]:**:data-[slot=timeline-separator]:bg-primary",t),"data-completed":e<=s||void 0,"data-slot":"timeline-item",children:n};return C.useRender({defaultTagName:"div",render:o,props:S.mergeProps(i,a)})}function Ce({className:e,render:t,children:o,...n}){const a={className:l(e),"data-slot":"timeline-header",children:o};return C.useRender({defaultTagName:"div",render:t,props:S.mergeProps(a,n)})}function Se({className:e,render:t,children:o,...n}){const a={className:l("font-medium text-sm",e),"data-slot":"timeline-title",children:o};return C.useRender({defaultTagName:"h3",render:t,props:S.mergeProps(a,n)})}function Pe({className:e,render:t,children:o,...n}){const a={className:l("mb-1 block font-medium text-muted-foreground text-xs group-data-[orientation=vertical]/timeline:max-sm:h-4",e),"data-slot":"timeline-date",children:o};return C.useRender({defaultTagName:"time",render:t,props:S.mergeProps(a,n)})}function Te({className:e,render:t,children:o,...n}){const a={className:l("text-muted-foreground text-sm",e),"data-slot":"timeline-content",children:o};return C.useRender({defaultTagName:"div",render:t,props:S.mergeProps(a,n)})}function ke({className:e,render:t,children:o,...n}){const a={"aria-hidden":!0,className:l("group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=vertical]/timeline:-translate-x-1/2 absolute size-4 rounded-full border-2 border-primary/20 group-data-[orientation=vertical]/timeline:top-0 group-data-[orientation=horizontal]/timeline:left-0 group-data-completed/timeline-item:border-primary",e),"data-slot":"timeline-indicator",children:o};return C.useRender({defaultTagName:"div",render:t,props:S.mergeProps(a,n)})}function ze({className:e,render:t,children:o,...n}){const a={"aria-hidden":!0,className:l("group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=vertical]/timeline:-translate-x-1/2 absolute self-start bg-primary/10 group-last/timeline-item:hidden group-data-[orientation=horizontal]/timeline:h-0.5 group-data-[orientation=vertical]/timeline:h-[calc(100%-1rem-0.25rem)] group-data-[orientation=horizontal]/timeline:w-[calc(100%-1rem-0.25rem)] group-data-[orientation=vertical]/timeline:w-0.5 group-data-[orientation=horizontal]/timeline:translate-x-4.5 group-data-[orientation=vertical]/timeline:translate-y-4.5",e),"data-slot":"timeline-separator",children:o};return C.useRender({defaultTagName:"div",render:t,props:S.mergeProps(a,n)})}function Ni({items:e,variant:t="default",classNames:o,...n}){return r.jsx(fa,{...n,children:e.map((a,s)=>t==="alternate"?r.jsxs(Ne,{step:s+1,className:l("w-[calc(50%-1.5rem)] odd:ms-auto even:me-auto even:text-right","even:group-data-[orientation=vertical]/timeline:ms-0 even:group-data-[orientation=vertical]/timeline:me-8","even:group-data-[orientation=vertical]/timeline:**:data-[slot=timeline-indicator]:-right-6 even:group-data-[orientation=vertical]/timeline:**:data-[slot=timeline-indicator]:left-auto even:group-data-[orientation=vertical]/timeline:**:data-[slot=timeline-indicator]:translate-x-1/2","even:group-data-[orientation=vertical]/timeline:**:data-[slot=timeline-separator]:-right-6 even:group-data-[orientation=vertical]/timeline:**:data-[slot=timeline-separator]:left-auto even:group-data-[orientation=vertical]/timeline:**:data-[slot=timeline-separator]:translate-x-1/2",o?.item),children:[r.jsxs(Ce,{className:o?.header,children:[r.jsx(ze,{className:o?.separator}),a.date?r.jsx(Pe,{className:o?.date,children:a.date}):null,a.title?r.jsx(Se,{className:o?.title,children:a.title}):null,r.jsx(ke,{className:o?.indicator,children:a.indicator})]}),a.content?r.jsx(Te,{className:o?.content,children:a.content}):null]},s):t==="date-left"?r.jsxs(Ne,{step:s+1,className:l("sm:group-data-[orientation=vertical]/timeline:ms-32",o?.item),children:[r.jsxs(Ce,{className:o?.header,children:[r.jsx(ze,{className:o?.separator}),a.date?r.jsx(Pe,{className:l("sm:group-data-[orientation=vertical]/timeline:absolute sm:group-data-[orientation=vertical]/timeline:-left-32 sm:group-data-[orientation=vertical]/timeline:w-20 sm:group-data-[orientation=vertical]/timeline:text-right",o?.date),children:a.date}):null,a.title?r.jsx(Se,{className:l("sm:-mt-0.5",o?.title),children:a.title}):null,r.jsx(ke,{className:o?.indicator,children:a.indicator})]}),a.content?r.jsx(Te,{className:o?.content,children:a.content}):null]},s):r.jsxs(Ne,{step:s+1,className:o?.item,children:[r.jsxs(Ce,{className:o?.header,children:[a.date?r.jsx(Pe,{className:o?.date,children:a.date}):null,a.title?r.jsx(Se,{className:o?.title,children:a.title}):null]}),r.jsx(ke,{className:o?.indicator,children:a.indicator}),r.jsx(ze,{className:o?.separator}),a.content?r.jsx(Te,{className:o?.content,children:a.content}):null]},s))})}const Fe={default:{icon:null,ringClass:"ring-input",titleClass:"",bgClass:""},success:{icon:y.CircleCheck,ringClass:"ring-success",titleClass:"text-success",bgClass:"bg-success/5"},error:{icon:y.CircleX,ringClass:"ring-error",titleClass:"text-error",bgClass:"bg-error/5"},warning:{icon:y.TriangleAlert,ringClass:"ring-warning",titleClass:"text-warning",bgClass:"bg-warning/5"},info:{icon:y.Info,ringClass:"ring-info",titleClass:"text-info",bgClass:"bg-info/5"}};function ga({variant:e="default"}={}){return l("rounded-xl ring-1 bg-clip-padding p-4 shadow-lg bg-background",Fe[e].ringClass)}function it(e){return{...e,close:t=>e.close(t),add:t=>{if(t.id){const o=e.toasts;if(o){const n=o.find(a=>a.id===t.id);if(n&&n.transitionStatus!=="ending")return e.update(t.id,{bump:!1}),requestAnimationFrame(()=>{e.update(t.id,{bump:!0,...t.timeout!==void 0&&{timeout:t.timeout}})}),t.id;if(n&&n.transitionStatus==="ending")return t.id}}return e.add({...t})},update:(t,o)=>e.update(t,{...o}),promise:(t,o)=>e.promise(t,{loading:{...o.loading},success:typeof o.success=="function"?n=>({...o.success(n)}):{...o.success},error:typeof o.error=="function"?n=>({...o.error(n)}):{...o.error}})}}function xa(){const e=_.Toast.useToastManager();return{...it(e),toasts:e.toasts}}function Ci(){return it(_.Toast.createToastManager())}let X=null;function ce(e){return typeof e=="string"?{title:e}:e}const Si=Object.assign(e=>X?.add({...ce(e)}),{success:e=>X?.add({variant:"success",...ce(e)}),error:e=>X?.add({variant:"error",...ce(e)}),warning:e=>X?.add({variant:"warning",...ce(e)}),info:e=>X?.add({variant:"info",...ce(e)}),promise:(e,t)=>X?.promise(e,t)});function Pi(){const e=_.Toast.useToastManager();return X=f.useMemo(()=>it(e),[e]),f.useEffect(()=>()=>{X=null},[]),null}function ba({children:e,toastManager:t,container:o}){return r.jsxs(_.Toast.Provider,{toastManager:t,children:[r.jsx(Pi,{}),e,r.jsx(_.Toast.Portal,{container:o,children:r.jsx(_.Toast.Viewport,{className:"fixed top-auto right-4 bottom-4 mx-auto flex w-[calc(100%-2rem)] sm:right-8 sm:bottom-8 sm:w-[340px]",children:r.jsx(Ti,{})})})]})}function Ti(){const{toasts:e}=xa();return e.map(t=>r.jsxs(_.Toast.Root,{toast:t,"data-slot":"toast",className:l("absolute right-0 bottom-0 left-auto z-[calc(var(--z-toast)-var(--toast-index))] mr-0 h-[var(--height)] w-full origin-bottom select-none",ga({variant:t.variant}),"[--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]","[transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))] [transition:transform_0.5s_cubic-bezier(0.22,1,0.36,1),opacity_0.5s,height_0.15s]","after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']","data-[ending-style]:opacity-0 data-[expanded]:h-[var(--toast-height)] data-[expanded]:[transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--offset-y)))] data-[limited]:opacity-0 data-[starting-style]:[transform:translateY(150%)]","data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))] data-[expanded]:data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]","data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))] data-[expanded]:data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]","data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))] data-[expanded]:data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]","data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))] data-[expanded]:data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]","[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(150%)]",t.bump&&"animate-toast-bump"),children:[r.jsx(ki,{variant:t.variant}),r.jsxs(_.Toast.Content,{className:"isolate flex flex-col gap-1 transition-opacity [transition-duration:250ms] data-[behind]:pointer-events-none data-[behind]:opacity-0 data-[expanded]:pointer-events-auto data-[expanded]:opacity-100",children:[t.content??r.jsxs("div",{className:"flex items-start gap-2",children:[r.jsx(zi,{variant:t.variant}),r.jsxs("div",{className:"flex flex-col gap-1 overflow-hidden",children:[r.jsx(_.Toast.Title,{"data-slot":"toast-title",className:l("text-[0.975rem] leading-5 font-medium text-foreground",Fe[t.variant??"default"].titleClass)}),r.jsx(_.Toast.Description,{"data-slot":"toast-description",className:"text-[0.925rem] leading-5 text-muted-foreground"}),!!t.actions?.length&&r.jsx("div",{className:"mt-2 flex min-w-0 flex-nowrap gap-2 overflow-x-auto p-px",children:t.actions.map((o,n)=>r.jsx(U,{...o},n))})]})]}),r.jsx(_.Toast.Close,{className:"absolute top-2 right-2 flex h-4 w-4 items-center justify-center rounded border-none bg-transparent text-current/50 hover:bg-foreground/10 hover:text-current","aria-label":"Close",children:r.jsx(y.X,{className:"h-3 w-3"})})]})]},t.id))}function ki({variant:e}){const t=e?Fe[e].bgClass:"";return r.jsx("div",{className:l("absolute inset-0 rounded-[11px] bg-background/90",t)})}function zi({variant:e}){if(!e||e==="default")return null;const{icon:t,titleClass:o}=Fe[e];return t?r.jsx(t,{"data-slot":"toast-icon",className:l("mt-0.5 h-4 w-4 shrink-0",o)}):null}const Ii=r.jsx(y.ChevronRightIcon,{"aria-hidden":!0,className:"size-4 shrink-0 text-muted-foreground transition-transform duration-200 in-data-[expanded=true]:rotate-90"}),ha=f.createContext(void 0);function Di(){const e=f.useContext(ha);if(!e)throw new Error("Tree components must be used within a TreeRoot");return e}const va=f.createContext(void 0);function Ai(){const e=f.useContext(va);if(!e)throw new Error("TreeItemLabel must be used within a TreeItem");return e}function Ri({tree:e,indent:t=20,className:o,render:n,style:a,...s}){const{style:i,...c}=e.getContainerProps(),d={"data-slot":"tree",...c,className:l("flex flex-col outline-none",o),style:{...i,...a,"--tree-indent":`${t}px`}};return r.jsx(ha.Provider,{value:{tree:e},children:C.useRender({defaultTagName:"div",render:n,props:S.mergeProps(d,s)})})}function _i({item:e,leafIcon:t,parentIcon:o=Ii,className:n,render:a,children:s,style:i,...c}){const{style:d,...u}=e.getProps(),p=e.getItemMeta().level,x=e.isFolder(),m=e.isExpanded(),j=x?typeof o=="function"?o(m):o:t,b=r.jsxs(ja,{children:[j,e.getItemName()]}),g={"data-slot":"tree-item","data-focused":e.isFocused()||void 0,"data-folder":x||void 0,"data-selected":e.isSelected?.()||void 0,"data-drag-target":e.isDragTarget?.()||void 0,"data-search-match":e.isMatchingSearch?.()||void 0,"data-expanded":m||void 0,"aria-expanded":x?m:void 0,...u,style:{...d,...i,paddingInlineStart:`calc(var(--tree-indent) * ${p})`},className:l("z-10 not-last:pb-0.5 outline-hidden select-none focus:z-20","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),children:s??b};return r.jsx(va.Provider,{value:{item:e},children:C.useRender({defaultTagName:"button",render:a,props:S.mergeProps(g,c)})})}function ja({className:e,render:t,children:o,...n}){const{item:a}=Ai(),s={"data-slot":"tree-item-label",className:l("flex items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors","bg-background hover:bg-accent","in-data-[selected=true]:bg-accent in-data-[selected=true]:text-accent-foreground","in-data-[drag-target=true]:bg-accent","in-data-[search-match=true]:bg-blue-50","in-focus-visible:ring-3 in-focus-visible:ring-ring/50","[&_svg]:pointer-events-none [&_svg]:shrink-0",e),children:o??a.getItemName()};return C.useRender({defaultTagName:"span",render:t,props:S.mergeProps(s,n)})}function Ei({className:e,render:t,style:o,...n}){const{tree:a}=Di(),s=a.getDragLineStyle?.();if(!s)return null;const i={"data-slot":"tree-drag-line",style:{...s,...o},className:l("absolute z-30 -mt-px h-0.5 w-[unset] bg-primary","before:absolute before:-top-[3px] before:left-0 before:size-2 before:rounded-full","before:border-2 before:border-primary before:bg-background",e)};return C.useRender({defaultTagName:"div",render:t,props:S.mergeProps(i,n)})}function Fi({children:e,tooltipDelay:t,...o}){return r.jsx(ir,{delay:t,children:r.jsx(ba,{...o,children:e})})}const ya={},wa=f.createContext({theme:ya}),Na=()=>f.useContext(wa),Li=({children:e,theme:t=ya})=>r.jsx(wa.Provider,{value:{theme:t},children:e}),Mi=(e,t,o={})=>{const{theme:n}=Na(),a=n[e]||{};return{...o,...a,...t}};Object.defineProperty(exports,"useControllableState",{enumerable:!0,get:()=>H.useControllableState});Object.defineProperty(exports,"AccordionPrimitive",{enumerable:!0,get:()=>oe.Accordion});Object.defineProperty(exports,"AlertDialogPrimitive",{enumerable:!0,get:()=>B.AlertDialog});Object.defineProperty(exports,"AutocompletePrimitive",{enumerable:!0,get:()=>P.Autocomplete});Object.defineProperty(exports,"InputPrimitive",{enumerable:!0,get:()=>$e.Input});Object.defineProperty(exports,"ScrollAreaPrimitive",{enumerable:!0,get:()=>re.ScrollArea});Object.defineProperty(exports,"AvatarPrimitive",{enumerable:!0,get:()=>De.Avatar});Object.defineProperty(exports,"SelectPrimitive",{enumerable:!0,get:()=>k.Select});Object.defineProperty(exports,"CheckboxPrimitive",{enumerable:!0,get:()=>Xe.Checkbox});Object.defineProperty(exports,"FieldPrimitive",{enumerable:!0,get:()=>O.Field});Object.defineProperty(exports,"FieldsetPrimitive",{enumerable:!0,get:()=>ue.Fieldset});Object.defineProperty(exports,"TooltipPrimitive",{enumerable:!0,get:()=>K.Tooltip});Object.defineProperty(exports,"ComboboxPrimitive",{enumerable:!0,get:()=>w.Combobox});Object.defineProperty(exports,"PopoverPrimitive",{enumerable:!0,get:()=>M.Popover});Object.defineProperty(exports,"DialogPrimitive",{enumerable:!0,get:()=>V.Dialog});Object.defineProperty(exports,"SeparatorPrimitive",{enumerable:!0,get:()=>mt.Separator});Object.defineProperty(exports,"FormPrimitive",{enumerable:!0,get:()=>ft.Form});Object.defineProperty(exports,"NumberInputPrimitive",{enumerable:!0,get:()=>W.NumberField});Object.defineProperty(exports,"TabsPrimitive",{enumerable:!0,get:()=>ae.Tabs});Object.defineProperty(exports,"ToastPrimitive",{enumerable:!0,get:()=>_.Toast});exports.Accordion=Fa;exports.AccordionContent=jt;exports.AccordionItem=ht;exports.AccordionRoot=bt;exports.AccordionTrigger=vt;exports.AlertDialog=La;exports.AlertDialogBackdrop=St;exports.AlertDialogClose=Ve;exports.AlertDialogDescription=zt;exports.AlertDialogFooter=Dt;exports.AlertDialogHeader=It;exports.AlertDialogPopup=Tt;exports.AlertDialogRoot=Nt;exports.AlertDialogTitle=kt;exports.AlertDialogTrigger=Ct;exports.AlertDialogViewport=Pt;exports.Autocomplete=$a;exports.AutocompleteClear=Ot;exports.AutocompleteCollection=Ha;exports.AutocompleteEmpty=Mt;exports.AutocompleteGroup=Va;exports.AutocompleteGroupLabel=Oa;exports.AutocompleteInput=_t;exports.AutocompleteItem=Lt;exports.AutocompleteList=Ft;exports.AutocompletePopup=Et;exports.AutocompleteRoot=Rt;exports.AutocompleteRow=Ga;exports.AutocompleteSeparator=Ma;exports.AutocompleteStatus=Gt;exports.AutocompleteTrigger=Vt;exports.AutocompleteValue=Ba;exports.Avatar=rn;exports.AvatarBadge=Kt;exports.AvatarFallback=Xt;exports.AvatarGroup=en;exports.AvatarGroupCount=tn;exports.AvatarImage=$t;exports.AvatarRoot=qt;exports.BaseButton=yt;exports.Button=U;exports.Calendar=me;exports.Card=gn;exports.CardAction=ar;exports.CardContent=nr;exports.CardDescription=or;exports.CardFooter=sr;exports.CardHeader=tr;exports.CardRoot=er;exports.CardTitle=rr;exports.Center=xn;exports.Checkbox=fr;exports.CheckboxGroup=Cn;exports.CheckboxGroupContext=Ae;exports.CheckboxGroupRoot=Nn;exports.CheckboxIndicator=Qe;exports.CheckboxRoot=Ze;exports.Combobox=Bn;exports.ComboboxChip=Er;exports.ComboboxChipRemove=Fr;exports.ComboboxChips=_r;exports.ComboboxChipsInput=Sr;exports.ComboboxClear=Rr;exports.ComboboxCollection=An;exports.ComboboxContext=ge;exports.ComboboxEmpty=Ir;exports.ComboboxGroup=kn;exports.ComboboxGroupLabel=zn;exports.ComboboxInput=Pr;exports.ComboboxItem=zr;exports.ComboboxList=Ar;exports.ComboboxPopup=kr;exports.ComboboxRoot=Cr;exports.ComboboxRow=In;exports.ComboboxSearchInput=Pn;exports.ComboboxSelectTrigger=Sn;exports.ComboboxSeparator=Tn;exports.ComboboxStatus=Dn;exports.ComboboxTrigger=Tr;exports.ComboboxValue=Dr;exports.DOTS=te;exports.DateInput=Un;exports.DatePicker=Wn;exports.Dialog=es;exports.DialogBackdrop=Vr;exports.DialogClose=Qn;exports.DialogDescription=Hr;exports.DialogFooter=$r;exports.DialogHeader=qr;exports.DialogPopup=Gr;exports.DialogRoot=Lr;exports.DialogTitle=Br;exports.DialogTrigger=Mr;exports.DialogViewport=Or;exports.Divider=ts;exports.Dropzone=ns;exports.DropzoneAcceptedFiles=Zr;exports.DropzoneContent=Wr;exports.DropzoneItem=Yr;exports.DropzoneRejectedFiles=Qr;exports.DropzoneRoot=Kr;exports.DropzoneTrigger=Ur;exports.Empty=ls;exports.EmptyContent=no;exports.EmptyDescription=ao;exports.EmptyHeader=to;exports.EmptyMedia=ro;exports.EmptyRoot=eo;exports.EmptyTitle=oo;exports.Field=Nr;exports.FieldControl=tt;exports.FieldDescription=vr;exports.FieldError=je;exports.FieldItem=wn;exports.FieldLabel=hr;exports.FieldLegend=yr;exports.FieldRoot=br;exports.FieldSet=jr;exports.FieldValidity=rt;exports.FileType=T;exports.FileTypeGroups=ss;exports.Form=so;exports.HookField=Wa;exports.HookForm=Ua;exports.Input=At;exports.Kbd=cs;exports.KbdGroup=ds;exports.Label=fe;exports.LibraryProvider=Fi;exports.Loader=ps;exports.Menu=fs;exports.MenuCheckboxItem=fo;exports.MenuGroup=Ge;exports.MenuItem=co;exports.MenuLabel=Be;exports.MenuPopup=st;exports.MenuPortal=ms;exports.MenuRadioGroup=go;exports.MenuRadioItem=xo;exports.MenuRoot=io;exports.MenuSeparator=bo;exports.MenuShortcut=ye;exports.MenuSub=uo;exports.MenuSubContent=mo;exports.MenuSubTrigger=po;exports.MenuTrigger=lo;exports.NumberInput=hs;exports.NumberInputCursorIcon=bs;exports.NumberInputDecrement=yo;exports.NumberInputGroup=vo;exports.NumberInputIncrement=wo;exports.NumberInputInput=jo;exports.NumberInputRoot=ho;exports.NumberInputScrubArea=gs;exports.NumberInputScrubAreaCursor=xs;exports.PAGINATION_SIZES=Re;exports.Pagination=ri;exports.PaginationEllipsis=Eo;exports.PaginationFirst=Js;exports.PaginationLast=Zs;exports.PaginationLink=Ao;exports.PaginationNext=_o;exports.PaginationPageInfo=ti;exports.PaginationPages=Qs;exports.PaginationPrevious=Ro;exports.PaginationRange=Fo;exports.PaginationRoot=Do;exports.PaginationSizeSelect=Lo;exports.PaginationTotal=ei;exports.Password=Mo;exports.PasswordRoot=Mo;exports.Popover=ni;exports.PopoverClose=ai;exports.PopoverContent=be;exports.PopoverCreateHandle=oi;exports.PopoverDescription=Oo;exports.PopoverPopup=be;exports.PopoverRoot=_e;exports.PopoverTitle=Vo;exports.PopoverTrigger=Ee;exports.Progress=di;exports.ProgressIndicator=Ho;exports.ProgressLabel=li;exports.ProgressRoot=Go;exports.ProgressTrack=Bo;exports.ProgressValue=ci;exports.ScrollArea=Ue;exports.ScrollBar=Oe;exports.Select=Zt;exports.SelectButton=on;exports.SelectContent=Je;exports.SelectGroup=nn;exports.SelectGroupLabel=sn;exports.SelectItem=Jt;exports.SelectLabel=ln;exports.SelectPopup=Je;exports.SelectRoot=Ut;exports.SelectSeparator=an;exports.SelectTrigger=Wt;exports.SelectValue=Yt;exports.Skeleton=ui;exports.Stack=pi;exports.Stepper=fi;exports.StepperContent=ta;exports.StepperDescription=Qo;exports.StepperIndicator=Yo;exports.StepperItem=Uo;exports.StepperNav=Ko;exports.StepperPanel=ea;exports.StepperRoot=Xo;exports.StepperSeparator=Jo;exports.StepperTitle=Zo;exports.StepperTrigger=Wo;exports.Switch=gi;exports.SwitchRoot=ra;exports.SwitchThumb=oa;exports.TabList=ca;exports.Table=hi;exports.TableBody=sa;exports.TableCaption=bi;exports.TableCell=la;exports.TableFooter=xi;exports.TableHead=ia;exports.TableHeader=na;exports.TableRoot=aa;exports.TableRow=qe;exports.Tabs=vi;exports.TabsContent=ua;exports.TabsList=ca;exports.TabsPanel=ua;exports.TabsTab=da;exports.TabsTrigger=da;exports.Tag=ji;exports.Textarea=yi;exports.ThemeProvider=Li;exports.Timeline=Ni;exports.TimelineContent=Te;exports.TimelineDate=Pe;exports.TimelineHeader=Ce;exports.TimelineIndicator=ke;exports.TimelineItem=Ne;exports.TimelineRoot=fa;exports.TimelineSeparator=ze;exports.TimelineTitle=Se;exports.ToastProvider=ba;exports.Tooltip=pr;exports.TooltipArrow=ur;exports.TooltipPopup=dr;exports.TooltipProvider=ir;exports.TooltipRoot=lr;exports.TooltipTrigger=cr;exports.TreeDragLine=Ei;exports.TreeItem=_i;exports.TreeItemLabel=ja;exports.TreeRoot=Ri;exports.buttonVariants=wt;exports.cn=l;exports.createSafeContext=Ya;exports.createToastManager=Ci;exports.ensureReactElement=Ja;exports.extractInitials=Bt;exports.getFormData=Za;exports.inputBaseClasses=Q;exports.mergeRefs=Qa;exports.normalizeError=wr;exports.parseFormValues=Xa;exports.selectTriggerClasses=We;exports.selectTriggerIconClassName=Ye;exports.tagVariants=pa;exports.toast=Si;exports.toastVariants=ga;exports.twMerge=xt;exports.useArray=vs;exports.useAsync=js;exports.useAutocompleteFilter=qa;exports.useClickOutside=ys;exports.useClipboard=ws;exports.useComboboxFilter=Hn;exports.useDebouncedCallback=Ns;exports.useDebouncedValue=Cs;exports.useDisclosure=Ss;exports.useDocumentTitle=Ps;exports.useEventListener=No;exports.useFieldName=yn;exports.useFocusTrap=As;exports.useHookForm=Ka;exports.useHotkey=Ms;exports.useHover=Vs;exports.useIsInsideFieldRoot=et;exports.useIsVisible=Os;exports.useLocalStorage=Gs;exports.useMediaQuery=Bs;exports.useMemoizedFn=Hs;exports.useMutation=qs;exports.useObject=$s;exports.usePagination=To;exports.usePortal=Xs;exports.usePreventCloseWindow=Ks;exports.useRangePagination=ko;exports.useSelection=Us;exports.useStep=Ws;exports.useStepItem=ne;exports.useStepper=ee;exports.useTheme=Na;exports.useThemeProps=Mi;exports.useToastManager=xa;exports.useToggle=zo;
|