@notmrabhi/flowforge 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ "use strict";const u=require("react/jsx-runtime"),g=require("react"),ot=require("formik"),U=require("react-icons/md"),S=require("@mui/material"),lr=require("react-dom"),De=require("react-select"),W=require("@emotion/react");function Hi(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const $=Hi(g),At=new Map,q={register(t,e){At.set(t,e)},get(t){return At.get(t)},has(t){return At.has(t)}},R={INPUT_HEIGHT:38,INPUT_PADDING:"0 12px",INPUT_FONT_SIZE:14,BORDER_RADIUS:6,BORDER_COLOR:"#ced4da",BORDER_COLOR_HOVER:"#adb5bd",BORDER_COLOR_FOCUS:"#86b7fe",BORDER_COLOR_ERROR:"#dc3545",BORDER:"1px solid #ced4da",BORDER_ERROR:"1px solid #dc3545",FOCUS_SHADOW:"0 0 0 3px rgba(13,110,253,0.18)",FOCUS_SHADOW_ERROR:"0 0 0 3px rgba(220,53,69,0.18)",COLOR_LABEL:"#212529",COLOR_PLACEHOLDER:"rgba(0,0,0,0.38)",COLOR_HELPER:"#6c757d",COLOR_ERROR:"#dc3545",COLOR_DISABLED_BG:"#f8f9fa",COLOR_DISABLED_TEXT:"rgba(0,0,0,0.38)",FONT_SIZE_LABEL:13,FONT_SIZE_INPUT:14,FONT_SIZE_HELPER:12,FONT_WEIGHT_LABEL:500,LABEL_MB:5,HELPER_MT:4,FIELD_MB:20};function Zi(t){return{height:R.INPUT_HEIGHT,width:"100%",padding:R.INPUT_PADDING,fontSize:R.INPUT_FONT_SIZE,fontFamily:"inherit",color:t.isDisabled?R.COLOR_DISABLED_TEXT:R.COLOR_LABEL,background:t.isDisabled?R.COLOR_DISABLED_BG:"#fff",border:t.hasError?R.BORDER_ERROR:R.BORDER,borderRadius:R.BORDER_RADIUS,outline:"none",boxSizing:"border-box",transition:"border-color 0.15s, box-shadow 0.15s",cursor:t.isDisabled?"not-allowed":void 0,...t.extraStyle}}function Qt(t,e){return{control:(n,i)=>({...n,minHeight:R.INPUT_HEIGHT,height:e?void 0:R.INPUT_HEIGHT,fontSize:R.INPUT_FONT_SIZE,fontFamily:"inherit",borderRadius:R.BORDER_RADIUS,borderColor:t?R.BORDER_COLOR_ERROR:i.isFocused?R.BORDER_COLOR_FOCUS:R.BORDER_COLOR,boxShadow:i.isFocused?t?R.FOCUS_SHADOW_ERROR:R.FOCUS_SHADOW:"none",transition:"border-color 0.15s, box-shadow 0.15s","&:hover":{borderColor:t?R.BORDER_COLOR_ERROR:R.BORDER_COLOR_HOVER}}),valueContainer:n=>({...n,padding:e?"1px 8px":"0 8px",fontSize:R.INPUT_FONT_SIZE}),input:n=>({...n,margin:0,padding:0,fontSize:R.INPUT_FONT_SIZE}),placeholder:n=>({...n,color:R.COLOR_PLACEHOLDER,fontSize:R.INPUT_FONT_SIZE}),singleValue:n=>({...n,fontSize:R.INPUT_FONT_SIZE,color:R.COLOR_LABEL}),dropdownIndicator:n=>({...n,padding:"0 8px"}),clearIndicator:n=>({...n,padding:"0 4px"}),indicatorSeparator:n=>({...n,marginTop:6,marginBottom:6}),option:(n,{isDisabled:i})=>({...n,fontSize:R.INPUT_FONT_SIZE,cursor:i?"not-allowed":"pointer"}),menu:n=>({...n,borderRadius:R.BORDER_RADIUS,zIndex:9999}),menuPortal:n=>({...n,zIndex:9999})}}const se={display:"flex",color:R.COLOR_ERROR,fontSize:R.FONT_SIZE_HELPER,marginTop:R.HELPER_MT,lineHeight:1.4},ie={color:R.COLOR_HELPER,fontSize:R.FONT_SIZE_HELPER,marginTop:R.HELPER_MT,lineHeight:1.4},_i=/_DE_\{_P\('([^']*)'\)\}|_P\('([^']*)'\)/g,Ji=/_DE_\{_P\('([^']*)'\)\}/g;function ur(t){const e=[...t.matchAll(/\[\\?"([^"\\]+)\\?"\]/g)];if(e.length>0)return e[e.length-1][1];const n=t.split(".");return n[n.length-1]??t}function Yi(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function $i(t,...e){return e.length===0?t:`${t}.${e.map(n=>`["${Yi(n)}"]`).join(".")}`}function Ce(t,e=!1){const n=new RegExp(e?_i.source:Ji.source,"g"),i=[];let r=0;for(const s of(t??"").matchAll(n)){s.index>r&&i.push({type:"text",value:t.slice(r,s.index)});const o=s[1]??s[2];i.push({type:"path-ref",path:o,label:ur(o)}),r=s.index+s[0].length}return r<(t??"").length&&i.push({type:"text",value:t.slice(r)}),i}function ye(t){return t.map(Ae).join("")}function Ae(t){switch(t.type){case"text":return t.value;case"path-ref":return`_DE_{_P('${t.path}')}`;case"concat":return t.values.map(Ae).join("");case"function":return`_DE_{_FN_('${t.name}', ${t.args.map(Ae).join(", ")})}`;case"condition":return`_DE_{_IF_(${Ae(t.if)}, ${Ae(t.then)}, ${Ae(t.else)})}`}}function He(t){return t.map(Be).join("")}function Be(t){switch(t.type){case"text":return t.value;case"path-ref":return`_P('${t.path}')`;case"concat":return t.values.map(Be).join("");case"function":return`_DE_{_FN_('${t.name}', ${t.args.map(Be).join(", ")})}`;case"condition":return`_DE_{_IF_(${Be(t.if)}, ${Be(t.then)}, ${Be(t.else)})}`}}function qt(){return{}}const Ui=new Set(["isPresent","isNotPresent","isEmpty","isNotEmpty"]);function cr(t){return t.type==="group"}function Qi(t){return!Ui.has(t)}function dr(t){const e=t.trim(),n=e.match(/^_DE_\{_P\('([^']*)'\)\}$/);return n?`_P('${n[1]}')`:/^_P\('[^']*'\)$/.test(e)?e:t}function qi(t){const e={field:dr(t.field),operator:t.operator,...t.connector&&{connector:t.connector}};return Qi(t.operator)&&(e.value=t.value??""),e}function fr(t){return cr(t)?{type:"group",entries:t.entries.map(fr),...t.connector&&{connector:t.connector}}:qi(t)}function Ki({values:t,conditionConfig:e}){const n=e?Object.fromEntries(Object.entries(e).filter(([,i])=>i.length>0).map(([i,r])=>[i,r.map(fr)])):{};return{values:t,...Object.keys(n).length>0&&{conditions:n}}}function ge(t){return t!==""&&!isNaN(Number(t))?t:`'${t}'`}const eo={equals:(t,e)=>`${t} == ${ge(e)}`,notEquals:(t,e)=>`${t} != ${ge(e)}`,contains:(t,e)=>`contains(${t}, ${ge(e)})`,notContains:(t,e)=>`!contains(${t}, ${ge(e)})`,startsWith:(t,e)=>`startsWith(${t}, ${ge(e)})`,endsWith:(t,e)=>`endsWith(${t}, ${ge(e)})`,isPresent:t=>`isPresent(${t})`,isNotPresent:t=>`isNotPresent(${t})`,greaterThan:(t,e)=>`${t} > ${ge(e)}`,lessThan:(t,e)=>`${t} < ${ge(e)}`,greaterOrEquals:(t,e)=>`${t} >= ${ge(e)}`,lessOrEquals:(t,e)=>`${t} <= ${ge(e)}`};function to(t){if(cr(t))return`(${pr(t.entries)})`;const e=dr(t.field)||`_P('${t.field}')`,n=eo[t.operator];return n?n(e,t.value??""):`${e} ${t.operator} '${t.value??""}'`}function pr(t){return t.map((e,n)=>{const i=to(e);return n===0?i:(e.connector==="or"?" || ":" && ")+i}).join("")}function no(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e.length>0).map(([e,n])=>[e,pr(n)]))}function ro(t){return typeof t=="string"&&/_DE_\{_P\('[^']*'\)\}|_P\('[^']*'\)/.test(t)}function io(t){return t.some(e=>e.type!=="text")}function Kt(t,e=!1){const n=[];for(const i of t)if(i.type==="text")i.value&&n.push({type:"text",value:i.value});else if(i.type==="path-ref")n.push({type:"chip",expr:e?`_P('${i.path}')`:`_DE_{_P('${i.path}')}`,label:i.label,path:i.path,kind:e?"path-ref":"de-expr"});else{const r=Ae(i);n.push({type:"chip",expr:r,label:r.slice(0,20)+"…",path:"",kind:"de-expr"})}return n}function gr(t,e=!1){return Kt(Ce(t,e),e)}const en="_DE_{_P(",tn=")}";function oo(t){return typeof t=="string"&&t.startsWith(en)&&t.endsWith(tn)}function so(t){return`${en}'${t}'${tn}`}function ao(t){return t.slice(en.length,-tn.length).replace(/^['"]|['"]$/g,"")}function lo(t){return t.replace(/_DE_\{_P\('[^']*'\)\}/g,"")}function oe({label:t,required:e,showOptional:n,info:i,htmlFor:r,dataTestId:s}){return t?u.jsxs("label",{htmlFor:r,"data-testid":s?`${s}-label`:void 0,className:"ff-form-text-14 ff-form-text-dark ff-form-fw-medium ff-form-mb-1 ff-form-d-flex ff-form-align-start ff-form-flex-wrap ff-form-gap-1",style:{fontSize:14,lineHeight:1.4},children:[u.jsx("span",{style:{overflowWrap:"anywhere"},children:t}),e&&u.jsx("span",{className:"ff-form-text-danger","aria-hidden":"true",children:" *"}),n&&!e&&u.jsx("span",{className:"ff-form-text-12 ff-form-ps-1 ff-form-text-body-tertiary",children:" (Optional)"}),i&&u.jsx(S.Tooltip,{title:i,arrow:!0,placement:"top",children:u.jsx(S.IconButton,{size:"small",color:"inherit",className:"ff-form-p-0",tabIndex:-1,sx:{mt:"1px",flexShrink:0},children:u.jsx(U.MdInfoOutline,{size:14})})})]}):null}const uo={display:"inline-flex",alignItems:"center",background:"#ede9fe",color:"#5b21b6",border:"1px solid #ddd6fe",borderRadius:"4px",padding:"0px 6px",fontSize:"inherit",fontWeight:"500",lineHeight:"1.6",margin:"0 2px",verticalAlign:"middle",cursor:"default",whiteSpace:"nowrap",fontFamily:"inherit"},co="font-family:monospace;font-size:inherit;opacity:0.5;margin-right:2px;";function nn(t){const{expr:e,label:n,path:i}=t,r=document.createElement("span");r.contentEditable="false",r.dataset.expr=e,r.dataset.label=n,r.dataset.path=i;const s=document.createElement("span");return s.textContent="{ } ",s.style.cssText=co,r.appendChild(s),r.appendChild(document.createTextNode(n)),Object.assign(r.style,uo),r}function br(t){return`_DE_{_P('${t}')}`}const hr=g.createContext(null);function mr({groups:t,children:e}){const[n,i]=g.useState(!1),[r,s]=g.useState(null),[o,c]=g.useState(null),a=g.useRef(null),l=g.useRef(0),d=g.useCallback(()=>i(!0),[]),f=g.useCallback(()=>{i(!1),c(null)},[]),h=g.useCallback((b,v)=>{b?(l.current+=1,v&&c(v)):(l.current=Math.max(0,l.current-1),l.current===0&&(i(!1),c(null)))},[]),p=g.useCallback(b=>{a.current=b,s(b.fieldId)},[]),x=g.useCallback(b=>{a.current&&(a.current.savedRange=b)},[]),m=g.useCallback((b,v)=>{const A=a.current;if(!A)return;if(A.onInsert){A.onInsert(b,v);return}const y=A.editorRef.current;if(!y)return;y.focus();const I=fo(b,v);let C=A.savedRange;if(!C){const E=window.getSelection();E&&E.rangeCount>0&&(C=E.getRangeAt(0),y.contains(C.commonAncestorContainer)||(C=null))}C||(C=document.createRange(),C.selectNodeContents(y),C.collapse(!1)),C.deleteContents(),C.insertNode(I),C.setStartAfter(I),C.collapse(!0);const F=window.getSelection();F==null||F.removeAllRanges(),F==null||F.addRange(C),a.current&&(a.current.savedRange=C.cloneRange()),y.dispatchEvent(new Event("input",{bubbles:!0}))},[]);return u.jsx(hr.Provider,{value:{groups:t,isOpen:n,openPicker:d,closePicker:f,notifyFormulaToggle:h,registerField:p,saveRange:x,insertVariable:m,activeFieldId:r,notifyFieldFocus:(b,v)=>{s(b),v&&c(v),i(!0)},anchorEl:o},children:e})}function Pe(){return g.useContext(hr)}function fo(t,e){return nn({expr:br(t),label:e,path:t})}const Mt="application/x-flowforge-variable";function rn(t){return t.flatMap(e=>e.children?[e,...rn(e.children)]:[e])}function xr(t,e){var i;const n=e.toLowerCase();return t.label.toLowerCase().includes(n)||t.path.toLowerCase().includes(n)||(((i=t.description)==null?void 0:i.toLowerCase().includes(n))??!1)}function po({item:t}){const e=Pe(),[n,i]=g.useState(!1),r=s=>{s.dataTransfer.effectAllowed="copy",s.dataTransfer.setData(Mt,JSON.stringify({path:t.path,label:t.label}));const o=document.createElement("span");o.textContent=`{ } ${t.label}`,Object.assign(o.style,{position:"fixed",top:"-200px",left:"-200px",display:"inline-flex",alignItems:"center",background:"#ede9fe",color:"#5b21b6",border:"1px solid #ddd6fe",borderRadius:"4px",padding:"2px 8px",fontSize:"13px",fontWeight:"500",fontFamily:"inherit",whiteSpace:"nowrap",boxShadow:"0 2px 8px rgba(99,102,241,0.25)"}),document.body.appendChild(o),s.dataTransfer.setDragImage(o,o.offsetWidth/2,o.offsetHeight/2),requestAnimationFrame(()=>document.body.removeChild(o)),i(!0)};return u.jsx(S.Tooltip,{title:t.path,placement:"left",enterDelay:600,children:u.jsxs(S.Box,{draggable:!0,onDragStart:r,onDragEnd:()=>i(!1),onClick:()=>e==null?void 0:e.insertVariable(t.path,t.label),sx:{display:"flex",alignItems:"flex-start",gap:1,px:1.5,py:.75,borderRadius:"6px",cursor:"grab",opacity:n?.4:1,transition:"background 0.12s, opacity 0.12s","&:hover":{bgcolor:"rgba(99,102,241,0.07)"},"&:active":{cursor:"grabbing"}},children:[u.jsx(S.Box,{sx:{mt:"2px",flexShrink:0,color:"#6366f1",display:"flex",alignItems:"center"},children:u.jsx(U.MdDataObject,{size:14})}),u.jsxs(S.Box,{sx:{minWidth:0},children:[u.jsx(S.Typography,{sx:{fontSize:13,fontWeight:500,color:"#0f172a",lineHeight:1.35,overflowWrap:"anywhere"},children:t.label}),t.description&&u.jsx(S.Typography,{sx:{fontSize:11,color:"#64748b",lineHeight:1.4,mt:.2,overflowWrap:"anywhere"},children:t.description})]})]})})}function vr({group:t,searchQuery:e}){const[n,i]=g.useState(!0),r=g.useMemo(()=>{const s=rn(t.items).filter(o=>!o.children);return e?s.filter(o=>xr(o,e)):t.items},[t.items,e]);return e&&r.length===0?null:u.jsxs(S.Box,{children:[!e&&u.jsxs(S.Box,{onClick:()=>i(s=>!s),sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,py:.75,cursor:"pointer","&:hover":{bgcolor:"rgba(0,0,0,0.03)"}},children:[u.jsx(S.Box,{sx:{color:"#94a3b8",transform:n?"rotate(90deg)":"rotate(0deg)",transition:"transform 0.15s",display:"flex"},children:u.jsx(U.MdKeyboardArrowRight,{size:14})}),t.icon&&u.jsx(S.Box,{sx:{color:"#64748b",display:"flex",mr:.25},children:t.icon}),u.jsx(S.Typography,{sx:{fontSize:11,fontWeight:700,color:"#64748b",textTransform:"uppercase",letterSpacing:.6,flex:1},children:t.label})]}),u.jsx(S.Collapse,{in:n||!!e,children:u.jsx(S.Box,{sx:{pb:.5},children:r.map((s,o)=>s.children?u.jsx(vr,{group:{label:s.label,items:s.children},searchQuery:e},o):u.jsx(po,{item:s},o))})})]})}function go({width:t=300,title:e="Values",mode:n="drawer"}){const i=Pe(),[r,s]=g.useState(""),[o,c]=g.useState(null),a=g.useRef(null);if(g.useEffect(()=>{if(n!=="popover"||!(i!=null&&i.isOpen))return;function f(h){var b,v;const p=h.target,x=(b=a.current)==null?void 0:b.contains(p),m=(v=i==null?void 0:i.anchorEl)==null?void 0:v.contains(p);!x&&!m&&(i==null||i.closePicker())}return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[n,i==null?void 0:i.isOpen,i==null?void 0:i.anchorEl,i]),g.useEffect(()=>{if(n!=="popover"||!(i!=null&&i.anchorEl)||!i.isOpen){c(null);return}const f=i.anchorEl.getBoundingClientRect(),h=t,p=440,x=i.anchorEl.closest(".MuiDrawer-paper")||i.anchorEl.closest(".MuiDialog-paper")||i.anchorEl.closest(".MuiPaper-root"),m=x?x.getBoundingClientRect():f,b=m.left-8,v=window.innerWidth-m.right-8,A=b>=h?m.left-h-8:v>=h?m.right+8:Math.max(8,m.left-h-8),y=f.top,I=Math.min(y,window.innerHeight-p-8);c({top:I,left:A})},[n,i==null?void 0:i.anchorEl,i==null?void 0:i.isOpen,t]),!i||n==="popover"&&!i.isOpen)return null;const l=i.groups.some(f=>r?rn(f.items).some(h=>!h.children&&xr(h,r)):!0),d=u.jsxs(S.Box,{ref:a,sx:{width:t,flexShrink:0,display:"flex",flexDirection:"column",bgcolor:"#1e2130",borderRadius:"10px",border:"1px solid rgba(255,255,255,0.08)",boxShadow:"0 8px 32px rgba(0,0,0,0.28)",overflow:"hidden",color:"#e2e8f0",maxHeight:440,...n==="popover"&&o?{position:"fixed",top:o.top,left:o.left,zIndex:1400}:n==="popover"?{display:"none"}:{}},children:[u.jsxs(S.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:1.75,pb:1.25,borderBottom:"1px solid rgba(255,255,255,0.07)",flexShrink:0},children:[u.jsx(U.MdDataObject,{size:16,color:"#6366f1"}),u.jsx(S.Typography,{sx:{fontSize:13,fontWeight:700,flex:1,color:"#e2e8f0"},children:e}),n==="popover"&&u.jsx(S.Box,{component:"button",type:"button",onClick:i.closePicker,sx:{background:"none",border:"none",cursor:"pointer",color:"#94a3b8",display:"flex",p:.25,borderRadius:"4px","&:hover":{color:"#e2e8f0",bgcolor:"rgba(255,255,255,0.08)"}},children:u.jsx(U.MdClose,{size:15})})]}),u.jsx(S.Box,{sx:{px:1.5,py:1,flexShrink:0},children:u.jsxs(S.Box,{sx:{display:"flex",alignItems:"center",gap:.75,bgcolor:"rgba(255,255,255,0.07)",borderRadius:"7px",px:1.25,py:.6,border:"1px solid rgba(255,255,255,0.08)","&:focus-within":{border:"1px solid rgba(99,102,241,0.5)"}},children:[u.jsx(U.MdSearch,{size:15,color:"#64748b"}),u.jsx(S.InputBase,{placeholder:"Search variables...",value:r,onChange:f=>s(f.target.value),sx:{fontSize:12,flex:1,color:"#e2e8f0","& input::placeholder":{color:"#64748b",opacity:1}}}),r&&u.jsx(S.Box,{component:"button",type:"button",onClick:()=>s(""),sx:{background:"none",border:"none",cursor:"pointer",color:"#64748b",display:"flex",p:0,"&:hover":{color:"#94a3b8"}},children:u.jsx(U.MdClose,{size:12})})]})}),u.jsx(S.Divider,{sx:{borderColor:"rgba(255,255,255,0.06)"}}),u.jsx(S.Box,{sx:{flex:1,overflowY:"auto",py:.5,"&::-webkit-scrollbar":{width:4},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:"rgba(255,255,255,0.12)",borderRadius:4}},children:u.jsx(S.Box,{sx:{"& .MuiTypography-root":{color:"#cbd5e1"}},children:l?i.groups.map((f,h)=>u.jsx(vr,{group:f,searchQuery:r},h)):u.jsx(S.Box,{sx:{px:2,py:3,textAlign:"center"},children:u.jsxs(S.Typography,{sx:{fontSize:12,color:"#475569"},children:['No variables match "',r,'"']})})})}),u.jsx(S.Box,{sx:{px:2,py:1,borderTop:"1px solid rgba(255,255,255,0.06)",flexShrink:0},children:u.jsx(S.Typography,{sx:{fontSize:10,color:"#475569",lineHeight:1.4},children:"Click to insert · Drag onto any field"})})]});return n==="popover"?lr.createPortal(d,document.body):d}function Ir(t){return nn({expr:t.expr,label:t.label,path:t.path})}function on(t){var i;if(t.nodeType===Node.TEXT_NODE)return t.textContent??"";const e=t;if((i=e.dataset)!=null&&i.expr)return e.dataset.expr;if(e.tagName==="BR")return"";let n="";return e.childNodes.forEach(r=>{n+=on(r)}),n}function bo(t){let e="";return t.childNodes.forEach(n=>{e+=on(n)}),e}function ho(t,e){t.innerHTML="";for(const n of e)n.type==="text"?n.value&&t.appendChild(document.createTextNode(n.value)):t.appendChild(Ir(n))}function mo(t){const e=document.createDocumentFragment();for(const n of t)n.type==="text"?n.value&&e.appendChild(document.createTextNode(n.value)):e.appendChild(Ir(n));return e}function In(t){let e="";return t.childNodes.forEach(n=>{e+=on(n)}),e}function sn({expression:t,onExpressionChange:e,onBlur:n,placeholder:i,disabled:r,error:s,id:o,formulaConfigEnabled:c,onFormulaConfigToggle:a,onPickerOpen:l,compact:d}){const f=g.useRef(null),h=g.useRef(null),p=g.useRef(""),x=g.useRef(!1),m=t.length===0||t.length===1&&t[0].type==="text"&&!t[0].value,b=Pe(),[v,A]=g.useState(null),[y,I]=g.useState(!1);g.useEffect(()=>{const O=f.current;if(!O)return;const P=ye(t),X=`${c?"1":"0"}:${P}`;if(X===p.current)return;const T=new Map;if(b!=null&&b.groups){const z=ne=>{for(const de of ne)de.path&&T.set(de.path,de.label),de.children&&z(de.children)};for(const ne of b.groups)z(ne.items)}const k=new Map;O.querySelectorAll("[data-path]").forEach(z=>{z.dataset.path&&z.dataset.label&&k.set(z.dataset.path,z.dataset.label)});const _=Kt(t,c).map(z=>{if(z.type!=="chip"||!z.path)return z;const ne=k.get(z.path)??T.get(z.path)??z.label;return{...z,label:ne}});ho(O,_),p.current=X},[t,c,b==null?void 0:b.groups]);const C=g.useCallback(()=>{const O=f.current;if(!O)return;const P=bo(O),X=Ce(P,c),T=`${c?"1":"0"}:${ye(X)}`;T!==p.current&&(p.current=T,e(X))},[e,c]),F=g.useCallback(()=>{x.current||C()},[C]),E=g.useCallback(O=>{O.preventDefault();const P=O.clipboardData.getData("text/plain"),X=window.getSelection();if(!(X!=null&&X.rangeCount))return;const T=X.getRangeAt(0);T.deleteContents(),T.insertNode(mo(gr(P,c))),T.collapse(!1),X.removeAllRanges(),X.addRange(T),C()},[C,c]),B=g.useCallback(O=>{const P=window.getSelection();if(!(P!=null&&P.rangeCount))return;const X=In(P.getRangeAt(0).cloneContents());X&&(O.clipboardData.setData("text/plain",X),O.preventDefault())},[]),j=g.useCallback(O=>{const P=window.getSelection();if(!(P!=null&&P.rangeCount))return;const X=P.getRangeAt(0),T=In(X.cloneContents());T&&(O.clipboardData.setData("text/plain",T),O.preventDefault(),X.deleteContents(),C())},[C]),M=g.useCallback(O=>{O.key==="Enter"&&O.preventDefault()},[]),w=g.useCallback((O,P)=>{const X=f.current;if(!X)return;X.focus();const T=window.getSelection();let k=null;T&&T.rangeCount>0&&X.contains(T.getRangeAt(0).commonAncestorContainer)?k=T.getRangeAt(0):(k=document.createRange(),k.selectNodeContents(X),k.collapse(!1));const _=Cn(O,P);k.deleteContents(),k.insertNode(_),k.setStartAfter(_),k.collapse(!0),T==null||T.removeAllRanges(),T==null||T.addRange(k),C()},[C]),D=g.useCallback(()=>{!b||!o||(b.registerField({editorRef:f,savedRange:null,fieldId:o,onInsert:w}),b.notifyFieldFocus(o,f.current))},[b,o,w]),G=g.useCallback(()=>{var P;if(!b)return;const O=window.getSelection();O&&O.rangeCount>0&&((P=f.current)!=null&&P.contains(O.anchorNode))&&b.saveRange(O.getRangeAt(0).cloneRange())},[b]);g.useEffect(()=>{document.addEventListener("selectionchange",G);const O=f.current;return O&&O.addEventListener("input",F),()=>{document.removeEventListener("selectionchange",G),O&&O.removeEventListener("input",F)}},[G,F]);const N=g.useCallback(O=>{r||!O.dataTransfer.types.includes(Mt)||(O.preventDefault(),O.dataTransfer.dropEffect="copy",A("valid"))},[r]),V=g.useCallback(()=>{A(null)},[]),Z=g.useCallback(O=>{if(O.preventDefault(),A(null),r){I(!0);return}const P=O.dataTransfer.getData(Mt);if(!P)return;let X;try{X=JSON.parse(P)}catch{return}const T=xo(O.clientX,O.clientY);if(!T)return;const k=f.current;if(!k||!k.contains(T.commonAncestorContainer))return;const _=Cn(X.path,X.label);T.deleteContents(),T.insertNode(_),T.setStartAfter(_),T.collapse(!0);const z=window.getSelection();z==null||z.removeAllRanges(),z==null||z.addRange(T),k.dispatchEvent(new Event("input",{bubbles:!0}))},[r]),J=(a?1:0)+(l?1:0),Y=J>0?`${J*30+8}px`:"12px",ee=v==="valid"?"#16a34a":v==="invalid"||s?"#d32f2f":"rgba(0,0,0,0.23)",te=v==="valid"?"0 0 0 2px rgba(22,163,74,0.2)":v==="invalid"?"0 0 0 2px rgba(211,47,47,0.2)":void 0;return u.jsxs(S.Box,{sx:{position:"relative"},children:[u.jsxs(S.Box,{sx:{border:`1px solid ${ee}`,borderRadius:"4px",...d?{display:"flex",alignItems:"center",pl:1,py:"6px",pr:Y,overflow:"hidden"}:{display:"flex",alignItems:"center",pl:1.5,py:"6px",pr:Y,overflow:"hidden"},fontSize:d?13:14,lineHeight:1.5,cursor:r?"not-allowed":"text",bgcolor:v==="valid"?"rgba(22,163,74,0.04)":r?"rgba(0,0,0,0.04)":"#fff",transition:"border-color 0.15s, box-shadow 0.15s, background 0.15s",boxShadow:te,"&:focus-within":{borderColor:s?"#d32f2f":"#1976d2",boxShadow:s?"0 0 0 2px rgba(211,47,47,0.2)":"0 0 0 2px rgba(25,118,210,0.2)"}},onDragOver:N,onDragLeave:V,onDrop:Z,onClick:()=>{var O;r||(O=f.current)==null||O.focus()},children:[m&&i&&u.jsx(S.Typography,{component:"span",sx:{position:"absolute",top:"50%",transform:"translateY(-50%)",left:d?8:14,right:Y,fontSize:d?13:14,color:"rgba(0,0,0,0.38)",pointerEvents:"none",userSelect:"none",lineHeight:1.5,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:i}),u.jsx("div",{ref:f,id:o,contentEditable:r?"false":"true",suppressContentEditableWarning:!0,onPaste:E,onCopy:B,onCut:j,onKeyDown:M,onFocus:D,onBlur:n,onCompositionStart:()=>{x.current=!0},onCompositionEnd:()=>{x.current=!1,C()},style:{outline:"none",flex:1,minWidth:0,overflow:"hidden",minHeight:"21px",lineHeight:1.5,whiteSpace:"nowrap"}})]}),J>0&&!r&&u.jsxs(S.Box,{sx:{position:"absolute",right:4,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[a&&u.jsx(S.Tooltip,{title:c?"Disable formula config":"Enable formula config",placement:"top",children:u.jsx(S.Box,{component:"button",type:"button",ref:h,onClick:O=>{O.stopPropagation();const P=!c;b==null||b.notifyFormulaToggle(P,P?h.current:null),a()},sx:{border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",width:26,height:26,borderRadius:"4px",p:0,color:c?"#7c4dff":"#94a3b8",bgcolor:c?"#ede9fe":"transparent","&:hover":{bgcolor:"#ede9fe",color:"#7c4dff"}},children:u.jsx(U.MdDataObject,{size:17})})}),l&&u.jsx(S.Tooltip,{title:"Insert variable",placement:"top",children:u.jsx(S.Box,{component:"button",type:"button",onClick:O=>{O.stopPropagation(),l()},sx:{background:"none",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",width:26,height:26,borderRadius:"4px",color:"#64748b",p:0,"&:hover":{bgcolor:"#f1f5f9"}},children:u.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:14,height:14,children:u.jsx("path",{d:"M4.06 13a8 8 0 0 0 5.18 6.51A18.5 18.5 0 0 1 8.02 17c0-1.49.18-2.95.52-4.32L4.06 13zm0-2h4.48A18.5 18.5 0 0 0 8.02 7c0-1.02.06-2 .2-2.94A8 8 0 0 0 4.06 11zm11.88 0h4.48a8 8 0 0 0-4.16-6.94c.14.94.2 1.92.2 2.94 0 1.38-.15 2.71-.52 4zm0 2c-.37 1.29-.52 2.62-.52 4 0 1.02.06 2 .2 2.94A8 8 0 0 0 19.94 13h-4.18zM9.03 13c-.4 1.32-.57 2.7-.57 4 0 1.12.13 2.2.38 3.22A8 8 0 0 0 12 21a8 8 0 0 0 3.16-.78c.25-1.02.38-2.1.38-3.22 0-1.3-.17-2.68-.57-4H9.03zm.52-2h4.9C14.13 9.71 14 8.37 14 7c0-1.12-.13-2.2-.38-3.22A8 8 0 0 0 12 3a8 8 0 0 0-3.16.78C8.59 4.8 8.46 5.88 8.46 7c0 1.37.2 2.7.52 4h.57z"})})})})]}),u.jsx(S.Snackbar,{open:y,autoHideDuration:3e3,onClose:()=>I(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},children:u.jsx(S.Alert,{severity:"error",onClose:()=>I(!1),sx:{fontSize:13},children:"This field is disabled — cannot insert variable"})})]})}function xo(t,e){var i;if(document.caretRangeFromPoint)return document.caretRangeFromPoint(t,e);const n=(i=document.caretPositionFromPoint)==null?void 0:i.call(document,t,e);if(n){const r=document.createRange();return r.setStart(n.offsetNode,n.offset),r.collapse(!0),r}return null}function Cn(t,e){return nn({expr:br(t),label:e,path:t})}function Cr({field:t,value:e,onChange:n,onBlur:i,error:r,touched:s,formulaConfig:o,onFormulaConfigChange:c,inlineLabel:a}){const l={...t,multiline:t.multiline||t.type==="textarea"},d=l.id??l.name??"",f=l.formula===!0,h=Pe(),[p,x]=g.useState(()=>f&&d in(o??{})),m=g.useRef(p);m.current=p,g.useEffect(()=>()=>{m.current&&(h==null||h.notifyFormulaToggle(!1))},[]);const[b,v]=g.useState(()=>f?Ce(String(e??""),d in(o??{})):[]),[A,y]=g.useState(()=>String(e??"")),I=g.useRef(e);g.useEffect(()=>{if(e===I.current)return;I.current=e;const O=String(e??"");y(O),f&&v(Ce(O,p))},[e]);const C=O=>{v(O);const P=p?He(O):ye(O);I.current=P,n(P)},F=()=>{const O=!p;if(x(O),O){const P=ye(b),X=Ce(P,!0);v(X);const T=He(X);I.current=T,n(T),c==null||c({...o,[d]:qt()})}else{const P=ye(b);I.current=P,n(P);const X={...o};delete X[d],c==null||c(X)}},E=s&&!!r,B=l.disabled===!0,j=u.jsx(oe,{label:l.label,required:l.required,showOptional:l.showOptional,info:l.info,htmlFor:d,dataTestId:l.dataTestId});if(f){const O=l.helperText&&!a?u.jsx("small",{style:ie,children:l.helperText}):null,P=u.jsxs(u.Fragment,{children:[O,u.jsx(sn,{id:d,expression:b,onExpressionChange:C,onBlur:i,placeholder:l.formulaPlaceholder??"Type or paste a variable expression...",disabled:B,error:E,formulaConfigEnabled:p,onFormulaConfigToggle:F,compact:l.compact}),E&&u.jsx("small",{"data-testid":`${d}-error`,style:se,children:r})]});return a?u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 0"},children:[u.jsx("div",{style:{flex:"0 0 160px",minWidth:0},children:j}),u.jsx("div",{style:{flex:1,minWidth:0},children:P})]}):u.jsxs("div",{children:[j,P]})}const M=!!l.prefix,w=!!l.suffix,D=!!l.copyable,G=w||D,N={width:"100%",fontSize:14,color:"#374151",backgroundColor:B?"#f9fafb":"#fff",border:`1px solid ${E?R.BORDER_COLOR_ERROR:R.BORDER_COLOR}`,borderRadius:R.BORDER_RADIUS,outline:"none",paddingTop:l.multiline?"8px":"6px",paddingBottom:l.multiline?"8px":"6px",paddingLeft:M?0:"12px",paddingRight:G?0:"12px",boxSizing:"border-box",lineHeight:1.5,cursor:B?"not-allowed":void 0,resize:l.multiline?"vertical":"none"},V={position:"relative",display:"flex",alignItems:"stretch",width:"100%",border:`1px solid ${E?R.BORDER_COLOR_ERROR:R.BORDER_COLOR}`,borderRadius:R.BORDER_RADIUS,backgroundColor:B?"#f9fafb":"#fff",boxSizing:"border-box"},Z={display:"flex",alignItems:"center",padding:"0 10px",color:"#6b7280",fontSize:13,whiteSpace:"nowrap",flexShrink:0},J={flex:1,minHeight:0,border:"none",outline:"none",backgroundColor:"transparent",fontSize:14,color:"#374151",padding:l.multiline?"8px 12px":"6px 12px",cursor:B?"not-allowed":void 0,resize:l.multiline?"vertical":"none",boxSizing:"border-box",lineHeight:1.5},ee=M||G?u.jsxs("div",{style:V,onFocus:O=>{O.currentTarget.style.borderColor=E?R.BORDER_COLOR_ERROR:R.BORDER_COLOR_FOCUS,O.currentTarget.style.boxShadow=E?R.FOCUS_SHADOW_ERROR:R.FOCUS_SHADOW},onBlur:O=>{O.currentTarget.contains(O.relatedTarget)||(O.currentTarget.style.borderColor=E?R.BORDER_COLOR_ERROR:R.BORDER_COLOR,O.currentTarget.style.boxShadow="none")},children:[M&&u.jsx("span",{style:Z,children:l.prefix}),l.multiline?u.jsx("textarea",{id:d,name:d,style:{...J,minHeight:72},placeholder:l.placeholder??"",value:A,disabled:B,readOnly:l.readOnly,rows:l.rows??3,autoComplete:l.autocomplete??"off",autoFocus:l.autoFocus,"data-testid":l.dataTestId??`${d}-input`,"aria-label":l.ariaLabel??l.label,"aria-describedby":l.ariaDescribedBy,"aria-required":l.required||void 0,"aria-invalid":E||void 0,onChange:O=>{y(O.target.value),I.current=O.target.value,n(O.target.value)},onBlur:i}):u.jsx("input",{id:d,name:d,type:l.inputType??"text",style:J,placeholder:l.placeholder??"",value:A,disabled:B,readOnly:l.readOnly,autoComplete:l.autocomplete??"off",autoFocus:l.autoFocus,"data-testid":l.dataTestId??`${d}-input`,"aria-label":l.ariaLabel??l.label,"aria-describedby":l.ariaDescribedBy,"aria-required":l.required||void 0,"aria-invalid":E||void 0,onChange:O=>{y(O.target.value),I.current=O.target.value,n(O.target.value)},onBlur:i}),w&&u.jsx("span",{style:Z,children:l.suffix}),D&&u.jsx(S.Tooltip,{title:"Copy",placement:"top",children:u.jsx("button",{type:"button",onClick:()=>navigator.clipboard.writeText(A),"aria-label":"copy",tabIndex:-1,style:{...Z,background:"none",border:"none",cursor:"pointer",padding:"0 8px"},children:u.jsx(U.MdContentCopy,{size:16})})})]}):l.multiline?u.jsx("textarea",{id:d,name:d,style:{...N,minHeight:72,height:void 0,padding:"8px 12px"},placeholder:l.placeholder??"",value:A,disabled:B,readOnly:l.readOnly,rows:l.rows??3,autoComplete:l.autocomplete??"off",autoFocus:l.autoFocus,"data-testid":l.dataTestId??`${d}-input`,"aria-label":l.ariaLabel??l.label,"aria-describedby":l.ariaDescribedBy,"aria-required":l.required||void 0,"aria-invalid":E||void 0,onChange:O=>{y(O.target.value),I.current=O.target.value,n(O.target.value)},onBlur:i,onFocus:O=>{O.currentTarget.style.borderColor=E?R.BORDER_COLOR_ERROR:R.BORDER_COLOR_FOCUS,O.currentTarget.style.boxShadow=E?R.FOCUS_SHADOW_ERROR:R.FOCUS_SHADOW},onBlurCapture:O=>{O.currentTarget.style.borderColor=E?R.BORDER_COLOR_ERROR:R.BORDER_COLOR,O.currentTarget.style.boxShadow="none"}}):u.jsx("input",{id:d,name:d,type:l.inputType??"text",style:N,placeholder:l.placeholder??"",value:A,disabled:B,readOnly:l.readOnly,autoComplete:l.autocomplete??"off",autoFocus:l.autoFocus,"data-testid":l.dataTestId??`${d}-input`,"aria-label":l.ariaLabel??l.label,"aria-describedby":l.ariaDescribedBy,"aria-required":l.required||void 0,"aria-invalid":E||void 0,onChange:O=>{y(O.target.value),I.current=O.target.value,n(O.target.value)},onBlur:i,onFocus:O=>{O.currentTarget.style.borderColor=E?R.BORDER_COLOR_ERROR:R.BORDER_COLOR_FOCUS,O.currentTarget.style.boxShadow=E?R.FOCUS_SHADOW_ERROR:R.FOCUS_SHADOW},onBlurCapture:O=>{O.currentTarget.style.borderColor=E?R.BORDER_COLOR_ERROR:R.BORDER_COLOR,O.currentTarget.style.boxShadow="none"}}),te=u.jsxs(u.Fragment,{children:[l.helperText&&!E&&!a&&u.jsx("small",{style:ie,children:l.helperText}),ee,E&&u.jsx("small",{"data-testid":`${d}-error`,style:se,children:r})]});return a?u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 0"},children:[u.jsx("div",{style:{flex:"0 0 160px",minWidth:0},children:j}),u.jsx("div",{style:{flex:1,minWidth:0},children:te})]}):u.jsxs("div",{children:[j,te]})}function H(){return H=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},H.apply(null,arguments)}function Ee(t){"@babel/helpers - typeof";return Ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ee(t)}function vo(t,e){if(Ee(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Ee(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yr(t){var e=vo(t,"string");return Ee(e)=="symbol"?e:e+""}function Ge(t,e,n){return(e=yr(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function L(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?yn(Object(n),!0).forEach(function(i){Ge(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yn(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Io(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sn(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,yr(i.key),i)}}function Co(t,e,n){return e&&Sn(t.prototype,e),n&&Sn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Lt(t,e){return Lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Lt(t,e)}function yo(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lt(t,e)}function st(t){return st=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},st(t)}function Sr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Sr=function(){return!!t})()}function So(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ao(t,e){if(e&&(Ee(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return So(t)}function Ro(t){var e=Sr();return function(){var n,i=st(t);if(e){var r=st(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Ao(this,n)}}function kt(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Eo(t){if(Array.isArray(t))return kt(t)}function Oo(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Ar(t,e){if(t){if(typeof t=="string")return kt(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kt(t,e):void 0}}function Fo(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ve(t){return Eo(t)||Oo(t)||Ar(t)||Fo()}function wo(t){if(Array.isArray(t))return t}function To(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,s,o,c=[],a=!0,l=!1;try{if(s=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;a=!1}else for(;!(a=(i=s.call(n)).done)&&(c.push(i.value),c.length!==e);a=!0);}catch(d){l=!0,r=d}finally{try{if(!a&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw r}}return c}}function Bo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function re(t,e){return wo(t)||To(t,e)||Ar(t,e)||Bo()}function Rr(t,e){if(t==null)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;n[i]=t[i]}return n}function pe(t,e){if(t==null)return{};var n,i,r=Rr(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)n=s[i],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Go(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}const jo=Math.min,Vo=Math.max,at=Math.round,Je=Math.floor,lt=t=>({x:t,y:t});function Do(t){const{x:e,y:n,width:i,height:r}=t;return{width:i,height:r,top:n,left:e,right:e+i,bottom:n+r,x:e,y:n}}function ht(){return typeof window<"u"}function Er(t){return Fr(t)?(t.nodeName||"").toLowerCase():"#document"}function ve(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Or(t){var e;return(e=(Fr(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Fr(t){return ht()?t instanceof Node||t instanceof ve(t).Node:!1}function Po(t){return ht()?t instanceof Element||t instanceof ve(t).Element:!1}function an(t){return ht()?t instanceof HTMLElement||t instanceof ve(t).HTMLElement:!1}function An(t){return!ht()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ve(t).ShadowRoot}function wr(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=ln(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&r!=="inline"&&r!=="contents"}let Rt;function No(){return Rt==null&&(Rt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Rt}function Mo(t){return/^(html|body|#document)$/.test(Er(t))}function ln(t){return ve(t).getComputedStyle(t)}function Lo(t){if(Er(t)==="html")return t;const e=t.assignedSlot||t.parentNode||An(t)&&t.host||Or(t);return An(e)?e.host:e}function Tr(t){const e=Lo(t);return Mo(e)?t.ownerDocument?t.ownerDocument.body:t.body:an(e)&&wr(e)?e:Tr(e)}function ut(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=Tr(t),s=r===((i=t.ownerDocument)==null?void 0:i.body),o=ve(r);if(s){const c=Wt(o);return e.concat(o,o.visualViewport||[],wr(r)?r:[],c&&n?ut(c):[])}else return e.concat(r,ut(r,[],n))}function Wt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ko(t){const e=ln(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=an(t),s=r?t.offsetWidth:n,o=r?t.offsetHeight:i,c=at(n)!==s||at(i)!==o;return c&&(n=s,i=o),{width:n,height:i,$:c}}function un(t){return Po(t)?t:t.contextElement}function Rn(t){const e=un(t);if(!an(e))return lt(1);const n=e.getBoundingClientRect(),{width:i,height:r,$:s}=ko(e);let o=(s?at(n.width):n.width)/i,c=(s?at(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!c||!Number.isFinite(c))&&(c=1),{x:o,y:c}}const Wo=lt(0);function Xo(t){const e=ve(t);return!No()||!e.visualViewport?Wo:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function zo(t,e,n){return!1}function En(t,e,n,i){e===void 0&&(e=!1);const r=t.getBoundingClientRect(),s=un(t);let o=lt(1);e&&(o=Rn(t));const c=zo()?Xo(s):lt(0);let a=(r.left+c.x)/o.x,l=(r.top+c.y)/o.y,d=r.width/o.x,f=r.height/o.y;if(s){const h=ve(s),p=i;let x=h,m=Wt(x);for(;m&&i&&p!==x;){const b=Rn(m),v=m.getBoundingClientRect(),A=ln(m),y=v.left+(m.clientLeft+parseFloat(A.paddingLeft))*b.x,I=v.top+(m.clientTop+parseFloat(A.paddingTop))*b.y;a*=b.x,l*=b.y,d*=b.x,f*=b.y,a+=y,l+=I,x=ve(m),m=Wt(x)}}return Do({width:d,height:f,x:a,y:l})}function Br(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ho(t,e){let n=null,i;const r=Or(t);function s(){var c;clearTimeout(i),(c=n)==null||c.disconnect(),n=null}function o(c,a){c===void 0&&(c=!1),a===void 0&&(a=1),s();const l=t.getBoundingClientRect(),{left:d,top:f,width:h,height:p}=l;if(c||e(),!h||!p)return;const x=Je(f),m=Je(r.clientWidth-(d+h)),b=Je(r.clientHeight-(f+p)),v=Je(d),y={rootMargin:-x+"px "+-m+"px "+-b+"px "+-v+"px",threshold:Vo(0,jo(1,a))||1};let I=!0;function C(F){const E=F[0].intersectionRatio;if(E!==a){if(!I)return o();E?o(!1,E):i=setTimeout(()=>{o(!1,1e-7)},1e3)}E===1&&!Br(l,t.getBoundingClientRect())&&o(),I=!1}try{n=new IntersectionObserver(C,{...y,root:r.ownerDocument})}catch{n=new IntersectionObserver(C,y)}n.observe(t)}return o(!0),s}function Zo(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=i,l=un(t),d=r||s?[...l?ut(l):[],...e?ut(e):[]]:[];d.forEach(v=>{r&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const f=l&&c?Ho(l,n):null;let h=-1,p=null;o&&(p=new ResizeObserver(v=>{let[A]=v;A&&A.target===l&&p&&e&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(e)})),n()}),l&&!a&&p.observe(l),e&&p.observe(e));let x,m=a?En(t):null;a&&b();function b(){const v=En(t);m&&!Br(m,v)&&n(),m=v,x=requestAnimationFrame(b)}return n(),()=>{var v;d.forEach(A=>{r&&A.removeEventListener("scroll",n),s&&A.removeEventListener("resize",n)}),f==null||f(),(v=p)==null||v.disconnect(),p=null,a&&cancelAnimationFrame(x)}}var Xt=g.useLayoutEffect,_o=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ct=function(){};function Jo(t,e){return e?e[0]==="-"?t+e:t+"__"+e:t}function Yo(t,e){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];var s=[].concat(i);if(e&&t)for(var o in e)e.hasOwnProperty(o)&&e[o]&&s.push("".concat(Jo(t,o)));return s.filter(function(c){return c}).map(function(c){return String(c).trim()}).join(" ")}var dt=function(e){return is(e)?e.filter(Boolean):Ee(e)==="object"&&e!==null?[e]:[]},Gr=function(e){e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme;var n=pe(e,_o);return L({},n)},K=function(e,n,i){var r=e.cx,s=e.getStyles,o=e.getClassNames,c=e.className;return{css:s(n,e),className:r(i??{},o(n,e),c)}};function $o(t,e,n){if(n){var i=n(t,e);if(typeof i=="string")return i}return t}function mt(t){return[document.documentElement,document.body,window].indexOf(t)>-1}function Uo(t){return mt(t)?window.innerHeight:t.clientHeight}function jr(t){return mt(t)?window.pageYOffset:t.scrollTop}function ft(t,e){if(mt(t)){window.scrollTo(0,e);return}t.scrollTop=e}function Qo(t){var e=getComputedStyle(t),n=e.position==="absolute",i=/(auto|scroll)/;if(e.position==="fixed")return document.documentElement;for(var r=t;r=r.parentElement;)if(e=getComputedStyle(r),!(n&&e.position==="static")&&i.test(e.overflow+e.overflowY+e.overflowX))return r;return document.documentElement}function qo(t,e,n,i){return n*((t=t/i-1)*t*t+1)+e}function Ye(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ct,r=jr(t),s=e-r,o=10,c=0;function a(){c+=o;var l=qo(c,r,s,n);ft(t,l),c<n?window.requestAnimationFrame(a):i(t)}a()}function On(t,e){var n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=e.offsetHeight/3;i.bottom+r>n.bottom?ft(t,Math.min(e.offsetTop+e.clientHeight-t.offsetHeight+r,t.scrollHeight)):i.top-r<n.top&&ft(t,Math.max(e.offsetTop-r,0))}function Ko(t){var e=t.getBoundingClientRect();return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width}}function Fn(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function es(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Vr=!1,ts={get passive(){return Vr=!0}},$e=typeof window<"u"?window:{};$e.addEventListener&&$e.removeEventListener&&($e.addEventListener("p",ct,ts),$e.removeEventListener("p",ct,!1));var ns=Vr;function rs(t){return t!=null}function is(t){return Array.isArray(t)}function Xe(t,e,n){return t?e:n}var os=function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];var s=Object.entries(e).filter(function(o){var c=re(o,1),a=c[0];return!i.includes(a)});return s.reduce(function(o,c){var a=re(c,2),l=a[0],d=a[1];return o[l]=d,o},{})},ss=["children","innerProps"],as=["children","innerProps"];function ls(t){var e=t.maxHeight,n=t.menuEl,i=t.minHeight,r=t.placement,s=t.shouldScroll,o=t.isFixedPosition,c=t.controlHeight,a=Qo(n),l={placement:"bottom",maxHeight:e};if(!n||!n.offsetParent)return l;var d=a.getBoundingClientRect(),f=d.height,h=n.getBoundingClientRect(),p=h.bottom,x=h.height,m=h.top,b=n.offsetParent.getBoundingClientRect(),v=b.top,A=o?window.innerHeight:Uo(a),y=jr(a),I=parseInt(getComputedStyle(n).marginBottom,10),C=parseInt(getComputedStyle(n).marginTop,10),F=v-C,E=A-m,B=F+y,j=f-y-m,M=p-A+y+I,w=y+m-C,D=160;switch(r){case"auto":case"bottom":if(E>=x)return{placement:"bottom",maxHeight:e};if(j>=x&&!o)return s&&Ye(a,M,D),{placement:"bottom",maxHeight:e};if(!o&&j>=i||o&&E>=i){s&&Ye(a,M,D);var G=o?E-I:j-I;return{placement:"bottom",maxHeight:G}}if(r==="auto"||o){var N=e,V=o?F:B;return V>=i&&(N=Math.min(V-I-c,e)),{placement:"top",maxHeight:N}}if(r==="bottom")return s&&ft(a,M),{placement:"bottom",maxHeight:e};break;case"top":if(F>=x)return{placement:"top",maxHeight:e};if(B>=x&&!o)return s&&Ye(a,w,D),{placement:"top",maxHeight:e};if(!o&&B>=i||o&&F>=i){var Z=e;return(!o&&B>=i||o&&F>=i)&&(Z=o?F-C:B-C),s&&Ye(a,w,D),{placement:"top",maxHeight:Z}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return l}function us(t){var e={bottom:"top",top:"bottom"};return t?e[t]:"bottom"}var Dr=function(e){return e==="auto"?"bottom":e},cs=function(e,n){var i,r=e.placement,s=e.theme,o=s.borderRadius,c=s.spacing,a=s.colors;return L((i={label:"menu"},Ge(i,us(r),"100%"),Ge(i,"position","absolute"),Ge(i,"width","100%"),Ge(i,"zIndex",1),i),n?{}:{backgroundColor:a.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:c.menuGutter,marginTop:c.menuGutter})},Pr=g.createContext(null),ds=function(e){var n=e.children,i=e.minMenuHeight,r=e.maxMenuHeight,s=e.menuPlacement,o=e.menuPosition,c=e.menuShouldScrollIntoView,a=e.theme,l=g.useContext(Pr)||{},d=l.setPortalPlacement,f=g.useRef(null),h=g.useState(r),p=re(h,2),x=p[0],m=p[1],b=g.useState(null),v=re(b,2),A=v[0],y=v[1],I=a.spacing.controlHeight;return Xt(function(){var C=f.current;if(C){var F=o==="fixed",E=c&&!F,B=ls({maxHeight:r,menuEl:C,minHeight:i,placement:s,shouldScroll:E,isFixedPosition:F,controlHeight:I});m(B.maxHeight),y(B.placement),d==null||d(B.placement)}},[r,s,o,c,i,d,I]),n({ref:f,placerProps:L(L({},e),{},{placement:A||Dr(s),maxHeight:x})})},fs=function(e){var n=e.children,i=e.innerRef,r=e.innerProps;return W.jsx("div",H({},K(e,"menu",{menu:!0}),{ref:i},r),n)},ps=fs,gs=function(e,n){var i=e.maxHeight,r=e.theme.spacing.baseUnit;return L({maxHeight:i,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:r,paddingTop:r})},bs=function(e){var n=e.children,i=e.innerProps,r=e.innerRef,s=e.isMulti;return W.jsx("div",H({},K(e,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:r},i),n)},Nr=function(e,n){var i=e.theme,r=i.spacing.baseUnit,s=i.colors;return L({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(r*2,"px ").concat(r*3,"px")})},hs=Nr,ms=Nr,xs=function(e){var n=e.children,i=n===void 0?"No options":n,r=e.innerProps,s=pe(e,ss);return W.jsx("div",H({},K(L(L({},s),{},{children:i,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),i)},vs=function(e){var n=e.children,i=n===void 0?"Loading...":n,r=e.innerProps,s=pe(e,as);return W.jsx("div",H({},K(L(L({},s),{},{children:i,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),i)},Is=function(e){var n=e.rect,i=e.offset,r=e.position;return{left:n.left,position:r,top:i,width:n.width,zIndex:1}},Cs=function(e){var n=e.appendTo,i=e.children,r=e.controlElement,s=e.innerProps,o=e.menuPlacement,c=e.menuPosition,a=g.useRef(null),l=g.useRef(null),d=g.useState(Dr(o)),f=re(d,2),h=f[0],p=f[1],x=g.useMemo(function(){return{setPortalPlacement:p}},[]),m=g.useState(null),b=re(m,2),v=b[0],A=b[1],y=g.useCallback(function(){if(r){var E=Ko(r),B=c==="fixed"?0:window.pageYOffset,j=E[h]+B;(j!==(v==null?void 0:v.offset)||E.left!==(v==null?void 0:v.rect.left)||E.width!==(v==null?void 0:v.rect.width))&&A({offset:j,rect:E})}},[r,c,h,v==null?void 0:v.offset,v==null?void 0:v.rect.left,v==null?void 0:v.rect.width]);Xt(function(){y()},[y]);var I=g.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),r&&a.current&&(l.current=Zo(r,a.current,y,{elementResize:"ResizeObserver"in window}))},[r,y]);Xt(function(){I()},[I]);var C=g.useCallback(function(E){a.current=E,I()},[I]);if(!n&&c!=="fixed"||!v)return null;var F=W.jsx("div",H({ref:C},K(L(L({},e),{},{offset:v.offset,position:c,rect:v.rect}),"menuPortal",{"menu-portal":!0}),s),i);return W.jsx(Pr.Provider,{value:x},n?lr.createPortal(F,n):F)},ys=function(e){var n=e.isDisabled,i=e.isRtl;return{label:"container",direction:i?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},Ss=function(e){var n=e.children,i=e.innerProps,r=e.isDisabled,s=e.isRtl;return W.jsx("div",H({},K(e,"container",{"--is-disabled":r,"--is-rtl":s}),i),n)},As=function(e,n){var i=e.theme.spacing,r=e.isMulti,s=e.hasValue,o=e.selectProps.controlShouldRenderValue;return L({alignItems:"center",display:r&&s&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(i.baseUnit/2,"px ").concat(i.baseUnit*2,"px")})},Rs=function(e){var n=e.children,i=e.innerProps,r=e.isMulti,s=e.hasValue;return W.jsx("div",H({},K(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":s}),i),n)},Es=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Os=function(e){var n=e.children,i=e.innerProps;return W.jsx("div",H({},K(e,"indicatorsContainer",{indicators:!0}),i),n)},wn,Fs=["size"],ws=["innerProps","isRtl","size"];function Ts(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var Bs=process.env.NODE_ENV==="production"?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3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Ki9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */",toString:Ts},Mr=function(e){var n=e.size,i=pe(e,Fs);return W.jsx("svg",H({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Bs},i))},cn=function(e){return W.jsx(Mr,H({size:20},e),W.jsx("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Lr=function(e){return W.jsx(Mr,H({size:20},e),W.jsx("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},kr=function(e,n){var i=e.isFocused,r=e.theme,s=r.spacing.baseUnit,o=r.colors;return L({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:i?o.neutral60:o.neutral20,padding:s*2,":hover":{color:i?o.neutral80:o.neutral40}})},Gs=kr,js=function(e){var n=e.children,i=e.innerProps;return W.jsx("div",H({},K(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),i),n||W.jsx(Lr,null))},Vs=kr,Ds=function(e){var n=e.children,i=e.innerProps;return W.jsx("div",H({},K(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),i),n||W.jsx(cn,null))},Ps=function(e,n){var i=e.isDisabled,r=e.theme,s=r.spacing.baseUnit,o=r.colors;return L({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:i?o.neutral10:o.neutral20,marginBottom:s*2,marginTop:s*2})},Ns=function(e){var n=e.innerProps;return W.jsx("span",H({},n,K(e,"indicatorSeparator",{"indicator-separator":!0})))},Ms=W.keyframes(wn||(wn=Go([`
4
+ 0%, 80%, 100% { opacity: 0; }
5
+ 40% { opacity: 1; }
6
+ `]))),Ls=function(e,n){var i=e.isFocused,r=e.size,s=e.theme,o=s.colors,c=s.spacing.baseUnit;return L({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},n?{}:{color:i?o.neutral60:o.neutral20,padding:c*2})},Et=function(e){var n=e.delay,i=e.offset;return W.jsx("span",{css:W.css({animation:"".concat(Ms," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:i?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09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tYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */")})},ks=function(e){var n=e.innerProps,i=e.isRtl,r=e.size,s=r===void 0?4:r,o=pe(e,ws);return W.jsx("div",H({},K(L(L({},o),{},{innerProps:n,isRtl:i,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),W.jsx(Et,{delay:0,offset:i}),W.jsx(Et,{delay:160,offset:!0}),W.jsx(Et,{delay:320,offset:!i}))},Ws=function(e,n){var i=e.isDisabled,r=e.isFocused,s=e.theme,o=s.colors,c=s.borderRadius,a=s.spacing;return L({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:i?o.neutral5:o.neutral0,borderColor:i?o.neutral10:r?o.primary:o.neutral20,borderRadius:c,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:r?o.primary:o.neutral30}})},Xs=function(e){var n=e.children,i=e.isDisabled,r=e.isFocused,s=e.innerRef,o=e.innerProps,c=e.menuIsOpen;return W.jsx("div",H({ref:s},K(e,"control",{control:!0,"control--is-disabled":i,"control--is-focused":r,"control--menu-is-open":c}),o,{"aria-disabled":i||void 0}),n)},zs=Xs,Hs=["data"],Zs=function(e,n){var i=e.theme.spacing;return n?{}:{paddingBottom:i.baseUnit*2,paddingTop:i.baseUnit*2}},_s=function(e){var n=e.children,i=e.cx,r=e.getStyles,s=e.getClassNames,o=e.Heading,c=e.headingProps,a=e.innerProps,l=e.label,d=e.theme,f=e.selectProps;return W.jsx("div",H({},K(e,"group",{group:!0}),a),W.jsx(o,H({},c,{selectProps:f,theme:d,getStyles:r,getClassNames:s,cx:i}),l),W.jsx("div",null,n))},Js=function(e,n){var i=e.theme,r=i.colors,s=i.spacing;return L({label:"group",cursor:"default",display:"block"},n?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:s.baseUnit*3,paddingRight:s.baseUnit*3,textTransform:"uppercase"})},Ys=function(e){var n=Gr(e);n.data;var i=pe(n,Hs);return W.jsx("div",H({},K(e,"groupHeading",{"group-heading":!0}),i))},$s=_s,Us=["innerRef","isDisabled","isHidden","inputClassName"],Qs=function(e,n){var i=e.isDisabled,r=e.value,s=e.theme,o=s.spacing,c=s.colors;return L(L({visibility:i?"hidden":"visible",transform:r?"translateZ(0)":""},qs),n?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:c.neutral80})},Wr={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},qs={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":L({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Wr)},Ks=function(e){return L({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Wr)},ea=function(e){var n=e.cx,i=e.value,r=Gr(e),s=r.innerRef,o=r.isDisabled,c=r.isHidden,a=r.inputClassName,l=pe(r,Us);return W.jsx("div",H({},K(e,"input",{"input-container":!0}),{"data-value":i||""}),W.jsx("input",H({className:n({input:!0},a),ref:s,style:Ks(c),disabled:o},l)))},ta=ea,na=function(e,n){var i=e.theme,r=i.spacing,s=i.borderRadius,o=i.colors;return L({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:o.neutral10,borderRadius:s/2,margin:r.baseUnit/2})},ra=function(e,n){var i=e.theme,r=i.borderRadius,s=i.colors,o=e.cropWithEllipsis;return L({overflow:"hidden",textOverflow:o||o===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:r/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},ia=function(e,n){var i=e.theme,r=i.spacing,s=i.borderRadius,o=i.colors,c=e.isFocused;return L({alignItems:"center",display:"flex"},n?{}:{borderRadius:s/2,backgroundColor:c?o.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},Xr=function(e){var n=e.children,i=e.innerProps;return W.jsx("div",i,n)},oa=Xr,sa=Xr;function aa(t){var e=t.children,n=t.innerProps;return W.jsx("div",H({role:"button"},n),e||W.jsx(cn,{size:14}))}var la=function(e){var n=e.children,i=e.components,r=e.data,s=e.innerProps,o=e.isDisabled,c=e.removeProps,a=e.selectProps,l=i.Container,d=i.Label,f=i.Remove;return W.jsx(l,{data:r,innerProps:L(L({},K(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),s),selectProps:a},W.jsx(d,{data:r,innerProps:L({},K(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:a},n),W.jsx(f,{data:r,innerProps:L(L({},K(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},c),selectProps:a}))},ua=la,ca=function(e,n){var i=e.isDisabled,r=e.isFocused,s=e.isSelected,o=e.theme,c=o.spacing,a=o.colors;return L({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:s?a.primary:r?a.primary25:"transparent",color:i?a.neutral20:s?a.neutral0:"inherit",padding:"".concat(c.baseUnit*2,"px ").concat(c.baseUnit*3,"px"),":active":{backgroundColor:i?void 0:s?a.primary:a.primary50}})},da=function(e){var n=e.children,i=e.isDisabled,r=e.isFocused,s=e.isSelected,o=e.innerRef,c=e.innerProps;return W.jsx("div",H({},K(e,"option",{option:!0,"option--is-disabled":i,"option--is-focused":r,"option--is-selected":s}),{ref:o,"aria-disabled":i},c),n)},fa=da,pa=function(e,n){var i=e.theme,r=i.spacing,s=i.colors;return L({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},ga=function(e){var n=e.children,i=e.innerProps;return W.jsx("div",H({},K(e,"placeholder",{placeholder:!0}),i),n)},ba=ga,ha=function(e,n){var i=e.isDisabled,r=e.theme,s=r.spacing,o=r.colors;return L({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:i?o.neutral40:o.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},ma=function(e){var n=e.children,i=e.isDisabled,r=e.innerProps;return W.jsx("div",H({},K(e,"singleValue",{"single-value":!0,"single-value--is-disabled":i}),r),n)},xa=ma,va={ClearIndicator:Ds,Control:zs,DropdownIndicator:js,DownChevron:Lr,CrossIcon:cn,Group:$s,GroupHeading:Ys,IndicatorsContainer:Os,IndicatorSeparator:Ns,Input:ta,LoadingIndicator:ks,Menu:ps,MenuList:bs,MenuPortal:Cs,LoadingMessage:vs,NoOptionsMessage:xs,MultiValue:ua,MultiValueContainer:oa,MultiValueLabel:sa,MultiValueRemove:aa,Option:fa,Placeholder:ba,SelectContainer:Ss,SingleValue:xa,ValueContainer:Rs},Ia=function(e){return L(L({},va),e.components)},Tn=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function Ca(t,e){return!!(t===e||Tn(t)&&Tn(e))}function ya(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!Ca(t[n],e[n]))return!1;return!0}function Sa(t,e){e===void 0&&(e=ya);var n=null;function i(){for(var r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];if(n&&n.lastThis===this&&e(r,n.lastArgs))return n.lastResult;var o=t.apply(this,r);return n={lastResult:o,lastArgs:r,lastThis:this},o}return i.clear=function(){n=null},i}function Aa(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var Ra=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:Aa},Ea=function(e){return W.jsx("span",H({css:Ra},e))},Bn=Ea,Oa={guidance:function(e){var n=e.isSearchable,i=e.isMulti,r=e.tabSelectsValue,s=e.context,o=e.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return o?"".concat(e["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(i?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var n=e.action,i=e.label,r=i===void 0?"":i,s=e.labels,o=e.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return o?"option ".concat(r," is disabled. Select another option."):"option ".concat(r,", selected.");default:return""}},onFocus:function(e){var n=e.context,i=e.focused,r=e.options,s=e.label,o=s===void 0?"":s,c=e.selectValue,a=e.isDisabled,l=e.isSelected,d=e.isAppleDevice,f=function(m,b){return m&&m.length?"".concat(m.indexOf(b)+1," of ").concat(m.length):""};if(n==="value"&&c)return"value ".concat(o," focused, ").concat(f(c,i),".");if(n==="menu"&&d){var h=a?" disabled":"",p="".concat(l?" selected":"").concat(h);return"".concat(o).concat(p,", ").concat(f(r,i),".")}return""},onFilter:function(e){var n=e.inputValue,i=e.resultsMessage;return"".concat(i).concat(n?" for search term "+n:"",".")}},Fa=function(e){var n=e.ariaSelection,i=e.focusedOption,r=e.focusedValue,s=e.focusableOptions,o=e.isFocused,c=e.selectValue,a=e.selectProps,l=e.id,d=e.isAppleDevice,f=a.ariaLiveMessages,h=a.getOptionLabel,p=a.inputValue,x=a.isMulti,m=a.isOptionDisabled,b=a.isSearchable,v=a.menuIsOpen,A=a.options,y=a.screenReaderStatus,I=a.tabSelectsValue,C=a.isLoading,F=a["aria-label"],E=a["aria-live"],B=g.useMemo(function(){return L(L({},Oa),f||{})},[f]),j=g.useMemo(function(){var V="";if(n&&B.onChange){var Z=n.option,J=n.options,Y=n.removedValue,ee=n.removedValues,te=n.value,O=function(ne){return Array.isArray(ne)?null:ne},P=Y||Z||O(te),X=P?h(P):"",T=J||ee||void 0,k=T?T.map(h):[],_=L({isDisabled:P&&m(P,c),label:X,labels:k},n);V=B.onChange(_)}return V},[n,B,m,c,h]),M=g.useMemo(function(){var V="",Z=i||r,J=!!(i&&c&&c.includes(i));if(Z&&B.onFocus){var Y={focused:Z,label:h(Z),isDisabled:m(Z,c),isSelected:J,options:s,context:Z===i?"menu":"value",selectValue:c,isAppleDevice:d};V=B.onFocus(Y)}return V},[i,r,h,m,B,s,c,d]),w=g.useMemo(function(){var V="";if(v&&A.length&&!C&&B.onFilter){var Z=y({count:s.length});V=B.onFilter({inputValue:p,resultsMessage:Z})}return V},[s,p,v,B,A,y,C]),D=(n==null?void 0:n.action)==="initial-input-focus",G=g.useMemo(function(){var V="";if(B.guidance){var Z=r?"value":v?"menu":"input";V=B.guidance({"aria-label":F,context:Z,isDisabled:i&&m(i,c),isMulti:x,isSearchable:b,tabSelectsValue:I,isInitialFocus:D})}return V},[F,i,r,x,m,b,v,B,c,I,D]),N=W.jsx(g.Fragment,null,W.jsx("span",{id:"aria-selection"},j),W.jsx("span",{id:"aria-focused"},M),W.jsx("span",{id:"aria-results"},w),W.jsx("span",{id:"aria-guidance"},G));return W.jsx(g.Fragment,null,W.jsx(Bn,{id:l},D&&N),W.jsx(Bn,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},o&&!D&&N))},wa=Fa,zt=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Ta=new RegExp("["+zt.map(function(t){return t.letters}).join("")+"]","g"),zr={};for(var Ot=0;Ot<zt.length;Ot++)for(var Ft=zt[Ot],wt=0;wt<Ft.letters.length;wt++)zr[Ft.letters[wt]]=Ft.base;var Hr=function(e){return e.replace(Ta,function(n){return zr[n]})},Ba=Sa(Hr),Gn=function(e){return e.replace(/^\s+|\s+$/g,"")},Ga=function(e){return"".concat(e.label," ").concat(e.value)},ja=function(e){return function(n,i){if(n.data.__isNew__)return!0;var r=L({ignoreCase:!0,ignoreAccents:!0,stringify:Ga,trim:!0,matchFrom:"any"},e),s=r.ignoreCase,o=r.ignoreAccents,c=r.stringify,a=r.trim,l=r.matchFrom,d=a?Gn(i):i,f=a?Gn(c(n)):c(n);return s&&(d=d.toLowerCase(),f=f.toLowerCase()),o&&(d=Ba(d),f=Hr(f)),l==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},Va=["innerRef"];function Da(t){var e=t.innerRef,n=pe(t,Va),i=os(n,"onExited","in","enter","exit","appear");return W.jsx("input",H({ref:e},i,{css:W.css({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZWFudCBmb3IgSFRNTCBlbGVtZW50c1xuICBjb25zdCBmaWx0ZXJlZFByb3BzID0gcmVtb3ZlUHJvcHMoXG4gICAgcHJvcHMsXG4gICAgJ29uRXhpdGVkJyxcbiAgICAnaW4nLFxuICAgICdlbnRlcicsXG4gICAgJ2V4aXQnLFxuICAgICdhcHBlYXInXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8aW5wdXRcbiAgICAgIHJlZj17aW5uZXJSZWZ9XG4gICAgICB7Li4uZmlsdGVyZWRQcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgdGhpcyBoaWRlcyB0aGUgZmxhc2hpbmcgY3Vyc29yXG4gICAgICAgIGNhcmV0Q29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIGdyaWRBcmVhOiAnMSAvIDEgLyAyIC8gMycsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSguMDEpJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")}))}var Pa=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};function Na(t){var e=t.isEnabled,n=t.onBottomArrive,i=t.onBottomLeave,r=t.onTopArrive,s=t.onTopLeave,o=g.useRef(!1),c=g.useRef(!1),a=g.useRef(0),l=g.useRef(null),d=g.useCallback(function(b,v){if(l.current!==null){var A=l.current,y=A.scrollTop,I=A.scrollHeight,C=A.clientHeight,F=l.current,E=v>0,B=I-C-y,j=!1;B>v&&o.current&&(i&&i(b),o.current=!1),E&&c.current&&(s&&s(b),c.current=!1),E&&v>B?(n&&!o.current&&n(b),F.scrollTop=I,j=!0,o.current=!0):!E&&-v>y&&(r&&!c.current&&r(b),F.scrollTop=0,j=!0,c.current=!0),j&&Pa(b)}},[n,i,r,s]),f=g.useCallback(function(b){d(b,b.deltaY)},[d]),h=g.useCallback(function(b){a.current=b.changedTouches[0].clientY},[]),p=g.useCallback(function(b){var v=a.current-b.changedTouches[0].clientY;d(b,v)},[d]),x=g.useCallback(function(b){if(b){var v=ns?{passive:!1}:!1;b.addEventListener("wheel",f,v),b.addEventListener("touchstart",h,v),b.addEventListener("touchmove",p,v)}},[p,h,f]),m=g.useCallback(function(b){b&&(b.removeEventListener("wheel",f,!1),b.removeEventListener("touchstart",h,!1),b.removeEventListener("touchmove",p,!1))},[p,h,f]);return g.useEffect(function(){if(e){var b=l.current;return x(b),function(){m(b)}}},[e,x,m]),function(b){l.current=b}}var jn=["boxSizing","height","overflow","paddingRight","position"],Vn={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Dn(t){t.cancelable&&t.preventDefault()}function Pn(t){t.stopPropagation()}function Nn(){var t=this.scrollTop,e=this.scrollHeight,n=t+this.offsetHeight;t===0?this.scrollTop=1:n===e&&(this.scrollTop=t-1)}function Mn(){return"ontouchstart"in window||navigator.maxTouchPoints}var Ln=!!(typeof window<"u"&&window.document&&window.document.createElement),We=0,we={capture:!1,passive:!1};function Ma(t){var e=t.isEnabled,n=t.accountForScrollbars,i=n===void 0?!0:n,r=g.useRef({}),s=g.useRef(null),o=g.useCallback(function(a){if(Ln){var l=document.body,d=l&&l.style;if(i&&jn.forEach(function(x){var m=d&&d[x];r.current[x]=m}),i&&We<1){var f=parseInt(r.current.paddingRight,10)||0,h=document.body?document.body.clientWidth:0,p=window.innerWidth-h+f||0;Object.keys(Vn).forEach(function(x){var m=Vn[x];d&&(d[x]=m)}),d&&(d.paddingRight="".concat(p,"px"))}l&&Mn()&&(l.addEventListener("touchmove",Dn,we),a&&(a.addEventListener("touchstart",Nn,we),a.addEventListener("touchmove",Pn,we))),We+=1}},[i]),c=g.useCallback(function(a){if(Ln){var l=document.body,d=l&&l.style;We=Math.max(We-1,0),i&&We<1&&jn.forEach(function(f){var h=r.current[f];d&&(d[f]=h)}),l&&Mn()&&(l.removeEventListener("touchmove",Dn,we),a&&(a.removeEventListener("touchstart",Nn,we),a.removeEventListener("touchmove",Pn,we)))}},[i]);return g.useEffect(function(){if(e){var a=s.current;return o(a),function(){c(a)}}},[e,o,c]),function(a){s.current=a}}function La(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var ka=function(e){var n=e.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},Wa=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIF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lLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:La};function Xa(t){var e=t.children,n=t.lockEnabled,i=t.captureEnabled,r=i===void 0?!0:i,s=t.onBottomArrive,o=t.onBottomLeave,c=t.onTopArrive,a=t.onTopLeave,l=Na({isEnabled:r,onBottomArrive:s,onBottomLeave:o,onTopArrive:c,onTopLeave:a}),d=Ma({isEnabled:n}),f=function(p){l(p),d(p)};return W.jsx(g.Fragment,null,n&&W.jsx("div",{onClick:ka,css:Wa}),e(f))}function za(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var Ha=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:za},Za=function(e){var n=e.name,i=e.onFocus;return W.jsx("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:i,css:Ha,value:"",onChange:function(){}})},_a=Za;function dn(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function Ja(){return dn(/^iPhone/i)}function Zr(){return dn(/^Mac/i)}function Ya(){return dn(/^iPad/i)||Zr()&&navigator.maxTouchPoints>1}function $a(){return Ja()||Ya()}function Ua(){return Zr()||$a()}var Qa=function(e){return e.label},_r=function(e){return e.label},Jr=function(e){return e.value},qa=function(e){return!!e.isDisabled},Ka={clearIndicator:Vs,container:ys,control:Ws,dropdownIndicator:Gs,group:Zs,groupHeading:Js,indicatorsContainer:Es,indicatorSeparator:Ps,input:Qs,loadingIndicator:Ls,loadingMessage:ms,menu:cs,menuList:gs,menuPortal:Is,multiValue:na,multiValueLabel:ra,multiValueRemove:ia,noOptionsMessage:hs,option:ca,placeholder:pa,singleValue:ha,valueContainer:As},el={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},tl=4,Yr=4,nl=38,rl=Yr*2,il={baseUnit:Yr,controlHeight:nl,menuGutter:rl},Tt={borderRadius:tl,colors:el,spacing:il},ol={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Fn(),captureMenuScroll:!Fn(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:ja(),formatGroupLabel:Qa,getOptionLabel:_r,getOptionValue:Jr,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:qa,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!es(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var n=e.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function kn(t,e,n,i){var r=Qr(t,e,n),s=qr(t,e,n),o=Ur(t,e),c=pt(t,e);return{type:"option",data:e,isDisabled:r,isSelected:s,label:o,value:c,index:i}}function qe(t,e){return t.options.map(function(n,i){if("options"in n){var r=n.options.map(function(o,c){return kn(t,o,e,c)}).filter(function(o){return Xn(t,o)});return r.length>0?{type:"group",data:n,options:r,index:i}:void 0}var s=kn(t,n,e,i);return Xn(t,s)?s:void 0}).filter(rs)}function $r(t){return t.reduce(function(e,n){return n.type==="group"?e.push.apply(e,Ve(n.options.map(function(i){return i.data}))):e.push(n.data),e},[])}function Wn(t,e){return t.reduce(function(n,i){return i.type==="group"?n.push.apply(n,Ve(i.options.map(function(r){return{data:r.data,id:"".concat(e,"-").concat(i.index,"-").concat(r.index)}}))):n.push({data:i.data,id:"".concat(e,"-").concat(i.index)}),n},[])}function sl(t,e){return $r(qe(t,e))}function Xn(t,e){var n=t.inputValue,i=n===void 0?"":n,r=e.data,s=e.isSelected,o=e.label,c=e.value;return(!ei(t)||!s)&&Kr(t,{label:o,value:c,data:r},i)}function al(t,e){var n=t.focusedValue,i=t.selectValue,r=i.indexOf(n);if(r>-1){var s=e.indexOf(n);if(s>-1)return n;if(r<e.length)return e[r]}return null}function ll(t,e){var n=t.focusedOption;return n&&e.indexOf(n)>-1?n:e[0]}var Bt=function(e,n){var i,r=(i=e.find(function(s){return s.data===n}))===null||i===void 0?void 0:i.id;return r||null},Ur=function(e,n){return e.getOptionLabel(n)},pt=function(e,n){return e.getOptionValue(n)};function Qr(t,e,n){return typeof t.isOptionDisabled=="function"?t.isOptionDisabled(e,n):!1}function qr(t,e,n){if(n.indexOf(e)>-1)return!0;if(typeof t.isOptionSelected=="function")return t.isOptionSelected(e,n);var i=pt(t,e);return n.some(function(r){return pt(t,r)===i})}function Kr(t,e,n){return t.filterOption?t.filterOption(e,n):!0}var ei=function(e){var n=e.hideSelectedOptions,i=e.isMulti;return n===void 0?i:n},ul=1,xt=function(t){yo(n,t);var e=Ro(n);function n(i){var r;if(Io(this,n),r=e.call(this,i),r.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(a){r.controlRef=a},r.focusedOptionRef=null,r.getFocusedOptionRef=function(a){r.focusedOptionRef=a},r.menuListRef=null,r.getMenuListRef=function(a){r.menuListRef=a},r.inputRef=null,r.getInputRef=function(a){r.inputRef=a},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(a,l){var d=r.props,f=d.onChange,h=d.name;l.name=h,r.ariaOnChange(a,l),f(a,l)},r.setValue=function(a,l,d){var f=r.props,h=f.closeMenuOnSelect,p=f.isMulti,x=f.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:x}),h&&(r.setState({inputIsHiddenAfterUpdate:!p}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(a,{action:l,option:d})},r.selectOption=function(a){var l=r.props,d=l.blurInputOnSelect,f=l.isMulti,h=l.name,p=r.state.selectValue,x=f&&r.isOptionSelected(a,p),m=r.isOptionDisabled(a,p);if(x){var b=r.getOptionValue(a);r.setValue(p.filter(function(v){return r.getOptionValue(v)!==b}),"deselect-option",a)}else if(!m)f?r.setValue([].concat(Ve(p),[a]),"select-option",a):r.setValue(a,"select-option");else{r.ariaOnChange(a,{action:"select-option",option:a,name:h});return}d&&r.blurInput()},r.removeValue=function(a){var l=r.props.isMulti,d=r.state.selectValue,f=r.getOptionValue(a),h=d.filter(function(x){return r.getOptionValue(x)!==f}),p=Xe(l,h,h[0]||null);r.onChange(p,{action:"remove-value",removedValue:a}),r.focusInput()},r.clearValue=function(){var a=r.state.selectValue;r.onChange(Xe(r.props.isMulti,[],null),{action:"clear",removedValues:a})},r.popValue=function(){var a=r.props.isMulti,l=r.state.selectValue,d=l[l.length-1],f=l.slice(0,l.length-1),h=Xe(a,f,f[0]||null);d&&r.onChange(h,{action:"pop-value",removedValue:d})},r.getFocusedOptionId=function(a){return Bt(r.state.focusableOptionsWithIds,a)},r.getFocusableOptionsWithIds=function(){return Wn(qe(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var a=arguments.length,l=new Array(a),d=0;d<a;d++)l[d]=arguments[d];return Yo.apply(void 0,[r.props.classNamePrefix].concat(l))},r.getOptionLabel=function(a){return Ur(r.props,a)},r.getOptionValue=function(a){return pt(r.props,a)},r.getStyles=function(a,l){var d=r.props.unstyled,f=Ka[a](l,d);f.boxSizing="border-box";var h=r.props.styles[a];return h?h(f,l):f},r.getClassNames=function(a,l){var d,f;return(d=(f=r.props.classNames)[a])===null||d===void 0?void 0:d.call(f,l)},r.getElementId=function(a){return"".concat(r.state.instancePrefix,"-").concat(a)},r.getComponents=function(){return Ia(r.props)},r.buildCategorizedOptions=function(){return qe(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return $r(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(a,l){r.setState({ariaSelection:L({value:a},l)})},r.onMenuMouseDown=function(a){a.button===0&&(a.stopPropagation(),a.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(a){r.blockOptionHover=!1},r.onControlMouseDown=function(a){if(!a.defaultPrevented){var l=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&r.onMenuClose():l&&r.openMenu("first"):(l&&(r.openAfterFocus=!0),r.focusInput()),a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.preventDefault()}},r.onDropdownIndicatorMouseDown=function(a){if(!(a&&a.type==="mousedown"&&a.button!==0)&&!r.props.isDisabled){var l=r.props,d=l.isMulti,f=l.menuIsOpen;r.focusInput(),f?(r.setState({inputIsHiddenAfterUpdate:!d}),r.onMenuClose()):r.openMenu("first"),a.preventDefault()}},r.onClearIndicatorMouseDown=function(a){a&&a.type==="mousedown"&&a.button!==0||(r.clearValue(),a.preventDefault(),r.openAfterFocus=!1,a.type==="touchend"?r.focusInput():setTimeout(function(){return r.focusInput()}))},r.onScroll=function(a){typeof r.props.closeMenuOnScroll=="boolean"?a.target instanceof HTMLElement&&mt(a.target)&&r.props.onMenuClose():typeof r.props.closeMenuOnScroll=="function"&&r.props.closeMenuOnScroll(a)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(a){var l=a.touches,d=l&&l.item(0);d&&(r.initialTouchX=d.clientX,r.initialTouchY=d.clientY,r.userIsDragging=!1)},r.onTouchMove=function(a){var l=a.touches,d=l&&l.item(0);if(d){var f=Math.abs(d.clientX-r.initialTouchX),h=Math.abs(d.clientY-r.initialTouchY),p=5;r.userIsDragging=f>p||h>p}},r.onTouchEnd=function(a){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(a.target)&&r.menuListRef&&!r.menuListRef.contains(a.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(a){r.userIsDragging||r.onControlMouseDown(a)},r.onClearIndicatorTouchEnd=function(a){r.userIsDragging||r.onClearIndicatorMouseDown(a)},r.onDropdownIndicatorTouchEnd=function(a){r.userIsDragging||r.onDropdownIndicatorMouseDown(a)},r.handleInputChange=function(a){var l=r.props.inputValue,d=a.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(d,{action:"input-change",prevInputValue:l}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(a){r.props.onFocus&&r.props.onFocus(a),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(a){var l=r.props.inputValue;if(r.menuListRef&&r.menuListRef.contains(document.activeElement)){r.inputRef.focus();return}r.props.onBlur&&r.props.onBlur(a),r.onInputChange("",{action:"input-blur",prevInputValue:l}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1})},r.onOptionHover=function(a){if(!(r.blockOptionHover||r.state.focusedOption===a)){var l=r.getFocusableOptions(),d=l.indexOf(a);r.setState({focusedOption:a,focusedOptionId:d>-1?r.getFocusedOptionId(a):null})}},r.shouldHideSelectedOptions=function(){return ei(r.props)},r.onValueInputFocus=function(a){a.preventDefault(),a.stopPropagation(),r.focus()},r.onKeyDown=function(a){var l=r.props,d=l.isMulti,f=l.backspaceRemovesValue,h=l.escapeClearsValue,p=l.inputValue,x=l.isClearable,m=l.isDisabled,b=l.menuIsOpen,v=l.onKeyDown,A=l.tabSelectsValue,y=l.openMenuOnFocus,I=r.state,C=I.focusedOption,F=I.focusedValue,E=I.selectValue;if(!m&&!(typeof v=="function"&&(v(a),a.defaultPrevented))){switch(r.blockOptionHover=!0,a.key){case"ArrowLeft":if(!d||p)return;r.focusValue("previous");break;case"ArrowRight":if(!d||p)return;r.focusValue("next");break;case"Delete":case"Backspace":if(p)return;if(F)r.removeValue(F);else{if(!f)return;d?r.popValue():x&&r.clearValue()}break;case"Tab":if(r.isComposing||a.shiftKey||!b||!A||!C||y&&r.isOptionSelected(C,E))return;r.selectOption(C);break;case"Enter":if(a.keyCode===229)break;if(b){if(!C||r.isComposing)return;r.selectOption(C);break}return;case"Escape":b?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:p}),r.onMenuClose()):x&&h&&r.clearValue();break;case" ":if(p)return;if(!b){r.openMenu("first");break}if(!C)return;r.selectOption(C);break;case"ArrowUp":b?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":b?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!b)return;r.focusOption("pageup");break;case"PageDown":if(!b)return;r.focusOption("pagedown");break;case"Home":if(!b)return;r.focusOption("first");break;case"End":if(!b)return;r.focusOption("last");break;default:return}a.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++ul),r.state.selectValue=dt(i.value),i.menuIsOpen&&r.state.selectValue.length){var s=r.getFocusableOptionsWithIds(),o=r.buildFocusableOptions(),c=o.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=s,r.state.focusedOption=o[c],r.state.focusedOptionId=Bt(s,o[c])}return r}return Co(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&On(this.menuListRef,this.focusedOptionRef),Ua()&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(r){var s=this.props,o=s.isDisabled,c=s.menuIsOpen,a=this.state.isFocused;(a&&!o&&r.isDisabled||a&&c&&!r.menuIsOpen)&&this.focusInput(),a&&o&&!r.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!a&&!o&&r.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(On(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(r,s){this.props.onInputChange(r,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(r){var s=this,o=this.state,c=o.selectValue,a=o.isFocused,l=this.buildFocusableOptions(),d=r==="first"?0:l.length-1;if(!this.props.isMulti){var f=l.indexOf(c[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(a&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:l[d],focusedOptionId:this.getFocusedOptionId(l[d])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(r){var s=this.state,o=s.selectValue,c=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var a=o.indexOf(c);c||(a=-1);var l=o.length-1,d=-1;if(o.length){switch(r){case"previous":a===0?d=0:a===-1?d=l:d=a-1;break;case"next":a>-1&&a<l&&(d=a+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:o[d]})}}}},{key:"focusOption",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,o=this.state.focusedOption,c=this.getFocusableOptions();if(c.length){var a=0,l=c.indexOf(o);o||(l=-1),r==="up"?a=l>0?l-1:c.length-1:r==="down"?a=(l+1)%c.length:r==="pageup"?(a=l-s,a<0&&(a=0)):r==="pagedown"?(a=l+s,a>c.length-1&&(a=c.length-1)):r==="last"&&(a=c.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:c[a],focusedValue:null,focusedOptionId:this.getFocusedOptionId(c[a])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Tt):L(L({},Tt),this.props.theme):Tt}},{key:"getCommonProps",value:function(){var r=this.clearValue,s=this.cx,o=this.getStyles,c=this.getClassNames,a=this.getValue,l=this.selectOption,d=this.setValue,f=this.props,h=f.isMulti,p=f.isRtl,x=f.options,m=this.hasValue();return{clearValue:r,cx:s,getStyles:o,getClassNames:c,getValue:a,hasValue:m,isMulti:h,isRtl:p,options:x,selectOption:l,selectProps:f,setValue:d,theme:this.getTheme()}}},{key:"hasValue",value:function(){var r=this.state.selectValue;return r.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var r=this.props,s=r.isClearable,o=r.isMulti;return s===void 0?o:s}},{key:"isOptionDisabled",value:function(r,s){return Qr(this.props,r,s)}},{key:"isOptionSelected",value:function(r,s){return qr(this.props,r,s)}},{key:"filterOption",value:function(r,s){return Kr(this.props,r,s)}},{key:"formatOptionLabel",value:function(r,s){if(typeof this.props.formatOptionLabel=="function"){var o=this.props.inputValue,c=this.state.selectValue;return this.props.formatOptionLabel(r,{context:s,inputValue:o,selectValue:c})}else return this.getOptionLabel(r)}},{key:"formatGroupLabel",value:function(r){return this.props.formatGroupLabel(r)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var r=this.props,s=r.isDisabled,o=r.isSearchable,c=r.inputId,a=r.inputValue,l=r.tabIndex,d=r.form,f=r.menuIsOpen,h=r.required,p=this.getComponents(),x=p.Input,m=this.state,b=m.inputIsHidden,v=m.ariaSelection,A=this.commonProps,y=c||this.getElementId("input"),I=L(L(L({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":h,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},f&&{"aria-controls":this.getElementId("listbox")}),!o&&{"aria-readonly":!0}),this.hasValue()?(v==null?void 0:v.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return o?$.createElement(x,H({},A,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:y,innerRef:this.getInputRef,isDisabled:s,isHidden:b,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:l,form:d,type:"text",value:a},I)):$.createElement(Da,H({id:y,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ct,onFocus:this.onInputFocus,disabled:s,tabIndex:l,inputMode:"none",form:d,value:""},I))}},{key:"renderPlaceholderOrValue",value:function(){var r=this,s=this.getComponents(),o=s.MultiValue,c=s.MultiValueContainer,a=s.MultiValueLabel,l=s.MultiValueRemove,d=s.SingleValue,f=s.Placeholder,h=this.commonProps,p=this.props,x=p.controlShouldRenderValue,m=p.isDisabled,b=p.isMulti,v=p.inputValue,A=p.placeholder,y=this.state,I=y.selectValue,C=y.focusedValue,F=y.isFocused;if(!this.hasValue()||!x)return v?null:$.createElement(f,H({},h,{key:"placeholder",isDisabled:m,isFocused:F,innerProps:{id:this.getElementId("placeholder")}}),A);if(b)return I.map(function(B,j){var M=B===C,w="".concat(r.getOptionLabel(B),"-").concat(r.getOptionValue(B));return $.createElement(o,H({},h,{components:{Container:c,Label:a,Remove:l},isFocused:M,isDisabled:m,key:w,index:j,removeProps:{onClick:function(){return r.removeValue(B)},onTouchEnd:function(){return r.removeValue(B)},onMouseDown:function(G){G.preventDefault()}},data:B}),r.formatOptionLabel(B,"value"))});if(v)return null;var E=I[0];return $.createElement(d,H({},h,{data:E,isDisabled:m}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var r=this.getComponents(),s=r.ClearIndicator,o=this.commonProps,c=this.props,a=c.isDisabled,l=c.isLoading,d=this.state.isFocused;if(!this.isClearable()||!s||a||!this.hasValue()||l)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return $.createElement(s,H({},o,{innerProps:f,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var r=this.getComponents(),s=r.LoadingIndicator,o=this.commonProps,c=this.props,a=c.isDisabled,l=c.isLoading,d=this.state.isFocused;if(!s||!l)return null;var f={"aria-hidden":"true"};return $.createElement(s,H({},o,{innerProps:f,isDisabled:a,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var r=this.getComponents(),s=r.DropdownIndicator,o=r.IndicatorSeparator;if(!s||!o)return null;var c=this.commonProps,a=this.props.isDisabled,l=this.state.isFocused;return $.createElement(o,H({},c,{isDisabled:a,isFocused:l}))}},{key:"renderDropdownIndicator",value:function(){var r=this.getComponents(),s=r.DropdownIndicator;if(!s)return null;var o=this.commonProps,c=this.props.isDisabled,a=this.state.isFocused,l={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return $.createElement(s,H({},o,{innerProps:l,isDisabled:c,isFocused:a}))}},{key:"renderMenu",value:function(){var r=this,s=this.getComponents(),o=s.Group,c=s.GroupHeading,a=s.Menu,l=s.MenuList,d=s.MenuPortal,f=s.LoadingMessage,h=s.NoOptionsMessage,p=s.Option,x=this.commonProps,m=this.state.focusedOption,b=this.props,v=b.captureMenuScroll,A=b.inputValue,y=b.isLoading,I=b.loadingMessage,C=b.minMenuHeight,F=b.maxMenuHeight,E=b.menuIsOpen,B=b.menuPlacement,j=b.menuPosition,M=b.menuPortalTarget,w=b.menuShouldBlockScroll,D=b.menuShouldScrollIntoView,G=b.noOptionsMessage,N=b.onMenuScrollToTop,V=b.onMenuScrollToBottom;if(!E)return null;var Z=function(X,T){var k=X.type,_=X.data,z=X.isDisabled,ne=X.isSelected,de=X.label,Ct=X.value,Ze=m===_,Me=z?void 0:function(){return r.onOptionHover(_)},yt=z?void 0:function(){return r.selectOption(_)},_e="".concat(r.getElementId("option"),"-").concat(T),Le={id:_e,onClick:yt,onMouseMove:Me,onMouseOver:Me,tabIndex:-1,role:"option","aria-selected":r.state.isAppleDevice?void 0:ne};return $.createElement(p,H({},x,{innerProps:Le,data:_,isDisabled:z,isSelected:ne,key:_e,label:de,type:k,value:Ct,isFocused:Ze,innerRef:Ze?r.getFocusedOptionRef:void 0}),r.formatOptionLabel(X.data,"menu"))},J;if(this.hasOptions())J=this.getCategorizedOptions().map(function(P){if(P.type==="group"){var X=P.data,T=P.options,k=P.index,_="".concat(r.getElementId("group"),"-").concat(k),z="".concat(_,"-heading");return $.createElement(o,H({},x,{key:_,data:X,options:T,Heading:c,headingProps:{id:z,data:P.data},label:r.formatGroupLabel(P.data)}),P.options.map(function(ne){return Z(ne,"".concat(k,"-").concat(ne.index))}))}else if(P.type==="option")return Z(P,"".concat(P.index))});else if(y){var Y=I({inputValue:A});if(Y===null)return null;J=$.createElement(f,x,Y)}else{var ee=G({inputValue:A});if(ee===null)return null;J=$.createElement(h,x,ee)}var te={minMenuHeight:C,maxMenuHeight:F,menuPlacement:B,menuPosition:j,menuShouldScrollIntoView:D},O=$.createElement(ds,H({},x,te),function(P){var X=P.ref,T=P.placerProps,k=T.placement,_=T.maxHeight;return $.createElement(a,H({},x,te,{innerRef:X,innerProps:{onMouseDown:r.onMenuMouseDown,onMouseMove:r.onMenuMouseMove},isLoading:y,placement:k}),$.createElement(Xa,{captureEnabled:v,onTopArrive:N,onBottomArrive:V,lockEnabled:w},function(z){return $.createElement(l,H({},x,{innerRef:function(de){r.getMenuListRef(de),z(de)},innerProps:{role:"listbox","aria-multiselectable":x.isMulti,id:r.getElementId("listbox")},isLoading:y,maxHeight:_,focusedOption:m}),J)}))});return M||j==="fixed"?$.createElement(d,H({},x,{appendTo:M,controlElement:this.controlRef,menuPlacement:B,menuPosition:j}),O):O}},{key:"renderFormField",value:function(){var r=this,s=this.props,o=s.delimiter,c=s.isDisabled,a=s.isMulti,l=s.name,d=s.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!c)return $.createElement(_a,{name:l,onFocus:this.onValueInputFocus});if(!(!l||c))if(a)if(o){var h=f.map(function(m){return r.getOptionValue(m)}).join(o);return $.createElement("input",{name:l,type:"hidden",value:h})}else{var p=f.length>0?f.map(function(m,b){return $.createElement("input",{key:"i-".concat(b),name:l,type:"hidden",value:r.getOptionValue(m)})}):$.createElement("input",{name:l,type:"hidden",value:""});return $.createElement("div",null,p)}else{var x=f[0]?this.getOptionValue(f[0]):"";return $.createElement("input",{name:l,type:"hidden",value:x})}}},{key:"renderLiveRegion",value:function(){var r=this.commonProps,s=this.state,o=s.ariaSelection,c=s.focusedOption,a=s.focusedValue,l=s.isFocused,d=s.selectValue,f=this.getFocusableOptions();return $.createElement(wa,H({},r,{id:this.getElementId("live-region"),ariaSelection:o,focusedOption:c,focusedValue:a,isFocused:l,selectValue:d,focusableOptions:f,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var r=this.getComponents(),s=r.Control,o=r.IndicatorsContainer,c=r.SelectContainer,a=r.ValueContainer,l=this.props,d=l.className,f=l.id,h=l.isDisabled,p=l.menuIsOpen,x=this.state.isFocused,m=this.commonProps=this.getCommonProps();return $.createElement(c,H({},m,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:x}),this.renderLiveRegion(),$.createElement(s,H({},m,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:x,menuIsOpen:p}),$.createElement(a,H({},m,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),$.createElement(o,H({},m,{isDisabled:h}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(r,s){var o=s.prevProps,c=s.clearFocusValueOnUpdate,a=s.inputIsHiddenAfterUpdate,l=s.ariaSelection,d=s.isFocused,f=s.prevWasFocused,h=s.instancePrefix,p=r.options,x=r.value,m=r.menuIsOpen,b=r.inputValue,v=r.isMulti,A=dt(x),y={};if(o&&(x!==o.value||p!==o.options||m!==o.menuIsOpen||b!==o.inputValue)){var I=m?sl(r,A):[],C=m?Wn(qe(r,A),"".concat(h,"-option")):[],F=c?al(s,A):null,E=ll(s,I),B=Bt(C,E);y={selectValue:A,focusedOption:E,focusedOptionId:B,focusableOptionsWithIds:C,focusedValue:F,clearFocusValueOnUpdate:!1}}var j=a!=null&&r!==o?{inputIsHidden:a,inputIsHiddenAfterUpdate:void 0}:{},M=l,w=d&&f;return d&&!w&&(M={value:Xe(v,A,A[0]||null),options:A,action:"initial-input-focus"},w=!f),(l==null?void 0:l.action)==="initial-input-focus"&&(M=null),L(L(L({},y),j),{},{prevProps:r,ariaSelection:M,prevWasFocused:w})}}]),n}(g.Component);xt.defaultProps=ol;var cl=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function fn(t){var e=t.defaultInputValue,n=e===void 0?"":e,i=t.defaultMenuIsOpen,r=i===void 0?!1:i,s=t.defaultValue,o=s===void 0?null:s,c=t.inputValue,a=t.menuIsOpen,l=t.onChange,d=t.onInputChange,f=t.onMenuClose,h=t.onMenuOpen,p=t.value,x=pe(t,cl),m=g.useState(c!==void 0?c:n),b=re(m,2),v=b[0],A=b[1],y=g.useState(a!==void 0?a:r),I=re(y,2),C=I[0],F=I[1],E=g.useState(p!==void 0?p:o),B=re(E,2),j=B[0],M=B[1],w=g.useCallback(function(Y,ee){typeof l=="function"&&l(Y,ee),M(Y)},[l]),D=g.useCallback(function(Y,ee){var te;typeof d=="function"&&(te=d(Y,ee)),A(te!==void 0?te:Y)},[d]),G=g.useCallback(function(){typeof h=="function"&&h(),F(!0)},[h]),N=g.useCallback(function(){typeof f=="function"&&f(),F(!1)},[f]),V=c!==void 0?c:v,Z=a!==void 0?a:C,J=p!==void 0?p:j;return L(L({},x),{},{inputValue:V,menuIsOpen:Z,onChange:w,onInputChange:D,onMenuClose:N,onMenuOpen:G,value:J})}var dl=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function ti(t){var e=t.defaultOptions,n=e===void 0?!1:e,i=t.cacheOptions,r=i===void 0?!1:i,s=t.loadOptions;t.options;var o=t.isLoading,c=o===void 0?!1:o,a=t.onInputChange,l=t.filterOption,d=l===void 0?null:l,f=pe(t,dl),h=f.inputValue,p=g.useRef(void 0),x=g.useRef(!1),m=g.useState(Array.isArray(n)?n:void 0),b=re(m,2),v=b[0],A=b[1],y=g.useState(typeof h<"u"?h:""),I=re(y,2),C=I[0],F=I[1],E=g.useState(n===!0),B=re(E,2),j=B[0],M=B[1],w=g.useState(void 0),D=re(w,2),G=D[0],N=D[1],V=g.useState([]),Z=re(V,2),J=Z[0],Y=Z[1],ee=g.useState(!1),te=re(ee,2),O=te[0],P=te[1],X=g.useState({}),T=re(X,2),k=T[0],_=T[1],z=g.useState(void 0),ne=re(z,2),de=ne[0],Ct=ne[1],Ze=g.useState(void 0),Me=re(Ze,2),yt=Me[0],_e=Me[1];r!==yt&&(_({}),_e(r)),n!==de&&(A(Array.isArray(n)?n:void 0),Ct(n)),g.useEffect(function(){return x.current=!0,function(){x.current=!1}},[]);var Le=g.useCallback(function(ke,Fe){if(!s)return Fe();var ue=s(ke,Fe);ue&&typeof ue.then=="function"&&ue.then(Fe,function(){return Fe()})},[s]);g.useEffect(function(){n===!0&&Le(C,function(ke){x.current&&(A(ke||[]),M(!!p.current))})},[]);var Wi=g.useCallback(function(ke,Fe){var ue=$o(ke,Fe,a);if(!ue){p.current=void 0,F(""),N(""),Y([]),M(!1),P(!1);return}if(r&&k[ue])F(ue),N(ue),Y(k[ue]),M(!1),P(!1);else{var zi=p.current={};F(ue),M(!0),P(!G),Le(ue,function(St){x&&zi===p.current&&(p.current=void 0,M(!1),N(ue),Y(St||[]),P(!1),_(St?L(L({},k),{},Ge({},ue,St)):k))})}},[r,Le,G,k,a]),Xi=O?[]:C&&G?J:v||[];return L(L({},f),{},{options:Xi,isLoading:j||c,onInputChange:Wi,filterOption:d})}var fl=g.forwardRef(function(t,e){var n=ti(t),i=fn(n);return $.createElement(xt,H({ref:e},i))}),pl=fl,gl=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],zn=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=String(e).toLowerCase(),s=String(i.getOptionValue(n)).toLowerCase(),o=String(i.getOptionLabel(n)).toLowerCase();return s===r||o===r},Gt={formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,n,i,r){return!(!e||n.some(function(s){return zn(e,s,r)})||i.some(function(s){return zn(e,s,r)}))},getNewOptionData:function(e,n){return{label:n,value:e,__isNew__:!0}}};function ni(t){var e=t.allowCreateWhileLoading,n=e===void 0?!1:e,i=t.createOptionPosition,r=i===void 0?"last":i,s=t.formatCreateLabel,o=s===void 0?Gt.formatCreateLabel:s,c=t.isValidNewOption,a=c===void 0?Gt.isValidNewOption:c,l=t.getNewOptionData,d=l===void 0?Gt.getNewOptionData:l,f=t.onCreateOption,h=t.options,p=h===void 0?[]:h,x=t.onChange,m=pe(t,gl),b=m.getOptionValue,v=b===void 0?Jr:b,A=m.getOptionLabel,y=A===void 0?_r:A,I=m.inputValue,C=m.isLoading,F=m.isMulti,E=m.value,B=m.name,j=g.useMemo(function(){return a(I,dt(E),p,{getOptionValue:v,getOptionLabel:y})?d(I,o(I)):void 0},[o,d,y,v,I,a,p,E]),M=g.useMemo(function(){return(n||!C)&&j?r==="first"?[j].concat(Ve(p)):[].concat(Ve(p),[j]):p},[n,r,C,j,p]),w=g.useCallback(function(D,G){if(G.action!=="select-option")return x(D,G);var N=Array.isArray(D)?D:[D];if(N[N.length-1]===j){if(f)f(I);else{var V=d(I,I),Z={action:"create-option",name:B,option:V};x(Xe(F,[].concat(Ve(dt(E)),[V]),V),Z)}return}x(D,G)},[d,I,F,B,j,f,x,E]);return L(L({},m),{},{options:M,onChange:w})}var bl=g.forwardRef(function(t,e){var n=fn(t),i=ni(n);return $.createElement(xt,H({ref:e},i))}),hl=bl,ml=g.forwardRef(function(t,e){var n=ti(t),i=fn(n),r=ni(i);return $.createElement(xt,H({ref:e},r))}),xl=ml;function ri({field:t,fieldId:e,value:n,onChange:i,onBlur:r,error:s,helperText:o,formulaConfig:c,onFormulaConfigChange:a,renderNative:l}){const d=t.formula===!0,f=Pe(),h=g.useRef(null),[p,x]=g.useState(()=>d&&e in(c??{})),m=g.useRef(p);m.current=p,g.useEffect(()=>{if(!(!d||!f))return m.current&&f.notifyFormulaToggle(!0),()=>{m.current&&f.notifyFormulaToggle(!1)}},[]);const b=p,[v,A]=g.useState(()=>d&&p?Ce(String(n??""),!0):[]),y=g.useRef(n),I=F=>{A(F);const E=b?He(F):ye(F);y.current=E,i(E)},C=g.useCallback(()=>{const F=!p;if(x(F),f==null||f.notifyFormulaToggle(F,F?h.current:null),F){const E=String(n??""),B=Ce(E,!0);A(B);const j=He(B);y.current=j,i(j),a==null||a({...c,[e]:qt()})}else{const E=ye(v);y.current=E,i(E);const B={...c};delete B[e],a==null||a(B),A([])}},[p,f,n,v,c,e,a,i]);return d?u.jsxs("div",{children:[u.jsxs(S.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:0},children:[u.jsx(oe,{label:t.label,required:t.required,showOptional:t.showOptional,info:t.info,htmlFor:e,dataTestId:t.dataTestId}),u.jsx(S.Tooltip,{title:p?"Use static value (dropdown)":"Use dynamic formula expression",placement:"top",children:u.jsxs(S.Box,{component:"button",type:"button",ref:h,onClick:C,sx:{border:"none",cursor:"pointer",mb:"4px",display:"inline-flex",alignItems:"center",gap:.4,px:p?.75:.5,py:.25,borderRadius:"4px",fontSize:11,fontWeight:600,lineHeight:1,color:p?"#7c4dff":"#94a3b8",bgcolor:p?"#ede9fe":"transparent",transition:"all 0.15s","&:hover":{bgcolor:"#ede9fe",color:"#7c4dff"},flexShrink:0},children:[u.jsx(U.MdDataObject,{size:14}),p&&"Formula"]})})]}),o&&u.jsx("small",{style:ie,children:o}),p?u.jsx(sn,{id:e,expression:v,onExpressionChange:I,onBlur:r,placeholder:t.formulaPlaceholder??"Type or paste a variable expression...",disabled:t.disabled===!0,error:s,formulaConfigEnabled:b}):l()]}):u.jsxs("div",{children:[u.jsx(oe,{label:t.label,required:t.required,showOptional:t.showOptional,info:t.info,htmlFor:e,dataTestId:t.dataTestId}),o&&u.jsx("small",{style:ie,children:o}),l()]})}function vl({field:t,value:e,values:n,onChange:i,onBlur:r,error:s,touched:o,formulaConfig:c,onFormulaConfigChange:a}){var M;const l=t,d=!!(o&&s),f=l.disabled===!0,h=w=>l.getOptionValue?l.getOptionValue(w):w.value??w.id,p=g.useMemo(()=>(l.options??[]).map(w=>({...w,value:h(w)})),[l.options]),[x,m]=g.useState(0),b=((M=l.dependsOn)==null?void 0:M.map(w=>n[w]))??[];g.useEffect(()=>{var w;(w=l.dependsOn)!=null&&w.length&&m(D=>D+1)},b);const v=!!l.loadOptions,[A,y]=g.useState(null),I=g.useRef(!1);g.useEffect(()=>{if(!v||I.current||e==null||e===""||Array.isArray(e)&&e.length===0)return;const w=Array.isArray(e)?e:[e];I.current=!0,(l.loadValue?l.loadValue(w):l.loadOptions("").then(G=>G.filter(N=>w.some(V=>String(h(N))===String(V))))).then(G=>{G.length!==0&&y(l.isMulti?G:G[0])}).catch(()=>{I.current=!1})},[v,e]);const C=g.useMemo(()=>{if(e==null||e==="")return l.isMulti?[]:null;if(v)return A;if(l.isMulti){const w=Array.isArray(e)?e:[e];return p.filter(D=>w.includes(h(D)))}return p.find(w=>String(h(w))===String(e))??null},[e,p,l.isMulti,v,A]),F=w=>(v&&y(w),w?l.isMulti?i(w.map(h)):i(h(w)):i(l.isMulti?[]:null)),E={inputId:l.id??l.name,name:l.id??l.name,placeholder:l.placeholder??"Select...",isDisabled:f,isMulti:l.isMulti??!1,isSearchable:l.isSearchable??!0,isClearable:l.isClearable??!1,value:C,onChange:F,onBlur:r,styles:Qt(d,l.isMulti),menuPortalTarget:typeof document<"u"?document.body:void 0,menuPosition:"fixed",classNamePrefix:"ff-select","data-testid":l.dataTestId??`${l.name}-select`,...l.getOptionLabel?{getOptionLabel:l.getOptionLabel}:{}},B=()=>{const w=!!l.loadOptions,D=l.isCreatable??!1;return w&&D?u.jsx(xl,{loadOptions:l.loadOptions,defaultOptions:!0,cacheOptions:!0,...E},x):w?u.jsx(pl,{loadOptions:l.loadOptions,defaultOptions:!0,cacheOptions:!0,...E},x):D?u.jsx(hl,{options:p,...E}):u.jsx(De,{options:p,...E})},j=l.id??l.name??"";return u.jsx(ri,{field:l,fieldId:j,value:e,onChange:i,onBlur:r,error:d,helperText:l.helperText,formulaConfig:c,onFormulaConfigChange:a,renderNative:()=>u.jsxs(u.Fragment,{children:[B(),d&&u.jsx("small",{"data-testid":`${l.name}-error`,style:se,children:s})]})})}const Il={fontSize:14,fontWeight:500,lineHeight:1.35,overflowWrap:"anywhere"},Cl={fontSize:12,lineHeight:1.45,marginTop:3,overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflowWrap:"anywhere"},yl=t=>{const{data:e,isSelected:n,isDisabled:i}=t;return u.jsx(De.components.Option,{...t,children:u.jsxs("div",{className:"ff-form-d-flex ff-form-align-start ff-form-justify-between ff-form-w-100",title:i?e.disabledReason??"Coming soon":void 0,children:[u.jsxs("div",{className:"ff-form-d-flex ff-form-align-start ff-form-gap-2 ff-form-flex-grow-1",style:{minWidth:0},children:[e.icon&&u.jsx("div",{className:"ff-form-mt-1 ff-form-flex-shrink-0 ff-form-d-flex ff-form-align-center",style:{fontSize:18,opacity:i?.65:1,filter:i?"grayscale(0.45)":"none"},children:e.icon}),u.jsxs("div",{className:"ff-form-flex-grow-1",style:{minWidth:0},children:[u.jsx("div",{className:"ff-form-text-14",style:{...Il,color:i?"#7f8790":"#212529"},title:e.label,children:e.label}),e.description&&u.jsx("div",{className:"ff-form-text-12",style:{...Cl,color:i?"#9198a1":"#6c757d"},title:e.description,children:e.description})]})]}),n&&u.jsx(U.MdCheckCircle,{size:16,className:"ff-form-ms-2 ff-form-mt-1 ff-form-text-primary ff-form-flex-shrink-0"})]})})},Sl=t=>{const{data:e}=t;return u.jsx(De.components.SingleValue,{...t,children:u.jsxs("div",{className:"ff-form-d-flex ff-form-align-center ff-form-gap-2 ff-form-text-dark ff-form-w-100",title:e.label,children:[e.icon&&u.jsx("div",{className:"ff-form-d-flex ff-form-align-center ff-form-flex-shrink-0",style:{fontSize:16},children:e.icon}),u.jsx("span",{className:"ff-form-text-14 ff-form-fw-medium",style:{lineHeight:1.3,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label})]})})},Al=t=>({control:(e,n)=>({...e,minHeight:38,height:38,fontSize:14,borderRadius:6,borderColor:t?"#dc3545":n.isFocused?"#86b7fe":"#ced4da",boxShadow:n.isFocused?t?"0 0 0 3px rgba(220,53,69,0.18)":"0 0 0 3px rgba(13,110,253,0.18)":"none",transition:"border-color 0.15s, box-shadow 0.15s","&:hover":{borderColor:t?"#dc3545":"#adb5bd"}}),valueContainer:e=>({...e,paddingTop:1,paddingBottom:1,gap:4}),option:(e,n)=>({...e,backgroundColor:n.isDisabled?"#f6f7f9":n.isSelected?"#e8f4fd":n.isFocused?"#f8f9fa":"#fff",padding:"10px 12px",cursor:n.isDisabled?"not-allowed":"pointer",color:n.isDisabled?"#8f98a3":e.color,borderBottom:"1px solid #f1f1f1","&:active":{backgroundColor:n.isDisabled?"#f6f7f9":"#e9ecef"},"&:last-child":{borderBottom:"none"}}),singleValue:e=>({...e,maxWidth:"calc(100% - 8px)",color:"#111827"}),multiValue:e=>({...e,maxWidth:"100%",backgroundColor:"#eef2ff",borderRadius:6}),multiValueLabel:e=>({...e,fontSize:12,lineHeight:1.35,color:"#3730a3",paddingTop:3,paddingBottom:3,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:180}),multiValueRemove:e=>({...e,color:"#6366f1",":hover":{backgroundColor:"#c7d2fe",color:"#3730a3"}}),menu:e=>({...e,zIndex:9999}),menuPortal:e=>({...e,zIndex:9999}),placeholder:e=>({...e,color:"#9ca3af",fontSize:14}),noOptionsMessage:e=>({...e,fontSize:12,color:"#6b7280"})});function Rl({field:t,value:e,onChange:n,onBlur:i,error:r,touched:s,formulaConfig:o,onFormulaConfigChange:c}){const a=!!(s&&r),l=t.isMulti??!1,d=t.id??t.name??"",f=g.useMemo(()=>(t.options??[]).map(v=>({...v,value:v.id??v.value})),[t.options]),h=Array.isArray(e)?e:e!=null?[e]:[],p=g.useMemo(()=>new Set(h.map(v=>String(v))),[h]),x=g.useMemo(()=>l?f.filter(v=>p.has(String(v.value??""))):f.find(v=>String(v.value??"")===String(e??""))??null,[l,f,e,p]),m=v=>{if(l){const y=v;n(y==null?[]:y.map(I=>I.value));return}const A=v;n(A==null?null:A.value)},b=u.jsxs(u.Fragment,{children:[u.jsx(De,{inputId:d,value:x,onChange:m,onBlur:i,options:f,placeholder:t.placeholder??"Select option...",isMulti:l,isDisabled:t.disabled??!1,isOptionDisabled:v=>!!v.isDisabled,isSearchable:!0,styles:Al(a),components:{Option:yl,SingleValue:Sl},menuPortalTarget:typeof document<"u"?document.body:void 0,menuPosition:"fixed",classNamePrefix:"ff-select"}),a&&u.jsx("small",{"data-testid":`${d}-error`,style:{display:"flex",color:"#dc3545",fontSize:12,marginTop:4,lineHeight:1.4},children:r})]});return u.jsx("div",{className:`${t.customClass??""} ${t.hidden?"ff-form-hidden":""}`,children:u.jsx(ri,{field:t,fieldId:d,value:e,onChange:n,onBlur:i,error:a,helperText:t.helperText,formulaConfig:o,onFormulaConfigChange:c,renderNative:()=>b})})}const me="__id";let El=0;function Se(){return`af_${++El}_${Math.random().toString(36).slice(2,7)}`}function jt(t){return t.map(e=>{if(e!==null&&typeof e=="object"&&!Array.isArray(e)){const n=e;return n[me]?e:{...n,[me]:Se()}}return e!==null&&typeof e!="object"?{[me]:Se(),__value:e}:e})}function Vt(t){return t.map(e=>{if(e!==null&&typeof e=="object"&&!Array.isArray(e)){const{[me]:n,__value:i,...r}=e;return i!==void 0&&Object.keys(r).length===0?i:r}return e})}function Dt(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)?String(t[me]??Se()):Se()}function ii(t){return Object.fromEntries(t.map(e=>{const n=e.id??e.name??"";return e.type==="object"&&e.children?[n,ii(e.children)]:e.type==="array"?[n,[]]:[n,""]}))}function Ol(t,e){const n=t==="object"&&e?ii(e):t==="array"?[]:"";return n!==null&&typeof n=="object"&&!Array.isArray(n)?{...n,[me]:Se()}:n}function Ue(t){return Array.isArray(t)?t:[]}function Fl(t){if(t!==null&&typeof t=="object"&&!Array.isArray(t)){const e=t;if("__value"in e)return e.__value;const{[me]:n,...i}=e;return i}return t}function wl({value:t,onChange:e,inputType:n="text",placeholder:i,disabled:r}){return u.jsx(S.TextField,{size:"small",fullWidth:!0,type:n,value:String(t??""),onChange:s=>e(s.target.value),placeholder:i,disabled:r,sx:{"& .MuiInputBase-input":{fontSize:13}}})}function Tl({value:t,onChange:e,options:n,disabled:i}){return u.jsxs(S.Select,{size:"small",fullWidth:!0,value:String(t??""),onChange:r=>e(r.target.value),disabled:i,displayEmpty:!0,sx:{fontSize:13,".MuiSelect-select":{py:"8px"}},children:[u.jsx(S.MenuItem,{value:"",disabled:!0,sx:{fontSize:13},children:"Select…"}),n.map(r=>u.jsx(S.MenuItem,{value:r.value,sx:{fontSize:13},children:r.label},r.value))]})}function oi({fields:t,value:e,onChange:n,disabled:i,depth:r=0}){return u.jsx(S.Box,{sx:{display:"flex",gap:1,flexWrap:"wrap"},children:t.map(s=>{const o=s.id??s.name??"",c=s.colSpan??Math.max(2,Math.floor(12/t.length)),a=`${Math.round(c/12*100)}%`;return u.jsxs(S.Box,{sx:{flex:`0 0 calc(${a} - 8px)`,minWidth:100},children:[s.label&&u.jsxs(S.Typography,{sx:{fontSize:11,color:"#64748b",mb:.25,fontWeight:500},children:[s.label,s.required&&u.jsx("span",{style:{color:"#ef4444"},children:" *"})]}),s.type==="object"&&s.children?u.jsx(S.Box,{sx:{border:"1px solid #e2e8f0",borderRadius:"6px",p:1,bgcolor:r%2===0?"#f8fafc":"#fff"},children:u.jsx(oi,{fields:s.children,value:e[o]??{},onChange:l=>n({...e,[o]:l}),disabled:i,depth:r+1})}):s.type==="array"?u.jsx(vt,{field:{...s,id:o,disabled:i??s.disabled},value:e[o],values:{},onChange:l=>n({...e,[o]:l}),onBlur:()=>{}}):s.type==="select"?u.jsxs(S.Select,{size:"small",fullWidth:!0,value:String(e[o]??""),onChange:l=>n({...e,[o]:l.target.value}),disabled:i,displayEmpty:!0,sx:{fontSize:13,".MuiSelect-select":{py:"8px"}},children:[u.jsx(S.MenuItem,{value:"",disabled:!0,sx:{fontSize:13},children:"Select…"}),(s.itemOptions??[]).map(l=>u.jsx(S.MenuItem,{value:l.value,sx:{fontSize:13},children:l.label},l.value))]}):u.jsx(S.TextField,{size:"small",fullWidth:!0,type:s.inputType??(s.type==="number"?"number":"text"),value:String(e[o]??""),onChange:l=>n({...e,[o]:l.target.value}),placeholder:s.placeholder,disabled:i,sx:{"& .MuiInputBase-input":{fontSize:13}}})]},o)})})}function si({index:t,itemLabel:e,canRemove:n,onRemove:i,children:r}){return u.jsxs(S.Box,{sx:{position:"relative",px:1,pt:.75,pb:.5,bgcolor:"#fff",border:"1px solid #e2e8f0",borderRadius:"6px",mb:.5},children:[e&&u.jsxs(S.Typography,{sx:{fontSize:11,fontWeight:600,color:"#94a3b8",mb:.5,textTransform:"uppercase",letterSpacing:.5},children:[e," ",t+1]}),r,u.jsx(S.Tooltip,{title:"Remove",children:u.jsx("span",{style:{position:"absolute",top:6,right:6},children:u.jsx(S.IconButton,{size:"small",disabled:!n,onClick:i,sx:{cursor:n?"pointer":"not-allowed",p:"4px"},children:u.jsx(U.MdDeleteOutline,{size:16,color:n?"red":"#e2e8f0"})})})})]})}function ai(t){const e={};for(const n of t){const i=n.id??n.name??"";i&&(n.type==="object"&&Array.isArray(n.children)?e[i]=ai(n.children):n.type==="array"?e[i]=[]:e[i]="")}return e}function Bl({field:t,pathPrefix:e,childFields:n,items:i,values:r,errors:s,touched:o,setFieldValue:c,setFieldTouched:a,depth:l,compact:d,renderFieldRouter:f,disabled:h,minItems:p,maxItems:x}){const[m,b]=g.useState(()=>i.map(()=>Se()));g.useEffect(()=>{m.length!==i.length&&b(I=>i.length>I.length?[...I,...Array.from({length:i.length-I.length},()=>Se())]:I.slice(0,i.length))},[i.length]);const v=g.useCallback(()=>{i.length>=x||(c(e,[...i,ai(n)]),b(I=>[...I,Se()]))},[i,x,c,e,n]),A=g.useCallback(I=>{i.length<=p||(c(e,i.filter((C,F)=>F!==I)),b(C=>C.filter((F,E)=>E!==I)))},[i,p,c,e]),y=t;return u.jsxs(S.Box,{children:[u.jsx(oe,{label:t.label,required:t.required,showOptional:t.showOptional,info:t.info,htmlFor:t.id}),t.helperText&&u.jsx(S.Typography,{sx:{fontSize:12,color:"#6c757d",mb:.75},children:t.helperText}),i.length===0&&u.jsx(S.Box,{sx:{py:2.5,textAlign:"center",border:"1.5px dashed #e2e8f0",borderRadius:"8px",mb:1,color:"#94a3b8",fontSize:13},children:"No items yet — click Add to start"}),i.map((I,C)=>u.jsx(si,{index:C,itemLabel:y.itemLabel,canRemove:i.length>p&&!h,onRemove:()=>A(C),children:u.jsx(S.Box,{children:n.map(F=>{const E=F.id??F.name??"",B=`${e}.${C}.${E}`;return f({field:F,pathPrefix:B,depth:l+1,values:r,errors:s,touched:o,setFieldValue:c,setFieldTouched:a,compact:!0,inlineLabel:!1})})})},m[C]??C)),i.length>0&&u.jsx(S.Divider,{sx:{mb:1,borderColor:"transparent"}}),i.length<x&&u.jsxs(S.Box,{component:"button",type:"button",onClick:v,disabled:h,sx:{display:"inline-flex",alignItems:"center",gap:.5,border:"1px dashed #cbd5e1",borderRadius:"6px",background:"none",cursor:h?"not-allowed":"pointer",px:1.5,py:.6,fontSize:12.5,color:"#6366f1",opacity:h?.5:1,"&:hover:not(:disabled)":{borderColor:"#6366f1",bgcolor:"#f5f3ff"}},children:[u.jsx(U.MdAdd,{size:14}),y.addLabel??`Add ${y.itemLabel??"item"}`]})]})}function vt(t){const{field:e,value:n,onChange:i,pathPrefix:r,values:s,parentErrors:o,parentTouched:c,parentSetFieldValue:a,parentSetFieldTouched:l,depth:d=0,compact:f,renderFieldRouter:h}=t,p=e,x=e.disabled===!0,m=p.itemType??"text",b=p.minItems??0,v=p.maxItems??1/0,A=e.children??p.itemFields;if(!!h&&typeof r=="string"&&Array.isArray(A)&&A.length>0)return u.jsx(Bl,{field:e,pathPrefix:r,childFields:A,items:Ue(n),values:s??{},errors:o??{},touched:c??{},setFieldValue:a??(()=>{}),setFieldTouched:l??(()=>{}),depth:d,compact:f,renderFieldRouter:h,disabled:x,minItems:b,maxItems:v});const[I,C]=g.useState(()=>jt(Ue(n))),F=g.useRef(JSON.stringify(Vt(I)));g.useEffect(()=>{if(JSON.stringify(Ue(n))!==F.current){const D=jt(Ue(n));C(D),F.current=JSON.stringify(Vt(D))}},[n]);const E=g.useCallback(w=>{const D=jt(w);C(D);const G=Vt(D);F.current=JSON.stringify(G),i(G)},[i]),B=g.useCallback(()=>{I.length>=v||E([...I,Ol(m,p.itemFields)])},[I,m,p.itemFields,v,E]),j=g.useCallback(w=>{I.length<=b||E(I.filter(D=>Dt(D)!==w))},[I,b,E]),M=g.useCallback((w,D)=>{E(I.map(G=>Dt(G)!==w?G:D!==null&&typeof D=="object"&&!Array.isArray(D)?{...D,[me]:w}:{[me]:w,__value:D}))},[I,E]);return u.jsxs(S.Box,{children:[u.jsx(oe,{label:e.label,required:e.required,showOptional:e.showOptional,info:e.info,htmlFor:e.id}),e.helperText&&u.jsx(S.Typography,{sx:{fontSize:12,color:"#6c757d",mb:.75},children:e.helperText}),I.length===0&&u.jsx(S.Box,{sx:{py:2.5,textAlign:"center",border:"1.5px dashed #e2e8f0",borderRadius:"8px",mb:1,color:"#94a3b8",fontSize:13},children:"No items yet — click Add to start"}),I.map((w,D)=>{const G=Dt(w),N=Fl(w);return u.jsx(si,{index:D,itemLabel:p.itemLabel,canRemove:I.length>b&&!x,onRemove:()=>j(G),children:m==="object"&&p.itemFields?u.jsx(oi,{fields:p.itemFields,value:N??{},onChange:V=>M(G,V),disabled:x}):m==="select"?u.jsx(Tl,{value:N,onChange:V=>M(G,V),options:p.itemOptions??[],disabled:x}):m==="array"?u.jsx(vt,{field:{...p.itemSchema,id:`${e.id}-${G}`,type:"array",label:void 0},value:N,values:{},onChange:V=>M(G,V),onBlur:()=>{}}):u.jsx(wl,{value:N,onChange:V=>M(G,m==="number"?V===""?"":Number(V):V),inputType:m,placeholder:p.itemPlaceholder,disabled:x})},G)}),I.length>0&&u.jsx(S.Divider,{sx:{mb:1,borderColor:"transparent"}}),I.length<v&&u.jsxs(S.Box,{component:"button",type:"button",onClick:B,disabled:x,sx:{display:"inline-flex",alignItems:"center",gap:.5,border:"1px dashed #cbd5e1",borderRadius:"6px",background:"none",cursor:x?"not-allowed":"pointer",px:1.5,py:.6,fontSize:12.5,color:"#6366f1",opacity:x?.5:1,"&:hover:not(:disabled)":{borderColor:"#6366f1",bgcolor:"#f5f3ff"}},children:[u.jsx(U.MdAdd,{size:14}),p.addLabel??`Add ${p.itemLabel??"item"}`]})]})}function Gl(t){return`ff-form-col-${t}`}function ze({field:t,children:e,compact:n}){const i=typeof t.colSpan=="number"?t.colSpan:12;return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:[Gl(i),n?"ff-form-mb-0":"ff-form-mb-4",t.hidden?"ff-form-hidden":""].filter(Boolean).join(" "),children:e}),t.dividerAfter&&u.jsx("div",{className:"ff-form-col-12",children:u.jsx("hr",{className:"ff-form-divider"})})]})}function Hn(t,e){const n={};for(const i of t){const r=i.id??i.name??"";r&&(r in e?n[r]=e[r]:i.type==="array"?n[r]=[]:i.type==="object"||i.type==="schema"?n[r]={}:n[r]="")}return n}function jl({field:t,value:e,allValues:n,onChange:i,onBlur:r}){const s=q.get(t.type);return s?u.jsx(ze,{field:t,children:u.jsx(s,{field:t,value:e,values:n,onChange:i,onBlur:r})}):null}function Vl({field:t,value:e,onChange:n,onBlur:i}){const r=t.children??[],s=e??{},o=Hn(r,s),c=g.useRef(s);c.current=s;function a(l,d){const h={...Hn(r,c.current),[l]:d};c.current=h,n(h)}return u.jsxs(S.Box,{children:[u.jsx(oe,{label:t.label,required:t.required,showOptional:t.showOptional,info:t.info}),t.helperText&&u.jsx(S.Typography,{sx:{fontSize:12,color:"#6c757d",mb:.75},children:t.helperText}),r.length===0?u.jsx(S.Box,{sx:{py:2.5,textAlign:"center",border:"1.5px dashed #e2e8f0",borderRadius:"8px",color:"#94a3b8",fontSize:13},children:"No child fields defined — edit this field to add them"}):u.jsx(S.Box,{sx:{border:"1px solid #e2e8f0",borderRadius:"8px",p:2,bgcolor:"#fafafa"},children:u.jsx("div",{className:"ff-form-row",children:r.map(l=>{const d=l.id??l.name??"";return d?u.jsx(jl,{field:l,value:o[d],allValues:o,onChange:f=>a(d,f),onBlur:i},d):null})})})]})}function Dl({field:t,value:e,onChange:n,onBlur:i,error:r,touched:s}){const o=t,c=o.id??o.name??"",a=!!(s&&r),l=o.disabled===!0,[d,f]=g.useState(()=>e==null||e===""?"":String(e)),h=g.useRef(e);g.useEffect(()=>{e!==h.current&&(h.current=e,f(e==null||e===""?"":String(e)))},[e]);const p=!!o.prefix,x=!!o.suffix,m=p||x,b={flex:1,border:"none",outline:"none",backgroundColor:"transparent",fontSize:14,color:"#374151",padding:"6px 12px",cursor:l?"not-allowed":void 0,boxSizing:"border-box",lineHeight:1.5,width:"100%",appearance:"none",MozAppearance:"textfield"},v={display:"flex",alignItems:"stretch",width:"100%",border:a?R.BORDER_ERROR:R.BORDER,borderRadius:R.BORDER_RADIUS,backgroundColor:l?R.COLOR_DISABLED_BG:"#fff",boxSizing:"border-box",transition:"border-color .15s, box-shadow .15s"},A={display:"flex",alignItems:"center",padding:"0 10px",color:"#6b7280",fontSize:13,whiteSpace:"nowrap",flexShrink:0,borderLeft:x?"1px solid rgba(0,0,0,0.1)":void 0,borderRight:p?"1px solid rgba(0,0,0,0.1)":void 0},y=C=>{C.currentTarget.style.borderColor=a?R.BORDER_COLOR_ERROR:R.BORDER_COLOR_FOCUS,C.currentTarget.style.boxShadow=a?R.FOCUS_SHADOW_ERROR:R.FOCUS_SHADOW},I=C=>{C.currentTarget.contains(C.relatedTarget)||(C.currentTarget.style.borderColor=a?R.BORDER_COLOR_ERROR:R.BORDER_COLOR,C.currentTarget.style.boxShadow="none",i())};return u.jsxs("div",{children:[u.jsx(oe,{label:o.label,required:o.required,showOptional:o.showOptional,info:o.info,htmlFor:c,dataTestId:o.dataTestId}),o.helperText&&!a&&u.jsx("small",{style:ie,children:o.helperText}),u.jsxs("div",{style:m?v:void 0,onFocus:m?y:void 0,onBlur:m?I:void 0,children:[p&&u.jsx("span",{style:A,children:o.prefix}),u.jsx("input",{id:c,name:c,type:"number",min:o.min,max:o.max,step:o.step??1,disabled:l,readOnly:o.readOnly,placeholder:o.placeholder??"",value:d,"data-testid":o.dataTestId??`${c}-input`,style:m?b:{...b,border:a?R.BORDER_ERROR:R.BORDER,borderRadius:R.BORDER_RADIUS,backgroundColor:l?R.COLOR_DISABLED_BG:"#fff"},onChange:C=>{const F=C.target.value;f(F);const E=F===""?null:Number(F);h.current=E,n(E)},onFocus:m?void 0:C=>{C.currentTarget.style.borderColor=a?R.BORDER_COLOR_ERROR:R.BORDER_COLOR_FOCUS,C.currentTarget.style.boxShadow=a?R.FOCUS_SHADOW_ERROR:R.FOCUS_SHADOW},onBlurCapture:m?void 0:C=>{C.currentTarget.style.borderColor=a?R.BORDER_COLOR_ERROR:R.BORDER_COLOR,C.currentTarget.style.boxShadow="none",i()}}),x&&u.jsx("span",{style:{...A,borderRight:void 0},children:o.suffix})]}),a&&u.jsx("small",{"data-testid":`${c}-error`,style:se,children:r})]})}function Pl({field:t,value:e,onChange:n,onBlur:i,error:r,touched:s}){const o=t,c=o.id??o.name??"",a=!!(s&&r),l=o.disabled===!0,d=!!e,f=u.jsx(S.FormControlLabel,{control:u.jsx(S.Switch,{id:c,name:c,checked:d,onChange:h=>{n(h.target.checked)},onBlur:i,disabled:l,color:o.color??"primary",inputProps:{"aria-label":o.ariaLabel??(typeof o.label=="string"?o.label:void 0),"aria-describedby":o.ariaDescribedBy,"data-testid":o.dataTestId??`${c}-input`}}),label:o.label?u.jsx("span",{style:{fontSize:14,color:l?"#9ca3af":"#374151",fontWeight:500},children:o.label}):void 0,sx:{m:0}});return u.jsxs("div",{children:[f,o.helperText&&!a&&u.jsx("small",{style:ie,children:o.helperText}),a&&u.jsx("small",{"data-testid":`${c}-error`,style:se,children:r})]})}function Nl({field:t,value:e,onChange:n,onBlur:i,error:r,touched:s}){const o=t,c=o.id??o.name??"",a=!!(s&&r),l=o.disabled===!0,d=e!=null?String(e):"";return u.jsxs("div",{children:[u.jsx(oe,{label:o.label,required:o.required,showOptional:o.showOptional,info:o.info,htmlFor:c,dataTestId:o.dataTestId}),o.helperText&&!a&&u.jsx("small",{style:ie,children:o.helperText}),u.jsx(S.RadioGroup,{id:c,name:c,value:d,onChange:f=>{n(f.target.value)},onBlur:i,row:o.row,children:(o.options??[]).map(f=>u.jsx(S.FormControlLabel,{value:f.value,control:u.jsx(S.Radio,{disabled:l||f.disabled,color:o.color??"primary",inputProps:{"data-testid":o.dataTestId?`${o.dataTestId}-opt-${f.value}`:`${c}-opt-${f.value}`}}),label:u.jsx("span",{style:{fontSize:14,color:l||f.disabled?"#9ca3af":"#374151"},children:f.label}),sx:{mr:o.row?3:0}},String(f.value)))}),a&&u.jsx("small",{"data-testid":`${c}-error`,style:se,children:r})]})}function pn({field:t,value:e,onChange:n,onBlur:i,error:r,touched:s}){const o=t,c=o.id??o.name??"",a=!!(s&&r),l=o.disabled===!0,d=o.inputType==="datetime"?"datetime-local":o.inputType==="time"?"time":"date",[f,h]=g.useState(()=>String(e??"")),p=g.useRef(e);g.useEffect(()=>{e!==p.current&&(p.current=e,h(String(e??"")))},[e]);const x={width:"100%",fontSize:14,color:"#374151",backgroundColor:l?"#f9fafb":"#fff",border:`1px solid ${a?R.BORDER_COLOR_ERROR:R.BORDER_COLOR}`,borderRadius:R.BORDER_RADIUS,outline:"none",padding:"6px 12px",boxSizing:"border-box",lineHeight:1.5,cursor:l?"not-allowed":void 0};return u.jsxs("div",{children:[u.jsx(oe,{label:o.label,required:o.required,showOptional:o.showOptional,info:o.info,htmlFor:c,dataTestId:o.dataTestId}),o.helperText&&!a&&u.jsx("small",{style:ie,children:o.helperText}),u.jsx("input",{id:c,name:c,type:d,style:x,value:f,min:o.min,max:o.max,disabled:l,readOnly:o.readOnly,"data-testid":o.dataTestId??`${c}-input`,onChange:m=>{h(m.target.value),p.current=m.target.value,n(m.target.value)},onBlur:i,onFocus:m=>{m.currentTarget.style.borderColor=a?R.BORDER_COLOR_ERROR:R.BORDER_COLOR_FOCUS,m.currentTarget.style.boxShadow=a?R.FOCUS_SHADOW_ERROR:R.FOCUS_SHADOW},onBlurCapture:m=>{m.currentTarget.style.borderColor=a?R.BORDER_COLOR_ERROR:R.BORDER_COLOR,m.currentTarget.style.boxShadow="none"}}),a&&u.jsx("small",{"data-testid":`${c}-error`,style:se,children:r})]})}function Ml({field:t,value:e,onChange:n,onBlur:i,error:r,touched:s}){const o=t,c=o.id??o.name??"",a=!!(s&&r),l=o.disabled===!0,d=Array.isArray(e)?e:[],[f,h]=g.useState(""),[p,x]=g.useState(!1),m=g.useRef(null),b=I=>{const C=I.trim();!C||d.includes(C)||o.maxTags&&d.length>=o.maxTags||(n([...d,C]),h(""))},v=I=>{n(d.filter((C,F)=>F!==I))},A=a?R.BORDER_COLOR_ERROR:p?R.BORDER_COLOR_FOCUS:R.BORDER_COLOR,y=p?a?R.FOCUS_SHADOW_ERROR:R.FOCUS_SHADOW:"none";return u.jsxs("div",{children:[u.jsx(oe,{label:o.label,required:o.required,showOptional:o.showOptional,info:o.info,htmlFor:c,dataTestId:o.dataTestId}),o.helperText&&!a&&u.jsx("small",{style:ie,children:o.helperText}),u.jsxs("div",{onClick:()=>{var I;return(I=m.current)==null?void 0:I.focus()},style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:4,minHeight:38,padding:"4px 8px",border:`1px solid ${A}`,borderRadius:R.BORDER_RADIUS,backgroundColor:l?R.COLOR_DISABLED_BG:"#fff",boxShadow:y,boxSizing:"border-box",cursor:l?"not-allowed":"text",transition:"border-color .15s, box-shadow .15s"},children:[d.map((I,C)=>u.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,background:"#ede9fe",color:"#5b21b6",border:"1px solid #ddd6fe",borderRadius:4,padding:"1px 6px",fontSize:13,fontWeight:500,lineHeight:1.6},children:[I,!l&&u.jsx("button",{type:"button",onClick:F=>{F.stopPropagation(),v(C)},style:{background:"none",border:"none",cursor:"pointer",padding:0,display:"flex",color:"#7c3aed"},children:u.jsx(U.MdClose,{size:12})})]},I)),u.jsx("input",{ref:m,id:c,value:f,disabled:l,placeholder:d.length===0?o.placeholder??"Type and press Enter...":"","data-testid":o.dataTestId??`${c}-input`,style:{flex:1,minWidth:80,border:"none",outline:"none",fontSize:14,color:"#374151",backgroundColor:"transparent",padding:"2px 4px",cursor:l?"not-allowed":void 0},onChange:I=>h(I.target.value),onKeyDown:I=>{(I.key==="Enter"||I.key===",")&&(I.preventDefault(),b(f)),I.key==="Backspace"&&!f&&d.length>0&&v(d.length-1)},onFocus:()=>x(!0),onBlur:()=>{x(!1),f.trim()&&b(f),i()}})]}),a&&u.jsx("small",{"data-testid":`${c}-error`,style:se,children:r})]})}function Ll({field:t,value:e,onChange:n,onBlur:i,error:r,touched:s}){const o=t,c=o.id??o.name??"",a=!!(s&&r),l=o.disabled===!0,d=o.min??0,f=o.max??100,h=o.step??1,[p,x]=g.useState(()=>typeof e=="number"?e:d),m=g.useRef(e);return g.useEffect(()=>{e!==m.current&&(m.current=e,x(typeof e=="number"?e:d))},[e,d]),u.jsxs("div",{children:[u.jsx(oe,{label:o.label,required:o.required,showOptional:o.showOptional,info:o.info,htmlFor:c,dataTestId:o.dataTestId}),o.helperText&&!a&&u.jsx("small",{style:ie,children:o.helperText}),u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,px:1},children:[u.jsx(S.Slider,{id:c,value:p,min:d,max:f,step:h,disabled:l,marks:o.marks,onChange:(b,v)=>{const A=Array.isArray(v)?v[0]:v;x(A),m.current=A,n(A)},onChangeCommitted:()=>i(),sx:{color:a?"#d32f2f":"#6366f1",flex:1},"data-testid":o.dataTestId??`${c}-input`}),o.showValue!==!1&&u.jsx("span",{style:{fontSize:13,fontWeight:600,color:"#374151",minWidth:36,textAlign:"right"},children:p})]}),a&&u.jsx("small",{"data-testid":`${c}-error`,style:se,children:r})]})}function kl({field:t,value:e,onChange:n,onBlur:i,error:r,touched:s}){const o=t,c=o.id??o.name??"",a=!!(s&&r),l=o.disabled===!0,[d,f]=g.useState(()=>String(e??"#6366f1")),h=g.useRef(e);g.useEffect(()=>{e!==h.current&&(h.current=e,f(String(e??"#6366f1")))},[e]);const p=x=>{f(x),h.current=x,n(x)};return u.jsxs("div",{children:[u.jsx(oe,{label:o.label,required:o.required,showOptional:o.showOptional,info:o.info,htmlFor:c,dataTestId:o.dataTestId}),o.helperText&&!a&&u.jsx("small",{style:ie,children:o.helperText}),u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[u.jsxs("div",{style:{width:R.INPUT_HEIGHT,height:R.INPUT_HEIGHT,borderRadius:R.BORDER_RADIUS,border:a?R.BORDER_ERROR:R.BORDER,overflow:"hidden",flexShrink:0,cursor:l?"not-allowed":"pointer",position:"relative"},children:[u.jsx("input",{type:"color",id:c,value:d,disabled:l,"data-testid":o.dataTestId??`${c}-input`,onChange:x=>p(x.target.value),onBlur:i,style:{position:"absolute",inset:0,width:"150%",height:"150%",border:"none",outline:"none",padding:0,cursor:l?"not-allowed":"pointer",opacity:0}}),u.jsx("div",{style:{width:"100%",height:"100%",backgroundColor:d}})]}),o.showHex!==!1&&u.jsx("input",{type:"text",value:d,disabled:l,maxLength:7,placeholder:"#000000",onChange:x=>{const m=x.target.value;f(m),/^#[0-9a-fA-F]{6}$/.test(m)&&(h.current=m,n(m))},onBlur:i,style:{fontSize:R.FONT_SIZE_INPUT,fontFamily:"monospace",color:R.COLOR_LABEL,backgroundColor:l?R.COLOR_DISABLED_BG:"#fff",border:a?R.BORDER_ERROR:R.BORDER,borderRadius:R.BORDER_RADIUS,padding:"0 10px",outline:"none",height:R.INPUT_HEIGHT,width:100,boxSizing:"border-box",transition:"border-color 0.15s, box-shadow 0.15s"}})]}),a&&u.jsx("small",{"data-testid":`${c}-error`,style:se,children:r})]})}function Wl(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function Xl({field:t,value:e,onChange:n,onBlur:i,error:r,touched:s}){const o=t,c=o.id??o.name??"",a=!!(s&&r),l=o.disabled===!0,d=g.useRef(null),[f,h]=g.useState(!1),[p,x]=g.useState(null),m=e instanceof File?[e]:Array.isArray(e)?e:[],b=y=>{if(!y)return;const I=Array.from(y);if(o.maxSizeMb){const C=I.find(F=>F.size>o.maxSizeMb*1024*1024);if(C){x(`"${C.name}" exceeds ${o.maxSizeMb} MB`);return}}x(null),n(o.multiple?I:I[0]??null)},v=y=>{o.multiple?n(m.filter((I,C)=>C!==y)):n(null),d.current&&(d.current.value="")},A=a||p?R.BORDER_COLOR_ERROR:f?R.BORDER_COLOR_FOCUS:R.BORDER_COLOR;return u.jsxs("div",{children:[u.jsx(oe,{label:o.label,required:o.required,showOptional:o.showOptional,info:o.info,htmlFor:c,dataTestId:o.dataTestId}),o.helperText&&!a&&u.jsx("small",{style:ie,children:o.helperText}),u.jsxs("div",{onClick:()=>{var y;return!l&&((y=d.current)==null?void 0:y.click())},onDragOver:y=>{y.preventDefault(),l||h(!0)},onDragLeave:()=>h(!1),onDrop:y=>{y.preventDefault(),h(!1),l||b(y.dataTransfer.files)},style:{border:`1px dashed ${A}`,borderRadius:R.BORDER_RADIUS,padding:"14px 16px",textAlign:"center",cursor:l?"not-allowed":"pointer",backgroundColor:f?"rgba(99,102,241,0.04)":l?"#f9fafb":"#fff",transition:"border-color .15s, background .15s"},children:[u.jsx("input",{ref:d,id:c,type:"file",accept:o.accept,multiple:o.multiple,disabled:l,"data-testid":o.dataTestId??`${c}-input`,style:{display:"none"},onChange:y=>{b(y.target.files),i()}}),u.jsx(U.MdUploadFile,{size:24,color:l?"#9ca3af":"#6366f1",style:{marginBottom:4}}),u.jsx("div",{style:{fontSize:13,color:l?"#9ca3af":"#374151",fontWeight:500},children:f?"Drop file here":"Click or drag file to upload"}),o.accept&&u.jsx("div",{style:{fontSize:11,color:"#6b7280",marginTop:2},children:o.accept}),o.maxSizeMb&&u.jsxs("div",{style:{fontSize:11,color:"#6b7280"},children:["Max ",o.maxSizeMb," MB"]})]}),m.length>0&&u.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4,marginTop:8},children:m.map((y,I)=>u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 10px",border:"1px solid #e5e7eb",borderRadius:4,backgroundColor:"#f9fafb"},children:[u.jsx(U.MdInsertDriveFile,{size:16,color:"#6366f1"}),u.jsx("span",{style:{fontSize:13,color:"#374151",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.name}),u.jsx("span",{style:{fontSize:11,color:"#6b7280",flexShrink:0},children:Wl(y.size)}),!l&&u.jsx("button",{type:"button",onClick:C=>{C.stopPropagation(),v(I)},style:{background:"none",border:"none",cursor:"pointer",color:"#9ca3af",display:"flex",padding:0},children:u.jsx(U.MdClose,{size:14})})]},`${y.name}-${y.size}-${y.lastModified}`))}),(a||p)&&u.jsx("small",{"data-testid":`${c}-error`,style:se,children:p??r})]})}const zl=g.lazy(async()=>({default:(await Promise.resolve().then(()=>require("./index-BWAxupnf.js"))).default}));async function Hl(t){switch(t){case"python":return[(await Promise.resolve().then(()=>require("./index-gtgq_241.js"))).python()];case"json":return[(await Promise.resolve().then(()=>require("./index-BysKSEtZ.js"))).json()];case"typescript":return[(await Promise.resolve().then(()=>require("./index-B3aHpb84.js"))).javascript({typescript:!0})];default:return[(await Promise.resolve().then(()=>require("./index-B3aHpb84.js"))).javascript()]}}function li({language:t,value:e,readOnly:n,minHeight:i,maxHeight:r,basicSetup:s,onChange:o,onBlur:c,style:a,fallbackHeight:l}){const[d,f]=g.useState(null);g.useEffect(()=>{let p=!0;return Hl(t).then(x=>{p&&f(x)}),()=>{p=!1}},[t]);const h=g.useMemo(()=>u.jsx("div",{style:{minHeight:l??i,padding:8,color:"#9ca3af",fontSize:12},children:"Loading editor…"}),[l,i]);return d?u.jsx(g.Suspense,{fallback:h,children:u.jsx(zl,{value:e,extensions:d,readOnly:n,minHeight:i,maxHeight:r,theme:"light",basicSetup:s,onChange:o,onBlur:c,style:a})}):h}function Zl({field:t,value:e,onChange:n,onBlur:i,error:r,touched:s}){const o=t,c=o.id??o.name??"",a=!!(s&&r),l=o.disabled===!0,[d,f]=g.useState(null),[h,p]=g.useState(()=>typeof e=="string"?e:e!=null?JSON.stringify(e,null,2):""),x=g.useRef(e);g.useEffect(()=>{e!==x.current&&(x.current=e,typeof e=="string"?p(e):e!=null?p(JSON.stringify(e,null,2)):p(""))},[e]);const m=C=>{p(C);try{C.trim()&&JSON.parse(C),f(null)}catch(F){f(F.message)}x.current=C,n(C)},b=()=>{try{const C=JSON.stringify(JSON.parse(h),null,2);p(C),f(null),x.current=C,n(C)}catch{}},v=o.rows??8,A=`${v*22}px`,y=`${v*22}px`,I=a||d?R.BORDER_COLOR_ERROR:R.BORDER_COLOR;return u.jsxs("div",{children:[u.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[u.jsx(oe,{label:o.label,required:o.required,showOptional:o.showOptional,info:o.info,htmlFor:c,dataTestId:o.dataTestId}),!l&&!o.readOnly&&u.jsx("button",{type:"button",onClick:b,style:{fontSize:11,fontWeight:600,color:"#6366f1",background:"none",border:"none",cursor:"pointer",padding:"0 0 4px"},children:"Format"})]}),o.helperText&&!a&&u.jsx("small",{style:ie,children:o.helperText}),u.jsx("div",{id:c,"data-testid":o.dataTestId??`${c}-input`,style:{border:`1px solid ${I}`,borderRadius:R.BORDER_RADIUS,overflow:"hidden",fontSize:13},children:u.jsx(li,{language:"json",value:h,readOnly:l||o.readOnly,minHeight:A,maxHeight:y,basicSetup:{lineNumbers:!0,foldGutter:!0},onChange:m,onBlur:i,style:{fontSize:13}})}),(a||d)&&u.jsx("small",{"data-testid":`${c}-error`,style:se,children:d??r})]})}const _l={javascript:"JS",typescript:"TS",python:"PY",json:"JSON"};function Jl({field:t,value:e,onChange:n,onBlur:i,error:r,touched:s}){const o=t,c=o.id??o.name??"",a=!!(s&&r),l=o.disabled===!0,[d,f]=g.useState(()=>String(e??"")),h=g.useRef(e);g.useEffect(()=>{e!==h.current&&(h.current=e,f(String(e??"")))},[e]);const p=A=>{f(A),h.current=A,n(A)},x=o.rows??8,m=`${x*22}px`,b=`${x*22}px`,v=_l[o.language??"javascript"]??"CODE";return u.jsxs("div",{children:[u.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[u.jsx(oe,{label:o.label,required:o.required,showOptional:o.showOptional,info:o.info,htmlFor:c,dataTestId:o.dataTestId}),u.jsx("span",{style:{fontSize:10,fontWeight:700,color:"#6b7280",backgroundColor:"#f1f5f9",border:"1px solid #e2e8f0",borderRadius:4,padding:"1px 6px",letterSpacing:.5,marginBottom:4},children:v})]}),o.helperText&&!a&&u.jsx("small",{style:ie,children:o.helperText}),u.jsx("div",{id:c,"data-testid":o.dataTestId??`${c}-input`,style:{border:`1px solid ${a?R.BORDER_COLOR_ERROR:R.BORDER_COLOR}`,borderRadius:R.BORDER_RADIUS,overflow:"hidden"},children:u.jsx(li,{language:o.language,value:d,readOnly:l||o.readOnly,minHeight:m,maxHeight:b,basicSetup:{lineNumbers:!0,foldGutter:!0,autocompletion:!0},onChange:p,onBlur:i,style:{fontSize:13}})}),a&&u.jsx("small",{"data-testid":`${c}-error`,style:se,children:r})]})}const Yl=g.lazy(()=>Promise.resolve().then(()=>require("./index-C0Eu9PxA.js")).then(t=>t.index).then(t=>(Promise.resolve().then(()=>require("./quill.snow-Dyvby5gX.js")),{default:t.default}))),$l=[[{header:[1,2,3,!1]}],["bold","italic","underline","strike"],[{list:"ordered"},{list:"bullet"}],["link"],["clean"]];function Ul({field:t,value:e,onChange:n,onBlur:i,error:r,touched:s}){const o=t,c=o.id??o.name??"",a=!!(s&&r),l=o.disabled===!0,[d,f]=g.useState(()=>String(e??"")),h=g.useRef(e);g.useEffect(()=>{e!==h.current&&(h.current=e,f(String(e??"")))},[e]);const p=b=>{f(b),h.current=b,n(b)},x=(o.rows??6)*24,m=o.toolbar!==!1;return u.jsxs("div",{children:[u.jsx(oe,{label:o.label,required:o.required,showOptional:o.showOptional,info:o.info,htmlFor:c,dataTestId:o.dataTestId}),o.helperText&&!a&&u.jsx("small",{style:ie,children:o.helperText}),u.jsx("div",{id:c,"data-testid":o.dataTestId??`${c}-input`,style:{border:a?R.BORDER_ERROR:R.BORDER,borderRadius:R.BORDER_RADIUS,overflow:"hidden",fontSize:14},children:u.jsx(g.Suspense,{fallback:u.jsx("div",{style:{minHeight:x,display:"flex",alignItems:"center",padding:"8px 12px",color:"rgba(0,0,0,0.38)",fontSize:13},children:"Loading editor…"}),children:u.jsx(Yl,{value:d,onChange:p,onBlur:i,readOnly:l||o.readOnly,modules:{toolbar:m?$l:!1},style:{minHeight:x},theme:"snow"})})}),a&&u.jsx("small",{"data-testid":`${c}-error`,style:se,children:r})]})}const Ht="ff-infinite-open";function Ql(t){typeof window<"u"&&window.dispatchEvent(new CustomEvent(Ht,{detail:t}))}if(typeof document<"u"&&!document.getElementById("ff-spin-style")){const t=document.createElement("style");t.id="ff-spin-style",t.textContent="@keyframes ff-spin { to { transform: rotate(360deg); } }",document.head.appendChild(t)}function ql(t){const{onScrollBottom:e,isLoading:n,hasMore:i,innerRef:r,children:s,...o}=t,c=g.Children.count(s)>0,a=g.useRef(null),l=g.useCallback(d=>{a.current=d,typeof r=="function"?r(d):r&&"current"in r&&(r.current=d)},[r]);return g.useEffect(()=>{const d=a.current;if(!d)return;const f=()=>{n||!i||d.scrollTop+d.clientHeight>=d.scrollHeight-50&&e()};return d.addEventListener("scroll",f,{passive:!0}),()=>d.removeEventListener("scroll",f)},[n,i,e]),g.useEffect(()=>{const d=a.current;!d||n||!i||d.scrollHeight<=d.clientHeight+4&&e()},[s,n,i,e]),u.jsxs(De.components.MenuList,{...o,innerRef:l,children:[s,c&&(n||i)&&u.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"8px 12px",gap:8,color:"#6b7280",fontSize:12,borderTop:"1px solid #f1f3f5",pointerEvents:"none",userSelect:"none"},children:n?u.jsxs(u.Fragment,{children:[u.jsx(Kl,{}),"Loading…"]}):u.jsx("span",{style:{color:"#adb5bd"},children:"Scroll for more"})})]})}function Kl(){return u.jsx("div",{style:{width:13,height:13,flexShrink:0,border:"2px solid #e5e7eb",borderTopColor:"#6366f1",borderRadius:"50%",animation:"ff-spin 0.7s linear infinite"}})}function eu({loadPage:t,loadSelected:e,currentValues:n,isOpen:i}){const[r,s]=g.useState([]),[o,c]=g.useState(0),[a,l]=g.useState(!0),[d,f]=g.useState(!1),h=g.useRef(new Map),[p,x]=g.useState(0),[m,b]=g.useState(""),[v,A]=g.useState(""),y=g.useRef(null),I=g.useRef(null),C=g.useRef(null),F=g.useCallback(G=>{b(G),y.current&&clearTimeout(y.current),y.current=setTimeout(()=>A(G),300)},[]);g.useEffect(()=>{var N;if(!i||C.current===v)return;C.current=v,(N=I.current)==null||N.abort();const G=new AbortController;return I.current=G,s([]),c(0),l(!0),f(!0),t({page:1,search:v,signal:G.signal}).then(V=>{if(G.signal.aborted)return;const Z=Zn(V.options);s(Z),c(1),l(V.hasMore),f(!1)}).catch(V=>{_n(V)||f(!1)}),()=>G.abort()},[v,i]);const E=g.useCallback(()=>{var V;if(d||!a)return;(V=I.current)==null||V.abort();const G=new AbortController;I.current=G,f(!0);const N=o+1;t({page:N,search:v,signal:G.signal}).then(Z=>{G.signal.aborted||(s(J=>Zn([...J,...Z.options])),c(N),l(Z.hasMore),f(!1))}).catch(Z=>{_n(Z)||f(!1)})},[d,a,o,v]),B=g.useRef(new Set);g.useEffect(()=>{if(!e||n.length===0)return;const G=n.filter(N=>!h.current.has(N)&&!B.current.has(N));G.length!==0&&(G.forEach(N=>B.current.add(N)),e(G).then(N=>{N.forEach(V=>h.current.set(V.value,V)),x(V=>V+1)}).catch(()=>{}).finally(()=>{G.forEach(N=>B.current.delete(N))}))},[n.join("|")]);const j=g.useCallback(()=>{var G;C.current=null,b(""),A(""),y.current&&clearTimeout(y.current),(G=I.current)==null||G.abort()},[]),M=g.useMemo(()=>r,[r,p]),w=g.useCallback(G=>{const N=r.find(V=>V.value===G);return N||h.current.get(G)},[r,p]),D=g.useCallback(G=>{if(!G)return;(Array.isArray(G)?G:[G]).forEach(V=>h.current.set(V.value,V))},[]);return{options:M,lookupOption:w,isLoading:d,hasMore:a,inputValue:m,handleInputChange:F,loadMore:E,handleMenuClose:j,updateSelectedCache:D}}function Zn(t){const e=new Set;return t.filter(n=>e.has(n.value)?!1:(e.add(n.value),!0))}function _n(t){return t instanceof Error&&(t.name==="AbortError"||t.message==="AbortError")}function Jn(t){return t==null?[]:Array.isArray(t)?t.map(String):[String(t)]}function ui({field:t,value:e,onChange:n,onBlur:i,error:r,touched:s}){const o=t,c=o.isMulti??!1,a=o.id??o.name??"",l=!!(s&&r),d=o.disabled===!0,f=g.useRef(`ff-inf-${Math.random().toString(36).slice(2)}`).current,[h,p]=g.useState(!1);g.useEffect(()=>{const J=Y=>{Y.detail!==f&&p(!1)};return window.addEventListener(Ht,J),()=>window.removeEventListener(Ht,J)},[f]),g.useEffect(()=>{h&&Ql(f)},[h,f]);const x=g.useCallback(()=>p(!0),[]),m=g.useMemo(()=>Jn(e),[e]),{options:b,lookupOption:v,isLoading:A,hasMore:y,inputValue:I,handleInputChange:C,loadMore:F,handleMenuClose:E,updateSelectedCache:B}=eu({loadPage:o.loadPage,loadSelected:o.loadSelected,currentValues:m,isOpen:h}),j=g.useRef(E);j.current=E;const M=g.useRef(!1);g.useEffect(()=>{M.current&&!h&&j.current(),M.current=h},[h]);const w=g.useCallback(()=>p(!1),[]),D=g.useMemo(()=>e==null||e===""||Array.isArray(e)&&e.length===0?c?[]:null:c?Jn(e).map(J=>v(J)).filter(J=>!!J):v(String(e))??null,[e,v,c]),G=g.useCallback(J=>{if(c){const Y=J??[];B(Y),n(Y.map(ee=>ee.value))}else{const Y=J;Y&&B(Y),n(Y?Y.value:null)}},[c,n,B]),N=g.useRef({loadMore:F,isLoading:A,hasMore:y});N.current={loadMore:F,isLoading:A,hasMore:y};const V=g.useRef(function(Y){return u.jsx(ql,{...Y,onScrollBottom:()=>N.current.loadMore(),isLoading:N.current.isLoading,hasMore:N.current.hasMore})}).current,Z=g.useCallback(()=>A?"Loading…":"No options found",[A]);return u.jsxs("div",{className:`${o.customClass??""} ${o.hidden?"ff-form-hidden":""}`,children:[u.jsx(oe,{label:o.label,required:o.required,showOptional:o.showOptional,info:o.info,htmlFor:a}),o.helperText&&!l&&u.jsx("small",{style:ie,children:o.helperText}),u.jsx(De,{inputId:a,value:D,inputValue:I,onInputChange:C,onChange:G,onBlur:i,options:b,isMulti:c,isDisabled:d,isClearable:o.isClearable??!1,isSearchable:!0,filterOption:null,menuIsOpen:h,onMenuOpen:x,onMenuClose:w,placeholder:o.placeholder??"Search…",noOptionsMessage:Z,styles:Qt(l,c),components:{MenuList:V},classNamePrefix:"ff-select",menuPortalTarget:typeof document<"u"?document.body:void 0,menuPosition:"fixed",closeMenuOnSelect:!c,hideSelectedOptions:c}),l&&u.jsx("small",{"data-testid":`${a}-error`,style:se,children:r})]})}q.register("text",Cr);q.register("textarea",Cr);q.register("select",vl);q.register("descriptive-select",Rl);q.register("array",vt);q.register("schema",Vl);q.register("number",Dl);q.register("toggle",Pl);q.register("radio-group",Nl);q.register("date",pn);q.register("datetime",pn);q.register("time",pn);q.register("tags",Ml);q.register("slider",Ll);q.register("color",kl);q.register("file",Xl);q.register("json-editor",Zl);q.register("code",Jl);q.register("rich-text",Ul);q.register("infinite-select",ui);var tu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ci(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ne(t){this._maxSize=t,this.clear()}Ne.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Ne.prototype.get=function(t){return this._values[t]};Ne.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var nu=/[^.^\]^[]+|(?=\[\]|\.\.)/g,di=/^\d+$/,ru=/^\d/,iu=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,ou=/^\s*(['"]?)(.*?)(\1)\s*$/,gn=512,Yn=new Ne(gn);new Ne(gn);var $n=new Ne(gn),Re={split:Zt,normalizePath:Un,getter:function(t,e){var n=Un(t);return $n.get(t)||$n.set(t,function(r){for(var s=0,o=n.length;s<o;)if(r!=null||!e)r=r[n[s++]];else return;return r})},join:function(t){return t.reduce(function(e,n){return e+(bn(n)||di.test(n)?"["+n+"]":(e?".":"")+n)},"")},forEach:function(t,e,n){su(Array.isArray(t)?t:Zt(t),e,n)}};function Un(t){return Yn.get(t)||Yn.set(t,Zt(t).map(function(e){return e.replace(ou,"$2")}))}function Zt(t){return t.match(nu)||[""]}function su(t,e,n){var i=t.length,r,s,o,c;for(s=0;s<i;s++)r=t[s],r&&(uu(r)&&(r='"'+r+'"'),c=bn(r),o=!c&&/^\d+$/.test(r),e.call(n,r,c,o,s,t))}function bn(t){return typeof t=="string"&&t&&["'",'"'].indexOf(t.charAt(0))!==-1}function au(t){return t.match(ru)&&!t.match(di)}function lu(t){return iu.test(t)}function uu(t){return!bn(t)&&(au(t)||lu(t))}const cu=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,fi=t=>t.match(cu)||[],du=(t,e)=>fi(t).join(e).toLowerCase(),fu=t=>fi(t).reduce((e,n)=>`${e}${e?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),pu=t=>du(t,"_");var Pt={camelCase:fu,snakeCase:pu},hn={exports:{}};hn.exports=function(t){return pi(gu(t),t)};hn.exports.array=pi;function pi(t,e){var n=t.length,i=new Array(n),r={},s=n,o=bu(e),c=hu(t);for(e.forEach(function(l){if(!c.has(l[0])||!c.has(l[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)r[s]||a(t[s],s,new Set);return i;function a(l,d,f){if(f.has(l)){var h;try{h=", node was:"+JSON.stringify(l)}catch{h=""}throw new Error("Cyclic dependency"+h)}if(!c.has(l))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(l));if(!r[d]){r[d]=!0;var p=o.get(l)||new Set;if(p=Array.from(p),d=p.length){f.add(l);do{var x=p[--d];a(x,c.get(x),f)}while(d);f.delete(l)}i[--n]=l}}}function gu(t){for(var e=new Set,n=0,i=t.length;n<i;n++){var r=t[n];e.add(r[0]),e.add(r[1])}return Array.from(e)}function bu(t){for(var e=new Map,n=0,i=t.length;n<i;n++){var r=t[n];e.has(r[0])||e.set(r[0],new Set),e.has(r[1])||e.set(r[1],new Set),e.get(r[0]).add(r[1])}return e}function hu(t){for(var e=new Map,n=0,i=t.length;n<i;n++)e.set(t[n],n);return e}var mu=hn.exports;const xu=ci(mu),vu=Object.prototype.toString,Iu=Error.prototype.toString,Cu=RegExp.prototype.toString,yu=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Su=/^Symbol\((.*)\)(.*)$/;function Au(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function Qn(t,e=!1){if(t==null||t===!0||t===!1)return""+t;const n=typeof t;if(n==="number")return Au(t);if(n==="string")return e?`"${t}"`:t;if(n==="function")return"[Function "+(t.name||"anonymous")+"]";if(n==="symbol")return yu.call(t).replace(Su,"Symbol($1)");const i=vu.call(t).slice(8,-1);return i==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):i==="Error"||t instanceof Error?"["+Iu.call(t)+"]":i==="RegExp"?Cu.call(t):null}function xe(t,e){let n=Qn(t,e);return n!==null?n:JSON.stringify(t,function(i,r){let s=Qn(this[i],e);return s!==null?s:r},2)}function gi(t){return t==null?[]:[].concat(t)}let bi,hi,mi,Ru=/\$\{\s*(\w+)\s*\}/g;bi=Symbol.toStringTag;class qn{constructor(e,n,i,r){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[bi]="Error",this.name="ValidationError",this.value=n,this.path=i,this.type=r,this.errors=[],this.inner=[],gi(e).forEach(s=>{if(ae.isError(s)){this.errors.push(...s.errors);const o=s.inner.length?s.inner:[s];this.inner.push(...o)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}hi=Symbol.hasInstance;mi=Symbol.toStringTag;class ae extends Error{static formatError(e,n){const i=n.label||n.path||"this";return n=Object.assign({},n,{path:i,originalPath:n.path}),typeof e=="string"?e.replace(Ru,(r,s)=>xe(n[s])):typeof e=="function"?e(n):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,n,i,r,s){const o=new qn(e,n,i,r);if(s)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[mi]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ae)}static[hi](e){return qn[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let be={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:e,value:n,originalValue:i})=>{const r=i!=null&&i!==n?` (cast from the value \`${xe(i,!0)}\`).`:".";return e!=="mixed"?`${t} must be a \`${e}\` type, but the final value was: \`${xe(n,!0)}\``+r:`${t} must match the configured type. The validated value was: \`${xe(n,!0)}\``+r}},le={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Ie={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},_t={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Jt={isValue:"${path} field must be ${value}"},Ke={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},et={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},Eu={notType:t=>{const{path:e,value:n,spec:i}=t,r=i.types.length;if(Array.isArray(n)){if(n.length<r)return`${e} tuple value has too few items, expected a length of ${r} but got ${n.length} for value: \`${xe(n,!0)}\``;if(n.length>r)return`${e} tuple value has too many items, expected a length of ${r} but got ${n.length} for value: \`${xe(n,!0)}\``}return ae.formatError(be.notType,t)}};Object.assign(Object.create(null),{mixed:be,string:le,number:Ie,date:_t,object:Ke,array:et,boolean:Jt,tuple:Eu});const It=t=>t&&t.__isYupSchema__;class gt{static fromOptions(e,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:i,then:r,otherwise:s}=n,o=typeof i=="function"?i:(...c)=>c.every(a=>a===i);return new gt(e,(c,a)=>{var l;let d=o(...c)?r:s;return(l=d==null?void 0:d(a))!=null?l:a})}constructor(e,n){this.fn=void 0,this.refs=e,this.refs=e,this.fn=n}resolve(e,n){let i=this.refs.map(s=>s.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),r=this.fn(i,e,n);if(r===void 0||r===e)return e;if(!It(r))throw new TypeError("conditions must return a schema object");return r.resolve(n)}}const Qe={context:"$",value:"."};class Oe{constructor(e,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Qe.context,this.isValue=this.key[0]===Qe.value,this.isSibling=!this.isContext&&!this.isValue;let i=this.isContext?Qe.context:this.isValue?Qe.value:"";this.path=this.key.slice(i.length),this.getter=this.path&&Re.getter(this.path,!0),this.map=n.map}getValue(e,n,i){let r=this.isContext?i:this.isValue?e:n;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,n){return this.getValue(e,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}Oe.prototype.__isYupRef=!0;const fe=t=>t==null;function Te(t){function e({value:n,path:i="",options:r,originalValue:s,schema:o},c,a){const{name:l,test:d,params:f,message:h,skipAbsent:p}=t;let{parent:x,context:m,abortEarly:b=o.spec.abortEarly,disableStackTrace:v=o.spec.disableStackTrace}=r;const A={value:n,parent:x,context:m};function y(w={}){const D=xi(Object.assign({value:n,originalValue:s,label:o.spec.label,path:w.path||i,spec:o.spec,disableStackTrace:w.disableStackTrace||v},f,w.params),A),G=new ae(ae.formatError(w.message||h,D),n,D.path,w.type||l,D.disableStackTrace);return G.params=D,G}const I=b?c:a;let C={path:i,parent:x,type:l,from:r.from,createError:y,resolve(w){return vi(w,A)},options:r,originalValue:s,schema:o};const F=w=>{ae.isError(w)?I(w):w?a(null):I(y())},E=w=>{ae.isError(w)?I(w):c(w)};if(p&&fe(n))return F(!0);let j;try{var M;if(j=d.call(C,n,C),typeof((M=j)==null?void 0:M.then)=="function"){if(r.sync)throw new Error(`Validation test of type: "${C.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(j).then(F,E)}}catch(w){E(w);return}F(j)}return e.OPTIONS=t,e}function xi(t,e){if(!t)return t;for(const n of Object.keys(t))t[n]=vi(t[n],e);return t}function vi(t,e){return Oe.isRef(t)?t.getValue(e.value,e.parent,e.context):t}function Ou(t,e,n,i=n){let r,s,o;return e?(Re.forEach(e,(c,a,l)=>{let d=a?c.slice(1,c.length-1):c;t=t.resolve({context:i,parent:r,value:n});let f=t.type==="tuple",h=l?parseInt(d,10):0;if(t.innerType||f){if(f&&!l)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&h>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${c}, in the path: ${e}. because there is no value at that index. `);r=n,n=n&&n[h],t=f?t.spec.types[h]:t.innerType}if(!l){if(!t.fields||!t.fields[d])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${o} which is a type: "${t.type}")`);r=n,n=n&&n[d],t=t.fields[d]}s=d,o=a?"["+c+"]":"."+c}),{schema:t,parent:r,parentPath:s}):{parent:r,parentPath:e,schema:t}}class bt extends Set{describe(){const e=[];for(const n of this.values())e.push(Oe.isRef(n)?n.describe():n);return e}resolveAll(e){let n=[];for(const i of this.values())n.push(e(i));return n}clone(){return new bt(this.values())}merge(e,n){const i=this.clone();return e.forEach(r=>i.add(r)),n.forEach(r=>i.delete(r)),i}}function je(t,e=new Map){if(It(t)||!t||typeof t!="object")return t;if(e.has(t))return e.get(t);let n;if(t instanceof Date)n=new Date(t.getTime()),e.set(t,n);else if(t instanceof RegExp)n=new RegExp(t),e.set(t,n);else if(Array.isArray(t)){n=new Array(t.length),e.set(t,n);for(let i=0;i<t.length;i++)n[i]=je(t[i],e)}else if(t instanceof Map){n=new Map,e.set(t,n);for(const[i,r]of t.entries())n.set(i,je(r,e))}else if(t instanceof Set){n=new Set,e.set(t,n);for(const i of t)n.add(je(i,e))}else if(t instanceof Object){n={},e.set(t,n);for(const[i,r]of Object.entries(t))n[i]=je(r,e)}else throw Error(`Unable to clone ${t}`);return n}function Fu(t){if(!(t!=null&&t.length))return;const e=[];let n="",i=!1,r=!1;for(let s=0;s<t.length;s++){const o=t[s];if(o==="["&&!r){n&&(e.push(...n.split(".").filter(Boolean)),n=""),i=!0;continue}if(o==="]"&&!r){n&&(/^\d+$/.test(n)?e.push(n):e.push(n.replace(/^"|"$/g,"")),n=""),i=!1;continue}if(o==='"'){r=!r;continue}if(o==="."&&!i&&!r){n&&(e.push(n),n="");continue}n+=o}return n&&e.push(...n.split(".").filter(Boolean)),e}function wu(t,e){const n=e?`${e}.${t.path}`:t.path;return t.errors.map(i=>({message:i,path:Fu(n)}))}function Ii(t,e){var n;if(!((n=t.inner)!=null&&n.length)&&t.errors.length)return wu(t,e);const i=e?`${e}.${t.path}`:t.path;return t.inner.flatMap(r=>Ii(r,i))}class ce{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new bt,this._blacklist=new bt,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(be.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e==null?void 0:e.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=je(Object.assign({},this.spec,e)),n}label(e){let n=this.clone();return n.spec.label=e,n}meta(...e){if(e.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},e[0]),n}withMutation(e){let n=this._mutate;this._mutate=!0;let i=e(this);return this._mutate=n,i}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let n=this,i=e.clone();const r=Object.assign({},n.spec,i.spec);return i.spec=r,i.internalTests=Object.assign({},n.internalTests,i.internalTests),i._whitelist=n._whitelist.merge(e._whitelist,e._blacklist),i._blacklist=n._blacklist.merge(e._blacklist,e._whitelist),i.tests=n.tests,i.exclusiveTests=n.exclusiveTests,i.withMutation(s=>{e.tests.forEach(o=>{s.test(o.OPTIONS)})}),i.transforms=[...n.transforms,...i.transforms],i}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let n=this;if(n.conditions.length){let i=n.conditions;n=n.clone(),n.conditions=[],n=i.reduce((r,s)=>s.resolve(r,e),n),n=n.resolve(e)}return n}resolveOptions(e){var n,i,r,s;return Object.assign({},e,{from:e.from||[],strict:(n=e.strict)!=null?n:this.spec.strict,abortEarly:(i=e.abortEarly)!=null?i:this.spec.abortEarly,recursive:(r=e.recursive)!=null?r:this.spec.recursive,disableStackTrace:(s=e.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(e,n={}){let i=this.resolve(Object.assign({},n,{value:e})),r=n.assert==="ignore-optionality",s=i._cast(e,n);if(n.assert!==!1&&!i.isType(s)){if(r&&fe(s))return s;let o=xe(e),c=xe(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${i.type}".
7
+
8
+ attempted value: ${o}
9
+ `+(c!==o?`result of cast: ${c}`:""))}return s}_cast(e,n){let i=e===void 0?e:this.transforms.reduce((r,s)=>s.call(this,r,e,this,n),e);return i===void 0&&(i=this.getDefault(n)),i}_validate(e,n={},i,r){let{path:s,originalValue:o=e,strict:c=this.spec.strict}=n,a=e;c||(a=this._cast(a,Object.assign({assert:!1},n)));let l=[];for(let d of Object.values(this.internalTests))d&&l.push(d);this.runTests({path:s,value:a,originalValue:o,options:n,tests:l},i,d=>{if(d.length)return r(d,a);this.runTests({path:s,value:a,originalValue:o,options:n,tests:this.tests},i,r)})}runTests(e,n,i){let r=!1,{tests:s,value:o,originalValue:c,path:a,options:l}=e,d=m=>{r||(r=!0,n(m,o))},f=m=>{r||(r=!0,i(m,o))},h=s.length,p=[];if(!h)return f([]);let x={value:o,originalValue:c,path:a,options:l,schema:this};for(let m=0;m<s.length;m++){const b=s[m];b(x,d,function(A){A&&(Array.isArray(A)?p.push(...A):p.push(A)),--h<=0&&f(p)})}}asNestedTest({key:e,index:n,parent:i,parentPath:r,originalParent:s,options:o}){const c=e??n;if(c==null)throw TypeError("Must include `key` or `index` for nested validations");const a=typeof c=="number";let l=i[c];const d=Object.assign({},o,{strict:!0,parent:i,value:l,originalValue:s[c],key:void 0,[a?"index":"key"]:c,path:a||c.includes(".")?`${r||""}[${a?c:`"${c}"`}]`:(r?`${r}.`:"")+e});return(f,h,p)=>this.resolve(d)._validate(l,d,h,p)}validate(e,n){var i;let r=this.resolve(Object.assign({},n,{value:e})),s=(i=n==null?void 0:n.disableStackTrace)!=null?i:r.spec.disableStackTrace;return new Promise((o,c)=>r._validate(e,n,(a,l)=>{ae.isError(a)&&(a.value=l),c(a)},(a,l)=>{a.length?c(new ae(a,l,void 0,void 0,s)):o(l)}))}validateSync(e,n){var i;let r=this.resolve(Object.assign({},n,{value:e})),s,o=(i=n==null?void 0:n.disableStackTrace)!=null?i:r.spec.disableStackTrace;return r._validate(e,Object.assign({},n,{sync:!0}),(c,a)=>{throw ae.isError(c)&&(c.value=a),c},(c,a)=>{if(c.length)throw new ae(c,e,void 0,void 0,o);s=a}),s}isValid(e,n){return this.validate(e,n).then(()=>!0,i=>{if(ae.isError(i))return!1;throw i})}isValidSync(e,n){try{return this.validateSync(e,n),!0}catch(i){if(ae.isError(i))return!1;throw i}}_getDefault(e){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,e):je(n)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,n){const i=this.clone({nullable:e});return i.internalTests.nullable=Te({message:n,name:"nullable",test(r){return r===null?this.schema.spec.nullable:!0}}),i}optionality(e,n){const i=this.clone({optional:e});return i.internalTests.optionality=Te({message:n,name:"optionality",test(r){return r===void 0?this.schema.spec.optional:!0}}),i}optional(){return this.optionality(!0)}defined(e=be.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=be.notNull){return this.nullability(!1,e)}required(e=be.required){return this.clone().withMutation(n=>n.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let n=this.clone();return n.transforms.push(e),n}test(...e){let n;if(e.length===1?typeof e[0]=="function"?n={test:e[0]}:n=e[0]:e.length===2?n={name:e[0],test:e[1]}:n={name:e[0],message:e[1],test:e[2]},n.message===void 0&&(n.message=be.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let i=this.clone(),r=Te(n),s=n.exclusive||n.name&&i.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(i.exclusiveTests[n.name]=!!n.exclusive),i.tests=i.tests.filter(o=>!(o.OPTIONS.name===n.name&&(s||o.OPTIONS.test===r.OPTIONS.test))),i.tests.push(r),i}when(e,n){!Array.isArray(e)&&typeof e!="string"&&(n=e,e=".");let i=this.clone(),r=gi(e).map(s=>new Oe(s));return r.forEach(s=>{s.isSibling&&i.deps.push(s.key)}),i.conditions.push(typeof n=="function"?new gt(r,n):gt.fromOptions(r,n)),i}typeError(e){let n=this.clone();return n.internalTests.typeError=Te({message:e,name:"typeError",skipAbsent:!0,test(i){return this.schema._typeCheck(i)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(e,n=be.oneOf){let i=this.clone();return e.forEach(r=>{i._whitelist.add(r),i._blacklist.delete(r)}),i.internalTests.whiteList=Te({message:n,name:"oneOf",skipAbsent:!0,test(r){let s=this.schema._whitelist,o=s.resolveAll(this.resolve);return o.includes(r)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:o}})}}),i}notOneOf(e,n=be.notOneOf){let i=this.clone();return e.forEach(r=>{i._blacklist.add(r),i._whitelist.delete(r)}),i.internalTests.blacklist=Te({message:n,name:"notOneOf",test(r){let s=this.schema._blacklist,o=s.resolveAll(this.resolve);return o.includes(r)?this.createError({params:{values:Array.from(s).join(", "),resolved:o}}):!0}}),i}strip(e=!0){let n=this.clone();return n.spec.strip=e,n}describe(e){const n=(e?this.resolve(e):this).clone(),{label:i,meta:r,optional:s,nullable:o}=n.spec;return{meta:r,label:i,optional:s,nullable:o,default:n.getDefault(e),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.filter((a,l,d)=>d.findIndex(f=>f.OPTIONS.name===a.OPTIONS.name)===l).map(a=>{const l=a.OPTIONS.params&&e?xi(Object.assign({},a.OPTIONS.params),e):a.OPTIONS.params;return{name:a.OPTIONS.name,params:l}})}}get"~standard"(){const e=this;return{version:1,vendor:"yup",async validate(i){try{return{value:await e.validate(i,{abortEarly:!1})}}catch(r){if(r instanceof ae)return{issues:Ii(r)};throw r}}}}}ce.prototype.__isYupSchema__=!0;for(const t of["validate","validateSync"])ce.prototype[`${t}At`]=function(e,n,i={}){const{parent:r,parentPath:s,schema:o}=Ou(this,e,n,i.context);return o[t](r&&r[s],Object.assign({},i,{parent:r,path:e}))};for(const t of["equals","is"])ce.prototype[t]=ce.prototype.oneOf;for(const t of["not","nope"])ce.prototype[t]=ce.prototype.notOneOf;function Ci(){return new yi}class yi extends ce{constructor(){super({type:"boolean",check(e){return e instanceof Boolean&&(e=e.valueOf()),typeof e=="boolean"}}),this.withMutation(()=>{this.transform((e,n)=>{if(this.spec.coerce&&!this.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}isTrue(e=Jt.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return fe(n)||n===!0}})}isFalse(e=Jt.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return fe(n)||n===!1}})}default(e){return super.default(e)}defined(e){return super.defined(e)}optional(){return super.optional()}required(e){return super.required(e)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(e){return super.nonNullable(e)}strip(e){return super.strip(e)}}Ci.prototype=yi.prototype;const Tu=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Bu(t){const e=Yt(t);if(!e)return Date.parse?Date.parse(t):Number.NaN;if(e.z===void 0&&e.plusMinus===void 0)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let n=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(n=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(n=0-n)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+n,e.second,e.millisecond)}function Yt(t){var e,n;const i=Tu.exec(t);return i?{year:he(i[1]),month:he(i[2],1)-1,day:he(i[3],1),hour:he(i[4]),minute:he(i[5]),second:he(i[6]),millisecond:i[7]?he(i[7].substring(0,3)):0,precision:(e=(n=i[7])==null?void 0:n.length)!=null?e:void 0,z:i[8]||void 0,plusMinus:i[9]||void 0,hourOffset:he(i[10]),minuteOffset:he(i[11])}:null}function he(t,e=0){return Number(t)||e}let Gu=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ju=/^((https?|ftp):)?\/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uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Vu=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Du="^\\d{4}-\\d{2}-\\d{2}",Pu="\\d{2}:\\d{2}:\\d{2}",Nu="(([+-]\\d{2}(:?\\d{2})?)|Z)",Mu=new RegExp(`${Du}T${Pu}(\\.\\d+)?${Nu}$`),Lu=t=>fe(t)||t===t.trim(),ku={}.toString();function tt(){return new Si}class Si extends ce{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,n)=>{if(!this.spec.coerce||this.isType(e)||Array.isArray(e))return e;const i=e!=null&&e.toString?e.toString():e;return i===ku?e:i})})}required(e){return super.required(e).withMutation(n=>n.test({message:e||be.required,name:"required",skipAbsent:!0,test:i=>!!i.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(n=>n.OPTIONS.name!=="required"),e))}length(e,n=le.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(i){return i.length===this.resolve(e)}})}min(e,n=le.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(i){return i.length>=this.resolve(e)}})}max(e,n=le.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:e},skipAbsent:!0,test(i){return i.length<=this.resolve(e)}})}matches(e,n){let i=!1,r,s;return n&&(typeof n=="object"?{excludeEmptyString:i=!1,message:r,name:s}=n:r=n),this.test({name:s||"matches",message:r||le.matches,params:{regex:e},skipAbsent:!0,test:o=>o===""&&i||o.search(e)!==-1})}email(e=le.email){return this.matches(Gu,{name:"email",message:e,excludeEmptyString:!0})}url(e=le.url){return this.matches(ju,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=le.uuid){return this.matches(Vu,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let n="",i,r;return e&&(typeof e=="object"?{message:n="",allowOffset:i=!1,precision:r=void 0}=e:n=e),this.matches(Mu,{name:"datetime",message:n||le.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||le.datetime_offset,params:{allowOffset:i},skipAbsent:!0,test:s=>{if(!s||i)return!0;const o=Yt(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||le.datetime_precision,params:{precision:r},skipAbsent:!0,test:s=>{if(!s||r==null)return!0;const o=Yt(s);return o?o.precision===r:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=le.trim){return this.transform(n=>n!=null?n.trim():n).test({message:e,name:"trim",test:Lu})}lowercase(e=le.lowercase){return this.transform(n=>fe(n)?n:n.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>fe(n)||n===n.toLowerCase()})}uppercase(e=le.uppercase){return this.transform(n=>fe(n)?n:n.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>fe(n)||n===n.toUpperCase()})}}tt.prototype=Si.prototype;let Wu=t=>t!=+t;function Ai(){return new Ri}class Ri extends ce{constructor(){super({type:"number",check(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!Wu(e)}}),this.withMutation(()=>{this.transform((e,n)=>{if(!this.spec.coerce)return e;let i=e;if(typeof i=="string"){if(i=i.replace(/\s/g,""),i==="")return NaN;i=+i}return this.isType(i)||i===null?i:parseFloat(i)})})}min(e,n=Ie.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(i){return i>=this.resolve(e)}})}max(e,n=Ie.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(i){return i<=this.resolve(e)}})}lessThan(e,n=Ie.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(i){return i<this.resolve(e)}})}moreThan(e,n=Ie.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(i){return i>this.resolve(e)}})}positive(e=Ie.positive){return this.moreThan(0,e)}negative(e=Ie.negative){return this.lessThan(0,e)}integer(e=Ie.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(e=>fe(e)?e:e|0)}round(e){var n;let i=["ceil","floor","round","trunc"];if(e=((n=e)==null?void 0:n.toLowerCase())||"round",e==="trunc")return this.truncate();if(i.indexOf(e.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+i.join(", "));return this.transform(r=>fe(r)?r:Math[e](r))}}Ai.prototype=Ri.prototype;let Xu=new Date(""),zu=t=>Object.prototype.toString.call(t)==="[object Date]";class mn extends ce{constructor(){super({type:"date",check(e){return zu(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,n)=>!this.spec.coerce||this.isType(e)||e===null?e:(e=Bu(e),isNaN(e)?mn.INVALID_DATE:new Date(e)))})}prepareParam(e,n){let i;if(Oe.isRef(e))i=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);i=r}return i}min(e,n=_t.min){let i=this.prepareParam(e,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(r){return r>=this.resolve(i)}})}max(e,n=_t.max){let i=this.prepareParam(e,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(r){return r<=this.resolve(i)}})}}mn.INVALID_DATE=Xu;function Hu(t,e=[]){let n=[],i=new Set,r=new Set(e.map(([o,c])=>`${o}-${c}`));function s(o,c){let a=Re.split(o)[0];i.add(a),r.has(`${c}-${a}`)||n.push([c,a])}for(const o of Object.keys(t)){let c=t[o];i.add(o),Oe.isRef(c)&&c.isSibling?s(c.path,o):It(c)&&"deps"in c&&c.deps.forEach(a=>s(a,o))}return xu.array(Array.from(i),n).reverse()}function Kn(t,e){let n=1/0;return t.some((i,r)=>{var s;if((s=e.path)!=null&&s.includes(i))return n=r,!0}),n}function Ei(t){return(e,n)=>Kn(t,e)-Kn(t,n)}const Oi=(t,e,n)=>{if(typeof t!="string")return t;let i=t;try{i=JSON.parse(t)}catch{}return n.isType(i)?i:t};function nt(t){if("fields"in t){const e={};for(const[n,i]of Object.entries(t.fields))e[n]=nt(i);return t.setFields(e)}if(t.type==="array"){const e=t.optional();return e.innerType&&(e.innerType=nt(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(nt)}):"optional"in t?t.optional():t}const Zu=(t,e)=>{const n=[...Re.normalizePath(e)];if(n.length===1)return n[0]in t;let i=n.pop(),r=Re.getter(Re.join(n),!0)(t);return!!(r&&i in r)};let er=t=>Object.prototype.toString.call(t)==="[object Object]";function tr(t,e){let n=Object.keys(t.fields);return Object.keys(e).filter(i=>n.indexOf(i)===-1)}const _u=Ei([]);function $t(t){return new Fi(t)}class Fi extends ce{constructor(e){super({type:"object",check(n){return er(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=_u,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,n={}){var i;let r=super._cast(e,n);if(r===void 0)return this.getDefault(n);if(!this._typeCheck(r))return r;let s=this.fields,o=(i=n.stripUnknown)!=null?i:this.spec.noUnknown,c=[].concat(this._nodes,Object.keys(r).filter(f=>!this._nodes.includes(f))),a={},l=Object.assign({},n,{parent:a,__validating:n.__validating||!1}),d=!1;for(const f of c){let h=s[f],p=f in r,x=r[f];if(h){let m;l.path=(n.path?`${n.path}.`:"")+f,h=h.resolve({value:x,context:n.context,parent:a});let b=h instanceof ce?h.spec:void 0,v=b==null?void 0:b.strict;if(b!=null&&b.strip){d=d||f in r;continue}m=!n.__validating||!v?h.cast(x,l):x,m!==void 0&&(a[f]=m)}else p&&!o&&(a[f]=x);(p!==f in a||a[f]!==x)&&(d=!0)}return d?a:r}_validate(e,n={},i,r){let{from:s=[],originalValue:o=e,recursive:c=this.spec.recursive}=n;n.from=[{schema:this,value:o},...s],n.__validating=!0,n.originalValue=o,super._validate(e,n,i,(a,l)=>{if(!c||!er(l)){r(a,l);return}o=o||l;let d=[];for(let f of this._nodes){let h=this.fields[f];!h||Oe.isRef(h)||d.push(h.asNestedTest({options:n,key:f,parent:l,parentPath:n.path,originalParent:o}))}this.runTests({tests:d,value:l,originalValue:o,options:n},i,f=>{r(f.sort(this._sortErrors).concat(a),l)})})}clone(e){const n=super.clone(e);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(e){let n=super.concat(e),i=n.fields;for(let[r,s]of Object.entries(this.fields)){const o=i[r];i[r]=o===void 0?s:o}return n.withMutation(r=>r.setFields(i,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let n={};return this._nodes.forEach(i=>{var r;const s=this.fields[i];let o=e;(r=o)!=null&&r.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[i]})),n[i]=s&&"getDefault"in s?s.getDefault(o):void 0}),n}setFields(e,n){let i=this.clone();return i.fields=e,i._nodes=Hu(e,n),i._sortErrors=Ei(Object.keys(e)),n&&(i._excludedEdges=n),i}shape(e,n=[]){return this.clone().withMutation(i=>{let r=i._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),r=[...i._excludedEdges,...n]),i.setFields(Object.assign(i.fields,e),r)})}partial(){const e={};for(const[n,i]of Object.entries(this.fields))e[n]="optional"in i&&i.optional instanceof Function?i.optional():i;return this.setFields(e)}deepPartial(){return nt(this)}pick(e){const n={};for(const i of e)this.fields[i]&&(n[i]=this.fields[i]);return this.setFields(n,this._excludedEdges.filter(([i,r])=>e.includes(i)&&e.includes(r)))}omit(e){const n=[];for(const i of Object.keys(this.fields))e.includes(i)||n.push(i);return this.pick(n)}from(e,n,i){let r=Re.getter(e,!0);return this.transform(s=>{if(!s)return s;let o=s;return Zu(s,e)&&(o=Object.assign({},s),i||delete o[e],o[n]=r(s)),o})}json(){return this.transform(Oi)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Ke.exact,test(n){if(n==null)return!0;const i=tr(this.schema,n);return i.length===0||this.createError({params:{properties:i.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,n=Ke.noUnknown){typeof e!="boolean"&&(n=e,e=!0);let i=this.test({name:"noUnknown",exclusive:!0,message:n,test(r){if(r==null)return!0;const s=tr(this.schema,r);return!e||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return i.spec.noUnknown=e,i}unknown(e=!0,n=Ke.noUnknown){return this.noUnknown(!e,n)}transformKeys(e){return this.transform(n=>{if(!n)return n;const i={};for(const r of Object.keys(n))i[e(r)]=n[r];return i})}camelCase(){return this.transformKeys(Pt.camelCase)}snakeCase(){return this.transformKeys(Pt.snakeCase)}constantCase(){return this.transformKeys(e=>Pt.snakeCase(e).toUpperCase())}describe(e){const n=(e?this.resolve(e):this).clone(),i=super.describe(e);i.fields={};for(const[s,o]of Object.entries(n.fields)){var r;let c=e;(r=c)!=null&&r.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[s]})),i.fields[s]=o.describe(c)}return i}}$t.prototype=Fi.prototype;function Ut(t){return new wi(t)}class wi extends ce{constructor(e){super({type:"array",spec:{types:e},check(n){return Array.isArray(n)}}),this.innerType=void 0,this.innerType=e}_cast(e,n){const i=super._cast(e,n);if(!this._typeCheck(i)||!this.innerType)return i;let r=!1;const s=i.map((o,c)=>{const a=this.innerType.cast(o,Object.assign({},n,{path:`${n.path||""}[${c}]`,parent:i,originalValue:o,value:o,index:c}));return a!==o&&(r=!0),a});return r?s:i}_validate(e,n={},i,r){var s;let o=this.innerType,c=(s=n.recursive)!=null?s:this.spec.recursive;n.originalValue!=null&&n.originalValue,super._validate(e,n,i,(a,l)=>{var d;if(!c||!o||!this._typeCheck(l)){r(a,l);return}let f=new Array(l.length);for(let p=0;p<l.length;p++){var h;f[p]=o.asNestedTest({options:n,index:p,parent:l,parentPath:n.path,originalParent:(h=n.originalValue)!=null?h:e})}this.runTests({value:l,tests:f,originalValue:(d=n.originalValue)!=null?d:e,options:n},i,p=>r(p.concat(a),l))})}clone(e){const n=super.clone(e);return n.innerType=this.innerType,n}json(){return this.transform(Oi)}concat(e){let n=super.concat(e);return n.innerType=this.innerType,e.innerType&&(n.innerType=n.innerType?n.innerType.concat(e.innerType):e.innerType),n}of(e){let n=this.clone();if(!It(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+xe(e));return n.innerType=e,n.spec=Object.assign({},n.spec,{types:e}),n}length(e,n=et.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(i){return i.length===this.resolve(e)}})}min(e,n){return n=n||et.min,this.test({message:n,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(i){return i.length>=this.resolve(e)}})}max(e,n){return n=n||et.max,this.test({message:n,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(i){return i.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,n)=>this._typeCheck(e)?e:n==null?[]:[].concat(n))}compact(e){let n=e?(i,r,s)=>!e(i,r,s):i=>!!i;return this.transform(i=>i!=null?i.filter(n):i)}describe(e){const n=(e?this.resolve(e):this).clone(),i=super.describe(e);if(n.innerType){var r;let s=e;(r=s)!=null&&r.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[0]})),i.innerType=n.innerType.describe(s)}return i}}Ut.prototype=wi.prototype;function xn(t){const e=t.id??t.name;if(!e)throw new Error("[FlowForge] Field descriptor is missing both 'id' and 'name'");return e}class Ju{constructor(){this.sources=new Map}register(e,n){this.sources.set(e,n)}get(e){return this.sources.get(e)}has(e){return this.sources.has(e)}}const Ti=new Ju,Yu=8,Q={wrapper:t=>({border:`1px solid ${t?R.BORDER_COLOR_ERROR:R.BORDER_COLOR}`,borderRadius:R.BORDER_RADIUS,overflow:"hidden",background:"#fff",fontSize:13}),toolbar:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"6px 12px",borderBottom:"1px solid #e0e0e0",minHeight:40,background:"#fff"},selectedLink:{fontSize:13,color:"#1976d2",cursor:"pointer",background:"none",border:"none",padding:0,fontWeight:500},searchWrap:{display:"flex",alignItems:"center",gap:6,border:"1px solid #e0e0e0",borderRadius:4,padding:"3px 8px",background:"#fafafa",flex:"0 0 220px"},searchInput:{border:"none",outline:"none",fontSize:13,background:"transparent",width:"100%"},table:{width:"100%",borderCollapse:"collapse"},thead:{background:"#f5f5f5"},th:t=>({textAlign:"left",padding:"0 16px",height:44,fontSize:12,fontWeight:600,color:"rgba(0,0,0,0.6)",borderBottom:"1px solid #e0e0e0",whiteSpace:"nowrap",width:t,letterSpacing:"0.01em"}),checkTh:{width:48,padding:"0 0 0 12px",height:44,borderBottom:"1px solid #e0e0e0",background:"#f5f5f5"},td:{padding:"0 16px",height:48,borderBottom:"1px solid #f0f0f0",color:"rgba(0,0,0,0.87)",verticalAlign:"middle"},checkTd:{padding:"0 0 0 12px",height:48,borderBottom:"1px solid #f0f0f0",verticalAlign:"middle",width:48},statusRow:{textAlign:"center",padding:"24px 16px",color:"rgba(0,0,0,0.38)",fontSize:13},footer:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:16,padding:"4px 8px",borderTop:"1px solid #e0e0e0",fontSize:12,color:"rgba(0,0,0,0.6)",background:"#fafafa",minHeight:40},pageBtn:t=>({display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:"50%",border:"none",background:"transparent",cursor:t?"default":"pointer",color:t?"rgba(0,0,0,0.26)":"rgba(0,0,0,0.54)",fontSize:16,transition:"background 0.15s"}),overlay:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center"},modal:{background:"#fff",borderRadius:8,width:560,maxWidth:"90vw",maxHeight:"80vh",display:"flex",flexDirection:"column",boxShadow:"0 8px 32px rgba(0,0,0,0.18)"},modalHeader:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid #e0e0e0",fontSize:16,fontWeight:600,color:"rgba(0,0,0,0.87)"},modalCloseBtn:{background:"none",border:"none",cursor:"pointer",color:"rgba(0,0,0,0.54)",display:"flex",alignItems:"center",padding:4,borderRadius:4},modalSearch:{display:"flex",alignItems:"center",gap:8,margin:"12px 20px",border:"1px solid #e0e0e0",borderRadius:20,padding:"6px 12px",background:"#fafafa"},modalSearchInput:{flex:1,border:"none",outline:"none",fontSize:14,background:"transparent"},modalList:{flex:1,overflowY:"auto",padding:"0 20px 8px"},modalRow:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 0",borderBottom:"1px solid #f0f0f0",fontSize:14,color:"rgba(0,0,0,0.87)"},modalRemoveBtn:{background:"none",border:"none",cursor:"pointer",color:"#e53935",display:"flex",alignItems:"center",padding:2,borderRadius:4,flexShrink:0},modalFooter:{display:"flex",justifyContent:"flex-end",padding:"12px 20px",borderTop:"1px solid #e0e0e0"},closeBtn:{padding:"6px 20px",border:"1px solid #e0e0e0",borderRadius:4,background:"#fff",cursor:"pointer",fontSize:14,color:"rgba(0,0,0,0.87)"}};function nr({checked:t,onChange:e,indeterminate:n,disabled:i}){const r=g.useRef(null);return g.useEffect(()=>{r.current&&(r.current.indeterminate=!!n)},[n]),u.jsx("input",{ref:r,type:"checkbox",checked:t,onChange:e,disabled:i,style:{width:16,height:16,cursor:i?"default":"pointer",accentColor:"#1976d2"}})}function $u({selected:t,onRemove:e,onClose:n}){const[i,r]=g.useState(""),s=t.filter(o=>o.label.toLowerCase().includes(i.toLowerCase()));return u.jsx("div",{style:Q.overlay,onClick:n,children:u.jsxs("div",{style:Q.modal,onClick:o=>o.stopPropagation(),children:[u.jsxs("div",{style:Q.modalHeader,children:[u.jsx("span",{children:"Selected Rows"}),u.jsx("button",{type:"button",style:Q.modalCloseBtn,onClick:n,children:u.jsx(U.MdClose,{size:20})})]}),u.jsxs("div",{style:Q.modalSearch,children:[u.jsx(U.MdSearch,{size:18,color:"rgba(0,0,0,0.38)"}),u.jsx("input",{autoFocus:!0,type:"text",placeholder:"Search",value:i,onChange:o=>r(o.target.value),style:Q.modalSearchInput})]}),u.jsxs("div",{style:Q.modalList,children:[s.length===0&&u.jsx("div",{style:{textAlign:"center",padding:"24px 0",color:"rgba(0,0,0,0.38)",fontSize:13},children:"No items found"}),s.map(o=>u.jsxs("div",{style:Q.modalRow,children:[u.jsx("span",{children:o.label}),u.jsx("button",{type:"button",style:Q.modalRemoveBtn,onClick:()=>e(o.value),title:"Remove",children:u.jsx(U.MdClose,{size:16})})]},o.value))]}),u.jsx("div",{style:Q.modalFooter,children:u.jsx("button",{type:"button",style:Q.closeBtn,onClick:n,children:"Close"})})]})})}function Bi({field:t,value:e,onChange:n,onBlur:i,error:r,touched:s}){const o=t,c=!!(s&&r),a=o.isMulti??!1,l=o.pageSize??Yu,d=o.id??o.name??"",[f,h]=g.useState(""),[p,x]=g.useState(1),[m,b]=g.useState([]),[v,A]=g.useState(!1),[y,I]=g.useState(!1),[C,F]=g.useState(null),[E,B]=g.useState(!1),j=g.useRef(null),M=g.useRef(0),w=g.useRef(!0);g.useEffect(()=>()=>{w.current=!1,j.current&&clearTimeout(j.current)},[]);const D=a?Array.isArray(e)?e:[]:e?[e]:[],G=D.length,N=g.useCallback((T,k)=>{if(o.fetchOptions)return o.fetchOptions(T,k);if(o.dataSource){const _=Ti.get(o.dataSource);return _?_.fetch(T,k):Promise.reject(new Error(`[FlowForge] DataSource "${o.dataSource}" is not registered.`))}return Promise.reject(new Error(`[FlowForge] table-picker "${o.id}" requires fetchOptions or dataSource.`))},[o.fetchOptions,o.dataSource,o.id]),V=g.useCallback((T,k)=>{const _=++M.current;I(!0),N(T,k).then(z=>{!w.current||_!==M.current||(b(z.options.slice(0,l)),A(z.hasNextPage))}).catch(()=>{!w.current||_!==M.current||(b([]),A(!1))}).finally(()=>{!w.current||_!==M.current||I(!1)})},[N,l]);g.useEffect(()=>{V("",1)},[]);const Z=T=>{const k=T.target.value;h(k),x(1),j.current&&clearTimeout(j.current),j.current=setTimeout(()=>V(k,1),300)},J=T=>{if(a){const k=Array.isArray(e)?e:[],_=k.some(z=>z.value===T.value);n(_?k.filter(z=>z.value!==T.value):[...k,T])}else n((e==null?void 0:e.value)===T.value?null:T);i==null||i()},Y=()=>{if(!a)return;const T=Array.isArray(e)?e:[];if(m.every(_=>T.some(z=>z.value===_.value)))n(T.filter(_=>!m.some(z=>z.value===_.value)));else{const _=m.filter(z=>!T.some(ne=>ne.value===z.value));n([...T,..._])}},ee=T=>{if(a){const _=(Array.isArray(e)?e:[]).filter(z=>z.value!==T);n(_),_.length===0&&B(!1)}else n(null),B(!1);i==null||i()},te=o.columns.length+1,O=m.length>0&&m.every(T=>D.some(k=>k.value===T.value)),P=m.some(T=>D.some(k=>k.value===T.value)),X=T=>D.some(k=>k.value===T.value);return u.jsxs("div",{style:{marginBottom:16},children:[u.jsx(oe,{label:o.label,required:o.required,showOptional:o.showOptional,info:o.info,htmlFor:d,dataTestId:o.dataTestId??d}),u.jsxs("div",{style:Q.wrapper(c),onBlur:i,id:d,children:[u.jsxs("div",{style:Q.toolbar,children:[G>0?u.jsxs("button",{type:"button",style:Q.selectedLink,onClick:()=>B(!0),children:[G," ",G===1?"Item":"Items"," Selected"]}):u.jsx("span",{style:{fontSize:13,color:"rgba(0,0,0,0.38)"},children:"No selection"}),u.jsxs("div",{style:Q.searchWrap,children:[u.jsx(U.MdSearch,{size:15,color:"rgba(0,0,0,0.38)"}),u.jsx("input",{type:"text",placeholder:o.placeholder??"Search…",value:f,onChange:Z,style:Q.searchInput,"aria-label":`Search ${o.label??""}`})]})]}),u.jsx("div",{style:{overflowX:"auto"},children:u.jsxs("table",{style:Q.table,children:[u.jsx("thead",{style:Q.thead,children:u.jsxs("tr",{children:[u.jsx("th",{style:Q.checkTh,children:a&&u.jsx(nr,{checked:O,indeterminate:!O&&P,onChange:Y,disabled:y||m.length===0})}),o.columns.map(T=>u.jsx("th",{style:Q.th(T.width),children:T.label},T.key))]})}),u.jsx("tbody",{children:y?u.jsx("tr",{children:u.jsx("td",{colSpan:te,style:Q.statusRow,children:"Loading…"})}):m.length===0?u.jsx("tr",{children:u.jsx("td",{colSpan:te,style:Q.statusRow,children:"No results found"})}):m.map(T=>{const k=X(T),_=C===T.value;return u.jsxs("tr",{style:{cursor:"pointer",background:k?"rgba(25,118,210,0.06)":_?"rgba(0,0,0,0.03)":"#fff",transition:"background 0.1s"},onClick:()=>J(T),onMouseEnter:()=>F(T.value),onMouseLeave:()=>F(null),"aria-selected":k,children:[u.jsx("td",{style:Q.checkTd,children:a?u.jsx(nr,{checked:k,onChange:()=>J(T)}):u.jsx("input",{type:"radio",checked:k,onChange:()=>J(T),onClick:z=>z.stopPropagation(),name:d,style:{accentColor:"#1976d2",width:16,height:16,cursor:"pointer"}})}),o.columns.map(z=>u.jsx("td",{style:Q.td,children:String(T[z.key]??"")},z.key))]},T.value)})})]})}),u.jsxs("div",{style:Q.footer,children:[u.jsx("span",{children:`${(p-1)*l+1}–${(p-1)*l+m.length} of many`}),u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[u.jsx("button",{type:"button",onClick:()=>{const T=p-1;x(T),V(f,T)},disabled:p<=1,style:Q.pageBtn(p<=1),"aria-label":"Previous page",children:"‹"}),u.jsx("button",{type:"button",onClick:()=>{const T=p+1;x(T),V(f,T)},disabled:!v,style:Q.pageBtn(!v),"aria-label":"Next page",children:"›"})]})]})]}),o.helperText&&!c&&u.jsx("small",{style:ie,children:o.helperText}),c&&u.jsx("small",{"data-testid":`${d}-error`,style:se,children:r}),E&&u.jsx($u,{selected:D,onRemove:ee,onClose:()=>B(!1)})]})}class Uu{constructor(){this.fields=new Map,this.register({type:"text",label:"Text"}),this.register({type:"textarea",label:"Textarea"}),this.register({type:"number",label:"Number",configSchema:{fields:[{id:"min",type:"number",label:"Minimum limit"},{id:"max",type:"number",label:"Maximum limit"},{id:"step",type:"number",label:"Step size"},{id:"prefix",type:"text",label:"Prefix (e.g. $)"},{id:"suffix",type:"text",label:"Suffix (e.g. USD)"}]}}),this.register({type:"toggle",label:"Toggle/Switch"}),this.register({type:"select",label:"Select"}),this.register({type:"descriptive-select",label:"Descriptive Select"}),this.register({type:"radio-group",label:"Radio Group"}),this.register({type:"key-value",label:"Key-Value"}),this.register({type:"reference",label:"Reference"}),this.register({type:"cron",label:"Cron"}),this.register({type:"object",label:"Object"}),this.register({type:"schema",label:"Schema (nested form)"}),this.register({type:"tabs",label:"Tabs"}),this.register({type:"date",label:"Date"}),this.register({type:"datetime",label:"Date & Time"}),this.register({type:"time",label:"Time"}),this.register({type:"tags",label:"Tags",configSchema:{fields:[{id:"placeholder",type:"text",label:"Placeholder text"},{id:"maxTags",type:"number",label:"Max tags (leave empty for unlimited)"}]}}),this.register({type:"slider",label:"Slider",configSchema:{fields:[{id:"min",type:"number",label:"Minimum value"},{id:"max",type:"number",label:"Maximum value"},{id:"step",type:"number",label:"Step size"},{id:"showValue",type:"toggle",label:"Show current value"},{id:"marks",type:"toggle",label:"Show tick marks"}]}}),this.register({type:"color",label:"Color",configSchema:{fields:[{id:"showHex",type:"toggle",label:"Show hex input"}]}}),this.register({type:"file",label:"File Upload",configSchema:{fields:[{id:"accept",type:"text",label:"Accepted file types (e.g. .pdf,.png)"},{id:"maxSizeMb",type:"number",label:"Max file size (MB)"},{id:"multiple",type:"toggle",label:"Allow multiple files"}]}}),this.register({type:"json-editor",label:"JSON Editor",configSchema:{fields:[{id:"rows",type:"number",label:"Editor height (rows)"}]}}),this.register({type:"code",label:"Code",configSchema:{fields:[{id:"language",type:"select",label:"Language",options:[{value:"javascript",label:"JavaScript"},{value:"typescript",label:"TypeScript"},{value:"python",label:"Python"},{value:"json",label:"JSON"}]},{id:"rows",type:"number",label:"Editor height (rows)"}]}}),this.register({type:"rich-text",label:"Rich Text",configSchema:{fields:[{id:"rows",type:"number",label:"Editor height (rows)"},{id:"toolbar",type:"toggle",label:"Show toolbar"}]}}),this.register({type:"table-picker",label:"Table Picker",component:Bi,configSchema:{fields:[{id:"label",type:"text",label:"Label"},{id:"required",type:"toggle",label:"Required"},{id:"isMulti",type:"toggle",label:"Multi-select"},{id:"pageSize",type:"number",label:"Page size"}]}})}register(e){this.fields.set(e.type,e),e.component&&q.register(e.type,e.component)}get(e){return this.fields.get(e)}getAll(){return Array.from(this.fields.values())}getTypeOptions(){return this.getAll().map(e=>({value:e.type,label:e.label}))}}const Gi=new Uu;function vn(t){const e={};for(const n of t){let i;try{i=xn(n)}catch{continue}if(!i||n.hidden)continue;if(n.validation){e[i]=n.validation;continue}let r;const s=Gi.get(n.type);if(s!=null&&s.buildValidation)r=s.buildValidation(n);else switch(n.type){case"select":case"descriptive-select":case"infinite-select":case"radio-group":{if(n.isMulti===!0){let c=Ut();n.required&&(c=c.min(1,`${n.label??i} is required`)),r=c}else{let c=tt();n.required&&(c=c.required(`${n.label??i} is required`)),r=c}break}case"number":case"slider":{let o=Ai().typeError(`${n.label??i} must be a number`);n.min!=null&&(o=o.min(n.min,`${n.label??i} must be at least ${n.min}`)),n.max!=null&&(o=o.max(n.max,`${n.label??i} must be at most ${n.max}`)),n.required&&(o=o.required(`${n.label??i} is required`)),r=o;break}case"toggle":case"checkbox":r=Ci(),n.required&&(r=r.oneOf([!0],`${n.label??i} must be checked`));break;case"array":case"tags":{let o=Ut();n.required&&(o=o.min(1,`${n.label??i} must have at least one item`)),n.maxTags!=null&&(o=o.max(n.maxTags,`${n.label??i} can have at most ${n.maxTags} items`)),r=o;break}case"object":case"schema":{const o=n.children??[];r=o.length>0?vn(o):$t(),n.required&&(r=r.required(`${n.label??i} is required`));break}case"date":case"datetime":case"time":{let o=tt();n.required&&(o=o.required(`${n.label??i} is required`)),r=o;break}default:{const o=n.inputType;let c=tt();o==="email"?c=c.email(`${n.label??i} must be a valid email address`):o==="url"&&(c=c.url(`${n.label??i} must be a valid URL`));const a=n.minLength,l=n.maxLength;a!=null&&(c=c.min(a,`${n.label??i} must be at least ${a} characters`)),l!=null&&(c=c.max(l,`${n.label??i} must be at most ${l} characters`)),n.required&&(c=c.trim().required(`${n.label??i} is required`)),r=c;break}}e[i]=r}return $t().shape(e)}function ji(t){return t.reduce((e,n)=>n.type==="object"?e+ji(n.children??[]):e+1,0)}function Qu(t,e){return t.label?t.label:(e.split(".").pop()??"Group").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[-_]/g," ").replace(/\b\w/g,i=>i.toUpperCase())}function qu(t,e){const n=t===0,i=t===1,r=t>=2;return{marginBottom:e?8:r?10:12,borderRadius:n?"12px":i?"10px":"0px",border:r?"none":"1px solid #E5E7EB",backgroundColor:n?"#FFFFFF":i?"#FAFAFB":"transparent",boxShadow:n?"0 1px 2px rgba(15, 23, 42, 0.04)":"none",padding:0,overflow:"hidden",marginLeft:n?0:i?"10px":"16px"}}function Ku(t,e){const n=t===0,i=t===1,r=t>=2;return{display:"flex",alignItems:"center",gap:1,px:n?1.75:i?1.5:.25,py:n?1.35:i?1.1:.75,cursor:"pointer",userSelect:"none",backgroundColor:e?n?"#FCFCFD":i?"rgba(248, 250, 252, 0.92)":"transparent":n?"#FFFFFF":i?"#FAFAFB":"transparent",borderBottom:e&&!r?"1px solid #EEF2F7":"none",transition:"background-color 0.18s ease","&:hover":{backgroundColor:n?"#F8FAFC":i?"#F5F7FA":"rgba(248, 250, 252, 0.75)"}}}function ec({field:t,pathPrefix:e,depth:n,values:i,errors:r,touched:s,setFieldValue:o,setFieldTouched:c,compact:a,renderFieldRouter:l}){const[d,f]=g.useState(!0),h=t.children??[],p=ji(h),x=Qu(t,e),m=typeof t.helperText=="string"?t.helperText:void 0,b=`${p} field${p===1?"":"s"}`;return u.jsxs(S.Box,{sx:qu(n,a),children:[u.jsxs(S.Box,{onClick:()=>f(v=>!v),sx:Ku(n,d),children:[u.jsx(S.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:18,height:18,color:"#64748B",transform:d?"rotate(90deg)":"rotate(0deg)",transition:"transform 0.18s ease",flexShrink:0},children:u.jsx(U.MdKeyboardArrowRight,{size:16})}),u.jsxs(S.Box,{sx:{flex:1,minWidth:0},children:[u.jsxs(S.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:[u.jsx(S.Typography,{sx:{fontSize:n>=2?13:14,fontWeight:600,lineHeight:1.35,color:"#0F172A",overflowWrap:"anywhere"},children:x}),u.jsx(S.Chip,{label:b,size:"small",sx:{height:20,fontSize:10.5,fontWeight:600,bgcolor:"#F3F4F6",color:"#6B7280","& .MuiChip-label":{px:1}}})]}),m&&u.jsx(S.Typography,{sx:{mt:.35,fontSize:12,lineHeight:1.45,color:"#6c757d",overflowWrap:"anywhere"},children:m})]})]}),u.jsx(S.Box,{sx:{display:d?"block":"none",px:n===0?1.75:n===1?1.5:.25,py:n>=2?.75:1.5},children:u.jsx(S.Box,{sx:{pl:n===0?0:n===1?1:0},children:h.map(v=>{const A=v.id??v.name??"",y=e?`${e}.${A}`:A;return l({field:v,pathPrefix:y,depth:n+1,values:i,errors:r,touched:s,setFieldValue:o,setFieldTouched:c,compact:a,inlineLabel:!1})})})})]})}const Vi=g.createContext(null);function tc(){return g.useContext(Vi)}function nc({field:t,pathPrefix:e,depth:n,values:i,errors:r,touched:s,setFieldValue:o,setFieldTouched:c,compact:a,renderFieldRouter:l}){var B;const d=t.tabs??[],[f,h]=g.useState(((B=d[0])==null?void 0:B.id)??"");g.useEffect(()=>{d.length!==0&&(d.some(j=>j.id===f)||h(d[0].id))},[d,f]);const p=tc(),x=t.id??t.name??"",m=t.variant??"line",b=t.alignment??"left",v=t.height??"auto",A=t.margin??"normal",y=t.activeColor??"#6366f1",I=t.activeTextColor??(m==="pill"?"#ffffff":y),C=t.inactiveTextColor??"#64748b",F={left:"flex-start","center-left":"flex-start",center:"center","center-right":"flex-end",right:"flex-end"};if(d.length===0)return u.jsxs(S.Box,{sx:{p:2,border:"1px dashed #e2e8f0",borderRadius:2,color:"#94a3b8",fontSize:13},children:["No tabs defined. Add a ",u.jsx("code",{children:"tabs"})," array to this field descriptor."]});const E=d.find(j=>j.id===f)??d[0];return u.jsxs(S.Box,{sx:{mb:A==="none"?0:void 0,height:v==="fixed"?400:void 0,display:v==="fixed"?"flex":void 0,flexDirection:v==="fixed"?"column":void 0},children:[u.jsx(S.Box,{sx:{display:"flex",justifyContent:F[b]??"flex-start",alignItems:"center",gap:0,px:1.5,pt:1.5,borderBottom:"1px solid #e2e8f0",flexShrink:0},children:d.map(j=>{const M=j.id===f,w=e?`${e}.${j.id}`:j.id,D=j.fields.some(Y=>{const ee=Y.id??Y.name??"";return!!`${w}.${ee}`.split(".").reduce((P,X)=>P&&typeof P=="object"?P[X]:void 0,r)}),G={bgcolor:y,color:I,borderRadius:"20px",border:"none"},N={bgcolor:"transparent",color:C,borderRadius:"20px",border:"none"},V={borderBottom:`2px solid ${y}`,color:I,border:"none"},J=m==="pill"?M?G:N:M?V:{borderBottom:"2px solid transparent",color:C,border:"none"};return u.jsxs(S.Box,{component:"button",type:"button",onClick:()=>h(j.id),sx:{...J,background:m==="pill"&&M?y:"none",cursor:"pointer",px:1.5,py:m==="pill"?.5:1,fontSize:13,fontWeight:M?700:500,display:"flex",alignItems:"center",gap:.5,transition:"color .12s, border-color .12s, background .12s","&:hover":{color:m==="pill"&&M?I:y},mb:m==="line"?"-1px":.5,mr:m==="pill"?.5:0},children:[j.label,D&&u.jsx(S.Box,{sx:{width:6,height:6,borderRadius:"50%",bgcolor:"#ef4444",flexShrink:0}})]},j.id)})}),u.jsxs(S.Box,{sx:{p:2,flex:v==="fixed"?1:void 0,overflowY:v==="fixed"?"auto":void 0},children:[u.jsx(S.Box,{className:"ff-form-row",children:E.fields.map((j,M)=>{const w=j.id??j.name??"",G=`${e?`${e}.${E.id}`:E.id}.${w}`;return u.jsxs(S.Box,{sx:{position:"relative",width:"100%"},children:[p&&u.jsx(S.Box,{component:"button",type:"button",onClick:()=>p.removeFieldFromTab(x,E.id,M),title:"Remove field",sx:{position:"absolute",top:4,right:4,zIndex:10,width:18,height:18,borderRadius:"50%",border:"none",background:"#fee2e2",color:"#dc2626",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",opacity:0,transition:"opacity .15s",".field-remove-wrapper:hover &":{opacity:1}},className:"field-remove-btn",children:u.jsx(U.MdClose,{size:11})}),l({field:j,pathPrefix:G,depth:n+1,values:i,errors:r,touched:s,setFieldValue:o,setFieldTouched:c,compact:a,inlineLabel:!1})]},G)})}),p&&u.jsxs(S.Box,{component:"button",type:"button",onClick:()=>p.openAddFieldDialog(x,E.id),sx:{mt:E.fields.length>0?1.5:0,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:.75,border:"1.5px dashed #c7d2fe",borderRadius:"8px",background:"none",cursor:"pointer",py:1.25,fontSize:13,fontWeight:600,color:"#6366f1",transition:"all .15s","&:hover":{borderColor:"#6366f1",bgcolor:"#f5f3ff"}},children:[u.jsx(U.MdAdd,{size:15})," Add field to ",E.label]})]})]})}const rc=[{value:"equals",label:"equals"},{value:"notEquals",label:"not equals"},{value:"contains",label:"contains"},{value:"notContains",label:"not contains"},{value:"startsWith",label:"starts with"},{value:"endsWith",label:"ends with"},{value:"isPresent",label:"is present"},{value:"isNotPresent",label:"is not present"},{value:"greaterThan",label:"greater than"},{value:"lessThan",label:"less than"},{value:"greaterOrEquals",label:"greater or equal"},{value:"lessOrEquals",label:"less or equal"}],ic=new Set(["isPresent","isNotPresent","isEmpty","isNotEmpty"]),rr={textTransform:"none",fontSize:12,fontWeight:500,minWidth:0,color:"#111827",bgcolor:"#f9fafb",borderRadius:"6px",boxShadow:"none","&:hover":{bgcolor:"#f3f4f6",boxShadow:"none"},"& .MuiButton-startIcon":{mr:1.25,ml:0,color:"#111827","& svg":{fontSize:17}}};function Di(t){return t.type==="group"}function ir(){return{field:"",fieldLabel:"",operator:"equals",value:"",connector:"and"}}function or(t){return!ic.has(t)}function Pi(t){return t.reduce((e,n)=>e+(Di(n)?Pi(n.entries):1),0)}function oc({connector:t,onChange:e}){return u.jsx(S.Box,{sx:{display:"flex",gap:"2px"},children:["and","or"].map(n=>u.jsx(S.Box,{component:"button",type:"button",onClick:()=>e(n),"aria-pressed":t===n,"aria-label":n==="and"?"AND — all conditions must match":"OR — any condition must match",sx:{border:"1px solid",borderRadius:"4px",fontSize:10,fontWeight:700,px:"6px",py:"1px",cursor:"pointer",textTransform:"uppercase",letterSpacing:.6,lineHeight:"18px",...t===n?{bgcolor:"#f1f5f9",color:"#374151",borderColor:"#94a3b8"}:{bgcolor:"transparent",color:"#cbd5e1",borderColor:"#e2e8f0"}},children:n},n))})}function sc({colDef:t,entry:e,onChange:n,cellId:i}){const[r,s]=g.useState({}),o=t.id==="value"&&!or(e.operator);if(t.type==="operator"){const a=q.get("select");return a?u.jsx(a,{field:{id:i,name:i,type:"select",options:rc,label:void 0,placeholder:"Operator…",compact:!0},value:e.operator??"",values:{},onChange:l=>{const d=String(l??"");n({operator:d,...!or(d)&&{value:""}})},onBlur:()=>{},error:void 0,touched:!1,formulaConfig:r,onFormulaConfigChange:s}):null}const c=q.get(t.type);return c?u.jsx(c,{field:{...t,id:i,name:i,disabled:o,placeholder:o?"Not required":t.placeholder,label:void 0,compact:!0},value:e[t.id]??"",values:{},onChange:a=>n({[t.id]:a}),onBlur:()=>{},error:void 0,touched:!1,formulaConfig:r,onFormulaConfigChange:s}):null}function ac({node:t,conditionDef:e,depth:n,fieldPath:i,onUpdate:r,onRemove:s}){const[o,c]=g.useState(!1),a=Pi(t.entries);return u.jsxs(S.Box,{sx:{border:"1px solid #e9e9e9",borderLeft:"3px solid #d1d5db",borderRadius:"6px",bgcolor:"#f9fafb",overflow:"hidden"},children:[u.jsxs(S.Box,{sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:"5px",borderBottom:o?"none":"1px solid #f0f0f0",cursor:"pointer",userSelect:"none"},onClick:()=>c(l=>!l),children:[u.jsx(S.Box,{sx:{color:"#94a3b8",display:"flex",alignItems:"center"},children:o?u.jsx(U.MdKeyboardArrowRight,{size:15}):u.jsx(U.MdKeyboardArrowDown,{size:15})}),u.jsx(S.Typography,{sx:{fontSize:11,fontWeight:700,color:"#94a3b8",fontFamily:"monospace",letterSpacing:-1},children:"( )"}),u.jsxs(S.Typography,{sx:{fontSize:11,color:"#64748b"},children:["Group",o&&u.jsxs(S.Box,{component:"span",sx:{ml:.5,color:"#94a3b8"},children:["· ",a," condition",a!==1?"s":""]})]}),u.jsx(S.Box,{sx:{ml:"auto"},onClick:l=>l.stopPropagation(),children:u.jsx(S.Tooltip,{title:"Remove group",children:u.jsx(S.Box,{component:"button",type:"button",onClick:s,sx:{background:"none",border:"none",cursor:"pointer",display:"flex",alignItems:"center",p:"2px"},children:u.jsx(U.MdDeleteOutline,{size:16,color:"#ef4444"})})})})]}),u.jsx(S.Collapse,{in:!o,children:u.jsx(S.Box,{sx:{p:1,pt:.5},children:u.jsx(Ni,{conditionDef:e,entries:t.entries,onUpdate:r,depth:n+1,fieldPath:i})})})]})}function Ni({conditionDef:t,entries:e,onUpdate:n,depth:i=0,fieldPath:r="cond"}){const s=t.allowGroups===!0&&(t.maxGroupDepth==null||i<t.maxGroupDepth),o=()=>n([...e,ir()]),c=()=>n([...e,{type:"group",connector:"and",entries:[ir()]}]),a=h=>n(e.filter((p,x)=>x!==h)),l=(h,p)=>n(e.map((x,m)=>m===h?{...x,connector:p}:x)),d=(h,p)=>n(e.map((x,m)=>m===h?{...x,...p}:x)),f=(h,p)=>n(e.map((x,m)=>m===h?{...x,entries:p}:x));return u.jsxs(S.Box,{sx:{mt:i===0?.75:.25},children:[e.map((h,p)=>u.jsxs(S.Box,{children:[p>0&&u.jsx(S.Box,{sx:{display:"flex",alignItems:"center",my:"8px"},children:u.jsx(oc,{connector:h.connector??"and",onChange:x=>l(p,x)})}),Di(h)?u.jsx(ac,{node:h,conditionDef:t,depth:i,fieldPath:`${r}__g${p}`,onUpdate:x=>f(p,x),onRemove:()=>a(p)}):u.jsxs(S.Box,{children:[p===0&&u.jsx(S.Typography,{sx:{fontSize:11,fontWeight:700,color:"#64748b",mb:.5},children:"When"}),u.jsxs(S.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[u.jsx(S.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:.75,flex:1},children:t.fields.map(x=>u.jsx(S.Box,{sx:{gridColumn:`span ${x.colSpan??4}`},children:u.jsx(sc,{colDef:x,entry:h,onChange:m=>d(p,m),cellId:`${r}__${p}__${x.id}`})},x.id))}),u.jsx(S.Tooltip,{title:"Remove condition",children:u.jsx(S.Box,{component:"button",type:"button",onClick:()=>a(p),"aria-label":"Remove condition",sx:{background:"none",border:"none",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",p:"3px"},children:u.jsx(U.MdDeleteOutline,{size:17,color:"#ef4444","aria-hidden":"true"})})})]})]})]},p)),u.jsxs(S.Box,{sx:{display:"flex",alignItems:"center",gap:1,mt:e.length>0?1:0},children:[u.jsx(S.Button,{variant:"contained",startIcon:u.jsx(U.MdAdd,{}),onClick:o,"data-testid":"add-condition-button",className:"ff-form-text-capitalize ff-form-text-12 ff-form-text-dark ff-form-shadow-none ff-form-bg-light",disableElevation:!0,sx:rr,children:"Add"}),s&&u.jsx(S.Button,{variant:"contained",startIcon:u.jsx(U.MdAdd,{}),onClick:c,"data-testid":"add-group-button",disableElevation:!0,sx:rr,children:"Add Group"})]})]})}const sr=()=>{},Mi=g.createContext({formulaConfig:{},onFormulaConfigChange:sr,conditionConfig:{},onConditionConfigChange:sr});function Nt({formulaConfig:t,onFormulaConfigChange:e,conditionConfig:n,onConditionConfigChange:i,children:r}){return u.jsx(Mi.Provider,{value:{formulaConfig:t,onFormulaConfigChange:e,conditionConfig:n,onConditionConfigChange:i},children:r})}function lc(){return g.useContext(Mi)}function rt(t,e){return e.split(".").reduce((n,i)=>{if(!(n==null||typeof n!="object"))return n[i]},t)}function uc({onValuesChange:t}){const{values:e}=ot.useFormikContext();return g.useEffect(()=>{t(e)},[e,t]),null}function cc({onValidityChange:t}){const{isValid:e}=ot.useFormikContext();return g.useEffect(()=>{t(e)},[e,t]),null}function Li(t){var i;if("form"in t&&t.form){const{form:r}=t,s={formulaConfig:r._formulaConfig,onFormulaConfigChange:r._onFormulaConfigChange,conditionConfig:r._conditionConfig,onConditionConfigChange:r._onConditionConfigChange};return u.jsx(Nt,{...s,children:u.jsx(ar,{schema:r._schema,formik:r._formik})})}const e={formulaConfig:t.formulaConfig??{},onFormulaConfigChange:t.onFormulaConfigChange??(()=>{}),conditionConfig:t.conditionConfig??{},onConditionConfigChange:t.onConditionConfigChange??(()=>{})},n=t.formik?u.jsx(Nt,{...e,children:u.jsx(ar,{schema:t.schema,formik:t.formik})}):u.jsx(ot.Formik,{initialValues:t.initialValues,onSubmit:t.onSubmit,validationSchema:t.validationSchema??((i=t.schema)!=null&&i.fields?vn(t.schema.fields):void 0),initialTouched:t.initialTouched,validateOnMount:!!t.initialTouched,enableReinitialize:!0,validateOnChange:!0,validateOnBlur:!0,children:({values:r,errors:s,touched:o,isSubmitting:c,setFieldValue:a,setFieldTouched:l})=>{var d;return u.jsxs(ot.Form,{id:t.formId,children:[t.onValuesChange&&u.jsx(uc,{onValuesChange:t.onValuesChange}),t.onValidityChange&&u.jsx(cc,{onValidityChange:t.onValidityChange}),u.jsx(Nt,{...e,children:u.jsx(ki,{schema:t.schema,values:r,errors:s,touched:o,setFieldValue:a,setFieldTouched:l})}),(d=t.children)==null?void 0:d.call(t,{isSubmitting:c})]})}});return t.variableGroups?u.jsx(mr,{groups:t.variableGroups,children:n}):n}function ar({schema:t,formik:e}){return u.jsx(ki,{schema:t,values:e.values,errors:e.errors,touched:e.touched,setFieldValue:e.setFieldValue,setFieldTouched:e.setFieldTouched})}class dc extends g.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromError(e){return{error:e.message}}render(){return this.state.error?null:this.props.children}}function ki({schema:t,values:e,errors:n,touched:i,setFieldValue:r,setFieldTouched:s}){const c=(t.layout??"flat")==="flat"?t.fields??[]:[],a=t.compact??!1;return u.jsx("div",{className:"ff-form-grid",children:c.map(l=>{const d=xn(l);return u.jsx(dc,{fieldId:d,children:u.jsx(it,{field:l,pathPrefix:d,depth:0,values:e,errors:n,touched:i,setFieldValue:r,setFieldTouched:s,compact:a})},d)})})}function it({field:t,pathPrefix:e,depth:n=0,values:i,errors:r,touched:s,setFieldValue:o,setFieldTouched:c,compact:a,inlineLabel:l}){var m;const{formulaConfig:d,onFormulaConfigChange:f,conditionConfig:h,onConditionConfigChange:p}=lc(),x={values:i};return((m=t.shouldHide)==null?void 0:m.call(t,x))??t.hidden?null:t.type==="object"?u.jsx(ze,{field:t,compact:a,children:u.jsx(ec,{field:t,pathPrefix:e,depth:n,values:i,errors:r,touched:s,setFieldValue:o,setFieldTouched:c,compact:a,renderFieldRouter:b=>u.jsx(it,{field:b.field,pathPrefix:b.pathPrefix,depth:b.depth,values:b.values,errors:b.errors,touched:b.touched,setFieldValue:b.setFieldValue,setFieldTouched:b.setFieldTouched,compact:b.compact,inlineLabel:b.inlineLabel},b.pathPrefix)})}):t.type==="array"&&Array.isArray(t.children??t.itemFields)?u.jsx(ze,{field:t,compact:a,children:u.jsx(vt,{field:t,value:rt(i,e),values:i,onChange:b=>o(e,b),onBlur:()=>c(e,!0),pathPrefix:e,depth:n,compact:a,parentErrors:r,parentTouched:s,parentSetFieldValue:o,parentSetFieldTouched:c,renderFieldRouter:b=>u.jsx(it,{field:b.field,pathPrefix:b.pathPrefix,depth:b.depth,values:b.values,errors:b.errors,touched:b.touched,setFieldValue:b.setFieldValue,setFieldTouched:b.setFieldTouched,compact:b.compact,inlineLabel:b.inlineLabel},b.pathPrefix)})}):t.type==="tabs"?u.jsx(ze,{field:t,compact:a,children:u.jsx(nc,{field:t,pathPrefix:e,depth:n,values:i,errors:r,touched:s,setFieldValue:o,setFieldTouched:c,compact:a,renderFieldRouter:b=>u.jsx(it,{field:b.field,pathPrefix:b.pathPrefix,depth:b.depth,values:b.values,errors:b.errors,touched:b.touched,setFieldValue:b.setFieldValue,setFieldTouched:b.setFieldTouched,compact:b.compact,inlineLabel:b.inlineLabel},b.pathPrefix)})}):u.jsx(fc,{field:t,pathPrefix:e,values:i,errors:r,touched:s,setFieldValue:o,setFieldTouched:c,compact:a,inlineLabel:l,formulaConfig:d,onFormulaConfigChange:f,conditionConfig:h,onConditionConfigChange:p})}function fc({field:t,pathPrefix:e,values:n,errors:i,touched:r,setFieldValue:s,setFieldTouched:o,compact:c,inlineLabel:a,formulaConfig:l,onFormulaConfigChange:d,conditionConfig:f,onConditionConfigChange:h}){var w,D,G;const p={values:n},x=rt(n,e),m=g.useRef(t.compute);m.current=t.compute,g.useEffect(()=>{const N=m.current;if(!N)return;const V=N({values:n});V!==x&&s(e,V)},[n,x,e,s]);const b=q.get(t.type);if(!b)return null;const v=typeof t.disabled=="function"?t.disabled(p):((w=t.shouldDisable)==null?void 0:w.call(t,p))??t.disabled??!1,A=rt(i,e),y=!!rt(r,e),I=(D=t.compute)==null?void 0:D.call(t,p),C=I!==void 0?I:x,F=(G=t.transform)!=null&&G.in?t.transform.in(C):C,E=N=>{var Z,J;if(t.compute)return;const V=(Z=t.transform)!=null&&Z.out?t.transform.out(N):N;s(e,V),o(e,!0),(J=t.onChange)==null||J.call(t,V,{values:n,setFieldValue:s})},B=t.condition&&f?f[e]??[]:[],j=N=>{if(!(!h||!f))if(N.length===0){const V={...f};delete V[e],h(V)}else h({...f,[e]:N})},M={field:{...t,disabled:v,id:e,name:e},value:F,values:n,onChange:E,onBlur:()=>o(e,!0),error:A,touched:y,formulaConfig:l,onFormulaConfigChange:d};return a?u.jsx(b,{...M,inlineLabel:!0}):u.jsxs(ze,{field:t,compact:c,children:[u.jsx(b,{...M,touched:y}),t.condition&&u.jsx(Ni,{conditionDef:t.condition,entries:B,onUpdate:j,fieldPath:e})]})}const pc=Li;exports.DynamicFormRenderer=pc;exports.FF=R;exports.FlowForgeRegistry=Gi;exports.FlowForm=Li;exports.FormulaInput=sn;exports.InfiniteSelectField=ui;exports.TablePickerField=Bi;exports.TabsEditContext=Vi;exports.VariablePicker=go;exports.VariablePickerProvider=mr;exports._extends=H;exports._objectWithoutPropertiesLoose=Rr;exports.astHasRefs=io;exports.astToTokens=Kt;exports.buildEvaluationPayload=Ki;exports.buildFieldConfig=qt;exports.buildFormulaPath=$i;exports.buildSelectStyles=Qt;exports.buildValidationSchema=vn;exports.commonjsGlobal=tu;exports.dataSourceRegistry=Ti;exports.errorTextStyle=se;exports.extractLabel=ur;exports.fieldRegistry=q;exports.getDefaultExportFromCjs=ci;exports.hasFormulaTokens=ro;exports.helperTextStyle=ie;exports.inputStyle=Zi;exports.isFormula=oo;exports.parseToAST=Ce;exports.resolveFieldKey=xn;exports.serializeAST=ye;exports.serializeASTAsConfig=He;exports.serializeConditionExpressions=no;exports.stripFormulaTokens=lo;exports.tokenize=gr;exports.unwrapFormula=ao;exports.useVariablePickerContext=Pe;exports.wrapFormula=so;