@lax-wp/design-system 0.3.49 → 0.3.51
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.
|
@@ -22,12 +22,12 @@ export interface RiskDetailsCardProps<T = any> {
|
|
|
22
22
|
*/
|
|
23
23
|
export interface MasterDataModalProps {
|
|
24
24
|
isVisible: boolean;
|
|
25
|
-
onSelected
|
|
25
|
+
onSelected?: (masterDataValue: any, masterDataRow?: any) => void;
|
|
26
26
|
onClose: () => void;
|
|
27
|
-
masterDataColumnName
|
|
27
|
+
masterDataColumnName?: string;
|
|
28
28
|
masterDataFilters?: any;
|
|
29
|
-
masterDataName
|
|
30
|
-
masterDataId: string;
|
|
29
|
+
masterDataName?: string;
|
|
30
|
+
masterDataId: string | null;
|
|
31
31
|
showFilters?: boolean;
|
|
32
32
|
}
|
|
33
33
|
/**
|
package/dist/index.es.js
CHANGED
|
@@ -3288,11 +3288,11 @@ const Wl = ({
|
|
|
3288
3288
|
noborder: c,
|
|
3289
3289
|
id: s
|
|
3290
3290
|
}) => {
|
|
3291
|
-
const u = "flex items-center
|
|
3292
|
-
default: `bg-white dark:bg-black-800 hover:bg-neutral-100 dark:hover:bg-black-700 rounded-lg ${c ? "" : "border border-neutral-300 dark:border-
|
|
3291
|
+
const u = "flex items-center", d = {
|
|
3292
|
+
default: `bg-white dark:bg-black-800 hover:bg-neutral-100 dark:hover:bg-black-700 rounded-lg ${c ? "" : "border border-neutral-300 dark:border-neutral-800"} p-2 hover:opacity-80`,
|
|
3293
3293
|
secondary: `bg-transparent rounded-lg ${c ? "" : "border border-neutral-300 dark:border-black-400"} p-2 hover:opacity-80`,
|
|
3294
3294
|
native: `bg-transparent rounded-lg ${c ? "" : "border border-neutral-300"} p-2 hover:opacity-80`,
|
|
3295
|
-
ghost: "
|
|
3295
|
+
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"
|
|
3296
3296
|
}, h = i ? "cursor-not-allowed opacity-50" : "cursor-pointer";
|
|
3297
3297
|
return /* @__PURE__ */ f.jsx(ft, { title: l, placement: o, delayShow: !0, children: /* @__PURE__ */ f.jsx(
|
|
3298
3298
|
"button",
|
package/dist/index.umd.js
CHANGED
|
@@ -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(oe,{variant:"medium",size:"extra-small",appearance:"subtitle",children:[t,a?f.jsx(gn,{isConditional:o}):a?f.jsx("span",{className:`ml-0.5 ${o?"text-yellow-500":"text-red-500"}`,children:"*"}):null]}),v?.length>0&&v!==G.value&&f.jsx(Ge.Tooltip,{placement:"top",title:v,children:f.jsx("button",{className:"cursor-pointer",onClick:()=>n(v),type:"button",children:f.jsx(og,{size:16,className:"cursor-pointer pb-0.5 text-primary-600"})})}),z&&f.jsx(Ye.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),C&&f.jsx(pn,{}),f.jsx(Rt,{labels:s}),g&&f.jsx(Ge.Tooltip,{placement:"top",title:g,children:f.jsx("div",{className:"cursor-pointer",children:f.jsx(Qt,{})})})]}),F&&$&&A?f.jsx("button",{id:`btn-base-input-field-add-to-document-${e}`,className:"cursor-pointer",onClick:()=>S(G?.value),type:"button",children:f.jsx(Ge.Tooltip,{placement:"top",title:B("Add to document"),children:f.jsx(Ye.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",{...G,ref:m||j,id:e||t,key:e,required:a,style:{"--input-bg-color":"var(--tw-bg-opacity, 1) rgb(var(--bg-color))",...M},className:X("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",u&&u,c||"text-neutral-900 dark:text-black-100",E||"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&&T?.color?`bg-${T?.color}-50 border-${T?.color}-300`:"bg-white dark:bg-black-600"),onChange:W=>{n(W.target.value)},onClick:W=>W.stopPropagation(),autoComplete:"off",onBlur:k}),h?f.jsx("button",{className:"absolute inset-y-0 flex items-center cursor-pointer right-2",onClick:()=>{N(!V),p?.(!V)},type:"button",children:V?f.jsx(ig,{className:"text-gray-400",size:16}):f.jsx(lg,{className:"text-gray-400",size:16})}):D&&G.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:W=>{W.stopPropagation(),n("")},type:"button",children:f.jsx(ag,{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(Ve.AnimatePresence,{children:r&&f.jsx(Ve.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:f.jsx(oe,{className:"mt-1 text-error-500",appearance:"custom",size:"extra-small",variant:"medium",children:r})})}),f.jsx(Ve.AnimatePresence,{children:i&&f.jsx(Ve.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:f.jsx(oe,{className:"mt-1 text-success-500 dark:text-success-300",appearance:"custom",size:"extra-small",variant:"medium",children:i})})})]}),$&&T&&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:W=>W.stopPropagation(),onMouseDown:W=>W.preventDefault(),onKeyDown:W=>{W.key==="Escape"&&U(!1)},children:f.jsx(L,{riskDetails:T})})]})});$a.displayName="BaseInputField";const sg=l.forwardRef(({label:e,placeholder:t,value:n,onChange:r,rows:i=4,message:a,messageType:o="default",defaultValue:u,required:s=!1,disabled:c=!1,className:d,inputRef:h,maxLength:p,originalCase:m=!1,noBorder:g=!1,id:b,inputStyle:v,...x},E)=>{const C=b||`textarea-${Math.random().toString(36).substr(2,9)}`,F=n?.length||0,y=p&&F>p-Math.min(50,p/5),w=p&&F>=p,M=()=>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:X("flex flex-col gap-0.5 relative",d),children:[e&&f.jsx("label",{htmlFor:C,className:X("mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",{capitalize:!m}),children:f.jsxs(oe,{size:"extra-small",variant:"medium",appearance:"subtitle",children:[e,s&&f.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})}),f.jsx("textarea",{...x,id:C,ref:E||h,onChange:k=>r(k.target.value),defaultValue:u,value:n,required:s,disabled:c,rows:i,placeholder:t,maxLength:p||void 0,style:v,className:X("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&&M(),{"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}),p&&f.jsxs(oe,{className:"mt-0.5 text-right text-gray-600 dark:text-gray-400",appearance:"custom",size:"extra-small",children:[f.jsx("span",{className:X({"text-red-500 dark:text-red-400":w,"text-yellow-500 dark:text-yellow-400":y&&!w}),children:F}),f.jsxs("span",{className:"text-gray-400 dark:text-gray-500",children:[" ","/ ",p]})]}),f.jsx(Ve.AnimatePresence,{children:a&&f.jsx(Ve.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(oe,{className:X("mt-1",I()),appearance:"custom",size:"extra-small",variant:"medium",children:a})})})]})}),Ku=l.forwardRef(({label:e,placeholder:t,value:n,onChange:r,row:i=4,errorMessage:a,defaultValue:o,required:u,isRequiredConditional:s=!1,tags:c=[],disabled:d,className:h,inputRef:p,maxLength:m=void 0,tooltip:g="",originalCase:b=!1,isAiExtracted:v=!1,isGTN:x=!1,gtnName:E="",noBorder:C=!1,id:F,inputStyle:y,labelClassName:w,isLiveField:M=!1,onBlur:I,riskDetails:k,isRiskAnalysisOpen:z=!1,RiskDetailsCard:D,onAddGTNToDocument:T,t:H=B=>B,...L},A)=>{const[B,G]=l.useState(!1),j=()=>{T&&T({key:E,value:n||""})};return f.jsxs("div",{ref:A,id:F,className:X("flex gap-0.5 relative",B&&x?"border rounded-lg border-primary-100 bg-primary-50 p-1":""),onMouseEnter:()=>G(!0),onMouseLeave:()=>G(!1),children:[x&&!B?f.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5"}):null,f.jsxs("div",{className:X("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(oe,{size:"extra-small",variant:"medium",appearance:"subtitle",children:[e,u&&f.jsx(gn,{})]}),M&&f.jsx(Ye.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),v&&f.jsx(pn,{}),f.jsx(Rt,{labels:c||[]}),g&&f.jsx(Ge.Tooltip,{placement:"top",title:g,children:f.jsx("div",{className:"cursor-pointer",role:"button",tabIndex:0,onKeyDown:V=>{(V.key==="Enter"||V.key===" ")&&V.preventDefault()},children:f.jsx(Qt,{})})})]}),x&&B?f.jsx("button",{id:"btn-textarea-field-add-to-document",className:"cursor-pointer",onClick:j,type:"button",children:f.jsx(Ge.Tooltip,{placement:"top",title:H("Add to document"),children:f.jsx(Ye.NoteAddOutlined,{className:"text-primary-600",sx:{fontSize:16}})})}):null]})}),f.jsx("textarea",{...L,onBlur:I,onChange:V=>r(V.target.value),defaultValue:o,value:n,required:u,className:X(`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,z&&k?.color&&`!bg-${k.color}-50 border-${k.color}-300`),style:z&&k?{backgroundColor:k.hexBgColor||void 0,borderColor:k.hexBorderColor||void 0,...y}:y,rows:i,placeholder:t,disabled:d,maxLength:m||void 0,id:F,ref:p,onClick:V=>V.stopPropagation(),autoComplete:"off"}),m?f.jsxs(oe,{className:"mt-0.5 text-right text-neutral-900 dark:text-white",appearance:"custom",size:"extra-small",children:[f.jsxs("span",{className:`${n?.length>=m?"text-error-500":n?.length>m-Math.min(50,m/5)?"text-warning-500 dark:text-warning-300":""}`,children:[n?.length||0," "]}),"/ ",m]}):null,a&&f.jsx(oe,{className:"text-error-500 mt-1",appearance:"custom",size:"extra-small",variant:"medium",children:a})]}),B&&z&&k&&D&&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:V=>V.stopPropagation(),onMouseDown:V=>V.preventDefault(),onKeyDown:V=>{V.key==="Escape"&&G(!1)},children:f.jsx(D,{riskDetails:k})})]})});Ku.displayName="TextAreaField";const tl=({children:e,className:t,variant:n="default",onClick:r,disabled:i,tooltip:a,tooltipPlacement:o="top",noborder:u,id:s})=>{const c="flex items-center hover:opacity-80",d={default:`bg-white dark:bg-black-800 hover:bg-neutral-100 dark:hover:bg-black-700 rounded-lg ${u?"":"border border-neutral-300 dark:border-primary-800"} p-2 hover:opacity-80`,secondary:`bg-transparent rounded-lg ${u?"":"border border-neutral-300 dark:border-black-400"} p-2 hover:opacity-80`,native:`bg-transparent rounded-lg ${u?"":"border border-neutral-300"} p-2 hover:opacity-80`,ghost:"dark:text-white hover:bg-neutral-100 dark:hover:bg-black-800 rounded-lg p-0.5"},h=i?"cursor-not-allowed opacity-50":"cursor-pointer";return f.jsx(it,{title:a,placement:o,delayShow:!0,children:f.jsx("button",{id:s,disabled:i,className:`${c} ${d[n]} ${t||""} ${h}`,onClick:r,children:e})})},qu=l.forwardRef(({id:e,label:t,placeholder:n,value:r,onChange:i,errorMessage:a,defaultValue:o,required:u=!1,isRequiredConditional:s=!1,masterDataName:c,masterDataColumnName:d,masterDataFormula:h,masterDataFilters:p,tags:m,index:g,tooltip:b="",originalCase:v=!1,color:x="",isGTN:E=!1,labelClassName:C,gtnName:F=null,isAiExtracted:y=!1,disabled:w=!1,reference:M={},isLiveField:I=!1,onBlur:k,onAddGTNToDocument:z,riskDetails:D,isRiskAnalysisOpen:T=!1,RiskDetailsCard:H,primaryColorShades:L,t:A=$=>$,setDisableActions:B,showDeprecatedFieldWarning:G,MasterDataModal:j,parseMasterDataFormula:V},N)=>{const[$,U]=l.useState(!1),[S,W]=l.useState(null),[K,le]=l.useState(!1),[ee,ce]=l.useState(""),[Y,Z]=l.useState(null),se=l.useRef(null),R=N||se;l.useEffect(()=>{W(r)},[g]),l.useEffect(()=>{S!==null&&i(S,Y)},[S,Y]);const Se=()=>{B?.(!K),le(!K)},ze=He=>{if(He.keyCode===9||He.key==="Enter"){const ct=R.current||se.current;ct&&(W(ee),ct.blur())}},Q=(He,ct)=>{let he=He;h&&V&&(he=V(h,ct)),ce(""),W(he),Se(),Z(ct)},ue=()=>{W(""),Z(null)},Ee=He=>{z&&F&&z({key:F,value:He})},et=()=>{const He="border h-[32px] text-sm rounded-lg block w-full p-2.5 font-inter font-medium",ct=a?"border-red-300":T&&D?.color?`border-${D?.color}-300`:"border-gray-300 dark:border-black-600",he="placeholder:text-neutral-900 dark:placeholder:text-black-400",Ae=`${T&&D?.color?`bg-${D?.color}-50`:"bg-gray-200 dark:bg-black-600 "} ${x||"text-neutral-900 dark:text-black-200"}`;return`${He} ${ct} ${Ae} ${he}`},tt=()=>S!==null?S:h&&V?V(h,M):r;return l.useEffect(()=>{K&&!c&&(G?.(),le(!1))},[K,c,G]),f.jsxs("div",{className:X("flex gap-0.5 w-full relative",$&&E?"border rounded-lg border-primary-100 bg-primary-50 p-1":"",{"error-field":!!a}),onMouseEnter:()=>U(!0),onMouseLeave:()=>U(!1),children:[E&&!$?f.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5"}):null,f.jsxs("div",{className:X("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(oe,{variant:"medium",size:"extra-small",appearance:"subtitle",children:[t,u&&f.jsx(gn,{isConditional:s})]}),I&&f.jsx(Ye.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),y&&f.jsx(pn,{}),f.jsx(Rt,{labels:m}),b&&f.jsx(it,{placement:"top",title:`${b}${h?` | ${h}`:""}`,children:f.jsx("div",{className:"cursor-pointer",children:f.jsx(Qt,{})})})]}),E&&$&&z?f.jsx("button",{id:"btn-master-data-input-add-to-document",className:"cursor-pointer",onClick:()=>Ee(r?.toString()||""),type:"button",children:f.jsx(Ge.Tooltip,{placement:"top",title:A("Add to document"),children:f.jsx(Ye.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:R,required:u,placeholder:n,className:et(),onChange:He=>{i(He.target.value,Y),W(He.target?.value)},onKeyDown:ze,value:tt(),defaultValue:o,disabled:!0,autoComplete:"off",onBlur:k}),f.jsx(tl,{id:"btn-dynamic-data-input-rx-cross",onClick:ue,className:"absolute inset-y-0 right-1 flex items-center px-2 focus:border-transparent",variant:"ghost",disabled:w,children:f.jsx(Ye.CloseRounded,{className:"text-neutral-900 dark:text-black-300",sx:{fontSize:16}})}),f.jsx(tl,{id:"btn-dynamic-data-input-ai-outline-pic-center",onClick:Se,className:"absolute inset-y-0 right-8 flex items-center px-2 focus:border-transparent",variant:"ghost",disabled:w,children:f.jsx(Ye.TableChartRounded,{className:"text-neutral-900 dark:text-black-300",sx:{fontSize:16}})})]}),a&&f.jsx(oe,{className:"text-error-500 mt-1",appearance:"custom",size:"extra-small",variant:"medium",children:a}),K&&j&&f.jsx(j,{isVisible:K,onSelected:Q,onClose:Se,masterDataColumnName:d,masterDataFilters:p,masterDataName:c,masterDataId:c,showFilters:!0})]}),$&&D&&T&&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:He=>He.stopPropagation(),onMouseDown:He=>He.preventDefault(),onKeyDown:He=>{He.key==="Escape"&&U(!1)},children:f.jsx(H,{riskDetails:D})})]})});qu.displayName="MasterDataInputField";var Wa,Qu;function Ru(){if(Qu)return Wa;Qu=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Wa=e,Wa}var Ua,e1;function ug(){if(e1)return Ua;e1=1;var e=typeof Pn=="object"&&Pn&&Pn.Object===Object&&Pn;return Ua=e,Ua}var Ya,t1;function n1(){if(t1)return Ya;t1=1;var e=ug(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Ya=n,Ya}var Xa,r1;function cg(){if(r1)return Xa;r1=1;var e=n1(),t=function(){return e.Date.now()};return Xa=t,Xa}var Za,i1;function dg(){if(i1)return Za;i1=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Za=t,Za}var Ja,l1;function fg(){if(l1)return Ja;l1=1;var e=dg(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Ja=n,Ja}var Ka,a1;function o1(){if(a1)return Ka;a1=1;var e=n1(),t=e.Symbol;return Ka=t,Ka}var qa,s1;function hg(){if(s1)return qa;s1=1;var e=o1(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(o){var u=n.call(o,i),s=o[i];try{o[i]=void 0;var c=!0}catch{}var d=r.call(o);return c&&(u?o[i]=s:delete o[i]),d}return qa=a,qa}var Qa,u1;function mg(){if(u1)return Qa;u1=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Qa=n,Qa}var Ra,c1;function pg(){if(c1)return Ra;c1=1;var e=o1(),t=hg(),n=mg(),r="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(u){return u==null?u===void 0?i:r:a&&a in Object(u)?t(u):n(u)}return Ra=o,Ra}var eo,d1;function gg(){if(d1)return eo;d1=1;function e(t){return t!=null&&typeof t=="object"}return eo=e,eo}var to,f1;function vg(){if(f1)return to;f1=1;var e=pg(),t=gg(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return to=r,to}var no,h1;function bg(){if(h1)return no;h1=1;var e=fg(),t=Ru(),n=vg(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,u=parseInt;function s(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)?u(c.slice(2),h?2:8):i.test(c)?r:+c}return no=s,no}var ro,m1;function xg(){if(m1)return ro;m1=1;var e=Ru(),t=cg(),n=bg(),r="Expected a function",i=Math.max,a=Math.min;function o(u,s,c){var d,h,p,m,g,b,v=0,x=!1,E=!1,C=!0;if(typeof u!="function")throw new TypeError(r);s=n(s)||0,e(c)&&(x=!!c.leading,E="maxWait"in c,p=E?i(n(c.maxWait)||0,s):p,C="trailing"in c?!!c.trailing:C);function F(H){var L=d,A=h;return d=h=void 0,v=H,m=u.apply(A,L),m}function y(H){return v=H,g=setTimeout(I,s),x?F(H):m}function w(H){var L=H-b,A=H-v,B=s-L;return E?a(B,p-A):B}function M(H){var L=H-b,A=H-v;return b===void 0||L>=s||L<0||E&&A>=p}function I(){var H=t();if(M(H))return k(H);g=setTimeout(I,w(H))}function k(H){return g=void 0,C&&d?F(H):(d=h=void 0,m)}function z(){g!==void 0&&clearTimeout(g),v=0,d=b=h=g=void 0}function D(){return g===void 0?m:k(t())}function T(){var H=t(),L=M(H);if(d=arguments,h=this,b=H,L){if(g===void 0)return y(b);if(E)return clearTimeout(g),g=setTimeout(I,s),F(b)}return g===void 0&&(g=setTimeout(I,s)),m}return T.cancel=z,T.flush=D,T}return ro=o,ro}var wg=xg();const yg=hn(wg),Eg=e=>Array.isArray(e)?e.map(t=>typeof t=="string"||typeof t=="number"?t:t.value):e||null,Cg=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?Cg(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}]:[],Ig=({hasExistingData:e})=>f.jsx("div",{className:"!w-full px-3 py-1.5",children:e?f.jsx(Ge.Skeleton,{paragraph:{rows:1,width:"100%"}}):f.jsx(Ge.Skeleton,{})}),zg=({showSelectAll:e,mode:t,options:n,searchValue:r,handleSelectAll:i,isAllSelected:a,menu:o,isLoading:u,hasExistingData:s,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(oe,{size:"small",variant:"semibold",className:"text-primary-600 dark:text-primary-300",appearance:"custom",children:c(a?"Deselect all":"Select all")})}),o,u&&f.jsx(Ig,{hasExistingData:s})]}),p1=l.forwardRef(({label:e,value:t,mode:n,errorMessage:r,selectOptions:i=[],required:a=!1,tags:o,className:u,onInputChange:s,tooltip:c,originalCase:d=!1,isAiExtracted:h=!1,isGTN:p=!1,gtnName:m=null,onChange:g,onSearch:b,debounceTimeout:v=500,filterOption:x=!0,onScroll:E,isLoading:C=!1,allowClear:F=!0,autoClearSearchValue:y=!0,fullOpacityLabel:w=!1,showAllTags:M=!1,customTagRender:I,inputStyles:k,disabled:z=!1,showSelectAll:D=!1,labelClassName:T,riskDetails:H,isRiskAnalysisOpen:L=!1,RiskDetailsCard:A,AddToDocumentIcon:B,primaryColorShades:G,UserAvatar:j,handleAddGTNToDocument:V,t:N=S=>S,...$},U)=>{const[S,W]=l.useState(!1),K=l.useRef(null),[le,ee]=l.useState(!1),[ce,Y]=l.useState(""),Z=he=>{if(!V)return;let Ae=null;he==null?Ae=null:typeof he=="string"||typeof he=="number"?Ae=he:Array.isArray(he)?Ae=he.map(Be=>typeof Be=="object"&&Be!==null&&"value"in Be?Be.value:Be):typeof he=="object"&&"value"in he&&(Ae=he.value),V(Ae)},se=Eg(t),R=l.useMemo(()=>b?yg(b,v):null,[b,v]),Se=(he,Ae)=>{if(K.current&&$.id){const Be=document.getElementById($.id);if(Be){const Qe=Array.isArray(Ae)?Ae.map(ye=>ye.value):Ae?.value;Be.dataset.selectedValue=JSON.stringify(Qe);const J=new Event("change",{bubbles:!0});Object.defineProperty(J,"target",{writable:!1,value:Be}),Be.dispatchEvent(J);const ae=new CustomEvent("pilot-change",{bubbles:!0,detail:{selector:`#${$.id}`,value:Qe,type:"change"}});Be.dispatchEvent(ae)}}if(n==="tags"){const Be=Array.isArray(he)?he:[he];g?.(Be?.map(Qe=>({label:Qe,value:Qe})))}else g?.(Ae)},ze=kg({options:i,value:t,defaultValue:$?.defaultValue}),Q=l.useMemo(()=>ze.length>0||se!=null,[ze,se]),ue=l.useMemo(()=>{if(!n||n!=="multiple"||ze.length===0)return!1;const he=Array.isArray(se)?se:[];return ze.map(Be=>Be.value).every(Be=>he.some(Qe=>typeof Qe=="object"&&Qe!==null&&"value"in Qe?String(Qe.value)===String(Be):String(Qe)===String(Be)))},[se,ze,n]),Ee=()=>{!n||n!=="multiple"||!g||g(ue?[]:ze)},et=l.useCallback(he=>{if(!he)return;const Ae=new Event("submit",{bubbles:!0,cancelable:!0});he.dispatchEvent(Ae);const Be=he.querySelector('button[type="submit"]');Be&&Be.click()},[]),tt=l.useCallback(he=>{if(he.key==="Enter"&&!le&&se){he.preventDefault(),he.stopPropagation();const Ae=he.currentTarget.closest("form");et(Ae)}},[le,se,et]),He=l.useCallback(he=>{const{label:Ae,value:Be,onClose:Qe}=he,ae=ze.find(ke=>String(ke.value)===String(Be))?.color||"blue",ye=ke=>{ke.preventDefault(),ke.stopPropagation()};return f.jsx("div",{className:"cursor-pointer me-1 inline-flex",children:f.jsx(dr,{label:Ae,color:ae,size:"sm",onMouseDown:ye,onClick:z?void 0:Qe,isHashColor:!0})})},[ze,z]),ct=l.useCallback(he=>{Y(he),(s||R)?.(he)},[s,R]);return f.jsxs("div",{ref:U,className:X("flex gap-0.5 w-full relative",S&&p?"border rounded-lg border-primary-100 bg-primary-50 p-1":""),onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),id:$.id,children:[p&&!S?f.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5"}):null,f.jsxs("div",{className:X("w-full flex flex-col gap-1 risk-analysis-select-field",u),onMouseDown:he=>he.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"} ${T||""}`,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(oe,{size:"extra-small",className:w?"text-black-900 dark:text-black-300":"",variant:"medium",appearance:"subtitle",children:[e,a&&f.jsx(gn,{})]}),h&&f.jsx(pn,{}),f.jsx(Rt,{labels:o}),c&&f.jsx(Ge.Tooltip,{placement:"top",title:c,children:f.jsx("div",{className:"cursor-pointer",role:"button",tabIndex:0,onKeyDown:he=>{(he.key==="Enter"||he.key===" ")&&he.preventDefault()},children:f.jsx(Qt,{})})})]}),p&&S&&B?f.jsx("button",{id:"btn-select-field-base-add-to-document",className:"cursor-pointer",onClick:()=>Z(se),type:"button",children:f.jsx(Ge.Tooltip,{placement:"top",title:N("Add to document"),children:f.jsx(Ye.NoteAddOutlined,{className:"text-primary-600",sx:{fontSize:16}})})}):null]})}):null,f.jsx(Ge.Select,{onKeyDown:tt,onOpenChange:ee,disabled:z,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:se,onChange:Se,filterOption:b?x:(he,Ae)=>(Ae?.label||"")?.toLowerCase()?.includes(he?.toLowerCase()),showSearch:!0,onSearch:ct||void 0,onPopupScroll:E,popupClassName:"select-field-dropdown-popup",popupRender:he=>f.jsx(zg,{showSelectAll:D,mode:n,options:ze,searchValue:ce,handleSelectAll:Ee,isAllSelected:ue,menu:he,isLoading:C,hasExistingData:Q,t:N}),options:ze.map(({label:he,value:Ae,color:Be,...Qe})=>({label:String(he),value:String(Ae),key:String(Ae),id:String(Ae),color:Be,...Qe})),optionRender:he=>{const Ae=he?.data?.fullname;if(Ae&&j){const[Be,Qe]=Ae.split(" ");return f.jsxs("div",{className:"flex items-center justify-start gap-1",children:[f.jsx(j,{firstName:Be,lastName:Qe,profilePic:he?.data?.url||"",size:"xs",enablePopper:!0,userId:he?.data?.value}),f.jsx("span",{className:"ml-2",children:he.label})]})}return f.jsx("span",{children:he.label})},autoClearSearchValue:y,onClear:()=>g&&g(n==="tags"||n==="multiple"?[]:null),maxTagCount:n==="tags"&&M?void 0:"responsive",maxTagPlaceholder:he=>f.jsx(Ge.Tooltip,{styles:{root:{zIndex:5002}},trigger:"hover",title:he.length>3?he.slice(0,3).map(({label:Ae})=>Ae).join(", ")+"...":he.map(({label:Ae})=>Ae).join(", "),overlayStyle:{pointerEvents:"none"},children:f.jsxs("span",{children:["+",he.length," more"]})}),tagRender:I||He,allowClear:F,...$}),r&&f.jsx(oe,{className:"text-error-500",appearance:"custom",size:"extra-small",variant:"medium",children:r})]}),S&&H&&L&&A&&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:he=>he.stopPropagation(),onMouseDown:he=>he.preventDefault(),onKeyDown:he=>{he.key==="Escape"&&W(!1)},children:f.jsx(A,{riskDetails:H})})]})});p1.displayName="SelectField";const g1=l.forwardRef(({id:e,label:t,checked:n,isChecked:r,onChange:i,disabled:a=!1,required:o=!1,message:u,messageType:s="default",wrapperClassName:c,checkboxClassName:d,labelClassName:h,size:p="medium",variant:m="default",labelPosition:g="right",checkboxProps:b},v)=>{const x=n!==void 0?n:r||!1,E=()=>{switch(p){case"small":return"w-3 h-3";case"large":return"w-5 h-5";default:return"w-4 h-4"}},C=()=>{if(s==="error")return"text-red-600 border-red-300 focus:ring-red-500 dark:focus:ring-red-600";if(s==="success")return"text-green-600 border-green-300 focus:ring-green-500 dark:focus:ring-green-600";if(s==="info")return"text-blue-600 border-blue-300 focus:ring-blue-500 dark:focus:ring-blue-600";switch(m){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"}},F=()=>s==="error"?"text-red-500 dark:text-red-400":s==="success"?"text-green-500 dark:text-green-400":s==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",y=()=>{switch(p){case"small":return"extra-small";case"large":return"medium";default:return"small"}},w=k=>{i(k.target.checked,k)},M=f.jsx(Ge.Checkbox,{...b,ref:v,id:e,checked:x,onChange:w,disabled:a,className:X("rounded focus:ring-2 focus:ring-offset-gray-800 transition-colors duration-200",E(),C(),a&&"opacity-50 cursor-not-allowed",d),"aria-required":o,"aria-invalid":u&&s==="error"?"true":"false","aria-describedby":u?`${e}-message`:void 0}),I=t?f.jsx("label",{htmlFor:e,className:X("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(oe,{variant:"medium",size:y(),appearance:"body",children:[t,o&&f.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})}):null;return f.jsxs("div",{className:X("flex flex-col",c),children:[f.jsx("div",{className:X("flex items-center",g==="left"&&"flex-row-reverse justify-end"),children:g==="left"?f.jsxs(f.Fragment,{children:[M,I]}):f.jsxs(f.Fragment,{children:[M,I]})}),f.jsx(Ve.AnimatePresence,{children:u&&f.jsx(Ve.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${e}-message`,role:s==="error"?"alert":void 0,children:f.jsx(oe,{className:X("mt-1",F()),appearance:"custom",size:"extra-small",variant:"medium",children:u})})})]})});g1.displayName="Checkbox";const v1=l.forwardRef(({id:e,label:t,value:n,defaultValue:r="#000000",onChange:i,onColorChange:a,disabled:o=!1,required:u=!1,message:s,messageType:c="default",wrapperClassName:d,inputClassName:h,labelClassName:p,size:m="medium",showValue:g=!1,valueFormat:b="hex",inputProps:v,helpText:x},E)=>{const C=n!==void 0?n:r,F=()=>{switch(m){case"small":return"w-8 h-8";case"large":return"w-16 h-16";default:return"w-12 h-12"}},y=()=>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",M=()=>{switch(m){case"small":return"extra-small";case"large":return"medium";default:return"small"}},I=T=>{const H=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(T);if(!H)return T;const L=parseInt(H[1],16),A=parseInt(H[2],16),B=parseInt(H[3],16);return`rgb(${L}, ${A}, ${B})`},k=T=>{const H=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(T);if(!H)return T;const L=parseInt(H[1],16)/255,A=parseInt(H[2],16)/255,B=parseInt(H[3],16)/255,G=Math.max(L,A,B),j=Math.min(L,A,B);let V=0,N=0;const $=(G+j)/2;if(G!==j){const U=G-j;switch(N=$>.5?U/(2-G-j):U/(G+j),G){case L:V=(A-B)/U+(A<B?6:0);break;case A:V=(B-L)/U+2;break;case B:V=(L-A)/U+4;break}V/=6}return`hsl(${Math.round(V*360)}, ${Math.round(N*100)}%, ${Math.round($*100)}%)`},z=()=>{switch(b){case"rgb":return I(C);case"hsl":return k(C);default:return C.toUpperCase()}},D=T=>{const H=T.target.value;i(H,T),a?.(H)};return f.jsxs("div",{className:X("flex flex-col w-full",d),children:[t&&f.jsx("label",{htmlFor:e,className:X("mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",p),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(oe,{variant:"medium",size:M(),appearance:"subtitle",children:[t,u&&f.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})})}),x&&f.jsx(oe,{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:E,type:"color",id:e,value:C,onChange:D,disabled:o,required:u,className:X("border rounded-md cursor-pointer transition-all duration-200","focus:outline-none focus:ring-2",F(),w(),o&&"opacity-50 cursor-not-allowed",h),style:{backgroundColor:C},"aria-required":u,"aria-invalid":s&&c==="error"?"true":"false","aria-describedby":s||x?`${e}-description`:void 0})}),g&&f.jsx("div",{className:"flex-1",children:f.jsx(oe,{variant:"medium",size:"small",appearance:"body",className:"font-mono text-neutral-700 dark:text-neutral-300",children:z()})})]}),f.jsx(Ve.AnimatePresence,{children:s&&f.jsx(Ve.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(oe,{className:X("mt-1",y()),appearance:"custom",size:"extra-small",variant:"medium",children:s})})}),x&&!s&&f.jsx("div",{id:`${e}-description`,className:"sr-only",children:x})]})});v1.displayName="ColorPicker";function Qn(e){"@babel/helpers - typeof";return Qn=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},Qn(e)}function Mg(e,t){if(Qn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function b1(e){var t=Mg(e,"string");return Qn(t)=="symbol"?t:t+""}function qr(e,t,n){return(t=b1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x1(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 xe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x1(Object(n),!0).forEach(function(r){qr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w1(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,b1(r.key),r)}}function Sg(e,t,n){return t&&w1(e.prototype,t),n&&w1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function io(e,t){return io=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},io(e,t)}function Ag(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&&io(e,t)}function nl(e){return nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},nl(e)}function y1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(y1=function(){return!!e})()}function Ng(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dg(e,t){if(t&&(Qn(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ng(e)}function Bg(e){var t=y1();return function(){var n,r=nl(e);if(t){var i=nl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Dg(this,n)}}function lo(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 Lg(e){if(Array.isArray(e))return lo(e)}function Tg(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function E1(e,t){if(e){if(typeof e=="string")return lo(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)?lo(e,t):void 0}}function Hg(){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,z&&k?.color&&`!bg-${k.color}-50 border-${k.color}-300`),style:z&&k?{backgroundColor:k.hexBgColor||void 0,borderColor:k.hexBorderColor||void 0,...y}:y,rows:i,placeholder:t,disabled:d,maxLength:m||void 0,id:F,ref:p,onClick:V=>V.stopPropagation(),autoComplete:"off"}),m?f.jsxs(oe,{className:"mt-0.5 text-right text-neutral-900 dark:text-white",appearance:"custom",size:"extra-small",children:[f.jsxs("span",{className:`${n?.length>=m?"text-error-500":n?.length>m-Math.min(50,m/5)?"text-warning-500 dark:text-warning-300":""}`,children:[n?.length||0," "]}),"/ ",m]}):null,a&&f.jsx(oe,{className:"text-error-500 mt-1",appearance:"custom",size:"extra-small",variant:"medium",children:a})]}),B&&z&&k&&D&&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:V=>V.stopPropagation(),onMouseDown:V=>V.preventDefault(),onKeyDown:V=>{V.key==="Escape"&&G(!1)},children:f.jsx(D,{riskDetails:k})})]})});Ku.displayName="TextAreaField";const tl=({children:e,className:t,variant:n="default",onClick:r,disabled:i,tooltip:a,tooltipPlacement:o="top",noborder:u,id:s})=>{const c="flex items-center",d={default:`bg-white dark:bg-black-800 hover:bg-neutral-100 dark:hover:bg-black-700 rounded-lg ${u?"":"border border-neutral-300 dark:border-neutral-800"} p-2 hover:opacity-80`,secondary:`bg-transparent rounded-lg ${u?"":"border border-neutral-300 dark:border-black-400"} p-2 hover:opacity-80`,native:`bg-transparent rounded-lg ${u?"":"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(it,{title:a,placement:o,delayShow:!0,children:f.jsx("button",{id:s,disabled:i,className:`${c} ${d[n]} ${t||""} ${h}`,onClick:r,children:e})})},qu=l.forwardRef(({id:e,label:t,placeholder:n,value:r,onChange:i,errorMessage:a,defaultValue:o,required:u=!1,isRequiredConditional:s=!1,masterDataName:c,masterDataColumnName:d,masterDataFormula:h,masterDataFilters:p,tags:m,index:g,tooltip:b="",originalCase:v=!1,color:x="",isGTN:E=!1,labelClassName:C,gtnName:F=null,isAiExtracted:y=!1,disabled:w=!1,reference:M={},isLiveField:I=!1,onBlur:k,onAddGTNToDocument:z,riskDetails:D,isRiskAnalysisOpen:T=!1,RiskDetailsCard:H,primaryColorShades:L,t:A=$=>$,setDisableActions:B,showDeprecatedFieldWarning:G,MasterDataModal:j,parseMasterDataFormula:V},N)=>{const[$,U]=l.useState(!1),[S,W]=l.useState(null),[K,le]=l.useState(!1),[ee,ce]=l.useState(""),[Y,Z]=l.useState(null),se=l.useRef(null),R=N||se;l.useEffect(()=>{W(r)},[g]),l.useEffect(()=>{S!==null&&i(S,Y)},[S,Y]);const Se=()=>{B?.(!K),le(!K)},ze=He=>{if(He.keyCode===9||He.key==="Enter"){const ct=R.current||se.current;ct&&(W(ee),ct.blur())}},Q=(He,ct)=>{let he=He;h&&V&&(he=V(h,ct)),ce(""),W(he),Se(),Z(ct)},ue=()=>{W(""),Z(null)},Ee=He=>{z&&F&&z({key:F,value:He})},et=()=>{const He="border h-[32px] text-sm rounded-lg block w-full p-2.5 font-inter font-medium",ct=a?"border-red-300":T&&D?.color?`border-${D?.color}-300`:"border-gray-300 dark:border-black-600",he="placeholder:text-neutral-900 dark:placeholder:text-black-400",Ae=`${T&&D?.color?`bg-${D?.color}-50`:"bg-gray-200 dark:bg-black-600 "} ${x||"text-neutral-900 dark:text-black-200"}`;return`${He} ${ct} ${Ae} ${he}`},tt=()=>S!==null?S:h&&V?V(h,M):r;return l.useEffect(()=>{K&&!c&&(G?.(),le(!1))},[K,c,G]),f.jsxs("div",{className:X("flex gap-0.5 w-full relative",$&&E?"border rounded-lg border-primary-100 bg-primary-50 p-1":"",{"error-field":!!a}),onMouseEnter:()=>U(!0),onMouseLeave:()=>U(!1),children:[E&&!$?f.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5"}):null,f.jsxs("div",{className:X("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(oe,{variant:"medium",size:"extra-small",appearance:"subtitle",children:[t,u&&f.jsx(gn,{isConditional:s})]}),I&&f.jsx(Ye.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),y&&f.jsx(pn,{}),f.jsx(Rt,{labels:m}),b&&f.jsx(it,{placement:"top",title:`${b}${h?` | ${h}`:""}`,children:f.jsx("div",{className:"cursor-pointer",children:f.jsx(Qt,{})})})]}),E&&$&&z?f.jsx("button",{id:"btn-master-data-input-add-to-document",className:"cursor-pointer",onClick:()=>Ee(r?.toString()||""),type:"button",children:f.jsx(Ge.Tooltip,{placement:"top",title:A("Add to document"),children:f.jsx(Ye.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:R,required:u,placeholder:n,className:et(),onChange:He=>{i(He.target.value,Y),W(He.target?.value)},onKeyDown:ze,value:tt(),defaultValue:o,disabled:!0,autoComplete:"off",onBlur:k}),f.jsx(tl,{id:"btn-dynamic-data-input-rx-cross",onClick:ue,className:"absolute inset-y-0 right-1 flex items-center px-2 focus:border-transparent",variant:"ghost",disabled:w,children:f.jsx(Ye.CloseRounded,{className:"text-neutral-900 dark:text-black-300",sx:{fontSize:16}})}),f.jsx(tl,{id:"btn-dynamic-data-input-ai-outline-pic-center",onClick:Se,className:"absolute inset-y-0 right-8 flex items-center px-2 focus:border-transparent",variant:"ghost",disabled:w,children:f.jsx(Ye.TableChartRounded,{className:"text-neutral-900 dark:text-black-300",sx:{fontSize:16}})})]}),a&&f.jsx(oe,{className:"text-error-500 mt-1",appearance:"custom",size:"extra-small",variant:"medium",children:a}),K&&j&&f.jsx(j,{isVisible:K,onSelected:Q,onClose:Se,masterDataColumnName:d,masterDataFilters:p,masterDataName:c,masterDataId:c,showFilters:!0})]}),$&&D&&T&&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:He=>He.stopPropagation(),onMouseDown:He=>He.preventDefault(),onKeyDown:He=>{He.key==="Escape"&&U(!1)},children:f.jsx(H,{riskDetails:D})})]})});qu.displayName="MasterDataInputField";var Wa,Qu;function Ru(){if(Qu)return Wa;Qu=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Wa=e,Wa}var Ua,e1;function ug(){if(e1)return Ua;e1=1;var e=typeof Pn=="object"&&Pn&&Pn.Object===Object&&Pn;return Ua=e,Ua}var Ya,t1;function n1(){if(t1)return Ya;t1=1;var e=ug(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Ya=n,Ya}var Xa,r1;function cg(){if(r1)return Xa;r1=1;var e=n1(),t=function(){return e.Date.now()};return Xa=t,Xa}var Za,i1;function dg(){if(i1)return Za;i1=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Za=t,Za}var Ja,l1;function fg(){if(l1)return Ja;l1=1;var e=dg(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Ja=n,Ja}var Ka,a1;function o1(){if(a1)return Ka;a1=1;var e=n1(),t=e.Symbol;return Ka=t,Ka}var qa,s1;function hg(){if(s1)return qa;s1=1;var e=o1(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(o){var u=n.call(o,i),s=o[i];try{o[i]=void 0;var c=!0}catch{}var d=r.call(o);return c&&(u?o[i]=s:delete o[i]),d}return qa=a,qa}var Qa,u1;function mg(){if(u1)return Qa;u1=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Qa=n,Qa}var Ra,c1;function pg(){if(c1)return Ra;c1=1;var e=o1(),t=hg(),n=mg(),r="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(u){return u==null?u===void 0?i:r:a&&a in Object(u)?t(u):n(u)}return Ra=o,Ra}var eo,d1;function gg(){if(d1)return eo;d1=1;function e(t){return t!=null&&typeof t=="object"}return eo=e,eo}var to,f1;function vg(){if(f1)return to;f1=1;var e=pg(),t=gg(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return to=r,to}var no,h1;function bg(){if(h1)return no;h1=1;var e=fg(),t=Ru(),n=vg(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,u=parseInt;function s(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)?u(c.slice(2),h?2:8):i.test(c)?r:+c}return no=s,no}var ro,m1;function xg(){if(m1)return ro;m1=1;var e=Ru(),t=cg(),n=bg(),r="Expected a function",i=Math.max,a=Math.min;function o(u,s,c){var d,h,p,m,g,b,v=0,x=!1,E=!1,C=!0;if(typeof u!="function")throw new TypeError(r);s=n(s)||0,e(c)&&(x=!!c.leading,E="maxWait"in c,p=E?i(n(c.maxWait)||0,s):p,C="trailing"in c?!!c.trailing:C);function F(H){var L=d,A=h;return d=h=void 0,v=H,m=u.apply(A,L),m}function y(H){return v=H,g=setTimeout(I,s),x?F(H):m}function w(H){var L=H-b,A=H-v,B=s-L;return E?a(B,p-A):B}function M(H){var L=H-b,A=H-v;return b===void 0||L>=s||L<0||E&&A>=p}function I(){var H=t();if(M(H))return k(H);g=setTimeout(I,w(H))}function k(H){return g=void 0,C&&d?F(H):(d=h=void 0,m)}function z(){g!==void 0&&clearTimeout(g),v=0,d=b=h=g=void 0}function D(){return g===void 0?m:k(t())}function T(){var H=t(),L=M(H);if(d=arguments,h=this,b=H,L){if(g===void 0)return y(b);if(E)return clearTimeout(g),g=setTimeout(I,s),F(b)}return g===void 0&&(g=setTimeout(I,s)),m}return T.cancel=z,T.flush=D,T}return ro=o,ro}var wg=xg();const yg=hn(wg),Eg=e=>Array.isArray(e)?e.map(t=>typeof t=="string"||typeof t=="number"?t:t.value):e||null,Cg=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?Cg(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}]:[],Ig=({hasExistingData:e})=>f.jsx("div",{className:"!w-full px-3 py-1.5",children:e?f.jsx(Ge.Skeleton,{paragraph:{rows:1,width:"100%"}}):f.jsx(Ge.Skeleton,{})}),zg=({showSelectAll:e,mode:t,options:n,searchValue:r,handleSelectAll:i,isAllSelected:a,menu:o,isLoading:u,hasExistingData:s,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(oe,{size:"small",variant:"semibold",className:"text-primary-600 dark:text-primary-300",appearance:"custom",children:c(a?"Deselect all":"Select all")})}),o,u&&f.jsx(Ig,{hasExistingData:s})]}),p1=l.forwardRef(({label:e,value:t,mode:n,errorMessage:r,selectOptions:i=[],required:a=!1,tags:o,className:u,onInputChange:s,tooltip:c,originalCase:d=!1,isAiExtracted:h=!1,isGTN:p=!1,gtnName:m=null,onChange:g,onSearch:b,debounceTimeout:v=500,filterOption:x=!0,onScroll:E,isLoading:C=!1,allowClear:F=!0,autoClearSearchValue:y=!0,fullOpacityLabel:w=!1,showAllTags:M=!1,customTagRender:I,inputStyles:k,disabled:z=!1,showSelectAll:D=!1,labelClassName:T,riskDetails:H,isRiskAnalysisOpen:L=!1,RiskDetailsCard:A,AddToDocumentIcon:B,primaryColorShades:G,UserAvatar:j,handleAddGTNToDocument:V,t:N=S=>S,...$},U)=>{const[S,W]=l.useState(!1),K=l.useRef(null),[le,ee]=l.useState(!1),[ce,Y]=l.useState(""),Z=he=>{if(!V)return;let Ae=null;he==null?Ae=null:typeof he=="string"||typeof he=="number"?Ae=he:Array.isArray(he)?Ae=he.map(Be=>typeof Be=="object"&&Be!==null&&"value"in Be?Be.value:Be):typeof he=="object"&&"value"in he&&(Ae=he.value),V(Ae)},se=Eg(t),R=l.useMemo(()=>b?yg(b,v):null,[b,v]),Se=(he,Ae)=>{if(K.current&&$.id){const Be=document.getElementById($.id);if(Be){const Qe=Array.isArray(Ae)?Ae.map(ye=>ye.value):Ae?.value;Be.dataset.selectedValue=JSON.stringify(Qe);const J=new Event("change",{bubbles:!0});Object.defineProperty(J,"target",{writable:!1,value:Be}),Be.dispatchEvent(J);const ae=new CustomEvent("pilot-change",{bubbles:!0,detail:{selector:`#${$.id}`,value:Qe,type:"change"}});Be.dispatchEvent(ae)}}if(n==="tags"){const Be=Array.isArray(he)?he:[he];g?.(Be?.map(Qe=>({label:Qe,value:Qe})))}else g?.(Ae)},ze=kg({options:i,value:t,defaultValue:$?.defaultValue}),Q=l.useMemo(()=>ze.length>0||se!=null,[ze,se]),ue=l.useMemo(()=>{if(!n||n!=="multiple"||ze.length===0)return!1;const he=Array.isArray(se)?se:[];return ze.map(Be=>Be.value).every(Be=>he.some(Qe=>typeof Qe=="object"&&Qe!==null&&"value"in Qe?String(Qe.value)===String(Be):String(Qe)===String(Be)))},[se,ze,n]),Ee=()=>{!n||n!=="multiple"||!g||g(ue?[]:ze)},et=l.useCallback(he=>{if(!he)return;const Ae=new Event("submit",{bubbles:!0,cancelable:!0});he.dispatchEvent(Ae);const Be=he.querySelector('button[type="submit"]');Be&&Be.click()},[]),tt=l.useCallback(he=>{if(he.key==="Enter"&&!le&&se){he.preventDefault(),he.stopPropagation();const Ae=he.currentTarget.closest("form");et(Ae)}},[le,se,et]),He=l.useCallback(he=>{const{label:Ae,value:Be,onClose:Qe}=he,ae=ze.find(ke=>String(ke.value)===String(Be))?.color||"blue",ye=ke=>{ke.preventDefault(),ke.stopPropagation()};return f.jsx("div",{className:"cursor-pointer me-1 inline-flex",children:f.jsx(dr,{label:Ae,color:ae,size:"sm",onMouseDown:ye,onClick:z?void 0:Qe,isHashColor:!0})})},[ze,z]),ct=l.useCallback(he=>{Y(he),(s||R)?.(he)},[s,R]);return f.jsxs("div",{ref:U,className:X("flex gap-0.5 w-full relative",S&&p?"border rounded-lg border-primary-100 bg-primary-50 p-1":""),onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),id:$.id,children:[p&&!S?f.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5"}):null,f.jsxs("div",{className:X("w-full flex flex-col gap-1 risk-analysis-select-field",u),onMouseDown:he=>he.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"} ${T||""}`,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(oe,{size:"extra-small",className:w?"text-black-900 dark:text-black-300":"",variant:"medium",appearance:"subtitle",children:[e,a&&f.jsx(gn,{})]}),h&&f.jsx(pn,{}),f.jsx(Rt,{labels:o}),c&&f.jsx(Ge.Tooltip,{placement:"top",title:c,children:f.jsx("div",{className:"cursor-pointer",role:"button",tabIndex:0,onKeyDown:he=>{(he.key==="Enter"||he.key===" ")&&he.preventDefault()},children:f.jsx(Qt,{})})})]}),p&&S&&B?f.jsx("button",{id:"btn-select-field-base-add-to-document",className:"cursor-pointer",onClick:()=>Z(se),type:"button",children:f.jsx(Ge.Tooltip,{placement:"top",title:N("Add to document"),children:f.jsx(Ye.NoteAddOutlined,{className:"text-primary-600",sx:{fontSize:16}})})}):null]})}):null,f.jsx(Ge.Select,{onKeyDown:tt,onOpenChange:ee,disabled:z,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:se,onChange:Se,filterOption:b?x:(he,Ae)=>(Ae?.label||"")?.toLowerCase()?.includes(he?.toLowerCase()),showSearch:!0,onSearch:ct||void 0,onPopupScroll:E,popupClassName:"select-field-dropdown-popup",popupRender:he=>f.jsx(zg,{showSelectAll:D,mode:n,options:ze,searchValue:ce,handleSelectAll:Ee,isAllSelected:ue,menu:he,isLoading:C,hasExistingData:Q,t:N}),options:ze.map(({label:he,value:Ae,color:Be,...Qe})=>({label:String(he),value:String(Ae),key:String(Ae),id:String(Ae),color:Be,...Qe})),optionRender:he=>{const Ae=he?.data?.fullname;if(Ae&&j){const[Be,Qe]=Ae.split(" ");return f.jsxs("div",{className:"flex items-center justify-start gap-1",children:[f.jsx(j,{firstName:Be,lastName:Qe,profilePic:he?.data?.url||"",size:"xs",enablePopper:!0,userId:he?.data?.value}),f.jsx("span",{className:"ml-2",children:he.label})]})}return f.jsx("span",{children:he.label})},autoClearSearchValue:y,onClear:()=>g&&g(n==="tags"||n==="multiple"?[]:null),maxTagCount:n==="tags"&&M?void 0:"responsive",maxTagPlaceholder:he=>f.jsx(Ge.Tooltip,{styles:{root:{zIndex:5002}},trigger:"hover",title:he.length>3?he.slice(0,3).map(({label:Ae})=>Ae).join(", ")+"...":he.map(({label:Ae})=>Ae).join(", "),overlayStyle:{pointerEvents:"none"},children:f.jsxs("span",{children:["+",he.length," more"]})}),tagRender:I||He,allowClear:F,...$}),r&&f.jsx(oe,{className:"text-error-500",appearance:"custom",size:"extra-small",variant:"medium",children:r})]}),S&&H&&L&&A&&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:he=>he.stopPropagation(),onMouseDown:he=>he.preventDefault(),onKeyDown:he=>{he.key==="Escape"&&W(!1)},children:f.jsx(A,{riskDetails:H})})]})});p1.displayName="SelectField";const g1=l.forwardRef(({id:e,label:t,checked:n,isChecked:r,onChange:i,disabled:a=!1,required:o=!1,message:u,messageType:s="default",wrapperClassName:c,checkboxClassName:d,labelClassName:h,size:p="medium",variant:m="default",labelPosition:g="right",checkboxProps:b},v)=>{const x=n!==void 0?n:r||!1,E=()=>{switch(p){case"small":return"w-3 h-3";case"large":return"w-5 h-5";default:return"w-4 h-4"}},C=()=>{if(s==="error")return"text-red-600 border-red-300 focus:ring-red-500 dark:focus:ring-red-600";if(s==="success")return"text-green-600 border-green-300 focus:ring-green-500 dark:focus:ring-green-600";if(s==="info")return"text-blue-600 border-blue-300 focus:ring-blue-500 dark:focus:ring-blue-600";switch(m){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"}},F=()=>s==="error"?"text-red-500 dark:text-red-400":s==="success"?"text-green-500 dark:text-green-400":s==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",y=()=>{switch(p){case"small":return"extra-small";case"large":return"medium";default:return"small"}},w=k=>{i(k.target.checked,k)},M=f.jsx(Ge.Checkbox,{...b,ref:v,id:e,checked:x,onChange:w,disabled:a,className:X("rounded focus:ring-2 focus:ring-offset-gray-800 transition-colors duration-200",E(),C(),a&&"opacity-50 cursor-not-allowed",d),"aria-required":o,"aria-invalid":u&&s==="error"?"true":"false","aria-describedby":u?`${e}-message`:void 0}),I=t?f.jsx("label",{htmlFor:e,className:X("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(oe,{variant:"medium",size:y(),appearance:"body",children:[t,o&&f.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})}):null;return f.jsxs("div",{className:X("flex flex-col",c),children:[f.jsx("div",{className:X("flex items-center",g==="left"&&"flex-row-reverse justify-end"),children:g==="left"?f.jsxs(f.Fragment,{children:[M,I]}):f.jsxs(f.Fragment,{children:[M,I]})}),f.jsx(Ve.AnimatePresence,{children:u&&f.jsx(Ve.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${e}-message`,role:s==="error"?"alert":void 0,children:f.jsx(oe,{className:X("mt-1",F()),appearance:"custom",size:"extra-small",variant:"medium",children:u})})})]})});g1.displayName="Checkbox";const v1=l.forwardRef(({id:e,label:t,value:n,defaultValue:r="#000000",onChange:i,onColorChange:a,disabled:o=!1,required:u=!1,message:s,messageType:c="default",wrapperClassName:d,inputClassName:h,labelClassName:p,size:m="medium",showValue:g=!1,valueFormat:b="hex",inputProps:v,helpText:x},E)=>{const C=n!==void 0?n:r,F=()=>{switch(m){case"small":return"w-8 h-8";case"large":return"w-16 h-16";default:return"w-12 h-12"}},y=()=>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",M=()=>{switch(m){case"small":return"extra-small";case"large":return"medium";default:return"small"}},I=T=>{const H=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(T);if(!H)return T;const L=parseInt(H[1],16),A=parseInt(H[2],16),B=parseInt(H[3],16);return`rgb(${L}, ${A}, ${B})`},k=T=>{const H=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(T);if(!H)return T;const L=parseInt(H[1],16)/255,A=parseInt(H[2],16)/255,B=parseInt(H[3],16)/255,G=Math.max(L,A,B),j=Math.min(L,A,B);let V=0,N=0;const $=(G+j)/2;if(G!==j){const U=G-j;switch(N=$>.5?U/(2-G-j):U/(G+j),G){case L:V=(A-B)/U+(A<B?6:0);break;case A:V=(B-L)/U+2;break;case B:V=(L-A)/U+4;break}V/=6}return`hsl(${Math.round(V*360)}, ${Math.round(N*100)}%, ${Math.round($*100)}%)`},z=()=>{switch(b){case"rgb":return I(C);case"hsl":return k(C);default:return C.toUpperCase()}},D=T=>{const H=T.target.value;i(H,T),a?.(H)};return f.jsxs("div",{className:X("flex flex-col w-full",d),children:[t&&f.jsx("label",{htmlFor:e,className:X("mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",p),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(oe,{variant:"medium",size:M(),appearance:"subtitle",children:[t,u&&f.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})})}),x&&f.jsx(oe,{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:E,type:"color",id:e,value:C,onChange:D,disabled:o,required:u,className:X("border rounded-md cursor-pointer transition-all duration-200","focus:outline-none focus:ring-2",F(),w(),o&&"opacity-50 cursor-not-allowed",h),style:{backgroundColor:C},"aria-required":u,"aria-invalid":s&&c==="error"?"true":"false","aria-describedby":s||x?`${e}-description`:void 0})}),g&&f.jsx("div",{className:"flex-1",children:f.jsx(oe,{variant:"medium",size:"small",appearance:"body",className:"font-mono text-neutral-700 dark:text-neutral-300",children:z()})})]}),f.jsx(Ve.AnimatePresence,{children:s&&f.jsx(Ve.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(oe,{className:X("mt-1",y()),appearance:"custom",size:"extra-small",variant:"medium",children:s})})}),x&&!s&&f.jsx("div",{id:`${e}-description`,className:"sr-only",children:x})]})});v1.displayName="ColorPicker";function Qn(e){"@babel/helpers - typeof";return Qn=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},Qn(e)}function Mg(e,t){if(Qn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function b1(e){var t=Mg(e,"string");return Qn(t)=="symbol"?t:t+""}function qr(e,t,n){return(t=b1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x1(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 xe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x1(Object(n),!0).forEach(function(r){qr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w1(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,b1(r.key),r)}}function Sg(e,t,n){return t&&w1(e.prototype,t),n&&w1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function io(e,t){return io=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},io(e,t)}function Ag(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&&io(e,t)}function nl(e){return nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},nl(e)}function y1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(y1=function(){return!!e})()}function Ng(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dg(e,t){if(t&&(Qn(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ng(e)}function Bg(e){var t=y1();return function(){var n,r=nl(e);if(t){var i=nl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Dg(this,n)}}function lo(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 Lg(e){if(Array.isArray(e))return lo(e)}function Tg(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function E1(e,t){if(e){if(typeof e=="string")return lo(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)?lo(e,t):void 0}}function Hg(){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 gr(e){return Lg(e)||Tg(e)||E1(e)||Hg()}function jg(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 Pg(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 Og=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(Pg(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var a=jg(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-",rl="-moz-",je="-webkit-",C1="comm",ao="rule",oo="decl",Vg="@import",k1="@keyframes",Gg="@layer",_g=Math.abs,il=String.fromCharCode,$g=Object.assign;function Wg(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 I1(e){return e.trim()}function Ug(e,t){return(e=t.exec(e))?e[0]:e}function Pe(e,t,n){return e.replace(t,n)}function so(e,t){return e.indexOf(t)}function dt(e,t){return e.charCodeAt(t)|0}function Qr(e,t,n){return e.slice(t,n)}function nn(e){return e.length}function uo(e){return e.length}function ll(e,t){return t.push(e),e}function Yg(e,t){return e.map(t).join("")}var al=1,vr=1,z1=0,Ct=0,lt=0,br="";function ol(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:al,column:vr,length:o,return:""}}function Rr(e,t){return $g(ol("",null,null,"",null,null,0),e,{length:-e.length},t)}function Xg(){return lt}function Zg(){return lt=Ct>0?dt(br,--Ct):0,vr--,lt===10&&(vr=1,al--),lt}function At(){return lt=Ct<z1?dt(br,Ct++):0,vr++,lt===10&&(vr=1,al++),lt}function rn(){return dt(br,Ct)}function sl(){return Ct}function ei(e,t){return Qr(br,e,t)}function ti(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 M1(e){return al=vr=1,z1=nn(br=e),Ct=0,[]}function F1(e){return br="",e}function ul(e){return I1(ei(Ct-1,co(e===91?e+2:e===40?e+1:e)))}function Jg(e){for(;(lt=rn())&<<33;)At();return ti(e)>2||ti(lt)>3?"":" "}function Kg(e,t){for(;--t&&At()&&!(lt<48||lt>102||lt>57&<<65||lt>70&<<97););return ei(e,sl()+(t<6&&rn()==32&&At()==32))}function co(e){for(;At();)switch(lt){case e:return Ct;case 34:case 39:e!==34&&e!==39&&co(lt);break;case 40:e===41&&co(e);break;case 92:At();break}return Ct}function qg(e,t){for(;At()&&e+lt!==57;)if(e+lt===84&&rn()===47)break;return"/*"+ei(t,Ct-1)+"*"+il(e===47?e:At())}function Qg(e){for(;!ti(rn());)At();return ei(e,Ct)}function Rg(e){return F1(cl("",null,null,null,[""],e=M1(e),0,[0],e))}function cl(e,t,n,r,i,a,o,u,s){for(var c=0,d=0,h=o,p=0,m=0,g=0,b=1,v=1,x=1,E=0,C="",F=i,y=a,w=r,M=C;v;)switch(g=E,E=At()){case 40:if(g!=108&&dt(M,h-1)==58){so(M+=Pe(ul(E),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:M+=ul(E);break;case 9:case 10:case 13:case 32:M+=Jg(g);break;case 92:M+=Kg(sl()-1,7);continue;case 47:switch(rn()){case 42:case 47:ll(e7(qg(At(),sl()),t,n),s);break;default:M+="/"}break;case 123*b:u[c++]=nn(M)*x;case 125*b:case 59:case 0:switch(E){case 0:case 125:v=0;case 59+d:x==-1&&(M=Pe(M,/\f/g,"")),m>0&&nn(M)-h&&ll(m>32?A1(M+";",r,n,h-1):A1(Pe(M," ","")+";",r,n,h-2),s);break;case 59:M+=";";default:if(ll(w=S1(M,t,n,c,d,i,u,C,F=[],y=[],h),a),E===123)if(d===0)cl(M,t,w,w,F,a,h,u,y);else switch(p===99&&dt(M,3)===110?100:p){case 100:case 108:case 109:case 115:cl(e,w,w,r&&ll(S1(e,w,w,0,0,i,u,C,i,F=[],h),y),i,y,h,u,r?F:y);break;default:cl(M,w,w,w,[""],y,0,u,y)}}c=d=m=0,b=x=1,C=M="",h=o;break;case 58:h=1+nn(M),m=g;default:if(b<1){if(E==123)--b;else if(E==125&&b++==0&&Zg()==125)continue}switch(M+=il(E),E*b){case 38:x=d>0?1:(M+="\f",-1);break;case 44:u[c++]=(nn(M)-1)*x,x=1;break;case 64:rn()===45&&(M+=ul(At())),p=rn(),d=h=nn(C=M+=Qg(sl())),E++;break;case 45:g===45&&nn(M)==2&&(b=0)}}return a}function S1(e,t,n,r,i,a,o,u,s,c,d){for(var h=i-1,p=i===0?a:[""],m=uo(p),g=0,b=0,v=0;g<r;++g)for(var x=0,E=Qr(e,h+1,h=_g(b=o[g])),C=e;x<m;++x)(C=I1(b>0?p[x]+" "+E:Pe(E,/&\f/g,p[x])))&&(s[v++]=C);return ol(e,t,n,i===0?ao:u,s,c,d)}function e7(e,t,n){return ol(e,t,n,C1,il(Xg()),Qr(e,2,-2),0)}function A1(e,t,n,r){return ol(e,t,n,oo,Qr(e,0,r),Qr(e,r+1,-1),r)}function xr(e,t){for(var n="",r=uo(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function t7(e,t,n,r){switch(e.type){case Gg:if(e.children.length)break;case Vg:case oo:return e.return=e.return||e.value;case C1:return"";case k1:return e.return=e.value+"{"+xr(e.children,r)+"}";case ao:e.value=e.props.join(",")}return nn(n=xr(e.children,r))?e.return=e.value+"{"+n+"}":""}function n7(e){var t=uo(e);return function(n,r,i,a){for(var o="",u=0;u<t;u++)o+=e[u](n,r,i,a)||"";return o}}function r7(e){return function(t){t.root||(t=t.return)&&e(t)}}function i7(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var l7=function(t,n,r){for(var i=0,a=0;i=a,a=rn(),i===38&&a===12&&(n[r]=1),!ti(a);)At();return ei(t,Ct)},a7=function(t,n){var r=-1,i=44;do switch(ti(i)){case 0:i===38&&rn()===12&&(n[r]=1),t[r]+=l7(Ct-1,n,r);break;case 2:t[r]+=ul(i);break;case 4:if(i===44){t[++r]=rn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=il(i)}while(i=At());return t},o7=function(t,n){return F1(a7(M1(t),n))},N1=new WeakMap,s7=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&&!N1.get(r))&&!i){N1.set(t,!0);for(var a=[],o=o7(n,a),u=r.props,s=0,c=0;s<o.length;s++)for(var d=0;d<u.length;d++,c++)t.props[c]=a[s]?o[s].replace(/&\f/g,u[d]):u[d]+" "+o[s]}}},u7=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function D1(e,t){switch(Wg(e,t)){case 5103:return je+"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 je+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return je+e+rl+e+ht+e+e;case 6828:case 4268:return je+e+ht+e+e;case 6165:return je+e+ht+"flex-"+e+e;case 5187:return je+e+Pe(e,/(\w+).+(:[^]+)/,je+"box-$1$2"+ht+"flex-$1$2")+e;case 5443:return je+e+ht+"flex-item-"+Pe(e,/flex-|-self/,"")+e;case 4675:return je+e+ht+"flex-line-pack"+Pe(e,/align-content|flex-|-self/,"")+e;case 5548:return je+e+ht+Pe(e,"shrink","negative")+e;case 5292:return je+e+ht+Pe(e,"basis","preferred-size")+e;case 6060:return je+"box-"+Pe(e,"-grow","")+je+e+ht+Pe(e,"grow","positive")+e;case 4554:return je+Pe(e,/([^-])(transform)/g,"$1"+je+"$2")+e;case 6187:return Pe(Pe(Pe(e,/(zoom-|grab)/,je+"$1"),/(image-set)/,je+"$1"),e,"")+e;case 5495:case 3959:return Pe(e,/(image-set\([^]*)/,je+"$1$`$1");case 4968:return Pe(Pe(e,/(.+:)(flex-)?(.*)/,je+"box-pack:$3"+ht+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+je+e+e;case 4095:case 3583:case 4068:case 2532:return Pe(e,/(.+)-inline(.+)/,je+"$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(nn(e)-1-t>6)switch(dt(e,t+1)){case 109:if(dt(e,t+4)!==45)break;case 102:return Pe(e,/(.+:)(.+)-([^]+)/,"$1"+je+"$2-$3$1"+rl+(dt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~so(e,"stretch")?D1(Pe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(dt(e,t+1)!==115)break;case 6444:switch(dt(e,nn(e)-3-(~so(e,"!important")&&10))){case 107:return Pe(e,":",":"+je)+e;case 101:return Pe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+je+(dt(e,14)===45?"inline-":"")+"box$3$1"+je+"$2$3$1"+ht+"$2box$3")+e}break;case 5936:switch(dt(e,t+11)){case 114:return je+e+ht+Pe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return je+e+ht+Pe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return je+e+ht+Pe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return je+e+ht+e+e}return e}var c7=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case oo:t.return=D1(t.value,t.length);break;case k1:return xr([Rr(t,{value:Pe(t.value,"@","@"+je)})],i);case ao:if(t.length)return Yg(t.props,function(a){switch(Ug(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return xr([Rr(t,{props:[Pe(a,/:(read-\w+)/,":"+rl+"$1")]})],i);case"::placeholder":return xr([Rr(t,{props:[Pe(a,/:(plac\w+)/,":"+je+"input-$1")]}),Rr(t,{props:[Pe(a,/:(plac\w+)/,":"+rl+"$1")]}),Rr(t,{props:[Pe(a,/:(plac\w+)/,ht+"input-$1")]})],i)}return""})}},d7=[c7],f7=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||d7,a={},o,u=[];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;u.push(b)});var s,c=[s7,u7];{var d,h=[t7,r7(function(b){d.insert(b)})],p=n7(c.concat(i,h)),m=function(v){return xr(Rg(v),p)};s=function(v,x,E,C){d=E,m(v?v+"{"+x.styles+"}":x.styles),C&&(g.inserted[x.name]=!0)}}var g={key:n,sheet:new Og({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:s};return g.sheet.hydrate(u),g},dl={exports:{}},_e={};/** @license React v16.13.1
|
|
69
69
|
* react-is.production.min.js
|
|
70
70
|
*
|