1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1240],{31240:(e,t,r)=>{r.d(t,{Sc:()=>D,UI:()=>S,zp:()=>M,pp:()=>A,W7:()=>q,mk:()=>z,R0:()=>k,Gi:()=>B,Py:()=>F,l6:()=>R,Gk:()=>L,ph:()=>j,Gw:()=>w,Iu:()=>v,aQ:()=>b,rG:()=>p,fs:()=>E,ks:()=>C});var l=r(6029),n=r(55729),a=r(28408),o=r(71422),i=r(55988),s=r(60722);let c=e=>{let{onClose:t,children:r}=e,a=(0,n.useRef)(null),o=e=>{"Escape"===e.key&&t&&t()},i=e=>{!a.current.contains(e.target)&&t&&t()};return(0,n.useEffect)(()=>(document.addEventListener("click",i),document.addEventListener("keyup",o),()=>{document.removeEventListener("click",i),document.removeEventListener("keyup",o)}),[t]),(0,l.jsx)("div",{ref:a,children:r})};var d=r(36938),u=r(99572),x=r(65814),m=r(26111),g=r(51369);let h=e=>{let{options:t=[],onChange:r,placeholderText:a,dropDownLabel:o,tooltip:i}=e,s=t.filter(e=>e.selected);return(0,l.jsx)(d.WF,{value:t,onChange:r,children:e=>{let{open:r}=e;return(0,l.jsxs)(l.Fragment,{children:[o&&(0,l.jsx)(d.WF.Label,{className:"block text-sm font-medium text-gray-700",children:o}),(0,l.jsxs)("div",{className:"mt-1 relative",children:[(0,l.jsxs)(d.WF.Button,{className:"relative w-full bg-white border border-gray-300 rounded-md shadow-sm pl-3 pr-10 py-2 text-left cursor-default focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm",children:[(0,l.jsx)("span",{className:"block truncate text-ellipsis",children:s.length?s.length>1?"".concat(s[0].label," & ").concat(s.length-1," more"):s[0].label:a}),(0,l.jsx)("span",{className:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none",children:(0,l.jsx)(m.zp,{className:"h-5 w-5","aria-hidden":"true"})})]}),(0,l.jsx)(u.e,{show:r,as:n.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,l.jsx)(d.WF.Options,{className:"absolute z-10 mt-1 w-full bg-white shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black/5 overflow-auto focus:outline-none sm:text-sm",children:t.map(e=>(0,l.jsx)(d.WF.Option,{className:e=>{let{focus:t}=e;return(0,g.cx)(t?"text-white bg-indigo-600":"text-gray-900","cursor-default select-none relative py-2 pl-8 pr-4")},value:e,children:t=>{let{focus:r}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("span",{className:(0,g.cx)(e.selected?"font-semibold":"font-normal","block truncate"),children:[e.label,i&&(0,l.jsx)(x.Ay,{content:e.description,placement:"top",children:(0,l.jsx)("span",{children:(0,l.jsx)(m.uQ,{className:"hidden mx-1 sm:h-4 sm:w-4 sm:inline"})})})]}),e.selected?(0,l.jsx)("span",{className:(0,g.cx)(r?"text-white":"text-indigo-600","absolute inset-y-0 left-0 flex items-center pl-1.5"),children:(0,l.jsx)(m.AF,{className:"h-6 w-6","aria-hidden":"true"})}):null]})}},e.id))})})]})]})}})};var f=r(98746);let p=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,l.jsx)("input",{className:(0,g.cx)("text-sm rounded-lg border border-gray-300 bg-white hover:border-gray-400 focus:border-gray-400 focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 px-3 py-2 w-full focus:outline-none text-gray-800 placeholder-gray-400",r),...n,ref:t})}),b=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,l.jsx)("textarea",{className:(0,g.cx)("text-sm rounded-lg border border-gray-300 bg-white hover:border-gray-400 focus:border-gray-400 focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 px-3 py-2 w-full focus:outline-none text-gray-800 placeholder-gray-400 min-h-[80px]",r),...n,ref:t})}),v=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,l.jsx)("select",{className:(0,g.cx)("text-sm rounded-lg border border-gray-300 bg-white hover:border-gray-400 focus:border-gray-400 focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 px-3 py-2 w-full focus:outline-none text-gray-800",r),...n,ref:t})}),y=e=>{let{options:t,value:r,setValue:n,className:o}=e;return(0,l.jsx)(a.z6,{value:r,onChange:n,className:(0,g.cx)("mt-2 grid grid-cols-3 gap-3 sm:grid-cols-6",o),children:t.map(e=>(0,l.jsx)(a.z6.Option,{value:e.value,className:(0,g.cx)("flex items-center justify-center rounded-md bg-white px-3 py-3 text-sm font-semibold ring-1 hover:bg-gray-50 focus:ring-2 outline-none cursor-pointer sm:flex-1",{"text-gray-900 ring-gray-300 focus:ring-indigo":r!==e.value},{"text-indigo ring-indigo focus:ring-indigo":r===e.value}),children:e.label},e.value))})},j=n.forwardRef((e,t)=>
1{let{className:r,checked:n,onChange:a,...o}=e;return(0,l.jsx)("input",{type:"checkbox",className:(0,g.cx)("form-checkbox focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 my-1 h-4 w-4 text-indigo-600 border-gray-300 rounded",r),checked:n,onChange:a,onKeyDown:e=>"Enter"===e.key&&e.preventDefault(),...o,ref:t})}),w=e=>{let{htmlFor:t,className:r,children:n}=e;return(0,l.jsx)("label",{htmlFor:t,className:(0,g.cx)("text-sm font-medium text-gray-600 tracking-tight leading-normal text-left cursor-pointer mb-2",r),children:n})},N=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,l.jsx)("input",{type:"file",className:(0,g.cx)("text-base rounded-lg shadow-sm border border-gray-300 focus:border-gray-400 px-3 py-2 focus:outline-none appearance-none",r),...n,ref:t,value:""})}),k=e=>{let{label:t,children:r,required:n,className:a,suppressRequiredStar:i=!1,suppressErrorMessage:s=!1,...c}=e,[d,u]=(0,o.Mt)(c),x=c.id||d.id||d.name;return(0,l.jsxs)("div",{className:(0,g.cx)("w-full flex flex-col mb-4",a),children:[t&&(0,l.jsxs)("label",{htmlFor:x,className:"block text-sm font-medium text-gray-600 tracking-tight leading-normal text-left mb-2",children:[t,n&&!i&&(0,l.jsx)("span",{className:"text-red-600","aria-label":"Required",children:"\xa0*"})]}),r,u.touched&&u.error&&!s?(0,l.jsx)("div",{className:"text-red-600 text-xs text-left mt-1",children:u.error}):null]})},C=e=>{let{required:t,onBlur:r,onChange:n,...a}=e,[i]=(0,o.Mt)(a);return(0,l.jsx)(k,{required:t,...a,children:(0,l.jsx)(p,{id:a.id||i.name,required:t,...i,...a,onBlur:e=>{i.onBlur(e),r&&r(e)},onChange:e=>{n&&n(e),i.onChange(e)}})})},E=e=>{let{required:t,onBlur:r,...n}=e,[a]=(0,o.Mt)(n);return(0,l.jsx)(k,{required:t,...n,children:(0,l.jsx)(b,{id:n.id||a.name,required:t,...a,...n,onBlur:e=>{a.onBlur(e),r&&r(e)}})})},R=e=>{let{required:t,options:r,placeholder:n,onChange:a,children:i,...s}=e,[c,,d]=(0,o.Mt)(s);return(0,l.jsx)(k,{required:t,...s,children:(0,l.jsxs)(v,{id:s.id||c.name,required:t,...c,...s,onChange:e=>{c.onChange(e),d.setTouched(!0),a&&a(e.target.value)},children:[n&&(0,l.jsx)("option",{value:"",children:n}),null==r?void 0:r.map(e=>{let{value:t,label:r}=e;return(0,l.jsx)("option",{value:t,children:r},t)}),i]})})},F=e=>{let{required:t,...r}=e,[n,a,i]=(0,o.Mt)(r);return(0,l.jsx)(k,{required:t,...r,children:(0,l.jsx)(y,{setValue:i.setValue,...n,...r})})},D=e=>{var t;let{label:r,className:n,onChange:a,...i}=e,[s]=(0,o.Mt)({...i,type:"checkbox"});return(0,l.jsx)(k,{className:n,...i,children:(0,l.jsxs)("label",{className:"flex items-start text-sm font-medium text-gray-600 tracking-tight leading-normal text-left cursor-pointer",children:[(0,l.jsx)(j,{...s,...i,value:null!=(t=i.value)?t:"true",onChange:e=>{s.onChange(e),a&&a(e)}}),(0,l.jsx)("span",{className:"ml-3",children:r})]})})},L=e=>{let{label:t,name:r,required:n,...a}=e,[i,s,c]=(0,o.Mt)(r);return(0,l.jsx)(k,{label:t,name:r,required:n,children:(0,l.jsx)(f.A,{...a,onRating:c.setValue})})},M=e=>{let{required:t,...r}=e,[n,a,i]=(0,o.Mt)(r),{value:s}=a,{setValue:c}=i,d="".concat(n.name,"-filename"),u=r.id||n.name;return(0,l.jsx)(k,{required:t,...r,children:s?(0,l.jsxs)("div",{className:"flex",children:[(0,l.jsx)("span",{id:d,className:"text-sm md:text-base font-medium leading-tight text-gray-600","aria-live":"polite",children:s.name}),(0,l.jsx)("button",{type:"button",onClick:()=>c(void 0),className:"ml-4 text-sm md:text-base font-medium leading-tight text-indigo","aria-labelledby":d,"aria-label":"Remove file ".concat(s.name),children:"Remove"})]}):(0,l.jsx)(N,{id:u,required:t,...n,...r})})},S=e=>{let{required:t,...r}=e,[a,s,c]=(0,o.Mt)(r),{value:d}=s,{setValue:u}=c,x=n.useRef(null),m=r.id||a.name||"input-file-upload",h="".concat(m,"-filename"),[f,p]=n.useState(!1),[b,v]=n.useState(!1),y=e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?v(!0):"dragleave"===e.type&&v(!1)};return(0,l.jsx)(k,{required:t,...r,children:d?(0,l.jsxs)("div",{className:"flex",children:[(0,l.jsx)("span",{id:h,className:"text-sm md:text-base font-medium leading-tight text-gray-600","aria-live":"polite",children:d.name}),(0,l.jsx)("button",{type:"button",onClick:()=>u(void 0),className:"ml-4 text-sm md:text-base font-medium leading-tight text-indigo","aria-labelledby":h,"aria-label":"Remove file ".concat(d.name),children:"Remove"})]}):(0,l.jsxs)("div",{onDragEnter:y,className:(0,g.cx)(b&&"bg-gray-200 border-gray-400","flex justify-center w-full h-32 px-4 transition bg-white border-2 border-gray-300 border-dashed rounded-md appearance-none cursor-pointer hover:border-gray-400 focus:outline-none"),children:[(0,l.jsx)(N,{id:m,required:t,...a,...r,className:"hidden",ref:x}),(0,l.jsxs)("label",{className:"flex items-center justify-center space-x-2",htmlFor:m,children:[(0,l.jsx)(i.A,{className:"h-6 w-6 text-gray-600 mr-1"}),b?(0,l.jsx)("span",{className:"font-medium text-gray-600",children:"Drop here"}):(0,l.jsxs)("span",{className:"font-medium text-gray-600",children:[f&&(0,l.jsx)("span",{className:"font-semibold text-red-600",children:"Incorrect file type. "}),"Drop files to attach, or"," ",(0,l.jsx)("button",{type:"button",className:"text-blue-600 underline",onClick:()=>{x.current.click()},children:"browse"})]})]}),b&&(0,l.jsx)("div",{className:"absolute w-full h-full rounded-lg top-0 right-0 bottom-0 left-0",onDragEnter:y,onDragLeave:y,onDragOver:y,onDrop:e=>{if(e.preventDefault(),e.stopPropagation(),v(!1),e.dataTransfer.files&&e.dataTransfer.files[0]){if
1(e.dataTransfer.files[0].type!==r.accept)return void p(!0);p(!1),u(e.dataTransfer.files[0])}}})]})})},z=e=>{let{updateSuggestions:t,required:r,suggestions:a=[],open:i=!1,onBlur:s,strictSelection:d=!1,multiSelect:u=!1,...x}=e,[m,h]=(0,n.useState)(i),[f,b]=(0,n.useState)(-1),[v,y]=(0,n.useState)(null),[j,w]=(0,n.useState)([]),[N,C]=(0,n.useState)(""),E=(0,n.useRef)(null),R=(0,n.useRef)(null),F=(0,n.useRef)(null),[D]=(0,o.Mt)(x),{setFieldValue:L}=(0,o.j7)();(0,n.useEffect)(()=>{if(u){if(Array.isArray(D.value)&&D.value.length>0&&0===j.length){let e=D.value.map(e=>{var t;return null==(t=a.find(t=>{let{item:r}=t;return r.name===e}))?void 0:t.item}).filter(Boolean);e.length>0&&w(e)}}else if(D.value&&a.length>0&&!v){let e=a.find(e=>{let{item:t}=e;return t.name===D.value});e&&y(e.item)}},[D.value,a,v,j.length,u]);let M=e=>{if(e>=0&&E.current){let t=E.current.querySelector("#suggestion-".concat(e));t&&t.scrollIntoView({block:"nearest"})}},S=e=>{h(!0),b(-1),u?(C(e.target.value),t(e.target.value)):(y(null),t(e.target.value),D.onChange(e))},z=e=>{if(b(-1),u){var r;let l;w(l=j.some(t=>t.id===e.id)?j.filter(t=>t.id!==e.id):[...j,e]),C(""),t(""),L(D.name,l.map(e=>e.name)),null==(r=F.current)||r.focus()}else h(!1),y(e),t(e.name),L(D.name,e.name),s&&s({target:{value:e.name}})},q=e=>{var t;let r=j.filter(t=>t.id!==e.id);w(r),L(D.name,r.map(e=>e.name)),null==(t=F.current)||t.focus()},A=e=>{var t;if(null==(t=R.current)||!t.contains(e.relatedTarget)){if(h(!1),b(-1),d&&!u){let t=e.target.value;!a.find(e=>{let{item:r}=e;return r.name===t})&&t&&(v?L(D.name,v.name):L(D.name,""))}u&&C(""),s&&s(e)}},B=e=>{switch(e.key){case"Backspace":u&&""===N&&j.length>0&&q(j[j.length-1]);break;case"ArrowDown":{if(!m||0===a.length)return;e.preventDefault();let t=f<a.length-1?f+1:0;b(t),M(t);break}case"ArrowUp":{if(!m||0===a.length)return;e.preventDefault();let t=f>0?f-1:a.length-1;b(t),M(t);break}case"Escape":if(!m||0===a.length)return;e.preventDefault(),h(!1),b(-1);break;case"Enter":e.preventDefault(),f>=0&&a[f]&&z(a[f].item)}},T=e=>e.preventDefault();return u?(0,l.jsx)(k,{required:r,...x,children:(0,l.jsx)(c,{onClose:m&&a.length>0?()=>h(!1):null,children:(0,l.jsxs)("div",{className:"relative",ref:R,children:[(0,l.jsxs)("div",{role:"group",className:(0,g.cx)("flex flex-wrap items-center gap-1.5 text-sm rounded-lg border border-gray-300 bg-white hover:border-gray-400 focus-within:border-gray-400 focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-indigo-500 px-2 py-1.5 w-full"),onClick:()=>{var e;return null==(e=F.current)?void 0:e.focus()},onKeyDown:e=>{var t;("Enter"===e.key||" "===e.key)&&(null==(t=F.current)||t.focus())},children:[j.map(e=>(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 bg-indigo-100 text-indigo-800 text-xs font-medium px-2 py-1 rounded",children:[e.image_url&&(0,l.jsx)("img",{src:e.image_url,alt:"",className:"h-3 w-3 object-contain"}),e.name,(0,l.jsx)("button",{type:"button",onClick:t=>{t.stopPropagation(),q(e)},className:"text-indigo-600 hover:text-indigo-800 focus:outline-none","aria-label":"Remove ".concat(e.name),children:(0,l.jsx)("svg",{className:"h-3 w-3",fill:"currentColor",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]},e.id)),(0,l.jsx)("input",{ref:F,type:"text",value:N,onChange:S,onBlur:A,onFocus:()=>h(!0),onKeyDown:B,className:"flex-1 min-w-[120px] border-0 p-0.5 focus:outline-none focus:ring-0 text-sm text-gray-800 placeholder-gray-400",placeholder:0===j.length?x.placeholder:"",autoFocus:i,autoComplete:"off",role:"combobox","aria-controls":"suggestions-listbox","aria-expanded":m&&a.length>0,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-activedescendant":f>=0?"suggestion-".concat(f):void 0})]}),(0,l.jsx)("ul",{ref:E,className:(0,g.cx)("absolute left-0 right-0 border border-gray-200 shadow-lg rounded-lg z-10 overflow-hidden max-h-48 bg-white",m&&a.length>
10?"visible":"invisible"),style:{top:"100%",marginTop:4},role:"listbox",children:(0,l.jsx)("div",{className:"flex flex-col bg-white overflow-auto max-h-48 scrollbar-hidden",children:a.map((e,t)=>{let{item:r}=e,n=j.some(e=>e.id===r.id);return(0,l.jsx)("li",{children:(0,l.jsxs)("button",{id:"suggestion-".concat(t),type:"button",onMouseDown:T,onClick:()=>z(r),onMouseEnter:()=>b(t),className:(0,g.cx)("w-full py-3 px-5 cursor-pointer text-sm text-left flex items-center hover:bg-gray-50",n&&"text-indigo-700"),role:"option","aria-selected":n,children:[r.image_url&&(0,l.jsx)("img",{src:r.image_url,alt:"".concat(r.name," logo"),className:"h-3.5 w-3.5 mr-2 object-contain"}),r.name,n&&(0,l.jsx)("svg",{className:"ml-auto h-4 w-4 text-indigo-600",fill:"currentColor",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]})},r.id)})})})]})})}):(0,l.jsx)(k,{required:r,...x,children:(0,l.jsx)(c,{onClose:m&&a.length>0?()=>h(!1):null,children:(0,l.jsxs)("div",{className:"relative",ref:R,children:[(0,l.jsxs)("div",{className:"relative",children:[(null==v?void 0:v.image_url)&&(0,l.jsx)("img",{src:v.image_url,alt:"",className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 object-contain"}),(0,l.jsx)(p,{...D,...x,ref:F,className:(0,g.cx)("text-sm",{"pl-8":null==v?void 0:v.image_url}),onChange:S,onBlur:A,onFocus:()=>h(!0),onKeyDown:B,autoFocus:i,autoComplete:"off",role:"combobox","aria-expanded":m&&a.length>0,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-activedescendant":f>=0?"suggestion-".concat(f):void 0})]}),(0,l.jsx)("ul",{ref:E,className:(0,g.cx)("absolute left-0 right-0 border border-gray-200 shadow-lg rounded-lg z-10 overflow-hidden max-h-48 bg-white",m&&a.length>0?"visible":"invisible"),style:{top:"100%",marginTop:4},role:"listbox",children:(0,l.jsx)("div",{className:"flex flex-col bg-white overflow-auto max-h-48 scrollbar-hidden",children:a.map((e,t)=>{let{item:r}=e;return(0,l.jsx)("li",{children:(0,l.jsxs)("button",{id:"suggestion-".concat(t),type:"button",onMouseDown:T,onClick:()=>z(r),onMouseEnter:()=>b(t),className:(0,g.cx)("w-full py-3 px-5 cursor-pointer text-sm text-left flex items-center",f===t?"bg-gray-100":"hover:bg-gray-50"),role:"option","aria-selected":f===t,children:[r.image_url&&(0,l.jsx)("img",{src:r.image_url,alt:"".concat(r.name," logo"),className:"h-3.5 w-3.5 mr-2 object-contain"}),r.name]})},r.id)})})})]})})})},q=e=>{let{name:t,label:r,required:n,onSelect:a,...i}=e,[,{value:c},{setValue:d}]=(0,o.Mt)(t);return(0,l.jsx)(k,{name:t,label:r,required:n,children:(0,l.jsx)(s.A,{id:t,ariaLabel:r,value:c,onChange:e=>{d(e),a&&a(e)},showReset:!1,highlightActive:!1,...i})})},A=e=>{let{name:t,label:r,options:a,placeHolder:i,required:s,...c}=e,[,{value:d},{setValue:u}
1]=(0,o.Mt)(t),[x,m]=(0,n.useState)([]);return(0,n.useEffect)(()=>{m(a.map(e=>({...e,selected:d.includes(e.value)})))},[a,d]),(0,l.jsx)(k,{name:t,label:r,required:s,children:(0,l.jsx)(h,{options:x,placeholderText:i||"Select",onChange:e=>{let t=x.map(t=>t.value===e.value?{...t,selected:!t.selected}:t);m(t),u(t.filter(e=>e.selected).map(e=>e.value))},...c})})},B=e=>{let{name:t,label:r,options:n,required:i}=e,[s,c,d]=(0,o.Mt)(t);return(0,l.jsxs)(k,{name:t,label:r,required:i,children:[(0,l.jsx)(a.z6,{value:c.value,onChange:d.setValue,className:"mt-2 flex gap-3",children:n.map(e=>(0,l.jsx)(a.z6.Option,{value:e.value,className:(0,g.cx)("flex items-center justify-center rounded-md bg-white px-3 py-3 text-sm font-semibold ring-1 hover:bg-gray-50 focus:ring-2 outline-none cursor-pointer sm:flex-1",{"text-gray-900 ring-gray-300 focus:ring-indigo":c.value!==e.value},{"text-indigo ring-indigo focus:ring-indigo":c.value===e.value}),children:e.label},e.value))}),(0,l.jsxs)("div",{className:"mt-3 flex justify-between text-sm font-medium leading-tight text-gray-600",children:[(0,l.jsx)("div",{children:"Not at all likely"}),(0,l.jsx)("div",{children:"Extremely likely"})]})]})}},60722:(e,t,r)=>{r.d(t,{A:()=>p});var l=r(6029),n=r(55729),a=r(56760),o=r(96341),i=r.n(o),s=r(71434),c=r.n(s),d=r(26111),u=r(57521),x=r(51369);let m={width:300,maxWidth:300,top:48,maxHeight:500},g=e=>{let{options:t,active:r,isGrouped:n}=e;return n?(0,l.jsx)(l.Fragment,{children:t.map(e=>(0,l.jsx)("optgroup",{label:e.label,children:e.options.map(e=>(0,l.jsx)("option",{value:e.value,selected:r&&r.value===e.value?"selected":null,children:e.label},e.value))}))}):(0,l.jsx)(l.Fragment,{children:t.map(e=>(0,l.jsx)("option",{value:e.value,selected:r&&r.value===e.value?"selected":null,children:e.label},e.value))})},h=e=>{let{options:t,active:r,filter:a,onClick:o,isGrouped:i}=e,[s,c]=(0,n.useState)(t);return(0,n.useEffect)(()=>{let e=(a||"").trim().toLowerCase(),r=t=>{let{label:r}=t;return r.toLowerCase().includes(e)};c(i?t.map(e=>({label:e.label,options:e.options.filter(r)})).filter(e=>e.options.length):t.filter(r))},[t,a]),(0,l.jsxs)(l.Fragment,{children:[i?s.map(e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"pt-4 pb-2 px-5 text-xs text-gray-400 font-semibold uppercase",children:e.label}),e.options.map(e=>(0,l.jsx)(f,{option:e,active:r,onClick:()=>o(e.value)},e.value))]})):s.map(e=>(0,l.jsx)(f,{option:e,active:r,onClick:()=>o(e.value)},e.value)),a&&0===s.length&&(0,l.jsx)("span",{className:"px-4 pt-2 pb-4 text-gray-600",children:'No results for "'.concat(a,'"')})]})},f=e=>{let{option:t,active:r,onClick:n}=e,a=c().isArray(r)?c().some(r,e=>e.value===t.value):r&&t.value===r.value;return(0,l.jsx)("li",{children:t.url?(0,l.jsx)("a",{className:(0,x.cx)("block w-full py-3 px-5 cursor-pointer hover:bg-gray-50 focus:bg-gray-50 text-sm text-left whitespace-pre-wrap",{"text-indigo":a}),onClick:e=>{e.preventDefault(),n()},href:t.url,role:"option","aria-selected":a,children:t.label}):(0,l.jsx)("button",{className:(0,x.cx)("w-full py-3 px-5 cursor-pointer hover:bg-gray-50 focus:bg-gray-50 text-sm text-left whitespace-pre-wrap",{"text-indigo":a}),onClick:n,type:"button",role:"option","aria-selected":a,children:t.label})})},p=e=>{var t,r;let o,{id:s,value:f,placeholder:p,options:b=[],native:v,onChange:y,disabled:j,showFilter:w,showReset:N=!0,highlightActive:k=!0,className:C,useModalForSmallScreens:E=!0,truncateLength:R=null,optionsStyles:F=m,align:D,ariaLabel:L,borderless:M=!1}=e,[S,z]=(0,n.useState)(!1),[q,A]=(0,n.useState)(),[B,T]=(0,n.use
1State)(null),W=(0,n.useRef)(null),{width:_}=(0,u.lW)(),H=E&&_<=768,O=(0,n.useCallback)(()=>{if(!W.current)return;let e=W.current.getBoundingClientRect(),t=F.maxHeight||500,r=window.innerHeight-e.bottom-10,l=e.top-10,n=r<200&&l>r;T({top:n?void 0:e.bottom+10,bottom:n?window.innerHeight-e.top+10:void 0,left:"right"===D?void 0:e.left,right:"right"===D?window.innerWidth-e.right:void 0,maxHeight:Math.min(t,n?l:r)})},[D,F.maxHeight]);(0,n.useEffect)(()=>{if(S&&!H)return O(),window.addEventListener("scroll",O,!0),window.addEventListener("resize",O),()=>{window.removeEventListener("scroll",O,!0),window.removeEventListener("resize",O)}},[S,H,O]),(0,n.useEffect)(()=>{j&&z(!1)},[j]);let G=Array.isArray(f)?f.length:0,K=c().every(b,"options");if(K){let e=c().flatMap(b,"options");o=c().isArray(f)?e.filter(e=>f.includes(e.value)):e.find(e=>f===e.value)}else o=c().isArray(f)?b.filter(e=>f.includes(e.value)):b.find(e=>f===e.value);let P=e=>{j||(y(e),z(!1))},V=e=>{j||A(e.target.value)},I=o&&G>1?"".concat(G," Selected"):o?c().truncate(o.label,{length:R||o.label.length}):p,Q="".concat(s||"dropdown-input","-listbox");return(0,l.jsxs)("div",{ref:W,className:(0,x.cx)("relative",C),children:[(0,l.jsxs)("button",{id:s,className:(0,x.cx)("\n inline-flex\n items-center\n justify-between\n w-full\n rounded-lg\n pl-4\n pr-2\n py-2\n bg-white\n text-sm\n font-medium\n ".concat(M?"":"focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-indigo-500","\n whitespace-nowrap\n transition\n duration-50\n "),{"border border-indigo text-indigo shadow-sm":o&&!j&&k&&!M,"border border-gray-300 text-gray-700 hover:border-gray-400 focus:border-gray-400 shadow-sm":(!o||!k)&&!j&&!M,"text-indigo":o&&!j&&k&&M,"text-gray-700":(!o||!k)&&!j&&M,"border border-gray-300 text-gray-600 cursor-default":j&&!M,"text-gray-600 cursor-default":j&&M,"cursor-pointer":!j}),onClick:()=>!j&&z(!S),type:"button",role:"combobox","aria-expanded":S,"aria-controls":Q,"aria-haspopup":"listbox","aria-label":L||p||"Select option",children:[v&&(0,l.jsx)("select",{className:(0,x.cx)("h-full w-full absolute",{"cursor-pointer":!j,"cursor-default":j}),onChange:e=>P(e.target.value),style:{opacity:0},disabled:j,"aria-label":"Select",children:(0,l.jsx)(g,{options:b,active:o})}),(0,l.jsx)("span",{className:"mr-1",children:I}),(0,l.jsx)(d.zp,{className:"ml-auto"})]}),o&&N&&(0,l.jsx)("button",{className:(0,x.cx)("absolute top-1/2 -translate-y-1/2 right-2.5 focus:outline-none z-10",{"text-gray-400":j,"text-indigo-700":!j}),onClick:e=>{j||(e.stopPropagation(),y(null),z(!1))},type:"button","aria-label":"Clear",children:(0,l.jsx)(d.vu,{})}),!v&&!H&&S&&B&&(0,a.createPortal)((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"fixed inset-0 z-10",onClick:()=>z(!1),onKeyDown:e=>"Escape"===e.key&&z(!1),"aria-hidden":!0}),(0,l.jsx)("ul",{id:Q,className:"fixed flex flex-col bg-white border border-gray-200 shadow-lg rounded-lg z-20 overflow-hidden",style:{width:F.width,maxWidth:F.maxWidth,maxHeight:null!=(r=B.maxHeight)?r:F.maxHeight,top:B.top,bottom:B.bottom,left:B.left,right:B.right,minWidth:null==(t=W.current)?void 0:t.offsetWidth},role:"listbox",onKeyDown:e=>"Escape"===e.key&&z(!1),children:(0,l.jsxs)("div",{className:"flex flex-col overflow-auto h-full bg-white scrollbar-hidden",children:[w&&(0,l.jsx)("input",{type:"text",placeholder:"Filter...",defaultValue:q,className:"flex mt-3 mb-1 mx-3 px-2 py-2 border border-gray-300 rounded focus:outline-none focus:border-gray-400",onKeyDown:e=>"Enter"===e.key&&e.preventDefault(),onChange:V}),(0,l.jsx)(h,{options:b,active:o,filter:q,onClick:P,isGrouped:K})]})})]}),document.body),H&&(0,l.jsx)(i(),{className:(0,x.cx)("z-20 fixed bottom-0 left-0 right-0 pt-3 w-full h-96 max-h-screen overflow-scroll bg-white border border-gray-200 shadow-lg rounded-lg",{invisible:!S}),overlayClassName:S?"z-10 bg-black/10 fixed inset-0":"invisible",shouldCloseOnOverlayClick:!0,onRequestClose:()=>z(!1),isOpen:!0,children:(0,l.jsxs)("ul",{className:"flex flex-col",children:[w&&(0,l.jsx)("input",{type:"text",placeholder:"Filter...",defaultValue:q,className:"flex mb-1 mx-3 px-2 py-2 border border-gray-300 rounded focus:outline-none focus:border-gray-400",onChange:V}),(0,l.jsx)(h,{options:b,active:o,filter:q,onClick:P,isGrouped:K})]})})]})}},65814:(e,t,r)=>{r.d(t,{Ay:()=>c});
1var l=r(6029),n=r(55729),a=r(56760),o=r(51369);let i=0,s={top:"border-t-gray-900 border-x-transparent border-b-transparent",bottom:"border-b-gray-900 border-x-transparent border-t-transparent",left:"border-l-gray-900 border-y-transparent border-r-transparent",right:"border-r-gray-900 border-y-transparent border-l-transparent"};function c(e){let{children:t,content:r,placement:c="top",className:d,style:u,tooltipClassName:x,disabled:m=!1}=e,[g,h]=(0,n.useState)(!1),[f,p]=(0,n.useState)(!1),[b,v]=(0,n.useState)(!1),[y,j]=(0,n.useState)({top:0,left:0,arrowTop:0,arrowLeft:0}),w=(0,n.useRef)(null),N=(0,n.useRef)(null),k=(0,n.useRef)(null),C=function(){let e=(0,n.useRef)(null);return null===e.current&&(i+=1,e.current="tooltip-".concat(i)),e.current}(),E=(0,n.useCallback)(()=>{if(w.current&&N.current)j(function(e,t,r){let l,n,a,o;switch(r){case"bottom":l=e.bottom+8,n=e.left+e.width/2-t.width/2,a=-8,o=t.width/2-4;break;case"left":l=e.top+e.height/2-t.height/2,n=e.left-t.width-8,a=t.height/2-4,o=t.width;break;case"right":l=e.top+e.height/2-t.height/2,n=e.right+8,a=t.height/2-4,o=-8;break;default:l=e.top-t.height-8,n=e.left+e.width/2-t.width/2,a=t.height,o=t.width/2-4}return{top:l,left:n,arrowTop:a,arrowLeft:o}}(w.current.getBoundingClientRect(),N.current.getBoundingClientRect(),c)),v(!0)},[c]),R=()=>{m||(h(!0),p(!0))},F=()=>{k.current&&clearTimeout(k.current),h(!1),v(!1),k.current=setTimeout(()=>p(!1),150)};(0,n.useEffect)(()=>{if(f)return requestAnimationFrame(E),window.addEventListener("scroll",E,!0),window.addEventListener("resize",E),()=>{window.removeEventListener("scroll",E,!0),window.removeEventListener("resize",E)}},[f,E]),(0,n.useEffect)(()=>()=>{k.current&&clearTimeout(k.current)},[]);let D=(0,l.jsx)("span",{ref:w,className:(0,o.cx)("inline-flex",d),style:u,onMouseEnter:R,onMouseLeave:F,onFocus:R,onBlur:F,"aria-describedby":g?C:void 0,children:t}),L=f?a.createPortal((0,l.jsxs)("span",{ref:N,id:C,role:"tooltip",style:{position:"fixed",top:y.top,left
1:y.left},className:(0,o.cx)("z-50 px-2 py-1 text-xs font-medium text-white bg-gray-900 rounded shadow-lg w-max max-w-xs pointer-events-none","transition-opacity duration-150",g&&b?"opacity-100":"opacity-0",x),children:[r,(0,l.jsx)("span",{style:{position:"absolute",top:y.arrowTop,left:y.arrowLeft},className:(0,o.cx)("w-0 h-0 border-4",s[c]||s.top),"aria-hidden":"true"})]}),document.body):null;return(0,l.jsxs)(l.Fragment,{children:[D,L]})}},98746:(e,t,r)=>{r.d(t,{A:()=>s});var l=r(6029),n=r(55729),a=r(26111),o=r(51369);let i=e=>{let{filled:t,starClassName:r}=e;return(0,l.jsx)(a.Gg,{className:(0,o.cx)("h-6 w-6",t?"text-yellow-400":"text-gray-300",r)})},s=e=>{var t;let{onRating:r=()=>{},initialRating:a=0,count:o=5,displayOnly:s=!1,tooltipArray:c,starClassName:d}=e,[u,x]=(0,n.useState)(null),[m,g]=(0,n.useState)(null),h=Math.round(null!=(t=null!=m?m:u)?t:a),f=(null==c?void 0:c.length)===o,p=f&&h>0?c[h-1]:null,b=(0,l.jsx)("span",{className:"inline-flex items-center",onMouseLeave:s?void 0:()=>g(null),role:s?"img":"radiogroup","aria-label":s?"".concat(h," out of ").concat(o," stars"):"Rate out of ".concat(o," stars"),children:Array.from({length:o},(e,t)=>s?(0,l.jsx)(i,{filled:t<h,starClassName:d},t):(0,l.jsx)("button",{type:"button",role:"radio","aria-checked":(null!=u?u:a)===t+1,"aria-label":(null==c?void 0:c[t])||"".concat(t+1," out of ").concat(o," stars"),onClick:()=>{x(t+1),r(t+1)},onMouseEnter:()=>g(t+1),onFocus:()=>g(t+1),onBlur:()=>g(null),className:"cursor-pointer",children:(0,l.jsx)(i,{filled:t<h,starClassName:d})},t))});return f?(0,l.jsxs)("div",{className:"flex items-center",children:[b,(0,l.jsx)("span",{className:"flex-1 min-w-0 ml-3 truncate text-indigo font-medium text-md",children:p})]}):b}}}]); 2//# sourceMappingURL=1240-52afb95313ee7829.js.map
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.