1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95470,70202,9663,e=>{"use strict";let t,n,r,i,l,o,s;var a=e.i(83222),u=e.i(33336),c=e.i(71645),d=e.i(74080),p=e.i(94487),f=e.i(14189),m=e.i(46725),b=e.i(92704),h=((t=h||{})[t.Left=0]="Left",t[t.Right=2]="Right",t),v=e.i(33538),g=e.i(84653),x=e.i(35696),y=e.i(41444),S=e.i(77891),w=e.i(52744),O=e.i(5083),E=e.i(13581),R=e.i(22357),j=((n=j||{})[n.Ignore=0]="Ignore",n[n.Select=1]="Select",n[n.Close=2]="Close",n);let F={kind:0},I={kind:2};var D=e.i(44279),M=e.i(1852),N=e.i(55743),C=e.i(94316);let P=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function k(e){var t,n;let r=null!=(t=e.innerText)?t:"",i=e.cloneNode(!0);if(!E.isHTMLElement(i))return r;let l=!1;for(let e of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))e.remove(),l=!0;let o=l?null!=(n=i.innerText)?n:"":r;return P.test(o)&&(o=o.replace(P,"")),o}function L(e){return[e.screenX,e.screenY]}var T=e.i(83733),A=e.i(1893),B=e.i(19751);function z(e,t){return e?e+"["+t+"]":t}var K=e.i(20),V=e.i(2788);let _=(0,c.createContext)(null);function $({children:e}){let t=(0,c.useContext)(_);if(!t)return c.default.createElement(c.default.Fragment,null,e);let{target:n}=t;return n?(0,d.createPortal)(c.default.createElement(c.default.Fragment,null,e),n):null}function H({data:e,form:t,disabled:n,onReset:r,overrides:i}){let[l,o]=(0,c.useState)(null),s=(0,m.useDisposables)();return(0,c.useEffect)(()=>{if(r&&l)return s.addEventListener(l,"reset",r)},[l,t,r]),c.default.createElement($,null,c.default.createElement(U,{setForm:o,formId:t}),(function e(t={},n=null,r=[]){for(let[i,l]of Object.entries(t))!function t(n,r,i){if(Array.isArray(i))for(let[e,l]of i.entries())t(n,z(r,e.toString()),l);else i instanceof Date?n.push([r,i.toISOString()]):"boolean"==typeof i?n.push([r,i?"1":"0"]):"string"==typeof i?n.push([r,i]):"number"==typeof i?n.push([r,`${i}`]):null==i?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)}(i)&&!(0,c.isValidElement)(i)&&e(i,r,n)}(r,z(n,i),l);return r})(e).map(([e,r])=>c.default.createElement(V.Hidden,{features:V.HiddenFeatures.Hidden,...(0,K.compact)({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:e,value:r,...i})})))}function U({setForm:e,formId:t}){return(0,c.useEffect)(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:c.default.createElement(V.Hidden,{features:V.HiddenFeatures.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}function Y(e,t){let[n,r]=(0,c.useState)(t);return e||n===t||r(t),e?n:t}c.default.forwardRef(function({children:e,freeze:t},n){let r=Y(t,e);return(0,c.isValidElement)(r)?(0,c.cloneElement)(r,{ref:n}):c.default.createElement(c.default.Fragment,null,r)});let q=(0,c.createContext)(void 0);function Z(){return(0,c.useContext)(q)}var W=e.i(33137),Q=e.i(41650),G=e.i(40407),J=((r=J||{})[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 X(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=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===i&&(i=n.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+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 ee=e.i(44508),et=e.i(52265),en=e.i(97701),er=e.i(2155),ei=e.i(35889),el=e.i(98348);let eo=(0,c.createContext)(null);function es(e){var t,n,r;let i=null!=(n=null==(t=(0,c.useContext)(eo))?void 0:t.value)?n:void 0;return(null!=(r=null==e?void 0:e.length)?r:0)>
10?[i,...e].filter(Boolean).join(" "):i}eo.displayName="LabelContext";let ea=Object.assign((0,K.forwardRefWithAs)(function(e,t){var n;let r=(0,c.useId)(),i=function e(){let t=(0,c.useContext)(eo);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}(),l=Z(),o=(0,A.useDisabled)(),{id:s=`headlessui-label-${r}`,htmlFor:a=null!=l?l:null==(n=i.props)?void 0:n.htmlFor,passive:u=!1,...d}=e,p=(0,C.useSyncRefs)(t);(0,x.useIsoMorphicEffect)(()=>i.register(s),[s,i.register]);let m=(0,f.useEvent)(e=>{let t=e.currentTarget;if(!(e.target!==e.currentTarget&&E.isInteractiveElement(e.target))&&(E.isHTMLLabelElement(t)&&e.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),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;(E.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})}}}),b=(0,N.useSlot)({...i.slot,disabled:o||!1}),h={ref:p,...i.props,id:s,htmlFor:a,onClick:m};return u&&("onClick"in h&&(delete h.htmlFor,delete h.onClick),"onClick"in d&&delete d.onClick),(0,K.useRender)()({ourProps:h,theirProps:d,slot:b,defaultTag:a?"label":"div",name:i.name||"Label"})}),{});var eu=e.i(35307),ec=e.i(25720);let ed={kind:"Idle"},ep={kind:"Moved"};function ef(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}var em=Object.defineProperty,eb=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?em(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,n},eh=((i=eh||{})[i.Open=0]="Open",i[i.Closed=1]="Closed",i),ev=((l=ev||{})[l.Single=0]="Single",l[l.Multi=1]="Multi",l),eg=((o=eg||{})[o.Pointer=0]="Pointer",o[o.Other=1]="Other",o),ex=((s=ex||{})[s.OpenListbox=0]="OpenListbox",s[s.CloseListbox=1]="CloseListbox",s[s.GoToOption=2]="GoToOption",s[s.Search=3]="Search",s[s.ClearSearch=4]="ClearSearch",s[s.SelectOption=5]="SelectOption",s[s.RegisterOptions=6]="RegisterOptions",s[s.UnregisterOptions=7]="UnregisterOptions",s[s.SetButtonElement=8]="SetButtonElement",s[s.SetOptionsElement=9]="SetOptionsElement",s[s.SortOptions=10]="SortOptions",s[s.MarkButtonAsMoved=11]="MarkButtonAsMoved",s);function ey(e,t=e=>e){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=(0,et.sortByDomNode)(t(e.options.slice()),e=>e.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return -1===i&&(i=null),{options:r,activeOptionIndex:i}}let eS={1(e){if(e.dataRef.current.disabled||1===e.listboxState)return e;let t=e.buttonElement?{kind:"Tracked",position:ef(e.buttonElement)}:e.buttonPositionState;return{...e,activeOptionIndex:null,pendingFocus:{focus:J.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,i=e.options.findIndex(e=>r(e.dataRef.current.value));return -1!==i&&(n=i),{...e,frozenValue:!1,pendingFocus:t.focus,listboxState:0,activeOptionIndex:n,__demoMode:!1,buttonPositionState:ed}},2(e,t){var n,r,i,l,o;if(e.dataRef.current.disabled||1===e.listboxState)return e;let s={...e,searchQuery:"",activationTrigger:null!=(n=t.trigger)?n:1,__demoMode:!1};if(t.focus===J.Nothing)return{...s,activeOptionIndex:null};if(t.focus===J.Specific)return{...s,activeOptionIndex:e.options.findIndex(e=>e.id===t.id)};if(t.focus===J.Previous){let n=e.activeOptionIndex;if(null!==n){let l=e.options[n].dataRef.current.domRef,o=X(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==(r=l.current)?void 0:r.previousElementSibling)===t.current||(null==(i=t.current)?void 0:i.previousElementSibling)===null)return{...s,activeOptionIndex:o}}}}else if(t.focus===J.Next){let n=e.activeOptionIndex;if(null!==n){let r=e.options[n].dataRef.current.domRef,i=X(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==i){let t=e.options[i].dataRef.current.domRef;if((null==(l=r.current)?void 0:l.nextElementSibling)===t.current||(null==(o=t.current)?void 0:o.nextElementSibling)===null)return{...s,activeOptionIndex:i}}}}let a=ey(e),u=X(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...s,...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(),i=(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))}),l=i?e.options.indexOf(i):-1;return -1===l||l===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:l,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!==J.Nothing&&(r=X(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:J.Nothing},pendingShouldSort:!0}},7:(e,t)=>{let n=e.options,r=[],i=new Set(t.options);for(let[e,t]of n.entries())if(i.has(t.id)&&(r.push(e),i.delete(t.id),0===i.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,...ey(e),pendingShouldSort:!1}:e,11:e=>"Tracked"!==e.buttonPositionState.kind?e:{...e,buttonPositionState:ep}};class ew extends ec.Machine{constructor(e){super(e),eb(this,"actions",{onChange:e=>{let{onChange:t,compare:n,mode:r,value:i}=this.state.dataRef.current;return(0,en.match)(r,{0:()=>null==t?void 0:t(e),1:()=>{let r=i.slice(),l=r.findIndex(t=>n(t,e));return -1===l?r.push(e):r.splice(l,1),null==t?void 0:t(r)}})},registerOption:(0,ec.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,ec.batch)(()=>{let e=[];return[t=>e.push(t),()=>{this.send({type:7,options:e.splice(0)})}]}),goToOption:(0,ec.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})}}),eb(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,i=e.options;return null!==r&&(null==(n=i[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=Q.stackMachines.get(null);this.disposables.add(t.on(Q.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,ee.disposables)();if("Tracked"===t.kind){let i=function(){l!==ef(e)&&(r.dispose(),n())},{position:l}=t,o=new ResizeObserver(i);o.observe(e),r.add(()=>o.disconnect()),r.addEventListener(window,"scroll",i,{passive:!0}),r.addEventListener(window,"resize",i)}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 ew({id:e,dataRef:{current:{}},listboxState:+!t,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:J.Nothing},frozenValue:!1,__demoMode:t,buttonPositionState:ed})}reduce(e,t){return(0,en.match)(t.type,eS,e,t)}}var eO=e.i(26599);let eE=(0,c.createContext)(null);function eR(e){let t=(0,c.useContext)(eE);if(null===t){let t=Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ej),t}return t}function ej({id:e,__demoMode:t=!1}){let n=(0,c.useMemo)(()=>ew.new({id:e,__demoMode:t}),[]);return(0,eO.useOnUnmount)(()=>n.dispose()),n}let eF=(0,c.createContext)(null);function eI(e){let t=(0,c.useContext)(eF);if(null===t){let t=Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,eI),t}return t}eF.displayName="ListboxDataContext";let eD=c.Fragment,eM=(0,c.createContext)(!1),eN=K.RenderFeatures.RenderStrategy|K.RenderFeatures.Static,eC=c.Fragment,eP=(0,K.forwardRefWithAs)(function(e,t){let n=(0,c.useId)(),r=(0,A.useDisabled)(),{value:i,defaultValue:l,form:o,name:s,onChange:a,by:u,invalid:p=!1,disabled:m=r||!1,horizontal:b=!1,multiple:h=!1,__demoMode:v=!1,...g}=e,y=(0,C.useSyncRefs)(t),S=function(e){let[t]=(0,c.useState)(e);return t}(l),[O=h?[]:void 0,E]=function(e,t,n){let[r,i]=(0,c.useState)(n),l=void 0!==e,o=(0,c.useRef)(l),s=(0,c.useRef)(!1),a=(0,c.useRef)(!1);return!l||o.current||s.current?l||!o.current||a.current||(a.current=!0,o.current=l,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.")):(s.current=!0,o.current=l,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.")),[l?e:r,(0,f.useEvent)(e=>(l||(0,d.flushSync)(()=>i(e)),null==t?void 0:t(e)))]}(i,a,S),R=ej({id:n,__demoMode:v}),j=(0,c.useRef)({static:!1,hold:!1}),F=(0,c.useRef)(new Map),I=function(e=function(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}){return(0,c.useCallback)((t,n)=>"string"==typeof e?(null==t?void 0:t[e])===(null==n?void 0:n[e]):e(t,n),[e])}(u),D=(0,c.useCallback)(e=>(0,en.match)(M.mode,{[ev.Multi]:()=>O.some(t=>I(t,e)),[ev.Single]:()=>I(O,e)}),[O]),M=(0,N.useSlot)({value:O,disabled:m,invalid:p,mode:h?ev.Multi:ev.Single,orientation:b?"horizontal":"vertical",onChange:E,compare:I,isSelected:D,optionsPropsRef:j,listRef:F});(0,x.useIsoMorphicEffect)(()=>{R.state.dataRef.current=M},[M]);let P=(0,G.useSlice)(R,e=>e.listboxState),k=Q.stackMachines.get(null),L=(0,G.useSlice)(k,(0,c.useCallback)(e=>k.selectors.isTop(e,n),[k,n])),[T,z]=(0,G.useSlice)(R,e=>[e.buttonElement,e.optionsElement]);(0,w.useOutsideClick)(L,[T,z],(e,t)=>{R.send({type:ex.CloseListbox}),(0,et.isFocusableElement)(t,et.FocusableMode.Loose)||(e.preventDefault(),null==T||T.focus())});let V=(0,N.useSlot)({open:P===eh.Open,disabled:m,invalid:p,value:O}),[_,$]=function({inherit:e=!1}={}
1){let t=es(),[n,r]=(0,c.useState)([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,(0,c.useMemo)(()=>function(e){let t=(0,f.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,c.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 c.default.createElement(eo.Provider,{value:n},e.children)},[r])]}({inherit:!0}),U=(0,c.useCallback)(()=>{if(void 0!==S)return null==E?void 0:E(S)},[E,S]),Y=(0,K.useRender)();return c.default.createElement($,{value:_,props:{htmlFor:null==T?void 0:T.id},slot:{open:P===eh.Open,disabled:m}},c.default.createElement(B.FloatingProvider,null,c.default.createElement(eE.Provider,{value:R},c.default.createElement(eF.Provider,{value:M},c.default.createElement(W.OpenClosedProvider,{value:(0,en.match)(P,{[eh.Open]:W.State.Open,[eh.Closed]:W.State.Closed})},null!=s&&null!=O&&c.default.createElement(H,{disabled:m,data:{[s]:O},form:o,onReset:U}),Y({ourProps:{ref:y},theirProps:g,slot:V,defaultTag:eD,name:"Listbox"}))))))}),ek=(0,K.forwardRefWithAs)(function(e,t){var n;let r,i=(0,c.useId)(),l=Z(),o=eI("Listbox.Button"),s=eR("Listbox.Button"),{id:m=l||`headlessui-listbox-button-${i}`,disabled:b=o.disabled||!1,autoFocus:g=!1,...x}=e,y=(0,C.useSyncRefs)(t,(0,B.useFloatingReference)(),s.actions.setButtonElement),S=(0,B.useFloatingReferenceProps)(),[w,O,j]=(0,G.useSlice)(s,e=>[e.listboxState,e.buttonElement,e.optionsElement]);!function(e,{trigger:t,action:n,close:r,select:i}){let l=(0,c.useRef)(null),o=(0,c.useRef)(null),s=(0,c.useRef)(null);(0,R.useDocumentEvent)(e&&null!==t,"pointerdown",e=>{E.isNode(null==e?void 0:e.target)&&null!=t&&t.contains(e.target)&&(o.current=e.x,s.current=e.y,l.current=e.timeStamp)}),(0,R.useDocumentEvent)(e&&null!==t,"pointerup",e=>{var t,a;let u=l.current;if(null===u||(l.current=null,!E.isHTMLorSVGElement(e.target))||5>Math.abs(e.x-(null!=(t=o.current)?t:e.x))&&5>Math.abs(e.y-(null!=(a=s.current)?a:e.y)))return;let c=n(e);switch(c.kind){case 0:return;case 1:e.timeStamp-u>200&&(i(c.target),r());break;case 2:r()}},{capture:!0})}(w===eh.Open,{trigger:O,action:(0,c.useCallback)(e=>{if(null!=O&&O.contains(e.target))return F;let t=e.target.closest('[role="option"]:not([data-disabled])');return E.isHTMLElement(t)?{kind:1,target:t}:null!=j&&j.contains(e.target)?F:I},[O,j]),close:s.actions.closeListbox,select:s.actions.selectActiveOption});let M=(0,f.useEvent)(e=>{switch(e.key){case el.Keys.Enter:!function(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)}}(e.currentTarget);break;case el.Keys.Space:case el.Keys.ArrowDown:e.preventDefault(),s.actions.openListbox({focus:o.value?J.Nothing:J.First});break;case el.Keys.ArrowUp:e.preventDefault(),s.actions.openListbox({focus:o.value?J.Nothing:J.Last})}}),P=(0,f.useEvent)(e=>{e.key===el.Keys.Space&&e.preventDefault()}),k=(n=e=>{var t;s.state.listboxState===eh.Open?((0,d.flushSync)(()=>s.actions.closeListbox()),null==(t=s.state.buttonElement)||t.focus({preventScroll:!0})):(e.preventDefault(),s.actions.openListbox({focus:J.Nothing}))},r=(0,c.useRef)(null),{onPointerDown:(0,f.useEvent)(e=>{r.current=e.pointerType,(0,v.isDisabledReactIssue7711)(e.currentTarget)||"mouse"!==e.pointerType||e.button!==h.Left||(e.preventDefault(),n(e))}),onClick:(0,f.useEvent)(e=>{"mouse"!==r.current&&((0,v.isDisabledReactIssue7711)(e.currentTarget)||n(e))})}),L=(0,f.useEvent)(e=>e.preventDefault()),T=es([m]),A=(0,ei.useDescribedBy)(),{isFocusVisible:z,focusProps:V}=(0,a.useFocusRing)({autoFocus:g}),{isHovered:_,hoverProps:$}=(0,u.useHover)({isDisabled:b}),{pressed:H,pressProps:U}=(0,p.useActivePress)({disabled:b}),Y=(0,N.useSlot)({open:w===eh.Open,active:H||w===eh.Open,disabled:b,invalid:o.invalid,value:o.value,hover:_,focus:z,autofocus:g}),q=(0,G.useSlice)(s,e=>e.listboxState===eh.Open),W=(0,K.mergeProps)(S(),{ref:y,id:m,type:(0,D.useResolveButtonType)(e,O),"aria-haspopup":"listbox","aria-controls":null==j?void 0:j.id,"aria-expanded":q,"aria-labelledby":T,"aria-describedby":A,disabled:b||void 0,autoFocus:g,onKeyDown:M,onKeyUp:P,onKeyPress:L},k,V,$,U);return(0,K.useRender)()({ourProps:W,theirProps:x,slot:Y,defaultTag:"button",name:"Listbox.Button"})}),eL=(0,K.forwardRefWithAs)(function(e,t){let n=(0,c.useId)(),{id:r=`headlessui-listbox-options-${n}`,anchor:i,portal:l=!1,modal:o=!0,transition:s=!1,...a}=e,u=(0,B.useResolvedAnchor)(i),[p,h]=(0,c.useState)(null);u&&(l=!0);let v=eI("Listbox.Options"),x=eR("Listbox.Options"),[y,w,E,R]=(0,G.useSlice)(x,e=>[e.listboxState,e.buttonElement,e.optionsElement,e.__demoMode]),j=(0,O.useOwnerDocument)(w),F=(0,O.useOwnerDocument)(E),I=(0,W.useOpenClosed)(),[D,P]=(0,T.useTransition)(s,p,null!==I?(I&W.State.Open)===W.State.Open:y===eh.Open);(0,S.useOnDisappear)(D,w,x.actions.closeListbox);let k=!R&&o&&y===eh.Open;(0,M.useScrollLock)(k,F);let L=!R&&o&&y===eh.Open;(0,g.useInertOthers)(L,{allowed:(0,c.useCallback)(()=>[w,E],[w,E])});let A=!(0,G.useSlice)(x,x.selectors.didButtonMove)&&D,z=Y((0,G.useSlice)(x,x.selectors.hasFrozenValue)&&!e.static,v.value),V=(0,c.useCallback)(e=>v.compare(z,e),[v.compare,z]),_=(0,G.useSlice)(x,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=>V(e.dataRef.current.value));return -1===n&&(n=0),n}),$=(()=>
1{if(null==u)return;if(null===_)return{...u,inner:void 0};let e=Array.from(v.listRef.current.values());return{...u,inner:{listRef:{current:e},index:_}}})(),[H,U]=(0,B.useFloatingPanel)($),q=(0,B.useFloatingPanelProps)(),Z=(0,C.useSyncRefs)(t,u?H:null,x.actions.setOptionsElement,h),Q=(0,m.useDisposables)();(0,c.useEffect)(()=>{E&&y===eh.Open&&((0,er.isActiveElement)(E)||null==E||E.focus({preventScroll:!0}))},[y,E]);let X=(0,f.useEvent)(e=>{var t;switch(Q.dispose(),e.key){case el.Keys.Space:if(""!==x.state.searchQuery)return e.preventDefault(),e.stopPropagation(),x.actions.search(e.key);case el.Keys.Enter:e.preventDefault(),e.stopPropagation(),x.actions.selectActiveOption();break;case(0,en.match)(v.orientation,{vertical:el.Keys.ArrowDown,horizontal:el.Keys.ArrowRight}):return e.preventDefault(),e.stopPropagation(),x.actions.goToOption({focus:J.Next});case(0,en.match)(v.orientation,{vertical:el.Keys.ArrowUp,horizontal:el.Keys.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),x.actions.goToOption({focus:J.Previous});case el.Keys.Home:case el.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),x.actions.goToOption({focus:J.First});case el.Keys.End:case el.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),x.actions.goToOption({focus:J.Last});case el.Keys.Escape:e.preventDefault(),e.stopPropagation(),(0,d.flushSync)(()=>x.actions.closeListbox()),null==(t=x.state.buttonElement)||t.focus({preventScroll:!0});return;case el.Keys.Tab:e.preventDefault(),e.stopPropagation(),(0,d.flushSync)(()=>x.actions.closeListbox()),(0,et.focusFrom)(x.state.buttonElement,e.shiftKey?et.Focus.Previous:et.Focus.Next);break;default:1===e.key.length&&(x.actions.search(e.key),Q.setTimeout(()=>x.actions.clearSearch(),350))}}),ee=(0,G.useSlice)(x,e=>{var t;return null==(t=e.buttonElement)?void 0:t.id}),ei=(0,N.useSlot)({open:y===eh.Open}),eo=(0,K.mergeProps)(u?q():{},{id:r,ref:Z,"aria-activedescendant":(0,G.useSlice)(x,x.selectors.activeDescendantId),"aria-multiselectable":v.mode===ev.Multi||void 0,"aria-labelledby":ee,"aria-orientation":v.orientation,onKeyDown:X,role:"listbox",tabIndex:y===eh.Open?0:void 0,style:{...a.style,...U,"--button-width":(0,b.useElementSize)(D,w,!0).width},...(0,T.transitionDataAttributes)(P)}),es=(0,K.useRender)(),ea=(0,c.useMemo)(()=>v.mode===ev.Multi?v:{...v,isSelected:V},[v,V]);return c.default.createElement(eu.Portal,{enabled:!!l&&(e.static||D),ownerDocument:j},c.default.createElement(eF.Provider,{value:ea},es({ourProps:eo,theirProps:a,slot:ei,defaultTag:"div",features:eN,visible:A,name:"Listbox.Options"}
1)))}),eT=(0,K.forwardRefWithAs)(function(e,t){let n,r,i,l=(0,c.useId)(),{id:o=`headlessui-listbox-option-${l}`,disabled:s=!1,value:a,...u}=e,d=!0===(0,c.useContext)(eM),p=eI("Listbox.Option"),m=eR("Listbox.Option"),b=(0,G.useSlice)(m,e=>m.selectors.isActive(e,o)),h=p.isSelected(a),v=(0,c.useRef)(null),g=(n=(0,c.useRef)(""),r=(0,c.useRef)(""),(0,f.useEvent)(()=>{let e=v.current;if(!e)return"";let t=e.innerText;if(n.current===t)return r.current;let i=(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():k(t).trim()}return null}).filter(Boolean);if(e.length>0)return e.join(", ")}return k(e).trim()})(e).trim().toLowerCase();return n.current=t,r.current=i,i})),S=(0,y.useLatestValue)({disabled:s,value:a,domRef:v,get textValue(){return g()}}),w=(0,C.useSyncRefs)(t,v,e=>{e?p.listRef.current.set(o,e):p.listRef.current.delete(o)}),O=(0,G.useSlice)(m,e=>m.selectors.shouldScrollIntoView(e,o));(0,x.useIsoMorphicEffect)(()=>{if(O)return(0,ee.disposables)().requestAnimationFrame(()=>{var e,t;null==(t=null==(e=v.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})},[O,v]),(0,x.useIsoMorphicEffect)(()=>{if(!d)return m.actions.registerOption(o,S),()=>m.actions.unregisterOption(o)},[S,o,d]);let E=(0,f.useEvent)(e=>{if(s)return e.preventDefault();m.actions.selectOption(a)}),R=(0,f.useEvent)(()=>{if(s)return m.actions.goToOption({focus:J.Nothing});m.actions.goToOption({focus:J.Specific,id:o})}),j=(i=(0,c.useRef)([-1,-1]),{wasMoved(e){let t=L(e);return(i.current[0]!==t[0]||i.current[1]!==t[1])&&(i.current=t,!0)},update(e){i.current=L(e)}}),F=(0,f.useEvent)(e=>j.update(e)),I=(0,f.useEvent)(e=>{j.wasMoved(e)&&(s||b&&m.state.activationTrigger===eg.Pointer||m.actions.goToOption({focus:J.Specific,id:o},eg.Pointer))}),D=(0,f.useEvent)(e=>{j.wasMoved(e)&&(s||b&&m.state.activationTrigger===eg.Pointer&&m.actions.goToOption({focus:J.Nothing}))}),M=(0,N.useSlot)({active:b,focus:b,selected:h,disabled:s,selectedOption:h&&d}),P=d?{}:{id:o,ref:w,role:"option",tabIndex:!0===s?void 0:-1,"aria-disabled":!0===s||void 0,"aria-selected":h,disabled:void 0,onClick:E,onFocus:R,onPointerEnter:F,onMouseEnter:F,onPointerMove:I,onMouseMove:I,onPointerLeave:D,onMouseLeave:D},T=(0,K.useRender)();return!h&&d?null:T({ourProps:P,theirProps:u,slot:M,defaultTag:"div",name:"Listbox.Option"})}),eA=Object.assign(eP,{Button:ek,Label:ea,Options:eL,Option:eT,SelectedOption:(0,K.forwardRefWithAs)(function(e,t){let{options:n,placeholder:r,...i}=e,l={ref:(0,C.useSyncRefs)(t)},o=eI("ListboxSelectedOption"),s=(0,N.useSlot)({}),a=void 0===o.value||null===o.value||o.mode===ev.Multi&&Array.isArray(o.value)&&0===o.value.length,u=(0,K.useRender)();return c.default.createElement(eM.Provider,{value:!0},u({ourProps:l,theirProps:{...i,children:c.default.createElement(c.default.Fragment,null,r&&a?r:n)},slot:s,defaultTag:eC,name:"ListboxSelectedOption"}))})});
1e.s(["Listbox",0,eA,"ListboxButton",0,ek,"ListboxOption",0,eT,"ListboxOptions",0,eL],95470);let eB=c.forwardRef(function({title:e,titleId:t,...n},r){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?c.createElement("title",{id:t},e):null,c.createElement("path",{fillRule:"evenodd",d:"M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353 4.493-6.74a.75.75 0 0 1 1.04-.207Z",clipRule:"evenodd"}))});e.s(["CheckIcon",0,eB],70202);let ez=c.forwardRef(function({title:e,titleId:t,...n},r){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?c.createElement("title",{id:t},e):null,c.createElement("path",{fillRule:"evenodd",d:"M5.22 10.22a.75.75 0 0 1 1.06 0L8 11.94l1.72-1.72a.75.75 0 1 1 1.06 1.06l-2.25 2.25a.75.75 0 0 1-1.06 0l-2.25-2.25a.75.75 0 0 1 0-1.06ZM10.78 5.78a.75.75 0 0 1-1.06 0L8 4.06 6.28 5.78a.75.75 0 0 1-1.06-1.06l2.25-2.25a.75.75 0 0 1 1.06 0l2.25 2.25a.75.75 0 0 1 0 1.06Z",clipRule:"evenodd"}))});e.s(["ChevronUpDownIcon",0,ez],9663)},78847,e=>{"use strict";var t=e.i(43476),n=e.i(71645),r=e.i(95470),i=e.i(70202),l=e.i(9663),o=e.i(98307);let s=n.forwardRef(function({title:e,titleId:t,...r},i){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?n.createElement("title",{id:t},e):null,n.createElement("path",{d:"M5.75 7.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM5 10.25a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0ZM10.25 7.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM7.25 8.25a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0ZM8 9.5A.75.75 0 1 0 8 11a.75.75 0 0 0 0-1.5Z"}),n.createElement("path",{fillRule:"evenodd",d:"M4.75 1a.75.75 0 0 0-.75.75V3a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2V1.75a.75.75 0 0 0-1.5 0V3h-5V1.75A.75.75 0 0 0 4.75 1ZM3.5 7a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v4.5a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1V7Z",clipRule:"evenodd"}))}),a=n.forwardRef(function({title:e,titleId:t,...r},i){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?n.createElement("title",{id:t},e):null,n.createElement("path",{fillRule:"evenodd",d:"M9.78 4.22a.75.75 0 0 1 0 1.06L7.06 8l2.72 2.72a.75.75 0 1 1-1.06 1.06L5.47 8.53a.75.75 0 0 1 0-1.06l3.25-3.25a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))}),u=n.forwardRef(function({title:e,titleId:t,...r},i){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?n.createElement("title",{id:t},e):null,n.createElement("path",{fillRule:"evenodd",d:"M6.22 4.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06l-3.25 3.25a.75.75 0 0 1-1.06-1.06L8.94 8 6.22 5.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}),c=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function d(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function p(e){let t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${r}`}function f(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function m(e,t){return d(e).getTime()<d(t).getTime()}function b({id:e,name:r,label:i,required:l=!1,minDate:h,placeholder:v="Select a date",className:g=""}){let x=(0,n.useMemo)(()=>d(new Date),[]),y=h?d(h):x,[S,w]=(0,n.useState)(null),[O,E]=(0,n.useState)(()=>new Date(y)),R=new Intl.DateTimeFormat("en-GB",{month:"long",year:"numeric"}).format(O),j=(0,n.useMemo)(()=>{let e,t=0===(e=new Date(O.getFullYear(),O.getMonth(),1).getDay())?6:e-1,n=new Date(O.getFullYear(),O.getMonth()+1,0).getDate(),r=new Date(O.getFullYear(),O.getMonth(),0).getDate(),i=[];for(let e=t-1;e>=0;e-=1)i.push({date:new Date(O.getFullYear(),O.getMonth()-1,r-e),inCurrentMonth:!1});for(let e=1;e<=n;e+=1)i.push({date:new Date(O.getFullYear(),O.getMonth(),e),inCurrentMonth:!0});for(;i.length%7!=0;){let e=i.length-t-n+1;i.push({date:new Date(O.getFullYear(),O.getMonth()+1,e),inCurrentMonth:!1})}return i},[O]);
1function F(){E(e=>new Date(e.getFullYear(),e.getMonth()-1,1))}function I(){E(e=>new Date(e.getFullYear(),e.getMonth()+1,1))}return(0,t.jsxs)("div",{className:g,children:[(0,t.jsxs)("label",{htmlFor:e,className:"block text-sm font-medium text-gray-900",children:[i,l?" *":""]}),(0,t.jsx)("input",{type:"hidden",id:e,name:r,value:S?p(S):"",required:l}),(0,t.jsx)(o.Popover,{className:"relative mt-2",children:({close:n})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(o.PopoverButton,{type:"button","aria-labelledby":`${e}-label`,className:"date-field-trigger flex w-full items-center justify-between rounded-xl border-0 bg-bcs-surface px-4 py-3 text-left text-base text-gray-900 ring-1 ring-[var(--bcs-border)] transition focus:outline-none focus:ring-2 focus:ring-bcs-blue data-open:ring-2 data-open:ring-bcs-blue",children:[(0,t.jsx)("span",{id:`${e}-label`,className:S?"text-gray-900":"text-gray-400",children:S?new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"long",year:"numeric"}).format(S):v}),(0,t.jsx)(s,{"aria-hidden":"true",className:"size-5 shrink-0 text-bcs-blue"})]}),(0,t.jsxs)(o.PopoverPanel,{transition:!0,anchor:"bottom start",className:"z-30 mt-2 w-[min(20rem,calc(100vw-2rem))] rounded-2xl bg-white p-4 shadow-lg ring-1 ring-[var(--bcs-border)] transition data-closed:scale-95 data-closed:opacity-0 data-enter:duration-150 data-enter:ease-out data-leave:duration-100 data-leave:ease-in",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:F,className:"inline-flex size-8 items-center justify-center rounded-full text-gray-600 ring-1 ring-[var(--bcs-border)] hover:bg-bcs-surface hover:text-bcs-blue","aria-label":"Previous month",children:(0,t.jsx)(a,{"aria-hidden":"true",className:"size-4"})}),(0,t.jsx)("p",{className:"text-sm font-semibold text-gray-900",children:R}),(0,t.jsx)("button",{type:"button",onClick:I,className:"inline-flex size-8 items-center justify-center rounded-full text-gray-600 ring-1 ring-[var(--bcs-border)] hover:bg-bcs-surface hover:text-bcs-blue","aria-label":"Next month",children:(0,t.jsx)(u,{"aria-hidden":"true",className:"size-4"})})]}),(0,t.jsxs)("div",{className:"mt-4 grid grid-cols-7 gap-1 text-center",children:[c.map(e=>(0,t.jsx)("span",{className:"py-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:e},e)),j.map(({date:e,inCurrentMonth:r})=>{let i=m(e,y),l=!!S&&f(e,S),o=f(e,x);return(0,t.jsx)("button",{type:"button",disabled:i,onClick:()=>{!m(e,y)&&(w(d(e)),E(d(e)),n())},className:`inline-flex size-9 items-center justify-center rounded-full text-sm transition ${l?"bg-bcs-blue font-semibold text-white":o?"font-semibold text-bcs-blue ring-1 ring-bcs-blue/30":r?"text-gray-900 hover:bg-bcs-surface":"text-gray-400 hover:bg-bcs-surface"} ${i?"cursor-not-allowed opacity-35 hover:bg-transparent":""}`,children:e.getDate()},p(e))})]})]})]})})]})}let h=[{value:"courses",label:"Courses & education"},{value:"memberships",label:"Membership"},{value:"collaboration",label:"Collaboration"},{value:"general",label:"General"}],v="block text-sm font-medium text-gray-900";function g({value:e,onChange:n,inputClassName:o}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"topic",className:v,children:"Topic *"}),(0,t.jsx)(r.Listbox,{value:e,onChange:n,children:(0,t.jsxs)("div",{className:"relative mt-2",children:[(0,t.jsx)("input",{type:"hidden",name:"topic",value:e?.value??"",required:!0}),(0,t.jsxs)(r.ListboxButton,{id:"topic",className:`${o} relative w-full text-left`,children:[(0,t.jsx)("span",{className:e?"text-gray-900":"text-gray-400",children:e?.label??"Select a topic"}),(0,t.jsx)(l.ChevronUpDownIcon,{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 right-3 size-5 -translate-y-1/2 text-gray-400"})]}),(0,t.jsx)(r.ListboxOptions,{transition:!0,anchor:"bottom start",className:"z-30 mt-1 max-h-60 w-[var(--button-width)] overflow-auto rounded-xl bg-white py-1 shadow-lg ring-1 ring-gray-900/5 transition data-closed:scale-95 data-closed:opacity-0 data-enter:duration-100 data-enter:ease-out data-leave:duration-75 data-leave:ease-in focus:outline-none",children:h.map(n=>(0,t.jsxs)(r.ListboxOption,{value:n,className:"group relative cursor-pointer py-2.5 pr-9 pl-3 text-base text-gray-900 select-none data-focus:bg-bcs-blue data-focus:text-white data-focus:outline-none",children:[(0,t.jsx)("span",{className:"block truncate",children:n.label}),e?.value===n.value&&(0,t.jsx)("span",{className:"absolute inset-y-0 right-0 flex items-center pr-3 text-bcs-blue group-data-focus:text-white",children:(0,t.jsx)(i.CheckIcon,{"aria-hidden":"true",className:"size-5"})})]},n.value))})]})})]})}e.s(["SiteForm",0,function({title:e,submitLabel:r="Submit",variant:i="contact",embedded:l
1=!1,description:o="Send us a message and a member of the BCS team will get back to you."}){let[s,a]=(0,n.useState)(null),[u,c]=(0,n.useState)("idle"),[d,p]=(0,n.useState)(null),f="appointment"===i;async function m(e){e.preventDefault();let t=e.currentTarget,n=Object.fromEntries(new FormData(t).entries());c("sending"),p(null);try{let e=await fetch(f?"/api/appointment":"/api/contact",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}),r=await e.json();if(!e.ok){c("error"),p(r.error??"Something went wrong. Please try again.");return}c("sent"),p(r.message??"Thank you. Your message has been sent."),t.reset(),a(null)}catch{c("error"),p("We could not send your message. Please check your connection and try again.")}}let h=f?"mt-2 block w-full rounded-xl border-0 bg-bcs-patient px-4 py-3 text-base text-gray-900 ring-1 ring-bcs-green/20 focus:ring-2 focus:ring-bcs-green":"mt-2 block w-full rounded-xl border-0 bg-bcs-surface px-4 py-3 text-base text-gray-900 ring-1 ring-[var(--bcs-border)] focus:ring-2 focus:ring-bcs-blue",x=(0,t.jsxs)("div",{className:f?"rounded-2xl bg-white p-8 ring-1 ring-bcs-green/20 sm:p-10":"clinical-card p-8 sm:p-10",children:[(0,t.jsx)("span",{className:"eyebrow-pill eyebrow-pill--patient",children:f?"For patients":"Contact"}),"sent"===u?(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("h2",{className:"text-2xl font-semibold tracking-tight",children:f?"Request received":"Message sent"}),(0,t.jsx)("p",{className:"mt-3 text-base/7 text-gray-600",children:d}),(0,t.jsx)("button",{type:"button",onClick:()=>{c("idle"),p(null)},className:"mt-8 w-full rounded-md bg-bcs-green px-5 py-3 text-sm font-semibold text-white shadow-sm hover:bg-bcs-green/90 sm:w-auto",children:f?"Send another request":"Send another message"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h2",{className:"mt-4 text-2xl font-semibold tracking-tight",children:e}),(0,t.jsx)("p",{className:"mt-3 text-sm/6 text-gray-500",children:o}),(0,t.jsxs)("form",{className:"mt-8 space-y-5",onSubmit:m,noValidate:!1,children:[(0,t.jsxs)("div",{className:`grid gap-5 ${"contact"===i?"sm:grid-cols-2 xl:grid-cols-4":"sm:grid-cols-3"}`,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"email",className:v,children:"Email *"}),(0,t.jsx)("input",{id:"email",name:"email",type:"email",required:!0,autoComplete:"email",className:h})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"first-name",className:v,children:"First name *"}),(0,t.jsx)("input",{id:"first-name",name:"first-name",type:"text",required:!0,autoComplete:"given-name",className:h})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"last-name",className:v,children:"Last name *"}),(0,t.jsx)("input",{id:"last-name",name:"last-name",type:"text",required:!0,autoComplete:"family-name",className:h})]}),"contact"===i&&(0,t.jsx)(g,{value:s,onChange:a,inputClassName:h})]}),"appointment"===i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"grid gap-5 sm:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"practitioner",className:v,children:"Preferred practitioner"}),(0,t.jsx)("input",{id:"practitioner",name:"practitioner",type:"text",placeholder:"Name or practitioner ID",className:h})]}),(0,t.jsx)(b,{id:"preferred-date",name:"preferred-date",label:"Preferred date",placeholder:"Select preferred date"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"reason",className:v,children:"Reason for appointment"}),(0,t.jsx)("input",{id:"reason",name:"reason",type:"text",className:h})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"message",className:v,children:"appointment"===i?"Additional details *":"Message *"}),(0,t.jsx)("textarea",{id:"message",name:"message",rows:5,required:!0,className:h})]}),(0,t.jsxs)("div",{className:"hidden","aria-hidden":"true",children:[(0,t.jsx)("label",{htmlFor:"website",children:"Website"}),(0,t.jsx)("input",{id:"website",name:"website",type:"text",tabIndex:-1})]}),(0,t.jsx)("button",{type:"submit",disabled:"sending"===u,className:"w-full rounded-md bg-bcs-green px-5 py-3 text-sm font-semibold text-white shadow-sm hover:bg-bcs-green/90 disabled:cursor-not-allowed disabled:opacity-60 sm:w-auto",children:"sending"===u?"Sending...":r}),"error"===u&&d&&(0,t.jsx)("p",{role:"alert",className:"text-sm/6 text-bcs-red",children:d})]})]})]});return l?x:(0,t.jsx)("div",{className:"bg-bcs-surface py-16 sm:py-24",children:(0,t.jsx)("div",{className:"site-container",children:(0,t.jsx)("div",{className:"content-narrow-sm",children:x})})})}],78847)}]);
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.