@lax-wp/design-system 0.3.74 → 0.3.76
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.
- package/dist/index.es.js +3 -2
- package/dist/index.umd.js +2 -2
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1409,7 +1409,7 @@ const Jn = {
|
|
|
1409
1409
|
{
|
|
1410
1410
|
size: 12,
|
|
1411
1411
|
fill: E,
|
|
1412
|
-
className: "cursor-pointer"
|
|
1412
|
+
className: "cursor-pointer text-primary-600 dark:text-primary-400"
|
|
1413
1413
|
}
|
|
1414
1414
|
)
|
|
1415
1415
|
}
|
|
@@ -4046,7 +4046,8 @@ const Yg = /* @__PURE__ */ ln(Zg), Jg = (e) => Array.isArray(e) ? e.map((t) => t
|
|
|
4046
4046
|
onMouseDown: Be,
|
|
4047
4047
|
onClick: F ? void 0 : te,
|
|
4048
4048
|
isHashColor: !0,
|
|
4049
|
-
removable: !0
|
|
4049
|
+
removable: !0,
|
|
4050
|
+
onRemove: te
|
|
4050
4051
|
}
|
|
4051
4052
|
) });
|
|
4052
4053
|
},
|
package/dist/index.umd.js
CHANGED
|
@@ -46,7 +46,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
46
46
|
-webkit-text-fill-color: white !important;
|
|
47
47
|
-webkit-box-shadow: 0 0 0px 1000px var(--input-bg-color) inset !important;
|
|
48
48
|
}
|
|
49
|
-
`}),h?f.jsx("label",{htmlFor:k,className:"mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",children:f.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:f.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:f.jsxs(se,{variant:"medium",size:"extra-small",appearance:"subtitle",children:[h,d&&f.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})})}):null,f.jsxs("div",{className:"relative input-field",children:[f.jsx("input",{...y,ref:C,id:k,type:m,value:t,defaultValue:o,placeholder:p,required:d,disabled:s,max:u,min:c,onKeyDown:r,style:F(),className:Z("border border-solid h-8 rounded-md block w-full pl-3","text-sm font-medium text-neutral-900 dark:text-black-100","bg-white dark:bg-black-600","transition-colors duration-200 ease-in-out","focus:outline-none focus:ring-2",z(),s&&"opacity-70 cursor-not-allowed bg-neutral-50 dark:bg-black-700",v),onChange:N=>n(N.target.value),onClick:N=>N.stopPropagation()}),g&&f.jsx("div",{ref:M,className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:g})]}),f.jsx(We.AnimatePresence,{children:i&&f.jsx(We.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:f.jsx(se,{className:Z("mt-1",I()),appearance:"custom",size:"extra-small",variant:"medium",children:i})})})]})});La.displayName="InputField";const Zp=(e,t,n,r)=>{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);Kn(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},Cu={},Ta=(e,t,n,r)=>{Kn(n)&&Cu[n]||(Kn(n)&&(Cu[n]=new Date),Zp(e,t,n,r))},ku=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Ba=(e,t,n)=>{e.loadNamespaces(t,ku(e,n))},Iu=(e,t,n,r)=>{if(Kn(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Ba(e,n,r);n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,ku(e,r))},Jp=(e,t,n={})=>!t.languages||!t.languages.length?(Ta(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),Kn=e=>typeof e=="string",Kp=e=>typeof e=="object"&&e!==null,qp=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Qp={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Rp=e=>Qp[e];let e6={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(qp,Rp)};const t6=()=>e6;let n6;const r6=()=>n6,i6=l.createContext();class l6{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const a6=(e,t)=>{const n=l.useRef();return l.useEffect(()=>{n.current=e},[e,t]),n.current},zu=(e,t,n,r)=>e.getFixedT(t,n,r),o6=(e,t,n,r)=>l.useCallback(zu(e,t,n,r),[e,t,n,r]),tn=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:i}=l.useContext(i6)||{},a=n||r||r6();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new l6),!a){Ta(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const M=(w,z)=>Kn(z)?z:Kp(z)&&Kn(z.defaultValue)?z.defaultValue:Array.isArray(w)?w[w.length-1]:w,E=[M,{},!1];return E.t=M,E.i18n={},E.ready=!1,E}a.options.react?.wait&&Ta(a,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...t6(),...a.options.react,...t},{useSuspense:s,keyPrefix:u}=o;let c=i||a.options?.defaultNS;c=Kn(c)?[c]:c||["translation"],a.reportNamespaces.addUsedNamespaces?.(c);const d=(a.isInitialized||a.initializedStoreOnce)&&c.every(M=>Jp(M,a,o)),h=o6(a,t.lng||null,o.nsMode==="fallback"?c:c[0],u),m=()=>h,p=()=>zu(a,t.lng||null,o.nsMode==="fallback"?c:c[0],u),[g,b]=l.useState(m);let v=c.join();t.lng&&(v=`${t.lng}${v}`);const x=a6(v),y=l.useRef(!0);l.useEffect(()=>{const{bindI18n:M,bindI18nStore:E}=o;y.current=!0,!d&&!s&&(t.lng?Iu(a,t.lng,c,()=>{y.current&&b(p)}):Ba(a,c,()=>{y.current&&b(p)})),d&&x&&x!==v&&y.current&&b(p);const w=()=>{y.current&&b(p)};return M&&a?.on(M,w),E&&a?.store.on(E,w),()=>{y.current=!1,a&&M&&M?.split(" ").forEach(z=>a.off(z,w)),E&&a&&E.split(" ").forEach(z=>a.store.off(z,w))}},[a,v]),l.useEffect(()=>{y.current&&d&&b(m)},[a,u,d]);const C=[g,a,d];if(C.t=g,C.i18n=a,C.ready=d,d||!d&&!s)return C;throw new Promise(M=>{t.lng?Iu(a,t.lng,c,()=>M()):Ba(a,c,()=>M())})},Vt=({size:e=16,className:t="",...n})=>f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`text-neutral-500 hover:text-neutral-700 ${t}`,...n,children:[f.jsx("circle",{cx:"12",cy:"12",r:"10"}),f.jsx("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),f.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),Fu=l.forwardRef(({size:e=24,fill:t="currentColor",className:n,...r},i)=>f.jsx("svg",{ref:i,className:Z(n),width:e,height:e,viewBox:"0 0 20 20",fill:t,xmlns:"http://www.w3.org/2000/svg",...r,children:f.jsx("path",{d:"M10.0002 11.1666L5.91683 15.2499C5.76405 15.4027 5.56961 15.4791 5.3335 15.4791C5.09739 15.4791 4.90294 15.4027 4.75016 15.2499C4.59738 15.0971 4.521 14.9027 4.521 14.6666C4.521 14.4305 4.59738 14.236 4.75016 14.0833L8.8335 9.99992L4.75016 5.91659C4.59738 5.76381 4.521 5.56936 4.521 5.33325C4.521 5.09714 4.59738 4.9027 4.75016 4.74992C4.90294 4.59714 5.09739 4.52075 5.3335 4.52075C5.56961 4.52075 5.76405 4.59714 5.91683 4.74992L10.0002 8.83325L14.0835 4.74992C14.2363 4.59714 14.4307 4.52075 14.6668 4.52075C14.9029 4.52075 15.0974 4.59714 15.2502 4.74992C15.4029 4.9027 15.4793 5.09714 15.4793 5.33325C15.4793 5.56936 15.4029 5.76381 15.2502 5.91659L11.1668 9.99992L15.2502 14.0833C15.4029 14.236 15.4793 14.4305 15.4793 14.6666C15.4793 14.9027 15.4029 15.0971 15.2502 15.2499C15.0974 15.4027 14.9029 15.4791 14.6668 15.4791C14.4307 15.4791 14.2363 15.4027 14.0835 15.2499L10.0002 11.1666Z"})}));Fu.displayName="CloseIcon";const On={primary:{50:"#E6F1FC",100:"#C6E1F9",200:"#8AC0F2",300:"#54A4EC",400:"#3392E9",500:"#0077E3",600:"#016DCF",700:"#0054A1",800:"#00417D",900:"#00325F",950:"#001c35",975:"#00111f"},black:{50:"#f0f0f0",100:"#d9d9d9",200:"#bfbfbf",300:"#8c8c8c",400:"#595959",500:"#454545",600:"#262626",700:"#1f1f1f",800:"#141414",900:"#000000",950:"#0a0a0a",975:"#050505"},blue:{50:"#E6F1FC",100:"#C6E1F9",200:"#8AC0F2",300:"#54A4EC",400:"#3392E9",500:"#0077E3",600:"#016DCF",700:"#0054A1",800:"#00417D",900:"#00325F",950:"#002547",975:"#001529"},success:{50:"#ECFDF3",100:"#D1FADF",200:"#A6F4C5",300:"#6CE9A6",400:"#32D583",500:"#12B76A",600:"#039855",700:"#027A48",800:"#05603A",900:"#054F31",950:"#033625",975:"#022419"},neutral:{50:"#F9FAFB",100:"#F2F4F7",200:"#EAECF0",300:"#D0D5DD",400:"#98A2B3",500:"#667085",600:"#475467",700:"#344054",800:"#1D2939",900:"#101828",950:"#0c1219",975:"#080a0f"},error:{50:"#FEF3F2",100:"#FEE4E2",200:"#FECDCA",300:"#FDA29B",400:"#F97066",500:"#F04438",600:"#D92D20",700:"#B42318",800:"#912018",900:"#7A271A",950:"#3d1008",975:"#2a0b05"},warning:{50:"#FFFAEB",100:"#FEF0C7",200:"#FEDF89",300:"#FEC84B",400:"#FDB022",500:"#F79009",600:"#DC6803",700:"#B54708",800:"#93370D",900:"#7A2E0E",950:"#662505",975:"#451803"},teal:{50:"#ebf5f5",100:"#c2e0df",200:"#a4d1d0",300:"#7abcba",400:"#61afad",500:"#399b98",600:"#348d8a",700:"#286e6c",800:"#1f5554",900:"#184140",950:"#133534",975:"#0c2222"},green:{50:"#f2f7f2",100:"#d5e5d5",200:"#c1d9c1",300:"#a5c7a5",400:"#94bd93",500:"#79ac78",600:"#6e9d6d",700:"#567a55",800:"#435f42",900:"#334832",950:"#001e00",975:"#182818"},yellow:{50:"#fffaed",100:"#fff0c7",200:"#ffe8ac",300:"#ffde86",400:"#ffd76f",500:"#ffcd4b",600:"#e8bb44",700:"#b59235",800:"#8c7129",900:"#6b5620",950:"#524314",975:"#382e0e"},orange:{50:"#fef4e8",100:"#fddeb7",200:"#fcce94",300:"#fbb764",400:"#faa945",500:"#f99417",600:"#e38715",700:"#b16910",800:"#89510d",900:"#693e0a",950:"#4d2d07",975:"#331e05"},peach:{50:"#fceef3",100:"#f5cad9",200:"#f0b0c6",300:"#ea8cad",400:"#e5759d",500:"#df5384",600:"#cb4c78",700:"#9e3b5e",800:"#7b2e49",900:"#5e2337",950:"#451a2b",975:"#2e111d"},red:{50:"#fceaeb",100:"#f6bec0",200:"#f29ea2",300:"#ec7278",400:"#e9575d",500:"#e32d35",600:"#cf2930",700:"#a12026",800:"#7d191d",900:"#5f1316",950:"#470c0f",975:"#2f080a"},purple:{50:"#f5e7ff",100:"#dfb4ff",200:"#d090ff",300:"#bb5dff",400:"#ad3dff",500:"#990dff",600:"#8b0ce8",700:"#6d09b5",800:"#54078c",900:"#40056b",950:"#300450",975:"#200336"},navy:{50:"#eaebf6",100:"#bebfe2",200:"#9ea1d3",300:"#7276bf",400:"#575bb3",500:"#2d32a0",600:"#292e92",700:"#202472",800:"#191c58",900:"#131543",950:"#0d0e2f",975:"#090a20"},grey:{50:"#f2f2f2",100:"#d5d5d5",200:"#c1c1c1",300:"#a5a5a5",400:"#939393",500:"#787878",600:"#6d6d6d",700:"#555555",800:"#424242",900:"#323232",950:"#252525",975:"#191919"}},s6=e=>{let t=0;for(let i=0;i<e.length;i++)t=e.charCodeAt(i)+((t<<5)-t);const n=(t&16777215).toString(16).toUpperCase();return`#${"00000".substring(0,6-n.length)+n}`},Ha=(e,t=80)=>{let n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16);return n=Math.min(255,n+(255-n)*(t/100)),r=Math.min(255,r+(255-r)*(t/100)),i=Math.min(255,i+(255-i)*(t/100)),`#${Math.round(n).toString(16).padStart(2,"0")}${Math.round(r).toString(16).padStart(2,"0")}${Math.round(i).toString(16).padStart(2,"0")}`},Mu=(e,t=30)=>{let n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16);return n=Math.max(0,n*(1-t/100)),r=Math.max(0,r*(1-t/100)),i=Math.max(0,i*(1-t/100)),`#${Math.round(n).toString(16).padStart(2,"0")}${Math.round(r).toString(16).padStart(2,"0")}${Math.round(i).toString(16).padStart(2,"0")}`},u6=(e,t)=>({background:t?On[e]?.[975]:On[e]?.[50],borderColor:t?On[e]?.[900]:On[e]?.[100],color:t?On[e]?.[500]:On[e]?.[600]}),c6=(e,t)=>{const n=e.startsWith("#")?e:s6(e);return{background:t?Mu(n,80):Ha(n,90),borderColor:t?Mu(n,40):Ha(n,50),color:t?Ha(n,40):n}},d6=e=>({background:e?"#2D3748":"#F7FAFC",borderColor:e?"#4A5568":"#E2E8F0",color:e?"#A0AEC0":"#4A5568"}),f6=e=>{switch(e){case"xs":return"text-xs px-1 py-0.5";case"lg":return"text-sm px-2.5 py-1.5";case"md":return"text-sm px-2 py-1";default:return"text-xs px-1.5 py-0.5"}},h6=(e,t,n,r)=>e?n?t.color:On[e]?.[500]||t.color:r?"#A0AEC0":"#4A5568",fr=l.forwardRef(({label:e,color:t,size:n="sm",className:r,onClick:i,onMouseDown:a,truncate:o,isHashColor:s=!1,icon:u,removable:c=!1,onRemove:d,onUpload:h,acceptsUpload:m=!1,theme:p="light","aria-label":g},b)=>{const v=p==="dark",x=()=>t?t in On?u6(t,v):c6(t,v):d6(v),y=w=>{const z=w.target.files?.[0];z&&h&&h(z),w.target.value=""},C=w=>{(w.key==="Enter"||w.key===" ")&&(i||m)&&(w.preventDefault(),i&&i(w))},M=x(),E=h6(t,M,s,v);return f.jsx("div",{ref:b,className:Z("inline-flex items-center border rounded-md transition-colors bg-primary-50 border-primary-100 text-primary-600 dark:bg-primary-900 dark:border-primary-800 dark:text-primary-400",f6(n),(i||m)&&"cursor-pointer hover:opacity-80",r),onMouseDown:a,onClick:i,onKeyDown:C,"aria-label":g||`Tag: ${e}`,role:"button",tabIndex:i||m?0:void 0,children:f.jsxs("div",{className:"flex items-center gap-0.5 truncate w-full overflow-hidden",children:[u,o?f.jsx("p",{title:e,className:`text-${n} ${i||m?"cursor-pointer":""}`,children:e.length>o?`${e.slice(0,o)}...`:e}):f.jsx("p",{className:`text-${n}`,children:e}),m&&f.jsx("input",{type:"file",onChange:y,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer","aria-label":`Upload file for ${e}`}),c&&d&&f.jsx("button",{onClick:d,className:"ml-1 flex-shrink-0","aria-label":`Remove ${e}`,type:"button",children:f.jsx(Fu,{size:12,fill:E,className:"cursor-pointer"})})]})})});fr.displayName="Tag";const St=({labels:e=[]})=>{const t=[],n=[];return e.forEach(r=>{typeof r=="string"&&!t.includes(r)?t.push(r):typeof r!="string"&&!n.some(i=>i.label===r.label)&&n.push(r)}),f.jsxs(f.Fragment,{children:[t?.map(r=>f.jsx(fr,{size:"xs",label:r,color:"primary"},r)),n?.map((r,i)=>f.jsx(fr,{size:"xs",label:r?.label,color:r?.color},r?.id||i))]})};function Su(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ve(){return ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ve.apply(null,arguments)}var Au=function(t){return t.reduce(function(n,r){var i=r[0],a=r[1];return n[i]=a,n},{})},Nu=typeof window<"u"&&window.document&&window.document.createElement?de.useLayoutEffect:de.useEffect,yt="top",Gt="bottom",_t="right",Et="left",ja="auto",Ur=[yt,Gt,_t,Et],hr="start",Xr="end",m6="clippingParents",Du="viewport",Yr="popper",p6="reference",Lu=Ur.reduce(function(e,t){return e.concat([t+"-"+hr,t+"-"+Xr])},[]),Tu=[].concat(Ur,[ja]).reduce(function(e,t){return e.concat([t,t+"-"+hr,t+"-"+Xr])},[]),g6="beforeRead",v6="read",b6="afterRead",x6="beforeMain",w6="main",y6="afterMain",E6="beforeWrite",C6="write",k6="afterWrite",I6=[g6,v6,b6,x6,w6,y6,E6,C6,k6];function nn(e){return e?(e.nodeName||"").toLowerCase():null}function At(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function qn(e){var t=At(e).Element;return e instanceof t||e instanceof Element}function $t(e){var t=At(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Pa(e){if(typeof ShadowRoot>"u")return!1;var t=At(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function z6(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},a=t.elements[n];!$t(a)||!nn(a)||(Object.assign(a.style,r),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function F6(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],a=t.attributes[r]||{},o=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=o.reduce(function(u,c){return u[c]="",u},{});!$t(i)||!nn(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(u){i.removeAttribute(u)}))})}}const M6={name:"applyStyles",enabled:!0,phase:"write",fn:z6,effect:F6,requires:["computeStyles"]};function rn(e){return e.split("-")[0]}var Qn=Math.max,Ri=Math.min,mr=Math.round;function Oa(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Bu(){return!/^((?!chrome|android).)*safari/i.test(Oa())}function pr(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&$t(e)&&(i=e.offsetWidth>0&&mr(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&mr(r.height)/e.offsetHeight||1);var o=qn(e)?At(e):window,s=o.visualViewport,u=!Bu()&&n,c=(r.left+(u&&s?s.offsetLeft:0))/i,d=(r.top+(u&&s?s.offsetTop:0))/a,h=r.width/i,m=r.height/a;return{width:h,height:m,top:d,right:c+h,bottom:d+m,left:c,x:c,y:d}}function Va(e){var t=pr(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Hu(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Pa(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function gn(e){return At(e).getComputedStyle(e)}function S6(e){return["table","td","th"].indexOf(nn(e))>=0}function Vn(e){return((qn(e)?e.ownerDocument:e.document)||window.document).documentElement}function el(e){return nn(e)==="html"?e:e.assignedSlot||e.parentNode||(Pa(e)?e.host:null)||Vn(e)}function ju(e){return!$t(e)||gn(e).position==="fixed"?null:e.offsetParent}function A6(e){var t=/firefox/i.test(Oa()),n=/Trident/i.test(Oa());if(n&&$t(e)){var r=gn(e);if(r.position==="fixed")return null}var i=el(e);for(Pa(i)&&(i=i.host);$t(i)&&["html","body"].indexOf(nn(i))<0;){var a=gn(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function Zr(e){for(var t=At(e),n=ju(e);n&&S6(n)&&gn(n).position==="static";)n=ju(n);return n&&(nn(n)==="html"||nn(n)==="body"&&gn(n).position==="static")?t:n||A6(e)||t}function Ga(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Jr(e,t,n){return Qn(e,Ri(t,n))}function N6(e,t,n){var r=Jr(e,t,n);return r>n?n:r}function Pu(){return{top:0,right:0,bottom:0,left:0}}function Ou(e){return Object.assign({},Pu(),e)}function Vu(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var D6=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Ou(typeof t!="number"?t:Vu(t,Ur))};function L6(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=rn(n.placement),u=Ga(s),c=[Et,_t].indexOf(s)>=0,d=c?"height":"width";if(!(!a||!o)){var h=D6(i.padding,n),m=Va(a),p=u==="y"?yt:Et,g=u==="y"?Gt:_t,b=n.rects.reference[d]+n.rects.reference[u]-o[u]-n.rects.popper[d],v=o[u]-n.rects.reference[u],x=Zr(a),y=x?u==="y"?x.clientHeight||0:x.clientWidth||0:0,C=b/2-v/2,M=h[p],E=y-m[d]-h[g],w=y/2-m[d]/2+C,z=Jr(M,w,E),I=u;n.modifiersData[r]=(t={},t[I]=z,t.centerOffset=z-w,t)}}function T6(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||Hu(t.elements.popper,i)&&(t.elements.arrow=i))}const B6={name:"arrow",enabled:!0,phase:"main",fn:L6,effect:T6,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function gr(e){return e.split("-")[1]}var H6={top:"auto",right:"auto",bottom:"auto",left:"auto"};function j6(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:mr(n*i)/i||0,y:mr(r*i)/i||0}}function Gu(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,u=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,h=e.isFixed,m=o.x,p=m===void 0?0:m,g=o.y,b=g===void 0?0:g,v=typeof d=="function"?d({x:p,y:b}):{x:p,y:b};p=v.x,b=v.y;var x=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),C=Et,M=yt,E=window;if(c){var w=Zr(n),z="clientHeight",I="clientWidth";if(w===At(n)&&(w=Vn(n),gn(w).position!=="static"&&s==="absolute"&&(z="scrollHeight",I="scrollWidth")),w=w,i===yt||(i===Et||i===_t)&&a===Xr){M=Gt;var k=h&&w===E&&E.visualViewport?E.visualViewport.height:w[z];b-=k-r.height,b*=u?1:-1}if(i===Et||(i===yt||i===Gt)&&a===Xr){C=_t;var F=h&&w===E&&E.visualViewport?E.visualViewport.width:w[I];p-=F-r.width,p*=u?1:-1}}var N=Object.assign({position:s},c&&H6),B=d===!0?j6({x:p,y:b},At(n)):{x:p,y:b};if(p=B.x,b=B.y,u){var H;return Object.assign({},N,(H={},H[M]=y?"0":"",H[C]=x?"0":"",H.transform=(E.devicePixelRatio||1)<=1?"translate("+p+"px, "+b+"px)":"translate3d("+p+"px, "+b+"px, 0)",H))}return Object.assign({},N,(t={},t[M]=y?b+"px":"",t[C]=x?p+"px":"",t.transform="",t))}function P6(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,s=n.roundOffsets,u=s===void 0?!0:s,c={placement:rn(t.placement),variation:gr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Gu(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Gu(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const O6={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:P6,data:{}};var tl={passive:!0};function V6(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,s=o===void 0?!0:o,u=At(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(d){d.addEventListener("scroll",n.update,tl)}),s&&u.addEventListener("resize",n.update,tl),function(){a&&c.forEach(function(d){d.removeEventListener("scroll",n.update,tl)}),s&&u.removeEventListener("resize",n.update,tl)}}const G6={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:V6,data:{}};var _6={left:"right",right:"left",bottom:"top",top:"bottom"};function nl(e){return e.replace(/left|right|bottom|top/g,function(t){return _6[t]})}var $6={start:"end",end:"start"};function _u(e){return e.replace(/start|end/g,function(t){return $6[t]})}function _a(e){var t=At(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function $a(e){return pr(Vn(e)).left+_a(e).scrollLeft}function W6(e,t){var n=At(e),r=Vn(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,u=0;if(i){a=i.width,o=i.height;var c=Bu();(c||!c&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:a,height:o,x:s+$a(e),y:u}}function U6(e){var t,n=Vn(e),r=_a(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=Qn(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Qn(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+$a(e),u=-r.scrollTop;return gn(i||n).direction==="rtl"&&(s+=Qn(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:u}}function Wa(e){var t=gn(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function $u(e){return["html","body","#document"].indexOf(nn(e))>=0?e.ownerDocument.body:$t(e)&&Wa(e)?e:$u(el(e))}function Kr(e,t){var n;t===void 0&&(t=[]);var r=$u(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),a=At(r),o=i?[a].concat(a.visualViewport||[],Wa(r)?r:[]):r,s=t.concat(o);return i?s:s.concat(Kr(el(o)))}function Ua(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function X6(e,t){var n=pr(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Wu(e,t,n){return t===Du?Ua(W6(e,n)):qn(t)?X6(t,n):Ua(U6(Vn(e)))}function Y6(e){var t=Kr(el(e)),n=["absolute","fixed"].indexOf(gn(e).position)>=0,r=n&&$t(e)?Zr(e):e;return qn(r)?t.filter(function(i){return qn(i)&&Hu(i,r)&&nn(i)!=="body"}):[]}function Z6(e,t,n,r){var i=t==="clippingParents"?Y6(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(u,c){var d=Wu(e,c,r);return u.top=Qn(d.top,u.top),u.right=Ri(d.right,u.right),u.bottom=Ri(d.bottom,u.bottom),u.left=Qn(d.left,u.left),u},Wu(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Uu(e){var t=e.reference,n=e.element,r=e.placement,i=r?rn(r):null,a=r?gr(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,u;switch(i){case yt:u={x:o,y:t.y-n.height};break;case Gt:u={x:o,y:t.y+t.height};break;case _t:u={x:t.x+t.width,y:s};break;case Et:u={x:t.x-n.width,y:s};break;default:u={x:t.x,y:t.y}}var c=i?Ga(i):null;if(c!=null){var d=c==="y"?"height":"width";switch(a){case hr:u[c]=u[c]-(t[d]/2-n[d]/2);break;case Xr:u[c]=u[c]+(t[d]/2-n[d]/2);break}}return u}function qr(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,u=s===void 0?m6:s,c=n.rootBoundary,d=c===void 0?Du:c,h=n.elementContext,m=h===void 0?Yr:h,p=n.altBoundary,g=p===void 0?!1:p,b=n.padding,v=b===void 0?0:b,x=Ou(typeof v!="number"?v:Vu(v,Ur)),y=m===Yr?p6:Yr,C=e.rects.popper,M=e.elements[g?y:m],E=Z6(qn(M)?M:M.contextElement||Vn(e.elements.popper),u,d,o),w=pr(e.elements.reference),z=Uu({reference:w,element:C,placement:i}),I=Ua(Object.assign({},C,z)),k=m===Yr?I:w,F={top:E.top-k.top+x.top,bottom:k.bottom-E.bottom+x.bottom,left:E.left-k.left+x.left,right:k.right-E.right+x.right},N=e.modifiersData.offset;if(m===Yr&&N){var B=N[i];Object.keys(F).forEach(function(H){var L=[_t,Gt].indexOf(H)>=0?1:-1,S=[yt,Gt].indexOf(H)>=0?"y":"x";F[H]+=B[S]*L})}return F}function J6(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,c=u===void 0?Tu:u,d=gr(r),h=d?s?Lu:Lu.filter(function(g){return gr(g)===d}):Ur,m=h.filter(function(g){return c.indexOf(g)>=0});m.length===0&&(m=h);var p=m.reduce(function(g,b){return g[b]=qr(e,{placement:b,boundary:i,rootBoundary:a,padding:o})[rn(b)],g},{});return Object.keys(p).sort(function(g,b){return p[g]-p[b]})}function K6(e){if(rn(e)===ja)return[];var t=nl(e);return[_u(e),t,_u(t)]}function q6(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!0:o,u=n.fallbackPlacements,c=n.padding,d=n.boundary,h=n.rootBoundary,m=n.altBoundary,p=n.flipVariations,g=p===void 0?!0:p,b=n.allowedAutoPlacements,v=t.options.placement,x=rn(v),y=x===v,C=u||(y||!g?[nl(v)]:K6(v)),M=[v].concat(C).reduce(function(X,K){return X.concat(rn(K)===ja?J6(t,{placement:K,boundary:d,rootBoundary:h,padding:c,flipVariations:g,allowedAutoPlacements:b}):K)},[]),E=t.rects.reference,w=t.rects.popper,z=new Map,I=!0,k=M[0],F=0;F<M.length;F++){var N=M[F],B=rn(N),H=gr(N)===hr,L=[yt,Gt].indexOf(B)>=0,S=L?"width":"height",T=qr(t,{placement:N,boundary:d,rootBoundary:h,altBoundary:m,padding:c}),G=L?H?_t:Et:H?Gt:yt;E[S]>w[S]&&(G=nl(G));var O=nl(G),_=[];if(a&&_.push(T[B]<=0),s&&_.push(T[G]<=0,T[O]<=0),_.every(function(X){return X})){k=N,I=!1;break}z.set(N,_)}if(I)for(var A=g?3:1,$=function(K){var ae=M.find(function(ee){var ue=z.get(ee);if(ue)return ue.slice(0,K).every(function(U){return U})});if(ae)return k=ae,"break"},W=A;W>0;W--){var D=$(W);if(D==="break")break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}}const Q6={name:"flip",enabled:!0,phase:"main",fn:q6,requiresIfExists:["offset"],data:{_skip:!1}};function Xu(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Yu(e){return[yt,_t,Gt,Et].some(function(t){return e[t]>=0})}function R6(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=qr(t,{elementContext:"reference"}),s=qr(t,{altBoundary:!0}),u=Xu(o,r),c=Xu(s,i,a),d=Yu(u),h=Yu(c);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const eg={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:R6};function tg(e,t,n){var r=rn(e),i=[Et,yt].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[Et,_t].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function ng(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=Tu.reduce(function(d,h){return d[h]=tg(h,t.rects,a),d},{}),s=o[t.placement],u=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=o}const rg={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ng};function ig(e){var t=e.state,n=e.name;t.modifiersData[n]=Uu({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const lg={name:"popperOffsets",enabled:!0,phase:"read",fn:ig,data:{}};function ag(e){return e==="x"?"y":"x"}function og(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!1:o,u=n.boundary,c=n.rootBoundary,d=n.altBoundary,h=n.padding,m=n.tether,p=m===void 0?!0:m,g=n.tetherOffset,b=g===void 0?0:g,v=qr(t,{boundary:u,rootBoundary:c,padding:h,altBoundary:d}),x=rn(t.placement),y=gr(t.placement),C=!y,M=Ga(x),E=ag(M),w=t.modifiersData.popperOffsets,z=t.rects.reference,I=t.rects.popper,k=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,F=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),N=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(w){if(a){var H,L=M==="y"?yt:Et,S=M==="y"?Gt:_t,T=M==="y"?"height":"width",G=w[M],O=G+v[L],_=G-v[S],A=p?-I[T]/2:0,$=y===hr?z[T]:I[T],W=y===hr?-I[T]:-z[T],D=t.elements.arrow,X=p&&D?Va(D):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Pu(),ae=K[L],ee=K[S],ue=Jr(0,z[T],X[T]),U=C?z[T]/2-A-ue-ae-F.mainAxis:$-ue-ae-F.mainAxis,J=C?-z[T]/2+A+ue+ee+F.mainAxis:W+ue+ee+F.mainAxis,ce=t.elements.arrow&&Zr(t.elements.arrow),Q=ce?M==="y"?ce.clientTop||0:ce.clientLeft||0:0,be=(H=N?.[M])!=null?H:0,je=G+U-be-Q,R=G+J-be,oe=Jr(p?Ri(O,je):O,G,p?Qn(_,R):_);w[M]=oe,B[M]=oe-G}if(s){var Ce,Qe=M==="x"?yt:Et,Re=M==="x"?Gt:_t,De=w[E],ut=E==="y"?"height":"width",bt=De+v[Qe],pn=De-v[Re],ge=[yt,Et].indexOf(x)!==-1,He=(Ce=N?.[E])!=null?Ce:0,Y=ge?bt:De-z[ut]-I[ut]-He+F.altAxis,te=ge?De+z[ut]+I[ut]-He-F.altAxis:pn,ye=p&&ge?N6(Y,De,te):Jr(p?Y:bt,De,p?te:pn);w[E]=ye,B[E]=ye-De}t.modifiersData[r]=B}}const sg={name:"preventOverflow",enabled:!0,phase:"main",fn:og,requiresIfExists:["offset"]};function ug(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function cg(e){return e===At(e)||!$t(e)?_a(e):ug(e)}function dg(e){var t=e.getBoundingClientRect(),n=mr(t.width)/e.offsetWidth||1,r=mr(t.height)/e.offsetHeight||1;return n!==1||r!==1}function fg(e,t,n){n===void 0&&(n=!1);var r=$t(t),i=$t(t)&&dg(t),a=Vn(t),o=pr(e,i,n),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((nn(t)!=="body"||Wa(a))&&(s=cg(t)),$t(t)?(u=pr(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=$a(a))),{x:o.left+s.scrollLeft-u.x,y:o.top+s.scrollTop-u.y,width:o.width,height:o.height}}function hg(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function i(a){n.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!n.has(s)){var u=t.get(s);u&&i(u)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||i(a)}),r}function mg(e){var t=hg(e);return I6.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function pg(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function gg(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Zu={placement:"bottom",modifiers:[],strategy:"absolute"};function Ju(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function vg(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?Zu:i;return function(s,u,c){c===void 0&&(c=a);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},Zu,a),modifiersData:{},elements:{reference:s,popper:u},attributes:{},styles:{}},h=[],m=!1,p={state:d,setOptions:function(x){var y=typeof x=="function"?x(d.options):x;b(),d.options=Object.assign({},a,d.options,y),d.scrollParents={reference:qn(s)?Kr(s):s.contextElement?Kr(s.contextElement):[],popper:Kr(u)};var C=mg(gg([].concat(r,d.options.modifiers)));return d.orderedModifiers=C.filter(function(M){return M.enabled}),g(),p.update()},forceUpdate:function(){if(!m){var x=d.elements,y=x.reference,C=x.popper;if(Ju(y,C)){d.rects={reference:fg(y,Zr(C),d.options.strategy==="fixed"),popper:Va(C)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(F){return d.modifiersData[F.name]=Object.assign({},F.data)});for(var M=0;M<d.orderedModifiers.length;M++){if(d.reset===!0){d.reset=!1,M=-1;continue}var E=d.orderedModifiers[M],w=E.fn,z=E.options,I=z===void 0?{}:z,k=E.name;typeof w=="function"&&(d=w({state:d,options:I,name:k,instance:p})||d)}}}},update:pg(function(){return new Promise(function(v){p.forceUpdate(),v(d)})}),destroy:function(){b(),m=!0}};if(!Ju(s,u))return p;p.setOptions(c).then(function(v){!m&&c.onFirstUpdate&&c.onFirstUpdate(v)});function g(){d.orderedModifiers.forEach(function(v){var x=v.name,y=v.options,C=y===void 0?{}:y,M=v.effect;if(typeof M=="function"){var E=M({state:d,name:x,instance:p,options:C}),w=function(){};h.push(E||w)}})}function b(){h.forEach(function(v){return v()}),h=[]}return p}}var bg=[G6,lg,O6,M6,rg,Q6,sg,B6,eg],xg=vg({defaultModifiers:bg}),Xa,Ku;function wg(){if(Ku)return Xa;Ku=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function i(a,o){if(a===o)return!0;if(a&&o&&typeof a=="object"&&typeof o=="object"){if(a.constructor!==o.constructor)return!1;var s,u,c;if(Array.isArray(a)){if(s=a.length,s!=o.length)return!1;for(u=s;u--!==0;)if(!i(a[u],o[u]))return!1;return!0}var d;if(t&&a instanceof Map&&o instanceof Map){if(a.size!==o.size)return!1;for(d=a.entries();!(u=d.next()).done;)if(!o.has(u.value[0]))return!1;for(d=a.entries();!(u=d.next()).done;)if(!i(u.value[1],o.get(u.value[0])))return!1;return!0}if(n&&a instanceof Set&&o instanceof Set){if(a.size!==o.size)return!1;for(d=a.entries();!(u=d.next()).done;)if(!o.has(u.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(o)){if(s=a.length,s!=o.length)return!1;for(u=s;u--!==0;)if(a[u]!==o[u])return!1;return!0}if(a.constructor===RegExp)return a.source===o.source&&a.flags===o.flags;if(a.valueOf!==Object.prototype.valueOf&&typeof a.valueOf=="function"&&typeof o.valueOf=="function")return a.valueOf()===o.valueOf();if(a.toString!==Object.prototype.toString&&typeof a.toString=="function"&&typeof o.toString=="function")return a.toString()===o.toString();if(c=Object.keys(a),s=c.length,s!==Object.keys(o).length)return!1;for(u=s;u--!==0;)if(!Object.prototype.hasOwnProperty.call(o,c[u]))return!1;if(e&&a instanceof Element)return!1;for(u=s;u--!==0;)if(!((c[u]==="_owner"||c[u]==="__v"||c[u]==="__o")&&a.$$typeof)&&!i(a[c[u]],o[c[u]]))return!1;return!0}return a!==a&&o!==o}return Xa=function(o,s){try{return i(o,s)}catch(u){if((u.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw u}},Xa}var yg=wg();const Eg=Jt(yg);var Cg=[],kg=function(t,n,r){r===void 0&&(r={});var i=de.useRef(null),a={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||Cg},o=de.useState({styles:{popper:{position:a.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=o[0],u=o[1],c=de.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(p){var g=p.state,b=Object.keys(g.elements);_p.flushSync(function(){u({styles:Au(b.map(function(v){return[v,g.styles[v]||{}]})),attributes:Au(b.map(function(v){return[v,g.attributes[v]]}))})})},requires:["computeStyles"]}},[]),d=de.useMemo(function(){var m={onFirstUpdate:a.onFirstUpdate,placement:a.placement,strategy:a.strategy,modifiers:[].concat(a.modifiers,[c,{name:"applyStyles",enabled:!1}])};return Eg(i.current,m)?i.current||m:(i.current=m,m)},[a.onFirstUpdate,a.placement,a.strategy,a.modifiers,c]),h=de.useRef();return Nu(function(){h.current&&h.current.setOptions(d)},[d]),Nu(function(){if(!(t==null||n==null)){var m=r.createPopper||xg,p=m(t,n,d);return h.current=p,function(){p.destroy(),h.current=null}}},[t,n,r.createPopper]),{state:h.current?h.current.state:null,styles:s.styles,attributes:s.attributes,update:h.current?h.current.update:null,forceUpdate:h.current?h.current.forceUpdate:null}};function qu(e){var t=de.useRef(e);return t.current=e,de.useCallback(function(){return t.current},[])}var Ig=function(){};function zg(e){var t=e.initial,n=e.value,r=e.onChange,i=r===void 0?Ig:r;if(t===void 0&&n===void 0)throw new TypeError('Either "value" or "initial" variable must be set. Now both are undefined');var a=de.useState(t),o=a[0],s=a[1],u=qu(o),c=de.useCallback(function(h){var m=u(),p=typeof h=="function"?h(m):h;typeof p.persist=="function"&&p.persist(),s(p),typeof i=="function"&&i(p)},[u,i]),d=n!==void 0;return[d?n:o,d?i:c]}function Qu(e,t){return e===void 0&&(e=0),t===void 0&&(t=0),function(){return{width:0,height:0,top:t,right:e,bottom:t,left:e,x:0,y:0,toJSON:function(){return null}}}}var Fg=["styles","attributes"],Ru={getBoundingClientRect:Qu()},e1={closeOnOutsideClick:!0,closeOnTriggerHidden:!1,defaultVisible:!1,delayHide:0,delayShow:0,followCursor:!1,interactive:!1,mutationObserverOptions:{attributes:!0,childList:!0,subtree:!0},offset:[0,6],trigger:"hover"};function Mg(e,t){var n,r,i;e===void 0&&(e={}),t===void 0&&(t={});var a=Object.keys(e1).reduce(function(S,T){var G;return ve({},S,(G={},G[T]=S[T]!==void 0?S[T]:e1[T],G))},e),o=de.useMemo(function(){return[{name:"offset",options:{offset:a.offset}}]},Array.isArray(a.offset)?a.offset:[]),s=ve({},t,{placement:t.placement||a.placement,modifiers:t.modifiers||o}),u=de.useState(null),c=u[0],d=u[1],h=de.useState(null),m=h[0],p=h[1],g=zg({initial:a.defaultVisible,value:a.visible,onChange:a.onVisibleChange}),b=g[0],v=g[1],x=de.useRef();de.useEffect(function(){return function(){return clearTimeout(x.current)}},[]);var y=kg(a.followCursor?Ru:c,m,s),C=y.styles,M=y.attributes,E=Su(y,Fg),w=E.update,z=qu({visible:b,triggerRef:c,tooltipRef:m,finalConfig:a}),I=de.useCallback(function(S){return Array.isArray(a.trigger)?a.trigger.includes(S):a.trigger===S},Array.isArray(a.trigger)?a.trigger:[a.trigger]),k=de.useCallback(function(){clearTimeout(x.current),x.current=window.setTimeout(function(){return v(!1)},a.delayHide)},[a.delayHide,v]),F=de.useCallback(function(){clearTimeout(x.current),x.current=window.setTimeout(function(){return v(!0)},a.delayShow)},[a.delayShow,v]),N=de.useCallback(function(){z().visible?k():F()},[z,k,F]);de.useEffect(function(){if(z().finalConfig.closeOnOutsideClick){var S=function(G){var O,_=z(),A=_.tooltipRef,$=_.triggerRef,W=(G.composedPath==null||(O=G.composedPath())==null?void 0:O[0])||G.target;W instanceof Node&&A!=null&&$!=null&&!A.contains(W)&&!$.contains(W)&&k()};return document.addEventListener("mousedown",S),function(){return document.removeEventListener("mousedown",S)}}},[z,k]),de.useEffect(function(){if(!(c==null||!I("click")))return c.addEventListener("click",N),function(){return c.removeEventListener("click",N)}},[c,I,N]),de.useEffect(function(){if(!(c==null||!I("double-click")))return c.addEventListener("dblclick",N),function(){return c.removeEventListener("dblclick",N)}},[c,I,N]),de.useEffect(function(){if(!(c==null||!I("right-click"))){var S=function(G){G.preventDefault(),N()};return c.addEventListener("contextmenu",S),function(){return c.removeEventListener("contextmenu",S)}}},[c,I,N]),de.useEffect(function(){if(!(c==null||!I("focus")))return c.addEventListener("focus",F),c.addEventListener("blur",k),function(){c.removeEventListener("focus",F),c.removeEventListener("blur",k)}},[c,I,F,k]),de.useEffect(function(){if(!(c==null||!I("hover")))return c.addEventListener("mouseenter",F),c.addEventListener("mouseleave",k),function(){c.removeEventListener("mouseenter",F),c.removeEventListener("mouseleave",k)}},[c,I,F,k]),de.useEffect(function(){if(!(m==null||!I("hover")||!z().finalConfig.interactive))return m.addEventListener("mouseenter",F),m.addEventListener("mouseleave",k),function(){m.removeEventListener("mouseenter",F),m.removeEventListener("mouseleave",k)}},[m,I,F,k,z]);var B=E==null||(n=E.state)==null||(r=n.modifiersData)==null||(i=r.hide)==null?void 0:i.isReferenceHidden;de.useEffect(function(){a.closeOnTriggerHidden&&B&&k()},[a.closeOnTriggerHidden,k,B]),de.useEffect(function(){if(!a.followCursor||c==null)return;function S(T){var G=T.clientX,O=T.clientY;Ru.getBoundingClientRect=Qu(G,O),w?.()}return c.addEventListener("mousemove",S),function(){return c.removeEventListener("mousemove",S)}},[a.followCursor,c,w]),de.useEffect(function(){if(!(m==null||w==null||a.mutationObserverOptions==null)){var S=new MutationObserver(w);return S.observe(m,a.mutationObserverOptions),function(){return S.disconnect()}}},[a.mutationObserverOptions,m,w]);var H=function(T){return T===void 0&&(T={}),ve({},T,{style:ve({},T.style,C.popper)},M.popper,{"data-popper-interactive":a.interactive})},L=function(T){return T===void 0&&(T={}),ve({},T,M.arrow,{style:ve({},T.style,C.arrow),"data-popper-arrow":!0})};return ve({getArrowProps:L,getTooltipProps:H,setTooltipRef:p,setTriggerRef:d,tooltipRef:m,triggerRef:c,visible:b},E)}const et=({children:e,title:t,hideTooltip:n=!1,delayShow:r=!1,whiteSpace:i="initial",placement:a="top",className:o})=>{const{getArrowProps:s,getTooltipProps:u,setTooltipRef:c,setTriggerRef:d,visible:h}=Mg({placement:a}),[m,p]=l.useState(!r),[g,b]=l.useState(null),v=()=>{if(r){const y=setTimeout(()=>{p(!0)},1e3);b(y)}else p(!0)},x=()=>{g&&(clearTimeout(g),b(null)),r&&p(!1)};return f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:d,className:o,onMouseEnter:v,onMouseLeave:x,children:e}),h&&(r?m&&t:t)&&!n&&dr.createPortal(f.jsxs("div",{ref:c,...u({className:"tooltip-container",style:{whiteSpace:i}}),children:[t,f.jsx("div",{...s({className:"tooltip-arrow"})})]}),document.body)]})},Sg=({size:e=24,fill:t="currentColor",fillSecondary:n="white"})=>f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[f.jsx("path",{d:"M17.5128 13.6276L13.7184 11.9717C12.8016 11.5708 12.0696 10.8389 11.6688 9.92205L10.0128 6.12765C9.88322 5.83245 9.46802 5.83245 9.33842 6.12765L7.68242 9.92205C7.28162 10.8389 6.54962 11.5708 5.63282 11.9717L1.83122 13.63C1.53842 13.7572 1.53602 14.1748 1.83122 14.3044L5.69762 16.0132C6.61202 16.4188 7.34162 17.1532 7.73762 18.0724L9.34082 21.7948C9.46802 22.09 9.88802 22.0924 10.0152 21.7948L11.6688 18.0052C12.0696 17.0884 12.8016 16.3565 13.7184 15.9557L17.5128 14.2997C17.808 14.17 17.808 13.7548 17.5128 13.6252V13.6276Z",fill:t}),f.jsx("path",{d:"M22.2624 6.43876L20.0688 5.48116C19.5384 5.25076 19.116 4.82596 18.8856 4.29796L17.928 2.10436C17.8536 1.93396 17.6136 1.93396 17.5392 2.10436L16.5816 4.29796C16.3512 4.82836 15.9264 5.25076 15.3984 5.48116L13.2024 6.43876C13.032 6.51316 13.032 6.75316 13.2024 6.82756L15.4368 7.81636C15.9648 8.04916 16.3872 8.47636 16.6152 9.00676L17.5416 11.1572C17.616 11.3276 17.8584 11.3276 17.9328 11.1572L18.888 8.96836C19.1184 8.43796 19.5432 8.01556 20.0712 7.78516L22.2648 6.82756C22.4352 6.75316 22.4352 6.51316 22.2648 6.43876H22.2624Z",fill:t})]}),ln=({position:e="top",title:t="AI Extracted Field"})=>f.jsx(et,{placement:e,title:t,children:f.jsx("div",{className:"cursor-pointer",children:f.jsx(Sg,{size:12,fill:"#016DCF",fillSecondary:"#54A4EC"})})}),Nt=({isConditional:e})=>f.jsx("span",{className:`${e?"text-yellow-500":"text-red-500"}`,children:"*"}),Ag=({className:e,size:t=16})=>f.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[f.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),f.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),Ng=({className:e,size:t=16})=>f.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[f.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),f.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}),Dg=({className:e,size:t=16})=>f.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[f.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),f.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Lg=({className:e,size:t=16})=>f.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[f.jsx("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),f.jsx("path",{d:"M3 3v5h5"})]}),Ya=l.forwardRef(({id:e,label:t,onChange:n,errorMessage:r,successMessage:i,required:a,isRequiredConditional:o=!1,bg:s,tags:u,color:c,className:d,isPasswordField:h,setIsPasswordVisible:m,inputRef:p,tooltip:g,suffixIcon:b,revertBackValue:v,originalCase:x=!1,textSize:y,isAiExtracted:C=!1,isGTN:M=!1,gtnName:E=null,inputClassName:w="",inputStyle:z={},labelClassName:I,onBlur:k,isLiveField:F=!1,isClearable:N=!1,riskDetails:B,isRiskAnalysisOpen:H=!1,RiskDetailsCard:L,onAddGTNToDocument:S,...T},G)=>{const{t:O}=tn(),[_,A]=l.useState(!1),[$,W]=l.useState(!1),D=X=>{S&&S({key:E,value:X})};return f.jsxs("div",{className:Z("flex gap-0.5 relative",$&&M?"border rounded-lg border-primary-100 bg-primary-50 p-1 focus:ring-blue-500 focus:border-blue-500 dark:focus:ring-neutral-50 dark:focus:border-neutral-50":""),onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),children:[M&&!$?f.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5"}):null,f.jsxs("div",{className:Z("flex flex-col w-full",d),children:[f.jsx("style",{children:`
|
|
49
|
+
`}),h?f.jsx("label",{htmlFor:k,className:"mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",children:f.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:f.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:f.jsxs(se,{variant:"medium",size:"extra-small",appearance:"subtitle",children:[h,d&&f.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})})}):null,f.jsxs("div",{className:"relative input-field",children:[f.jsx("input",{...y,ref:C,id:k,type:m,value:t,defaultValue:o,placeholder:p,required:d,disabled:s,max:u,min:c,onKeyDown:r,style:F(),className:Z("border border-solid h-8 rounded-md block w-full pl-3","text-sm font-medium text-neutral-900 dark:text-black-100","bg-white dark:bg-black-600","transition-colors duration-200 ease-in-out","focus:outline-none focus:ring-2",z(),s&&"opacity-70 cursor-not-allowed bg-neutral-50 dark:bg-black-700",v),onChange:N=>n(N.target.value),onClick:N=>N.stopPropagation()}),g&&f.jsx("div",{ref:M,className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:g})]}),f.jsx(We.AnimatePresence,{children:i&&f.jsx(We.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:f.jsx(se,{className:Z("mt-1",I()),appearance:"custom",size:"extra-small",variant:"medium",children:i})})})]})});La.displayName="InputField";const Zp=(e,t,n,r)=>{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);Kn(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},Cu={},Ta=(e,t,n,r)=>{Kn(n)&&Cu[n]||(Kn(n)&&(Cu[n]=new Date),Zp(e,t,n,r))},ku=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Ba=(e,t,n)=>{e.loadNamespaces(t,ku(e,n))},Iu=(e,t,n,r)=>{if(Kn(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Ba(e,n,r);n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,ku(e,r))},Jp=(e,t,n={})=>!t.languages||!t.languages.length?(Ta(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),Kn=e=>typeof e=="string",Kp=e=>typeof e=="object"&&e!==null,qp=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Qp={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Rp=e=>Qp[e];let e6={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(qp,Rp)};const t6=()=>e6;let n6;const r6=()=>n6,i6=l.createContext();class l6{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const a6=(e,t)=>{const n=l.useRef();return l.useEffect(()=>{n.current=e},[e,t]),n.current},zu=(e,t,n,r)=>e.getFixedT(t,n,r),o6=(e,t,n,r)=>l.useCallback(zu(e,t,n,r),[e,t,n,r]),tn=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:i}=l.useContext(i6)||{},a=n||r||r6();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new l6),!a){Ta(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const M=(w,z)=>Kn(z)?z:Kp(z)&&Kn(z.defaultValue)?z.defaultValue:Array.isArray(w)?w[w.length-1]:w,E=[M,{},!1];return E.t=M,E.i18n={},E.ready=!1,E}a.options.react?.wait&&Ta(a,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...t6(),...a.options.react,...t},{useSuspense:s,keyPrefix:u}=o;let c=i||a.options?.defaultNS;c=Kn(c)?[c]:c||["translation"],a.reportNamespaces.addUsedNamespaces?.(c);const d=(a.isInitialized||a.initializedStoreOnce)&&c.every(M=>Jp(M,a,o)),h=o6(a,t.lng||null,o.nsMode==="fallback"?c:c[0],u),m=()=>h,p=()=>zu(a,t.lng||null,o.nsMode==="fallback"?c:c[0],u),[g,b]=l.useState(m);let v=c.join();t.lng&&(v=`${t.lng}${v}`);const x=a6(v),y=l.useRef(!0);l.useEffect(()=>{const{bindI18n:M,bindI18nStore:E}=o;y.current=!0,!d&&!s&&(t.lng?Iu(a,t.lng,c,()=>{y.current&&b(p)}):Ba(a,c,()=>{y.current&&b(p)})),d&&x&&x!==v&&y.current&&b(p);const w=()=>{y.current&&b(p)};return M&&a?.on(M,w),E&&a?.store.on(E,w),()=>{y.current=!1,a&&M&&M?.split(" ").forEach(z=>a.off(z,w)),E&&a&&E.split(" ").forEach(z=>a.store.off(z,w))}},[a,v]),l.useEffect(()=>{y.current&&d&&b(m)},[a,u,d]);const C=[g,a,d];if(C.t=g,C.i18n=a,C.ready=d,d||!d&&!s)return C;throw new Promise(M=>{t.lng?Iu(a,t.lng,c,()=>M()):Ba(a,c,()=>M())})},Vt=({size:e=16,className:t="",...n})=>f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`text-neutral-500 hover:text-neutral-700 ${t}`,...n,children:[f.jsx("circle",{cx:"12",cy:"12",r:"10"}),f.jsx("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),f.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),Fu=l.forwardRef(({size:e=24,fill:t="currentColor",className:n,...r},i)=>f.jsx("svg",{ref:i,className:Z(n),width:e,height:e,viewBox:"0 0 20 20",fill:t,xmlns:"http://www.w3.org/2000/svg",...r,children:f.jsx("path",{d:"M10.0002 11.1666L5.91683 15.2499C5.76405 15.4027 5.56961 15.4791 5.3335 15.4791C5.09739 15.4791 4.90294 15.4027 4.75016 15.2499C4.59738 15.0971 4.521 14.9027 4.521 14.6666C4.521 14.4305 4.59738 14.236 4.75016 14.0833L8.8335 9.99992L4.75016 5.91659C4.59738 5.76381 4.521 5.56936 4.521 5.33325C4.521 5.09714 4.59738 4.9027 4.75016 4.74992C4.90294 4.59714 5.09739 4.52075 5.3335 4.52075C5.56961 4.52075 5.76405 4.59714 5.91683 4.74992L10.0002 8.83325L14.0835 4.74992C14.2363 4.59714 14.4307 4.52075 14.6668 4.52075C14.9029 4.52075 15.0974 4.59714 15.2502 4.74992C15.4029 4.9027 15.4793 5.09714 15.4793 5.33325C15.4793 5.56936 15.4029 5.76381 15.2502 5.91659L11.1668 9.99992L15.2502 14.0833C15.4029 14.236 15.4793 14.4305 15.4793 14.6666C15.4793 14.9027 15.4029 15.0971 15.2502 15.2499C15.0974 15.4027 14.9029 15.4791 14.6668 15.4791C14.4307 15.4791 14.2363 15.4027 14.0835 15.2499L10.0002 11.1666Z"})}));Fu.displayName="CloseIcon";const On={primary:{50:"#E6F1FC",100:"#C6E1F9",200:"#8AC0F2",300:"#54A4EC",400:"#3392E9",500:"#0077E3",600:"#016DCF",700:"#0054A1",800:"#00417D",900:"#00325F",950:"#001c35",975:"#00111f"},black:{50:"#f0f0f0",100:"#d9d9d9",200:"#bfbfbf",300:"#8c8c8c",400:"#595959",500:"#454545",600:"#262626",700:"#1f1f1f",800:"#141414",900:"#000000",950:"#0a0a0a",975:"#050505"},blue:{50:"#E6F1FC",100:"#C6E1F9",200:"#8AC0F2",300:"#54A4EC",400:"#3392E9",500:"#0077E3",600:"#016DCF",700:"#0054A1",800:"#00417D",900:"#00325F",950:"#002547",975:"#001529"},success:{50:"#ECFDF3",100:"#D1FADF",200:"#A6F4C5",300:"#6CE9A6",400:"#32D583",500:"#12B76A",600:"#039855",700:"#027A48",800:"#05603A",900:"#054F31",950:"#033625",975:"#022419"},neutral:{50:"#F9FAFB",100:"#F2F4F7",200:"#EAECF0",300:"#D0D5DD",400:"#98A2B3",500:"#667085",600:"#475467",700:"#344054",800:"#1D2939",900:"#101828",950:"#0c1219",975:"#080a0f"},error:{50:"#FEF3F2",100:"#FEE4E2",200:"#FECDCA",300:"#FDA29B",400:"#F97066",500:"#F04438",600:"#D92D20",700:"#B42318",800:"#912018",900:"#7A271A",950:"#3d1008",975:"#2a0b05"},warning:{50:"#FFFAEB",100:"#FEF0C7",200:"#FEDF89",300:"#FEC84B",400:"#FDB022",500:"#F79009",600:"#DC6803",700:"#B54708",800:"#93370D",900:"#7A2E0E",950:"#662505",975:"#451803"},teal:{50:"#ebf5f5",100:"#c2e0df",200:"#a4d1d0",300:"#7abcba",400:"#61afad",500:"#399b98",600:"#348d8a",700:"#286e6c",800:"#1f5554",900:"#184140",950:"#133534",975:"#0c2222"},green:{50:"#f2f7f2",100:"#d5e5d5",200:"#c1d9c1",300:"#a5c7a5",400:"#94bd93",500:"#79ac78",600:"#6e9d6d",700:"#567a55",800:"#435f42",900:"#334832",950:"#001e00",975:"#182818"},yellow:{50:"#fffaed",100:"#fff0c7",200:"#ffe8ac",300:"#ffde86",400:"#ffd76f",500:"#ffcd4b",600:"#e8bb44",700:"#b59235",800:"#8c7129",900:"#6b5620",950:"#524314",975:"#382e0e"},orange:{50:"#fef4e8",100:"#fddeb7",200:"#fcce94",300:"#fbb764",400:"#faa945",500:"#f99417",600:"#e38715",700:"#b16910",800:"#89510d",900:"#693e0a",950:"#4d2d07",975:"#331e05"},peach:{50:"#fceef3",100:"#f5cad9",200:"#f0b0c6",300:"#ea8cad",400:"#e5759d",500:"#df5384",600:"#cb4c78",700:"#9e3b5e",800:"#7b2e49",900:"#5e2337",950:"#451a2b",975:"#2e111d"},red:{50:"#fceaeb",100:"#f6bec0",200:"#f29ea2",300:"#ec7278",400:"#e9575d",500:"#e32d35",600:"#cf2930",700:"#a12026",800:"#7d191d",900:"#5f1316",950:"#470c0f",975:"#2f080a"},purple:{50:"#f5e7ff",100:"#dfb4ff",200:"#d090ff",300:"#bb5dff",400:"#ad3dff",500:"#990dff",600:"#8b0ce8",700:"#6d09b5",800:"#54078c",900:"#40056b",950:"#300450",975:"#200336"},navy:{50:"#eaebf6",100:"#bebfe2",200:"#9ea1d3",300:"#7276bf",400:"#575bb3",500:"#2d32a0",600:"#292e92",700:"#202472",800:"#191c58",900:"#131543",950:"#0d0e2f",975:"#090a20"},grey:{50:"#f2f2f2",100:"#d5d5d5",200:"#c1c1c1",300:"#a5a5a5",400:"#939393",500:"#787878",600:"#6d6d6d",700:"#555555",800:"#424242",900:"#323232",950:"#252525",975:"#191919"}},s6=e=>{let t=0;for(let i=0;i<e.length;i++)t=e.charCodeAt(i)+((t<<5)-t);const n=(t&16777215).toString(16).toUpperCase();return`#${"00000".substring(0,6-n.length)+n}`},Ha=(e,t=80)=>{let n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16);return n=Math.min(255,n+(255-n)*(t/100)),r=Math.min(255,r+(255-r)*(t/100)),i=Math.min(255,i+(255-i)*(t/100)),`#${Math.round(n).toString(16).padStart(2,"0")}${Math.round(r).toString(16).padStart(2,"0")}${Math.round(i).toString(16).padStart(2,"0")}`},Mu=(e,t=30)=>{let n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16);return n=Math.max(0,n*(1-t/100)),r=Math.max(0,r*(1-t/100)),i=Math.max(0,i*(1-t/100)),`#${Math.round(n).toString(16).padStart(2,"0")}${Math.round(r).toString(16).padStart(2,"0")}${Math.round(i).toString(16).padStart(2,"0")}`},u6=(e,t)=>({background:t?On[e]?.[975]:On[e]?.[50],borderColor:t?On[e]?.[900]:On[e]?.[100],color:t?On[e]?.[500]:On[e]?.[600]}),c6=(e,t)=>{const n=e.startsWith("#")?e:s6(e);return{background:t?Mu(n,80):Ha(n,90),borderColor:t?Mu(n,40):Ha(n,50),color:t?Ha(n,40):n}},d6=e=>({background:e?"#2D3748":"#F7FAFC",borderColor:e?"#4A5568":"#E2E8F0",color:e?"#A0AEC0":"#4A5568"}),f6=e=>{switch(e){case"xs":return"text-xs px-1 py-0.5";case"lg":return"text-sm px-2.5 py-1.5";case"md":return"text-sm px-2 py-1";default:return"text-xs px-1.5 py-0.5"}},h6=(e,t,n,r)=>e?n?t.color:On[e]?.[500]||t.color:r?"#A0AEC0":"#4A5568",fr=l.forwardRef(({label:e,color:t,size:n="sm",className:r,onClick:i,onMouseDown:a,truncate:o,isHashColor:s=!1,icon:u,removable:c=!1,onRemove:d,onUpload:h,acceptsUpload:m=!1,theme:p="light","aria-label":g},b)=>{const v=p==="dark",x=()=>t?t in On?u6(t,v):c6(t,v):d6(v),y=w=>{const z=w.target.files?.[0];z&&h&&h(z),w.target.value=""},C=w=>{(w.key==="Enter"||w.key===" ")&&(i||m)&&(w.preventDefault(),i&&i(w))},M=x(),E=h6(t,M,s,v);return f.jsx("div",{ref:b,className:Z("inline-flex items-center border rounded-md transition-colors bg-primary-50 border-primary-100 text-primary-600 dark:bg-primary-900 dark:border-primary-800 dark:text-primary-400",f6(n),(i||m)&&"cursor-pointer hover:opacity-80",r),onMouseDown:a,onClick:i,onKeyDown:C,"aria-label":g||`Tag: ${e}`,role:"button",tabIndex:i||m?0:void 0,children:f.jsxs("div",{className:"flex items-center gap-0.5 truncate w-full overflow-hidden",children:[u,o?f.jsx("p",{title:e,className:`text-${n} ${i||m?"cursor-pointer":""}`,children:e.length>o?`${e.slice(0,o)}...`:e}):f.jsx("p",{className:`text-${n}`,children:e}),m&&f.jsx("input",{type:"file",onChange:y,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer","aria-label":`Upload file for ${e}`}),c&&d&&f.jsx("button",{onClick:d,className:"ml-1 flex-shrink-0","aria-label":`Remove ${e}`,type:"button",children:f.jsx(Fu,{size:12,fill:E,className:"cursor-pointer text-primary-600 dark:text-primary-400"})})]})})});fr.displayName="Tag";const St=({labels:e=[]})=>{const t=[],n=[];return e.forEach(r=>{typeof r=="string"&&!t.includes(r)?t.push(r):typeof r!="string"&&!n.some(i=>i.label===r.label)&&n.push(r)}),f.jsxs(f.Fragment,{children:[t?.map(r=>f.jsx(fr,{size:"xs",label:r,color:"primary"},r)),n?.map((r,i)=>f.jsx(fr,{size:"xs",label:r?.label,color:r?.color},r?.id||i))]})};function Su(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ve(){return ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ve.apply(null,arguments)}var Au=function(t){return t.reduce(function(n,r){var i=r[0],a=r[1];return n[i]=a,n},{})},Nu=typeof window<"u"&&window.document&&window.document.createElement?de.useLayoutEffect:de.useEffect,yt="top",Gt="bottom",_t="right",Et="left",ja="auto",Ur=[yt,Gt,_t,Et],hr="start",Xr="end",m6="clippingParents",Du="viewport",Yr="popper",p6="reference",Lu=Ur.reduce(function(e,t){return e.concat([t+"-"+hr,t+"-"+Xr])},[]),Tu=[].concat(Ur,[ja]).reduce(function(e,t){return e.concat([t,t+"-"+hr,t+"-"+Xr])},[]),g6="beforeRead",v6="read",b6="afterRead",x6="beforeMain",w6="main",y6="afterMain",E6="beforeWrite",C6="write",k6="afterWrite",I6=[g6,v6,b6,x6,w6,y6,E6,C6,k6];function nn(e){return e?(e.nodeName||"").toLowerCase():null}function At(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function qn(e){var t=At(e).Element;return e instanceof t||e instanceof Element}function $t(e){var t=At(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Pa(e){if(typeof ShadowRoot>"u")return!1;var t=At(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function z6(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},a=t.elements[n];!$t(a)||!nn(a)||(Object.assign(a.style,r),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function F6(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],a=t.attributes[r]||{},o=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=o.reduce(function(u,c){return u[c]="",u},{});!$t(i)||!nn(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(u){i.removeAttribute(u)}))})}}const M6={name:"applyStyles",enabled:!0,phase:"write",fn:z6,effect:F6,requires:["computeStyles"]};function rn(e){return e.split("-")[0]}var Qn=Math.max,Ri=Math.min,mr=Math.round;function Oa(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Bu(){return!/^((?!chrome|android).)*safari/i.test(Oa())}function pr(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&$t(e)&&(i=e.offsetWidth>0&&mr(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&mr(r.height)/e.offsetHeight||1);var o=qn(e)?At(e):window,s=o.visualViewport,u=!Bu()&&n,c=(r.left+(u&&s?s.offsetLeft:0))/i,d=(r.top+(u&&s?s.offsetTop:0))/a,h=r.width/i,m=r.height/a;return{width:h,height:m,top:d,right:c+h,bottom:d+m,left:c,x:c,y:d}}function Va(e){var t=pr(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Hu(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Pa(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function gn(e){return At(e).getComputedStyle(e)}function S6(e){return["table","td","th"].indexOf(nn(e))>=0}function Vn(e){return((qn(e)?e.ownerDocument:e.document)||window.document).documentElement}function el(e){return nn(e)==="html"?e:e.assignedSlot||e.parentNode||(Pa(e)?e.host:null)||Vn(e)}function ju(e){return!$t(e)||gn(e).position==="fixed"?null:e.offsetParent}function A6(e){var t=/firefox/i.test(Oa()),n=/Trident/i.test(Oa());if(n&&$t(e)){var r=gn(e);if(r.position==="fixed")return null}var i=el(e);for(Pa(i)&&(i=i.host);$t(i)&&["html","body"].indexOf(nn(i))<0;){var a=gn(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function Zr(e){for(var t=At(e),n=ju(e);n&&S6(n)&&gn(n).position==="static";)n=ju(n);return n&&(nn(n)==="html"||nn(n)==="body"&&gn(n).position==="static")?t:n||A6(e)||t}function Ga(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Jr(e,t,n){return Qn(e,Ri(t,n))}function N6(e,t,n){var r=Jr(e,t,n);return r>n?n:r}function Pu(){return{top:0,right:0,bottom:0,left:0}}function Ou(e){return Object.assign({},Pu(),e)}function Vu(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var D6=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Ou(typeof t!="number"?t:Vu(t,Ur))};function L6(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=rn(n.placement),u=Ga(s),c=[Et,_t].indexOf(s)>=0,d=c?"height":"width";if(!(!a||!o)){var h=D6(i.padding,n),m=Va(a),p=u==="y"?yt:Et,g=u==="y"?Gt:_t,b=n.rects.reference[d]+n.rects.reference[u]-o[u]-n.rects.popper[d],v=o[u]-n.rects.reference[u],x=Zr(a),y=x?u==="y"?x.clientHeight||0:x.clientWidth||0:0,C=b/2-v/2,M=h[p],E=y-m[d]-h[g],w=y/2-m[d]/2+C,z=Jr(M,w,E),I=u;n.modifiersData[r]=(t={},t[I]=z,t.centerOffset=z-w,t)}}function T6(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||Hu(t.elements.popper,i)&&(t.elements.arrow=i))}const B6={name:"arrow",enabled:!0,phase:"main",fn:L6,effect:T6,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function gr(e){return e.split("-")[1]}var H6={top:"auto",right:"auto",bottom:"auto",left:"auto"};function j6(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:mr(n*i)/i||0,y:mr(r*i)/i||0}}function Gu(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,u=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,h=e.isFixed,m=o.x,p=m===void 0?0:m,g=o.y,b=g===void 0?0:g,v=typeof d=="function"?d({x:p,y:b}):{x:p,y:b};p=v.x,b=v.y;var x=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),C=Et,M=yt,E=window;if(c){var w=Zr(n),z="clientHeight",I="clientWidth";if(w===At(n)&&(w=Vn(n),gn(w).position!=="static"&&s==="absolute"&&(z="scrollHeight",I="scrollWidth")),w=w,i===yt||(i===Et||i===_t)&&a===Xr){M=Gt;var k=h&&w===E&&E.visualViewport?E.visualViewport.height:w[z];b-=k-r.height,b*=u?1:-1}if(i===Et||(i===yt||i===Gt)&&a===Xr){C=_t;var F=h&&w===E&&E.visualViewport?E.visualViewport.width:w[I];p-=F-r.width,p*=u?1:-1}}var N=Object.assign({position:s},c&&H6),B=d===!0?j6({x:p,y:b},At(n)):{x:p,y:b};if(p=B.x,b=B.y,u){var H;return Object.assign({},N,(H={},H[M]=y?"0":"",H[C]=x?"0":"",H.transform=(E.devicePixelRatio||1)<=1?"translate("+p+"px, "+b+"px)":"translate3d("+p+"px, "+b+"px, 0)",H))}return Object.assign({},N,(t={},t[M]=y?b+"px":"",t[C]=x?p+"px":"",t.transform="",t))}function P6(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,s=n.roundOffsets,u=s===void 0?!0:s,c={placement:rn(t.placement),variation:gr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Gu(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Gu(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const O6={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:P6,data:{}};var tl={passive:!0};function V6(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,s=o===void 0?!0:o,u=At(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(d){d.addEventListener("scroll",n.update,tl)}),s&&u.addEventListener("resize",n.update,tl),function(){a&&c.forEach(function(d){d.removeEventListener("scroll",n.update,tl)}),s&&u.removeEventListener("resize",n.update,tl)}}const G6={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:V6,data:{}};var _6={left:"right",right:"left",bottom:"top",top:"bottom"};function nl(e){return e.replace(/left|right|bottom|top/g,function(t){return _6[t]})}var $6={start:"end",end:"start"};function _u(e){return e.replace(/start|end/g,function(t){return $6[t]})}function _a(e){var t=At(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function $a(e){return pr(Vn(e)).left+_a(e).scrollLeft}function W6(e,t){var n=At(e),r=Vn(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,u=0;if(i){a=i.width,o=i.height;var c=Bu();(c||!c&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:a,height:o,x:s+$a(e),y:u}}function U6(e){var t,n=Vn(e),r=_a(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=Qn(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Qn(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+$a(e),u=-r.scrollTop;return gn(i||n).direction==="rtl"&&(s+=Qn(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:u}}function Wa(e){var t=gn(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function $u(e){return["html","body","#document"].indexOf(nn(e))>=0?e.ownerDocument.body:$t(e)&&Wa(e)?e:$u(el(e))}function Kr(e,t){var n;t===void 0&&(t=[]);var r=$u(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),a=At(r),o=i?[a].concat(a.visualViewport||[],Wa(r)?r:[]):r,s=t.concat(o);return i?s:s.concat(Kr(el(o)))}function Ua(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function X6(e,t){var n=pr(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Wu(e,t,n){return t===Du?Ua(W6(e,n)):qn(t)?X6(t,n):Ua(U6(Vn(e)))}function Y6(e){var t=Kr(el(e)),n=["absolute","fixed"].indexOf(gn(e).position)>=0,r=n&&$t(e)?Zr(e):e;return qn(r)?t.filter(function(i){return qn(i)&&Hu(i,r)&&nn(i)!=="body"}):[]}function Z6(e,t,n,r){var i=t==="clippingParents"?Y6(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(u,c){var d=Wu(e,c,r);return u.top=Qn(d.top,u.top),u.right=Ri(d.right,u.right),u.bottom=Ri(d.bottom,u.bottom),u.left=Qn(d.left,u.left),u},Wu(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Uu(e){var t=e.reference,n=e.element,r=e.placement,i=r?rn(r):null,a=r?gr(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,u;switch(i){case yt:u={x:o,y:t.y-n.height};break;case Gt:u={x:o,y:t.y+t.height};break;case _t:u={x:t.x+t.width,y:s};break;case Et:u={x:t.x-n.width,y:s};break;default:u={x:t.x,y:t.y}}var c=i?Ga(i):null;if(c!=null){var d=c==="y"?"height":"width";switch(a){case hr:u[c]=u[c]-(t[d]/2-n[d]/2);break;case Xr:u[c]=u[c]+(t[d]/2-n[d]/2);break}}return u}function qr(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,u=s===void 0?m6:s,c=n.rootBoundary,d=c===void 0?Du:c,h=n.elementContext,m=h===void 0?Yr:h,p=n.altBoundary,g=p===void 0?!1:p,b=n.padding,v=b===void 0?0:b,x=Ou(typeof v!="number"?v:Vu(v,Ur)),y=m===Yr?p6:Yr,C=e.rects.popper,M=e.elements[g?y:m],E=Z6(qn(M)?M:M.contextElement||Vn(e.elements.popper),u,d,o),w=pr(e.elements.reference),z=Uu({reference:w,element:C,placement:i}),I=Ua(Object.assign({},C,z)),k=m===Yr?I:w,F={top:E.top-k.top+x.top,bottom:k.bottom-E.bottom+x.bottom,left:E.left-k.left+x.left,right:k.right-E.right+x.right},N=e.modifiersData.offset;if(m===Yr&&N){var B=N[i];Object.keys(F).forEach(function(H){var L=[_t,Gt].indexOf(H)>=0?1:-1,S=[yt,Gt].indexOf(H)>=0?"y":"x";F[H]+=B[S]*L})}return F}function J6(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,c=u===void 0?Tu:u,d=gr(r),h=d?s?Lu:Lu.filter(function(g){return gr(g)===d}):Ur,m=h.filter(function(g){return c.indexOf(g)>=0});m.length===0&&(m=h);var p=m.reduce(function(g,b){return g[b]=qr(e,{placement:b,boundary:i,rootBoundary:a,padding:o})[rn(b)],g},{});return Object.keys(p).sort(function(g,b){return p[g]-p[b]})}function K6(e){if(rn(e)===ja)return[];var t=nl(e);return[_u(e),t,_u(t)]}function q6(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!0:o,u=n.fallbackPlacements,c=n.padding,d=n.boundary,h=n.rootBoundary,m=n.altBoundary,p=n.flipVariations,g=p===void 0?!0:p,b=n.allowedAutoPlacements,v=t.options.placement,x=rn(v),y=x===v,C=u||(y||!g?[nl(v)]:K6(v)),M=[v].concat(C).reduce(function(X,K){return X.concat(rn(K)===ja?J6(t,{placement:K,boundary:d,rootBoundary:h,padding:c,flipVariations:g,allowedAutoPlacements:b}):K)},[]),E=t.rects.reference,w=t.rects.popper,z=new Map,I=!0,k=M[0],F=0;F<M.length;F++){var N=M[F],B=rn(N),H=gr(N)===hr,L=[yt,Gt].indexOf(B)>=0,S=L?"width":"height",T=qr(t,{placement:N,boundary:d,rootBoundary:h,altBoundary:m,padding:c}),G=L?H?_t:Et:H?Gt:yt;E[S]>w[S]&&(G=nl(G));var O=nl(G),_=[];if(a&&_.push(T[B]<=0),s&&_.push(T[G]<=0,T[O]<=0),_.every(function(X){return X})){k=N,I=!1;break}z.set(N,_)}if(I)for(var A=g?3:1,$=function(K){var ae=M.find(function(ee){var ue=z.get(ee);if(ue)return ue.slice(0,K).every(function(U){return U})});if(ae)return k=ae,"break"},W=A;W>0;W--){var D=$(W);if(D==="break")break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}}const Q6={name:"flip",enabled:!0,phase:"main",fn:q6,requiresIfExists:["offset"],data:{_skip:!1}};function Xu(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Yu(e){return[yt,_t,Gt,Et].some(function(t){return e[t]>=0})}function R6(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=qr(t,{elementContext:"reference"}),s=qr(t,{altBoundary:!0}),u=Xu(o,r),c=Xu(s,i,a),d=Yu(u),h=Yu(c);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const eg={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:R6};function tg(e,t,n){var r=rn(e),i=[Et,yt].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[Et,_t].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function ng(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=Tu.reduce(function(d,h){return d[h]=tg(h,t.rects,a),d},{}),s=o[t.placement],u=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=o}const rg={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ng};function ig(e){var t=e.state,n=e.name;t.modifiersData[n]=Uu({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const lg={name:"popperOffsets",enabled:!0,phase:"read",fn:ig,data:{}};function ag(e){return e==="x"?"y":"x"}function og(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!1:o,u=n.boundary,c=n.rootBoundary,d=n.altBoundary,h=n.padding,m=n.tether,p=m===void 0?!0:m,g=n.tetherOffset,b=g===void 0?0:g,v=qr(t,{boundary:u,rootBoundary:c,padding:h,altBoundary:d}),x=rn(t.placement),y=gr(t.placement),C=!y,M=Ga(x),E=ag(M),w=t.modifiersData.popperOffsets,z=t.rects.reference,I=t.rects.popper,k=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,F=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),N=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(w){if(a){var H,L=M==="y"?yt:Et,S=M==="y"?Gt:_t,T=M==="y"?"height":"width",G=w[M],O=G+v[L],_=G-v[S],A=p?-I[T]/2:0,$=y===hr?z[T]:I[T],W=y===hr?-I[T]:-z[T],D=t.elements.arrow,X=p&&D?Va(D):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Pu(),ae=K[L],ee=K[S],ue=Jr(0,z[T],X[T]),U=C?z[T]/2-A-ue-ae-F.mainAxis:$-ue-ae-F.mainAxis,J=C?-z[T]/2+A+ue+ee+F.mainAxis:W+ue+ee+F.mainAxis,ce=t.elements.arrow&&Zr(t.elements.arrow),Q=ce?M==="y"?ce.clientTop||0:ce.clientLeft||0:0,be=(H=N?.[M])!=null?H:0,je=G+U-be-Q,R=G+J-be,oe=Jr(p?Ri(O,je):O,G,p?Qn(_,R):_);w[M]=oe,B[M]=oe-G}if(s){var Ce,Qe=M==="x"?yt:Et,Re=M==="x"?Gt:_t,De=w[E],ut=E==="y"?"height":"width",bt=De+v[Qe],pn=De-v[Re],ge=[yt,Et].indexOf(x)!==-1,He=(Ce=N?.[E])!=null?Ce:0,Y=ge?bt:De-z[ut]-I[ut]-He+F.altAxis,te=ge?De+z[ut]+I[ut]-He-F.altAxis:pn,ye=p&&ge?N6(Y,De,te):Jr(p?Y:bt,De,p?te:pn);w[E]=ye,B[E]=ye-De}t.modifiersData[r]=B}}const sg={name:"preventOverflow",enabled:!0,phase:"main",fn:og,requiresIfExists:["offset"]};function ug(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function cg(e){return e===At(e)||!$t(e)?_a(e):ug(e)}function dg(e){var t=e.getBoundingClientRect(),n=mr(t.width)/e.offsetWidth||1,r=mr(t.height)/e.offsetHeight||1;return n!==1||r!==1}function fg(e,t,n){n===void 0&&(n=!1);var r=$t(t),i=$t(t)&&dg(t),a=Vn(t),o=pr(e,i,n),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((nn(t)!=="body"||Wa(a))&&(s=cg(t)),$t(t)?(u=pr(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=$a(a))),{x:o.left+s.scrollLeft-u.x,y:o.top+s.scrollTop-u.y,width:o.width,height:o.height}}function hg(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function i(a){n.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!n.has(s)){var u=t.get(s);u&&i(u)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||i(a)}),r}function mg(e){var t=hg(e);return I6.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function pg(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function gg(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Zu={placement:"bottom",modifiers:[],strategy:"absolute"};function Ju(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function vg(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?Zu:i;return function(s,u,c){c===void 0&&(c=a);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},Zu,a),modifiersData:{},elements:{reference:s,popper:u},attributes:{},styles:{}},h=[],m=!1,p={state:d,setOptions:function(x){var y=typeof x=="function"?x(d.options):x;b(),d.options=Object.assign({},a,d.options,y),d.scrollParents={reference:qn(s)?Kr(s):s.contextElement?Kr(s.contextElement):[],popper:Kr(u)};var C=mg(gg([].concat(r,d.options.modifiers)));return d.orderedModifiers=C.filter(function(M){return M.enabled}),g(),p.update()},forceUpdate:function(){if(!m){var x=d.elements,y=x.reference,C=x.popper;if(Ju(y,C)){d.rects={reference:fg(y,Zr(C),d.options.strategy==="fixed"),popper:Va(C)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(F){return d.modifiersData[F.name]=Object.assign({},F.data)});for(var M=0;M<d.orderedModifiers.length;M++){if(d.reset===!0){d.reset=!1,M=-1;continue}var E=d.orderedModifiers[M],w=E.fn,z=E.options,I=z===void 0?{}:z,k=E.name;typeof w=="function"&&(d=w({state:d,options:I,name:k,instance:p})||d)}}}},update:pg(function(){return new Promise(function(v){p.forceUpdate(),v(d)})}),destroy:function(){b(),m=!0}};if(!Ju(s,u))return p;p.setOptions(c).then(function(v){!m&&c.onFirstUpdate&&c.onFirstUpdate(v)});function g(){d.orderedModifiers.forEach(function(v){var x=v.name,y=v.options,C=y===void 0?{}:y,M=v.effect;if(typeof M=="function"){var E=M({state:d,name:x,instance:p,options:C}),w=function(){};h.push(E||w)}})}function b(){h.forEach(function(v){return v()}),h=[]}return p}}var bg=[G6,lg,O6,M6,rg,Q6,sg,B6,eg],xg=vg({defaultModifiers:bg}),Xa,Ku;function wg(){if(Ku)return Xa;Ku=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function i(a,o){if(a===o)return!0;if(a&&o&&typeof a=="object"&&typeof o=="object"){if(a.constructor!==o.constructor)return!1;var s,u,c;if(Array.isArray(a)){if(s=a.length,s!=o.length)return!1;for(u=s;u--!==0;)if(!i(a[u],o[u]))return!1;return!0}var d;if(t&&a instanceof Map&&o instanceof Map){if(a.size!==o.size)return!1;for(d=a.entries();!(u=d.next()).done;)if(!o.has(u.value[0]))return!1;for(d=a.entries();!(u=d.next()).done;)if(!i(u.value[1],o.get(u.value[0])))return!1;return!0}if(n&&a instanceof Set&&o instanceof Set){if(a.size!==o.size)return!1;for(d=a.entries();!(u=d.next()).done;)if(!o.has(u.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(o)){if(s=a.length,s!=o.length)return!1;for(u=s;u--!==0;)if(a[u]!==o[u])return!1;return!0}if(a.constructor===RegExp)return a.source===o.source&&a.flags===o.flags;if(a.valueOf!==Object.prototype.valueOf&&typeof a.valueOf=="function"&&typeof o.valueOf=="function")return a.valueOf()===o.valueOf();if(a.toString!==Object.prototype.toString&&typeof a.toString=="function"&&typeof o.toString=="function")return a.toString()===o.toString();if(c=Object.keys(a),s=c.length,s!==Object.keys(o).length)return!1;for(u=s;u--!==0;)if(!Object.prototype.hasOwnProperty.call(o,c[u]))return!1;if(e&&a instanceof Element)return!1;for(u=s;u--!==0;)if(!((c[u]==="_owner"||c[u]==="__v"||c[u]==="__o")&&a.$$typeof)&&!i(a[c[u]],o[c[u]]))return!1;return!0}return a!==a&&o!==o}return Xa=function(o,s){try{return i(o,s)}catch(u){if((u.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw u}},Xa}var yg=wg();const Eg=Jt(yg);var Cg=[],kg=function(t,n,r){r===void 0&&(r={});var i=de.useRef(null),a={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||Cg},o=de.useState({styles:{popper:{position:a.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=o[0],u=o[1],c=de.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(p){var g=p.state,b=Object.keys(g.elements);_p.flushSync(function(){u({styles:Au(b.map(function(v){return[v,g.styles[v]||{}]})),attributes:Au(b.map(function(v){return[v,g.attributes[v]]}))})})},requires:["computeStyles"]}},[]),d=de.useMemo(function(){var m={onFirstUpdate:a.onFirstUpdate,placement:a.placement,strategy:a.strategy,modifiers:[].concat(a.modifiers,[c,{name:"applyStyles",enabled:!1}])};return Eg(i.current,m)?i.current||m:(i.current=m,m)},[a.onFirstUpdate,a.placement,a.strategy,a.modifiers,c]),h=de.useRef();return Nu(function(){h.current&&h.current.setOptions(d)},[d]),Nu(function(){if(!(t==null||n==null)){var m=r.createPopper||xg,p=m(t,n,d);return h.current=p,function(){p.destroy(),h.current=null}}},[t,n,r.createPopper]),{state:h.current?h.current.state:null,styles:s.styles,attributes:s.attributes,update:h.current?h.current.update:null,forceUpdate:h.current?h.current.forceUpdate:null}};function qu(e){var t=de.useRef(e);return t.current=e,de.useCallback(function(){return t.current},[])}var Ig=function(){};function zg(e){var t=e.initial,n=e.value,r=e.onChange,i=r===void 0?Ig:r;if(t===void 0&&n===void 0)throw new TypeError('Either "value" or "initial" variable must be set. Now both are undefined');var a=de.useState(t),o=a[0],s=a[1],u=qu(o),c=de.useCallback(function(h){var m=u(),p=typeof h=="function"?h(m):h;typeof p.persist=="function"&&p.persist(),s(p),typeof i=="function"&&i(p)},[u,i]),d=n!==void 0;return[d?n:o,d?i:c]}function Qu(e,t){return e===void 0&&(e=0),t===void 0&&(t=0),function(){return{width:0,height:0,top:t,right:e,bottom:t,left:e,x:0,y:0,toJSON:function(){return null}}}}var Fg=["styles","attributes"],Ru={getBoundingClientRect:Qu()},e1={closeOnOutsideClick:!0,closeOnTriggerHidden:!1,defaultVisible:!1,delayHide:0,delayShow:0,followCursor:!1,interactive:!1,mutationObserverOptions:{attributes:!0,childList:!0,subtree:!0},offset:[0,6],trigger:"hover"};function Mg(e,t){var n,r,i;e===void 0&&(e={}),t===void 0&&(t={});var a=Object.keys(e1).reduce(function(S,T){var G;return ve({},S,(G={},G[T]=S[T]!==void 0?S[T]:e1[T],G))},e),o=de.useMemo(function(){return[{name:"offset",options:{offset:a.offset}}]},Array.isArray(a.offset)?a.offset:[]),s=ve({},t,{placement:t.placement||a.placement,modifiers:t.modifiers||o}),u=de.useState(null),c=u[0],d=u[1],h=de.useState(null),m=h[0],p=h[1],g=zg({initial:a.defaultVisible,value:a.visible,onChange:a.onVisibleChange}),b=g[0],v=g[1],x=de.useRef();de.useEffect(function(){return function(){return clearTimeout(x.current)}},[]);var y=kg(a.followCursor?Ru:c,m,s),C=y.styles,M=y.attributes,E=Su(y,Fg),w=E.update,z=qu({visible:b,triggerRef:c,tooltipRef:m,finalConfig:a}),I=de.useCallback(function(S){return Array.isArray(a.trigger)?a.trigger.includes(S):a.trigger===S},Array.isArray(a.trigger)?a.trigger:[a.trigger]),k=de.useCallback(function(){clearTimeout(x.current),x.current=window.setTimeout(function(){return v(!1)},a.delayHide)},[a.delayHide,v]),F=de.useCallback(function(){clearTimeout(x.current),x.current=window.setTimeout(function(){return v(!0)},a.delayShow)},[a.delayShow,v]),N=de.useCallback(function(){z().visible?k():F()},[z,k,F]);de.useEffect(function(){if(z().finalConfig.closeOnOutsideClick){var S=function(G){var O,_=z(),A=_.tooltipRef,$=_.triggerRef,W=(G.composedPath==null||(O=G.composedPath())==null?void 0:O[0])||G.target;W instanceof Node&&A!=null&&$!=null&&!A.contains(W)&&!$.contains(W)&&k()};return document.addEventListener("mousedown",S),function(){return document.removeEventListener("mousedown",S)}}},[z,k]),de.useEffect(function(){if(!(c==null||!I("click")))return c.addEventListener("click",N),function(){return c.removeEventListener("click",N)}},[c,I,N]),de.useEffect(function(){if(!(c==null||!I("double-click")))return c.addEventListener("dblclick",N),function(){return c.removeEventListener("dblclick",N)}},[c,I,N]),de.useEffect(function(){if(!(c==null||!I("right-click"))){var S=function(G){G.preventDefault(),N()};return c.addEventListener("contextmenu",S),function(){return c.removeEventListener("contextmenu",S)}}},[c,I,N]),de.useEffect(function(){if(!(c==null||!I("focus")))return c.addEventListener("focus",F),c.addEventListener("blur",k),function(){c.removeEventListener("focus",F),c.removeEventListener("blur",k)}},[c,I,F,k]),de.useEffect(function(){if(!(c==null||!I("hover")))return c.addEventListener("mouseenter",F),c.addEventListener("mouseleave",k),function(){c.removeEventListener("mouseenter",F),c.removeEventListener("mouseleave",k)}},[c,I,F,k]),de.useEffect(function(){if(!(m==null||!I("hover")||!z().finalConfig.interactive))return m.addEventListener("mouseenter",F),m.addEventListener("mouseleave",k),function(){m.removeEventListener("mouseenter",F),m.removeEventListener("mouseleave",k)}},[m,I,F,k,z]);var B=E==null||(n=E.state)==null||(r=n.modifiersData)==null||(i=r.hide)==null?void 0:i.isReferenceHidden;de.useEffect(function(){a.closeOnTriggerHidden&&B&&k()},[a.closeOnTriggerHidden,k,B]),de.useEffect(function(){if(!a.followCursor||c==null)return;function S(T){var G=T.clientX,O=T.clientY;Ru.getBoundingClientRect=Qu(G,O),w?.()}return c.addEventListener("mousemove",S),function(){return c.removeEventListener("mousemove",S)}},[a.followCursor,c,w]),de.useEffect(function(){if(!(m==null||w==null||a.mutationObserverOptions==null)){var S=new MutationObserver(w);return S.observe(m,a.mutationObserverOptions),function(){return S.disconnect()}}},[a.mutationObserverOptions,m,w]);var H=function(T){return T===void 0&&(T={}),ve({},T,{style:ve({},T.style,C.popper)},M.popper,{"data-popper-interactive":a.interactive})},L=function(T){return T===void 0&&(T={}),ve({},T,M.arrow,{style:ve({},T.style,C.arrow),"data-popper-arrow":!0})};return ve({getArrowProps:L,getTooltipProps:H,setTooltipRef:p,setTriggerRef:d,tooltipRef:m,triggerRef:c,visible:b},E)}const et=({children:e,title:t,hideTooltip:n=!1,delayShow:r=!1,whiteSpace:i="initial",placement:a="top",className:o})=>{const{getArrowProps:s,getTooltipProps:u,setTooltipRef:c,setTriggerRef:d,visible:h}=Mg({placement:a}),[m,p]=l.useState(!r),[g,b]=l.useState(null),v=()=>{if(r){const y=setTimeout(()=>{p(!0)},1e3);b(y)}else p(!0)},x=()=>{g&&(clearTimeout(g),b(null)),r&&p(!1)};return f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:d,className:o,onMouseEnter:v,onMouseLeave:x,children:e}),h&&(r?m&&t:t)&&!n&&dr.createPortal(f.jsxs("div",{ref:c,...u({className:"tooltip-container",style:{whiteSpace:i}}),children:[t,f.jsx("div",{...s({className:"tooltip-arrow"})})]}),document.body)]})},Sg=({size:e=24,fill:t="currentColor",fillSecondary:n="white"})=>f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[f.jsx("path",{d:"M17.5128 13.6276L13.7184 11.9717C12.8016 11.5708 12.0696 10.8389 11.6688 9.92205L10.0128 6.12765C9.88322 5.83245 9.46802 5.83245 9.33842 6.12765L7.68242 9.92205C7.28162 10.8389 6.54962 11.5708 5.63282 11.9717L1.83122 13.63C1.53842 13.7572 1.53602 14.1748 1.83122 14.3044L5.69762 16.0132C6.61202 16.4188 7.34162 17.1532 7.73762 18.0724L9.34082 21.7948C9.46802 22.09 9.88802 22.0924 10.0152 21.7948L11.6688 18.0052C12.0696 17.0884 12.8016 16.3565 13.7184 15.9557L17.5128 14.2997C17.808 14.17 17.808 13.7548 17.5128 13.6252V13.6276Z",fill:t}),f.jsx("path",{d:"M22.2624 6.43876L20.0688 5.48116C19.5384 5.25076 19.116 4.82596 18.8856 4.29796L17.928 2.10436C17.8536 1.93396 17.6136 1.93396 17.5392 2.10436L16.5816 4.29796C16.3512 4.82836 15.9264 5.25076 15.3984 5.48116L13.2024 6.43876C13.032 6.51316 13.032 6.75316 13.2024 6.82756L15.4368 7.81636C15.9648 8.04916 16.3872 8.47636 16.6152 9.00676L17.5416 11.1572C17.616 11.3276 17.8584 11.3276 17.9328 11.1572L18.888 8.96836C19.1184 8.43796 19.5432 8.01556 20.0712 7.78516L22.2648 6.82756C22.4352 6.75316 22.4352 6.51316 22.2648 6.43876H22.2624Z",fill:t})]}),ln=({position:e="top",title:t="AI Extracted Field"})=>f.jsx(et,{placement:e,title:t,children:f.jsx("div",{className:"cursor-pointer",children:f.jsx(Sg,{size:12,fill:"#016DCF",fillSecondary:"#54A4EC"})})}),Nt=({isConditional:e})=>f.jsx("span",{className:`${e?"text-yellow-500":"text-red-500"}`,children:"*"}),Ag=({className:e,size:t=16})=>f.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[f.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),f.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),Ng=({className:e,size:t=16})=>f.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[f.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),f.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}),Dg=({className:e,size:t=16})=>f.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[f.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),f.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Lg=({className:e,size:t=16})=>f.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[f.jsx("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),f.jsx("path",{d:"M3 3v5h5"})]}),Ya=l.forwardRef(({id:e,label:t,onChange:n,errorMessage:r,successMessage:i,required:a,isRequiredConditional:o=!1,bg:s,tags:u,color:c,className:d,isPasswordField:h,setIsPasswordVisible:m,inputRef:p,tooltip:g,suffixIcon:b,revertBackValue:v,originalCase:x=!1,textSize:y,isAiExtracted:C=!1,isGTN:M=!1,gtnName:E=null,inputClassName:w="",inputStyle:z={},labelClassName:I,onBlur:k,isLiveField:F=!1,isClearable:N=!1,riskDetails:B,isRiskAnalysisOpen:H=!1,RiskDetailsCard:L,onAddGTNToDocument:S,...T},G)=>{const{t:O}=tn(),[_,A]=l.useState(!1),[$,W]=l.useState(!1),D=X=>{S&&S({key:E,value:X})};return f.jsxs("div",{className:Z("flex gap-0.5 relative",$&&M?"border rounded-lg border-primary-100 bg-primary-50 p-1 focus:ring-blue-500 focus:border-blue-500 dark:focus:ring-neutral-50 dark:focus:border-neutral-50":""),onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),children:[M&&!$?f.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5"}):null,f.jsxs("div",{className:Z("flex flex-col w-full",d),children:[f.jsx("style",{children:`
|
|
50
50
|
.dark input:-webkit-autofill,
|
|
51
51
|
.dark input:-webkit-autofill:hover,
|
|
52
52
|
.dark input:-webkit-autofill:focus {
|
|
@@ -64,7 +64,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
64
64
|
}
|
|
65
65
|
`}),t&&f.jsx("label",{id:e,htmlFor:"text",className:`mb-1 text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${x?"":"capitalize"} ${I||""}`,children:f.jsxs("div",{className:"flex flex-wrap items-center justify-between w-full",children:[f.jsxs("div",{className:"inline-flex flex-wrap items-center gap-1",children:[f.jsxs(se,{variant:"medium",size:"extra-small",appearance:"subtitle",children:[t,a?f.jsx(Nt,{isConditional:o}):a?f.jsx("span",{className:`ml-0.5 ${o?"text-yellow-500":"text-red-500"}`,children:"*"}):null]}),v?.length>0&&v!==T.value&&f.jsx(Be.Tooltip,{placement:"top",title:v,children:f.jsx("button",{className:"cursor-pointer",onClick:()=>n(v),type:"button",children:f.jsx(Lg,{size:16,className:"cursor-pointer pb-0.5 text-primary-600"})})}),F&&f.jsx(Ue.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),C&&f.jsx(ln,{}),f.jsx(St,{labels:u}),g&&f.jsx(Be.Tooltip,{placement:"top",title:g,children:f.jsx("div",{className:"cursor-pointer",children:f.jsx(Vt,{})})})]}),M&&$&&S?f.jsx("button",{id:`btn-base-input-field-add-to-document-${e}`,className:"cursor-pointer",onClick:()=>D(T?.value),type:"button",children:f.jsx(Be.Tooltip,{placement:"top",title:O("Add to document"),children:f.jsx(Ue.NoteAddOutlined,{className:"text-primary-600",sx:{fontSize:16}})})}):null]})}),f.jsx("label",{className:"relative block",children:f.jsxs("div",{className:"relative",children:[l.createElement("input",{...T,ref:p||G,id:e||t,key:e,required:a,style:{"--input-bg-color":"var(--tw-bg-opacity, 1) rgb(var(--bg-color))",...z},className:Z("border text-neutral-900 dark:text-black-100 border-solid h-[32px] hover:border-primary-500 dark:hover:border-primary-400",r?"border-red-300":i?"border-green-300":"border-neutral-200 dark:border-black-600",s&&s,c||"text-neutral-900 dark:text-black-100",y||"text-sm","rounded-md block w-full px-3 py-1.5 font-medium disabled:opacity-70 focus:outline-none focus:ring-2","focus:ring-primary-500 dark:focus:ring-primary-400 focus:border-primary-500 dark:focus:border-primary-400 disabled:!bg-neutral-50 dark:disabled:!bg-black-800 dark:disabled:placeholder:!text-black-400",w||"",H&&B?.color?`bg-${B?.color}-50 border-${B?.color}-300`:"bg-white dark:bg-black-600"),onChange:X=>{n(X.target.value)},onClick:X=>X.stopPropagation(),autoComplete:"off",onBlur:k}),h?f.jsx("button",{className:"absolute inset-y-0 flex items-center cursor-pointer right-2",onClick:()=>{A(!_),m?.(!_)},type:"button",children:_?f.jsx(Ag,{className:"text-gray-400",size:16}):f.jsx(Ng,{className:"text-gray-400",size:16})}):N&&T.value?f.jsx("button",{id:`btn-input-field-clear-${e}`,className:"absolute inset-y-0 flex items-center cursor-pointer right-2 focus:outline-none",onClick:X=>{X.stopPropagation(),n("")},type:"button",children:f.jsx(Dg,{className:"text-neutral-200 dark:text-black-500",size:16})}):b?f.jsx("div",{className:"absolute inset-y-0 flex items-center right-2",children:b}):null]})}),f.jsx(We.AnimatePresence,{children:r&&f.jsx(We.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:f.jsx(se,{className:"mt-1 text-error-500",appearance:"custom",size:"extra-small",variant:"medium",children:r})})}),f.jsx(We.AnimatePresence,{children:i&&f.jsx(We.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:f.jsx(se,{className:"mt-1 text-success-500 dark:text-success-300",appearance:"custom",size:"extra-small",variant:"medium",children:i})})})]}),$&&B&&H&&L&&f.jsx("div",{role:"tooltip",tabIndex:0,className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:X=>X.stopPropagation(),onMouseDown:X=>X.preventDefault(),onKeyDown:X=>{X.key==="Escape"&&W(!1)},children:f.jsx(L,{riskDetails:B})})]})});Ya.displayName="BaseInputField";const Tg=l.forwardRef(({label:e,placeholder:t,value:n,onChange:r,rows:i=4,message:a,messageType:o="default",defaultValue:s,required:u=!1,disabled:c=!1,className:d,inputRef:h,maxLength:m,originalCase:p=!1,noBorder:g=!1,id:b,inputStyle:v,...x},y)=>{const C=b||`textarea-${Math.random().toString(36).substr(2,9)}`,M=n?.length||0,E=m&&M>m-Math.min(50,m/5),w=m&&M>=m,z=()=>o==="error"?"border-red-300 dark:border-red-500 focus:border-red-500 focus:ring-red-200 dark:focus:ring-red-400":o==="success"?"border-green-300 dark:border-green-500 focus:border-green-500 focus:ring-green-200 dark:focus:ring-green-400":o==="info"?"border-blue-300 dark:border-blue-500 focus:border-blue-500 focus:ring-blue-200 dark:focus:ring-blue-400":"border-gray-300 dark:border-gray-600",I=()=>o==="error"?"text-red-500 dark:text-red-400":o==="success"?"text-green-500 dark:text-green-400":o==="info"?"text-blue-500 dark:text-blue-400":"text-gray-500 dark:text-gray-400";return f.jsxs("div",{className:Z("flex flex-col gap-0.5 relative",d),children:[e&&f.jsx("label",{htmlFor:C,className:Z("mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",{capitalize:!p}),children:f.jsxs(se,{size:"extra-small",variant:"medium",appearance:"subtitle",children:[e,u&&f.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})}),f.jsx("textarea",{...x,id:C,ref:y||h,onChange:k=>r(k.target.value),defaultValue:s,value:n,required:u,disabled:c,rows:i,placeholder:t,maxLength:m||void 0,style:v,className:Z("border rounded-lg bg-white dark:bg-black-600 block w-full py-2.5 px-3","font-inter font-medium text-sm transition-colors duration-200","focus:ring-2 focus:outline-none resize-vertical min-h-[2.5rem]",!g&&z(),{"border-none focus:border-none focus:ring-0":g,"bg-gray-50 dark:bg-gray-700 text-gray-400 dark:text-gray-500 cursor-not-allowed":c,"placeholder:text-gray-400 dark:placeholder:text-gray-500":c,"text-gray-900 dark:text-gray-100":!c,"placeholder:text-gray-400 dark:placeholder:text-gray-400":!c}),onClick:k=>k.stopPropagation(),"aria-invalid":a&&o==="error"?"true":"false","aria-describedby":a?`${C}-message`:void 0}),m&&f.jsxs(se,{className:"mt-0.5 text-right text-gray-600 dark:text-gray-400",appearance:"custom",size:"extra-small",children:[f.jsx("span",{className:Z({"text-red-500 dark:text-red-400":w,"text-yellow-500 dark:text-yellow-400":E&&!w}),children:M}),f.jsxs("span",{className:"text-gray-400 dark:text-gray-500",children:[" ","/ ",m]})]}),f.jsx(We.AnimatePresence,{children:a&&f.jsx(We.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${C}-message`,role:o==="error"?"alert":void 0,children:f.jsx(se,{className:Z("mt-1",I()),appearance:"custom",size:"extra-small",variant:"medium",children:a})})})]})}),t1=l.forwardRef(({label:e,placeholder:t,value:n,onChange:r,row:i=4,errorMessage:a,defaultValue:o,required:s,isRequiredConditional:u=!1,tags:c=[],disabled:d,className:h,inputRef:m,maxLength:p=void 0,tooltip:g="",originalCase:b=!1,isAiExtracted:v=!1,isGTN:x=!1,gtnName:y="",noBorder:C=!1,id:M,inputStyle:E,labelClassName:w,isLiveField:z=!1,onBlur:I,riskDetails:k,isRiskAnalysisOpen:F=!1,RiskDetailsCard:N,onAddGTNToDocument:B,...H},L)=>{const{t:S}=tn(),[T,G]=l.useState(!1),O=()=>{B&&B({key:y,value:n||""})};return f.jsxs("div",{ref:L,id:M,className:Z("flex gap-0.5 relative",T&&x?"border rounded-lg border-primary-100 bg-primary-50 p-1":""),onMouseEnter:()=>G(!0),onMouseLeave:()=>G(!1),children:[x&&!T?f.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5"}):null,f.jsxs("div",{className:Z("w-full flex flex-col"),children:[f.jsx("label",{htmlFor:"text",className:`mb-1 text-xs font-medium text-gray-600 dark:text-black-300 inline-flex items-center gap-1 ${b?"":"capitalize"} ${w||""}`,children:f.jsxs("div",{className:"w-full flex items-center justify-between flex-wrap",children:[f.jsxs("div",{className:"inline-flex items-center gap-1 flex-wrap",children:[f.jsxs(se,{size:"extra-small",variant:"medium",appearance:"subtitle",children:[e,s&&f.jsx(Nt,{})]}),z&&f.jsx(Ue.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),v&&f.jsx(ln,{}),f.jsx(St,{labels:c||[]}),g&&f.jsx(Be.Tooltip,{placement:"top",title:g,children:f.jsx("div",{className:"cursor-pointer",role:"button",tabIndex:0,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&_.preventDefault()},children:f.jsx(Vt,{})})})]}),x&&T?f.jsx("button",{id:"btn-textarea-field-add-to-document",className:"cursor-pointer",onClick:O,type:"button",children:f.jsx(Be.Tooltip,{placement:"top",title:S("Add to document"),children:f.jsx(Ue.NoteAddOutlined,{className:"text-primary-600",sx:{fontSize:16}})})}):null]})}),f.jsx("textarea",{...H,onBlur:I,onChange:_=>r(_.target.value),defaultValue:o,value:n,required:s,className:Z(`border rounded-lg bg-white dark:bg-black-600 focus:ring-primary-500 focus:border-primary-500
|
|
66
66
|
dark:focus:ring-primary-400 dark:focus:border-primary-400 block w-full py-2.5 px-3 font-inter font-medium text-sm
|
|
67
|
-
disabled:bg-neutral-50 dark:disabled:!bg-black-800 dark:disabled:placeholder:!text-black-400`,{"border-red-300":a,"border-gray-300 dark:border-black-700":!a,"text-neutral-400 dark:text-neutral-500":d,"text-neutral-900 dark:text-neutral-50":!d,"border-none":C,"focus:border-none":C,"placeholder:text-neutral-400 dark:placeholder:text-black-400":d,"placeholder:text-neutral-400 dark:placeholder:text-black-300":!d},h,F&&k?.color&&`!bg-${k.color}-50 border-${k.color}-300`),style:F&&k?{backgroundColor:k.hexBgColor||void 0,borderColor:k.hexBorderColor||void 0,...E}:E,rows:i,placeholder:t,disabled:d,maxLength:p||void 0,id:M,ref:m,onClick:_=>_.stopPropagation(),autoComplete:"off"}),p?f.jsxs(se,{className:"mt-0.5 text-right text-neutral-900 dark:text-white",appearance:"custom",size:"extra-small",children:[f.jsxs("span",{className:`${n?.length>=p?"text-error-500":n?.length>p-Math.min(50,p/5)?"text-warning-500 dark:text-warning-300":""}`,children:[n?.length||0," "]}),"/ ",p]}):null,a&&f.jsx(se,{className:"text-error-500 mt-1",appearance:"custom",size:"extra-small",variant:"medium",children:a})]}),T&&F&&k&&N&&f.jsx("div",{role:"tooltip",tabIndex:0,className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:_=>_.stopPropagation(),onMouseDown:_=>_.preventDefault(),onKeyDown:_=>{_.key==="Escape"&&G(!1)},children:f.jsx(N,{riskDetails:k})})]})});t1.displayName="TextAreaField";const rl=({children:e,className:t,variant:n="default",onClick:r,disabled:i,tooltip:a,tooltipPlacement:o="top",noborder:s,id:u})=>{const c="flex items-center",d={default:`bg-white dark:bg-black-800 hover:bg-neutral-100 dark:hover:bg-black-700 rounded-lg ${s?"":"border border-neutral-300 dark:border-neutral-800"} p-2 hover:opacity-80`,secondary:`bg-transparent rounded-lg ${s?"":"border border-neutral-300 dark:border-black-400"} p-2 hover:opacity-80`,native:`bg-transparent rounded-lg ${s?"":"border border-neutral-300"} p-2 hover:opacity-80`,ghost:"text-neutral-400 hover:bg-neutral-100 hover:text-neutral-600 dark:hover:text-neutral-200 dark:hover:bg-neutral-800 p-1 cursor-pointer rounded-full hover:scale-75 transition-all duration-500 ease-in-out"},h=i?"cursor-not-allowed opacity-50":"cursor-pointer";return f.jsx(et,{title:a,placement:o,delayShow:!0,children:f.jsx("button",{id:u,disabled:i,className:`${c} ${d[n]} ${t||""} ${h}`,onClick:r,children:e})})},n1=l.forwardRef(({id:e,label:t,placeholder:n,value:r,onChange:i,errorMessage:a,defaultValue:o,required:s=!1,isRequiredConditional:u=!1,masterDataName:c,masterDataColumnName:d,masterDataFormula:h,masterDataFilters:m,tags:p,index:g,tooltip:b="",originalCase:v=!1,color:x="",isGTN:y=!1,labelClassName:C,gtnName:M=null,isAiExtracted:E=!1,disabled:w=!1,reference:z={},isLiveField:I=!1,onBlur:k,onAddGTNToDocument:F,riskDetails:N,isRiskAnalysisOpen:B=!1,RiskDetailsCard:H,primaryColorShades:L,setDisableActions:S,showDeprecatedFieldWarning:T,MasterDataModal:G,parseMasterDataFormula:O},_)=>{const{t:A}=tn(),[$,W]=l.useState(!1),[D,X]=l.useState(null),[K,ae]=l.useState(!1),[ee,ue]=l.useState(""),[U,J]=l.useState(null),ce=l.useRef(null),Q=_||ce;l.useEffect(()=>{X(r)},[g]),l.useEffect(()=>{D!==null&&D!==r&&i(D,U)},[D,U]);const be=()=>{S?.(!K),ae(!K)},je=De=>{if(De.keyCode===9||De.key==="Enter"){const ut=Q.current||ce.current;ut&&(X(ee),ut.blur())}},R=(De,ut)=>{let bt=De;h&&O&&(bt=O(h,ut)),ue(""),X(bt),be(),J(ut)},oe=()=>{X(""),J(null)},Ce=De=>{F&&M&&F({key:M,value:De})},Qe=()=>{const De="border h-[32px] text-sm rounded-lg block w-full p-2.5 font-inter font-medium",ut=a?"border-red-300":B&&N?.color?`border-${N?.color}-300`:"border-gray-300 dark:border-black-600",bt="placeholder:text-neutral-900 dark:placeholder:text-black-400",pn=`${B&&N?.color?`bg-${N?.color}-50`:"bg-gray-200 dark:bg-black-600 "} ${x||"text-neutral-900 dark:text-black-200"}`;return`${De} ${ut} ${pn} ${bt}`},Re=()=>D!==null?D:h&&O?O(h,z):r;return l.useEffect(()=>{K&&!c&&(T?.(),ae(!1))},[K,c,T]),f.jsxs("div",{className:Z("flex gap-0.5 w-full relative",$&&y?"border rounded-lg border-primary-100 bg-primary-50 p-1":"",{"error-field":!!a}),onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),children:[y&&!$?f.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5"}):null,f.jsxs("div",{className:Z("flex flex-col w-full"),children:[f.jsx("label",{htmlFor:"text",className:`text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${v?"":"capitalize"} ${C||""}`,children:f.jsxs("div",{className:"w-full flex items-center justify-between flex-wrap",children:[f.jsxs("div",{className:"inline-flex items-center gap-1 flex-wrap",children:[f.jsxs(se,{variant:"medium",size:"extra-small",appearance:"subtitle",children:[t,s&&f.jsx(Nt,{isConditional:u})]}),I&&f.jsx(Ue.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),E&&f.jsx(ln,{}),f.jsx(St,{labels:p}),b&&f.jsx(et,{placement:"top",title:`${b}${h?` | ${h}`:""}`,children:f.jsx("div",{className:"cursor-pointer",children:f.jsx(Vt,{})})})]}),y&&$&&F?f.jsx("button",{id:"btn-master-data-input-add-to-document",className:"cursor-pointer",onClick:()=>Ce(r?.toString()||""),type:"button",children:f.jsx(Be.Tooltip,{placement:"top",title:A("Add to document"),children:f.jsx(Ue.NoteAddOutlined,{sx:{fontSize:16,color:L?.[600]||"var(--color-primary-600)"}})})}):null]})}),f.jsxs("label",{className:"relative block mt-1",children:[f.jsx("input",{id:e,ref:Q,required:s,placeholder:n,className:Qe(),onChange:De=>{i(De.target.value,U),X(De.target?.value)},onKeyDown:je,value:Re(),defaultValue:o,disabled:!0,autoComplete:"off",onBlur:k}),f.jsx(rl,{id:"btn-dynamic-data-input-rx-cross",onClick:oe,className:"absolute inset-y-0 right-1 flex items-center px-2 focus:border-transparent",variant:"ghost",disabled:w,children:f.jsx(Ue.CloseRounded,{className:"text-neutral-900 dark:text-black-300",sx:{fontSize:16}})}),f.jsx(rl,{id:"btn-dynamic-data-input-ai-outline-pic-center",onClick:be,className:"absolute inset-y-0 right-8 flex items-center px-2 focus:border-transparent",variant:"ghost",disabled:w,children:f.jsx(Ue.TableChartRounded,{className:"text-neutral-900 dark:text-black-300",sx:{fontSize:16}})})]}),a&&f.jsx(se,{className:"text-error-500 mt-1",appearance:"custom",size:"extra-small",variant:"medium",children:a}),K&&G&&f.jsx(G,{isVisible:K,onSelected:R,onClose:be,masterDataColumnName:d,masterDataFilters:m,masterDataName:c,masterDataId:c,showFilters:!0})]}),$&&N&&B&&H&&f.jsx("div",{role:"tooltip",tabIndex:0,className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:De=>De.stopPropagation(),onMouseDown:De=>De.preventDefault(),onKeyDown:De=>{De.key==="Escape"&&W(!1)},children:f.jsx(H,{riskDetails:N})})]})});n1.displayName="MasterDataInputField";var Za,r1;function i1(){if(r1)return Za;r1=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Za=e,Za}var Ja,l1;function Bg(){if(l1)return Ja;l1=1;var e=typeof Pn=="object"&&Pn&&Pn.Object===Object&&Pn;return Ja=e,Ja}var Ka,a1;function o1(){if(a1)return Ka;a1=1;var e=Bg(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Ka=n,Ka}var qa,s1;function Hg(){if(s1)return qa;s1=1;var e=o1(),t=function(){return e.Date.now()};return qa=t,qa}var Qa,u1;function jg(){if(u1)return Qa;u1=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Qa=t,Qa}var Ra,c1;function Pg(){if(c1)return Ra;c1=1;var e=jg(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Ra=n,Ra}var eo,d1;function f1(){if(d1)return eo;d1=1;var e=o1(),t=e.Symbol;return eo=t,eo}var to,h1;function Og(){if(h1)return to;h1=1;var e=f1(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(o){var s=n.call(o,i),u=o[i];try{o[i]=void 0;var c=!0}catch{}var d=r.call(o);return c&&(s?o[i]=u:delete o[i]),d}return to=a,to}var no,m1;function Vg(){if(m1)return no;m1=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return no=n,no}var ro,p1;function Gg(){if(p1)return ro;p1=1;var e=f1(),t=Og(),n=Vg(),r="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(s){return s==null?s===void 0?i:r:a&&a in Object(s)?t(s):n(s)}return ro=o,ro}var io,g1;function _g(){if(g1)return io;g1=1;function e(t){return t!=null&&typeof t=="object"}return io=e,io}var lo,v1;function $g(){if(v1)return lo;v1=1;var e=Gg(),t=_g(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return lo=r,lo}var ao,b1;function Wg(){if(b1)return ao;b1=1;var e=Pg(),t=i1(),n=$g(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function u(c){if(typeof c=="number")return c;if(n(c))return r;if(t(c)){var d=typeof c.valueOf=="function"?c.valueOf():c;c=t(d)?d+"":d}if(typeof c!="string")return c===0?c:+c;c=e(c);var h=a.test(c);return h||o.test(c)?s(c.slice(2),h?2:8):i.test(c)?r:+c}return ao=u,ao}var oo,x1;function Ug(){if(x1)return oo;x1=1;var e=i1(),t=Hg(),n=Wg(),r="Expected a function",i=Math.max,a=Math.min;function o(s,u,c){var d,h,m,p,g,b,v=0,x=!1,y=!1,C=!0;if(typeof s!="function")throw new TypeError(r);u=n(u)||0,e(c)&&(x=!!c.leading,y="maxWait"in c,m=y?i(n(c.maxWait)||0,u):m,C="trailing"in c?!!c.trailing:C);function M(H){var L=d,S=h;return d=h=void 0,v=H,p=s.apply(S,L),p}function E(H){return v=H,g=setTimeout(I,u),x?M(H):p}function w(H){var L=H-b,S=H-v,T=u-L;return y?a(T,m-S):T}function z(H){var L=H-b,S=H-v;return b===void 0||L>=u||L<0||y&&S>=m}function I(){var H=t();if(z(H))return k(H);g=setTimeout(I,w(H))}function k(H){return g=void 0,C&&d?M(H):(d=h=void 0,p)}function F(){g!==void 0&&clearTimeout(g),v=0,d=b=h=g=void 0}function N(){return g===void 0?p:k(t())}function B(){var H=t(),L=z(H);if(d=arguments,h=this,b=H,L){if(g===void 0)return E(b);if(y)return clearTimeout(g),g=setTimeout(I,u),M(b)}return g===void 0&&(g=setTimeout(I,u)),p}return B.cancel=F,B.flush=N,B}return oo=o,oo}var Xg=Ug();const Yg=Jt(Xg),Zg=e=>Array.isArray(e)?e.map(t=>typeof t=="string"||typeof t=="number"?t:t.value):e||null,Jg=e=>e.filter((t,n,r)=>r.findIndex(i=>i.value===t.value&&i.label===t.label)===n),Kg=({options:e,value:t,defaultValue:n})=>e?.length?Jg(e.map(r=>({...r,color:r.color}))):Array.isArray(t)&&t.length&&typeof t[0]=="object"&&"label"in t[0]?t.map(r=>({label:String(r?.label||""),value:String(r?.value||""),color:r?.color})):t&&typeof t=="object"&&"label"in t?[{label:String(t.label||""),value:String(t.value||""),color:t?.color}]:Array.isArray(n)&&n.length&&typeof n[0]=="object"&&"label"in n[0]?n.map(r=>({label:String(r?.label||""),value:String(r?.value||""),color:r?.color})):n&&typeof n=="object"&&"label"in n?[{label:String(n.label||""),value:String(n.value||""),color:n?.color}]:[],qg=({hasExistingData:e})=>f.jsx("div",{className:"!w-full px-3 py-1.5",children:e?f.jsx(Be.Skeleton,{paragraph:{rows:1,width:"100%"}}):f.jsx(Be.Skeleton,{})}),Qg=({showSelectAll:e,mode:t,options:n,searchValue:r,handleSelectAll:i,isAllSelected:a,menu:o,isLoading:s,hasExistingData:u,t:c})=>f.jsxs(f.Fragment,{children:[e&&t==="multiple"&&n.length>0&&r.trim().length===0&&f.jsx("div",{role:"button",tabIndex:0,className:"px-3 py-2 border-b border-gray-200 dark:border-gray-600 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700",onClick:d=>{d.stopPropagation(),i()},onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),i())},children:f.jsx(se,{size:"small",variant:"semibold",className:"text-primary-600 dark:text-primary-300",appearance:"custom",children:c(a?"Deselect all":"Select all")})}),o,s&&f.jsx(qg,{hasExistingData:u})]}),w1=l.forwardRef(({label:e,value:t,mode:n,errorMessage:r,selectOptions:i=[],required:a=!1,tags:o,className:s,onInputChange:u,tooltip:c,originalCase:d=!1,isAiExtracted:h=!1,isGTN:m=!1,gtnName:p=null,onChange:g,onSearch:b,debounceTimeout:v=500,filterOption:x=!0,onScroll:y,isLoading:C=!1,allowClear:M=!0,autoClearSearchValue:E=!0,fullOpacityLabel:w=!1,showAllTags:z=!1,customTagRender:I,inputStyles:k,disabled:F=!1,showSelectAll:N=!1,labelClassName:B,riskDetails:H,isRiskAnalysisOpen:L=!1,RiskDetailsCard:S,AddToDocumentIcon:T,primaryColorShades:G,UserAvatar:O,onAddGTNToDocument:_,isRequiredConditional:A,isLiveField:$=!1,...W},D)=>{const{t:X}=tn(),[K,ae]=l.useState(!1),ee=l.useRef(null),[ue,U]=l.useState(!1),[J,ce]=l.useState(""),Q=()=>{if(_){let ge="";be==null?ge="":typeof be=="string"||typeof be=="number"?ge=String(be):Array.isArray(be)?ge=be.map(Y=>typeof Y=="object"&&Y!==null&&"value"in Y?Y.value:Y).join(", "):typeof be=="object"&&"value"in be&&(ge=String(be.value)),_({key:p,value:ge})}},be=Zg(t),je=l.useMemo(()=>b?Yg(b,v):null,[b,v]),R=(ge,He)=>{if(ee.current&&W.id){const Y=document.getElementById(W.id);if(Y){const te=Array.isArray(He)?He.map(Le=>Le.value):He?.value;Y.dataset.selectedValue=JSON.stringify(te);const ye=new Event("change",{bubbles:!0});Object.defineProperty(ye,"target",{writable:!1,value:Y}),Y.dispatchEvent(ye);const Ie=new CustomEvent("pilot-change",{bubbles:!0,detail:{selector:`#${W.id}`,value:te,type:"change"}});Y.dispatchEvent(Ie)}}if(n==="tags"){const Y=Array.isArray(ge)?ge:[ge];g?.(Y?.map(te=>({label:te,value:te})))}else g?.(He)},oe=Kg({options:i,value:t,defaultValue:W?.defaultValue}),Ce=l.useMemo(()=>oe.length>0||be!=null,[oe,be]),Qe=l.useMemo(()=>{if(!n||n!=="multiple"||oe.length===0)return!1;const ge=Array.isArray(be)?be:[];return oe.map(Y=>Y.value).every(Y=>ge.some(te=>typeof te=="object"&&te!==null&&"value"in te?String(te.value)===String(Y):String(te)===String(Y)))},[be,oe,n]),Re=()=>{!n||n!=="multiple"||!g||g(Qe?[]:oe)},De=l.useCallback(ge=>{if(!ge)return;const He=new Event("submit",{bubbles:!0,cancelable:!0});ge.dispatchEvent(He);const Y=ge.querySelector('button[type="submit"]');Y&&Y.click()},[]),ut=l.useCallback(ge=>{if(ge.key==="Enter"&&!ue&&be){ge.preventDefault(),ge.stopPropagation();const He=ge.currentTarget.closest("form");De(He)}},[ue,be,De]),bt=l.useCallback(ge=>{const{label:He,value:Y,onClose:te}=ge,Ie=oe.find(ct=>String(ct.value)===String(Y))?.color||"blue",Le=ct=>{ct.preventDefault(),ct.stopPropagation()};return f.jsx("div",{className:"cursor-pointer me-1 inline-flex",children:f.jsx(fr,{label:He,color:Ie,size:"sm",onMouseDown:Le,onClick:F?void 0:te,isHashColor:!0,removable:!0})})},[oe,F]),pn=l.useCallback(ge=>{ce(ge),(u||je)?.(ge)},[u,je]);return f.jsxs("div",{ref:D,className:Z("flex gap-0.5 w-full relative",K&&m?"border rounded-lg border-primary-100 bg-primary-50 p-1":""),onMouseEnter:()=>ae(!0),onMouseLeave:()=>ae(!1),id:W.id,children:[m&&!K?f.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5"}):null,f.jsxs("div",{className:Z("w-full flex flex-col gap-1 risk-analysis-select-field",s),onMouseDown:ge=>ge.stopPropagation(),role:"group","aria-labelledby":e?"select-field-label":void 0,children:[e?f.jsx("label",{id:"select-field-label",htmlFor:"label",className:`text-xs font-medium text-gray-600 dark:text-black-300 inline-flex items-center gap-1 ${d?"":"capitalize"} ${B||""}`,children:f.jsxs("div",{className:"w-full flex items-center justify-between flex-wrap",children:[f.jsxs("div",{className:"inline-flex items-center gap-1 flex-wrap",children:[f.jsxs(se,{size:"extra-small",className:w?"text-black-900 dark:text-black-300":"",variant:"medium",appearance:"subtitle",children:[e,a&&f.jsx(Nt,{isConditional:A})]}),$&&f.jsx(Ue.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),h&&f.jsx(ln,{}),f.jsx(St,{labels:o}),c&&f.jsx(Be.Tooltip,{placement:"top",title:c,children:f.jsx("div",{className:"cursor-pointer",role:"button",tabIndex:0,onKeyDown:ge=>{(ge.key==="Enter"||ge.key===" ")&&ge.preventDefault()},children:f.jsx(Vt,{})})})]}),m&&K&&T?f.jsx("button",{id:"btn-select-field-base-add-to-document",className:"cursor-pointer",onClick:Q,type:"button",children:f.jsx(Be.Tooltip,{placement:"top",title:X("Add to document"),children:f.jsx(Ue.NoteAddOutlined,{className:"text-primary-600",sx:{fontSize:16}})})}):null]})}):null,f.jsx(Be.Select,{onKeyDown:ut,onOpenChange:U,disabled:F,className:`w-full text-black-900 dark:text-black-200 ${r&&a?"ant-select-status-error":"#e2e8f0"} ${L&&H?.color?"risk-select-field":""}`,classNames:{popup:{root:"!z-[5001]"}},style:{width:"100%","--risk-color":L&&H?.hexBgColor?H?.hexBgColor:"","--risk-border-color":L&&H?.hexBorderColor?H?.hexBorderColor:""},"aria-required":a,mode:n,value:be,onChange:R,filterOption:b?x:(ge,He)=>(He?.label||"")?.toLowerCase()?.includes(ge?.toLowerCase()),showSearch:!0,onSearch:pn||void 0,onPopupScroll:y,popupClassName:"select-field-dropdown-popup",popupRender:ge=>f.jsx(Qg,{showSelectAll:N,mode:n,options:oe,searchValue:J,handleSelectAll:Re,isAllSelected:Qe,menu:ge,isLoading:C,hasExistingData:Ce,t:X}),options:oe.map(({label:ge,value:He,color:Y,...te})=>({label:String(ge),value:String(He),key:String(He),id:String(He),color:Y,...te})),optionRender:ge=>{const He=ge?.data?.fullname;if(He&&O){const[Y,te]=He.split(" ");return f.jsxs("div",{className:"flex items-center justify-start gap-1",children:[f.jsx(O,{firstName:Y,lastName:te,profilePic:ge?.data?.url||"",size:"xs",enablePopper:!0,userId:ge?.data?.value}),f.jsx("span",{className:"ml-2",children:ge.label})]})}return f.jsx("span",{children:ge.label})},autoClearSearchValue:E,onClear:()=>g&&g(n==="tags"||n==="multiple"?[]:null),maxTagCount:n==="tags"&&z?void 0:"responsive",maxTagPlaceholder:ge=>f.jsx(Be.Tooltip,{styles:{root:{zIndex:5002}},trigger:"hover",title:ge.length>3?ge.slice(0,3).map(({label:He})=>He).join(", ")+"...":ge.map(({label:He})=>He).join(", "),overlayStyle:{pointerEvents:"none"},children:f.jsxs("span",{children:["+",ge.length," more"]})}),tagRender:I||bt,allowClear:M,...W}),r&&f.jsx(se,{className:"text-error-500",appearance:"custom",size:"extra-small",variant:"medium",children:r})]}),K&&H&&L&&S&&f.jsx("div",{role:"tooltip",tabIndex:0,className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:ge=>ge.stopPropagation(),onMouseDown:ge=>ge.preventDefault(),onKeyDown:ge=>{ge.key==="Escape"&&ae(!1)},children:f.jsx(S,{riskDetails:H})})]})});w1.displayName="SelectField";const y1=l.forwardRef(({id:e,label:t,checked:n,isChecked:r,onChange:i,disabled:a=!1,required:o=!1,message:s,messageType:u="default",wrapperClassName:c,checkboxClassName:d,labelClassName:h,size:m="medium",variant:p="default",labelPosition:g="right",checkboxProps:b},v)=>{const x=n!==void 0?n:r||!1,y=()=>{switch(m){case"small":return"w-3 h-3";case"large":return"w-5 h-5";default:return"w-4 h-4"}},C=()=>{if(u==="error")return"text-red-600 border-red-300 focus:ring-red-500 dark:focus:ring-red-600";if(u==="success")return"text-green-600 border-green-300 focus:ring-green-500 dark:focus:ring-green-600";if(u==="info")return"text-blue-600 border-blue-300 focus:ring-blue-500 dark:focus:ring-blue-600";switch(p){case"outline":return"text-primary-600 bg-transparent border-neutral-300 focus:ring-primary-500 dark:focus:ring-primary-600";case"solid":return"text-primary-600 bg-primary-50 border-primary-300 focus:ring-primary-500 dark:focus:ring-primary-600 dark:bg-primary-900/20";default:return"text-primary-600 bg-gray-100 border-gray-300 focus:ring-primary-500 dark:focus:ring-primary-600 dark:bg-neutral-600 dark:border-gray-600"}},M=()=>u==="error"?"text-red-500 dark:text-red-400":u==="success"?"text-green-500 dark:text-green-400":u==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",E=()=>{switch(m){case"small":return"extra-small";case"large":return"medium";default:return"small"}},w=k=>{i(k.target.checked,k)},z=f.jsx(Be.Checkbox,{...b,ref:v,id:e,checked:x,onChange:w,disabled:a,className:Z("rounded focus:ring-2 focus:ring-offset-gray-800 transition-colors duration-200",y(),C(),a&&"opacity-50 cursor-not-allowed",d),"aria-required":o,"aria-invalid":s&&u==="error"?"true":"false","aria-describedby":s?`${e}-message`:void 0}),I=t?f.jsx("label",{htmlFor:e,className:Z("font-medium cursor-pointer transition-colors duration-200",a?"text-neutral-400 dark:text-neutral-600 cursor-not-allowed":"text-neutral-900 dark:text-neutral-100",g==="right"?"ml-2":"mr-2",h),children:f.jsxs(se,{variant:"medium",size:E(),appearance:"body",children:[t,o&&f.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})}):null;return f.jsxs("div",{className:Z("flex flex-col",c),children:[f.jsx("div",{className:Z("flex items-center",g==="left"&&"flex-row-reverse justify-end"),children:g==="left"?f.jsxs(f.Fragment,{children:[z,I]}):f.jsxs(f.Fragment,{children:[z,I]})}),f.jsx(We.AnimatePresence,{children:s&&f.jsx(We.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${e}-message`,role:u==="error"?"alert":void 0,children:f.jsx(se,{className:Z("mt-1",M()),appearance:"custom",size:"extra-small",variant:"medium",children:s})})})]})});y1.displayName="Checkbox";const Rg=({label:e,isChecked:t,onChange:n,id:r,...i})=>f.jsxs("div",{className:"flex items-center",children:[f.jsx(Be.Checkbox,{checked:t,onChange:n,id:r,type:"checkbox",value:"",className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:!bg-neutral-600 dark:border-gray-600",...i}),f.jsx("label",{className:"ml-2 text-sm font-medium text-neutral-900 dark:text-neutral-100",children:e})]}),E1=l.forwardRef(({id:e,label:t,value:n,defaultValue:r="#000000",onChange:i,onColorChange:a,disabled:o=!1,required:s=!1,message:u,messageType:c="default",wrapperClassName:d,inputClassName:h,labelClassName:m,size:p="medium",showValue:g=!1,valueFormat:b="hex",inputProps:v,helpText:x},y)=>{const C=n!==void 0?n:r,M=()=>{switch(p){case"small":return"w-8 h-8";case"large":return"w-16 h-16";default:return"w-12 h-12"}},E=()=>c==="error"?"text-red-500 dark:text-red-400":c==="success"?"text-green-500 dark:text-green-400":c==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",w=()=>c==="error"?"border-red-300 focus:border-red-500 focus:ring-red-200 dark:focus:ring-red-400/20":c==="success"?"border-green-300 focus:border-green-500 focus:ring-green-200 dark:focus:ring-green-400/20":c==="info"?"border-blue-300 focus:border-blue-500 focus:ring-blue-200 dark:focus:ring-blue-400/20":"border-neutral-300 dark:border-neutral-600 focus:border-primary-500 dark:focus:border-primary-400 focus:ring-primary-200 dark:focus:ring-primary-400/20",z=()=>{switch(p){case"small":return"extra-small";case"large":return"medium";default:return"small"}},I=B=>{const H=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(B);if(!H)return B;const L=parseInt(H[1],16),S=parseInt(H[2],16),T=parseInt(H[3],16);return`rgb(${L}, ${S}, ${T})`},k=B=>{const H=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(B);if(!H)return B;const L=parseInt(H[1],16)/255,S=parseInt(H[2],16)/255,T=parseInt(H[3],16)/255,G=Math.max(L,S,T),O=Math.min(L,S,T);let _=0,A=0;const $=(G+O)/2;if(G!==O){const W=G-O;switch(A=$>.5?W/(2-G-O):W/(G+O),G){case L:_=(S-T)/W+(S<T?6:0);break;case S:_=(T-L)/W+2;break;case T:_=(L-S)/W+4;break}_/=6}return`hsl(${Math.round(_*360)}, ${Math.round(A*100)}%, ${Math.round($*100)}%)`},F=()=>{switch(b){case"rgb":return I(C);case"hsl":return k(C);default:return C.toUpperCase()}},N=B=>{const H=B.target.value;i(H,B),a?.(H)};return f.jsxs("div",{className:Z("flex flex-col w-full",d),children:[t&&f.jsx("label",{htmlFor:e,className:Z("mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",m),children:f.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:f.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:f.jsxs(se,{variant:"medium",size:z(),appearance:"subtitle",children:[t,s&&f.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})})}),x&&f.jsx(se,{className:"mb-2 text-neutral-600 dark:text-neutral-400",appearance:"custom",size:"extra-small",variant:"regular",children:x}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"relative",children:f.jsx("input",{...v,ref:y,type:"color",id:e,value:C,onChange:N,disabled:o,required:s,className:Z("border rounded-md cursor-pointer transition-all duration-200","focus:outline-none focus:ring-2",M(),w(),o&&"opacity-50 cursor-not-allowed",h),style:{backgroundColor:C},"aria-required":s,"aria-invalid":u&&c==="error"?"true":"false","aria-describedby":u||x?`${e}-description`:void 0})}),g&&f.jsx("div",{className:"flex-1",children:f.jsx(se,{variant:"medium",size:"small",appearance:"body",className:"font-mono text-neutral-700 dark:text-neutral-300",children:F()})})]}),f.jsx(We.AnimatePresence,{children:u&&f.jsx(We.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${e}-description`,role:c==="error"?"alert":void 0,children:f.jsx(se,{className:Z("mt-1",E()),appearance:"custom",size:"extra-small",variant:"medium",children:u})})}),x&&!u&&f.jsx("div",{id:`${e}-description`,className:"sr-only",children:x})]})});E1.displayName="ColorPicker";function Rn(e){"@babel/helpers - typeof";return Rn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rn(e)}function e7(e,t){if(Rn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function C1(e){var t=e7(e,"string");return Rn(t)=="symbol"?t:t+""}function Qr(e,t,n){return(t=C1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ee(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k1(Object(n),!0).forEach(function(r){Qr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function t7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,C1(r.key),r)}}function n7(e,t,n){return t&&I1(e.prototype,t),n&&I1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function so(e,t){return so=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},so(e,t)}function r7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&so(e,t)}function il(e){return il=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},il(e)}function z1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(z1=function(){return!!e})()}function i7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l7(e,t){if(t&&(Rn(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return i7(e)}function a7(e){var t=z1();return function(){var n,r=il(e);if(t){var i=il(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l7(this,n)}}function uo(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o7(e){if(Array.isArray(e))return uo(e)}function s7(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function F1(e,t){if(e){if(typeof e=="string")return uo(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uo(e,t):void 0}}function u7(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
67
|
+
disabled:bg-neutral-50 dark:disabled:!bg-black-800 dark:disabled:placeholder:!text-black-400`,{"border-red-300":a,"border-gray-300 dark:border-black-700":!a,"text-neutral-400 dark:text-neutral-500":d,"text-neutral-900 dark:text-neutral-50":!d,"border-none":C,"focus:border-none":C,"placeholder:text-neutral-400 dark:placeholder:text-black-400":d,"placeholder:text-neutral-400 dark:placeholder:text-black-300":!d},h,F&&k?.color&&`!bg-${k.color}-50 border-${k.color}-300`),style:F&&k?{backgroundColor:k.hexBgColor||void 0,borderColor:k.hexBorderColor||void 0,...E}:E,rows:i,placeholder:t,disabled:d,maxLength:p||void 0,id:M,ref:m,onClick:_=>_.stopPropagation(),autoComplete:"off"}),p?f.jsxs(se,{className:"mt-0.5 text-right text-neutral-900 dark:text-white",appearance:"custom",size:"extra-small",children:[f.jsxs("span",{className:`${n?.length>=p?"text-error-500":n?.length>p-Math.min(50,p/5)?"text-warning-500 dark:text-warning-300":""}`,children:[n?.length||0," "]}),"/ ",p]}):null,a&&f.jsx(se,{className:"text-error-500 mt-1",appearance:"custom",size:"extra-small",variant:"medium",children:a})]}),T&&F&&k&&N&&f.jsx("div",{role:"tooltip",tabIndex:0,className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:_=>_.stopPropagation(),onMouseDown:_=>_.preventDefault(),onKeyDown:_=>{_.key==="Escape"&&G(!1)},children:f.jsx(N,{riskDetails:k})})]})});t1.displayName="TextAreaField";const rl=({children:e,className:t,variant:n="default",onClick:r,disabled:i,tooltip:a,tooltipPlacement:o="top",noborder:s,id:u})=>{const c="flex items-center",d={default:`bg-white dark:bg-black-800 hover:bg-neutral-100 dark:hover:bg-black-700 rounded-lg ${s?"":"border border-neutral-300 dark:border-neutral-800"} p-2 hover:opacity-80`,secondary:`bg-transparent rounded-lg ${s?"":"border border-neutral-300 dark:border-black-400"} p-2 hover:opacity-80`,native:`bg-transparent rounded-lg ${s?"":"border border-neutral-300"} p-2 hover:opacity-80`,ghost:"text-neutral-400 hover:bg-neutral-100 hover:text-neutral-600 dark:hover:text-neutral-200 dark:hover:bg-neutral-800 p-1 cursor-pointer rounded-full hover:scale-75 transition-all duration-500 ease-in-out"},h=i?"cursor-not-allowed opacity-50":"cursor-pointer";return f.jsx(et,{title:a,placement:o,delayShow:!0,children:f.jsx("button",{id:u,disabled:i,className:`${c} ${d[n]} ${t||""} ${h}`,onClick:r,children:e})})},n1=l.forwardRef(({id:e,label:t,placeholder:n,value:r,onChange:i,errorMessage:a,defaultValue:o,required:s=!1,isRequiredConditional:u=!1,masterDataName:c,masterDataColumnName:d,masterDataFormula:h,masterDataFilters:m,tags:p,index:g,tooltip:b="",originalCase:v=!1,color:x="",isGTN:y=!1,labelClassName:C,gtnName:M=null,isAiExtracted:E=!1,disabled:w=!1,reference:z={},isLiveField:I=!1,onBlur:k,onAddGTNToDocument:F,riskDetails:N,isRiskAnalysisOpen:B=!1,RiskDetailsCard:H,primaryColorShades:L,setDisableActions:S,showDeprecatedFieldWarning:T,MasterDataModal:G,parseMasterDataFormula:O},_)=>{const{t:A}=tn(),[$,W]=l.useState(!1),[D,X]=l.useState(null),[K,ae]=l.useState(!1),[ee,ue]=l.useState(""),[U,J]=l.useState(null),ce=l.useRef(null),Q=_||ce;l.useEffect(()=>{X(r)},[g]),l.useEffect(()=>{D!==null&&D!==r&&i(D,U)},[D,U]);const be=()=>{S?.(!K),ae(!K)},je=De=>{if(De.keyCode===9||De.key==="Enter"){const ut=Q.current||ce.current;ut&&(X(ee),ut.blur())}},R=(De,ut)=>{let bt=De;h&&O&&(bt=O(h,ut)),ue(""),X(bt),be(),J(ut)},oe=()=>{X(""),J(null)},Ce=De=>{F&&M&&F({key:M,value:De})},Qe=()=>{const De="border h-[32px] text-sm rounded-lg block w-full p-2.5 font-inter font-medium",ut=a?"border-red-300":B&&N?.color?`border-${N?.color}-300`:"border-gray-300 dark:border-black-600",bt="placeholder:text-neutral-900 dark:placeholder:text-black-400",pn=`${B&&N?.color?`bg-${N?.color}-50`:"bg-gray-200 dark:bg-black-600 "} ${x||"text-neutral-900 dark:text-black-200"}`;return`${De} ${ut} ${pn} ${bt}`},Re=()=>D!==null?D:h&&O?O(h,z):r;return l.useEffect(()=>{K&&!c&&(T?.(),ae(!1))},[K,c,T]),f.jsxs("div",{className:Z("flex gap-0.5 w-full relative",$&&y?"border rounded-lg border-primary-100 bg-primary-50 p-1":"",{"error-field":!!a}),onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),children:[y&&!$?f.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5"}):null,f.jsxs("div",{className:Z("flex flex-col w-full"),children:[f.jsx("label",{htmlFor:"text",className:`text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${v?"":"capitalize"} ${C||""}`,children:f.jsxs("div",{className:"w-full flex items-center justify-between flex-wrap",children:[f.jsxs("div",{className:"inline-flex items-center gap-1 flex-wrap",children:[f.jsxs(se,{variant:"medium",size:"extra-small",appearance:"subtitle",children:[t,s&&f.jsx(Nt,{isConditional:u})]}),I&&f.jsx(Ue.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),E&&f.jsx(ln,{}),f.jsx(St,{labels:p}),b&&f.jsx(et,{placement:"top",title:`${b}${h?` | ${h}`:""}`,children:f.jsx("div",{className:"cursor-pointer",children:f.jsx(Vt,{})})})]}),y&&$&&F?f.jsx("button",{id:"btn-master-data-input-add-to-document",className:"cursor-pointer",onClick:()=>Ce(r?.toString()||""),type:"button",children:f.jsx(Be.Tooltip,{placement:"top",title:A("Add to document"),children:f.jsx(Ue.NoteAddOutlined,{sx:{fontSize:16,color:L?.[600]||"var(--color-primary-600)"}})})}):null]})}),f.jsxs("label",{className:"relative block mt-1",children:[f.jsx("input",{id:e,ref:Q,required:s,placeholder:n,className:Qe(),onChange:De=>{i(De.target.value,U),X(De.target?.value)},onKeyDown:je,value:Re(),defaultValue:o,disabled:!0,autoComplete:"off",onBlur:k}),f.jsx(rl,{id:"btn-dynamic-data-input-rx-cross",onClick:oe,className:"absolute inset-y-0 right-1 flex items-center px-2 focus:border-transparent",variant:"ghost",disabled:w,children:f.jsx(Ue.CloseRounded,{className:"text-neutral-900 dark:text-black-300",sx:{fontSize:16}})}),f.jsx(rl,{id:"btn-dynamic-data-input-ai-outline-pic-center",onClick:be,className:"absolute inset-y-0 right-8 flex items-center px-2 focus:border-transparent",variant:"ghost",disabled:w,children:f.jsx(Ue.TableChartRounded,{className:"text-neutral-900 dark:text-black-300",sx:{fontSize:16}})})]}),a&&f.jsx(se,{className:"text-error-500 mt-1",appearance:"custom",size:"extra-small",variant:"medium",children:a}),K&&G&&f.jsx(G,{isVisible:K,onSelected:R,onClose:be,masterDataColumnName:d,masterDataFilters:m,masterDataName:c,masterDataId:c,showFilters:!0})]}),$&&N&&B&&H&&f.jsx("div",{role:"tooltip",tabIndex:0,className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:De=>De.stopPropagation(),onMouseDown:De=>De.preventDefault(),onKeyDown:De=>{De.key==="Escape"&&W(!1)},children:f.jsx(H,{riskDetails:N})})]})});n1.displayName="MasterDataInputField";var Za,r1;function i1(){if(r1)return Za;r1=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Za=e,Za}var Ja,l1;function Bg(){if(l1)return Ja;l1=1;var e=typeof Pn=="object"&&Pn&&Pn.Object===Object&&Pn;return Ja=e,Ja}var Ka,a1;function o1(){if(a1)return Ka;a1=1;var e=Bg(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Ka=n,Ka}var qa,s1;function Hg(){if(s1)return qa;s1=1;var e=o1(),t=function(){return e.Date.now()};return qa=t,qa}var Qa,u1;function jg(){if(u1)return Qa;u1=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Qa=t,Qa}var Ra,c1;function Pg(){if(c1)return Ra;c1=1;var e=jg(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Ra=n,Ra}var eo,d1;function f1(){if(d1)return eo;d1=1;var e=o1(),t=e.Symbol;return eo=t,eo}var to,h1;function Og(){if(h1)return to;h1=1;var e=f1(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(o){var s=n.call(o,i),u=o[i];try{o[i]=void 0;var c=!0}catch{}var d=r.call(o);return c&&(s?o[i]=u:delete o[i]),d}return to=a,to}var no,m1;function Vg(){if(m1)return no;m1=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return no=n,no}var ro,p1;function Gg(){if(p1)return ro;p1=1;var e=f1(),t=Og(),n=Vg(),r="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(s){return s==null?s===void 0?i:r:a&&a in Object(s)?t(s):n(s)}return ro=o,ro}var io,g1;function _g(){if(g1)return io;g1=1;function e(t){return t!=null&&typeof t=="object"}return io=e,io}var lo,v1;function $g(){if(v1)return lo;v1=1;var e=Gg(),t=_g(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return lo=r,lo}var ao,b1;function Wg(){if(b1)return ao;b1=1;var e=Pg(),t=i1(),n=$g(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function u(c){if(typeof c=="number")return c;if(n(c))return r;if(t(c)){var d=typeof c.valueOf=="function"?c.valueOf():c;c=t(d)?d+"":d}if(typeof c!="string")return c===0?c:+c;c=e(c);var h=a.test(c);return h||o.test(c)?s(c.slice(2),h?2:8):i.test(c)?r:+c}return ao=u,ao}var oo,x1;function Ug(){if(x1)return oo;x1=1;var e=i1(),t=Hg(),n=Wg(),r="Expected a function",i=Math.max,a=Math.min;function o(s,u,c){var d,h,m,p,g,b,v=0,x=!1,y=!1,C=!0;if(typeof s!="function")throw new TypeError(r);u=n(u)||0,e(c)&&(x=!!c.leading,y="maxWait"in c,m=y?i(n(c.maxWait)||0,u):m,C="trailing"in c?!!c.trailing:C);function M(H){var L=d,S=h;return d=h=void 0,v=H,p=s.apply(S,L),p}function E(H){return v=H,g=setTimeout(I,u),x?M(H):p}function w(H){var L=H-b,S=H-v,T=u-L;return y?a(T,m-S):T}function z(H){var L=H-b,S=H-v;return b===void 0||L>=u||L<0||y&&S>=m}function I(){var H=t();if(z(H))return k(H);g=setTimeout(I,w(H))}function k(H){return g=void 0,C&&d?M(H):(d=h=void 0,p)}function F(){g!==void 0&&clearTimeout(g),v=0,d=b=h=g=void 0}function N(){return g===void 0?p:k(t())}function B(){var H=t(),L=z(H);if(d=arguments,h=this,b=H,L){if(g===void 0)return E(b);if(y)return clearTimeout(g),g=setTimeout(I,u),M(b)}return g===void 0&&(g=setTimeout(I,u)),p}return B.cancel=F,B.flush=N,B}return oo=o,oo}var Xg=Ug();const Yg=Jt(Xg),Zg=e=>Array.isArray(e)?e.map(t=>typeof t=="string"||typeof t=="number"?t:t.value):e||null,Jg=e=>e.filter((t,n,r)=>r.findIndex(i=>i.value===t.value&&i.label===t.label)===n),Kg=({options:e,value:t,defaultValue:n})=>e?.length?Jg(e.map(r=>({...r,color:r.color}))):Array.isArray(t)&&t.length&&typeof t[0]=="object"&&"label"in t[0]?t.map(r=>({label:String(r?.label||""),value:String(r?.value||""),color:r?.color})):t&&typeof t=="object"&&"label"in t?[{label:String(t.label||""),value:String(t.value||""),color:t?.color}]:Array.isArray(n)&&n.length&&typeof n[0]=="object"&&"label"in n[0]?n.map(r=>({label:String(r?.label||""),value:String(r?.value||""),color:r?.color})):n&&typeof n=="object"&&"label"in n?[{label:String(n.label||""),value:String(n.value||""),color:n?.color}]:[],qg=({hasExistingData:e})=>f.jsx("div",{className:"!w-full px-3 py-1.5",children:e?f.jsx(Be.Skeleton,{paragraph:{rows:1,width:"100%"}}):f.jsx(Be.Skeleton,{})}),Qg=({showSelectAll:e,mode:t,options:n,searchValue:r,handleSelectAll:i,isAllSelected:a,menu:o,isLoading:s,hasExistingData:u,t:c})=>f.jsxs(f.Fragment,{children:[e&&t==="multiple"&&n.length>0&&r.trim().length===0&&f.jsx("div",{role:"button",tabIndex:0,className:"px-3 py-2 border-b border-gray-200 dark:border-gray-600 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700",onClick:d=>{d.stopPropagation(),i()},onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),i())},children:f.jsx(se,{size:"small",variant:"semibold",className:"text-primary-600 dark:text-primary-300",appearance:"custom",children:c(a?"Deselect all":"Select all")})}),o,s&&f.jsx(qg,{hasExistingData:u})]}),w1=l.forwardRef(({label:e,value:t,mode:n,errorMessage:r,selectOptions:i=[],required:a=!1,tags:o,className:s,onInputChange:u,tooltip:c,originalCase:d=!1,isAiExtracted:h=!1,isGTN:m=!1,gtnName:p=null,onChange:g,onSearch:b,debounceTimeout:v=500,filterOption:x=!0,onScroll:y,isLoading:C=!1,allowClear:M=!0,autoClearSearchValue:E=!0,fullOpacityLabel:w=!1,showAllTags:z=!1,customTagRender:I,inputStyles:k,disabled:F=!1,showSelectAll:N=!1,labelClassName:B,riskDetails:H,isRiskAnalysisOpen:L=!1,RiskDetailsCard:S,AddToDocumentIcon:T,primaryColorShades:G,UserAvatar:O,onAddGTNToDocument:_,isRequiredConditional:A,isLiveField:$=!1,...W},D)=>{const{t:X}=tn(),[K,ae]=l.useState(!1),ee=l.useRef(null),[ue,U]=l.useState(!1),[J,ce]=l.useState(""),Q=()=>{if(_){let ge="";be==null?ge="":typeof be=="string"||typeof be=="number"?ge=String(be):Array.isArray(be)?ge=be.map(Y=>typeof Y=="object"&&Y!==null&&"value"in Y?Y.value:Y).join(", "):typeof be=="object"&&"value"in be&&(ge=String(be.value)),_({key:p,value:ge})}},be=Zg(t),je=l.useMemo(()=>b?Yg(b,v):null,[b,v]),R=(ge,He)=>{if(ee.current&&W.id){const Y=document.getElementById(W.id);if(Y){const te=Array.isArray(He)?He.map(Le=>Le.value):He?.value;Y.dataset.selectedValue=JSON.stringify(te);const ye=new Event("change",{bubbles:!0});Object.defineProperty(ye,"target",{writable:!1,value:Y}),Y.dispatchEvent(ye);const Ie=new CustomEvent("pilot-change",{bubbles:!0,detail:{selector:`#${W.id}`,value:te,type:"change"}});Y.dispatchEvent(Ie)}}if(n==="tags"){const Y=Array.isArray(ge)?ge:[ge];g?.(Y?.map(te=>({label:te,value:te})))}else g?.(He)},oe=Kg({options:i,value:t,defaultValue:W?.defaultValue}),Ce=l.useMemo(()=>oe.length>0||be!=null,[oe,be]),Qe=l.useMemo(()=>{if(!n||n!=="multiple"||oe.length===0)return!1;const ge=Array.isArray(be)?be:[];return oe.map(Y=>Y.value).every(Y=>ge.some(te=>typeof te=="object"&&te!==null&&"value"in te?String(te.value)===String(Y):String(te)===String(Y)))},[be,oe,n]),Re=()=>{!n||n!=="multiple"||!g||g(Qe?[]:oe)},De=l.useCallback(ge=>{if(!ge)return;const He=new Event("submit",{bubbles:!0,cancelable:!0});ge.dispatchEvent(He);const Y=ge.querySelector('button[type="submit"]');Y&&Y.click()},[]),ut=l.useCallback(ge=>{if(ge.key==="Enter"&&!ue&&be){ge.preventDefault(),ge.stopPropagation();const He=ge.currentTarget.closest("form");De(He)}},[ue,be,De]),bt=l.useCallback(ge=>{const{label:He,value:Y,onClose:te}=ge,Ie=oe.find(ct=>String(ct.value)===String(Y))?.color||"blue",Le=ct=>{ct.preventDefault(),ct.stopPropagation()};return f.jsx("div",{className:"cursor-pointer me-1 inline-flex",children:f.jsx(fr,{label:He,color:Ie,size:"sm",onMouseDown:Le,onClick:F?void 0:te,isHashColor:!0,removable:!0,onRemove:te})})},[oe,F]),pn=l.useCallback(ge=>{ce(ge),(u||je)?.(ge)},[u,je]);return f.jsxs("div",{ref:D,className:Z("flex gap-0.5 w-full relative",K&&m?"border rounded-lg border-primary-100 bg-primary-50 p-1":""),onMouseEnter:()=>ae(!0),onMouseLeave:()=>ae(!1),id:W.id,children:[m&&!K?f.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5"}):null,f.jsxs("div",{className:Z("w-full flex flex-col gap-1 risk-analysis-select-field",s),onMouseDown:ge=>ge.stopPropagation(),role:"group","aria-labelledby":e?"select-field-label":void 0,children:[e?f.jsx("label",{id:"select-field-label",htmlFor:"label",className:`text-xs font-medium text-gray-600 dark:text-black-300 inline-flex items-center gap-1 ${d?"":"capitalize"} ${B||""}`,children:f.jsxs("div",{className:"w-full flex items-center justify-between flex-wrap",children:[f.jsxs("div",{className:"inline-flex items-center gap-1 flex-wrap",children:[f.jsxs(se,{size:"extra-small",className:w?"text-black-900 dark:text-black-300":"",variant:"medium",appearance:"subtitle",children:[e,a&&f.jsx(Nt,{isConditional:A})]}),$&&f.jsx(Ue.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),h&&f.jsx(ln,{}),f.jsx(St,{labels:o}),c&&f.jsx(Be.Tooltip,{placement:"top",title:c,children:f.jsx("div",{className:"cursor-pointer",role:"button",tabIndex:0,onKeyDown:ge=>{(ge.key==="Enter"||ge.key===" ")&&ge.preventDefault()},children:f.jsx(Vt,{})})})]}),m&&K&&T?f.jsx("button",{id:"btn-select-field-base-add-to-document",className:"cursor-pointer",onClick:Q,type:"button",children:f.jsx(Be.Tooltip,{placement:"top",title:X("Add to document"),children:f.jsx(Ue.NoteAddOutlined,{className:"text-primary-600",sx:{fontSize:16}})})}):null]})}):null,f.jsx(Be.Select,{onKeyDown:ut,onOpenChange:U,disabled:F,className:`w-full text-black-900 dark:text-black-200 ${r&&a?"ant-select-status-error":"#e2e8f0"} ${L&&H?.color?"risk-select-field":""}`,classNames:{popup:{root:"!z-[5001]"}},style:{width:"100%","--risk-color":L&&H?.hexBgColor?H?.hexBgColor:"","--risk-border-color":L&&H?.hexBorderColor?H?.hexBorderColor:""},"aria-required":a,mode:n,value:be,onChange:R,filterOption:b?x:(ge,He)=>(He?.label||"")?.toLowerCase()?.includes(ge?.toLowerCase()),showSearch:!0,onSearch:pn||void 0,onPopupScroll:y,popupClassName:"select-field-dropdown-popup",popupRender:ge=>f.jsx(Qg,{showSelectAll:N,mode:n,options:oe,searchValue:J,handleSelectAll:Re,isAllSelected:Qe,menu:ge,isLoading:C,hasExistingData:Ce,t:X}),options:oe.map(({label:ge,value:He,color:Y,...te})=>({label:String(ge),value:String(He),key:String(He),id:String(He),color:Y,...te})),optionRender:ge=>{const He=ge?.data?.fullname;if(He&&O){const[Y,te]=He.split(" ");return f.jsxs("div",{className:"flex items-center justify-start gap-1",children:[f.jsx(O,{firstName:Y,lastName:te,profilePic:ge?.data?.url||"",size:"xs",enablePopper:!0,userId:ge?.data?.value}),f.jsx("span",{className:"ml-2",children:ge.label})]})}return f.jsx("span",{children:ge.label})},autoClearSearchValue:E,onClear:()=>g&&g(n==="tags"||n==="multiple"?[]:null),maxTagCount:n==="tags"&&z?void 0:"responsive",maxTagPlaceholder:ge=>f.jsx(Be.Tooltip,{styles:{root:{zIndex:5002}},trigger:"hover",title:ge.length>3?ge.slice(0,3).map(({label:He})=>He).join(", ")+"...":ge.map(({label:He})=>He).join(", "),overlayStyle:{pointerEvents:"none"},children:f.jsxs("span",{children:["+",ge.length," more"]})}),tagRender:I||bt,allowClear:M,...W}),r&&f.jsx(se,{className:"text-error-500",appearance:"custom",size:"extra-small",variant:"medium",children:r})]}),K&&H&&L&&S&&f.jsx("div",{role:"tooltip",tabIndex:0,className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:ge=>ge.stopPropagation(),onMouseDown:ge=>ge.preventDefault(),onKeyDown:ge=>{ge.key==="Escape"&&ae(!1)},children:f.jsx(S,{riskDetails:H})})]})});w1.displayName="SelectField";const y1=l.forwardRef(({id:e,label:t,checked:n,isChecked:r,onChange:i,disabled:a=!1,required:o=!1,message:s,messageType:u="default",wrapperClassName:c,checkboxClassName:d,labelClassName:h,size:m="medium",variant:p="default",labelPosition:g="right",checkboxProps:b},v)=>{const x=n!==void 0?n:r||!1,y=()=>{switch(m){case"small":return"w-3 h-3";case"large":return"w-5 h-5";default:return"w-4 h-4"}},C=()=>{if(u==="error")return"text-red-600 border-red-300 focus:ring-red-500 dark:focus:ring-red-600";if(u==="success")return"text-green-600 border-green-300 focus:ring-green-500 dark:focus:ring-green-600";if(u==="info")return"text-blue-600 border-blue-300 focus:ring-blue-500 dark:focus:ring-blue-600";switch(p){case"outline":return"text-primary-600 bg-transparent border-neutral-300 focus:ring-primary-500 dark:focus:ring-primary-600";case"solid":return"text-primary-600 bg-primary-50 border-primary-300 focus:ring-primary-500 dark:focus:ring-primary-600 dark:bg-primary-900/20";default:return"text-primary-600 bg-gray-100 border-gray-300 focus:ring-primary-500 dark:focus:ring-primary-600 dark:bg-neutral-600 dark:border-gray-600"}},M=()=>u==="error"?"text-red-500 dark:text-red-400":u==="success"?"text-green-500 dark:text-green-400":u==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",E=()=>{switch(m){case"small":return"extra-small";case"large":return"medium";default:return"small"}},w=k=>{i(k.target.checked,k)},z=f.jsx(Be.Checkbox,{...b,ref:v,id:e,checked:x,onChange:w,disabled:a,className:Z("rounded focus:ring-2 focus:ring-offset-gray-800 transition-colors duration-200",y(),C(),a&&"opacity-50 cursor-not-allowed",d),"aria-required":o,"aria-invalid":s&&u==="error"?"true":"false","aria-describedby":s?`${e}-message`:void 0}),I=t?f.jsx("label",{htmlFor:e,className:Z("font-medium cursor-pointer transition-colors duration-200",a?"text-neutral-400 dark:text-neutral-600 cursor-not-allowed":"text-neutral-900 dark:text-neutral-100",g==="right"?"ml-2":"mr-2",h),children:f.jsxs(se,{variant:"medium",size:E(),appearance:"body",children:[t,o&&f.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})}):null;return f.jsxs("div",{className:Z("flex flex-col",c),children:[f.jsx("div",{className:Z("flex items-center",g==="left"&&"flex-row-reverse justify-end"),children:g==="left"?f.jsxs(f.Fragment,{children:[z,I]}):f.jsxs(f.Fragment,{children:[z,I]})}),f.jsx(We.AnimatePresence,{children:s&&f.jsx(We.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${e}-message`,role:u==="error"?"alert":void 0,children:f.jsx(se,{className:Z("mt-1",M()),appearance:"custom",size:"extra-small",variant:"medium",children:s})})})]})});y1.displayName="Checkbox";const Rg=({label:e,isChecked:t,onChange:n,id:r,...i})=>f.jsxs("div",{className:"flex items-center",children:[f.jsx(Be.Checkbox,{checked:t,onChange:n,id:r,type:"checkbox",value:"",className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:!bg-neutral-600 dark:border-gray-600",...i}),f.jsx("label",{className:"ml-2 text-sm font-medium text-neutral-900 dark:text-neutral-100",children:e})]}),E1=l.forwardRef(({id:e,label:t,value:n,defaultValue:r="#000000",onChange:i,onColorChange:a,disabled:o=!1,required:s=!1,message:u,messageType:c="default",wrapperClassName:d,inputClassName:h,labelClassName:m,size:p="medium",showValue:g=!1,valueFormat:b="hex",inputProps:v,helpText:x},y)=>{const C=n!==void 0?n:r,M=()=>{switch(p){case"small":return"w-8 h-8";case"large":return"w-16 h-16";default:return"w-12 h-12"}},E=()=>c==="error"?"text-red-500 dark:text-red-400":c==="success"?"text-green-500 dark:text-green-400":c==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",w=()=>c==="error"?"border-red-300 focus:border-red-500 focus:ring-red-200 dark:focus:ring-red-400/20":c==="success"?"border-green-300 focus:border-green-500 focus:ring-green-200 dark:focus:ring-green-400/20":c==="info"?"border-blue-300 focus:border-blue-500 focus:ring-blue-200 dark:focus:ring-blue-400/20":"border-neutral-300 dark:border-neutral-600 focus:border-primary-500 dark:focus:border-primary-400 focus:ring-primary-200 dark:focus:ring-primary-400/20",z=()=>{switch(p){case"small":return"extra-small";case"large":return"medium";default:return"small"}},I=B=>{const H=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(B);if(!H)return B;const L=parseInt(H[1],16),S=parseInt(H[2],16),T=parseInt(H[3],16);return`rgb(${L}, ${S}, ${T})`},k=B=>{const H=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(B);if(!H)return B;const L=parseInt(H[1],16)/255,S=parseInt(H[2],16)/255,T=parseInt(H[3],16)/255,G=Math.max(L,S,T),O=Math.min(L,S,T);let _=0,A=0;const $=(G+O)/2;if(G!==O){const W=G-O;switch(A=$>.5?W/(2-G-O):W/(G+O),G){case L:_=(S-T)/W+(S<T?6:0);break;case S:_=(T-L)/W+2;break;case T:_=(L-S)/W+4;break}_/=6}return`hsl(${Math.round(_*360)}, ${Math.round(A*100)}%, ${Math.round($*100)}%)`},F=()=>{switch(b){case"rgb":return I(C);case"hsl":return k(C);default:return C.toUpperCase()}},N=B=>{const H=B.target.value;i(H,B),a?.(H)};return f.jsxs("div",{className:Z("flex flex-col w-full",d),children:[t&&f.jsx("label",{htmlFor:e,className:Z("mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",m),children:f.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:f.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:f.jsxs(se,{variant:"medium",size:z(),appearance:"subtitle",children:[t,s&&f.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})})}),x&&f.jsx(se,{className:"mb-2 text-neutral-600 dark:text-neutral-400",appearance:"custom",size:"extra-small",variant:"regular",children:x}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"relative",children:f.jsx("input",{...v,ref:y,type:"color",id:e,value:C,onChange:N,disabled:o,required:s,className:Z("border rounded-md cursor-pointer transition-all duration-200","focus:outline-none focus:ring-2",M(),w(),o&&"opacity-50 cursor-not-allowed",h),style:{backgroundColor:C},"aria-required":s,"aria-invalid":u&&c==="error"?"true":"false","aria-describedby":u||x?`${e}-description`:void 0})}),g&&f.jsx("div",{className:"flex-1",children:f.jsx(se,{variant:"medium",size:"small",appearance:"body",className:"font-mono text-neutral-700 dark:text-neutral-300",children:F()})})]}),f.jsx(We.AnimatePresence,{children:u&&f.jsx(We.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${e}-description`,role:c==="error"?"alert":void 0,children:f.jsx(se,{className:Z("mt-1",E()),appearance:"custom",size:"extra-small",variant:"medium",children:u})})}),x&&!u&&f.jsx("div",{id:`${e}-description`,className:"sr-only",children:x})]})});E1.displayName="ColorPicker";function Rn(e){"@babel/helpers - typeof";return Rn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rn(e)}function e7(e,t){if(Rn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function C1(e){var t=e7(e,"string");return Rn(t)=="symbol"?t:t+""}function Qr(e,t,n){return(t=C1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ee(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k1(Object(n),!0).forEach(function(r){Qr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function t7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,C1(r.key),r)}}function n7(e,t,n){return t&&I1(e.prototype,t),n&&I1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function so(e,t){return so=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},so(e,t)}function r7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&so(e,t)}function il(e){return il=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},il(e)}function z1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(z1=function(){return!!e})()}function i7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l7(e,t){if(t&&(Rn(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return i7(e)}function a7(e){var t=z1();return function(){var n,r=il(e);if(t){var i=il(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l7(this,n)}}function uo(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o7(e){if(Array.isArray(e))return uo(e)}function s7(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function F1(e,t){if(e){if(typeof e=="string")return uo(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uo(e,t):void 0}}function u7(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
68
68
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rr(e){return o7(e)||s7(e)||F1(e)||u7()}function c7(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function d7(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var f7=function(){function e(n){var r=this;this._insertTag=function(i){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,a),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(d7(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var a=c7(i);try{a.insertRule(r,a.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e}(),ht="-ms-",ll="-moz-",Pe="-webkit-",M1="comm",co="rule",fo="decl",h7="@import",S1="@keyframes",m7="@layer",p7=Math.abs,al=String.fromCharCode,g7=Object.assign;function v7(e,t){return dt(e,0)^45?(((t<<2^dt(e,0))<<2^dt(e,1))<<2^dt(e,2))<<2^dt(e,3):0}function A1(e){return e.trim()}function b7(e,t){return(e=t.exec(e))?e[0]:e}function Oe(e,t,n){return e.replace(t,n)}function ho(e,t){return e.indexOf(t)}function dt(e,t){return e.charCodeAt(t)|0}function ei(e,t,n){return e.slice(t,n)}function an(e){return e.length}function mo(e){return e.length}function ol(e,t){return t.push(e),e}function x7(e,t){return e.map(t).join("")}var sl=1,vr=1,N1=0,Ct=0,it=0,br="";function ul(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:sl,column:vr,length:o,return:""}}function ti(e,t){return g7(ul("",null,null,"",null,null,0),e,{length:-e.length},t)}function w7(){return it}function y7(){return it=Ct>0?dt(br,--Ct):0,vr--,it===10&&(vr=1,sl--),it}function Dt(){return it=Ct<N1?dt(br,Ct++):0,vr++,it===10&&(vr=1,sl++),it}function on(){return dt(br,Ct)}function cl(){return Ct}function ni(e,t){return ei(br,e,t)}function ri(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function D1(e){return sl=vr=1,N1=an(br=e),Ct=0,[]}function L1(e){return br="",e}function dl(e){return A1(ni(Ct-1,po(e===91?e+2:e===40?e+1:e)))}function E7(e){for(;(it=on())&&it<33;)Dt();return ri(e)>2||ri(it)>3?"":" "}function C7(e,t){for(;--t&&Dt()&&!(it<48||it>102||it>57&&it<65||it>70&&it<97););return ni(e,cl()+(t<6&&on()==32&&Dt()==32))}function po(e){for(;Dt();)switch(it){case e:return Ct;case 34:case 39:e!==34&&e!==39&&po(it);break;case 40:e===41&&po(e);break;case 92:Dt();break}return Ct}function k7(e,t){for(;Dt()&&e+it!==57;)if(e+it===84&&on()===47)break;return"/*"+ni(t,Ct-1)+"*"+al(e===47?e:Dt())}function I7(e){for(;!ri(on());)Dt();return ni(e,Ct)}function z7(e){return L1(fl("",null,null,null,[""],e=D1(e),0,[0],e))}function fl(e,t,n,r,i,a,o,s,u){for(var c=0,d=0,h=o,m=0,p=0,g=0,b=1,v=1,x=1,y=0,C="",M=i,E=a,w=r,z=C;v;)switch(g=y,y=Dt()){case 40:if(g!=108&&dt(z,h-1)==58){ho(z+=Oe(dl(y),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:z+=dl(y);break;case 9:case 10:case 13:case 32:z+=E7(g);break;case 92:z+=C7(cl()-1,7);continue;case 47:switch(on()){case 42:case 47:ol(F7(k7(Dt(),cl()),t,n),u);break;default:z+="/"}break;case 123*b:s[c++]=an(z)*x;case 125*b:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+d:x==-1&&(z=Oe(z,/\f/g,"")),p>0&&an(z)-h&&ol(p>32?B1(z+";",r,n,h-1):B1(Oe(z," ","")+";",r,n,h-2),u);break;case 59:z+=";";default:if(ol(w=T1(z,t,n,c,d,i,s,C,M=[],E=[],h),a),y===123)if(d===0)fl(z,t,w,w,M,a,h,s,E);else switch(m===99&&dt(z,3)===110?100:m){case 100:case 108:case 109:case 115:fl(e,w,w,r&&ol(T1(e,w,w,0,0,i,s,C,i,M=[],h),E),i,E,h,s,r?M:E);break;default:fl(z,w,w,w,[""],E,0,s,E)}}c=d=p=0,b=x=1,C=z="",h=o;break;case 58:h=1+an(z),p=g;default:if(b<1){if(y==123)--b;else if(y==125&&b++==0&&y7()==125)continue}switch(z+=al(y),y*b){case 38:x=d>0?1:(z+="\f",-1);break;case 44:s[c++]=(an(z)-1)*x,x=1;break;case 64:on()===45&&(z+=dl(Dt())),m=on(),d=h=an(C=z+=I7(cl())),y++;break;case 45:g===45&&an(z)==2&&(b=0)}}return a}function T1(e,t,n,r,i,a,o,s,u,c,d){for(var h=i-1,m=i===0?a:[""],p=mo(m),g=0,b=0,v=0;g<r;++g)for(var x=0,y=ei(e,h+1,h=p7(b=o[g])),C=e;x<p;++x)(C=A1(b>0?m[x]+" "+y:Oe(y,/&\f/g,m[x])))&&(u[v++]=C);return ul(e,t,n,i===0?co:s,u,c,d)}function F7(e,t,n){return ul(e,t,n,M1,al(w7()),ei(e,2,-2),0)}function B1(e,t,n,r){return ul(e,t,n,fo,ei(e,0,r),ei(e,r+1,-1),r)}function xr(e,t){for(var n="",r=mo(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function M7(e,t,n,r){switch(e.type){case m7:if(e.children.length)break;case h7:case fo:return e.return=e.return||e.value;case M1:return"";case S1:return e.return=e.value+"{"+xr(e.children,r)+"}";case co:e.value=e.props.join(",")}return an(n=xr(e.children,r))?e.return=e.value+"{"+n+"}":""}function S7(e){var t=mo(e);return function(n,r,i,a){for(var o="",s=0;s<t;s++)o+=e[s](n,r,i,a)||"";return o}}function A7(e){return function(t){t.root||(t=t.return)&&e(t)}}function N7(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var D7=function(t,n,r){for(var i=0,a=0;i=a,a=on(),i===38&&a===12&&(n[r]=1),!ri(a);)Dt();return ni(t,Ct)},L7=function(t,n){var r=-1,i=44;do switch(ri(i)){case 0:i===38&&on()===12&&(n[r]=1),t[r]+=D7(Ct-1,n,r);break;case 2:t[r]+=dl(i);break;case 4:if(i===44){t[++r]=on()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=al(i)}while(i=Dt());return t},T7=function(t,n){return L1(L7(D1(t),n))},H1=new WeakMap,B7=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!H1.get(r))&&!i){H1.set(t,!0);for(var a=[],o=T7(n,a),s=r.props,u=0,c=0;u<o.length;u++)for(var d=0;d<s.length;d++,c++)t.props[c]=a[u]?o[u].replace(/&\f/g,s[d]):s[d]+" "+o[u]}}},H7=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function j1(e,t){switch(v7(e,t)){case 5103:return Pe+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Pe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Pe+e+ll+e+ht+e+e;case 6828:case 4268:return Pe+e+ht+e+e;case 6165:return Pe+e+ht+"flex-"+e+e;case 5187:return Pe+e+Oe(e,/(\w+).+(:[^]+)/,Pe+"box-$1$2"+ht+"flex-$1$2")+e;case 5443:return Pe+e+ht+"flex-item-"+Oe(e,/flex-|-self/,"")+e;case 4675:return Pe+e+ht+"flex-line-pack"+Oe(e,/align-content|flex-|-self/,"")+e;case 5548:return Pe+e+ht+Oe(e,"shrink","negative")+e;case 5292:return Pe+e+ht+Oe(e,"basis","preferred-size")+e;case 6060:return Pe+"box-"+Oe(e,"-grow","")+Pe+e+ht+Oe(e,"grow","positive")+e;case 4554:return Pe+Oe(e,/([^-])(transform)/g,"$1"+Pe+"$2")+e;case 6187:return Oe(Oe(Oe(e,/(zoom-|grab)/,Pe+"$1"),/(image-set)/,Pe+"$1"),e,"")+e;case 5495:case 3959:return Oe(e,/(image-set\([^]*)/,Pe+"$1$`$1");case 4968:return Oe(Oe(e,/(.+:)(flex-)?(.*)/,Pe+"box-pack:$3"+ht+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Pe+e+e;case 4095:case 3583:case 4068:case 2532:return Oe(e,/(.+)-inline(.+)/,Pe+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(an(e)-1-t>6)switch(dt(e,t+1)){case 109:if(dt(e,t+4)!==45)break;case 102:return Oe(e,/(.+:)(.+)-([^]+)/,"$1"+Pe+"$2-$3$1"+ll+(dt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ho(e,"stretch")?j1(Oe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(dt(e,t+1)!==115)break;case 6444:switch(dt(e,an(e)-3-(~ho(e,"!important")&&10))){case 107:return Oe(e,":",":"+Pe)+e;case 101:return Oe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Pe+(dt(e,14)===45?"inline-":"")+"box$3$1"+Pe+"$2$3$1"+ht+"$2box$3")+e}break;case 5936:switch(dt(e,t+11)){case 114:return Pe+e+ht+Oe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Pe+e+ht+Oe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Pe+e+ht+Oe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Pe+e+ht+e+e}return e}var j7=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case fo:t.return=j1(t.value,t.length);break;case S1:return xr([ti(t,{value:Oe(t.value,"@","@"+Pe)})],i);case co:if(t.length)return x7(t.props,function(a){switch(b7(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return xr([ti(t,{props:[Oe(a,/:(read-\w+)/,":"+ll+"$1")]})],i);case"::placeholder":return xr([ti(t,{props:[Oe(a,/:(plac\w+)/,":"+Pe+"input-$1")]}),ti(t,{props:[Oe(a,/:(plac\w+)/,":"+ll+"$1")]}),ti(t,{props:[Oe(a,/:(plac\w+)/,ht+"input-$1")]})],i)}return""})}},P7=[j7],O7=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(b){var v=b.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(b),b.setAttribute("data-s",""))})}var i=t.stylisPlugins||P7,a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(b){for(var v=b.getAttribute("data-emotion").split(" "),x=1;x<v.length;x++)a[v[x]]=!0;s.push(b)});var u,c=[B7,H7];{var d,h=[M7,A7(function(b){d.insert(b)})],m=S7(c.concat(i,h)),p=function(v){return xr(z7(v),m)};u=function(v,x,y,C){d=y,p(v?v+"{"+x.styles+"}":x.styles),C&&(g.inserted[x.name]=!0)}}var g={key:n,sheet:new f7({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:u};return g.sheet.hydrate(s),g},hl={exports:{}},Ge={};/** @license React v16.13.1
|
|
69
69
|
* react-is.production.min.js
|
|
70
70
|
*
|