import{Et as e,Jt as a,Qt as r,Xt as n,Zt as i,en as t,jt as d,nn as o,on as l,vt as c,yt as s}from"./630ba094.L_X-5TXi.js";import"./app.BAntcNCf.js";import{Bp as m,EA as g,Gg as y,MO as u,PA as _,QA as f,VA as h,Xp as b,Yp as p,ZA as v,aj as C,ap as k,cp as V,dk as S,dp as L,eA as j,hk as B,hp as P,lp as R,mp as x,oj as N,op as z,pp as W,sk as A,sp as w,tA as I,up as $,vA as D}from"./6ec9a0fa.rdcQt2v8.js";import{n as E}from"./486c3fda.B832TPZj.js";var T={ChoiceWrapper:{block:"_1u2aa6mc",inline:"_1u2aa6md _1u2aa6mb _1u2aa6ma _1fragemk5 _1fragemjl _1fragemkp _1fragemj1 _1fragemyn _1fragemyp _1fragemws _1fragemyd _1fragem12b _1fragem64 _1fragem12x _1fragem12y",grid:"_1u2aa6me _1u2aa6mb _1u2aa6ma _1fragemk5 _1fragemjl _1fragemkp _1fragemj1 _1fragemyn _1fragemyp _1fragemws _1fragemyd _1fragem12b _1fragem64 _1fragem12x _1fragem12y","grid-compact":"_1u2aa6mf _1u2aa6mb _1u2aa6ma _1fragemk5 _1fragemjl _1fragemkp _1fragemj1 _1fragemyn _1fragemyp _1fragemws _1fragemyd _1fragem12b _1fragem64 _1fragem12x _1fragem12y",list:"_1u2aa6mg",legacy:"_1u2aa6mh"},choiceListBorderVariant:{none:"_1u2aa6m3",full:"_1u2aa6m4"},blockChoiceWrapperVariant:{segmented:"_1u2aa6mk",separated:"_1u2aa6ml"},segmentedChoice:"_1u2aa6mi",segmentedBlockFooter:"_1u2aa6mj",redesignedBlockWrapper:"_1u2aa6mr _1u2aa6mq _1fragemyn _1fragemws",redesignedSelectedBorder:"_1u2aa6ms",redesignedBrandedSelected:"_1u2aa6mu",kindVariant:{single:"_1u2aa6mm",multiple:"_1u2aa6mn"},stateVariant:{checked:"_1u2aa6mo",unchecked:"_1u2aa6mp"},SecondaryContent:"_1u2aa6mv",SecondaryContentVariant:{grid:"_1u2aa6mx _1u2aa6mw","grid-compact":"_1u2aa6my _1u2aa6mw",inline:"_1u2aa6mz",list:"_1u2aa6m10",legacy:"_1u2aa6m11",block:"_1u2aa6m12"},Icon:"_1u2aa6m13",TertiaryContent:{block:"_1u2aa6m14"},SelectedContent:{block:"_1u2aa6m15",list:"_1u2aa6m16",legacy:"_1u2aa6m17",inline:"_1u2aa6m18",grid:"_1u2aa6m19","grid-compact":"_1u2aa6m1a"},blockSelectedContentBackgroundVariant:{base:"_1u2aa6m1b",selected:"_1u2aa6m1c yyi4nyg yyi4nye _1fragemya _1fragem136"},ListSelectedContentWrapper:"_1u2aa6m1d",selectedContentPadding:"_1u2aa6m1e",blockChoicePadding:"_1u2aa6m1l",ChoiceVariant:{block:"_1u2aa6m1o _1u2aa6m1m _1fragemws _1fragem6t _1fragema0 _1fragem12x",inline:"_1u2aa6m1p _1u2aa6m1n _1fragem87 _1fragema0 _1fragem64 _1fragem73 _1fragembj _1fragem19 _1fragemyp _1fragem127",grid:"_1u2aa6m1q _1u2aa6m1i _1u2aa6m1h _1fragem87 _1fragema0 _1fragempu _1fragemo1 _1fragemtg _1fragemrn _1fragem6t _1fragemyp _1u2aa6m1j","grid-compact":"_1u2aa6m1r _1u2aa6m1i _1u2aa6m1h _1fragem87 _1fragema0 _1fragempu _1fragemo1 _1fragemtg _1fragemrn _1fragem6t _1fragemyp _1u2aa6m1k",list:"_1u2aa6m1s _1u2aa6m1g _1u2aa6m1f _1fragem6t _1fragema0",legacy:"_1u2aa6m1t _1u2aa6m1g _1u2aa6m1f _1fragem6t _1fragema0"},controlRendered:"_1u2aa6m1u",blockChoiceSingleCheckedVariant:{base:"_1u2aa6m1v yyi4nyg yyi4nye _1fragemya _1fragem136",transparent:"_1u2aa6m1w"},Heading:"_1u2aa6m1x",labelDisabled:"_1u2aa6m1y _1fragem11y",labelCentered:"_1u2aa6m20 _1u2aa6m1z _1fragem2d _1fragem64 _1fragema0",maybeDisabled:"_1u2aa6m21",interactive:"_1u2aa6m22 _1fragemyf",colorLayerVariant:{control:"yyi4nyf yyi4nyd _1fragemy8 _1fragem136",controlSelected:"yyi4nyg yyi4nye _1fragemya _1fragem136"},borderSelected:{none:"_1u2aa6m6 _1u2aa6m5",base:"_1u2aa6m7 _1u2aa6m5",large100:"_1u2aa6m8 _1u2aa6m5",large200:"_1u2aa6m9 _1u2aa6m5"}};function q({children:e}){const{spacing:a,border:r,background:n}=L();return s("div",{className:d(T.ChoiceWrapper.block,r&&T.choiceListBorderVariant[r],"none"!==a||"none"===r?T.blockChoiceWrapperVariant.separated:[T.blockChoiceWrapperVariant.segmented,T.segmentedBlockFooter],"base"===n&&T.colorLayerVariant.control),children:e})}var H=l(void 0),F=({background:e,backgroundSelected:a,border:r,borderSelected:n,spacing:i,padding:d,cornerRadius:o,itemPadding:l,selectedContentBackground:c,selectedContentTransitionProperties:m,presentation:g,children:y})=>{const u=t(()=>({background:e,backgroundSelected:a,border:r,borderSelected:n,spacing:i,padding:d,cornerRadius:o,itemPadding:l,selectedContentBackground:c,selectedContentTransitionProperties:m}),[e,a,r,n,i,d,o,l,c,m]),_=s(H.Provider,{value:u,children:y});return void 0===g?_:s(z.Provider,{value:g,children:_})},G={none:"yyi4nyr",full:"yyi4nys"},M={colorLayerVariant:{control:"yyi4nyf yyi4nyd _1fragemy8 _1fragem136",controlSelected:"yyi4nyg yyi4nye _1fragemya _1fragem136"},GridQueryContainer:"yyi4nyc",ChoiceListInternalVariant:{block:"yyi4nyn yyi4nyi yyi4nyh _1fragemxq",inline:"yyi4nyo yyi4nyi yyi4nyh _1fragemxq yyi4nym _1fragem6t",grid:"yyi4nyp yyi4nyk yyi4nyi yyi4nyh _1fragemxq yyi4nyj _1fragem87 _1fragema0 _1fragem6t","grid-compact":"yyi4nyq yyi4nyl yyi4nyk yyi4nyi yyi4nyh _1fragemxq yyi4nyj _1fragem87 _1fragema0 _1fragem6t"},choiceListInternalCornerRadiusVariant:{none:"yyi4nyt"},choiceListInternalBorderStyleVariant:{base:"yyi4nyu",dotted:"yyi4nyv"},Legend:"yyi4nyw _1fragemnh",visuallyHidden:"yyi4nyx _1fragem124",ErrorMessage:"yyi4nyy _1fragemxt _1fragempa",inert:"yyi4nyz _1fragemz2"},Q="none",X="large100",Z=({hideRadioControl:e,redesigned:a,thinSelectedBorder:n,variant:i,children:o})=>{const{control:{border:l},choiceList:{group:{spacing:m}={}}}=S(),{border:g,borderSelected:y,spacing:u,background:_,backgroundSelected:f,padding:h=X,cornerRadius:b,itemPadding:p,selectedContentBackground:v="base",selectedContentTransitionProperties:k}=r(H)??{},V=y??(n?"base":void 0),L=_||"base",j=g||l||"full",P=u||m||Q,R=Array.isArray(h)?h[0]:h,x=Array.isArray(h)?h[1]:h,{current:z,parent:W}=N(),A=t(()=>({current:"transparent"===L?void 0:z,parent:W}),[L,z,W]),I=d(M.ChoiceListInternalVariant[i],G[j],b&&M.choiceListInternalCornerRadiusVariant[b],M.choiceListInternalBorderStyleVariant.base),$=t(()=>({background:L,backgroundSelected:f,border:j,borderSelected:V,spacing:P,hideRadioControl:e,redesigned:a,itemPadding:p,selectedContentBackground:v,selectedContentTransitionProperties:k}),[j,V,L,f,P,e,a,p,v,k]);return s(w.Provider,{value:$,children:s(C.Provider,{value:A,children:s("div",{className:I,style:c({...P!==Q&&{"var(--yyi4ny6)":B.spacing[P]},...void 0!==R&&R!==X&&{"var(--yyi4ny8)":"none"===R?"0":B.spacing[R]},...void 0!==x&&R!==X&&{"var(--yyi4nya)":"none"===x?"0":B.spacing[x]}}),children:o})})})},J=v("ChoiceList"),O=Symbol("always");function U({id:e,variant:r="auto",name:d,values:o,multiple:l,hideRadioControl:c,onChange:g,children:u,blockFooter:b,disabled:p,error:v,label:C,labelAccessibilityVisibility:V="visible"}){const[S,L]=i([]),[j]=i(void 0!==o),B=function(e){return P(e)?e:"list"}(r),R="redesigned"===$(B),N=h(),z=f(e,J),W=_({active:Boolean(v)}),w=I(W),D=a([]),E=t(()=>{const e=j?o||[]:S;return D.current=e,e},[j,o,S]),T=n((e,a)=>{let r=[];r=l?a?D.current.includes(e)?D.current:[...D.current,e]:D.current.filter(a=>a!==e):a?[e]:[],j||L(r),"function"==typeof g&&g(r)},[l,j,g]),H=t(()=>({name:d,multiple:l,values:E,disabled:p,updateValue:T,variant:B}),[d,l,E,p,T,B]);let F;C&&"exclusive"===V?F=s("legend",{className:M.visuallyHidden,children:C}):C&&"visible"===V&&(F=s("legend",{className:M.Legend,children:s(m,{level:3,accessibilityRole:"presentation",children:C})}));const G=C?"fieldset":"div";return s(k.Provider,{value:H,children:s(G,{...C?{disabled:p}:{role:"group"},"aria-describedby":v?A(z):void 0,"aria-invalid":v?"true":void 0,className:x(B,5)?M.GridQueryContainer:void 0,id:e,ref:w,tabIndex:v?-1:void 0,children:[F,x(B,0)?u:x(B,4)?s(y,{gap:"base",children:u}):s(Z,{hideRadioControl:c,redesigned:R,thinSelectedBorder:R&&N,variant:B,children:[u,x(B,1)&&b&&s(q,{children:b})]}),v&&s("p",{"aria-live":"polite",className:M.ErrorMessage,id:A(z),children:v})]})})}var Y={Input:"_6hzjvo6 _6hzjvo5 _1fragemym _1fragem5u _1fragem136 _1fragem12m _1fragem12g _1fragem12t",Radio:"_6hzjvo4 _6hzjvo3 _1fragem4v _1fragem6t _1fragem19",colorLayerControl:"_6hzjvo7 _1fragemy8",inputStateVariant:{default:"_6hzjvoa _6hzjvo8 _1fragemyf",disabled:"_6hzjvob _6hzjvo9 _1fragem11y _1fragem122 _1fragemyd"},accessibilityVisibilityVariant:{visible:"_6hzjvod",exclusive:"_6hzjvoe _6hzjvoc _1fragem124"},inputError:"_6hzjvof",inert:"_6hzjvog _1fragemz2"},K=v("Radio"),ee=e(({id:e,name:a,value:r=!1,checked:n=r,disabled:i,accessibilityLabel:t,colorLayer:o,error:l,accessibilityVisibility:c,onChange:m,ariaDescribedBy:y},u)=>{const _=f(e,K),h=g(),b=d(Y.Input,l&&Y.inputError,Y.inputStateVariant[i||h?"disabled":"default"],"inherit"!==o&&Y.colorLayerControl,h&&Y.inert);return s("div",{className:d(Y.Radio,c&&Y.accessibilityVisibilityVariant[c]),children:s("input",{type:"radio",id:_,name:a,checked:n,disabled:i,onChange:({currentTarget:e})=>{m?.(e.checked)},className:b,tabIndex:h?-1:void 0,"aria-label":t||void 0,"aria-hidden":!!h||void 0,"aria-describedby":[y,l&&A(_)].filter(Boolean).join(" ")||void 0,ref:u})})}),ae=l({});function re(){return r(ae)}ae.displayName="ChoiceContext";var ne=v("Choice"),ie=e(function(e,a){const r=e.id?` (id: ${e.id})`:"",n=R();return n?"string"!=typeof e.value?(console.warn(`Choice should have a string value.${r}`),null):s(te,{...e,choiceListContext:n,ref:a}):(console.warn(`Unable to render Choice${r}. Please verify it is a child of a ChoiceList.`),null)}),te=e(function({id:e,value:r,error:d,disabled:o,accessibilityLabel:l,children:c,selectedContent:m,secondaryContent:y,tertiaryContent:u,icon:_,details:h,renderSelectedContentWhenCollapsed:p,selectedContentPadding:v,choiceListContext:C},k){const{name:S,values:B,multiple:P,disabled:R,variant:N,updateValue:z}=C,A=n(e=>{z(r,e)},[z,r]),w=f(S,ne),I=e??`${w}-${r}`,{background:$,backgroundSelected:D,hideRadioControl:E,redesigned:T=!1}=L(),q=T&&V(N),H=t(()=>P?B.includes(r):B[0]===r,[r,B,P]),[F]=i(H),G=a(null),M=j(k,G),Q=a(null),X=!x(N,1)||P||!E||E!==O&&!F,Z=x(N,2)||W(N),J=!P&&H?D??$:$,U=g(),Y=R||o||U,K=n(({target:e})=>{!(e instanceof HTMLElement||e instanceof SVGElement)||Q.current?.contains(e)||G.current?.contains(e)||!P&&H||(G.current?G.current.click():A(!H))},[A,P,H]),ee=Boolean(x(N,1)&&b(c)&&y&&!h&&!u),re=t(()=>({id:I,name:S,checked:H,disabled:Y,multiple:Boolean(P),variant:N,controlRendered:X,controlHidden:Z,redesigned:q,backgroundVariant:J}),[I,S,H,Y,P,N,X,Z,q,J]),ie=Boolean(m)&&s(ye,{selectedContentPadding:v,renderSelectedContentWhenCollapsed:p,children:m}),te=s(le,{accessibilityLabel:l,labelRef:Q,inputRef:M,shouldVerticallyCenterLabel:ee,details:h,secondaryContent:y,error:d,onChange:A,children:c});return s(ae.Provider,{value:re,children:s(de,{children:[s(oe,{onContainerClick:K,children:[_&&W(N)&&s(ge,{children:_}),te,x(N,1)&&y&&s(ce,{children:y}),u&&s(me,{children:u}),(x(N,4)||x(N,0))&&ie]}),x(N,1)&&ie]})})});function de({children:e}){const{spacing:a,border:r,borderSelected:n}=L(),{variant:i,backgroundVariant:t,checked:o,multiple:l,redesigned:c}=re(),m=c&&x(i,1);return s("div",{className:d(T.ChoiceWrapper[i],r&&T.choiceListBorderVariant[r],T.kindVariant[l?"multiple":"single"],T.stateVariant[o?"checked":"unchecked"],m&&T.redesignedBlockWrapper,m&&!l&&T.redesignedSelectedBorder,c&&o&&!l&&T.redesignedBrandedSelected,x(i,1)&&["none"!==a||"none"===r?T.blockChoiceWrapperVariant.separated:[T.blockChoiceWrapperVariant.segmented,T.segmentedChoice],"base"===t&&T.colorLayerVariant.control],(x(i,2)||W(i))&&[T.colorLayerVariant["control"+(o?"Selected":"")]],(x(i,2)||W(i)||x(i,1)&&!l)&&void 0!==n&&T.borderSelected[n]),children:e})}function oe({onContainerClick:e,children:a}){const{variant:r,disabled:n,multiple:i,checked:t,backgroundVariant:o,controlRendered:l,redesigned:c}=re(),{itemPadding:m}=L(),{className:g,style:y,styleElement:_}=u({padding:x(r,1)?m:void 0}),f=x(r,1)||x(r,2)||W(r),h=c&&x(r,1);return s("div",{className:d(T.ChoiceVariant[r],x(r,1)&&(m?g:T.blockChoicePadding),l&&T.controlRendered,f&&l&&!n&&T.interactive,x(r,1)&&!i&&t&&!h&&T.blockChoiceSingleCheckedVariant[o||"base"]),onClick:f&&!n?e:void 0,style:y,children:[_,a]})}function le({accessibilityLabel:e,details:a,secondaryContent:r,shouldVerticallyCenterLabel:n,labelRef:i,inputRef:t,error:l,onChange:c,children:m}){const{multiple:g,disabled:y,checked:u,name:_,controlHidden:f,id:h,controlRendered:v,variant:C}=re(),k=g?p:ee,V=[r&&!x(C,0)&&`${h}-secondary`,a&&`${h}-details`].filter(Boolean).join(" "),S=v&&s(k,{id:h,accessibilityVisibility:f?"exclusive":"visible",name:_,disabled:y,checked:u,ref:t,accessibilityLabel:e,error:l,colorLayer:"inherit",ariaDescribedBy:V||void 0,onChange:c});return s(o,{children:[v&&!n&&S,b(m)&&s("div",{className:d(n&&T.labelCentered),children:[v?s(o,{children:[n&&S,s("label",{className:y?T.labelDisabled:T.interactive,htmlFor:h,ref:i,"data-option-selected":u,children:m})]}):s(E,{className:T.Heading,children:m}),(x(C,4)||x(C,2)||W(C))&&r&&s(ce,{children:r}),a&&s(se,{children:a})]})]})}function ce({children:e}){const{variant:a,disabled:r,id:n}=re();return s("div",{id:`${n}-secondary`,className:d(T.SecondaryContent,T.SecondaryContentVariant[a],r&&T.maybeDisabled),children:e})}function se({children:e}){const{disabled:a,id:r}=re();return s("div",{id:`${r}-details`,className:d(a&&T.maybeDisabled),children:e})}function me({children:e}){const{disabled:a}=re();return s("div",{className:d(a&&T.maybeDisabled,T.TertiaryContent.block),children:e})}function ge({children:e}){const{disabled:a}=re();return s("div",{"aria-hidden":"true",className:d(T.Icon,a&&T.maybeDisabled),children:e})}function ye({selectedContentPadding:e,renderSelectedContentWhenCollapsed:a,children:r}){const{variant:n,checked:i,id:t,redesigned:o}=re(),{selectedContentBackground:l,selectedContentTransitionProperties:c}=L(),m=s(D,{open:i,id:`${t}-collapsible`,renderChildrenWhenCollapsed:a,properties:c,children:s("div",{className:d(T.SelectedContent[n],x(n,1)&&!o&&l&&T.blockSelectedContentBackgroundVariant[l],"none"!==e&&T.selectedContentPadding),children:r})});return x(n,1)?m:s("div",{className:T.ListSelectedContentWrapper,children:m})}export{F as i,U as n,O as r,ie as t};