@rdsaude/pulso-react-native-components
Version:
Biblioteca de componentes React Native do Pulso Design System da RD Saúde oferece componentes consistentes e de alto desempenho, alinhados com os padrões da RDSaúde. Ideal para desenvolver aplicações modernas e acessíveis.
1 lines • 540 kB
JavaScript
import{a as i,b as a,c as g,d as Hl,e as Rl,f as V2}from"./chunk-HTUQ7INL.mjs";var Mi=Hl((S$,Ri)=>{"use strict";var Ny=process.env.NODE_ENV,Ey=function(o,e,t,r,n,s,p,C){if(Ny!=="production"&&e===void 0)throw new Error("invariant requires an error message argument");if(!o){var d;if(e===void 0)d=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[t,r,n,s,p,C],f=0;d=new Error(e.replace(/%s/g,function(){return c[f++]})),d.name="Invariant Violation"}throw d.framesToPop=1,d}};Ri.exports=Ey});import{createContext as Ml,useMemo as Vl}from"react";import{DROGASIL_TOKENS as wl,GLOBALS_TOKENS as Dl,PRIME_TOKENS as Fl,RAIA_TOKENS as Al,RDSAUDESISTEMAS_TOKENS as zl,SUBSCRIPTION_TOKENS as Nl,rnFontFamily as El}from"@raiadrogasil/pulso-design-tokens";import{jsx as _3}from"react/jsx-runtime";var G3=Ml({});function F8({theme:o,children:e}){let t=Vl(()=>i(a(i({},{rdsaudesistemas:zl,drogasil:wl,raia:Al,subscription:Nl,prime:Fl}[o]),{fontFamily:i({},El)}),Dl),[o]);return _3(G3.Provider,{value:t,children:e})}function Bl(o,e){return function(r){return _3(F8,{theme:e,children:_3(o,i({},r))})}}import X3,{useState as us}from"react";import{Pressable as Yl}from"react-native";import{createElement as Ol,forwardRef as Zl}from"react";import{StyleSheet as Wl}from"react-native";import{useContext as kl}from"react";function O(){let o=kl(G3);if(!o)throw new Error("useTheme deve ser usado dentro de um ThemeProvider do Pulso.");return o}function l(o,e){let t=Zl((r,n)=>{let s=O(),{base:p,variants:C={},compoundVariants:d=[]}=typeof e=="function"?e(s):e,c=Gl(r,C,d),f=_l(p,c),u=[...Object.values(f),r.style].filter(Boolean);return Ol(o,a(i({},r),{ref:n,style:u}))});return t.displayName=`Styled${o.displayName||o.name||"Component"}`,t}function _l(o,e){return Wl.create(i({base:o},e.reduce((t,r,n)=>{let s=`variant-${n+1}`;return t[s]=r,t},{})))}function Gl(o,e,t){let r=[];return e&&Object.keys(e).length>0&&Ul(o,e,r),Ql(o,t,r),r}function Ul(o,e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)){let n=o[r];if(n&&e[r]){let s=e[r][n];s&&t.push(s)}}}function Ql(o,e,t){for(let r of e)Object.keys(r.variants).every(s=>o[s]===r.variants[s])&&t.push(r.css)}var A8=l(Yl,o=>({base:{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:o.spacingInlineTwopulse,borderRadius:o.borderRadiusPill},variants:{variant:{"brand-primary":{borderWidth:o.borderWidthNone,borderColor:o.colorActionBorderBrandPrimaryEnabled,backgroundColor:o.colorActionFillBrandPrimaryEnabled},"neutral-secondary":{borderWidth:o.borderWidthQuarterpulse,borderColor:o.colorActionBorderNeutralSecondaryEnabled,backgroundColor:o.colorActionFillNeutralSecondaryEnabled},"neutral-tertiary":{borderWidth:o.borderWidthNone,borderColor:o.colorActionBorderNeutralTertiaryEnabled,backgroundColor:o.colorActionFillNeutralTertiaryEnabled}},size:{md:{minWidth:o.sizingMedium,height:o.sizingMedium,paddingHorizontal:o.paddingInsetFourpulse},ml:{minWidth:o.sizingMediumlarge,height:o.sizingMediumlarge,paddingHorizontal:o.paddingInsetFourpulse},lg:{minWidth:o.sizingLarge,height:o.sizingLarge,paddingHorizontal:o.paddingInsetFivepulse},xl:{minWidth:o.sizingExtralarge,height:o.sizingExtralarge,paddingHorizontal:o.paddingInsetSixpulse}},hasFull:{true:{width:"100%"}},hasPressed:{true:{}},hasLoading:{true:{paddingHorizontal:o.paddingInsetNone}},hasOnlyIcon:{true:{paddingHorizontal:o.paddingInsetNone}},hasDisabled:{true:{}}},compoundVariants:[{variants:{variant:"brand-primary",hasPressed:!0},css:{borderColor:o.colorActionBorderBrandPrimaryPressed,backgroundColor:o.colorActionFillBrandPrimaryPressed}},{variants:{variant:"brand-primary",hasDisabled:!0},css:{borderWidth:o.borderWidthNone,borderColor:o.colorActionBorderBrandPrimaryDisabled,backgroundColor:o.colorActionFillBrandPrimaryDisabled}},{variants:{variant:"neutral-secondary",hasPressed:!0},css:{borderColor:o.colorActionBorderNeutralSecondaryPressed,backgroundColor:o.colorActionFillNeutralSecondaryPressed}},{variants:{variant:"neutral-secondary",hasDisabled:!0},css:{borderColor:o.colorActionBorderNeutralSecondaryDisabled,backgroundColor:o.colorActionFillNeutralSecondaryDisabled}},{variants:{variant:"neutral-tertiary",hasPressed:!0},css:{borderColor:o.colorActionBorderNeutralTertiaryPressed,backgroundColor:o.colorActionFillNeutralTertiaryPressed}}]}));import{createContext as $l}from"react";import{jsx as ql}from"react/jsx-runtime";var U3=$l({}),{Provider:Kl}=U3;function z8(t){var r=t,{children:o}=r,e=g(r,["children"]);return ql(Kl,{value:e,children:o})}var N8="The internal components of the Button must be its own elements. For more information, see the documentation.";import{ActivityIndicator as Jl}from"react-native";var E8=()=>{let o=O(),e={sm:o.sizingSmall,md:o.sizingMedium,lg:o.sizingLarge},t={brand:o.colorActionFillBrandPrimaryEnabled,neutral:o.colorTextNeutralReadonly,black:o.colorTextNeutralDefault,white:o.colorTextNeutralInverse};return{refreshSizeMapping:e,refreshColorMapping:t}};import{jsx as jl}from"react/jsx-runtime";var B2=({color:o,size:e,testID:t})=>{let{refreshSizeMapping:r,refreshColorMapping:n}=E8();return jl(Jl,{color:n[o],size:r[e],testID:t})};import{View as ts}from"react-native";import{icoMoonConfig as rs}from"@raiadrogasil/pulso-icons";import ns,{Path as is}from"@rd-core-svg/svg";import ls from"react-icomoon";import{View as B8}from"react-native";var k8=l(B8,o=>({base:{},variants:{}})),O8=l(B8,o=>({base:{position:"absolute"},variants:{}}));import{jsx as Q3,jsxs as es}from"react/jsx-runtime";var Z8=o=>{let{symbols:e,colors:t,size:r,testID:n}=o;return es(k8,{testID:n,children:[Q3(H,{symbol:e[0],color:t[0],size:r}),Q3(O8,{children:Q3(H,{symbol:e[1],color:t[1],size:r})})]})};function W8({size:o="small",color:e="colorTextNeutralDefault"}){let t=O(),r={tiny:t.sizingTiny,"extra-small":t.sizingExtrasmall,small:t.sizingSmall,medium:t.sizingMedium},n=t[e];return{size:r[o],color:n}}import{jsx as _8}from"react/jsx-runtime";var H=({size:o="medium",color:e,symbol:t="rdicon-default",testID:r})=>{let{size:n,color:s}=W8({size:o,color:e}),p=t.replace("rdicon-","");return _8(ts,{testID:r,children:_8(ls,a(i({},{size:n,color:s,icon:p}),{SvgComponent:ns,PathComponent:is,iconSet:rs,native:!0}))})};H.Dual=Z8;import{useContext as ss}from"react";function N4(){return ss(U3)}import{useMemo as as}from"react";import{View as ps}from"react-native";import{jsx as G8}from"react/jsx-runtime";function E4({iconColor:o,symbol:e,testID:t}){let{variant:r="brand-primary",size:n="md",disabled:s}=N4(),p=!!s,C={"brand-primary":"colorTextNeutralInverse","neutral-secondary":"colorTextNeutralDefault","neutral-tertiary":"colorTextNeutralDefault"},d={md:"extra-small",ml:"small",lg:"small",xl:"small"},c=as(()=>p?"colorTextNeutralDisabled":o||C[r],[p,r]);return G8(ps,{style:{position:"absolute"},children:G8(H,{symbol:e,size:d[n],color:c,testID:t})})}import{Text as Cs}from"react-native";function e2(){return __DEV__}var t2={warning(o){console.warn(o)}};function v(o){let e=o.slice(0,o.length-1);return Number.parseFloat(e)/100}function S(o,e){let t=v(e);return o*t}var U8=l(Cs,o=>({base:{fontFamily:o.fontFamily.bold,letterSpacing:v(o.letterSpacingDefault)},variants:{variant:{"brand-primary":{color:o.colorTextNeutralInverse},"neutral-secondary":{color:o.colorTextNeutralDefault},"neutral-tertiary":{color:o.colorTextNeutralDefault}},size:{md:{fontSize:o.fontSizeThreepulse},ml:{fontSize:o.fontSizeThreeandhalfpulse},lg:{fontSize:o.fontSizeThreeandhalfpulse},xl:{fontSize:o.fontSizeThreeandhalfpulse}},hasDisabled:{true:{color:o.colorTextNeutralDisabled}}}}));import{jsx as cs}from"react/jsx-runtime";function Y3({children:o}){let{variant:e,size:t,disabled:r}=N4();return cs(U8,{variant:e,size:t,hasDisabled:r,numberOfLines:1,ellipsizeMode:"clip",children:o})}import{jsx as $3}from"react/jsx-runtime";var Q8=X3.forwardRef((f,c)=>{var u=f,{children:o,variant:e="brand-primary",size:t="md",full:r,disabled:n,loading:s,onPressIn:p,onPressOut:C}=u,d=g(u,["children","variant","size","full","disabled","loading","onPressIn","onPressOut"]);let[y,I]=us(!1),b=X3.Children.map(o,N=>{if(X3.isValidElement(N)){if(N.type===Y3||N.type===E4)return N;if(e2()){t2.warning(N8);return}}}),T=!!n,P=!!s,x=e==="brand-primary"?"white":"neutral",h={role:"button","aria-disabled":T,accessible:!0},R=b?(b==null?void 0:b.length)>1?!1:b[0].type===E4:!1,M={size:t,variant:e,full:r,disabled:T||P,hasPressed:y,hasLoading:P,hasDisabled:T&&!P,hasFull:r,hasOnlyIcon:R};function k(N){I(!0),p==null||p(N)}function o1(N){I(!1),C==null||C(N)}return $3(z8,a(i({},M),{children:$3(A8,a(i(i(i({ref:c},d),M),h),{onPressIn:k,onPressOut:o1,children:P?$3(B2,{size:"sm",color:x}):b==null?void 0:b.slice(0,3)}))}))});Q8.displayName="Button";var L={Root:Q8,Label:Y3,Icon:E4};import{useMemo as Y8}from"react";import{jsx as X8,jsxs as fs}from"react/jsx-runtime";var $8=o=>{let e=Y8(()=>{let r=o.counter;return!r||r===0?"rdicon-basket":r>9?"rdicon-basket-multicolor-plus":"rdicon-basket-multicolor"},[o.counter]),t=Y8(()=>{let r=o.counter;if(r)return r<=9?`rdicon-bullet-notification-${r}`:"rdicon-bullet-notification-9-plus"},[o.counter]);return fs(L.Root,a(i({variant:"neutral-tertiary"},o),{children:[X8(L.Icon,{symbol:e}),o.counter&&X8(L.Icon,{symbol:t,iconColor:"colorActionTextOnbrandDefault"})]}))};import{useMemo as K8}from"react";import{jsx as q8,jsxs as ms}from"react/jsx-runtime";var J8=o=>{let e=K8(()=>{let r=o.counter;return!r||r===0?"rdicon-chat":r>9?"rdicon-chat-multicolor-plus":"rdicon-chat-multicolor"},[o.counter]),t=K8(()=>{let r=o.counter;if(r)return r<=9?`rdicon-bullet-notification-${r}`:"rdicon-bullet-notification-9-plus"},[o.counter]);return ms(L.Root,a(i({variant:"neutral-tertiary"},o),{children:[q8(L.Icon,{symbol:e}),o.counter&&q8(L.Icon,{symbol:t,iconColor:"colorActionTextOnbrandDefault"})]}))};import{useMemo as j8}from"react";import{jsx as o6,jsxs as gs}from"react/jsx-runtime";var e6=o=>{let e=j8(()=>{let r=o.counter;return!r||r===0?"rdicon-notification":r>9?"rdicon-notification-multicolor-plus":"rdicon-notification-multicolor"},[o.counter]),t=j8(()=>{let r=o.counter;if(r)return r<=9?`rdicon-bullet-notification-${r}`:"rdicon-bullet-notification-9-plus"},[o.counter]);return gs(L.Root,a(i({variant:"neutral-tertiary"},o),{children:[o6(L.Icon,{symbol:e}),o.counter&&o6(L.Icon,{symbol:t,iconColor:"colorActionTextOnbrandDefault"})]}))};var px={Basket:$8,Chat:J8,Notification:e6};import Y1 from"react";import{Pressable as bs,View as K3}from"react-native";var t6=l(bs,o=>({base:{width:"100%",borderRadius:o.borderRadiusPill},variants:{}})),r6=l(K3,o=>({base:{flexDirection:"row",alignItems:"center",borderRadius:o.borderRadiusPill,backgroundColor:"transparent",minWidth:o.sizingHuge,minHeight:o.sizingSmall},variants:{size:{md:{paddingTop:o.paddingInsetTwopulse,paddingLeft:o.paddingInsetTwopulse,paddingBottom:o.paddingInsetTwopulse,paddingRight:o.paddingInsetTwopulse,minWidth:o.sizingMedium,minHeight:o.sizingMedium},ml:{paddingTop:o.paddingInsetTwopulse,paddingLeft:o.paddingInsetTwopulse,paddingBottom:o.paddingInsetTwopulse,paddingRight:o.paddingInsetTwopulse,minWidth:o.sizingMediumlarge,minHeight:o.sizingMediumlarge},lg:{paddingTop:o.paddingInsetTwopulse,paddingLeft:o.paddingInsetTwopulse,paddingBottom:o.paddingInsetTwopulse,paddingRight:o.paddingInsetTwopulse,minWidth:o.sizingLarge,minHeight:o.sizingLarge},xl:{paddingTop:o.paddingInsetThreepulse,paddingLeft:o.paddingInsetThreepulse,paddingBottom:o.paddingInsetThreepulse,paddingRight:o.paddingInsetThreepulse,minWidth:o.sizingExtralarge,minHeight:o.sizingExtralarge}},hasPressed:{true:{backgroundColor:o.colorActionFillNeutralTertiaryPressed,borderColor:o.colorActionBorderNeutralTertiaryPressed,borderWidth:o.borderWidthNone}},hasError:{true:{borderWidth:o.borderWidthHalfpulse,borderColor:o.colorFormsBorderError}},hasDisabled:{true:{backgroundColor:o.colorActionFillNeutralTertiaryDisabled,borderColor:o.colorActionBorderNeutralTertiaryDisabled,borderWidth:o.borderWidthNone}},hasReadOnly:{true:{backgroundColor:"#00000000",borderColor:"#00000000",borderWidth:o.borderWidthNone}}},compoundVariants:[{variants:{size:"xl",hasInternalLabel:!0},css:{paddingLeft:o.paddingInsetSixpulse,paddingRight:o.paddingInsetSixpulse}},{variants:{size:"lg",hasInternalLabel:!0},css:{paddingLeft:o.paddingInsetFivepulse,paddingRight:o.paddingInsetFivepulse}},{variants:{size:"ml",hasInternalLabel:!0},css:{paddingLeft:o.paddingInsetFourpulse,paddingRight:o.paddingInsetFourpulse}},{variants:{size:"md",hasInternalLabel:!0},css:{paddingLeft:o.paddingInsetFourpulse,paddingRight:o.paddingInsetFourpulse,paddingTop:o.paddingInsetOnepulse,paddingBottom:o.paddingInsetOnepulse}}]})),n6=l(K3,o=>({base:{alignItems:"center",width:"100%",paddingTop:o.spacingStackTwopulse,backgroundColor:"transparent",paddingLeft:o.paddingInsetSixpulse,paddingRight:o.paddingInsetSixpulse},variants:{size:{md:{paddingLeft:o.paddingInsetFourpulse,paddingRight:o.paddingInsetFourpulse},ml:{paddingLeft:o.paddingInsetFourpulse,paddingRight:o.paddingInsetFourpulse},lg:{paddingLeft:o.paddingInsetFivepulse,paddingRight:o.paddingInsetFivepulse},xl:{paddingLeft:o.paddingInsetSixpulse,paddingRight:o.paddingInsetSixpulse}}}})),q3=l(K3,o=>({base:{paddingTop:o.paddingInsetOnepulse,paddingLeft:o.paddingInsetEightpulse},variants:{}}));import{Text as Ts}from"react-native";var i6=l(Ts,o=>({base:{flexShrink:1,textAlign:"left",fontFamily:o.fontFamily.regular,letterSpacing:v(o.letterSpacingDefault),paddingLeft:o.paddingInsetTwopulse,color:o.colorTextNeutralDefault},variants:{size:{md:{fontSize:o.fontSizeThreepulse,paddingLeft:o.paddingInsetOnepulse,lineHeight:S(o.fontSizeThreepulse,o.lineHeightMedium)},ml:{fontSize:o.fontSizeThreeandhalfpulse,paddingLeft:o.paddingInsetTwopulse,lineHeight:S(o.fontSizeThreeandhalfpulse,o.lineHeightSmall)},lg:{fontSize:o.fontSizeFourpulse,paddingLeft:o.paddingInsetTwopulse,lineHeight:S(o.fontSizeFourpulse,o.lineHeightSmall)},xl:{fontSize:o.fontSizeFourpulse,paddingLeft:o.paddingInsetTwopulse,lineHeight:S(o.fontSizeFourpulse,o.lineHeightSmall)}},hasError:{true:{fontFamily:o.fontFamily.semiBold}},hasDisabled:{true:{color:o.colorTextNeutralDisabled}},hasReadOnly:{true:{color:o.colorTextNeutralReadonly}}}}));import{jsx as Is}from"react/jsx-runtime";function J3({children:o,size:e,error:t,disabled:r,readOnly:n,testID:s}){return Is(i6,a(i({testID:s},{size:e,hasError:!!t,hasDisabled:!!r,hasReadOnly:!!n&&!r}),{numberOfLines:4,children:o}))}import{Text as xs,View as Ps}from"react-native";var l6=l(Ps,o=>({base:{display:"flex",flexDirection:"row",alignItems:"center",alignContent:"center",justifyContent:"flex-start",gap:o.spacingInlineHalfpulse},variants:{}})),s6=l(xs,o=>({base:{color:o.colorTextDangerAlternative,fontFamily:o.fontFamily.semiBold,fontSize:o.fontSizeThreepulse,paddingLeft:o.spacingInlineOnepulse,lineHeight:S(o.fontSizeThreepulse,o.lineHeightDefault),textAlign:"left",textAlignVertical:"top"},variants:{}}));import{jsx as a6,jsxs as hs}from"react/jsx-runtime";function j3(r){var n=r,{size:o="md",testID:e}=n,t=g(n,["size","testID"]);return hs(l6,{testID:e,children:[a6(H,{size:{md:"tiny",ml:"tiny",lg:"tiny",xl:"tiny"}[o],symbol:"rdicon-warning-circle",color:"colorTextDangerAlternative"}),a6(s6,{numberOfLines:2,children:t.children})]})}import{useState as vs}from"react";var p6=()=>{let[o,e]=vs(!1);return{renderCurrentStateCheckbox:(n,s)=>n?"rdicon-checkbox-indeterminate":s?"rdicon-checkbox-checked":"rdicon-checkbox-unchecked",iconSizeMapping:{md:"tiny",ml:"small",lg:"medium",xl:"medium"},pressed:o,setPressed:e}};import{jsx as C6,jsxs as d6}from"react/jsx-runtime";var Hs=({size:o="md",checked:e=!1,indeterminate:t=!1,onPress:r,error:n,disabled:s,readOnly:p,children:C,testID:d})=>{let{iconSizeMapping:c,renderCurrentStateCheckbox:f,pressed:u,setPressed:y}=p6(),I=Y1.Children.map(C,h=>{if(Y1.isValidElement(h)&&Y1.isValidElement(h)&&h.type===J3)return Y1.cloneElement(h,{size:o,disabled:s,readOnly:p,error:n})}),b=Y1.Children.map(C,h=>{if(Y1.isValidElement(h)&&Y1.isValidElement(h)&&h.type===j3)return Y1.cloneElement(h,{size:o})}),T=Y1.Children.map(C,h=>{if(Y1.isValidElement(h)&&h.type===q3)return Y1.cloneElement(h,{testID:"checkbox-nested-container"})}),P={size:o,hasPressed:u,hasDisabled:s,hasError:!!n,hasReadOnly:p,hasInternalLabel:!!(I!=null&&I.length),readOnly:p},x=()=>s?"colorTextNeutralDisabled":p?"colorTextNeutralReadonly":"colorTextNeutralDefault";return d6(t6,a(i({testID:d,disabled:s||p,onPress:()=>{typeof r=="function"&&r()},onPressIn:()=>y(!0),onPressOut:()=>y(!1)},P),{children:[d6(r6,a(i({},P),{children:[C6(H,{testID:"checkbox-icon",color:x(),size:c[o],symbol:f(t,e)}),I]})),n&&(I!=null&&I.length)?C6(n6,a(i({},P),{children:b})):null,T]}))},Nx={Root:Hs,Label:J3,HelperText:j3,NestedContainer:q3};import Z4,{useState as Vs}from"react";import{jsx as c6}from"react/jsx-runtime";function B4(o){return c6(L.Root,a(i({},o),{size:o.size||"md",variant:"neutral-tertiary",children:c6(L.Icon,{symbol:"rdicon-chevron-left"})}))}import{jsx as u6}from"react/jsx-runtime";function k4(o){return u6(L.Root,a(i({},o),{size:o.size||"md",variant:"neutral-tertiary",children:u6(L.Icon,{symbol:"rdicon-barcode-scan-variant"})}))}import{jsx as f6}from"react/jsx-runtime";function O4(o){return f6(L.Root,a(i({},o),{size:o.size||"md",variant:"neutral-tertiary",children:f6(L.Icon,{symbol:"rdicon-microphone"})}))}import{TextInput as Rs,View as m6}from"react-native";var g6=l(m6,o=>({base:{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:o.spacingInlineTwopulse,backgroundColor:"transparent"},variants:{size:{medium:{height:o.sizingMedium},"medium-large":{height:o.sizingMediumlarge},large:{height:o.sizingLarge}}}})),b6=l(m6,o=>({base:{flexDirection:"row",alignItems:"center",borderRadius:o.borderRadiusPill,borderWidth:o.borderWidthQuarterpulse,borderColor:o.colorFormsBorderDefault,paddingLeft:o.spacingInlineFourpulse,paddingRight:o.spacingInlineOnepulse,paddingTop:o.spacingInlineOnepulse,paddingBottom:o.spacingInlineOnepulse,minWidth:180,flex:1,gap:o.spacingStackOnepulse,backgroundColor:o.colorFormsFillDefault},variants:{size:{medium:{height:o.sizingMedium},"medium-large":{height:o.sizingMediumlarge},large:{height:o.sizingLarge}},hasFocused:{true:{backgroundColor:o.colorFormsFillFocused,borderWidth:o.borderWidthHalfpulse,borderColor:o.colorActionBorderFocused}},hasFill:{true:{backgroundColor:o.colorFormsFillFocused,borderWidth:o.borderWidthQuarterpulse,borderColor:o.colorFormsBorderFilled}},hasFilledAndActive:{true:{borderWidth:o.borderWidthHalfpulse,borderColor:o.colorActionBorderFocused,backgroundColor:o.colorFormsFillFocused}}}})),y6=l(Rs,o=>({base:{flexDirection:"row",justifyContent:"center",alignItems:"center",fontSize:o.fontSizeThreeandhalfpulse,fontFamily:o.fontFamily.light,letterSpacing:v(o.letterSpacingDefault),color:o.colorTextNeutralAlternative,textAlignVertical:"center",textAlign:"left",flex:1,flexShrink:1,borderWidth:0,overflow:"hidden"},variants:{hasFocused:{true:{color:o.colorTextNeutralPlaceholder}},hasFilledAndActive:{true:{color:o.colorTextNeutralDefault}}}}));var k2=o=>o==="medium-large"||o==="large"?"ml":"md";import{jsx as u2,jsxs as T6}from"react/jsx-runtime";var ws=o=>{let h=o,{value:e,size:t="medium",onChangeText:r,children:n,onClear:s,placeholder:p,maxLength:C,showInternalSearchIcon:d=!0,onFocus:c,onBlur:f}=h,u=g(h,["value","size","onChangeText","children","onClear","placeholder","maxLength","showInternalSearchIcon","onFocus","onBlur"]),[y,I]=Vs(!1),b={size:t,hasFocused:y,hasFill:e&&!y||!1,hasFilledAndActive:e&&y||!1},T={hasFocused:y,hasFilledAndActive:e&&y||!1},P=Z4.Children.map(n,R=>{if(Z4.isValidElement(R)){if(R.type===k4)return u2(k4,a(i({},R.props),{size:k2(t)}));if(R.type===O4)return u2(O4,a(i({},R.props),{size:k2(t)}))}}),x=Z4.Children.map(n,R=>{if(Z4.isValidElement(R)&&R.type===B4)return u2(B4,a(i({},R.props),{size:k2(t)}))});return T6(g6,{children:[x,T6(b6,a(i({},b),{children:[d&&u2(L.Root,{size:k2(t),variant:"neutral-tertiary",children:u2(L.Icon,{symbol:"rdicon-search"})}),u2(y6,i(i({value:e,numberOfLines:o.numberOfLines||1,multiline:o.multiline||!1,onChangeText:r,onFocus:()=>{I(!0),typeof c=="function"&&c()},onBlur:()=>{I(!1),typeof f=="function"&&f()},placeholder:p,maxLength:C},T),u)),e?u2(L.Root,{size:k2(t),variant:"neutral-tertiary",onPress:s,testID:"search-bar-clear-button",children:u2(L.Icon,{symbol:"rdicon-dismiss-circle-outline"})}):null,P]}))]})},aP={Root:ws,ButtonBarCode:k4,ButtonMicrophone:O4,ButtonBack:B4};import X1 from"react";import{Text as Ds,View as Fs}from"react-native";var S6=l(Fs,o=>({base:{flexDirection:"row",gap:o.spacingInlineOnepulse,backgroundColor:"transparent",alignItems:"center"},variants:{size:{md:{paddingHorizontal:o.paddingInsetFourpulse},ml:{paddingHorizontal:o.paddingInsetFourpulse},lg:{paddingHorizontal:o.paddingInsetFivepulse},xl:{paddingHorizontal:o.paddingInsetSixpulse}}}})),I6=l(Ds,o=>({base:{color:o.colorTextDangerAlternative,fontFamily:o.fontFamily.semiBold,fontSize:o.fontSizeThreepulse,textAlign:"left",textAlignVertical:"top"},variants:{}}));import{jsx as x6,jsxs as zs}from"react/jsx-runtime";function o9(r){var n=r,{size:o="md",testID:e}=n,t=g(n,["size","testID"]);return zs(S6,{testID:e,size:o,children:[x6(H,{size:{md:"tiny",ml:"tiny",lg:"tiny",xl:"tiny"}[o],symbol:"rdicon-warning-circle",color:"colorTextDangerAlternative"}),x6(I6,{numberOfLines:2,children:t.children})]})}import{Text as Ns}from"react-native";var P6=l(Ns,o=>({base:{flexShrink:1,textAlign:"left",fontFamily:o.fontFamily.regular,letterSpacing:v(o.letterSpacingDefault),color:o.colorTextNeutralDefault},variants:{size:{md:{fontSize:o.fontSizeThreepulse,lineHeight:S(o.fontSizeThreepulse,o.lineHeightMedium)},ml:{fontSize:o.fontSizeThreeandhalfpulse,lineHeight:S(o.fontSizeThreeandhalfpulse,o.lineHeightSmall)},lg:{fontSize:o.fontSizeFourpulse,lineHeight:S(o.fontSizeFourpulse,o.lineHeightSmall)},xl:{fontSize:o.fontSizeFourpulse,lineHeight:S(o.fontSizeFourpulse,o.lineHeightSmall)}},hasError:{true:{fontFamily:o.fontFamily.semiBold}},hasDisabled:{true:{color:o.colorTextNeutralDisabled}},hasReadOnly:{true:{color:o.colorTextNeutralReadonly}}}}));import{jsx as Bs}from"react/jsx-runtime";function e9({children:o,size:e,error:t,disabled:r,readOnly:n,testID:s}){return Bs(P6,a(i({testID:s},{size:e,hasError:!!t,hasDisabled:!!r,hasReadOnly:!!n&&!r,numberOfLines:4}),{children:o}))}import{useState as ks}from"react";var L6=()=>{let[o,e]=ks(!1);return{renderCurrentStateRadio:n=>n?"rdicon-radio-button-selected":"rdicon-radio-button-unselected",iconSizeMapping:{md:"tiny",ml:"small",lg:"medium",xl:"medium"},pressed:o,setPressed:e}};import{Pressable as Os,View as h6}from"react-native";var v6=l(Os,o=>({base:{gap:o.spacingInlineTwopulse,backgroundColor:"transparent",borderRadius:o.borderRadiusPill},variants:{}})),H6=l(h6,o=>({base:{flexDirection:"row",alignItems:"center",borderRadius:o.borderRadiusPill,backgroundColor:"transparent"},variants:{size:{md:{paddingVertical:o.paddingInsetTwopulse,paddingHorizontal:o.paddingInsetTwopulse,gap:o.spacingInlineOnepulse,minWidth:o.sizingMedium,minHeight:o.sizingMedium},ml:{paddingVertical:o.paddingInsetTwopulse,paddingHorizontal:o.paddingInsetTwopulse,gap:o.spacingInlineTwopulse,minWidth:o.sizingMediumlarge,minHeight:o.sizingMediumlarge},lg:{paddingVertical:o.paddingInsetTwopulse,paddingHorizontal:o.paddingInsetTwopulse,gap:o.spacingInlineTwopulse,minWidth:o.sizingLarge,minHeight:o.sizingLarge},xl:{paddingVertical:o.paddingInsetThreepulse,paddingHorizontal:o.paddingInsetThreepulse,gap:o.spacingInlineTwopulse,minWidth:o.sizingExtralarge,minHeight:o.sizingExtralarge}},hasPressed:{true:{backgroundColor:o.colorActionFillNeutralTertiaryPressed,borderColor:o.colorActionBorderNeutralTertiaryPressed,borderWidth:o.borderWidthNone}},hasError:{true:{borderWidth:o.borderWidthHalfpulse,borderColor:o.colorFormsBorderError}},hasDisabled:{true:{backgroundColor:o.colorActionFillNeutralTertiaryDisabled,borderColor:o.colorActionBorderNeutralTertiaryDisabled,borderWidth:o.borderWidthNone}},hasReadOnly:{true:{backgroundColor:"#00000000",borderColor:"#00000000",borderWidth:o.borderWidthNone}}},compoundVariants:[{variants:{size:"xl",hasInternalLabel:!0},css:{paddingHorizontal:o.paddingInsetSixpulse,paddingVertical:o.paddingInsetThreepulse}},{variants:{size:"lg",hasInternalLabel:!0},css:{paddingHorizontal:o.paddingInsetFivepulse,paddingVertical:o.paddingInsetTwopulse}},{variants:{size:"ml",hasInternalLabel:!0},css:{paddingHorizontal:o.paddingInsetFourpulse,paddingVertical:o.paddingInsetTwopulse}},{variants:{size:"md",hasInternalLabel:!0},css:{paddingHorizontal:o.paddingInsetFourpulse,paddingVertical:o.paddingInsetOnepulse}}]})),t9=l(h6,()=>({base:{},variants:{}}));import{jsx as _s,jsxs as R6}from"react/jsx-runtime";var Ws=c=>{var f=c,{size:o="md",checked:e=!1,onPress:t,error:r,disabled:n=!1,readOnly:s=!1,children:p,testID:C}=f,d=g(f,["size","checked","onPress","error","disabled","readOnly","children","testID"]);let{iconSizeMapping:u,renderCurrentStateRadio:y,pressed:I,setPressed:b}=L6(),T=X1.Children.map(p,M=>{if(X1.isValidElement(M)&&X1.isValidElement(M)&&M.type===e9)return X1.cloneElement(M,{size:o,disabled:n,readOnly:s,error:r})}),P=X1.Children.map(p,M=>{if(X1.isValidElement(M)&&X1.isValidElement(M)&&M.type===o9)return X1.cloneElement(M,{size:o})}),x=X1.Children.map(p,M=>{if(X1.isValidElement(M)&&M.type===t9)return X1.cloneElement(M,{testID:"radio-nested-container"})}),h={size:o,hasPressed:I,hasDisabled:n,hasReadOnly:s,hasError:!!r,hasInternalLabel:!!(T!=null&&T.length)},R=()=>n?"colorTextNeutralDisabled":s?"colorTextNeutralReadonly":"colorTextNeutralDefault";return R6(v6,a(i(i({testID:C,disabled:n||s,onPress:()=>{typeof t=="function"&&t()},onPressIn:()=>b(!0),onPressOut:()=>b(!1)},h),d),{children:[R6(H6,a(i({},h),{children:[_s(H,{testID:"radio-icon",color:R(),size:u[o],symbol:y(e)}),T]})),r&&(T!=null&&T.length)?P:null,x]}))},EP={Root:Ws,Label:e9,HelperText:o9,NestedContainer:t9};import W4,{useRef as Ks}from"react";import{Text as Gs}from"react-native";var M6=l(Gs,o=>({base:{fontFamily:o.fontFamily.semiBold,color:o.colorTextNeutralDefault,letterSpacing:v(o.letterSpacingDefault),textAlign:"center",textDecorationLine:"underline",maxHeight:o.sizingSmall,height:o.sizingSmall},variants:{size:{md:{fontSize:o.fontSizeThreepulse},ml:{fontSize:o.fontSizeThreeandhalfpulse}},hasDisabled:{true:{color:o.colorTextNeutralDisabled}}},compoundVariants:[{variants:{size:"ml"},css:{marginTop:4,lineHeight:S(o.fontSizeThreeandhalfpulse,o.lineHeightSmall),textDecorationLine:"underline"}},{variants:{size:"md"},css:{marginTop:7,lineHeight:S(o.fontSizeThreepulse,o.lineHeightMedium),textDecorationLine:"underline"}}]}));import{jsx as Qs}from"react/jsx-runtime";function r9({children:o,size:e="ml",disabled:t}){return Qs(M6,{size:e,hasDisabled:t,children:o})}import{useState as V6}from"react";var w6=()=>{let o=O(),[e,t]=V6(!1),[r,n]=V6(!1);return{linkSizeMapping:{md:o.sizingMedium,ml:o.sizingMediumlarge},pressed:e,setPressed:t,linkFocus:r,setLinkFocus:n}};import{Pressable as Ys,View as Xs}from"react-native";var D6=l(Ys,o=>({base:{flexDirection:"column",borderRadius:o.borderRadiusPill,backgroundColor:"transparent",minWidth:o.sizingHuge,minHeight:o.sizingSmall,width:"auto"},variants:{size:{md:{minWidth:o.sizingMedium},ml:{minWidth:o.sizingMediumlarge}},hasFull:{true:{width:"100%"}},hasPressed:{true:{backgroundColor:o.colorActionFillNeutralTertiaryPressed,borderColor:o.colorActionBorderNeutralTertiaryPressed}},hasFocused:{true:{backgroundColor:"transparent",borderColor:o.colorActionBorderFocused,borderWidth:o.borderWidthHalfpulse}},hasDisabled:{true:{borderColor:"transparent",backgroundColor:"transparent",borderWidth:o.borderWidthNone}}}})),F6=l(Xs,o=>({base:{flexDirection:"row",alignItems:"center",gap:o.spacingInlineOnepulse,borderRadius:o.borderRadiusPill,justifyContent:"center"},variants:{size:{md:{height:o.sizingMedium,paddingHorizontal:o.paddingInsetFourpulse},ml:{height:o.sizingMediumlarge,paddingHorizontal:o.paddingInsetFourpulse}},hasDisabled:{true:{borderColor:"transparent",backgroundColor:"transparent",borderWidth:o.borderWidthNone}}},compoundVariants:[{variants:{size:"ml"},css:{paddingLeft:o.paddingInsetFourpulse,paddingRight:o.paddingInsetFourpulse,paddingTop:o.paddingInsetTwopulse,paddingBottom:o.paddingInsetTwopulse}},{variants:{size:"md"},css:{paddingLeft:o.paddingInsetFourpulse,paddingRight:o.paddingInsetFourpulse,paddingTop:o.paddingInsetTwopulse,paddingBottom:o.paddingInsetTwopulse}}]}));import{jsx as A6,jsxs as qs}from"react/jsx-runtime";var z6=p=>{var C=p,{size:o="md",children:e,icon:t=!0,disabled:r,full:n}=C,s=g(C,["size","children","icon","disabled","full"]);let{pressed:d,setPressed:c,linkFocus:f,setLinkFocus:u}=w6(),y=Ks(),I=!!r,b={size:o,icon:t,hasPressed:d,hasDisabled:I,hasFull:n,hasFocused:f},T=W4.Children.map(e,P=>{if(W4.isValidElement(P)&&W4.isValidElement(P)&&P.type===r9)return W4.cloneElement(P,{size:o,disabled:r})});return A6(D6,a(i(a(i({},s),{ref:y.current,onPressIn:()=>c(!0),onPressOut:()=>c(!1),onFocus:()=>u(!0),onBlur:()=>u(!1)}),b),{children:qs(F6,a(i({},b),{children:[T,t&&A6(H,{symbol:"rdicon-open",size:"tiny",color:I?"colorTextNeutralDisabled":"colorTextNeutralDefault"})]}))}))};z6.displayName="Link";var O2={Root:z6,Label:r9};import C9 from"react";import{createContextScope as La}from"@radix-ui/react-context";import{ScrollView as Js,Text as js,View as N6}from"react-native";var E6=l(N6,o=>({base:{flex:1,borderWidth:o.borderWidthQuarterpulse,borderColor:o.colorBorderNeutralDefault,borderRadius:o.borderRadiusForm,overflow:"hidden",backgroundColor:o.colorFillNeutralDefault},variants:{}})),iL=l(Js,{base:{flexGrow:0},variants:{}}),B6=l(N6,o=>({base:{width:"100%",justifyContent:"center",alignItems:"flex-start",paddingVertical:o.paddingInsetTwopulse,paddingHorizontal:o.paddingInsetThreepulse+o.paddingInsetTwopulse},variants:{}})),k6=l(js,o=>({base:{fontFamily:o.fontFamily.regular,fontSize:o.fontSizeThreeandhalfpulse,lineHeight:S(o.fontSizeThreeandhalfpulse,o.lineHeightSmall),color:o.colorTextNeutralDefault,letterSpacing:v(o.letterSpacingDefault)},variants:{}}));import{View as aa}from"react-native";import{useCallback as ea}from"react";function Z2(o){return{measureLayout:ea(t=>{o.current&&o.current.measure((r,n,s,p,C,d)=>{t({x:r,y:n,width:s,height:p,pageX:C,pageY:d})})},[o])}}import{useCallback as u4,useEffect as O6,useRef as Z6,useState as W6}from"react";var ta={recalculationDelay:0,tolerance:1};function W2({isActive:o,config:e={}}){let t=i(i({},ta),e),[r,n]=W6(null),[s,p]=W6(!1),C=Z6(null),d=Z6(null);Z2(C),O6(()=>()=>{d.current&&clearTimeout(d.current)},[]);let c=u4(()=>{C.current&&C.current.measureInWindow((b,T,P,x)=>{n({x:b,y:T,width:P,height:x}),p(!0)})},[]),f=u4(()=>{p(!1),n(null)},[]),u=u4((b=t.recalculationDelay)=>{d.current&&clearTimeout(d.current),p(!1),b>0?d.current=setTimeout(c,b):c()},[c,t.recalculationDelay]),y=u4(b=>r?Math.abs(r.width-b.width)>t.tolerance||Math.abs(r.height-b.height)>t.tolerance:!0,[r,t.tolerance]);O6(()=>{o?u():f()},[o,u,f]);let I=u4(b=>{u(0)},[u]);return{layout:r,isLayoutReady:s,elementRef:C,recalculateLayout:c,handleLayoutChange:I,hasLayoutChanged:y}}import{useMemo as ra}from"react";import{useWindowDimensions as na}from"react-native";function _4({triggerLayout:o,contentLayout:e,preferredSide:t="bottom",preferredAlign:r="middle",gap:n=8,screenPadding:s=16,fixedLateralWidth:p,autoPosition:C=!0}){let{width:d,height:c}=na();return ra(()=>{if(!C||!o||!e)return{side:t,align:r};let f=2,u=o.x,y=o.y,I=o.width,b=o.height,T=e.height,P=V=>p&&(V==="left"||V==="right")?p:e.width,x=(V,E)=>{let B=0,l1=0,C1=P(V);switch(V){case"top":l1=y-T-n;break;case"bottom":l1=y+b+n;break;case"left":B=u-C1-n,l1=y+(b-T)/f;break;case"right":B=u+I+n,l1=y+(b-T)/f;break}if(V==="top"||V==="bottom"){let E2=u+I/f;switch(E){case"start":B=Math.max(s,Math.min(u,d-C1-s));break;case"middle":{let z4=E2-C1/f;B=Math.max(s,Math.min(z4,d-C1-s))}break;case"end":B=Math.max(s,u+I-C1);break}}if(V==="left"||V==="right")switch(E){case"start":l1=y;break;case"middle":l1=y+(b-T)/f;break;case"end":l1=y+b-T;break}let p4=l1>=s&&l1+T<=c-s,o2;return V==="left"?o2=u-n-s>=C1:V==="right"?o2=d-(u+I)-n-s>=C1:o2=B>=s&&B+C1<=d-s,p4&&o2},h=(V,E)=>(V==="left"||V==="right")&&p!==void 0?"middle":E,R=["top","bottom","left","right"],M=["start","middle","end"],k=h(t,r);if(x(t,k))return{side:t,align:k};for(let V of M){let E=h(t,V);if(E!==k&&x(t,E))return{side:t,align:E}}for(let V of R){let E=h(V,r);if(V!==t&&x(V,E))return{side:V,align:E}}for(let V of R)for(let E of M){let B=h(V,E);if(x(V,B))return{side:V,align:B}}let o1=y,N=c-(y+b),e1=u,t1=d-(u+I),i1=Math.max(o1,N,e1,t1),z;i1===o1?z="top":i1===N?z="bottom":i1===e1?z="left":z="right";let j="middle";if(z==="top"||z==="bottom"){let V=P(z),B=u+I/f-V/f;B<s?j="start":B+V>d-s&&(j="end")}return{side:z,align:h(z,j)}},[o,e,t,r,n,d,c,s,p,C])}import{useMemo as sa}from"react";var r2=(n=>(n.TOP="top",n.BOTTOM="bottom",n.LEFT="left",n.RIGHT="right",n))(r2||{}),f2=(r=>(r.START="start",r.MIDDLE="middle",r.END="end",r))(f2||{});import{Dimensions as n9}from"react-native";var G4=8,ia=({align:o,side:e,contentGap:t,contentLayout:r,rootLayout:n})=>{let s={start:{alignSelf:"flex-end",right:(()=>{let I=n9.get("window").width-(((n==null?void 0:n.x)||0)+((n==null?void 0:n.width)||0))+((n==null?void 0:n.width)||0)/2+16-((r==null?void 0:r.width)||0);return Math.max(I,0)})()},middle:{left:(()=>{let c=n9.get("window").width,f=(r==null?void 0:r.width)||0,u=((n==null?void 0:n.x)||0)+((n==null?void 0:n.width)||0)/2-f/2-G4;return u+f+G4>c&&(u=c-f-G4),u=Math.max(G4,u),u})()},end:{left:(()=>{let u=((n==null?void 0:n.x)||0)+((n==null?void 0:n.width)||0)/2+16-((r==null?void 0:r.width)||0);return Math.max(u,0)})()}},p={start:{top:((n==null?void 0:n.height)||0)/2+((r==null?void 0:r.height)||0)/2-16-8/2},middle:{top:((n==null?void 0:n.height)||0)/2},end:{top:((n==null?void 0:n.height)||0)/2-((r==null?void 0:r.height)||0)/2+16+8/2}},C=e==="top"||e==="bottom",d=e==="left"||e==="right";return C?s[o]||{}:d?p[o]||{}:{}},la=({side:o,contentGap:e,contentLayout:t,rootLayout:r})=>({top:{container:{},wrapper:{top:-((t==null?void 0:t.height)||0)-e-8,flexDirection:"column-reverse",justifyContent:"flex-end"}},bottom:{container:{},wrapper:{justifyContent:"flex-end",top:e+8}},left:{container:{maxWidth:(()=>{let c=((r==null?void 0:r.x)||0)-8-8-8;return Math.max(c,0)})()},wrapper:{top:-((t==null?void 0:t.height)||0)/2,flexDirection:"row-reverse",justifyContent:"flex-end"}},right:{container:{maxWidth:(()=>{let u=n9.get("window").width-(((r==null?void 0:r.x)||0)+((r==null?void 0:r.width)||0))-8-8-8;return Math.max(u,0)})()},wrapper:{top:-((t==null?void 0:t.height)||0)/2,flexDirection:"row",justifyContent:"flex-end"}}})[o]||{container:{},wrapper:{}},_6=({align:o,side:e,contentGap:t,rootLayout:r,contentLayout:n})=>{let s=la({side:e,contentGap:t,contentLayout:n,rootLayout:r}),p=ia({align:o,side:e,contentGap:t,contentLayout:n,rootLayout:r});return{container:i(i({},s.container),p),wrapper:s.wrapper}};function U4({side:o,align:e,autoPosition:t=!0,rootLayout:r,contentLayout:n,gap:s,screenPadding:p}){let C=o.toString(),d=e.toString(),c=_4({triggerLayout:r||null,contentLayout:n||null,preferredSide:C,preferredAlign:d,gap:s,screenPadding:p,autoPosition:t});return sa(()=>{let f=t?r2[c.side.toUpperCase()]:o,u=t?f2[c.align.toUpperCase()]:e,y=_6({align:u,side:f,contentGap:s,rootLayout:r,contentLayout:n});return{side:f,align:u,styles:y}},[t,o,e,s,r,n,c])}var Q4={hasLayoutChanged(o,e,t=1){return o?Math.abs(o.width-e.width)>t||Math.abs(o.height-e.height)>t:!0}};import{jsx as pa}from"react/jsx-runtime";function Y4(){let o=O();return pa(aa,{style:{width:"100%",height:1,backgroundColor:o.colorBorderNeutralDefault}})}import{View as ca}from"react-native";import{View as Ca}from"react-native";var G6=l(Ca,o=>({base:{flexDirection:"row",alignItems:"center",gap:o.spacingInlineThreepulse,padding:o.paddingInsetThreepulse,borderTopWidth:o.borderWidthQuarterpulse,borderColor:o.colorBorderNeutralDefault,backgroundColor:o.colorFillNeutralDefault},variants:{}}));import{jsx as X4}from"react/jsx-runtime";function i9({controls:o,testID:e}){if(!o)throw new Error("Controls cannot be undefined.");return X4(G6,{testID:e,children:o.slice(0,2).map((t,r)=>{let n=t.type==="confirm"?"brand-primary":"neutral-tertiary";return X4(ca,{style:{flex:1},children:X4(L.Root,{variant:n,onPress:t.handler,size:"lg",children:X4(L.Label,{children:t.label})})},String(r))})})}import{Text as ua,View as U6}from"react-native";var Q6=l(U6,o=>({base:{paddingTop:o.paddingInsetThreepulse,gap:o.spacingInlineThreepulse,backgroundColor:"transparent"},variants:{}})),Y6=l(U6,o=>({base:{paddingVertical:o.paddingInsetTwopulse,paddingHorizontal:o.paddingInsetFivepulse},variants:{}})),X6=l(ua,o=>({base:{fontFamily:o.fontFamily.bold,fontSize:o.fontSizeThreeandhalfpulse,color:o.colorTextNeutralReadonly,lineHeight:S(o.fontSizeThreeandhalfpulse,o.lineHeightSmall)},variants:{}}));import{jsx as l9,jsxs as ma}from"react/jsx-runtime";function $4({children:o,title:e}){let t=!!(e!=null&&e.length);return ma(Q6,{children:[l9(Y4,{}),l9(Y6,{children:t&&l9(X6,{children:e})}),o]})}import{useCallback as ya,useState as Ta}from"react";import{Pressable as ga,Text as $6,View as s9}from"react-native";var K6=l(ga,o=>({base:{paddingVertical:o.paddingInsetOnepulse,paddingHorizontal:o.paddingInsetTwopulse},variants:{}})),q6=l(s9,o=>({base:{minHeight:o.sizingMediumlarge,flexDirection:"row",alignItems:"center",gap:o.spacingInlineOnepulse,borderRadius:o.borderRadiusPill,paddingVertical:o.paddingInsetTwopulse,backgroundColor:o.colorActionFillNeutralTertiaryEnabled},variants:{type:{single:{paddingHorizontal:o.paddingInsetThreepulse},multi:{paddingLeft:o.paddingInsetOnepulse,paddingRight:o.paddingInsetThreepulse}},hasPressed:{true:{backgroundColor:o.colorActionFillNeutralTertiaryPressed}},hasDisabled:{true:{backgroundColor:o.colorActionFillNeutralTertiaryDisabled}}}})),J6=l(s9,o=>({base:{flex:1,gap:o.spacingStackHalfpulse,backgroundColor:"transparent"},variants:{}})),j6=l($6,o=>({base:{fontFamily:o.fontFamily.regular,fontSize:o.fontSizeThreeandhalfpulse,lineHeight:S(o.fontSizeThreeandhalfpulse,o.lineHeightSmall),letterSpacing:v(o.letterSpacingDefault),color:o.colorTextNeutralDefault},variants:{hasDisabled:{true:{color:o.colorTextNeutralDisabled}}}})),oe=l($6,o=>({base:{fontFamily:o.fontFamily.regular,fontSize:o.fontSizeThreepulse,lineHeight:S(o.fontSizeThreepulse,o.lineHeightMedium),letterSpacing:v(o.letterSpacingDefault),color:o.colorTextNeutralPlaceholder},variants:{hasDisabled:{true:{color:o.colorTextNeutralDisabled}}}})),ee=l(s9,o=>({base:{padding:o.paddingInsetTwopulse},variants:{}}));function te(o,e){return{checkboxSymbol:!o&&e?"rdicon-checkbox-checked":"rdicon-checkbox-unchecked",checkboxColor:o?"colorTextNeutralDisabled":e?"colorActionFillBrandPrimaryEnabled":"colorTextNeutralDefault",prefixIconColor:o?"colorTextNeutralDisabled":"colorTextNeutralDefault",checkColor:o?"colorTextNeutralDisabled":"colorTextSuccessAlternative"}}import{jsx as w2,jsxs as re}from"react/jsx-runtime";function K4(o){var h,R;let x=o,{type:e="single",content:t,checked:r,disabled:n,testID:s}=x,p=g(x,["type","content","checked","disabled","testID"]),[C,d]=Ta(!1),c=!!((h=t.prefixIcon)!=null&&h.length),f=!!((R=t.description)!=null&&R.length),u=!!n,{checkboxSymbol:y,checkboxColor:I,prefixIconColor:b,checkColor:T}=te(u,r),P=ya(M=>{d(M==="in")},[]);return w2(K6,a(i({},p),{onPressIn:()=>P("in"),onPressOut:()=>P("out"),disabled:u,testID:s,children:re(q6,{type:e,hasPressed:C,hasDisabled:u,children:[e==="multi"&&w2(ee,{children:w2(H,{symbol:y,color:I,size:"small"})}),c&&w2(H,{symbol:t.prefixIcon,color:b,size:"small"}),re(J6,{children:[w2(j6,{hasDisabled:u,children:t.label}),f&&w2(oe,{hasDisabled:u,numberOfLines:1,ellipsizeMode:"tail",children:t.description})]}),e==="single"&&r?w2(H,{symbol:"rdicon-checkmark",color:T,size:"small"}):null]})}))}import q4 from"react";import{ScrollView as Ia}from"react-native";import Sa from"react";function a9(o){return Sa.isValidElement(o)&&o.type===K4}function ne(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,o=>{let e=Math.random()*16|0;return(o==="x"?e:e&3|8).toString(16)})}import{jsx as Pa}from"react/jsx-runtime";var xa="Only Fragment, OptionMenu.Item and Group components are allowed as children of OptionMenu.List. Please remove or replace any other elements.";function p9(o){let{__scopeOptionMenu:e,children:t,testID:r}=o,n=O(),{type:s}=ie("OptionMenuList",e),p=[];return q4.Children.forEach(t,C=>{if(q4.isValidElement(C)){if(C.type===q4.Fragment){let d=C.props.children;p=[...p,d];return}if(a9(C)||C.type===$4)p.push(C);else throw new Error(xa)}}),p=p.map(C=>a9(C)?q4.cloneElement(C,{key:ne(),type:s}):C),Pa(Ia,{contentContainerStyle:{paddingVertical:n.spacingInlineOnepulse},bounces:!1,testID:r,children:p})}import{jsx as J4}from"react/jsx-runtime";var d9="OptionMenu";function le(o){let{type:e,children:t,customEmptyMessage:r="N\xE3o foi encontrado nenhum resultado.",__scopeOptionMenu:n,maxHeight:s=320,testID:p}=o,C=C9.Children.map(t,d=>{if(C9.isValidElement(d)&&(d.type===p9||d.type===i9))return d});return J4(va,{scope:n,type:e,children:J4(E6,{style:{maxHeight:s},testID:p,children:C9.Children.count(t)>0?C:J4(B6,{children:J4(k6,{children:r})})})})}le.displayName=d9;var[ha]=La(d9),[va,ie]=ha(d9),$1={Root:le,List:p9,Item:K4,Footer:i9,Divider:Y4,Group:$4};import{Text as Ha,View as Ra}from"react-native";var se=l(Ra,o=>({base:{flexDirection:"row",alignItems:"flex-start",justifyContent:"flex-start",gap:o.spacingInlineOnepulse,backgroundColor:"transparent",paddingHorizontal:o.paddingInsetOnepulse,paddingTop:o.spacingInlineHalfpulse},variants:{}})),ae=l(Ha,o=>({base:{fontFamily:o.fontFamily.semiBold,fontSize:o.fontSizeThreepulse,color:o.colorTextNeutralAlternative,flexShrink:1,lineHeight:S(o.fontSizeThreepulse,o.lineHeightMedium)},variants:{hasError:{true:{color:o.colorTextDangerAlternative}},disabled:{true:{color:o.colorTextNeutralDisabled}},readonly:{true:{color:o.colorTextNeutralReadonly}}},compoundVariants:[{variants:{disabled:!0,readonly:!0},css:{color:o.colorTextNeutralDisabled}}]}));import{jsx as Ce,jsxs as Va}from"react/jsx-runtime";var pe="rdicon-warning-circle";function f1({children:o,withIcon:e=!1,hasError:t=!1,disabled:r=!1,readonly:n=!1,iconSize:s="medium",iconName:p=pe,testID:C}){return Va(se,{testID:C,children:[e&&Ce(H,{size:s,symbol:t?pe:p,color:t?"colorTextDangerAlternative":r?"colorTextNeutralDisabled":n?"colorTextNeutralReadonly":"colorTextNeutralAlternative"}),Ce(ae,{numberOfLines:2,disabled:r,readonly:n,hasError:t,children:o})]})}import ka from"react";import{Platform as wa,TextInput as Da}from"react-native";var de=l(Da,o=>{let e=wa.OS==="web"?{outlineWidth:o.sizingNone}:{};return{base:i({width:"100%",height:o.sizingMedium,flex:1,fontSize:o.fontSizeThreeandhalfpulse,paddingHorizontal:o.paddingInsetOnepulse,paddingVertical:o.paddingInsetOnepulse,fontFamily:o.fontFamily.regular,color:o.colorTextNeutralAlternative,backgroundColor:"transparent"},e),variants:{size:{md:{height:o.sizingExtrasmall,fontSize:o.fontSizeThreepulse},ml:{height:o.sizingSmall},lg:{height:o.sizingSmall},xl:{height:o.sizingSmall}},isActive:{true:{color:o.colorTextNeutralDefault}},disabled:{true:{color:o.colorTextNeutralDisabled}},readonly:{true:{color:o.colorTextNeutralReadonly}}}}});import{useContext as Ba}from"react";import{createContext as Aa,useState as za}from"react";import{jsx as Ea}from"react/jsx-runtime";var c9=Aa({isActive:!1,setIsActive:o=>{},inputValue:"",isFilled:!1,errorText:""}),{Provider:Na}=c9;function ce(r){var n=r,{children:o,value:e}=n,t=g(n,["children","value"]);let[s,p]=za(!1),C=a(i({},t),{isActive:s,setIsActive:p,inputValue:e,isFilled:e.length>0});return Ea(Na,{value:i({},C),children:o})}function m1(){return Ba(c9)}import{jsx as Oa}from"react/jsx-runtime";var ue=ka.forwardRef((r,t)=>{var n=r,{onFocus:o}=n,e=g(n,["onFocus"]);let{id:s,size:p,inputValue:C,disabled:d,readonly:c,isActive:f,setIsActive:u,onChangeText:y}=m1(),I=x=>{u(!0)},b=x=>{u(!1)},T=d||c,P=!T||!c;return Oa(de,a(i({},e),{ref:t,size:p,onFocus:I,onBlur:b,onChangeText:y,value:C,"aria-label":s,nativeID:s,cursorColor:"black",editable:T?!1:P,disabled:T,readonly:c,isActive:f}))});import{Text as Za}from"react-native";var fe=l(Za,o=>({base:{fontFamily:o.fontFamily.regular,paddingHorizontal:o.paddingInsetOnepulse,paddingVertical:o.paddingInsetHalfpulse,fontSize:o.fontSizeThreeandhalfpulse,color:o.colorTextNeutralDefault,maxHeight:o.sizingExtrasmall},variants:{size:{md:{maxHeight:o.sizingExtrasmall,fontSize:o.fontSizeThreepulse},ml:{maxHeight:o.sizingMediumlarge},lg:{maxHeight:o.sizingLarge},xl:{maxHeight:o.sizingExtralarge}},disabled:{true:{color:o.colorTextNeutralDisabled}},readonly:{true:{color:o.colorTextNeutralReadonly}}},compoundVariants:[{variants:{disabled:!0,readonly:!0},css:{color:o.colorTextNeutralDisabled}}]}));import{jsx as _a}from"react/jsx-runtime";var u9=({children:o})=>{let{disabled:e,readonly:t,size:r}=m1();return _a(fe,{numberOfLines:1,disabled:e,readonly:t,size:r,children:o})};import{Children as Xa,isValidElement as $a}from"react";import{View as Ga}from"react-native";var me=l(Ga,o=>({base:{display:"flex"},variants:{isActive:{true:{display:"none"}}}}));import{jsx as f9}from"react/jsx-runtime";function j4(r){var n=r,{onPress:o,testID:e}=n,t=g(n,["onPress","testID"]);let{size:s="md",isActive:p,isFilled:C,onChangeText:d}=m1(),c={md:"md",ml:"ml",lg:"ml",xl:"ml"};function f(u){d==null||d(""),o==null||o(u)}return C?f9(me,{isActive:!C||p===!1,children:f9(L.Root,a(i({},t),{variant:"neutral-tertiary",size:c[s],onPressIn:f,onPressOut:f,testID:e,children:f9(L.Icon,{symbol:"rdicon-dismiss-circle-outline"})}))}):null}import{View as Qa}from"react-native";var ge=l(Qa,o=>({base:{display:"flex",gap:o.spacingInlineOnepulse,flexDirection:"row",alignItems:"center",justifyContent:"space-between",minWidth:o.spacingStackTwentypulse,width:"100%",backgroundColor:o.colorFormsFillDefault,borderRadius:o.borderRadiusForm,borderWidth:o.borderWidthHalfpulse,borderColor:"transparent",paddingVertical:o.paddingInsetOnepulse,paddingHorizontal:o.paddingInsetThreepulse},variants:{size:{md:{height:o.sizingMedium,borderWidth:o.borderWidthHalfpulse},ml:{height:o.sizingMediumlarge},lg:{height:o.sizingLarge},xl:{height:o.sizingExtralarge,borderRadius:o.borderRadiusLargecontainer}},isActive:{true:{borderWidth:o.borderWidthHalfpulse,backgroundColor:o.colorFormsFillFocused,borderColor:o.colorActionBorderFocused,paddingHorizontal:o.paddingInsetNone,paddingLeft:o.paddingInsetTwopulse}},hasCleanerButton:{true:{}},isFilled:{true:{borderColor:o.colorFormsBorderFilled,backgroundColor:o.colorFormsFillFilled,borderWidth:o.borderWidthQuarterpulse}},hasError:{true:{borderWidth:o.borderWidthQuarterpulse,borderColor:o.colorFormsBorderError}},disabled:{true:{backgroundColor:o.colorFormsFillDisabled,borderColor:o.colorFormsBorderDisabled,borderWidth:o.borderWidthQuarterpulse}},readonly:{true:{backgroundColor:o.colorFormsFillReadonly,borderColor:o.colorFormsBorderReadonly}}},compoundVariants:[{variants:{isFilled:!0,isActive:!0},css:{borderWidth:o.borderWidthHalfpulse,borderColor:o.colorActionBorderFocused,backgroundColor:o.colorFormsFillFocused}},{variants:{disabled:!0,readonly:!0},css:{backgroundColor:o.colorFormsFillDisabled,borderColor:o.colorFormsBorderDisabled,borderWidth:o.borderWidthQuarterpulse}},{variants:{isFilled:!0,isActive:!0,hasCleanerButton:!1},css:{borderWidth:o.borderWidthHalfpulse,borderColor:o.colorActionBorderFocused,backgroundColor:o.colorFormsFillFocused,paddingRight:o.paddingInsetTwopulse}},{variants:{isFilled:!1,isActive:!0},css:{paddingRight:o.paddingInsetTwopulse}},{variants:{isFilled:!0,isActive:!0,hasError:!0},css:{borderWidth:o.borderWidthHalfpulse,borderColor:o.colorFormsBorderError,backgroundColor:o.colorFormsFillFocused}},{variants:{isActive:!0,hasError:!0},css:{borderWidth:o.borderWidthHalfpulse,borderColor:o.colorFormsBorderError,backgroundColor:o.colorFormsFillFocused}}]}));import{jsx as Ka}from"react/jsx-runtime";var m9=({children:o})=>{let{size:e,isActive:t,inputValue:r,id:n,hasError:s,disabled:p,readonly:C}=m1(),d=r.length>0,c=Xa.toArray(o).some(f=>$a(f)&&f.type===j4);return Ka(ge,{size:e,role:"form",isActive:t,isFilled:d,hasCleanerButton:c,"aria-label":n,hasError:s,disabled:p,readonly:C,children:o})};import{jsx as qa}from"react/jsx-runtime";function be(r){var n=r,{symbol:o="rdicon-default",testID:e}=n,t=g(n,["symbol","testID"]);let{hasError:s,disabled:p,readonly:C,size:d}=m1(),c=()=>p?"colorTextNeutralDisabled":C?"colorTextNeutralReadonly":"colorTextNeutralDefault";return qa(H,i({symbol:o,testID:e,size:d==="md"?"extra-small":"small",color:c()},t))}import{jsx as Ja}from"react/jsx-runtime";var g9=({children:o,withIcon:e=!1,iconName:t="rdicon-warning-circle"})=>{let{hasError:r,disabled:n,readonly:s}=m1();return r?null:Ja(f1,{disabled:n,readonly:s,withIcon:e,iconName:t,iconSize:"tiny",children:o})};import{Children as ep,isValidElement as tp}from"react";import{View as ja}from"react-native";var ye=l(ja,o=>({base:{flexDirection:"column",gap:o.spacingStackHalfpulse,backgroundColor:"transparent"},variants:{}}));var Te="The internal components of the InputText must be its own elements. For more information, see the documentation.";import{jsx as Se,jsxs as np}from"react/jsx-runtime";var rp=u=>{var y=u,{children:o,size:e="md",full:t,disabled:r=!1,readonly:n=!1,hasError:s=!1,errorText:p="Dados inv\xE1lidos",value:C="",onChangeText:d,testID:c="inputTest"}=y,f=g(y,["children","size","full","disabled","readonly","hasError","errorText","value","onChangeText","testID"]);let{isActive:I,setIsActive:b}=m1(),T=ep.map(o,x=>{if(tp(x)){if(x.type===u9||x.type===m9||x.type===g9)return x;if(e2()){t2.warning(Te);return}}});return Se(ce,a(i({},{size:e,full:t,hasError:s,errorText:p,disabled:r,readonly:n,value:C,onChangeText:d,isActive:I,setIsActive:b,testID:c}),{children:np(ye,a(i({},f),{testID:c,children:[T,s&&Se(f1,{disabled:r,readonly:n,hasError:s,withIcon:!0,iconName:"rdicon-warning-circle",iconSize:"tiny",children:p})]}))}))},g1={Root:rp,Field:ue,Lab