@iota/apps-ui-kit 0.10.1 → 0.11.0
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/CHANGELOG.md +12 -0
- package/dist/index.d.ts +8 -4
- package/dist/index.es.js +142 -129
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/lib/components/atoms/info-box/InfoBox.tsx +3 -1
- package/src/lib/components/atoms/key-value-info/KeyValueInfo.tsx +14 -5
- package/src/lib/components/molecules/card/CardAction.tsx +1 -1
- package/src/lib/components/molecules/card/CardBody.tsx +2 -2
- package/src/lib/components/molecules/table-header-cell/TableHeaderCell.tsx +13 -7
package/dist/index.umd.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
`,ct=`
|
|
7
7
|
button-segment-underline-base
|
|
8
8
|
button-segment-underline-selected
|
|
9
|
-
`,lt=function(e){return e.Rounded=`rounded`,e.Underlined=`underlined`,e}({});function ut({icon:e,label:n,selected:r,disabled:i,onClick:a,type:o=lt.Rounded,isNested:s=!1,...c}){let l=o===lt.Underlined,u=r?l?`bg-transparent`:it:rt,d=l?r?ct:st:``,f=r?ot:at,p=l?s?`px-md py-sm`:`px-lg py-md`:`px-sm py-[6px]`,m=l?``:`rounded-full`,h=s?l?`text-title-sm`:`text-label-md`:l?`text-title-md`:`text-label-lg`;return(0,t.jsx)(z,{onClick:a,className:(0,N.default)(`enabled:state-layer-secondary relative flex items-center disabled:opacity-40`,u,f,p,m,d,{"pl-xs":!!e&&!l}),disabled:i,...c,children:(0,t.jsxs)(`div`,{className:(0,N.default)(`flex flex-row items-center justify-center gap-2`,h),children:[e&&(0,t.jsx)(`span`,{children:e}),(0,t.jsx)(`span`,{className:`text-start font-inter`,children:n})]})})}var dt=(0,n.forwardRef)(({isChecked:e,isIndeterminate:r,label:i,isLabelFirst:a,isDisabled:o,onCheckedChange:s,name:c,...l},u)=>{let d=(0,n.useRef)(null);(0,n.useEffect)(()=>{d.current&&(d.current.indeterminate=r??!1)},[r,d]);let f=r?Be:Le;function p(e){u&&(typeof u==`function`?u(e):u.current=e),d.current=e}return(0,t.jsxs)(`div`,{className:(0,N.default)(`group inline-flex has-[:disabled]:opacity-40`,a?`flex-row-reverse`:`flex-row`,{disabled:o,"gap-x-2":i}),children:[(0,t.jsx)(`input`,{id:c,name:c,type:`checkbox`,className:`peer hidden appearance-none`,checked:e,ref:p,disabled:o,onChange:e=>{s?.(e)},...l}),(0,t.jsx)(`span`,{onClick:()=>d.current?.click(),className:(0,N.default)(`checkbox-base checkbox-state checkbox-icon checkbox-icon-hidden`,`checkbox-border-default`,`peer-[&:is(:checked,:indeterminate)]:checkbox-border-checked`,`peer-[&:is(:checked,:indeterminate)]:checkbox-bg-checked`,`peer-[&:is(:checked,:indeterminate)]:checkbox-text-checked`,`peer-disabled:peer-[&:not(:checked,:indeterminate)]:checkbox-border-color-disabled`,`peer-disabled:peer-[&:is(:checked,:indeterminate)]:checkbox-border-color-disabled-checked`,`peer-disabled:peer-[&:is(:checked,:indeterminate)]:checkbox-bg-color-disabled-checked`),children:(0,t.jsx)(f,{})}),(0,t.jsx)(ft,{label:i,name:c})]})});function ft({label:e,name:n}){return(0,t.jsx)(`label`,{htmlFor:n,className:`checkbox-label checkbox-label-disabled`,children:e})}var pt=function(e){return e.Vertical=`vertical`,e.Horizontal=`horizontal`,e}({}),mt=`divider-bg-color`,ht={[pt.Horizontal]:`w-full`,[pt.Vertical]:`h-full`},gt=`1px`;function _t({type:e=pt.Horizontal,width:n,height:r,lineHeight:i=gt}){let a={...e===pt.Horizontal?{height:i}:{width:i}},o=ht[e];return n&&e===pt.Horizontal?o=n:r&&e===pt.Vertical&&(o=r),(0,t.jsx)(`div`,{className:(0,N.default)(mt,o),style:a})}var vt=function(e){return e.Small=`small`,e.Medium=`medium`,e}({}),yt=function(e){return e.Top=`top`,e.Bottom=`bottom`,e.Left=`left`,e.Right=`right`,e}({});function bt({text:e,position:i=yt.Top,maxWidth:a=`max-w-[200px]`,offset:o=8,openDelay:s=0,closeDelay:c=100,children:l}){let u=(0,n.useRef)(null),d=(0,n.useRef)(null),[f,p]=(0,n.useState)(!1),[m,h]=(0,n.useState)({top:0,left:0}),g=(0,n.useRef)(),_=(0,n.useRef)(),v=()=>{clearTimeout(g.current),clearTimeout(_.current)},y=()=>{v(),g.current=setTimeout(()=>p(!0),s)},b=()=>{v(),_.current=setTimeout(()=>p(!1),c)};return(0,n.useLayoutEffect)(()=>{if(!f)return;let e=u.current?.getBoundingClientRect();if(!e)return;let t={[yt.Top]:{top:e.top-o,left:e.left+e.width/2,transform:`translate(-50%, -100%)`},[yt.Bottom]:{top:e.bottom+o,left:e.left+e.width/2,transform:`translate(-50%, 0)`},[yt.Left]:{top:e.top+e.height/2,left:e.left-o,transform:`translate(-100%, -50%)`},[yt.Right]:{top:e.top+e.height/2,left:e.right+o,transform:`translate(0, -50%)`}}[i];h({top:t.top,left:t.left}),d.current.style.transform=t.transform},[f,i,o]),(0,n.useLayoutEffect)(()=>{if(!f)return;let e=()=>{let e=u.current?.getBoundingClientRect();e&&h(t=>({...t,left:e.left+e.width/2}))};return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[f]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(`div`,{ref:u,className:`inline-block cursor-pointer`,onMouseEnter:y,onFocus:y,onMouseLeave:b,onBlur:b,children:l}),f&&(0,r.createPortal)((0,t.jsx)(`div`,{ref:d,role:`tooltip`,style:{position:`fixed`,top:m.top,left:m.left,transition:`opacity .15s ease`,opacity:1},className:(0,N.default)(`z-[9999999999] w-max rounded p-xs tooltip-bg tooltip-text-color`,a),onMouseEnter:y,onMouseLeave:b,children:(0,t.jsx)(`p`,{className:`w-full break-words`,children:e})}),document.body)]})}function xt({keyText:e,value:n,tooltipPosition:r,tooltipText:i,supportingLabel:a,size:o=vt.Small,isTruncated:s=!1,copyText:c,onCopySuccess:l,onCopyError:u,fullwidth:d,isReverse:f=!1,valueHoverTitle:p}){let m=f?`flex-row-reverse`:`flex-row`;async function h(e){if(navigator.clipboard&&c)try{await navigator.clipboard.writeText(c),l?.(e,c)}catch(e){console.error(`Failed to copy:`,e),u?.(e,c)}}return(0,t.jsxs)(`div`,{className:(0,N.default)(`flex w-full items-baseline gap-xs py-xxs font-inter`,m,{"justify-between":d}),children:[(0,t.jsxs)(`div`,{className:(0,N.default)(`flex shrink-0 flex-row items-center gap-x-0.5`,{"w-1/4":!d}),children:[(0,t.jsx)(`span`,{className:`key-value-key-text-color text-body-md`,children:e}),i&&(0,t.jsx)(bt,{text:i,position:r,children:(0,t.jsx)(Ue,{className:`key-supporting-text-color`})})]}),(0,t.jsxs)(`div`,{className:(0,N.default)(`flex flex-row items-baseline gap-1 break-all`,{"w-3/4":!d,truncate:s}),children:[(0,t.jsx)(`span`,{title:p,className:(0,N.default)(`key-value-hover-text-color`,o===vt.Medium?`text-body-lg`:`text-body-md`,{truncate:s}),children:n}),a&&(0,t.jsx)(`span`,{className:(0,N.default)(`key-supporting-text-color`,o===vt.Medium?`text-body-md`:`text-body-sm`),children:a}),(0,t.jsx)(`div`,{className:`self-center`,children:c&&(0,t.jsx)(z,{onClick:h,"aria-label":`Copy to clipboard`,children:(0,t.jsx)(B,{className:`key-supporting-text-color`})})})]})]})}var H=function(e){return e.Small=`small`,e.Medium=`medium`,e.Large=`large`,e}({}),St={[H.Small]:`text-title-sm`,[H.Medium]:`text-title-md`,[H.Large]:`text-title-lg`},Ct={[H.Small]:`text-label-md`,[H.Medium]:`text-label-md`,[H.Large]:`text-label-lg`},wt={[H.Small]:`text-label-md`,[H.Medium]:`text-label-md`,[H.Large]:`text-label-lg`};function Tt({size:e=H.Medium,isCentered:n,supportingLabel:r,label:i,text:a,tooltipPosition:o,tooltipText:s}){let c=St[e],l=Ct[e],u=wt[e];return(0,t.jsxs)(`div`,{className:(0,N.default)(`flex flex-col`,n?`items-center`:`items-start`,e===H.Small?`gap-0.5`:`gap-1`),children:[(0,t.jsxs)(`div`,{className:`flex flex-row flex-wrap items-center gap-0.5`,children:[(0,t.jsx)(`span`,{className:(0,N.default)(`label-text-primary-neutral font-inter`,c),children:a}),r&&(0,t.jsx)(`span`,{className:(0,N.default)(`label-text-secondary-neutral font-inter`,l),children:r})]}),(0,t.jsx)(`div`,{className:`flex flex-row items-center gap-x-0.5`,children:(0,t.jsxs)(`span`,{className:(0,N.default)(`label-text-secondary-neutral flex items-center font-inter`,u),children:[i,s&&(0,t.jsx)(`div`,{className:`ml-xxxs flex items-center`,children:(0,t.jsx)(bt,{text:s,position:o,children:(0,t.jsx)(Ue,{className:`label-text-secondary-neutral`})})})]})})]})}function Et({showRightIcon:e,hideBottomBorder:n,onClick:r,isDisabled:i,children:a,isHighlighted:o,...s}){function c(e){(e.key===`Enter`||e.key===` `)&&!i&&r&&r()}function l(){!i&&r&&r()}return(0,t.jsx)(`div`,{className:(0,N.default)(`w-full`,{"list-item-border-color border-b pb-xs":!n},{"opacity-40":i}),children:(0,t.jsxs)(`div`,{onClick:l,role:`button`,tabIndex:0,onKeyDown:c,...s,className:(0,N.default)(`list-item-color relative flex flex-row items-center justify-between px-md py-sm`,!i&&r?`cursor-pointer`:`cursor-default`,{"list-item-highlight-bg":o,"state-layer-secondary":!i}),children:[a,e&&(0,t.jsx)(R,{size:P.Small,type:F.Ghost,disabled:i,icon:(0,t.jsx)(Pe,{})})]})})}function Dt({title:e,titleCentered:n,onBack:r,onClose:i,testId:a}){let o=n?`text-center`:r?`ml-1`:``,s=n&&(!r||!i);return(0,t.jsxs)(`div`,{className:`header-bg-color header-text-color flex min-h-[56px] w-full items-center px-md--rs pb-xs pt-sm [&_svg]:h-5 [&_svg]:w-5`,children:[r?(0,t.jsx)(R,{size:P.Small,type:F.Ghost,onClick:r,icon:(0,t.jsx)(je,{}),"aria-label":`Back`}):s&&(0,t.jsx)(`div`,{className:`w-9`}),(0,t.jsx)(`div`,{className:(0,N.default)(`flex-grow`,o),children:(0,t.jsx)(`span`,{className:`font-inter text-title-lg`,"data-testid":a,children:e})}),i?(0,t.jsx)(R,{size:P.Small,type:F.Ghost,onClick:i,icon:(0,t.jsx)(ze,{}),testId:`close-icon`,"aria-label":`Close`}):s&&(0,t.jsx)(`div`,{className:`w-9`})]})}function Ot({children:e,hasBorder:n,bgColor:r=`panel-bg`}){return(0,t.jsx)(`div`,{className:(0,N.default)(`flex w-full flex-col rounded-xl`,r,n?`border panel-border-color`:`border border-transparent`),children:e})}function kt(){return(0,t.jsx)(`div`,{className:`flex h-full w-full items-center justify-center bg-iota-neutral-96 dark:bg-iota-neutral-10`,children:(0,t.jsx)(qe,{className:`h-4 w-4 text-iota-neutral-40 dark:text-iota-neutral-60`})})}var At=(0,n.forwardRef)(({onError:e,renderFallback:r,...i},a)=>{let[o,s]=(0,n.useState)(!1);function c(t){s(!0),e?.(t)}return o||!i.src?r||(0,t.jsx)(kt,{}):(0,t.jsx)(jt,{onError:c,ref:a,...i})}),jt=(0,n.forwardRef)((e,n)=>(0,t.jsx)(`img`,{className:`h-full w-full object-cover`,ref:n,...e})),U=function(e){return e.Default=`default`,e.Error=`error`,e.Success=`success`,e.Warning=`warning`,e}({}),Mt=function(e){return e.Default=`default`,e.Elevated=`elevated`,e}({}),Nt={[U.Default]:`bg-default-surface text-on-default`,[U.Error]:`bg-error-surface text-on-error`,[U.Success]:`bg-success-surface text-on-success`,[U.Warning]:`bg-warning-surface text-on-warning`},Pt={[U.Default]:`bg-default-surface`,[U.Error]:`bg-error-surface`,[U.Success]:`bg-success-surface`,[U.Warning]:`bg-warning-surface`};function Ft({icon:e,title:n,supportingText:r,type:i,style:a}){let o=Nt[i];return(0,t.jsxs)(`div`,{className:(0,N.default)(`flex flex-row items-start gap-4 py-xs pr-lg`,a===Mt.Elevated?Pt[i]:``,{"rounded-lg pl-xs":a===Mt.Elevated}),children:[e&&(0,t.jsx)(`span`,{className:(0,N.default)(`flex items-center justify-center rounded-lg [&_svg]:h-4 [&_svg]:w-4`,o,{"p-xs":a===Mt.Default}),children:e}),(0,t.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[n&&(0,t.jsx)(`span`,{className:`infobox-text-title text-title-sm`,children:n}),r&&(0,t.jsx)(`span`,{className:`infobox-supporting-text text-body-sm`,children:r})]})]})}var W=function(e){return e.Default=`default`,e.Error=`error`,e.Warning=`warning`,e.Success=`success`,e}({}),It={[W.Default]:`text-on-default`,[W.Error]:`text-on-error`,[W.Warning]:`text-on-warning`,[W.Success]:`text-on-success`},Lt={[W.Default]:`bg-default-surface`,[W.Error]:`bg-error-surface`,[W.Warning]:`bg-warning-surface`,[W.Success]:`bg-success-surface`};function Rt({text:e,duration:r=2e3,onClose:i,showClose:a,type:o=W.Default}){return(0,n.useEffect)(()=>{if(r){let e=setTimeout(i,r);return()=>clearTimeout(e)}},[r,i]),(0,t.jsxs)(`div`,{className:(0,N.default)(`transition-all duration-300 ease-out`,`z-99 bottom-0`,`flex w-full items-center justify-between gap-xxs rounded-md py-sm pl-md pr-sm`,Lt[o]),children:[(0,t.jsx)(`div`,{className:(0,N.default)(`w-full text-left text-body-md`,It[o]),children:e}),a&&(0,t.jsx)(z,{onClick:i,"aria-label":`Close`,children:(0,t.jsx)(ze,{className:(0,N.default)(`h-5 w-5`,It[o])})})]})}function zt({color:e=`loading-indicator-color`,size:n=`w-5 h-5`,text:r,testId:i}){return(0,t.jsxs)(`div`,{className:`flex items-center justify-center gap-xs`,children:[(0,t.jsx)(V,{className:(0,N.default)(`animate-spin`,e,n),"data-testid":i}),r&&(0,t.jsx)(`span`,{className:(0,N.default)(`text-body-sm`,e),children:r})]})}function Bt({width:e=`w-full`,height:n=`h-4`}){return(0,t.jsx)(`div`,{className:(0,N.default)(`animate-pulse rounded-md bg-gradient-to-r from-shader-primary-light-8 bg-[length:1000px_100%] dark:from-shader-primary-dark-8`,e,n)})}function Vt({children:e,className:n,hasSecondaryColors:r}){return(0,t.jsx)(`div`,{className:(0,N.default)(`h-3 w-full animate-pulse rounded-full`,r?`skeleton-secondary-bg`:`skeleton-bg`,n),children:e})}var Ht={autoPlay:!0,muted:!0,playsInline:!0,controls:!0,controlsList:`nodownload`,disablePictureInPicture:!0,preload:`auto`,loop:!0,width:`100%`,height:`auto`},Ut={autoPlay:!0,muted:!0,playsInline:!0,controls:!1,disablePictureInPicture:!0,preload:`auto`,loop:!0,width:`100%`,height:`auto`},Wt=(0,n.forwardRef)(({width:e=`100%`,height:n=`auto`,isAutoPlayEnabled:r,disableControls:i,...a},o)=>(0,t.jsx)(`video`,{ref:o,width:e,height:n,...r?i?Ut:Ht:{preload:`metadata`,autoPlay:!1},...a,children:`Your browser does not support the video tag.`})),G=function(e){return e.Small=`small`,e.Default=`default`,e}({}),Gt=function(e){return e.Left=`left`,e.Right=`right`,e}({}),Kt=`relative inline-flex items-center p-xxs border rounded-full cursor-pointer`,qt={active:`toggle-bg-active toggle-border-active`,inactive:`toggle-bg-inactive toggle-border-inactive`,disabledActive:`toggle-bg-disabled-active toggle-border-disabled-active`,disabled:`opacity-40 cursor-not-allowed`},Jt={[G.Small]:`h-5 w-10`,[G.Default]:`h-6 w-12`},Yt=`absolute rounded-full transition-all duration-200 ease-in-out`,Xt={[G.Small]:{unchecked:`left-1`,checked:`left-[34px] -translate-x-full`},[G.Default]:{unchecked:`left-1`,checked:`left-[42px] -translate-x-full`}},Zt={unchecked:`toggle-thumb-color`,checked:`toggle-thumb-color-checked`},Qt={[G.Small]:`h-3 w-3`,[G.Default]:`h-4 w-4`},$t=`inline-flex items-center gap-2`,en=`text-label-lg toggle-label-color`,tn=(0,n.forwardRef)(({label:e,isToggled:r,labelPosition:i=Gt.Right,isDisabled:a=!1,onChange:o,name:s,size:c=G.Default,testId:l,...u},d)=>{let f=(0,n.useRef)(null);function p(e){let t=e.target.checked;o?.(t,e)}function m(e){d&&(typeof d==`function`?d(e):d.current=e),f.current=e}let h=(0,N.default)(Kt,{[qt.active]:r&&!a,[qt.inactive]:!r,[qt.disabledActive]:a&&r,[qt.disabled]:a,[Jt[c]]:!0}),g=(0,N.default)(Yt,{[Xt[c].unchecked]:!r,[Xt[c].checked]:r,[Zt.unchecked]:!r,[Zt.checked]:r,[Qt[c]]:!0}),_=(0,N.default)($t,{"flex-row-reverse":i===Gt.Left,"cursor-not-allowed":a}),v=(0,N.default)(en,{"opacity-40":a&&!r});return(0,t.jsxs)(`div`,{className:_,children:[(0,t.jsx)(`input`,{id:s,name:s,type:`checkbox`,className:`sr-only`,checked:r,ref:m,disabled:a,onChange:p,"data-testid":l}),(0,t.jsx)(`span`,{role:`switch`,"aria-checked":r,onClick:()=>f.current?.click(),className:h,...u,children:(0,t.jsx)(`span`,{className:g})}),e&&(0,t.jsx)(`label`,{htmlFor:s,className:v,children:e})]})});function nn({children:e,hasErrorStyles:n}){return(0,t.jsx)(`p`,{className:(0,N.default)(`secondary-text-color text-label-lg`,{"group-[.errored]:w-full group-[.errored]:secondary-text-error-color group-[.errored]:bg-error-surface group-[.errored]:rounded-xl group-[.errored]:py-1 group-[.errored]:px-2":n}),children:e})}function rn({text:e,isCopyable:n,isExternal:r,externalLink:i,copyText:a=e,onCopySuccess:o,onCopyError:s,onOpen:c}){async function l(e){if(navigator.clipboard){e?.stopPropagation();try{await navigator.clipboard.writeText(a),o?.(e,a)}catch(e){console.error(`Failed to copy:`,e),s?.(e,a)}}}function u(e){if(e?.stopPropagation(),i){let e=window.open(i,`_blank`,`noopener noreferrer`);e&&(e.opener=null)}c?.(e)}return(0,t.jsxs)(`div`,{className:`address-text-color group flex flex-row items-center gap-1`,children:[(0,t.jsx)(`span`,{className:(0,N.default)(`font-inter text-body-sm`),children:e}),n&&(0,t.jsx)(z,{onClick:l,className:`opacity-100`,"aria-label":`Copy to clipboard`,children:(0,t.jsx)(B,{})}),r&&(0,t.jsx)(z,{onClick:u,className:`opacity-100`,"aria-label":`Open in new tab`,children:(0,t.jsx)(Fe,{})})]})}var an=function(e){return e.Image=`image`,e.Video=`video`,e}({});function on({src:e,isAutoPlayEnabled:n,assetType:r,altText:i,showFallback:a,disableControls:o}){return r===an.Video?(0,t.jsx)(Wt,{src:e,isAutoPlayEnabled:n,disableControls:o}):a?(0,t.jsx)(At,{src:e,alt:i}):(0,t.jsx)(jt,{src:e,alt:i})}var K=function(e){return e.Outline=`outline`,e.Elevated=`elevated`,e.Success=`success`,e.Brand=`brand`,e.Error=`error`,e}({}),sn=function(e){return e.Small=`small`,e.Default=`default`,e}({}),cn=`rounded-full`,ln={[K.Outline]:`bg-transparent`,[K.Elevated]:`chip-bg-elevated`,[K.Success]:`bg-success-surface`,[K.Brand]:`chip-bg-brand`,[K.Error]:`bg-error-surface`},un=`outline outline-1 hover:chip-outline-color-hover active:chip-outline-color-active hover:chip-bg-color-hover active:chip-bg-color-active group-focus:chip-bg-color-focus`,dn={[K.Outline]:`chip-bg-selected-outline`},fn=`chip-bg-selected-overlay`,pn={[K.Outline]:`chip-text-secondary`},mn={[K.Outline]:`chip-border-default`,[K.Elevated]:`border-transparent`,[K.Success]:`border-success-surface`,[K.Brand]:`chip-border-color-brand`,[K.Error]:`border-error-surface`},hn={[K.Outline]:`chip-text-default`,[K.Elevated]:`chip-text-secondary`,[K.Success]:`chip-text-secondary`,[K.Brand]:`chip-text-brand`,[K.Error]:`chip-text-secondary`},gn=`focus-visible:shadow-[0_0_0_2px] focus-visible:chip-focus-ring focus-visible:outline-none`;function _n({label:e,type:n=K.Outline,selected:r,showClose:i,onClose:a,onClick:o,avatar:s,leadingElement:c,trailingElement:l,disabled:u,size:d=sn.Default,...f}){let p=n===K.Outline&&r,m=r?n===K.Outline?`outline-transparent names:outline-names-neutral-20`:`chip-outline-color`:`outline-transparent`,h=(0,N.default)(`group-focus:chip-outline-color-active`,n===K.Outline&&`names:group-focus:outline-transparent`),g=r&&!u&&n!==K.Outline?fn:``;return(0,t.jsx)(z,{onClick:o,className:(0,N.default)(`group border disabled:opacity-40`,cn,p?dn[K.Outline]:ln[n],r?`border-transparent`:mn[n]),disabled:u,...f,children:(0,t.jsxs)(`span`,{className:(0,N.default)(`flex h-full w-full flex-row items-center gap-x-2`,s?`py-xxs`:`py-[6px]`,s?`pl-xxs`:c?`pl-xs`:`pl-sm`,i?`pr-xs`:`pr-sm`,cn,p?pn[K.Outline]:hn[n],m,!u&&h,!u&&un,gn,g),children:[s??c,(0,t.jsx)(`span`,{className:(0,N.default)(d===sn.Small?`text-label-md`:`text-body-md`),children:e}),l,i&&(0,t.jsx)(z,{onClick:e=>{e.stopPropagation(),a?.()},disabled:u,"aria-label":`Remove`,children:(0,t.jsx)(ze,{className:(0,N.default)(`h-4 w-4 transition-opacity duration-150`,u?``:r?`opacity-100`:`chip-close-icon-opacity group-hover:opacity-100 group-focus:opacity-100 group-active:opacity-100`)})})]})})}var vn=function(e){return e.Outlined=`outlined`,e.Filled=`filled`,e.Transparent=`transparent`,e}({}),yn={[vn.Outlined]:`bg-transparent`,[vn.Filled]:`segmented-filled-bg-color`,[vn.Transparent]:`bg-transparent`},bn=`border segmented-outlined-border`;function xn({type:e=vn.Filled,children:n,shape:r=lt.Rounded}){let i=yn[e];return(0,t.jsx)(`div`,{className:(0,N.default)(`flex flex-row`,i,e===vn.Outlined?bn:``,r===lt.Rounded?`rounded-full gap-1 p-xxs`:``,r===lt.Rounded?`flex-wrap`:`flex-nowrap overflow-x-auto`),children:n})}var Sn=function(e){return e.Small=`small`,e.Medium=`medium`,e}({}),Cn={[Sn.Small]:`px-md py-sm--rs`,[Sn.Medium]:`px-md--rs py-sm--rs`},wn={[Sn.Small]:`text-title-md`,[Sn.Medium]:`text-title-lg`};function Tn({title:e,subtitle:n,trailingElement:r,tooltipText:i,supportingElement:a,tooltipPosition:o,size:s=Sn.Medium,testId:c}){return(0,t.jsxs)(`div`,{className:(0,N.default)(`flex flex-row items-center justify-between`,Cn[s]),"data-testid":c,children:[(0,t.jsxs)(`div`,{className:`flex flex-row items-center gap-x-xxxs`,children:[(0,t.jsxs)(`div`,{className:`flex flex-col justify-start`,children:[(0,t.jsxs)(`div`,{className:`title-main-color flex flex-row items-center gap-x-0.5`,children:[(0,t.jsx)(`h4`,{className:(0,N.default)(wn[s]),children:e}),i&&(0,t.jsx)(bt,{text:i,position:o,children:(0,t.jsx)(Ue,{className:`title-icon-color`})})]}),(0,t.jsx)(`p`,{className:`title-subtitle-color text-label-md`,children:n})]}),a]}),r]})}var En=`w-full input-caret-color bg-transparent text-body-lg caret-input-caret-color focus:outline-none focus-visible:outline-none disabled:cursor-not-allowed`,Dn=`input-text-color`,On=`input-placeholder-color`,kn=`[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none disabled:cursor-not-allowed`,An=`px-md py-sm rounded-lg border input-border-color input-border-color-disabled group-[.enabled]:cursor-text input-border-error-color hover:group-[.enabled]:input-border-color-hover input-border-color-focus`,jn=`flex flex-col gap-y-2 text-label-lg input-label-color`,Mn=function(e){return e.Label=`label`,e.Div=`div`,e}({});function Nn({label:e,caption:n,disabled:r,errorMessage:i,amountCounter:a,required:o,labelHtmlTag:s=Mn.Label,children:c}){return(0,t.jsxs)(`div`,{className:(0,N.default)(`group flex w-full flex-col gap-y-2`,{"cursor-not-allowed opacity-40":r,errored:i,enabled:!r,required:o}),children:[e?(0,t.jsxs)(Pn,{labelHtmlTag:s,children:[e,c]}):c,(i||n||a)&&(0,t.jsxs)(`div`,{className:(0,N.default)(`flex flex-row items-center`,n||i?`justify-between gap-md`:`justify-end`),children:[(i||n)&&(0,t.jsx)(nn,{hasErrorStyles:!0,children:i||n}),a&&(0,t.jsx)(nn,{children:a})]})]})}function Pn({labelHtmlTag:e,children:t}){return(0,n.createElement)(e,{className:jn},t)}var q=function(e){return e.Text=`text`,e.Password=`password`,e.Number=`number`,e.NumericFormat=`numericFormat`,e}({}),Fn=function(e){return e.None=`none`,e.Vertical=`vertical`,e}({});function In(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var Ln;(function(e){e.event=`event`,e.props=`prop`})(Ln||={});function Rn(){}function zn(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(e,n){return e===t[n]})?n:(t=r,n=e.apply(void 0,r),n)}}function Bn(e){return!!(e||``).match(/\d/)}function Vn(e){return e==null}function Hn(e){return typeof e==`number`&&isNaN(e)}function Un(e){return Vn(e)||Hn(e)||typeof e==`number`&&!isFinite(e)}function Wn(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,`\\$&`)}function Gn(e){switch(e){case`lakh`:return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case`wan`:return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Kn(e,t,n){var r=Gn(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,`$1`+t)}function qn(e){var t=(0,n.useRef)(e);return t.current=e,(0,n.useRef)(function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return t.current.apply(t,e)}).current}function Jn(e,t){t===void 0&&(t=!0);var n=e[0]===`-`,r=n&&t;e=e.replace(`-`,``);var i=e.split(`.`);return{beforeDecimal:i[0],afterDecimal:i[1]||``,hasNegation:n,addNegation:r}}function Yn(e){if(!e)return e;var t=e[0]===`-`;t&&(e=e.substring(1,e.length));var n=e.split(`.`),r=n[0].replace(/^0+/,``)||`0`,i=n[1]||``;return(t?`-`:``)+r+(i?`.`+i:``)}function Xn(e,t,n){for(var r=``,i=n?`0`:``,a=0;a<=t-1;a++)r+=e[a]||i;return r}function Zn(e,t){return Array(t+1).join(e)}function Qn(e){var t=e+``,n=t[0]===`-`?`-`:``;n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],a=r[1];if(a=Number(a),!a)return n+i;i=i.replace(`.`,``);var o=1+a,s=i.length;return o<0?i=`0.`+Zn(`0`,Math.abs(o))+i:o>=s?i+=Zn(`0`,o-s):i=(i.substring(0,o)||`0`)+`.`+i.substring(o),n+i}function $n(e,t,n){if([``,`-`].indexOf(e)!==-1)return e;var r=(e.indexOf(`.`)!==-1||n)&&t,i=Jn(e),a=i.beforeDecimal,o=i.afterDecimal,s=i.hasNegation,c=parseFloat(`0.`+(o||`0`)),l=(o.length<=t?`0.`+o:c.toFixed(t)).split(`.`),u=a;a&&Number(l[0])&&(u=a.split(``).reverse().reduce(function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e},l[0]));var d=Xn(l[1]||``,t,n),f=s?`-`:``,p=r?`.`:``;return``+f+u+p+d}function er(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move(`character`,t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var tr=zn(function(e,t){for(var n=0,r=0,i=e.length,a=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[a-1-r]&&a-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:a-r}}}),nr=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function rr(e,t,n){return Math.min(Math.max(e,t),n)}function ir(e){return Math.max(e.selectionStart,e.selectionEnd)}function ar(){return typeof navigator<`u`&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function or(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:``}}function sr(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function cr(e,t,n,r,i,a,o){o===void 0&&(o=sr);var s=i.findIndex(function(e){return e}),c=e.slice(0,s);!t&&!n.startsWith(c)&&(t=c,n=c+n,r+=c.length);for(var l=n.length,u=e.length,d={},f=Array(l),p=0;p<l;p++){f[p]=-1;for(var m=0,h=u;m<h;m++)if(o({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:m})&&d[m]!==!0){f[p]=m,d[m]=!0;break}}for(var g=r;g<l&&(f[g]===-1||!a(n[g]));)g++;var _=g===l||f[g]===-1?u:f[g];for(g=r-1;g>0&&f[g]===-1;)g--;var v=g===-1||f[g]===-1?0:f[g]+1;return v>_?_:r-v<_-r?v:_}function lr(e,t,n,r){var i=e.length;if(t=rr(t,0,i),r===`left`){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function ur(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(Bn(e[n])||Bn(e[n-1]));return t}function dr(e,t,r,i,a,o){o===void 0&&(o=Rn);var s=qn(function(e,t){var n,r;return Un(e)?(r=``,n=``):typeof e==`number`||t?(r=typeof e==`number`?Qn(e):e,n=i(r)):(r=a(e,void 0),n=i(r)),{formattedValue:n,numAsString:r}}),c=(0,n.useState)(function(){return s(Vn(e)?t:e,r)}),l=c[0],u=c[1],d=function(e,t){e.formattedValue!==l.formattedValue&&u({formattedValue:e.formattedValue,numAsString:e.value}),o(e,t)},f=e,p=r;Vn(e)&&(f=l.numAsString,p=!0);var m=s(f,p);return(0,n.useMemo)(function(){u(m)},[m.formattedValue]),[l,d]}function fr(e){return e.replace(/[^0-9]/g,``)}function pr(e){return e}function mr(e){var t=e.type;t===void 0&&(t=`text`);var r=e.displayType;r===void 0&&(r=`input`);var i=e.customInput,a=e.renderText,o=e.getInputRef,s=e.format;s===void 0&&(s=pr);var c=e.removeFormatting;c===void 0&&(c=fr);var l=e.defaultValue,u=e.valueIsNumericString,d=e.onValueChange,f=e.isAllowed,p=e.onChange;p===void 0&&(p=Rn);var m=e.onKeyDown;m===void 0&&(m=Rn);var h=e.onMouseUp;h===void 0&&(h=Rn);var g=e.onFocus;g===void 0&&(g=Rn);var _=e.onBlur;_===void 0&&(_=Rn);var v=e.value,y=e.getCaretBoundary;y===void 0&&(y=ur);var b=e.isValidInputCharacter;b===void 0&&(b=Bn);var x=e.isCharacterSame,S=In(e,[`type`,`displayType`,`customInput`,`renderText`,`getInputRef`,`format`,`removeFormatting`,`defaultValue`,`valueIsNumericString`,`onValueChange`,`isAllowed`,`onChange`,`onKeyDown`,`onMouseUp`,`onFocus`,`onBlur`,`value`,`getCaretBoundary`,`isValidInputCharacter`,`isCharacterSame`]),C=dr(v,l,!!u,s,c,d),w=C[0],T=w.formattedValue,E=w.numAsString,D=C[1],ee=(0,n.useRef)(),O=(0,n.useRef)({formattedValue:T,numAsString:E}),te=function(e,t){O.current={formattedValue:e.formattedValue,numAsString:e.value},D(e,t)},ne=(0,n.useState)(!1),k=ne[0],re=ne[1],ie=(0,n.useRef)(null),ae=(0,n.useRef)({setCaretTimeout:null,focusTimeout:null});(0,n.useEffect)(function(){return re(!0),function(){clearTimeout(ae.current.setCaretTimeout),clearTimeout(ae.current.focusTimeout)}},[]);var oe=s,se=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},ce=function(e,t,n){e.selectionStart===0&&e.selectionEnd===e.value.length||(er(e,t),ae.current.setCaretTimeout=setTimeout(function(){e.value===n&&e.selectionStart!==t&&er(e,t)},0))},A=function(e,t,n){return lr(e,t,y(e),n)},le=function(e,t,n){var r=y(t),i=cr(t,T,e,n,r,b,x);return i=lr(t,i,r),i},ue=function(e){var t=e.formattedValue;t===void 0&&(t=``);var n=e.input,r=e.source,i=e.event,a=e.numAsString,o;if(n){var s=e.inputValue||n.value,c=ir(n);n.value=t,o=le(s,t,c),o!==void 0&&ce(n,o,t)}t!==T&&te(se(t,a),{event:i,source:r})};(0,n.useEffect)(function(){var e=O.current,t=e.formattedValue,n=e.numAsString;(T!==t||E!==n)&&te(se(T,E),{event:void 0,source:Ln.props})},[T,E]);var de=ie.current?ir(ie.current):void 0;(typeof window<`u`?n.useLayoutEffect:n.useEffect)(function(){var e=ie.current;if(T!==O.current.formattedValue&&e){var t=le(O.current.formattedValue,T,de);e.value=T,ce(e,t,T)}},[T]);var fe=function(e,t,n){var r=t.target,i=ee.current?nr(ee.current,r.selectionEnd):tr(T,e),a=Object.assign(Object.assign({},i),{lastValue:T}),o=c(e,a),s=oe(o);if(o=c(s,void 0),f&&!f(se(s,o))){var l=t.target,u=le(e,T,ir(l));return l.value=T,ce(l,u,T),!1}return ue({formattedValue:s,numAsString:o,inputValue:e,event:t,source:n,input:t.target}),!0},j=function(e,t){t===void 0&&(t=0),ee.current={selectionStart:e.selectionStart,selectionEnd:e.selectionEnd+t}},pe=function(e){var t=e.target.value;fe(t,e,Ln.event)&&p(e),ee.current=void 0},me=function(e){var t=e.target,n=e.key,r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o;n===`ArrowLeft`||n===`Backspace`?o=Math.max(r-1,0):n===`ArrowRight`?o=Math.min(r+1,a.length):n===`Delete`&&(o=r);var s=0;n===`Delete`&&r===i&&(s=1);var c=n===`ArrowLeft`||n===`ArrowRight`;if(o===void 0||r!==i&&!c){m(e),j(t,s);return}var l=o;c?(l=A(a,o,n===`ArrowLeft`?`left`:`right`),l!==o&&e.preventDefault()):n===`Delete`&&!b(a[o])?l=A(a,o,`right`):n===`Backspace`&&!b(a[o])&&(l=A(a,o,`left`)),l!==o&&ce(t,l,a),m(e),j(t,s)},he=function(e){var t=e.target,n=function(){var e=t.selectionStart,n=t.selectionEnd,r=t.value;if(r===void 0&&(r=``),e===n){var i=A(r,e);i!==e&&ce(t,i,r)}};n(),requestAnimationFrame(function(){n()}),h(e),j(t)},ge=function(e){e.persist&&e.persist();var t=e.target,n=e.currentTarget;ie.current=t,ae.current.focusTimeout=setTimeout(function(){var r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o=A(a,r);o!==r&&!(r===0&&i===a.length)&&ce(t,o,a),g(Object.assign(Object.assign({},e),{currentTarget:n}))},0)},_e=function(e){ie.current=null,clearTimeout(ae.current.focusTimeout),clearTimeout(ae.current.setCaretTimeout),_(e)},M=k&&ar()?`numeric`:void 0,ve=Object.assign({inputMode:M},S,{type:t,value:T,onChange:pe,onKeyDown:me,onMouseUp:he,onFocus:ge,onBlur:_e});if(r===`text`)return a?n.default.createElement(n.default.Fragment,null,a(T,S)||null):n.default.createElement(`span`,Object.assign({},S,{ref:o}),T);if(i){var ye=i;return n.default.createElement(ye,Object.assign({},ve,{ref:o}))}return n.default.createElement(`input`,Object.assign({},ve,{ref:o}))}function hr(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i=``);var a=t.suffix;a===void 0&&(a=``);var o=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s=`thousand`),e===``||e===`-`)return e;var c=gr(t),l=c.thousandSeparator,u=c.decimalSeparator,d=n!==0&&e.indexOf(`.`)!==-1||n&&r,f=Jn(e,o),p=f.beforeDecimal,m=f.afterDecimal,h=f.addNegation;return n!==void 0&&(m=Xn(m,n,!!r)),l&&(p=Kn(p,l,s)),i&&(p=i+p),a&&(m+=a),h&&(p=`-`+p),e=p+(d&&u||``)+m,e}function gr(e){var t=e.decimalSeparator;t===void 0&&(t=`.`);var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=`,`),r||=[t,`.`],{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function _r(e,t){e===void 0&&(e=``);var n=RegExp(`(-)`),r=RegExp(`(-)(.)*(-)`),i=n.test(e),a=r.test(e);return e=e.replace(/-/g,``),i&&!a&&t&&(e=`-`+e),e}function vr(e,t){return RegExp(`(^-)|[0-9]|`+Wn(e),t?`g`:void 0)}function yr(e,t,n){return e===``?!0:!t?.match(/\d/)&&!n?.match(/\d/)&&typeof e==`string`&&!isNaN(Number(e))}function br(e,t,n){var r;t===void 0&&(t=or(e));var i=n.allowNegative,a=n.prefix;a===void 0&&(a=``);var o=n.suffix;o===void 0&&(o=``);var s=n.decimalScale,c=t.from,l=t.to,u=l.start,d=l.end,f=gr(n),p=f.allowedDecimalSeparators,m=f.decimalSeparator,h=e[d]===m;if(Bn(e)&&(e===a||e===o)&&t.lastValue===``)return e;if(d-u===1&&p.indexOf(e[u])!==-1){var g=s===0?``:m;e=e.substring(0,u)+g+e.substring(u+1,e.length)}var _=function(e,t,n){var r=!1,i=!1;a.startsWith(`-`)?r=!1:e.startsWith(`--`)?(r=!1,i=!0):o.startsWith(`-`)&&e.length===o.length?r=!1:e[0]===`-`&&(r=!0);var s=+!!r;return i&&(s=2),s&&(e=e.substring(s),t-=s,n-=s),{value:e,start:t,end:n,hasNegation:r}},v=_(e,u,d),y=v.hasNegation;r=v,e=r.value,u=r.start,d=r.end;var b=_(t.lastValue,c.start,c.end),x=b.start,S=b.end,C=b.value,w=e.substring(u,d);e.length&&C.length&&(x>C.length-o.length||S<a.length)&&!(w&&o.startsWith(w))&&(e=C);var T=0;e.startsWith(a)?T+=a.length:u<a.length&&(T=u),e=e.substring(T),d-=T;var E=e.length,D=e.length-o.length;e.endsWith(o)?E=D:(d>D||d>e.length-o.length)&&(E=d),e=e.substring(0,E),e=_r(y?`-`+e:e,i),e=(e.match(vr(m,!0))||[]).join(``);var ee=e.indexOf(m);e=e.replace(new RegExp(Wn(m),`g`),function(e,t){return t===ee?`.`:``});var O=Jn(e,i),te=O.beforeDecimal,ne=O.afterDecimal,k=O.addNegation;return l.end-l.start<c.end-c.start&&te===``&&h&&!parseFloat(ne)&&(e=k?`-`:``),e}function xr(e,t){var n=t.prefix;n===void 0&&(n=``);var r=t.suffix;r===void 0&&(r=``);var i=Array.from({length:e.length+1}).map(function(){return!0}),a=e[0]===`-`;i.fill(!1,0,n.length+ +!!a);var o=e.length;return i.fill(!1,o-r.length+1,o+1),i}function Sr(e){var t=gr(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i=``);var a=e.allowNegative;if(a===void 0&&(a=!0),n===r)throw Error(`
|
|
9
|
+
`,lt=function(e){return e.Rounded=`rounded`,e.Underlined=`underlined`,e}({});function ut({icon:e,label:n,selected:r,disabled:i,onClick:a,type:o=lt.Rounded,isNested:s=!1,...c}){let l=o===lt.Underlined,u=r?l?`bg-transparent`:it:rt,d=l?r?ct:st:``,f=r?ot:at,p=l?s?`px-md py-sm`:`px-lg py-md`:`px-sm py-[6px]`,m=l?``:`rounded-full`,h=s?l?`text-title-sm`:`text-label-md`:l?`text-title-md`:`text-label-lg`;return(0,t.jsx)(z,{onClick:a,className:(0,N.default)(`enabled:state-layer-secondary relative flex items-center disabled:opacity-40`,u,f,p,m,d,{"pl-xs":!!e&&!l}),disabled:i,...c,children:(0,t.jsxs)(`div`,{className:(0,N.default)(`flex flex-row items-center justify-center gap-2`,h),children:[e&&(0,t.jsx)(`span`,{children:e}),(0,t.jsx)(`span`,{className:`text-start font-inter`,children:n})]})})}var dt=(0,n.forwardRef)(({isChecked:e,isIndeterminate:r,label:i,isLabelFirst:a,isDisabled:o,onCheckedChange:s,name:c,...l},u)=>{let d=(0,n.useRef)(null);(0,n.useEffect)(()=>{d.current&&(d.current.indeterminate=r??!1)},[r,d]);let f=r?Be:Le;function p(e){u&&(typeof u==`function`?u(e):u.current=e),d.current=e}return(0,t.jsxs)(`div`,{className:(0,N.default)(`group inline-flex has-[:disabled]:opacity-40`,a?`flex-row-reverse`:`flex-row`,{disabled:o,"gap-x-2":i}),children:[(0,t.jsx)(`input`,{id:c,name:c,type:`checkbox`,className:`peer hidden appearance-none`,checked:e,ref:p,disabled:o,onChange:e=>{s?.(e)},...l}),(0,t.jsx)(`span`,{onClick:()=>d.current?.click(),className:(0,N.default)(`checkbox-base checkbox-state checkbox-icon checkbox-icon-hidden`,`checkbox-border-default`,`peer-[&:is(:checked,:indeterminate)]:checkbox-border-checked`,`peer-[&:is(:checked,:indeterminate)]:checkbox-bg-checked`,`peer-[&:is(:checked,:indeterminate)]:checkbox-text-checked`,`peer-disabled:peer-[&:not(:checked,:indeterminate)]:checkbox-border-color-disabled`,`peer-disabled:peer-[&:is(:checked,:indeterminate)]:checkbox-border-color-disabled-checked`,`peer-disabled:peer-[&:is(:checked,:indeterminate)]:checkbox-bg-color-disabled-checked`),children:(0,t.jsx)(f,{})}),(0,t.jsx)(ft,{label:i,name:c})]})});function ft({label:e,name:n}){return(0,t.jsx)(`label`,{htmlFor:n,className:`checkbox-label checkbox-label-disabled`,children:e})}var pt=function(e){return e.Vertical=`vertical`,e.Horizontal=`horizontal`,e}({}),mt=`divider-bg-color`,ht={[pt.Horizontal]:`w-full`,[pt.Vertical]:`h-full`},gt=`1px`;function _t({type:e=pt.Horizontal,width:n,height:r,lineHeight:i=gt}){let a={...e===pt.Horizontal?{height:i}:{width:i}},o=ht[e];return n&&e===pt.Horizontal?o=n:r&&e===pt.Vertical&&(o=r),(0,t.jsx)(`div`,{className:(0,N.default)(mt,o),style:a})}var vt=function(e){return e.Small=`small`,e.Medium=`medium`,e}({}),yt=function(e){return e.Top=`top`,e.Bottom=`bottom`,e.Left=`left`,e.Right=`right`,e}({});function bt({text:e,position:i=yt.Top,maxWidth:a=`max-w-[200px]`,offset:o=8,openDelay:s=0,closeDelay:c=100,children:l}){let u=(0,n.useRef)(null),d=(0,n.useRef)(null),[f,p]=(0,n.useState)(!1),[m,h]=(0,n.useState)({top:0,left:0}),g=(0,n.useRef)(),_=(0,n.useRef)(),v=()=>{clearTimeout(g.current),clearTimeout(_.current)},y=()=>{v(),g.current=setTimeout(()=>p(!0),s)},b=()=>{v(),_.current=setTimeout(()=>p(!1),c)};return(0,n.useLayoutEffect)(()=>{if(!f)return;let e=u.current?.getBoundingClientRect();if(!e)return;let t={[yt.Top]:{top:e.top-o,left:e.left+e.width/2,transform:`translate(-50%, -100%)`},[yt.Bottom]:{top:e.bottom+o,left:e.left+e.width/2,transform:`translate(-50%, 0)`},[yt.Left]:{top:e.top+e.height/2,left:e.left-o,transform:`translate(-100%, -50%)`},[yt.Right]:{top:e.top+e.height/2,left:e.right+o,transform:`translate(0, -50%)`}}[i];h({top:t.top,left:t.left}),d.current.style.transform=t.transform},[f,i,o]),(0,n.useLayoutEffect)(()=>{if(!f)return;let e=()=>{let e=u.current?.getBoundingClientRect();e&&h(t=>({...t,left:e.left+e.width/2}))};return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[f]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(`div`,{ref:u,className:`inline-block cursor-pointer`,onMouseEnter:y,onFocus:y,onMouseLeave:b,onBlur:b,children:l}),f&&(0,r.createPortal)((0,t.jsx)(`div`,{ref:d,role:`tooltip`,style:{position:`fixed`,top:m.top,left:m.left,transition:`opacity .15s ease`,opacity:1},className:(0,N.default)(`z-[9999999999] w-max rounded p-xs tooltip-bg tooltip-text-color`,a),onMouseEnter:y,onMouseLeave:b,children:(0,t.jsx)(`p`,{className:`w-full break-words`,children:e})}),document.body)]})}function xt({keyText:e,keyIcon:n,value:r,tooltipPosition:i,tooltipText:a,supportingLabel:o,size:s=vt.Small,isTruncated:c=!1,copyText:l,onCopySuccess:u,onCopyError:d,fullwidth:f,isReverse:p=!1,valueHoverTitle:m}){let h=p?`flex-row-reverse`:`flex-row`;async function g(e){if(navigator.clipboard&&l)try{await navigator.clipboard.writeText(l),u?.(e,l)}catch(e){console.error(`Failed to copy:`,e),d?.(e,l)}}return(0,t.jsxs)(`div`,{className:(0,N.default)(`flex w-full items-baseline gap-xs py-xxs font-inter`,h,{"flex-wrap justify-between":f}),children:[(0,t.jsxs)(`div`,{className:(0,N.default)(`flex shrink-0 flex-row items-center gap-x-0.5`,{"w-1/4":!f}),children:[n,(0,t.jsx)(`span`,{className:`key-value-key-text-color break-normal text-body-md`,children:e}),a&&(0,t.jsx)(bt,{text:a,position:i,children:(0,t.jsx)(Ue,{className:`key-supporting-text-color`})})]}),(0,t.jsxs)(`div`,{className:(0,N.default)(`flex min-w-0 flex-row items-baseline gap-1 break-all`,{"w-3/4":!f,"flex-wrap":f,truncate:c}),children:[(0,t.jsx)(`span`,{title:m,className:(0,N.default)(`key-value-hover-text-color min-w-0`,s===vt.Medium?`text-body-lg`:`text-body-md`,{truncate:c}),children:r}),o&&(0,t.jsx)(`span`,{className:(0,N.default)(`key-supporting-text-color`,s===vt.Medium?`text-body-md`:`text-body-sm`),children:o}),(0,t.jsx)(`div`,{className:`self-center`,children:l&&(0,t.jsx)(z,{onClick:g,"aria-label":`Copy to clipboard`,children:(0,t.jsx)(B,{className:`key-supporting-text-color`})})})]})]})}var H=function(e){return e.Small=`small`,e.Medium=`medium`,e.Large=`large`,e}({}),St={[H.Small]:`text-title-sm`,[H.Medium]:`text-title-md`,[H.Large]:`text-title-lg`},Ct={[H.Small]:`text-label-md`,[H.Medium]:`text-label-md`,[H.Large]:`text-label-lg`},wt={[H.Small]:`text-label-md`,[H.Medium]:`text-label-md`,[H.Large]:`text-label-lg`};function Tt({size:e=H.Medium,isCentered:n,supportingLabel:r,label:i,text:a,tooltipPosition:o,tooltipText:s}){let c=St[e],l=Ct[e],u=wt[e];return(0,t.jsxs)(`div`,{className:(0,N.default)(`flex flex-col`,n?`items-center`:`items-start`,e===H.Small?`gap-0.5`:`gap-1`),children:[(0,t.jsxs)(`div`,{className:`flex flex-row flex-wrap items-center gap-0.5`,children:[(0,t.jsx)(`span`,{className:(0,N.default)(`label-text-primary-neutral font-inter`,c),children:a}),r&&(0,t.jsx)(`span`,{className:(0,N.default)(`label-text-secondary-neutral font-inter`,l),children:r})]}),(0,t.jsx)(`div`,{className:`flex flex-row items-center gap-x-0.5`,children:(0,t.jsxs)(`span`,{className:(0,N.default)(`label-text-secondary-neutral flex items-center font-inter`,u),children:[i,s&&(0,t.jsx)(`div`,{className:`ml-xxxs flex items-center`,children:(0,t.jsx)(bt,{text:s,position:o,children:(0,t.jsx)(Ue,{className:`label-text-secondary-neutral`})})})]})})]})}function Et({showRightIcon:e,hideBottomBorder:n,onClick:r,isDisabled:i,children:a,isHighlighted:o,...s}){function c(e){(e.key===`Enter`||e.key===` `)&&!i&&r&&r()}function l(){!i&&r&&r()}return(0,t.jsx)(`div`,{className:(0,N.default)(`w-full`,{"list-item-border-color border-b pb-xs":!n},{"opacity-40":i}),children:(0,t.jsxs)(`div`,{onClick:l,role:`button`,tabIndex:0,onKeyDown:c,...s,className:(0,N.default)(`list-item-color relative flex flex-row items-center justify-between px-md py-sm`,!i&&r?`cursor-pointer`:`cursor-default`,{"list-item-highlight-bg":o,"state-layer-secondary":!i}),children:[a,e&&(0,t.jsx)(R,{size:P.Small,type:F.Ghost,disabled:i,icon:(0,t.jsx)(Pe,{})})]})})}function Dt({title:e,titleCentered:n,onBack:r,onClose:i,testId:a}){let o=n?`text-center`:r?`ml-1`:``,s=n&&(!r||!i);return(0,t.jsxs)(`div`,{className:`header-bg-color header-text-color flex min-h-[56px] w-full items-center px-md--rs pb-xs pt-sm [&_svg]:h-5 [&_svg]:w-5`,children:[r?(0,t.jsx)(R,{size:P.Small,type:F.Ghost,onClick:r,icon:(0,t.jsx)(je,{}),"aria-label":`Back`}):s&&(0,t.jsx)(`div`,{className:`w-9`}),(0,t.jsx)(`div`,{className:(0,N.default)(`flex-grow`,o),children:(0,t.jsx)(`span`,{className:`font-inter text-title-lg`,"data-testid":a,children:e})}),i?(0,t.jsx)(R,{size:P.Small,type:F.Ghost,onClick:i,icon:(0,t.jsx)(ze,{}),testId:`close-icon`,"aria-label":`Close`}):s&&(0,t.jsx)(`div`,{className:`w-9`})]})}function Ot({children:e,hasBorder:n,bgColor:r=`panel-bg`}){return(0,t.jsx)(`div`,{className:(0,N.default)(`flex w-full flex-col rounded-xl`,r,n?`border panel-border-color`:`border border-transparent`),children:e})}function kt(){return(0,t.jsx)(`div`,{className:`flex h-full w-full items-center justify-center bg-iota-neutral-96 dark:bg-iota-neutral-10`,children:(0,t.jsx)(qe,{className:`h-4 w-4 text-iota-neutral-40 dark:text-iota-neutral-60`})})}var At=(0,n.forwardRef)(({onError:e,renderFallback:r,...i},a)=>{let[o,s]=(0,n.useState)(!1);function c(t){s(!0),e?.(t)}return o||!i.src?r||(0,t.jsx)(kt,{}):(0,t.jsx)(jt,{onError:c,ref:a,...i})}),jt=(0,n.forwardRef)((e,n)=>(0,t.jsx)(`img`,{className:`h-full w-full object-cover`,ref:n,...e})),U=function(e){return e.Default=`default`,e.Error=`error`,e.Success=`success`,e.Warning=`warning`,e}({}),Mt=function(e){return e.Default=`default`,e.Elevated=`elevated`,e}({}),Nt={[U.Default]:`bg-default-surface text-on-default`,[U.Error]:`bg-error-surface text-on-error`,[U.Success]:`bg-success-surface text-on-success`,[U.Warning]:`bg-warning-surface text-on-warning`},Pt={[U.Default]:`bg-default-surface`,[U.Error]:`bg-error-surface`,[U.Success]:`bg-success-surface`,[U.Warning]:`bg-warning-surface`};function Ft({icon:e,title:n,supportingText:r,type:i,style:a}){let o=Nt[i];return(0,t.jsxs)(`div`,{className:(0,N.default)(`flex flex-row items-start gap-4 py-xs pr-lg`,a===Mt.Elevated?Pt[i]:``,{"rounded-lg":a===Mt.Elevated,"pl-xs":a===Mt.Elevated&&!!e,"pl-lg":a===Mt.Elevated&&!e}),children:[e&&(0,t.jsx)(`span`,{className:(0,N.default)(`flex items-center justify-center rounded-lg [&_svg]:h-4 [&_svg]:w-4`,o,{"p-xs":a===Mt.Default}),children:e}),(0,t.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[n&&(0,t.jsx)(`span`,{className:`infobox-text-title text-title-sm`,children:n}),r&&(0,t.jsx)(`span`,{className:`infobox-supporting-text text-body-sm`,children:r})]})]})}var W=function(e){return e.Default=`default`,e.Error=`error`,e.Warning=`warning`,e.Success=`success`,e}({}),It={[W.Default]:`text-on-default`,[W.Error]:`text-on-error`,[W.Warning]:`text-on-warning`,[W.Success]:`text-on-success`},Lt={[W.Default]:`bg-default-surface`,[W.Error]:`bg-error-surface`,[W.Warning]:`bg-warning-surface`,[W.Success]:`bg-success-surface`};function Rt({text:e,duration:r=2e3,onClose:i,showClose:a,type:o=W.Default}){return(0,n.useEffect)(()=>{if(r){let e=setTimeout(i,r);return()=>clearTimeout(e)}},[r,i]),(0,t.jsxs)(`div`,{className:(0,N.default)(`transition-all duration-300 ease-out`,`z-99 bottom-0`,`flex w-full items-center justify-between gap-xxs rounded-md py-sm pl-md pr-sm`,Lt[o]),children:[(0,t.jsx)(`div`,{className:(0,N.default)(`w-full text-left text-body-md`,It[o]),children:e}),a&&(0,t.jsx)(z,{onClick:i,"aria-label":`Close`,children:(0,t.jsx)(ze,{className:(0,N.default)(`h-5 w-5`,It[o])})})]})}function zt({color:e=`loading-indicator-color`,size:n=`w-5 h-5`,text:r,testId:i}){return(0,t.jsxs)(`div`,{className:`flex items-center justify-center gap-xs`,children:[(0,t.jsx)(V,{className:(0,N.default)(`animate-spin`,e,n),"data-testid":i}),r&&(0,t.jsx)(`span`,{className:(0,N.default)(`text-body-sm`,e),children:r})]})}function Bt({width:e=`w-full`,height:n=`h-4`}){return(0,t.jsx)(`div`,{className:(0,N.default)(`animate-pulse rounded-md bg-gradient-to-r from-shader-primary-light-8 bg-[length:1000px_100%] dark:from-shader-primary-dark-8`,e,n)})}function Vt({children:e,className:n,hasSecondaryColors:r}){return(0,t.jsx)(`div`,{className:(0,N.default)(`h-3 w-full animate-pulse rounded-full`,r?`skeleton-secondary-bg`:`skeleton-bg`,n),children:e})}var Ht={autoPlay:!0,muted:!0,playsInline:!0,controls:!0,controlsList:`nodownload`,disablePictureInPicture:!0,preload:`auto`,loop:!0,width:`100%`,height:`auto`},Ut={autoPlay:!0,muted:!0,playsInline:!0,controls:!1,disablePictureInPicture:!0,preload:`auto`,loop:!0,width:`100%`,height:`auto`},Wt=(0,n.forwardRef)(({width:e=`100%`,height:n=`auto`,isAutoPlayEnabled:r,disableControls:i,...a},o)=>(0,t.jsx)(`video`,{ref:o,width:e,height:n,...r?i?Ut:Ht:{preload:`metadata`,autoPlay:!1},...a,children:`Your browser does not support the video tag.`})),G=function(e){return e.Small=`small`,e.Default=`default`,e}({}),Gt=function(e){return e.Left=`left`,e.Right=`right`,e}({}),Kt=`relative inline-flex items-center p-xxs border rounded-full cursor-pointer`,qt={active:`toggle-bg-active toggle-border-active`,inactive:`toggle-bg-inactive toggle-border-inactive`,disabledActive:`toggle-bg-disabled-active toggle-border-disabled-active`,disabled:`opacity-40 cursor-not-allowed`},Jt={[G.Small]:`h-5 w-10`,[G.Default]:`h-6 w-12`},Yt=`absolute rounded-full transition-all duration-200 ease-in-out`,Xt={[G.Small]:{unchecked:`left-1`,checked:`left-[34px] -translate-x-full`},[G.Default]:{unchecked:`left-1`,checked:`left-[42px] -translate-x-full`}},Zt={unchecked:`toggle-thumb-color`,checked:`toggle-thumb-color-checked`},Qt={[G.Small]:`h-3 w-3`,[G.Default]:`h-4 w-4`},$t=`inline-flex items-center gap-2`,en=`text-label-lg toggle-label-color`,tn=(0,n.forwardRef)(({label:e,isToggled:r,labelPosition:i=Gt.Right,isDisabled:a=!1,onChange:o,name:s,size:c=G.Default,testId:l,...u},d)=>{let f=(0,n.useRef)(null);function p(e){let t=e.target.checked;o?.(t,e)}function m(e){d&&(typeof d==`function`?d(e):d.current=e),f.current=e}let h=(0,N.default)(Kt,{[qt.active]:r&&!a,[qt.inactive]:!r,[qt.disabledActive]:a&&r,[qt.disabled]:a,[Jt[c]]:!0}),g=(0,N.default)(Yt,{[Xt[c].unchecked]:!r,[Xt[c].checked]:r,[Zt.unchecked]:!r,[Zt.checked]:r,[Qt[c]]:!0}),_=(0,N.default)($t,{"flex-row-reverse":i===Gt.Left,"cursor-not-allowed":a}),v=(0,N.default)(en,{"opacity-40":a&&!r});return(0,t.jsxs)(`div`,{className:_,children:[(0,t.jsx)(`input`,{id:s,name:s,type:`checkbox`,className:`sr-only`,checked:r,ref:m,disabled:a,onChange:p,"data-testid":l}),(0,t.jsx)(`span`,{role:`switch`,"aria-checked":r,onClick:()=>f.current?.click(),className:h,...u,children:(0,t.jsx)(`span`,{className:g})}),e&&(0,t.jsx)(`label`,{htmlFor:s,className:v,children:e})]})});function nn({children:e,hasErrorStyles:n}){return(0,t.jsx)(`p`,{className:(0,N.default)(`secondary-text-color text-label-lg`,{"group-[.errored]:w-full group-[.errored]:secondary-text-error-color group-[.errored]:bg-error-surface group-[.errored]:rounded-xl group-[.errored]:py-1 group-[.errored]:px-2":n}),children:e})}function rn({text:e,isCopyable:n,isExternal:r,externalLink:i,copyText:a=e,onCopySuccess:o,onCopyError:s,onOpen:c}){async function l(e){if(navigator.clipboard){e?.stopPropagation();try{await navigator.clipboard.writeText(a),o?.(e,a)}catch(e){console.error(`Failed to copy:`,e),s?.(e,a)}}}function u(e){if(e?.stopPropagation(),i){let e=window.open(i,`_blank`,`noopener noreferrer`);e&&(e.opener=null)}c?.(e)}return(0,t.jsxs)(`div`,{className:`address-text-color group flex flex-row items-center gap-1`,children:[(0,t.jsx)(`span`,{className:(0,N.default)(`font-inter text-body-sm`),children:e}),n&&(0,t.jsx)(z,{onClick:l,className:`opacity-100`,"aria-label":`Copy to clipboard`,children:(0,t.jsx)(B,{})}),r&&(0,t.jsx)(z,{onClick:u,className:`opacity-100`,"aria-label":`Open in new tab`,children:(0,t.jsx)(Fe,{})})]})}var an=function(e){return e.Image=`image`,e.Video=`video`,e}({});function on({src:e,isAutoPlayEnabled:n,assetType:r,altText:i,showFallback:a,disableControls:o}){return r===an.Video?(0,t.jsx)(Wt,{src:e,isAutoPlayEnabled:n,disableControls:o}):a?(0,t.jsx)(At,{src:e,alt:i}):(0,t.jsx)(jt,{src:e,alt:i})}var K=function(e){return e.Outline=`outline`,e.Elevated=`elevated`,e.Success=`success`,e.Brand=`brand`,e.Error=`error`,e}({}),sn=function(e){return e.Small=`small`,e.Default=`default`,e}({}),cn=`rounded-full`,ln={[K.Outline]:`bg-transparent`,[K.Elevated]:`chip-bg-elevated`,[K.Success]:`bg-success-surface`,[K.Brand]:`chip-bg-brand`,[K.Error]:`bg-error-surface`},un=`outline outline-1 hover:chip-outline-color-hover active:chip-outline-color-active hover:chip-bg-color-hover active:chip-bg-color-active group-focus:chip-bg-color-focus`,dn={[K.Outline]:`chip-bg-selected-outline`},fn=`chip-bg-selected-overlay`,pn={[K.Outline]:`chip-text-secondary`},mn={[K.Outline]:`chip-border-default`,[K.Elevated]:`border-transparent`,[K.Success]:`border-success-surface`,[K.Brand]:`chip-border-color-brand`,[K.Error]:`border-error-surface`},hn={[K.Outline]:`chip-text-default`,[K.Elevated]:`chip-text-secondary`,[K.Success]:`chip-text-secondary`,[K.Brand]:`chip-text-brand`,[K.Error]:`chip-text-secondary`},gn=`focus-visible:shadow-[0_0_0_2px] focus-visible:chip-focus-ring focus-visible:outline-none`;function _n({label:e,type:n=K.Outline,selected:r,showClose:i,onClose:a,onClick:o,avatar:s,leadingElement:c,trailingElement:l,disabled:u,size:d=sn.Default,...f}){let p=n===K.Outline&&r,m=r?n===K.Outline?`outline-transparent names:outline-names-neutral-20`:`chip-outline-color`:`outline-transparent`,h=(0,N.default)(`group-focus:chip-outline-color-active`,n===K.Outline&&`names:group-focus:outline-transparent`),g=r&&!u&&n!==K.Outline?fn:``;return(0,t.jsx)(z,{onClick:o,className:(0,N.default)(`group border disabled:opacity-40`,cn,p?dn[K.Outline]:ln[n],r?`border-transparent`:mn[n]),disabled:u,...f,children:(0,t.jsxs)(`span`,{className:(0,N.default)(`flex h-full w-full flex-row items-center gap-x-2`,s?`py-xxs`:`py-[6px]`,s?`pl-xxs`:c?`pl-xs`:`pl-sm`,i?`pr-xs`:`pr-sm`,cn,p?pn[K.Outline]:hn[n],m,!u&&h,!u&&un,gn,g),children:[s??c,(0,t.jsx)(`span`,{className:(0,N.default)(d===sn.Small?`text-label-md`:`text-body-md`),children:e}),l,i&&(0,t.jsx)(z,{onClick:e=>{e.stopPropagation(),a?.()},disabled:u,"aria-label":`Remove`,children:(0,t.jsx)(ze,{className:(0,N.default)(`h-4 w-4 transition-opacity duration-150`,u?``:r?`opacity-100`:`chip-close-icon-opacity group-hover:opacity-100 group-focus:opacity-100 group-active:opacity-100`)})})]})})}var vn=function(e){return e.Outlined=`outlined`,e.Filled=`filled`,e.Transparent=`transparent`,e}({}),yn={[vn.Outlined]:`bg-transparent`,[vn.Filled]:`segmented-filled-bg-color`,[vn.Transparent]:`bg-transparent`},bn=`border segmented-outlined-border`;function xn({type:e=vn.Filled,children:n,shape:r=lt.Rounded}){let i=yn[e];return(0,t.jsx)(`div`,{className:(0,N.default)(`flex flex-row`,i,e===vn.Outlined?bn:``,r===lt.Rounded?`rounded-full gap-1 p-xxs`:``,r===lt.Rounded?`flex-wrap`:`flex-nowrap overflow-x-auto`),children:n})}var Sn=function(e){return e.Small=`small`,e.Medium=`medium`,e}({}),Cn={[Sn.Small]:`px-md py-sm--rs`,[Sn.Medium]:`px-md--rs py-sm--rs`},wn={[Sn.Small]:`text-title-md`,[Sn.Medium]:`text-title-lg`};function Tn({title:e,subtitle:n,trailingElement:r,tooltipText:i,supportingElement:a,tooltipPosition:o,size:s=Sn.Medium,testId:c}){return(0,t.jsxs)(`div`,{className:(0,N.default)(`flex flex-row items-center justify-between`,Cn[s]),"data-testid":c,children:[(0,t.jsxs)(`div`,{className:`flex flex-row items-center gap-x-xxxs`,children:[(0,t.jsxs)(`div`,{className:`flex flex-col justify-start`,children:[(0,t.jsxs)(`div`,{className:`title-main-color flex flex-row items-center gap-x-0.5`,children:[(0,t.jsx)(`h4`,{className:(0,N.default)(wn[s]),children:e}),i&&(0,t.jsx)(bt,{text:i,position:o,children:(0,t.jsx)(Ue,{className:`title-icon-color`})})]}),(0,t.jsx)(`p`,{className:`title-subtitle-color text-label-md`,children:n})]}),a]}),r]})}var En=`w-full input-caret-color bg-transparent text-body-lg caret-input-caret-color focus:outline-none focus-visible:outline-none disabled:cursor-not-allowed`,Dn=`input-text-color`,On=`input-placeholder-color`,kn=`[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none disabled:cursor-not-allowed`,An=`px-md py-sm rounded-lg border input-border-color input-border-color-disabled group-[.enabled]:cursor-text input-border-error-color hover:group-[.enabled]:input-border-color-hover input-border-color-focus`,jn=`flex flex-col gap-y-2 text-label-lg input-label-color`,Mn=function(e){return e.Label=`label`,e.Div=`div`,e}({});function Nn({label:e,caption:n,disabled:r,errorMessage:i,amountCounter:a,required:o,labelHtmlTag:s=Mn.Label,children:c}){return(0,t.jsxs)(`div`,{className:(0,N.default)(`group flex w-full flex-col gap-y-2`,{"cursor-not-allowed opacity-40":r,errored:i,enabled:!r,required:o}),children:[e?(0,t.jsxs)(Pn,{labelHtmlTag:s,children:[e,c]}):c,(i||n||a)&&(0,t.jsxs)(`div`,{className:(0,N.default)(`flex flex-row items-center`,n||i?`justify-between gap-md`:`justify-end`),children:[(i||n)&&(0,t.jsx)(nn,{hasErrorStyles:!0,children:i||n}),a&&(0,t.jsx)(nn,{children:a})]})]})}function Pn({labelHtmlTag:e,children:t}){return(0,n.createElement)(e,{className:jn},t)}var q=function(e){return e.Text=`text`,e.Password=`password`,e.Number=`number`,e.NumericFormat=`numericFormat`,e}({}),Fn=function(e){return e.None=`none`,e.Vertical=`vertical`,e}({});function In(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var Ln;(function(e){e.event=`event`,e.props=`prop`})(Ln||={});function Rn(){}function zn(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(e,n){return e===t[n]})?n:(t=r,n=e.apply(void 0,r),n)}}function Bn(e){return!!(e||``).match(/\d/)}function Vn(e){return e==null}function Hn(e){return typeof e==`number`&&isNaN(e)}function Un(e){return Vn(e)||Hn(e)||typeof e==`number`&&!isFinite(e)}function Wn(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,`\\$&`)}function Gn(e){switch(e){case`lakh`:return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case`wan`:return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Kn(e,t,n){var r=Gn(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,`$1`+t)}function qn(e){var t=(0,n.useRef)(e);return t.current=e,(0,n.useRef)(function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return t.current.apply(t,e)}).current}function Jn(e,t){t===void 0&&(t=!0);var n=e[0]===`-`,r=n&&t;e=e.replace(`-`,``);var i=e.split(`.`);return{beforeDecimal:i[0],afterDecimal:i[1]||``,hasNegation:n,addNegation:r}}function Yn(e){if(!e)return e;var t=e[0]===`-`;t&&(e=e.substring(1,e.length));var n=e.split(`.`),r=n[0].replace(/^0+/,``)||`0`,i=n[1]||``;return(t?`-`:``)+r+(i?`.`+i:``)}function Xn(e,t,n){for(var r=``,i=n?`0`:``,a=0;a<=t-1;a++)r+=e[a]||i;return r}function Zn(e,t){return Array(t+1).join(e)}function Qn(e){var t=e+``,n=t[0]===`-`?`-`:``;n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],a=r[1];if(a=Number(a),!a)return n+i;i=i.replace(`.`,``);var o=1+a,s=i.length;return o<0?i=`0.`+Zn(`0`,Math.abs(o))+i:o>=s?i+=Zn(`0`,o-s):i=(i.substring(0,o)||`0`)+`.`+i.substring(o),n+i}function $n(e,t,n){if([``,`-`].indexOf(e)!==-1)return e;var r=(e.indexOf(`.`)!==-1||n)&&t,i=Jn(e),a=i.beforeDecimal,o=i.afterDecimal,s=i.hasNegation,c=parseFloat(`0.`+(o||`0`)),l=(o.length<=t?`0.`+o:c.toFixed(t)).split(`.`),u=a;a&&Number(l[0])&&(u=a.split(``).reverse().reduce(function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e},l[0]));var d=Xn(l[1]||``,t,n),f=s?`-`:``,p=r?`.`:``;return``+f+u+p+d}function er(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move(`character`,t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var tr=zn(function(e,t){for(var n=0,r=0,i=e.length,a=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[a-1-r]&&a-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:a-r}}}),nr=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function rr(e,t,n){return Math.min(Math.max(e,t),n)}function ir(e){return Math.max(e.selectionStart,e.selectionEnd)}function ar(){return typeof navigator<`u`&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function or(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:``}}function sr(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function cr(e,t,n,r,i,a,o){o===void 0&&(o=sr);var s=i.findIndex(function(e){return e}),c=e.slice(0,s);!t&&!n.startsWith(c)&&(t=c,n=c+n,r+=c.length);for(var l=n.length,u=e.length,d={},f=Array(l),p=0;p<l;p++){f[p]=-1;for(var m=0,h=u;m<h;m++)if(o({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:m})&&d[m]!==!0){f[p]=m,d[m]=!0;break}}for(var g=r;g<l&&(f[g]===-1||!a(n[g]));)g++;var _=g===l||f[g]===-1?u:f[g];for(g=r-1;g>0&&f[g]===-1;)g--;var v=g===-1||f[g]===-1?0:f[g]+1;return v>_?_:r-v<_-r?v:_}function lr(e,t,n,r){var i=e.length;if(t=rr(t,0,i),r===`left`){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function ur(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(Bn(e[n])||Bn(e[n-1]));return t}function dr(e,t,r,i,a,o){o===void 0&&(o=Rn);var s=qn(function(e,t){var n,r;return Un(e)?(r=``,n=``):typeof e==`number`||t?(r=typeof e==`number`?Qn(e):e,n=i(r)):(r=a(e,void 0),n=i(r)),{formattedValue:n,numAsString:r}}),c=(0,n.useState)(function(){return s(Vn(e)?t:e,r)}),l=c[0],u=c[1],d=function(e,t){e.formattedValue!==l.formattedValue&&u({formattedValue:e.formattedValue,numAsString:e.value}),o(e,t)},f=e,p=r;Vn(e)&&(f=l.numAsString,p=!0);var m=s(f,p);return(0,n.useMemo)(function(){u(m)},[m.formattedValue]),[l,d]}function fr(e){return e.replace(/[^0-9]/g,``)}function pr(e){return e}function mr(e){var t=e.type;t===void 0&&(t=`text`);var r=e.displayType;r===void 0&&(r=`input`);var i=e.customInput,a=e.renderText,o=e.getInputRef,s=e.format;s===void 0&&(s=pr);var c=e.removeFormatting;c===void 0&&(c=fr);var l=e.defaultValue,u=e.valueIsNumericString,d=e.onValueChange,f=e.isAllowed,p=e.onChange;p===void 0&&(p=Rn);var m=e.onKeyDown;m===void 0&&(m=Rn);var h=e.onMouseUp;h===void 0&&(h=Rn);var g=e.onFocus;g===void 0&&(g=Rn);var _=e.onBlur;_===void 0&&(_=Rn);var v=e.value,y=e.getCaretBoundary;y===void 0&&(y=ur);var b=e.isValidInputCharacter;b===void 0&&(b=Bn);var x=e.isCharacterSame,S=In(e,[`type`,`displayType`,`customInput`,`renderText`,`getInputRef`,`format`,`removeFormatting`,`defaultValue`,`valueIsNumericString`,`onValueChange`,`isAllowed`,`onChange`,`onKeyDown`,`onMouseUp`,`onFocus`,`onBlur`,`value`,`getCaretBoundary`,`isValidInputCharacter`,`isCharacterSame`]),C=dr(v,l,!!u,s,c,d),w=C[0],T=w.formattedValue,E=w.numAsString,D=C[1],ee=(0,n.useRef)(),O=(0,n.useRef)({formattedValue:T,numAsString:E}),te=function(e,t){O.current={formattedValue:e.formattedValue,numAsString:e.value},D(e,t)},ne=(0,n.useState)(!1),k=ne[0],re=ne[1],ie=(0,n.useRef)(null),ae=(0,n.useRef)({setCaretTimeout:null,focusTimeout:null});(0,n.useEffect)(function(){return re(!0),function(){clearTimeout(ae.current.setCaretTimeout),clearTimeout(ae.current.focusTimeout)}},[]);var oe=s,se=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},ce=function(e,t,n){e.selectionStart===0&&e.selectionEnd===e.value.length||(er(e,t),ae.current.setCaretTimeout=setTimeout(function(){e.value===n&&e.selectionStart!==t&&er(e,t)},0))},A=function(e,t,n){return lr(e,t,y(e),n)},le=function(e,t,n){var r=y(t),i=cr(t,T,e,n,r,b,x);return i=lr(t,i,r),i},ue=function(e){var t=e.formattedValue;t===void 0&&(t=``);var n=e.input,r=e.source,i=e.event,a=e.numAsString,o;if(n){var s=e.inputValue||n.value,c=ir(n);n.value=t,o=le(s,t,c),o!==void 0&&ce(n,o,t)}t!==T&&te(se(t,a),{event:i,source:r})};(0,n.useEffect)(function(){var e=O.current,t=e.formattedValue,n=e.numAsString;(T!==t||E!==n)&&te(se(T,E),{event:void 0,source:Ln.props})},[T,E]);var de=ie.current?ir(ie.current):void 0;(typeof window<`u`?n.useLayoutEffect:n.useEffect)(function(){var e=ie.current;if(T!==O.current.formattedValue&&e){var t=le(O.current.formattedValue,T,de);e.value=T,ce(e,t,T)}},[T]);var fe=function(e,t,n){var r=t.target,i=ee.current?nr(ee.current,r.selectionEnd):tr(T,e),a=Object.assign(Object.assign({},i),{lastValue:T}),o=c(e,a),s=oe(o);if(o=c(s,void 0),f&&!f(se(s,o))){var l=t.target,u=le(e,T,ir(l));return l.value=T,ce(l,u,T),!1}return ue({formattedValue:s,numAsString:o,inputValue:e,event:t,source:n,input:t.target}),!0},j=function(e,t){t===void 0&&(t=0),ee.current={selectionStart:e.selectionStart,selectionEnd:e.selectionEnd+t}},pe=function(e){var t=e.target.value;fe(t,e,Ln.event)&&p(e),ee.current=void 0},me=function(e){var t=e.target,n=e.key,r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o;n===`ArrowLeft`||n===`Backspace`?o=Math.max(r-1,0):n===`ArrowRight`?o=Math.min(r+1,a.length):n===`Delete`&&(o=r);var s=0;n===`Delete`&&r===i&&(s=1);var c=n===`ArrowLeft`||n===`ArrowRight`;if(o===void 0||r!==i&&!c){m(e),j(t,s);return}var l=o;c?(l=A(a,o,n===`ArrowLeft`?`left`:`right`),l!==o&&e.preventDefault()):n===`Delete`&&!b(a[o])?l=A(a,o,`right`):n===`Backspace`&&!b(a[o])&&(l=A(a,o,`left`)),l!==o&&ce(t,l,a),m(e),j(t,s)},he=function(e){var t=e.target,n=function(){var e=t.selectionStart,n=t.selectionEnd,r=t.value;if(r===void 0&&(r=``),e===n){var i=A(r,e);i!==e&&ce(t,i,r)}};n(),requestAnimationFrame(function(){n()}),h(e),j(t)},ge=function(e){e.persist&&e.persist();var t=e.target,n=e.currentTarget;ie.current=t,ae.current.focusTimeout=setTimeout(function(){var r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o=A(a,r);o!==r&&!(r===0&&i===a.length)&&ce(t,o,a),g(Object.assign(Object.assign({},e),{currentTarget:n}))},0)},_e=function(e){ie.current=null,clearTimeout(ae.current.focusTimeout),clearTimeout(ae.current.setCaretTimeout),_(e)},M=k&&ar()?`numeric`:void 0,ve=Object.assign({inputMode:M},S,{type:t,value:T,onChange:pe,onKeyDown:me,onMouseUp:he,onFocus:ge,onBlur:_e});if(r===`text`)return a?n.default.createElement(n.default.Fragment,null,a(T,S)||null):n.default.createElement(`span`,Object.assign({},S,{ref:o}),T);if(i){var ye=i;return n.default.createElement(ye,Object.assign({},ve,{ref:o}))}return n.default.createElement(`input`,Object.assign({},ve,{ref:o}))}function hr(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i=``);var a=t.suffix;a===void 0&&(a=``);var o=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s=`thousand`),e===``||e===`-`)return e;var c=gr(t),l=c.thousandSeparator,u=c.decimalSeparator,d=n!==0&&e.indexOf(`.`)!==-1||n&&r,f=Jn(e,o),p=f.beforeDecimal,m=f.afterDecimal,h=f.addNegation;return n!==void 0&&(m=Xn(m,n,!!r)),l&&(p=Kn(p,l,s)),i&&(p=i+p),a&&(m+=a),h&&(p=`-`+p),e=p+(d&&u||``)+m,e}function gr(e){var t=e.decimalSeparator;t===void 0&&(t=`.`);var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=`,`),r||=[t,`.`],{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function _r(e,t){e===void 0&&(e=``);var n=RegExp(`(-)`),r=RegExp(`(-)(.)*(-)`),i=n.test(e),a=r.test(e);return e=e.replace(/-/g,``),i&&!a&&t&&(e=`-`+e),e}function vr(e,t){return RegExp(`(^-)|[0-9]|`+Wn(e),t?`g`:void 0)}function yr(e,t,n){return e===``?!0:!t?.match(/\d/)&&!n?.match(/\d/)&&typeof e==`string`&&!isNaN(Number(e))}function br(e,t,n){var r;t===void 0&&(t=or(e));var i=n.allowNegative,a=n.prefix;a===void 0&&(a=``);var o=n.suffix;o===void 0&&(o=``);var s=n.decimalScale,c=t.from,l=t.to,u=l.start,d=l.end,f=gr(n),p=f.allowedDecimalSeparators,m=f.decimalSeparator,h=e[d]===m;if(Bn(e)&&(e===a||e===o)&&t.lastValue===``)return e;if(d-u===1&&p.indexOf(e[u])!==-1){var g=s===0?``:m;e=e.substring(0,u)+g+e.substring(u+1,e.length)}var _=function(e,t,n){var r=!1,i=!1;a.startsWith(`-`)?r=!1:e.startsWith(`--`)?(r=!1,i=!0):o.startsWith(`-`)&&e.length===o.length?r=!1:e[0]===`-`&&(r=!0);var s=+!!r;return i&&(s=2),s&&(e=e.substring(s),t-=s,n-=s),{value:e,start:t,end:n,hasNegation:r}},v=_(e,u,d),y=v.hasNegation;r=v,e=r.value,u=r.start,d=r.end;var b=_(t.lastValue,c.start,c.end),x=b.start,S=b.end,C=b.value,w=e.substring(u,d);e.length&&C.length&&(x>C.length-o.length||S<a.length)&&!(w&&o.startsWith(w))&&(e=C);var T=0;e.startsWith(a)?T+=a.length:u<a.length&&(T=u),e=e.substring(T),d-=T;var E=e.length,D=e.length-o.length;e.endsWith(o)?E=D:(d>D||d>e.length-o.length)&&(E=d),e=e.substring(0,E),e=_r(y?`-`+e:e,i),e=(e.match(vr(m,!0))||[]).join(``);var ee=e.indexOf(m);e=e.replace(new RegExp(Wn(m),`g`),function(e,t){return t===ee?`.`:``});var O=Jn(e,i),te=O.beforeDecimal,ne=O.afterDecimal,k=O.addNegation;return l.end-l.start<c.end-c.start&&te===``&&h&&!parseFloat(ne)&&(e=k?`-`:``),e}function xr(e,t){var n=t.prefix;n===void 0&&(n=``);var r=t.suffix;r===void 0&&(r=``);var i=Array.from({length:e.length+1}).map(function(){return!0}),a=e[0]===`-`;i.fill(!1,0,n.length+ +!!a);var o=e.length;return i.fill(!1,o-r.length+1,o+1),i}function Sr(e){var t=gr(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i=``);var a=e.allowNegative;if(a===void 0&&(a=!0),n===r)throw Error(`
|
|
10
10
|
Decimal separator can't be same as thousand separator.
|
|
11
11
|
thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
12
12
|
decimalSeparator: `+r+` (default value for decimalSeparator is .)
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
Prefix can't start with '-' when allowNegative is true.
|
|
15
15
|
prefix: `+i+`
|
|
16
16
|
allowNegative: `+a+`
|
|
17
|
-
`),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function Cr(e){e=Sr(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=Rn);var a=e.onBlur;a===void 0&&(a=Rn);var o=e.thousandSeparator,s=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l=``);var u=e.defaultValue,d=e.value,f=e.valueIsNumericString,p=e.onValueChange,m=In(e,[`decimalSeparator`,`allowedDecimalSeparators`,`thousandsGroupStyle`,`suffix`,`allowNegative`,`allowLeadingZeros`,`onKeyDown`,`onBlur`,`thousandSeparator`,`decimalScale`,`fixedDecimalScale`,`prefix`,`defaultValue`,`value`,`valueIsNumericString`,`onValueChange`]),h=gr(e),g=h.decimalSeparator,_=h.allowedDecimalSeparators,v=function(t){return hr(t,e)},y=function(t,n){return br(t,n,e)},b=Vn(d)?u:d,x=f??yr(b,l,t);Vn(d)?Vn(u)||(x||=typeof u==`number`):x||=typeof d==`number`;var S=function(e){return Un(e)?e:(typeof e==`number`&&(e=Qn(e)),x&&typeof s==`number`?$n(e,s,!!c):e)},C=dr(S(d),S(u),!!x,v,y,p),w=C[0],T=w.numAsString,E=w.formattedValue,D=C[1];return Object.assign(Object.assign({},m),{value:E,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===g?!0:Bn(e)},isCharacterSame:function(e){var t=e.currentValue,n=e.lastValue,r=e.formattedValue,i=e.currentValueIndex,a=e.formattedValueIndex,o=t[i],u=r[a],f=tr(n,t).to,p=function(e){return y(e).indexOf(`.`)+l.length};return d===0&&c&&s&&t[f.start]===g&&p(t)<i&&p(r)>a?!1:i>=f.start&&i<f.end&&_&&_.includes(o)&&u===g?!0:o===u},onValueChange:D,format:v,removeFormatting:y,getCaretBoundary:function(t){return xr(t,e)},onKeyDown:function(e){var t=e.target,r=e.key,a=t.selectionStart,u=t.selectionEnd,d=t.value;if(d===void 0&&(d=``),(r===`Backspace`||r===`Delete`)&&u<l.length){e.preventDefault();return}if(a!==u){i(e);return}r===`Backspace`&&d[0]===`-`&&a===l.length+1&&n&&er(t,1),s&&c&&(r===`Backspace`&&d[a-1]===g?(er(t,a-1),e.preventDefault()):r===`Delete`&&d[a]===g&&e.preventDefault()),_?.includes(r)&&d[a]===g&&er(t,a+1);var f=o===!0?`,`:o;r===`Backspace`&&d[a-1]===f&&er(t,a-1),r===`Delete`&&d[a]===f&&er(t,a+1),i(e)},onBlur:function(t){var n=T;n.match(/\d/g)||(n=``),r||(n=Yn(n)),c&&s&&(n=$n(n,s,c)),n!==T&&D({formattedValue:hr(n,e),value:n,floatValue:parseFloat(n)},{event:t,source:Ln.event}),a(t)}})}function wr(e){var t=Cr(e);return n.default.createElement(mr,Object.assign({},t))}var Tr=(0,n.forwardRef)(function({label:e,caption:r,disabled:i,errorMessage:a,leadingIcon:o,supportingText:s,amountCounter:c,trailingElement:l,isContentVisible:u,value:d,supportingValue:f,defaultValue:p,onClearInput:m,isVisibilityToggleEnabled:h,type:g,..._},v){h??=g===q.Password;let y=(0,n.useRef)(null),[b,x]=(0,n.useState)(u??g!==q.Password);(0,n.useEffect)(()=>{x(u??g!==q.Password)},[g,u]);function S(){x(e=>!e)}function C(){y.current&&y.current.querySelector(`input`)?.focus()}return(0,t.jsx)(Nn,{label:e,caption:r,disabled:i,errorMessage:a,amountCounter:c,required:_.required,children:(0,t.jsxs)(`div`,{className:(0,N.default)(`input-container relative flex flex-row items-center gap-x-3`,An),onClick:C,ref:y,children:[o&&(0,t.jsx)(`span`,{className:`input-icon-color`,children:o}),(0,t.jsxs)(`div`,{className:`flex flex-1 flex-col items-start`,children:[(0,t.jsx)(Er,{..._,inputRef:v,value:d,type:g===q.Password&&b?q.Text:g,disabled:i,className:(0,N.default)(En,Dn,On,kn)}),f&&(0,t.jsx)(`span`,{className:`text-label-md text-iota-neutral-60 names:text-iota-neutral-60 dark:text-iota-neutral-40`,children:f})]}),s&&(0,t.jsx)(nn,{children:s}),(0,t.jsx)(Or,{value:d,type:g,onClearInput:m,isContentVisible:b,trailingElement:l,isVisibilityToggleEnabled:h,onToggleButtonClick:S})]})})});function Er({type:e,inputRef:n,...r}){function i(t){if(e===q.Number){let e=t.currentTarget;e.blur(),t.stopPropagation(),setTimeout(()=>{e.focus({preventScroll:!0})},0)}}return e===q.NumericFormat?(0,t.jsx)(Dr,{inputRef:n,...r,type:e}):(0,t.jsx)(`input`,{ref:n,...r,type:e,onWheel:e=>{i(e),r.onWheel?.(e)}})}function Dr({inputRef:e,className:n,type:r,...i}){return(0,t.jsx)(wr,{className:n,valueIsNumericString:!0,getInputRef:e,...i})}function Or({value:e,type:r,onClearInput:i,isContentVisible:a,trailingElement:o,onToggleButtonClick:s,isVisibilityToggleEnabled:c}){let l=!!(r===q.Text&&e&&i),u=!!(r===q.Password&&c),d=!!(o&&!l&&!u);if(l)return(0,t.jsx)(z,{className:`input-icon-color [&_svg]:h-5 [&_svg]:w-5`,onClick:i,tabIndex:-1,"aria-label":`Clear input`,children:(0,t.jsx)(ze,{})});if(u)return(0,t.jsx)(z,{onClick:s,className:`input-icon-color [&_svg]:h-5 [&_svg]:w-5`,tabIndex:-1,"aria-label":`Toggle visibility`,children:a?(0,t.jsx)(tt,{}):(0,t.jsx)(et,{})});if(d)return(0,t.jsx)(n.Fragment,{children:o})}var kr=(0,n.forwardRef)(function({label:e,caption:r,disabled:i,errorMessage:a,value:o,amountCounter:s,isVisibilityToggleEnabled:c,isResizeEnabled:l,required:u,isContentVisible:d,defaultValue:f,...p},m){let[h,g]=(0,n.useState)(d??!0);(0,n.useEffect)(()=>{g(d??!0)},[d]);function _(){g(e=>!e)}return(0,t.jsx)(Nn,{label:e,caption:r,disabled:i||!h,errorMessage:a,amountCounter:s,required:u,children:(0,t.jsxs)(`div`,{className:`relative`,children:[(0,t.jsx)(`textarea`,{disabled:i||!h,required:u,ref:m,className:(0,N.default)(`text-area-container peer block min-h-[50px]`,An,En,Dn,On,h&&l?`resize-y`:`resize-none`,!h&&`not-visible select-none text-transparent`),defaultValue:h&&f?f:void 0,value:h&&o?o:void 0,...p}),!h&&(0,t.jsx)(`div`,{className:`absolute left-0 top-0 flex h-full w-full flex-col items-stretch gap-y-2 px-md py-sm peer-[.not-visible]:select-none`,children:(0,t.jsx)(Ar,{rows:3,halfWidthRow:3})}),c&&(0,t.jsx)(`span`,{className:`absolute bottom-4 right-4 flex`,children:(0,t.jsx)(z,{onClick:_,className:`input-icon-color [&_svg]:h-5 [&_svg]:w-5`,tabIndex:-1,children:h?(0,t.jsx)(tt,{}):(0,t.jsx)(et,{})})})]})})});function Ar({rows:e,halfWidthRow:n}){return(0,t.jsx)(t.Fragment,{children:Array.from({length:e}).map((e,r)=>(0,t.jsx)(`div`,{className:`input-visibility-bar h-2.5 rounded ${n===r+1?`w-1/2`:`w-full`}`},r))})}var jr=function(e){return e.Horizontal=`horizontal`,e.Vertical=`vertical`,e}({}),Mr=`navbar-item-icon-selected-color`,Nr=`navbar-item-icon-color`,Pr=`py-xxs px-sm`,Fr=`p-sm`,Ir=`-top-3 right-3`,Lr=`-top-1 right-3`,Rr=`navbar-item-label-selected-color`,zr=`navbar-item-label-color`;function Br({icon:e,text:n,isSelected:r,hasBadge:i,onClick:a,isDisabled:o=!1,...s}){let c=r?Mr:Nr,l=n?Pr:Fr,u=r&&`bg-shader-primary-light-12 dark:bg-shader-primary-dark-12`,d=n?Ir:Lr,f=r?Rr:zr,p=o?`cursor-not-allowed opacity-60`:`state-layer-secondary`;return(0,t.jsxs)(`div`,{onClick:e=>{if(o){e.preventDefault();return}a?.(e)},role:`button`,className:(0,N.default)(`inline-flex cursor-pointer flex-col items-center justify-center space-y-1`),...s,children:[(0,t.jsxs)(`div`,{className:(0,N.default)(`relative inline-flex rounded-full`,l,u,p),children:[(0,t.jsx)(`div`,{className:(0,N.default)(`inline-flex [&_svg]:h-6 [&_svg]:w-6`,c),children:e}),i&&(0,t.jsx)(`div`,{className:(0,N.default)(`absolute`,d),children:(0,t.jsx)(Se,{type:M.PrimarySolid})})]}),n&&(0,t.jsx)(`span`,{className:(0,N.default)(`text-center text-label-md`,f),children:n})]})}function Vr({icon:e,text:n,isSelected:r,hasBadge:i,onClick:a,isDisabled:o=!1,...s}){let c=r?Mr:Nr,l=r&&`bg-shader-primary-light-12 dark:bg-shader-primary-dark-12`,u=r?Rr:zr,d=o?`cursor-not-allowed opacity-60`:`state-layer-secondary cursor-pointer `;return(0,t.jsxs)(`div`,{onClick:e=>{if(o){e.preventDefault();return}a?.(e)},role:`button`,className:(0,N.default)(`relative inline-flex w-full flex-row items-center justify-between rounded-full p-sm`,l,d),...s,children:[(0,t.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,t.jsx)(`div`,{className:(0,N.default)(`inline-flex [&_svg]:h-6 [&_svg]:w-6`,c),children:e}),n&&(0,t.jsx)(`span`,{className:(0,N.default)(`text-center text-label-lg`,u),children:n})]}),i&&(0,t.jsx)(Se,{type:M.PrimarySolid})]})}function Hr(e){let{type:n,text:r}=e;return n===jr.Vertical&&r?(0,t.jsx)(Vr,{...e}):(0,t.jsx)(Br,{...e})}function Ur({title:e,subtitle:n,badgeType:r,badgeText:i,avatarContent:a,onOptionsClick:o,onCopy:s,copyText:c,onOpen:l,isCopyable:u,isExternal:d,isSelected:f,isActive:p,showSelected:m,badgeTooltipText:h,badgeTooltipPosition:g=yt.Bottom}){let _=a;return(0,t.jsx)(`div`,{"data-testid":`account-tile`,className:(0,N.default)(`state-layer group relative flex w-full items-center justify-between space-x-3 rounded-xl px-sm py-xs hover:cursor-pointer`,p&&`state-active`),children:(0,t.jsxs)(`div`,{className:`flex w-full items-center gap-x-3`,children:[(0,t.jsx)(`div`,{children:(0,t.jsx)(_,{})}),(0,t.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col items-start py-xs`,children:[(0,t.jsxs)(`div`,{className:`flex w-full min-w-0 items-center space-x-2`,children:[(0,t.jsx)(`p`,{className:`account-title-color min-w-0 max-w-full truncate font-inter text-title-md`,children:e}),i&&r?h?(0,t.jsx)(bt,{text:h,position:g,children:(0,t.jsx)(Se,{type:r,label:i})}):(0,t.jsx)(Se,{type:r,label:i}):null]}),(0,t.jsx)(rn,{text:n,onCopySuccess:s,copyText:c,onOpen:l,isCopyable:u,isExternal:d})]}),(0,t.jsxs)(`div`,{className:`ml-auto flex items-center space-x-2 [&_button]:h-5 [&_button]:w-5 [&_svg]:h-5 [&_svg]:w-5`,children:[(0,t.jsx)(`div`,{className:`account-icon-color flex items-center space-x-2 [&_button:not(.locked)]:invisible group-hover:[&_button:not(.locked)]:visible`,children:o&&(0,t.jsx)(z,{onClick:o,"aria-label":`More options`,children:(0,t.jsx)(Ke,{})})}),m&&(0,t.jsx)(z,{"aria-label":`Checkmark`,children:f?(0,t.jsx)(Re,{className:`account-check-active-color h-5 w-5`}):(0,t.jsx)(Je,{className:`account-check-inactive-color h-5 w-5`})})]})]})})}function Wr({children:e}){return(0,t.jsx)(`ul`,{className:`dropdown-bg dropdown-border-color list-none rounded-lg border py-xs`,children:e})}var Gr=function(e){return e.Top=`top`,e.Bottom=`bottom`,e}({});function Kr({children:e,hasLastBorderNoneClass:n,isContentCentered:r}){return(0,t.jsx)(`td`,{className:(0,N.default)(`table-cell-border-color h-14 border-b px-md`,{"last:border-none":n},{"flex items-center justify-center":r}),children:e})}function qr({children:e,supportingLabel:n}){return(0,t.jsxs)(`div`,{className:`flex flex-row items-baseline gap-1`,children:[(0,t.jsx)(`span`,{children:e}),n&&(0,t.jsx)(`span`,{className:`table-cell-supporting-label-color text-body-sm`,children:n})]})}function Jr(){return(0,t.jsx)(Bt,{})}var Yr=function(e){return e.Small=`small`,e.Default=`default`,e}({}),Xr=(0,n.forwardRef)(({disabled:e,label:r,leadingIcon:i,supportingText:a,errorMessage:o,caption:s,options:c,placeholder:l,onValueChange:u,onOptionClick:d,value:f,dropdownPosition:p=Gr.Bottom,size:m=Yr.Default,...h},g)=>{let[_,v]=(0,n.useState)(!1),y=w(f,c),b=(0,n.useRef)(null),x=y||l,S=m===Yr.Small?`px-sm`:`px-md`,C=m===Yr.Small?`text-body-md`:`text-body-lg`;(0,n.useEffect)(()=>{e&&_&&D()},[e,_]),(0,n.useEffect)(()=>{if(!_)return;let e=e=>{let t=e.target;b.current&&!b.current.contains(t)&&D()};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[_]);function w(e,t=[]){return t.find(t=>typeof t==`string`?t===e:t.id===e)??t[0]}function T(){v(e=>!e)}function E(e){D();let t=typeof e==`string`?e:e.id;d?.(t),e!==y&&u?.(t)}function D(){v(!1)}return(0,t.jsx)(Nn,{label:r,caption:s,disabled:e,errorMessage:o,labelHtmlTag:Mn.Div,children:(0,t.jsxs)(`div`,{className:`relative flex w-full flex-col`,ref:b,children:[(0,t.jsxs)(z,{ref:g,onClick:T,disabled:e,"aria-expanded":_,"aria-haspopup":`listbox`,className:(0,N.default)(`select-container select-border-color focus-visible:enabled:select-border-focus-color active:enabled:select-border-focus-color group-[.errored]:select-border-error-color group-[.opened]:select-border-focus-color [&:is(:focus,_:focus-visible,_:active)]:enabled:select-border-focus-color hover:enabled:select-border-hover-color flex flex-row items-center gap-x-3 rounded-lg border py-sm disabled:cursor-not-allowed [&_svg]:h-5 [&_svg]:w-5`,S),...h,children:[i&&(0,t.jsx)(`span`,{className:`select-icon-color`,children:i}),(0,t.jsxs)(`div`,{className:`flex w-full flex-row items-baseline gap-x-3`,children:[x&&(0,t.jsx)(`div`,{className:(0,N.default)(`select-label-color block w-full text-start`,C),children:(0,t.jsx)(Zr,{option:x})}),a&&(0,t.jsx)(`div`,{className:`ml-auto`,children:(0,t.jsx)(nn,{children:a})})]}),(0,t.jsx)($e,{className:(0,N.default)(`select-icon-color transition-transform`,{" rotate-180":_})})]}),_&&(0,t.jsx)(`div`,{className:`fixed left-0 top-0 z-[49] bg-transparent`,onClick:D}),_&&(0,t.jsx)(`div`,{className:(0,N.default)(`absolute z-50 min-w-full animate-dropdown-show`,p===Gr.Top?`bottom-full origin-bottom`:`top-full origin-top`),children:(0,t.jsx)(Wr,{children:c.map(e=>(0,t.jsx)(Et,{onClick:()=>E(e),hideBottomBorder:!0,children:(0,t.jsx)(Zr,{option:e})},typeof e==`string`?e:e.id))})})]})})});function Zr({option:e}){return typeof e==`string`?e:`renderLabel`in e?e.renderLabel():e.label}var Qr=function(e){return e.Asc=`asc`,e.Desc=`desc`,e}({});function $r({label:e,columnKey:n,hasSort:r,hasCheckbox:i,isChecked:a,isIndeterminate:o,isContentCentered:s,onSortClick:c,onCheckboxChange:l,sortOrder:u,...d}){let f=()=>{let e=u===Qr.Asc?Qr.Desc:Qr.Asc;c&&c(n,e)},p=r?u===Qr.Asc?(0,t.jsx)(Qe,{className:`shrink-0`}):u===Qr.Desc?(0,t.jsx)(Ze,{className:`shrink-0`}):(0,t.jsx)(Qe,{className:`invisible shrink-0 group-hover:visible`}):null;return(0,t.jsx)(`th`,{onClick:r?f:void 0,className:(0,N.default)(`state-layer table-cell-border-color group relative h-14 border-b px-md after:pointer-events-none`,{"cursor-pointer":r}),"aria-sort":r?u===Qr.Asc?`ascending`:u===Qr.Desc?`descending`:`none`:void 0,...d,children:(0,t.jsxs)(`div`,{className:(0,N.default)(`flex flex-row items-center gap-1 [&_svg]:h-4 [&_svg]:w-4`,`table-header-text-color`,`text-label-lg`,{"justify-center":s}),children:[i?(0,t.jsx)(dt,{isChecked:a,isIndeterminate:o,onCheckedChange:l}):(0,t.jsx)(`span`,{className:(0,N.default)({"text-left":!s}),children:e}),p]})})}var J=function(e){return e.Outlined=`outlined`,e.Filled=`filled`,e}({}),ei={[J.Outlined]:`bg-transparent`,[J.Filled]:`search-bg-color-filled`},ti={[J.Outlined]:`border-l border-r border-t search-border-color`,[J.Filled]:`search-bg-color-filled`},ni={[J.Outlined]:`rounded-b-3xl border-b border-l border-r search-border-color search-suggestion-bg-color`,[J.Filled]:`rounded-b-3xl search-bg-color-filled`};function ri({searchValue:e,suggestions:r,onSearchValueChange:i,onSuggestionClick:a,placeholder:o,isLoading:s=!1,type:c=J.Outlined,renderSuggestion:l,...u}){let d=(0,n.useRef)(null),f=(0,n.useRef)(null),[p,m]=(0,n.useState)(!0),[h,g]=(0,n.useState)(null);function _(e){let t=e.target.value;i(t)}(0,n.useEffect)(()=>{let e=e=>{e.key===`Escape`&&(m(!1),d.current?.blur())};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[]),(0,n.useEffect)(()=>{let e=e=>{let t=d?.current;!t||t.contains(e?.target)||f.current?.contains(e.target)||m(!1)};return document.addEventListener(`click`,e,!0),document.addEventListener(`touchstart`,e,!0),()=>{document.removeEventListener(`click`,e,!0),document.removeEventListener(`touchstart`,e,!0)}},[d]);let v=p&&r&&r.length>0,y=v?(0,N.default)(`rounded-t-3xl border-b`,c===J.Outlined?`[&:not(.dark_*,.names_*)]:border-b-transparent`:`border-b-transparent`):c===J.Outlined?`rounded-3xl border-b`:`rounded-full`,b=ti[c],x=ei[c],S=ni[c],C=e=>{a?.(e),i(``),m(!1),g(null),d.current?.blur()};return(0,t.jsxs)(`div`,{className:`relative w-full`,children:[(0,t.jsxs)(`div`,{className:(0,N.default)(`search-text-color flex items-center overflow-hidden px-md py-sm [&_svg]:h-6 [&_svg]:w-6`,y,b),children:[(0,t.jsx)(`input`,{ref:d,type:`text`,value:e,onChange:_,onKeyDown:e=>{r&&r?.length>0&&(e.key===`ArrowDown`?(e.preventDefault(),g(e=>e===null||e>=r.length-1?0:e+1)):e.key===`ArrowUp`?(e.preventDefault(),g(e=>e===null||e<=0?r.length-1:e-1)):e.key===`Enter`&&(e.preventDefault(),h!==null&&r[h]?C(r[h]):r.length===1&&C(r[0])))},onFocus:()=>m(!0),placeholder:o,className:(0,N.default)(`search-placeholder-color w-full flex-1 outline-none`,x),role:`combobox`,"aria-expanded":v,"aria-haspopup":`listbox`,"aria-autocomplete":`list`,...u}),(0,t.jsx)(Xe,{})]}),v&&l&&(0,t.jsxs)(`div`,{ref:f,className:(0,N.default)(`absolute left-0 top-full flex w-full flex-col items-center overflow-hidden`,S),role:`listbox`,children:[(0,t.jsx)(_t,{width:`w-11/12`}),s?(0,t.jsx)(`div`,{className:`px-md py-sm`,children:(0,t.jsx)(V,{className:`animate-spin`})}):r.map((e,n)=>(0,t.jsx)(`div`,{onClick:()=>C(e),onMouseEnter:()=>g(n),className:(0,N.default)(`w-full cursor-pointer px-md py-sm`,h===n?`search-selected-index-bg-color`:``),role:`option`,"aria-selected":h===n,"aria-label":e.label,children:l(e,n)},e.id))]})]})}var ii=function(e){return e.Default=`default`,e.Outlined=`outlined`,e.Filled=`filled`,e}({}),ai=function(e){return e.Placeholder=`placeholder`,e.BgSolid=`bg-solid`,e.BgWhite=`bg-white`,e.BgTransparent=`bg-transparent`,e}({}),oi=function(e){return e.Rounded=`rounded`,e.SquareRounded=`square-rounded`,e}({}),si=function(e){return e.Link=`link`,e.SupportingText=`supporting-text`,e.Button=`button`,e}({}),ci=`cursor-default opacity-40`,li=`h-10 w-10`,ui={[oi.SquareRounded]:`${li} rounded-md`,[oi.Rounded]:`${li} rounded-full`},di={[ai.Placeholder]:``,[ai.BgSolid]:`card-image-bg-solid`,[ai.BgWhite]:`card-image-bg-white`,[ai.BgTransparent]:``},fi={[ii.Default]:`border border-transparent`,[ii.Outlined]:`border border-shader-neutral-light-8 dark:border-shader-primary-dark-8 p-xs`,[ii.Filled]:`border border-transparent card-filled-bg p-xs`};function pi({isDisabled:e=!1,type:n=ii.Default,isHoverable:r,onClick:i,children:a,testId:o,...s}){function c(){e||i?.()}let l=!e&&i;return(0,t.jsx)(`div`,{onClick:c,role:l?`button`:void 0,className:(0,N.default)(`relative inline-flex w-full items-center gap-3 rounded-xl px-sm py-xs`,fi[n],{"state-layer":r||l,[ci]:e,"cursor-pointer":i}),"data-testid":o,...s,children:a})}function mi({type:e,onClick:n,subtitle:r,title:i,icon:a,iconAfterText:o,buttonType:s,buttonDisabled:c}){function l(e){n&&(e.stopPropagation(),n())}return e===si.Link?(0,t.jsx)(`div`,{onClick:l,className:`card-action-link-color shrink-0 [&_svg]:h-5 [&_svg]:w-5`,children:a||(0,t.jsx)(Pe,{})}):e===si.SupportingText?(0,t.jsxs)(`div`,{className:`shrink-0 text-right`,children:[i&&(0,t.jsx)(`div`,{className:`card-action-title-color font-inter text-label-md`,children:i}),r&&(0,t.jsx)(`div`,{className:`card-action-subtitle-color font-inter text-label-sm`,children:r})]}):e===si.Button?(0,t.jsx)(`div`,{className:`shrink-0`,children:(0,t.jsx)(R,{type:s||F.Outlined,size:P.Small,text:i,onClick:l,icon:a,iconAfterText:o,disabled:c})}):null}function hi({variant:e=oi.Rounded}){return e===oi.Rounded?(0,t.jsx)(gi,{}):(0,t.jsx)(_i,{})}function gi(){return(0,t.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`40`,height:`40`,viewBox:`0 0 40 40`,fill:`none`,children:[(0,t.jsxs)(`g`,{"clip-path":`url(#clip0_880_55185)`,children:[(0,t.jsx)(`path`,{d:`M0 20C0 8.95431 8.95431 0 20 0C31.0457 0 40 8.95431 40 20C40 31.0457 31.0457 40 20 40C8.95431 40 0 31.0457 0 20Z`,fill:`#5B9CFE`}),(0,t.jsx)(`path`,{d:`M0 20C0 8.95431 8.95431 0 20 0C31.0457 0 40 8.95431 40 20C40 31.0457 31.0457 40 20 40C8.95431 40 0 31.0457 0 20Z`,fill:`url(#paint0_linear_880_55185)`,"fill-opacity":`0.2`}),(0,t.jsx)(`path`,{d:`M0 20C0 8.95431 8.95431 0 20 0C31.0457 0 40 8.95431 40 20C40 31.0457 31.0457 40 20 40C8.95431 40 0 31.0457 0 20Z`,fill:`url(#paint1_linear_880_55185)`,"fill-opacity":`0.2`}),(0,t.jsx)(`path`,{d:`M0.5 20C0.5 9.23045 9.23045 0.5 20 0.5C30.7696 0.5 39.5 9.23045 39.5 20C39.5 30.7696 30.7696 39.5 20 39.5C9.23045 39.5 0.5 30.7696 0.5 20Z`,stroke:`#002F6D`,"stroke-opacity":`0.08`})]}),(0,t.jsxs)(`defs`,{children:[(0,t.jsxs)(`linearGradient`,{id:`paint0_linear_880_55185`,x1:`20`,y1:`0`,x2:`29.5238`,y2:`22.381`,gradientUnits:`userSpaceOnUse`,children:[(0,t.jsx)(`stop`,{offset:`0.990135`,"stop-opacity":`0`}),(0,t.jsx)(`stop`,{offset:`1`})]}),(0,t.jsxs)(`linearGradient`,{id:`paint1_linear_880_55185`,x1:`20`,y1:`0`,x2:`11.4286`,y2:`9.04762`,gradientUnits:`userSpaceOnUse`,children:[(0,t.jsx)(`stop`,{offset:`0.9999`,"stop-opacity":`0`}),(0,t.jsx)(`stop`,{offset:`1`})]}),(0,t.jsx)(`clipPath`,{id:`clip0_880_55185`,children:(0,t.jsx)(`path`,{d:`M0 20C0 8.95431 8.95431 0 20 0C31.0457 0 40 8.95431 40 20C40 31.0457 31.0457 40 20 40C8.95431 40 0 31.0457 0 20Z`,fill:`white`})})]})]})}function _i(){return(0,t.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`40`,height:`40`,viewBox:`0 0 40 40`,fill:`none`,children:[(0,t.jsxs)(`g`,{"clip-path":`url(#clip0_880_55190)`,children:[(0,t.jsx)(`path`,{d:`M0 8C0 3.58172 3.58172 0 8 0H32C36.4183 0 40 3.58172 40 8V32C40 36.4183 36.4183 40 32 40H8C3.58172 40 0 36.4183 0 32V8Z`,fill:`#5B9CFE`}),(0,t.jsx)(`path`,{d:`M0 8C0 3.58172 3.58172 0 8 0H32C36.4183 0 40 3.58172 40 8V32C40 36.4183 36.4183 40 32 40H8C3.58172 40 0 36.4183 0 32V8Z`,fill:`url(#paint0_linear_880_55190)`,"fill-opacity":`0.2`}),(0,t.jsx)(`path`,{d:`M0 8C0 3.58172 3.58172 0 8 0H32C36.4183 0 40 3.58172 40 8V32C40 36.4183 36.4183 40 32 40H8C3.58172 40 0 36.4183 0 32V8Z`,fill:`url(#paint1_linear_880_55190)`,"fill-opacity":`0.2`}),(0,t.jsx)(`path`,{d:`M0.5 8C0.5 3.85786 3.85786 0.5 8 0.5H32C36.1421 0.5 39.5 3.85786 39.5 8V32C39.5 36.1421 36.1421 39.5 32 39.5H8C3.85786 39.5 0.5 36.1421 0.5 32V8Z`,stroke:`#002F6D`,"stroke-opacity":`0.08`})]}),(0,t.jsxs)(`defs`,{children:[(0,t.jsxs)(`linearGradient`,{id:`paint0_linear_880_55190`,x1:`20`,y1:`0`,x2:`29.5238`,y2:`22.381`,gradientUnits:`userSpaceOnUse`,children:[(0,t.jsx)(`stop`,{offset:`0.990135`,"stop-opacity":`0`}),(0,t.jsx)(`stop`,{offset:`1`})]}),(0,t.jsxs)(`linearGradient`,{id:`paint1_linear_880_55190`,x1:`20`,y1:`0`,x2:`11.4286`,y2:`9.04762`,gradientUnits:`userSpaceOnUse`,children:[(0,t.jsx)(`stop`,{offset:`0.9999`,"stop-opacity":`0`}),(0,t.jsx)(`stop`,{offset:`1`})]}),(0,t.jsx)(`clipPath`,{id:`clip0_880_55190`,children:(0,t.jsx)(`path`,{d:`M0 8C0 3.58172 3.58172 0 8 0H32C36.4183 0 40 3.58172 40 8V32C40 36.4183 36.4183 40 32 40H8C3.58172 40 0 36.4183 0 32V8Z`,fill:`white`})})]})]})}function vi({type:e=ai.BgSolid,shape:n=oi.Rounded,url:r,children:i}){return(0,t.jsxs)(`div`,{className:(0,N.default)(ui[n],di[e],`flex shrink-0 items-center justify-center overflow-hidden`),children:[e===ai.Placeholder&&!i&&(0,t.jsx)(hi,{variant:n}),r&&!i&&(0,t.jsx)(`img`,{src:r,className:(0,N.default)(ui[n],`object-cover`),alt:`Card Image`}),i]})}function yi({title:e,subtitle:n,clickableAction:r,icon:i,isTextTruncated:a,tooltipText:o,tooltipPosition:s}){return(0,t.jsxs)(`div`,{className:(0,N.default)(`flex w-full flex-col`,{truncate:a}),children:[(0,t.jsxs)(`div`,{className:(0,N.default)(`flex flex-row items-center gap-x-xxs`,{"grow-1":a}),children:[(0,t.jsx)(`div`,{className:(0,N.default)(`card-body-title-color font-inter text-title-md`,{truncate:a}),children:e}),o?(0,t.jsx)(bt,{text:o,position:s,children:i}):(0,t.jsx)(`div`,{className:`flex items-center`,children:i}),r&&(0,t.jsx)(`div`,{onClick:e=>{e?.stopPropagation()},className:`flex items-center`,children:r})]}),n&&(0,t.jsx)(`div`,{className:(0,N.default)(`card-body-subtitle-color font-inter text-body-md`,{truncate:a}),children:n})]})}var bi=function(e){return e.Default=`default`,e.Highlight=`highlight`,e.Secondary=`secondary`,e}({}),Y=function(e){return e.Default=`default`,e.Large=`large`,e}({}),xi={[bi.Default]:`display-stats-bg-default`,[bi.Highlight]:`display-stats-bg-highlight`,[bi.Secondary]:`display-stats-bg-secondary`},Si={[bi.Default]:`display-stats-text-default`,[bi.Highlight]:`display-stats-text-highlight`,[bi.Secondary]:`display-stats-text-secondary`},Ci={[Y.Default]:`gap-y-sm`,[Y.Large]:`gap-y-md`},wi={[Y.Default]:`text-title-md`,[Y.Large]:`text-headline-sm`},Ti={[Y.Default]:`text-label-md`,[Y.Large]:`text-label-lg`},Ei={[Y.Default]:`text-label-sm`,[Y.Large]:`text-label-md`};function Di({label:e,tooltipPosition:n,tooltipText:r,value:i,supportingLabel:a,type:o=bi.Default,size:s=Y.Default,icon:c,copyText:l,onCopySuccess:u,onCopyError:d}){let f=xi[o],p=Ci[s],m=Si[o],h=wi[s],g=Ei[s],_=Ti[s];async function v(e){if(navigator.clipboard&&l)try{await navigator.clipboard.writeText(l),u?.(e,l)}catch(e){console.error(`Failed to copy:`,e),d?.(e,l)}}return(0,t.jsxs)(`div`,{className:(0,N.default)(`flex h-full w-full flex-col justify-between rounded-2xl p-md--rs`,f,p,m),children:[(0,t.jsxs)(`div`,{className:(0,N.default)(`flex flex-row items-center`,{"w-full justify-between":c}),children:[(0,t.jsxs)(`div`,{className:`flex flex-row items-center gap-xxs`,children:[(0,t.jsx)(`span`,{className:(0,N.default)(g,`whitespace-pre-line`),children:e}),r&&(0,t.jsx)(bt,{text:r,position:n,children:(0,t.jsx)(Ue,{className:`opacity-40`})})]}),c&&(0,t.jsx)(`span`,{className:`display-stats-icon-color`,children:c})]}),(0,t.jsxs)(`div`,{className:`flex w-full flex-row items-baseline gap-xxs`,children:[(0,t.jsx)(`span`,{className:(0,N.default)(`break-all`,h),children:i}),a&&(0,t.jsx)(`span`,{className:(0,N.default)(`opacity-40`,_),children:a}),l&&(0,t.jsx)(`div`,{className:`self-center`,children:(0,t.jsx)(z,{onClick:v,"aria-label":`Copy to clipboard`,children:(0,t.jsx)(B,{className:`display-stats-copy-icon-color`})})})]})]})}function Oi({onIconClick:e,onClick:n,icon:r=(0,t.jsx)(Ke,{}),assetTitle:i,isHoverable:a=!0,...o}){let s=t=>{e?.(t),t?.stopPropagation()},c=!(`src`in o);return(0,t.jsxs)(`div`,{className:(0,N.default)(`relative aspect-square w-full overflow-hidden rounded-xl`,{"group cursor-pointer":a}),onClick:n,children:[!c&&(0,t.jsx)(on,{...o}),c&&o.renderAsset,a&&(0,t.jsx)(`div`,{className:`absolute left-0 top-0 h-full w-full bg-cover bg-center bg-no-repeat group-hover:bg-shader-neutral-light-48 group-hover:transition group-hover:duration-300 group-hover:ease-in-out group-hover:names:bg-shader-inverted-light-48 group-hover:dark:bg-shader-primary-dark-48`}),a&&e&&(0,t.jsx)(z,{className:`visual-asset-icon-color absolute right-2 top-2 z-10 h-9 w-9 cursor-pointer rounded-full p-xs opacity-0 transition-opacity duration-300 group-hover:bg-shader-neutral-light-72 group-hover:opacity-100 [&_svg]:h-5 [&_svg]:w-5`,onClick:s,"aria-label":`More options`,children:r}),a&&i&&(0,t.jsx)(`div`,{className:`absolute bottom-0 w-full p-xs opacity-0 transition-opacity duration-300 group-hover:opacity-100`,children:(0,t.jsx)(`span`,{className:`visual-asset-title-color break-words text-title-md`,children:i})})]})}var ki=`date-picker-trigger-border-color focus-visible:enabled:date-picker-trigger-border-focus-color hover:enabled:date-picker-trigger-border-hover-color group-[.errored]:date-picker-trigger-border-error-color flex w-full flex-row items-center gap-x-3 rounded-lg border px-md py-sm disabled:cursor-not-allowed [&_svg]:h-5 [&_svg]:w-5`,Ai=function(e){return e.DayMonthYear=`DD/MM/YYYY`,e.MonthDayYear=`MM/DD/YYYY`,e.YearMonthDay=`YYYY/MM/DD`,e}({}),ji=[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],Mi=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`];function Ni(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function X(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function Pi(e,t,n){let r=X(e);return!!(t&&r<X(t)||n&&r>X(n))}function Fi(e,t,n){return!!(t&&new Date(e,11,31)<X(t)||n&&new Date(e,0,1)>X(n))}function Ii(e,t){let n=String(e.getFullYear()),r=String(e.getMonth()+1).padStart(2,`0`),i=String(e.getDate()).padStart(2,`0`);switch(t){case Ai.DayMonthYear:return`${i}/${r}/${n}`;case Ai.MonthDayYear:return`${r}/${i}/${n}`;case Ai.YearMonthDay:return`${n}/${r}/${i}`;default:return`${i}/${r}/${n}`}}function Li(e,t){let n=new Date(e,t,1).getDay(),r=[];for(let i=-n;i<42-n;i++)r.push(new Date(e,t,1+i));return r}function Ri(e){return Math.floor(e/10)*10}function zi({value:e,onChange:r,minDate:i,maxDate:a,dateFormat:o=Ai.DayMonthYear,label:s,caption:c,errorMessage:l,disabled:u,placeholder:d=`Select a date`}){let f=X(new Date),[p,m]=(0,n.useState)(!1),[h,g]=(0,n.useState)(`days`),[_,v]=(0,n.useState)(()=>e?.getFullYear()??f.getFullYear()),[y,b]=(0,n.useState)(()=>e?.getMonth()??f.getMonth()),x=(0,n.useRef)(null);(0,n.useEffect)(()=>{e&&(v(e.getFullYear()),b(e.getMonth()))},[e]),(0,n.useEffect)(()=>{p||g(`days`)},[p]),(0,n.useEffect)(()=>{if(!p)return;function e(e){x.current&&!x.current.contains(e.target)&&m(!1)}return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[p]),(0,n.useEffect)(()=>{if(!p)return;function e(e){e.key===`Escape`&&m(!1)}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[p]);function S(){u||m(e=>!e)}function C(){y===0?(b(11),v(e=>e-1)):b(e=>e-1)}function w(){y===11?(b(0),v(e=>e+1)):b(e=>e+1)}function T(){v(e=>e-10)}function E(){v(e=>e+10)}function D(){v(e=>Ri(e)-10)}function ee(){v(e=>Ri(e)+10)}function O(e){v(e),g(`days`)}function te(e){Pi(e,i,a)||(r?.(e),m(!1))}let ne=Li(_,y),k=Ri(_),re=Array.from({length:12},(e,t)=>k+t),ie=!i||new Date(_-10,y+1,0)>=X(i),ae=!i||new Date(_,y,0)>=X(i),oe=!a||new Date(_,y+1,1)<=X(a),se=!a||new Date(_+10,y,1)<=X(a),ce=!i||new Date(k-1,11,31)>=X(i),A=!a||new Date(k+12,0,1)<=X(a);return(0,t.jsx)(Nn,{label:s,caption:c,disabled:u,errorMessage:l,labelHtmlTag:Mn.Div,children:(0,t.jsxs)(`div`,{className:`relative w-full`,ref:x,children:[(0,t.jsxs)(z,{onClick:S,disabled:u,"aria-expanded":p,"aria-haspopup":`dialog`,"aria-label":e?Ii(e,o):d,className:(0,N.default)(ki,{"date-picker-trigger-border-focus-color":p}),children:[(0,t.jsx)(`span`,{className:(0,N.default)(`block w-full text-start text-body-lg`,{"date-picker-trigger-placeholder-color":!e,"date-picker-trigger-text-color":!!e}),children:e?Ii(e,o):d}),(0,t.jsx)(`span`,{className:`input-icon-color flex-shrink-0`,children:(0,t.jsx)(Ie,{})})]}),p&&(0,t.jsx)(`div`,{role:`dialog`,"aria-label":`Date picker calendar`,className:(0,N.default)(`date-picker-calendar-bg date-picker-calendar-border-color absolute z-50 mt-1 rounded-lg border p-3 shadow-lg`,`w-[280px]`),children:h===`days`?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(`div`,{className:`mb-1 flex items-center justify-between`,children:[(0,t.jsx)(z,{onClick:T,disabled:!ie,"aria-label":`Previous 10 years`,className:`date-picker-nav-icon-color enabled:hover:date-picker-nav-bg-hover flex h-8 w-8 items-center justify-center rounded-full transition-colors hover:delay-75 disabled:cursor-not-allowed disabled:opacity-40 [&_svg]:h-4 [&_svg]:w-4`,children:(0,t.jsx)(Ve,{})}),(0,t.jsxs)(`div`,{className:`flex flex-1 items-center justify-between px-1`,children:[(0,t.jsx)(z,{onClick:C,disabled:!ae,"aria-label":`Previous month`,className:`date-picker-nav-icon-color enabled:hover:date-picker-nav-bg-hover flex h-8 w-8 items-center justify-center rounded-full transition-colors hover:delay-75 disabled:cursor-not-allowed disabled:opacity-40 [&_svg]:h-4 [&_svg]:w-4`,children:(0,t.jsx)(Ne,{})}),(0,t.jsxs)(z,{onClick:()=>g(`years`),"aria-label":`Select year`,className:`date-picker-header-text-color enabled:hover:date-picker-nav-bg-hover rounded-md px-1 py-0.5 text-label-lg font-semibold transition-colors hover:delay-75 shrink-0`,children:[Mi[y],` `,_]}),(0,t.jsx)(z,{onClick:w,disabled:!oe,"aria-label":`Next month`,className:`date-picker-nav-icon-color enabled:hover:date-picker-nav-bg-hover flex h-8 w-8 items-center justify-center rounded-full transition-colors hover:delay-75 disabled:cursor-not-allowed disabled:opacity-40 [&_svg]:h-4 [&_svg]:w-4`,children:(0,t.jsx)(Pe,{})})]}),(0,t.jsx)(z,{onClick:E,disabled:!se,"aria-label":`Next 10 years`,className:`date-picker-nav-icon-color enabled:hover:date-picker-nav-bg-hover flex h-8 w-8 items-center justify-center rounded-full transition-colors hover:delay-75 disabled:cursor-not-allowed disabled:opacity-40 [&_svg]:h-4 [&_svg]:w-4`,children:(0,t.jsx)(He,{})})]}),(0,t.jsx)(`div`,{className:`mb-1 grid grid-cols-7`,children:ji.map(e=>(0,t.jsx)(`div`,{className:`date-picker-weekday-text-color flex h-8 w-8 items-center justify-center text-label-sm font-medium`,children:e},e))}),(0,t.jsx)(`div`,{className:`grid grid-cols-7`,children:ne.map((n,r)=>{let o=n.getMonth()===y,s=!!e&&Ni(n,e),c=Ni(n,f),l=Pi(n,i,a),u=!o;return(0,t.jsx)(`div`,{className:`flex items-center justify-center p-0.5`,children:(0,t.jsx)(z,{onClick:()=>te(n),disabled:l||u,"aria-label":Ii(n,Ai.DayMonthYear),"aria-selected":s,"aria-disabled":l||u,className:(0,N.default)(`date-picker-day-text-color flex h-8 w-8 items-center justify-center rounded-full text-body-md transition-colors hover:delay-75`,{"date-picker-day-bg-selected date-picker-day-text-selected cursor-pointer":s,"date-picker-day-today-ring font-semibold":c&&!s,"date-picker-day-text-disabled cursor-not-allowed opacity-40":l&&!u,"date-picker-day-text-outside-month cursor-default opacity-30":u,"enabled:hover:date-picker-day-bg-hover enabled:hover:date-picker-day-text-color-hover cursor-pointer":!s&&!l&&!u}),children:n.getDate()})},r)})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[(0,t.jsx)(z,{onClick:D,disabled:!ce,"aria-label":`Previous decade`,className:`date-picker-nav-icon-color enabled:hover:date-picker-nav-bg-hover flex h-8 w-8 items-center justify-center rounded-full transition-colors hover:delay-75 disabled:cursor-not-allowed disabled:opacity-40 [&_svg]:h-4 [&_svg]:w-4`,children:(0,t.jsx)(Ve,{})}),(0,t.jsxs)(`span`,{className:`date-picker-header-text-color text-label-lg font-semibold`,children:[k,` – `,k+12-1]}),(0,t.jsx)(z,{onClick:ee,disabled:!A,"aria-label":`Next decade`,className:`date-picker-nav-icon-color enabled:hover:date-picker-nav-bg-hover flex h-8 w-8 items-center justify-center rounded-full transition-colors hover:delay-75 disabled:cursor-not-allowed disabled:opacity-40 [&_svg]:h-4 [&_svg]:w-4`,children:(0,t.jsx)(He,{})})]}),(0,t.jsx)(`div`,{className:`grid grid-cols-3 gap-1`,children:re.map(n=>{let r=e?.getFullYear()===n,o=f.getFullYear()===n,s=Fi(n,i,a);return(0,t.jsx)(z,{onClick:()=>O(n),disabled:s,"aria-label":String(n),"aria-selected":r,className:(0,N.default)(`date-picker-day-text-color flex w-full items-center justify-center rounded-lg py-2 text-body-md transition-colors hover:delay-75`,{"date-picker-day-bg-selected date-picker-day-text-selected cursor-pointer":r,"date-picker-day-today-ring font-semibold":o&&!r,"date-picker-day-text-disabled cursor-not-allowed opacity-40":s,"enabled:hover:date-picker-day-bg-hover enabled:hover:date-picker-day-text-color-hover cursor-pointer":!r&&!s}),children:n},n)})})]})})]})})}function Bi(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Vi(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function Hi(...e){return t=>e.forEach(e=>Vi(e,t))}function Ui(...e){return p.useCallback(Hi(...e),e)}function Wi(e,n){let r=p.createContext(n);function i(e){let{children:n,...i}=e,a=p.useMemo(()=>i,Object.values(i));return(0,t.jsx)(r.Provider,{value:a,children:n})}function a(t){let i=p.useContext(r);if(i)return i;if(n!==void 0)return n;throw Error(`\`${t}\` must be used within \`${e}\``)}return i.displayName=e+`Provider`,[i,a]}function Gi(e,n=[]){let r=[];function i(n,i){let a=p.createContext(i),o=r.length;r=[...r,i];function s(n){let{scope:r,children:i,...s}=n,c=r?.[e][o]||a,l=p.useMemo(()=>s,Object.values(s));return(0,t.jsx)(c.Provider,{value:l,children:i})}function c(t,r){let s=r?.[e][o]||a,c=p.useContext(s);if(c)return c;if(i!==void 0)return i;throw Error(`\`${t}\` must be used within \`${n}\``)}return s.displayName=n+`Provider`,[s,c]}let a=()=>{let t=r.map(e=>p.createContext(e));return function(n){let r=n?.[e]||t;return p.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return a.scopeName=e,[i,Ki(a,...n)]}function Ki(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var qi=globalThis?.document?p.useLayoutEffect:()=>{},Ji=p.useId||(()=>void 0),Yi=0;function Xi(e){let[t,n]=p.useState(Ji());return qi(()=>{e||n(e=>e??String(Yi++))},[e]),e||(t?`radix-${t}`:``)}function Zi(e){let t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...e)=>t.current?.(...e),[])}function Qi({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,i]=$i({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=Zi(n);return[o,p.useCallback(t=>{if(a){let n=typeof t==`function`?t(e):t;n!==e&&s(n)}else i(t)},[a,e,i,s])]}function $i({defaultProp:e,onChange:t}){let n=p.useState(e),[r]=n,i=p.useRef(r),a=Zi(t);return p.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var ea=p.forwardRef((e,n)=>{let{children:r,...i}=e,a=p.Children.toArray(r),o=a.find(ra);if(o){let e=o.props.children,r=a.map(t=>t===o?p.Children.count(e)>1?p.Children.only(null):p.isValidElement(e)?e.props.children:null:t);return(0,t.jsx)(ta,{...i,ref:n,children:p.isValidElement(e)?p.cloneElement(e,void 0,r):null})}return(0,t.jsx)(ta,{...i,ref:n,children:r})});ea.displayName=`Slot`;var ta=p.forwardRef((e,t)=>{let{children:n,...r}=e;if(p.isValidElement(n)){let e=aa(n);return p.cloneElement(n,{...ia(r,n.props),ref:t?Hi(t,e):e})}return p.Children.count(n)>1?p.Children.only(null):null});ta.displayName=`SlotClone`;var na=({children:e})=>(0,t.jsx)(t.Fragment,{children:e});function ra(e){return p.isValidElement(e)&&e.type===na}function ia(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{a(...e),i(...e)}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function aa(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Z=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`span`,`svg`,`ul`].reduce((e,n)=>{let r=p.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?ea:n;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,t.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${n}`,{...e,[n]:r}},{});function oa(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}function sa(e,t=globalThis?.document){let n=Zi(e);p.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var ca=`DismissableLayer`,la=`dismissableLayer.update`,ua=`dismissableLayer.pointerDownOutside`,da=`dismissableLayer.focusOutside`,fa,pa=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ma=p.forwardRef((e,n)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=p.useContext(pa),[d,f]=p.useState(null),m=d?.ownerDocument??globalThis?.document,[,h]=p.useState({}),g=Ui(n,e=>f(e)),_=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=_.indexOf(v),b=d?_.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=_a(e=>{let t=e.target,n=[...u.branches].some(e=>e.contains(t));!S||n||(a?.(e),s?.(e),e.defaultPrevented||c?.())},m),w=va(e=>{let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},m);return sa(e=>{b===u.layers.size-1&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))},m),p.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(fa=m.body.style.pointerEvents,m.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ya(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=fa)}},[d,m,r,u]),p.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ya())},[d,u]),p.useEffect(()=>{let e=()=>h({});return document.addEventListener(la,e),()=>document.removeEventListener(la,e)},[]),(0,t.jsx)(Z.div,{...l,ref:g,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:Bi(e.onFocusCapture,w.onFocusCapture),onBlurCapture:Bi(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Bi(e.onPointerDownCapture,C.onPointerDownCapture)})});ma.displayName=ca;var ha=`DismissableLayerBranch`,ga=p.forwardRef((e,n)=>{let r=p.useContext(pa),i=p.useRef(null),a=Ui(n,i);return p.useEffect(()=>{let e=i.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,t.jsx)(Z.div,{...e,ref:a})});ga.displayName=ha;function _a(e,t=globalThis?.document){let n=Zi(e),r=p.useRef(!1),i=p.useRef(()=>{});return p.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){ba(ua,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function va(e,t=globalThis?.document){let n=Zi(e),r=p.useRef(!1);return p.useEffect(()=>{let e=e=>{e.target&&!r.current&&ba(da,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ya(){let e=new CustomEvent(la);document.dispatchEvent(e)}function ba(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?oa(i,a):i.dispatchEvent(a)}var xa=`focusScope.autoFocusOnMount`,Sa=`focusScope.autoFocusOnUnmount`,Ca={bubbles:!1,cancelable:!0},wa=`FocusScope`,Ta=p.forwardRef((e,n)=>{let{loop:r=!1,trapped:i=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[c,l]=p.useState(null),u=Zi(a),d=Zi(o),f=p.useRef(null),m=Ui(n,e=>l(e)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(i){let e=function(e){if(h.paused||!c)return;let t=e.target;c.contains(t)?f.current=t:Ma(f.current,{select:!0})},t=function(e){if(h.paused||!c)return;let t=e.relatedTarget;t!==null&&(c.contains(t)||Ma(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Ma(c)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[i,c,h.paused]),p.useEffect(()=>{if(c){Na.add(h);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(xa,Ca);c.addEventListener(xa,u),c.dispatchEvent(t),t.defaultPrevented||(Ea(Ia(Oa(c)),{select:!0}),document.activeElement===e&&Ma(c))}return()=>{c.removeEventListener(xa,u),setTimeout(()=>{let t=new CustomEvent(Sa,Ca);c.addEventListener(Sa,d),c.dispatchEvent(t),t.defaultPrevented||Ma(e??document.body,{select:!0}),c.removeEventListener(Sa,d),Na.remove(h)},0)}}},[c,u,d,h]);let g=p.useCallback(e=>{if(!r&&!i||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){let t=e.currentTarget,[i,a]=Da(t);i&&a?!e.shiftKey&&n===a?(e.preventDefault(),r&&Ma(i,{select:!0})):e.shiftKey&&n===i&&(e.preventDefault(),r&&Ma(a,{select:!0})):n===t&&e.preventDefault()}},[r,i,h.paused]);return(0,t.jsx)(Z.div,{tabIndex:-1,...s,ref:m,onKeyDown:g})});Ta.displayName=wa;function Ea(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Ma(r,{select:t}),document.activeElement!==n)return}function Da(e){let t=Oa(e);return[ka(t,e),ka(t.reverse(),e)]}function Oa(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ka(e,t){for(let n of e)if(!Aa(n,{upTo:t}))return n}function Aa(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function ja(e){return e instanceof HTMLInputElement&&`select`in e}function Ma(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ja(e)&&t&&e.select()}}var Na=Pa();function Pa(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Fa(e,t),e.unshift(t)},remove(t){e=Fa(e,t),e[0]?.resume()}}}function Fa(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ia(e){return e.filter(e=>e.tagName!==`A`)}var La=`Portal`,Ra=p.forwardRef((e,n)=>{let{container:i,...a}=e,[o,s]=p.useState(!1);qi(()=>s(!0),[]);let c=i||o&&globalThis?.document?.body;return c?r.default.createPortal((0,t.jsx)(Z.div,{...a,ref:n}),c):null});Ra.displayName=La;function za(e,t){return p.useReducer((e,n)=>t[e][n]??e,e)}var Ba=e=>{let{present:t,children:n}=e,r=Va(t),i=typeof n==`function`?n({present:r.isPresent}):p.Children.only(n),a=Ui(r.ref,Ua(i));return typeof n==`function`||r.isPresent?p.cloneElement(i,{ref:a}):null};Ba.displayName=`Presence`;function Va(e){let[t,n]=p.useState(),i=p.useRef({}),a=p.useRef(e),o=p.useRef(`none`),[s,c]=za(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return p.useEffect(()=>{let e=Ha(i.current);o.current=s===`mounted`?e:`none`},[s]),qi(()=>{let t=i.current,n=a.current;if(n!==e){let r=o.current,i=Ha(t);e?c(`MOUNT`):i===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),a.current=e}},[e,c]),qi(()=>{if(t){let e=e=>{let n=Ha(i.current).includes(e.animationName);e.target===t&&n&&r.flushSync(()=>c(`ANIMATION_END`))},n=e=>{e.target===t&&(o.current=Ha(i.current))};return t.addEventListener(`animationstart`,n),t.addEventListener(`animationcancel`,e),t.addEventListener(`animationend`,e),()=>{t.removeEventListener(`animationstart`,n),t.removeEventListener(`animationcancel`,e),t.removeEventListener(`animationend`,e)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:p.useCallback(e=>{e&&(i.current=getComputedStyle(e)),n(e)},[])}}function Ha(e){return e?.animationName||`none`}function Ua(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Wa=0;function Ga(){p.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Ka()),document.body.insertAdjacentElement(`beforeend`,e[1]??Ka()),Wa++,()=>{Wa===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Wa--}},[])}function Ka(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.cssText=`outline: none; opacity: 0; position: fixed; pointer-events: none`,e}var Q=function(){return Q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Q.apply(this,arguments)};function qa(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Ja(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Ya=`right-scroll-bar-position`,Xa=`width-before-scroll-bar`,Za=`with-scroll-bars-hidden`,Qa=`--removed-body-scroll-bar-size`;function $a(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function eo(e,t){var r=(0,n.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(e){var t=r.value;t!==e&&(r.value=e,r.callback(e,t))}}}})[0];return r.callback=t,r.facade}var to=typeof window<`u`?n.useLayoutEffect:n.useEffect,no=new WeakMap;function ro(e,t){var n=eo(t||null,function(t){return e.forEach(function(e){return $a(e,t)})});return to(function(){var t=no.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||$a(e,null)}),i.forEach(function(e){r.has(e)||$a(e,a)})}no.set(n,e)},[e]),n}function io(e){return e}function ao(e,t){t===void 0&&(t=io);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function oo(e){e===void 0&&(e={});var t=ao(null);return t.options=Q({async:!0,ssr:!1},e),t}var so=function(e){var t=e.sideCar,r=qa(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw Error(`Sidecar medium not found`);return n.createElement(i,Q({},r))};so.isSideCarExport=!0;function co(e,t){return e.useMedium(t),so}var lo=oo(),uo=function(){},fo=n.forwardRef(function(e,t){var r=n.useRef(null),i=n.useState({onScrollCapture:uo,onWheelCapture:uo,onTouchMoveCapture:uo}),a=i[0],o=i[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=qa(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=p,S=ro([r,t]),C=Q(Q({},b),a);return n.createElement(n.Fragment,null,d&&n.createElement(x,{sideCar:lo,removeScrollBar:u,shards:f,noIsolation:m,inert:h,setCallbacks:o,allowPinchZoom:!!g,lockRef:r,gapMode:y}),s?n.cloneElement(n.Children.only(c),Q(Q({},C),{ref:S})):n.createElement(v,Q({},C,{className:l,ref:S}),c))});fo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},fo.classNames={fullWidth:Xa,zeroRight:Ya};var po,mo=function(){if(po)return po;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function ho(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=mo();return t&&e.setAttribute(`nonce`,t),e}function go(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _o(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var vo=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ho())&&(go(t,n),_o(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yo=function(){var e=vo();return function(t,r){n.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},bo=function(){var e=yo();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},xo={left:0,top:0,right:0,gap:0},So=function(e){return parseInt(e||``,10)||0},Co=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[So(n),So(r),So(i)]},wo=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return xo;var t=Co(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},To=bo(),Eo=`data-scroll-locked`,Do=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
17
|
+
`),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function Cr(e){e=Sr(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=Rn);var a=e.onBlur;a===void 0&&(a=Rn);var o=e.thousandSeparator,s=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l=``);var u=e.defaultValue,d=e.value,f=e.valueIsNumericString,p=e.onValueChange,m=In(e,[`decimalSeparator`,`allowedDecimalSeparators`,`thousandsGroupStyle`,`suffix`,`allowNegative`,`allowLeadingZeros`,`onKeyDown`,`onBlur`,`thousandSeparator`,`decimalScale`,`fixedDecimalScale`,`prefix`,`defaultValue`,`value`,`valueIsNumericString`,`onValueChange`]),h=gr(e),g=h.decimalSeparator,_=h.allowedDecimalSeparators,v=function(t){return hr(t,e)},y=function(t,n){return br(t,n,e)},b=Vn(d)?u:d,x=f??yr(b,l,t);Vn(d)?Vn(u)||(x||=typeof u==`number`):x||=typeof d==`number`;var S=function(e){return Un(e)?e:(typeof e==`number`&&(e=Qn(e)),x&&typeof s==`number`?$n(e,s,!!c):e)},C=dr(S(d),S(u),!!x,v,y,p),w=C[0],T=w.numAsString,E=w.formattedValue,D=C[1];return Object.assign(Object.assign({},m),{value:E,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===g?!0:Bn(e)},isCharacterSame:function(e){var t=e.currentValue,n=e.lastValue,r=e.formattedValue,i=e.currentValueIndex,a=e.formattedValueIndex,o=t[i],u=r[a],f=tr(n,t).to,p=function(e){return y(e).indexOf(`.`)+l.length};return d===0&&c&&s&&t[f.start]===g&&p(t)<i&&p(r)>a?!1:i>=f.start&&i<f.end&&_&&_.includes(o)&&u===g?!0:o===u},onValueChange:D,format:v,removeFormatting:y,getCaretBoundary:function(t){return xr(t,e)},onKeyDown:function(e){var t=e.target,r=e.key,a=t.selectionStart,u=t.selectionEnd,d=t.value;if(d===void 0&&(d=``),(r===`Backspace`||r===`Delete`)&&u<l.length){e.preventDefault();return}if(a!==u){i(e);return}r===`Backspace`&&d[0]===`-`&&a===l.length+1&&n&&er(t,1),s&&c&&(r===`Backspace`&&d[a-1]===g?(er(t,a-1),e.preventDefault()):r===`Delete`&&d[a]===g&&e.preventDefault()),_?.includes(r)&&d[a]===g&&er(t,a+1);var f=o===!0?`,`:o;r===`Backspace`&&d[a-1]===f&&er(t,a-1),r===`Delete`&&d[a]===f&&er(t,a+1),i(e)},onBlur:function(t){var n=T;n.match(/\d/g)||(n=``),r||(n=Yn(n)),c&&s&&(n=$n(n,s,c)),n!==T&&D({formattedValue:hr(n,e),value:n,floatValue:parseFloat(n)},{event:t,source:Ln.event}),a(t)}})}function wr(e){var t=Cr(e);return n.default.createElement(mr,Object.assign({},t))}var Tr=(0,n.forwardRef)(function({label:e,caption:r,disabled:i,errorMessage:a,leadingIcon:o,supportingText:s,amountCounter:c,trailingElement:l,isContentVisible:u,value:d,supportingValue:f,defaultValue:p,onClearInput:m,isVisibilityToggleEnabled:h,type:g,..._},v){h??=g===q.Password;let y=(0,n.useRef)(null),[b,x]=(0,n.useState)(u??g!==q.Password);(0,n.useEffect)(()=>{x(u??g!==q.Password)},[g,u]);function S(){x(e=>!e)}function C(){y.current&&y.current.querySelector(`input`)?.focus()}return(0,t.jsx)(Nn,{label:e,caption:r,disabled:i,errorMessage:a,amountCounter:c,required:_.required,children:(0,t.jsxs)(`div`,{className:(0,N.default)(`input-container relative flex flex-row items-center gap-x-3`,An),onClick:C,ref:y,children:[o&&(0,t.jsx)(`span`,{className:`input-icon-color`,children:o}),(0,t.jsxs)(`div`,{className:`flex flex-1 flex-col items-start`,children:[(0,t.jsx)(Er,{..._,inputRef:v,value:d,type:g===q.Password&&b?q.Text:g,disabled:i,className:(0,N.default)(En,Dn,On,kn)}),f&&(0,t.jsx)(`span`,{className:`text-label-md text-iota-neutral-60 names:text-iota-neutral-60 dark:text-iota-neutral-40`,children:f})]}),s&&(0,t.jsx)(nn,{children:s}),(0,t.jsx)(Or,{value:d,type:g,onClearInput:m,isContentVisible:b,trailingElement:l,isVisibilityToggleEnabled:h,onToggleButtonClick:S})]})})});function Er({type:e,inputRef:n,...r}){function i(t){if(e===q.Number){let e=t.currentTarget;e.blur(),t.stopPropagation(),setTimeout(()=>{e.focus({preventScroll:!0})},0)}}return e===q.NumericFormat?(0,t.jsx)(Dr,{inputRef:n,...r,type:e}):(0,t.jsx)(`input`,{ref:n,...r,type:e,onWheel:e=>{i(e),r.onWheel?.(e)}})}function Dr({inputRef:e,className:n,type:r,...i}){return(0,t.jsx)(wr,{className:n,valueIsNumericString:!0,getInputRef:e,...i})}function Or({value:e,type:r,onClearInput:i,isContentVisible:a,trailingElement:o,onToggleButtonClick:s,isVisibilityToggleEnabled:c}){let l=!!(r===q.Text&&e&&i),u=!!(r===q.Password&&c),d=!!(o&&!l&&!u);if(l)return(0,t.jsx)(z,{className:`input-icon-color [&_svg]:h-5 [&_svg]:w-5`,onClick:i,tabIndex:-1,"aria-label":`Clear input`,children:(0,t.jsx)(ze,{})});if(u)return(0,t.jsx)(z,{onClick:s,className:`input-icon-color [&_svg]:h-5 [&_svg]:w-5`,tabIndex:-1,"aria-label":`Toggle visibility`,children:a?(0,t.jsx)(tt,{}):(0,t.jsx)(et,{})});if(d)return(0,t.jsx)(n.Fragment,{children:o})}var kr=(0,n.forwardRef)(function({label:e,caption:r,disabled:i,errorMessage:a,value:o,amountCounter:s,isVisibilityToggleEnabled:c,isResizeEnabled:l,required:u,isContentVisible:d,defaultValue:f,...p},m){let[h,g]=(0,n.useState)(d??!0);(0,n.useEffect)(()=>{g(d??!0)},[d]);function _(){g(e=>!e)}return(0,t.jsx)(Nn,{label:e,caption:r,disabled:i||!h,errorMessage:a,amountCounter:s,required:u,children:(0,t.jsxs)(`div`,{className:`relative`,children:[(0,t.jsx)(`textarea`,{disabled:i||!h,required:u,ref:m,className:(0,N.default)(`text-area-container peer block min-h-[50px]`,An,En,Dn,On,h&&l?`resize-y`:`resize-none`,!h&&`not-visible select-none text-transparent`),defaultValue:h&&f?f:void 0,value:h&&o?o:void 0,...p}),!h&&(0,t.jsx)(`div`,{className:`absolute left-0 top-0 flex h-full w-full flex-col items-stretch gap-y-2 px-md py-sm peer-[.not-visible]:select-none`,children:(0,t.jsx)(Ar,{rows:3,halfWidthRow:3})}),c&&(0,t.jsx)(`span`,{className:`absolute bottom-4 right-4 flex`,children:(0,t.jsx)(z,{onClick:_,className:`input-icon-color [&_svg]:h-5 [&_svg]:w-5`,tabIndex:-1,children:h?(0,t.jsx)(tt,{}):(0,t.jsx)(et,{})})})]})})});function Ar({rows:e,halfWidthRow:n}){return(0,t.jsx)(t.Fragment,{children:Array.from({length:e}).map((e,r)=>(0,t.jsx)(`div`,{className:`input-visibility-bar h-2.5 rounded ${n===r+1?`w-1/2`:`w-full`}`},r))})}var jr=function(e){return e.Horizontal=`horizontal`,e.Vertical=`vertical`,e}({}),Mr=`navbar-item-icon-selected-color`,Nr=`navbar-item-icon-color`,Pr=`py-xxs px-sm`,Fr=`p-sm`,Ir=`-top-3 right-3`,Lr=`-top-1 right-3`,Rr=`navbar-item-label-selected-color`,zr=`navbar-item-label-color`;function Br({icon:e,text:n,isSelected:r,hasBadge:i,onClick:a,isDisabled:o=!1,...s}){let c=r?Mr:Nr,l=n?Pr:Fr,u=r&&`bg-shader-primary-light-12 dark:bg-shader-primary-dark-12`,d=n?Ir:Lr,f=r?Rr:zr,p=o?`cursor-not-allowed opacity-60`:`state-layer-secondary`;return(0,t.jsxs)(`div`,{onClick:e=>{if(o){e.preventDefault();return}a?.(e)},role:`button`,className:(0,N.default)(`inline-flex cursor-pointer flex-col items-center justify-center space-y-1`),...s,children:[(0,t.jsxs)(`div`,{className:(0,N.default)(`relative inline-flex rounded-full`,l,u,p),children:[(0,t.jsx)(`div`,{className:(0,N.default)(`inline-flex [&_svg]:h-6 [&_svg]:w-6`,c),children:e}),i&&(0,t.jsx)(`div`,{className:(0,N.default)(`absolute`,d),children:(0,t.jsx)(Se,{type:M.PrimarySolid})})]}),n&&(0,t.jsx)(`span`,{className:(0,N.default)(`text-center text-label-md`,f),children:n})]})}function Vr({icon:e,text:n,isSelected:r,hasBadge:i,onClick:a,isDisabled:o=!1,...s}){let c=r?Mr:Nr,l=r&&`bg-shader-primary-light-12 dark:bg-shader-primary-dark-12`,u=r?Rr:zr,d=o?`cursor-not-allowed opacity-60`:`state-layer-secondary cursor-pointer `;return(0,t.jsxs)(`div`,{onClick:e=>{if(o){e.preventDefault();return}a?.(e)},role:`button`,className:(0,N.default)(`relative inline-flex w-full flex-row items-center justify-between rounded-full p-sm`,l,d),...s,children:[(0,t.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,t.jsx)(`div`,{className:(0,N.default)(`inline-flex [&_svg]:h-6 [&_svg]:w-6`,c),children:e}),n&&(0,t.jsx)(`span`,{className:(0,N.default)(`text-center text-label-lg`,u),children:n})]}),i&&(0,t.jsx)(Se,{type:M.PrimarySolid})]})}function Hr(e){let{type:n,text:r}=e;return n===jr.Vertical&&r?(0,t.jsx)(Vr,{...e}):(0,t.jsx)(Br,{...e})}function Ur({title:e,subtitle:n,badgeType:r,badgeText:i,avatarContent:a,onOptionsClick:o,onCopy:s,copyText:c,onOpen:l,isCopyable:u,isExternal:d,isSelected:f,isActive:p,showSelected:m,badgeTooltipText:h,badgeTooltipPosition:g=yt.Bottom}){let _=a;return(0,t.jsx)(`div`,{"data-testid":`account-tile`,className:(0,N.default)(`state-layer group relative flex w-full items-center justify-between space-x-3 rounded-xl px-sm py-xs hover:cursor-pointer`,p&&`state-active`),children:(0,t.jsxs)(`div`,{className:`flex w-full items-center gap-x-3`,children:[(0,t.jsx)(`div`,{children:(0,t.jsx)(_,{})}),(0,t.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col items-start py-xs`,children:[(0,t.jsxs)(`div`,{className:`flex w-full min-w-0 items-center space-x-2`,children:[(0,t.jsx)(`p`,{className:`account-title-color min-w-0 max-w-full truncate font-inter text-title-md`,children:e}),i&&r?h?(0,t.jsx)(bt,{text:h,position:g,children:(0,t.jsx)(Se,{type:r,label:i})}):(0,t.jsx)(Se,{type:r,label:i}):null]}),(0,t.jsx)(rn,{text:n,onCopySuccess:s,copyText:c,onOpen:l,isCopyable:u,isExternal:d})]}),(0,t.jsxs)(`div`,{className:`ml-auto flex items-center space-x-2 [&_button]:h-5 [&_button]:w-5 [&_svg]:h-5 [&_svg]:w-5`,children:[(0,t.jsx)(`div`,{className:`account-icon-color flex items-center space-x-2 [&_button:not(.locked)]:invisible group-hover:[&_button:not(.locked)]:visible`,children:o&&(0,t.jsx)(z,{onClick:o,"aria-label":`More options`,children:(0,t.jsx)(Ke,{})})}),m&&(0,t.jsx)(z,{"aria-label":`Checkmark`,children:f?(0,t.jsx)(Re,{className:`account-check-active-color h-5 w-5`}):(0,t.jsx)(Je,{className:`account-check-inactive-color h-5 w-5`})})]})]})})}function Wr({children:e}){return(0,t.jsx)(`ul`,{className:`dropdown-bg dropdown-border-color list-none rounded-lg border py-xs`,children:e})}var Gr=function(e){return e.Top=`top`,e.Bottom=`bottom`,e}({});function Kr({children:e,hasLastBorderNoneClass:n,isContentCentered:r}){return(0,t.jsx)(`td`,{className:(0,N.default)(`table-cell-border-color h-14 border-b px-md`,{"last:border-none":n},{"flex items-center justify-center":r}),children:e})}function qr({children:e,supportingLabel:n}){return(0,t.jsxs)(`div`,{className:`flex flex-row items-baseline gap-1`,children:[(0,t.jsx)(`span`,{children:e}),n&&(0,t.jsx)(`span`,{className:`table-cell-supporting-label-color text-body-sm`,children:n})]})}function Jr(){return(0,t.jsx)(Bt,{})}var Yr=function(e){return e.Small=`small`,e.Default=`default`,e}({}),Xr=(0,n.forwardRef)(({disabled:e,label:r,leadingIcon:i,supportingText:a,errorMessage:o,caption:s,options:c,placeholder:l,onValueChange:u,onOptionClick:d,value:f,dropdownPosition:p=Gr.Bottom,size:m=Yr.Default,...h},g)=>{let[_,v]=(0,n.useState)(!1),y=w(f,c),b=(0,n.useRef)(null),x=y||l,S=m===Yr.Small?`px-sm`:`px-md`,C=m===Yr.Small?`text-body-md`:`text-body-lg`;(0,n.useEffect)(()=>{e&&_&&D()},[e,_]),(0,n.useEffect)(()=>{if(!_)return;let e=e=>{let t=e.target;b.current&&!b.current.contains(t)&&D()};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[_]);function w(e,t=[]){return t.find(t=>typeof t==`string`?t===e:t.id===e)??t[0]}function T(){v(e=>!e)}function E(e){D();let t=typeof e==`string`?e:e.id;d?.(t),e!==y&&u?.(t)}function D(){v(!1)}return(0,t.jsx)(Nn,{label:r,caption:s,disabled:e,errorMessage:o,labelHtmlTag:Mn.Div,children:(0,t.jsxs)(`div`,{className:`relative flex w-full flex-col`,ref:b,children:[(0,t.jsxs)(z,{ref:g,onClick:T,disabled:e,"aria-expanded":_,"aria-haspopup":`listbox`,className:(0,N.default)(`select-container select-border-color focus-visible:enabled:select-border-focus-color active:enabled:select-border-focus-color group-[.errored]:select-border-error-color group-[.opened]:select-border-focus-color [&:is(:focus,_:focus-visible,_:active)]:enabled:select-border-focus-color hover:enabled:select-border-hover-color flex flex-row items-center gap-x-3 rounded-lg border py-sm disabled:cursor-not-allowed [&_svg]:h-5 [&_svg]:w-5`,S),...h,children:[i&&(0,t.jsx)(`span`,{className:`select-icon-color`,children:i}),(0,t.jsxs)(`div`,{className:`flex w-full flex-row items-baseline gap-x-3`,children:[x&&(0,t.jsx)(`div`,{className:(0,N.default)(`select-label-color block w-full text-start`,C),children:(0,t.jsx)(Zr,{option:x})}),a&&(0,t.jsx)(`div`,{className:`ml-auto`,children:(0,t.jsx)(nn,{children:a})})]}),(0,t.jsx)($e,{className:(0,N.default)(`select-icon-color transition-transform`,{" rotate-180":_})})]}),_&&(0,t.jsx)(`div`,{className:`fixed left-0 top-0 z-[49] bg-transparent`,onClick:D}),_&&(0,t.jsx)(`div`,{className:(0,N.default)(`absolute z-50 min-w-full animate-dropdown-show`,p===Gr.Top?`bottom-full origin-bottom`:`top-full origin-top`),children:(0,t.jsx)(Wr,{children:c.map(e=>(0,t.jsx)(Et,{onClick:()=>E(e),hideBottomBorder:!0,children:(0,t.jsx)(Zr,{option:e})},typeof e==`string`?e:e.id))})})]})})});function Zr({option:e}){return typeof e==`string`?e:`renderLabel`in e?e.renderLabel():e.label}var Qr=function(e){return e.Asc=`asc`,e.Desc=`desc`,e}({});function $r({label:e,columnKey:n,actionLeft:r,actionRight:i,hasSort:a,hasCheckbox:o,isChecked:s,isIndeterminate:c,isContentCentered:l,onSortClick:u,onCheckboxChange:d,sortOrder:f,...p}){let m=()=>{let e=f===Qr.Asc?Qr.Desc:Qr.Asc;u&&u(n,e)},h=a?f===Qr.Asc?(0,t.jsx)(Qe,{className:`shrink-0`}):f===Qr.Desc?(0,t.jsx)(Ze,{className:`shrink-0`}):(0,t.jsx)(Qe,{className:`invisible shrink-0 group-hover:visible`}):null;return(0,t.jsx)(`th`,{onClick:a?m:void 0,className:(0,N.default)(`state-layer table-cell-border-color group relative h-14 border-b px-md after:pointer-events-none`,{"cursor-pointer":a}),"aria-sort":a?f===Qr.Asc?`ascending`:f===Qr.Desc?`descending`:`none`:void 0,...p,children:(0,t.jsxs)(`div`,{className:(0,N.default)(`flex flex-row items-center gap-1 [&_svg]:h-4 [&_svg]:w-4`,`table-header-text-color`,`text-label-lg`,{"justify-center":l}),children:[o?(0,t.jsx)(dt,{isChecked:s,isIndeterminate:c,onCheckedChange:d}):(0,t.jsxs)(t.Fragment,{children:[r,(0,t.jsx)(`span`,{className:(0,N.default)({"text-left":!l}),children:e})]}),h,i]})})}var J=function(e){return e.Outlined=`outlined`,e.Filled=`filled`,e}({}),ei={[J.Outlined]:`bg-transparent`,[J.Filled]:`search-bg-color-filled`},ti={[J.Outlined]:`border-l border-r border-t search-border-color`,[J.Filled]:`search-bg-color-filled`},ni={[J.Outlined]:`rounded-b-3xl border-b border-l border-r search-border-color search-suggestion-bg-color`,[J.Filled]:`rounded-b-3xl search-bg-color-filled`};function ri({searchValue:e,suggestions:r,onSearchValueChange:i,onSuggestionClick:a,placeholder:o,isLoading:s=!1,type:c=J.Outlined,renderSuggestion:l,...u}){let d=(0,n.useRef)(null),f=(0,n.useRef)(null),[p,m]=(0,n.useState)(!0),[h,g]=(0,n.useState)(null);function _(e){let t=e.target.value;i(t)}(0,n.useEffect)(()=>{let e=e=>{e.key===`Escape`&&(m(!1),d.current?.blur())};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[]),(0,n.useEffect)(()=>{let e=e=>{let t=d?.current;!t||t.contains(e?.target)||f.current?.contains(e.target)||m(!1)};return document.addEventListener(`click`,e,!0),document.addEventListener(`touchstart`,e,!0),()=>{document.removeEventListener(`click`,e,!0),document.removeEventListener(`touchstart`,e,!0)}},[d]);let v=p&&r&&r.length>0,y=v?(0,N.default)(`rounded-t-3xl border-b`,c===J.Outlined?`[&:not(.dark_*,.names_*)]:border-b-transparent`:`border-b-transparent`):c===J.Outlined?`rounded-3xl border-b`:`rounded-full`,b=ti[c],x=ei[c],S=ni[c],C=e=>{a?.(e),i(``),m(!1),g(null),d.current?.blur()};return(0,t.jsxs)(`div`,{className:`relative w-full`,children:[(0,t.jsxs)(`div`,{className:(0,N.default)(`search-text-color flex items-center overflow-hidden px-md py-sm [&_svg]:h-6 [&_svg]:w-6`,y,b),children:[(0,t.jsx)(`input`,{ref:d,type:`text`,value:e,onChange:_,onKeyDown:e=>{r&&r?.length>0&&(e.key===`ArrowDown`?(e.preventDefault(),g(e=>e===null||e>=r.length-1?0:e+1)):e.key===`ArrowUp`?(e.preventDefault(),g(e=>e===null||e<=0?r.length-1:e-1)):e.key===`Enter`&&(e.preventDefault(),h!==null&&r[h]?C(r[h]):r.length===1&&C(r[0])))},onFocus:()=>m(!0),placeholder:o,className:(0,N.default)(`search-placeholder-color w-full flex-1 outline-none`,x),role:`combobox`,"aria-expanded":v,"aria-haspopup":`listbox`,"aria-autocomplete":`list`,...u}),(0,t.jsx)(Xe,{})]}),v&&l&&(0,t.jsxs)(`div`,{ref:f,className:(0,N.default)(`absolute left-0 top-full flex w-full flex-col items-center overflow-hidden`,S),role:`listbox`,children:[(0,t.jsx)(_t,{width:`w-11/12`}),s?(0,t.jsx)(`div`,{className:`px-md py-sm`,children:(0,t.jsx)(V,{className:`animate-spin`})}):r.map((e,n)=>(0,t.jsx)(`div`,{onClick:()=>C(e),onMouseEnter:()=>g(n),className:(0,N.default)(`w-full cursor-pointer px-md py-sm`,h===n?`search-selected-index-bg-color`:``),role:`option`,"aria-selected":h===n,"aria-label":e.label,children:l(e,n)},e.id))]})]})}var ii=function(e){return e.Default=`default`,e.Outlined=`outlined`,e.Filled=`filled`,e}({}),ai=function(e){return e.Placeholder=`placeholder`,e.BgSolid=`bg-solid`,e.BgWhite=`bg-white`,e.BgTransparent=`bg-transparent`,e}({}),oi=function(e){return e.Rounded=`rounded`,e.SquareRounded=`square-rounded`,e}({}),si=function(e){return e.Link=`link`,e.SupportingText=`supporting-text`,e.Button=`button`,e}({}),ci=`cursor-default opacity-40`,li=`h-10 w-10`,ui={[oi.SquareRounded]:`${li} rounded-md`,[oi.Rounded]:`${li} rounded-full`},di={[ai.Placeholder]:``,[ai.BgSolid]:`card-image-bg-solid`,[ai.BgWhite]:`card-image-bg-white`,[ai.BgTransparent]:``},fi={[ii.Default]:`border border-transparent`,[ii.Outlined]:`border border-shader-neutral-light-8 dark:border-shader-primary-dark-8 p-xs`,[ii.Filled]:`border border-transparent card-filled-bg p-xs`};function pi({isDisabled:e=!1,type:n=ii.Default,isHoverable:r,onClick:i,children:a,testId:o,...s}){function c(){e||i?.()}let l=!e&&i;return(0,t.jsx)(`div`,{onClick:c,role:l?`button`:void 0,className:(0,N.default)(`relative inline-flex w-full items-center gap-3 rounded-xl px-sm py-xs`,fi[n],{"state-layer":r||l,[ci]:e,"cursor-pointer":i}),"data-testid":o,...s,children:a})}function mi({type:e,onClick:n,subtitle:r,title:i,icon:a,iconAfterText:o,buttonType:s,buttonDisabled:c}){function l(e){n&&(e.stopPropagation(),n())}return e===si.Link?(0,t.jsx)(`div`,{onClick:l,className:`card-action-link-color shrink-0 [&_svg]:h-5 [&_svg]:w-5`,children:a||(0,t.jsx)(Pe,{})}):e===si.SupportingText?(0,t.jsxs)(`div`,{className:`shrink-0 text-right`,children:[i&&(0,t.jsx)(`div`,{className:`card-action-title-color font-inter text-label-md`,children:i}),r&&(0,t.jsx)(`div`,{className:`card-action-subtitle-color font-inter text-label-sm`,children:r})]}):e===si.Button?(0,t.jsx)(`div`,{className:`shrink-0`,children:(0,t.jsx)(R,{type:s||F.Outlined,size:P.Small,text:i,onClick:l,icon:a,iconAfterText:o,disabled:c})}):null}function hi({variant:e=oi.Rounded}){return e===oi.Rounded?(0,t.jsx)(gi,{}):(0,t.jsx)(_i,{})}function gi(){return(0,t.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`40`,height:`40`,viewBox:`0 0 40 40`,fill:`none`,children:[(0,t.jsxs)(`g`,{"clip-path":`url(#clip0_880_55185)`,children:[(0,t.jsx)(`path`,{d:`M0 20C0 8.95431 8.95431 0 20 0C31.0457 0 40 8.95431 40 20C40 31.0457 31.0457 40 20 40C8.95431 40 0 31.0457 0 20Z`,fill:`#5B9CFE`}),(0,t.jsx)(`path`,{d:`M0 20C0 8.95431 8.95431 0 20 0C31.0457 0 40 8.95431 40 20C40 31.0457 31.0457 40 20 40C8.95431 40 0 31.0457 0 20Z`,fill:`url(#paint0_linear_880_55185)`,"fill-opacity":`0.2`}),(0,t.jsx)(`path`,{d:`M0 20C0 8.95431 8.95431 0 20 0C31.0457 0 40 8.95431 40 20C40 31.0457 31.0457 40 20 40C8.95431 40 0 31.0457 0 20Z`,fill:`url(#paint1_linear_880_55185)`,"fill-opacity":`0.2`}),(0,t.jsx)(`path`,{d:`M0.5 20C0.5 9.23045 9.23045 0.5 20 0.5C30.7696 0.5 39.5 9.23045 39.5 20C39.5 30.7696 30.7696 39.5 20 39.5C9.23045 39.5 0.5 30.7696 0.5 20Z`,stroke:`#002F6D`,"stroke-opacity":`0.08`})]}),(0,t.jsxs)(`defs`,{children:[(0,t.jsxs)(`linearGradient`,{id:`paint0_linear_880_55185`,x1:`20`,y1:`0`,x2:`29.5238`,y2:`22.381`,gradientUnits:`userSpaceOnUse`,children:[(0,t.jsx)(`stop`,{offset:`0.990135`,"stop-opacity":`0`}),(0,t.jsx)(`stop`,{offset:`1`})]}),(0,t.jsxs)(`linearGradient`,{id:`paint1_linear_880_55185`,x1:`20`,y1:`0`,x2:`11.4286`,y2:`9.04762`,gradientUnits:`userSpaceOnUse`,children:[(0,t.jsx)(`stop`,{offset:`0.9999`,"stop-opacity":`0`}),(0,t.jsx)(`stop`,{offset:`1`})]}),(0,t.jsx)(`clipPath`,{id:`clip0_880_55185`,children:(0,t.jsx)(`path`,{d:`M0 20C0 8.95431 8.95431 0 20 0C31.0457 0 40 8.95431 40 20C40 31.0457 31.0457 40 20 40C8.95431 40 0 31.0457 0 20Z`,fill:`white`})})]})]})}function _i(){return(0,t.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`40`,height:`40`,viewBox:`0 0 40 40`,fill:`none`,children:[(0,t.jsxs)(`g`,{"clip-path":`url(#clip0_880_55190)`,children:[(0,t.jsx)(`path`,{d:`M0 8C0 3.58172 3.58172 0 8 0H32C36.4183 0 40 3.58172 40 8V32C40 36.4183 36.4183 40 32 40H8C3.58172 40 0 36.4183 0 32V8Z`,fill:`#5B9CFE`}),(0,t.jsx)(`path`,{d:`M0 8C0 3.58172 3.58172 0 8 0H32C36.4183 0 40 3.58172 40 8V32C40 36.4183 36.4183 40 32 40H8C3.58172 40 0 36.4183 0 32V8Z`,fill:`url(#paint0_linear_880_55190)`,"fill-opacity":`0.2`}),(0,t.jsx)(`path`,{d:`M0 8C0 3.58172 3.58172 0 8 0H32C36.4183 0 40 3.58172 40 8V32C40 36.4183 36.4183 40 32 40H8C3.58172 40 0 36.4183 0 32V8Z`,fill:`url(#paint1_linear_880_55190)`,"fill-opacity":`0.2`}),(0,t.jsx)(`path`,{d:`M0.5 8C0.5 3.85786 3.85786 0.5 8 0.5H32C36.1421 0.5 39.5 3.85786 39.5 8V32C39.5 36.1421 36.1421 39.5 32 39.5H8C3.85786 39.5 0.5 36.1421 0.5 32V8Z`,stroke:`#002F6D`,"stroke-opacity":`0.08`})]}),(0,t.jsxs)(`defs`,{children:[(0,t.jsxs)(`linearGradient`,{id:`paint0_linear_880_55190`,x1:`20`,y1:`0`,x2:`29.5238`,y2:`22.381`,gradientUnits:`userSpaceOnUse`,children:[(0,t.jsx)(`stop`,{offset:`0.990135`,"stop-opacity":`0`}),(0,t.jsx)(`stop`,{offset:`1`})]}),(0,t.jsxs)(`linearGradient`,{id:`paint1_linear_880_55190`,x1:`20`,y1:`0`,x2:`11.4286`,y2:`9.04762`,gradientUnits:`userSpaceOnUse`,children:[(0,t.jsx)(`stop`,{offset:`0.9999`,"stop-opacity":`0`}),(0,t.jsx)(`stop`,{offset:`1`})]}),(0,t.jsx)(`clipPath`,{id:`clip0_880_55190`,children:(0,t.jsx)(`path`,{d:`M0 8C0 3.58172 3.58172 0 8 0H32C36.4183 0 40 3.58172 40 8V32C40 36.4183 36.4183 40 32 40H8C3.58172 40 0 36.4183 0 32V8Z`,fill:`white`})})]})]})}function vi({type:e=ai.BgSolid,shape:n=oi.Rounded,url:r,children:i}){return(0,t.jsxs)(`div`,{className:(0,N.default)(ui[n],di[e],`flex shrink-0 items-center justify-center overflow-hidden`),children:[e===ai.Placeholder&&!i&&(0,t.jsx)(hi,{variant:n}),r&&!i&&(0,t.jsx)(`img`,{src:r,className:(0,N.default)(ui[n],`object-cover`),alt:`Card Image`}),i]})}function yi({title:e,subtitle:n,clickableAction:r,icon:i,isTextTruncated:a,tooltipText:o,tooltipPosition:s}){return(0,t.jsxs)(`div`,{className:(0,N.default)(`flex w-full flex-col`,{truncate:a}),children:[(0,t.jsxs)(`div`,{className:(0,N.default)(`flex flex-row items-center gap-x-xxs`,{"grow-1":a}),children:[(0,t.jsx)(`div`,{className:(0,N.default)(`card-body-title-color text-start font-inter text-title-md`,{truncate:a}),children:e}),o?(0,t.jsx)(bt,{text:o,position:s,children:i}):(0,t.jsx)(`div`,{className:`flex items-center`,children:i}),r&&(0,t.jsx)(`div`,{onClick:e=>{e?.stopPropagation()},className:`flex items-center`,children:r})]}),n&&(0,t.jsx)(`div`,{className:(0,N.default)(`card-body-subtitle-color text-start font-inter text-body-md`,{truncate:a}),children:n})]})}var bi=function(e){return e.Default=`default`,e.Highlight=`highlight`,e.Secondary=`secondary`,e}({}),Y=function(e){return e.Default=`default`,e.Large=`large`,e}({}),xi={[bi.Default]:`display-stats-bg-default`,[bi.Highlight]:`display-stats-bg-highlight`,[bi.Secondary]:`display-stats-bg-secondary`},Si={[bi.Default]:`display-stats-text-default`,[bi.Highlight]:`display-stats-text-highlight`,[bi.Secondary]:`display-stats-text-secondary`},Ci={[Y.Default]:`gap-y-sm`,[Y.Large]:`gap-y-md`},wi={[Y.Default]:`text-title-md`,[Y.Large]:`text-headline-sm`},Ti={[Y.Default]:`text-label-md`,[Y.Large]:`text-label-lg`},Ei={[Y.Default]:`text-label-sm`,[Y.Large]:`text-label-md`};function Di({label:e,tooltipPosition:n,tooltipText:r,value:i,supportingLabel:a,type:o=bi.Default,size:s=Y.Default,icon:c,copyText:l,onCopySuccess:u,onCopyError:d}){let f=xi[o],p=Ci[s],m=Si[o],h=wi[s],g=Ei[s],_=Ti[s];async function v(e){if(navigator.clipboard&&l)try{await navigator.clipboard.writeText(l),u?.(e,l)}catch(e){console.error(`Failed to copy:`,e),d?.(e,l)}}return(0,t.jsxs)(`div`,{className:(0,N.default)(`flex h-full w-full flex-col justify-between rounded-2xl p-md--rs`,f,p,m),children:[(0,t.jsxs)(`div`,{className:(0,N.default)(`flex flex-row items-center`,{"w-full justify-between":c}),children:[(0,t.jsxs)(`div`,{className:`flex flex-row items-center gap-xxs`,children:[(0,t.jsx)(`span`,{className:(0,N.default)(g,`whitespace-pre-line`),children:e}),r&&(0,t.jsx)(bt,{text:r,position:n,children:(0,t.jsx)(Ue,{className:`opacity-40`})})]}),c&&(0,t.jsx)(`span`,{className:`display-stats-icon-color`,children:c})]}),(0,t.jsxs)(`div`,{className:`flex w-full flex-row items-baseline gap-xxs`,children:[(0,t.jsx)(`span`,{className:(0,N.default)(`break-all`,h),children:i}),a&&(0,t.jsx)(`span`,{className:(0,N.default)(`opacity-40`,_),children:a}),l&&(0,t.jsx)(`div`,{className:`self-center`,children:(0,t.jsx)(z,{onClick:v,"aria-label":`Copy to clipboard`,children:(0,t.jsx)(B,{className:`display-stats-copy-icon-color`})})})]})]})}function Oi({onIconClick:e,onClick:n,icon:r=(0,t.jsx)(Ke,{}),assetTitle:i,isHoverable:a=!0,...o}){let s=t=>{e?.(t),t?.stopPropagation()},c=!(`src`in o);return(0,t.jsxs)(`div`,{className:(0,N.default)(`relative aspect-square w-full overflow-hidden rounded-xl`,{"group cursor-pointer":a}),onClick:n,children:[!c&&(0,t.jsx)(on,{...o}),c&&o.renderAsset,a&&(0,t.jsx)(`div`,{className:`absolute left-0 top-0 h-full w-full bg-cover bg-center bg-no-repeat group-hover:bg-shader-neutral-light-48 group-hover:transition group-hover:duration-300 group-hover:ease-in-out group-hover:names:bg-shader-inverted-light-48 group-hover:dark:bg-shader-primary-dark-48`}),a&&e&&(0,t.jsx)(z,{className:`visual-asset-icon-color absolute right-2 top-2 z-10 h-9 w-9 cursor-pointer rounded-full p-xs opacity-0 transition-opacity duration-300 group-hover:bg-shader-neutral-light-72 group-hover:opacity-100 [&_svg]:h-5 [&_svg]:w-5`,onClick:s,"aria-label":`More options`,children:r}),a&&i&&(0,t.jsx)(`div`,{className:`absolute bottom-0 w-full p-xs opacity-0 transition-opacity duration-300 group-hover:opacity-100`,children:(0,t.jsx)(`span`,{className:`visual-asset-title-color break-words text-title-md`,children:i})})]})}var ki=`date-picker-trigger-border-color focus-visible:enabled:date-picker-trigger-border-focus-color hover:enabled:date-picker-trigger-border-hover-color group-[.errored]:date-picker-trigger-border-error-color flex w-full flex-row items-center gap-x-3 rounded-lg border px-md py-sm disabled:cursor-not-allowed [&_svg]:h-5 [&_svg]:w-5`,Ai=function(e){return e.DayMonthYear=`DD/MM/YYYY`,e.MonthDayYear=`MM/DD/YYYY`,e.YearMonthDay=`YYYY/MM/DD`,e}({}),ji=[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],Mi=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`];function Ni(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function X(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function Pi(e,t,n){let r=X(e);return!!(t&&r<X(t)||n&&r>X(n))}function Fi(e,t,n){return!!(t&&new Date(e,11,31)<X(t)||n&&new Date(e,0,1)>X(n))}function Ii(e,t){let n=String(e.getFullYear()),r=String(e.getMonth()+1).padStart(2,`0`),i=String(e.getDate()).padStart(2,`0`);switch(t){case Ai.DayMonthYear:return`${i}/${r}/${n}`;case Ai.MonthDayYear:return`${r}/${i}/${n}`;case Ai.YearMonthDay:return`${n}/${r}/${i}`;default:return`${i}/${r}/${n}`}}function Li(e,t){let n=new Date(e,t,1).getDay(),r=[];for(let i=-n;i<42-n;i++)r.push(new Date(e,t,1+i));return r}function Ri(e){return Math.floor(e/10)*10}function zi({value:e,onChange:r,minDate:i,maxDate:a,dateFormat:o=Ai.DayMonthYear,label:s,caption:c,errorMessage:l,disabled:u,placeholder:d=`Select a date`}){let f=X(new Date),[p,m]=(0,n.useState)(!1),[h,g]=(0,n.useState)(`days`),[_,v]=(0,n.useState)(()=>e?.getFullYear()??f.getFullYear()),[y,b]=(0,n.useState)(()=>e?.getMonth()??f.getMonth()),x=(0,n.useRef)(null);(0,n.useEffect)(()=>{e&&(v(e.getFullYear()),b(e.getMonth()))},[e]),(0,n.useEffect)(()=>{p||g(`days`)},[p]),(0,n.useEffect)(()=>{if(!p)return;function e(e){x.current&&!x.current.contains(e.target)&&m(!1)}return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[p]),(0,n.useEffect)(()=>{if(!p)return;function e(e){e.key===`Escape`&&m(!1)}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[p]);function S(){u||m(e=>!e)}function C(){y===0?(b(11),v(e=>e-1)):b(e=>e-1)}function w(){y===11?(b(0),v(e=>e+1)):b(e=>e+1)}function T(){v(e=>e-10)}function E(){v(e=>e+10)}function D(){v(e=>Ri(e)-10)}function ee(){v(e=>Ri(e)+10)}function O(e){v(e),g(`days`)}function te(e){Pi(e,i,a)||(r?.(e),m(!1))}let ne=Li(_,y),k=Ri(_),re=Array.from({length:12},(e,t)=>k+t),ie=!i||new Date(_-10,y+1,0)>=X(i),ae=!i||new Date(_,y,0)>=X(i),oe=!a||new Date(_,y+1,1)<=X(a),se=!a||new Date(_+10,y,1)<=X(a),ce=!i||new Date(k-1,11,31)>=X(i),A=!a||new Date(k+12,0,1)<=X(a);return(0,t.jsx)(Nn,{label:s,caption:c,disabled:u,errorMessage:l,labelHtmlTag:Mn.Div,children:(0,t.jsxs)(`div`,{className:`relative w-full`,ref:x,children:[(0,t.jsxs)(z,{onClick:S,disabled:u,"aria-expanded":p,"aria-haspopup":`dialog`,"aria-label":e?Ii(e,o):d,className:(0,N.default)(ki,{"date-picker-trigger-border-focus-color":p}),children:[(0,t.jsx)(`span`,{className:(0,N.default)(`block w-full text-start text-body-lg`,{"date-picker-trigger-placeholder-color":!e,"date-picker-trigger-text-color":!!e}),children:e?Ii(e,o):d}),(0,t.jsx)(`span`,{className:`input-icon-color flex-shrink-0`,children:(0,t.jsx)(Ie,{})})]}),p&&(0,t.jsx)(`div`,{role:`dialog`,"aria-label":`Date picker calendar`,className:(0,N.default)(`date-picker-calendar-bg date-picker-calendar-border-color absolute z-50 mt-1 rounded-lg border p-3 shadow-lg`,`w-[280px]`),children:h===`days`?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(`div`,{className:`mb-1 flex items-center justify-between`,children:[(0,t.jsx)(z,{onClick:T,disabled:!ie,"aria-label":`Previous 10 years`,className:`date-picker-nav-icon-color enabled:hover:date-picker-nav-bg-hover flex h-8 w-8 items-center justify-center rounded-full transition-colors hover:delay-75 disabled:cursor-not-allowed disabled:opacity-40 [&_svg]:h-4 [&_svg]:w-4`,children:(0,t.jsx)(Ve,{})}),(0,t.jsxs)(`div`,{className:`flex flex-1 items-center justify-between px-1`,children:[(0,t.jsx)(z,{onClick:C,disabled:!ae,"aria-label":`Previous month`,className:`date-picker-nav-icon-color enabled:hover:date-picker-nav-bg-hover flex h-8 w-8 items-center justify-center rounded-full transition-colors hover:delay-75 disabled:cursor-not-allowed disabled:opacity-40 [&_svg]:h-4 [&_svg]:w-4`,children:(0,t.jsx)(Ne,{})}),(0,t.jsxs)(z,{onClick:()=>g(`years`),"aria-label":`Select year`,className:`date-picker-header-text-color enabled:hover:date-picker-nav-bg-hover rounded-md px-1 py-0.5 text-label-lg font-semibold transition-colors hover:delay-75 shrink-0`,children:[Mi[y],` `,_]}),(0,t.jsx)(z,{onClick:w,disabled:!oe,"aria-label":`Next month`,className:`date-picker-nav-icon-color enabled:hover:date-picker-nav-bg-hover flex h-8 w-8 items-center justify-center rounded-full transition-colors hover:delay-75 disabled:cursor-not-allowed disabled:opacity-40 [&_svg]:h-4 [&_svg]:w-4`,children:(0,t.jsx)(Pe,{})})]}),(0,t.jsx)(z,{onClick:E,disabled:!se,"aria-label":`Next 10 years`,className:`date-picker-nav-icon-color enabled:hover:date-picker-nav-bg-hover flex h-8 w-8 items-center justify-center rounded-full transition-colors hover:delay-75 disabled:cursor-not-allowed disabled:opacity-40 [&_svg]:h-4 [&_svg]:w-4`,children:(0,t.jsx)(He,{})})]}),(0,t.jsx)(`div`,{className:`mb-1 grid grid-cols-7`,children:ji.map(e=>(0,t.jsx)(`div`,{className:`date-picker-weekday-text-color flex h-8 w-8 items-center justify-center text-label-sm font-medium`,children:e},e))}),(0,t.jsx)(`div`,{className:`grid grid-cols-7`,children:ne.map((n,r)=>{let o=n.getMonth()===y,s=!!e&&Ni(n,e),c=Ni(n,f),l=Pi(n,i,a),u=!o;return(0,t.jsx)(`div`,{className:`flex items-center justify-center p-0.5`,children:(0,t.jsx)(z,{onClick:()=>te(n),disabled:l||u,"aria-label":Ii(n,Ai.DayMonthYear),"aria-selected":s,"aria-disabled":l||u,className:(0,N.default)(`date-picker-day-text-color flex h-8 w-8 items-center justify-center rounded-full text-body-md transition-colors hover:delay-75`,{"date-picker-day-bg-selected date-picker-day-text-selected cursor-pointer":s,"date-picker-day-today-ring font-semibold":c&&!s,"date-picker-day-text-disabled cursor-not-allowed opacity-40":l&&!u,"date-picker-day-text-outside-month cursor-default opacity-30":u,"enabled:hover:date-picker-day-bg-hover enabled:hover:date-picker-day-text-color-hover cursor-pointer":!s&&!l&&!u}),children:n.getDate()})},r)})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[(0,t.jsx)(z,{onClick:D,disabled:!ce,"aria-label":`Previous decade`,className:`date-picker-nav-icon-color enabled:hover:date-picker-nav-bg-hover flex h-8 w-8 items-center justify-center rounded-full transition-colors hover:delay-75 disabled:cursor-not-allowed disabled:opacity-40 [&_svg]:h-4 [&_svg]:w-4`,children:(0,t.jsx)(Ve,{})}),(0,t.jsxs)(`span`,{className:`date-picker-header-text-color text-label-lg font-semibold`,children:[k,` – `,k+12-1]}),(0,t.jsx)(z,{onClick:ee,disabled:!A,"aria-label":`Next decade`,className:`date-picker-nav-icon-color enabled:hover:date-picker-nav-bg-hover flex h-8 w-8 items-center justify-center rounded-full transition-colors hover:delay-75 disabled:cursor-not-allowed disabled:opacity-40 [&_svg]:h-4 [&_svg]:w-4`,children:(0,t.jsx)(He,{})})]}),(0,t.jsx)(`div`,{className:`grid grid-cols-3 gap-1`,children:re.map(n=>{let r=e?.getFullYear()===n,o=f.getFullYear()===n,s=Fi(n,i,a);return(0,t.jsx)(z,{onClick:()=>O(n),disabled:s,"aria-label":String(n),"aria-selected":r,className:(0,N.default)(`date-picker-day-text-color flex w-full items-center justify-center rounded-lg py-2 text-body-md transition-colors hover:delay-75`,{"date-picker-day-bg-selected date-picker-day-text-selected cursor-pointer":r,"date-picker-day-today-ring font-semibold":o&&!r,"date-picker-day-text-disabled cursor-not-allowed opacity-40":s,"enabled:hover:date-picker-day-bg-hover enabled:hover:date-picker-day-text-color-hover cursor-pointer":!r&&!s}),children:n},n)})})]})})]})})}function Bi(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Vi(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function Hi(...e){return t=>e.forEach(e=>Vi(e,t))}function Ui(...e){return p.useCallback(Hi(...e),e)}function Wi(e,n){let r=p.createContext(n);function i(e){let{children:n,...i}=e,a=p.useMemo(()=>i,Object.values(i));return(0,t.jsx)(r.Provider,{value:a,children:n})}function a(t){let i=p.useContext(r);if(i)return i;if(n!==void 0)return n;throw Error(`\`${t}\` must be used within \`${e}\``)}return i.displayName=e+`Provider`,[i,a]}function Gi(e,n=[]){let r=[];function i(n,i){let a=p.createContext(i),o=r.length;r=[...r,i];function s(n){let{scope:r,children:i,...s}=n,c=r?.[e][o]||a,l=p.useMemo(()=>s,Object.values(s));return(0,t.jsx)(c.Provider,{value:l,children:i})}function c(t,r){let s=r?.[e][o]||a,c=p.useContext(s);if(c)return c;if(i!==void 0)return i;throw Error(`\`${t}\` must be used within \`${n}\``)}return s.displayName=n+`Provider`,[s,c]}let a=()=>{let t=r.map(e=>p.createContext(e));return function(n){let r=n?.[e]||t;return p.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return a.scopeName=e,[i,Ki(a,...n)]}function Ki(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var qi=globalThis?.document?p.useLayoutEffect:()=>{},Ji=p.useId||(()=>void 0),Yi=0;function Xi(e){let[t,n]=p.useState(Ji());return qi(()=>{e||n(e=>e??String(Yi++))},[e]),e||(t?`radix-${t}`:``)}function Zi(e){let t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...e)=>t.current?.(...e),[])}function Qi({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,i]=$i({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=Zi(n);return[o,p.useCallback(t=>{if(a){let n=typeof t==`function`?t(e):t;n!==e&&s(n)}else i(t)},[a,e,i,s])]}function $i({defaultProp:e,onChange:t}){let n=p.useState(e),[r]=n,i=p.useRef(r),a=Zi(t);return p.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var ea=p.forwardRef((e,n)=>{let{children:r,...i}=e,a=p.Children.toArray(r),o=a.find(ra);if(o){let e=o.props.children,r=a.map(t=>t===o?p.Children.count(e)>1?p.Children.only(null):p.isValidElement(e)?e.props.children:null:t);return(0,t.jsx)(ta,{...i,ref:n,children:p.isValidElement(e)?p.cloneElement(e,void 0,r):null})}return(0,t.jsx)(ta,{...i,ref:n,children:r})});ea.displayName=`Slot`;var ta=p.forwardRef((e,t)=>{let{children:n,...r}=e;if(p.isValidElement(n)){let e=aa(n);return p.cloneElement(n,{...ia(r,n.props),ref:t?Hi(t,e):e})}return p.Children.count(n)>1?p.Children.only(null):null});ta.displayName=`SlotClone`;var na=({children:e})=>(0,t.jsx)(t.Fragment,{children:e});function ra(e){return p.isValidElement(e)&&e.type===na}function ia(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{a(...e),i(...e)}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function aa(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Z=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`span`,`svg`,`ul`].reduce((e,n)=>{let r=p.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?ea:n;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,t.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${n}`,{...e,[n]:r}},{});function oa(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}function sa(e,t=globalThis?.document){let n=Zi(e);p.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var ca=`DismissableLayer`,la=`dismissableLayer.update`,ua=`dismissableLayer.pointerDownOutside`,da=`dismissableLayer.focusOutside`,fa,pa=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ma=p.forwardRef((e,n)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=p.useContext(pa),[d,f]=p.useState(null),m=d?.ownerDocument??globalThis?.document,[,h]=p.useState({}),g=Ui(n,e=>f(e)),_=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=_.indexOf(v),b=d?_.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=_a(e=>{let t=e.target,n=[...u.branches].some(e=>e.contains(t));!S||n||(a?.(e),s?.(e),e.defaultPrevented||c?.())},m),w=va(e=>{let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},m);return sa(e=>{b===u.layers.size-1&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))},m),p.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(fa=m.body.style.pointerEvents,m.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ya(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=fa)}},[d,m,r,u]),p.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ya())},[d,u]),p.useEffect(()=>{let e=()=>h({});return document.addEventListener(la,e),()=>document.removeEventListener(la,e)},[]),(0,t.jsx)(Z.div,{...l,ref:g,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:Bi(e.onFocusCapture,w.onFocusCapture),onBlurCapture:Bi(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Bi(e.onPointerDownCapture,C.onPointerDownCapture)})});ma.displayName=ca;var ha=`DismissableLayerBranch`,ga=p.forwardRef((e,n)=>{let r=p.useContext(pa),i=p.useRef(null),a=Ui(n,i);return p.useEffect(()=>{let e=i.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,t.jsx)(Z.div,{...e,ref:a})});ga.displayName=ha;function _a(e,t=globalThis?.document){let n=Zi(e),r=p.useRef(!1),i=p.useRef(()=>{});return p.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){ba(ua,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function va(e,t=globalThis?.document){let n=Zi(e),r=p.useRef(!1);return p.useEffect(()=>{let e=e=>{e.target&&!r.current&&ba(da,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ya(){let e=new CustomEvent(la);document.dispatchEvent(e)}function ba(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?oa(i,a):i.dispatchEvent(a)}var xa=`focusScope.autoFocusOnMount`,Sa=`focusScope.autoFocusOnUnmount`,Ca={bubbles:!1,cancelable:!0},wa=`FocusScope`,Ta=p.forwardRef((e,n)=>{let{loop:r=!1,trapped:i=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[c,l]=p.useState(null),u=Zi(a),d=Zi(o),f=p.useRef(null),m=Ui(n,e=>l(e)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(i){let e=function(e){if(h.paused||!c)return;let t=e.target;c.contains(t)?f.current=t:Ma(f.current,{select:!0})},t=function(e){if(h.paused||!c)return;let t=e.relatedTarget;t!==null&&(c.contains(t)||Ma(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Ma(c)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[i,c,h.paused]),p.useEffect(()=>{if(c){Na.add(h);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(xa,Ca);c.addEventListener(xa,u),c.dispatchEvent(t),t.defaultPrevented||(Ea(Ia(Oa(c)),{select:!0}),document.activeElement===e&&Ma(c))}return()=>{c.removeEventListener(xa,u),setTimeout(()=>{let t=new CustomEvent(Sa,Ca);c.addEventListener(Sa,d),c.dispatchEvent(t),t.defaultPrevented||Ma(e??document.body,{select:!0}),c.removeEventListener(Sa,d),Na.remove(h)},0)}}},[c,u,d,h]);let g=p.useCallback(e=>{if(!r&&!i||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){let t=e.currentTarget,[i,a]=Da(t);i&&a?!e.shiftKey&&n===a?(e.preventDefault(),r&&Ma(i,{select:!0})):e.shiftKey&&n===i&&(e.preventDefault(),r&&Ma(a,{select:!0})):n===t&&e.preventDefault()}},[r,i,h.paused]);return(0,t.jsx)(Z.div,{tabIndex:-1,...s,ref:m,onKeyDown:g})});Ta.displayName=wa;function Ea(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Ma(r,{select:t}),document.activeElement!==n)return}function Da(e){let t=Oa(e);return[ka(t,e),ka(t.reverse(),e)]}function Oa(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ka(e,t){for(let n of e)if(!Aa(n,{upTo:t}))return n}function Aa(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function ja(e){return e instanceof HTMLInputElement&&`select`in e}function Ma(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ja(e)&&t&&e.select()}}var Na=Pa();function Pa(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Fa(e,t),e.unshift(t)},remove(t){e=Fa(e,t),e[0]?.resume()}}}function Fa(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ia(e){return e.filter(e=>e.tagName!==`A`)}var La=`Portal`,Ra=p.forwardRef((e,n)=>{let{container:i,...a}=e,[o,s]=p.useState(!1);qi(()=>s(!0),[]);let c=i||o&&globalThis?.document?.body;return c?r.default.createPortal((0,t.jsx)(Z.div,{...a,ref:n}),c):null});Ra.displayName=La;function za(e,t){return p.useReducer((e,n)=>t[e][n]??e,e)}var Ba=e=>{let{present:t,children:n}=e,r=Va(t),i=typeof n==`function`?n({present:r.isPresent}):p.Children.only(n),a=Ui(r.ref,Ua(i));return typeof n==`function`||r.isPresent?p.cloneElement(i,{ref:a}):null};Ba.displayName=`Presence`;function Va(e){let[t,n]=p.useState(),i=p.useRef({}),a=p.useRef(e),o=p.useRef(`none`),[s,c]=za(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return p.useEffect(()=>{let e=Ha(i.current);o.current=s===`mounted`?e:`none`},[s]),qi(()=>{let t=i.current,n=a.current;if(n!==e){let r=o.current,i=Ha(t);e?c(`MOUNT`):i===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),a.current=e}},[e,c]),qi(()=>{if(t){let e=e=>{let n=Ha(i.current).includes(e.animationName);e.target===t&&n&&r.flushSync(()=>c(`ANIMATION_END`))},n=e=>{e.target===t&&(o.current=Ha(i.current))};return t.addEventListener(`animationstart`,n),t.addEventListener(`animationcancel`,e),t.addEventListener(`animationend`,e),()=>{t.removeEventListener(`animationstart`,n),t.removeEventListener(`animationcancel`,e),t.removeEventListener(`animationend`,e)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:p.useCallback(e=>{e&&(i.current=getComputedStyle(e)),n(e)},[])}}function Ha(e){return e?.animationName||`none`}function Ua(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Wa=0;function Ga(){p.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Ka()),document.body.insertAdjacentElement(`beforeend`,e[1]??Ka()),Wa++,()=>{Wa===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Wa--}},[])}function Ka(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.cssText=`outline: none; opacity: 0; position: fixed; pointer-events: none`,e}var Q=function(){return Q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Q.apply(this,arguments)};function qa(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Ja(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Ya=`right-scroll-bar-position`,Xa=`width-before-scroll-bar`,Za=`with-scroll-bars-hidden`,Qa=`--removed-body-scroll-bar-size`;function $a(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function eo(e,t){var r=(0,n.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(e){var t=r.value;t!==e&&(r.value=e,r.callback(e,t))}}}})[0];return r.callback=t,r.facade}var to=typeof window<`u`?n.useLayoutEffect:n.useEffect,no=new WeakMap;function ro(e,t){var n=eo(t||null,function(t){return e.forEach(function(e){return $a(e,t)})});return to(function(){var t=no.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||$a(e,null)}),i.forEach(function(e){r.has(e)||$a(e,a)})}no.set(n,e)},[e]),n}function io(e){return e}function ao(e,t){t===void 0&&(t=io);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function oo(e){e===void 0&&(e={});var t=ao(null);return t.options=Q({async:!0,ssr:!1},e),t}var so=function(e){var t=e.sideCar,r=qa(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw Error(`Sidecar medium not found`);return n.createElement(i,Q({},r))};so.isSideCarExport=!0;function co(e,t){return e.useMedium(t),so}var lo=oo(),uo=function(){},fo=n.forwardRef(function(e,t){var r=n.useRef(null),i=n.useState({onScrollCapture:uo,onWheelCapture:uo,onTouchMoveCapture:uo}),a=i[0],o=i[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=qa(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=p,S=ro([r,t]),C=Q(Q({},b),a);return n.createElement(n.Fragment,null,d&&n.createElement(x,{sideCar:lo,removeScrollBar:u,shards:f,noIsolation:m,inert:h,setCallbacks:o,allowPinchZoom:!!g,lockRef:r,gapMode:y}),s?n.cloneElement(n.Children.only(c),Q(Q({},C),{ref:S})):n.createElement(v,Q({},C,{className:l,ref:S}),c))});fo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},fo.classNames={fullWidth:Xa,zeroRight:Ya};var po,mo=function(){if(po)return po;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function ho(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=mo();return t&&e.setAttribute(`nonce`,t),e}function go(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _o(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var vo=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ho())&&(go(t,n),_o(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yo=function(){var e=vo();return function(t,r){n.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},bo=function(){var e=yo();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},xo={left:0,top:0,right:0,gap:0},So=function(e){return parseInt(e||``,10)||0},Co=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[So(n),So(r),So(i)]},wo=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return xo;var t=Co(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},To=bo(),Eo=`data-scroll-locked`,Do=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
18
18
|
.${Za} {
|
|
19
19
|
overflow: hidden ${r};
|
|
20
20
|
padding-right: ${s}px ${r};
|