PageSourceSearch

https://docs-pndx.onrender.com/_next/static/chunks/2n54p5oh0h997.js

js docs-pndx.onrender.com collected 2026-10-03 11:40:25 UTC 405,771 bytes, 53 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,144324,e=>{"use strict";e.i(816374);var t=e.i(128769),n=e.i(713548),r=e.i(737877),o=e.i(14804),i=e.i(825153),l=e.i(843476),s=e.i(709428);let a=(0,e.i(155034).default)("clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]);var u=e.i(271645),c=e.i(532257);let d=(0,u.createContext)(null);function f({className:e,containerRef:o,...i}){let u=(0,c.useTranslations)({note:"code block"}),[d,p]=(0,r.useCopyButton)(()=>{let e=o.current?.getElementsByTagName("pre").item(0);if(!e)return;let t=e.cloneNode(!0);t.querySelectorAll(".nd-copy-ignore").forEach(e=>{e.replaceWith("\n")}),navigator.clipboard.writeText(t.textContent??"")});return(0,l.jsx)("button",{type:"button","data-checked":d||void 0,className:(0,t.cn)((0,n.buttonVariants)({className:"hover:text-fd-accent-foreground data-checked:text-fd-accent-foreground",size:"icon-xs"}),e),"aria-label":u(d?"Copied Text":"Copy Text",{note:"aria-label"}),onClick:p,...i,children:d?(0,l.jsx)(s.Check,{}):(0,l.jsx)(a,{})})}e.s(["CodeBlock",0,function({ref:e,title:n,allowCopy:r=!0,keepBackground:o=!1,icon:i,viewportProps:s={},children:a,Actions:c=e=>(0,l.jsx)("div",{...e,className:(0,t.cn)("empty:hidden",e.className)}),...p}){let h=null!==(0,u.use)(d),m=(0,u.useRef)(null);return"true"===r?r=!0:"false"===r&&(r=!1),(0,l.jsxs)("figure",{ref:e,dir:"ltr",...p,tabIndex:-1,className:(0,t.cn)(h?"bg-fd-secondary -mx-px -mb-px last:rounded-b-xl":"my-4 bg-fd-card rounded-xl",o&&"bg-(--shiki-light-bg) dark:bg-(--shiki-dark-bg)","shiki relative border shadow-sm not-prose overflow-hidden text-sm",p.className),children:[n?(0,l.jsxs)("div",{className:"flex text-fd-muted-foreground items-center gap-2 h-9.5 border-b px-4",children:["string"==typeof i?(0,l.jsx)("div",{className:"[&_svg]:size-3.5",dangerouslySetInnerHTML:{__html:i}}):i,(0,l.jsx)("figcaption",{className:"flex-1 truncate",children:n}),c({className:"-me-2",children:r&&(0,l.jsx)(f,{containerRef:m})})]}):c({className:"absolute top-3 right-2 z-2 backdrop-blur-lg rounded-lg text-fd-muted-foreground",children:r&&(0,l.jsx)(f,{containerRef:m})}),(0,l.jsx)("div",{ref:m,...s,role:"region",tabIndex:0,className:(0,t.cn)("text-[0.8125rem] py-3.5 overflow-auto max-h-[600px] fd-scroll-container focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-fd-ring",s.className),style:{"--padding-right":n?void 0:"calc(var(--spacing) * 8)",counterSet:p["data-line-numbers"]?`line ${Number(p["data-line-numbers-start"]??1)-1}`:void 0,...s.style},children:a})]})},"CodeBlockTab",0,function(e){return(0,l.jsx)(i.TabsContent,{...e})},"CodeBlockTabs",0,function({ref:e,...n}){let r=(0,u.useRef)(null),s=null!==(0,u.use)(d);return(0,l.jsx)(i.Tabs,{ref:(0,o.mergeRefs)(r,e),...n,className:(0,t.cn)("bg-fd-card rounded-xl border",!s&&"my-4",n.className),children:(0,l.jsx)(d,{value:(0,u.useMemo)(()=>({containerRef:r,nested:s}),[s]),children:n.children})})},"CodeBlockTabsList",0,function(e){return(0,l.jsx)(i.TabsList,{...e,className:(0,t.cn)("flex flex-row px-2 overflow-x-auto text-fd-muted-foreground",e.className),children:e.children})},"CodeBlockTabsTrigger",0,function({children:e,...n}){return(0,l.jsxs)(i.TabsTrigger,{...n,className:(0,t.cn)("relative group inline-flex text-sm font-medium text-nowrap items-center transition-colors gap-2 px-2 py-1.5 hover:text-fd-accent-foreground data-[state=active]:text-fd-primary [&_svg]:size-3.5",n.className),children:[(0,l.jsx)("div",{className:"absolute inset-x-2 bottom-0 h-px group-data-[state=active]:bg-fd-primary"}),e]})},"Pre",0,function(e){return(0,l.jsx)("pre",{...e,className:(0,t.cn)("min-w-full w-max *:flex *:flex-col",e.className),children:e.children})}],144324)},494157,e=>{"use strict";e.i(816374);var t=e.i(128769),n=e.i(713548),r=e.i(737877),o=e.i(843476),i=e.i(155034);let l=(0,i.default)("copy-check",[["path",{d:"m12 15 2 2 4-4",key:"2c609p"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),s=(0,i.default)("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);var a=e.i(532257);e.s(["Heading",0,function({as:e,...i}){let u=e??"h1",c=(0,a.useTranslations)({note:"heading anchor"}),[d,f]=(0,r.useCopyButton)(()=>
1{if(!i.id)return;let e=new URL(window.location.href);return e.hash=i.id,navigator.clipboard.writeText(e.href)});return i.id?(0,o.jsxs)(u,{...i,className:(0,t.cn)("group/heading flex scroll-m-28 flex-row items-center gap-1",i.className),children:[(0,o.jsx)("a",{"data-card":"",href:`#${i.id}`,children:i.children}),(0,o.jsx)("button",{"aria-label":c("Copy Anchor Link",{note:"aria-label"}),className:(0,t.cn)((0,n.buttonVariants)({variant:"ghost",size:"icon-xs"}),"not-prose shrink-0 text-fd-muted-foreground opacity-0 transition-opacity group-hover/heading:opacity-100"),onClick:f,children:d?(0,o.jsx)(l,{}):(0,o.jsx)(s,{})})]}):(0,o.jsx)(u,{...i})}],494157)},487717,e=>{"use strict";let t=(e,t)=>!("u"<typeof Element)&&t instanceof Element&&t.tagName.toUpperCase()===e,n=e=>t("DIV",e)||t("SPAN",e),r=e=>e.complete&&0!==e.naturalHeight,o=/url(?:\(['"]?)(?<url>.*?)(?:['"]?\))/,i=e=>{if(null!==e){if(t("IMG",e))return""===e.currentSrc?void 0:e.currentSrc;else if(n(e)){let{backgroundImage:t}=window.getComputedStyle(e);if(""!==t)return o.exec(t)?.[1]}}},l=e=>{if(null==e)return{};if(!t("SVG",e))return{height:e.offsetHeight,left:e.offsetLeft,width:e.offsetWidth,top:e.offsetTop};{let{parentElement:t}=e,n=e.getBoundingClientRect();if(null==t)return{height:n.height,left:n.left,width:n.width,top:n.top};{let e=t.getBoundingClientRect();return{height:n.height,left:e.left-n.left,top:e.top-n.top,width:n.width}}}},s=({height:e,offset:t,width:n})=>Math.min((window.innerWidth-2*t)/n,(window.innerHeight-2*t)/e),a=({containerHeight:e,containerWidth:t,hasScalableSrc:n,offset:r,targetHeight:o,targetWidth:i})=>0===e||0===t?1:n||0===o||0===i?s({height:e,offset:r,width:t}):(({containerHeight:e,containerWidth:t,offset:n,targetHeight:r,targetWidth:o})=>{let i=s({height:r,offset:n,width:o}),l=o>r?o/t:r/e;return i>1?l:i*l})({containerHeight:e,containerWidth:t,offset:r,targetHeight:o,targetWidth:i}),u=(e,t)=>{let n=parseFloat(e);return e.endsWith("%")?t*n/100:n},c=({containerHeight:e,containerLeft:t,containerTop:n,containerWidth:r,hasScalableSrc:o,offset:i,position:l,targetHeight:s,targetWidth:c,visibleHeight:d,visibleWidth:f})=>{let[p="50%",h="50%"]=l.split(" "),m=u(p,r-f),g=u(h,e-d),x=a({containerHeight:d,containerWidth:f,hasScalableSrc:o,offset:i,targetHeight:s,targetWidth:c});return{top:n+g,left:t+m,width:f*x,height:d*x,initialTransform:`translate(0,0) scale(${1/x})`}},d=({fallback:e,natural:t})=>void 0!==t&&0!==t?t:e,f=/\.svg$/i;var p=e.i(271645),h=e.i(174080);let m=["img","svg",'[role="img"]',"[data-zoom]"].map(e=>`${e}:not([aria-hidden="true"])`).join(","),g={overflow:"",width:""};function x(e){e.preventDefault()}function v(e){return p.default.createElement(y,{...e})}var y=class extends p.default.Component{constructor(){super(...arguments),this.state={id:"",isZoomImgLoaded:!1,loadedImgEl:void 0,modalState:"UNLOADED",shouldRefresh:!1,styleGhost:{}},this.refContent=p.default.createRef(),this.refDialog=p.default.createRef(),this.refModalContent=p.default.createRef(),this.refModalImg=p.default.createRef(),this.refWrap=p.default.createRef(),this.imgEl=null,this.isScaling=!1,this.prevBodyAttrs=g,this.styleModalImg={},this.handleModalStateChange=e=>{let{state:{modalState:t}}=this;"LOADING"!==e&&"LOADING"===t?(this.isScaling=!1,this.loadZoomImg(),window.addEventListener("resize",this.handleResize,{passive:!0}),window.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),window.addEventListener("touchmove",this.handleTouchMove,{passive:!0}),window.addEventListener("touchend",this.handleTouchEnd,{passive:!0}),window.addEventListener("touchcancel",this.handleTouchCancel,{passive:!0}),document.addEventListener("keydown",this.handleKeyDown,!0)):"LOADED"!==e&&"LOADED"===t?window.addEventListener("wheel",this.handleWheel,{passive:!0}):"UNLOADING"!==e&&"UNLOADING"===t?(this.ensureImgTransitionEnd(),window.removeEventListener("wheel",this.handleWheel),window.removeEventListener("touchstart",this.handleTouchStart),window.removeEventListener("touchmove",this.handleTouchMove),window.removeEventListener("touchend",this.handleTouchEnd),window.removeEventListener("touchcancel",this.handleTouchCancel),document.removeEventListener("keydown",this.handleKeyDown,!0)):"UNLOADED"!==e&&"UNLOADED"===t&&(this.bodyScrollEnable(),window.removeEventListener("resize",this.handleResize),this.refDialog.current?.close())},this.setId=()=>{let e=()=>Math.random().toString(16).slice(-4);this.setState({id:e()+e()+e()})},this.setAndTrackImg=()=>{let{refContent:{current:e}}=this;null!=e&&(this.imgEl=e.querySelector(m),null!==this.imgEl?(this.contentNotFoundChangeObserver?.disconnect(),this.img
1El.addEventListener("load",this.handleImgLoad),this.imgEl.addEventListener("click",this.handleZoom),null==this.state.loadedImgEl&&this.handleImgLoad(),this.imgElResizeObserver=new ResizeObserver(e=>{let[t]=e;t?.target!==void 0&&(this.imgEl=t.target,this.setState({styleGhost:l(this.imgEl)}))}),this.imgElResizeObserver.observe(this.imgEl),null==this.contentChangeObserver&&(this.contentChangeObserver=new MutationObserver(()=>{this.setState({styleGhost:l(this.imgEl)})}),this.contentChangeObserver.observe(e,{attributes:!0,childList:!0,subtree:!0}))):null==this.contentNotFoundChangeObserver&&(this.contentNotFoundChangeObserver=new MutationObserver(this.setAndTrackImg),this.contentNotFoundChangeObserver.observe(e,{childList:!0,subtree:!0})))},this.handleIfZoomChanged=e=>{let{props:{isZoomed:t}}=this;!e&&t?this.zoom():e&&!t&&this.unzoom()},this.handleImgLoad=()=>{let e=i(this.imgEl);if(null==e||""===e)return;let n=new Image,{imgEl:o}=this;if(t("IMG",o)){let{sizes:e,srcset:t,crossOrigin:r}=o;n.sizes=e,n.srcset=t,n.crossOrigin=r}n.src=e;let s=()=>{this.setState({loadedImgEl:n,styleGhost:l(this.imgEl)})};n.decode().then(s).catch(()=>{r(n)?s():n.onload=s})},this.handleZoom=e=>{!0!==this.props.isDisabled&&this.hasImage()&&this.props.onZoomChange?.(!0,{event:e})},this.handleUnzoom=e=>{!0!==this.props.isDisabled&&this.props.onZoomChange?.(!1,{event:e})},this.handleBtnUnzoomClick=e=>{e.preventDefault(),e.stopPropagation(),this.handleUnzoom(e)},this.handleDialogClick=e=>{(e.target===this.refModalContent.current||e.target===this.refModalImg.current)&&(e.stopPropagation(),this.handleUnzoom(e))},this.handleDialogClose=e=>{e.stopPropagation(),this.handleUnzoom(e)},this.handleKeyDown=e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),this.handleUnzoom(e))},this.handleWheel=e=>{e.ctrlKey||this.isScaling||(window.visualViewport?.scale??1)>1||(e.stopPropagation(),queueMicrotask(()=>{this.handleUnzoom(e)}))},this.handleTouchStart=e=>{if(e.touches.length>1){this.isScaling=!0;return}let{changedTouches:t}=e,[n]=t;if(1===t.length&&void 0!==n){let{screenY:e}=n;this.touchYStart=e}},this.handleTouchMove=e=>{let t=window.visualViewport?.scale??1,{changedTouches:n}=e,[r]=n;if(this.props.canSwipeToUnzoom&&!this.isScaling&&t<=1&&null!=this.touchYStart&&void 0!==r){let{screenY:t}=r;this.touchYEnd=t,Math.abs(Math.max(this.touchYStart,this.touchYEnd)-Math.min(this.touchYStart,this.touchYEnd))>this.props.swipeToUnzoomThreshold&&(this.touchYStart=void 0,this.touchYEnd=void 0,this.handleUnzoom(e))}},this.handleTouchEnd=()=>{this.touchYStart=void 0,this.touchYEnd=void 0},this.handleTouchCancel=()=>{this.touchYStart=void 0,this.touchYEnd=void 0},this.handleResize=()=>{this.setState({shouldRefresh:!0})},this.hasImage=()=>null!==this.imgEl&&(void 0!==this.state.loadedImgEl||t("SVG",this.imgEl))&&"none"!==window.getComputedStyle(this.imgEl).display,this.zoom=()=>{this.bodyScrollDisable(),this.refDialog.current?.showModal(),this.setState({modalState:"LOADING"})},this.unzoom=()=>{this.setState({modalState:"UNLOADING"})},this.handleImgTransitionEnd=()=>{clearTimeout(this.timeoutTransitionEnd),"LOADING"===this.state.modalState?this.setState({modalState:"LOADED"}):"UNLOADING"===this.state.modalState&&this.setState({shouldRefresh:!1,modalState:"UNLOADED"})},this.ensureImgTransitionEnd=()=>
1{if(null!==this.refModalImg.current){let{transitionDuration:e}=window.getComputedStyle(this.refModalImg.current),t=parseFloat(e);if(0!==t&&!Number.isNaN(t)){let n=t*(e.endsWith("ms")?1:1e3)+50;this.timeoutTransitionEnd=setTimeout(this.handleImgTransitionEnd,n)}}},this.bodyScrollDisable=()=>{let e=document.body.style;this.prevBodyAttrs={overflow:e.overflow,width:e.width};let t=document.body.clientWidth;e.overflow="hidden",e.width=`${t}px`},this.bodyScrollEnable=()=>{let e=document.body.style,t=this.prevBodyAttrs;e.width=t.width,e.overflow=t.overflow,this.prevBodyAttrs=g},this.loadZoomImg=()=>{let{props:{zoomImg:e}}=this;if(null==e)return;let{src:t}=e;if(void 0!==t&&""!==t){let n=new Image;n.sizes=e.sizes??"",n.srcset=e.srcSet??"",n.crossOrigin=e.crossOrigin??void 0,n.src=t;let o=()=>{this.setState({isZoomImgLoaded:!0})};n.decode().then(o).catch(()=>{r(n)?o():n.onload=o})}},this.UNSAFE_handleSvg=()=>{let{imgEl:e,refModalImg:n,styleModalImg:r}=this;if(t("SVG",e)){let t=e.cloneNode(!0);(e=>{let t="-zoom",n=["clip-path","fill","mask","marker-start","marker-mid","marker-end"],r=new Map;if(e.hasAttribute("id")){let{id:n}=e,o=n+t;r.set(n,o),e.id=o}e.querySelectorAll("[id]").forEach(e=>{let{id:n}=e,o=n+t;r.set(n,o),e.id=o});let o=n.map(e=>`[${e}]`).join(", ");e.querySelectorAll(o).forEach(e=>{for(let t of n){let n=e.getAttribute(t);if(n?.startsWith("url(#")===!0){let o=n.slice(5,-1),i=r.get(o);void 0!==i&&e.setAttribute(t,`url(#${i})`)}}}),e.querySelectorAll("style").forEach(e=>{let{textContent:t}=e;if(""!==t){let n=t;r.forEach((e,t)=>{n=n.replaceAll(`#${t}`,`#${e}`)}),n!==t&&(e.textContent=n)}})})(t),t.style.width=`${r.width??0}px`,t.style.height=`${r.height??0}px`,t.addEventListener("click",this.handleUnzoom),n.current?.firstChild?.remove(),n.current?.appendChild(t)}}}render(){let{handleBtnUnzoomClick:e,handleDialogClick:r,handleDialogClose:o,handleUnzoom:l,handleZoom:s,imgEl:m,props:{a11yNameButtonUnzoom:g,a11yNameButtonZoom:v,children:y,classDialog:b,IconUnzoom:w,IconZoom:j,wrapElement:k,ZoomContent:C,zoomImg:S,zoomMargin:E},refContent:O,refDialog:N,refModalContent:T,refModalImg:A,refWrap:M,state:{id:R,isZoomImgLoaded:I,loadedImgEl:$,modalState:P,shouldRefresh:L,styleGhost:D}}=this,z=`rmiz-modal-${R}`,F=`rmiz-modal-img-${R}`,U=n(m),H=t("IMG",m),_=t("SVG",m),B=(e=>{if(null!==e)if(t("IMG",e))return e.alt;else return e.getAttribute("aria-label")??void 0})(m),V=i(m),W=H?m.sizes:void 0,q=H?m.srcset:void 0,G=H?m.crossOrigin:void 0,K=S?.src!==void 0&&""!==S.src,Y=this.hasImage(),Z=void 0!==B&&""!==B?`${v}: ${B}`:v,J="LOADING"===P||"LOADED"===P,X=Y?"found":"not-found",Q="UNLOADED"===P||"UNLOADING"===P?"hidden":"visible";this.styleModalImg=Y&&null!==m?(({hasZoomImg:e,imgSrc:t,isSvg:r,isZoomed:o,loadedImgEl:i,offset:l,shouldRefresh:s,targetEl:p})=>{let h=(({hasZoomImg:e,imgSrc:t,isSvg:n})=>n||t?.slice(0,18)==="data:image/svg+xml"||e||void 0!==t&&f.test(t))({hasZoomImg:e,imgSrc:t,isSvg:r}),m=p.getBoundingClientRect(),g=window.getComputedStyle(p),x=null!=i&&n(p),v=null!=i&&!x,y=d({fallback:m.height,natural:i?.naturalHeight}),b=d({fallback:m.width,natural:i?.naturalWidth}),{height:w,left:j,top:k,width:C}=m,S=x?(({backgroundPosition:e,backgroundSize:t,containerHeight:n,containerLeft:r,containerTop:o,containerWidth:i,hasScalableSrc:l,offset:s,targetHeight:a,targetWidth:d})=>{let f={containerHeight:n,containerLeft:r,containerTop:o,containerWidth:i,hasScalableSrc:l,offset:s,position:e,targetHeight:a,targetWidth:d};if("cover"===t||"contain"===t){let e=i/d,r=n/a,o="cover"===t?Math.max(e,r):Math.min(e,r);return c({...f,visibleWidth:d*o,visibleHeight:a*o})}{if("auto"===t)return c({...f,visibleWidth:d,visibleHeight:a});let[e="50%",r="50%"]=t.split(" "),o=Math.min(u(e,i)/d,u(r,n)/a);return c({...f,visibleWidth:d*o,visibleHeight:a*o})}})({backgroundPosition:g.backgroundPosition,backgroundSize:g.backgroundSize,containerHeight:w,containerLeft:j,containerTop:k,containerWidth:C,hasScalableSrc:h,offset:l,targetHeight:y,targetWidth:b}):v?(({containerHeight:e,containerLeft:t,containerTop:n,containerWidth:r,hasScalableSrc:o,objectFit:i,objectPosition:l,offset:s,targetHeight:u,targetWidth:d})=>{let f=i;"scale-down"===f&&(f=d<=r&&u<=e?"none":"contain");let p={containerHeight:e,containerLeft:t,containerTop:n,containerWidth:r,hasScalableSrc:o,offset:s,position:l,targetHeight:u,targetWidth:d};if("cover"===f||"contain"===f){let t=r/d,n=e/u,o="cover"===f?Math.max(t,n):Math.min(t,n);return c({...p,visibleWidth:d*o,visibleHeight:u*o})}{if("none"===f)return c({...p,visibleWidth:d,visibleHeight:u});let i=Math.max(r/d,e/u),l=a({containerHeight:u*i,containerWidth:d*i,hasScalableSrc:o,offset:s,targetHeight:u,targetWidth:d});return{top:n,left:t,width:r*l,height:e*l,initialTransform:`translate(0,0) scale(${1/l})`}}})({containerHeight:w,containerLeft:j,containerTop:k,containerWidth:C,hasScalableSrc:h,objectFit:g.objectFit,objectPosition:g.objectPosition,offset:l,targetHeight:y,targetWidth:b}):(({containerHeight:e,containerLeft:t,containerTop:n,containerWidth:r,hasScalableSrc:o,offset:i,targetHeight:l,targetWidth:s})=>{let u=a({containerHeight:e,containerWidth:r,hasScalableSrc:o,offset:i,targetHeight:l,targetWidth:s});return{top:n,left:t,width:r*u,height:e*u,initialTransform:`translate(0,0) scale(${1/u})`}})({containerHeight:w,containerLeft:j,containerTop:k,containerWidth:C,hasScalableSrc:h,offset:l,targetHeight:y,targetWidth:b}
1),E={top:S.top,left:S.left,width:S.width,height:S.height,transform:(({height:e,initialTransform:t,isZoomed:n,left:r,top:o,userTransform:i,width:l})=>{let s="";if("none"!==i&&""!==i){let t=l/2,n=e/2;s=`translate(${t}px,${n}px) ${i} translate(${-t}px,${-n}px)`}if(!n)return""===s?t:`${t} ${s}`;let a=window.innerWidth/2,u=window.innerHeight/2,c=`translate(${a-(r+l/2)}px,${u-(o+e/2)}px) scale(1)`;return""===s?c:`${c} ${s}`})({...S,isZoomed:o,userTransform:g.transform})};return o&&s&&(E.transitionDuration="0.01ms"),E})({hasZoomImg:K,imgSrc:V,isSvg:_,isZoomed:J,loadedImgEl:$,offset:E,shouldRefresh:L,targetEl:m}):{};let ee=null;if(Y){let t=H||U?p.default.createElement("img",{alt:B,crossOrigin:G,sizes:W,src:V,srcSet:q,...I&&"LOADED"===P?S:{},"data-rmiz-modal-img":"",height:this.styleModalImg.height??void 0,id:F,onTransitionEnd:this.handleImgTransitionEnd,ref:A,style:this.styleModalImg,width:this.styleModalImg.width??void 0}):_?p.default.createElement("div",{"data-rmiz-modal-img":!0,onTransitionEnd:this.handleImgTransitionEnd,ref:A,style:this.styleModalImg}):null,n=p.default.createElement("button",{"aria-label":g,"data-rmiz-btn-unzoom":"",onClick:e,type:"button"},p.default.createElement(w,null));ee=null==C?p.default.createElement(p.default.Fragment,null,t,n):p.default.createElement(C,{buttonUnzoom:n,modalState:P,img:t,isZoomImgLoaded:I,onUnzoom:l})}return p.default.createElement(k,{"data-rmiz":"",ref:M},p.default.createElement(k,{"data-rmiz-content":X,ref:O,style:{visibility:"UNLOADED"===P?"visible":"hidden"}},y),Y&&p.default.createElement(k,{"data-rmiz-ghost":"",style:D},p.default.createElement("button",{"aria-label":Z,"data-rmiz-btn-zoom":"",onClick:s,type:"button"},p.default.createElement(j,null))),Y&&h.default.createPortal(p.default.createElement("dialog",{"aria-labelledby":F,"aria-modal":"true",className:b,"data-rmiz-modal":"",id:z,onClick:r,onClose:o,onCancel:x,ref:N,role:"dialog"},p.default.createElement("div",{"data-rmiz-modal-overlay":Q}),p.default.createElement("div",{"data-rmiz-modal-content":"",ref:T},ee)),function(){let e=document.querySelector("[data-rmiz-portal]");if(null!=e)return e;let t=document.createElement("div");return t.setAttribute("data-rmiz-portal",""),document.body.appendChild(t),t}()))}componentDidMount(){this.setId(),this.setAndTrackImg(),this.handleImgLoad(),this.UNSAFE_handleSvg()}componentWillUnmount(){"UNLOADED"!==this.state.modalState&&this.bodyScrollEnable(),this.contentChangeObserver?.disconnect(),this.contentNotFoundChangeObserver?.disconnect(),this.imgElResizeObserver?.disconnect(),this.imgEl?.removeEventListener("load",this.handleImgLoad),this.imgEl?.removeEventListener("click",this.handleZoom),clearTimeout(this.timeoutTransitionEnd),window.removeEventListener("wheel",this.handleWheel),window.removeEventListener("touchstart",this.handleTouchStart),window.removeEventListener("touchmove",this.handleTouchMove),window.removeEventListener("touchend",this.handleTouchEnd),window.removeEventListener("touchcancel",this.handleTouchCancel),window.removeEventListener("resize",this.handleResize),document.removeEventListener("keydown",this.handleKeyDown,!0)}componentDidUpdate(e,t){this.handleModalStateChange(t.modalState),this.UNSAFE_handleSvg(),this.handleIfZoomChanged(e.isZoomed)}};function b({onZoomChange:e,...t}){let[n,r]=p.default.useState(!1),o=p.default.useCallback((t,{event:n})=>{r(t),e?.(t,{event:n})},[e]);return p.default.createElement(v,{...t,isZoomed:n,onZoomChange:o})}y.defaultProps={a11yNameButtonUnzoom:"Minimize image",a11yNameButtonZoom:"Expand image",canSwipeToUnzoom:!0,IconUnzoom:function(){return p.default.createElement("svg",{"aria-hidden":"true","data-rmiz-btn-unzoom-icon":!0,fill:"currentColor",focusable:"false",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},p.default.createElement("path",{d:"M 14.144531 1.148438 L 9 6.292969 L 9 3 L 8 3 L 8 8 L 13 8 L 13 7 L 9.707031 7 L 14.855469 1.851563 Z M 8 8 L 3 8 L 3 9 L 6.292969 9 L 1.148438 14.144531 L 1.851563 14.855469 L 7 9.707031 L 7 13 L 8 13 Z"}))},IconZoom:function(){return p.default.createElement("svg",{"aria-hidden":"true","data-rmiz-btn-zoom-icon":!0,fill:"currentColor",focusable:"false",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},p.default.createElement("path",{d:"M 9 1 L 9 2 L 12.292969 2 L 2 12.292969 L 2 9 L 1 9 L 1 14 L 6 14 L 6 13 L 2.707031 13 L 13 2.707031 L 13 6 L 14 6 L 14 1 Z"}))},isDisabled:!1,swipeToUnzoomThreshold:10,wrapElement:"div",zoomMargin:0};var w=e.i(224110),j=e.i(843476);e.s(["ImageZoom",0,function({zoomInProps:e,children:t,rmiz:n,...r}){var o;return(0,j.jsx)(b,{zoomMargin:20,wrapElement:"span",...n,zoomImg:{src:"string"==typeof(o=r.src)?o:"object"==typeof o?"default"in o?o.default.src:o.src:"",sizes:void 0,...e},children:t??(0,j.jsx)(w.Image,{sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 70vw, 900px",...r})})}],487717)},213758,e=>{"use strict";e.i(816374);var t=e.i(128769),n=e.i(825153),r=e.i(843476),o=e.i(271645);let i=(0,o.createContext)(null);function l(){let e=(0,o.useContext)(i);if(!e)throw Error("You must wrap your component in <Tabs>");return e}function s(e){return(0,r.jsx)(n.TabsList,{...e,className:(0,t.cn)("flex gap-3.5 text-fd-secondary-foreground overflow-x-auto px-4 not-prose",e.className)})}function a(e){return(0,r.jsx)(n.TabsTrigger,{...e,className:(0,t.cn)("inline-flex items-center gap-2 whitespace-nowrap text-fd-muted-foreground border-b border-transparent py-2 text-sm font-medium transition-colors [&_svg]:size-4 hover:text-fd-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-fd-primary data-[state=active]:text-fd-primary",e.className)})}function u({value:e,className:o,...i}){return(0,r.jsx)(n.TabsContent,{value:e,forceMount:!0,className:(0,t.cn)("p-4 text-[0.9375rem] bg-fd-background rounded-xl outline-none prose-no-margin data-[state=inactive]:hidden [&>figure:only-child]:-m-4 [&>figure:only-child]:border-none",o),...i,children:i.children})}function c(e){return e.toLowerCase().replace(/\s/,"-")}e.s(["Tab",0,function({value:e,...t}){let{items:n}=l(),i=e??n?.at(function(){let e=(0,o.useId)(),{collection:t}=l();return(0,o.useEffect)(()=>()=>{let n=t.indexOf(e);-1!==n&&t.splice(n,1)},[e,t]),t.includes(e)||t.push(e),t.indexOf(e)}());if(!i)throw Error("Failed to resolve tab `value`, please pass a `value` prop to the Tab component.");return(0,r.jsx)(u,{value:c(i),...t,children:t.children})},"Tabs",0,function({ref:e,className:l,items:u,label:d,defaultIndex:f=0,defaultValue:p=u?c(u[f]):void 0,...h}){let[m,g]=(0,o.useState)(p),x=(0,o.useMemo)(()=>[],[]);return(0,r.jsxs)(n.Tabs,{ref:e,className:(0,t.cn)("flex flex-col overflow-hidden rounded-xl border bg-fd-secondary my-4",l),value:m,onValueChange:e=>{(!u||u.some(t=>c(t)===e))&&g(e)},...h,children:[u&&(0,r.jsxs)(s,{children:[d&&(0,r.jsx)("span",{className:"text-sm font-medium my-auto me-auto",children:d}),u.map(e=>(0,r.jsx)(a,{value:c(e),children:e},e))]}),(0,r.jsx)(i.Provider,{value:(0,o.useMemo)(()=>({items:u,collection:x}),[x,u]),children:h.children})]})},"TabsContent",0,u,"TabsList",0,s,"TabsTrigger",0,a])},957954,e=>{"use strict";e.i(816374);var t=e.i(128769),n=e.i(451988),r=e.i(647873),o=e.i(843476),i=e.i(246872),l=e.i(225913),s=e.i(271645),a=e.i(532257);let u=(0,l.cva)("text-fd-muted-foreground not-prose pe-2");function c({parentId:e,name:l,item:{parameters:d=[],description:f,required:p=!1,deprecated:h,typeDescription:m,default:g,type:x,typeDescriptionLink:v,returns:y}}){let b=(0,a.useTranslations)({note:"type table"}
1),[w,j]=(0,s.useState)(!1),k=e?`${e}-${l}`:void 0;return(0,s.useEffect)(()=>{let e=window.location.hash;k&&e&&`#${k}`===e&&j(!0)},[k]),(0,o.jsxs)(n.Collapsible,{id:k,open:w,onOpenChange:e=>{e&&k&&window.history.replaceState(null,"",`#${k}`),j(e)},className:(0,t.cn)("rounded-xl border overflow-hidden scroll-m-20 transition-all",w?"shadow-sm bg-fd-background not-last:mb-2":"border-transparent"),children:[(0,o.jsxs)(n.CollapsibleTrigger,{className:"relative flex flex-row items-center w-full group text-start px-3 py-2 not-prose hover:bg-fd-accent",children:[(0,o.jsxs)("code",{className:(0,t.cn)("text-fd-primary min-w-fit w-1/4 font-mono font-medium pe-2",h&&"line-through text-fd-primary/50"),children:[l,!p&&"?"]}),v?(0,o.jsx)(r.default,{href:v,className:"underline @max-xl:hidden",children:x}):(0,o.jsx)("span",{className:"@max-xl:hidden",children:x}),(0,o.jsx)(i.ChevronDown,{className:"absolute end-2 size-4 text-fd-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),(0,o.jsx)(n.CollapsibleContent,{children:(0,o.jsxs)("div",{className:"grid grid-cols-[1fr_3fr] gap-y-4 text-sm p-3 overflow-auto fd-scroll-container border-t",children:[(0,o.jsx)("div",{className:"text-sm prose col-span-full prose-no-margin empty:hidden",children:f}),m&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:(0,t.cn)(u()),children:b("Type")}),(0,o.jsx)("p",{className:"my-auto not-prose",children:m})]}),g&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:(0,t.cn)(u()),children:b("Default")}),(0,o.jsx)("p",{className:"my-auto not-prose",children:g})]}),d.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:(0,t.cn)(u()),children:b("Parameters")}),(0,o.jsx)("div",{className:"flex flex-col gap-2",children:d.map(e=>(0,o.jsxs)("div",{className:"inline-flex items-center flex-wrap gap-1",children:[(0,o.jsxs)("p",{className:"font-medium not-prose text-nowrap",children:[e.name," -"]}),(0,o.jsx)("div",{className:"text-sm prose prose-no-margin",children:e.description})]},e.name))})]}),y&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:(0,t.cn)(u()),children:b("Returns")}),(0,o.jsx)("div",{className:"my-auto text-sm prose prose-no-margin",children:y})]})]})})]})}e.s(["TypeTable",0,function({id:e,type:n,className:r,...i}){let l=(0,a.useTranslations)({note:"type table"});return(0,o.jsxs)("div",{id:e,className:(0,t.cn)("@container flex flex-col p-1 bg-fd-card text-fd-card-foreground rounded-2xl border my-6 text-sm overflow-hidden",r),...i,children:[(0,o.jsxs)("div",{className:"flex font-medium items-center px-3 py-1 not-prose text-fd-muted-foreground",children:[(0,o.jsx)("p",{className:"w-1/4",children:l("Prop")}),(0,o.jsx)("p",{className:"@max-xl:hidden",children:l("Type")})]}),Object.entries(n).map(([t,n])=>(0,o.jsx)(c,{parentId:e,name:t,item:n},t))]})}])},825153,e=>{"use strict";var t=e.i(14804),n=e.i(843476),r=e.i(271645),o=e.i(981140),i=e.i(30030),l=e.i(820783),s=e.i(991918);var a=e.i(610772),u=e.i(248425),c=e.i(30207),d=e.i(369340),f=e.i(586318),p=e.i(934620),h=!1,m=r[" useSyncExternalStore ".trim().toString()];function g(){return()=>{}}var x="function"==typeof m?function(){return m(g,()=>!0,()=>!1)}:function(){let[e,t]=r.useState(h);return r.useEffect(()=>{h||(h=!0,t(!0))},[]),e},v=Object.defineProperty,y=(e,t)=>v(e,"name",{value:t,configurable:!0}),b="rovingFocusGroup.onEntryFocus",w={bubbles:!1,cancelable:!0},j="RovingFocusGroup",[k,C,S]=function(e){let t=e+"CollectionProvider",[o,a]=(0,i.createContextScope)(t),[u,c]=o(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:o}=e,i=r.useRef(null),l=r.useRef(new Map).current;return(0,n.jsx)(u,{scope:t,itemMap:l,collectionRef:i,children:o})};d.displayName=t;let f=e+"CollectionSlot",p=(0,s.createSlot)(f),h=r.forwardRef((e,t)=>{let{scope:r,children:o}=e,i=c(f,r),s=(0,l.useComposedRefs)(t,i.collectionRef);return(0,n.jsx)(p,{ref:s,children:o})});h.displayName=f;let m=e+"CollectionItemSlot",g="data-radix-collection-item",x=(0,s.createSlot)(m),v=r.forwardRef((e,t)=>{let{scope:o,children:i,...s}=e,a=r.useRef(null),u=(0,l.useComposedRefs)(t,a),d=c(m,o);return r.useEffect(()=>(d.itemMap.set(a,{ref:a,...s}),()=>void d.itemMap.delete(a))),(0,n.jsx)(x,{...{[g]:""},ref:u,children:i})});return v.displayName=m,[{Provider:d,Slot:h,ItemSlot:v},function(t){let n=c(e+"CollectionConsumer",t);return r.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},a]}(j),[E,O]=(0,i.createContextScope)(j,[S]),[N,T]=E(j),A=r.forwardRef(y(function(e,t){return(0,n.jsx)(k.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,n.jsx)(k.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,n.jsx)(M,{...e,ref:t})})})},"RovingFocusGroup")),M=r.forwardRef(y(function(e,t){let{__scopeRovingFocusGroup:i,orientation:s,loop:a=!1,dir:p,currentTabStopId:h,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:g,onEntryFocus:x,preventScrollOnEntryFocus:v=!1,...y}=e,k=r.useRef(null),S=(0,l.useComposedRefs)(t,k),E=(0,f.useDirection)(p),[O,T]=(0,d.useControllableState)({prop:h,defaultProp:m??null,onChange:g,caller:j}),[A,M]=r.useState(!1),R=(0,c.useCallbackRef)(x),I=C(i),$=r.useRef(!1),[P,D]=r.useState(0);return r.useEffect(()=>{let e=k.current;if(e)return e.addEventListener(b,R),()=>e.removeEventListener(b,R)},[R]),(0,n.jsx)(N,{scope:i,orientation:s,dir:E,loop:a,currentTabStopId:O,onItemFocus:r.useCallback(e=>T(e),[T]),onItemShiftTab:r.useCallback(()=>M(!0),[]),onFocusableItemAdd:r.useCallback(()=>D(e=>e+1),[]),onFocusableItemRemove:r.useCallback(()=>D(e=>e-1),[]),children:(0,n.jsx)(u.Primitive.div,{tabIndex:A||0===P?-1:0,"data-orientation":s,...y,ref:S,style:{outline:"none",...e.style},onMouseDown:(0,o.composeEventHandlers)(e.onMouseDown,()=>{$.current=!0}),onFocus:(0,o.composeEventHandlers)(e.onFocus,e=>{let t=!$.current;if(e.target===e.currentTarget&&t&&!A){let t=new CustomEvent(b,w);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=I().filter(e=>
1e.focusable);L([e.find(e=>e.active),e.find(e=>e.id===O),...e].filter(Boolean).map(e=>e.ref.current),v)}}$.current=!1}),onBlur:(0,o.composeEventHandlers)(e.onBlur,()=>M(!1))})})},"RovingFocusGroupImpl")),R=r.forwardRef(y(function(e,t){let{__scopeRovingFocusGroup:i,focusable:l=!0,active:s=!1,tabStopId:c,children:d,...f}=e,h=(0,a.useId)(),m=c||h,g=T("RovingFocusGroupItem",i),v=g.currentTabStopId===m,y=C(i),{onFocusableItemAdd:b,onFocusableItemRemove:w,currentTabStopId:j}=g,S=x();return(0,p.useLayoutEffect)(()=>{if(S&&l)return b(),()=>w()},[S,l,b,w]),r.useEffect(()=>{if(!S&&l)return b(),()=>w()},[S,l,b,w]),(0,n.jsx)(k.ItemSlot,{scope:i,id:m,focusable:l,active:s,children:(0,n.jsx)(u.Primitive.span,{tabIndex:v?0:-1,"data-orientation":g.orientation,...f,ref:t,onMouseDown:(0,o.composeEventHandlers)(e.onMouseDown,e=>{l?g.onItemFocus(m):e.preventDefault()}),onFocus:(0,o.composeEventHandlers)(e.onFocus,()=>g.onItemFocus(m)),onKeyDown:(0,o.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void g.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=P(e,g.orientation,g.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=y().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();let r=n.indexOf(e.currentTarget);n=g.loop?D(n,r+1):n.slice(r+1)}setTimeout(()=>L(n))}}),children:"function"==typeof d?d({isCurrentTabStop:v,hasTabStop:null!=j}):d})})},"RovingFocusGroupItem")),I={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function $(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function P(e,t,n){let r=$(e.key,n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return I[r]}function L(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function D(e,t){return e.map((n,r)=>e[(t+r)%e.length])}y($,"getDirectionAwareKey"),y(P,"getFocusIntent"),y(L,"focusFirst"),y(D,"wrapArray");var z=e.i(296626),F=Object.defineProperty,U=(e,t)=>F(e,"name",{value:t,configurable:!0}),H="Tabs",[_,B]=(0,i.createContextScope)(H,[O]),V=O(),[W,q]=_(H),G=r.forwardRef(U(function(e,t){let{__scopeTabs:r,value:o,onValueChange:i,defaultValue:l,orientation:s="horizontal",dir:c,activationMode:p="automatic",...h}=e,m=(0,f.useDirection)(c),[g,x]=(0,d.useControllableState)({prop:o,onChange:i,defaultProp:l??"",caller:H});return(0,n.jsx)(W,{scope:r,baseId:(0,a.useId)(),value:g,onValueChange:x,orientation:s,dir:m,activationMode:p,children:(0,n.jsx)(u.Primitive.div,{dir:m,"data-orientation":s,...h,ref:t})})},"Tabs")),K=r.forwardRef(U(function(e,t){let{__scopeTabs:r,loop:o=!0,...i}=e,l=q("TabsList",r),s=V(r);return(0,n.jsx)(A,{asChild:!0,...s,orientation:l.orientation,dir:l.dir,loop:o,children:(0,n.jsx)(u.Primitive.div,{role:"tablist","aria-orientation":l.orientation,...i,ref:t})})},"TabsList")),Y=r.forwardRef(U(function(e,t){let{__scopeTabs:r,value:i,disabled:l=!1,...s}=e,a=q("TabsTrigger",r),c=V(r),d=J(a.baseId,i),f=X(a.baseId,i),p=i===a.value;return(0,n.jsx)(R,{asChild:!0,...c,focusable:!l,active:p,children:(0,n.jsx)(u.Primitive.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":f,"data-state":p?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:d,...s,ref:t,onMouseDown:(0,o.composeEventHandlers)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():a.onValueChange(i)}),onKeyDown:(0,o.composeEventHandlers)(e.onKeyDown,e=>{!l&&e.target===e.currentTarget&&[" ","Enter"].includes(e.key)&&a.onValueChange(i)}),onFocus:(0,o.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==a.activationMode;p||l||!e||a.onValueChange(i)})})})},"TabsTrigger")),Z=r.forwardRef(U(function(e,t){let{__scopeTabs:o,value:i,forceMount:l,children:s,...a}=e,c=q("TabsContent",o),d=J(c.baseId,i),f=X(c.baseId,i),p=i===c.value,h=r.useRef(p);return r.useEffect(()=>{let e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,n.jsx)(z.Presence,{present:l||p,children:({present:r})=>(0,n.jsx)(u.Primitive.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":d,hidden:!r,id:f,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:r&&s})})},"TabsContent"));function J(e,t){return`${e}-trigger-${t}`}function X(e,t){return`${e}-content-${t}`}U(J,"makeTriggerId"),U(X,"makeContentId");let Q=new Map,ee=(0,r.createContext)(null);e.s(["Tabs",0,function({ref:e,groupId:o,persist:i=!1,updateAnchor:l=!1,defaultValue:s,value:a,onValueChange:u,...c}){let d=(0,r.useRef)(null),f=(0,r.useMemo)(()=>new Map,[]),[p,h]=void 0===a?(0,r.useState)(s):[a,(0,r.useEffectEvent)(e=>u?.(e))];return(0,r.useLayoutEffect)(()=>
1{if(!o)return;let e=sessionStorage.getItem(o);i&&(e??=localStorage.getItem(o)),e&&h(e);let t=Q.get(o)??new Set;return t.add(h),Q.set(o,t),()=>{t.delete(h)}},[o,i,h]),(0,r.useLayoutEffect)(()=>{let e=window.location.hash.slice(1);if(e){for(let[t,n]of f.entries())if(n===e){h(t),d.current?.scrollIntoView();break}}},[h,f]),(0,n.jsx)(G,{ref:(0,t.mergeRefs)(e,d),value:p,onValueChange:e=>{if(l){let t=f.get(e);t&&window.history.replaceState(null,"",`#${t}`)}if(o){let t=Q.get(o);if(t)for(let n of t)n(e);sessionStorage.setItem(o,e),i&&localStorage.setItem(o,e)}else h(e)},...c,children:(0,n.jsx)(ee,{value:(0,r.useMemo)(()=>({valueToIdMap:f}),[f]),children:c.children})})},"TabsContent",0,function({value:e,...t}){let{valueToIdMap:o}=function(){let e=(0,r.use)(ee);if(!e)throw Error("You must wrap your component in <Tabs>");return e}();return t.id&&o.set(e,t.id),(0,n.jsx)(Z,{value:e,...t,children:t.children})},"TabsList",0,K,"TabsTrigger",0,Y],825153)},846830,e=>{"use strict";e.s(["DocsBody",()=>eS,"DocsDescription",()=>eE,"DocsPage",()=>ek,"DocsTitle",()=>eO,"EditOnGitHub",()=>eC,"PageLastUpdate",()=>eN,"page_exports",()=>eb,"useDocsPage",()=>ej],772168);var t=e.i(730942);e.i(816374);var n=e.i(128769),r=e.i(713548),o=e.i(737877),i=e.i(281878),l=e.i(224110),s=e.i(843476),a=e.i(709428),u=e.i(246872),c=e.i(155034);let d=(0,c.default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);var f=e.i(34402),f=f;let p=(0,c.default)("text-align-start",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]]);var h=e.i(271645),m=e.i(532257),g={get url(){return e.F("node_modules/fumadocs-ui/dist/layouts/shared/page-actions.js")},env:{DEV:!1,PROD:!0,MODE:"production",BASE_URL:"/",SSR:!1}};let x=new Map;function v({markdownUrl:e,...t}){let i=(0,m.useTranslations)({note:"page actions"}),[l,u]=(0,h.useState)(!1),[c,f]=(0,o.useCopyButton)(async()=>{let t=x.get(e);if(t)return navigator.clipboard.writeText(await t);u(!0);try{let t=fetch(b(e)).then(e=>e.text());x.set(e,t),await navigator.clipboard.write([new ClipboardItem({"text/plain":t})])}finally{u(!1)}});return(0,s.jsxs)("button",{disabled:l,onClick:f,...t,className:(0,n.cn)((0,r.buttonVariants)({color:"secondary",size:"sm",className:"gap-2 [&_svg]:size-3.5 [&_svg]:text-fd-muted-foreground"}),t.className),children:[c?(0,s.jsx)(a.Check,{}):(0,s.jsx)(d,{}),t.children??i("Copy Markdown")]})}function y({markdownUrl:e,githubUrl:t,...o}){let a=(0,l.usePathname)(),c=(0,m.useTranslations)({note:"page actions"}),d=(0,h.useMemo)(()=>{let n=c("Read {url}, I want to ask questions about it.",{variables:{url:String("u"<typeof window?a:new URL(a,window.location.origin))}});return[t&&{title:c("Open in GitHub"),href:t,icon:(0,s.jsxs)("svg",{fill:"currentColor",role:"img",viewBox:"0 0 24 24",children:[(0,s.jsx)("title",{children:"GitHub"}),(0,s.jsx)("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]})},e&&{title:c("View as Markdown"),href:b(e),icon:(0,s.jsx)(p,{})},{title:c("Open in Scira AI"),href:`https://scira.ai/?${new URLSearchParams({q:n})}`,icon:(0,s.jsxs)("svg",{width:"910",height:"934",viewBox:"0 0 910 934",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("title",{children:"Scira AI"}),(0,s.jsx)("path",{d:"M647.664 197.775C569.13 189.049 525.5 145.419 516.774 66.8849C508.048 145.419 464.418 189.049 385.884 197.775C464.418 206.501 508.048 250.131 516.774 328.665C525.5 250.131 569.13 206.501 647.664 197.775Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"8",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M516.774 304.217C510.299 275.491 498.208 252.087 480.335 234.214C462.462 216.341 439.058 204.251 410.333 197.775C439.059 191.3 462.462 179.209 480.335 161.336C498.208 143.463 510.299 120.06 516.774 91.334C523.25 120.059 535.34 143.463 553.213 161.336C571.086 179.209 594.49 191.3 623.216 197.775C594.49 204.251 571.086 216.341 553.213 234.214C535.34 252.087 523.25 275.491 516.774 304.217Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"8",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M857.5 508.116C763.259 497.644 710.903 445.288 700.432 351.047C689.961 445.288 637.605 497.644 543.364 508.116C637.605 518.587 689.961 570.943 700.432 665.184C710.903 570.943 763.259 518.587 857.5 508.116Z",stroke:"currentColor",strokeWidth:"20",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M700.432 615.957C691.848 589.05 678.575 566.357 660.383 548.165C642.191 529.973 619.499 516.7 592.593 508.116C619.499 499.533 642.191 486.258 660.383 468.066C678.575 449.874 691.848 427.181 700.432 400.274C709.015 427.181 722.289 449.874 740.481 468.066C758.673 486.258 781.365 499.533 808.271 508.116C781.365 516.7 758.673 529.973 740.481 548.165C722.289 566.357 709.015 589.05 700.432 615.957Z",stroke:"currentColor",strokeWidth:"20",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M889.949 121.237C831.049 114.692 798.326 81.9698 791.782 23.0692C785.237 81.9698 752.515 114.692 693.614 121.237C752.515 127.781 785.237 160.504 791.782 219.404C798.326 160.504 831.049 127.781 889.949 121.237Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"8",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M791.782 196.795C786.697 176.937 777.869 160.567 765.16 147.858C752.452 135.15 736.082 126.322 716.226 121.237C736.082 116.152 752.452 107.324 765.16 94.6152C777.869 81.9065 786.697 65.5368 791.782 45.6797C796.867 65.5367 805.695 81.9066 818.403 94.6152C831.112 107.324 847.481 116.152 867.338 121.237C847.481 126.322 831.112 135.15 818.403 147.858C805.694 160.567 796.867 176.937 791.782 196.795Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"8",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M760.632 764.337C720.719 814.616 669.835 855.1 611.872 882.692C553.91 910.285 490.404 924.255 426.213 923.533C362.022 922.812 298.846 907.419 241.518 878.531C184.19 849.643 134.228 808.026 95.4548 756.863C56.6815 705.7 30.1238 646.346 17.8129 583.343C5.50207 520.339 7.76433 455.354 24.4266 393.359C41.089 331.364 71.7099 274.001 113.947 225.658C156.184 177.315 208.919 139.273 268.117 114.442",stroke:"currentColor",strokeWidth:"30",strokeLinecap:"round",strokeLinejoin:"round"})]})},{title:c("Open in ChatGPT"),href:`https://chatgpt.com/?${new URLSearchParams({prompt:n,hints:"search"})}
1`,icon:(0,s.jsxs)("svg",{role:"img",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("title",{children:"OpenAI"}),(0,s.jsx)("path",{d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})]})},{title:c("Open in Claude"),href:`https://claude.ai/new?${new URLSearchParams({q:n})}`,icon:(0,s.jsxs)("svg",{fill:"currentColor",role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("title",{children:"Anthropic"}),(0,s.jsx)("path",{d:"M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z"})]})},{title:c("Open in Cursor"),icon:(0,s.jsxs)("svg",{fill:"currentColor",role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("title",{children:"Cursor"}),(0,s.jsx)("path",{d:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"})]}),href:`https://cursor.com/link/prompt?${new URLSearchParams({text:n})}`}].filter(e=>!!e)},[t,e,a,c]);return(0,s.jsxs)(i.Popover,{children:[(0,s.jsxs)(i.PopoverTrigger,{...o,className:(0,n.cn)((0,r.buttonVariants)({color:"secondary",size:"sm"}),"gap-2 data-[state=open]:bg-fd-accent data-[state=open]:text-fd-accent-foreground",o.className),children:[o.children??c("Open"),(0,s.jsx)(u.ChevronDown,{className:"size-3.5 text-fd-muted-foreground"})]}),(0,s.jsx)(i.PopoverContent,{className:"flex flex-col",children:d.map(e=>(0,s.jsxs)("a",{href:e.href,rel:"noreferrer noopener",target:"_blank",className:"text-sm p-2 rounded-lg inline-flex items-center gap-2 hover:text-fd-accent-foreground hover:bg-fd-accent [&_svg]:size-4",children:[e.icon,e.title,(0,s.jsx)(f.default,{className:"text-fd-muted-foreground size-3.5 ms-auto"})]},e.href))})]})}function b(e){return e.match(/^\w+:/)||e.startsWith("//")?e:(void 0!==g.env&&"string"==typeof g.env.BASE_URL?g.env.BASE_URL.replace(/\/$/,""):"")+e}var w=e.i(14804),j=e.i(826907),k=e.i(191909);let C=(0,h.createContext)(null),S=(0,h.createContext)(null);function E({ref:e,onActiveChange:t=()=>null,...n}){let r=n.href?M(n.href):null,o=(0,h.use)(S),i=(0,h.useRef)(null),l=O(),[a,u]=(0,h.useState)(()=>l.items.some(e=>e.id===r&&e.active));function c(e,t=!1){let n,l=i.current,s=o?.current;if(r&&l&&s){for(let t of e)t.active&&(!n||n.t<t.t)&&(n=t);n?.id===r&&(0,k.default)(l,{behavior:t?"instant":"smooth",block:"center",inline:"center",scrollMode:"always",boun
1dary:s})}}return T(e=>{let n=r?e.find(e=>e.id===r):null;n&&n.active!==a&&(u(n.active),t(n.active),c(e))}),(0,h.useEffect)(()=>{c(l.items,!0)},[l]),(0,s.jsx)("a",{ref:function(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}(i,e),"data-active":a,...n})}function O(){let e=(0,h.use)(C);if(!e)throw Error("Component must be used under the <AnchorProvider /> component.");return e}function N(){let e=O();return(0,h.useMemo)(()=>({get:()=>e.items,listen:e.listen.bind(e),unlisten:e.unlisten.bind(e)}),[e])}function T(e){let t=O(),n=(0,h.useEffectEvent)(e);(0,h.useEffect)(()=>(t.listen(n),()=>t.unlisten(n)),[t])}function A(e,t=j.t){let n=O(),[r,o]=(0,h.useState)(()=>e(n.items));return T(n=>{let i=e(n);t(r,i)||o(i)}),r}function M(e){return e.startsWith("#")?e.slice(1):null}var R=class{constructor(){this.items=[],this.single=!1,this.observer=null,this.listeners=new Set}listen(e){this.listeners.add(e)}unlisten(e){this.listeners.delete(e)}setItems(e){let t=this.observer;if(t)for(let e of this.items){let n=document.getElementById(e.id);n&&t.unobserve(n)}let n=[];for(let t of e){let e=M(t.url);e&&n.push({id:e,active:!1,fallback:!1,t:0,original:t})}this.update(n),this.observeItems()}watch(e){this.observer||(this.observer=new IntersectionObserver(this.callback.bind(this),e),this.observeItems())}unwatch(){this.observer?.disconnect(),this.observer=null}callback(e){if(0===e.length)return;let t=!1,n=this.items.map(n=>{let r=e.find(e=>e.target.id===n.id),o=r?r.isIntersecting:n.active&&!n.fallback;return this.single&&t&&(o=!1),n.active!==o&&(n={...n,t:Date.now(),active:o,fallback:!1}),o&&(t=!0),n});if(!t&&e[0].rootBounds){let t=e[0].rootBounds.top,r=Number.MAX_VALUE,o=-1;for(let e=0;e<n.length;e++){let i=document.getElementById(n[e].id);if(!i)continue;let l=Math.abs(t-i.getBoundingClientRect().top);l<r&&(o=e,r=l)}-1!==o&&(n[o]={...n[o],active:!0,fallback:!0,t:Date.now()})}this.update(n)}observeItems(){if(this.observer)for(let e of this.items){let t=document.getElementById(e.id);t&&this.observer.observe(t)}}update(e){for(let t of(this.items=e,this.listeners))t(e)}};e.s(["AnchorProvider",0,function({toc:e,single:t=!1,children:n}){let r=(0,h.useMemo)(()=>new R,[]);return r.single=t,(0,h.useEffect)(()=>{r.setItems(e)},[r,e]),(0,h.useEffect)(()=>(r.watch({threshold:.9}),()=>r.unwatch()),[r]),(0,s.jsx)(C,{value:r,children:n})},"ScrollProvider",0,function({containerRef:e,children:t}){return(0,s.jsx)(S,{value:e,children:t})},"TOCItem",0,E,"useActiveAnchor",0,function(){return A(e=>{let t;for(let n of e)n.active&&(!t||n.t>t.t)&&(t=n);return t?.id})},"useActiveAnchors",0,function(){return A(e=>{let t=[];for(let n of e)n.active&&t.push(n.id);return t})},"useItems",0,function(){return A(e=>e)},"useTOC",0,N,"useTOCListener",0,T,"useTOCSelector",0,A],64588);var I=e.i(64588);let $=(0,h.createContext)([]);function P(){return(0,h.use)($)}let{useActiveAnchor:L,useActiveAnchors:D,useItems:z}=I;function F({toc:e,children:t,...n}){return(0,s.jsx)($,{value:e,children:(0,s.jsx)(I.AnchorProvider,{toc:e,...n,children:t})})}function U({ref:e,className:t,...r}){let o=(0,h.useRef)(null);return(0,s.jsx)("div",{ref:(0,w.mergeRefs)(o,e),className:(0,n.cn)("relative min-h-0 text-sm ms-px overflow-auto [scrollbar-width:none] mask-[linear-gradient(to_bottom,transparent,white_16px,white_calc(100%-16px),transparent)] py-3",t),...r,children:(0,s.jsx)(I.ScrollProvider,{containerRef:o,children:r.children})})}var H=(0,t.__exportAll)({TOCEmpty:()=>B,TOCItem:()=>q,TOCItems:()=>_});function _({ref:e,className:t,thumbBox:r=!0,children:o,...i}){let l=(0,h.useRef)(null),a=P(),[u,c]=(0,h.useState)(null),d=(0,h.useCallback)(()=>{let e=l.current;if(!e||0===e.clientHeight)return;if(0===a.length)return void c(null);let t=0,n=0,o="",i=[],u=[];for(let r=0;r<a.length;r++){let l=a[r],c=e.querySelector(`a[href="${l.url}"]`);if(!c)continue;let d=getComputedStyle(c),f=W(l.depth)+.5,p=c.offsetTop+parseFloat(d.paddingTop),h=c.offsetTop+c.clientHeight-parseFloat(d.paddingBottom);if(t=Math.max(f+8,t),n=Math.max(n,h),0===r)o+=` M${f} ${p} L${f} ${h}`;else{let[,e,t]=r>0?i[r-1]:[0,0,0];o+=` C ${t} ${p-4} ${f} ${e+4} ${f} ${p} L${f} ${h}`}void 0!==l._step&&u.push((0,s.jsxs)("g",{transform:`translate(${f}, ${(p+h)/2})`,children:[(0,s.jsx)("circle",{cx:"0",cy:"0",r:"8",className:"fill-fd-primary"}),(0,s.jsx)("text",{cx:"0",cy:"0",textAnchor:"middle",alignmentBaseline:"central",dominantBaseline:"middle",className:"fill-fd-primary-foreground font-medium text-xs leading-none font-mono rtl:-scale-x-100",children:l._step})]},r)),i.push([p,h,f])}u.unshift((0,s.jsx)("path",{d:o,className:"stroke-fd-primary",strokeWidth:"1",fill:"none"},"path"));let d=[];if(r){let e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",o);let t=e.getTotalLength();for(let n=0;n<i.length;n++){let[r,o]=i[n],l=n>0?d[n-1][1]+(r-i[n-1][1]):r;for(;
1l<t&&e.getPointAtLength(l).y<r;)l++;d.push([l,l+o-r])}}c({content:u,width:t,height:n,d:o,itemLineLengths:d,positions:i})},[a,r]);return(0,h.useEffect)(()=>{let e=l.current;if(!e)return;let t=new ResizeObserver(d);return t.observe(e),d(),()=>{t.unobserve(e)}},[d]),(0,s.jsxs)("div",{ref:(0,w.mergeRefs)(l,e),className:(0,n.cn)("relative flex flex-col",t),...i,children:[u&&(0,s.jsx)(V,{computed:u,thumbBox:r}),o]})}function B(){return(0,s.jsx)("div",{className:"rounded-lg border bg-fd-card p-3 text-xs text-fd-muted-foreground",children:(0,m.useTranslations)({note:"table of contents"})("No Headings")})}function V({computed:e,thumbBox:t}){let n=(0,h.useRef)(null),r=(0,h.useRef)(null),o=N();function i(n){let o={},i=n.findIndex(e=>e.active);if(-1===i)return o;let l=n.findLastIndex(e=>e.active);if(o["--track-top"]=`${e.positions[i][0]}px`,o["--track-bottom"]=`${e.positions[l][1]}px`,t){let t=!1;if(r.current){let e=r.current;t=e.startIdx>i||e.endIdx>l||e.startIdx===i&&e.endIdx===l&&e.isUp}r.current={startIdx:i,endIdx:l,isUp:t},o["--offset-distance"]=t?`${e.itemLineLengths[i][0]}px`:`${e.itemLineLengths[l][1]}px`,o["--opacity"]=void 0!==n[t?i:l].original._step?"0":"1"}return o}return T(e=>{let t=n.current;if(t)for(let[n,r]of Object.entries(i(e)))t.style.setProperty(n,r)}),(0,s.jsxs)("div",{ref:n,className:"absolute top-0 inset-s-0 origin-center rtl:-scale-x-100",style:{width:e.width,height:e.height,...i(o.get())},children:[(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${e.width} ${e.height}`,className:"absolute transition-[clip-path]",style:{width:e.width,height:e.height,clipPath:"polygon(0 var(--track-top,0), 100% var(--track-top,0), 100% var(--track-bottom,0), 0 var(--track-bottom,0))"},children:e.content}),t&&(0,s.jsx)("div",{className:"absolute left-0 size-1 bg-fd-primary rounded-full [offset-distance:var(--offset-distance,0)] opacity-(--opacity,0) transition-[opacity,offset-distance]",style:{offsetPath:`path("${e.d}")`}})]})}function W(e){return e<=2?8:3===e?16:24}function q({item:e,...t}){var r;let o=P(),{isFirst:i,isLast:l,svg:a}=(0,h.useMemo)(()=>
1{let t=o.indexOf(e),r=0===t,i=t===o.length-1,l=W(e.depth),a=r?l:W(o[t-1].depth),u=i?l:W(o[t+1].depth);return{isFirst:r,isLast:i,svg:(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",className:(0,n.cn)("absolute -top-1.5 inset-s-0 bottom-0 h-[calc(100%+--spacing(1.5))] -z-1 rtl:-scale-x-100",l!==u&&"h-full bottom-1.5"),style:{width:Math.max(a,l)+9},children:[a!==l&&(0,s.jsx)("path",{d:`M ${a+.5} 0 C ${a+.5} 8 ${l+.5} 4 ${l+.5} 12`,stroke:"black",strokeWidth:"1",fill:"none",className:"stroke-fd-foreground/10"}),(0,s.jsx)("line",{x1:l+.5,y1:a===l?"6":"12",x2:l+.5,y2:"100%",strokeWidth:"1",className:"stroke-fd-foreground/10"}),void 0!==e._step&&(0,s.jsxs)("g",{transform:`translate(${l+.5}, ${l===u?"3":"6"})`,children:[(0,s.jsx)("circle",{cx:"0",cy:"50%",r:"8",className:"fill-fd-muted"}),(0,s.jsx)("text",{x:"0",y:"50%",textAnchor:"middle",alignmentBaseline:"central",dominantBaseline:"middle",className:"fill-fd-muted-foreground font-medium text-xs leading-none font-mono rtl:-scale-x-100",children:e._step})]})]})}},[o,e]);return(0,s.jsxs)(E,{href:e.url,...t,className:(0,n.cn)("prose relative py-1.5 text-sm scroll-m-4 text-fd-muted-foreground hover:text-fd-accent-foreground transition-colors wrap-anywhere data-[active=true]:text-fd-primary",i&&"pt-0",l&&"pb-0",t.className),style:{paddingInlineStart:(r=e.depth)<=2?20:3===r?32:44,...t.style},children:[a,e.title]})}var G=(0,t.__exportAll)({TOCEmpty:()=>Y,TOCItem:()=>X,TOCItems:()=>K});function K({ref:e,className:t,children:r,...o}){let i=(0,h.useRef)(null),l=P(),[a,u]=(0,h.useState)(null),c=(0,h.useCallback)(()=>{let e=i.current;if(!e||0===e.clientHeight)return;if(0===l.length)return void u(null);let t=0,n=0,r="",o=[],a=[];for(let i=0;i<l.length;i++){let u=l[i],c=e.querySelector(`a[href="${u.url}"]`);if(!c)continue;let d=getComputedStyle(c),f=J(u.depth)+.5,p=c.offsetTop+parseFloat(d.paddingTop),h=c.offsetTop+c.clientHeight-parseFloat(d.paddingBottom);if(t=Math.max(f+8,t),n=Math.max(n,h),0===i)r+=` M${f} ${p} L${f} ${h}`;else{let[,e,t]=i>0?o[i-1]:[0,0,0];r+=` L ${t} ${e} ${f} ${p} L${f} ${h}`}void 0!==u._step&&a.push((0,s.jsxs)("g",{transform:`translate(${f}, ${(p+h)/2})`,children:[(0,s.jsx)("circle",{cx:"0",cy:"0",r:"8",className:"fill-fd-primary"}),(0,s.jsx)("text",{cx:"0",cy:"0",textAnchor:"middle",alignmentBaseline:"central",dominantBaseline:"middle",className:"fill-fd-primary-foreground font-medium text-xs leading-none font-mono rtl:-scale-x-100",children:u._step})]},i)),o.push([p,h,f])}a.unshift((0,s.jsx)("path",{d:r,className:"stroke-fd-primary",strokeWidth:"1",fill:"none"},"path")),u({content:a,width:t,height:n,d:r,itemLineLengths:[],positions:o})},[l]);return(0,h.useEffect)(()=>{let e=i.current;if(!e)return;let t=new ResizeObserver(c);return t.observe(e),c(),()=>{t.unobserve(e)}},[c]),(0,s.jsxs)("div",{ref:(0,w.mergeRefs)(i,e),className:(0,n.cn)("relative flex flex-col",t),...o,children:[a&&(0,s.jsx)(Z,{computed:a}),r]})}function Y(){return(0,s.jsx)("div",{className:"rounded-lg border bg-fd-card p-3 text-xs text-fd-muted-foreground",children:(0,m.useTranslations)({note:"table of contents"})("No Headings")})}function Z({computed:e}){let t=(0,h.useRef)(null),n=N();function r(t){let n={},r=t.findIndex(e=>e.active);if(-1===r)return n;let o=t.findLastIndex(e=>e.active);return n["--track-top"]=`${e.positions[r][0]}px`,n["--track-bottom"]=`${e.positions[o][1]}px`,n}return T(e=>{let n=t.current;if(n)for(let[t,o]of Object.entries(r(e)))n.style.setProperty(t,o)}),(0,s.jsx)("div",{ref:t,className:"absolute top-0 inset-s-0 origin-center rtl:-scale-x-100",style:{width:e.width,height:e.height,...r(n.get())},children:(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${e.width} ${e.height}`,className:"absolute transition-[clip-path]",style:{width:e.width,height:e.height,clipPath:"polygon(0 var(--track-top,0), 100% var(--track-top,0), 100% var(--track-bottom,0), 0 var(--track-bottom,0))"},children:e.content})})}function J(e){return e<=2?8:3===e?20:32}function X({item:e,...t}){var r;let o=P(),{isFirst:i,isLast:l,svg:a}=(0,h.useMemo)(()=>
1{let t=o.indexOf(e),r=0===t,i=t===o.length-1,l=J(e.depth),a=r?l:J(o[t-1].depth),u=i?l:J(o[t+1].depth);return{isFirst:r,isLast:i,svg:(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",className:(0,n.cn)("absolute -top-1.5 inset-s-0 bottom-0 h-[calc(100%+--spacing(1.5))] -z-1 rtl:-scale-x-100",l!==u&&"h-full bottom-1.5"),style:{width:Math.max(a,l)+9},children:[a!==l&&(0,s.jsx)("path",{d:`M ${a+.5} 0 L ${a+.5} 0 ${l+.5} 12`,stroke:"black",strokeWidth:"1",fill:"none",className:"stroke-fd-foreground/10"}),(0,s.jsx)("line",{x1:l+.5,y1:a===l?"6":"12",x2:l+.5,y2:"100%",strokeWidth:"1",className:"stroke-fd-foreground/10"}),void 0!==e._step&&(0,s.jsxs)("g",{transform:`translate(${l+.5}, ${l===u?"3":"6"})`,children:[(0,s.jsx)("circle",{cx:"0",cy:"50%",r:"8",className:"fill-fd-muted"}),(0,s.jsx)("text",{x:"0",y:"50%",textAnchor:"middle",alignmentBaseline:"central",dominantBaseline:"middle",className:"fill-fd-muted-foreground font-medium text-xs leading-none font-mono rtl:-scale-x-100",children:e._step})]})]})}},[o,e]);return(0,s.jsxs)(E,{href:e.url,...t,className:(0,n.cn)("prose relative py-1.5 text-sm scroll-m-4 text-fd-muted-foreground hover:text-fd-accent-foreground transition-colors wrap-anywhere data-[active=true]:text-fd-primary",i&&"pt-0",l&&"pb-0",t.className),style:{paddingInlineStart:(r=e.depth)<=2?20:3===r?32:44,...t.style},children:[a,e.title]})}var Q=e.i(214072),ee=e.i(451988),et=e.i(541310);function en(e){return(0,s.jsx)(F,{...e})}function er({container:e,header:t,footer:r,style:o="normal",list:i}){let l=P(),a=(0,m.useTranslations)({note:"table of contents"}),{TOCItems:u,TOCEmpty:c,TOCItem:d}="clerk"===o?G:H;return 0!==l.length||r||t?(0,s.jsxs)("div",{id:"nd-toc",...e,className:(0,n.cn)("sticky top-(--fd-docs-row-3) [grid-area:toc] h-[calc(var(--fd-docs-height)-var(--fd-docs-row-3))] flex flex-col w-(--fd-toc-width) pt-12 pe-4 pb-2 xl:layout:[--fd-toc-width:268px] max-xl:hidden",e?.className),children:[t,(0,s.jsxs)("h3",{id:"toc-title",className:"inline-flex items-center gap-1.5 text-sm text-fd-muted-foreground",children:[(0,s.jsx)(p,{className:"size-4"}),a("On this page")]}),(0,s.jsx)(U,{children:(0,s.jsxs)(u,{...i,children:[0===l.length&&(0,s.jsx)(c,{}),l.map(e=>(0,s.jsx)(d,{item:e},e.url))]})}),r]}):(0,s.jsx)("div",{id:"nd-toc-placeholder",className:"hidden xl:layout:[--fd-toc-width:268px]"})}let eo=(0,h.createContext)(null);function ei({container:e,trigger:t,content:r,header:o,footer:i,style:l="normal",list:a}){let u=P(),c=(0,h.useRef)(null),[d,f]=(0,h.useState)(!1),{isNavTransparent:p}=(0,et.useNotebookLayout)(),{TOCItems:m,TOCItem:g,TOCEmpty:x}="clerk"===l?G:H,v=(0,h.useEffectEvent)(e=>{d&&e.target instanceof HTMLElement&&c.current&&!c.current.contains(e.target)&&f(!1)}),y=()=>{f(!1)};return(0,h.useEffect)(()=>(window.addEventListener("click",v),()=>{window.removeEventListener("click",v)}),[]),(0,s.jsx)(eo,{value:(0,h.useMemo)(()=>({open:d,setOpen:f}),[f,d]),children:(0,s.jsx)(ee.Collapsible,{open:d,onOpenChange:f,"data-toc-popover":"",...e,className:(0,n.cn)("sticky top-(--fd-docs-row-2) z-10 [grid-area:toc-popover] h-(--fd-toc-popover-height) xl:hidden max-xl:layout:[--fd-toc-popover-height:--spacing(10)]",e?.className),children:(0,s.jsxs)("header",{ref:c,className:(0,n.cn)("border-b backdrop-blur-sm transition-colors",(!p||d)&&"bg-fd-background/80",d&&"shadow-lg"),children:[(0,s.jsx)(el,{...t}),(0,s.jsxs)(ea,{...r,children:[o,(0,s.jsx)(U,{children:(0,s.jsxs)(m,{...a,children:[0===u.length&&(0,s.jsx)(x,{}),u.map(e=>(0,s.jsx)(g,{item:e,onClick:y},e.url))]})}),i]})]})})})}function el({className:e,...t}){let r=(0,m.useTranslations)({note:"table of contents"}),{open:o}=(0,h.use)(eo),i=z(),l=i.findIndex(e=>e.active),a=(0,Q.useTreePath)().at(-1),c=-1!==l&&!o;return(0,s.jsxs)(ee.CollapsibleTrigger,{className:(0,n.cn)("flex w-full h-10 items-center text-sm text-fd-muted-foreground gap-2.5 px-4 py-2.5 text-start focus-visible:outline-none [&_svg]:size-4 md:px-6",e),"data-toc-popover-trigger":"",...t,children:[(0,s.jsx)(es,{value:(i.findLastIndex(e=>e.active)+1)/Math.max(1,i.length),max:1,className:(0,n.cn)("shrink-0",o&&"text-fd-
1primary")}),(0,s.jsxs)("span",{className:"grid flex-1 *:my-auto *:row-start-1 *:col-start-1",children:[(0,s.jsx)("span",{className:(0,n.cn)("truncate transition-[opacity,translate,color]",o&&"text-fd-foreground",c&&"opacity-0 -translate-y-full pointer-events-none"),children:a?.name??r("On this page")}),(0,s.jsx)("span",{className:(0,n.cn)("truncate transition-[opacity,translate]",!c&&"opacity-0 translate-y-full pointer-events-none"),children:i[l]?.original.title})]}),(0,s.jsx)(u.ChevronDown,{className:(0,n.cn)("shrink-0 transition-transform mx-0.5",o&&"rotate-180")})]})}function es({value:e,strokeWidth:t=1.5,size:n=18,min:r=0,max:o=100,style:i,...l}){let a=e<r?r:e>o?o:e,u=n/2-t,c=2*Math.PI*u,d=a/o*c,f={cx:n/2,cy:n/2,r:u,fill:"none",strokeWidth:t};return(0,s.jsxs)("svg",{role:"progressbar",viewBox:`0 0 ${n} ${n}`,"aria-valuenow":a,"aria-valuemin":r,"aria-valuemax":o,style:{width:n,height:n,...i},...l,children:[(0,s.jsx)("circle",{...f,className:"stroke-current/25"}),(0,s.jsx)("circle",{...f,stroke:"currentColor",strokeDasharray:c,strokeDashoffset:c-d,strokeLinecap:"round",transform:`rotate(-90 ${n/2} ${n/2})`,className:"transition-all"})]})}function ea(e){return(0,s.jsx)(ee.CollapsibleContent,{"data-toc-popover-content":"",...e,children:(0,s.jsx)("div",{className:"flex flex-col px-4 max-h-[50vh] md:px-6",children:e.children})})}var eu=e.i(600074);let ec=new WeakMap;var ed=e.i(647873);let ef=(0,c.default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var ep=e.i(625877);function eh({items:e,children:t,className:r,...o}){let i=function(){let{root:e}=(0,Q.useTreeContext)(),t=ec.get(e);if(t)return t;let n=[];for(let t of e.children)!function e(t){if("folder"===t.type)for(let n of(t.index&&e(t.index),t.children))e(n);else"page"!==t.type||t.external||n.push(t)}(t);return ec.set(e,n),n}(),a=(0,l.usePathname)(),{previous:u,next:c}=(0,h.useMemo)(()=>{if(e)return e;let t=i.findIndex(e=>(0,eu.isActive)(e.url,a));return -1===t?{}:{previous:i[t-1],next:i[t+1]}},[i,e,a]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:(0,n.cn)("@container grid gap-4",u&&c?"grid-cols-2":"grid-cols-1",r),...o,children:[u&&(0,s.jsx)(em,{item:u,index:0}),c&&(0,s.jsx)(em,{item:c,index:1})]}),t]})}function em({item:e,index:t}){let r=(0,m.useTranslations)({note:"pagination"}),o=0===t?ef:ep.ChevronRight;return(0,s.jsxs)(ed.default,{href:e.url,className:(0,n.cn)("flex flex-col gap-2 rounded-lg border p-4 text-sm transition-colors hover:bg-fd-accent/80 hover:text-fd-accent-foreground @max-lg:col-span-full",1===t&&"text-end"),children:[(0,s.jsxs)("div",{className:(0,n.cn)("inline-flex items-center gap-1.5 font-medium",1===t&&"flex-row-reverse"),children:[(0,s.jsx)(o,{className:"-mx-1 size-4 shrink-0 rtl:rotate-180"}),(0,s.jsx)("p",{children:e.name})]}),(0,s.jsx)("p",{className:"text-fd-muted-foreground truncate",children:e.description??r(0===t?"Previous Page":"Next Page")})]})}var eg=e.i(557886);function ex({includeRoot:e,includeSeparator:t,includePage:r,...o}){let i=(0,Q.useTreePath)(),{root:l}=(0,Q.useTreeContext)(),a=(0,h.useMemo)(()=>(0,eg.getBreadcrumbItemsFromPath)(l,i,{includePage:r,includeSeparator:t,includeRoot:e}),[r,e,t,i,l]);return 0===a.length?null:(0,s.jsx)("div",{...o,className:(0,n.cn)("flex items-center gap-1.5 text-sm text-fd-muted-foreground",o.className),children:a.map((e,t)=>{let r=(0,n.cn)("truncate",t===a.length-1&&"text-fd-primary font-medium");return(0,s.jsxs)(h.Fragment,{children:[0!==t&&(0,s.jsx)(ep.ChevronRight,{className:"size-3.5 shrink-0"}),e.url?(0,s.jsx)(ed.default,{href:e.url,className:(0,n.cn)(r,"transition-opacity hover:opacity-80"),children:e.name}):(0,s.jsx)("span",{className:r,children:e.name})]},t)})})}function ev(e){let{full:t}=ej();return(0,s.jsx)("article",{id:"nd-page","data-full":t,...e,className:(0,n.cn)("flex flex-col [grid-area:main] px-4 py-6 gap-4 md:px-6 md:pt-8 xl:px-8 xl:pt-14 *:max-w-[900px]",t&&"*:max-w-[1285px]",e.className),children:e.children})}let ey=(0,c.default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);var eb=(0,t.__exportAll)({DocsBody:()=>eS,DocsDescription:()=>eE,DocsPage:()=>ek,DocsTitle:()=>eO,EditOnGitHub:()=>eC,MarkdownCopyButton:()=>v,PageBreadcrumb:()=>ex,PageFooter:()=>eh,PageLastUpdate:()=>
1eN,ViewOptionsPopover:()=>y,useDocsPage:()=>ej});let ew=(0,h.createContext)(null);function ej(){let e=(0,h.use)(ew);if(!e)throw Error("Please use page components under <DocsPage /> (`fumadocs-ui/layouts/notebook/page`).");return e}function ek({full:e=!1,tableOfContent:{enabled:t=!e,single:n,...r}={},tableOfContentPopover:{enabled:o,...i}={},breadcrumb:{enabled:l=!0,...a}={},footer:{enabled:u=!0,...c}={},toc:d=[],slots:f={},children:p,...h}){o??=!!(d.length>0||i.header||i.footer);let m={breadcrumb:f.breadcrumb??ex,footer:f.footer??eh,toc:f.toc??{provider:en,main:er,popover:ei},container:f.container??ev};return(0,s.jsx)(ew,{value:{full:e,slots:m},children:(0,s.jsxs)(m.toc.provider,{single:n,toc:t||o?d:[],children:[o&&(i.component??(0,s.jsx)(m.toc.popover,{...i})),(0,s.jsxs)(m.container,{...h,children:[l&&(a.component??(0,s.jsx)(m.breadcrumb,{...a})),p,u&&(c.component??(0,s.jsx)(m.footer,{...c}))]}),t&&(r.component??(0,s.jsx)(m.toc.main,{...r}))]})})}function eC(e){let t=(0,m.useTranslations)({note:"edit page"});return(0,s.jsx)("a",{target:"_blank",rel:"noreferrer noopener",...e,className:(0,n.cn)((0,r.buttonVariants)({color:"secondary",size:"sm"}),"gap-1.5 not-prose",e.className),children:e.children??(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ey,{className:"size-3.5"}),t("Edit on GitHub")]})})}function eS({children:e,className:t,...r}){return(0,s.jsx)("div",{...r,className:(0,n.cn)("prose flex-1",t),children:e})}function eE({children:e,className:t,...r}){return void 0===e?null:(0,s.jsx)("p",{...r,className:(0,n.cn)("mb-8 text-lg text-fd-muted-foreground",t),children:e})}function eO({children:e,className:t,...r}){return(0,s.jsx)("h1",{...r,className:(0,n.cn)("text-[1.75em] font-semibold",t),children:e})}function eN({date:e,...t}){let r=(0,m.useTranslations)({note:"page footer"}),[o,i]=(0,h.useState)("");return(0,h.useEffect)(()=>{i(e.toLocaleDateString())},[e]),(0,s.jsxs)("p",{...t,className:(0,n.cn)("text-sm text-fd-muted-foreground",t.className),children:[r("Last updated on")," ",o]})}e.i(772168),e.s(["DocsBody",0,eS,"DocsDescription",0,eE,"DocsPage",0,ek,"DocsTitle",0,eO,"EditOnGitHub",0,eC,"MarkdownCopyButton",0,v,"PageBreadcrumb",0,ex,"PageFooter",0,eh,"PageLastUpdate",0,eN,"ViewOptionsPopover",0,y,"page_exports",0,eb,"useDocsPage",0,ej],846830)},737877,e=>{"use strict";var t=e.i(271645);e.s(["useCopyButton",0,function(e){let[n,r]=(0,t.useState)(!1),o=(0,t.useRef)(e),i=(0,t.useRef)(null);o.current=e;let l=(0,t.useCallback)(()=>{i.current&&window.clearTimeout(i.current),Promise.resolve(o.current()).then(()=>{r(!0),i.current=window.setTimeout(()=>{r(!1)},1500)})},[]);return(0,t.useEffect)(()=>()=>{i.current&&window.clearTimeout(i.current)},[]),[n,l]}])},90317,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={bindSnapshot:function(){return u},createAsyncLocalStorage:function(){return a},createSnapshot:function(){return c}};for(var o in r)Object.defineProperty(n,o,{enumerable:!0,get:r[o]});let i=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class l{disable(){throw i}getStore(){}run(){throw i}exit(){throw i}enterWith(){throw i}static bind(e){return e}}let s="u">typeof globalThis&&globalThis.AsyncLocalStorage;function a(){return s?new s:new l}function u(e){return s?s.bind(e):l.bind(e)}function c(){return s?s.snapshot():function(e,...t){return e(...t)}}},242344,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,e.r(90317).createAsyncLocalStorage)()},563599,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=e.r(242344)},309885,(e,t,n)=>{"use strict";function r(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"encodeURIPath",{enumerable:!0,get:function(){return r}})},667585,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BailoutToCSR",{enumerable:!0,get:function(){return o}});let r=e.r(132061);function o({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new r.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,
1configurable:!0});return t}},652157,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PreloadChunks",{enumerable:!0,get:function(){return a}});let r=e.r(843476),o=e.r(174080),i=e.r(563599),l=e.r(309885),s=e.r(543369);function a({moduleIds:e}){if("u">typeof window)return null;let t=i.workAsyncStorage.getStore();if(void 0===t)return null;let n=[];if(t.reactLoadableManifest&&e){let r=t.reactLoadableManifest;for(let t of e){if(!r[t])continue;let e=r[t].files;n.push(...e)}}if(0===n.length)return null;let u=(0,s.getAssetTokenQuery)();return(0,r.jsx)(r.Fragment,{children:n.map(e=>{let n=`${t.assetPrefix}/_next/${(0,l.encodeURIPath)(e)}${u}`;return e.endsWith(".css")?(0,r.jsx)("link",{precedence:"dynamic",href:n,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,o.preload)(n,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},869093,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return u}});let r=e.r(843476),o=e.r(271645),i=e.r(667585),l=e.r(652157);function s(e){return{default:e&&"default"in e?e.default:e}}let a={loader:()=>Promise.resolve(s(()=>null)),loading:null,ssr:!0},u=function(e){let t={...a,...e},n=(0,o.lazy)(()=>t.loader().then(s)),u=t.loading;function c(e){let s=u?(0,r.jsx)(u,{isLoading:!0,pastDelay:!0,error:null}):null,a=!t.ssr||!!t.loading,c=a?o.Suspense:o.Fragment,d=t.ssr?(0,r.jsxs)(r.Fragment,{children:["u"<typeof window?(0,r.jsx)(l.PreloadChunks,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(i.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(c,{...a?{fallback:s}:{},children:d})}return c.displayName="LoadableComponent",c}},770703,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o}});let r=e.r(555682)._(e.r(869093));function o(e,t){let n={};"function"==typeof e&&(n.loader=e);let o={...n,...t};return(0,r.default)({...o,modules:o.loadableGenerated?.modules})}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},755838,(e,t,n)=>{"use strict";var r=e.r(271645),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,l=r.useEffect,s=r.useLayoutEffect,a=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,c=r[1];return s(function(){o.value=n,o.getSnapshot=t,u(o)&&c({inst:o})},[e,n,t]),l(function(){return u(o)&&c({inst:o}),e(function(){u(o)&&c({inst:o})})},[e]),a(n),n};n.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},802239,(e,t,n)=>{"use strict";e.i(247167),t.exports=e.r(755838)},752822,(e,t,n)=>{"use strict";var r=e.r(271645),o=e.r(802239),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},l=o.useSyncExternalStore,s=r.useRef,a=r.useEffect,u=r.useMemo,c=r.useDebugValue;n.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=s(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;var p=l(e,(d=u(function(){function e(e){if(!a){if(a=!0,l=e,e=r(e),void 0!==o&&f.hasValue){var t=f.value;if(o(t,e))return s=t}return s=e}if(t=s,i(l,e))return t;var n=r(e);return void 0!==o&&o(t,n)?(l=e,t):(l=e,s=n)}var l,s,a=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,n,r,o]))[0],d[1]);return a(function(){f.hasValue=!0,f.value=p},[p]),c(p),p}},430224,(e,t,n)=>{"use strict";e.i(247167),t.exports=e.r(752822)},416987,e=>{"use strict";let t,n,r;var o,i,l,s,a,u,c,d,f,p,h,m,g,x,v=e.i(271645);function y(){let{storageKeyPrefix:e}=C();return(0,v.useMemo)(()=>({of:t=>b(e,t),AuthField:t=>b(e,`auth-${t}`)}),[e])}function b(e="fumadocs-openapi-",t){return e+t}var w=e.i(843476);let j=(0,v.createContext)(null),k=(0,v.createContext)(null);function C(){let e=(0,v.use)(j);if(!e)throw Error("Component must be used under <ApiProvider />");return e}function S(){let e=(0,v.use)(k);if(!e)throw Error("Component must be used under <ApiProvider />");return e}function E({children:e,ctx:t}){return(0,w.jsx)(j,{value:t,children:e})}function O({servers:e,children:t}){let n=y().of("server-url"),[r,o]=(0,v.useState)(()=>
1{if(!e||0===e.length)return null;let t=e[0];return{name:t.name,url:t.url,variables:N(t)}});return(0,v.useEffect)(()=>{let e=localStorage.getItem(n);if(e)try{let t=JSON.parse(e);"object"==typeof t&&null!==t&&"url"in t&&"string"==typeof t.url&&"variables"in t&&"object"==typeof t.variables&&null!==t.variables&&o(t)}catch{}},[n]),(0,w.jsx)(k,{value:(0,v.useMemo)(()=>({servers:e,server:r,setServerVariables(e){o(t=>{if(!t)return null;let r={...t,variables:e};return localStorage.setItem(n,JSON.stringify(r)),r})},setServer(t){let r=e?.find(e=>e.url===t);if(!r)return;let i={name:r.name,url:t,variables:N(r)};localStorage.setItem(n,JSON.stringify(i)),o(i)}}),[r,e,n]),children:t})}function N(e){let t={};if(!e.variables)return t;for(let[n,r]of Object.entries(e.variables))void 0!==r.default&&(t[n]=String(r.default));return t}e.i(816374);var T=e.i(128769),A=e.i(144324);async function M(e,t){let n=e.getBundledThemes(),r=t.filter(t=>{if("string"==typeof t&&!(t in n))return!1;try{return e.getTheme(t),!1}catch{return!0}});r.length>0&&await e.loadTheme(...r)}function R(e){let t;return{init:n=>t=e.init(n),getOrInit(){return t??this.init()}}}async function I(t,n,r){let{fallbackLanguage:o="text",...i}=r,{isSpecialLang:l}=await e.A(933729);return l(i.lang)||i.lang in t.getBundledLanguages()||t.getLoadedLanguages().includes(i.lang)||(i.lang=o),await Promise.all([M(t,"theme"in i?[i.theme]:Object.values(i.themes).filter(e=>void 0!==e)),t.loadLanguage(i.lang)]),t.codeToHast(n,i)}var $=e.i(144689);let P=(0,v.createContext)(void 0);function L(e){let t=(0,v.use)(P);return(0,w.jsx)(A.CodeBlock,{...e,...t,className:(0,T.cn)("my-0",e.className,t?.className),children:(0,w.jsx)(A.Pre,{children:e.children})})}function D({lang:e,code:t,codeblock:n,options:r,wrapInSuspense:o=!0,highlighter:i}){let l=(0,v.useId)(),s={lang:e,defaultColor:!1,...r,components:{pre:L,...r.components}},a=function(e,t,n,r){let[o,i]=(0,v.useState)(n.defaultValue),l=(0,v.useRef)(null);return(0,v.useEffect)(()=>{let r=async function(){return(0,$.toJsxRuntime)(await I("function"==typeof e?await e():e,t,n),{...w,components:n.components})}();return l.current=r,r.then(e=>{l.current===r&&i(e)}),()=>{l.current=null}},r),o}(i,t,s,[l,e,t]);return o&&(a??=(0,w.jsx)(z,{code:t,components:s.components})),(0,w.jsx)(P,{value:n,children:a})}function z({code:e,components:t={}}){let{pre:n="pre",code:r="code"}=t;return(0,w.jsx)(n,{children:(0,w.jsx)(r,{children:e.split("\n").map((e,t)=>(0,w.jsx)("span",{className:"line",children:e},t))})})}function F(e){let{shiki:t,shikiOptions:n,renderCodeBlock:r,components:{CodeBlock:o}={}}=C();return r?r(e):o?(0,w.jsx)(o,{...e}):(0,w.jsx)(D,{highlighter:()=>t.getOrInit(),options:n,...e})}function U(e,{path:t,query:n}){for(let n in t){let r=t[n];e=e.replace(`{${n}}`,r.value)}let[r,o]=e.split("?",2),i=new URLSearchParams(o||"");for(let e in n){let t=n[e];if(t&&0!==t.values.length)for(let n of(i.delete(e),t.values))i.append(e,n)}return i.size>0?`${r}?${i}`:r}function H(e){let t;return t=new Map(e?.map()),{add(e,n){t.set(e,n)},get:e=>t.get(e),addInline(e){let n=e.source,r=e.id??e.lang;n?t.set(r,{lang:e.lang,label:e.label,generate:()=>"string"==typeof n?n:""}):this.remove(r)},remove:e=>t.delete(e),map:()=>t}}var _=e.i(316211);function B(e){let[t,n]=(0,v.useState)(!1),[r,o]=(0,v.useState)(),[i,l]=(0,v.useState)(),s=(0,v.useRef)(e);return s.current=e,(0,v.useMemo)(()=>({isLoading:t,data:r,error:i,start:(...e)=>(n(!0),s.current(...e).then(e=>(o(e),l(void 0),e)).catch(e=>{o(void 0),l(e)}).finally(()=>{n(!1)})),reset(){o(void 0),l(void 0),n(!1)}}),[i,r,t])}let V=(0,v.createContext)(null);function W(){let e=(0,v.use)(V);if(!e)throw Error("must use this component under <AuthProvider />");return e}function q({children:e}){let{dereferenced:t,resolve:n}=C().schema,r=t.components?.securitySchemes,[o,i]=(0,v.useState)({}),l=B(async(e,t)=>
1{let o=n(r?.[t.scheme]);if(!o||"oauth2"!==o.type)return;let l=o.flows?.authorizationCode;if(!l)return;let s=await fetch(l.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"authorization_code",code:e,redirect_uri:t.redirect_uri,client_id:t.client_id,client_secret:t.client_secret})});if(!s.ok)throw Error(await s.text());let{access_token:a,token_type:u="Bearer"}=await s.json(),c={type:"authorization_code",...t,token:`${u} ${a}`};i(e=>({...e,[t.scheme]:c}))});return(0,v.useEffect)(()=>{window.location.search.length>0&&function(){let e=new URLSearchParams(window.location.search),t=e.get("state"),n=e.get("code");if(!t||!n)return;let r=JSON.parse(t);l.start(n,r),window.history.replaceState(null,"",window.location.pathname)}(),window.location.hash.length>1&&function(){let e=new URLSearchParams(window.location.hash.slice(1)),t=e.get("state"),o=e.get("access_token"),l=e.get("token_type")??"Bearer";if(!t||!o)return;let s=JSON.parse(t),a=n(r?.[s.scheme]);if(!a||"oauth2"!==a.type||!a.flows?.implicit)return;let u={type:"implicit",client_id:s.client_id,token:`${l} ${o}`};i(e=>({...e,[s.scheme]:u})),window.history.replaceState(null,"",window.location.pathname)}()},[]),(0,w.jsx)(V,{value:(0,v.useMemo)(()=>({store:o,updatedSchemeId:Object.keys(o)[0]??null,isLoading:l.isLoading,error:l.error}),[o,l.isLoading,l.error]),children:e})}function G({md:e}){let{_default_processMarkdown:t,renderMarkdown:n,components:{Markdown:r}={}}=C();return n?n(e):r?(0,w.jsx)(r,{md:e}):(0,v.useMemo)(()=>t(e),[t,e])}function K(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return null===t||t===Object.prototype||null===Object.getPrototypeOf(t)}let Y=new WeakMap;function Z(e){if(!K(e)||"string"!=typeof e.$ref)return e;let t=Y.get(e);if(t)return t;let{$ref:n,"$ref-value":r,...o}=e,i=Z(r),l=o;return K(i)&&(l=0===Object.keys(o).length?i:{...i,...o}),Y.set(e,l),l}let J=e=>decodeURI(e.replace(/~1/g,"/").replace(/~0/g,"~")),X=e=>e.split("/").slice(1).map(J),Q=(e,t,n)=>{let[r,o]=e.split("#",2);return r?n.has(r)?o?o.startsWith("/")?`${n.get(r)}${o}`:n.get(`${r}#${o}`):n.get(r):void 0:o?o.startsWith("/")?o.slice(1):n.get(`${t}#${o}`):void 0},ee=e=>{if(e&&"object"==typeof e&&e.$id&&"string"==typeof e.$id)return e.$id},et=(e,t="",n=[],r=new Map,o=new WeakSet)=>{if("object"!=typeof e||null===e||o.has(e))return r;o.add(e);let i=ee(e);i&&r.set(i,n.join("/"));let l=i??t;for(let t in e.$anchor&&"string"==typeof e.$anchor&&r.set(`${l}#${e.$anchor}`,n.join("/")),e)"object"==typeof e[t]&&null!==e[t]&&et(e[t],l,[...n,t],r,o);return r};function en(e,t){return t.reduce((e,t)=>void 0===e.value||"object"!=typeof e.value||null===e.value?{context:"",value:void 0}:{context:ee(e.value)??e.context,value:e.value?.[t]},{context:"",value:e})}let er=Symbol("isMagicProxy"),eo=Symbol("magicProxyTarget"),ei="$ref-value",el="$ref",es=(e,t,n={root:e,proxyCache:new WeakMap,cache:new Map,schemas:et(e),currentContext:""})=>{if(!(e=>{if(null===e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t})(e)&&!Array.isArray(e))return e;if(n.proxyCache.has(e))return n.proxyCache.get(e);let r=new Proxy(e,{get(e,r,o){if(r===er)return!0;if(r===eo)return e;if("string"==typeof r&&r.startsWith("__scalar_")&&!t?.showInternal)return;let i=Reflect.get(e,el,o),l=ee(e);if(r===ei&&"string"==typeof i){if(n.cache.has(i))return n.cache.get(i);let e=Q(i,l??n.currentContext,n.schemas);if(void 0===e)return;let r=en(n.root,X(`/${e}`));if(ea(r.value))return r.value;let o=es(r.value,t,{...n,currentContext:r.context});return n.cache.set(i,o),o}let s=Reflect.get(e,r,o);return ea(s)?s:es(s,t,{...n,currentContext:l??n.currentContext})},set(e,r,o,i){let l=Reflect.get(e,el,i);if("string"==typeof r&&r.startsWith("__scalar_")&&!t?.showInternal)return!0;if(r===ei&&"string"==typeof l){let t=Q(l,ee(e)??n.currentContext,n.schemas);if(void 0===t)return;let r=X(`/${t}`);if(0===r.length)return!1;let i=()=>en(n.root,r.slice(0,-1)).value;if(void 0===i()){var s;s=n.root,r.slice(0,-1).reduce((e,t)=>(void 0===e[t]&&(isNaN(Number(t))?e[t]={}:e[t]=[]),e[t]),s),console.warn(`Trying to set $ref-value for invalid reference: ${l}
2
3Please fix your input file to fix this issue.`)}return i()[r.at(-1)]=o,!0}return Reflect.set(e,r,o,i)},deleteProperty:(e,t)=>Reflect.deleteProperty(e,t),has:(e,n)=>(!("string"==typeof n&&n.startsWith("__scalar_"))||!!t?.showInternal)&&(n===ei&&el in e||Reflect.has(e,n)),ownKeys(e){let n=Reflect.ownKeys(e).filter(e=>"string"!=typeof e||!(e.startsWith("__scalar_")&&!t?.showInternal));return el in e&&!n.includes(ei)&&n.push(ei),n},getOwnPropertyDescriptor(e,n){if("string"==typeof n&&n.startsWith("__scalar_")&&!t?.showInternal)return;let r=Reflect.get(e,el);return n===ei&&"string"==typeof r?{configurable:!0,enumerable:!0,value:void 0,writable:!1}:Reflect.getOwnPropertyDescriptor(e,n)}});return n.proxyCache.set(e,r),r},ea=e=>"object"==typeof e&&null!==e&&!0===e[er];function eu(e){return"object"!=typeof e||null===e?e:e[er]?e[eo]:e}let ec=["get","post","patch","delete","head","put"];function ed(e){return"application/json"in e?"application/json":Object.keys(e)[0]}var ef=e.i(225913);let ep=(0,ef.cva)("font-mono font-medium",{variants:{color:{green:"text-green-600 dark:text-green-400",yellow:"text-yellow-600 dark:text-yellow-400",red:"text-red-600 dark:text-red-400",blue:"text-blue-600 dar
3k:text-blue-400",orange:"text-orange-600 dark:text-orange-400"}}});function eh({className:e,color:t,...n}){return(0,w.jsx)("span",{className:(0,T.cn)(ep({color:t}),e),...n,children:n.children})}function em({children:e,...t}){return(0,w.jsx)(eh,{...t,color:function(e){switch(e.toUpperCase()){case"PUT":return"yellow";case"PATCH":return"orange";case"POST":return"blue";case"DELETE":return"red";default:return"green"}}(e),children:e.toUpperCase()})}var eg=e.i(197321);let ex=(0,v.createContext)(null);function ev({route:e,examples:t,defaultExampleId:n,children:r}){let[o,i]=(0,v.useState)(()=>n??t.at(0)?.id),l=(0,v.useRef)([]);return(0,w.jsx)(ex,{value:(0,v.useMemo)(()=>({example:o,route:e,setExample(e){let n=t.find(t=>t.id===e);if(n)for(let t of(i(e),l.current))t(n.data,n.encoded)},examples:t,setExampleData(e,n){for(let r of t)if(r.id===o){r.data=e,r.encoded=n;break}for(let t of l.current)t(e,n)},removeListener(e){l.current=l.current.filter(t=>t!==e)},addListener(e){let n=t.find(e=>e.id===o);e(n.data,n.encoded),l.current.push(e)}}),[o,e,t]),children:r})}function ey(){return(0,v.use)(ex)}let eb=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),ew=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var ej={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"};let ek=(0,v.createContext)({}),eC=(0,v.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:o="",children:i,iconNode:l,...s},a)=>{let{size:u=24,strokeWidth:c=2,absoluteStrokeWidth:d=!1,color:f="currentColor",className:p=""}=(0,v.useContext)(ek)??{},h=r??d?24*Number(n??c)/Number(t??u):n??c;return(0,v.createElement)("svg",{ref:a,...ej,width:t??u??ej.width,height:t??u??ej.height,stroke:e??f,strokeWidth:h,className:eb("lucide",p,o),...!i&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(s)&&{"aria-hidden":"true"},...s},[...l.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(i)?i:[i]])}),eS=(e,t)=>{let n=(0,v.forwardRef)(({className:n,...r},o)=>(0,v.createElement)(eC,{ref:o,iconNode:t,className:eb(`lucide-${ew(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r}));return n.displayName=ew(e),n},eE=eS("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),eO=eS("circle-x",[["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"}]]);var eN=e.i(532257),eT=(0,e.i(618979).__commonJSMin)((e,t)=>{let n=function(){};n.prototype=Object.create(null);let r=/; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu,o=/\\([\v\u0020-\u00ff])/gu,i=/^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u,l={type:"",parameters:new n};function s(e){let t,l,s;if("string"!=typeof e)throw TypeError("argument header is required and must be a string");let a=e.indexOf(";"),u=-1!==a?e.slice(0,a).trim():e.trim();if(!1===i.test(u))throw TypeError("invalid media type");let c={type:u.toLowerCase(),parameters:new n};if(-1===a)return c;for(r.lastIndex=a;l=r.exec(e);){if(l.index!==a)throw TypeError("invalid parameter format");a+=l[0].length,t=l[1].toLowerCase(),'"'===(s=l[2])[0]&&(s=s.slice(1,s.length-1),o.test(s)&&(s=s.replace(o,"$1"))),c.parameters[t]=s}if(a!==e.length)throw TypeError("invalid parameter format");return c}function a(e){let t,s,a;if("string"!=typeof e)return l;let u=e.indexOf(";"),c=-1!==u?e.slice(0,u).trim():e.trim();if(!1===i.test(c))return l;let d={type:c.toLowerCase(),parameters:new n};if(-1===u)return d;for(r.lastIndex=u;s=r.exec(e);){if(s.index!==u)return l;u+=s[0].length,t=s[1].toLowerCase(),'"'===(a=s[2])[0]&&(a=a.slice(1,a.length-1),o.test(a)&&(a=a.replace(o,"$1"))),d.parameters[t]=a}return u!==e.length?l:d}Object.freeze(l.parameters),Object.freeze(l),t.exports.default={parse:s,safeParse:a}
3,t.exports.parse=s,t.exports.safeParse=a,t.exports.defaultContentType=l});eT();var eA=e.i(713548),eM=eT();let eR=(0,ef.cva)("flex flex-col gap-2 mt-2 px-3 py-2 border-y bg-fd-secondary text-fd-secondary-foreground");function eI({data:e,reset:t,...n}){let r=(0,eN.useTranslations)({note:"playground result display"});return"client_error"===e.type?(0,w.jsxs)("div",{...n,className:(0,T.cn)(eR(),n.className),children:[(0,w.jsxs)("div",{className:"flex gap-1.5 items-center",children:[(0,w.jsx)(eO,{className:"size-4 text-red-500"}),(0,w.jsx)("p",{className:"text-sm font-medium me-auto",children:r("Client Error")}),(0,w.jsx)("button",{type:"button",className:(0,T.cn)((0,eA.buttonVariants)({size:"sm",variant:"outline"})),onClick:()=>t(),children:r("Close")})]}),(0,w.jsx)("p",{children:e.message})]}):(0,w.jsx)(e$,{data:e,reset:t,...n})}function e$({data:e,reset:t,...n}){var r;let o,i,l=(0,eN.useTranslations)({note:"playground result display"}),s=(r=e.status,i=(0,eN.useTranslations)({note:"playground status info"}),(0,v.useMemo)(()=>{switch(r){case 400:return{description:i("Bad Request"),color:"text-red-500",icon:eO};case 401:return{description:i("Unauthorized"),color:"text-red-500",icon:eO};case 403:return{description:i("Forbidden"),color:"text-red-500",icon:eO};case 404:return{description:i("Not Found"),color:"text-fd-muted-foreground",icon:eO};case 500:return{description:i("Internal Server Error"),color:"text-red-500",icon:eO}}return r>=200&&r<300?{description:i("Successful"),color:"text-green-500",icon:eE}:r>=400?{description:i("Error"),color:"text-red-500",icon:eO}:{color:"text-fd-muted-foreground",icon:eO}},[i,r])),{parameters:a,type:u}=(0,v.useMemo)(()=>(0,eM.safeParse)(e.headers.get("Content-Type")??"text/plain"),[e.headers]);if(u.startsWith("image/"))o=(0,w.jsx)(eL,{mime:u,buffer:e.body});else if(e.body.byteLength>0){let t=function(e){switch(e){case"application/json":return"json";case"text/html":return"html";case"text/css":return"css";case"text/csv":return"csv";case"application/javascript":case"application/x-javascript":return"js";case"application/xml":return"xml"}return e.endsWith("+json")?"json":e.endsWith("+xml")?"xml":e.startsWith("text/")?"text":null}(u);o=t?(0,w.jsx)(eP,{lang:t,charset:a.charset,data:e}):(0,w.jsx)("p",{className:"p-2 border rounded-lg bg-fd-card text-fd-card-foreground",children:l("Binary response body, {length} bytes",{variables:{length:String(e.body.byteLength)}})})}return(0,w.jsxs)("div",{...n,className:(0,T.cn)(eR(),n.className),children:[(0,w.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,w.jsx)(s.icon,{className:(0,T.cn)("size-4 shrink-0",s.color)}),(0,w.jsxs)("p",{className:"text-sm font-medium text-nowrap",children:[e.status," ",s.description]}),(0,w.jsx)("code",{className:"ms-auto text-xs text-fd-muted-foreground truncate",children:u}),(0,w.jsx)("button",{type:"button",className:(0,T.cn)((0,eA.buttonVariants)({size:"sm",variant:"outline"})),onClick:()=>t(),children:l("Close")})]}),o]})}function eP({lang:e,charset:t,data:n}){let r=(0,v.useMemo)(()=>{let r;if(t)try{r=new TextDecoder(t).decode(n.body)}catch{}if(r??=new TextDecoder("utf-8").decode(n.body),"json"===e)try{r=JSON.stringify(JSON.parse(r),null,2)}catch{}return r},[e,t,n.body]);return(0,w.jsx)(F,{lang:r.length>5e3?"text":e,code:r})}function eL({mime:e,buffer:t}){let[n,r]=(0,v.useState)(null);if((0,v.useEffect)(()=>{let n=new Blob([t],{type:e}),o=URL.createObjectURL(n);return r(o),()=>URL.revokeObjectURL(o)},[e,t]),n)return(0,w.jsx)("img",{src:n,alt:"",className:"w-full rounded-md border border-fd-border"})}function eD(e,t,n=[]){let r={method:e.method,body:e.body,bodyMediaType:e.bodyMediaType,cookie:{},header:{},path:{},query:{}};for(let o of["cookie","query","header","path"])for(let i in e[o]){let l=e[o][i];if(null==l)continue;let s=n.find(e=>e.name===i&&e.in===o)??{name:i,in:o},a=function(e,t){if(e.content)for(let n in e.content){let e=(0,eg.resolveMediaAdapter)(n,t);if(e)return t=>String(e.encode({body:t}))}}(s,t);if(a){"query"===o?r[o][i]={values:[a(l)]}:r[o][i]={value:a(l)};continue}switch(o){case"path":!function(e,t,n){let{explode:r=!1,name:o}=e;switch(e.style){case"label":if(Array.isArray(t)){n[e.name]={value:"."+t.join(r?".":",")};break}if("object"==typeof t){n[e.name]={value:"."+(r?Object.entries(t).map(([e,t])=>`${e}=${t}`).join("."):Object.entries(t).flat().join(","))};break}n[e.name]={value:`.${t}`};break;case"matrix":{let i=`;${o}=`;if(Array.isArray(t)){n[e.name]={value:r?`${i}${t.join(",")}`:`${i}${t.join(i)}`};break}if("object"==typeof t){n[e.name]={value:r?Object.entries(t).map(([e,t])=>`;${e}=${t}`).join(""):i+Object.entries(t).flat().join(",")};break}n[e.name]={value:`${i}${t}`};break}default:n[e.name]={value:ez(t,r)}}}(s,l,r.path);break;case"query":!function(e,t,n){let{style:r,explode:o=!0}=e;if("spaceDelimited"===r&&!o&&Array.isArray(t)){n[e.name]={values:[t.join(" ")]};return}if("pipeDelimited"===r&&!o&&Array.isArray(t)){n[e.name]={values:[t.join("|")]};return}if("deepObject"===r&&!Array.isArray(t)&&"object"==typeof t){for(let[r,o]of Object.entries(t))n[`${e.name}[${r}]`]={values:Array.isArray(o)?o:[String(o)]};return}if(Array.isArray(t)){n[e.name]={values:o?t:[t.join(",")]};return}if("object"==typeof t&&o){for(let[e,r]of Object.entries(t))n[e]={values:[String(r)]};return}if("object"==typeof t){n[e.name]={values:[Object.entries(t).flat().join(",")]};return}n[e.name]={values:[String(t)]}}(s,l,r.query);break;case"header":r.header[i]={value:ez(l,s.explode??!1)};break;case"cookie":!function(e,t,n){let{explode:r=!0}=e;if(Array.isArray(t))n[e.name]={value:r?t.map(t=>`${e.name}=${t}`).join("&"):t.join(",")};else if("object"==typeof t&&r)for(let[e,r]of Object.entries(t))n[e]={value:String(r)};else"object"==typeof t?n[e.name]={value:Object.entries(t).flat().join(",")}:n[e.name]={value:String(t)}}(s,l,r.cookie)}}return r}function ez(e,t){return Array.isArray(e)?e.join(","):"object"==typeof e?t?Object.entries(e).map(([e,t])=>`${e}=${t}`).join(","):Object.entries(e).flat().join(","):String(e)}let eF=eS("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),eU=(...e)=>
3e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),eH=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var e_={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"};let eB=(0,v.createContext)({}),eV=(0,v.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:o="",children:i,iconNode:l,...s},a)=>{let{size:u=24,strokeWidth:c=2,absoluteStrokeWidth:d=!1,color:f="currentColor",className:p=""}=(0,v.useContext)(eB)??{},h=r??d?24*Number(n??c)/Number(t??u):n??c;return(0,v.createElement)("svg",{ref:a,...e_,width:t??u??e_.width,height:t??u??e_.height,stroke:e??f,strokeWidth:h,className:eU("lucide",p,o),...!i&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(s)&&{"aria-hidden":"true"},...s},[...l.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(i)?i:[i]])}),eW=(e,t)=>{let n=(0,v.forwardRef)(({className:n,...r},o)=>(0,v.createElement)(eV,{ref:o,iconNode:t,className:eU(`lucide-${eH(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r}));return n.displayName=eH(e),n},eq=eW("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),eG=eW("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),eK=eW("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s([],564623),e.i(564623);let eY={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},eZ={...eY,position:"fixed",top:0,left:0},eJ={...eY,position:"absolute"},eX={};function eQ(e,t){let n=v.useRef(eX);return n.current===eX&&(n.current=e(t)),n}function e0(e,t,n,r){var o,i,l,s,a;let u=eQ(e1).current;return o=u,i=e,l=t,s=n,a=r,(o.refs[0]!==i||o.refs[1]!==l||o.refs[2]!==s||o.refs[3]!==a)&&e2(u,[e,t,n,r]),u.callback}function e1(){return{callback:null,cleanup:null,refs:[]}}function e2(e,t){if(e.refs=t,t.every(e=>null==e)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let o=t[e];if(null!=o)switch(typeof o){case"function":{let t=o(n);"function"==typeof t&&(r[e]=t);break}case"object":o.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(null!=n)switch(typeof n){case"function":{let t=r[e];"function"==typeof t?t():n(null);break}case"object":n.current=null}}}}}}function e4(e){let t=v.useRef(!0);t.current&&(t.current=!1,e())}function e5(e){let[t,n]=v.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}function e7({controlled:e,default:t,name:n,state:r="value"}){let{current:o}=v.useRef(void 0!==e),[i,l]=v.useState(t),s=v.useCallback(e=>{o||l(e)},[]);return[o?e:i,s]}let e6="u">typeof document?v.useLayoutEffect:()=>{},e3={...v},e9=e3.useInsertionEffect,e8=e9&&e9!==e3.useLayoutEffect?e9:e=>e();function te(e){let t=eQ(tt).current;return t.next=e,e8(t.effect),t.trampoline}function tt(){let e={next:void 0,callback:tn,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function tn(){}function tr(e){let t=eQ(to,e).current;return t.next=e,e6(t.effect),t}function to(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var ti=e.i(802239),tl=e.i(430224);let ts=parseInt(v.version,10),ta=ts>=19?function(e,n,r,o,i){let l;if(!t){let t;return t=v.useCallback(()=>n(e.getSnapshot(),r,o,i),[e,n,r,o,i]),(0,ti.useSyncExternalStore)(e.subscribe,t,t)}let s=t.syncIndex;return t.syncIndex+=1,t.didInitialize?(l=t.syncHooks[s]).store===e&&l.selector===n&&Object.is(l.a1,r)&&Object.is(l.a2,o)&&Object.is(l.a3,i)||(l.store!==e&&(t.didChangeStore=!0),l.store=e,l.selector=n,l.a1=r,l.a2=o,l.a3=i,l.value=n(e.getSnapshot(),r,o,i)):(l={
3store:e,selector:n,a1:r,a2:o,a3:i,value:n(e.getSnapshot(),r,o,i)},t.syncHooks.push(l)),l.value}:function(e,t,n,r,o){return(0,tl.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,o))};[].push({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){let r=e.syncHooks[n],o=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,o)||(t=!0,r.value=o)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,ti.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});class tu{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t]))return void this.setState({...this.state,...e})}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return ta(this,e,t,n,r)}}function tc(){}let td=Object.freeze([]),tf=Object.freeze({}),tp=[];function th(e){v.useEffect(e,tp)}let tm=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,this.callbacksCount-=1)}};class tg{static create(){return new tg}static request(e){return tm.request(e)}static cancel(e){return tm.cancel(e)}currentId=null;request(e){this.cancel(),this.currentId=tm.request(()=>{this.currentId=null,e()})}cancel=()=>{null!==this.currentId&&(tm.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}function tx(){let e=eQ(tg.create).current;return th(e.disposeEffect),e}class tv{static create(){return new tv}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}function ty(){let e=eQ(tv.create).current;return th(e.disposeEffect),e}var tb=e.i(229315);function tw(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function tj(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&(0,tb.isShadowRoot)(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function tk(e){return"composedPath"in e?e.composedPath()[0]:e.target}let tC="data-base-ui-focusable",tS="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",tE="ArrowLeft",tO="ArrowRight",tN="ArrowUp",tT="ArrowDown";function tA(e,t){if(!(0,tb.isElement)(e))return!1;if(t.hasElement(e))return!e.hasAttribute("data-trigger-disabled");for(let[,n]of t.entries())if(tj(n,e))return!n.hasAttribute("data-trigger-disabled");return!1}function tM(e,t){return null!=t&&("composedPath"in e?e.composedPath().includes(t):null!=e.target&&t.contains(e.target))}function tR(e){return(0,tb.isHTMLElement)(e)&&e.matches(tS)}function tI(e){return!!e&&"combobox"===e.getAttribute("role")&&tR(e)}function t$(e){return e?e.hasAttribute(tC)?e:e.querySelector(`[${tC}]`)||e:null}e.s([],564949),e.i(564949);let{userAgent:tP,platform:tL,maxTouchPoints:tD}="u"<typeof navigator?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0},tz=tP.toLowerCase(),tF=tL.toLowerCase(),tU=/^i(os$|p)/.test(tF)||"macintel"===tF&&tD>1,tH="android",t_=tF===tH||tz.includes(tH),tB=!tU&&tF.startsWith("mac"),tV=tF.startsWith("win"),tW=!t_&&/^(linux|chrome os)/.test(tF),tq=tB||tU;e.s(["android",0,t_,"apple",0,tq,"ios",0,tU,"linux",0,tW,"mac",0,tB,"windows",0,tV],503720);var tG=e.i(503720);let tK="u">typeof CSS&&!!CSS.supports?.("-webkit-backdrop-filter:none"),tY=!tK&&tz.includes("firefox"),tZ=!tK&&tz.includes("chrom");e.s(["blink",0,tZ,"gecko",0,tY,"webkit",0,tK],879850);var tJ=e.i(879850);e.s(["voiceOver",0,tq],999170);var tX=e.i(999170);let tQ=/jsdom|happydom/.test(tz);e.s(["jsdom",0,tQ],736174);var t0=e.i(736174);e.s(["engine",0,tJ,"env",0,t0,"os",0,tG,"screenReader",0,tX],179214);var t1=e.i(179214),t1=t1;function t2(e){e.preventDefault(),e.stopPropagation()}function t4(e){return""===e.pointerType&&!!e.isTrusted||(t1.os.android&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function t5(e){return!t1.env.jsdom&&(!t1.os.android&&0===e.width&&0===e.height||t1.os.android&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function t7(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function t6(e,t,n,r){let o=!1,i=!1,l=r??tf;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,...l}}e.s(["cancelOpen",0,"cancel-open","chipRemovePress",0,"chip-remove-press","clearPress",0,"clear-press","closePress",0,"close-press","closeWatcher",0,"close-watcher","decrementPress",0,"decrement-press","disabled",0,"disabled","drag",0,"drag","escapeKey",0,"escape-key","focusOut",0,"focus-out","imperativeAction",0,"imperative-action","incrementPress",0,"increment-press","initial",0,"initial","inputBlur",0,"input-blur","inputChange",0,"input-change","inputClear",0,"input-clear","
3inputPaste",0,"input-paste","inputPress",0,"input-press","itemPress",0,"item-press","keyboard",0,"keyboard","linkPress",0,"link-press","listNavigation",0,"list-navigation","missing",0,"missing","none",0,"none","outsidePress",0,"outside-press","pointer",0,"pointer","scrub",0,"scrub","siblingOpen",0,"sibling-open","swipe",0,"swipe","trackPress",0,"track-press","triggerFocus",0,"trigger-focus","triggerHover",0,"trigger-hover","triggerPress",0,"trigger-press","wheel",0,"wheel","windowResize",0,"window-resize"],216856);var t3=e.i(216856),t3=t3;function t9(e,t={}){let{enabled:n=!0,event:r="click",toggle:o=!0,ignoreMouse:i=!1,stickIfOpen:l=!0,touchOpenDelay:s=0,reason:a=t3.triggerPress}=t,u="rootStore"in e?e.rootStore:e,c=u.context.dataRef,d=v.useRef(void 0),f=tx(),p=ty(),h=v.useMemo(()=>{function e(e,t,n,r){let o=t6(a,t,n);e&&"touch"===r&&s>0?p.start(s,()=>{u.setOpen(!0,o)}):u.setOpen(e,o)}function t(e,t,n){let r=c.current.openEvent,i=u.select("domReferenceElement")!==t;return!!e&&!!i||!e||!o||!!r&&!!l&&!n(r.type)}return{onPointerDown(e){d.current=e.pointerType},onMouseDown(n){let o=d.current,l=n.nativeEvent,s=u.select("open");if(0!==n.button||"click"===r||t7(o,!0)&&i)return;let a=t(s,n.currentTarget,e=>"click"===e||"mousedown"===e),c=tk(l);if(tR(c))return void e(a,l,c,o);let p=n.currentTarget;f.request(()=>{e(a,l,p,o)})},onClick(n){if("mousedown-only"===r)return;let o=d.current;if("mousedown"===r&&o){d.current=void 0;return}t7(o,!0)&&i||e(t(u.select("open"),n.currentTarget,e=>"click"===e||"mousedown"===e||"keydown"===e||"keyup"===e),n.nativeEvent,n.currentTarget,o)},onKeyDown(){d.current=void 0}}},[c,r,i,a,u,l,o,f,p,s]);return v.useMemo(()=>n?{reference:h}:tf,[n,h])}function t8(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ne(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function nt(e){return e?.ownerDocument||document}var t1=t1;let nn=0,nr=e3.useId;function no(e,t){if(void 0!==nr){let n=nr();return e??(t?`${t}-${n}`:n)}return function(e,t="mui"){let[n,r]=v.useState(e),o=e||n;return v.useEffect(()=>{null==n&&(nn+=1,r(`${t}-${nn}`))},[n,t]),o}(e,t)}function ni(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(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 nl{nodesRef={current:[]};events=ni();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);-1!==t&&this.nodesRef.current.splice(t,1)}}let ns=v.createContext(null),na=v.createContext(null),nu=()=>v.useContext(ns)?.id||null,nc=e=>{let t=v.useContext(na);return e??t};function nd(e){let{children:t,id:n}=e,r=nu();return(0,w.jsx)(ns.Provider,{value:v.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function nf(e){let{children:t,externalTree:n}=e,r=eQ(()=>n??new nl).current;return(0,w.jsx)(na.Provider,{value:r,children:t})}var t3=t3;function np(e){return`data-base-ui-${e}`}function nh(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...nh(e,t.id,n)])}function nm(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function ng(){return!1}function nx(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:o=!0,outsidePressEvent:i="sloppy",referencePress:l=ng,bubbles:s,externalTree:a}=t,u="rootStore"in e?e.rootStore:e,c=u.useState("open"),d=u.useState("floatingElement"),{dataRef:f}=u.context,p=nc(a),h=te("function"==typeof o?o:()=>!1),m="function"==typeof o?h:o,g=!1!==m,x=te(()=>i),{escapeKey:y,outsidePress:b}={escapeKey:"boolean"==typeof s?s:s?.escapeKey??!1,outsidePress:"boolean"==typeof s?s:s?.outsidePress??!0},w=v.useRef(!1),j=v.useRef(!1),k=v.useRef(!1),C=v.useRef(!1),S=v.useRef(""),E=v.useRef(null),O=ty(),N=ty(),T=te(()=>{N.clear(),f.current.insideReactTree=!1}),A=te(e=>{let t=f.current.floatingContext?.nodeId;return(p?nh(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),M=te(e=>tM(e,u.select("floatingElement"))||tM(e,u.select("domReferenceElement"))),R=te(e=>{l()&&u.setOpen(!1,t6(t3.triggerPress,e.nativeEvent))}),I=te(e=>{if(!c||!n||!r||"Escape"!==e.key||C.current||!y&&A("__escapeKeyBubbles"))return;let t="nativeEvent"in e?e.nativeEvent:e,o=t6(t3.escapeKey,t);u.setOpen(!1,o),o.isCanceled||e.preventDefault(),y||o.isPropagationAllowed||e.stopPropagation()}),$=te(()=>{f.current.insideReactTree=!0,N.start(0,T)}),P=te(e=>{if(!c||!n||0!==e.button)return;let t=tk(e.nativeEvent);tj(u.select("floatingElement"),t)&&(w.current||(w.current=!0,j.current=!1))}),L=te(e=>{!c||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&w.current&&(j.current=!0)});v.useEffect(()=>{if(!c||!n)return;f.current.__escapeKeyBubbles=y,f.current.__outsidePressBubbles=b;let e=new tv,t=new tv;function o(){k.current=!0,t.start(0,()=>{k.current=!1})}function i(){w.current=!1,j.current=!1}function l(){let e=S.current,t=x(),n="function"==typeof t?t():t;return"string"==typeof n?n:n["pen"!==e&&e?e:"mouse"]}
3function s(e){let t=f.current.floatingContext?.nodeId,n=p&&nh(p.nodesRef.current,t).some(t=>tM(e,t.context?.elements.floating));return M(e)||n}function a(e){let n;if("intentional"===(n=l())&&"click"!==e.type||"sloppy"===n&&"click"===e.type){"click"===e.type||M(e)||(t.clear(),k.current=!1),T();return}if(f.current.insideReactTree)return void T();let r=tk(e),o=`[${np("inert")}]`,i=(0,tb.isElement)(r)?r.getRootNode():null,a=Array.from(((0,tb.isShadowRoot)(i)?i:nt(u.select("floatingElement"))).querySelectorAll(o)),c=u.context.triggerElements;if(r&&(c.hasElement(r)||c.hasMatchingElement(e=>tj(e,r))))return;let d=(0,tb.isElement)(r)?r:null;for(;d&&!(0,tb.isLastTraversableNode)(d);){let e=(0,tb.getParentNode)(d);if((0,tb.isLastTraversableNode)(e)||!(0,tb.isElement)(e))break;d=e}if(!(a.length&&(0,tb.isElement)(r)&&!r.matches("html,body")&&!tj(r,u.select("floatingElement"))&&a.every(e=>!tj(d,e)))){if((0,tb.isHTMLElement)(r)&&!("touches"in e)){let t=(0,tb.isLastTraversableNode)(r),n=(0,tb.getComputedStyle)(r),o=/auto|scroll/,i=t||o.test(n.overflowX),l=t||o.test(n.overflowY),s=i&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,a=l&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,u="rtl"===n.direction,c=a&&(u?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),d=s&&e.offsetY>r.clientHeight;if(c||d)return}if(!s(e)){if("intentional"===l()&&k.current){t.clear(),k.current=!1;return}"function"==typeof m&&!m(e)||A("__outsidePressBubbles")||(u.setOpen(!1,t6(t3.outsidePress,e)),T())}}}function h(e){if("sloppy"!==l()||!u.select("open")||!n||M(e))return;let t=e.touches[0];t&&(E.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},O.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function v(e,t){let n=tk(e);if(!n)return;let r=t8(n,e.type,()=>{t(e),r()})}function N(e){O.clear(),"pointerdown"===e.type&&(S.current=e.pointerType),("mousedown"!==e.type||!E.current||E.current.dismissOnMouseDown)&&v(e,e=>{if("pointerdown"===e.type)"sloppy"!==l()||"touch"===e.pointerType||!u.select("open")||!n||M(e)||a(e);else a(e)})}function R(e){if(!w.current)return;let n=j.current;if(i(),"intentional"===l()){if("pointercancel"===e.type){n&&o();return}s(e)||(n?o():("function"!=typeof m||m(e))&&(t.clear(),k.current=!0,T()))}}function $(e){if("sloppy"!==l()||!E.current||M(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),o=Math.sqrt(n*n+r*r);o>5&&(E.current.dismissOnTouchEnd=!0),o>10&&(a(e),O.clear(),E.current=null)}function P(e){"sloppy"!==l()||!E.current||M(e)||(E.current.dismissOnTouchEnd&&a(e),O.clear(),E.current=null)}let L=nt(d),D=ne(r&&ne(t8(L,"keydown",I),t8(L,"compositionstart",function(){e.clear(),C.current=!0}),t8(L,"compositionend",function(){e.start(5*!!t1.engine.webkit,()=>{C.current=!1})})),g&&ne(t8(L,"click",N,!0),t8(L,"pointerdown",N,!0),t8(L,"pointerup",R,!0),t8(L,"pointercancel",R,!0),t8(L,"mousedown",N,!0),t8(L,"mouseup",R,!0),t8(L,"touchstart",function(e){S.current="touch",v(e,h)},!0),t8(L,"touchmove",function(e){v(e,$)},!0),t8(L,"touchend",function(e){v(e,P)},!0)));return()=>{D(),e.clear(),t.clear(),i(),k.current=!1}},[f,d,r,g,m,c,n,y,b,I,T,x,A,M,p,u,O]),v.useEffect(T,[m,T]);let D=v.useMemo(()=>({onKeyDown:I,onPointerDown:R,onClick:R}),[I,R]),z=v.useMemo(()=>({onKeyDown:I,onPointerDown:L,onMouseDown:L,onClickCapture:$,onMouseDownCapture(e){$(),P(e)},onPointerDownCapture(e){$(),P(e)},onMouseUpCapture:$,onTouchEndCapture:$,onTouchMoveCapture:$}),[I,$,P,L]);return v.useMemo(()=>n?{reference:D,floating:z,trigger:D}:{},[n,D,z])}class nv{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(void 0!==n&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}let ny=function(e,...t){let n=new URL("https://base-ui.com/production-error");
3return n.searchParams.set("code",e.toString()),t.forEach(e=>n.searchParams.append("args[]",e)),`Base UI error #${e}; visit ${n} for the full message.`},nb=(e,t,n,r,o,i,...l)=>{let s;if(l.length>0)throw Error(ny(1));if(e&&t&&n&&r&&o&&i)s=(l,s,a,u)=>i(e(l,s,a,u),t(l,s,a,u),n(l,s,a,u),r(l,s,a,u),o(l,s,a,u),s,a,u);else if(e&&t&&n&&r&&o)s=(i,l,s,a)=>o(e(i,l,s,a),t(i,l,s,a),n(i,l,s,a),r(i,l,s,a),l,s,a);else if(e&&t&&n&&r)s=(o,i,l,s)=>r(e(o,i,l,s),t(o,i,l,s),n(o,i,l,s),i,l,s);else if(e&&t&&n)s=(r,o,i,l)=>n(e(r,o,i,l),t(r,o,i,l),o,i,l);else if(e&&t)s=(n,r,o,i)=>t(e(n,r,o,i),r,o,i);else if(e)s=e;else throw Error("Missing arguments");return s};class nw extends tu{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){v.useDebugValue(e);let n=this;e6(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;e6(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;e6(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){v.useDebugValue(e);let n=this,r=void 0!==t;e6(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){return(0,this.selectors[e])(this.state,t,n,r)}useState(e,t,n,r){return v.useDebugValue(e),ta(this,this.selectors[e],t,n,r)}useContextCallback(e,t){v.useDebugValue(e);let n=te(t??tc);this.context[e]=n}useStateSetter(e){let t=v.useRef(void 0);return void 0===t.current&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n,r=(n="function"==typeof e?e:this.selectors[e])(this.state);return t(r,r,this),this.subscribe(e=>{let o=n(e);if(!Object.is(r,o)){let e=r;r=o,t(o,e,this)}})}}let nj={open:nb(e=>e.open),transitionStatus:nb(e=>e.transitionStatus),domReferenceElement:nb(e=>e.domReferenceElement),referenceElement:nb(e=>e.positionReference??e.referenceElement),floatingElement:nb(e=>e.floatingElement),floatingId:nb(e=>e.floatingId)};class nk extends nw{constructor(e){const{syncOnly:t,nested:n,onOpenChange:r,triggerElements:o,...i}=e;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:ni(),nested:n,triggerElements:o},nj),this.syncOnly=t}syncOpenEvent=(e,t)=>{let n;e&&this.state.open&&(null==t||"click"!==(n=t.type)&&"mousedown"!==n&&"keydown"!==n&&"keyup"!==n)||(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>
3{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit("openchange",n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}}function nC(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,o=no(),i=null!=nu(),l=eQ(()=>new nk({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new nv,floatingId:o,syncOnly:!1,nested:i})).current;return e6(()=>{let e={open:t,floatingId:o};void 0!==r.reference&&(e.referenceElement=r.reference,e.domReferenceElement=(0,tb.isElement)(r.reference)?r.reference:null),void 0!==r.floating&&(e.floatingElement=r.floating),l.update(e)},[t,o,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=i,l}var t3=t3;function nS(e,t){return t<0||t>=e.length}function nE(e,t){return nN(e.current,{disabledIndices:t})}function nO(e,t){return nN(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function nN(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&&nT(e,i,r))return i}function nT(e,t,n){if("function"==typeof n?n(t):n?.includes(t)??!1)return!0;let r=e[t];return!!r&&(!nA(r)||!n&&(r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")))}function nA(e,t=e?(0,tb.getComputedStyle)(e):null){var n;return!!e&&!!e.isConnected&&!!t&&"hidden"!==(n=t).visibility&&"collapse"!==n.visibility&&("function"==typeof e.checkVisibility?e.checkVisibility():"none"!==t.display&&"contents"!==t.display)}let nM=0;function nR(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:o}=t;function i(){(!o||o())&&e?.focus({preventScroll:n})}if(cancelAnimationFrame(nM),r)return i(),tc;let l=requestAnimationFrame(i);return nM=l,()=>{nM===l&&(cancelAnimationFrame(l),nM=0)}}function nI(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function n$(e,t){return nI(t,e===tN||e===tT,e===tE||e===tO)}function nP(e,t,n){return nI(t,e===tT,n?e===tE:e===tO)||"Enter"===e||" "===e||""===e}let nL=v.createContext(null),nD=v.createContext(null);function nz(){let e=v.useContext(nL);if(null===e)throw Error(ny(60));return e}function nF(){let e=v.useContext(nD);if(null===e)throw Error(ny(61));return e}let nU=((o={}).disabled="data-disabled",o.valid="data-valid",o.invalid="data-invalid",o.touched="data-touched",o.dirty="data-dirty",o.filled="data-filled",o.focused="data-focused",o),nH={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},n_={disabled:!1,...nH},nB={valid:e=>null===e?null:e?{[nU.valid]:""}:{[nU.invalid]:""}},nV={invalid:void 0,name:void 0,validityData:{state:{badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},errors:[],error:"",value:"",initialValue:null},setValidityData:tc,disabled:void 0,touched:nH.touched,setTouched:tc,dirty:nH.dirty,setDirty:tc,filled:nH.filled,setFilled:tc,focused:nH.focused,setFocused:tc,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:n_,markedDirtyRef:{current:!1}
3,registerFieldControl:tc,validation:{getValidationProps:(e,t=tf)=>t,inputRef:{current:null},registerInput:tc,commit:async()=>{},change:tc}},nW=v.createContext(nV);function nq(e=!0){let t=v.useContext(nW);if(t.setValidityData===tc&&!e)throw Error(ny(28));return t}function nG(e){return no(e,"base-ui")}let nK=v.createContext({controlId:void 0,registerControlId:tc,labelId:void 0,setLabelId:tc,messageIds:[],setMessageIds:tc,getDescriptionProps:e=>e});function nY(){return v.useContext(nK)}function nZ(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:i}=nY(),l=nG(t),s=n?o:void 0,a=eQ(()=>Symbol("labelable-control")),u=v.useRef(!1),c=v.useRef(null!=t),d=te(()=>{u.current&&i!==tc&&(u.current=!1,i(a.current,void 0))});return e6(()=>{let e;if(i!==tc){if(n){let n=r?.current;e=(0,tb.isElement)(n)&&null!=n.closest("label")?t??null:s??l}else if(null!=t)c.current=!0,e=t;else{if(!c.current)return void d();e=l}if(void 0===e)return void d();u.current=!0,i(a.current,e)}},[t,r,s,i,n,l,a,d]),v.useEffect(()=>d,[d]),o??l}function nJ(e,t=!1,n=!1){let[r,o]=v.useState(e&&t?"idle":void 0),[i,l]=v.useState(e);return e&&!i&&(l(!0),o("starting")),e||!i||"ending"===r||n||o("ending"),e||i||"ending"!==r||o(void 0),e6(()=>{if(!e&&i&&"ending"!==r&&n){let e=tg.request(()=>{o("ending")});return()=>{tg.cancel(e)}}},[e,i,r,n]),e6(()=>{if(!e||t)return;let n=tg.request(()=>{o(void 0)});return()=>{tg.cancel(n)}},[t,e]),e6(()=>{if(!e||!t)return;e&&i&&"idle"!==r&&o("starting");let n=tg.request(()=>{o("idle")});return()=>{tg.cancel(n)}},[t,e,i,r]),{mounted:i,setMounted:l,transitionStatus:r}}let nX=(e,t)=>Object.is(e,t);function nQ(e,t,n){return null==e||null==t?Object.is(e,t):n(e,t)}function n0(e,t,n){return e&&0!==e.length?e.findIndex(e=>void 0!==e&&nQ(e,t,n)):-1}function n1(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}function n2(e){return null!=e&&e.length>0&&"object"==typeof e[0]&&null!=e[0]&&"items"in e[0]}function n4(e,t){if(t&&null!=e)return t(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return n1(e)}function n5(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?n1(e.value):n1(e)}
3function n7(e,t,n){if(n&&null!=e)return n(e);if(e&&"object"==typeof e&&"label"in e&&null!=e.label)return e.label;if(t&&!Array.isArray(t))return t[e]??n4(e,n);if(Array.isArray(t)){let r=n2(t)?t.flatMap(e=>e.items):t;if(null==e||"object"!=typeof e){let t=r.find(t=>t.value===e);return t&&null!=t.label?t.label:n4(e,n)}if("value"in e){let t=r.find(t=>t&&t.value===e.value);if(t&&null!=t.label)return t.label}}return n4(e,n)}let n6={id:nb(e=>e.id),labelId:nb(e=>e.labelId),modal:nb(e=>e.modal),multiple:nb(e=>e.multiple),items:nb(e=>e.items),itemToStringLabel:nb(e=>e.itemToStringLabel),itemToStringValue:nb(e=>e.itemToStringValue),isItemEqualToValue:nb(e=>e.isItemEqualToValue),value:nb(e=>e.value),hasSelectedValue:nb(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return null!=t&&(n&&Array.isArray(t)?t.length>0:""!==n5(t,r))}),hasNullItemLabel:nb((e,t)=>!!t&&function(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(n2(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1}(e.items)),open:nb(e=>e.open),mounted:nb(e=>e.mounted),forceMount:nb(e=>e.forceMount),transitionStatus:nb(e=>e.transitionStatus),openMethod:nb(e=>e.openMethod),activeIndex:nb(e=>e.activeIndex),selectedIndex:nb(e=>e.selectedIndex),isActive:nb((e,t)=>e.activeIndex===t),isSelected:nb((e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>nQ(t,e,n)):nQ(t,r,n)}),isSelectedByFocus:nb((e,t)=>e.selectedIndex===t),popupProps:nb(e=>e.popupProps),triggerProps:nb(e=>e.triggerProps),triggerElement:nb(e=>e.triggerElement),positionerElement:nb(e=>e.positionerElement),listElement:nb(e=>e.listElement),popupSide:nb(e=>e.popupSide),scrollUpArrowVisible:nb(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:nb(e=>e.scrollDownArrowVisible),hasScrollArrows:nb(e=>e.hasScrollArrows)};var t3=t3,n3=e.i(174080);function n9(e){return null==e?e:"current"in e?e.current:e}let n8=((i={}).startingStyle="data-starting-style",i.endingStyle="data-ending-style",i),re={[n8.startingStyle]:""},rt={[n8.endingStyle]:""},rn={transitionStatus:e=>"starting"===e?re:"ending"===e?rt:null};function rr(e,t=!1,n=!0){let r=tx();return te((o,i=null)=>{r.cancel();let l=n9(e);if(null==l)return;let s=()=>{n3.flushSync(o)};if("function"!=typeof l.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)return void o();function a(){Promise.all(l.getAnimations().map(e=>e.finished)).then(()=>{i?.aborted||s()}).catch(()=>{if(n){i?.aborted||s();return}let e=l.getAnimations();!i?.aborted&&e.length>0&&e.some(e=>e.pending||"finished"!==e.playState)&&a()})}if(t){let e=n8.startingStyle;if(!l.hasAttribute(e))return void r.request(a);let t=new MutationObserver(()=>{l.hasAttribute(e)||(t.disconnect(),a())});return t.observe(l,{attributes:!0,attributeFilter:[e]}),void i?.addEventListener("abort",()=>t.disconnect(),{once:!0})}r.request(a)})}function ro(e){let{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=te(o),l=rr(r,n,!1);v.useEffect(()=>{if(!t)return;let e=new AbortController;return l(i,e.signal),()=>{e.abort()}},[t,n,i,l])}let ri=v.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:tc,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function rl(e,t){let n=v.useRef(e),r=te(t);e6(()=>{n.current!==e&&r(n.current)},[e,r]),e6(()=>{n.current=e},[e])}var t1=t1;function rs(e,t){var n;let r,o,{onClick:i,onPointerDown:l}=(n=te((n,r)=>{("function"==typeof e?e():e)||t(r||(t1.os.ios?"touch":""))}),r=v.useRef(""),o=v.useCallback(e=>{e.defaultPrevented||(r.current=e.pointerType,n(e,e.pointerType))},[n]),{onClick:v.useCallback(e=>{0===e.detail?n(e,"keyboard"):("pointerType"in e?n(e,e.pointerType):n(e,r.current),r.current="")},[n]),onPointerDown:o});return v.useMemo(()=>({onClick:i,onPointerDown:l}),[i,l])}function ra(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function ru(e,t){return Math.max(0,e-t)}function rc(e,t){if(t<=0)return 0;let n=ra(e,0,t),r=t-n,o=n<=1,i=r<=1;return o&&i?n<=r?0:t:o?0:i?t:n}var t3=t3;let rd={tabIndex:-1,[tC]:""};function rf(e){return t=>"touch"!==t||e.current}function rp(e,t,n=!1){let r=no(),o=null!=nu(),i=v.useRef(null);void 0===e&&null===i.current&&(i.current=t(r,o));let l=e??i.current;return!function(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:o,nested:i,onOpenChange:l}=e,s=t.useState("open"),a=t.useState("activeTriggerElement"),u=t.useState(n?"popupElement":"positionerElement"),c=t.context.triggerElements,d=v.useRef(null);
3void 0===r&&null===d.current&&(d.current=new nk({open:s,transitionStatus:void 0,referenceElement:a,floatingElement:u,triggerElements:c,onOpenChange:l,floatingId:o,syncOnly:!0,nested:i}));let f=r??d.current;t.useSyncedValue("floatingId",o),e6(()=>{let e={open:s,floatingId:o,referenceElement:a,floatingElement:u};(0,tb.isElement)(a)&&(e.domReferenceElement=a),f.state.positionReference===f.state.referenceElement&&(e.positionReference=a),f.update(e)},[s,o,a,u,f]),f.context.onOpenChange=l,f.context.nested=i}({popupStore:l,treatPopupAsFloatingElement:n,floatingRootContext:l.state.floatingRootContext,floatingId:r,nested:o,onOpenChange:l.setOpen}),{store:l,internalStore:i.current}}function rh(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);let o=n?.id??null;(o||t)&&(e.activeTriggerId=o,e.activeTriggerElement=n??null)}function rm(e,t,n,r){let o,i,l=n.useState("isMountedByTrigger",e),s=(o=v.useRef(null),i=v.useRef(null),v.useCallback(t=>{if(void 0===e)return;let r=!1;if(null!==o.current){let e=o.current,t=i.current,l=n.context.triggerElements.getById(e);t&&l===t&&(n.context.triggerElements.delete(e),r=!0),o.current=null,i.current=null}if(null!==t&&(o.current=e,i.current=t,n.context.triggerElements.add(e,t),r=!0),r){let e=n.context.triggerElements.size;n.select("open")&&n.state.triggerCount!==e&&n.set("triggerCount",e)}},[n,e])),a=te(t=>{if(s(t),!t)return;let o=n.select("open"),i=n.select("activeTriggerId");i===e?n.update({activeTriggerElement:t,...o?r:null}):null==i&&o&&n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return e6(()=>{l&&n.update({activeTriggerElement:t.current,...r})},[l,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:l}}function rg(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState("open"),o=e.useState("triggerCount");e6(()=>{if(!r){0!==e.state.triggerCount&&e.set("triggerCount",0);return}let t=e.context.triggerElements.size,o={};e.state.triggerCount!==t&&(o.triggerCount=t);let i=e.select("activeTriggerId"),l=null;if(i){let t=e.context.triggerElements.getById(i);t?t!==e.state.activeTriggerElement&&(o.activeTriggerElement=t):l=i}if(!l&&!i&&1===t){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;o.activeTriggerId=e,o.activeTriggerElement=n}}(void 0!==o.triggerCount||void 0!==o.activeTriggerId||void 0!==o.activeTriggerElement)&&e.update(o),l&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===l&&!e.context.triggerElements.getById(l)){let t=t6(t3.none);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,o,n])}function rx(e,t,n){let{mounted:r,setMounted:o,transitionStatus:i}=nJ(e),l=t.useState("preventUnmountingOnClose"),s=!e&&l;t.useSyncedValues({mounted:r,transitionStatus:i,preventUnmountingOnClose:s});let a=te(()=>{o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return ro({enabled:r&&!e&&!s,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:i}}function rv(e,t){e.useSyncedValues(t),e6(()=>()=>{e.update({activeTriggerProps:tf,inactiveTriggerProps:tf,popupProps:tf})},[e])}function ry(e,t){e6(()=>{t||null===e.state.openMethod||e.set("openMethod",null)},[t,e]),e6(()=>()=>{null!==e.state.openMethod&&e.set("openMethod",null)},[e])}function rb(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}let rw={};function rj(e,t,n,r,o){if(!n&&!r&&!o&&!e)return rk(t);let i=rk(e);return t&&(i=rC(i,t)),n&&(i=rC(i,n)),r&&(i=rC(i,r)),o&&(i=rC(i,o)),i}function rk(e){return rE(e)?{...rO(e,rw)}:function(e){let t={...e};for(let e in t){let n=t[e];rS(e,n)&&(t[e]=rN(n))}return t}(e)}function rC(e,t){return rE(t)?rO(t,e):function(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case"style":e[n]=rb(e.style,r);break;case"className":e[n]=rA(e.className,r);break;default:rS(n,r)?e[n]=function(e,t){return t?e?(...n)=>{let r=n[0];if(rM(r)){rT(r);let o=t(...n);return r.baseUIHandlerPrevented||e?.(...n),o}let o=t(...n);return e?.(...n),o}:rN(t):e}(e[n],r):e[n]=r}}return e}(e,t)}function rS(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return 111===n&&110===r&&o>=65&&o<=90&&("function"==typeof t||void 0===t)}function rE(e){return"function"==typeof e}function rO(e,t){return rE(e)?e(t):e??rw}function rN(e){return e?(...t)=>{let n=t[0];return rM(n)&&rT(n),e(...t)}:e}function rT(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function rA(e,t){return t?e?t+" "+e:t:e}function rM(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}function rR(e){if(!v.isValidElement(e))return null;let t=e.props;return(ts>=19?t?.ref:e.ref)??null}function rI(e,t){return"function"==typeof e?e(t):e}function r$(e,t,n={}){let r=t.render,o=function(e,t={}){var n,r,o;let{className:i,style:l,render:s}=e,{state:a=tf,ref:u,props:c,stateAttributesMapping:d,enabled:f=!0}=t,p=f?"function"==typeof i?i(a):i:void 0,h=f?rI(l,a):void 0,m=f?function(e,t){let n={};for(let r in e){let o=e[r];if(t?.hasOwnProperty(r)){let e=t[r](o);null!=e&&Object.assign(n,e);continue}!0===o?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}(a,d):tf,g=f&&c?function(e){if(Array.isArray(e)){if(0===e.length)return rw;if(1===e.length)return rk(e[0]);let t=rk(e[0]);for(let n=1;n<e.length;n+=1)t=rC(t,e[n]);return t}return rj(void 0,e)}(c):void 0,x=f?rb(m,g)??{}:tf;if("u">typeof document)if(f)if(Array.isArray(u)){let e;n=[x.ref,rR(s),...u],r=e=eQ(e1).current,o=n,(r.refs.length!==o.length||r.refs.some((e,t)=>e!==o[t]))&&e2(e,n),x.ref=e.callback}else x.ref=e0(x.ref,rR(s),u);else e0(null,null);return f?(void 0!==p&&(x.className=rA(x.className,p)),void 0!==h&&(x.style=rb(x.style,h)),x):tf}(t,n);return!1===n.enabled?null:function(e,t,n,r){if(t){if("function"==typeof t)return t(n,r);let e=rj(n,t.props);e.ref=n.ref;let o=t;return o?.$$typeof===rP&&(o=v.Children.toArray(t)[0]),v.cloneElement(o,e)}if(e&&"string"==typeof e){var o,i;return o=e,i=n,"button"===o?(0,v.createElement)("button",{type:"button",...i,key:i.key}):"img"===o?(0,v.createElement)("img",{alt:"",...i,key:i.key}):v.createElement(o,i)}throw Error(ny(8))}(e,r,o,n.state??tf)}let rP=Symbol.for("react.lazy"),rL=v.forwardRef(function(e,t){let{render:n,className:r,style:o,...i}=e;delete i.id;let l=nq(),{store:s}=nz(),a=ta(s,n6.triggerElement,void 0,void 0,void 0),u=ta(s,n6.id,void 0,void 0,void 0),c=function(e={}){let t,{id:n,fallbackControlId:r,native:o=!1,setLabelId:i,focusControl:l}=e,{controlId:s,setLabelId:a}=nY(),u=te(e=>{a(e),i?.(e)}),c=(e6(()=>(u(t),()=>{u(void 0)}),[t=nG(n),u]),t),d=s??r;function f(e){let t=tk(e.nativeEvent);t?.closest("button,input,select,textarea")||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),o||function(e){if(l)return l(e,d);if(!d)return;let t=nt(e.currentTarget).getElementById(d);
3(0,tb.isHTMLElement)(t)&&t.focus({focusVisible:!0})}(e))}return o?{id:c,htmlFor:d??void 0,onMouseDown:f}:{id:c,onClick:f,onPointerDown(e){e.preventDefault()}}}({id:null==u?void 0:`${u}-label`,fallbackControlId:a?.id??u,setLabelId(e){s.set("labelId",e)}});return r$("div",e,{ref:t,state:l.state,props:[c,i],stateAttributesMapping:nB})}),rD=((l={}).open="data-open",l.closed="data-closed",l[l.startingStyle=n8.startingStyle]="startingStyle",l[l.endingStyle=n8.endingStyle]="endingStyle",l.anchorHidden="data-anchor-hidden",l.side="data-side",l.align="data-align",l),rz=((s={}).popupOpen="data-popup-open",s.pressed="data-pressed",s),rF={[rz.popupOpen]:""},rU={[rz.popupOpen]:"",[rz.pressed]:""},rH={[rD.open]:""},r_={[rD.closed]:""},rB={[rD.anchorHidden]:""},rV={open:e=>e?rF:null},rW={open:e=>e?rU:null},rq={open:e=>e?rH:r_,anchorHidden:e=>e?rB:null};var rG=tb,t1=t1;let rK=v.createContext(void 0);function rY(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0,composite:i}=e,l=v.useRef(null),s=function(e=!1){let t=v.useContext(rK);if(void 0===t&&!e)throw Error(ny(16));return t}(!0),a=i??void 0!==s,{props:u}=function(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,l=r&&!1!==t,s=r&&!1===t;return{props:v.useMemo(()=>{let e={onKeyDown(e){n&&t&&"Tab"!==e.key&&e.preventDefault()}};return r||(e.tabIndex=o,!i&&n&&(e.tabIndex=t?o:-1)),(i&&(t||l)||!i&&n)&&(e["aria-disabled"]=n),i&&(!t||s)&&(e.disabled=n),e},[r,n,t,l,s,i,o])}}({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:o}),c=v.useCallback(()=>{let e=l.current;rZ(e)&&a&&t&&void 0===u.disabled&&e.disabled&&(e.disabled=!1)},[t,u.disabled,a]);return e6(c,[c]),{getButtonProps:v.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:i,onKeyDown:l,onPointerDown:s,...c}=e;return rj({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){var r;if(t||(rT(e),l?.(e),e.baseUIHandlerPrevented))return;let i=e.target===e.currentTarget,s=e.currentTarget,u=rZ(s),c=!o&&(r=s,!!(r?.tagName==="A"&&r?.href)),d=i&&(o?u:!c),f="Enter"===e.key,p=" "===e.key,h=s.getAttribute("role"),m=h?.startsWith("menuitem")||"option"===h||"gridcell"===h;if(i&&a&&p){if(e.defaultPrevented&&m)return;e.preventDefault(),c||o&&u?(s.click(),e.preventBaseUIHandler()):d&&(n?.(e),e.preventBaseUIHandler());return}d&&(!o&&(p||f)&&e.preventDefault(),!o&&f&&n?.(e))},onKeyUp(e){t||((rT(e),i?.(e),e.target===e.currentTarget&&o&&a&&rZ(e.currentTarget)&&" "===e.key)?e.preventDefault():!e.baseUIHandlerPrevented&&(e.target!==e.currentTarget||o||a||" "!==e.key||n?.(e)))},onPointerDown(e){t?e.preventDefault():s?.(e)}},o?{type:"button"}:{role:"button"},u,c)},[t,u,a,o]),buttonRef:te(e=>{l.current=e,c()})}}function rZ(e){return(0,tb.isHTMLElement)(e)&&"BUTTON"===e.tagName}var t3=t3;let rJ={...rW,...nB,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},rX=v.forwardRef(function(e,t){let{render:n,className:r,id:o,disabled:i=!1,nativeButton:l=!0,style:s,...a}=e,{setTouched:u,setFocused:c,validationMode:d,state:f,disabled:p}=nq(),{labelId:h}=nY(),{store:m,setOpen:g,selectionRef:x,validation:y,readOnly:b,required:w,alignItemWithTriggerActiveRef:j,disabled:k}=nz(),C=p||k||i,S=ta(m,n6.open,void 0,void 0,void 0),E=ta(m,n6.mounted,void 0,void 0,void 0),O=ta(m,n6.value,void 0,void 0,void 0),N=ta(m,n6.triggerProps,void 0,void 0,void 0),T=ta(m,n6.positionerElement,void 0,void 0,void 0),A=ta(m,n6.listElement,void 0,void 0,void 0),M=ta(m,n6.popupSide,void 0,void 0,void 0),R=ta(m,n6.id,void 0,void 0,void 0),I=ta(m,n6.labelId,void 0,void 0,void 0),$=ta(m,n6.hasSelectedValue,void 0,void 0,void 0),P=E&&T?M:null,L=o??R;nZ({id:L});let D=tr(T),z=v.useRef(null),{getButtonProps:F,buttonRef:U}=rY({disabled:C,native:l}),H=te(e=>{m.set("triggerElement",e)}),_=ty(),B=ty(),V=ty();v.useEffect(()=>{if(S)return V.start(400,()=>{x.current.allowUnselectedMouseUp=!0,x.current.allowSelectedMouseUp=!0}),()=>{V.clear()};x.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},B.clear()},[S,x,B,V]);let W=rj(N,{id:L,role:"combobox","aria-expanded":S?"true":"false","aria-haspopup":"listbox","aria-controls":S?A?.id??t$(T)?.id:void 0,"aria-labelledby":h??I,"aria-readonly":b||void 0,"aria-required":w||void 0,tabIndex:C?-1:0,onFocus(e){c(!0),S&&j.current&&g(!1,t6(t3.none,e.nativeEvent)),_.start(0,()=>{m.set("forceMount",!0)})},onBlur(e){tj(T,e.relatedTarget)||(u(!0),c(!1),"onBlur"===d&&y.commit(O))},onMouseDown(e){if(S)return;let t=nt(e.currentTarget);function n(e){if(!z.current)return;let t=e.target;if(tj(z.current,t)||tj(D.current,t))return;let n=function(e){let t=e.getBoundingClientRect(),n=(0,rG.getWindow)(e);if(t1.env.jsdom)return t;let r=n.getComputedStyle(e,"::before"),o=n.getComputedStyle(e,"::after");if("none"===r.content&&"none"===o.content)return t;let i=parseFloat(r.width)||0,l=parseFloat(r.height)||0,s=parseFloat(o.width)||0,a=parseFloat(o.height)||0,u=Math.max(t.width,i,s),c=Math.max(t.height,l,a),d=u-t.width,f=c-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}(z.current);e.clientX>=n.left-2&&e.clientX<=n.right+2&&e.clientY>
3=n.top-2&&e.clientY<=n.bottom+2||g(!1,t6(t3.cancelOpen,e))}B.start(0,()=>{t.addEventListener("mouseup",n,{once:!0})})}},a,F),q=y.getValidationProps(C,W);return q.role="combobox",r$("button",e,{ref:[t,z,U,H],state:{...f,open:S,disabled:C,value:O,readOnly:b,popupSide:P,placeholder:!$},stateAttributesMapping:rJ,props:q})}),rQ={value:()=>null},r0=v.forwardRef(function(e,t){let{className:n,render:r,children:o,placeholder:i,style:l,...s}=e,{store:a,valueRef:u}=nz(),c=ta(a,n6.value,void 0,void 0,void 0),d=ta(a,n6.items,void 0,void 0,void 0),f=ta(a,n6.itemToStringLabel,void 0,void 0,void 0),p=ta(a,n6.hasSelectedValue,void 0,void 0,void 0),h=ta(a,n6.hasNullItemLabel,!p&&null!=i&&null==o,void 0,void 0),m=null;return m="function"==typeof o?o(c):null!=o?o:p||null==i||h?Array.isArray(c)?c.reduce((e,t,n)=>(n>0&&e.push(", "),e.push((0,w.jsx)(v.Fragment,{children:n7(t,d,f)},n)),e),[]):n7(c,d,f):i,r$("span",e,{state:{value:c,placeholder:!p},ref:[t,u],props:[{children:m},s],stateAttributesMapping:rQ})}),r1=v.forwardRef(function(e,t){let{render:n,className:r,style:o,...i}=e,{store:l}=nz();return r$("span",e,{state:{open:ta(l,n6.open,void 0,void 0,void 0)},ref:t,props:[{"aria-hidden":!0,children:"▼"},i],stateAttributesMapping:rV})});var t1=t1;let r2=v.forwardRef(function(e,t){let[n,r]=v.useState();return e6(()=>{t1.screenReader.voiceOver&&t1.engine.webkit&&r("button")},[]),(0,w.jsx)("span",{...e,ref:t,style:eZ,"aria-hidden":!n||void 0,tabIndex:0,role:n,"data-base-ui-focus-guard":""})});function r4(e){for(let t of Array.from(e.children))if("summary"===(0,tb.getNodeName)(t))return t;return null}function r5(e){let t=e?(0,tb.getNodeName)(e):"";return null!=e&&e.matches('a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]')&&("summary"!==t||null!=e.parentElement&&"details"===(0,tb.getNodeName)(e.parentElement)&&r4(e.parentElement)===e)&&("details"!==t||null==r4(e))&&("input"!==t||"hidden"!==e.type)}function r7(e){if(!r5(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=function(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return(0,tb.isShadowRoot)(n)?n.host:null}(t)){let n=t!==e,r="slot"===(0,tb.getNodeName)(t);if(t.hasAttribute("inert")||n&&"details"===(0,tb.getNodeName)(t)&&!t.open&&!function(e,t){let n=r4(t);return!!n&&(e===n||tj(n,e))}(e,t)||t.hasAttribute("hidden")||!r&&!function(e,t){let n=(0,tb.getComputedStyle)(e);return t?"none"!==n.display:nA(e,n)}(t,n))return!1}return!0}function r6(e){let t=e.tabIndex;if(t<0){let t=(0,tb.getNodeName)(e);if("details"===t||"audio"===t||"video"===t||(0,tb.isHTMLElement)(e)&&e.isContentEditable)return 0}return t}function r3(e){return"input"!==(0,tb.getNodeName)(e)?null:"radio"===e.type&&""!==e.name?e:null}function r9(e){if((0,tb.isHTMLElement)(e)&&"slot"===(0,tb.getNodeName)(e)){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return(0,tb.isHTMLElement)(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function r8(e){return r7(e)&&r6(e)>=0}function oe(e){let t=[];return!function e(t,n){r9(t).forEach(t=>{r5(t)&&n.push(t),e(t,n)})}(e,t),t.filter(r7)}function ot(e){let t=oe(e);return t.filter(e=>r6(e)>=0&&function(e,t){let n=r3(e);if(!n)return!0;let r=t.find(e=>{let t=r3(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=r3(e);return t?.name===n.name&&t.form===n.form})===n}(e,t))}function on(e,t){let n=ot(e),r=n.length;if(0===r)return;let o=tw(nt(e)),i=n.indexOf(o);return n[-1===i?1===t?0:r-1:i+t]}function or(e){return on(nt(e).body,1)||e}function oo(e){return on(nt(e).body,-1)||e}function oi(e,t){if(!e)return null;let n=ot(nt(e).body),r=n.length;if(0===r)return null;let o=n.indexOf(e);return -1===o?null:n[(o+t+r)%r]}function ol(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!tj(n,r)}function os(e){let t=[];!function e(t,n,r){r9(t).forEach(t=>{(0,tb.isHTMLElement)(t)&&t.matches(n)&&r.push(t),e(t,n,r)})}
3(e,"[data-tabindex]",t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}var t3=t3;let oa={style:{transition:"none"}},ou="data-base-ui-click-trigger",oc={fallbackAxisSide:"none"},od={fallbackAxisSide:"end"},of={clipPath:"inset(50%)",position:"fixed",top:0,left:0},op=v.createContext(null),oh=np("portal"),om=v.forwardRef(function(e,t){let{render:n,className:r,style:o,children:i,container:l,renderGuards:s,...a}=e,{portalNode:u,portalSubtree:c}=function(e={}){let{ref:t,container:n,componentProps:r=tf,elementProps:o}=e,i=no(),l=v.useContext(op),s=l?.portalNode,[a,u]=v.useState(null),[c,d]=v.useState(null),f=te(e=>{null!==e&&d(e)}),p=v.useRef(null);e6(()=>{if(null===n){p.current&&(p.current=null,d(null),u(null));return}if(null==i)return;let e=(n&&((0,tb.isNode)(n)?n:n.current))??s??document.body;if(null==e){p.current&&(p.current=null,d(null),u(null));return}p.current!==e&&(p.current=e,d(null),u(e))},[n,s,i]);let h=r$("div",r,{ref:[t,f],props:[{id:i,[oh]:""},o]});return{portalNode:c,portalSubtree:a&&h?n3.createPortal(h,a):null}}({container:l,ref:t,componentProps:e,elementProps:a}),d=v.useRef(null),f=v.useRef(null),p=v.useRef(null),h=v.useRef(null),[m,g]=v.useState(null),x=v.useRef(!1),y=m?.modal,b=m?.open,j="boolean"==typeof s?s:!!m&&!m.modal&&m.open&&!!u;v.useEffect(()=>{if(u&&!y)return ne(t8(u,"focusin",e,!0),t8(u,"focusout",e,!0));function e(e){u&&e.relatedTarget&&ol(e)&&("focusin"===e.type?x.current&&(os(u),x.current=!1):(ot(u).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}),x.current=!0))}},[u,y]),e6(()=>{u&&!0===b&&x.current&&(os(u),x.current=!1)},[b,u]);let k=v.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:h,portalNode:u,setFocusManagerState:g}),[u]);return(0,w.jsxs)(v.Fragment,{children:[c,(0,w.jsxs)(op.Provider,{value:k,children:[j&&u&&(0,w.jsx)(r2,{"data-type":"outside",ref:d,onFocus:e=>{if(ol(e,u))p.current?.focus();else{let e=oo(m?m.domReference:null);e?.focus()}}}),j&&u&&(0,w.jsx)("span",{"aria-owns":u.id,style:of}),u&&n3.createPortal(i,u),j&&u&&(0,w.jsx)(r2,{"data-type":"outside",ref:f,onFocus:e=>{if(ol(e,u))h.current?.focus();else{let t=or(m?m.domReference:null);t?.focus(),m?.closeOnFocusOut&&m?.onOpenChange(!1,t6(t3.focusOut,e.nativeEvent))}}})]})]})}),og=v.createContext(void 0),ox=v.forwardRef(function(e,t){let{store:n}=nz(),r=ta(n,n6.mounted,void 0,void 0,void 0),o=ta(n,n6.forceMount,void 0,void 0,void 0);return r||o?(0,w.jsx)(og.Provider,{value:!0,children:(0,w.jsx)(om,{ref:t,...e})}):null}),ov={...rq,...rn},oy=v.forwardRef(function(e,t){let{render:n,className:r,style:o,...i}=e,{store:l}=nz(),s=ta(l,n6.open,void 0,void 0,void 0),a=ta(l,n6.mounted,void 0,void 0,void 0);return r$("div",e,{state:{open:s,transitionStatus:ta(l,n6.transitionStatus,void 0,void 0,void 0)},ref:t,props:[{role:"presentation",hidden:!a,style:{userSelect:"none",WebkitUserSelect:"none"}},i],stateAttributesMapping:ov})});function ob(e){return ts>=19?e:e?"true":void 0}let ow=v.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function oj(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=te(o),l=v.useRef(0),s=eQ(oC).current,a=eQ(ok).current,[u,c]=v.useState(0),d=v.useRef(u),f=te((e,t)=>{a.set(e,t??null),d.current+=1,c(d.current)}),p=te(e=>{a.delete(e),d.current+=1,c(d.current)}),h=v.useMemo(()=>{let e=new Map;return Array.from(a.keys()).filter(e=>e.isConnected).sort(oS).forEach((t,n)=>{let r=a.get(t)??{};e.set(t,{...r,index:n})}),e},[a,u]);e6(()=>{if("function"!=typeof MutationObserver||0===h.size)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),0===t.size&&(d.current+=1,c(d.current))});return h.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[h]),e6(()=>{d.current===u&&(n.current.length!==h.size&&(n.current.length=h.size),r&&r.current.length!==h.size&&(r.current.length=h.size),l.current=h.size),i(h)},[i,h,n,r,u]),e6(()=>()=>{n.current=[]},[n]),e6(()=>()=>{r&&(r.current=[])},[r]);let m=te(e=>(s.add(e),()=>{s.delete(e)}));e6(()=>
3{s.forEach(e=>e(h))},[s,h]);let g=v.useMemo(()=>({register:f,unregister:p,subscribeMapChange:m,elementsRef:n,labelsRef:r,nextIndexRef:l}),[f,p,m,n,r,l]);return(0,w.jsx)(ow.Provider,{value:g,children:t})}function ok(){return new Map}function oC(){return new Set}function oS(e,t){let 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}var oE=e.i(343084),rG=tb,oO=e.i(953760),oN=e.i(258950);let oT=v.createContext(void 0);function oA(){let e=v.useContext(oT);return e?.direction??"ltr"}let oM=(0,oN.hide)().fn,oR={name:"hide",async fn(e){let{width:t,height:n,x:r,y:o}=e.rects.reference,i=await oM(e);return{data:{referenceHidden:i.data?.referenceHidden||0===t&&0===n&&0===r&&0===o}}}};var rG=tb;let oI={sideX:"left",sideY:"top"},o$={name:"adaptiveOrigin",async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:o},platform:i,strategy:l,placement:s}=e,a=(0,rG.getWindow)(o),u=a.getComputedStyle(o);if("0s"===u.transitionDuration||""===u.transitionDuration)return{x:t,y:n,data:oI};let c=await i.getOffsetParent?.(o),d={width:0,height:0};
3if("fixed"===l&&a?.visualViewport)d={width:a.visualViewport.width,height:a.visualViewport.height};else if(c===a){let e=nt(o);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await i.isElement?.(c)&&(d=await i.getDimensions(c));let f=(0,oE.getSide)(s),p=t,h=n;return"left"===f&&(p=d.width-(t+r.width)),"top"===f&&(h=d.height-(n+r.height)),{x:p,y:h,data:{sideX:"left"===f?"right":oI.sideX,sideY:"top"===f?"bottom":oI.sideY}}}};function oP(e,t,n){let r="inline-start"===e||"inline-end"===e;return({top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"})[t]}function oL(e,t,n){let{rects:r,placement:o}=e;return{side:oP(t,(0,oE.getSide)(o),n),align:(0,oE.getAlignment)(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function oD(e){var t,n;let{anchor:r,positionMethod:o="absolute",side:i="bottom",sideOffset:l=0,align:s="center",alignOffset:a=0,collisionBoundary:u,collisionPadding:c=5,sticky:d=!1,arrowPadding:f=5,disableAnchorTracking:p=!1,inline:h,keepMounted:m=!1,floatingRootContext:g,mounted:x,collisionAvoidance:y,shiftCrossAxis:b=!1,nodeId:w,adaptiveOrigin:j,lazyFlip:k=!1,externalTree:C}=e,[S,E]=v.useState(null);x||null===S||E(null);let O=y.side||"flip",N=y.align||"flip",T=y.fallbackAxisSide||"end",A="function"==typeof r?r:void 0,M=te(A),R=A?M:r,I=tr(r),$=tr(x),P="rtl"===oA(),L=S||({top:"top",right:"right",bottom:"bottom",left:"left","inline-end":P?"left":"right","inline-start":P?"right":"left"})[i],D="center"===s?L:`${L}-${s}`,z=c,F=+("bottom"===i),U=+("top"===i),H=+("right"===i),_=+("left"===i);"number"==typeof z?z={top:z+F,right:z+_,bottom:z+U,left:z+H}:z&&(z={top:(z.top||0)+F,right:(z.right||0)+_,bottom:(z.bottom||0)+U,left:(z.left||0)+H});let B={boundary:"clipping-ancestors"===u?"clippingAncestors":u,padding:z},V=v.useRef(null),W=tr(l),q=tr(a),G="function"!=typeof l?l:0,K="function"!=typeof a?a:0,Y=[];h&&Y.push(h),Y.push((0,oN.offset)(e=>{let t=oL(e,i,P),n="function"==typeof W.current?W.current(t):W.current,r="function"==typeof q.current?q.current(t):q.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[G,K,P,i]));let Z="none"===N&&"shift"!==O,J=!Z&&(d||b||"shift"===O),X="none"===O?null:(0,oN.flip)({...B,padding:{top:z.top+1,right:z.right+1,bottom:z.bottom+1,left:z.left+1},mainAxis:!b&&"flip"===O,crossAxis:"flip"===N&&"alignment",fallbackAxisSideDirection:T}),Q=Z?null:(0,oN.shift)(e=>{let t=nt(e.elements.floating).documentElement;return{...B,rootBoundary:b?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:"none"!==N,crossAxis:J,limiter:d||b?void 0:(0,oN.limitShift)(e=>{if(!V.current)return{};let{width:t,height:n}=V.current.getBoundingClientRect(),r=(0,oE.getSideAxis)((0,oE.getSide)(e.placement)),o="y"===r?z.left+z.right:z.top+z.bottom;return{offset:("y"===r?t:n)/2+o/2}})}},[B,d,b,z,N]);"shift"===O||"shift"===N||"center"===s?Y.push(Q,X):Y.push(X,Q),Y.push((0,oN.size)({...B,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!$.current)return;let o=e.style;o.setProperty("--available-width",`${t}px`),o.setProperty("--available-height",`${n}px`);let i=(0,rG.getWindow)(e).devicePixelRatio||1,{x:l,y:s,width:a,height:u}=r.reference,c=(Math.round((l+a)*i)-Math.round(l*i))/i,d=(Math.round((s+u)*i)-Math.round(s*i))/i;o.setProperty("--anchor-width",`${c}px`),o.setProperty("--anchor-height",`${d}px`)}}),(t=e=>({element:V.current||nt(e.elements.floating).createElement("div"),padding:f,offsetParent:"floating"}),n=[f],{...{name:"arrow",options:t,async fn(e){let{x:n,y:r,placement:o,rects:i,platform:l,elements:s,middlewareData:a}=e,{element:u,padding:c=0,offsetParent:d="real"}=(0,oE.evaluate)(t,e)||{};if(null==u)return{};let f=(0,oE.getPaddingObject)(c),p={x:n,y:r},h=(0,oE.getAlignmentAxis)(o),m=(0,oE.getAxisLength)(h),g=await l.getDimensions(u),x="y"===h,v=x?"clientHeight":"clientWidth",y=i.reference[m]+i.reference[h]-p[h]-i.floating[m],b=p[h]-i.reference[h],w="real"===d?await l.getOffsetParent?.(u):s.floating,j=s.floating[v]||i.floating[m];j&&await l.isElement?.(w)||(j=s.floating[v]||i.floating[m]);let k=j/2-g[m]/2-1,C=Math.min(f[x?"top":"left"],k),S=Math.min(f[x?"bottom":"right"],k),E=j-g[m]-S,O=j/2-g[m]/2+(y/2-b/2),N=(0,oE.clamp)(C,O,E),T=!a.arrow&&null!=(0,oE.getAlignment)(o)&&O!==N&&i.reference[m]/2-(O<C?C:S)-g[m]/2<0,A=T?O<C?O-C:O-E:0;return{[h]:p[h]+A,data:{[h]:N,centerOffset:O-N-A,...T&&{alignmentOffset:A}},reset:T}}},options:[t,n]}),{name:"transformOrigin",fn(e){let{elements:t,middlewareData:n,placement:r,rects:o,y:s}=e,a=(0,oE.getSide)(r),u=(0,oE.getSideAxis)(a),c=V.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=c?.clientWidth||0,h=c?.clientHeight||0,m=d+p/2,g=f+h/2,x=Math.abs(n.shift?.y||0),v=o.reference.height/2,y="function"==typeof l?l(oL(e,i,P)):l,b=x>y,w={top:`${m}px calc(100% + ${y}px)`,bottom:`${m}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[a],j=`${m}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty("--transform-origin",J&&"y"===u&&b?j:w),{}}},oR,j),e6(()=>{!x&&g&&g.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[x,g]);let ee=v.useMemo(()=>({elementResize:!p&&"u">typeof ResizeObserver,layoutShift:!p&&"u">typeof IntersectionObserver}),[p]),{refs:et,elements:en,x:er,y:eo,middlewareData:ei,update:el,placement:es,context:ea,isPositioned:eu,floatingStyles:ec}=function(e={}){let{nodeId:t,externalTree:n}
3=e,r=nC(e),o=e.rootContext||r,i=o.useState("referenceElement"),l=o.useState("floatingElement"),s=o.useState("domReferenceElement"),a=o.useState("open"),u=o.useState("floatingId"),[c,d]=v.useState(null),[f,p]=v.useState(void 0),[h,m]=v.useState(void 0),g=v.useRef(null),x=nc(n),y=v.useMemo(()=>({reference:i,floating:l,domReference:s}),[i,l,s]),b=(0,oN.useFloating)({...e,elements:{...y,...c&&{reference:c}}}),w=(0,tb.isElement)(f)?f:null,j=void 0===h?o.state.floatingElement:h;o.useSyncedValue("referenceElement",f??null),o.useSyncedValue("domReferenceElement",void 0===f?s:w),o.useSyncedValue("floatingElement",j);let k=v.useCallback(e=>{let t=(0,tb.isElement)(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),b.refs.setReference(t)},[b.refs]),C=v.useCallback(e=>{((0,tb.isElement)(e)||null===e)&&(g.current=e,p(e)),((0,tb.isElement)(b.refs.reference.current)||null===b.refs.reference.current||null!==e&&!(0,tb.isElement)(e))&&b.refs.setReference(e)},[b.refs,p]),S=v.useCallback(e=>{m(e),b.refs.setFloating(e)},[b.refs]),E=v.useMemo(()=>({...b.refs,setReference:C,setFloating:S,setPositionReference:k,domReference:g}),[b.refs,C,S,k]),O=v.useMemo(()=>({...b.elements,domReference:s}),[b.elements,s]),N=v.useMemo(()=>({...b,dataRef:o.context.dataRef,open:a,onOpenChange:o.setOpen,events:o.context.events,floatingId:u,refs:E,elements:O,nodeId:t,rootStore:o}),[b,E,O,t,o,a,u]);return e6(()=>{s&&(g.current=s)},[s]),e6(()=>{o.context.dataRef.current.floatingContext=N;let e=x?.nodesRef.current.find(e=>e.id===t);e&&(e.context=N)}),v.useMemo(()=>({...b,context:N,refs:E,elements:O,rootStore:o}),[b,E,O,N,o])}({rootContext:g,open:m?x:void 0,placement:D,middleware:Y,strategy:o,whileElementsMounted:m?void 0:(...e)=>(0,oO.autoUpdate)(...e,ee),nodeId:w,externalTree:C}),{sideX:ed,sideY:ef}=ei.adaptiveOrigin||oI,ep=eu?o:"fixed",eh=v.useMemo(()=>{let e=j?{position:ep,[ed]:er,[ef]:eo}:{position:ep,...ec};return eu||(e.opacity=0),e},[j,ep,ed,er,ef,eo,ec,eu]),em=v.useRef(null);e6(()=>{if(!x)return;let e=I.current,t="function"==typeof e?e():e,n=(oz(t)?t.current:t)||null;n!==em.current&&(et.setPositionReference(n),em.current=n)},[x,et,R,I]),v.useEffect(()=>{if(!x)return;let e=I.current;"function"!=typeof e&&oz(e)&&e.current!==em.current&&(et.setPositionReference(e.current),em.current=e.current)},[x,et,R,I]),v.useEffect(()=>{if(m&&x&&en.reference&&en.floating)return(0,oO.autoUpdate)(en.reference,en.floating,el,ee)},[m,x,en,el,ee]);let eg=(0,oE.getSide)(es),ex=oP(i,eg,P),ev=(0,oE.getAlignment)(es)||"center",ey=!!ei.hide?.referenceHidden;e6(()=>{k&&x&&eu&&E(eg)},[k,x,eu,eg]);let eb=v.useMemo(()=>({position:"absolute",top:ei.arrow?.y,left:ei.arrow?.x}),[ei.arrow]),ew=ei.arrow?.centerOffset!==0;return v.useMemo(()=>({positionerStyles:eh,arrowStyles:eb,arrowRef:V,arrowUncentered:ew,side:ex,align:ev,physicalSide:eg,anchorHidden:ey,refs:et,context:ea,isPositioned:eu,update:el}),[eh,eb,V,ew,ex,ev,eg,ey,et,ea,eu,el])}function oz(e){return null!=e&&"current"in e}let oF=v.createContext(void 0);function oU(){let e=v.useContext(oF);if(!e)throw Error(ny(59));return e}let oH=v.forwardRef(function(e,t){let n,{cutout:r,...o}=e;if(r){let e=r.getBoundingClientRect();n=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,w.jsx)("div",{ref:t,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:n}})});function o_(e,t){e&&Object.assign(e.style,t)}let oB={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"};var t3=t3;function oV(e){return"starting"===e?oa:tf}function oW(e,t,{styles:n,transitionStatus:r,props:o,refs:i,hidden:l,inert:s=!1}){let a={...n};return s&&(a.pointerEvents="none"),r$("div",e,{state:t,ref:i,props:[{role:"presentation",hidden:l,style:a},oV(r),o],stateAttributesMapping:rq})}var t1=t1,rG=tb;let oq={},oG={},oK="";class oY{lockCount=0;restore=null;timeoutLock=tv.create();timeoutUnlock=tv.create();acquire(e){return this.lockCount+=1,1===this.lockCount&&null===this.restore&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{this.lockCount-=1,0===this.lockCount&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{0===this.lockCount&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){let t,n,r,o,i;if(0===this.lockCount||null!==this.restore)return;let l=nt(e).documentElement,s=(0,rG.getWindow)(l).getComputedStyle(l).overflowY;if("hidden"===s||"clip"===s){this.restore=tc;return}let a=t1.os.ios||!function(e){if("u"<typeof document)return!1;let t=nt(e);return(0,rG.getWindow)(t).innerWidth-t.documentElement.clientWidth>0}(e);this.restore=a?(n=(t=nt(e)).documentElement,r=t.body,i={overflowY:(o=(0,tb.isOverflowElement)(n)?n:r).style.overflowY,overflowX:o.style.overflowX},Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,i)}):function(e){let t=nt(e),n=t.documentElement,r=t.body,o=(0,rG.getWindow)(n),i=0,l=0,s=!1,a=tg.create();
3if(t1.engine.webkit&&(o.visualViewport?.scale??1)!==1)return()=>{};function u(){let t=o.getComputedStyle(n),a=o.getComputedStyle(r),u=(t.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,l=n.scrollLeft,oq={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},oK=n.style.scrollBehavior,oG={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};let c=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f="scroll"===t.overflowY||"scroll"===a.overflowY,p="scroll"===t.overflowX||"scroll"===a.overflowX,h=Math.max(0,o.innerWidth-r.clientWidth),m=Math.max(0,o.innerHeight-r.clientHeight),g=parseFloat(a.marginTop)+parseFloat(a.marginBottom),x=parseFloat(a.marginLeft)+parseFloat(a.marginRight),v=(0,tb.isOverflowElement)(n)?n:r;if(s=function(e){if(!("u">typeof CSS&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||"u"<typeof document)return!1;let t=nt(e),n=t.documentElement,r=t.body,o=(0,tb.isOverflowElement)(n)?n:r,i=o.style.overflowY,l=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",o.style.overflowY="scroll";let s=o.offsetWidth;o.style.overflowY="hidden";let a=o.offsetWidth;return o.style.overflowY=i,n.style.scrollbarGutter=l,s===a}(e)){n.style.scrollbarGutter=u,v.style.overflowY="hidden",v.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:u,overflowY:"hidden",overflowX:"hidden"}),(c||f)&&(n.style.overflowY="scroll"),(d||p)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:g||m?`calc(100dvh - ${g+m}px)`:"100dvh",width:x||h?`calc(100vw - ${x+h}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function c(){Object.assign(n.style,oq),Object.assign(r.style,oG),s||(n.scrollTop=i,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=oK)}u();let d=t8(o,"resize",function(){c(),a.request(u)});return()=>{a.cancel(),c(),"function"==typeof o.removeEventListener&&d()}}(e)}}let oZ=new oY;function oJ(e=!0,t=null){e6(()=>{if(e)return oZ.acquire(t)},[e,t])}function oX(e,t,n,r){let[o,i]=v.useState(!1);e6(()=>{if(!e||!t||null==n)return void i(!1);let r=nt(n).documentElement.clientWidth,o=n.offsetWidth;i(r>0&&o>0&&o>=r-20)},[e,t,n]),oJ(e&&(!t||o),r)}let oQ={position:"fixed"},o0=v.forwardRef(function(e,t){let{anchor:n,positionMethod:r="absolute",className:o,render:i,side:l="bottom",align:s="center",sideOffset:a=0,alignOffset:u=0,collisionBoundary:c="clipping-ancestors",collisionPadding:d,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:h,alignItemWithTrigger:m=!0,collisionAvoidance:g=oc,style:x,...y}=e,{store:b,listRef:j,labelsRef:k,alignItemWithTriggerActiveRef:C,selectedItemTextRef:S,valuesRef:E,initialValueRef:O,popupRef:N,setValue:T}=nz(),A=nF(),M=ta(b,n6.open,void 0,void 0,void 0),R=ta(b,n6.mounted,void 0,void 0,void 0),I=ta(b,n6.modal,void 0,void 0,void 0),$=ta(b,n6.value,void 0,void 0,void 0),P=ta(b,n6.openMethod,void 0,void 0,void 0),L=ta(b,n6.positionerElement,void 0,void 0,void 0),D=ta(b,n6.triggerElement,void 0,void 0,void 0),z=ta(b,n6.isItemEqualToValue,void 0,void 0,void 0),F=ta(b,n6.transitionStatus,void 0,void 0,void 0),U=v.useRef(null),H=v.useRef(null),[_,B]=v.useState(m),V=R&&_&&"touch"!==P;R||_===m||B(m),e6(()=>{!R&&(n6.scrollUpArrowVisible(b.state)&&b.set("scrollUpArrowVisible",!1),n6.scrollDownArrowVisible(b.state)&&b.set("scrollDownArrowVisible",!1))},[b,R]),v.useImperativeHandle(C,()=>V),oX((V||I)&&M,"touch"===P,L,D);let W=oD({anchor:n,floatingRootContext:A,positionMethod:r,mounted:R,side:l,sideOffset:a,align:s,alignOffset:u,arrowPadding:f,collisionBoundary:c,collisionPadding:d,sticky:p,disableAnchorTracking:h??V,collisionAvoidance:g,keepMounted:!0}),q=V?"none":W.side,G=V?oQ:W.positionerStyles,K={open:M,side:q,align:W.align,anchorHidden:W.anchorHidden};e6(()=>{b.set("popupSide",W.side)},[b,W.side]);let Y=oW(e,K,{styles:G,transitionStatus:F,props:y,refs:[t,te(e=>{b.set("positionerElement",e)})],hidden:!R,inert:!M}),Z=v.useRef(0),J=te(e=>{if(0===e.size&&0===Z.current||0===E.current.length)return;let t=Z.current;if(Z.current=e.size,e.size===t)return;let n=t6(t3.none);if(0!==t&&!b.state.multiple&&null!==$&&-1===n0(E.current,$,z)){let e=O.current,t=null!=e&&-1!==n0(E.current,e,z)?e:null;T(t,n),null===t&&(b.set("selectedIndex",null),S.current=null)}if(0!==t&&b.state.multiple&&Array.isArray($)){let e=$.filter(e=>-1!==n0(E.current,e,z));(e.length!==$.length||e.some(e=>!($&&0!==$.length&&$.some(t=>
3void 0!==t&&nQ(e,t,z)))))&&(T(e,n),0===e.length&&(b.set("selectedIndex",null),S.current=null))}if(M&&V){b.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:""};o_(L,e),o_(N.current,e)}}),X=v.useMemo(()=>({...W,side:q,alignItemWithTriggerActive:V,setControlledAlignItemWithTrigger:B,scrollUpArrowRef:U,scrollDownArrowRef:H}),[W,q,V,B]);return(0,w.jsx)(oj,{elementsRef:j,labelsRef:k,onMapChange:J,children:(0,w.jsxs)(oF.Provider,{value:X,children:[R&&I&&(0,w.jsx)(oH,{inert:ob(!M),cutout:D}),Y]})})});var t1=t1,t1=t1,rG=tb,t3=t3;let o1={inert:new WeakMap,"aria-hidden":new WeakMap},o2="data-base-ui-inert",o4={inert:new WeakSet,"aria-hidden":new WeakSet},o5=new WeakMap,o7=0,o6=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=function e(t){return t?(0,tb.isShadowRoot)(t)?t.host:e(t.parentNode):null}(t);return e.contains(n)?n:null}).filter(e=>null!=e),o3=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},o9=(e,t,n)=>{let r=[],o=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{"script"!==(0,tb.getNodeName)(e)&&(t.has(e)?o(e):r.push(e))})};return o(e),r};function o8(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:o=!0}=t,i=nt(e[0]).body;return function(e,t,n,r,{mark:o=!0}){let i=null;r?i="inert":n&&(i="aria-hidden");let l=null,s=null,a=o6(t,e),u=o?o9(t,o3(a),new Set(a)):[],c=[],d=[];if(i){let e=o1[i],n=o4[i];s=n,l=e;let r=o6(t,Array.from(t.querySelectorAll("[aria-live]"))),o=a.concat(r);o9(t,o3(o),new Set(o)).forEach(t=>{let r=t.getAttribute(i),o=null!==r&&"false"!==r,l=(e.get(t)||0)+1;e.set(t,l),c.push(t),1===l&&o&&n.add(t),o||t.setAttribute(i,"inert"===i?"":"true")})}return o&&u.forEach(e=>{let t=(o5.get(e)||0)+1;o5.set(e,t),d.push(e),1===t&&e.setAttribute(o2,"")}),o7+=1,()=>{l&&c.forEach(e=>{let t=(l.get(e)||0)-1;l.set(e,t),t||(!s?.has(e)&&i&&e.removeAttribute(i),s?.delete(e))}),o&&d.forEach(e=>{let t=(o5.get(e)||0)-1;o5.set(e,t),t||e.removeAttribute(o2)}),(o7-=1)||(o1.inert=new WeakMap,o1["aria-hidden"]=new WeakMap,o4.inert=new WeakSet,o4["aria-hidden"]=new WeakSet,o5=new WeakMap)}}(e,i,n,r,{mark:o})}let ie=[];function it(){ie=ie.filter(e=>e.deref()?.isConnected)}function ir(e){it(),e&&"body"!==(0,tb.getNodeName)(e)&&(ie.push(new WeakRef(e)),ie.length>20&&(ie=ie.slice(-20)))}function io(){return it(),ie[ie.length-1]?.deref()}function ii(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;let t=oe(e).filter(e=>{let t=e.getAttribute("data-tabindex")||"";return r8(e)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),n=e.getAttribute("tabindex");0===t.length?"0"!==n&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):("-1"!==n||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function il(e){let{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:i=!0,restoreFocus:l=!1,modal:s=!0,closeOnFocusOut:a=!0,openInteractionType:u="",nextFocusableElement:c,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:h}=e,m="rootStore"in t?t.rootStore:t,g=m.useState("open"),x=m.useState("domReferenceElement"),y=m.useState("floatingElement"),{events:b,dataRef:j}=m.context,k=te(()=>j.current.floatingContext?.nodeId),C=tI(x)&&!1===o,S=tr(o),E=tr(i),O=tr(u),N=tr(g),T=nc(p),A=v.useContext(op),M=v.useRef(!1),R=v.useRef(!1),I=v.useRef(!1),$=v.useRef(null),P=v.useRef(""),L=v.useRef(""),D=v.useRef(null),z=v.useRef(null),F=e0(D,f,A?.beforeInsideRef),U=e0(z,A?.afterInsideRef),H=ty(),_=ty(),B=tx(),V=null!=A,W=t$(y),q=te((e=W)=>e?ot(e):[]),G=te(()=>h?.().filter(e=>null!=e)??[]);v.useEffect(()=>{if(!r&&s)return t8(nt(W),"keydown",function(e){"Tab"===e.key&&tj(W,tw(nt(W)))&&0===q().length&&!C&&t2(e)})},[r,W,s,C,q]),v.useEffect(()=>{if(r||!g)return;let e=nt(W);function t(){I.current=!1}return ne(t8(e,"pointerdown",function(e){let t=tk(e),n=G();I.current=!(tj(y,t)||tj(x,t)||tj(A?.portalNode,t)||n.some(e=>e===t||tj(e,t))),L.current=e.pointerType||"keyboard",t?.closest(`[${ou}]`)&&(R.current=!0,_.start(0,()=>{R.current=!1}))},!0),t8(e,"pointerup",t,!0),t8(e,"pointercancel",t,!0),t8(e,"keydown",function(){L.current="keyboard"},!0),t)},[r,y,x,W,g,A,_,G]),v.useEffect(()=>{if(r||!a)return;let e=nt(W);function t(t){let n=t.relatedTarget,r=t.currentTarget,o=tk(t);s&&null==n&&null!=o&&tj(y,o)&&ir(o),queueMicrotask(()=>{let i=k(),a=m.context.triggerElements,u=G(),f=n?.hasAttribute(np("focus-guard"))&&[D.current,z.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,n9(d),n9(c)].includes(n),p=!(tj(x,n)||tj(y,n)||tj(n,y)||tj(A?.portalNode,n)||u.some(e=>e===n||tj(e,n))||null!=n&&a.hasElement(n)||a.hasMatchingElement(e=>tj(e,n))||f||T&&(nh(T.nodesRef.current,i).find(e=>tj(e.context?.elements.floating,n)||tj(e.context?.elements.domReference,n))||nm(T.nodesRef.current,i).find(e=>[e.context?.elements.floating,t$(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));
3if(r===x&&W&&ii(W),l&&r!==x&&!nA(o)&&tw(e)===e.body){if((0,tb.isHTMLElement)(W)&&(W.focus(),"popup"===l))return void B.request(()=>{W.focus()});let e=q(),t=$.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||W;(0,tb.isHTMLElement)(n)&&n.focus()}if(j.current.insideReactTree){j.current.insideReactTree=!1;return}(C||!s)&&n&&p&&!R.current&&(C||n!==io())&&(M.current=!0,m.setOpen(!1,t6(t3.focusOut,t)))})}let n=(0,tb.isHTMLElement)(x)?x:null;if(y||n)return ne(n&&t8(n,"focusout",t),n&&t8(n,"pointerdown",function(){R.current=!0,_.start(0,()=>{R.current=!1})}),y&&t8(y,"focusin",function(e){let t=tk(e);r8(t)&&($.current=t)}),y&&t8(y,"focusout",t),y&&A&&t8(y,"focusout",function(){I.current||(j.current.insideReactTree=!0,H.start(0,()=>{j.current.insideReactTree=!1}))},!0))},[r,x,y,W,s,T,A,m,a,l,q,C,k,j,H,_,B,c,d,G]),v.useEffect(()=>{if(r||!y||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${np("portal")}]`)||[]),t=T?nm(T.nodesRef.current,k()):[],n=t.find(e=>tI(e.context?.elements.domReference||null))?.context?.elements.domReference,o=o8([y,...e,D.current,z.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...G(),n,n9(d),n9(c),C?x:null].filter(e=>null!=e),{ariaHidden:s||C,mark:!1}),i=o8([y,...e].filter(e=>null!=e));return()=>{i(),o()}},[g,r,x,y,s,A,C,T,k,c,d,G]),e6(()=>{if(!g||r||!(0,tb.isHTMLElement)(W))return;let e=nt(W),t=tw(e);queueMicrotask(()=>{let n,r=S.current,o="function"==typeof r?r(O.current||""):r;if(void 0===o||!1===o||tj(W,t))return;let i=null,l=()=>(null==i&&(i=q(W)),i[0]||W);n=(n=!0===o||null===o?l():n9(o))||l();let s=tj(W,tw(e));nR(n,{preventScroll:n===W,shouldFocus(){if(!N.current)return!1;if(s)return!0;let t=tw(e);return!(t!==n&&tj(W,t))}})})},[r,g,W,q,S,O,N]),e6(()=>{if(r||!W)return;let e=nt(W),t=tw(e),n=null==O.current;function o(e){var t,n;let r;if(e.open||(t=e.nativeEvent,n=L.current,r=(0,rG.getWindow)(tk(t)),P.current=t instanceof r.KeyboardEvent?"keyboard":t instanceof r.FocusEvent?n||"keyboard":"pointerType"in t?t.pointerType||"keyboard":"touches"in t?"touch":t instanceof r.MouseEvent?n||(0===t.detail?"keyboard":"mouse"):""),e.reason===t3.triggerHover&&"mouseleave"===e.nativeEvent.type&&(M.current=!0),e.reason===t3.outsidePress)if(e.nested)M.current=!1;else if(t4(e.nativeEvent)||t5(e.nativeEvent))M.current=!1;else{let e=!1;nt(W).createElement("div").focus({get preventScroll(){return e=!0,!1}}),e?M.current=!1:M.current=!0}}return ir(t),b.on("openchange",o),()=>{b.off("openchange",o);let r=tw(e),i=G(),l=tj(y,r)||i.some(e=>e===r||tj(e,r))||T&&nh(T.nodesRef.current,k(),!1).some(e=>tj(e.context?.elements.floating,r)),s=E.current,a=function(){let e=E.current,r="function"==typeof e?e(P.current):e;if(void 0===r||!1===r)return null;null===r&&(r=!0);let o=x?.isConnected?x:null,i=t?.isConnected&&"body"!==(0,tb.getNodeName)(t)?t:null,l=n?i||o:o||i;return(l||(l=io()||null),"boolean"==typeof r)?l:n9(r)||l||null}();queueMicrotask(()=>{let t=a?r8(a)?a:ot(a)[0]||a:null;s&&!M.current&&(0,tb.isHTMLElement)(t)&&("boolean"!=typeof s||t===r||r===e.body||l)&&t.focus({preventScroll:!0}),M.current=!1})}},[r,y,W,E,O,b,T,x,k,G]),e6(()=>{if(!t1.engine.webkit||g||!y)return;let e=tw(nt(y));(0,tb.isHTMLElement)(e)&&tR(e)&&tj(y,e)&&e.blur()},[g,y]),e6(()=>{if(!r&&A)return A.setFocusManagerState({modal:s,closeOnFocusOut:a,open:g,onOpenChange:m.setOpen,domReference:x}),()=>{A.setFocusManagerState(null)}},[r,A,s,g,m,a,x]),e6(()=>{if(!r&&W)return ii(W),()=>{queueMicrotask(it)}},[r,W]);let K=!r&&(!s||!C)&&(V||s);return(0,w.jsxs)(v.Fragment,{children:[K&&(0,w.jsx)(r2,{"data-type":"inside",ref:F,onFocus:e=>{if(s){let e=q();nR(e[e.length-1])}else if(A?.portalNode)if(M.current=!1,ol(e,A.portalNode)){let e=or(x);e?.focus()}else n9(d??A.beforeOutsideRef)?.focus()}}),n,K&&(0,w.jsx)(r2,{"data-type":"inside",ref:U,onFocus:e=>{if(s)nR(q()[0]);else if(A?.portalNode)if(a&&(M.current=!0),ol(e,A.portalNode)){let e=oo(x);e?.focus()}else n9(c??A.afterOutsideRef)?.focus()}})]})}let is="base-ui-disable-scrollbar";var t3=t3;let ia=v.createContext(void 0);function iu(e){let t=v.useContext(ia);if(void 0===t&&!e)throw Error(ny(69));return t}let ic=new Set([...new Set([...new Set(["ArrowLeft","ArrowRight"]),...new Set(["ArrowUp","ArrowDown"])]),"Home","End"]),id=v.createContext(void 0),ip={disableStyleElements:!1},ih={...rq,...rn},im=v.forwardRef(function(e,t){let n,{render:r,className:o,style:i,finalFocus:l,...s}=e,{store:a,popupRef:u,onOpenChangeComplete:c,setOpen:d,valueRef:f,firstItemTextRef:p,selectedItemTextRef:h,multiple:m,handleScrollArrowVisibility:g,scrollHandlerRef:x,listRef:y,highlightItemOnHover:b}=nz(),{side:j,align:k,alignItemWithTriggerActive:C,isPositioned:S,setControlledAlignItemWithTrigger:E}=oU(),O=null!=iu(!0),N=nF(),T=oA(),{nonce:A,disableStyleElements:M}=v.useContext(id)??ip,R=ta(a,n6.id,void 0,void 0,void 0),I=ta(a,n6.open,void 0,void 0,void 0),$=ta(a,n6.openMethod,void 0,void 0,void 0),P=ta(a,n6.mounted,void 0,void 0,void 0),L=ta(a,n6.popupProps,void 0,void 0,void 0),D=ta(a,n6.transitionStatus,void 0,void 0,void 0),z=ta(a,n6.triggerElement,void 0,void 0,void 0),F=ta(a,n6.positionerElement,void 0,void 0,void 0),U=ta(a,n6.listElement,void 0,void 0,void 0),H=v.useRef(!1),_=v.useRef(!1),B=v.useRef({}),V=tx(),W=te(e=>{var t;if(!F||!u.current||!_.current)return;if(H.current||!C)return void g();let n="0px"===F.style.top,r="0px"===F.style.bottom;if(!n&&!r)return void g();let o=iv(F),i=(t=F.getBoundingClientRect().height,t/o.y),l=nt(F),s=(0,rG.getWindow)(F),a=s.getComputedStyle(F),c=parseFloat(a.marginTop),d=parseFloat(a.marginBottom),f=ig(s.getComputedStyle(u.current)),p=Math.min(l.documentElement.clientHeight-c-d,f),h=e.scrollTop,m=ix(e),x=0,v=null,y=!1,b=!1,w=e=>{F.style.height=`${e}px`},j=n?m-h:h,k=Math.min(i+j,p);if(x=k,j<=1){let t;return void((t=ra(j,0,p-i))>0&&w(i+t),e.scrollTop=n?m:0,p-(i+t)<=1&&(H.current=!0),g())}if(p-k>1)n?b=!0:v=0;else if(y=!0,r&&h<m){let e=i+j-p;v=h-(j-e)}if(0!==(x=Math.ceil(x))&&w(x),b||null!=v){let t=ix(e),n=b?t:ra(v,0,t);Math.abs(e.scrollTop-n)>1&&(e.scrollTop=n)}(y||x>=p-1)&&(H.current=!0),g()});v.useImperativeHandle(x,()=>W,[W]),ro({open:I,ref:u,onComplete(){I&&c?.(!0)}}),e6(()=>{F&&u.current&&!Object.keys(B.current).length&&(B.current={top:F.style.top||"0",left:F.style.left||"0",right:F.style.right,height:F.style.height,bottom:F.style.bottom,minHeight:F.style.minHeight,maxHeight:F.style.maxHeight,marginTop:F.style.marginTop,marginBottom:F.style.marginBottom})},[u,F]),e6(()=>
3{I||C||(_.current=!1,H.current=!1,o_(F,B.current))},[I,C,F,u]),e6(()=>{let e=u.current;if(!I||!z||!F||!e||C&&!S||"ending"===a.state.transitionStatus)return;if(!C){_.current=!0,V.request(g),e.style.removeProperty("--transform-origin");return}let t=function(e){let{style:t}=e,n={};for(let[e,r]of ib)n[e]=t.getPropertyValue(e),t.setProperty(e,r,"important");return()=>{for(let[e]of ib){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}(e);e.style.removeProperty("--transform-origin");try{let t,n=h.current;n?.isConnected||(n=!n6.hasSelectedValue(a.state)&&p.current?.isConnected?p.current:null);let r=f.current,o=(0,rG.getWindow)(F),i=o.getComputedStyle(F),l=o.getComputedStyle(e),s=nt(z),u=iv(z),c=iy(z.getBoundingClientRect(),u),d=iy(F.getBoundingClientRect(),u),m=c.height,x=U||e,v=x.scrollHeight,w=parseFloat(l.borderBottomWidth),j=parseFloat(i.marginTop)||10,k=parseFloat(i.marginBottom)||10,C=parseFloat(i.minHeight)||100,S=ig(l),O=s.documentElement.clientHeight-j-k,N=s.documentElement.clientWidth,A=O-c.bottom+m,M="rtl"===T?c.right-d.width:c.left,R=0;if(n&&r){let e=iy(r.getBoundingClientRect(),u);t=iy(n.getBoundingClientRect(),u),M=d.left+("rtl"===T?e.right-t.right:e.left-t.left);let o=e.top-c.top+e.height/2;R=t.top-d.top+t.height/2-o}let I=A+R+k+w,$=Math.min(O,I),P=O-j-k,L=I-$;F.style.left=`${ra(M,5,N-5-d.width)}px`,F.style.height=`${$}px`,F.style.maxHeight="none",F.style.marginTop=`${j}px`,F.style.marginBottom=`${k}px`,e.style.height="100%";let D=ix(x),V=L>=D-1;V&&($=Math.min(O,d.height)-(L-D));let W=c.top<20||c.bottom>O-20||Math.ceil($)+1<Math.min(v,C),q=(o.visualViewport?.scale??1)!==1&&t1.engine.webkit;if(W||q){_.current=!0,o_(F,B.current),E(!1);return}let G=Math.max(C,$);if(V){let e=Math.max(0,O-I);F.style.top=d.height>=P?"0":`${e}px`,F.style.height=`${$}px`,x.scrollTop=ix(x)}else F.style.bottom="0",x.scrollTop=L;if(t){let n=d.top,r=d.height,o=t.top+t.height/2,i=ra(r>0?(o-n)/r*100:50,0,100);e.style.setProperty("--transform-origin",`50% ${i}%`)}(G===O||$>=S)&&(H.current=!0),g(),b&&null===a.state.selectedIndex&&null===a.state.activeIndex&&null!=y.current[0]&&a.set("activeIndex",0),_.current=!0}finally{t()}},[a,I,F,z,f,p,h,u,g,C,E,V,U,y,b,T,S]),v.useEffect(()=>{if(C&&F&&I)return t8((0,rG.getWindow)(F),"resize",function(e){d(!1,t6(t3.windowResize,e))})},[d,C,F,I]);let q=r$("div",e,{ref:[t,u],state:{open:I,transitionStatus:D,side:j,align:k},stateAttributesMapping:ih,props:[L,{...U?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":m||void 0,id:`${R}-list`},onKeyDown(e){O&&ic.has(e.key)&&e.stopPropagation()},onScroll(e){U||W(e.currentTarget)},...C&&{style:U?{height:"100%"}:oB}},oV(D),{className:!U&&C?is:void 0},s]});return(0,w.jsxs)(v.Fragment,{children:[!M&&(n=A,(0,w.jsx)("style",{nonce:n,href:is,precedence:"base-ui:low",children:`.${is}{scrollbar-width:none}.${is}::-webkit-scrollbar{display:none}`})),(0,w.jsx)(il,{context:N,modal:!1,disabled:!P,openInteractionType:$,returnFocus:l,restoreFocus:!0,children:q})]})});function ig(e){let t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function ix(e){return ru(e.scrollHeight,e.clientHeight)}function iv(e){return oO.platform.getScale(e)}function iy(e,t){return(0,oE.rectToClientRect)({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}let ib=[["transform","none"],["scale","1"],["translate","0 0"]],iw=v.forwardRef(function(e,t){let{render:n,className:r,style:o,...i}=e,{store:l,scrollHandlerRef:s}=nz(),{alignItemWithTriggerActive:a}=oU(),u=ta(l,n6.hasScrollArrows,void 0,void 0,void 0),c=ta(l,n6.openMethod,void 0,void 0,void 0),d=ta(l,n6.multiple,void 0,void 0,void 0),f=ta(l,n6.id,void 0,void 0,void 0),p={id:`${f}-list`,role:"listbox","aria-multiselectable":d||void 0,onScroll(e){s.current?.(e.currentTarget)},...a&&{style:oB},className:u&&"touch"!==c?is:void 0};return r$("div",e,{ref:[t,te(e=>{l.set("listElement",e)})],props:[p,i]})}),ij=((a={})[a.None=0]="None",a[a.GuessFromOrder=1]="GuessFromOrder",a);function ik(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:l,unregister:s,subscribeMapChange:a,elementsRef:u,labelsRef:c,nextIndexRef:d}=v.useContext(ow),f=v.useRef(-1),[p,h]=v.useState(i??(o===ij.GuessFromOrder?()=>{if(-1===f.current){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),m=v.useRef(null),g=v.useCallback(e=>{if(m.current=e,-1!==p&&null!==e&&(u.current[p]=e,c)){let n=void 0!==t;c.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,u,c,t,r]);return e6(()=>
3{if(null!=i)return;let e=m.current;if(e)return l(e,n),()=>{s(e)}},[i,l,s,n]),e6(()=>{if(null==i)return a(e=>{let t=m.current?e.get(m.current)?.index:null;null!=t&&h(t)})},[i,a,h]),{ref:g,index:p}}let iC=v.createContext(void 0);function iS(){let e=v.useContext(iC);if(!e)throw Error(ny(57));return e}var t3=t3;let iE=v.memo(v.forwardRef(function(e,t){let{render:n,className:r,style:o,value:i=null,label:l,disabled:s=!1,nativeButton:a=!1,...u}=e,c=v.useRef(null),d=ik({label:l,textRef:c,indexGuessBehavior:ij.GuessFromOrder}),{store:f,itemProps:p,setOpen:h,setValue:m,selectionRef:g,typingRef:x,valuesRef:y,multiple:b,selectedItemTextRef:j,disabled:k,readOnly:C}=nz(),S=ta(f,n6.isActive,d.index,void 0,void 0),E=ta(f,n6.open,void 0,void 0,void 0),O=ta(f,n6.isSelected,i,void 0,void 0),N=ta(f,n6.isSelectedByFocus,d.index,void 0,void 0),T=ta(f,n6.isItemEqualToValue,void 0,void 0,void 0),A=d.index,M=-1!==A,R=v.useRef(null);e6(()=>{if(!M)return;let e=y.current;return e[A]=i,()=>{delete e[A]}},[M,A,i,y]),e6(()=>{if(!M)return;let e=f.state.value,t=e;b&&Array.isArray(e)&&(t=e.length>0?e[e.length-1]:void 0),void 0!==t&&nQ(i,t,T)&&(f.set("selectedIndex",A),c.current&&(j.current=c.current))},[M,A,b,T,f,i,j]);let I=v.useRef(null),$=v.useRef("mouse"),P=v.useRef(!1),{getButtonProps:L,buttonRef:D}=rY({disabled:s,focusableWhenDisabled:!0,native:a,composite:!0});function z(){g.current.dragY=0}let F=r$("div",e,{ref:[D,t,d.ref,R],state:{disabled:s,selected:O,highlighted:S},props:[p,{role:"option","aria-selected":O,tabIndex:E&&S?0:-1,onKeyDown(e){I.current=e.key,f.set("activeIndex",A)," "===e.key&&x.current&&e.preventDefault()},onClick(e){let t="click"===e.type&&"touch"!==$.current,n=e.nativeEvent.pointerType,r=t&&t4(e.nativeEvent)&&(void 0!==n||S),o=t&&!r&&!P.current;P.current=!1,"keydown"===e.type&&null===I.current||s||"keydown"===e.type&&" "===I.current&&x.current||o||(I.current=null,function(e){if(k||C)return;let t=f.state.value;if(b){let n=Array.isArray(t)?t:[];m(O?n.filter(e=>!nQ(i,e,T)):[...n,i],t6(t3.itemPress,e))}else m(i,t6(t3.itemPress,e)),h(!1,t6(t3.itemPress,e))}(e.nativeEvent))},onPointerEnter(e){$.current=e.pointerType},onPointerMove(e){if("mouse"===e.pointerType&&1===e.buttons){let t=g.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){$.current=e.pointerType,P.current=!0,z()},onMouseUp(){if(z(),s||"touch"===$.current||P.current)return;let e=!g.current.allowSelectedMouseUp&&O,t=!g.current.allowUnselectedMouseUp&&!O;e||t||(P.current=!0,R.current?.click(),P.current=!1)}},u,L]}),U=v.useMemo(()=>({selected:O,index:A,textRef:c,selectedByFocus:N,hasRegistered:M}),[O,A,c,N,M]);return(0,w.jsx)(iC.Provider,{value:U,children:F})})),iO=v.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=iS();return n||r?(0,w.jsx)(iN,{...e,ref:t}):null}),iN=v.memo(v.forwardRef((e,t)=>{let{render:n,className:r,style:o,keepMounted:i,...l}=e,{selected:s}=iS(),a=v.useRef(null),{transitionStatus:u,setMounted:c}=nJ(s),d=r$("span",e,{ref:[t,a],state:{selected:s,transitionStatus:u},props:[{"aria-hidden":!0,children:"✔️"},l],stateAttributesMapping:rn});return ro({open:s,ref:a,onComplete(){s||c(!1)}}),d})),iT=v.memo(v.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:o,hasRegistered:i}=iS(),{firstItemTextRef:l,selectedItemTextRef:s}=nz(),{render:a,className:u,style:c,...d}=e;return r$("div",e,{ref:[v.useCallback(e=>{e&&(i&&0===n&&(l.current=e),i&&o&&(s.current=e))},[l,s,n,o,i]),t,r],props:d})})),iA={...rq,...rn},iM=v.forwardRef(function(e,t){let{render:n,className:r,style:o,...i}=e,{store:l}=nz(),{side:s,align:a,arrowRef:u,arrowStyles:c,arrowUncentered:d,alignItemWithTriggerActive:f}=oU(),p=r$("div",e,{state:{open:ta(l,n6.open,void 0,void 0,void 0),side:s,align:a,uncentered:d},ref:[u,t],props:[{style:c,"aria-hidden":!0},i],stateAttributesMapping:iA});return f?null:p}),iR=v.forwardRef(function(e,t){let{render:n,className:r,style:o,direction:i,keepMounted:l=!1,...s}=e,a="up"===i,{store:u,popupRef:c,listRef:d,handleScrollArrowVisibility:f,scrollArrowsMountedCountRef:p}=nz(),{side:h,scrollDownArrowRef:m,scrollUpArrowRef:g}=oU(),x=ta(u,a?n6.scrollUpArrowVisible:n6.scrollDownArrowVisible,void 0,void 0,void 0),v=ta(u,n6.openMethod,void 0,void 0,void 0),y=x&&"touch"!==v,b=ty(),w=a?g:m,{mounted:j,transitionStatus:k,setMounted:C}=nJ(y);e6(()=>(p.current+=1,u.state.hasScrollArrows||u.set("hasScrollArrows",!0),()=>{p.current=Math.max(0,p.current-1),0===p.current&&u.state.hasScrollArrows&&u.set("hasScrollArrows",!1)}),[u,p]),ro({open:y,ref:w,onComplete(){y||C(!1)}});let S=r$("div",e,{ref:[t,w],state:{direction:i,visible:y,side:h,transitionStatus:k}
3,props:[{"aria-hidden":!0,children:a?"▲":"▼",style:{position:"absolute"},onMouseMove(e){0===e.movementX&&0===e.movementY||b.isStarted()||(u.set("activeIndex",null),b.start(40,function e(){let t=u.state.listElement??c.current;if(!t)return;u.set("activeIndex",null),f();let n=ru(t.scrollHeight,t.clientHeight),r=rc(t.scrollTop,n),o=r===(a?0:n),i=d.current;if(r!==t.scrollTop&&(t.scrollTop=r),0===i.length&&u.set(a?"scrollUpArrowVisible":"scrollDownArrowVisible",!o),o)return void b.clear();if(i.length>0){let e=w.current?.offsetHeight||0;t.scrollTop=function(e,t,n,r,o,i){if(t){let t=0,r=n+o-1;for(let n=0;n<e.length;n+=1){let o=e[n];if(o&&o.offsetTop>=r){t=n;break}}let l=Math.max(0,t-1),s=e[l];return l<t&&s?rc(s.offsetTop-o,i):0}let l=e.length-1,s=n+r-o+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){l=Math.max(0,t-1);break}}let a=Math.min(e.length-1,l+1),u=e[a];return a>l&&u?rc(u.offsetTop+u.offsetHeight-r+o,i):i}(i,a,r,t.clientHeight,e,n)}b.start(40,e)}))},onMouseLeave(){b.clear()}},s],stateAttributesMapping:rn});return j||l?S:null}),iI=v.forwardRef(function(e,t){return(0,w.jsx)(iR,{...e,ref:t,direction:"down"})}),i$=v.forwardRef(function(e,t){return(0,w.jsx)(iR,{...e,ref:t,direction:"up"})}),iP=v.createContext(void 0),iL=v.forwardRef(function(e,t){let{render:n,className:r,style:o,...i}=e,[l,s]=v.useState(),a=v.useMemo(()=>({labelId:l,setLabelId:s}),[l,s]),u=r$("div",e,{ref:t,props:[{role:"group","aria-labelledby":l},i]});return(0,w.jsx)(iP.Provider,{value:a,children:u})}),iD=v.forwardRef(function(e,t){let{render:n,className:r,style:o,id:i,...l}=e,{setLabelId:s}=function(){let e=v.useContext(iP);if(void 0===e)throw Error(ny(56));return e}(),a=nG(i);return e6(()=>{s(a)},[a,s]),r$("div",e,{ref:t,props:[{id:a},l]})}),iz=v.forwardRef(function(e,t){let{className:n,render:r,orientation:o="horizontal",style:i,...l}=e;return r$("div",e,{state:{orientation:o},ref:t,props:[{role:"separator","aria-orientation":o},l]})});e.s(["Arrow",0,iM,"Backdrop",0,oy,"Group",0,iL,"GroupLabel",0,iD,"Icon",0,r1,"Item",0,iE,"ItemIndicator",0,iO,"ItemText",0,iT,"Label",0,rL,"List",0,iw,"Popup",0,im,"Portal",0,ox,"Positioner",0,o0,"Root",0,function(e){let{id:t,value:n,defaultValue:r=null,onValueChange:o,open:i,defaultOpen:l=!1,onOpenChange:s,name:a,form:u,autoComplete:c,disabled:d=!1,readOnly:f=!1,required:p=!1,modal:h=!0,actionsRef:m,inputRef:g,onOpenChangeComplete:x,items:y,multiple:b=!1,itemToStringLabel:j,itemToStringValue:k,isItemEqualToValue:C=nX,highlightItemOnHover:S=!0,children:E}=e,{clearErrors:O}=v.useContext(ri),{setDirty:N,setTouched:T,setFocused:A,validityData:M,setFilled:R,name:I,disabled:$,validation:P,validationMode:L}=nq(),D=nZ({id:t}),z=$||d,F=I??a,[U,H]=e7({controlled:n,default:b?r??td:r,name:"Select",state:"value"}),[_,B]=e7({controlled:i,default:l,name:"Select",state:"open"}),V=v.useRef([]),W=v.useRef([]),q=v.useRef(null),G=v.useRef(null),K=v.useRef(0),Y=v.useRef(null),Z=v.useRef([]),J=v.useRef(!1),X=v.useRef(null),Q=v.useRef(null),ee=v.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),et=v.useRef(!1),{mounted:en,setMounted:er,transitionStatus:eo}=nJ(_),{openMethod:ei,triggerProps:el}=function(e){let[t,n]=v.useState(null),r=rs(e,n);return rl(e,t=>{t&&!e&&n(null)}),v.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}(_),es=eQ(()=>new tu({id:D,labelId:void 0,modal:h,multiple:b,itemToStringLabel:j,itemToStringValue:k,isItemEqualToValue:C,value:U,open:_,mounted:en,transitionStatus:eo,items:y,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ea=ta(es,n6.activeIndex,void 0,void 0,void 0),eu=ta(es,n6.selectedIndex,void 0,void 0,void 0),ec=ta(es,n6.triggerElement,void 0,void 0,void 0),ed=ta(es,n6.positionerElement,void 0,void 0,void 0),ef=e5(ei),ep=ei??ef??null,eh=v.useMemo(()=>b?"":n5(U,k),[b,U,k]),em=v.useMemo(()=>b&&Array.isArray(U)?U.map(e=>n5(e,k)):n5(U,k),[b,U,k]);!function(e,t,n,r,o=!0,i){let{registerFieldControl:l}=nq(),s=v.useRef(null);s.current||(s.current=Symbol()),e6(()=>{let a=s.current;if(a&&o)return l(a,{controlRef:e,getValue:r,id:t,name:i,value:n}),()=>{l(a,void 0)}},[e,o,r,t,i,l,n])}(tr(es.state.triggerElement),D,U,te(()=>em),!z,a);let eg=v.useRef(U),ex=b?Array.isArray(U)&&U.length>0:null!=U&&""!==n5(U,k);e6(()=>{U!==eg.current&&es.set("forceMount",!0)},[es,U]),e6(()=>{R(ex)},[ex,R]),e6(function(){let e,t=Z.current;if(b){let n=Array.isArray(U)?U:[];if(0===n.length)e=null;else{let r=n0(t,n[n.length-1],C);e=-1===r?null:r}}else{let n=n0(t,U,C);e=-1===n?null:n}null===e&&(Q.current=null),_||es.set("selectedIndex",e)},[ex,b,_,U,Z,C,es,Q]),rl(U,()=>{let e;O(F),N((e=M.initialValue,Array.isArray(U)&&Array.isArray(e)?!function(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}(U,e,(e,t)=>nQ(e,t,C)):U!==e)),P.change(U)});let ev=te((e,t)=>
3{s?.(e,t),!t.isCanceled&&(B(e),e||t.reason!==t3.focusOut&&t.reason!==t3.outsidePress||(T(!0),A(!1),"onBlur"===L&&P.commit(U)))}),ey=te(()=>{er(!1),es.update({activeIndex:null,openMethod:null}),x?.(!1)});ro({enabled:!m,open:_,ref:q,onComplete(){_||ey()}}),v.useImperativeHandle(m,()=>({unmount:ey}),[ey]);let eb=te((e,t)=>{o?.(e,t),t.isCanceled||H(e)}),ew=te(()=>{let e=es.state.listElement||q.current;if(!e)return;let t=ru(e.scrollHeight,e.clientHeight),n=rc(e.scrollTop,t),r=n>0,o=n<t;es.state.scrollUpArrowVisible!==r&&es.set("scrollUpArrowVisible",r),es.state.scrollDownArrowVisible!==o&&es.set("scrollDownArrowVisible",o)}),ej=nC({open:_,onOpenChange:ev,elements:{reference:ec,floating:ed}}),ek=t9(ej,{enabled:!f&&!z,event:"mousedown"}),eC=nx(ej),eS=function(e,t){let{listRef:n,activeIndex:r,onNavigate:o=()=>{},enabled:i=!0,selectedIndex:l=null,allowEscape:s=!1,loopFocus:a=!1,nested:u=!1,rtl:c=!1,virtual:d=!1,focusItemOnOpen:f="auto",focusItemOnHover:p=!0,openOnArrowKeyDown:h=!0,disabledIndices:m,orientation:g="vertical",parentOrientation:x,id:y,resetOnPointerLeave:b=!0,externalTree:w,grid:j}=t,k=null!=j,C="rootStore"in e?e.rootStore:e,S=C.useState("open"),E=C.useState("floatingElement"),O=C.useState("domReferenceElement"),N=C.context.dataRef,T=t$(E),A=tI(O),M=tr(T),R=nu(),I=nc(w),$=v.useRef(f),P=v.useRef(l??-1),L=v.useRef(null),D=v.useRef(!0),z=te(e=>{o(-1===P.current?null:P.current,e)}),F=v.useRef(!!E),U=v.useRef(S),H=v.useRef(!1),_=v.useRef(!1),B=v.useRef(null),V=tr(m),W=tr(S),q=tr(l),G=tr(b),K=tx(),Y=tx(),Z=te(()=>{function e(e){d?I?.events.emit("virtualfocus",e):B.current=nR(e,{sync:H.current,preventScroll:!0})}let t=n.current[P.current],r=_.current;t&&e(t),(H.current?e=>e():e=>K.request(e))(()=>{let o=n.current[P.current]||t;!o||(t||e(o),en&&(r||!D.current)&&o.scrollIntoView?.({block:"nearest",inline:"nearest"}))})});e6(()=>{N.current.orientation=g},[N,g]),e6(()=>{i&&(S&&E?(P.current=l??-1,$.current&&null!=l&&(_.current=!0,z())):F.current&&(P.current=-1,z()))},[i,S,E,l,z]),e6(()=>{if(i){if(!S){H.current=!1;return}if(E)if(null==r){if(H.current=!1,null!=q.current)return;if(F.current&&(P.current=-1,Z()),(!U.current||!F.current)&&$.current&&(null!=L.current||!0===$.current&&null==L.current)){let e=0,t=()=>{null==n.current[0]?(e<2&&(e?e=>Y.request(e):queueMicrotask)(t),e+=1):(P.current=null==L.current||nP(L.current,g,c)||u?nE(n):nO(n),L.current=null,z())};t()}}else nS(n.current,r)||(P.current=r,Z(),_.current=!1)}},[i,S,E,r,q,u,n,g,c,z,Z,Y]),e6(()=>{if(!i||E||!I||d||!F.current)return;let e=I.nodesRef.current,t=e.find(e=>e.id===R)?.context?.elements.floating,n=tw(nt(O??t??null)),r=e.some(e=>e.context&&tj(e.context.elements.floating,n));t&&!r&&D.current&&t.focus({preventScroll:!0})},[i,E,O,I,R,d]),e6(()=>{U.current=S,F.current=!!E}),e6(()=>{S||(L.current=null,$.current=f)},[S,f]);let J=null!=r,X=te(e=>{if(!W.current)return;let t=n.current.indexOf(e.currentTarget);-1!==t&&(P.current!==t||r!==t)&&(P.current=t,z(e))}),Q=te(()=>x??I?.nodesRef.current.find(e=>e.id===R)?.context?.dataRef?.current.orientation),ee=te(()=>nE(n,V.current)),et=te(e=>{var t;if(D.current=!1,H.current=!0,229===e.which||!W.current&&e.currentTarget===M.current)return;if(u&&(t=e.key,"both"===g||"horizontal"===g&&k?"Escape"===t:nI(g,c?t===tO:t===tE,t===tN))){n$(e.key,Q())||t2(e),C.setOpen(!1,t6(t3.listNavigation,e.nativeEvent)),(0,tb.isHTMLElement)(O)&&(d?I?.events.emit("virtualfocus",O):O.focus());return}let r=P.current,o=nE(n,m),i=nO(n,m);if(A||("Home"===e.key&&(t2(e),P.current=o,z(e)),"End"===e.key&&(t2(e),P.current=i,z(e))),null!=j){let t=j(e,P.current,n,g,a,c,m,o,i);if(null!=t&&(P.current=t,z(e)),"both"===g)return}if(n$(e.key,g)){if(t2(e),S&&!d&&tw(e.currentTarget.ownerDocument)===e.currentTarget){P.current=nP(e.key,g,c)?o:i,z(e);return}nP(e.key,g,c)?a?r>=i?s&&r!==n.current.length?P.current=-1:(H.current=!1,P.current=o):P.current=nN(n.current,{startingIndex:r,disabledIndices:m}):P.current=Math.min(i,nN(n.current,{startingIndex:r,disabledIndices:m})):a?r<=o?s&&-1!==r?P.current=n.current.length:(H.current=!1,P.current=i):P.current=nN(n.current,{startingIndex:r,decrement:!0,disabledIndices:m}):P.current=Math.max(o,nN(n.current,{startingIndex:r,decrement:!0,disabledIndices:m})),nS(n.current,P.current)&&(P.current=-1),z(e)}}),en=v.useMemo(()=>({onFocus(e){H.current=!0,X(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){H.current=!0,_.current=!1,p&&X(e)},onPointerLeave(e){if(!W.current||!D.current||"touch"===e.pointerType)return;H.current=!0;let t=e.relatedTarget;if(!(!p||n.current.includes(t))&&G.current&&(B.current?.(),B.current=null,P.current=-1,z(e),!d)){let e=M.current,t=tw(nt(e));e&&tj(e,t)&&e.focus({preventScroll:!0})}}}),[X,W,M,p,n,z,G,d]),er=v.useMemo(()=>d&&S&&J&&{"aria-activedescendant":`${y}-${r}`},[d,S,J,y,r]),eo=v.useMemo(()=>({"aria-orientation":"both"===g?void 0:g,...!A?er:{},onKeyDown(e){if("Tab"===e.key&&e.shiftKey&&S&&!d){let t=tk(e.nativeEvent);if(t&&!tj(M.current,t))return;t2(e),C.setOpen(!1,t6(t3.focusOut,e.nativeEvent)),(0,tb.isHTMLElement)(O)&&O.focus();return}et(e)},onPointerMove(){D.current=!0}}),[er,et,M,g,A,C,S,d,O]),ei=v.useMemo(()=>{function e(e){C.setOpen(!0,t6(t3.listNavigation,e.nativeEvent,e.currentTarget))}function t(e){"auto"===f&&t4(e.nativeEvent)&&($.current=!d)}function n(e){$.current=f,"auto"===f&&t5(e.nativeEvent)&&($.current=!0)}return{onKeyDown(t){var n;let r=C.select("open");D.current=!1;let o=t.key.startsWith("Arrow"),i=(n=t.key,nI(Q(),c?n===tE:n===tO,n===tT)),l=n$(t.key,g),s=(u?i:l)||"Enter"===t.key||""===t.key.trim();if(d&&r)return et(t);if(r||h||!o){if(s){let e=n$(t.key,Q());L.current=u&&e?null:t.key}if(u){i&&(t2(t),r?(P.current=ee(),z(t)):e(t));return}l&&(null!=q.current&&(P.current=q.current),t2(t),!r&&h?e(t):et(t),r&&z(t))}},onFocus(e){C.select("open")&&!d&&(P.current=-1,z(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[et,f,ee,u,z,C,h,g,Q,c,q,d]),el=v.useMemo(()=>({...er,...ei}),[er,ei]);return v.useMemo(()=>i?{reference:el,floating:eo,item:en,trigger:ei}:{},[i,el,eo,ei,en])}(ej,{enabled:!f&&!z,listRef:V,activeIndex:ea,selectedIndex:eu,disabledIndices:td,onNavigate(e){(null!==e||_)&&es.set("activeIndex",e)},focusItemOnHover:S}),eE=function(e,t){let{listRef:n,elementsRef:r,activeIndex:o,onMatch:i,disabledIndices:l,onTyping:s,enabled:a=!0,resetMs:u=750,selectedIndex:c=null}=t,d="rootStore"in e?e.rootStore:e,f=d.useState("open"),p=ty(),h=v.useRef(""),m=v.useRef(c??o??-1),g=v.useRef(null),x=te(e=>{function t(e){let t;return!!(!(t=r?.current[e])||nA(t))&&(null==l||!nT(td,e,l))}function a(e,n,r=0){if(0===e.length)return -1;let o=(r%e.length+e.length)%e.length,i=n.toLowerCase();for(let n=0;n<e.length;n+=1){let r=(o+n)%e.length,l=e[r];if(l?.toLowerCase().startsWith(i)&&t(r))return r}return -1}let d=n.current;if(h.current.length>0&&" "===e.key&&(t2(e),s?.(!0)),h.current.length>0&&" "!==h.current[0]&&-1===a(d,h.current)&&" "!==e.key&&s?.(!1),null==d||1!==e.ke
3y.length||e.ctrlKey||e.metaKey||e.altKey)return;f&&" "!==e.key&&(t2(e),s?.(!0));let x=""===h.current;x&&(m.current=c??o??-1),d.every((e,n)=>!(e&&t(n))||e[0]?.toLowerCase()!==e[1]?.toLowerCase())&&h.current===e.key&&(h.current="",m.current=g.current),h.current+=e.key,p.start(u,()=>{h.current="",m.current=g.current,s?.(!1)});let v=x?c??o??-1:m.current,y=a(d,h.current,(v??0)+1);-1!==y?(i?.(y),g.current=y):" "!==e.key&&(h.current="",s?.(!1))}),y=te(e=>{let t=e.relatedTarget,n=d.select("domReferenceElement"),r=d.select("floatingElement");tj(n,t)||tj(r,t)||(p.clear(),h.current="",m.current=g.current,s?.(!1))});e6(()=>{(f||null===c)&&(p.clear(),g.current=null,""!==h.current&&(h.current=""))},[f,c,p]),e6(()=>{f&&""===h.current&&(m.current=c??o??-1)},[f,c,o]);let b=v.useMemo(()=>({onKeyDown:x,onBlur:y}),[x,y]);return v.useMemo(()=>a?{reference:b,floating:b}:{},[a,b])}(ej,{enabled:!f&&!z&&(_||!b),listRef:W,activeIndex:ea,selectedIndex:eu,disabledIndices:e=>{var t;return null==(t=V.current[e])||t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled")},onMatch(e){_?es.set("activeIndex",e):eb(Z.current[e],t6("none"))},onTyping(e){J.current=e}}),eO=v.useMemo(()=>{let e=rj(eE.reference,eS.reference,eC.reference,ek.reference,el);return D&&(e.id=D),e},[ek.reference,eE.reference,eS.reference,eC.reference,el,D]),eN=v.useMemo(()=>rj(rd,eE.floating,eS.floating,eC.floating),[eE.floating,eS.floating,eC.floating]),eT=eS.item??tf;e4(()=>{es.update({popupProps:eN,triggerProps:eO})}),e6(()=>{es.update({id:D,modal:h,multiple:b,value:U,open:_,mounted:en,transitionStatus:eo,popupProps:eN,triggerProps:eO,items:y,itemToStringLabel:j,itemToStringValue:k,isItemEqualToValue:C,openMethod:ep})},[es,D,h,b,U,_,en,eo,eN,eO,y,j,k,C,ep]);let eA=v.useMemo(()=>({store:es,name:F,required:p,disabled:z,readOnly:f,multiple:b,highlightItemOnHover:S,setValue:eb,setOpen:ev,listRef:V,popupRef:q,scrollHandlerRef:G,handleScrollArrowVisibility:ew,scrollArrowsMountedCountRef:K,itemProps:eT,valueRef:Y,valuesRef:Z,labelsRef:W,typingRef:J,selectionRef:ee,firstItemTextRef:X,selectedItemTextRef:Q,validation:P,onOpenChangeComplete:x,alignItemWithTriggerActiveRef:et,initialValueRef:eg}),[es,F,p,z,f,b,S,eb,ev,eT,P,x,ew]),eM=e0(g,P.inputRef),eR=b&&Array.isArray(U)&&U.length>0,eI=b?void 0:F,e$=v.useMemo(()=>b&&Array.isArray(U)&&F?U.map(e=>{let t=n5(e,k);return(0,w.jsx)("input",{type:"hidden",form:u,name:F,value:t,disabled:z},t)}):null,[b,U,u,F,k,z]);return(0,w.jsx)(nL.Provider,{value:eA,children:(0,w.jsxs)(nD.Provider,{value:ej,children:[E,(0,w.jsx)("input",{...P.getValidationProps(z,{onFocus(){es.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||z||f)return;let t=e.currentTarget.value,n=t6(t3.none,e.nativeEvent);es.set("forceMount",!0),queueMicrotask(function(){if(b)return;let e=t.toLowerCase(),r=Z.current.findIndex(t=>n5(t,k).toLowerCase()===e||n4(t,j).toLowerCase()===e);-1===r&&(r=Z.current.findIndex((t,n)=>{let r=W.current[n];return null!=r&&r.toLowerCase()===e}));let o=-1===r?void 0:Z.current[r];null!=o&&eb(o,n)})}}),id:D&&null==eI?`${D}-hidden-input`:void 0,form:u,name:eI,autoComplete:c,value:eh,disabled:z,required:p&&!eR,readOnly:f,ref:eM,style:F?eJ:eZ,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),e$]})})},"ScrollDownArrow",0,iI,"ScrollUpArrow",0,i$,"Separator",0,iz,"Trigger",0,rX,"Value",0,r0],574786);var iF=e.i(574786),iF=iF;let iU=iF.Root;iF.Group;let iH=iF.Value;function i_({className:e,children:t,ref:n,...r}){return(0,w.jsxs)(iF.Trigger,{ref:n,className:(0,T.cn)("flex items-center w-full rounded-md border p-2 gap-2 text-start text-sm text-fd-secondary-foreground bg-fd-secondary hover:bg-fd-accent focus:outline-none focus:ring focus:ring-fd-ring disabled:cursor-not-allowed disabled:opacity-50 data-placeholder:text-fd-muted-foreground",e),...r,children:[t,(0,w.jsx)(iF.Icon,{className:"ms-auto text-fd-muted-foreground shrink-0",children:(0,w.jsx)(eG,{className:"size-3.5"})})]})}function iB({className:e,ref:t,...n}){return(0,w.jsx)(iF.ScrollUpArrow,{ref:t,className:(0,T.cn)("flex items-center justify-center py-1",e),...n,children:(0,w.jsx)(eK,{className:"size-4"})})}function iV({className:e,ref:t,...n}){return(0,w.jsx)(iF.ScrollDownArrow,{ref:t,className:(0,T.cn)("flex items-center justify-center py-1",e),...n,children:(0,w.jsx)(eG,{className:"size-4"})})}function iW({className:e,children:t,align:n="start",side:r="bottom",sideOffset:o=4,ref:i,...l}){return(0,w.jsx)(iF.Portal,{children:(0,w.jsx)(iF.Positioner,{align:n,side:r,sideOffset:o,className:"z-50",children:(0,w.jsxs)(iF.Popup,{ref:i,className:(0,T.cn)("z-50 min-w-(--anchor-width) overflow-hidden rounded-lg border bg-fd-popover text-fd-
3popover-foreground shadow-md",e),...l,children:[(0,w.jsx)(iB,{}),(0,w.jsx)(iF.List,{className:"p-1",children:t}),(0,w.jsx)(iV,{})]})})})}function iq({className:e,children:t,ref:n,...r}){return(0,w.jsxs)(iF.Item,{ref:n,className:(0,T.cn)("flex select-none flex-row items-center rounded-md py-1.5 px-2 text-sm outline-none data-[highlighted]:bg-fd-accent data-[highlighted]:text-fd-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[(0,w.jsx)(iF.ItemText,{children:t}),(0,w.jsx)(iF.ItemIndicator,{className:"ms-auto",children:(0,w.jsx)(eq,{className:"size-3.5 text-fd-primary"})})]})}let iG=(0,ef.cva)("text-xs font-medium text-fd-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-70");function iK({className:e,type:t,ref:n,...r}){return(0,w.jsx)("input",{type:t,className:(0,T.cn)("flex h-9 w-full rounded-md border bg-fd-secondary px-2 py-1.5 text-[0.8125rem] text-fd-secondary-foreground transition-colors placeholder:text-fd-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-fd-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...r})}let iY=eW("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s([],914651),e.i(914651);let iZ=v.createContext(!1),iJ=v.createContext(void 0);function iX(e){let t=v.useContext(iJ);if(!1===e&&void 0===t)throw Error(ny(27));return t}let iQ={...rq,...rn},i0=v.forwardRef(function(e,t){let{render:n,className:r,style:o,forceRender:i=!1,...l}=e,{store:s}=iX(),a=s.useState("open"),u=s.useState("nested"),c=s.useState("mounted");return r$("div",e,{state:{open:a,transitionStatus:s.useState("transitionStatus")},ref:[s.context.backdropRef,t],stateAttributesMapping:iQ,props:[{role:"presentation",hidden:!c,style:{userSelect:"none",WebkitUserSelect:"none"}},l],enabled:i||!u})});var t3=t3;let i1=v.forwardRef(function(e,t){let{render:n,className:r,style:o,disabled:i=!1,nativeButton:l=!0,...s}=e,{store:a}=iX(),u=a.useState("open"),{getButtonProps:c,buttonRef:d}=rY({disabled:i,native:l});return r$("button",e,{state:{disabled:i},ref:[t,d],props:[{onClick:function(e){u&&a.setOpen(!1,t6(t3.closePress,e.nativeEvent))}},s,c]})}),i2=v.forwardRef(function(e,t){let{render:n,className:r,style:o,id:i,...l}=e,{store:s}=iX(),a=nG(i);return s.useSyncedValueWithCleanup("descriptionElementId",a),r$("p",e,{ref:t,props:[{id:a},l]})}),i4=((u={}).nestedDialogs="--nested-dialogs",u),i5=((c={})[c.open=rD.open]="open",c[c.closed=rD.closed]="closed",c[c.startingStyle=rD.startingStyle]="startingStyle",c[c.endingStyle=rD.endingStyle]="endingStyle",c.nested="data-nested",c.nestedDialogOpen="data-nested-dialog-open",c),i7=v.createContext(void 0);function i6(){let e=v.useContext(i7);if(void 0===e)throw Error(ny(26));return e}let i3={...rq,...rn,nestedDialogOpen:e=>e?{[i5.nestedDialogOpen]:""}:null},i9=v.forwardRef(function(e,t){let{render:n,className:r,style:o,finalFocus:i,initialFocus:l,...s}=e,{store:a}
3=iX(),u=a.useState("descriptionElementId"),c=a.useState("disablePointerDismissal"),d=a.useState("floatingRootContext"),f=a.useState("popupProps"),p=a.useState("modal"),h=a.useState("mounted"),m=a.useState("nested"),g=a.useState("nestedOpenDialogCount"),x=a.useState("open"),v=a.useState("openMethod"),y=a.useState("titleElementId"),b=a.useState("transitionStatus"),j=a.useState("role"),k=d.useState("floatingId"),C=s.id??k;i6(),ro({open:x,ref:a.context.popupRef,onComplete(){x&&a.context.onOpenChangeComplete?.(!0)}});let S=void 0===l?rf(a.context.popupRef):l,E=a.useStateSetter("popupElement"),O=r$("div",e,{state:{open:x,nested:m,transitionStatus:b,nestedDialogOpen:g>0},props:[f,{id:C,"aria-labelledby":y??void 0,"aria-describedby":u??void 0,role:j,...rd,hidden:!h,onKeyDown(e){ic.has(e.key)&&e.stopPropagation()},style:{[i4.nestedDialogs]:g}},s],ref:[t,a.context.popupRef,E],stateAttributesMapping:i3});return(0,w.jsx)(il,{context:d,openInteractionType:v,disabled:!h,closeOnFocusOut:!c,initialFocus:S,returnFocus:i,modal:!1!==p,restoreFocus:"popup",children:O})}),i8=v.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:o}=iX(),i=o.useState("mounted"),l=o.useState("modal"),s=o.useState("open");return i||n?(0,w.jsx)(i7.Provider,{value:n,children:(0,w.jsxs)(om,{ref:t,...r,children:[i&&!0===l&&(0,w.jsx)(oH,{ref:o.context.internalBackdropRef,inert:ob(!s)}),e.children]})}):null});var t3=t3;function le({store:e,parentContext:t,isDrawer:n}){let r=e.useState("open"),o=e.useState("disablePointerDismissal"),i=e.useState("modal"),l=e.useState("popupElement"),s=e.useState("floatingRootContext"),[a,u]=v.useState(0),[c,d]=v.useState(0),f=0===a,p=nx(s,{outsidePressEvent:()=>e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:"trap-focus"===i?"sloppy":"intentional",touch:"sloppy"},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||"button"in t&&0!==t.button||"touches"in t&&1!==t.touches.length)return!1;let n=tk(t);return!!f&&!o&&(!i||!e.context.internalBackdropRef.current&&!e.context.backdropRef.current||e.context.internalBackdropRef.current===n||e.context.backdropRef.current===n||tj(n,l)&&!n?.hasAttribute("data-base-ui-portal"))},escapeKey:f});oJ(r&&!0===i,l),e.useContextCallback("onNestedDialogOpen",(e,t)=>{u(e),d(t)}),e.useContextCallback("onNestedDialogClose",()=>{u(0),d(0)}),v.useEffect(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(a+1,c+ +!!n),t?.onNestedDialogClose&&!r&&t.onNestedDialogClose(),()=>{t?.onNestedDialogClose&&r&&t.onNestedDialogClose()}),[n,r,a,c,t]);let h=p.reference??tf;return rv(e,{activeTriggerProps:h,inactiveTriggerProps:p.trigger??tf,popupProps:p.floating??tf,nestedOpenDialogCount:a,nestedOpenDrawerCount:c}),null}function lt(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new nk({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new nv,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0}),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:tf,inactiveTriggerProps:tf,popupProps:tf}}function ln(e,t,n=!1){return new nk({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}let lr=nb(e=>e.triggerIdProp??e.activeTriggerId),lo=nb(e=>e.openProp??e.open),li=nb(e=>(e.popupElement?.id??e.floatingId)||void 0);function ll(e,t){return void 0!==t&&lo(e)&&lr(e)===t}let ls={open:lo,mounted:nb(e=>e.mounted),transitionStatus:nb(e=>e.transitionStatus),floatingRootContext:nb(e=>e.floatingRootContext),triggerCount:nb(e=>e.triggerCount),preventUnmountingOnClose:nb(e=>e.preventUnmountingOnClose),payload:nb(e=>e.payload),activeTriggerId:lr,activeTriggerElement:nb(e=>e.mounted?e.activeTriggerElement:null),popupId:li,isTriggerActive:nb((e,t)=>void 0!==t&&lr(e)===t),isOpenedByTrigger:nb((e,t)=>ll(e,t)),isMountedByTrigger:nb((e,t)=>void 0!==t&&lr(e)===t&&e.mounted),triggerProps:nb((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:nb((e,t)=>ll(e,t)||void 0!==t&&lo(e)&&null==lr(e)&&1===e.triggerCount?li(e):void 0),popupProps:nb(e=>e.popupProps),popupElement:nb(e=>e.popupElement),positionerElement:nb(e=>e.positionerElement)},la={...ls,modal:nb(e=>e.modal),nested:nb(e=>e.nested),nestedOpenDialogCount:nb(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:nb(e=>e.nestedOpenDrawerCount),disablePointerDismissal:nb(e=>e.disablePointerDismissal),openMethod:nb(e=>e.openMethod),descriptionElementId:nb(e=>e.descriptionElementId),titleElementId:nb(e=>e.titleElementId),viewportElement:nb(e=>e.viewportElement),role:nb(e=>e.role)};class lu extends nw{constructor(e,t,n=!1){const r=new nv,o=function(e={}){return{...lt(),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}}(e);o.floatingRootContext=ln(r,t,n),super(o,{popupRef:v.createRef(),backdropRef:v.createRef(),internalBackdropRef:v.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},la)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e};rh(n,e,t.trigger),this.update(n)};static useStore(e,t){return rp(e,(e,n)=>new lu(t,e,n),!0).store}}let lc=((d={})[d.open=rD.open]="open",d[d.closed=rD.closed]="closed",d[d.startingStyle=rD.startingStyle]="startingStyle",d[d.endingStyle=rD.endingStyle]="endingStyle",d.nested="data-nested",d.nestedDialogOpen="data-nested-dialog-open",d),ld={...rq,...rn,nested:e=>e?{[lc.nested]:""}:null,nestedDialogOpen:e=>e?{[lc.nestedDialogOpen]:""}:null},lf=v.forwardRef(function(e,t){let{render:n,className:r,style:o,children:i,...l}=e,s=i6(),{store:a}
3=iX(),u=a.useState("open"),c=a.useState("nested"),d=a.useState("transitionStatus"),f=a.useState("nestedOpenDialogCount"),p=a.useState("mounted");return r$("div",e,{enabled:s||p,state:{open:u,nested:c,transitionStatus:d,nestedDialogOpen:f>0},ref:[t,a.useStateSetter("viewportElement")],stateAttributesMapping:ld,props:[{role:"presentation",hidden:!p,style:{pointerEvents:u?void 0:"none"},children:i},l]})}),lp=v.forwardRef(function(e,t){let{render:n,className:r,style:o,id:i,...l}=e,{store:s}=iX(),a=nG(i);return s.useSyncedValueWithCleanup("titleElementId",a),r$("h2",e,{ref:t,props:[{id:a},l]})}),lh=v.forwardRef(function(e,t){let{render:n,className:r,style:o,disabled:i=!1,nativeButton:l=!0,id:s,payload:a,handle:u,...c}=e,d=iX(!0),f=u?.store??d?.store;if(!f)throw Error(ny(79));let p=nG(s),h=f.useState("floatingRootContext"),m=f.useState("isOpenedByTrigger",p),g=f.useState("triggerPopupId",p),x=v.useRef(null),{registerTrigger:y,isMountedByThisTrigger:b}=rm(p,x,f,{payload:a}),{getButtonProps:w,buttonRef:j}=rY({disabled:i,native:l}),k=t9(h,{enabled:null!=h}),C=rs(()=>f.select("open"),e=>{f.set("openMethod",e)}),S=f.useState("triggerProps",b);return r$("button",e,{state:{disabled:i,open:m},ref:[j,t,y,x],props:[k.reference,S,C,{[ou]:"",id:p,"aria-haspopup":"dialog","aria-expanded":m,"aria-controls":g},c,w],stateAttributesMapping:rV})});var t3=t3;class lm{constructor(e){this.store=e??new lu}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;this.store.setOpen(!0,t6(t3.imperativeAction,void 0,t))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,t6(t3.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,t6(t3.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}}e.s(["Backdrop",0,i0,"Close",0,i1,"Description",0,i2,"Handle",0,lm,"Popup",0,i9,"Portal",0,i8,"Root",0,function(e){return function(e,t="dialog"){let{children:n,open:r,defaultOpen:o=!1,onOpenChange:i,onOpenChangeComplete:l,disablePointerDismissal:s=!1,modal:a=!0,actionsRef:u,handle:c,triggerId:d,defaultTriggerId:f=null}=e,p="alert-dialog"===t,h=iX(!0),m={modal:!!p||a,disablePointerDismissal:p||s,nested:!!h,role:p?"alertdialog":"dialog"},g=lu.useStore(c?.store,{open:o,openProp:r,activeTriggerId:f,triggerIdProp:d,...m});e4(()=>{let e=void 0===r&&!1===g.state.open&&!0===o?{open:!0,activeTriggerId:f}:null;p?g.update(e?{...m,...e}:m):e&&g.update(e)}),g.useControlledProp("openProp",r),g.useControlledProp("triggerIdProp",d),g.useSyncedValues(m),g.useContextCallback("onOpenChange",i),g.useContextCallback("onOpenChangeComplete",l);let x=g.useState("open"),y=g.useState("mounted"),b=g.useState("payload");!function(e){let{store:t,actionsRef:n}=e,r=t.useState("open");ry(t,r),rg(t);let{forceUnmount:o}=rx(r,t),i=v.useCallback(()=>{t.setOpen(!1,t6(t3.imperativeAction))},[t]);v.useImperativeHandle(n,()=>({unmount:o,close:i}),[o,i])}({store:g,actionsRef:u});let j=v.useMemo(()=>({store:g}),[g]);return(0,w.jsx)(iZ.Provider,{value:!1,children:(0,w.jsxs)(iJ.Provider,{value:j,children:[(x||y)&&(0,w.jsx)(le,{store:g,parentContext:h?.store.context,isDrawer:"drawer"===t}),"function"==typeof n?n({payload:b}):n]})})}(e,v.useContext(iZ)?"drawer":"dialog")},"Title",0,lp,"Trigger",0,lh,"Viewport",0,lf,"createHandle",0,function(){return new lm}],828376);var lg=e.i(828376),lg=lg;let lx=lg.Root,lv=lg.Trigger,ly=lg.Portal;function lb({className:e,ref:t,...n}){return(0,w.jsx)(lg.Backdrop,{ref:t,className:(0,T.cn)("fixed inset-0 z-50 bg-black/30 backdrop-blur-sm data-open:animate-fd-fade-in data-closed:animate-fd-fade-out",e),...n})}function lw({className:e,children:t,ref:n,...r}){return(0,w.jsxs)(ly,{children:[(0,w.jsx)(lb,{}),(0,w.jsxs)(lg.Popup,{ref:n,className:(0,T.cn)("fixed left-1/2 top-1/2 z-50 flex flex-col gap-4 w-full max-w-lg -translate-x-1/2 -translate-y-1/2 border bg-fd-popover p-4 shadow-lg rounded-xl duration-200 data-open:animate-fd-dialog-in data-closed:animate-fd-dialog-out focus-visible:outline-none",e),...r,children:[t,(0,w.jsx)(lg.Close,{"aria-label":"Close",className:(0,T.cn)((0,eA.buttonVariants)({size:"icon-sm",color:"ghost"}
3),"absolute end-2 top-2 text-fd-muted-foreground/70"),children:(0,w.jsx)(iY,{})})]})]})}function lj({className:e,...t}){return(0,w.jsx)("div",{className:(0,T.cn)("flex flex-col gap-1.5 text-center sm:text-start",e),...t})}function lk({className:e,ref:t,...n}){return(0,w.jsx)(lg.Title,{ref:t,className:(0,T.cn)("text-lg font-semibold leading-none tracking-tight",e),...n})}function lC({className:e,ref:t,...n}){return(0,w.jsx)(lg.Description,{ref:t,className:(0,T.cn)("text-sm text-fd-muted-foreground",e),...n})}function lS(e,t){let n=e;for(let e of t)if(lT(n)&&e in n)n=n[e];else{if(!("number"==typeof e&&Array.isArray(n)))return;n=n[e]}return n}function lE(e,t,n){if(0===t.length)return n;let r=lS(e,t.slice(0,-1)),o=t[t.length-1];if(lT(r))r[o]=n;else if("number"==typeof o&&Array.isArray(r))r[o]=n;else throw Error("missing parent object");return e}function lO(e){return e.map(e=>"string"==typeof e?`_${e}`:`n${e}`).join(".")}function lN(e,t){return 0===t.length||e===t||e.startsWith(t+".")}function lT(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return null===t||t===Object.prototype||null===Object.getPrototypeOf(t)}function lA(e){return"function"==typeof e?e():e}lg.Close;var lM=class{constructor(){this.unindexed=new Set,this.indexed=new Map}add(e){if(!e.field)return void this.unindexed.add(e);let t=lO(e.field),n=this.indexed.get(t)??new Set;n.add(e),this.indexed.set(t,n)}remove(e){e.field?this.indexed.get(lO(e.field))?.delete(e):this.unindexed.delete(e)}onUpdate(e,t){for(let n of this.unindexed)n.onUpdate?.(e,t);let n=lO(e);if(t.swallow){let r=this.indexed.get(n);if(r)for(let n of r)n.onUpdate?.(e,t)}else for(let[r,o]of this.indexed.entries())if(lN(r,n))for(let n of o)n.onUpdate?.(e,t)}onInit(e,t){for(let n of this.unindexed)n.onInit?.(e,t);let n=this.indexed.get(lO(e));if(n)for(let r of n)r.onInit?.(e,t)}onDelete(e,t){let n=lO(e);for(let n of this.unindexed)n.onDelete?.(e,t);for(let[r,o]of this.indexed.entries())if(lN(r,n))for(let n of o)n.onDelete?.(e,t)}},lR=class e{constructor(e={}){this.namespaces=new Map,this.listeners=new lM,this.data=lA(e)}listen(e){this.listeners.add(e)}unlisten(e){this.listeners.remove(e)}getData(){return this.data}init(e,t,n={}){if(0===e.length)return this.data;let r=[],o={swallow:!0,...n},i=this.data,l=[],s=null;for(let a=0;a<e.length;a++){let u=e[a],c=i[u];if(a===e.length-1){if(void 0!==c)return c;let a=i[u]=lA(t);for(let t of(l.push(e),l))this.listeners.onInit(t,n);return this.listeners.onUpdate(s??r,o),a}if(lT(c)||Array.isArray(c))i=c,r.push(u);else{let t=e[a+1];i=i[u]="number"==typeof t?Array(t+1):{},void 0===c?(s??=[...r],r.push(u),l.push([...r])):(r.push(u),this.listeners.onUpdate(r,o),console.warn(`the original value of field ${r.join(".")} is overridden, this might be unexpected.`))}}}delete(e,t={}){if(0===e.length)return;let n=e.slice(0,-1),r=e[e.length-1],o=this.get(n);if("number"==typeof r&&Array.isArray(o)){if(0===o.length)return;let i=r===o.length-1,l=o.splice(r,1);if(0===l.length)return;return this.listeners.onDelete(e,t),this.listeners.onUpdate(n,{swallow:i,...t}),l[0]}if(lT(o)&&r in o){let i=o[r];return delete o[r],this.listeners.onDelete(e,t),this.listeners.onUpdate(n,{swallow:!0,...t}),i}}get(e){return lS(this.data,e)}update(e,t,n){try{return this.data=lE(this.data,e,t),this.listeners.onUpdate(e,{swallow:!1,...n}),!0}catch{return!1}}namespace(t,n,r){let o=this.namespaces.get(t);return o?Object.assign(o,r):(o={engine:new e(n),...r},this.namespaces.set(t,o)),o.engine}reset(e){for(let{engine:t,reset:n}of(this.update([],e),this.namespaces.values()))n?.({engine:t})}};let lI=(0,v.createContext)(null);function l$({value:e,children:t}){return(0,w.jsx)(lI,{value:e,children:t})}function lP(e){let t=(0,v.useRef)(e);return t.current=e,(0,v.useMemo)(()=>({dataEngine:new lR(t.current.defaultValues)}),[])}function lL(e){return e instanceof lR?e:e?e.dataEngine:(0,v.use)(lI).dataEngine}function lD(e,t={}){let{stf:n,compute:r=e=>e,defaultValue:o,isChanged:i=(e,t)=>e!==t}=t,l=lL(n),[s,a]=(0,v.useState)(()=>r(void 0===o?l.get(e):l.init(e,o))),u=(0,v.useRef)(l);function c(){let t=r(l.get(e));a(e=>i(e,t)?t:e)}return u.current!==l&&(a(r(void 0===o?l.get(e):l.init(e,o))),u.current=l),lz({field:e,stf:n,onInit:c,onUpdate:c,onDelete(){let e=r(void 0);a(t=>i(t,e)?e:t)}}),[s,t=>l.update(e,t)]}function lz(e){let t=lL(e.stf),n=(0,v.useRef)(e);n.current=e,(0,v.useEffect)(()=>{let r={field:e.field,onDelete:(...e)=>n.current.onDelete?.(...e),onInit:(...e)=>n.current.onInit?.(...e),onUpdate:(...e)=>n.current.onUpdate?.(...e)};return t.listen(r),()=>{t.unlisten(r)}},[t,e.field])}
3function lF(e,t){return(t.startsWith("/")&&(t=t.slice(1)),e.endsWith("/")&&(e=e.slice(0,-1)),t.length>0)?e+"/"+t:e}function lU(e,t){for(let[n,r]of Object.entries(t))e=e.replaceAll(`{${n}}`,r);return e}function lH(e){let{servers:t,server:n,setServer:r,setServerVariables:o}=S(),[i,l]=(0,v.useState)(!1),[s,a]=(0,v.useState)(!1),u=(0,eN.useTranslations)({note:"playground server select"});if((0,v.useEffect)(()=>{a(!0)},[]),!t||t.length<=0)return;let c=n?t.find(e=>e.url===n.url):null;return(0,w.jsxs)(lx,{open:i,onOpenChange:l,children:[(0,w.jsxs)(lv,{...e,className:(0,T.cn)("flex items-center gap-2 text-sm text-start px-3 py-2 bg-fd-muted text-fd-muted-foreground transition-colors hover:bg-fd-accent hover:text-fd-accent-foreground",e.className),children:[(0,w.jsx)("span",{className:"px-2 py-0.5 -ms-2 font-medium rounded-lg border bg-fd-secondary text-fd-secondary-foreground shadow-sm",children:n?.name??u("Server URL")}),(0,w.jsx)("code",{className:"truncate min-w-0 flex-1",children:s?new URL(n?lU(n.url,n.variables):"/",window.location.origin).href:u("loading...")}),(0,w.jsx)(eF,{className:"size-4"})]}),(0,w.jsxs)(lw,{children:[(0,w.jsxs)(lj,{children:[(0,w.jsx)(lk,{children:u("Server URL")}),(0,w.jsx)(lC,{children:u("The base URL of your API endpoint.")})]}),(0,w.jsxs)(iU,{items:t.map(e=>({value:e.url,label:(0,w.jsx)("code",{className:"text-[0.8125rem]",children:e.url})})),value:n?.url??null,onValueChange:e=>null!==e&&r(e),children:[(0,w.jsx)(i_,{children:(0,w.jsx)(iH,{})}),(0,w.jsx)(iW,{children:t.map(e=>(0,w.jsxs)(iq,{value:e.url,children:[(0,w.jsx)("code",{className:"text-[0.8125rem]",children:e.url}),(0,w.jsx)("p",{className:"text-fd-muted-foreground",children:e.description})]},e.url))})]}),n?.variables&&c?.variables&&(0,w.jsx)(l_,{defaultValues:n.variables,schema:c.variables,onChange:o},n.url)]})]})}function l_({defaultValues:e,onChange:t,schema:n}){let r=lP({defaultValues:()=>structuredClone(e)}),o=(0,v.useRef)(null);return lz({stf:r,onUpdate(){null!==o.current&&window.clearTimeout(o.current),o.current=window.setTimeout(()=>t(r.dataEngine.getData()),500)}}),(0,w.jsx)(l$,{value:r,children:(0,w.jsx)("div",{className:"flex flex-col gap-4",children:Object.entries(n).map(([e,t])=>(0,w.jsxs)("fieldset",{className:"flex flex-col gap-1",children:[(0,w.jsx)("label",{className:(0,T.cn)(iG()),htmlFor:e,children:e}),(0,w.jsx)("p",{className:"text-xs text-fd-muted-foreground empty:hidden",children:t.description}),(0,w.jsx)(lB,{fieldName:e,variable:t})]},e))})})}function lB({fieldName:e,variable:t}){let n=(0,eN.useTranslations)({note:"playground server select"}),[r,o]=lD([e],{compute:e=>"string"==typeof e?e:void 0});return t.enum?(0,w.jsxs)(iU,{value:r,onValueChange:o,children:[(0,w.jsx)(i_,{id:e,children:(0,w.jsx)(iH,{})}),(0,w.jsx)(iW,{children:t.enum.map(e=>(0,w.jsx)(iq,{value:e,children:e},e))})]}):(0,w.jsx)(iK,{id:e,value:r,onChange:e=>o(e.target.value),placeholder:n("Enter Value")})}function lV(e){let t=(0,eN.useTranslations)({note:"OAuth dialog"});return(0,w.jsxs)(lw,{children:[(0,w.jsxs)(lj,{children:[(0,w.jsx)(lk,{children:t("Authorization")}),(0,w.jsx)(lC,{children:t("Obtain the access token for API.")})]}),(0,w.jsx)(lW,{...e})]})}function lW({schemeId:e,scopes:t,setToken:n,setOpen:r}){let{dereferenced:o,resolve:i}=C().schema,l=o.components?.securitySchemes,s=W().store[e],a=i(l?.[e]);if(!a||"oauth2"!==a.type)throw Error("unexpected schemaId: must be type oauth2");let[u,c]=(0,v.useState)(()=>Object.keys(a.flows)[0]),d=(0,eN.useTranslations)({note:"OAuth dialog"}),f=(0,v.useMemo)(()=>({password:{name:d("Resource Owner Password Flow"),description:d("Authenticate using username and password."),supported:!0},clientCredentials:{name:d("Client Credentials"),description:d("Intended for the server-to-server authentication."),supported:!0},authorizationCode:{name:d("Authorization code"),description:d("Authenticate with 3rd party services"),supported:!0},implicit:{name:d("Implicit"),description:d("Retrieve the access token directly."),supported:!0},deviceAuthorization:{name:d("Device Authorization"),description:d("Authenticate with device."),supported:!1}}),[d]),p=(0,v.useMemo)(()=>({clientId:s?.client_id??"",clientSecret:s?.type==="authorization_code"?s.client_secret:"",username:"",password:""}),[s]),h=B(async o=>{let i;if("implicit"===u){let n=a.flows[u],r=new URLSearchParams;r.set("response_type","token"),r.set("client_id",o.clientId),r.set("redirect_uri",window.location.href),r.set("scope",t.join("+")),r.set("state",JSON.stringify({sc
3heme:e,client_id:o.clientId,redirect_uri:window.location.href})),window.location.replace(`${n.authorizationUrl}?${r.toString()}`);return}if("authorizationCode"===u){let n=a.flows[u],r=new URLSearchParams;r.set("response_type","code"),r.set("client_id",o.clientId),r.set("redirect_uri",window.location.href),r.set("scope",t.join("+")),r.set("state",JSON.stringify({client_id:o.clientId,client_secret:o.clientSecret,redirect_uri:window.location.href,scheme:e})),window.location.replace(`${n.authorizationUrl}?${r.toString()}`);return}if("password"===u){let e=a.flows[u];i=await fetch(e.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"password",username:o.username,password:o.password,scope:t.join("+")})})}if("clientCredentials"===u){let e=a.flows[u];i=await fetch(e.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"client_credentials",client_id:o.clientId,client_secret:o.clientSecret,scope:t.join("+")})})}if(i){if(!i.ok)throw Error(await i.text());let{access_token:e,token_type:t="Bearer"}=await i.json();n(`${t} ${e}`),r(!1)}}),m=h.isLoading;return(0,w.jsxs)("form",{className:"flex flex-col gap-6",onSubmit:e=>{let t=new FormData(e.target);h.start(Object.fromEntries(t.entries())),e.preventDefault(),e.stopPropagation()},children:[(0,w.jsxs)(iU,{items:Object.fromEntries(Object.keys(a.flows).map(e=>[e,f[e].name])),value:u,onValueChange:c,children:[(0,w.jsx)(i_,{children:(0,w.jsx)(iH,{placeholder:d("Select a flow")})}),(0,w.jsx)(iW,{children:Object.keys(a.flows).map(e=>{let{name:t,description:n}=f[e];return(0,w.jsxs)(iq,{value:e,children:[(0,w.jsx)("p",{className:"font-medium",children:t}),(0,w.jsx)("p",{className:"text-fd-muted-foreground",children:n})]},e)})})]}),("authorizationCode"===u||"clientCredentials"===u||"implicit"===u)&&(0,w.jsxs)("fieldset",{className:"flex flex-col gap-1.5",children:[(0,w.jsx)("label",{htmlFor:"client_id",className:(0,T.cn)(iG()),children:d("Client ID")}),(0,w.jsx)("p",{className:"text-fd-muted-foreground text-sm",children:d("The client ID of your OAuth application.")}),(0,w.jsx)(iK,{id:"client_id",name:"clientId",placeholder:d("Enter value"),type:"text",autoComplete:"off",disabled:m,defaultValue:p.clientId,required:!0})]}),("authorizationCode"===u||"clientCredentials"===u)&&(0,w.jsxs)("fieldset",{className:"flex flex-col gap-1.5",children:[(0,w.jsx)("label",{htmlFor:"client_secret",className:(0,T.cn)(iG()),children:d("Client Secret")}),(0,w.jsx)("p",{className:"text-fd-muted-foreground text-sm",children:d("The client secret of your OAuth application.")}),(0,w.jsx)(iK,{id:"client_secret",name:"clientSecret",placeholder:d("Enter value"),type:"password",autoComplete:"off",disabled:m,defaultValue:p.clientSecret,required:!0})]}),"password"===u&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)("fieldset",{className:"flex flex-col gap-1.5",children:[(0,w.jsx)("label",{htmlFor:"username",className:(0,T.cn)(iG()),children:d("Username")}),(0,w.jsx)(iK,{id:"username",name:"username",placeholder:d("Enter value"),type:"text",autoComplete:"off",disabled:m,defaultValue:p.username,required:!0})]}),(0,w.jsxs)("fieldset",{className:"flex flex-col gap-1.5",children:[(0,w.jsx)("label",{htmlFor:"password",className:(0,T.cn)(iG()),children:d("Password")}),(0,w.jsx)(iK,{id:"password",name:"password",placeholder:d("Enter value"),type:"password",autoComplete:"off",disabled:m,defaultValue:p.password,required:!0})]})]}),u&&f[u].supported?(0,w.jsxs)(w.Fragment,{children:[h.error?(0,w.jsx)("p",{className:"text-red-400 font-medium text-sm",children:String(h.error)}):null,(0,w.jsx)("button",{type:"submit",className:(0,T.cn)((0,eA.buttonVariants)({color:"primary"})),children:d("Submit")})]}):(0,w.jsx)("p",{className:"text-fd-muted-foreground bg-fd-muted p-2 rounded-lg border",children:d("Unsupported")})]})}let lq=eS("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),lG=eS("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),lK=eS("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s([],958842),e.i(958842);var t3=t3;function lY(e){let{open:t,defaultOpen:n,onOpenChange:r,disabled:o}=e,[i,l]=e7({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:s,setMounted:a,transitionStatus:u}=nJ(i,!0,!0),c=nG(),[d,f]=v.useState(),p=d??c,h=te(e=>{let t=!i,n=t6(t3.triggerPress,e.nativeEvent);r(t,n),n.isCanceled||l(t)});return v.useMemo(()=>({disabled:o,handleTrigger:h,mounted:s,open:i,panelId:p,setMounted:a,setOpen:l,setPanelIdState:f,transitionStatus:u}),[o,h,s,i,p,a,l,f,u])}let lZ=v.createContext(void 0);function lJ(){let e=v.useContext(lZ);if(void 0===e)throw Error(ny(15));return e}let lX=((f={}).open="data-open",f.closed="data-closed",f[f.startingStyle=n8.startingStyle]="startingStyle",f[f.endingStyle=n8.endingStyle]="endingStyle",f),lQ=((p={}).panelOpen="data-panel-open",p),l0={[lX.open]:""},l1={[lX.closed]:""},l2={open:e=>e?{[lQ.panelOpen]:""}:null},l4={open:e=>e?l0:l1},l5={...l4,...rn},l7=v.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:o=!1,disabled:i=!1,onOpenChange:l,open:s,style:a,...u}=e,c=te(l),d=lY({open:s,defaultOpen:o,onOpenChange:c,disabled:i}),f=v.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),p=v.useMemo(()=>({...d,onOpenChange:c,state:f}),[d,c,f]),h=r$("div",e,{state:f,ref:t,props:u,stateAttributesMapping:l5});return(0,w.jsx)(lZ.Provider,{value:p,children:h})}),l6={...l2,...rn},l3=v.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:o,state:i,disabled:l}=lJ(),{className:s,disabled:a=l,render:u,nativeButton:c=!0,style:d,...f}=e,{getButtonProps:p,buttonRef:h}=rY({disabled:a,focusableWhenDisabled:!0,native:c});return r$("button",e,{state:i,ref:[t,h],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:o},f,p],stateAttributesMapping:l6})});var rG=tb,t3=t3;let l9={height:void 0,width:void 0};function l8(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:o,mounted:i,onOpenChange:l,open:s,setMounted:a,setOpen:u,transitionStatus:c}=e,d=v.useRef(null),f=v.useRef(null),[p,h]=v.useState(l9),m=v.useRef(l9),g=v.useRef(!1),x=v.useRef(s),y=v.useRef(!1),[b,w]=v.useState(!1),j=v.useRef(null),k=e0(t,d),C=tr({mounted:i,open:s}),S=rr(d,!1,!1),E=!s&&!i,O=b?"idle":c,N=s&&(x.current||y.current),T=!s&&i&&"css-animation"===f.current&&void 0===p.height&&void 0===p.width?m.current:p,A=n&&E&&"css-animation"!==f.current,M=te((e,t=!0)=>{t&&(m.current=e),h(e)}),R=te(()=>{j.current?.(),j.current=null}),I=te(e=>{R(),j.current=()=>{j.current=null,e()}}),$=te(()=>{s&&i&&"css-animation"===f.current&&(y.current=!0)});e6(()=>{b&&"starting"!==c&&w(!1)},[b,c]),v.useEffect(()=>()=>{$(),R()},[$,R]),e6(()=>{let e=d.current;if(!e)return;!s&&j.current&&R();let t=function(e,t=!1){let n=(0,rG.getWindow)(e).getComputedStyle(e),r=(n.animationName.split(",").map(e=>e.trim()).some(e=>
3""!==e&&"none"!==e)||t)&&st(n.animationDuration),o=st(n.transitionDuration);return r&&o||o?"css-transition":r?"css-animation":"none"}(e,N);if(f.current=t,s&&"idle"===c&&x.current&&"css-animation"===t){m.current=se(e);return}if(s&&"starting"===c){let n=g.current;if(g.current=!1,"none"===t){M(se(e)),w(!0);return}if("css-transition"===t){let t=function(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};function n(){Object.entries(t).forEach(([t,n])=>{""===n?e.style.removeProperty(t):e.style.setProperty(t,n)})}Object.keys(t).forEach(t=>{e.style.setProperty(t,"initial","important")});let r=tg.request(n);return()=>{tg.cancel(r),n()}}(e);return M(se(e)),n&&(I(sn(e,"transition-duration","0s")),w(!0)),t}if("css-animation"===t){if(M(se(e)),!n)return void sn(e,"animation-name","none")();let t=sn(e,"animation-name","none"),r=sn(e,"animation-duration","0s");return t(),I(r),w(!0),void 0}}if(!s&&i&&("idle"===c||"starting"===c)){if(x.current=!1,y.current=!1,"none"===t){M(l9,!1),a(!1);return}M(se(e));return}if("ending"!==c)return;if("none"===t)return void a(!1);let n=se(e);(n.height??0)>0||(n.width??0)>0?(M(n),"css-animation"===t&&sn(e,"animation-name","none")()):a(!1)},[i,s,R,M,a,I,N,c]),ro({enabled:s&&i&&"idle"===O,open:!0,ref:d,onComplete(){s&&M(l9,!1)}}),v.useEffect(()=>{if(s||!i||"ending"!==O||!d.current)return;let e=new AbortController,t=-1;function n(){C.current.open||(a(!1),M(l9,!1))}return t=tg.request(()=>{e.signal.aborted||S(n,e.signal)}),()=>{tg.cancel(t),e.abort()}},[C,i,s,O,S,M,a]),e6(()=>{let e=d.current;e&&n&&E&&e.setAttribute("hidden","until-found")},[E,n]),v.useEffect(function(){let e=d.current;if(e)return t8(e,"beforematch",function(e){let t=t6(t3.none,e);l(!0,t),t.isCanceled||(g.current=!0,u(!0))})},[l,u]);let P=o||n||i||s;return{height:T.height,props:{...A?{[lX.startingStyle]:""}:void 0,hidden:E,id:r},ref:k,shouldPreventOpenAnimation:N,shouldRender:P,transitionStatus:O,width:T.width}}function se(e){return{height:e.scrollHeight,width:e.scrollWidth}}function st(e){return e.split(",").map(e=>e.trim()).some(e=>""!==e&&Number.parseFloat(e)>0)}function sn(e,t,n){let r=e.style.getPropertyValue(t),o=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{""===r?e.style.removeProperty(t):e.style.setProperty(t,r,o)}}let sr=((h={}).collapsiblePanelHeight="--collapsible-panel-height",h.collapsiblePanelWidth="--collapsible-panel-width",h),so=v.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:o,render:i,id:l,style:s,...a}=e,{mounted:u,onOpenChange:c,open:d,panelId:f,setMounted:p,setPanelIdState:h,setOpen:m,state:g,transitionStatus:x}=lJ();e6(()=>{if(l)return h(l),()=>{h(void 0)}},[l,h]);let{height:v,props:y,ref:b,shouldPreventOpenAnimation:w,shouldRender:j,transitionStatus:k,width:C}=l8({externalRef:t,hiddenUntilFound:r??!1,id:f,keepMounted:o??!1,mounted:u,onOpenChange:c,open:d,setMounted:p,setOpen:m,transitionStatus:x}),S={...g,transitionStatus:k},E=rI(s,S),O=r$("div",{...e,style:void 0},{state:S,ref:b,props:[y,{style:{[sr.collapsiblePanelHeight]:void 0===v?"auto":`${v}px`,[sr.collapsiblePanelWidth]:void 0===C?"auto":`${C}px`}},a,E?{style:E}:void 0,w?{style:{animationName:"none"}}:void 0],stateAttributesMapping:l5});return j?O:null});e.s(["Panel",0,so,"Root",0,l7,"Trigger",0,l3],596315);var si=e.i(596315),si=si;let sl=si.Root,ss=si.Trigger;function sa({children:e,className:t,...n}){return(0,w.jsx)(si.Panel,{...n,className:e=>(0,T.cn)("overflow-hidden [&[hidden]:not([hidden='until-found'])]:hidden h-(--collapsible-panel-height) transition-[height,opacity] data-starting-style:opacity-0 data-starting-style:h-0 data-ending-style:h-0 data-ending-style:opacity-0","function"==typeof t?t(e):t),children:e})}function su(e,t){if(e===t)return!0;if(null==e||null==t||"object"!=typeof e||"object"!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>su(e,t[n]));if(Array.isArray(e)||Array.isArray(t))return!1;if(K(e)&&K(t)){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>n in t&&su(e[n],t[n]))}return!1}function sc(e,t){let n=function(e){if(null===e)return"null";switch(typeof e){case"string":return"string";case"boolean":return"boolean";case"number":return Number.isInteger(e)?"integer":"number";case"object":return Array.isArray(e)?"array":"object"}}(e);return void 0!==n&&(n===t||"number"===t&&"integer"===n)}function sd(e){if("boolean"==typeof(e=Z(e))||!e.allOf)return e;let{allOf:t,...n}=e,r=n;for(let e of t)r=function e(t,n){if(t=sd(t),n=sd(n),"boolean"==typeof t&&"boolean"==typeof n)return t&&n;if("boolean"==typeof t)return t;if("boolean"==typeof n)return n;for(let r of["anyOf","oneOf"]){if(void 0===t[r]&&void 0!==n[r])return{...n,[r]:n[r].map(n=>e(n,t))};if(void 0!==t[r]&&void 0===n[r])return{...t,[r]:t[r].map(t=>e(t,n))}}let r={...t};for(let t in n)switch(t){case"$id":case"$comment":case"description":case"examples":case"allOf":case"writeOnly":case"readOnly":break;case"title":{let e=n[t];if(void 0===e)break;r[t]?r[t]=`${r[t]} & ${e}`:r[t]=e;break}case"minItems":case"minimum":case"exclusiveMinimum":case"minProperties":case"minContains":case"minLength":{let e=n[t];if(void 0===e)break;r[t]=void 0===r[t]?e:Math.max(r[t],e);break}case"maxContains":case"maxItems":case"maxLength":case"maxProperties":case"maximum":case"exclusiveMaximum":{let e=n[t];if(void 0===e)break;r[t]=void 0===r[t]?e:Math.min(r[t],e);break}case"enum":{let e=n[t];if(void 0===e)break;r[t]=void 0===r[t]?e:function(e,t){let n=new Set;for(let r of e)t.includes(r)&&n.add(r);for(let r of t)e.includes(r)&&n.add(r);return Array.from(n)}(r[t],e);break}case"anyOf":case"oneOf":{let o=n[t];if(void 0!==o&&void 0!==r[t]){let n=[];for(let i of r[t])for(let t of o){let r=e(i,t);!1!==r&&n.push(r)}r[t]=n}break}case"format":case"const":case"type":{let e=n[t];if(void 0===e)break;if(r[t]??=e,!su(r[t],e))return!1;break}case"required":{let e=n[t];if(void 0===e)break;r[t]=[...r[t]??[],...e];break}case"properties":case"patternProperties":{let o=n[t];if(void 0===o)break;if(void 0===r[t]){r[t]=o;break}let i={},l=new Set;for(let e in r[t])l.add(e);for(let e in o)l.add(e);for(let n of l){let l=r[t][n],s=o[n];void 0===l?i[n]=s:void 0===s?i[n]=l:i[n]=e(l,s)}r[t]=i;break}case"additionalProperties":case"additionalItems":case"contains":case"items":{let o=n[t];if(void 0===o)break;r[t]=void 0===r[t]?o:e(r[t],o);break}case"not":{let e=n[t];if(void 0===e)break;r[t]&&e?r.not={anyOf:[r[t],e]}:e&&(r.not=e);break}default:r[t]=n[t]}return r}(r,e);return r}var sf=(n=(e,t)=>{let n=Object.getPrototypeOf({});function r(){return function(e){return"object"==typeof e&&null!==e&&!(e instanceof RegExp)&&!(e instanceof Date)}}function o(e){function t(e){return"constructor"!==e&&"prototype"!==e&&"__proto__"!==e}let o=Object.prototype.propertyIsEnumerable,i=e?.symbols?function(e){let t=Object.keys(e),n=Object.getOwnPropertySymbols(e);for(let r=0,i=n.length;r<i;++r)o.call(e,n[r])&&t.push(n[r]);return t}:Object.keys,l="function"==typeof e?.cloneProtoObject?e.cloneProtoObject:void 0,s="function"==typeof e?.isMergeableObject?e.isMergeableObject:r(),a=e?.onlyDefinedProperties===!0,u=e&&"function"==typeof e.mergeArray?e.mergeArray({clone:c,deepmerge:d,getKeys:i,isMergeableObject:s}):function(e,t){let n=e.length,r=t.length,o=0,i=Array(n+r);for(;o<n;++o)i[o]=c(e[o]);for(o=0;o<r;++o)i[o+n]=c(t[o]);return i};function c(e){return s(e)?Array.isArray(e)?function(e){let t=0,n=e.length,r=Array(n);for(;t<n;++t)r[t]=c(e[t]);return r}(e):function(e){let r,o,s,a={};if(l&&Object.getPrototypeOf(e)!==n)return l(e);let u=i(e);for(r=0,o=u.length;r<o;++r)t(s=u[r])&&(a[s]=c(e[s]));return a}(e):e}function d(e,r){if(a&&void 0===r)return c(e);let o=Array.isArray(r),f=Array.isArray(e);return"object"!=typeof r||null===r?r:s(e)?o&&f?u(e,r):o!==f?c(r):function(e,r){let o,u,f,p={},h=i(e),m=i(r);for(o=0,u=h.length;o<u;++o)t(f=h[o])&&-1===m.indexOf(f)&&(p[f]=c(e[f]));for(o=0,u=m.length;o<u;++o)if(t(f=m[o]))if(f in e)-1!==h.indexOf(f)&&(l&&s(r[f])&&Object.getPrototypeOf(r[f])!==n?p[f]=l(r[f]):p[f]=d(e[f],r[f]));else{if(a&&void 0===r[f])continue;p[f]=c(r[f])}return p}(e,r):c(r)}return e?.all?function(){let e;switch(arguments.length){case 0:return{};case 1:return c(arguments[0]);case 2:return d(arguments[0],arguments[1])}for(let t=0,n=arguments.length;t<n;++t)e=d(e,arguments[t]);return e}:d}t.exports=o,t.exports.default=o,t.exports.deepmerge=o,Object.defineProperty(t.exports,"isMergeableObject",{get:r})},()=>(r||(n((r={exports:{}}).exports,r),n=null),r.exports));sf();let sp=(0,sf().deepmerge)({all:!0,isMergeableObject:K}),sh=Symbol("skip"),sm={skipReadOnly:!1,maxSampleDepth:15},sg={},sx=[];function sv(e){e&&sx.pop()}function sy(e){if("boolean"!=typeof e){if(void 0!==e.type){let t=e.type;return Array.isArray(t)?t[0]:t}for(let[t,n]of Object.entries({multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",additionalItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",properties:"object",patternProperties:"object",dependencies:"object"}))if(void 0!==e[t])return n}}
3function sb(e){return"object"===e?{}:"array"===e?[]:void 0}function sw(e,t,n,r){let o=e=>e<10?`0${e}`:`${e}`,i=n?"":`${e.getUTCFullYear()}-${o(e.getUTCMonth()+1)}-${o(e.getUTCDate())}`;return t||(i+=`T${o(e.getUTCHours())}:${o(e.getUTCMinutes())}:${o(e.getUTCSeconds())}`,r&&(i+=`.${(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)}`),i+="Z"),i}function sj(e,t){return t>e.length?e.repeat(Math.trunc(t/e.length)+1).substring(0,t):e}function sk(e){let t=0;return"boolean"==typeof e?t:("number"===e.type&&("float"===e.format||"double"===e.format)&&(t=.1),"number"==typeof e.minimum)?e.minimum:("number"==typeof e.exclusiveMinimum?(t=Math.floor(e.exclusiveMinimum)+1)===e.exclusiveMaximum&&(t=(t+Math.floor(e.exclusiveMaximum)-1)/2):"number"==typeof e.exclusiveMaximum?t=Math.floor(e.exclusiveMaximum)-1:"number"==typeof e.maximum&&(t=e.maximum),t)}function sC(e){return void 0!==e.const?eu(e.const):Array.isArray(e.examples)&&e.examples.length>0?eu(e.examples[0]):Array.isArray(e.enum)&&e.enum.length>0?eu(e.enum[0]):void 0!==e.default?eu(e.default):void 0}function sS(e){if("boolean"==typeof e)return;let t=sC(e);if(void 0!==t)return{value:t,readOnly:e.readOnly,writeOnly:e.writeOnly}}let sE={array:function(e,t,n){if("boolean"==typeof e)return[];let r=n?.depth??1,o=Math.min(e.maxItems??1/0,e.minItems??1),i=e.prefixItems??e.items??e.contains;Array.isArray(i)&&(o=Math.max(o,i.length));let l=e=>Array.isArray(i)?i[e]??{}:i??{},s=[];if(!i)return s;for(let e=0;e<o;e++){let{value:o}=sN(l(e),t,{depth:r+1,propertyName:n?.propertyName});s.push(o)}return s},boolean:function(){return!0},integer:sk,number:sk,object:function(e,t,n){let r={};if("boolean"==typeof e)return r;let o=n?.depth??1;if(e.properties){let i=new Set(Array.isArray(e.required)?e.required:[]);for(let l of Object.keys(e.properties)){if(t.skipNonRequired&&!i.has(l))continue;let s=sN(e.properties[l],t,{propertyName:l,depth:o+1});if(t.skipReadOnly&&s.readOnly||t.skipWriteOnly&&s.writeOnly){n?.isAllOfChild&&(r[l]=sh);continue}r[l]=s.value}}if("object"==typeof e.additionalProperties){let n=e.additionalProperties,i=n["x-additionalPropertiesName"]||"property";r[`${i}1`]=sN(n,t,{depth:o+1}).value,r[`${i}2`]=sN(n,t,{depth:o+1}).value}if(e.properties&&void 0!==e.maxProperties&&Object.keys(r).length>e.maxProperties){let t={},n=0;for(let o of Array.isArray(e.required)?e.required:[])void 0!==r[o]&&(t[o]=r[o],n++);for(let o of Object.keys(r))n<e.maxProperties&&!(o in t)&&(t[o]=r[o],n++);r=t}return r},string:function(e,t,n){if("boolean"==typeof e)return"";let r=new Date("2019-08-24T14:15:22.123Z");switch(e.format){case"email":return"[email protected]";case"idn-email":return"пошта@укр.нет";case"password":{let t="pa$$word",n=e.minLength??0;return n>t.length&&(t+="_",t+=sj("qwerty!@#$%^123456",n-t.length).substring(0,n-t.length)),t}case"date-time":return sw(r,!1,!1,!1);case"date":return sw(r,!0,!1,!1);case"time":return sw(r,!1,!0,!1).slice(1);case"ipv4":return"192.168.0.1";case"ipv6":return"2001:0db8:85a3:0000:0000:8a2e:0370:7334";case"hostname":return"example.com";case"idn-hostname":return"приклад.укр";case"uri":return"http://example.com";case"uri-reference":return"../dictionary";case"uri-template":return"http://example.com/{endpoint}";case"iri":return"http://example.com/entity/1";case"iri-reference":return"/entity/1";case"uuid":var o,i,l,s;let a,u;return o=a=function(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return t}(n?.propertyName||"id"),i=a,l=a,s=a,u=()=>{o|=0,i|=0,l|=0,s|=0;let e=o-(i<<27|i>>>5)|0;return o=i^(l<<17|l>>>15),i=l+s|0,l=s+e|0,((s=o+e|0)>>>0)/0x100000000},"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*u()|0;return("x"===e?t:3&t|8).toString(16)});case"json-pointer":return"/json/pointer";case"relative-json-pointer":return"1/relative/json/pointer";case"regex":return"/regex/";default:return function(e,t,n,r){if(n&&r){let e,t;return(t=(e=n.replace(/^\^?/,"").replace(/\$?$/,"")).match(/^(.)\{(\d+)\}$/))?t[1].repeat(parseInt(t[2],10)):e.length>0?e:"x"}let o=sj("string",e);return null!=t&&o.length>t&&(o=o.substring(0,t)),o}(e.minLength??0,e.maxLength,e.pattern,t.enablePatterns)}}};function sO(e,t,n,r){let o=sS(e);if(void 0!==o)return o;let i=sN({...e,oneOf:void 0,anyOf:void 0},n,r),l=sN(t,n,r);if("object"==typeof i.value&&null!==i.value&&"object"==typeof l.value&&null!==l.value){let e=sp(i.value,l.value);return{...l,value:e}}return l}function sN(e,t,n){let r;if(n){if(sx.includes(e))return{value:sb(sy(e))};sx.push(e)}if(n&&(n.depth??1)>t.maxSampleDepth)return sv(n),{value:sb(sy(e))};if(!K(e))return sv(n),{value:e};if("string"==typeof e.$ref){let r=decodeURIComponent(e.$ref),o=e["$ref-value"];if(sg[r]){let e=sy(o??{});return sv(n),{value:sb(e)}}if(sg[r]=!0,void 0===o)throw sg[r]=!1,sv(n),Error(`Could not resolve $ref: ${e.$ref}, the schema must be a node of magic proxy ("@scalar/json-magic").`);let{$ref:i,"$ref-value":l,...s}=e,a=sN(Object.keys(s).length>0&&K(o)?{...o,...s}:o,t,n);return sg[r]=!1,sv(n),a}if(void 0!==e.allOf)return sv(n),sS(e)??function(e,t,n,r){let o=sN(e,n),i=[];for(let e of t){let{type:t,readOnly:l,writeOnly:s,value:a}=sN("object"==typeof e?{type:o.type,...e}:e,n,{...r,depth:r?.depth??1,isAllOfChild:!0});o.type&&t&&t!==o.type&&(n.quiet||console.warn("allOf: schemas with different types can't be merged"),o.type=t),o.type=o.type??t,o.readOnly=o.readOnly||l,o.writeOnly=o.writeOnly||s,null!=a&&i.push(a)}if("object"===o.type){let e=sp(o.value||{},...i.filter(e=>"object"==typeof e&&null!==e));for(let t of Object.keys(e))e[t]===sh&&delete e[t];return{...o,value:e}}"array"!==o.type||n.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect');let l=i[i.length-1];return{...o,value:null!=l?l:o.value}}({...e,allOf:void 0}
3,e.allOf,t,n);if(Array.isArray(e.oneOf)&&e.oneOf.length>0)return e.anyOf&&!t.quiet&&console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf"),sv(n),sO(e,Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.oneOf[0]),t,n);if(Array.isArray(e.anyOf)&&e.anyOf.length>0)return sv(n),sO(e,Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.anyOf[0]),t,n);if(e.if&&e.then){sv(n);let{if:r,then:o,...i}=e;return sN(sp(i,r,o),t,n)}let o=sC(e);if(void 0===o){o=null;let i=(r=sy(e))?sE[r]:void 0;i&&(o=i(e,t,n))}return sv(n),{value:o,readOnly:e.readOnly,writeOnly:e.writeOnly,type:r}}function sT(e,t){let n={...sm,...t};return sg={},sx.length=0,sN(e,n).value}function sA(e,t=0){function n(e,t,n){let o=new Set,i=[],l=!1;for(let t of e){let e=r(t,1|n);"null"===e?l=!0:"unknown"===e||o.has(e)||(i.push(e),o.add(e))}return l&&i.push("null"),i.join(t)}function r(e,t){let o="object"==typeof e&&"string"==typeof e.$ref?e.$ref:void 0,i=Z(e);if(!0===i)return"any";if(!1===i)return"never";if(i.enum?.length===1)switch(typeof i.enum[0]){case"bigint":case"boolean":case"number":case"string":return JSON.stringify(i.enum[0])}if((1&t)==1){if(i.title)return i.title;if("string"==typeof o){let e=o.split("/");if(e.length>0)return e[e.length-1]}}if(Array.isArray(i.type))return n(i.type.map(e=>({...i,type:e}))," | ",t);if("array"===i.type)return`array<${i.items?r(i.items,1|t):"unknown"}>`;if(i.oneOf&&i.anyOf)return`(${n(i.oneOf," | ",t)}) & (${n(i.anyOf," | ",t)})`;let l=i.oneOf??i.anyOf;return l?n(l," | ",t):i.allOf?n(i.allOf," & ",t):i.not?`not (${r(i.not,t)})`:"string"===i.type&&"binary"===i.format?"file":"string"==typeof i.type?i.type:"unknown"}return r(e,t)}let sM=(0,v.createContext)(void 0),sR={type:["string","number","boolean","array","object"],items:!0,additionalProperties:!0};function sI({readOnly:e,writeOnly:t,docRoot:n,children:r}){return(0,w.jsx)(sM.Provider,{value:(0,v.useMemo)(()=>({readOnly:e,writeOnly:t,docRoot:n}),[n,e,t]),children:r})}function s$(){return(0,v.use)(sM)}function sP(){let{readOnly:e}=s$();return{generateDefault:t=>sT(t,{skipNonRequired:!0,skipReadOnly:!e,quiet:!0}),schemaToString:(e,t)=>sA(e,t)}}function sL(e){return(0,v.useMemo)(()=>{let t=Z(e);return"object"==typeof t&&t.allOf&&(t=sd(t)),"boolean"==typeof t?sR:t},[e])}let sD=eW("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),sz=eW("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),sF=eW("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]),sU=(0,ef.cva)("w-full inline-flex items-center gap-0.5");function sH(e){return(0,w.jsx)("code",{...e,className:(0,T.cn)("text-xs text-fd-muted-foreground",e.className),children:e.children})}function s_({field:e,fieldName:t,...n}){let{generateDefault:r}=sP(),o=sL(e),i=o.properties?Object.keys(o.properties):[],{patternProperties:l={},additionalProperties:s,"x-playground-lazy":a=i.length>100}=o,u=Object.keys(l).length>0||s,[c,d]=(0,v.useState)(""),{properties:f,onAppend:p,onDelete:h,_objectKeys:m}=function(e,t){let{properties:n,patternProperties:r={},defaultValue:o,fallback:i,lazy:l}=t,s=lL(),[a]=lD(e,{defaultValue:o,compute:e=>lT(e)?Object.keys(e):[],isChanged:(e,t)=>!function e(t,n){if(t===n)return!0;if(null==t||null==n||"object"!=typeof t||"object"!=typeof n)return!1;if(Array.isArray(t)&&Array.isArray(n))return t.length===n.length&&t.every((t,r)=>e(t,n[r]));if(Array.isArray(t)||Array.isArray(n)||!lT(t)||!lT(n))return!1;let r=Object.keys(t),o=Object.keys(n);return r.length===o.length&&r.every(r=>r in n&&e(t[r],n[r]))}(e,t)});return{properties:(0,v.useMemo)(()=>{let t=[],o=new Set(a);for(let[r,i]of Object.entries(n))(!l||o.has(r))&&(o.delete(r),t.push({kind:"fixed",field:[...e,r],key:r,info:i}));for(let[n,i]of Object.entries(r)){let r=RegExp(n);for(let l of o)l.match(r)&&(o.delete(l),t.push({kind:"pattern",info:i,key:l,pattern:n,field:[...e,l]}))}if(i)for(let n of o)t.push({kind:"fallback",field:[...e,n],key:n,info:i});return t},[r,n,i,e,l,a]),_objectKeys:a,onAppend(t,n){0!==(t=t.trim()).length&&s.init([...e,t],n)},onDelete:t=>s.delete([...e,t])}}(t,{lazy:a,defaultValue:()=>r(o),properties:o.properties??{},fallback:s,patternProperties:l}),g=a?i.filter(e=>!m.includes(e)):[],x=(0,eN.useTranslations)({note:"playground"});return(0,w.jsxs)("div",{...n,className:(0,T.cn)("grid grid-cols-1 gap-4 @md:grid-cols-2 *:data-[collapsible=true]:order-last",n.className),children:[a&&g.length>0&&(0,w.jsxs)(iU,{value:"",onValueChange:e=>null!==e&&p(e),children:[(0,w.jsx)(i_,{className:"col-span-full",children:(0,w.jsx)(iH,{placeholder:x("Show Property")})}),(0,w.jsx)(iW,{children:g.map(e=>(0,w.jsx)(iq,{value:e,children:e},e))})]}),f.map(e=>{let t=null;return("pattern"===e.kind||"fallback"===e.kind)&&(t=(0,w.jsx)("button",{type:"button","aria-label":x("Remove Item",{note:"aria-label"}),className:(0,T.cn)((0,eA.buttonVariants)({color:"outline",size:"icon-xs"})),onClick:()=>{h(e.key)},children:(0,w.jsx)(sF,{})})),(0,w.jsx)(sW,{name:e.key,field:e.info,fieldName:e.field,isRequired:o.required?.includes(e.ke
3y),toolbar:t},e.key)}),u&&(0,w.jsxs)("div",{className:"flex gap-2 order-last col-span-full",children:[(0,w.jsx)(iK,{value:c,placeholder:x("Enter Property Name"),onChange:e=>d(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(d(""),p(c),e.preventDefault())}}),(0,w.jsx)("button",{type:"button",className:(0,T.cn)((0,eA.buttonVariants)({color:"secondary",size:"sm"}),"px-4"),onClick:()=>{p(c),d("")},children:x("New")})]})]})}function sB({fieldName:e}){let t=lL(),[n,r]=(0,v.useState)(null),[o,i]=(0,v.useState)(()=>JSON.stringify(t.init(e,{}),null,2));return(0,w.jsxs)("div",{className:"flex flex-col bg-fd-secondary text-fd-secondary-foreground overflow-hidden border rounded-lg",children:[(0,w.jsx)("textarea",{value:o,className:"p-2 h-[240px] text-sm font-mono resize-none focus-visible:outline-none",onChange:n=>{i(n.target.value);try{t.update(e,JSON.parse(n.target.value)),r(null)}catch(e){e instanceof Error&&r(e.message)}}}),(0,w.jsx)("p",{className:"p-2 text-xs font-mono border-t text-red-400 empty:hidden",children:n})]})}function sV({field:e,fieldName:t,isRequired:n,...r}){let[o,i]=lD(t),l=lO(t),s=(0,eN.useTranslations)({note:"playground"});if("null"===e.type)return;if("string"===e.type&&"binary"===e.format)return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("label",{htmlFor:l,className:(0,T.cn)((0,eA.buttonVariants)({color:"secondary",className:"w-full h-9 gap-2 truncate"})),children:o instanceof File?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("span",{className:"text-fd-muted-foreground text-xs",children:s("Selected")}),(0,w.jsx)("span",{className:"truncate w-0 flex-1 text-end",children:o.name})]}):(0,w.jsx)("span",{className:"text-fd-muted-foreground",children:s("Upload")})}),(0,w.jsx)("input",{id:l,type:"file",multiple:!1,onChange:e=>{e.target.files&&0!==e.target.files.length&&i(e.target.files.item(0))},hidden:!0})]});if(e.enum&&e.enum.length>0){let t=e.enum.indexOf(o),a=[...e.enum.map((e,t)=>({value:String(t),label:"string"==typeof e?e:JSON.stringify(e,null,2)})),...n?[]:[{value:"-1",label:(0,w.jsx)("span",{className:"text-fd-muted-foreground",children:s("Unset")})}]];return(0,w.jsxs)(iU,{items:a,value:-1===t&&n?"":String(t),onValueChange:t=>i(e.enum[Number(t)]),children:[(0,w.jsx)(i_,{id:l,...r,children:(0,w.jsx)(iH,{placeholder:s("Select")})}),(0,w.jsx)(iW,{children:a.map(e=>(0,w.jsx)(iq,{value:e.value,children:e.label},e.value))})]})}if("boolean"===e.type){let e=[{value:"true",label:"True"},{value:"false",label:"False"},...n?[]:[{value:"undefined",label:(0,w.jsx)("span",{className:"text-fd-muted-foreground",children:s("Unset")})}]];return(0,w.jsxs)(iU,{items:e,value:void 0===o&&n?"":String(o),onValueChange:e=>i("undefined"===e?void 0:"true"===e),children:[(0,w.jsx)(i_,{id:l,...r,children:(0,w.jsx)(iH,{})}),(0,w.jsx)(iW,{children:e.map(e=>(0,w.jsx)(iq,{value:e.value,children:e.label},e.value))})]})}let a="integer"===e.type||"number"===e.type;return(0,w.jsx)(iK,{id:l,placeholder:s("Enter value"),type:a?"number":"text",step:"integer"===e.type?1:void 0,value:String(o??""),onChange:e=>{a?i(Number.isNaN(e.target.valueAsNumber)?void 0:e.target.valueAsNumber):a||i(e.target.value)}})}function sW({field:e,fieldName:t,toolbar:n,name:r,isRequired:o,depth:i=0,slotType:l,collapsible:s=!0,...a}){let{readOnly:u,writeOnly:c}=s$(),{generateDefault:d,schemaToString:f}=sP(),p=sL(e),[h,m]=(0,v.useState)(!s),{info:g,updateInfo:x}=function(e,t,n=0){let r=lL(),{generateDefault:o}=sP(),[i,l]=lD([],{stf:function(e){let{namespace:t,stf:n,initial:r}=e;return lL(n).namespace(t,r,{reset({engine:e}){e.update([],lA(r))}})}({namespace:`field-info:${n}:${lO(e)}`,initial(){var n;let o=r.get(e),i={oneOf:-1},l=(n=t).anyOf?[n.anyOf,"anyOf"]:n.oneOf?[n.oneOf,"oneOf"]:void 0;if(l){let[e,t]=l;i.oneOf=e.findIndex(e=>"object"==typeof e&&function e(t,n,r){if(void 0===n)return!1;let o=Z(t);if("boolean"==typeof o)return o;if(r.has(o))return!0;if(r.add(o),void 0!==o.const)return su(n,o.const);if(Array.isArray(o.enum))return o.enum.some(e=>su(n,e));if(Array.isArray(o.allOf)&&!o.allOf.every(t=>e(t,n,r))||Array.isArray(o.anyOf)&&!o.anyOf.some(t=>e(t,n,r))||Array.isArray(o.oneOf)&&!o.oneOf.some(t=>e(t,n,r))||void 0!==o.not&&e(o.not,n,r)||void 0!==o.type&&(Array.isArray(o.type)?o.type:[o.type]).every(e=>!sc(n,e)))return!1;if(K(n)){if(Array.isArray(o.required)&&o.required.some(e=>void 0===n[e]))return!1;
3let t=o.properties??{};for(let r in t){let o=t[r];if(void 0!==n[r]&&void 0!==o&&!e(o,n[r],new Set))return!1}}if(Array.isArray(n)){let t=o.items;if(void 0!==t&&"boolean"!=typeof t&&n.some(n=>!e(t,n,new Set)))return!1}return!0}(e,o,new Set)),-1===i.oneOf&&(i.oneOf=0),i.unionField=t}if(Array.isArray(t.type)){let e=t.type;i.selectedType=e.find(e=>sc(o,e))??e[0]}return i}})});return{info:i,schema:t,updateInfo(n){let s={...i,...n};if(s.oneOf===i.oneOf&&s.selectedType===i.selectedType)return;l(s);let a=t;s.unionField?a=t[s.unionField][s.oneOf]:s.selectedType&&(a={...t,type:s.selectedType,examples:void 0}),r.update(e,o(a))}}}(t,p,i),y=lO(t),b=lL(),[j]=lD(t,{compute:e=>void 0!==e});if(!1!==e&&(!p.readOnly||u)&&(!p.writeOnly||c)){if(s&&!j&&h&&m(!1),g.unionField&&p[g.unionField]&&p[g.unionField].length>0){let e=p[g.unionField],u=e.length>1;return(0,w.jsx)(sW,{...a,name:r,fieldName:t,isRequired:o,field:e[g.oneOf],depth:i+1,slotType:!u&&l,collapsible:s,toolbar:(0,w.jsxs)(w.Fragment,{children:[u&&(0,w.jsx)("select",{className:"text-xs font-mono",value:g.oneOf,onChange:e=>{x({oneOf:Number(e.target.value)})},children:e.map((e,t)=>(0,w.jsx)("option",{value:t,className:"bg-fd-popover text-fd-popover-foreground",children:f(e,1)},t))}),n]})})}if(Array.isArray(p.type)){let e=p.type.length>1;return(0,w.jsx)(sW,{...a,name:r,fieldName:t,isRequired:o,field:{...p,type:g.selectedType},collapsible:s,depth:i+1,slotType:!e&&l,toolbar:(0,w.jsxs)(w.Fragment,{children:[e&&(0,w.jsx)("select",{className:"text-xs font-mono",value:g.selectedType,onChange:e=>{x({selectedType:e.target.value})},children:p.type.map(e=>(0,w.jsx)("option",{value:e,className:"bg-fd-popover text-fd-popover-foreground",children:e},e))}),n]})})}return"object"===p.type?(0,w.jsxs)("fieldset",{...a,"data-collapsible":s,className:(0,T.cn)("flex flex-col gap-1.5 col-span-full @container",a.className),children:[(0,w.jsxs)("div",{className:sU(),children:[k(p),l??(0,w.jsx)(sH,{children:f(p)}),n,!o&&j&&S()]}),h&&(0,w.jsx)(s_,{field:p,fieldName:t,className:"rounded-lg border border-fd-primary/20 bg-fd-background/50 p-2 shadow-sm"})]}):"array"===p.type?(0,w.jsxs)("fieldset",{...a,"data-collapsible":s,className:(0,T.cn)("flex flex-col gap-1.5 col-span-full",a.className),children:[(0,w.jsxs)("div",{className:sU(),children:[k(),l??(0,w.jsx)(sH,{children:f(p)}),n,!o&&j&&S()]}),h&&(0,w.jsx)(sq,{fieldName:t,items:p.items??sR,className:"rounded-lg border border-fd-primary/20 bg-fd-background/50 p-2 shadow-sm"})]}):(0,w.jsxs)("fieldset",{...a,className:(0,T.cn)("flex flex-col gap-1.5",a.className),children:[(0,w.jsxs)("label",{className:sU(),htmlFor:y,children:[C(),l??(0,w.jsx)(sH,{children:f(p)}),n,!o&&j&&S()]}),(0,w.jsx)(sV,{field:p,fieldName:t,isRequired:o})]})}function k(e=p){return s?(0,w.jsxs)("button",{type:"button",className:(0,T.cn)(iG(),"inline-flex items-center gap-1 font-mono me-auto"),onClick:()=>{b.init(t,d(e)),m(e=>!e)},children:[(0,w.jsx)(sD,{className:(0,T.cn)("size-3.5 text-fd-muted-foreground",h&&"rotate-90")}),r,o&&(0,w.jsx)("span",{className:"text-red-400/80",children:"*"})]}):C()}function C(){return(0,w.jsxs)("span",{className:(0,T.cn)(iG(),"font-mono me-auto"),children:[r,o&&(0,w.jsx)("span",{className:"text-red-400/80 mx-1",children:"*"})]})}function S(){return(0,w.jsx)("button",{type:"button",onClick:()=>b.delete(t),className:"text-fd-muted-foreground hover:text-fd-accent-foreground",children:(0,w.jsx)(iY,{className:"size-3.5"})})}}function sq({fieldName:e,items:t,...n}){let r=e.at(-1)??"",{generateDefault:o}=sP(),{items:i,insertItem:l,removeItem:s}=function(e,t={}){let n=lL(),{defaultValue:r}=t,[o]=lD(e,{defaultValue:r,compute(t){let n=[];if(!Array.isArray(t))return n;for(let r=0;r<t.length;r++)n.push({field:[...e,r],index:r});return n},isChanged:(e,t)=>e.length!==t.length});return{items:o,insertItem(t){let r=n.get(e),o=Array.isArray(r)?r.length:0;n.init([...e,o],t)},removeItem(t){n.delete([...e,t])}}}(e),a=(0,eN.useTranslations)({note:"playground"});return(0,w.jsxs)("div",{...n,className:(0,T.cn)("flex flex-col gap-2",n.className),children:[i.map(e=>(0,w.jsx)(sW,{name:(0,w.jsxs)("span",{className:"text-fd-muted-foreground",children:[r,"[",e.index,"]"]}),field:t,isRequired:!0,fieldName:e.field,toolbar:(0,w.jsx)("button",{type:"button","aria-label":a("Remove Item",{note:"aria-label"}),className:(0,T.cn)((0,eA.buttonVariants)({color:"outline",size:"icon-xs"})),onClick:()=>s(e.index),children:(0,w.jsx)(sF,{})})},e.index)),(0,w.jsxs)("button",{type:"button",className:(0,T.cn)((0,eA.buttonVariants)({color:"secondary",className:"gap-1.5 py-2",size:"sm"})),onClick:()=>{l(o(t))},children:[(0,w.jsx)(sz,{className:"size-4"}),a("New Item")]})]})}var sG=e.i(543137);let sK=eW("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);function sY({className:e,...t}){return(0,w.jsx)(sK,{role:"status","aria-label":"Loading",className:(0,T.cn)("size-4 animate-spin",e),...t})}function sZ({route:t,method:n,operation:r,pathItem:o,writeOnly:i,readOnly:l,...s}){let a=(0,eN.useTranslations)({note:"playground"}),u=C(),{dereferenced:c}=u.schema,{parameters:d,body:f}=(0,v.useMemo)(()=>{let e,t=[];if(r.parameters)for(let e of r.parameters)t.push(Z(e));if(o.parameters)for(let e of o.parameters)t.push(Z(e));if(r.requestBody){let t=Z(r.requestBody).content,n=t?ed(t):void 0;t&&n&&(e={mediaType:n,schema:Z(t[n]).schema??!0})}return{body:e,parameters:t}},[r,o]),p=(0,v.useMemo)(()=>{let e=[],t=r.security??c.security??[];if(0===t.length)return e;for(let n of t){let t=[];for(let[e,r]of Object.entries(n))t.push({id:e,scopes:r});t.length>0&&e.push(t)}return e},[c,r.security]),{example:h,examples:m,setExampleData:g}=ey(),{server:x}=S(),{mediaAdapters:b,playground:{components:{ResultDisplay:j=eI,CollapsiblePanel:k=s5}={},fetchOptions:E,renderBodyField:O}={}}=C(),N=(0,v.useMemo)(()=>{let e=m.find(e=>e.id===h)?.data;return{path:e?.path??{},query:e?.query??{},header:e?.header??{},body:e?.body??{}
3,cookie:e?.cookie??{}}},[m,h]),A=lP({defaultValues:N}),{inputs:M,requirementId:R,setRequirementId:I,mapInputs:$,initAuthInputs:P}=function(e,t){let n=W(),r=y(),o=(0,eN.useTranslations)({note:"playground"}),i=C(),{resolve:l}=i.schema,s=i.schema.dereferenced.components?.securitySchemes,{transformAuthInputs:a}=i.playground??{},[u,c]=(0,v.useState)(()=>{if(!s||0===t.length)return -1;let e=t.findIndex(e=>e.every(e=>!l(s[e.id]).deprecated));return -1!==e?e:0}),d=-1===u?null:t[u],f=(0,v.useMemo)(()=>d&&s?d.map(e=>{let t=l(s?.[e.id]);if("http"===t.type&&"basic"===t.scheme){let t=["header","Authorization"];return{fieldName:t,schemeId:e.id,storageKey:r.AuthField(e.id),defaultValue:{username:"",password:""},mapOutput:e=>e&&"object"==typeof e?`Basic ${btoa(`${e.username??""}:${e.password??""}`)}`:e,children:(0,w.jsx)(s_,{field:{type:"object",properties:{username:{type:"string"},password:{type:"string"}}},fieldName:t})}}if("oauth2"===t.type){let t=["header","Authorization"];return{fieldName:t,schemeId:e.id,storageKey:r.AuthField(e.id),defaultValue:"Bearer ",children:(0,w.jsx)(s2,{fieldName:t,security:e})}}if("http"===t.type){let t=["header","Authorization"];return{fieldName:t,schemeId:e.id,storageKey:r.AuthField(e.id),defaultValue:"Bearer ",children:(0,w.jsx)(sW,{name:`${o("Authorization")} (${o("Header")})`,fieldName:t,field:{type:"string"}})}}if("apiKey"===t.type){let n=[t.in,t.name];return{fieldName:n,schemeId:e.id,defaultValue:"",storageKey:r.AuthField(e.id),children:(0,w.jsx)(sW,{fieldName:n,name:`${t.name} (${t.in})`,field:{type:"string"}})}}let n=["header","Authorization"];return{fieldName:n,schemeId:e.id,defaultValue:"",storageKey:r.AuthField(e.id),children:(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(sW,{name:`${o("Authorization")} (${o("Header")})`,fieldName:n,field:{type:"string"}}),(0,w.jsx)("p",{className:"text-fd-muted-foreground text-xs",children:o("OpenID Connect is not supported at the moment, you can still set an access token here.")})]})}}):[],[d,r,s,l,o]);return a&&(f=a(f)),lz({stf:e,onUpdate(t){for(let n of f){if(!function(e,t){if(0===t.length)return!0;if(e.length<t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}(n.fieldName,t))continue;let r=e.get(n.fieldName);null!=r&&localStorage.setItem(n.storageKey,JSON.stringify(r))}}}),(0,sG.useOnChange)(n.updatedSchemeId,()=>{let{updatedSchemeId:o}=n;if(!o)return;let{token:i}=n.store[o],l=f.find(e=>e.schemeId===o);if(l)return void e.update(l.fieldName,i);let s=t.findIndex(e=>e.some(e=>e.id===o));-1!==s&&(localStorage.setItem(r.AuthField(o),JSON.stringify(i)),c(s))}),{inputs:f,requirementId:u,setRequirementId:c,mapInputs(e){let t=structuredClone(e);for(let e of f)e.mapOutput&&lE(t,e.fieldName,e.mapOutput(lS(t,e.fieldName)));return t},initAuthInputs(){for(let t of f){let n=localStorage.getItem(t.storageKey);if(n){let r=JSON.parse(n);if(typeof r==typeof t.defaultValue){e.init(t.fieldName,r);continue}}e.init(t.fieldName,t.defaultValue)}return()=>{for(let t of f)e.delete(t.fieldName)}}}}(A.dataEngine,p),L=B(async r=>{let o=await e.A(817027).then(e=>e.createBrowserFetcher(b,{proxyUrl:u.proxyUrl,...E})),i=eD({...$(r),method:n,bodyMediaType:f?.mediaType},b,d);return o.fetch(lF(new URL(x?lU(x.url,x.variables):"/",window.location.origin).href,U(t,i)),i)}),D=(0,v.useRef)(null),z=(0,v.useRef)(!1);function F(){let e={...$(A.dataEngine.getData()),method:n,bodyMediaType:f?.mediaType};g(e,eD(e,b,d))}return lz({stf:A,onUpdate(){z.current&&(D.current&&window.clearTimeout(D.current),D.current=window.setTimeout(F,400))}}),(0,v.useEffect)(()=>{A.dataEngine.getData()!==N&&A.dataEngine.reset(N)},[N]),(0,v.useEffect)(()=>{let e=P();return F(),z.current=!0,()=>{z.current=!1,e()}},[N,M]),(0,w.jsx)(l$,{value:A,children:(0,w.jsx)(sI,{docRoot:c,writeOnly:i,readOnly:l,children:(0,w.jsxs)("form",{...s,className:(0,T.cn)("not-prose flex flex-col rounded-xl border shadow-md overflow-hidden bg-fd-card text-fd-card-foreground",s.className),onSubmit:e=>{L.start(A.dataEngine.getData()),e.preventDefault()},children:[(0,w.jsx)(lH,{className:"border-b"}),(0,w.jsxs)("div",{className:"flex flex-row items-center gap-2 text-sm p-3 not-last:pb-0",children:[(0,w.jsx)(em,{children:n}),(0,w.jsx)(s4,{route:t,className:(0,T.cn)("flex-1",r.deprecated&&"line-through")}),(0,w.jsx)("button",{type:"submit",className:(0,T.cn)((0,eA.buttonVariants)({color:"primary",size:"sm"}),"w-14 py-1.5"),disabled:L.isLoading,children:L.isLoading?(0,w.jsx)(lG,{className:"size-4 animate-spin"}):a("Send")})]}),L.data?(0,w.jsx)(j,{data:L.data,reset:L.reset}):null,p.length>0&&(0,w.jsx)(sJ,{securities:p,securityId:R,setSecurityId:I,children:M.map(e=>(0,w.jsx)(v.Fragment,{children:e.children},lO(e.fieldName)))}),(0,w.jsx)(s0,{parameters:d}
3),f&&(0,w.jsx)(k,{"data-type":"body",title:a("Body"),children:O?O("body",f):(0,w.jsx)(s1,{field:f.schema})})]})})})}function sJ({securities:e,setSecurityId:t,securityId:n,children:r}){let o=(0,eN.useTranslations)({note:"playground"}),{isLoading:i,error:l}=W(),s=i||null!=l,[a,u]=(0,v.useState)(s),{schema:{dereferenced:c,resolve:d},playground:{components:{CollapsiblePanel:f=s5}={}}={}}=C(),p=c.components?.securitySchemes;(0,sG.useOnChange)(s,()=>{s&&u(!0)});let h=e.map((e,t)=>{if(1===e.length){let n=d(p?.[e[0].id]);return{value:t,label:(0,w.jsxs)("div",{children:[(0,w.jsx)("p",{className:(0,T.cn)("font-mono font-medium",n?.deprecated&&"text-fd-muted-foreground line-through"),children:e[0].id}),(0,w.jsx)("p",{className:"text-fd-muted-foreground whitespace-pre-wrap",children:n?.description})]})}}return{value:t,label:(0,w.jsxs)("div",{children:[(0,w.jsx)("p",{className:"inline-flex items-center gap-1 font-mono font-medium",children:e.map((e,t)=>(0,w.jsxs)(v.Fragment,{children:[t>0&&(0,w.jsx)(lK,{className:"text-fd-muted-foreground size-3.5"}),(0,w.jsx)("span",{className:(0,T.cn)(d(p?.[e.id])?.deprecated&&"text-fd-muted-foreground line-through"),children:e.id})]},t))}),(0,w.jsx)("ul",{className:"text-fd-muted-foreground whitespace-pre-wrap list-disc list-inside",children:e.map((e,t)=>(0,w.jsx)("li",{className:"empty:hidden",children:d(p?.[e.id])?.description},t))})]})}});return(0,w.jsxs)(f,{title:(0,w.jsxs)(w.Fragment,{children:[o("Authorization"),i&&(0,w.jsxs)("span",{className:"border-s ps-2 inline-flex items-center gap-1.5 text-fd-muted-foreground text-xs font-mono",children:[(0,w.jsx)(sY,{})," ",o("Fetching token...")]})]}),"data-type":"authorization",open:a,onOpenChange:u,children:[null!=l&&(0,w.jsxs)("div",{className:"p-2 border rounded-lg bg-fd-secondary",children:[(0,w.jsx)("p",{className:"text-fd-muted-foreground font-medium mb-1",children:o("Failed to fetch token")}),(0,w.jsx)("p",{children:String(l)})]}),(0,w.jsxs)(iU,{items:h,value:n,onValueChange:e=>null!==e&&t(e),children:[(0,w.jsx)(i_,{children:(0,w.jsx)(iH,{})}),(0,w.jsx)(iW,{children:h.map(({value:e,label:t})=>(0,w.jsx)(iq,{value:e,children:t},e))})]}),r]})}let sX=["path","header","cookie","query"];function sQ({type:e,parameters:t}){let{renderParameterField:n}=C().playground??{};return t.map(t=>{let r=[e,t.name];if(n)return n(r,t);let o=t.content&&Object.keys(t.content),i=t.content&&o&&o.length>0?t.content[o[0]].schema:t.schema;return(0,w.jsx)(sW,{name:t.name,fieldName:r,field:i??sR,isRequired:t.required},lO(r))})}function s0({parameters:e}){let{components:{CollapsiblePanel:t=s5}={}}=C().playground??{},n=(0,eN.useTranslations)({note:"playground"}),r={header:n("Header"),cookie:n("Cookies"),query:n("Query"),path:n("Path")};return sX.map(n=>{let o=e.filter(e=>e.in===n);if(0!==o.length)return(0,w.jsx)(t,{"data-type":n,title:r[n],children:(0,w.jsx)(sQ,{parameters:o,type:n})},n)})}function s1({field:e}){let t=sL(e),[n,r]=(0,v.useState)(!1),o=(0,eN.useTranslations)({note:"playground"});return"binary"===t.format?(0,w.jsx)(sW,{field:t,fieldName:["body"],isRequired:!0}):n?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("button",{className:(0,T.cn)((0,eA.buttonVariants)({color:"secondary",size:"sm",className:"w-fit font-mono p-2"})),onClick:()=>r(!1),type:"button",children:o("Close JSON Editor")}),(0,w.jsx)(sB,{fieldName:["body"]})]}):(0,w.jsx)(sW,{field:t,fieldName:["body"],collapsible:!1,isRequired:!0,name:(0,w.jsx)("button",{type:"button",className:(0,T.cn)((0,eA.buttonVariants)({color:"secondary",size:"sm",className:"p-2"})),onClick:()=>r(!0),children:o("Open JSON Editor")})})}function s2({fieldName:e,security:t}){let[n,r]=(0,v.useState)(!1),o=lL(),i=(0,eN.useTranslations)({note:"playground"});return(0,w.jsxs)("fieldset",{className:"flex flex-col gap-2",children:[(0,w.jsx)("label",{htmlFor:lO(e),className:(0,T.cn)(iG()),children:i("Access Token")}),(0,w.jsxs)("div",{className:"flex gap-2",children:[(0,w.jsx)(sV,{fieldName:e,field:{type:"string"},className:"flex-1"}),(0,w.jsxs)(lx,{open:n,onOpenChange:r,children:[(0,w.jsx)(lv,{type:"button",className:(0,T.cn)((0,eA.buttonVariants)({size:"sm",color:"secondary"})),children:i("Authorize")}),(0,w.jsx)(lV,{setOpen:r,schemeId:t.id,scopes:t.scopes,setToken:e=>o.update(["header","Authorization"],e)})]})]})]})}function s4({route:e,...t}){return(0,w.jsx)("div",{...t,className:(0,T.cn)("flex flex-row items-center gap-0.5 overflow-auto text-nowrap",t.className),children:e.split("/").map((e,t)=>(0,w.jsxs)(v.Fragment,{children:[t>0&&(0,w.jsx)("span",{className:"text-fd-muted-foreground",children:"/"}),e.startsWith("{")&&e.endsWith("}
3")?(0,w.jsx)("code",{className:"bg-fd-primary/10 text-fd-primary",children:e}):(0,w.jsx)("code",{className:"text-fd-foreground",children:e})]},t))})}function s5({title:e,children:t,...n}){return(0,w.jsxs)(sl,{...n,className:(0,T.cn)("border-b last:border-b-0",n.className),children:[(0,w.jsxs)(ss,{className:"group w-full flex items-center gap-2 p-3 text-sm font-medium",children:[e,(0,w.jsx)(lq,{className:"ms-auto size-3.5 text-fd-muted-foreground group-data-[panel-open]:rotate-180"})]}),(0,w.jsx)(sa,{children:(0,w.jsx)("div",{className:"flex flex-col gap-3 p-3 pt-1",children:t})})]})}var s7=e.i(980346);function s6(e,t){return e===t||e.startsWith(`${t}.`)}let s3=(0,v.createContext)([]);function s9({segments:e,children:t}){let n=(0,v.use)(s3);return(0,w.jsx)(s3,{value:(0,v.useMemo)(()=>[...n,...e],[n,e]),children:t})}function s8(e){return e?function(...e){let t=[];for(let n of e)n.startsWith("\0")?t.push(n.slice(1)):n.length>0&&t.push((0,s7.slug)(n));return t.join(".")}(...(0,v.use)(s3),...e):null}e.s([],523755),e.i(523755);let ae=v.createContext(void 0);function at(){let e=v.useContext(ae);if(void 0===e)throw Error(ny(10));return e}let an={value:()=>null},ar=v.forwardRef(function(e,t){let{render:n,className:r,disabled:o=!1,hiddenUntilFound:i,keepMounted:l,loopFocus:s,onValueChange:a,multiple:u=!1,orientation:c="vertical",value:d,defaultValue:f,style:p,...h}=e,m=oA(),g=v.useMemo(()=>{if(void 0===d)return f??[]},[d,f]),x=v.useRef([]),[y,b]=e7({controlled:d,default:g,name:"Accordion",state:"value"}),j=te((e,t,n)=>{if(u)if(t){let t=y.slice();if(t.push(e),a?.(t,n),n.isCanceled)return;b(t)}else{let t=y.filter(t=>t!==e);if(a?.(t,n),n.isCanceled)return;b(t)}else{let t=y[0]===e?[]:[e];a?.(t,n),n.isCanceled||b(t)}}),k=v.useMemo(()=>({value:y,disabled:o,orientation:c}),[y,o,c]),C=v.useMemo(()=>({disabled:o,handleValueChange:j,hiddenUntilFound:i??!1,keepMounted:l??!1,state:k,value:y}),[o,j,i,l,k,y]),S=r$("div",e,{state:k,ref:t,props:[{dir:m},h],stateAttributesMapping:an});return(0,w.jsx)(ae.Provider,{value:C,children:(0,w.jsx)(oj,{elementsRef:x,children:S})})}),ao=v.createContext(void 0);function ai(){let e=v.useContext(ao);if(void 0===e)throw Error(ny(9));return e}let al=((m={}).index="data-index",m.disabled="data-disabled",m.open="data-open",m),as={...l4,index:e=>Number.isInteger(e)?{[al.index]:String(e)}:null,...rn,value:()=>null},aa=v.forwardRef(function(e,t){let{className:n,disabled:r=!1,onOpenChange:o,render:i,value:l,style:s,...a}=e,{ref:u,index:c}=ik(),d=e0(t,u),{disabled:f,handleValueChange:p,state:h,value:m}=at(),g=nG(),x=l??g,y=r||f,b=v.useMemo(()=>{if(!m)return!1;for(let e=0;e<m.length;e+=1)if(m[e]===x)return!0;return!1},[m,x]),j=te((e,t)=>{o?.(e,t),t.isCanceled||p(x,e,t)}),k=lY({open:b,onOpenChange:j,disabled:y}),C=v.useMemo(()=>({open:k.open,disabled:k.disabled,transitionStatus:k.transitionStatus}),[k.open,k.disabled,k.transitionStatus]),S=v.useMemo(()=>({...k,onOpenChange:j,state:C}),[k,C,j]),E=v.useMemo(()=>({...h,hidden:!b&&!k.mounted,index:c,disabled:y,open:b}),[k.mounted,y,c,b,h]),O=nG(),[N,T]=v.useState(),A=v.useMemo(()=>({open:b,state:E,setTriggerId:T,triggerId:N??O}),[O,b,E,T,N]),M=r$("div",e,{state:E,ref:d,props:a,stateAttributesMapping:as});return(0,w.jsx)(lZ.Provider,{value:S,children:(0,w.jsx)(ao.Provider,{value:A,children:M})})}),au=v.forwardRef(function(e,t){let{render:n,className:r,style:o,...i}=e,{state:l}=ai();return r$("h3",e,{state:l,ref:t,props:i,stateAttributesMapping:as})}),ac=v.forwardRef(function(e,t){let{disabled:n,className:r,id:o,render:i,nativeButton:l=!0,style:s,...a}=e,{panelId:u,open:c,handleTrigger:d,disabled:f}=lJ(),{getButtonProps:p,buttonRef:h}=rY({disabled:n||f,focusableWhenDisabled:!0,native:l}),{state:m,setTriggerId:g,triggerId:x}=ai();return e6(()=>(o&&g(o),()=>{g(void 0)}),[o,g]),r$("button",e,{state:m,ref:[t,h],props:[{"aria-controls":c?u:void 0,"aria-expanded":c,id:x,onClick:d},a,p],stateAttributesMapping:l2})}),ad=((g={}).accordionPanelHeight="--accordion-panel-height",g.accordionPanelWidth="--accordion-panel-width",g),af=v.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:o,id:i,render:l,style:s,...a}=e,{hiddenUntilFound:u,keepMounted:c}=at(),{mounted:d,onOpenChange:f,open:p,panelId:h,setMounted:m,setOpen:g,setPanelIdState:x,transitionStatus:v}=lJ();e6(()=>
3{if(i)return x(i),()=>{x(void 0)}},[i,x]);let{height:y,props:b,ref:w,shouldPreventOpenAnimation:j,shouldRender:k,transitionStatus:C,width:S}=l8({externalRef:t,hiddenUntilFound:r??u,id:i??h,keepMounted:o??c,mounted:d,onOpenChange:f,open:p,setMounted:m,setOpen:g,transitionStatus:v}),{state:E,triggerId:O}=ai(),N={...E,transitionStatus:C},T=rI(s,N),A=r$("div",{...e,style:void 0},{state:N,ref:w,props:[b,{"aria-labelledby":O,role:"region",style:{[ad.accordionPanelHeight]:void 0===y?"auto":`${y}px`,[ad.accordionPanelWidth]:void 0===S?"auto":`${S}px`}},a,T?{style:T}:void 0,j?{style:{animationName:"none"}}:void 0],stateAttributesMapping:as});return k?A:null});e.s(["Header",0,au,"Item",0,aa,"Panel",0,af,"Root",0,ar,"Trigger",0,ac],833179);var ap=e.i(833179),ap=ap;let ah=(0,v.createContext)(null);function am({type:e="single",defaultValue:t,...n}){let[r,o]=(0,v.useState)(()=>Array.isArray(t)?t:t?[t]:[]);return(0,w.jsx)(ah,{value:(0,v.useMemo)(()=>({type:e,setValue:o}),[e]),children:(0,w.jsx)(ap.Root,{multiple:"multiple"===e,value:r,onValueChange:o,...n})})}function ag({value:e,className:t,anchorSegments:n,...r}){let o=(0,v.use)(ah),i=s8(n??!1);(0,v.useEffect)(()=>{i&&s6(window.location.hash.slice(1),i)&&o.setValue([e])},[e,i,o]);let l=(0,w.jsx)(ap.Item,{value:e,className:(0,T.cn)("scroll-m-20 border-b last:border-b-0",t),...r});return n?(0,w.jsx)(s9,{segments:n,children:l}):l}function ax(e){return(0,w.jsx)(ap.Panel,{...e,className:(0,T.cn)("h-(--accordion-panel-height) overflow-hidden transition-[height] ease-out data-ending-style:h-0 data-starting-style:h-0",e.className)})}function av(e){return(0,w.jsx)(ap.Header,{...e,className:(0,T.cn)("not-prose flex text-fd-foreground font-medium",e.className),children:e.children})}function ay(e){return(0,w.jsxs)(ap.Trigger,{...e,className:(0,T.cn)("flex flex-1 items-center gap-1 text-start group/accordion py-2 focus-visible:outline-none",e.className),children:[(0,w.jsx)(sD,{className:"size-3.5 text-fd-muted-foreground shrink-0 transition-transform group-data-[panel-open]/accordion:rotate-90"}),e.children]})}var ab=e.i(213758);function aw({operation:e}){let t=C(),{resolve:n}=t.schema,r=(0,eN.useTranslations)({note:"operation page"}),o=(0,v.useMemo)(()=>{let t=[];if(!e.responses)return t;for(let[o,i]of Object.entries(e.responses)){let e=n(i),l=e.content?ed(e.content):null,s=l?n(e.content?.[l]):null,a={code:o,response:e,mediaType:l};if(s?.examples)for(let[e,t]of(a.examples??=[],Object.entries(s.examples))){let o=n(t);a.examples.push({label:o?.summary??r("Example {key}",{variables:{key:e}}),sample:eu(o.value),description:o?.description})}else(s?.example||s?.schema)&&(a.examples??=[],a.examples.push({label:r("Example"),sample:eu(s.example)??sT(s.schema)}));t.push(a)}return t},[e.responses,n,r]);if(0===o.length)return null;let{renderResponseTabs:i=aj}=t.content??{};return i({tabs:o},t)}function aj({tabs:e}){return(0,w.jsx)(ak,{tabs:e})}function ak({tabs:e}){let t=(0,eN.useTranslations)({note:"operation page"});function n(e){return(0,w.jsxs)(w.Fragment,{children:[e.description&&(0,w.jsx)(G,{md:e.description}),(0,w.jsx)(F,{lang:"json",code:JSON.stringify(e.sample,null,2)})]})}return(0,w.jsx)(ab.Tabs,{groupId:"fumadocs_openapi_responses",items:e.map(e=>e.code),children:e.map(e=>{let{examples:r=[]}=e,o=t("Empty");return r.length>1?o=(0,w.jsx)(am,{type:"single",className:"pt-2",defaultValue:"0",children:r.map((e,t)=>(0,w.jsxs)(ag,{value:t.toString(),children:[(0,w.jsx)(av,{children:(0,w.jsx)(ay,{children:e.label})}),(0,w.jsx)(ax,{className:"prose-no-margin",children:n(e)})]},t))}):1===r.length&&(o=n(r[0])),(0,w.jsx)(ab.Tab,{value:e.code,children:o},e.code)})})}function aC({method:e,operation:t,pathItem:n}){let r=C(),{renderAPIExampleUsageTabs:o,renderAPIExampleLayout:i}=r.content??{};i??=e=>(0,w.jsxs)("div",{className:"prose-no-margin",children:[e.selector,e.usageTabs,e.responseTabs]}),o??=e=>{let t=Array.from(e.map().entries());return 0===t.length?null:(0,w.jsxs)(A.CodeBlockTabs,{groupId:"fumadocs_openapi_requests",defaultValue:t[0][0],children:[(0,w.jsx)(A.CodeBlockTabsList,{children:t.map(([e,t])=>(0,w.jsx)(A.CodeBlockTabsTrigger,{value:e,children:t.label??t.lang},e))}),t.map(([e,t])=>(0,w.jsx)(A.CodeBlockTab,{value:e,children:(0,w.jsx)(aE,{id:e,lang:t.lang})},e))]})};let l=(0,v.useMemo)(()=>
3{let o=H(r.codeUsages);if(r.generateCodeSamples)for(let i of r.generateCodeSamples({operation:t,method:e,pathItem:n}))o.addInline(i);if(t["x-codeSamples"])for(let e of t["x-codeSamples"])o.addInline(e);return o},[r,t,e,n]);return i({selector:t["x-exclusiveCodeSample"]?null:(0,w.jsx)(aS,{}),usageTabs:o(l,r),responseTabs:(0,w.jsx)(aw,{operation:t,method:e,pathItem:n})},r)}function aS(){let{example:e,setExample:t,examples:n}=ey(),{APIExampleSelector:r}=C().operation??{};if(r)return(0,w.jsx)(r,{items:n,value:e,onValueChange:t});if(1===n.length)return null;let o=n.map(e=>({value:e.id,label:(0,w.jsxs)("div",{children:[(0,w.jsx)("p",{className:"font-medium text-sm",children:e.name}),(0,w.jsx)("p",{className:"text-fd-muted-foreground",children:e.description})]})}));return(0,w.jsxs)(iU,{items:o,value:e,onValueChange:e=>null!==e&&t(e),children:[(0,w.jsx)(i_,{className:"not-prose mb-2",children:(0,w.jsx)(iH,{})}),(0,w.jsx)(iW,{children:o.map(e=>(0,w.jsx)(iq,{value:e.value,children:e.label},e.value))})]})}function aE({id:e,lang:t}){let{mediaAdapters:n,codeUsages:r}=C(),{examples:o,example:i,route:l,addListener:s,removeListener:a}=ey(),{server:u}=S(),c=r.get(e),[d,f]=(0,v.useState)(!1),[p,h]=(0,v.useState)(()=>o.find(e=>e.id===i)?.encoded);(0,v.useEffect)(()=>{let e=(e,t)=>h(t);return s(e),f(!0),()=>{a(e)}},[s,a]);let m=(0,v.useMemo)(()=>{if(!p)return;let e=lF(u&&d?new URL(lU(u.url,u.variables),window.location.origin).href:"https://example.com",U(l,p));if(c)return c.generate({...p,url:e},{mediaAdapters:n,custom:null})},[p,u,l,d,c,n]);return m?(0,w.jsx)(F,{lang:t,code:m}):null}function aO({path:e,operation:t,method:n,pathItem:r,examples:o}){let i=C();if(!t.requestBody)return null;let{renderRequestTabs:l=aN}=i.content??{};return l({items:o,route:e,method:n,pathItem:r,operation:t},i)}function aN(e){return(0,w.jsx)(aT,{options:e})}function aT({options:e}){let t,n=(0,eN.useTranslations)({note:"operation page"}),{items:r}=e;return t=r.length>1?(0,w.jsxs)(ab.Tabs,{defaultValue:r[0].id,children:[(0,w.jsx)(ab.TabsList,{children:r.map(e=>(0,w.jsx)(ab.TabsTrigger,{value:e.id,children:"_default"===e.id?n("Default"):e.name},e.id))}),r.map(t=>(0,w.jsx)(ab.TabsContent,{value:t.id,children:(0,w.jsx)(aA,{item:t,options:e})},t.id))]}):1===r.length?(0,w.jsx)(aA,{item:r[0],options:e}):(0,w.jsx)("p",{className:"text-fd-muted-foreground text-xs",children:n("Empty")}),(0,w.jsxs)("div",{className:"p-3 rounded-xl border prose-no-margin bg-fd-card text-fd-card-foreground shadow-md",children:[(0,w.jsx)("p",{className:"font-semibold border-b pb-2",children:n("Example Requests")}),t]})}function aA({item:e,options:t}){let n=(0,eN.useTranslations)({note:"operation page"}),r=e.data,o={body:(0,w.jsxs)(w.Fragment,{children:[n("Request Body"),(0,w.jsx)("code",{className:"text-xs text-fd-muted-foreground ms-auto",children:r.bodyMediaType})]}),cookie:n("Cookie Parameters"),header:n("Header Parameters"),query:n("Query Parameters"),path:n("Path Parameters")};return(0,w.jsxs)(w.Fragment,{children:[e.description&&(0,w.jsx)(G,{md:e.description}),(0,w.jsxs)("div",{className:"flex flex-row gap-2 items-center justify-between",children:[(0,w.jsx)(em,{children:r.method}),(0,w.jsx)("code",{children:U(t.route,e.encoded)})]}),(0,w.jsx)(am,{type:"multiple",className:"mt-2",children:Object.entries(o).map(([e,t])=>{let n=r[e];if(n&&0!==Object.keys(n).length)return(0,w.jsxs)(ag,{value:e,children:[(0,w.jsx)(av,{children:(0,w.jsx)(ay,{children:t})}),(0,w.jsx)(ax,{className:"prose-no-margin",children:(0,w.jsx)(F,{lang:"json",code:JSON.stringify(n,null,2)})})]},e)})})]})}function aM({method:e,path:t,parameters:n,sampleKey:r,body:o}){let i={path:{},cookie:{},header:{},query:{},method:e};for(let r of n){let n=function e(t){if(void 0!==t.example)return eu(t.example);if(t.content){let n=ed(t.content),r=n?Z(t.content[n]):void 0;if(n&&r){let o=t.examples?.[n],i=(void 0!==o?eu(Z(o).value):void 0)??e(r);if(void 0!==i)return i}}if(t.examples){let e=Object.values(t.examples);if(e.length>0)return eu(Z(e[0]).value)}}(r);if(void 0===n&&r.required){if(r.schema)n=sT(r.schema);else if(r.content){let o=ed(r.content),i=o?Z(r.content[o]):void 0;if(!i||!i.schema)throw Error(`Cannot find "${r.name}" parameter info for media type "${o}" in ${t} ${e}`);n=sT(i.schema)}}switch(r.in){case"cookie":i.cookie[r.name]=n;break;case"header":i.header[r.name]=n;break;case"query":i.query[r.name]=n;break;default:i.path[r.name]=n}}if(o?.content){let n=ed(o.content);if(!n)throw Error(`Cannot find body schema for ${t} ${e}: missing media type`);i.bodyMediaType=n;let l=Z(o.content[n]);l.examples&&r?i.body=eu(Z(l.examples[r]).value):l.example?i.body=eu(l.example):i.body=sT(l?.schema??{},{skipReadOnly:"get"!==e,skipWriteOnly:"get"===e,skipNonRequired:!0})}return i}var aR=e.i(494157);function aI({id:e,depth:t,...n}){let r=s8([e]),{renderHeading:o,components:{Heading:i}={}}=C();return o?o({id:r,...n},t):i?(0,w.jsx)(i,{id:r,depth:t,...n}):(0,w.jsx)(aR.Heading,{id:r,as:`h${t}`,...n})}let a$=eS("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}
3]]),aP=eS("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),aL=(0,v.createContext)(null);function aD({defaultValue:e,children:t}){let[n,r]=(0,v.useState)(e??null);return(0,w.jsx)(aL,{value:(0,v.useMemo)(()=>({value:n,setValue:r}),[n]),children:t})}function az({value:e,anchorSegments:t,...n}){let{value:r,setValue:o}=(0,v.use)(aL),i=s8(t??!1);if((0,v.useEffect)(()=>{i&&s6(window.location.hash.slice(1),i)&&o(e)},[i,e,o]),e!==r)return;let l=(0,w.jsx)("div",{...n});return t?(0,w.jsx)(s9,{segments:t,children:l}):l}function aF({items:e,className:t,placeholder:n,...r}){let{value:o,setValue:i}=(0,v.use)(aL);return(0,w.jsxs)(iU,{items:e,value:o,onValueChange:i,children:[(0,w.jsx)(i_,{className:(0,T.cn)("not-prose w-fit min-w-0 *:min-w-0",t),...r,children:(0,w.jsx)(iH,{placeholder:n})}),(0,w.jsx)(iW,{children:e.map(({label:e,value:t})=>(0,w.jsx)(iq,{value:t,children:e},t))})]})}var aU=e.i(155034);let aH=(0,aU.default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),a_=(0,aU.default)("circle-x",[["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"}]]),aB=(0,aU.default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),aV=(0,aU.default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]),aW=(0,aU.default)("triangle-alert",[["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"}]]),aq="size-5 -me-0.5 fill-(--callout-color) text-fd-card";function aG({children:e,title:t,...n}){return(0,w.jsxs)(aK,{...n,children:[t&&(0,w.jsx)(aY,{children:t}),(0,w.jsx)(aZ,{children:e})]})}function aK({type:e="info",icon:t,children:n,className:r,style:o,...i}){let l="warn"===e?"warning":"tip"===e?"info":e;return(0,w.jsxs)("div",{className:(0,T.cn)("flex gap-2 my-4 rounded-xl border bg-fd-card p-3 ps-1 text-sm text-fd-card-foreground shadow-md",r),style:{"--callout-color":`var(--color-fd-${l}, var(--color-fd-muted))`,...o},...i,children:[(0,w.jsx)("div",{role:"none",className:"w-0.5 bg-(--callout-color)/50 rounded-sm"}),t??({info:(0,w.jsx)(aB,{className:aq}),warning:(0,w.jsx)(aW,{className:aq}),error:(0,w.jsx)(a_,{className:aq}),success:(0,w.jsx)(aH,{className:aq}),idea:(0,w.jsx)(aV,{className:"size-5 -me-0.5 fill-(--callout-color) text-(--callout-color)"})})[l],(0,w.jsx)("div",{className:"flex flex-col gap-2 min-w-0 flex-1",children:n})]})}function aY({children:e,className:t,...n}){return(0,w.jsx)("p",{className:(0,T.cn)("font-medium my-0!",t),...n,children:e})}function aZ({children:e,className:t,...n}){return(0,w.jsx)("div",{className:(0,T.cn)("text-fd-muted-foreground prose-no-margin empty:hidden",t),...n,children:e})}var aJ=e.i(737877);let aX=["path","query","header","cookie"];function aQ({type:e="operation",path:t,operation:n,pathItem:r,method:o,showTitle:i,showDescription:l,headingLevel:s=2}){let a=(0,eN.useTranslations)({note:"operation page"}),u=C(),{schema:{dereferenced:c,resolve:d}}=u,f=d(n.requestBody),p=null,h=n.description??r.description,m=l&&h&&(0,w.jsx)(G,{md:h}),g=null,x=null,y=null,b=null,j=(0,v.useMemo)(()=>(function({path:e,method:t,ctx:n,operation:r,pathItem:o}){let i=Z(r.requestBody),l=i?.content?ed(i.content):null,s=l?Z(i.content[l]):null,a=[...r.parameters??[],...o.parameters??[]].map(Z);if(s?.examples){let r=[];for(let[o,l]of Object.entries(s.examples)){let{summary:s,description:u}=Z(l),c=aM({path:e,body:i,parameters:a,sampleKey:o,method:t});r.push({id:o,name:s||o,description:u,data:c,encoded:eD(c,n.mediaAdapters,a)})}if(r.length>0)return r}let u=aM({path:e,body:i,method:t,parameters:a}),c=Z(s?.schema);return[{id:"_default",name:"Default",description:"object"==typeof c?c.description:void 0,data:u,encoded:eD(u,n.mediaAdapters,a)}]})({path:t,operation:n,method:o,pathItem:r,ctx:u}),[u,n,o,r,t]);if(i){let e=n.summary||r.summary||(n.operationId?function(e){let t=[];for(let n of e)0===t.length?t.push(n.toLocaleUpperCase()):"."===n?t=[]:/^[A-Z]$/.test(n)&&" "!==t.at(-1)?t.push(" ",n):"-"===n?t.push(" "):t.push(n);return t.join("")}(n.operationId):t);p=(0,w.jsxs)("div",{className:"flex gap-2 items-center justify-between",children:[(0,w.jsx)(aI,{id:e,depth:s,className:"my-0!",children:e}),n.deprecated&&(0,w.jsx)(eh,{color:"yellow",className:"text-xs not-prose",children:a("Deprecated")})]}),s++}else n.deprecated&&(p=(0,w.jsx)(aG,{type:"warn",title:a("Deprecated"),className:"mt-0!"}));let k=f?.content?Object.entries(f.content):null;if(k&&k.length>0){let e=k.map(([e])=>({label:(0,w.jsx)("code",{className:"text-xs",children:e}),value:e}));g=(0,w.jsxs)(aD,{defaultValue:e[0].value,children:[(0,w.jsxs)("div",{className:"flex gap-2 items-center justify-between mt-10",children:[(0,w.jsx)(aI,{id:"request-body",depth:s,className:"my-0!",children:a("Request Body")}),k.length>1?(0,w.jsx)(aF,{items:e,className:"font-medium"}):(0,w.jsx)("p",{className:"text-fd-muted-foreground not-prose",children:e[0].label})]}
3),f?.description&&(0,w.jsx)(G,{md:f.description}),k.map(([e,r])=>{if(!(0,eg.isMediaTypeSupported)(e,u.mediaAdapters))throw Error(`Media type ${e} is not supported (in ${t})`);return(0,w.jsx)(az,{anchorSegments:["request-body",e],value:e,children:(0,w.jsx)(a0,{content:d(r),operation:n,method:o})},e)})]})}if(n.responses&&!1!==u.showResponseSchema){let e=Object.keys(n.responses);y=(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(aI,{id:"response-body",depth:s,children:a("Response Body")}),(0,w.jsx)(am,{type:"multiple",children:e.map(e=>(0,w.jsx)(a1,{status:e,operation:n},e))})]})}let S=[...n.parameters??[],...r.parameters??[]].map(e=>d(e)),E=aX.map(e=>{let t=S.filter(t=>t.in===e);if(!t||0===t.length)return;let n="path"===e?a("Path Parameters"):"query"===e?a("Query Parameters"):"header"===e?a("Header Parameters"):a("Cookie Parameters");return(0,w.jsxs)(v.Fragment,{children:[(0,w.jsx)(aI,{id:`parameters-${e}`,depth:s,children:n}),(0,w.jsx)(s9,{segments:["parameters",e],children:(0,w.jsx)("div",{className:"flex flex-col",children:t.map(e=>{if(null==e.schema)return;let t=d(e.schema);return(0,w.jsx)(u.SchemaUI,{client:{name:e.name,required:e.required},root:"object"==typeof t?{...t,description:e.description??t.description,deprecated:(e.deprecated??!1)||(t.deprecated??!1)}:t,readOnly:"get"===o,writeOnly:"get"!==o},e.name)})})})]},e)}),N=(n.security??c.security??[]).filter(e=>Object.keys(e).length>0);if("operation"===e&&N.length>0){let e=c.components?.securitySchemes,t=N.map((e,t)=>({value:String(t),label:(0,w.jsx)("div",{className:"flex flex-col text-xs min-w-0",children:Object.entries(e).map(([e,t])=>(0,w.jsxs)("code",{className:"truncate",children:[(0,w.jsx)("span",{className:"font-medium",children:e})," ",t.length>0&&(0,w.jsx)("span",{className:"text-fd-muted-foreground",children:t.join(", ")})]},e))})}));x=(0,w.jsxs)(aD,{defaultValue:t[0].value,children:[(0,w.jsxs)("div",{className:"flex items-start justify-between gap-2 mt-10",children:[(0,w.jsx)(aI,{id:"authorization",depth:s,className:"my-0!",children:a("Authorization")}),t.length>1?(0,w.jsx)(aF,{items:t}):(0,w.jsx)("div",{className:"not-prose",children:t[0].label})]}),N.map((n,r)=>(0,w.jsx)(az,{value:t[r].value,children:Object.entries(n).map(([t,n])=>{let r=d(e?.[t]);if(r)return(0,w.jsx)(a4,{scheme:r,scopes:n},t)})},r))]})}let A=[];for(let[e,t]of Object.entries(n.callbacks??{}))for(let[n,r]of Object.entries(d(t))){let t=d(r);for(let r of ec)t[r]&&A.push({name:e,path:n,method:r,callback:t,operation:t[r]})}A.length>0&&(b=(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(aI,{id:"callbacks",depth:s,children:a("Callbacks")}),(0,w.jsx)(am,{type:"multiple",children:A.map((e,n)=>(0,w.jsxs)(ag,{value:`${e.name}\0${e.path}\0${e.method}`,anchorSegments:["callbacks",e.name,e.path,e.method],children:[(0,w.jsx)(av,{children:(0,w.jsx)(ay,{className:"gap-3",children:(0,w.jsxs)("div",{children:[(0,w.jsx)("p",{className:"font-mono mb-2",children:e.name}),(0,w.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,w.jsx)(em,{children:e.method}),(0,w.jsx)("code",{className:"text-fd-muted-foreground",children:e.path})]})]})})}),(0,w.jsx)(ax,{children:(0,w.jsx)("div",{className:"border p-3 mb-2 @container prose-no-margin rounded-2xl",children:(0,w.jsx)(aQ,{type:"webhook",path:t,headingLevel:s+1,method:e.method,pathItem:e.callback,operation:e.operation})})})]},n))})]}));let{renderOperationLayout:M,renderWebhookLayout:R}=u.content??{};if("operation"!==e)return(R??=e=>(0,w.jsxs)("div",{className:"flex flex-col-reverse gap-x-6 gap-y-4 @4xl:flex-row @4xl:items-start",children:[(0,w.jsxs)("div",{className:"min-w-0 flex-1 prose-no-margin",children:[e.header,e.description,e.authSchemes,e.parameters,e.body,e.responses,e.callbacks]}),(0,w.jsx)("div",{className:"@4xl:sticky @4xl:top-[calc(var(--fd-docs-row-1,2rem)+1rem)] @4xl:w-[400px]",children:e.requests})]}))({header:p,description:m,authSchemes:x,body:g,callbacks:b,parameters:E,responses:y,requests:(0,w.jsx)(aO,{examples:j,path:t,method:o,pathItem:r,operation:n})});{let e=(M??=e=>(0,w.jsxs)("div",{className:"flex flex-col gap-x-6 gap-y-4 @4xl:flex-row @4xl:items-start",children:[(0,w.jsxs)("div",{className:"min-w-0 flex-1",children:[e.header,e.apiPlayground,e.description,e.authSchemes,e.parameters,e.body,e.responses,e.callbacks]}),(0,w.jsx)("div",{className:"@4xl:sticky @4xl:top-[calc(var(--fd-docs-row-1,2rem)+1rem)] @4xl:w-[400px]",children:e.apiExample})]}))({header:p,description:m,authSchemes:x,body:g,callbacks:b,parameters:E,responses:y,apiPlayground:u.playground?.enabled??!0?u.playground?.render?u.playground.render({path:t,method:o,operation:n,pathItem:r,ctx:u}):(0,w.jsx)(sZ,{operation:n,pathItem:r,route:t,method:o,writeOnly:!0,readOnly:!1}):(0,w.jsxs)("div",{className:"flex flex-row items-center gap-2.5 p-3 rounded-xl border bg-fd-card text-fd-card-foreground not-prose",children:[(0,w.jsx)(em,{className:"text-xs",children:o}),(0,w.jsx)("code",{className:(0,T.cn)("flex-1 overflow-auto text-nowrap text-[0.8125rem] text-fd-muted-foreground",n.deprecated&&"line-through"),children:t})]}),apiExample:(0,w.jsx)(aC,{method:o,operation:n,pathItem:r})},{operation:n,method:o,pathItem:r,ctx:u});
3return e=(0,w.jsx)(ev,{defaultExampleId:n["x-exclusiveCodeSample"]??n["x-selectedCodeSample"],route:t,examples:j,children:e}),(n.servers||r.servers)&&(e=(0,w.jsx)(O,{servers:n.servers??r.servers,children:e})),e}}function a0({content:e,method:t,operation:n}){let r=C(),o=(0,v.useMemo)(()=>{if(e.schema&&r.generateTypeScriptDefinitions)return r.generateTypeScriptDefinitions(e.schema,{name:"RequestBody",readOnly:!1,writeOnly:!0,ctx:r})},[e.schema,r]);return o instanceof Promise&&(o=(0,v.use)(o)),(0,w.jsxs)(w.Fragment,{children:[o&&(0,w.jsx)(a7,{name:"request body",code:o,className:"my-4 last:mb-0"}),e.schema&&(0,w.jsx)(r.SchemaUI,{client:{name:"body",as:"body",required:r.schema.resolve(n.requestBody)?.required},root:e.schema,readOnly:"get"===t,writeOnly:"get"!==t})]})}function a1({status:e,operation:t}){let{schema:n}=C(),r=n.resolve(t.responses[e]),o=r.content?Object.entries(r.content):[],i=o.map(([e])=>({label:(0,w.jsx)("code",{className:"text-xs",children:e}),value:e}));return(0,w.jsx)(ag,{value:e,anchorSegments:["response",e],className:"data-[open]:border-b-0",children:(0,w.jsxs)(aD,{defaultValue:i[0]?.value,children:[(0,w.jsxs)(av,{children:[(0,w.jsx)(ay,{className:"font-mono",children:e}),1===i.length?(0,w.jsx)("p",{className:"text-fd-muted-foreground not-prose py-2",children:i[0].label}):i.length>0&&(0,w.jsx)(aF,{items:i,className:"my-1.5 py-1"})]}),(0,w.jsxs)(ax,{className:"ps-4.5 pe-3 border rounded-xl",children:[r.description&&(0,w.jsx)("div",{className:"prose-no-margin mt-3 mb-2",children:(0,w.jsx)(G,{md:r.description})}),o.map(([e,t])=>(0,w.jsx)(az,{value:e,anchorSegments:[e],children:(0,w.jsx)(a2,{item:n.resolve(t)})},e))]})]})})}function a2({item:{schema:e}}){let t=C(),n=(0,v.useMemo)(()=>{if(e&&t.generateTypeScriptDefinitions)return t.generateTypeScriptDefinitions(e,{name:"ResponseBody",readOnly:!0,writeOnly:!1,ctx:t})},[t,e]);return n instanceof Promise&&(n=(0,v.use)(n)),(0,w.jsxs)(w.Fragment,{children:[n&&(0,w.jsx)(a7,{name:"response body",code:n,className:"mb-2"}),e&&(0,w.jsx)(t.SchemaUI,{client:{name:"response",as:"body"},root:e,readOnly:!0})]})}function a4({scheme:e,scopes:t}){let n=(0,eN.useTranslations)({note:"security scheme"});return"http"===e.type||"oauth2"===e.type?(0,w.jsxs)(a5,{name:n("Authorization"),type:n("http"===e.type&&"basic"===e.scheme?"Basic <token>":"Bearer <token>"),deprecated:e.deprecated,scopes:t,children:[e.description&&(0,w.jsx)(G,{md:e.description}),(0,w.jsxs)("p",{children:[n("In"),": ",(0,w.jsx)("code",{children:"header"})]})]}):"apiKey"===e.type?(0,w.jsxs)(a5,{name:e.name,type:"<token>",deprecated:e.deprecated,scopes:t,children:[e.description&&(0,w.jsx)(G,{md:e.description}),(0,w.jsxs)("p",{children:[n("In"),": ",(0,w.jsx)("code",{children:e.in})]})]}):"openIdConnect"===e.type?(0,w.jsx)(a5,{name:n("OpenID Connect"),type:"<token>",deprecated:e.deprecated,scopes:t,children:e.description&&(0,w.jsx)(G,{md:e.description})}):void 0}function a5({name:e,type:t,deprecated:n=!1,scopes:r=[],className:o,...i}){let l=(0,eN.useTranslations)({note:"security scheme"});return(0,w.jsxs)("div",{className:(0,T.cn)("text-sm border-t my-4 first:border-t-0",o),children:[(0,w.jsxs)("div",{className:"flex flex-wrap items-center gap-3 not-prose",children:[(0,w.jsx)("span",{className:"font-medium font-mono text-fd-primary",children:e}),(0,w.jsx)("span",{className:"text-sm font-mono text-fd-muted-foreground",children:t}),n&&(0,w.jsx)(eh,{color:"red",className:"text-xs",children:l("Deprecated")})]}),(0,w.jsxs)("div",{className:"prose-no-margin pt-2.5 empty:hidden",children:[i.children,r.length>0&&(0,w.jsxs)("p",{children:[l("Scope"),": ",(0,w.jsx)("code",{children:r.join(", ")})]})]})]})}function a7({name:e,code:t,className:n}){let[r,o]=(0,aJ.useCopyButton)(()=>{navigator.clipboard.writeText(t)}),i=(0,eN.useTranslations)({note:"TypeScript definitions"});return(0,w.jsxs)("div",{className:(0,T.cn)("flex items-start justify-between gap-2 bg-fd-card text-fd-card-foreground border rounded-xl p-3 not-prose",n),children:[(0,w.jsxs)("div",{children:[(0,w.jsx)("p",{className:"font-medium text-sm mb-2",children:i("TypeScript Definitions")}),(0,w.jsx)("p",{className:"text-xs text-fd-muted-foreground",children:i("Use the {name} type in TypeScript.",{variables:{name:e}})})]}),(0,w.jsxs)("button",{onClick:o,className:(0,T.cn)((0,eA.buttonVariants)({color:"secondary",className:"p-2 gap-2",size:"sm"})),children:[r?(0,w.jsx)(a$,{className:"size-3.5"}):(0,w.jsx)(aP,{className:"size-3.5"}),i("Copy")]})]})}var a6=e.i(398181);let a3={label:"C#",lang:"csharp",generate(e,{mediaAdapters:t}){let n,r=[],o=new Set(["System","System.Net.Http","System.Text"]),i={...e.header};for(let i of(e.body&&e.bodyMediaType&&(n=(0,eg.resolveMediaAdapter)(e.bodyMediaType,t)?.generateExample(e,{lang:"csharp",addImport(e){o.add(e)}})),o))r.push(`using ${i};`);r.push(""),n&&r.push(n,""),r.push("var client = new HttpClient();");let l=[];function s(e,t){l.push(`client.DefaultRequestHeaders.Add("${e}", ${(0,a6.doubleQuote)(t)});`)}for(let e in i)s(e,i[e].value);Object.keys(e.cookie).length>0&&s("cookie",Object.entries(e.cookie).map(([e,t])=>`${e}=${t.value}`).join("; ")),r.push(...l);let a=e.method[0].toUpperCase()+e.method.slice(1).toLowerCase()+"Async";return n?r.push(`var response = await client.${a}("${e.url}", body);`):r.push(`var response = await client.${a}("${e.url}");`),r.push("var responseBody = await response.Content.ReadAsStringAsync();"),r.join("\n")}},a9={label:"cURL",lang:"bash",generate(e){let t=[];for(let n in t.push(`curl -X ${e.method.toUpperCase()} "${e.url}"`),e.header){let r=`${n}: ${e.header[n].value}`;
3t.push(`-H "${r}"`)}for(let n in e.cookie){let r=e.cookie[n];t.push(`--cookie ${(0,a6.doubleQuote)(`${n}=${r.value}`)}`)}if(e.body&&"multipart/form-data"===e.bodyMediaType){if("object"!=typeof e.body)throw Error("[CURL] request body must be an object.");for(let[n,r]of Object.entries(e.body))t.push(`-F ${n}=${(0,a6.doubleQuote)((0,a6.inputToString)(r))}`)}else if(e.body&&e.bodyMediaType){let n=(0,a6.singleQuote)((0,a6.inputToString)(e.body,e.bodyMediaType));t.push(`-H "Content-Type: ${e.bodyMediaType}"`),t.push(`-d ${n}`)}return t.flatMap((e,t)=>(0,a6.indent)(e,+(t>0))).join(" \\\n")}},a8={label:"Go",lang:"go",generate(e,{mediaAdapters:t}){let n,r=["fmt","net/http","io/ioutil"],o=new Map,i=new Map;for(let t in i.set("url",(0,a6.doubleQuote)(e.url)),e.header)o.set(t,(0,a6.doubleQuote)(e.header[t].value));let l=Object.entries(e.cookie);if(l.length>0&&o.set("Cookie",(0,a6.doubleQuote)(l.map(([e,t])=>`${e}=${t.value}`).join("; "))),e.body&&e.bodyMediaType){let i=(0,eg.resolveMediaAdapter)(e.bodyMediaType,t);o.set("Content-Type",`"${e.bodyMediaType}
3"`),n=i?.generateExample(e,{lang:"go",addImport(e){r.push(e)}})}return`package main
4
5import (
6${(0,a6.indent)(r.map(e=>`"${e}"`).join("\n"))}
7)
8
9func main() {
10${Array.from(i.entries()).map(([e,t])=>(0,a6.indent)(`${e} := ${t}`)).join("\n")}
11${n?(0,a6.indent)(n):""}
12  req, _ := http.NewRequest("${e.method.toUpperCase()}", url, ${n?"body":"nil"})
13${(0,a6.indent)(Array.from(o.entries()).map(([e,t])=>`req.Header.Add("${e}", ${t})`).join("\n"))}
14  res, _ := http.DefaultClient.Do(req)
15  defer res.Body.Close()
16  body, _ := ioutil.ReadAll(res.Body)
17
18  fmt.Println(res)
19  fmt.Println(string(body))
20}`}},ue={label:"Java",lang:"java",generate(e,{mediaAdapters:t}){let n,r=[],o={...e.header},i=new Set(["java.net.URI","java.net.http.HttpClient","java.net.http.HttpRequest","java.net.http.HttpResponse","java.net.http.HttpResponse.BodyHandlers","java.time.Duration"]);for(let o of(e.body&&e.bodyMediaType&&(n=(0,eg.resolveMediaAdapter)(e.bodyMediaType,t)?.generateExample(e,{lang:"java",addImport(e){i.add(e)}})),i.values()))r.push(`import ${o};`);for(let[t,i]of(r.push(""),n&&r.push(n),r.push("HttpClient client = HttpClient.newBuilder()"),r.push((0,a6.indent)(".connectTimeout(Duration.ofSeconds(10))")),r.push((0,a6.indent)(".build();")),r.push(""),r.push("HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()"),r.push((0,a6.indent)(`.uri(URI.create(${(0,a6.doubleQuote)(e.url)}))`)),Object.entries(o)))r.push((0,a6.indent)(`.header(${(0,a6.doubleQuote)(t)}, ${(0,a6.doubleQuote)(i.value)})`));e.bodyMediaType&&r.push((0,a6.indent)(`.header("Content-Type", "${e.bodyMediaType}")`));let l=Object.entries(e.cookie);if(l.length>0){let e=l.map(([e,t])=>`${e}=${t.value}`).join("; ");r.push((0,a6.indent)(`.header("Cookie", ${(0,a6.doubleQuote)(e)})`))}let s=n?"body":"";return r.push((0,a6.indent)(`.${e.method.toUpperCase()}(${s})`)),r.push((0,a6.indent)(".build();")),r.push(""),r.push("try {"),r.push((0,a6.indent)("HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());")),r.push((0,a6.indent)('System.out.println("Status code: " + response.statusCode());')),r.push((0,a6.indent)('System.out.println("Response body: " + response.body());')),r.push("} catch (Exception e) {"),r.push((0,a6.indent)("e.printStackTrace();")),r.push("}"),r.join("\n")}},ut={label:"JavaScript",lang:"js",generate(e,{mediaAdapters:t}){let n,r=[],o=new Map,i={};for(let[t,n]of(o.set("method",`"${e.method.toUpperCase()}"`),e.bodyMediaType&&(i["Content-Type"]=e.bodyMediaType),Object.entries(e.header)))i[t]=n.value;let l=Object.entries(e.cookie);l.length>0&&(i.cookie=l.map(([e,t])=>`${e}=${t.value}`).join("; ")),Object.keys(i).length>0&&o.set("headers",JSON.stringify(i,null,2)),e.body&&e.bodyMediaType&&(n=(0,eg.resolveMediaAdapter)(e.bodyMediaType,t)?.generateExample(e,{lang:"js",addImport(e,t){r.unshift(`import { ${t} } from "${e}"`)}})),n&&(r.push(n),o.set("body","body"));let s=[(0,a6.doubleQuote)(e.url)];if(o.size>0){let e=Array.from(o.entries()).map(([e,t])=>(0,a6.indent)(e===t?e:`${e}: ${t}`)).join(",\n");s.push(`{
21${e}
22}`)}return r.push(`fetch(${s.join(", ")})`),r.join("\n\n")}},un={label:"Python",lang:"python",generate(e,{mediaAdapters:t}){let n,r={},o=new Set,i=[`"${e.method.toUpperCase()}"`,"url"];if(o.add("requests"),e.body&&e.bodyMediaType){let o=(0,eg.resolveMediaAdapter)(e.bodyMediaType,t);r["Content-Type"]=e.bodyMediaType,(n=o?.generateExample(e,{lang:"python"}))&&i.push("data = body")}for(let[t,n]of Object.entries(e.header))r[t]=n.value;Object.keys(r).length>0&&i.push(`headers = ${ur(r,o)}`);let l=Object.entries(e.cookie);if(l.length>0){let e={};for(let[t,n]of l)e[t]=n.value;i.push(`cookies = ${ur(e,o)}`)}return`${Array.from(o).map(e=>"import "+e).join("\n")}
23
24url = ${(0,a6.doubleQuote)(e.url)}
25${n??""}
26response = requests.request(${i.join(", ")})
27
28print(response.text)`}};function ur(e,t){if(null===e)return"None";if("boolean"==typeof e)return e?"True":"False";if("string"==typeof e)return(0,a6.doubleQuote)(e);if("number"==typeof e)return e.toString();if(Array.isArray(e))return`[${e.map(e=>ur(e,t)).join(", ")}]`;else if(e instanceof Date)return t.add("datetime"),`datetime.datetime(${e.getFullYear()}, ${e.getMonth()+1}, ${e.getDate()}, ${e.getHours()}, ${e.getMinutes()}, ${e.getSeconds()}, ${e.getMilliseconds()})`;else if("object"==typeof e)return`{
29${Object.entries(e).map(([e,n])=>`  ${(0,a6.doubleQuote)(e)}: ${ur(n,t)}`).join(", \n")}
30}`;else throw Error(`Unsupported type: ${typeof e}`)}let uo={label:"Rust",lang:"rust",generate(e,{mediaAdapters:t}){let n,r=new Map;for(let t in e.header)r.set(t,(0,a6.doubleQuote)(e.header[t].value));let o=Object.entries(e.cookie);if(o.length>0&&r.set("Cookie",(0,a6.doubleQuote)(o.map(([e,t])=>`${e}=${t.value}`).join("; "))),e.body&&e.bodyMediaType){let o=(0,eg.resolveMediaAdapter)(e.bodyMediaType,t);r.set("Content-Type",`"${e.bodyMediaType}"`),n=o?.generateExample(e,{lang:"rust"})}return`use reqwest::{Result, Client};
31
32async fn main() -> Result<()> {
33  let client = Client::new();
34
35  let url = "${e.url}";
36${n?(0,a6.indent)(n)+"\n":""}
37  let res = client
38    .${e.method.toLowerCase()}(url)
39${r.size<=0?"":(0,a6.indent)(Array.from(r.entries()).map(([e,t])=>`  .header("${e}", ${t})`).join("\n"))+"\n"}${n?"    .body(body)\n":""}    .send()
40    .await?
41    .text()
42    .await?;
43
44  println!("{}", res);
45  Ok(())
46}`}};var ui=e.i(496481),ul=e.i(420061),us=e.i(997803),ua=e.i(733644),uu=e.i(457579);let uc="phrasing",ud=["autolink","link","image","label"];function uf(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function up(e){this.config.enter.autolinkProtocol.call(this,e)}function uh(e){this.config.exit.autolinkProtocol.call(this,e)}function um(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];(0,ul.ok)("link"===t.type),t.url="http://"+this.sliceSerialize(e)}function ug(e){this.config.exit.autolinkEmail.call(this,e)}function ux(e){this.exit(e)}function uv(e){!function(e,t,n){let r=(0,uu.convert)((n||{}).ignore||[]),o=function(e){let t=[];if(!Array.isArray(e))throw TypeError("Expected find and replace tuple or list of tuples");let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){var o;let e=n[r];t.push(["string"==typeof(o=e[0])?RegExp(function(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(o),"g"):o,function(e){return"function"==typeof e?e:function(){return e}}(e[1])])}return t}(t),i=-1;for(;++i<o.length;)(0,ua.visitParents)(e,"text",l);function l(e,t){let n,l=-1;for(;++l<t.length;){let e=t[l],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){let n=t[t.length-1],r=o[i][0],l=o[i][1],s=0,a=n.children.indexOf(e),u=!1,c=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,o={index:d.index,input:d.input,stack:[...t,e]},i=l(...d,o);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(s!==n&&c.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(i)?c.push(...i):i&&c.push(i),s=n+d[0].length,u=!0),!r.global)break;d=r.exec(e.value)}return u?(s<e.value.length&&c.push({type:"text",value:e.value.slice(s)}),n.children.splice(a,1,...c)):c=[e],a+c.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,uy],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,ub]],{ignore:["link","linkReference"]})}function uy(e,t,n,r,o){let i,l="";if(!uw(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",l="http://"),(i=n.split(".")).length<2||i[i.length-1]&&(/_/.test(i[i.length-1])||!/[a-zA-Z\d]/.test(i[i.length-1]))||i[i.length-2]&&(/_/.test(i[i.length-2])||!/[a-zA-Z\d]/.test(i[i.length-2])))return!1;let s=function(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")"),o=(0,ui.ccount)(e,"("),i=(0,ui.ccount)(e,")");for(;-1!==r&&o>i;)e+=n.slice(0,r+1),r=(n=n.slice(r+1)).indexOf(")"),i++;return[e,n]}(n+r);if(!s[0])return!1;let a={type:"link",title:null,url:l+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function ub(e,t,n,r){return!(!uw(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function uw(e,t){let n=e.input.charCodeAt(e.index-1);return(0===e.index||(0,us.unicodeWhitespace)(n)||(0,us.unicodePunctuation)(n))&&(!t||47!==n)}var uj=e.i(431745);function uk(){this.buffer()}function uC(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function uS(){this.buffer()}function uE(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function uO(e){let t=this.resume(),n=this.stack[this.stack.length-1];(0,ul.ok)("footnoteReference"===n.type),n.identifier=(0,uj.normalizeIdentifier)(this.sliceSerialize(e)).toLowerCase(),n.label=t}function uN(e){this.exit(e)}function uT(e){let t=this.resume(),n=this.stack[this.stack.length-1];(0,ul.ok)("footnoteDefinition"===n.type),n.identifier=(0,uj.normalizeIdentifier)(this.sliceSerialize(e)).toLowerCase(),n.label=t}function uA(e){this.exit(e)}function uM(e,t,n,r){let o=n.createTracker(r),i=o.move("[^"),l=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),l(),i+=o.move("]")}function uR(e,t,n){return 0===t?e:uI(e,t,n)}function uI(e,t,n){return(n?"":"    ")+e}uM.peek=function(){return"["};let u$=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function uP(e){this.enter({type:"delete",children:[]},e)}function uL(e){this.exit(e)}function uD(e,t,n,r){let o=n.createTracker(r),i=n.enter("strikethrough"),l=o.move("~~");return l+=n.containerPhrasing(e,{...o.current(),before:l,after:"~"}),l+=o.move("~~"),i(),l}function uz(e){return e.length}function uF(e){let t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:114*(82===t||114===t)}uD.peek=function(){return"~"};var uU=e.i(583664),uU=uU;function uH(e){let t=e._align;(0,ul.ok)(t,"expected `_align` on table"),this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function u_(e){this.exit(e),this.data.inTable=void 0}function uB(e){this.enter({type:"tableRow",children:[]},e)}function uV(e){this.exit(e)}function uW(e){this.enter({type:"tableCell",children:[]},e)}function uq(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,uG));let n=this.stack[this.stack.length-1];(0,ul.ok)("inlineCode"===n.type),n.value=t,this.exit(e)}function uG(e,t){return"|"===t?t:e}var uU=uU;function uK(e){let t=this.stack[this.stack.length-2];(0,ul.ok)("listItem"===t.type),t.checked="taskListCheckValueChecked"===e.type}function uY(e){let t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){let e=this.stack[this.stack.length-1];(0,ul.ok)("paragraph"===e.type);let n=e.children[0];if(n&&"text"===n.type){let r,o=t.children,i=-1;for(;++i<o.length;){let e=o[i];if("paragraph"===e.type){r=e;break}}r===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function uZ(e,t,n,r){let o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,l="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(l);let a=uU.handle.listItem(e,t,n,{...r,...s.current()});return i&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+l})),a}var uJ=e.i(506687);let uX={tokenize:function(e,t,n){let r=0;return function t(i){return(87===i||119===i)&&r<3?(r++,e.consume(i),t):46===i&&3===r?(e.consume(i),o):n(i)};function o(e){return null===e?n(e):t(e)}},partial:!0},uQ={tokenize:function(e,t,n){let r,o,i;return l;function l(t){return 46===t||95===t?e.check(u1,a,s)(t):null===t||(0,us.markdownLineEndingOrSpace)(t)||(0,us.unicodeWhitespace)(t)||45!==t&&(0,us.unicodePunctuation)(t)?a(t):(i=!0,e.consume(t),l)}function s(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),l}function a(e){return o||r||!i?n(e):t(e)}},partial:!0},u0={tokenize:function(e,t){let n=0,r=0;return o;
46function o(l){return 40===l?(n++,e.consume(l),o):41===l&&r<n?i(l):33===l||34===l||38===l||39===l||41===l||42===l||44===l||46===l||58===l||59===l||60===l||63===l||93===l||95===l||126===l?e.check(u1,t,i)(l):null===l||(0,us.markdownLineEndingOrSpace)(l)||(0,us.unicodeWhitespace)(l)?t(l):(e.consume(l),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},u1={tokenize:function(e,t,n){return r;function r(l){return 33===l||34===l||39===l||41===l||42===l||44===l||46===l||58===l||59===l||63===l||95===l||126===l?(e.consume(l),r):38===l?(e.consume(l),i):93===l?(e.consume(l),o):60===l||null===l||(0,us.markdownLineEndingOrSpace)(l)||(0,us.unicodeWhitespace)(l)?t(l):n(l)}function o(e){return null===e||40===e||91===e||(0,us.markdownLineEndingOrSpace)(e)||(0,us.unicodeWhitespace)(e)?t(e):r(e)}function i(t){return(0,us.asciiAlpha)(t)?function t(o){return 59===o?(e.consume(o),r):(0,us.asciiAlpha)(o)?(e.consume(o),t):n(o)}(t):n(t)}},partial:!0},u2={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return(0,us.asciiAlphanumeric)(e)?n(e):t(e)}},partial:!0},u4={name:"wwwAutolink",tokenize:function(e,t,n){let r=this;return function(t){return 87!==t&&119!==t||!u9.call(r,r.previous)||cn(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(uX,e.attempt(uQ,e.attempt(u0,o),n),n)(t))};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:u9},u5={name:"protocolAutolink",tokenize:function(e,t,n){let r=this,o="",i=!1;return function(t){return(72===t||104===t)&&u8.call(r,r.previous)&&!cn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),l):n(t)};function l(t){if((0,us.asciiAlpha)(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),l;if(58===t){let n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),i)?a:(i=!0,s):n(t)}function a(t){return null===t||(0,us.asciiControl)(t)||(0,us.markdownLineEndingOrSpace)(t)||(0,us.unicodeWhitespace)(t)||(0,us.unicodePunctuation)(t)?n(t):e.attempt(uQ,e.attempt(u0,u),n)(t)}function u(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:u8},u7={name:"emailAutolink",tokenize:function(e,t,n){let r,o,i=this;return function(t){return!ct(t)||!ce.call(i,i.previous)||cn(i.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),function t(r){return ct(r)?(e.consume(r),t):64===r?(e.consume(r),l):n(r)}(t))};function l(t){return 46===t?e.check(u2,a,s)(t):45===t||95===t||(0,us.asciiAlphanumeric)(t)?(o=!0,e.consume(t),l):a(t)}function s(t){return e.consume(t),r=!0,l}function a(l){return o&&r&&(0,us.asciiAlpha)(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(l)):n(l)}},previous:ce},u6={},u3=48;for(;u3<123;)u6[u3]=u7,58==++u3?u3=65:91===u3&&(u3=97);function u9(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||(0,us.markdownLineEndingOrSpace)(e)}function u8(e){return!(0,us.asciiAlpha)(e)}function ce(e){return!(47===e||ct(e))}function ct(e){return 43===e||45===e||46===e||95===e||(0,us.asciiAlphanumeric)(e)}function cn(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}u6[43]=u7,u6[45]=u7,u6[46]=u7,u6[95]=u7,u6[72]=[u7,u5],u6[104]=[u7,u5],u6[87]=[u7,u4],u6[119]=[u7,u4];var cr=e.i(653161),co=e.i(204108);let ci={tokenize:function(e,t,n){let r=this;return(0,co.factorySpace)(e,function(e){let o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function cl(e,t,n){let r,o=this,i=o.events.length,l=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);for(;i--;){let e=o.events[i][1];if("labelImage"===e.type){r=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!r||!r._balanced)return n(i);let s=(0,uj.normalizeIdentifier)(o.sliceSerialize({start:r.end,end:o.now()}));return 94===s.codePointAt(0)&&l.includes(s.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)):n(i)}}function cs(e,t){let n=e.length;for(;n--;
46)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";let r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function ca(e,t,n){let r,o=this,i=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]),l=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",a)}function a(s){if(l>999||93===s&&!r||null===s||91===s||(0,us.markdownLineEndingOrSpace)(s))return n(s);if(93===s){e.exit("chunkString");let r=e.exit("gfmFootnoteCallString");return i.includes((0,uj.normalizeIdentifier)(o.sliceSerialize(r)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return(0,us.markdownLineEndingOrSpace)(s)||(r=!0),l++,e.consume(s),92===s?u:a}function u(t){return 91===t||92===t||93===t?(e.consume(t),l++,a):a(t)}}function cu(e,t,n){let r,o,i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),a};function a(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(t)}function u(t){if(s>999||93===t&&!o||null===t||91===t||(0,us.markdownLineEndingOrSpace)(t))return n(t);if(93===t){e.exit("chunkString");let n=e.exit("gfmFootnoteDefinitionLabelString");return r=(0,uj.normalizeIdentifier)(i.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return(0,us.markdownLineEndingOrSpace)(t)||(o=!0),s++,e.consume(t),92===t?c:u}function c(t){return 91===t||92===t||93===t?(e.consume(t),s++,u):u(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),l.includes(r)||l.push(r),(0,co.factorySpace)(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return t(e)}}function cc(e,t,n){return e.check(cr.blankLine,t,e.attempt(ci,t,n))}function cd(e){e.exit("gfmFootnoteDefinition")}var cf=e.i(938402),cp=e.i(682523),ch=e.i(810291);class cm{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0!==n||0!==r.length){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length,n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}}function cg(e,t,n){let r,o=this,i=0,l=0;return function(e){let t=o.events.length-1;for(;t>-1;){let e=o.events[t][1].type;if("lineEnding"===e||"linePrefix"===e)t--;else break}let r=t>-1?o.events[t][1].type:null,i="tableHead"===r||"tableRow"===r?v:s;return i===v&&o.parser.lazy[o.now().line]?n(e):i(e)};function s(t){var n;return e.enter("tableHead"),e.enter("tableRow"),124===(n=t)||(r=!0,l+=1),a(n)}function a(t){return null===t?n(t):(0,us.markdownLineEnding)(t)?l>1?(l=0,o.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):(0,us.markdownSpace)(t)?(0,co.factorySpace)(e,a,"whitespace")(t):(l+=1,r&&(r=!1,i+=1),124===t)?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,a):(e.enter("data"),u(t))}function u(t){return null===t||124===t||(0,us.markdownLineEndingOrSpace)(t)?(e.exit("data"),a(t)):(e.consume(t),92===t?c:u)}function c(t){return 92===t||124===t?(e.consume(t),u):u(t)}function d(t){return(o.interrupt=!1,o.parser.lazy[o.now().line])?n(t):(e.enter("tableDelimiterRow"),r=!1,(0,us.markdownSpace)(t))?(0,co.factorySpace)(e,f,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):f(t)}
46function f(t){return 45===t||58===t?h(t):124===t?(r=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):n(t)}function p(t){return(0,us.markdownSpace)(t)?(0,co.factorySpace)(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(l+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(l+=1,m(t)):null===t||(0,us.markdownLineEnding)(t)?x(t):n(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),function t(n){return 45===n?(e.consume(n),t):58===n?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(n),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(n))}(t)):n(t)}function g(t){return(0,us.markdownSpace)(t)?(0,co.factorySpace)(e,x,"whitespace")(t):x(t)}function x(o){if(124===o)return f(o);if(null===o||(0,us.markdownLineEnding)(o))return r&&i===l?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(o)):n(o);return n(o)}function v(t){return e.enter("tableRow"),y(t)}function y(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),y):null===n||(0,us.markdownLineEnding)(n)?(e.exit("tableRow"),t(n)):(0,us.markdownSpace)(n)?(0,co.factorySpace)(e,y,"whitespace")(n):(e.enter("data"),b(n))}function b(t){return null===t||124===t||(0,us.markdownLineEndingOrSpace)(t)?(e.exit("data"),y(t)):(e.consume(t),92===t?w:b)}function w(t){return 92===t||124===t?(e.consume(t),b):b(t)}}function cx(e,t){let n,r,o,i=-1,l=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f=new cm;for(;++i<e.length;){let p=e[i],h=p[1];"enter"===p[0]?"tableHead"===h.type?(c=!1,0!==d&&(cy(f,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(l=!0,o=void 0,a=[0,0,0,0],u=[0,i+1,0,0],c&&(c=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):s&&("data"===h.type||"tableDelimiterMarker"===h.type||"tableDelimiterFiller"===h.type)?(l=!1,0===u[2]&&(0!==a[1]&&(u[0]=u[1],o=cv(f,t,a,s,void 0,o),a=[0,0,0,0]),u[2]=i)):"tableCellDivider"===h.type&&(l?l=!1:(0!==a[1]&&(u[0]=u[1],o=cv(f,t,a,s,void 0,o)),u=[(a=u)[1],i,0,0])):"tableHead"===h.type?(c=!0,d=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=i,0!==a[1]?(u[0]=u[1],o=cv(f,t,a,s,i,o)):0!==u[1]&&(o=cv(f,t,u,s,i,o)),s=0):s&&("data"===h.type||"tableDelimiterMarker"===h.type||"tableDelimiterFiller"===h.type)&&(u[3]=i)}for(0!==d&&cy(f,t,d,n,r),f.consume(t.events),i=-1;++i<t.events.length;){let e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=function(e,t){let n=!1,r=[];for(;t<e.length;){let o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){let e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}(t.events,i))}return e}function cv(e,t,n,r,o,i){0!==n[0]&&(i.end=Object.assign({},cb(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));let l=cb(t.events,n[1]);if(i={type:1===r?"tableHeader":2===r?"tableDelimiter":"tableData",start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){let o=cb(t.events,n[2]),i=cb(t.events,n[3]),l={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",l,t]]),2!==r){let r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",l,t]])}return void 0!==o&&(i.end=Object.assign({},cb(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function cy(e,t,n,r,o){let i=[],l=cb(t.events,n);o&&(o.end=Object.assign({},l),i.push(["exit",o,t])),r.end=Object.assign({},l),i.push(["exit",r,t]),e.add(n+1,0,i)}function cb(e,t){let n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}let cw={name:"tasklistCheck",tokenize:function(e,t,n){let r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o):n(t)};function o(t){return(0,us.markdownLineEndingOrSpace)(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),i):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),i):n(t)}function i(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(t)}function l(r){return(0,us.markdownLineEnding)(r)?t(r):(0,us.markdownSpace)(r)?e.check({tokenize:cj},t,n)(r):n(r)}}};function cj(e,t,n){return(0,co.factorySpace)(e,function(e){return null===e?n(e):t(e)},"whitespace")}let ck={};function cC(e){var t;let n,r,o,i=e||ck,l=this.data(),s=l.micromarkExtensions||(l.micromarkExtensions=[]),a=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),u=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);s.push((t=i,(0,uJ.combineExtensions)([{text:u6},{document:{91:{name:"gfmFootnoteDefinition",tokenize:cu,continuation:{tokenize:cc},exit:cd}},text:{91:{name:"gfmFootnoteCall",tokenize:ca},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:cl,resolveTo:cs}}},(n=(t||{}).singleTilde,r={name:"strikethrough",tokenize:function(e,t,r){let o=this.previous,i=this.events,l=0;return function(s){return 126===o&&"characterEscape"!==i[i.length-1][1].type?r(s):(e.enter("strikethroughSequenceTemporary"),function i(s){let a=(0,cp.classifyC
46haracter)(o);if(126===s)return l>1?r(s):(e.consume(s),l++,i);if(l<2&&!n)return r(s);let u=e.exit("strikethroughSequenceTemporary"),c=(0,cp.classifyCharacter)(s);return u._open=!c||2===c&&!!a,u._close=!a||2===a&&!!c,t(s)}(s))}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";let o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},i={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},l=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],s=t.parser.constructs.insideSpan.null;s&&(0,cf.splice)(l,l.length,0,(0,ch.resolveAll)(s,e.slice(r+1,n),t)),(0,cf.splice)(l,l.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),(0,cf.splice)(e,r-1,n-r+3,l),n=r+l.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}},null==n&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}}),{flow:{null:{name:"table",tokenize:cg,resolveAll:cx}}},{text:{91:cw}}]))),a.push([{transforms:[uv],enter:{literalAutolink:uf,literalAutolinkEmail:up,literalAutolinkHttp:up,literalAutolinkWww:up},exit:{literalAutolink:ux,literalAutolinkEmail:ug,literalAutolinkHttp:uh,literalAutolinkWww:um}},{enter:{gfmFootnoteCallString:uk,gfmFootnoteCall:uC,gfmFootnoteDefinitionLabelString:uS,gfmFootnoteDefinition:uE},exit:{gfmFootnoteCallString:uO,gfmFootnoteCall:uN,gfmFootnoteDefinitionLabelString:uT,gfmFootnoteDefinition:uA}}
46,{canContainEols:["delete"],enter:{strikethrough:uP},exit:{strikethrough:uL}},{enter:{table:uH,tableData:uW,tableHeader:uW,tableRow:uB},exit:{codeText:uq,table:u_,tableData:uV,tableHeader:uV,tableRow:uV}},{exit:{taskListCheckValueChecked:uK,taskListCheckValueUnchecked:uK,paragraph:uY}}]),u.push({extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:uc,notInConstruct:ud},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:uc,notInConstruct:ud},{character:":",before:"[ps]",after:"\\/",inConstruct:uc,notInConstruct:ud}]},(o=!1,i&&i.firstLineBlank&&(o=!0),{handlers:{footnoteDefinition:function(e,t,n,r){let i=n.createTracker(r),l=i.move("[^"),s=n.enter("footnoteDefinition"),a=n.enter("label");return l+=i.move(n.safe(n.associationId(e),{before:l,after:"]"})),a(),l+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),l+=i.move((o?"\n":" ")+n.indentLines(n.containerFlow(e,i.current()),o?uI:uR))),s(),l},footnoteReference:uM},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:u$}],handlers:{delete:uD}},function(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[	 :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=uU.handle.inlineCode(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return s(function(e,t,n){let r=e.children,o=-1,i=[],l=t.enter("table");for(;++o<r.length;)i[o]=a(r[o],t,n);return l(),i}(e,n,r),e.align)},tableCell:l,tableRow:function(e,t,n,r){let o=s([a(e,n,r)]);return o.slice(0,o.indexOf("\n"))}}};function l(e,t,n,r){let o=n.enter("tableCell"),l=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:i,after:i});return l(),o(),s}function s(e,t){return function(e,t){let n=t||{},r=(n.align||[]).concat(),o=n.stringLength||uz,i=[],l=[],s=[],a=[],u=0,c=-1;for(;++c<e.length;){let t=[],r=[],i=-1;for(e[c].length>u&&(u=e[c].length);++i<e[c].length;){var d;let l=null==(d=e[c][i])?"":String(d);if(!1!==n.alignDelimiters){let e=o(l);r[i]=e,(void 0===a[i]||e>a[i])&&(a[i]=e)}t.push(l)}l[c]=t,s[c]=r}let f=-1;if("object"==typeof r&&"length"in r)for(;++f<u;)i[f]=uF(r[f]);else{let e=uF(r);for(;++f<u;)i[f]=e}f=-1;let p=[],h=[];for(;++f<u;){let e=i[f],t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,a[f]-t.length-r.length),l=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&((o=t.length+o+r.length)>a[f]&&(a[f]=o),h[f]=o),p[f]=l}l.splice(1,0,p),s.splice(1,0,h),c=-1;let m=[];for(;++c<l.length;){let e=l[c],t=s[c];f=-1;let r=[];for(;++f<u;){let o=e[f]||"",l="",s="";if(!1!==n.alignDelimiters){let e=a[f]-(t[f]||0),n=i[f];114===n?l=" ".repeat(e):99===n?e%2?(l=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):s=l=" ".repeat(e/2):s=" ".repeat(e)}!1===n.delimiterStart||f||r.push("|"),!1!==n.padding&&(!1!==n.alignDelimiters||""!==o)&&(!1!==n.delimiterStart||f)&&r.push(" "),!1!==n.alignDelimiters&&r.push(l),r.push(o),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),(!1!==n.delimiterEnd||f!==u-1)&&r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function a(e,t,n){let r=e.children,o=-1,i=[],s=t.enter("tableRow");for(;++o<r.length;)i[o]=l(r[o],e,t,n);return s(),i}}(i),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:uZ}}]})}var cS=e.i(647873),cE=e.i(224110);let cO={CodeBlockTab:A.CodeBlockTab,CodeBlockTabs:A.CodeBlockTabs,CodeBlockTabsList:A.CodeBlockTabsList,CodeBlockTabsTrigger:A.CodeBlockTabsTrigger,pre:e=>(0,w.jsx)(A.CodeBlock,{...e,children:(0,w.jsx)(A.Pre,{children:e.children})}),Card:function({icon:e,title:t,description:n,...r}){return(0,w.jsxs)(r.href?cS.default:"div",{...r,"data-card":!0,className:(0,T.cn)("block rounded-xl border bg-fd-card p-4 text-fd-card-foreground transition-colors @max-lg:col-span-full",r.href&&"hover:bg-fd-accent/80",r.className),children:[e?(0,w.jsx)("div",{className:"not-prose mb-2 w-fit shadow-md rounded-lg border bg-fd-muted p-1.5 text-fd-muted-foreground [&_svg]:size-4",children:e}):null,(0,w.jsx)("h3",{className:"not-prose mb-1 text-sm font-medium",children:t}),n?(0,w.jsx)("p",{className:"my-0! text-sm text-fd-muted-foreground",children:n}):null,(0,w.jsx)("div",{className:"text-sm text-fd-muted-foreground prose-no-margin empty:hidden",children:r.children})]})},Cards:function(e){return(0,w.jsx)("div",{...e,className:(0,T.cn)("grid grid-cols-2 gap-3 @container",e.className),children:e.children})},a:cS.default,img:function(e){return(0,w.jsx)(cE.Image,{sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 70vw, 900px",...e,className:(0,T.cn)("rounded-lg",e.className)})},h1:e=>(0,w.jsx)(aR.Heading,{as:"h1",...e}),h2:e=>(0,w.jsx)(aR.Heading,{as:"h2",...e}
46),h3:e=>(0,w.jsx)(aR.Heading,{as:"h3",...e}),h4:e=>(0,w.jsx)(aR.Heading,{as:"h4",...e}),h5:e=>(0,w.jsx)(aR.Heading,{as:"h5",...e}),h6:e=>(0,w.jsx)(aR.Heading,{as:"h6",...e}),table:function(e){return(0,w.jsx)("div",{className:"relative overflow-auto prose-no-margin my-6",children:(0,w.jsx)("table",{...e})})},Callout:aG,CalloutContainer:aK,CalloutTitle:aY,CalloutDescription:aZ};var cN=e.i(90283),cT=e.i(878999);let cA=/^[A-Za-z_$][A-Za-z0-9_$]*$/;function cM(e){return cA.test(e)?e:JSON.stringify(e)}function cR(e){if(null===e)return"null";switch(typeof e){case"string":return JSON.stringify(e);case"number":case"boolean":return String(e);case"object":{if(Array.isArray(e))return`[${e.map(cR).join(", ")}]`;let t=Object.entries(e);if(0===t.length)return"Record<string, never>";return`{ ${t.map(([e,t])=>`${cM(e)}: ${cR(t)}`).join("; ")} }`}default:return"unknown"}}function cI(e){let t="";for(let n of e)t=0===t.length?n:`${t} | ${n}`;return 0===t.length?"never":t}function c$(e){let t,n=0;for(let r=0;r<e.length;r++){let o=e[r];if(void 0!==t){"\\"===o?r++:o===t&&(t=void 0);continue}switch(o){case'"':case"'":t=o;break;case"{":case"[":case"(":case"<":n++;break;case"}":case"]":case")":case">":n--;break;case"|":case"&":if(0===n)return!0}}return!1}function cP(e){return c$(e)?`(${e})`:e}function cL(e,t,n){if("object"!=typeof e||null===e)return;let r=[];n&&"string"==typeof e.title&&e.title.length>0&&r.push(e.title),"string"==typeof e.description&&e.description.length>0&&r.push(...e.description.split("\n"));let o=[];if(!0===e.deprecated&&o.push("@deprecated"),void 0!==e.default&&o.push(`@default ${JSON.stringify(e.default)}`),Array.isArray(e.examples))for(let t of e.examples)o.push(`@example ${JSON.stringify(t)}`);if(0===r.length&&0===o.length)return;o.length>0&&(r.length>0&&r.push(""),r.push(...o));let i=r.map(e=>e.replaceAll("*/","*\\/"));return 1===i.length?`${t}/** ${i[0]} */`:`${t}/**
47${i.map(e=>`${t} *${e.length>0?` ${e}`:""}`).join("\n")}
48${t} */`}var cD=class{root;names=new Map;usedNames=new Set;declarations=[];interfaceLike=new WeakMap;INDENT;includeReadOnly;includeWriteOnly;constructor(e,t){this.root=e,this.INDENT=t.tab??"  ",this.includeReadOnly=t.readOnly??!1,this.includeWriteOnly=t.writeOnly??!1}emitAll(){let e=[];for(let t=0;t<this.declarations.length;t++)e.push(this.emitDeclaration(this.declarations[t]));return`${e.join("\n\n")}
49`}claimName(e){let t=e,n=2;for(;this.usedNames.has(t);)t=`${e}${n++}`;return this.usedNames.add(t),t}declare(e,t){let n=this.names.get(e);if(void 0!==n)return n;let r=this.claimName(t);return this.names.set(e,r),this.declarations.push({name:r,schema:e}),r}expressionFor(e,t){return"boolean"==typeof e?e?"unknown":"never":this.names.get(e)??this.intersectionOf(this.typeParts(e,t))}typeParts(e,t){let n=[];if("string"==typeof e.$ref&&n.push(new Set([this.refExpression(e.$ref,e)])),"string"==typeof e.$dynamicRef&&n.push(new Set([this.refExpression(e.$dynamicRef,e)])),Array.isArray(e.allOf))for(let r of e.allOf)n.push(new Set([this.expressionFor(r,t)]));let r=this.ownType(e,t);for(let o of(void 0!==r&&n.push(r),[e.anyOf,e.oneOf]))Array.isArray(o)&&o.length>0&&n.push(this.unionOf(o,t));void 0!==e.if&&void 0!==e.then&&void 0!==e.else&&n.push(this.unionOf([e.then,e.else],t));let o=n.filter(e=>!(1===e.size&&e.has("unknown")));return o.length>0?o:n.slice(0,1)}intersectionOf(e){return 0===e.length?"unknown":1===e.length?cI(e[0]):e.map(e=>{let t=cI(e);return e.size>1||c$(t)?`(${t})`:t}).join(" & ")}unionOf(e,t){let n=new Set;for(let r of e){let e=this.expressionFor(r,t);if("unknown"===e)return new Set(["unknown"]);n.add(e)}return n}ownType(e,t){let n,r=new Set;if(void 0!==e.const)return r.add(cR(e.const)),r;if(Array.isArray(e.enum)){if(0===e.enum.length)return r.add("never"),r;for(let t of e.enum)r.add(cR(t));return r}if("string"==typeof e.type)n=[e.type];else if(Array.isArray(e.type))n=e.type;else if(n=[],(void 0!==e.properties||void 0!==e.patternProperties||void 0!==e.additionalProperties)&&n.push("object"),(void 0!==e.items||void 0!==e.prefixItems)&&n.push("array"),0===n.length)return;for(let o of n)r.add(this.namedType(o,e,t));return r}namedType(e,t,n){switch(e){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"object":return this.objectType(t,n);case"array":return this.arrayType(t,n);default:return"unknown"}}keepsProperty(e){return"object"!=typeof e||null===e||(!0===e.readOnly?this.includeReadOnly:!0!==e.writeOnly||this.includeWriteOnly)}objectType(e,t){let n=e.properties&&"object"==typeof e.properties?Object.entries(e.properties).filter(([,e])=>this.keepsProperty(e)):[],r=e.patternProperties&&"object"==typeof e.patternProperties?Object.values(e.patternProperties):[],o=e.additionalProperties,i=t+this.INDENT,l=new Set;for(let e of r)l.add(this.expressionFor(e,i));if(!0===o?l.add("unknown"):"object"==typeof o&&l.add(this.expressionFor(o,i)),0===n.length)return l.size>0?`Record<string, ${cI(l)}>`:!1===o?"Record<string, never>":"Record<string, unknown>";let s=new Set(e.required),a=l.size>0,u=[],c=!1;for(let[e,t]of n){let n=cL(t,i,!0);void 0!==n&&(u.length>0&&u.push(""),u.push(n));let r="object"==typeof t&&null!==t&&!0===t.readOnly?"readonly ":"",o=s.has(e)?"":"?";o&&(c=!0);let d=this.expressionFor(t,i);a&&l.add(d),u.push(`${i}${r}${cM(e)}${o}: ${d};`)}return a&&(c&&l.add("undefined"),u.push(`${i}[key: string]: ${l.has("unknown")?"unknown":cI(l)};`)),`{
50${u.join("\n")}
51${t}}`}arrayType(e,t){let n=e.items;if(Array.isArray(e.prefixItems)&&e.prefixItems.length>0){let r=e.prefixItems.map(e=>this.expressionFor(e,t));if(!1!==n){let e=void 0===n||!0===n?"unknown":this.expressionFor(n,t);r.push(`...${cP(e)}[]`)}return`[${r.join(", ")}]`}return void 0===n||!0===n?"unknown[]":!1===n?"never[]":`${cP(this.expressionFor(n,t))}[]`}emitDeclaration(e){let t,{name:n,schema:r}=e,o=cL(r,"",!1);if("boolean"==typeof r)t=`export type ${n} = ${r?"unknown":"never"};`;else if(this.isInterfaceLike(r)){let e=Array.isArray(r.allOf)?r.allOf.map(e=>this.refExpression(e.$ref,e)):[];
51t=`export interface ${n}${e.length>0?` extends ${e.join(", ")}`:""} ${this.objectType(r,"")}`}else{let e=this.typeParts(r,""),o=1===e.length?e[0]:void 0;t=void 0!==o&&o.size>1&&(o.size>2||cI(o).length>70)?`export type ${n} =
52${Array.from(o,e=>`${this.INDENT}| ${e}`).join("\n")};`:`export type ${n} = ${this.intersectionOf(e)};`}return void 0!==o?`${o}
53${t}`:t}isInterfaceLike(e,t=new Set){let n=this.interfaceLike.get(e);if(void 0!==n)return n;if(t.has(e))return!1;t.add(e);let r=this.computeInterfaceLike(e,t);return this.interfaceLike.set(e,r),r}computeInterfaceLike(e,t){return void 0===e.$ref&&void 0===e.$dynamicRef&&void 0===e.const&&void 0===e.enum&&void 0===e.anyOf&&void 0===e.oneOf&&("string"==typeof e.type?"object"===e.type:void 0===e.type)&&!!e.properties&&!!Object.values(e.properties).some(e=>this.keepsProperty(e))&&(void 0===e.allOf||!!Array.isArray(e.allOf)&&e.allOf.every(e=>this.isExtendableRef(e,t)))}};let cz="schema://local/schema.json",cF=new Map([["additionalProperties","one"],["contains","one"],["propertyNames","one"],["if","one"],["then","one"],["else","one"],["not","one"],["items","one"],["unevaluatedItems","one"],["unevaluatedProperties","one"],["contentSchema","one"],["allOf","list"],["anyOf","list"],["oneOf","list"],["prefixItems","list"],["$defs","map"],["definitions","map"],["properties","map"],["patternProperties","map"],["dependentSchemas","map"]]);var cU=class{rootUri;resources=new Map;anchors=new Map;bases=new WeakMap;resolutions=new Map;constructor(e){this.rootUri="object"==typeof e&&"string"==typeof e.$id?c_(cH(e.$id,cz)):cz,this.resources.set(this.rootUri,e),this.walk(e,this.rootUri)}baseUri(e){return this.bases.get(e)??this.rootUri}resolve(e,t){let n=this.resolutions.get(t);void 0===n&&(n=new Map,this.resolutions.set(t,n));let r=n.get(e);return void 0===r&&(r=this.resolveNew(e,t),n.set(e,r)),r}resolveNew(e,t){let n=cH(e,t),r=n.indexOf("#"),o=-1===r?n:n.slice(0,r),i=-1===r?"":n.slice(r+1);if(i.length>0&&!i.startsWith("/")){let t=this.anchors.get(`${o}#${decodeURIComponent(i)}`);if(void 0===t)throw Error(`Cannot resolve $ref "${e}": unknown anchor "${i}".`);return t}let l=this.resources.get(o);if(void 0===l)throw Error(`Cannot resolve $ref "${e}": external references are not supported, bundle them into the schema first.`);return 0===i.length?l:function(e,t,n){let r=e;for(let e of t.split("/")){if(0===e.length)continue;let t=decodeURIComponent(e).replaceAll(cB,e=>cV[e]);if(void 0===(r=Array.isArray(r)?r[Number(t)]:"object"==typeof r&&null!==r?r[t]:void 0))throw Error(`Cannot resolve $ref "${n}": no value at that location.`)}return r}(l,i,e)}walk(e,t){if("object"!=typeof e||null===e)return;let n=t;"string"==typeof e.$id&&(n=c_(cH(e.$id,t)),this.resources.set(n,e)),n!==this.rootUri&&this.bases.set(e,n),"string"==typeof e.$anchor&&this.anchors.set(`${n}#${e.$anchor}`,e),"string"==typeof e.$dynamicAnchor&&this.anchors.set(`${n}#${e.$dynamicAnchor}`,e);var r=e=>
53this.walk(e,n);for(let t in e){let n=cF.get(t);if(void 0===n)continue;let o=e[t];if("one"===n)r(o);else if("list"===n){if(Array.isArray(o))for(let e of o)r(e)}else if("object"==typeof o&&null!==o)for(let e in o)r(o[e])}}};function cH(e,t){if(e.startsWith("#"))return t+e;try{return new URL(e,t).href}catch{return e}}function c_(e){let t=e.indexOf("#");return -1===t?e:e.slice(0,t)}let cB=/~1|~0/g,cV={"~0":"~","~1":"/"};function cW(e){return/([^\/#?]+)$/.exec(e)?.[1]}function cq(e){let t=e.match(/[A-Za-z0-9]+/g);if(!t)return"Type";let n=t.map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join("");return/^[0-9]/.test(n)&&(n=`_${n}`),n}function cG(e,t){if(e.includes("://")||e.startsWith("/")){let n=cW(e);return n?cq(n.replace(/\.[a-z0-9]+$/i,"")):"object"==typeof t&&"string"==typeof t.title?cq(t.title):"Type"}return cq(e)}function cK(e,t){if("string"==typeof t.title&&t.title.length>0)return cq(t.title);let n=cW(e);return void 0===n?"Schema":cq(decodeURIComponent(n).replace(/\.[a-z0-9]+$/i,""))}let cY=["enum","const","properties","patternProperties","additionalProperties","propertyNames","items","prefixItems","allOf","anyOf","oneOf"];var cZ=class extends cD{options;index;constructor(e,t){super(e,t),this.options=t,this.index=new cU(e)}run(){return this.declareRoots(this.options.ref),this.emitAll()}refExpression(e,t){let n=this.index.resolve(e,this.index.baseUri(t));return"boolean"==typeof n?n?"unknown":"never":this.names.get(n)??this.declare(n,cK(e,n))}isExtendableRef(e,t){let n;if("object"!=typeof e||null===e||"string"!=typeof e.$ref||cY.some(t=>void 0!==e[t]))return!1;try{n=this.index.resolve(e.$ref,this.index.baseUri(e))}catch{return!1}return"object"==typeof n&&null!==n&&this.isInterfaceLike(n,t)}declareRoots(e){let t=this.options.name;if(void 0!==e){let n=this.index.resolve(e,this.index.rootUri);"boolean"==typeof n?this.declarations.push({name:this.claimName(t??"
53Schema"),schema:n}):this.declare(n,t??cK(e,n));return}let n=this.root;if("boolean"==typeof n)return void this.declarations.push({name:this.claimName(t??"Schema"),schema:n});if(this.declare(n,t??("string"==typeof n.title?cq(n.title):"Schema")),n.$defs&&"object"==typeof n.$defs)for(let[e,t]of Object.entries(n.$defs))"object"==typeof t&&null!==t?this.declare(t,cG(e,t)):this.declarations.push({name:this.claimName(cG(e,t)),schema:t})}};e.s([],158421),e.i(158421);let cJ=v.createContext(void 0);function cX(e){let t=v.useContext(cJ);if(void 0===t&&!e)throw Error(ny(47));return t}var t3=t3;let cQ={...ls,disabled:nb(e=>e.disabled),instantType:nb(e=>e.instantType),openMethod:nb(e=>e.openMethod),openChangeReason:nb(e=>e.openChangeReason),modal:nb(e=>e.modal),focusManagerModal:nb(e=>e.focusManagerModal),stickIfOpen:nb(e=>e.stickIfOpen),titleElementId:nb(e=>e.titleElementId),descriptionElementId:nb(e=>e.descriptionElementId),openOnHover:nb(e=>e.openOnHover),closeDelay:nb(e=>e.closeDelay),hasViewport:nb(e=>e.hasViewport)};class c0 extends nw{constructor(e,t,n=!1){const r={...{...lt(),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},...e},o=new nv;r.open&&e?.mounted===void 0&&(r.mounted=!0),r.floatingRootContext=ln(o,t,n),super(r,{popupRef:v.createRef(),backdropRef:v.createRef(),internalBackdropRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:v.createRef(),beforeContentFocusGuardRef:v.createRef(),stickIfOpenTimeout:new tv,triggerElements:o},cQ)}setOpen=(e,t)=>{let n,r=t.reason===t3.triggerHover,o=t.reason===t3.triggerPress&&0===t.event.detail,i=!e&&(t.reason===t3.escapeKey||null==t.reason),l=(n=!1,t.preventUnmountOnClose=()=>{n=!0},()=>n),s=this.select("activeTriggerId");if(e||t.reason!==t3.closePress||null!=t.trigger||null==s||(t.trigger=this.context.triggerElements.getById(s)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let a=()=>{let n={open:e,openChangeReason:t.reason};rh(n,e,t.trigger,l()),this.update(n)};r?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set("stickIfOpen",!1)}),n3.flushSync(a)):a(),o||i?this.set("instantType",o?"click":"dismiss"):t.reason===t3.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){let{store:n,internalStore:r}=rp(e,(e,n)=>new c0(t,e,n));return v.useEffect(()=>r?.disposeEffect(),[r]),n}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}var t3=t3;function c1({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:i,modal:l=!1,handle:s,triggerId:a,defaultTriggerId:u=null}=e,c=c0.useStore(s?.store,{modal:l,open:r,openProp:n,activeTriggerId:u,triggerIdProp:a});e4(()=>{void 0===n&&!1===c.state.open&&r&&(c.state={...c.state,open:!0,activeTriggerId:u,preventUnmountingOnClose:!1})}),c.useControlledProp("openProp",n),c.useControlledProp("triggerIdProp",a);let d=c.useState("open"),f=c.useState("mounted"),p=c.useState("payload"),h=null!=nu();c.useContextCallback("onOpenChange",o),c.useContextCallback("onOpenChangeComplete",i),ry(c,d),rg(c);let{forceUnmount:m}=rx(d,c,()=>{c.update({stickIfOpen:!0,openChangeReason:null})});c.useSyncedValues({modal:l,nested:h}),v.useEffect(()=>{d||c.context.stickIfOpenTimeout.clear()},[c,d]);let g=v.useCallback(()=>{c.setOpen(!1,t6(t3.imperativeAction))},[c]);v.useImperativeHandle(e.actionsRef,()=>({unmount:m,close:g}),[m,g]);let x=d||f,y=v.useMemo(()=>({store:c}),[c]);return(0,w.jsxs)(cJ.Provider,{value:y,children:[x&&(0,w.jsx)(c2,{store:c,modal:l}),"function"==typeof t?t({payload:p}):t]})}function c2({store:e,modal:t}){let n=nx(e.useState("floatingRootContext"),{outsidePressEvent:{mouse:"trap-focus"===t?"sloppy":"intentional",touch:"sloppy"}}),r=n.reference??tf;return rv(e,{activeTriggerProps:r,inactiveTriggerProps:n.trigger??tf,popupProps:v.useMemo(()=>rj(rd,n.floating),[n.floating])}),null}let c4=.1*.1;function c5(e,t,n,r,o,i){return r>=t!=i>=t&&e<=(o-n)*(t-r)/(i-r)+n}function c7(e,t,n,r,o,i,l,s,a,u){let c=!1;return c5(e,t,n,r,o,i)&&(c=!c),c5(e,t,o,i,l,s)&&(c=!c),c5(e,t,l,s,a,u)&&(c=!c),c5(e,t,a,u,n,r)&&(c=!c),c}function c6(e,t,n,r,o,i){let l=Math.min(n,o),s=Math.max(n,o),a=Math.min(r,i),u=Math.max(r,
53i);return e>=l&&e<=s&&t>=a&&t<=u}var t3=t3;class c3{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 tv,this.restTimeout=new tv,this.handleCloseOptions=void 0}static create(){return new c3}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}let c9=new WeakMap;function c8(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&c9.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),c9.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function de(e,t){let{scopeElement:n,referenceElement:r,floatingElement:o}=t,i=c9.get(n);i&&i!==e&&c8(i),c8(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=o,c9.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",o.style.pointerEvents="auto"}function dt(e){let t=e.context.dataRef.current,n=eQ(()=>t.hoverInteractionState??c3.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),th(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function dn(e,t,n){let r=null==n||t7(n)?"function"==typeof e?e():e:0;return"number"==typeof r?r:r?.[t]}function dr(e){return"function"==typeof e?e():e}function di(e,t){return t||"click"===e||"mousedown"===e}let dl={current:null};var t3=t3,t3=t3;let ds=v.forwardRef(function(e,t){let n,{render:r,className:o,style:i,disabled:l=!1,nativeButton:s=!0,handle:a,payload:u,openOnHover:c=!1,delay:d=300,closeDelay:f=0,id:p,...h}=e,m=cX(!0),g=a?.store??m?.store;if(!g)throw Error(ny(74));let x=nG(p),y=g.useState("isTriggerActive",x),b=g.useState("floatingRootContext"),j=g.useState("isOpenedByTrigger",x),k=g.useState("triggerPopupId",x),C=v.useRef(null),{registerTrigger:S,isMountedByThisTrigger:E}=rm(x,C,g,{payload:u,disabled:l,openOnHover:c,closeDelay:f}),O=g.useState("openChangeReason"),N=g.useState("stickIfOpen"),T=g.useState("openMethod"),A=g.useState("focusManagerModal"),M=function(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:o=null,mouseOnly:i=!1,restMs:l=0,move:s=!0,triggerElementRef:a=dl,externalTree:u,isActiveTrigger:c=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p}=t,h="rootStore"in e?e.rootStore:e,{dataRef:m,events:g}=h.context,x=nc(u),y=dt(h),b=v.useRef(!1),w=tr(o),j=tr(r),k=tr(l),C=tr(n),S=tr(p),E=tr(f),O=te(()=>di(m.current.openEvent?.type,y.interactedInside)),N=te(()=>S.current?.()!==!1),T=te((e,t,n)=>{let r=h.context.triggerElements;return r.hasElement(t)?!e||!tj(e,t):!!(0,tb.isElement)(n)&&r.hasMatchingElement(e=>tj(e,n))&&(!e||!tj(e,n))}),A=te(()=>{y.handler&&(nt(h.select("domReferenceElement")).removeEventListener("mousemove",y.handler),y.handler=void 0)}),M=te(()=>{c8(y)});return c&&(y.handleCloseOptions=w.current?.__options),v.useEffect(()=>A,[A]),v.useEffect(()=>{if(n)return g.on("openchange",e),()=>{g.off("openchange",e)};function e(e){e.open?b.current=!1:(b.current=e.reason===t3.triggerHover,A(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}},[n,g,y,A]),v.useEffect(()=>{if(!n)return;function e(t,n=!0){let r=dn(j.current,"close",y.pointerType);r?y.openChangeTimeout.start(r,()=>{h.setOpen(!1,t6(t3.triggerHover,t)),x?.events.emit("floating.closed",t)}):n&&(y.openChangeTimeout.clear(),h.setOpen(!1,t6(t3.triggerHover,t)),x?.events.emit("floating.closed",t))}let t=a.current??(c?h.select("domReferenceElement"):null);if((0,tb.isElement)(t))return s?ne(t8(t,"mousemove",r,{once:!0}),t8(t,"mouseenter",r),t8(t,"mouseleave",o)):ne(t8(t,"mouseenter",r),t8(t,"mouseleave",o));function r(e){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,i&&!t7(y.pointerType))return;let t=dr(k.current),n=dn(j.current,"open",y.pointerType),r=tk(e),o=e.currentTarget??null,l=h.select("domReferenceElement"),s=o;if((0,tb.isElement)(r)&&!h.context.triggerElements.hasElement(r)){for(let e of h.context.triggerElements.elements())if(tj(e,r)){s=e;break}}(0,tb.isElement)(o)&&(0,tb.isElement)(l)&&!h.context.triggerElements.hasElement(o)&&tj(o,l)&&(s=l);let a=null!=s&&T(l,s,r),u=h.select("open"),c=E.current?.()??"ending"===h.select("transitionStatus"),d=!u&&c&&b.current,f=!a&&(0,tb.isElement)(s)&&(0,tb.isElement)(l)&&tj(l,s)&&d,p=t>0&&!n,m=!u||a;
53if(a&&(u||d)||f){N()&&h.setOpen(!0,t6(t3.triggerHover,e,s));return}!p&&(n?y.openChangeTimeout.start(n,()=>{m&&N()&&h.setOpen(!0,t6(t3.triggerHover,e,s))}):m&&N()&&h.setOpen(!0,t6(t3.triggerHover,e,s)))}function o(t){if(O())return void M();A();let n=nt(h.select("domReferenceElement"));y.restTimeout.clear(),y.restTimeoutPending=!1;let r=m.current.floatingContext??d?.();if(!tA(t.relatedTarget,h.context.triggerElements)){if(w.current&&r){h.select("open")||y.openChangeTimeout.clear();let o=a.current;y.handler=w.current({...r,tree:x,x:t.clientX,y:t.clientY,onClose(){M(),A(),C.current&&!O()&&o===h.select("domReferenceElement")&&e(t,!0)}}),n.addEventListener("mousemove",y.handler),y.handler(t);return}"touch"===y.pointerType&&tj(h.select("floatingElement"),t.relatedTarget)||e(t)}}},[A,M,m,j,h,n,w,y,c,T,O,i,s,k,a,x,C,d,E,N]),v.useMemo(()=>{if(n)return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,r=h.select("domReferenceElement"),o=h.select("open"),l=T(r,n,e.target);if(i&&!t7(y.pointerType))return;if(o&&l&&y.handleCloseOptions?.blockPointerEvents){let e=h.select("floatingElement");if(e){let t=y.handleCloseOptions?.getScope?.()??n.ownerDocument.body;de(y,{scopeElement:t,referenceElement:n,floatingElement:e})}}let s=dr(k.current);function a(){if(y.restTimeoutPending=!1,O())return;let e=h.select("open");!y.blockMouseMove&&(!e||l)&&N()&&h.setOpen(!0,t6(t3.triggerHover,t,n))}(!o||l)&&0!==s&&(!l&&y.restTimeoutPending&&e.movementX**2+e.movementY**2<2||(y.restTimeout.clear(),"touch"===y.pointerType?n3.flushSync(()=>{a()}):l&&o?a():(y.restTimeoutPending=!0,y.restTimeout.start(s,a))))}};function e(e){y.pointerType=e.pointerType}},[n,y,O,T,i,h,k,N])}(b,{enabled:!l&&null!=b&&c&&("touch"!==T||O!==t3.triggerPress),mouseOnly:!0,move:!1,handleClose:function(e={}){let{blockPointerEvents:t=!1}=e,n=new tv,r=({x:e,y:t,placement:r,elements:o,onClose:i,nodeId:l,tree:s})=>{let a=r?.split("-")[0],u=!1,c=null,d=null,f="u">typeof performance?performance.now():0;return function(r){n.clear();let p=o.domReference,h=o.floating;if(!p||!h||null==a||null==e||null==t)return;let{clientX:m,clientY:g}=r,x=tk(r),v="mouseleave"===r.type,y=tj(h,x),b=tj(p,x);if(y&&(u=!0,!v))return;if(b&&(u=!1,!v)){u=!0;return}if(v&&(0,tb.isElement)(r.relatedTarget)&&tj(h,r.relatedTarget))return;function w(){return!!(s&&nh(s.nodesRef.current,l).length>0)}function j(){w()||(n.clear(),i())}if(w())return;let k=p.getBoundingClientRect(),C=h.getBoundingClientRect(),S=e>C.right-C.width/2,E=t>C.bottom-C.height/2,O=C.width>k.width,N=C.height>k.height,T=(O?k:C).left,A=(O?k:C).right,M=(N?k:C).top,R=(N?k:C).bottom;if("top"===a&&t>=k.bottom-1||"bottom"===a&&t<=k.top+1||"left"===a&&e>=k.right-1||"right"===a&&e<=k.left+1)return void j();let I=!1;switch(a){case"top":I=c6(m,g,T,k.top+1,A,C.bottom-1);break;case"bottom":I=c6(m,g,T,C.top+1,A,k.bottom-1);break;case"left":I=c6(m,g,C.right-1,R,k.left+1,M);break;case"right":I=c6(m,g,k.right-1,R,C.left+1,M)}if(I)return;if(u&&(!(m>=k.x)||!(m<=k.x+k.width)||!(g>=k.y)||!(g<=k.y+k.height))||!v&&function(e,t){let n=performance.now(),r=n-f;if(null===c||null===d||0===r)return c=e,d=t,f=n,!1;let o=e-c,i=t-d;return c=e,d=t,f=n,o*o+i*i<r*r*c4}(m,g))return void j();let $=!1;switch(a){case"top":{let n=O?.25:2,r=t+.5+1,o=S||O?C.bottom-.5:C.top,i=S?O?C.bottom-.5:C.top:C.bottom-.5;$=c7(m,g,O||S?e+n:e-n,r,O?e-n:S?e+n:e-n,r,C.left,o,C.right,i);break}case"bottom":{let n=O?.25:2,r=t-.5,o=S||O?C.top+.5:C.bottom,i=S?O?C.top+.5:C.bottom:C.top+.5;$=c7(m,g,O||S?e+n:e-n,r,O?e-n:S?e+n:e-n,r,C.left,o,C.right,i);break}case"left":{let n=N?.25:2,r=e+.5+1,o=E||N?C.right-.5:C.left,i=E?N?C.right-.5:C.left:C.right-.5;$=c7(m,g,o,C.top,i,C.bottom,r,N||E?t+n:t-n,r,N?t-n:E?t+n:t-n);break}case"right":{let n=N?.25:2,r=e-.5,o=E||N?C.left+.5:C.right,i=E?N?C.left+.5:C.right:C.left+.5;$=c7(m,g,r,N||E?t+n:t-n,r,N?t-n:E?t+n:t-n,o,C.top,i,C.bottom)}}$?u||n.start(40,j):j()}};return r.__options={...e,blockPointerEvents:t},r}(),restMs:d,delay:{close:f},triggerElementRef:C,isActiveTrigger:y,isClosing:()=>"ending"===g.select("transitionStatus")}),R=t9(b,{enabled:null!=b,stickIfOpen:N}),I=rs(()=>g.select("open"),e=>{g.set("openMethod",e)}),$=g.useState("triggerProps",E),{getButtonProps:P,buttonRef:L}=rY({disabled:l,native:s}),{preFocusGuardRef:D,handlePreFocusGuardFocus:z,handleFocusTargetFocus:F}={preFocusGuardRef:n=v.useRef(null),handlePreFocusGuardFocus:function(e){n3.flushSync(()=>{g.setOpen(!1,t6(t3.focusOut,e.nativeEvent,e.currentTarget))});let t=oi(n.current,-1);t?.focus()},handleFocusTargetFocus:function(e){let t=g.select("positionerElement");
53if(t&&ol(e,t))g.context.beforeContentFocusGuardRef.current?.focus();else{n3.flushSync(()=>{g.setOpen(!1,t6(t3.focusOut,e.nativeEvent,e.currentTarget))});let n=oi(g.context.triggerFocusTargetRef.current||C.current,1);for(;null!==n&&tj(t,n);){let e=n;if((n=or(n))===e)break}n?.focus()}}},U=r$("button",e,{state:{disabled:l,open:j},ref:[L,t,S,C],props:[R.reference,M,$,I,{[ou]:"",id:x,"aria-haspopup":"dialog","aria-expanded":j,"aria-controls":k},h,P],stateAttributesMapping:{open:e=>e&&O===t3.triggerPress?rW.open(e):rV.open(e)}});return E&&!A?(0,w.jsxs)(v.Fragment,{children:[(0,w.jsx)(r2,{ref:D,onFocus:z}),(0,w.jsx)(v.Fragment,{children:U},x),(0,w.jsx)(r2,{ref:g.context.triggerFocusTargetRef,onFocus:F})]}):(0,w.jsx)(v.Fragment,{children:U},x)}),da=v.createContext(void 0),du=v.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:o}=cX();return o.useState("mounted")||n?(0,w.jsx)(da.Provider,{value:n,children:(0,w.jsx)(om,{ref:t,...r})}):null}),dc=v.createContext(void 0);function dd(){let e=v.useContext(dc);if(!e)throw Error(ny(46));return e}var t3=t3;let df=v.forwardRef(function(e,t){let n,r,o,{render:i,className:l,style:s,anchor:a,positionMethod:u="absolute",side:c="bottom",align:d="center",sideOffset:f=0,alignOffset:p=0,collisionBoundary:h="clipping-ancestors",collisionPadding:m=5,arrowPadding:g=5,sticky:x=!1,disableAnchorTracking:y=!1,collisionAvoidance:b=od,...j}=e,{store:k}=cX(),C=function(){let e=v.useContext(da);if(void 0===e)throw Error(ny(45));return e}(),S=(n=no(),r=nc(void 0),e6(()=>{if(!n)return;let e={id:n,parentId:o};return r?.addNode(e),()=>{r?.removeNode(e)}},[r,n,o=nu()]),n),E=k.useState("floatingRootContext"),O=k.useState("mounted"),N=k.useState("open"),T=k.useState("openChangeReason"),A=k.useState("activeTriggerElement"),M=k.useState("modal"),R=k.useState("openMethod"),I=k.useState("positionerElement"),$=k.useState("instantType"),P=k.useState("transitionStatus"),L=k.useState("hasViewport"),D=v.useRef(null),z=rr(I,!1,!1),F=oD({anchor:a,floatingRootContext:E,positionMethod:u,mounted:O,side:c,sideOffset:f,align:d,alignOffset:p,arrowPadding:g,collisionBoundary:h,collisionPadding:m,sticky:x,disableAnchorTracking:y,keepMounted:C,nodeId:S,collisionAvoidance:b,adaptiveOrigin:L?o$:void 0}),U=E.useState("domReferenceElement");e6(()=>{let e=D.current;if(U&&(D.current=U),e&&U&&U!==e){k.set("instantType",void 0);let e=new AbortController;return z(()=>{k.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[U,z,k]),oX(N&&!0===M&&T!==t3.triggerHover,"touch"===R,I,A);let H=v.useCallback(e=>{k.set("positionerElement",e)},[k]),_=oW(e,{open:N,side:F.side,align:F.align,anchorHidden:F.anchorHidden,instant:$},{styles:F.positionerStyles,transitionStatus:P,props:j,refs:[t,H],hidden:!O,inert:!N});return(0,w.jsxs)(dc.Provider,{value:F,children:[O&&!0===M&&T!==t3.triggerHover&&(0,w.jsx)(oH,{ref:k.context.internalBackdropRef,inert:ob(!N),cutout:A}),(0,w.jsx)(nd,{id:S,children:_})]})});var t3=t3,t3=t3;let dp=v.createContext(void 0);function dh(e){let{value:t,children:n}=e;return(0,w.jsx)(dp.Provider,{value:t,children:n})}let dm={...rq,...rn},dg=v.forwardRef(function(e,t){let{render:n,className:r,style:o,initialFocus:i,finalFocus:l,...s}=e,{store:a}=cX(),u=dd(),c=null!=iu(!0),{context:d,hasClosePart:f}=function(){let[e,t]=v.useState(0),n=te(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:v.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}(),p=a.useState("open"),h=a.useState("openMethod"),m=a.useState("instantType"),g=a.useState("transitionStatus"),x=a.useState("popupProps"),y=a.useState("titleElementId"),b=a.useState("descriptionElementId"),j=a.useState("modal"),k=a.useState("mounted"),C=a.useState("openChangeReason"),S=a.useState("activeTriggerElement"),E=a.useState("floatingRootContext"),O=E.useState("floatingId"),N=a.useState("disabled"),T=a.useState("openOnHover"),A=a.useState("closeDelay"),M=s.id??O;ro({open:p,ref:a.context.popupRef,onComplete(){p&&a.context.onOpenChangeComplete?.(!0)}}),function(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:o}=t,i="rootStore"in e?e.rootStore:e,l=i.useState("open"),s=i.useState("floatingElement"),a=i.useState("domReferenceElement"),{dataRef:u}=i.context,c=nc(),d=nu(),f=dt(i),p=ty(),h=te(()=>di(u.current.openEvent?.type,f.interactedInside)),m=te(()=>{var e;return e=u.current.openEvent?.type,e?.includes("mouse")&&"mousedown"!==e}),g=te(()=>{c8(f)});e6(()=>{l||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,g())},[l,f,g]),v.useEffect(()=>g,[g]),e6(()=>
53{if(n&&l&&f.handleCloseOptions?.blockPointerEvents&&m()&&(0,tb.isElement)(a)&&s){let e=nt(s),t=c?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;t&&(t.style.pointerEvents="");let n=f.pointerEventsScopeElement!==s?f.pointerEventsScopeElement:null,r=t!==s?t:null,o=f.handleCloseOptions?.getScope?.()??n??r??a.closest("[data-rootownerid]")??e.body;return de(f,{scopeElement:o,referenceElement:a,floatingElement:s}),()=>{g()}}},[n,l,a,s,f,m,c,d,g]),v.useEffect(()=>{if(n)return ne(s&&t8(s,"mouseenter",function(){f.openChangeTimeout.clear(),p.clear(),c?.events.off("floating.closed",t),g()}),s&&t8(s,"mouseleave",function(n){if(e()&&c)return void c.events.on("floating.closed",t);if(tA(n.relatedTarget,i.context.triggerElements))return;let l=u.current.floatingContext?.nodeId??o,s=n.relatedTarget;if(!(c&&l&&(0,tb.isElement)(s)&&nh(c.nodesRef.current,l,!1).some(e=>tj(e.context?.elements.floating,s)))){let e,t;if(f.handler)return void f.handler(n);g(),m()&&!h()&&(e=dn(r,"close",f.pointerType),t=()=>{i.setOpen(!1,t6(t3.triggerHover,n)),c?.events.emit("floating.closed",n)},e?f.openChangeTimeout.start(e,t):(f.openChangeTimeout.clear(),t()))}}),s&&t8(s,"pointerdown",function(e){let t=tk(e);if(t?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${tS}`)==null){f.interactedInside=!1;return}f.interactedInside=t?.closest("[aria-haspopup]")!=null},!0),()=>{c?.events.off("floating.closed",t)});function e(){return!!(c&&d&&nh(c.nodesRef.current,d).length>0)}function t(n){!c||!d||e()||p.start(0,()=>{c.events.off("floating.closed",t),i.setOpen(!1,t6(t3.triggerHover,n)),c.events.emit("floating.closed",n)})}},[n,s,i,u,r,o,m,h,g,f,c,d,p])}(E,{enabled:T&&!N,closeDelay:A});let R=void 0===i?rf(a.context.popupRef):i,I=!1!==j&&f;a.useSyncedValue("focusManagerModal",I);let $=v.useCallback(e=>{a.set("popupElement",e)},[a]),P=r$("div",e,{state:{open:p,side:u.side,align:u.align,instant:m,transitionStatus:g},ref:[t,a.context.popupRef,$],props:[x,{id:M,role:"dialog",...rd,"aria-labelledby":y,"aria-describedby":b,onKeyDown(e){c&&ic.has(e.key)&&e.stopPropagation()}},oV(g),s],stateAttributesMapping:dm});return(0,w.jsx)(il,{context:E,openInteractionType:h,modal:I,disabled:!k||C===t3.triggerHover,initialFocus:R,returnFocus:l,restoreFocus:"popup",previousFocusableElement:(0,tb.isHTMLElement)(S)?S:void 0,nextFocusableElement:a.context.triggerFocusTargetRef,beforeContentFocusGuardRef:a.context.beforeContentFocusGuardRef,children:(0,w.jsx)(dh,{value:d,children:P})})}),dx=v.forwardRef(function(e,t){let{render:n,className:r,style:o,...i}=e,{store:l}=cX(),s=l.useState("open"),{arrowRef:a,side:u,align:c,arrowUncentered:d,arrowStyles:f}=dd();return r$("div",e,{state:{open:s,side:u,align:c,uncentered:d},ref:[t,a],props:[{style:f,"aria-hidden":!0},i],stateAttributesMapping:rq})});var t3=t3;let dv={...rq,...rn},dy=v.forwardRef(function(e,t){let{render:n,className:r,style:o,...i}=e,{store:l}=cX(),s=l.useState("open"),a=l.useState("mounted"),u=l.useState("transitionStatus"),c=l.useState("openChangeReason");return r$("div",e,{state:{open:s,transitionStatus:u},ref:[l.context.backdropRef,t],props:[{role:"presentation",hidden:!a,style:{pointerEvents:c===t3.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},i],stateAttributesMapping:dv})}),db=v.forwardRef(function(e,t){let{render:n,className:r,style:o,...i}=e,{store:l}=cX(),s=nG(i.id);return l.useSyncedValueWithCleanup("titleElementId",s),r$("h2",e,{ref:t,props:[{id:s},i]})}),dw=v.forwardRef(function(e,t){let{render:n,className:r,style:o,...i}=e,{store:l}=cX(),s=nG(i.id);return l.useSyncedValueWithCleanup("descriptionElementId",s),r$("p",e,{ref:t,props:[{id:s},i]})});var t3=t3;let dj=v.forwardRef(function(e,t){let n,{render:r,className:o,style:i,disabled:l=!1,nativeButton:s=!0,...a}=e,{buttonRef:u,getButtonProps:c}=rY({disabled:l,focusableWhenDisabled:!1,native:s}),{store:d}=cX();return e6(()=>n?.register(),[n=v.useContext(dp)]),r$("button",e,{ref:[t,u],props:[{onClick(e){d.setOpen(!1,t6(t3.closePress,e.nativeEvent))}},a,c]})}),dk=((x={}).popupWidth="--popup-width",x.popupHeight="--popup-height",x);function dC(e){let t=(0,tb.getComputedStyle)(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=(0,tb.isHTMLElement)(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r;return((0,oE.round)(n)!==i||(0,oE.round)(r)!==l)&&(n=i,r=l),{width:n,height:r}}function dS(e,t,n){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r)}}function dE(e,t){let n=[];for(let[r,o]of Object.entries(t))n.push(dS(e,r,o));return n.length?()=>
53{n.forEach(e=>e())}:tc}function dO(e,t){let n="auto"===t?"auto":`${t.width}px`,r="auto"===t?"auto":`${t.height}px`;e.style.setProperty("--popup-width",n),e.style.setProperty("--popup-height",r)}function dN(e,t){let n="max-content"===t?"max-content":`${t.width}px`,r="max-content"===t?"max-content":`${t.height}px`;e.style.setProperty("--positioner-width",n),e.style.setProperty("--positioner-height",r)}let dT={activationDirection:e=>e?{"data-activation-direction":e}:null},dA=v.forwardRef(function(e,t){let{render:n,className:r,style:o,children:i,...l}=e,{store:s}=cX(),{side:a}=dd(),u=s.useState("instantType"),{children:c,state:d}=function(e){let t,{store:n,side:r,cssVars:o,children:i}=e,l=oA(),s=n.useState("activeTriggerElement"),a=n.useState("activeTriggerId"),u=n.useState("open"),c=n.useState("payload"),d=n.useState("mounted"),f=n.useState("popupElement"),p=n.useState("positionerElement"),h=e5(u?s:null),m=function(e,t){let[n,r]=v.useState(0),o=v.useRef(e),i=v.useRef(t),l=v.useRef(!1);return e6(()=>{let n=o.current,s=t!==i.current;e!==n?(r(e=>e+1),l.current=!s):l.current&&s&&(r(e=>e+1),l.current=!1),o.current=e,i.current=t},[e,t]),`${e??"current"}-${n}`}(a,c),g=v.useRef(null),[x,y]=v.useState(null),[b,j]=v.useState(null),k=v.useRef(null),C=v.useRef(null),S=rr(k,!0,!1),E=tx(),[O,N]=v.useState(null),[T,A]=v.useState(!1);e6(()=>(n.set("hasViewport",!0),()=>{n.set("hasViewport",!1)}),[n]);let M=te(()=>{k.current?.style.setProperty("animation","none"),k.current?.style.setProperty("transition","none"),C.current?.style.setProperty("display","none")}),R=te(e=>{k.current?.style.removeProperty("animation"),k.current?.style.removeProperty("transition"),C.current?.style.removeProperty("display"),e&&N(e)}),I=v.useRef(null);e6(()=>{u&&d||(I.current=null)},[u,d]),e6(()=>{var e,t;let n,r,o,i;s&&h&&s!==h&&I.current!==s&&g.current&&(y(g.current),A(!0),j((e=h,t=s,n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o={x:n.left+n.width/2,y:n.top+n.height/2},{horizontal:(i={x:r.left+r.width/2,y:r.top+r.height/2}).x-o.x,vertical:i.y-o.y})),E.request(()=>{n3.flushSync(()=>{A(!1)}),S(()=>{y(null),N(null),g.current=null})}),I.current=s)},[s,h,x,S,E]),e6(()=>{let e=k.current;if(!e)return;let t=nt(e).createElement("div");for(let n of Array.from(e.childNodes))t.appendChild(n.cloneNode(!0));g.current=t});let $=null!=x;return t=$?(0,w.jsxs)(v.Fragment,{children:[(0,w.jsx)("div",{"data-previous":!0,inert:ob(!0),ref:C,style:{...O?{[o.popupWidth]:`${O.width}px`,[o.popupHeight]:`${O.height}px`}:null,position:"absolute"},"data-ending-style":T?void 0:""},"previous"),(0,w.jsx)("div",{"data-current":!0,ref:k,"data-starting-style":T?"":void 0,children:i},m)]}):(0,w.jsx)("div",{"data-current":!0,ref:k,children:i},m),e6(()=>{let e=C.current;e&&x&&e.replaceChildren(...Array.from(x.childNodes))},[x]),!function(e){let{popupElement:t,positionerElement:n,content:r,mounted:o,onMeasureLayout:i,onMeasureLayoutComplete:l,side:s,direction:a}=e,u=rr(t,!0,!1),c=tx(),d=v.useRef(null),f=v.useRef(!0),p=v.useRef(tc),h=te(i),m=te(l),g=v.useMemo(()=>{let e="top"===s,t="left"===s;return"rtl"===a?(e=e||"inline-end"===s,t=t||"inline-end"===s):(e=e||"inline-start"===s,t=t||"inline-start"===s),e?{position:"absolute",["top"===s?"bottom":"top"]:"0",[t?"right":"left"]:"0"}:tf},[s,a]);e6(()=>{if(!o){p.current=tc,f.current=!0,d.current=null;return}if(!t||!n)return;p.current=dE(t,g),dO(t,"auto");let e=dS(t,"position","static"),r=dS(t,"transform","none"),i=dS(t,"scale","1"),l=dE(n,{"--available-width":"max-content","--available-height":"max-content"});function s(){e(),r(),l(),i()}if(h?.(),f.current||null===d.current){dN(n,"max-content");let e=dC(t);return d.current=e,dN(n,e),s(),m?.(null,e),f.current=!1,()=>{p.current(),p.current=tc}}dN(n,"max-content");let a=d.current,x=dC(t);d.current=x,dO(t,a),s(),m?.(a,x),dN(n,x);let v=new AbortController;return c.request(()=>{dO(t,x),u(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},v.signal)}),()=>{v.abort(),c.cancel(),p.current(),p.current=tc}},[r,t,n,u,c,o,h,m,g])}({popupElement:f,positionerElement:p,mounted:d,content:c,onMeasureLayout:M,onMeasureLayoutComplete:R,side:r,direction:l}),{children:t,state:{activationDirection:function(e){if(e){var t,n;return`${(t=e.horizontal)>5?"right":t<-5?"left":""} ${(n=e.vertical)>5?"down":n<-5?"up":""}`}}(b),transitioning:$}}}({store:s,side:a,cssVars:dk,children:i});return r$("div",e,{state:{activationDirection:d.activationDirection,transitioning:d.transitioning,instant:u},ref:t,props:[l,{children:c}],stateAttributesMapping:dT})});var t3=t3;class dM{constructor(){this.store=new c0}open(e){let t=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!t)throw Error(ny(80,e));this.store.setOpen(!0,t6(t3.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,t6(t3.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}}e.s(["Arrow",0,dx,"Backdrop",0,dy,"Close",0,dj,"Description",0,dw,"Handle",0,dM,"Popup",0,dg,"Portal",0,du,"Positioner",0,df,"Root",0,function(e){return cX(!0)?(0,w.jsx)(c1,{props:e}):(0,w.jsx)(nf,{children:(0,w.jsx)(c1,{props:e})})},"Title",0,db,"Trigger",0,ds,"Viewport",0,dA,"createHandle",0,function(){return new dM}],466914);var dR=e.i(466914),dR=dR;let dI=dR.Root,d$=dR.Trigger;function dP({className:e,align:t="center",sideOffset:n=4,...r}){return(0,w.jsx)(dR.Portal,{children:(0,w.jsx)(dR.Positioner,{align:t,side:"bottom",sideOffset:n,className:"z-50",children:(0,w.jsx)(dR.Popup,{className:t=>(0,T.cn)("z-50 origin-(--transform-origin) overflow-y-auto max-h-(--available-height) min-w-[240px] max-w-[98vw] rounded-xl border bg-fd-popover/60 backdrop-blur-lg p-2 text-sm text-fd-
53popover-foreground shadow-lg focus-visible:outline-none data-[closed]:animate-fd-popover-out data-[open]:animate-fd-popover-in","function"==typeof e?e(t):e),...r})})})}dR.Close;let dL=eW("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]),dD=eW("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]),dz=(0,ef.cva)("text-sm text-start text-fd-muted-foreground font-mono",{variants:{variant:{trigger:"underline hover:text-fd-accent-foreground data-[popup-open]:text-fd-accent-foreground"}}}),dF=(0,v.createContext)(null);function dU(){return(0,v.use)(dF)}let dH=new Set;function d_({name:e,required:t=!1,as:n="property",generated:r}){let o=s8([e]),[i,l]=(0,v.useState)(()=>[{$ref:r.$root,name:e}]),s=(0,v.useRef)(null),a=(0,v.useCallback)(e=>{if(!e)return;e.scrollTop=i.at(-1).scrollTop??0;let t=parseFloat(e.style.getPropertyValue("--min-height")||"200px");e.style.setProperty("--min-height",Math.max(e.clientHeight+2,t)+"px")},[i]);return(0,v.useEffect)(()=>{if(dH.has(o))return;let e=new URL(window.location.href),t=e.searchParams.get("path");if(e.hash!==`#${o}`||!t)return;let n=function(e,t){let n=[];for(let t of e.split("|")){let[e,r,...o]=t.split("\0");n.push({name:e,$ref:r,tabValues:o})}return t&&n.length>0&&(n[n.length-1].highlighted=t),n}(t,e.searchParams.get("s-highlight"));!(!n||0===n.length||n.some(e=>!r.refs[e.$ref]))&&(l(n),dH.add(o),n.at(-1).highlighted||s.current?.scrollIntoView({behavior:"smooth"}))},[o,r.refs]),(0,w.jsx)(dF,{value:(0,v.useMemo)(()=>({rootId:o,path:i,generated:r,setPath:l,renderTypeInfoTrigger:({$ref:e,children:t,pathName:n})=>(0,w.jsxs)(dI,{open:i.length>1&&i[1].$ref===e&&i[1].name===n&&!i[0].closed,onOpenChange:t=>{t?l([{...i[0],closed:!1},{name:n,$ref:e}]):l(i.map((e,t)=>0===t?{...e,closed:!0}:e))},children:[(0,w.jsx)(d$,{className:(0,T.cn)(dz({variant:"trigger"})),children:t}),(0,w.jsx)(dP,{ref:a,className:"w-[600px] max-w-(--available-width) min-h-(--min-height,200px) fd-scroll-container max-h-[460px] px-3 pt-0",onScrollEnd:e=>{i.at(-1).scrollTop=e.target.scrollTop},children:(0,w.jsx)(dZ,{})})]})}),[r,i,o,a]),children:"property"===n||"primitive"===r.refs[r.$root].type?(0,w.jsx)(dV,{ref:s,id:o,name:e,$type:r.$root,parentPathIndex:0,required:t}):(0,w.jsx)("div",{id:o,ref:s,children:(0,w.jsx)(dW,{pathIndex:0})})})}function dB({schema:e,...t}){return(0,w.jsxs)("div",{...t,className:(0,T.cn)("prose-no-margin py-2 empty:hidden",t.className),children:[e.description,e.infoTags&&e.infoTags.length>0&&(0,w.jsx)("div",{className:"flex flex-row gap-2 flex-wrap mt-2 not-prose empty:hidden",children:e.infoTags.map((e,t)=>(0,w.jsx)(v.Fragment,{children:e.node},t))})]})}function dV({name:e,$type:t,required:n,parentPathIndex:r,...o}){let i=(0,eN.useTranslations)({note:"schema UI"}),{path:l,generated:{refs:s},rootId:a}=dU(),u=s[t],c=l[r],d=(0,v.useCallback)(t=>{t&&c.highlighted===e&&window.setTimeout(()=>{t.scrollIntoView({behavior:"smooth",block:"end"}),delete c.highlighted},300)},[c,e]),[f,p]=(0,aJ.useCopyButton)(()=>{let t=new URL(window.location.href);return t.hash=`#${a}`,t.searchParams.set("s-highlight",e),t.searchParams.set("path",l.map(e=>[e.name,e.$ref,...e.tabValues??[]].join("\0")).join("|")),navigator.clipboard.writeText(t.href)});return(0,w.jsxs)("div",{...o,ref:function(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}(o.ref,d),className:(0,T.cn)("text-sm border-t py-4 scroll-m-20 first:border-t-0",o.className),children:[(0,w.jsxs)("div",{className:"flex flex-wrap items-center gap-2 not-prose",children:[(0,w.jsxs)("span",{className:"font-medium font-mono",children:[(0,w.jsx)("span",{className:(0,T.cn)(c.highlighted===e?"bg-fd-primary text-fd-primary-foreground rounded-sm":"text-fd-primary",u.deprecated&&"line-through opacity-80"),children:e}),n?(0,w.jsx)("span",{className:"text-red-400",children:"*"}):(0,w.jsx)("span",{className:"text-fd-muted-foreground",children:"?"})]}),"primitive"===u.type?(0,w.jsx)("span",{className:(0,T.cn)(dz()),children:u.aliasName}):(0,w.jsx)(dJ,{pathName:e,$ref:t,children:u.aliasName}),(0,w.jsx)("div",{className:"flex-1"}),u.deprecated&&(0,w.jsx)("span",{className:"text-xs font-mono text-yellow-600 dark:text-yellow-400",children:i("Deprecated")}),(0,w.jsx)("button",{className:(0,T.cn)((0,eA.buttonVariants)({size:"icon-xs",variant:"ghost"}),"text-fd-muted-foreground [&_svg]:size-3.5"),onClick:p,children:f?(0,w.jsx)(eq,{}):(0,w.jsx)(dD,{})})]}),(0,w.jsx)(dB,{schema:u,className:"pb-0"})]})}function dW({pathIndex:e,asSchema:t,tabDepth:n=0,objectSearchOverrides:r}){let{path:o,setPath:i,generated:{refs:l}}=dU(),s=t??l[o[e].$ref];if(("or"===s.type||"and"===s.type)&&s.items.length>
530){let t=o[e].tabValues?.[n]??s.items[0].$type,r=s.items.map(e=>({label:(0,w.jsx)("code",{className:"text-xs font-medium",children:e.name}),value:e.$type}));return(0,w.jsxs)(iU,{items:r,value:t,onValueChange:t=>{if(!t)return;let r=[...o];(r[e].tabValues??=[]).splice(n,1,t),i(r)},children:[(0,w.jsxs)("div",{className:"flex flex-row my-2 gap-2 items-center",children:[(0,w.jsx)(dB,{schema:s,className:"flex-1 py-0"}),(0,w.jsx)(i_,{className:"not-prose w-fit min-w-0 mb-auto *:min-w-0",children:(0,w.jsx)(iH,{})}),(0,w.jsx)(iW,{children:r.map(({label:e,value:t})=>(0,w.jsx)(iq,{value:t,children:e},t))})]}),(0,w.jsx)(dW,{asSchema:l[t],pathIndex:e,tabDepth:n+1})]})}return"object"===s.type&&s.props.length>0?(0,w.jsx)(dq,{pathIndex:e,schema:s,...r,children:(0,w.jsx)(dB,{schema:s})}):"array"===s.type?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(dB,{schema:s}),(0,w.jsx)(dV,{name:"[index: integer]",$type:s.item.$type,parentPathIndex:e})]}):(0,w.jsx)(dB,{schema:s})}function dq({variant:e="default",schema:t,pathIndex:n,children:r}){let{path:o,setPath:i}=dU(),[l,s]=(0,v.useState)(""),a=(0,v.useDeferredValue)(l),u=(0,v.useRef)(null),c=(0,eN.useTranslations)({note:"schema UI"});return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)("div",{className:(0,T.cn)("flex items-center bg-fd-secondary text-fd-secondary-foreground transition-colors","in-popover"===e&&"sticky top-10 -mx-3 ps-3 border-b focus-within:[&_svg]:text-fd-primary","default"===e&&"border rounded-md ps-2 shadow-sm focus-within:ring-2 focus-within:ring-fd-ring"),children:[(0,w.jsx)(dL,{className:"text-fd-muted-foreground size-3.5 transition-colors"}),(0,w.jsx)("input",{value:l,"data-object-search-input":"",onChange:e=>s(e.target.value),placeholder:c("Filter Properties"),className:"text-sm ps-2 py-2 flex-1 outline-none placeholder:text-fd-muted-foreground",onKeyDown:e=>{if("Enter"===e.key){let t=u.current;t&&i([...o,{name:t.name,$ref:t.$type}]),e.preventDefault()}}})]}),r,(0,w.jsx)(v.Suspense,{children:(0,w.jsx)(dG,{search:a,properties:t.props,firstItemRef:u,empty:()=>(0,w.jsxs)("p",{className:"text-fd-muted-foreground text-sm my-2!",children:[c("No property matching")," ",(0,w.jsx)("span",{className:"text-fd-foreground font-medium",children:`"${a}"`})]}),render:e=>(0,w.jsx)(dV,{name:e.name,$type:e.$type,required:e.required,parentPathIndex:n},e.name)})})]})}function dG({search:e,firstItemRef:t,properties:n,empty:r,render:o}){let i=(0,v.useMemo)(()=>{let t=e.trim().toLowerCase();return t.length>0?n.filter(e=>e.name.toLowerCase().includes(t)):n},[n,e]);return(t.current=i[0]??null,0===i.length)?r():i.map(o)}function dK({label:e,children:t}){return(0,w.jsxs)("div",{className:"inline-flex gap-2 bg-fd-secondary border rounded-lg text-xs p-1.5 shadow-md max-w-full",children:[(0,w.jsx)("span",{className:"font-medium",children:e}),(0,w.jsx)("code",{className:"min-w-0 flex-1 text-fd-muted-foreground wrap-break-word",children:t})]})}function dY({label:e,children:t}){return(0,w.jsxs)("div",{className:"flex flex-col w-full gap-2 bg-fd-secondary border rounded-lg p-1.5 shadow-md",children:[(0,w.jsx)("p",{className:"font-medium text-xs",children:e}),t]})}function dZ(){let e=dU(),{path:t,setPath:n}=e,r=(0,v.useRef)(null);return(0,v.useEffect)(()=>{r.current?.querySelector("input[data-object-search-input]")?.focus({preventScroll:!0})},[t]),(0,w.jsx)(dF,{value:(0,v.useMemo)(()=>({...e,renderTypeInfoTrigger:({$ref:e,pathName:r,children:o})=>(0,w.jsx)("button",{className:(0,T.cn)(dz({variant:"trigger"})),onClick:()=>n([...t,{name:r,$ref:e}]),children:o})}),[e,n,t]),children:(0,w.jsxs)("div",{ref:r,children:[(0,w.jsx)("div",{className:"sticky top-0 -mx-3 flex overflow-x-auto overflow-y-hidden items-center text-sm font-medium font-mono bg-fd-secondary text-fd-secondary-foreground px-3 h-10 border-b z-20",children:t.map((e,r)=>{let o;if(0===r)return;let i=t.some((t,n)=>n!==r&&t.$ref===e.$ref),l=/^\[(\w+): (\w+)]$/.exec(e.name);return o=l?`[${l[1]}]`:r>1?`.${e.name}`:e.name,(0,w.jsx)("button",{onClick:()=>n(t.slice(0,r+1)),className:(0,T.cn)("hover:underline hover:text-fd-accent-foreground",i&&"text-orange-400"),children:o},r)})}),(0,w.jsx)(dW,{pathIndex:t.length-1,objectSearchOverrides:{variant:"in-popover"}})]})})}function dJ({pathName:e,$ref:t,children:n}){let{generated:{refs:r},renderTypeInfoTrigger:o}=dU(),i=r[t];if("primitive"===i.type&&!i.description&&(!i.infoTags||0===i.infoTags.length))return(0,w.jsx)("span",{className:(0,T.cn)(dz()),children:n});if("and"===i.type||"or"===i.type){let t="and"===i.type?"&":"|";return(0,w.jsx)("span",{className:(0,T.cn)(dz(),"flex flex-row gap-2 items-center flex-wrap"),children:i.items.map((n,r)=>(0,w.jsxs)(v.Fragment,{children:[r>0&&(0,w.jsx)("span",{children:t}),(0,w.jsx)(dJ,{pathName:e,$ref:n.$type,children:n.name})]},n.$type))})}
53return"array"===i.type?(0,w.jsxs)("span",{className:(0,T.cn)(dz(),"flex flex-row items-center flex-wrap"),children:["array<",(0,w.jsx)(dJ,{pathName:`${e}[]`,$ref:i.item.$type,children:r[i.item.$type].aliasName}),">"]}):o({$ref:t,pathName:e,children:n})}function dX({client:e,root:t,readOnly:n,writeOnly:r,showExample:o,renderMarkdown:i,renderCodeblock:l}){let s=(0,eN.useTranslations)().translations,a=(0,v.useMemo)(()=>(function({root:e,renderMarkdown:t,renderCodeblock:n,readOnly:r=!1,writeOnly:o=!1,showExample:i=!1,translations:l={}}){let s=(0,eN.fromTranslations)(l,{note:"schema UI"}),a={},u=0,c=new WeakMap;function d(e){if("boolean"==typeof e)return String(e);let t="string"==typeof e.$ref?e.$ref:void 0;if(t)return t;let n=c.get(e);if(n)return n;let r=`__${u++}`;return c.set(e,r),r}function f(e){let t=Z(e);return"boolean"==typeof t||(t.writeOnly?o:!t.readOnly||r)}function p(e){let r=Z(e);if("boolean"==typeof r){let e=r?"any":"never";return{typeName:e,aliasName:e}}return{description:r.description?t(r.description):void 0,infoTags:function(e){let t=[],r=[];e.pattern&&t.push({node:(0,w.jsx)(dK,{label:s("Match"),children:e.pattern})}),e.format&&t.push({node:(0,w.jsx)(dK,{label:s("Format"),children:e.format})}),e.multipleOf&&t.push({node:(0,w.jsx)(dK,{label:s("Multiple Of"),children:e.multipleOf})});let o=dQ("value",e.minimum,e.exclusiveMinimum,e.maximum,e.exclusiveMaximum);if(o&&t.push({node:(0,w.jsx)(dK,{label:s("Range"),children:o})}),(o=dQ("length",e.minLength,void 0,e.maxLength,void 0))&&t.push({node:(0,w.jsx)(dK,{label:s("Length"),children:o})}),(o=dQ("properties",e.minProperties,void 0,e.maxProperties,void 0))&&t.push({node:(0,w.jsx)(dK,{label:s("Properties"),children:o})}),(o=dQ("items",e.minItems,void 0,e.maxItems,void 0))&&t.push({node:(0,w.jsx)(dK,{label:s("Items"),children:o})}),e.enum&&e.enum.length>0){let t=e.enum.map(e=>JSON.stringify(e,null,2));r.push({node:(0,w.jsx)(dY,{label:s("Value in"),children:(0,w.jsx)("ul",{children:t.map((e,t)=>(0,w.jsx)("li",{className:"font-mono list-disc list-inside ps-1 marker:text-fd-muted-foreground",children:e},t))})})})}if(void 0!==e.default){let o=JSON.stringify(e.default,null,2);o.includes("\n")?r.push({node:(0,w.jsx)(dY,{label:s("Default"),children:n({lang:"json",code:o})})}):t.push({node:(0,w.jsx)(dK,{label:s("Default"),children:o})})}if(i&&e.examples)for(let o of e.examples){let e=JSON.stringify(o,null,2);if(e.includes("\n")){r.push({node:(0,w.jsx)(dY,{label:s("Example"),children:n({lang:"json",code:e})})});continue}t.push({node:(0,w.jsx)(dK,{label:s("Example"),children:e})})}return[...t,...r]}(r),typeName:sA(e),aliasName:sA(e,1),deprecated:r.deprecated}}let h=d(e);return!function e(t,n){if(t in a)return;let r=Z(n);if("boolean"==typeof r){a[t]={type:"primitive",...p(n)};return}if(Array.isArray(r.type)){let o={type:"or",items:[],...p(n)};for(let n of(a[t]=o,r.type)){let i=`${t}_type:${n}`;e(i,{...r,type:n}),o.items.push({name:n,$type:i})}return}if(r.oneOf&&r.anyOf){let o={type:"and",items:[],...p(n)};for(let n of(a[t]=o,["anyOf","oneOf"])){let i=`${t}_omit:${n}`;e(i,{...r,[n]:void 0}),o.items.push({name:a[i].aliasName,$type:i})}return}let o=r.oneOf??r.anyOf;if(o){let i={type:"or",items:[],...p(n)};for(let n of(a[t]=i,o)){if(!n||"object"!=typeof n||!f(n))continue;let o=d(n),l=Z(n);if("object"!=typeof l)continue;let s=`${t}_extends:${o}`;e(s,{...r,oneOf:void 0,anyOf:void 0,...l,properties:{...r.properties,...l.properties}}),i.items.push({$type:s,name:a[o]?.aliasName??sA(n,1)})}return}if(r.allOf)return void e(t,sd(r));if("object"===r.type){let o={type:"object",props:[],...p(n)};a[t]=o;let{properties:i={},patternProperties:l,additionalProperties:s}=r,u=Object.entries(i);for(let[t,n]of(l&&u.push(...Object.entries(l)),u)){if(!n||!f(n))continue;let i=d(n);e(i,n),o.props.push({$type:i,name:t,required:r.required?.includes(t)??!1})}if(s&&f(s)){let t=d(s);e(t,s),o.props.push({$type:t,name:"[key: string]",required:!1})}return}if("array"===r.type){let o=r.items??!0,i=d(o);a[t]={type:"array",item:{$type:i},...p(n)},e(i,o);return}a[t]={type:"primitive",...p(n)}}(h,e),{refs:a,$root:h}})({root:t,readOnly:n,writeOnly:r,showExample:o,renderMarkdown:i,renderCodeblock:l,translations:s}),[t,n,r,o,i,l,s]);return(0,w.jsx)(d_,{...e,generated:a})}function dQ(e,t,n,r,o){let i=[];if(void 0!==t?i.push(`${t} <=`):void 0!==n&&i.push(`${n} <`),i.push(e),void 0!==r?i.push(`<= ${r}`):void 0!==o&&i.push(`< ${o}`),i.length>1)return i.join(" ")}function d0({showTitle:e=!1,showDescription:t,operations:n,webhooks:r}){let o=C(),{dereferenced:i,resolve:l}=o.schema,{renderPageLayout:s}=o.content??{},a=(s??=e=>(0,w.jsxs)("div",{className:"flex flex-col gap-24 text-sm @container",children:[e.operations?.map(e=>e.children),e.webhooks?.map(e=>e.children)]}))({operations:n?.map(n=>{let r=l(i.paths?.[n.path]);if(!r)throw Error(`[Fumadocs OpenAPI] Path not found in OpenAPI schema: ${n.path}`);let o=r[n.method];if(!o)throw Error(`[Fumadocs OpenAPI] Method ${n.method} not found in operation: ${n.path}`);return{item:n,children:(0,w.jsx)(aQ,{method:n.method,pathItem:r,operation:o,path:n.path,showTitle:e,showDescription:t},`${n.path}:${n.method}`)}}),webhooks:r?.map(n=>{let r=l(i.webhooks?.[n.name]);if(!r)throw Error(`[Fumadocs OpenAPI] Webhook not found in OpenAPI schema: ${n.name}`);let o=r[n.method];if(!o)throw Error(`[Fumadocs OpenAPI] Method ${n.method} not found in webhook: ${n.name}`);return{item:n,children:(0,w.jsx)(aQ,{type:"webhook",method:n.method,pathItem:r,operation:o,path:`/${n.name}`,showTitle:e,showDescription:t},`${n.name}:${n.method}`)}})},o);return o.playground?.enabled!==!1&&(a=o.playground?.provider?o.playground.provider({children:a}):(0,w.jsx)(q,{children:a})),(0,w.jsx)(O,{servers:i.servers,children:a})}function d1(e){let t=v.Children.only(e.children).props,n=t.children;return"string"!=typeof n?null:(0,w.jsx)(F,{lang:t.className?.split(" ").find(e=>e.startsWith("language-"))?.slice(9)??"text",code:n.trimEnd()})}let d2=R({async init(t){let{createHighlighter:n,createJavaScriptRegexEngine:r}=await e.A(827868);return n({langs:[],themes:[],langAlias:t?.langAlias,engine:r()})}});R({async init(t){let{createHighlighter:n,createOnigurumaEngine:r}=await e.A(827868);return n({langs:[],themes:[],langAlias:t?.langAlias,engine:r(e.A(361288))})}});let d4=function(e={}){return function({shiki:e,shikiOptions:t={themes:{light:"github-light",dark:"github-dark"}},schemaUI:n,codeUsages:r=function(e){return e.add("curl",a9),e.add("js",ut),e.add("go",a8),e.add("python",un),e.add("java",ue),e.add("csharp",a3),e.add("rust",uo),e}(H()),generateTypeScriptDefinitions:o=(e,t)=>{if("object"==typeof e)try{return function(e,t={}){return new cZ(e,t).run()}({...t.ctx.schema.bundled,...eu(e)},{name:t.name,readOnly:t.readOnly,writeOnly:t.writeOnly})}catch(e){console.warn("Failed to generate typescript schema:",e)}},...i}){let l;return function(s){let a,u;if("preloaded"in s){if(!(a=s.preloaded.docs[s.document]))throw Error(`[Fumadocs OpenAPI] the document ${s.document} is not preloaded, make sure to pass the "preloaded" prop to <OpenAPIPage />`);u=s.preloaded.proxyUrl}else a=s.payload.bundled,u=s.payload.proxyUrl;
53let c=(0,v.useMemo)(()=>{var e;return{bundled:e=a,dereferenced:es(e),resolve:e=>Z(e)}},[a]),d=(0,v.useMemo)(()=>{let s={renderCodeblock:e=>(0,w.jsx)(F,{...e}),renderMarkdown:e=>(0,w.jsx)(G,{md:e})};return{schema:c,proxyUrl:u,shiki:e,shikiOptions:t,generateTypeScriptDefinitions:o,codeUsages:r,SchemaUI:e=>n?.render?n.render(e,d):(0,w.jsx)(dX,{...s,...e,showExample:e.showExample??n?.showExample}),...i,_default_processMarkdown(e){let t;return(l??=(t={...cO,img:void 0,pre:d1},(0,cN.remark)().use(cC).use(cT.default).use(function(){this.compiler=(e,n)=>(0,$.toJsxRuntime)(e,{development:!1,filePath:n.path,...w,components:t})}))).processSync(e).result},mediaAdapters:{..._.defaultAdapters,...i.mediaAdapters}}},[u,c]);return(0,w.jsx)(E,{ctx:d,children:(0,w.jsx)(d0,{...s})})}}({...e,shiki:e.shiki??d2})}({playground:{enabled:!0}});e.s(["OpenAPIPage",0,d4],416987)},923139,e=>{"use strict";var t=e.i(770703);let n=(0,t.default)(()=>e.A(548549),{loadableGenerated:{modules:[36940]},ssr:!1}),r=(0,t.default)(()=>e.A(758125),{loadableGenerated:{modules:[559114]},ssr:!1}),o=(0,t.default)(()=>e.A(216782),{loadableGenerated:{modules:[372242]},ssr:!1}),i=(0,t.default)(()=>e.A(768746),{loadableGenerated:{modules:[21476]},ssr:!1}),l=(0,t.default)(()=>e.A(904665),{loadableGenerated:{modules:[651610]},ssr:!1}),s=(0,t.default)(()=>e.A(781889),{loadableGenerated:{modules:[659042]},ssr:!1}),a=(0,t.default)(()=>e.A(261488),{loadableGenerated:{modules:[214491]},ssr:!1}),u=(0,t.default)(()=>e.A(481399),{loadableGenerated:{modules:[997957]},ssr:!1}),c=(0,t.default)(()=>e.A(170212),{loadableGenerated:{modules:[17635]},ssr:!1}),d=(0,t.default)(()=>e.A(238208),{loadableGenerated:{modules:[653153]},ssr:!1}),f=(0,t.default)(()=>e.A(750822),{loadableGenerated:{modules:[545500]},ssr:!1}),p=(0,t.default)(()=>e.A(139955),{loadableGenerated:{modules:[631149]},ssr:!1}),h=(0,t.default)(()=>e.A(259009),{loadableGenerated:{modules:[223356]},ssr:!1}),m=(0,t.default)(()=>e.A(82611),{loadableGenerated:{modules:[259751]},ssr:!1}),g=(0,t.default)(()=>e.A(412776),{loadableGenerated:{modules:[930657]},ssr:!1}),x=(0,t.default)(()=>
53e.A(878154),{loadableGenerated:{modules:[26558]},ssr:!1}),v=(0,t.default)(()=>e.A(406249),{loadableGenerated:{modules:[614880]},ssr:!1}),y=(0,t.default)(()=>e.A(717340),{loadableGenerated:{modules:[521055]},ssr:!1}),b=(0,t.default)(()=>e.A(402011),{loadableGenerated:{modules:[812832]},ssr:!1}),w=(0,t.default)(()=>e.A(756429),{loadableGenerated:{modules:[263241]},ssr:!1}),j=(0,t.default)(()=>e.A(729404),{loadableGenerated:{modules:[142809]},ssr:!1}),k=(0,t.default)(()=>e.A(46894),{loadableGenerated:{modules:[373606]},ssr:!1}),C=(0,t.default)(()=>e.A(223649),{loadableGenerated:{modules:[4991]},ssr:!1}),S=(0,t.default)(()=>e.A(558674),{loadableGenerated:{modules:[268547]},ssr:!1}),E=(0,t.default)(()=>e.A(614868),{loadableGenerated:{modules:[966393]},ssr:!1}),O=(0,t.default)(()=>e.A(262277),{loadableGenerated:{modules:[652069]},ssr:!1}),N=(0,t.default)(()=>e.A(258448),{loadableGenerated:{modules:[315789]},ssr:!1}),T=(0,t.default)(()=>e.A(754281),{loadableGenerated:{modules:[206530]},ssr:!1});e.s(["AccidentAndInjury",0,n,"AccidentAndInjuryWithButtonAndUpdates",0,r,"BuildersRisk",0,o,"EventHostCancellation",0,i,"EventHostLiabilityRentalCoverageWithLogging",0,l,"EventLiability",0,s,"EventLiabilityWithQuestions",0,a,"EventLogPanel",0,u,"ExhibitorLiability",0,c,"ExhibitorLiabilityOptional",0,d,"ExhibitorLiabilityWithLogging",0,f,"InsuranceRequirements",0,p,"InsuranceRequirementsWithLogging",0,h,"MultipleEvents",0,m,"MultipleProducts",0,g,"Overview",0,x,"OverviewWithLogging",0,v,"PaymentButton",0,y,"PaymentTokenization",0,b,"PaymentsEventLogPanel",0,w,"PetInsurance",0,j,"ProbateBonds",0,k,"Renters",0,C,"RentersOptional",0,S,"RoomBlockProtection",0,E,"Shipping",0,O,"Travel",0,N,"Tuition",0,T])},935250,e=>{"use strict";var t=e.i(843476),n=e.i(363178),r=e.i(271645);let o=new Map;function i(e,t){let n=o.get(e);if(n)return n;let r=t();return o.set(e,r),r}function l({chart:o}){let s=(0,r.useId)(),{resolvedTheme:a}=(0,n.useTheme)(),{default:u}=(0,r.use)(i("mermaid",()=>e.A(695802)));u.initialize({startOnLoad:!1,securityLevel:"loose",fontFamily:"inherit",themeCSS:"margin: 1.5rem auto 0;",theme:"dark"===a?"dark":"default"});let{svg:c,bindFunctions:d}=(0,r.use)(i(`${o}-${a}`,()=>u.render(s,o.replaceAll("\\n","\n"))));return(0,t.jsx)("div",{ref:e=>{e&&d?.(e)},dangerouslySetInnerHTML:{__html:c}})}e.s(["Mermaid",0,function({chart:e}){let[n,o]=(0,r.useState)(!1);if((0,r.useEffect)(()=>{o(!0)},[]),n)return(0,t.jsx)(l,{chart:e})}])},483093,e=>{"use strict";var t=e.i(843476),n=e.i(225913),r=e.i(281878),o=e.i(737877),i=e.i(475254);let l=(0,i.default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var s=e.i(664659);let a=(0,i.default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),u=(0,i.default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),c=(0,i.default)("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]);var d=e.i(271645),f=e.i(974030);let p={primary:"bg-fd-primary text-fd-primary-foreground hover:bg-fd-primary/80",outline:"border hover:bg-fd-accent hover:text-fd-accent-foreground",ghost:"hover:bg-fd-accent hover:text-fd-accent-foreground",secondary:"border bg-fd-secondary text-fd-secondary-foreground hover:bg-fd-accent hover:text-fd-accent-foreground"},h=(0,n.cva)("inline-flex items-center justify-center rounded-md p-2 text-sm font-medium transition-colors duration-100 disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring",{variants:{variant:p,color:p,size:{sm:"gap-1 px-2 py-1.5 text-xs",icon:"p-1.5 [&_svg]:size-5","icon-sm":"p-1.5 [&_svg]:size-4.5","icon-xs":"p-1 [&_svg]:size-4"}}}),m=new Map,g=(0,n.cva)("text-sm p-2 rounded-lg inline-flex items-center gap-2 hover:text-fd-accent-foreground hover:bg-fd-accent [&_svg]:size-4");e.s(["LLMCopyButton",0,function({markdownUrl:e}){let[n,r]=(0,d.useState)(!1),[i,s]=(0,o.useCopyButton)(async()=>{let t=m.get(e);if(t)return navigator.clipboard.writeText(t);r(!0);try{await navigator.clipboard.write([new ClipboardItem({"text/plain":fetch(e).then(async t=>{let n=await t.text();return m.set(e,n),n})})])}finally{r(!1)}});return(0,t.jsxs)("button",{type:"button",disabled:n,className:(0,f.cn)(h({color:"outline",size:"sm",className:"gap-2 [&_svg]:size-3.5 [&_svg]:text-fd-muted-foreground cursor-pointer"})),onClick:s,children:[i?(0,t.jsx)(l,{}):(0,t.jsx)(a,{}),"Copy Markdown"]})},"ViewOptions",0,function({markdownUrl:e}){let n=(0,d.useMemo)(()=>{let n=new URL(e,window.location.origin),r=`Read ${n}, I want to ask questions about it.`;return[{title:"Open in Scira AI",href:`https://scira.ai/?${new URLSearchParams({q:r})}`,icon:(0,t.jsxs)("svg",{width:"910",height:"934",viewBox:"0 0 910 934",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("title",{children:"Scira AI"}),(0,t.jsx)("path",{d:"M647.664 197.775C569.13 189.049 525.5 145.419 516.774 66.8849C508.048 145.419 464.418 189.049 385.884 197.775C464.418 206.501 508.048 250.131 516.774 328.665C525.5 250.131 569.13 206.501 647.664 197.775Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"8",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M516.774 304.217C510.299 275.491 498.208 252.087 480.335 234.214C462.462 216.341 439.058 204.251 410.333 197.775C439.059 191.3 462.462 179.209 480.335 161.336C498.208 143.463 510.299 120.06 516.774 91.334C523.25 120.059 535.34 143.463 553.213 161.336C571.086 179.209 594.49 191.3 623.216 197.775C594.49 204.251 571.086 216.341 553.213 234.214C535.34 252.087 523.25 275.491 516.774 304.217Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"8",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M857.5 508.116C763.259 497.644 710.903 445.288 700.432 351.047C689.961 445.288 637.605 497.644 543.364 508.116C637.605 518.587 689.961 570.943 700.432 665.184C710.903 570.943 763.259 518.587 857.5 508.116Z",stroke:"currentColor",strokeWidth:"20",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M700.432 615.957C691.848 589.05 678.575 566.357 660.383 548.165C642.191 529.973 619.499 516.7 592.593 508.116C619.499 499.533 642.191 486.258 660.383 468.066C678.575 449.874 691.848 427.181 700.432 400.274C709.015 427.181 722.289 449.874 740.481 468.066C758.673 486.258 781.365 499.533 808.271 508.116C781.365 516.7 758.673 529.973 740.481 548.165C722.289 566.357 709.015 589.05 700.432 615.957Z",stroke:"currentColor",strokeWidth:"20",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M889.949 121.237C831.049 114.692 798.326 81.9698 791.782 23.0692C785.237 81.9698 752.515 114.692 693.614 121.237C752.515 127.781 785.237 160.504 791.782 219.404C798.326 160.504 831.049 127.781 889.949 121.237Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"8",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M791.782 196.795C786.697 176.937 777.869 160.567 765.16 147.858C752.452 135.15 736.082 126.322 716.226 121.237C736.082 116.152 752.452 107.324 765.16 94.6152C777.869 81.9065 786.697 65.5368 791.782 45.6797C796.867 65.5367 805.695 81.9066 818.403 94.6152C831.112 107.324 847.481 116.152 867.338 121.237C847.481 126.322 831.112 135.15 818.403 147.858C805.694 160.567 796.867 176.937 791.782 196.795Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"8",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M760.632 764.337C720.719 814.616 669.835 855.1 611.872 882.692C553.91 910.285 490.404 924.255 426.213 923.533C362.022 922.812 298.846 907.419 241.518 878.531C184.19 849.643 134.228 808.026 95.4548 756.863C56.6815 705.7 30.1238 646.346 17.8129 583.343C5.50207 520.339 7.76433 455.354 24.4266 393.359C41.089 331.364 71.7099 274.001 113.947 225.658C156.184 177.315 208.919 139.273 268.117 114.442",stroke:"currentColor",strokeWidth:"30",strokeLinecap:"round",strokeLinejoin:"round"})]})},{title:"Open in ChatGPT",href:`https://chatgpt.com/?${new URLSearchParams({hints:"search",q:r})}
53`,icon:(0,t.jsxs)("svg",{role:"img",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("title",{children:"OpenAI"}),(0,t.jsx)("path",{d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})]})},{title:"Open in Claude",href:`https://claude.ai/new?${new URLSearchParams({q:r})}`,icon:(0,t.jsxs)("svg",{fill:"currentColor",role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("title",{children:"Anthropic"}),(0,t.jsx)("path",{d:"M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z"})]})},{title:"Open in T3 Chat",href:`https://t3.chat/new?${new URLSearchParams({q:r})}`,icon:(0,t.jsx)(c,{})},{title:"Open in Lovable AI",href:`https://lovable.ai/new?${new URLSearchParams({prompt:r})}`,icon:(0,t.jsxs)("svg",{role:"img",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("title",{children:"Lovable"}),(0,t.jsx)("path",{d:"M7.201 0c3.98 0 7.201 3.179 7.201 7.099v2.699h2.396c3.977 0 7.202 3.18 7.202 7.097C24 20.82 20.775 24 16.798 24H0V7.099C0 3.179 3.225 0 7.201 0"})]})}]},[e]);return(0,t.jsxs)(r.Popover,{children:[(0,t.jsxs)(r.PopoverTrigger,{className:(0,f.cn)(h({color:"outline",size:"sm",className:"gap-2 cursor-pointer"})),children:["Open",(0,t.jsx)(s.ChevronDown,{className:"size-3.5 text-fd-muted-foreground"})]}),(0,t.jsx)(r.PopoverContent,{className:"flex flex-col",children:n.map(e=>(0,t.jsxs)("a",{href:e.href,rel:"noreferrer noopener",target:"_blank",className:(0,f.cn)(g()),children:[e.icon,e.title,(0,t.jsx)(u,{className:"text-fd-muted-foreground size-3.5 ms-auto"})]},e.href))})]})}],483093)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.