1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,63003,(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(92783);function o({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new r.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},46328,(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}})},94366,(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(30332),o=e.r(74108),i=e.r(90264),s=e.r(46328),l=e.r(34482);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,l.getAssetTokenQuery)();return(0,r.jsx)(r.Fragment,{children:n.map(e=>{let n=`${t.assetPrefix}/_next/${(0,s.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)})})}},98354,(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(30332),o=e.r(47472),i=e.r(63003),s=e.r(94366);function l(e){return{default:e&&"default"in e?e.default:e}}let a={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},u=function(e){let t={...a,...e},n=(0,o.lazy)(()=>t.loader().then(l)),u=t.loading;function c(e){let l=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)(s.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:l}:{},children:d})}return c.displayName="LoadableComponent",c}},60426,(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(45102)._(e.r(98354));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)},461,99014,e=>{"use strict";let t,n,r,o,i,s,l,a;var u=e.i(30332),c=e.i(85891),d=e.i(9069),p=e.i(45142),f=e.i(47472),v=e.i(17348),b=e.i(31647);let m=(0,e.i(60426).default)(()=>e.A(77307),{loadableGenerated:{modules:[28429]},ssr:!1});e.s(["LazySearchDropdown",0,m,"preloadSearchDropdown",0,function(){e.A(64732)}],99014);var h=e.i(84233);let g="(min-width: 768px)";function y(e){if("function"!=typeof window.matchMedia)return()=>{};let t=window.matchMedia(g);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function x(){return"function"==typeof window.matchMedia&&window.matchMedia(g).matches}function S(){return!1}var O=e.i(87255),R=e.i(77621);e.i(15710);let E=({label:e,isRequired:t=!1,errorMessage:n,isValid:r=!0})=>(0,u.jsxs)("div",{children:[(0,u.jsxs)("label",{htmlFor:e,className:`p2 ${!r?"text-error":""}`,children:[e,t&&(0,u.jsx)("span",{className:"ml-2 text-error",children:"*"})]}),!r&&n&&(0,u.jsx)("div",{className:"p3 mt-1 text-error",children:n})]});var P=e.i(82490),I=e.i(58756),w=e.i(74108),D=e.i(7635);function C(e,t){return null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t&&"id"in e&&"id"in t?e.id===t.id:e===t}function F(e=C){return(0,f.useCallback)((t,n)=>"string"==typeof e?(null==t?void 0:t[e])===(null==n?void 0:n[e]):e(t,n),[e])}var k=e.i(4983);function T(e,t,n){let[r,o]=(0,f.useState)(n),i=void 0!==e,s=(0,f.useRef)(i),l=(0,f.useRef)(!1),a=(0,f.useRef)(!1);
1return!i||s.current||l.current?i||!s.current||a.current||(a.current=!0,s.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(l.current=!0,s.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[i?e:r,(0,k.useEvent)(e=>(i||(0,w.flushSync)(()=>o(e)),null==t?void 0:t(e)))]}function L(e){let[t]=(0,f.useState)(e);return t}var M=e.i(37468),A=e.i(39838),j=((t=j||{})[t.Left=0]="Left",t[t.Right=2]="Right",t),N=e.i(40991),_=e.i(22736),B=e.i(61189),K=e.i(8259),U=e.i(72650),V=e.i(64617),H=e.i(89407),$=e.i(20887),z=e.i(35905),G=((n=G||{})[n.Ignore=0]="Ignore",n[n.Select=1]="Select",n[n.Close=2]="Close",n);let W={kind:0},Q={kind:2};var q=e.i(92697),Y=e.i(19714),X=e.i(71241),J=e.i(18549);let Z=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ee(e){var t,n;let r=null!=(t=e.innerText)?t:"",o=e.cloneNode(!0);if(!$.isHTMLElement(o))return r;let i=!1;for(let e of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))e.remove(),i=!0;let s=i?null!=(n=o.innerText)?n:"":r;return Z.test(s)&&(s=s.replace(Z,"")),s}function et(e){return[e.screenX,e.screenY]}var en=e.i(81013),er=e.i(49242),eo=e.i(85593);function ei(e,t){return e?e+"["+t+"]":t}function es(e){var t,n;let r=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(r){for(let t of r.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type))return void t.click();null==(n=r.requestSubmit)||n.call(r)}}var el=e.i(28141),ea=e.i(23838);let eu=(0,f.createContext)(null);function ec({children:e}){let t=(0,f.useContext)(eu);if(!t)return f.default.createElement(f.default.Fragment,null,e);let{target:n}=t;return n?(0,w.createPortal)(f.default.createElement(f.default.Fragment,null,e),n):null}function ed({data:e,form:t,disabled:n,onReset:r,overrides:o}){let[i,s]=(0,f.useState)(null),l=(0,M.useDisposables)();return(0,f.useEffect)(()=>{if(r&&i)return l.addEventListener(i,"reset",r)},[i,t,r]),f.default.createElement(ec,null,f.default.createElement(ep,{setForm:s,formId:t}),(function e(t={},n=null,r=[]){for(let[o,i]of Object.entries(t))!function t(n,r,o){if(Array.isArray(o))for(let[e,i]of o.entries())t(n,ei(r,e.toString()),i);else o instanceof Date?n.push([r,o.toISOString()]):"boolean"==typeof o?n.push([r,o?"1":"0"]):"string"==typeof o?n.push([r,o]):"number"==typeof o?n.push([r,`${o}`]):null==o?n.push([r,""]):function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}(o)&&!(0,f.isValidElement)(o)&&e(o,r,n)}(r,ei(n,o),i);return r})(e).map(([e,r])=>f.default.createElement(ea.Hidden,{features:ea.HiddenFeatures.Hidden,...(0,el.compact)({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:e,value:r,...o})})))}function ep({setForm:e,formId:t}){return(0,f.useEffect)(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:f.default.createElement(ea.Hidden,{features:ea.HiddenFeatures.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}function ef(e,t){let[n,r]=(0,f.useState)(t);return e||n===t||r(t),e?n:t}f.default.forwardRef(function({children:e,freeze:t},n){let r=ef(t,e);return(0,f.isValidElement)(r)?(0,f.cloneElement)(r,{ref:n}):f.default.createElement(f.default.Fragment,null,r)});let ev=(0,f.createContext)(void 0);function eb(){return(0,f.useContext)(ev)}var em=e.i(6654),eh=e.i(33765),eg=e.i(76600),ey=((r=ey||{})[r.First=0]="First",r[r.Previous=1]="Previous",r[r.Next=2]="Next",r[r.Last=3]="Last",r[r.Specific=4]="Specific",r[r.Nothing=5]="Nothing",r);function ex(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:-1===o&&(o=n.length);for(let e=o-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=o+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:throw Error("Unexpected object: "+e)}}var eS=e.i(34793),eO=e.i(82268),eR=e.i(52827),eE=e.i(34342),eP=e.i(40948),eI=e.i(1370);let ew=(0,f.createContext)(null);function eD(e){var t,n,r;let o=null!=(n=null==(t=(0,f.useContext)(ew))?void 0:t.value)?n:void 0;return(null!=(r=null==e?void 0:e.length)?r:0)>
10?[o,...e].filter(Boolean).join(" "):o}function eC({inherit:e=!1}={}){let t=eD(),[n,r]=(0,f.useState)([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,(0,f.useMemo)(()=>function(e){let t=(0,k.useEvent)(e=>(r(t=>[...t,e]),()=>r(t=>{let n=t.slice(),r=n.indexOf(e);return -1!==r&&n.splice(r,1),n}))),n=(0,f.useMemo)(()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value}),[t,e.slot,e.name,e.props,e.value]);return f.default.createElement(ew.Provider,{value:n},e.children)},[r])]}ew.displayName="LabelContext";let eF=Object.assign((0,el.forwardRefWithAs)(function(e,t){var n;let r=(0,f.useId)(),o=function e(){let t=(0,f.useContext)(ew);if(null===t){let t=Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return t}(),i=eb(),s=(0,er.useDisabled)(),{id:l=`headlessui-label-${r}`,htmlFor:a=null!=i?i:null==(n=o.props)?void 0:n.htmlFor,passive:u=!1,...c}=e,d=(0,J.useSyncRefs)(t);(0,B.useIsoMorphicEffect)(()=>o.register(l),[l,o.register]);let p=(0,k.useEvent)(e=>{let t=e.currentTarget;if(!(e.target!==e.currentTarget&&$.isInteractiveElement(e.target))&&($.isHTMLLabelElement(t)&&e.preventDefault(),o.props&&"onClick"in o.props&&"function"==typeof o.props.onClick&&o.props.onClick(e),$.isHTMLLabelElement(t))){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;($.isHTMLInputElement(e)&&("file"===e.type||"radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}}),v=(0,X.useSlot)({...o.slot,disabled:s||!1}),b={ref:d,...o.props,id:l,htmlFor:a,onClick:p};return u&&("onClick"in b&&(delete b.htmlFor,delete b.onClick),"onClick"in c&&delete c.onClick),(0,el.useRender)()({ourProps:b,theirProps:c,slot:v,defaultTag:a?"label":"div",name:o.name||"Label"})}),{});var ek=e.i(31923),eT=e.i(24133);let eL={kind:"Idle"},eM={kind:"Moved"};function eA(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}var ej=Object.defineProperty,eN=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?ej(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,n},e_=((o=e_||{})[o.Open=0]="Open",o[o.Closed=1]="Closed",o),eB=((i=eB||{})[i.Single=0]="Single",i[i.Multi=1]="Multi",i),eK=((s=eK||{})[s.Pointer=0]="Pointer",s[s.Other=1]="Other",s),eU=((l=eU||{})[l.OpenListbox=0]="OpenListbox",l[l.CloseListbox=1]="CloseListbox",l[l.GoToOption=2]="GoToOption",l[l.Search=3]="Search",l[l.ClearSearch=4]="ClearSearch",l[l.SelectOption=5]="SelectOption",l[l.RegisterOptions=6]="RegisterOptions",l[l.UnregisterOptions=7]="UnregisterOptions",l[l.SetButtonElement=8]="SetButtonElement",l[l.SetOptionsElement=9]="SetOptionsElement",l[l.SortOptions=10]="SortOptions",l[l.MarkButtonAsMoved=11]="MarkButtonAsMoved",l);function eV(e,t=e=>e){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=(0,eO.sortByDomNode)(t(e.options.slice()),e=>e.dataRef.current.domRef.current),o=n?r.indexOf(n):null;return -1===o&&(o=null),{options:r,activeOptionIndex:o}}let eH={1(e){if(e.dataRef.current.disabled||1===e.listboxState)return e;let t=e.buttonElement?{kind:"Tracked",position:eA(e.buttonElement)}:e.buttonPositionState;return{...e,activeOptionIndex:null,pendingFocus:{focus:ey.Nothing},listboxState:1,__demoMode:!1,buttonPositionState:t}},0(e,t){if(e.dataRef.current.disabled||0===e.listboxState)return e;let n=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,o=e.options.findIndex(e=>r(e.dataRef.current.value));return -1!==o&&(n=o),{...e,frozenValue:!1,pendingFocus:t.focus,listboxState:0,activeOptionIndex:n,__demoMode:!1,buttonPositionState:eL}},2(e,t){var n,r,o,i,s;if(e.dataRef.current.disabled||1===e.listboxState)return e;let l={...e,searchQuery:"",activationTrigger:null!=(n=t.trigger)?n:1,__demoMode:!1};if(t.focus===ey.Nothing)return{...l,activeOptionIndex:null};if(t.focus===ey.Specific)return{...l,activeOptionIndex:e.options.findIndex(e=>e.id===t.id)};if(t.focus===ey.Previous){let n=e.activeOptionIndex;if(null!==n){let i=e.options[n].dataRef.current.domRef,s=ex(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==s){let t=e.options[s].dataRef.current.domRef;if((null==(r=i.current)?void 0:r.previousElementSibling)===t.current||(null==(o=t.current)?void 0:o.previousElementSibling)===null)return{...l,activeOptionIndex:s}}}}else if(t.focus===ey.Next){let n=e.activeOptionIndex;if(null!==n){let r=e.options[n].dataRef.current.domRef,o=ex(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==o){let t=e.options[o].dataRef.current.domRef;if((null==(i=r.current)?void 0:i.nextElementSibling)===t.current||(null==(s=t.current)?void 0:s.nextElementSibling)===null)return{...l,activeOptionIndex:o}}}}let a=eV(e),u=ex(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...l,...a,activeOptionIndex:u}},3:(e,t)=>
1{if(e.dataRef.current.disabled||1===e.listboxState)return e;let n=+(""===e.searchQuery),r=e.searchQuery+t.value.toLowerCase(),o=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))}),i=o?e.options.indexOf(o):-1;return -1===i||i===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:i,activationTrigger:1}},4:e=>e.dataRef.current.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},5:e=>0===e.dataRef.current.mode?{...e,frozenValue:!0}:{...e},6:(e,t)=>{let n=e.options.concat(t.options),r=e.activeOptionIndex;if(e.pendingFocus.focus!==ey.Nothing&&(r=ex(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled})),null===e.activeOptionIndex){let{isSelected:t}=e.dataRef.current;if(t){let e=n.findIndex(e=>null==t?void 0:t(e.dataRef.current.value));-1!==e&&(r=e)}}return{...e,options:n,activeOptionIndex:r,pendingFocus:{focus:ey.Nothing},pendingShouldSort:!0}},7:(e,t)=>{let n=e.options,r=[],o=new Set(t.options);for(let[e,t]of n.entries())if(o.has(t.id)&&(r.push(e),o.delete(t.id),0===o.size))break;if(r.length>0)for(let e of(n=n.slice(),r.reverse()))n.splice(e,1);return{...e,options:n,activationTrigger:1}},8:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},9:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},10:e=>e.pendingShouldSort?{...e,...eV(e),pendingShouldSort:!1}:e,11:e=>"Tracked"!==e.buttonPositionState.kind?e:{...e,buttonPositionState:eM}};class e$ extends eT.Machine{constructor(e){super(e),eN(this,"actions",{onChange:e=>{let{onChange:t,compare:n,mode:r,value:o}=this.state.dataRef.current;return(0,eR.match)(r,{0:()=>null==t?void 0:t(e),1:()=>{let r=o.slice(),i=r.findIndex(t=>n(t,e));return -1===i?r.push(e):r.splice(i,1),null==t?void 0:t(r)}})},registerOption:(0,eT.batch)(()=>{let e=[],t=new Set;return[(n,r)=>{t.has(r)||(t.add(r),e.push({id:n,dataRef:r}))},()=>(t.clear(),this.send({type:6,options:e.splice(0)}))]}),unregisterOption:(0,eT.batch)(()=>{let e=[];return[t=>e.push(t),()=>{this.send({type:7,options:e.splice(0)})}]}),goToOption:(0,eT.batch)(()=>{let e=null;return[(t,n)=>{e={type:2,...t,trigger:n}},()=>e&&this.send(e)]}),closeListbox:()=>{this.send({type:1})},openListbox:e=>{this.send({type:0,focus:e})},selectActiveOption:()=>{var e;if(null!==this.state.activeOptionIndex){let{dataRef:e}=this.state.options[this.state.activeOptionIndex];this.actions.selectOption(e.current.value)}else 0===this.state.dataRef.current.mode&&(this.actions.closeListbox(),null==(e=this.state.buttonElement)||e.focus({preventScroll:!0}))},selectOption:e=>{this.send({type:5,value:e})},search:e=>{this.send({type:3,value:e})},clearSearch:()=>{this.send({type:4})},setButtonElement:e=>{this.send({type:8,element:e})},setOptionsElement:e=>{this.send({type:9,element:e})}}),eN(this,"selectors",{activeDescendantId(e){var t;let n=e.activeOptionIndex,r=e.options;return null===n||null==(t=r[n])?void 0:t.id},isActive(e,t){var n;let r=e.activeOptionIndex,o=e.options;return null!==r&&(null==(n=o[r])?void 0:n.id)===t},hasFrozenValue:e=>e.frozenValue,shouldScrollIntoView(e,t){return!e.__demoMode&&0===e.listboxState&&0!==e.activationTrigger&&this.isActive(e,t)},didButtonMove:e=>"Moved"===e.buttonPositionState.kind}),this.on(6,()=>{requestAnimationFrame(()=>{this.send({type:10})})});{let e=this.state.id,t=eh.stackMachines.get(null);this.disposables.add(t.on(eh.ActionTypes.Push,n=>{t.selectors.isTop(n,e)||0!==this.state.listboxState||this.actions.closeListbox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}this.disposables.group(e=>{this.on(1,t=>{t.buttonElement&&(e.dispose(),e.add(function(e,t,n){let r=(0,eS.disposables)();if("Tracked"===t.kind){let o=function(){i!==eA(e)&&(r.dispose(),n())},{position:i}=t,s=new ResizeObserver(o);s.observe(e),r.add(()=>s.disconnect()),r.addEventListener(window,"scroll",o,{passive:!0}),r.addEventListener(window,"resize",o)}return()=>r.dispose()}(t.buttonElement,t.buttonPositionState,()=>{this.send({type:11})})))})}),this.on(5,(e,t)=>{var n;this.actions.onChange(t.value),0===this.state.dataRef.current.mode&&(this.actions.closeListbox(),null==(n=this.state.buttonElement)||n.focus({preventScroll:!0}))})}static new({id:e,__demoMode:t=!1}){return new e$({id:e,dataRef:{current:{}},listboxState:+!t,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:ey.Nothing},frozenValue:!1,__demoMode:t,buttonPositionState:eL})}reduce(e,t){return(0,eR.match)(t.type,eH,e,t)}}var ez=e.i(9229);let eG=(0,f.createContext)(null);function eW(e){let t=(0,f.useContext)(eG);if(null===t){let t=Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,eQ),t}return t}function eQ({id:e,__demoMode:t=!1}){let n=(0,f.useMemo)(()=>e$.new({id:e,__demoMode:t}),[]);return(0,ez.useOnUnmount)(()=>n.dispose()),n}let eq=(0,f.createContext)(null);function eY(e){let t=(0,f.useContext)(eq);
1if(null===t){let t=Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,eY),t}return t}eq.displayName="ListboxDataContext";let eX=f.Fragment,eJ=(0,f.createContext)(!1),eZ=el.RenderFeatures.RenderStrategy|el.RenderFeatures.Static,e0=f.Fragment;Object.assign((0,el.forwardRefWithAs)(function(e,t){let n=(0,f.useId)(),r=(0,er.useDisabled)(),{value:o,defaultValue:i,form:s,name:l,onChange:a,by:u,invalid:c=!1,disabled:d=r||!1,horizontal:p=!1,multiple:v=!1,__demoMode:b=!1,...m}=e,h=(0,J.useSyncRefs)(t),g=L(i),[y=v?[]:void 0,x]=T(o,a,g),S=eQ({id:n,__demoMode:b}),O=(0,f.useRef)({static:!1,hold:!1}),R=(0,f.useRef)(new Map),E=F(u),P=(0,f.useCallback)(e=>(0,eR.match)(I.mode,{[eB.Multi]:()=>y.some(t=>E(t,e)),[eB.Single]:()=>E(y,e)}),[y]),I=(0,X.useSlot)({value:y,disabled:d,invalid:c,mode:v?eB.Multi:eB.Single,orientation:p?"horizontal":"vertical",onChange:x,compare:E,isSelected:P,optionsPropsRef:O,listRef:R});(0,B.useIsoMorphicEffect)(()=>{S.state.dataRef.current=I},[I]);let w=(0,eg.useSlice)(S,e=>e.listboxState),D=eh.stackMachines.get(null),C=(0,eg.useSlice)(D,(0,f.useCallback)(e=>D.selectors.isTop(e,n),[D,n])),[k,M]=(0,eg.useSlice)(S,e=>[e.buttonElement,e.optionsElement]);(0,V.useOutsideClick)(C,[k,M],(e,t)=>{S.send({type:eU.CloseListbox}),(0,eO.isFocusableElement)(t,eO.FocusableMode.Loose)||(e.preventDefault(),null==k||k.focus())});let A=(0,X.useSlot)({open:w===e_.Open,disabled:d,invalid:c,value:y}),[j,N]=eC({inherit:!0}),_=(0,f.useCallback)(()=>{if(void 0!==g)return null==x?void 0:x(g)},[x,g]),K=(0,el.useRender)();return f.default.createElement(N,{value:j,props:{htmlFor:null==k?void 0:k.id},slot:{open:w===e_.Open,disabled:d}},f.default.createElement(eo.FloatingProvider,null,f.default.createElement(eG.Provider,{value:S},f.default.createElement(eq.Provider,{value:I},f.default.createElement(em.OpenClosedProvider,{value:(0,eR.match)(w,{[e_.Open]:em.State.Open,[e_.Closed]:em.State.Closed})},null!=l&&null!=y&&f.default.createElement(ed,{disabled:d,data:{[l]:y},form:s,onReset:_}),K({ourProps:{ref:h},theirProps:m,slot:A,defaultTag:eX,name:"Listbox"}))))))}),{Button:(0,el.forwardRefWithAs)(function(e,t){var n;let r,o=(0,f.useId)(),i=eb(),s=eY("Listbox.Button"),l=eW("Listbox.Button"),{id:a=i||`headlessui-listbox-button-${o}`,disabled:u=s.disabled||!1,autoFocus:c=!1,...d}=e,p=(0,J.useSyncRefs)(t,(0,eo.useFloatingReference)(),l.actions.setButtonElement),v=(0,eo.useFloatingReferenceProps)(),[b,m,h]=(0,eg.useSlice)(l,e=>[e.listboxState,e.buttonElement,e.optionsElement]);!function(e,{trigger:t,action:n,close:r,select:o}){let i=(0,f.useRef)(null),s=(0,f.useRef)(null),l=(0,f.useRef)(null);(0,z.useDocumentEvent)(e&&null!==t,"pointerdown",e=>{$.isNode(null==e?void 0:e.target)&&null!=t&&t.contains(e.target)&&(s.current=e.x,l.current=e.y,i.current=e.timeStamp)}),(0,z.useDocumentEvent)(e&&null!==t,"pointerup",e=>{var t,a;let u=i.current;if(null===u||(i.current=null,!$.isHTMLorSVGElement(e.target))||5>Math.abs(e.x-(null!=(t=s.current)?t:e.x))&&5>Math.abs(e.y-(null!=(a=l.current)?a:e.y)))return;let c=n(e);switch(c.kind){case 0:return;case 1:e.timeStamp-u>200&&(o(c.target),r());break;case 2:r()}},{capture:!0})}(b===e_.Open,{trigger:m,action:(0,f.useCallback)(e=>{if(null!=m&&m.contains(e.target))return W;let t=e.target.closest('[role="option"]:not([data-disabled])');return $.isHTMLElement(t)?{kind:1,target:t}:null!=h&&h.contains(e.target)?W:Q},[m,h]),close:l.actions.closeListbox,select:l.actions.selectActiveOption});let g=(0,k.useEvent)(e=>{switch(e.key){case eI.Keys.Enter:es(e.currentTarget);break;case eI.Keys.Space:case eI.Keys.ArrowDown:e.preventDefault(),l.actions.openListbox({focus:s.value?ey.Nothing:ey.First});break;case eI.Keys.ArrowUp:e.preventDefault(),l.actions.openListbox({focus:s.value?ey.Nothing:ey.Last})}}),y=(0,k.useEvent)(e=>{e.key===eI.Keys.Space&&e.preventDefault()}),x=(n=e=>{var t;l.state.listboxState===e_.Open?((0,w.flushSync)(()=>l.actions.closeListbox()),null==(t=l.state.buttonElement)||t.focus({preventScroll:!0})):(e.preventDefault(),l.actions.openListbox({focus:ey.Nothing}))},r=(0,f.useRef)(null),{onPointerDown:(0,k.useEvent)(e=>{r.current=e.pointerType,(0,N.isDisabledReactIssue7711)(e.currentTarget)||"mouse"!==e.pointerType||e.button!==j.Left||(e.preventDefault(),n(e))}),onClick:(0,k.useEvent)(e=>{"mouse"!==r.current&&((0,N.isDisabledReactIssue7711)(e.currentTarget)||n(e))})}),S=(0,k.useEvent)(e=>e.preventDefault()),O=eD([a]),R=(0,eP.useDescribedBy)(),{isFocusVisible:E,focusProps:C}=(0,P.useFocusRing)({autoFocus:c}),{isHovered:F,hoverProps:T}=(0,I.useHover)({isDisabled:u}),{pressed:L,pressProps:M}=(0,D.useActivePress)({disabled:u}),A=(0,X.useSlot)({open:b===e_.Open,active:L||b===e_.Open,disabled:u,invalid:s.invalid,value:s.value,hover:F,focus:E,autofocus:c}),_=(0,eg.useSlice)(l,e=>e.listboxState===e_.Open),B=(0,el.mergeProps)(v(),{ref:p,id:a,type:(0,q.useResolveButtonType)(e,m),"aria-haspopup":"listbox","aria-controls":null==h?void 0:h.id,"aria-expanded":_,"aria-labelledby":O,"aria-describedby":R,disabled:u||void 0,autoFocus:c,onKeyDown:g,onKeyUp:y,onKeyPress:S},x,C,T,M);return(0,el.useRender)()({ourProps:B,theirProps:d,slot:A,defaultTag:"button",name:"Listbox.Button"})}),Label:eF,Options:(0,el.forwardRefWithAs)(function(e,t){let n=(0,f.useId)(),{id:r=`headlessui-listbox-options-${n}`,anchor:o,portal:i=!1,modal:s=!0,transition:l=!1,...a}=e,u=(0,eo.useResolvedAnchor)(o),[c,d]=(0,f.useState)(null);u&&(i=!0);let p=eY("Listbox.Options"),v=eW("Listbox.Options"),[b,m,h,g]=(0,eg.useSlice)(v,e=>[e.listboxState,e.buttonElement,e.optionsElement,e.__demoMode]),y=(0,H.useOwnerDocument)(m),x=(0,H.useOwnerDocument)(h),S=(0,em.useOpenClosed)(),[O,R]=(0,en.useTransition)(l,c,null!==S?(S&em.State.Open)===em.State.Open:b===e_.Open);(0,U.useOnDisappear)(O,m,v.actions.closeListbox);let E=!g&&s&&b===e_.Open;(0,Y.useScrollLock)(E,x);let P=!g&&s&&b===e_.Open;(0,_.useInertOthers)(P,{allowed:(0,f.useCallback)(()=>[m,h],[m,h])});let I=!(0,eg.useSlice)(v,v.selectors.didButtonMove)&&O,D=ef((0,eg.useSlice)(v,v.selectors.hasFrozenValue)&&!e.static,p.value),C=(0,f.useCallback)(e=>p.compare(D,e),[p.compare,D]),F=(0,eg.useSlice)(v,e=>{var t;if(null==u||!(null!=(t=null==u?void 0:u.to)&&t.includes("selection")))return null;let n=e.options.findIndex(e=>C(e.dataRef.current.value));return -1===n&&(n=0),n}),T=(()=>
1{if(null==u)return;if(null===F)return{...u,inner:void 0};let e=Array.from(p.listRef.current.values());return{...u,inner:{listRef:{current:e},index:F}}})(),[L,j]=(0,eo.useFloatingPanel)(T),N=(0,eo.useFloatingPanelProps)(),B=(0,J.useSyncRefs)(t,u?L:null,v.actions.setOptionsElement,d),K=(0,M.useDisposables)();(0,f.useEffect)(()=>{h&&b===e_.Open&&((0,eE.isActiveElement)(h)||null==h||h.focus({preventScroll:!0}))},[b,h]);let V=(0,k.useEvent)(e=>{var t;switch(K.dispose(),e.key){case eI.Keys.Space:if(""!==v.state.searchQuery)return e.preventDefault(),e.stopPropagation(),v.actions.search(e.key);case eI.Keys.Enter:e.preventDefault(),e.stopPropagation(),v.actions.selectActiveOption();break;case(0,eR.match)(p.orientation,{vertical:eI.Keys.ArrowDown,horizontal:eI.Keys.ArrowRight}):return e.preventDefault(),e.stopPropagation(),v.actions.goToOption({focus:ey.Next});case(0,eR.match)(p.orientation,{vertical:eI.Keys.ArrowUp,horizontal:eI.Keys.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),v.actions.goToOption({focus:ey.Previous});case eI.Keys.Home:case eI.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),v.actions.goToOption({focus:ey.First});case eI.Keys.End:case eI.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),v.actions.goToOption({focus:ey.Last});case eI.Keys.Escape:e.preventDefault(),e.stopPropagation(),(0,w.flushSync)(()=>v.actions.closeListbox()),null==(t=v.state.buttonElement)||t.focus({preventScroll:!0});return;case eI.Keys.Tab:e.preventDefault(),e.stopPropagation(),(0,w.flushSync)(()=>v.actions.closeListbox()),(0,eO.focusFrom)(v.state.buttonElement,e.shiftKey?eO.Focus.Previous:eO.Focus.Next);break;default:1===e.key.length&&(v.actions.search(e.key),K.setTimeout(()=>v.actions.clearSearch(),350))}}),$=(0,eg.useSlice)(v,e=>{var t;return null==(t=e.buttonElement)?void 0:t.id}),z=(0,X.useSlot)({open:b===e_.Open}),G=(0,el.mergeProps)(u?N():{},{id:r,ref:B,"aria-activedescendant":(0,eg.useSlice)(v,v.selectors.activeDescendantId),"aria-multiselectable":p.mode===eB.Multi||void 0,"aria-labelledby":$,"aria-orientation":p.orientation,onKeyDown:V,role:"listbox",tabIndex:b===e_.Open?0:void 0,style:{...a.style,...j,"--button-width":(0,A.useElementSize)(O,m,!0).width},...(0,en.transitionDataAttributes)(R)}),W=(0,el.useRender)(),Q=(0,f.useMemo)(()=>p.mode===eB.Multi?p:{...p,isSelected:C},[p,C]);return f.default.createElement(ek.Portal,{enabled:!!i&&(e.static||O),ownerDocument:y},f.default.createElement(eq.Provider,{value:Q},W({ourProps:G,theirProps:a,slot:z,defaultTag:"div",features:eZ,visible:I,name:"Listbox.Options"}
1)))}),Option:(0,el.forwardRefWithAs)(function(e,t){let n,r,o,i=(0,f.useId)(),{id:s=`headlessui-listbox-option-${i}`,disabled:l=!1,value:a,...u}=e,c=!0===(0,f.useContext)(eJ),d=eY("Listbox.Option"),p=eW("Listbox.Option"),v=(0,eg.useSlice)(p,e=>p.selectors.isActive(e,s)),b=d.isSelected(a),m=(0,f.useRef)(null),h=(n=(0,f.useRef)(""),r=(0,f.useRef)(""),(0,k.useEvent)(()=>{let e=m.current;if(!e)return"";let t=e.innerText;if(n.current===t)return r.current;let o=(function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let e=n.split(" ").map(e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():ee(t).trim()}return null}).filter(Boolean);if(e.length>0)return e.join(", ")}return ee(e).trim()})(e).trim().toLowerCase();return n.current=t,r.current=o,o})),g=(0,K.useLatestValue)({disabled:l,value:a,domRef:m,get textValue(){return h()}}),y=(0,J.useSyncRefs)(t,m,e=>{e?d.listRef.current.set(s,e):d.listRef.current.delete(s)}),x=(0,eg.useSlice)(p,e=>p.selectors.shouldScrollIntoView(e,s));(0,B.useIsoMorphicEffect)(()=>{if(x)return(0,eS.disposables)().requestAnimationFrame(()=>{var e,t;null==(t=null==(e=m.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})},[x,m]),(0,B.useIsoMorphicEffect)(()=>{if(!c)return p.actions.registerOption(s,g),()=>p.actions.unregisterOption(s)},[g,s,c]);let S=(0,k.useEvent)(e=>{if(l)return e.preventDefault();p.actions.selectOption(a)}),O=(0,k.useEvent)(()=>{if(l)return p.actions.goToOption({focus:ey.Nothing});p.actions.goToOption({focus:ey.Specific,id:s})}),R=(o=(0,f.useRef)([-1,-1]),{wasMoved(e){let t=et(e);return(o.current[0]!==t[0]||o.current[1]!==t[1])&&(o.current=t,!0)},update(e){o.current=et(e)}}),E=(0,k.useEvent)(e=>R.update(e)),P=(0,k.useEvent)(e=>{R.wasMoved(e)&&(l||v&&p.state.activationTrigger===eK.Pointer||p.actions.goToOption({focus:ey.Specific,id:s},eK.Pointer))}),I=(0,k.useEvent)(e=>{R.wasMoved(e)&&(l||v&&p.state.activationTrigger===eK.Pointer&&p.actions.goToOption({focus:ey.Nothing}))}),w=(0,X.useSlot)({active:v,focus:v,selected:b,disabled:l,selectedOption:b&&c}),D=c?{}:{id:s,ref:y,role:"option",tabIndex:!0===l?void 0:-1,"aria-disabled":!0===l||void 0,"aria-selected":b,disabled:void 0,onClick:S,onFocus:O,onPointerEnter:E,onMouseEnter:E,onPointerMove:P,onMouseMove:P,onPointerLeave:I,onMouseLeave:I},C=(0,el.useRender)();return!b&&c?null:C({ourProps:D,theirProps:u,slot:w,defaultTag:"div",name:"Listbox.Option"})}),SelectedOption:(0,el.forwardRefWithAs)(function(e,t){let{options:n,placeholder:r,...o}=e,i={ref:(0,J.useSyncRefs)(t)},s=eY("ListboxSelectedOption"),l=(0,X.useSlot)({}),a=void 0===s.value||null===s.value||s.mode===eB.Multi&&Array.isArray(s.value)&&0===s.value.length,u=(0,el.useRender)();return f.default.createElement(eJ.Provider,{value:!0},u({ourProps:i,theirProps:{...o,children:f.default.createElement(f.default.Fragment,null,r&&a?r:n)},slot:l,defaultTag:e0,name:"ListboxSelectedOption"}))})});var e1=((a=e1||{})[a.RegisterOption=0]="RegisterOption",a[a.UnregisterOption=1]="UnregisterOption",a);let e2={0(e,t){let n=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:(0,eO.sortByDomNode)(n,e=>e.element.current)}},1(e,t){let n=e.options.slice(),r=e.options.findIndex(e=>e.id===t.id);return -1===r?e:(n.splice(r,1),{...e,options:n})}},e3=(0,f.createContext)(null);function e4(e){let t=(0,f.useContext)(e3);if(null===t){let t=Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,e4),t}return t}e3.displayName="RadioGroupDataContext";let e7=(0,f.createContext)(null);function e8(e){let t=(0,f.useContext)(e7);if(null===t){let t=Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,e8),t}return t}function e6(e,t){return(0,eR.match)(t.type,e2,e,t)}e7.displayName="RadioGroupActionsContext",Object.assign((0,el.forwardRefWithAs)(function(e,t){let n=(0,f.useId)(),r=(0,er.useDisabled)(),{id:o=`headlessui-radiogroup-${n}
1`,value:i,form:s,name:l,onChange:a,by:u,disabled:c=r||!1,defaultValue:d,tabIndex:p=0,...v}=e,b=F(u),[m,h]=(0,f.useReducer)(e6,{options:[]}),g=m.options,[y,x]=eC(),[S,O]=(0,eP.useDescriptions)(),R=(0,f.useRef)(null),E=(0,J.useSyncRefs)(R,t),P=L(d),[I,w]=T(i,a,P),D=(0,f.useMemo)(()=>g.find(e=>!e.propsRef.current.disabled),[g]),C=(0,f.useMemo)(()=>g.some(e=>b(e.propsRef.current.value,I)),[g,I]),M=(0,k.useEvent)(e=>{var t;if(c||b(e,I))return!1;let n=null==(t=g.find(t=>b(t.propsRef.current.value,e)))?void 0:t.propsRef.current;return(null==n||!n.disabled)&&(null==w||w(e),!0)}),A=(0,k.useEvent)(e=>{if(!R.current)return;let t=g.filter(e=>!1===e.propsRef.current.disabled).map(e=>e.element.current);switch(e.key){case eI.Keys.Enter:es(e.currentTarget);break;case eI.Keys.ArrowLeft:case eI.Keys.ArrowUp:if(e.preventDefault(),e.stopPropagation(),(0,eO.focusIn)(t,eO.Focus.Previous|eO.Focus.WrapAround)===eO.FocusResult.Success){let e=g.find(e=>(0,eE.isActiveElement)(e.element.current));e&&M(e.propsRef.current.value)}break;case eI.Keys.ArrowRight:case eI.Keys.ArrowDown:if(e.preventDefault(),e.stopPropagation(),(0,eO.focusIn)(t,eO.Focus.Next|eO.Focus.WrapAround)===eO.FocusResult.Success){let e=g.find(e=>(0,eE.isActiveElement)(e.element.current));e&&M(e.propsRef.current.value)}break;case eI.Keys.Space:{e.preventDefault(),e.stopPropagation();let t=g.find(e=>(0,eE.isActiveElement)(e.element.current));t&&M(t.propsRef.current.value)}}}),j=(0,k.useEvent)(e=>(h({type:0,...e}),()=>h({type:1,id:e.id}))),N=(0,f.useMemo)(()=>({value:I,firstOption:D,containsCheckedOption:C,disabled:c,compare:b,tabIndex:p,...m}),[I,D,C,c,b,p,m]),_=(0,f.useMemo)(()=>({registerOption:j,change:M}),[j,M]),B=(0,X.useSlot)({value:I}),K=(0,f.useCallback)(()=>{if(void 0!==P)return M(P)},[M,P]),U=(0,el.useRender)();return f.default.createElement(O,{name:"RadioGroup.Description"},f.default.createElement(x,{name:"RadioGroup.Label"},f.default.createElement(e7.Provider,{value:_},f.default.createElement(e3.Provider,{value:N},null!=l&&f.default.createElement(ed,{disabled:c,data:{[l]:I||"on"},overrides:{type:"radio",checked:null!=I},form:s,onReset:K}),U({ourProps:{ref:E,id:o,role:"radiogroup","aria-labelledby":y,"aria-describedby":S,onKeyDown:A},theirProps:v,slot:B,defaultTag:"div",name:"RadioGroup"})))))}),{Option:(0,el.forwardRefWithAs)(function(e,t){var n;let r=e4("RadioGroup.Option"),o=e8("RadioGroup.Option"),i=(0,f.useId)(),{id:s=`headlessui-radiogroup-option-${i}`,value:l,disabled:a=r.disabled||!1,autoFocus:u=!1,...c}=e,d=(0,f.useRef)(null),p=(0,J.useSyncRefs)(d,t),[v,b]=eC(),[m,h]=(0,eP.useDescriptions)(),g=(0,K.useLatestValue)({value:l,disabled:a});(0,B.useIsoMorphicEffect)(()=>o.registerOption({id:s,element:d,propsRef:g}),[s,o,d,g]);let y=(0,k.useEvent)(e=>{var t;if((0,N.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();o.change(l)&&(null==(t=d.current)||t.focus())}),x=(null==(n=r.firstOption)?void 0:n.id)===s,{isFocusVisible:S,focusProps:O}=(0,P.useFocusRing)({autoFocus:u}),{isHovered:R,hoverProps:E}=(0,I.useHover)({isDisabled:a}),w=r.compare(r.value,l),D=(0,el.mergeProps)({ref:p,id:s,role:"radio","aria-checked":w?"true":"false","aria-labelledby":v,"aria-describedby":m,"aria-disabled":!!a||void 0,tabIndex:a?-1:w||!r.containsCheckedOption&&x?r.tabIndex:-1,onClick:a?void 0:y,autoFocus:u},O,E),C=(0,X.useSlot)({checked:w,disabled:a,active:S,hover:R,focus:S,autofocus:u}),F=(0,el.useRender)();return f.default.createElement(h,{name:"RadioGroup.Description"},f.default.createElement(b,{name:"RadioGroup.Label"},F({ourProps:D,theirProps:c,slot:C,defaultTag:"div",name:"RadioGroup.Option"})))}),Radio:(0,el.forwardRefWithAs)(function(e,t){var n;let r=e4("Radio"),o=e8("Radio"),i=(0,f.useId)(),s=eb(),l=(0,er.useDisabled)(),{id:a=s||`headlessui-radio-${i}`,value:u,disabled:c=r.disabled||l||!1,autoFocus:d=!1,...p}=e,v=(0,f.useRef)(null),b=(0,J.useSyncRefs)(v,t),m=eD(),h=(0,eP.useDescribedBy)(),g=(0,K.useLatestValue)({value:u,disabled:c});(0,B.useIsoMorphicEffect)(()=>o.registerOption({id:a,element:v,propsRef:g}),[a,o,v,g]);let y=(0,k.useEvent)(e=>{var t;if((0,N.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();
1o.change(u)&&(null==(t=v.current)||t.focus())}),{isFocusVisible:x,focusProps:S}=(0,P.useFocusRing)({autoFocus:d}),{isHovered:O,hoverProps:R}=(0,I.useHover)({isDisabled:c}),E=(null==(n=r.firstOption)?void 0:n.id)===a,w=r.compare(r.value,u),D=(0,el.mergeProps)({ref:b,id:a,role:"radio","aria-checked":w?"true":"false","aria-labelledby":m,"aria-describedby":h,"aria-disabled":!!c||void 0,tabIndex:c?-1:w||!r.containsCheckedOption&&E?r.tabIndex:-1,autoFocus:d,onClick:c?void 0:y},S,R),C=(0,X.useSlot)({checked:w,disabled:c,hover:O,focus:x,autofocus:d});return(0,el.useRender)()({ourProps:D,theirProps:p,slot:C,defaultTag:"span",name:"Radio"})}),Label:eF,Description:eP.Description});let e9=({label:e,name:t,value:n,placeholder:r,onFocus:o=()=>{},onChange:i,autoFocus:s=!0,ariaLabelledBy:l,t:a,...c})=>(0,u.jsxs)("form",{...c,children:[e&&(0,u.jsx)("div",{className:"mb-2",children:(0,u.jsx)(E,{label:e})}),(0,u.jsxs)("div",{className:"flex rounded-full",children:[(0,u.jsx)("input",{type:"search",className:"placeholder:text-bright-blue w-full rounded-l-full border border-r-0 border-blue/60 px-4 py-2 focus:border-blue-bright focus:outline-none sm:py-3",placeholder:r,name:t,defaultValue:n,autoFocus:s,onFocus:o,onChange:e=>i?.(e.target.value),"aria-labelledby":l}),(0,u.jsx)("button",{className:"rounded-r-full bg-blue-bright hover:bg-blue focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-white","aria-label":a("Search"),type:"submit",children:(0,u.jsx)(R.Icon,{name:"Search",size:"medium",color:"white",className:"mx-5"})})]})]});e.s(["Search",0,({autoFocus:e=!0,onSearch:t,showSuggestions:n=!1})=>{let r=(0,c.useRouter)(),{country:o,lang:i}=(0,p.useParams)(),{t:s,siteUrl:l,locale:a,siteHandle:g}=(0,v.inferLocale)(o,i),[R,E]=(0,f.useState)(""),P=(0,f.useId)(),I=(0,f.useId)(),w=l("search"),D=w,C="/china/zh";if(!a.baseUrl&&D.startsWith(C)&&(D=D.substring(C.length)),"/"!==D.charAt(0))D="/"+D;else for(;D.charAt(0)===D.charAt(1);)D=D.substring(1);D=D.replace(/([^:]\/)\/+/g,"$1");let F=(0,p.usePathname)(),k="https://listings.nsf.org/certified-products-systems";function T(){F!=w&&r.prefetch(w)}function L(e){e.preventDefault();let n=e.currentTarget,o=n.getAttribute("action")??"",i=Object.fromEntries(new FormData(n).entries()),s=new URLSearchParams(i).toString();F===w&&"function"==typeof window.setSearchQuery?window.setSearchQuery(i.query):r.push(`${o}?${s}`),t&&t()}let M=(0,f.useSyncExternalStore)(y,x,S),A=n&&R.trim().length>=h.MIN_DROPDOWN_QUERY_LENGTH?(0,u.jsx)(m,{locale:a,siteHandle:g??"US_en",country:String(o),lang:String(i),query:R,searchUri:D,onNavigate:t}):null;return(0,u.jsxs)("div",{className:"container !mx-auto",children:[(0,u.jsxs)(d.TabGroup,{manual:!0,as:"div",className:"hidden md:block",children:[(0,u.jsxs)(d.TabList,{className:"-mt-2 flex items-baseline",children:[(0,u.jsx)(d.Tab,{id:P,className:"p2 border-b-2 border-transparent px-4 py-2 focus:font-bold focus:outline-none active:outline-none ui-selected:border-blue-bright ui-selected:font-semibold",children:s("Search NSF.org")}),(0,u.jsx)(d.Tab,{id:I,onClick:function(e){e.preventDefault(),window.open(k,"_blank")},className:"p2 border-b-2 border-transparent px-4 py-2 focus:font-bold focus:outline-none active:outline-none ui-selected:border-blue-bright ui-selected:font-semibold",children:s("Search Certified Products and Systems")})]}),(0,u.jsxs)(d.TabPanels,{className:"mt-3",children:[(0,u.jsxs)(d.TabPanel,{children:[(0,u.jsx)(e9,{action:D,onSubmit:L,name:"query",placeholder:s("What are you looking for?"),autoFocus:e,onFocus:T,onChange:E,ariaLabelledBy:P,t:s}),M&&A]}),(0,u.jsx)(d.TabPanel,{children:(0,u.jsx)(e9,{action:"https://info.nsf.org/Certified/Common/Company.asp",onSubmit:function(e){let n=new FormData(e.currentTarget);(0,b.sendAnalyticEvent)({event:"cert_prod_sys_search",search_term:n.get("CompanyName")}),t&&t()},target:"_blank",placeholder:s("Search Certified Products and Systems by Company Name"),name:"CompanyName",autoFocus:e,ariaLabelledBy:I,t:s})})]})]}),(0,u.jsxs)("div",{className:"space-y-5 md:hidden",children:[(0,u.jsx)(e9,{action:D,onSubmit:L,label:s("Search NSF.org"),name:"query",placeholder:s("What are you looking for?"),autoFocus:e,onFocus:T,onChange:E,t:s}),!M&&A,(0,u.jsx)(O.Button,{target:"_blank",href:k,colorTheme:"primary",className:"w-full",label:s("Search Certified Products and Systems")})]})]})}],461)}]);
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.