@plenustech/design-system 0.2.0 → 0.2.1

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.
@@ -1,2 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),l=require("react"),an=require("d3-scale"),Nn=require("d3-array"),gt=require("d3-shape"),At=require("d3-sankey"),St=require("d3-hierarchy"),Pe=require("react-dom"),ve=require("@react-aria/overlays"),re=require("@internationalized/date"),Ln=require("@react-aria/focus");function Le({children:e,label:t,size:n="1em",...s}){const r=t??s["aria-label"];return o.jsx("svg",{"aria-hidden":r?void 0:!0,"aria-label":r,fill:"currentColor",focusable:"false",height:n,role:r?"img":void 0,viewBox:"0 0 16 16",width:n,xmlns:"http://www.w3.org/2000/svg",...s,children:e})}function oo(e){return o.jsx(Le,{...e,children:o.jsx("path",{fillRule:"evenodd",d:"M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1"})})}function ys(e){return o.jsx(Le,{...e,children:o.jsx("path",{fillRule:"evenodd",d:"M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5"})})}function In(e){return o.jsx(Le,{...e,children:o.jsx("path",{d:"M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V5h16V4H0V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5"})})}function xs(e){return o.jsx(Le,{...e,children:o.jsx("path",{fillRule:"evenodd",d:"M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708"})})}function An(e){return o.jsx(Le,{...e,children:o.jsx("path",{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"})})}function rn(e){return o.jsx(Le,{...e,children:o.jsx("path",{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"})})}function ao(e){return o.jsx(Le,{...e,children:o.jsx("path",{fillRule:"evenodd",d:"M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708z"})})}function vs(e){return o.jsx(Le,{...e,children:o.jsx("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71z"})})}function js(e){return o.jsx(Le,{...e,children:o.jsx("path",{d:"M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z"})})}function $s(e){return o.jsxs(Le,{...e,children:[o.jsx("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"}),o.jsx("path",{d:"M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8"})]})}function Ms(e){return o.jsxs(Le,{...e,children:[o.jsx("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"}),o.jsx("path",{d:"M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4"})]})}const ro="_spinner_nob8y_1",io="_sm_nob8y_10",lo="_md_nob8y_15",co="_lg_nob8y_21",Gn={spinner:ro,"pl-spin":"_pl-spin_nob8y_1",sm:io,md:lo,lg:co};function Ns({className:e,label:t,size:n="md",...s}){const r=[Gn.spinner,Gn[n],e].filter(Boolean).join(" ");return t?o.jsx("span",{...s,className:r,role:"status","aria-label":t}):o.jsx("span",{...s,className:r,"aria-hidden":"true"})}const uo="_button_1opic_1",fo="_primary_1opic_37",mo="_secondary_1opic_47",ho="_soft_1opic_59",_o="_ghost_1opic_70",po="_danger_1opic_81",go="_sm_1opic_92",bo="_md_1opic_98",yo="_lg_1opic_102",_n={button:uo,primary:fo,secondary:mo,soft:ho,ghost:_o,danger:po,sm:go,md:bo,lg:yo},it=l.forwardRef(({children:e,className:t,disabled:n=!1,loading:s=!1,onClick:r,size:a="md",type:i="button",variant:c="primary",...u},f)=>{const h=[_n.button,_n[c],_n[a],t].filter(Boolean).join(" ");function y(d){if(s){d.preventDefault();return}r==null||r(d)}return o.jsxs("button",{...u,ref:f,className:h,disabled:n,"aria-disabled":s||void 0,"aria-busy":s||void 0,onClick:y,type:i,children:[s&&o.jsx(Ns,{size:a==="lg"?"md":"sm"}),e]})}),xo="_label_1uf9d_1",vo="_required_1uf9d_12",Wn={label:xo,required:vo};function ks({children:e,className:t,required:n=!1,...s}){const r=[Wn.label,t].filter(Boolean).join(" ");return o.jsxs("label",{...s,className:r,children:[e,n&&o.jsx("span",{className:Wn.required,"aria-hidden":"true",children:"*"})]})}const jo="_field_wy7pm_1",$o="_hint_wy7pm_8",Mo="_errorMessage_wy7pm_9",No="_characterCount_wy7pm_10",ko="_formValue_wy7pm_31",Ot={field:jo,hint:$o,errorMessage:Mo,characterCount:No,formValue:ko};function We({"aria-describedby":e,className:t,characterCount:n=0,children:s,error:r,hint:a,id:i,label:c,maxLength:u,required:f=!1,showCharacterCount:h=!1,...y}){const d=l.useId(),p=i??`field-${d}`,m=`${p}-message`,b=`${p}-character-count`,_=[e,r||a?m:void 0,h?b:void 0].filter(Boolean).join(" ")||void 0;return o.jsxs("div",{...y,className:[Ot.field,t].filter(Boolean).join(" "),children:[c&&o.jsx(ks,{htmlFor:p,required:f,children:c}),s({id:p,describedBy:_,invalid:!!r}),(r||a)&&o.jsx("span",{className:r?Ot.errorMessage:Ot.hint,id:m,children:r||a}),h&&o.jsx("span",{className:Ot.characterCount,id:b,children:u?`${n}/${u}`:n})]})}function Kt(e){return String(e??"").length}function Ds(e,t){const n=l.useRef(null),[s,r]=l.useState(()=>Kt(t));return l.useEffect(()=>{var c;const a=(c=n.current)==null?void 0:c.form;if(!a)return;function i(){r(Kt(t))}return a.addEventListener("reset",i),()=>a.removeEventListener("reset",i)},[t]),{ref:n,count:e===void 0?s:Kt(e),updateCount(a){e===void 0&&r(Kt(a))}}}function Do(e,t){if(typeof e=="function"){const n=e(t);return typeof n=="function"?n:()=>e(null)}return e?(e.current=t,()=>{e.current=null}):()=>{}}function $e(...e){return l.useMemo(()=>t=>{const n=e.map(s=>Do(s,t));return()=>n.forEach(s=>s())},e)}const wo="_input_1rs88_1",Ro="_error_1rs88_20",Co="_sm_1rs88_38",Lo="_md_1rs88_44",pn={input:wo,error:Ro,sm:Co,md:Lo};function On({"aria-describedby":e,"aria-invalid":t,className:n,error:s,hint:r,id:a,label:i,maxLength:c,required:u=!1,size:f="md",showCharacterCount:h=!1,defaultValue:y,onChange:d,value:p,ref:m,...b}){const{ref:_,count:$,updateCount:j}=Ds(p,y),g=$e(_,m),N=[pn.input,pn[f],s&&pn.error,n].filter(Boolean).join(" ");function v(R){j(R.target.value),d==null||d(R)}return o.jsx(We,{"aria-describedby":e,characterCount:$,error:s,hint:r,id:a,label:i,maxLength:c,required:u,showCharacterCount:h,children:({id:R,describedBy:E,invalid:B})=>o.jsx("input",{...b,defaultValue:y,id:R,ref:g,"aria-describedby":E,"aria-invalid":B||t,className:N,maxLength:c,onChange:v,required:u,value:p})})}const pt=",",ws=3;function Rs(e){const t=e.split(".");return e.includes(pt)||t.length!==2?null:{inteiro:t[0].replace(/\D/g,""),fracao:t[1].replace(/\D/g,"")}}function Io(e){const t=Rs(e);return t!==null&&(Number(t.inteiro)===0||t.fracao.length!==ws)?e.replace(".",pt):e.replace(/\./g,"")}function Ao(e,t){return Number.isFinite(e)?new Intl.NumberFormat("en-US",{maximumFractionDigits:Math.max(t,0),useGrouping:!1}).format(e).replace(".",pt):""}function Cs(e){return e.trimStart().startsWith("-")?"-":""}function at(e,t=0){const n=typeof e=="number"?Ao(e,t):Io(e),s=Cs(n),r=n.replace(/[^\d,]/g,""),[a="",...i]=r.split(pt),c=a.replace(/\D/g,"");if(t<=0)return`${s}${c}`;if(!r.includes(pt))return`${s}${c}`;const u=i.join("").replace(/\D/g,"").slice(0,t);return`${s}${c}${pt}${u}`}function Oo(e,t=0){const n=Rs(e);return t<=0||n===null||Number(n.inteiro)===0||n.fracao.length>=ws?at(e,t):`${Cs(e)}${n.inteiro}.${n.fracao}`}function So(e){var t;try{return((t=new Intl.NumberFormat("pt-BR",{currency:e,style:"currency"}).formatToParts(0).find(s=>s.type==="currency"))==null?void 0:t.value)??e}catch{return e}}function Eo(e,t="BRL",n=2){const s=at(e,n),r=s.startsWith("-")?"-":"",[a="",i=""]=s.replace("-","").split(","),u=(a||"0").replace(/\B(?=(\d{3})+(?!\d))/g,"."),f=So(t);return n<=0?`${r}${f} ${u}`:`${r}${f} ${u},${i.padEnd(n,"0")}`}const To={numerico:{day:"2-digit",month:"2-digit",year:"numeric"},curto:{day:"2-digit",month:"short",year:"numeric"},longo:{day:"2-digit",month:"long",year:"numeric"}},zo=/^\d{4}-\d{2}-\d{2}$/;function Ls(e){if(e instanceof Date)return e;if(zo.test(e)){const[t,n,s]=e.split("-").map(Number);return new Date(t,n-1,s)}return new Date(e)}function Fo(e,{localidade:t="pt-BR",formato:n="numerico"}={}){const s=Ls(e);return Number.isNaN(s.getTime())?"":new Intl.DateTimeFormat(t,To[n]).format(s)}function Po(e,{localidade:t="pt-BR",segundos:n=!1}={}){const s=typeof e=="string"&&/^\d{2}:\d{2}/.test(e)?new Date(`1970-01-01T${e}`):Ls(e);return Number.isNaN(s.getTime())?"":new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",second:n?"2-digit":void 0,hourCycle:"h23"}).format(s)}function Sn(e){return e===void 0?{}:{maximumFractionDigits:e,minimumFractionDigits:e}}function Is(e){return e?{compactDisplay:"short",notation:"compact"}:{}}const En={signDisplay:"negative"};function je(e,{casasDecimais:t,compacto:n,localidade:s="pt-BR"}={}){return Number.isFinite(e)?new Intl.NumberFormat(s,{...En,...Is(n),...Sn(t)}).format(e):""}function Bo(e,{casasDecimais:t,compacto:n,localidade:s="pt-BR",moeda:r="BRL"}={}){return Number.isFinite(e)?new Intl.NumberFormat(s,{...En,currency:r,style:"currency",...Is(n),...Sn(t)}).format(e):""}function As(e,{casasDecimais:t=0,localidade:n="pt-BR"}={}){return Number.isFinite(e)?new Intl.NumberFormat(n,{...En,style:"percent",...Sn(t)}).format(e):""}function Tn(e,t,n){const s=e.replace(/^\D+/,"").split(/\D+/),r=[];return s.forEach((a,i)=>{const c=i<s.length-1;let u=a;do{if(r.length===t.length)return;const f=t[r.length];r.push(u.slice(0,f)),u=c?"":u.slice(f)}while(u)}),r.map((a,i)=>i===0?a:n[i-1]+a).join("")}const Ho=/^\s*(\d{4})[/\-.](\d{1,2})[/\-.](\d{1,2})\s*$/;function Ko(e){const t=e.match(Ho),n=t?[t[3].padStart(2,"0"),t[2].padStart(2,"0"),t[1]].join("/"):e;return Tn(n,[2,2,4],["/","/"])}function Os(e){const t=e.trim().split(/[/\-.\s]+/).filter(Boolean);if(t.length!==3)return;const[n,s,r]=t.map(Number);if(![n,s,r].every(Number.isInteger)||r<1e3||s<1||s>12||n<1)return;const a=new re.CalendarDate(r,s,n);return a.day===n&&a.month===s?a:void 0}const qo=/^\d{1,2}:\d{2}$/;function Ss(e){return Tn(e,[2,2],[":"])}function tn(e){if(!qo.test(e))return;const[t,n]=e.split(":").map(Number);return t>23||n>59?void 0:new re.Time(t,n)}function Vo(e){return Tn(e,[2,2,4,2,2],["/","/"," ",":"])}function Uo(e){const[t,n=""]=e.trim().split(/\s+/),s=Os(t);if(!s)return;if(n==="")return new re.CalendarDateTime(s.year,s.month,s.day,0,0);const r=tn(n);return r&&new re.CalendarDateTime(s.year,s.month,s.day,r.hour,r.minute)}function xt(e){const t=l.useRef(null),n=l.useRef(e);return n.current=e,l.useEffect(()=>{var a;const s=(a=t.current)==null?void 0:a.closest("form");if(!s)return;const r=()=>n.current();return s.addEventListener("reset",r),()=>s.removeEventListener("reset",r)},[]),t}function Es({decimalScale:e,defaultValue:t,onValueChange:n,value:s}){const[r,a]=l.useState(()=>at(t,e)),[i,c]=l.useState(null),u=xt(()=>{a(at(t,e)),c(null)}),f=s===void 0?r:at(s,e),h=i!==null&&at(i,e)===f?i:f;function y(d){const p=at(d.target.value,e);c(Oo(d.target.value,e)),a(p),n==null||n(p)}return{ref:u,value:f,text:h,handleChange:y,endEditing:()=>c(null)}}function Go({decimalScale:e=0,defaultValue:t="",onBlur:n,onKeyDown:s,onValueChange:r,value:a,...i}){const c=Es({decimalScale:e,defaultValue:t,onValueChange:r,value:a}),u=$e(c.ref,i.ref);function f(y){c.endEditing(),n==null||n(y)}function h(y){e===0&&(y.key===","||y.key===".")&&y.preventDefault(),s==null||s(y)}return o.jsx(On,{...i,ref:u,inputMode:e>0?"decimal":"numeric",onBlur:f,onChange:c.handleChange,onKeyDown:h,pattern:e>0?void 0:"-?[0-9]*",type:"text",value:c.text})}const Wo="_control_1m42t_1",Xo="_input_1m42t_7",Zo="_error_1m42t_26",Yo="_sm_1m42t_44",Qo="_md_1m42t_51",Jo="_toggle_1m42t_67",Nt={control:Wo,input:Xo,error:Zo,sm:Yo,md:Qo,toggle:Jo};function ea({"aria-describedby":e,"aria-invalid":t,allowCopy:n=!1,className:s,defaultValue:r,disabled:a=!1,error:i,hint:c,id:u,label:f,maxLength:h,onChange:y,onCopy:d,onCut:p,onBlur:m,onValidationChange:b,required:_=!1,showToggle:$=!0,size:j="md",validate:g,validateOnBlur:N=!0,value:v,ref:R,...E}){const[B,k]=l.useState(!1),[H,M]=l.useState(!1),[I,F]=l.useState(),z=l.useRef(null),L=$e(z,R),T=i??I,C=[Nt.input,Nt[j],T&&Nt.error,s].filter(Boolean).join(" ");l.useEffect(()=>{var w;const D=(w=z.current)==null?void 0:w.form;if(!D)return;function S(){k(!1)}return D.addEventListener("submit",S),()=>D.removeEventListener("submit",S)},[]);function P(D){const S=g==null?void 0:g(D);F(S),b==null||b(S)}function G(D){g&&(H||!N)&&P(D.target.value),y==null||y(D)}function Q(D){M(!0),g&&N&&P(D.target.value),m==null||m(D)}function A(D){d==null||d(D),n||D.preventDefault()}function x(D){p==null||p(D),n||D.preventDefault()}return o.jsx(We,{"aria-describedby":e,error:T,hint:c,id:u,label:f,maxLength:h,required:_,children:({id:D,describedBy:S,invalid:w})=>o.jsxs("div",{className:Nt.control,children:[o.jsx("input",{...E,autoComplete:E.autoComplete??"current-password",className:C,defaultValue:r,disabled:a,id:D,ref:L,"aria-describedby":S,"aria-invalid":w||t,maxLength:h,onChange:G,onCopy:A,onCut:x,onBlur:Q,required:_,type:B?"text":"password",value:v}),$&&o.jsx("button",{className:Nt.toggle,type:"button","aria-label":B?"Ocultar senha":"Mostrar senha",disabled:a,onClick:()=>k(K=>!K),children:B?"Ocultar":"Mostrar"})]})})}function ta({currency:e="BRL",defaultValue:t="",decimalScale:n=2,onBlur:s,onFocus:r,onValueChange:a,value:i,...c}){const u=Es({decimalScale:n,defaultValue:t,onValueChange:a,value:i}),f=$e(u.ref,c.ref),[h,y]=l.useState(!1),d=h||!u.value?u.text:Eo(u.value,e,n);function p(b){y(!0),r==null||r(b)}function m(b){y(!1),u.endEditing(),s==null||s(b)}return o.jsx(On,{...c,ref:f,inputMode:"decimal",onBlur:m,onChange:u.handleChange,onFocus:p,type:"text",value:d})}const na="_textarea_1kzgu_1",sa="_error_1kzgu_20",oa="_sm_1kzgu_39",aa="_md_1kzgu_45",gn={textarea:na,error:sa,sm:oa,md:aa};function ra({"aria-describedby":e,"aria-invalid":t,className:n,error:s,hint:r,id:a,label:i,maxLength:c,required:u=!1,rows:f=4,size:h="md",showCharacterCount:y=!1,defaultValue:d,onChange:p,value:m,ref:b,..._}){const{ref:$,count:j,updateCount:g}=Ds(m,d),N=$e($,b),v=[gn.textarea,gn[h],s&&gn.error,n].filter(Boolean).join(" ");function R(E){g(E.target.value),p==null||p(E)}return o.jsx(We,{"aria-describedby":e,characterCount:j,error:s,hint:r,id:a,label:i,maxLength:c,required:u,showCharacterCount:y,children:({id:E,describedBy:B,invalid:k})=>o.jsx("textarea",{..._,defaultValue:d,id:E,ref:N,"aria-describedby":B,"aria-invalid":k||t,className:v,maxLength:c,onChange:R,required:u,rows:f,value:m})})}const ia="_field_thq98_1",la="_control_thq98_8",ca="_input_thq98_15",ua="_error_thq98_36",da="_text_thq98_76",fa="_hint_thq98_84 _hint_wy7pm_8",ma="_errorMessage_thq98_88 _errorMessage_wy7pm_9",tt={field:ia,control:la,input:ca,error:ua,text:da,hint:fa,errorMessage:ma};function Ts({"aria-describedby":e,"aria-invalid":t,className:n,error:s,hint:r,id:a,indeterminate:i=!1,label:c,ref:u,...f}){const h=l.useId(),y=a??`checkbox-${h}`,d=`${y}-message`,p=[e,s||r?d:void 0].filter(Boolean).join(" ")||void 0,m=[tt.input,s&&tt.error,n].filter(Boolean).join(" "),b=l.useCallback($=>{$&&($.indeterminate=i)},[i]),_=$e(b,u);return o.jsxs("div",{className:tt.field,children:[o.jsxs("label",{className:tt.control,htmlFor:y,children:[o.jsx("input",{...f,ref:_,className:m,id:y,"aria-describedby":p,"aria-invalid":s?!0:t,type:"checkbox"}),o.jsx("span",{className:tt.text,children:c})]}),(s||r)&&o.jsx("span",{className:s?tt.errorMessage:tt.hint,id:d,children:s||r})]})}const ha="_group_1nbsm_1",_a="_legend_1nbsm_11",pa="_required_1nbsm_20",ga="_options_1nbsm_25",ba="_control_1nbsm_31",ya="_input_1nbsm_38",xa="_error_1nbsm_59",va="_text_1nbsm_90",ja="_hint_1nbsm_98 _hint_wy7pm_8",$a="_errorMessage_1nbsm_102 _errorMessage_wy7pm_9",ze={group:ha,legend:_a,required:pa,options:ga,control:ba,input:ya,error:xa,text:va,hint:ja,errorMessage:$a},zs=l.createContext(null);function Ma(){const e=l.useContext(zs);if(!e)throw new Error("Radio precisa ser renderizado dentro de RadioGroup.");return e}function Na({"aria-describedby":e,"aria-invalid":t,children:n,className:s,defaultValue:r,disabled:a=!1,error:i,hint:c,label:u,name:f,onValueChange:h,required:y=!1,value:d,...p}){const m=l.useId(),b=f??`radio-group-${m}`,_=`radio-group-${m}-message`,$=[e,i||c?_:void 0].filter(Boolean).join(" ")||void 0;return o.jsx(zs.Provider,{value:{defaultValue:r,disabled:a,invalid:!!i,name:b,onValueChange:h,required:y,value:d},children:o.jsxs("fieldset",{...p,className:[ze.group,s].filter(Boolean).join(" "),role:"radiogroup","aria-describedby":$,"aria-invalid":i?!0:t,"aria-required":y||void 0,children:[o.jsxs("legend",{className:ze.legend,children:[u,y&&o.jsx("span",{className:ze.required,"aria-hidden":"true",children:"*"})]}),o.jsx("div",{className:ze.options,children:n}),(i||c)&&o.jsx("span",{className:i?ze.errorMessage:ze.hint,id:_,children:i||c})]})})}function ka({className:e,disabled:t,id:n,label:s,onChange:r,ref:a,value:i,...c}){const u=Ma(),f=l.useId(),h=n??`radio-${f}`,y=u.value!==void 0,d=[ze.input,u.invalid&&ze.error,e].filter(Boolean).join(" ");return o.jsxs("label",{className:ze.control,htmlFor:h,children:[o.jsx("input",{...c,className:d,id:h,checked:y?u.value===i:void 0,defaultChecked:y?void 0:u.defaultValue===i,disabled:t??u.disabled,name:u.name,required:u.required,onChange:p=>{var m;(m=u.onValueChange)==null||m.call(u,i),r==null||r(p)},ref:a,type:"radio",value:i}),o.jsx("span",{className:ze.text,children:s})]})}const Da="_field_1g7qr_1",wa="_control_1g7qr_8",Ra="_input_1g7qr_15",Ca="_error_1g7qr_56",La="_text_1g7qr_79",Ia="_hint_1g7qr_87 _hint_wy7pm_8",Aa="_errorMessage_1g7qr_91 _errorMessage_wy7pm_9",nt={field:Da,control:wa,input:Ra,error:Ca,text:La,hint:Ia,errorMessage:Aa};function Oa({"aria-describedby":e,"aria-invalid":t,className:n,error:s,hint:r,id:a,label:i,ref:c,...u}){const f=l.useId(),h=a??`switch-${f}`,y=`${h}-message`,d=[e,s||r?y:void 0].filter(Boolean).join(" ")||void 0,p=[nt.input,s&&nt.error,n].filter(Boolean).join(" ");return o.jsxs("div",{className:nt.field,children:[o.jsxs("label",{className:nt.control,htmlFor:h,children:[o.jsx("input",{...u,ref:c,className:p,id:h,"aria-describedby":d,"aria-invalid":s?!0:t,role:"switch",type:"checkbox"}),o.jsx("span",{className:nt.text,children:i})]}),(s||r)&&o.jsx("span",{className:s?nt.errorMessage:nt.hint,id:y,children:s||r})]})}const Sa="_alert_1iezv_1",Ea="_title_1iezv_16",Ta="_body_1iezv_20",za="_info_1iezv_24",Fa="_success_1iezv_30",Pa="_warning_1iezv_36",Ba="_danger_1iezv_42",qt={alert:Sa,title:Ea,body:Ta,info:za,success:Fa,warning:Pa,danger:Ba};function Ha({children:e,className:t,title:n,tone:s="info",...r}){const a=[qt.alert,qt[s],t].filter(Boolean).join(" "),i=s==="danger"||s==="warning";return o.jsxs("div",{role:i?"alert":"status",...r,className:a,children:[n&&o.jsx("strong",{className:qt.title,children:n}),e&&o.jsx("div",{className:qt.body,children:e})]})}const Ka="_progress_1cfl0_1",qa="_track_1cfl0_8",Va="_fill_1cfl0_15",Ua="_indeterminate_1cfl0_22",Ga="_value_1cfl0_30",Wa="_sm_1cfl0_40",Xa="_md_1cfl0_44",ut={progress:Ka,track:qa,fill:Va,indeterminate:Ua,"pl-indeterminate":"_pl-indeterminate_1cfl0_1",value:Ga,sm:Wa,md:Xa};function Za({className:e,label:t,max:n=100,showValue:s=!1,size:r="md",value:a,...i}){const c=a===void 0,u=c?0:Math.min(Math.max(a,0),n),f=n>0?u/n*100:0,h=[ut.progress,ut[r],e].filter(Boolean).join(" ");return o.jsxs("div",{...i,className:h,role:"progressbar","aria-label":t,"aria-valuemin":0,"aria-valuemax":n,"aria-valuenow":c?void 0:u,children:[o.jsx("div",{className:ut.track,children:o.jsx("div",{className:c?ut.indeterminate:ut.fill,style:c?void 0:{width:`${f}%`}})}),s&&!c&&o.jsxs("span",{className:ut.value,children:[Math.round(f),"%"]})]})}const Ya="_popover_12zpc_1",Qa={popover:Ya};function Ja({open:e,...t}){return!e||typeof document>"u"?null:Pe.createPortal(o.jsx(er,{...t}),document.body)}function er({children:e,className:t,offset:n=8,onClose:s,placement:r="bottom start",ref:a,style:i,triggerRef:c,...u}){const f=l.useRef(null),h=$e(f,a),{overlayProps:y}=ve.useOverlay({isOpen:!0,onClose:s,isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:p=>{var m;return!((m=c.current)!=null&&m.contains(p))}},f),{overlayProps:d}=ve.useOverlayPosition({targetRef:c,overlayRef:f,placement:r,offset:n,isOpen:!0});return o.jsx(Ln.FocusScope,{restoreFocus:!0,autoFocus:!0,children:o.jsx("div",{...u,...y,ref:h,className:[Qa.popover,t].filter(Boolean).join(" "),"data-react-aria-top-layer":"true",style:{...i,...d.style},role:"dialog",children:e})})}const tr=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});function Fs(e,t){return tr.compare(e,t)===0}function nr(e,t){const n=e.normalize("NFC"),s=t.normalize("NFC");return Fs(n.slice(0,s.length),s)}function sr(e,t){const n=e.normalize("NFC"),s=t.normalize("NFC");if(!s)return!0;for(let r=0;r+s.length<=n.length;r+=1)if(Fs(n.slice(r,r+s.length),s))return!0;return!1}function Tt(e,t){return t===void 0?-1:e.findIndex(n=>n.key===t)}function or(e){var t;return(t=e.find(n=>!n.disabled))==null?void 0:t.key}function ar(e){for(let t=e.length-1;t>=0;t-=1)if(!e[t].disabled)return e[t].key}function rr(e,t){for(let n=Tt(e,t)+1;n<e.length;n+=1)if(!e[n].disabled)return e[n].key}function Xn(e,t){const n=Tt(e,t);for(let s=(n<0?e.length:n)-1;s>=0;s-=1)if(!e[s].disabled)return e[s].key}function ir(e,t,n){const s=t.trim();if(!s||e.length===0)return;const r=Tt(e,n);for(let a=1;a<=e.length;a+=1){const i=e[(r+a+e.length)%e.length];if(!i.disabled&&nr(i.textValue??i.key,s))return i.key}}function Ps(e,t,n,{allowEmpty:s=!1}={}){if(n==="none")return e;if(n==="single"){const a=s&&e.selectedKeys.has(t);return{focusedKey:t,selectedKeys:a?new Set:new Set([t])}}const r=new Set(e.selectedKeys);return r.has(t)?r.delete(t):r.add(t),{anchorKey:t,focusedKey:t,selectedKeys:r}}function Zn(e,t,n){const s=e.anchorKey??e.focusedKey??t,r=Tt(n,s),a=Tt(n,t);if(r<0||a<0)return Ps(e,t,"multiple");const[i,c]=r<=a?[r,a]:[a,r],u=new Set(e.selectedKeys);for(let f=i;f<=c;f+=1)n[f].disabled||u.add(n[f].key);return{anchorKey:s,focusedKey:t,selectedKeys:u}}function Bs(e,t){const n=t.filter(r=>!r.disabled),s=n.filter(r=>e.selectedKeys.has(r.key)).length;return s===0?"none":s===n.length?"all":"partial"}function lr(e,t){const n=t.filter(a=>!a.disabled),s=new Set(e.selectedKeys),r=Bs(e,t)!=="all";return n.forEach(a=>r?s.add(a.key):s.delete(a.key)),{...e,selectedKeys:s}}function cr(e){return{focusedKey:e.focusedKey,selectedKeys:new Set}}function Ft({allowEmpty:e=!1,defaultSelectedKeys:t,items:n,mode:s="single",onSelectionChange:r,selectedKeys:a,typeaheadDelay:i=500}){const[c,u]=l.useState(()=>({selectedKeys:new Set(t??[])})),f=l.useMemo(()=>a===void 0?void 0:new Set(a),[a]),h=f?{focusedKey:c.focusedKey,selectedKeys:f}:c,y=l.useMemo(()=>new Map(n.map(g=>[g.key,g])),[n]),d=l.useRef(new Map),p=l.useMemo(()=>{const g=[...h.selectedKeys].map(N=>y.get(N)??d.current.get(N)??{key:N});return d.current=new Map(g.map(N=>[N.key,N])),g},[y,h.selectedKeys]),m=l.useRef(""),b=l.useRef(void 0);l.useEffect(()=>()=>clearTimeout(b.current),[]);const _=l.useCallback(g=>{u(N=>N.focusedKey===g?N:{...N,focusedKey:g})},[]),$=l.useCallback(g=>{u(N=>({...g,selectedKeys:f?N.selectedKeys:g.selectedKeys})),r==null||r(g.selectedKeys)},[f,r]);function j(g,N){if(g!==void 0){if(N&&s==="multiple"){$(Zn(h,g,n));return}_(g)}}return{...h,selectedItems:p,clear:()=>$(cr(h)),focus:_,focusFirst:g=>j(or(n),g),focusLast:g=>j(ar(n),g),focusNext:g=>j(rr(n,h.focusedKey)??h.focusedKey,g),focusPrevious:g=>j(Xn(n,h.focusedKey)??h.focusedKey,g),reset:()=>u({selectedKeys:new Set(t??[])}),select:g=>$(Ps(h,g,s,{allowEmpty:e})),selectRange:g=>$(Zn(h,g,n)),status:Bs(h,n),toggleAll:()=>$(lr(h,n)),search:g=>{m.current+=g,clearTimeout(b.current),b.current=setTimeout(()=>{m.current=""},i);const N=m.current.length>1?Xn(n,h.focusedKey):h.focusedKey,v=ir(n,m.current,N);v&&_(v)}}}const ur="_tabs_runad_1",dr="_horizontal_runad_7",fr="_list_runad_11",mr="_active_runad_17",hr="_vertical_runad_23",_r="_tab_runad_1",pr="_panel_runad_45",dt={tabs:ur,horizontal:dr,list:fr,active:mr,vertical:hr,tab:_r,panel:pr};function gr({className:e,defaultSelectedKey:t,items:n,label:s,onSelectionChange:r,orientation:a="horizontal",selectedKey:i,...c}){var j;const u=`tabs-${l.useId()}`,f=l.useRef(new Map),h=l.useMemo(()=>n.map(g=>({key:g.key,disabled:g.disabled,textValue:g.label})),[n]),y=(j=h.find(g=>!g.disabled))==null?void 0:j.key,d=Ft({items:h,mode:"single",defaultSelectedKeys:i===void 0?[t??y??""]:void 0,selectedKeys:i===void 0?void 0:[i],onSelectionChange:g=>{const[N]=g;N!==void 0&&(r==null||r(N))}}),[p]=d.selectedKeys,m=n.find(g=>g.key===p),b=h.some(g=>g.key===p&&!g.disabled)?p:y;l.useEffect(()=>{var g;d.focusedKey&&((g=f.current.get(d.focusedKey))==null||g.focus())},[d.focusedKey]);function _(g){g&&d.select(g)}function $(g){var E,B;const N=d.focusedKey??p,v=a==="vertical"?"ArrowDown":"ArrowRight",R=a==="vertical"?"ArrowUp":"ArrowLeft";g.key===v?(g.preventDefault(),_(Yn(h,N,1))):g.key===R?(g.preventDefault(),_(Yn(h,N,-1))):g.key==="Home"?(g.preventDefault(),_((E=h.find(k=>!k.disabled))==null?void 0:E.key)):g.key==="End"&&(g.preventDefault(),_((B=[...h].reverse().find(k=>!k.disabled))==null?void 0:B.key))}return o.jsxs("div",{...c,className:[dt.tabs,dt[a],e].filter(Boolean).join(" "),children:[o.jsx("div",{className:dt.list,role:"tablist","aria-label":s,"aria-orientation":a,onKeyDown:$,children:n.map(g=>o.jsx("button",{ref:N=>{N?f.current.set(g.key,N):f.current.delete(g.key)},className:[dt.tab,p===g.key&&dt.active].filter(Boolean).join(" "),type:"button",role:"tab",id:`${u}-${g.key}`,"aria-controls":p===g.key?`${u}-${g.key}-panel`:void 0,"aria-selected":p===g.key,disabled:g.disabled,tabIndex:b===g.key?0:-1,onClick:()=>d.select(g.key),children:g.label},g.key))}),m&&o.jsx("div",{className:dt.panel,role:"tabpanel",id:`${u}-${m.key}-panel`,"aria-labelledby":`${u}-${m.key}`,tabIndex:0,children:m.content})]})}function Yn(e,t,n){const s=e.length,r=e.findIndex(a=>a.key===t);for(let a=1;a<=s;a+=1){const i=e[(r+n*a+s*s)%s];if(!i.disabled)return i.key}return t}const br="_list_ukjuq_1",yr="_item_ukjuq_11",xr="_link_ukjuq_20",vr="_current_ukjuq_38",jr="_separator_ukjuq_44",kt={list:br,item:yr,link:xr,current:vr,separator:jr};function $r({as:e="a",className:t,items:n,label:s="Trilha de navegacao",...r}){return o.jsx("nav",{...r,"aria-label":s,className:t,children:o.jsx("ol",{className:kt.list,children:n.map((a,i)=>{const c=i===n.length-1;return o.jsxs("li",{className:kt.item,children:[c||a.href===void 0&&a.linkProps===void 0?o.jsx("span",{className:kt.current,"aria-current":c?"page":void 0,children:a.label}):o.jsx(e,{className:kt.link,href:a.href,...a.linkProps,children:a.label}),!c&&o.jsx(rn,{className:kt.separator,size:12})]},`${a.label}-${i}`)})})})}const Mr="_pagination_1rbyp_1",Nr="_list_1rbyp_7",kr="_page_1rbyp_16",Dr="_step_1rbyp_17",wr="_current_1rbyp_35",Rr="_gap_1rbyp_53",st={pagination:Mr,list:Nr,page:kr,step:Dr,current:wr,gap:Rr};function Cr({className:e,label:t="Paginacao",onPageChange:n,page:s,pageCount:r,siblings:a=1,...i}){if(r<=1)return null;const c=Math.min(Math.max(s,1),r),u=Lr(c,r,a);return o.jsxs("nav",{...i,"aria-label":t,className:[st.pagination,e].filter(Boolean).join(" "),children:[o.jsx("button",{className:st.step,type:"button","aria-label":"Pagina anterior","aria-disabled":c===1||void 0,onClick:()=>c>1&&n(c-1),children:o.jsx(An,{size:14})}),o.jsx("ol",{className:st.list,children:u.map((f,h)=>f===null?o.jsx("li",{className:st.gap,"aria-hidden":"true",children:"…"},`gap-${h}`):o.jsx("li",{children:o.jsx("button",{className:[st.page,f===c&&st.current].filter(Boolean).join(" "),type:"button","aria-label":`Pagina ${f}`,"aria-current":f===c?"page":void 0,onClick:()=>n(f),children:f})},f))}),o.jsx("button",{className:st.step,type:"button","aria-label":"Proxima pagina","aria-disabled":c===r||void 0,onClick:()=>c<r&&n(c+1),children:o.jsx(rn,{size:14})})]})}function Lr(e,t,n){const s=n*2+5;if(t<=s)return Array.from({length:t},(c,u)=>u+1);const r=Math.max(Math.min(e-n,t-n*2-2),3),a=Math.min(Math.max(e+n,n*2+3),t-2),i=Array.from({length:a-r+1},(c,u)=>r+u);return[1,r>3?null:2,...i,a<t-2?null:t-1,t]}const Ir="_accordion_1p0q9_1",Ar="_divided_1p0q9_7",Or="_item_1p0q9_13",Sr="_trigger_1p0q9_17",Er="_panel_1p0q9_21",Tr="_heading_1p0q9_25",zr="_icon_1p0q9_50",Fr="_label_1p0q9_59",Pr="_iconLeft_1p0q9_63",Se={accordion:Ir,divided:Ar,item:Or,trigger:Sr,panel:Er,heading:Tr,icon:zr,label:Fr,iconLeft:Pr};function Br({className:e,defaultExpandedKeys:t,expandedKeys:n,items:s,multiple:r=!1,onExpandedChange:a,iconPosition:i="right",divider:c=!0,...u}){const f=`accordion-${l.useId()}`,h=l.useRef(new Map),y=l.useMemo(()=>s.map(m=>({key:m.key,disabled:m.disabled,textValue:m.label})),[s]),d=Ft({allowEmpty:!0,items:y,mode:r?"multiple":"single",defaultSelectedKeys:n===void 0?t:void 0,selectedKeys:n,onSelectionChange:m=>a==null?void 0:a([...m])});function p(m,b){var $,j,g;let _;m.key==="ArrowDown"?_=Qn(y,b,1):m.key==="ArrowUp"?_=Qn(y,b,-1):m.key==="Home"?_=($=y.find(N=>!N.disabled))==null?void 0:$.key:m.key==="End"&&(_=(j=[...y].reverse().find(N=>!N.disabled))==null?void 0:j.key),_&&(m.preventDefault(),(g=h.current.get(_))==null||g.focus())}return o.jsx("div",{...u,className:[Se.accordion,c&&Se.divided,e].filter(Boolean).join(" "),children:s.map(m=>{const b=d.selectedKeys.has(m.key);return o.jsxs("div",{className:Se.item,children:[o.jsx("h3",{className:Se.heading,children:o.jsxs("button",{ref:_=>{_?h.current.set(m.key,_):h.current.delete(m.key)},className:[Se.trigger,i==="left"&&Se.iconLeft].filter(Boolean).join(" "),type:"button",id:`${f}-${m.key}`,"aria-controls":`${f}-${m.key}-panel`,"aria-expanded":b,disabled:m.disabled,onClick:()=>d.select(m.key),onKeyDown:_=>p(_,m.key),children:[o.jsx("span",{className:Se.label,children:m.label}),b?o.jsx($s,{className:Se.icon,size:20}):o.jsx(Ms,{className:Se.icon,size:20})]})}),o.jsx("div",{className:Se.panel,id:`${f}-${m.key}-panel`,role:"region","aria-labelledby":`${f}-${m.key}`,hidden:!b,children:m.content})]},m.key)})})}function Qn(e,t,n){const s=e.length,r=e.findIndex(a=>a.key===t);for(let a=1;a<=s;a+=1){const i=e[(r+n*a+s*s)%s];if(!i.disabled)return i.key}return t}const Jn=6,Hr=24;function es(e){const t=e.nextElementSibling;return t?t.offsetTop-e.offsetTop:e.offsetHeight}function Kr(e,t){const n=l.useRef(null),s=l.useRef(null),r=l.useRef(0),a=l.useRef(null),[i,c]=l.useState(null),[u,f]=l.useState(0),h=l.useCallback(N=>{if(s.current=N,N){const v=es(N);c(R=>v>0?v:R??0)}},[]),y=l.useCallback(N=>{var v;n.current=N,(v=a.current)==null||v.disconnect(),a.current=null,!(!N||typeof ResizeObserver>"u")&&(a.current=new ResizeObserver(()=>{const R=s.current?es(s.current):0;R>0&&c(R)}),a.current.observe(N))},[]),d=l.useCallback(()=>{var N;f(((N=n.current)==null?void 0:N.scrollTop)??0)},[]),p=i??0,m=t!==void 0&&p>0&&e*p>t,b=t!==void 0&&i===null,_=l.useCallback(N=>{const v=n.current,R=s.current;if(!v||!R||N<0||p<=0)return;const B=R.getBoundingClientRect().top-v.getBoundingClientRect().top+v.scrollTop+(N-r.current)*p,k=B+p;B<v.scrollTop?v.scrollTop=B:k>v.scrollTop+v.clientHeight&&(v.scrollTop=k-v.clientHeight)},[p]);if(!m)return r.current=0,{active:m,attachScroll:y,measureItem:h,onScroll:d,padding:{before:0,after:0},scrollToIndex:_,start:0,end:b?Math.min(e,Hr):e};const $=Math.ceil(t/p),j=Math.max(0,Math.floor(u/p)-Jn),g=Math.min(e,j+$+Jn*2);return r.current=j,{active:m,attachScroll:y,measureItem:h,onScroll:d,padding:{before:j*p,after:(e-g)*p},scrollToIndex:_,start:j,end:g}}const qr="_list_dgig6_1",Vr="_search_dgig6_12",Ur="_options_dgig6_35",Gr="_spacer_dgig6_53",Wr="_option_dgig6_35",Xr="_disabled_dgig6_71",Zr="_focused_dgig6_76",Yr="_box_dgig6_87",Qr="_checked_dgig6_96",Jr="_group_dgig6_102",ei="_status_dgig6_112",ti="_empty_dgig6_113",ye={list:qr,search:Vr,options:Ur,spacer:Gr,option:Wr,disabled:Xr,focused:Zr,box:Yr,checked:Qr,group:Jr,status:ei,empty:ti};function Et(e,t){return e+"-option-"+t}function ln({baseId:e,className:t,elementRef:n,empty:s,height:r,holdsFocus:a=!0,label:i,listing:c,loading:u=!1,loadingMessage:f="Carregando",onKeyDown:h,onSelect:y,style:d,tabIndex:p=0}){const{detached:m,focusedKey:b,isSelected:_,select:$,selectionMode:j,visible:g}=c,N=g.findIndex(C=>C.value===b);function v(C,P){C.disabled||($(C,P),y==null||y(C))}const{active:R,attachScroll:E,measureItem:B,onScroll:k,padding:H,scrollToIndex:M,start:I,end:F}=Kr(g.length,r),z=l.useCallback(C=>{E(C),n&&(n.current=C)},[E,n]);l.useEffect(()=>{var P,G;const C=g.findIndex(Q=>Q.value===b);b===void 0||C<0||(R?M(C):(G=(P=document.getElementById(Et(e,C)))==null?void 0:P.scrollIntoView)==null||G.call(P,{block:"nearest"}))},[R,e,b,M,g]);const L=g.slice(I,F);if(j==="none")return o.jsxs("ul",{"aria-busy":u||void 0,className:[ye.options,t].filter(Boolean).join(" "),id:e+"-options",onScroll:k,ref:z,style:{height:r,...d},children:[u&&o.jsx("li",{className:ye.status,children:f}),o.jsx("li",{"aria-hidden":"true",className:ye.spacer,style:{height:H.before}}),L.map((C,P)=>o.jsx("li",{className:ye.option,ref:P===0?B:void 0,children:C.label},C.value)),o.jsx("li",{"aria-hidden":"true",className:ye.spacer,style:{height:H.after}}),!u&&g.length===0&&s]});function T(C,P,G){const Q=_(C.value);return o.jsxs("div",{"aria-disabled":C.disabled||void 0,"aria-posinset":P>0?P:void 0,"aria-selected":Q,"aria-setsize":P>0?g.length:void 0,className:[ye.option,b===C.value&&ye.focused,C.disabled&&ye.disabled].filter(Boolean).join(" "),id:P>0?Et(e,P-1):void 0,onClick:A=>v(C,A.shiftKey),onMouseDown:a?void 0:A=>A.preventDefault(),ref:G?B:void 0,role:"option",children:[j==="multiple"&&o.jsx("span",{"aria-hidden":"true",className:[ye.box,Q&&ye.checked].filter(Boolean).join(" ")}),C.label]},C.value)}return o.jsxs("div",{"aria-activedescendant":a&&N>=0?Et(e,N):void 0,"aria-busy":u||void 0,"aria-label":i,"aria-multiselectable":j==="multiple"||void 0,className:[ye.options,t].filter(Boolean).join(" "),id:e+"-options",onKeyDown:h,onScroll:k,ref:z,role:"listbox",style:{height:r,...d},tabIndex:a?p:void 0,children:[u&&o.jsx("p",{className:ye.status,children:f}),m.length>0&&o.jsx("div",{"aria-label":"Selecionados",className:ye.group,role:"group",children:m.map(C=>T(C,0,!1))}),o.jsx("div",{"aria-hidden":"true",className:ye.spacer,style:{height:H.before}}),L.map((C,P)=>T(C,I+P+1,P===0)),o.jsx("div",{"aria-hidden":"true",className:ye.spacer,style:{height:H.after}}),!u&&g.length===0&&s]})}const ni=["Home","End"," "];function cn({defaultValue:e,items:t,onSearch:n,onSelectionChange:s,selectionMode:r="none",value:a}){const[i,c]=l.useState(""),u=l.useMemo(()=>n||!i?t:t.filter(_=>sr(_.label,i)),[t,n,i]),f=l.useMemo(()=>u.map(_=>({key:_.value,disabled:_.disabled,textValue:_.label})),[u]),h=l.useRef(new Map);for(const _ of[...e??[],...a??[]])h.current.has(_.value)||h.current.set(_.value,_);for(const _ of t)h.current.set(_.value,_);const y=_=>h.current.get(_)??{value:_,label:""},d=Ft({items:f,mode:r,defaultSelectedKeys:e==null?void 0:e.map(_=>_.value),selectedKeys:a==null?void 0:a.map(_=>_.value),onSelectionChange:_=>s==null?void 0:s([..._].map(y))}),p=(a??d.selectedItems.map(_=>({value:_.key,label:""}))).map(_=>y(_.value)),m=l.useMemo(()=>{if(!i||r!=="multiple")return[];const _=new Set(u.map($=>$.value));return p.filter($=>!_.has($.value))},[p,r,i,u]);function b(_){if(r==="none"||_.target instanceof HTMLInputElement&&ni.includes(_.key))return;const $=_.shiftKey;if(_.key==="ArrowDown")_.preventDefault(),d.focusedKey===void 0?d.focusFirst($):d.focusNext($);else if(_.key==="ArrowUp")_.preventDefault(),d.focusPrevious($);else if(_.key==="Home")_.preventDefault(),d.focusFirst($);else if(_.key==="End")_.preventDefault(),d.focusLast($);else if(_.key==="Enter"||_.key===" "){const j=u.find(g=>g.value===d.focusedKey);j&&!j.disabled&&(_.preventDefault(),d.select(j.value))}}return{detached:m,focus:d.focus,focusFirst:d.focusFirst,focusLast:d.focusLast,focusedKey:d.focusedKey,handleKeyDown:b,isSelected:_=>p.some($=>$.value===_),filter:_=>{c(_),d.focus(void 0),n==null||n(_)},reset:d.reset,typeahead:d.search,select:(_,$)=>{if(!_.disabled){if($&&r==="multiple"){d.selectRange(_.value);return}d.select(_.value)}},selected:p,selectionMode:r,status:d.status,toggleAll:d.toggleAll,term:i,visible:u}}function Pt({disabled:e,name:t,onFocus:n,required:s,value:r}){return s?o.jsx("input",{"aria-hidden":!0,autoComplete:"off",className:Ot.formValue,disabled:e,name:t,onChange:()=>{},onFocus:n,required:!0,tabIndex:-1,value:r}):t===void 0?null:o.jsx("input",{disabled:e,name:t,type:"hidden",value:r})}const si="_trigger_dtgv9_1",oi="_error_dtgv9_41",ai="_sm_dtgv9_101",ri="_md_dtgv9_113",ii="_value_dtgv9_121",li="_placeholder_dtgv9_133",ci="_chevron_dtgv9_141",ui="_panel_dtgv9_151",ot={trigger:si,error:oi,sm:ai,md:ri,value:ii,placeholder:li,chevron:ci,panel:ui};function di({"aria-describedby":e,className:t,defaultValue:n,name:s,disabled:r=!1,error:a,hint:i,id:c,label:u,onClick:f,onKeyDown:h,onValueChange:y,options:d,placeholder:p="Selecione",ref:m,required:b=!1,size:_="md",value:$,...j}){const g=l.useRef(null),[N,v]=l.useState(!1),R=xt(()=>B.reset()),E=$e(g,R,m),B=cn({items:d,selectionMode:"single",defaultValue:n===void 0?void 0:[{value:n,label:""}],value:$===void 0?void 0:[{value:$,label:""}],onSelectionChange:z=>{const[L]=z;L&&(y==null||y(L.value))}}),[k]=B.selected;function H(){var z;v(!1),(z=g.current)==null||z.focus()}function M(){var z;r||(B.focus((k==null?void 0:k.value)??((z=d.find(L=>!L.disabled))==null?void 0:z.value)),v(!0))}function I(z){h==null||h(z),["ArrowDown","ArrowUp","Enter"," "].includes(z.key)&&(z.preventDefault(),M())}function F(z){f==null||f(z),N?H():M()}return o.jsx(We,{"aria-describedby":e,error:a,hint:i,id:c,label:u,required:b,children:({id:z,describedBy:L,invalid:T})=>o.jsxs(o.Fragment,{children:[o.jsx(Pt,{disabled:r,name:s,onFocus:()=>{var C;return(C=g.current)==null?void 0:C.focus()},required:b,value:(k==null?void 0:k.value)??""}),o.jsxs("button",{...j,ref:E,className:[ot.trigger,ot[_],a&&ot.error,t].filter(Boolean).join(" "),type:"button",id:z,role:"combobox","aria-describedby":L,"aria-invalid":T||void 0,"aria-haspopup":"listbox","aria-expanded":N,"aria-required":b||void 0,disabled:r,onClick:F,onKeyDown:I,children:[o.jsx("span",{className:k!=null&&k.label?ot.value:ot.placeholder,children:(k==null?void 0:k.label)||p}),o.jsx(xs,{className:ot.chevron,size:14})]}),N&&Pe.createPortal(o.jsx(fi,{label:u??p,listing:B,onClose:H,triggerRef:g}),document.body)]})})}function fi({label:e,listing:t,onClose:n,triggerRef:s}){var p;const r=l.useRef(null),a=l.useRef(null),i=`listbox-${l.useId()}`,{overlayProps:c}=ve.useOverlay({isOpen:!0,onClose:n,isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:m=>{var b;return!((b=s.current)!=null&&b.contains(m))}},r),{overlayProps:u}=ve.useOverlayPosition({targetRef:s,overlayRef:r,placement:"bottom start",offset:6,containerPadding:8,isOpen:!0}),[f,h]=l.useState(),y=Math.min(Number((p=u.style)==null?void 0:p.maxHeight)||280,280);l.useLayoutEffect(()=>{var m;h((m=s.current)==null?void 0:m.offsetWidth)},[s]),l.useEffect(()=>{var m;(m=a.current)==null||m.focus()},[]);function d(m){if(m.key==="Escape"||m.key==="Tab"){n();return}if(m.key==="Enter"||m.key===" "){m.preventDefault();const b=t.visible.find(_=>_.value===t.focusedKey);b&&!b.disabled&&(t.select(b),n());return}if(m.key.length===1&&!m.metaKey&&!m.ctrlKey){t.typeahead(m.key);return}t.handleKeyDown(m)}return o.jsx("div",{...c,ref:r,className:ot.panel,style:{...u.style,width:f,maxHeight:y},children:o.jsx(ln,{baseId:i,elementRef:a,label:e,listing:t,onKeyDown:m=>{var b;d(m),(b=c.onKeyDown)==null||b.call(c,m)},onSelect:n,tabIndex:-1})})}const mi="_input_1u88z_1",hi="_error_1u88z_17",_i="_sm_1u88z_47",pi="_md_1u88z_53",gi="_panel_1u88z_57",bi="_empty_1u88z_69",Dt={input:mi,error:hi,sm:_i,md:pi,panel:gi,empty:bi};function yi({"aria-describedby":e,className:t,defaultValue:n,name:s,disabled:r=!1,emptyMessage:a="Nenhum resultado",error:i,hint:c,id:u,label:f,loading:h=!1,onBlur:y,onClick:d,onKeyDown:p,onSearch:m,onValueChange:b,options:_,placeholder:$,ref:j,required:g=!1,size:N="md",value:v,...R}){var V;const E=l.useRef(null),B=l.useRef(null),k=`combobox-${l.useId()}`,[H,M]=l.useState(!1),[I,F]=l.useState(!1),z=xt(()=>{T.reset(),w()}),L=$e(E,z,j),T=cn({items:_,selectionMode:"single",defaultValue:n===void 0?void 0:[{value:n,label:""}],value:v===void 0?void 0:[{value:v,label:""}],onSearch:m,onSelectionChange:O=>{const[U]=O;U&&(b==null||b(U.value))}}),[C]=T.selected,P=I?T.term:(C==null?void 0:C.label)??"",G=T.visible.findIndex(O=>O.value===T.focusedKey),{overlayProps:Q}=ve.useOverlayPosition({targetRef:E,overlayRef:B,placement:"bottom start",offset:6,containerPadding:8,isOpen:H}),[A,x]=l.useState(),D=Math.min(Number((V=Q.style)==null?void 0:V.maxHeight)||280,280);l.useLayoutEffect(()=>{var O;x((O=E.current)==null?void 0:O.offsetWidth)},[H]);function S(){F(!1),T.filter("")}function w(){M(!1),S()}function K(O){if(p==null||p(O),O.key==="ArrowDown"&&!H){O.preventDefault(),M(!0),T.focusFirst();return}if(O.key==="Escape"){w();return}if(O.key==="Enter"){const U=T.visible.find(ee=>ee.value===T.focusedKey);H&&U&&!U.disabled&&(O.preventDefault(),T.select(U),w());return}T.handleKeyDown(O)}return o.jsx(We,{"aria-describedby":e,error:i,hint:c,id:u,label:f,required:g,children:({id:O,describedBy:U,invalid:ee})=>o.jsxs(o.Fragment,{children:[o.jsx(Pt,{disabled:r,name:s,onFocus:()=>{var Z;return(Z=E.current)==null?void 0:Z.focus()},required:g,value:(C==null?void 0:C.value)??""}),o.jsx("input",{...R,ref:L,className:[Dt.input,Dt[N],i&&Dt.error,t].filter(Boolean).join(" "),id:O,type:"text",role:"combobox",autoComplete:"off","aria-describedby":U,"aria-invalid":ee||void 0,"aria-expanded":H,"aria-autocomplete":"list","aria-controls":H?k+"-options":void 0,"aria-activedescendant":H&&G>=0?Et(k,G):void 0,"aria-required":g||void 0,disabled:r,placeholder:$,value:P,onBlur:Z=>{w(),y==null||y(Z)},onChange:Z=>{F(!0),M(!0),T.filter(Z.target.value)},onClick:Z=>{M(!0),d==null||d(Z)},onKeyDown:K}),H&&Pe.createPortal(o.jsx("div",{ref:B,className:Dt.panel,onMouseDown:Z=>Z.preventDefault(),style:{...Q.style,width:A,maxHeight:D},children:o.jsx(ln,{baseId:k,empty:o.jsx("p",{className:Dt.empty,children:a}),holdsFocus:!1,label:f??$??"Opcoes",listing:T,loading:h,onSelect:w})}),document.body)]})})}const xi="_menu_opb5f_1",vi="_item_opb5f_20",ts={menu:xi,item:vi};function ns(e,t){return n=>{e==null||e(n),t(n)}}function ji({children:e,defaultOpen:t=!1,items:n,label:s,onOpenChange:r,open:a}){const i=l.useRef(null),[c,u]=l.useState(t),[f,h]=l.useState("first"),y=a??c;function d(j){u(j),r==null||r(j)}function p(j){h(j),d(!0)}function m(j){var g;d(!1),j&&((g=i.current)==null||g.focus())}const b=e.props,_=$e(i,b.ref),$=l.cloneElement(e,{ref:_,"aria-haspopup":"menu","aria-expanded":y,onClick:ns(b.onClick,()=>y?m(!0):p("first")),onKeyDown:ns(b.onKeyDown,j=>{(j.key==="ArrowDown"||j.key==="ArrowUp")&&(j.preventDefault(),p(j.key==="ArrowDown"?"first":"last"))})});return o.jsxs(o.Fragment,{children:[$,y&&Pe.createPortal(o.jsx(Ln.FocusScope,{children:o.jsx($i,{items:n,label:s,openedWith:f,onClose:m,triggerRef:i})}),document.body)]})}function $i({items:e,label:t,onClose:n,openedWith:s,triggerRef:r}){var N;const a=l.useRef(null),i=l.useRef(new Map),c=l.useMemo(()=>e.map(v=>({key:v.key,disabled:v.disabled,textValue:v.label})),[e]),u=Ft({items:c,mode:"none"}),{focusedKey:f,focusFirst:h,focusLast:y,focusNext:d,focusPrevious:p,search:m}=u,{overlayProps:b}=ve.useOverlay({isOpen:!0,onClose:()=>n(!1),isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:v=>{var R;return!((R=r.current)!=null&&R.contains(v))}},a),{overlayProps:_}=ve.useOverlayPosition({targetRef:r,overlayRef:a,placement:"bottom start",offset:6,containerPadding:8,isOpen:!0}),$=Math.min(Number((N=_.style)==null?void 0:N.maxHeight)||360,360);l.useEffect(()=>{s==="last"?y():h()},[]),l.useEffect(()=>{var v;f&&((v=i.current.get(f))==null||v.focus())},[f]);function j(v){var R;v.disabled||(n(!0),(R=v.onSelect)==null||R.call(v))}function g(v){v.key==="ArrowDown"?(v.preventDefault(),d()):v.key==="ArrowUp"?(v.preventDefault(),p()):v.key==="Home"?(v.preventDefault(),h()):v.key==="End"?(v.preventDefault(),y()):v.key==="Escape"||v.key==="Tab"?n(!0):v.key.length===1&&!v.metaKey&&!v.ctrlKey&&m(v.key)}return o.jsx("div",{...b,"data-react-aria-top-layer":"true",ref:a,className:ts.menu,style:{..._.style,maxHeight:$},role:"menu","aria-label":t,onKeyDown:v=>{var R;g(v),(R=b.onKeyDown)==null||R.call(b,v)},children:e.map(v=>o.jsx("button",{ref:R=>{R?i.current.set(v.key,R):i.current.delete(v.key)},className:ts.item,type:"button",role:"menuitem",disabled:v.disabled,tabIndex:f===v.key?0:-1,onClick:()=>j(v),children:v.label},v.key))})}const Mi="_tooltip_7n3ao_1",Ni={tooltip:Mi},ki=120;function wt(e,t){return n=>{e==null||e(n),t(n)}}function Hs({children:e,content:t,delay:n=500,placement:s="top"}){const r=l.useRef(null),[a,i]=l.useState(!1),c=l.useRef(void 0),u=`tooltip-${l.useId()}`,f=l.useCallback(()=>{clearTimeout(c.current),i(!1)},[]),h=l.useCallback(()=>{clearTimeout(c.current),c.current=setTimeout(()=>i(!1),ki)},[]);l.useEffect(()=>()=>clearTimeout(c.current),[]);const y=e.props,d=$e(r,y.ref),p=l.cloneElement(e,{ref:d,"aria-describedby":a?[y["aria-describedby"],u].filter(Boolean).join(" "):y["aria-describedby"],onMouseEnter:wt(y.onMouseEnter,()=>{clearTimeout(c.current),c.current=setTimeout(()=>i(!0),n)}),onMouseLeave:wt(y.onMouseLeave,h),onFocus:wt(y.onFocus,()=>i(!0)),onBlur:wt(y.onBlur,f),onKeyDown:wt(y.onKeyDown,m=>{m.key==="Escape"&&f()})});return o.jsxs(o.Fragment,{children:[p,a&&Pe.createPortal(o.jsx(Di,{content:t,id:u,onMouseEnter:()=>clearTimeout(c.current),onMouseLeave:f,placement:s,triggerRef:r}),document.body)]})}function Di({content:e,id:t,onMouseEnter:n,onMouseLeave:s,placement:r,triggerRef:a}){const i=l.useRef(null),{overlayProps:c}=ve.useOverlayPosition({targetRef:a,overlayRef:i,placement:r,offset:6,isOpen:!0});return o.jsx("div",{ref:i,className:Ni.tooltip,"data-react-aria-top-layer":"true",id:t,onMouseEnter:n,onMouseLeave:s,role:"tooltip",style:c.style,children:e})}const wi="_underlay_z4dy0_1",Ri="_dialog_z4dy0_12",Ci="_sm_z4dy0_29",Li="_md_z4dy0_33",Ii="_lg_z4dy0_37",Ai="_header_z4dy0_41",Oi="_title_z4dy0_48",Si="_close_z4dy0_57",Ei="_description_z4dy0_84",Ti="_body_z4dy0_92",zi="_footer_z4dy0_99",Ke={underlay:wi,dialog:Ri,sm:Ci,md:Li,lg:Ii,header:Ai,title:Oi,close:Si,description:Ei,body:Ti,footer:zi};function Fi({open:e,...t}){return!e||typeof document>"u"?null:Pe.createPortal(o.jsx(Pi,{...t}),document.body)}function Pi({children:e,className:t,description:n,dismissable:s=!0,footer:r,onClose:a,ref:i,size:c="md",title:u,...f}){const h=l.useRef(null),y=$e(h,i),d=l.useId(),p=`${d}-title`,m=`${d}-description`,{overlayProps:b,underlayProps:_}=ve.useOverlay({isOpen:!0,onClose:a,isDismissable:s,isKeyboardDismissDisabled:!s},h);return ve.usePreventScroll(),l.useEffect(()=>h.current?ve.ariaHideOutside([h.current]):void 0,[]),o.jsx("div",{..._,className:Ke.underlay,children:o.jsx(Ln.FocusScope,{contain:!0,restoreFocus:!0,autoFocus:!0,children:o.jsxs("div",{...f,...b,ref:y,className:[Ke.dialog,Ke[c],t].filter(Boolean).join(" "),role:"dialog","aria-modal":"true","aria-labelledby":p,"aria-describedby":n?m:void 0,children:[o.jsxs("header",{className:Ke.header,children:[o.jsx("h2",{className:Ke.title,id:p,children:u}),s&&o.jsx("button",{className:Ke.close,type:"button","aria-label":"Fechar",onClick:a,children:o.jsx(js,{size:16})})]}),n&&o.jsx("p",{className:Ke.description,id:m,children:n}),e&&o.jsx("div",{className:Ke.body,children:e}),r&&o.jsx("div",{className:Ke.footer,children:r})]})})})}const Bi="_badge_aelkb_1",Hi="_dot_aelkb_18",Ki="_ok_aelkb_26",qi="_warn_aelkb_31",Vi="_info_aelkb_36",Ui="_danger_aelkb_41",Gi="_primary_aelkb_46",Wi="_outline_aelkb_51",Vt={badge:Bi,dot:Hi,ok:Ki,warn:qi,info:Vi,danger:Ui,primary:Gi,outline:Wi};function Xi({children:e,className:t,dot:n=!1,outline:s=!1,tone:r="neutral",...a}){const i=[Vt.badge,Vt[r],s&&Vt.outline,t].filter(Boolean).join(" ");return o.jsxs("span",{...a,className:i,children:[n&&o.jsx("span",{className:Vt.dot,"aria-hidden":"true"}),e]})}const Zi="_avatar_16peg_1",Yi="_sm_16peg_14",Qi="_md_16peg_20",Ji="_lg_16peg_26",ss={avatar:Zi,sm:Yi,md:Qi,lg:Ji};function el(e){return e.trim().split(/\s+/).filter(Boolean).slice(0,2).map(n=>n[0]).join("").toUpperCase()||"?"}function tl({className:e,name:t,onError:n,size:s="md",src:r,...a}){const[i,c]=l.useState(!1),u=[ss.avatar,ss[s],e].filter(Boolean).join(" "),f=!!r&&!i;l.useEffect(()=>{c(!1)},[r]);function h(y){c(!0),n==null||n(y)}return f?o.jsx("img",{...a,className:u,src:r,alt:t,onError:h}):o.jsx("span",{...a,className:u,role:"img","aria-label":t,children:el(t)})}const Ks=l.createContext(void 0);function un(e){const t=l.useContext(Ks);if(!t)throw new Error(e+" deve ser usado dentro de List.");return t}function Bt({children:e,className:t,defaultValue:n,items:s,label:r,loading:a=!1,loadingMessage:i="Carregando",onSearch:c,onSelectionChange:u,selectionMode:f="none",value:h,...y}){const d=l.useId(),[p,m]=l.useState(!1),b=cn({defaultValue:n,items:s,onSearch:c,onSelectionChange:u,selectionMode:f,value:h}),_={baseId:d,claimFocus:l.useCallback(()=>m(!0),[]),label:r,listing:b,loading:a,loadingMessage:i,searchPresent:p};return o.jsx("div",{...y,className:[ye.list,t].filter(Boolean).join(" "),children:o.jsx(Ks.Provider,{value:_,children:e})})}function nl({placeholder:e="Buscar"}){const{baseId:t,claimFocus:n,label:s,listing:r}=un("List.Search");l.useEffect(n,[n]);const a=r.visible.findIndex(i=>i.value===r.focusedKey);return o.jsx("input",{"aria-activedescendant":a>=0?Et(t,a):void 0,"aria-controls":t+"-options","aria-label":s?"Buscar em "+s:e,autoComplete:"off",className:ye.search,onChange:i=>r.filter(i.target.value),onKeyDown:r.handleKeyDown,placeholder:e,type:"search",value:r.term})}function sl({height:e}){const{baseId:t,label:n,listing:s,loading:r,loadingMessage:a,searchPresent:i}=un("List.Options");return o.jsx(ln,{baseId:t,height:e,label:n,holdsFocus:!i,listing:s,loading:r,loadingMessage:a,onKeyDown:i?void 0:s.handleKeyDown})}function ol({label:e="Selecionar todos"}){const{listing:t}=un("List.SelectAll");return t.selectionMode!=="multiple"?null:o.jsx(Ts,{checked:t.status==="all",indeterminate:t.status==="partial",label:e,onChange:()=>t.toggleAll()})}function al({children:e}){const{listing:t,loading:n}=un("List.Empty");return n||t.visible.length>0?null:o.jsx("p",{className:ye.empty,children:e})}Bt.Search=nl;Bt.SelectAll=ol;Bt.Options=sl;Bt.Empty=al;const rl="_card_19kks_1",il="_header_19kks_15",ll="_headline_19kks_23",cl="_titleRow_19kks_30",ul="_title_19kks_30",dl="_description_19kks_45",fl="_trailing_19kks_53",ml="_body_19kks_60",hl="_bodyFlush_19kks_64",_l="_footer_19kks_68",Fe={card:rl,header:il,headline:ll,titleRow:cl,title:ul,description:dl,trailing:fl,body:ml,bodyFlush:hl,footer:_l},qs=l.createContext(void 0);function pl(e){const t=l.useContext(qs);if(!t)throw new Error(e+" deve ser usado dentro de Card.");return t}function dn({"aria-labelledby":e,children:t,className:n,...s}){const r=l.useId(),[a,i]=l.useState(!1),c=r+"-title",u={registerTitle:l.useCallback(()=>(i(!0),()=>i(!1)),[]),titleId:c};return o.jsx("section",{...s,"aria-labelledby":e??(a?c:void 0),className:[Fe.card,n].filter(Boolean).join(" "),children:o.jsx(qs.Provider,{value:u,children:t})})}function gl({badge:e,description:t,headingLevel:n=3,title:s,trailing:r}){const{registerTitle:a,titleId:i}=pl("Card.Header"),c="h"+n;return l.useEffect(a,[a]),o.jsxs("header",{className:Fe.header,children:[o.jsxs("div",{className:Fe.headline,children:[o.jsxs("div",{className:Fe.titleRow,children:[o.jsx(c,{className:Fe.title,id:i,children:s}),e]}),t&&o.jsx("p",{className:Fe.description,children:t})]}),r&&o.jsx("div",{className:Fe.trailing,children:r})]})}function bl({children:e,flush:t=!1}){return o.jsx("div",{className:t?Fe.bodyFlush:Fe.body,children:e})}function yl({children:e}){return o.jsx("footer",{className:Fe.footer,children:e})}dn.Header=gl;dn.Body=bl;dn.Footer=yl;const xl="_scroll_1n7g6_1",vl="_noScroll_1n7g6_6",jl="_table_1n7g6_10",$l="_sm_1n7g6_20",Ml="_md_1n7g6_25",Nl="_head_1n7g6_30",kl="_column_1n7g6_35",Dl="_sortable_1n7g6_46",wl="_sortHeader_1n7g6_50",Rl="_help_1n7g6_55",Cl="_sortButton_1n7g6_59",Ll="_sortIcon_1n7g6_84",Il="_sortDescending_1n7g6_96",Al="_row_1n7g6_118",Ol="_divider_1n7g6_122",Sl="_cell_1n7g6_122",El="_striped_1n7g6_126",Tl="_numeric_1n7g6_140",zl="_start_1n7g6_148",Fl="_center_1n7g6_152",Pl="_end_1n7g6_156",Bl="_empty_1n7g6_160",Hl="_status_1n7g6_161",Kl="_sticky_1n7g6_176",ql="_lead_1n7g6_217",Vl="_checkbox_1n7g6_224 _input_thq98_15",Ul="_radio_1n7g6_228 _input_1nbsm_38",Gl="_toggle_1n7g6_232 _input_1g7qr_15",Wl="_selected_1n7g6_244",de={scroll:xl,noScroll:vl,table:jl,sm:$l,md:Ml,head:Nl,column:kl,sortable:Dl,sortHeader:wl,help:Rl,sortButton:Cl,sortIcon:Ll,sortDescending:Il,row:Al,divider:Ol,cell:Sl,striped:El,numeric:Tl,start:zl,center:Fl,end:Pl,empty:Bl,status:Hl,sticky:Kl,lead:ql,checkbox:Vl,radio:Ul,toggle:Gl,selected:Wl},Vs=l.createContext(void 0);function fn(e){const t=l.useContext(Vs);if(!t)throw new Error(e+" deve ser usado dentro de Table.");return t}function vt({children:e,className:t,defaultSelectedIds:n,defaultSort:s,divider:r=!0,highlightSelectedRow:a=!0,label:i,loading:c=!1,loadingMessage:u="Carregando",onSelectionChange:f,onSortChange:h,rows:y=[],selectedIds:d,selectionControl:p,selectionMode:m="none",size:b="md",sort:_,stickyHeader:$=!1,striped:j=!1,ref:g,...N}){const v=l.useId(),[R,E]=l.useState(s),[B,k]=l.useState(()=>new Set),H=_??R,M=p??(m==="single"?"radio":"checkbox"),[I,F]=l.useState(!0),z=l.useCallback(x=>{if(!x||typeof ResizeObserver>"u")return;const D=new ResizeObserver(()=>F(x.scrollWidth>x.clientWidth||x.scrollHeight>x.clientHeight));return D.observe(x),x.firstElementChild&&D.observe(x.firstElementChild),()=>D.disconnect()},[]),L=$e($?z:void 0,g),T=l.useCallback(x=>(k(D=>new Set(D).add(x)),()=>k(D=>{const S=new Set(D);return S.delete(x),S})),[]);function C(x){const D={column:x,direction:(H==null?void 0:H.column)===x&&H.direction==="ascending"?"descending":"ascending"};_===void 0&&E(D),h==null||h(D)}const P=l.useMemo(()=>y.map(x=>({key:x.id,disabled:x.disabled})),[y]),G=Ft({allowEmpty:M!=="radio",defaultSelectedKeys:n,items:P,mode:m,selectedKeys:d,onSelectionChange:x=>f==null?void 0:f([...x])}),Q={baseId:v,countColumns:()=>Math.max(B.size,1),loading:c,registerColumn:T,requestSort:C,selection:{control:M,empty:y.length===0,highlight:a,isSelected:x=>G.selectedKeys.has(x),mode:m,status:G.status,toggle:(x,D)=>{if(D&&m==="multiple"){G.selectRange(x);return}G.select(x)},toggleAll:G.toggleAll},size:b,sort:H},A=[de.table,de[b],r&&de.divider,j&&de.striped,$&&de.sticky].filter(Boolean).join(" ");return o.jsxs("div",{...N,className:[de.scroll,$&&!I&&de.noScroll,t].filter(Boolean).join(" "),ref:L,children:[o.jsx("table",{"aria-busy":c||void 0,"aria-label":i,className:A,children:o.jsx(Vs.Provider,{value:Q,children:e})}),c&&o.jsx("p",{className:de.status,role:"status",children:u})]})}function Xl({children:e}){const{registerColumn:t,selection:n}=fn("Table.Header");return l.useEffect(()=>n.mode==="none"?void 0:t("__selecao__"),[t,n.mode]),o.jsx("thead",{className:de.head,children:o.jsxs("tr",{children:[n.mode==="multiple"&&o.jsx("th",{className:[de.column,de.lead].join(" "),scope:"col",children:o.jsx("input",{"aria-label":"Selecionar todas as linhas",checked:n.status==="all",className:de.checkbox,disabled:n.empty,onChange:n.toggleAll,ref:s=>{s&&(s.indeterminate=n.status==="partial")},type:"checkbox"})}),n.mode==="single"&&o.jsx("th",{className:[de.column,de.lead].join(" "),scope:"col"}),e]})})}function Zl({align:e,children:t,help:n,hideBelow:s,id:r,numeric:a=!1,sortable:i=!1,width:c}){const{registerColumn:u,requestSort:f,sort:h}=fn("Table.Column");l.useEffect(()=>u(r),[r,u]);const y=(h==null?void 0:h.column)===r?h.direction:void 0,d=n&&o.jsx(Hs,{content:n,children:o.jsx("span",{"aria-label":n,className:de.help,role:"img",tabIndex:0,children:"?"})});return o.jsx("th",{"aria-sort":i?y??"none":void 0,className:[de.column,de[e??(a?"end":"start")],i&&de.sortable].filter(Boolean).join(" "),"data-hide-below":s,scope:"col",style:{width:c},children:i?o.jsxs("div",{className:de.sortHeader,children:[o.jsxs("button",{className:de.sortButton,onClick:()=>f(r),type:"button",children:[t,o.jsx(ys,{className:[de.sortIcon,y==="descending"&&de.sortDescending].filter(Boolean).join(" "),size:12})]}),d]}):o.jsxs(o.Fragment,{children:[t,d]})})}function Yl({children:e,empty:t,items:n}){const{countColumns:s,loading:r}=fn("Table.Body");return n.length===0&&!r&&t!==void 0?o.jsx("tbody",{children:o.jsx("tr",{children:o.jsx("td",{className:de.empty,colSpan:s(),children:t})})}):o.jsx("tbody",{children:n.map(e)})}function Ql({children:e,disabled:t=!1,id:n,label:s}){const{baseId:r,selection:a}=fn("Table.Row"),i=a.mode!=="none"&&a.isSelected(n);return o.jsxs("tr",{className:[de.row,i&&a.highlight&&de.selected].filter(Boolean).join(" "),children:[a.mode!=="none"&&o.jsx("td",{className:[de.cell,de.lead].join(" "),children:o.jsx("input",{"aria-label":s??"Selecionar linha",checked:i,className:de[a.control],disabled:t,name:a.control==="radio"?`${r}-selecao`:void 0,onChange:()=>{},onClick:c=>a.toggle(n,c.shiftKey),role:a.control==="toggle"?"switch":void 0,type:a.control==="radio"?"radio":"checkbox"})}),e]})}function Jl({align:e,children:t,hideBelow:n,numeric:s=!1}){return o.jsx("td",{className:[de.cell,de[e??(s?"end":"start")],s&&de.numeric].filter(Boolean).join(" "),"data-hide-below":n,children:t})}vt.Header=Xl;vt.Column=Zl;vt.Body=Yl;vt.Row=Ql;vt.Cell=Jl;function mn(e,{isDateUnavailable:t,max:n,min:s}){return s&&e.compare(s)<0||n&&e.compare(n)>0?!0:(t==null?void 0:t(e))??!1}function ec(e,t,n={}){const s=re.startOfMonth(e),r=re.startOfWeek(s,t),a=[];for(let i=0;i<re.getWeeksInMonth(e,t);i+=1){const c=[];for(let u=0;u<7;u+=1){const f=r.add({days:i*7+u});c.push({date:f,outside:!re.isSameMonth(f,e),unavailable:mn(f,n)})}a.push(c)}return a}function Re(e,{max:t,min:n}){return n&&e.compare(n)<0?n:t&&e.compare(t)>0?t:e}function tc(e,t,n,s){switch(t){case"ArrowLeft":return Re(e.subtract({days:1}),s);case"ArrowRight":return Re(e.add({days:1}),s);case"ArrowUp":return Re(e.subtract({weeks:1}),s);case"ArrowDown":return Re(e.add({weeks:1}),s);case"Home":return Re(re.startOfMonth(e),s);case"End":return Re(re.endOfMonth(e),s);case"PageUp":return Re(n?e.subtract({years:1}):e.subtract({months:1}),s);case"PageDown":return Re(n?e.add({years:1}):e.add({months:1}),s);default:return}}function os(e,t){return!!(e&&t&&re.isSameDay(e,t))}function nc({isDateUnavailable:e,locale:t="pt-BR",max:n,min:s,onSelect:r,value:a}={}){const i={isDateUnavailable:e,max:n,min:s},c=l.useMemo(()=>re.today(re.getLocalTimeZone()),[]),[u,f]=l.useState(()=>Re(a??c,i)),h=a??u,[y,d]=l.useState(()=>re.startOfMonth(h)),[p,m]=l.useState(a);a&&(!p||a.compare(p)!==0)&&(m(a),d(re.startOfMonth(a)),f(Re(a,i)));const b=l.useMemo(()=>ec(y,t,i),[t,y,n,s,e]);function _(j){f(j),(j.compare(re.startOfMonth(y))<0||j.compare(re.startOfMonth(y).add({months:1}))>=0)&&d(re.startOfMonth(j))}function $(j){mn(j,i)||(_(j),r==null||r(j))}return{focus:_,focusedDate:u,goToMonth:j=>{const g=re.startOfMonth(y.add({months:j}));d(g),f(Re(g.set({day:Math.min(u.day,re.endOfMonth(g).day)}),i))},handleKeyDown:j=>{if(j.key==="Enter"||j.key===" "){j.preventDefault(),$(u);return}const g=tc(u,j.key,j.shiftKey,i);g&&(j.preventDefault(),_(g))},isSelected:j=>os(j,a),isToday:j=>os(j,c),select:$,visibleMonth:y,weeks:b}}const sc="_field_6g4z6_2",oc="_error_6g4z6_12",ac="_input_6g4z6_12",rc="_sm_6g4z6_54",ic="_md_6g4z6_59",lc="_trigger_6g4z6_72",cc="_panel_6g4z6_97",uc="_calendar_6g4z6_106",dc="_calendarHeader_6g4z6_112",fc="_month_6g4z6_119",mc="_navigate_6g4z6_127",hc="_grid_6g4z6_150",_c="_weekday_6g4z6_154",pc="_dayCell_6g4z6_164",gc="_day_6g4z6_164",bc="_outside_6g4z6_190",yc="_selectedDay_6g4z6_200",xc="_footer_6g4z6_213",vc="_actions_6g4z6_223",ge={field:sc,error:oc,input:ac,sm:rc,md:ic,trigger:lc,panel:cc,calendar:uc,calendarHeader:dc,month:fc,navigate:mc,grid:hc,weekday:_c,dayCell:pc,day:gc,outside:bc,selectedDay:yc,footer:xc,actions:vc};function Us({autoFocus:e=!1,locale:t="pt-BR",onSelect:n,value:s,...r}){const a=nc({...r,locale:t,onSelect:n,value:s}),i=re.getLocalTimeZone(),c=l.useMemo(()=>new Intl.DateTimeFormat(t,{month:"long",year:"numeric"}),[t]),u=l.useMemo(()=>new Intl.DateTimeFormat(t,{dateStyle:"long"}),[t]),f=l.useMemo(()=>{const b=new Intl.DateTimeFormat(t,{weekday:"short"}),_=new Intl.DateTimeFormat(t,{weekday:"long"});return a.weeks[0].map($=>{const j=$.date.toDate(i);return{curto:b.format(j).replace(".",""),longo:_.format(j)}})},[a.weeks,i,t]),h=c.format(a.visibleMonth.toDate(i)),y=l.useRef(null),d=l.useRef(!1),p=a.focusedDate.toString();l.useEffect(()=>{var b;e&&((b=y.current)==null||b.focus())},[]),l.useEffect(()=>{var b;d.current&&((b=y.current)==null||b.focus())},[p]);function m(b){b.relatedTarget&&!b.currentTarget.contains(b.relatedTarget)&&(d.current=!1)}return o.jsxs("div",{className:ge.calendar,children:[o.jsxs("div",{className:ge.calendarHeader,children:[o.jsx("button",{"aria-label":"Mês anterior",className:ge.navigate,onClick:()=>a.goToMonth(-1),type:"button",children:o.jsx(An,{size:14})}),o.jsx("span",{"aria-live":"polite",className:ge.month,children:h}),o.jsx("button",{"aria-label":"Próximo mês",className:ge.navigate,onClick:()=>a.goToMonth(1),type:"button",children:o.jsx(rn,{size:14})})]}),o.jsxs("table",{"aria-label":h,className:ge.grid,onBlur:m,onFocus:()=>d.current=!0,onKeyDown:a.handleKeyDown,role:"grid",children:[o.jsx("thead",{children:o.jsx("tr",{children:f.map(b=>o.jsx("th",{abbr:b.longo,className:ge.weekday,scope:"col",children:b.curto},b.longo))})}),o.jsx("tbody",{children:a.weeks.map(b=>o.jsx("tr",{children:b.map(_=>{const $=a.isSelected(_.date),j=_.date.toString()===p;return o.jsx("td",{className:ge.dayCell,children:o.jsx("button",{"aria-current":a.isToday(_.date)?"date":void 0,"aria-disabled":_.unavailable||void 0,"aria-label":u.format(_.date.toDate(i)),"aria-pressed":$,className:[ge.day,_.outside&&ge.outside,$&&ge.selectedDay].filter(Boolean).join(" "),onClick:()=>a.select(_.date),ref:j?y:void 0,tabIndex:j?0:-1,type:"button",children:_.date.day})},_.date.toString())})},b[0].date.toString()))})]})]})}function zn(e,t){if(e)try{return t(e)}catch{return}}const rt=e=>zn(e,re.parseDate),Rt=e=>zn(e,re.parseTime),bn=e=>zn(e,re.parseDateTime),jc=e=>e.toString().slice(0,5),as=e=>e.toString().slice(0,16);function $c({"aria-describedby":e,className:t,defaultValue:n,name:s,disabled:r=!1,error:a,hint:i,id:c,isDateUnavailable:u,label:f,locale:h="pt-BR",max:y,min:d,onValueChange:p,onBlur:m,onKeyDown:b,placeholder:_="dd/mm/aaaa",required:$=!1,size:j="md",ref:g,value:N,...v}){const R=l.useRef(null),E=l.useRef(null),B=l.useRef(null),[k,H]=l.useState(!1),M={isDateUnavailable:u&&(q=>u(q.toString())),max:rt(y),min:rt(d)},[I,F]=l.useState(()=>rt(n)??null),z=N===void 0?void 0:rt(N)??null,L=(z===void 0?I:z)??void 0,[T,C]=l.useState(""),[P,G]=l.useState(!1),Q=l.useRef(null),A=xt(()=>{F(rt(n)??null),G(!1)}),x=$e(Q,A,g),[D,S]=l.useState(L),[w,K]=l.useState(0);l.useEffect(()=>{k&&S(L)},[k]);const V=P?T:L?[String(L.day).padStart(2,"0"),String(L.month).padStart(2,"0"),L.year].join("/"):"";function O(q){F(q),p==null||p((q==null?void 0:q.toString())??null)}function U(q=!0){var te;H(!1),q&&((te=B.current)==null||te.focus())}function ee(q){const te=Ko(q);G(!0),C(te);const me=Os(te),W=me&&!mn(me,M)?me:null;O(W)}function Z(q){b==null||b(q),q.key==="ArrowDown"&&!k?(q.preventDefault(),H(!0)):q.key==="Escape"&&k&&U(!1)}const{overlayProps:ae}=ve.useOverlay({isOpen:k,onClose:()=>U(!1),isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:q=>{var te;return!((te=R.current)!=null&&te.contains(q))}},E),{overlayProps:X}=ve.useOverlayPosition({targetRef:R,overlayRef:E,placement:"bottom start",offset:6,containerPadding:8,isOpen:k});return o.jsx(We,{"aria-describedby":e,error:a,hint:i,id:c,label:f,required:$,children:({id:q,describedBy:te,invalid:me})=>o.jsxs(o.Fragment,{children:[o.jsx(Pt,{disabled:r,name:s,onFocus:()=>{var W;return(W=Q.current)==null?void 0:W.focus()},required:$,value:(L==null?void 0:L.toString())??""}),o.jsxs("div",{className:[ge.field,ge[j],a&&ge.error,t].filter(Boolean).join(" "),ref:R,children:[o.jsx("input",{...v,"aria-describedby":te,"aria-invalid":me||void 0,"aria-required":$||void 0,autoComplete:"off",className:ge.input,disabled:r,id:q,inputMode:"numeric",onBlur:W=>{G(!1),m==null||m(W)},onChange:W=>ee(W.target.value),onKeyDown:Z,placeholder:_,ref:x,type:"text",value:V}),o.jsx("button",{"aria-expanded":k,"aria-haspopup":"dialog","aria-label":"Abrir calendário",className:ge.trigger,disabled:r,onClick:()=>k?U():H(!0),ref:B,type:"button",children:o.jsx(In,{size:15})})]}),k&&Pe.createPortal(o.jsxs("div",{...ae,"aria-label":f?"Calendário de "+f:"Calendário",className:ge.panel,onKeyDown:W=>{var Y;W.key==="Escape"&&U(),(Y=ae.onKeyDown)==null||Y.call(ae,W)},ref:E,role:"dialog",style:X.style,children:[o.jsx(Us,{autoFocus:!0,isDateUnavailable:M.isDateUnavailable,locale:h,max:M.max,min:M.min,onSelect:S,value:D},w),o.jsxs("div",{className:ge.footer,children:[o.jsx(it,{onClick:()=>{S(re.today(re.getLocalTimeZone())),K(W=>W+1)},size:"sm",variant:"ghost",type:"button",children:"Hoje"}),o.jsxs("div",{className:ge.actions,children:[o.jsx(it,{onClick:()=>U(),size:"sm",variant:"secondary",type:"button",children:"Cancelar"}),o.jsx(it,{onClick:()=>{O(D??null),G(!1),U()},size:"sm",type:"button",children:"Aplicar"})]})]})]}),document.body)]})})}const Mc="_field_1dizj_2 _field_6g4z6_2",Nc="_error_1dizj_6 _error_6g4z6_12",kc="_sm_1dizj_10 _sm_6g4z6_54",Dc="_md_1dizj_14 _md_6g4z6_59",wc="_input_1dizj_18 _input_6g4z6_12",Rc="_trigger_1dizj_22 _trigger_6g4z6_72",Cc="_panel_1dizj_26",Lc="_slots_1dizj_36",Ic="_slotInput_1dizj_43",Ac="_slotList_1dizj_62",Ve={field:Mc,error:Nc,sm:kc,md:Dc,input:wc,trigger:Rc,panel:Cc,slots:Lc,slotInput:Ic,slotList:Ac},rs=e=>String(e).padStart(2,"0");function _t(e){return e?rs(e.hour)+":"+rs(e.minute):""}function Gs(e,t,n){return(!t||e.compare(t)>=0)&&(!n||e.compare(n)<=0)}function Oc(e,t=new re.Time(0,0),n=new re.Time(23,59)){if(e<=0)return[];const s=t.hour*60+t.minute,r=n.hour*60+n.minute,a=[];for(let i=s;i<=r;i+=e)a.push(new re.Time(Math.floor(i/60),i%60));return a}function Ws({autoFocus:e=!1,baseId:t,label:n="Horário",max:s,min:r,onChange:a,step:i=30,value:c}){const[u,f]=l.useState(()=>_t(c)),[h,y]=l.useState(!1),d=l.useRef(null),p=l.useMemo(()=>Oc(i,r,s).map($=>({value:_t($),label:_t($)})),[s,r,i]),m=_t(c),b=cn({items:p,selectionMode:"single",value:c?[{value:m,label:m}]:[],onSelectionChange:([$])=>{const j=$&&tn($.value);j&&(y(!1),a(j))}});l.useEffect(()=>{var $;b.focus(p.some(j=>j.value===m)?m:void 0),e&&(($=d.current)==null||$.focus())},[]);function _($){const j=Ss($);y(!0),f(j);const g=tn(j);g&&Gs(g,r,s)&&a(g)}return o.jsxs("div",{className:Ve.slots,children:[o.jsx("input",{"aria-label":n+" em horas e minutos",autoComplete:"off",className:Ve.slotInput,inputMode:"numeric",onBlur:()=>y(!1),onChange:$=>_($.target.value),placeholder:"hh:mm",type:"text",value:h?u:m}),o.jsx(ln,{baseId:t,className:Ve.slotList,elementRef:d,holdsFocus:!0,label:n,listing:b,onKeyDown:b.handleKeyDown})]})}function Sc({"aria-describedby":e,className:t,defaultValue:n,name:s,disabled:r=!1,error:a,hint:i,id:c,label:u,max:f,min:h,step:y=30,onValueChange:d,onBlur:p,onKeyDown:m,placeholder:b="hh:mm",required:_=!1,size:$="md",ref:j,value:g,...N}){const v=l.useRef(null),R=l.useRef(null),E=`hora-${l.useId()}`,B=l.useRef(null),[k,H]=l.useState(!1),M=Rt(h),I=Rt(f),[F,z]=l.useState(()=>Rt(n)??null),[L,T]=l.useState(""),[C,P]=l.useState(!1),G=g===void 0?void 0:Rt(g)??null,Q=(G===void 0?F:G)??void 0,A=C?L:_t(Q),x=l.useRef(null),D=xt(()=>{z(Rt(n)??null),P(!1)}),S=$e(x,D,j);function w(Z){z(Z),d==null||d(Z?jc(Z):null)}function K(Z=!0){var ae;H(!1),Z&&((ae=B.current)==null||ae.focus())}function V(Z){const ae=Ss(Z);P(!0),T(ae);const X=tn(ae);w(X&&Gs(X,M,I)?X:null)}function O(Z){m==null||m(Z),Z.key==="ArrowDown"&&!k?(Z.preventDefault(),H(!0)):Z.key==="Escape"&&k&&K(!1)}const{overlayProps:U}=ve.useOverlay({isOpen:k,onClose:()=>K(!1),isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:Z=>{var ae;return!((ae=v.current)!=null&&ae.contains(Z))}},R),{overlayProps:ee}=ve.useOverlayPosition({targetRef:v,overlayRef:R,placement:"bottom start",offset:6,containerPadding:8,isOpen:k});return o.jsx(We,{"aria-describedby":e,error:a,hint:i,id:c,label:u,required:_,children:({id:Z,describedBy:ae,invalid:X})=>o.jsxs(o.Fragment,{children:[o.jsx(Pt,{disabled:r,name:s,onFocus:()=>{var q;return(q=x.current)==null?void 0:q.focus()},required:_,value:_t(Q)}),o.jsxs("div",{className:[Ve.field,Ve[$],a&&Ve.error,t].filter(Boolean).join(" "),ref:v,children:[o.jsx("input",{...N,"aria-describedby":ae,"aria-invalid":X||void 0,"aria-required":_||void 0,autoComplete:"off",className:Ve.input,disabled:r,id:Z,inputMode:"numeric",onBlur:q=>{P(!1),p==null||p(q)},onChange:q=>V(q.target.value),onKeyDown:O,placeholder:b,ref:S,type:"text",value:A}),o.jsx("button",{"aria-expanded":k,"aria-haspopup":"dialog","aria-label":"Abrir seletor de hora",className:Ve.trigger,disabled:r,onClick:()=>k?K():H(!0),ref:B,type:"button",children:o.jsx(vs,{size:15})})]}),k&&Pe.createPortal(o.jsx("div",{...U,"aria-label":u?"Horas de "+u:"Horas",className:Ve.panel,onKeyDown:q=>{var te;q.key==="Escape"&&K(),(te=U.onKeyDown)==null||te.call(U,q)},ref:R,role:"dialog",style:ee.style,children:o.jsx(Ws,{autoFocus:!0,baseId:c??E,max:I,min:M,onChange:q=>{w(q),P(!1),K()},step:y,value:Q})}),document.body)]})})}const Ec="_field_1dita_2 _field_6g4z6_2",Tc="_error_1dita_6 _error_6g4z6_12",zc="_sm_1dita_10 _sm_6g4z6_54",Fc="_md_1dita_14 _md_6g4z6_59",Pc="_input_1dita_18 _input_6g4z6_12",Bc="_trigger_1dita_22 _trigger_6g4z6_72",Hc="_panel_1dita_26",Kc="_columns_1dita_37",qc="_footer_1dita_48",Vc="_actions_1dita_58",qe={field:Ec,error:Tc,sm:zc,md:Fc,input:Pc,trigger:Bc,panel:Hc,columns:Kc,footer:qc,actions:Vc},Ut=e=>String(e).padStart(2,"0");function Uc(e){return e?[Ut(e.day),Ut(e.month),e.year].join("/")+" "+Ut(e.hour)+":"+Ut(e.minute):""}function Gc({"aria-describedby":e,className:t,defaultValue:n,name:s,disabled:r=!1,error:a,hint:i,id:c,isDateUnavailable:u,label:f,locale:h="pt-BR",max:y,min:d,step:p=30,onValueChange:m,onBlur:b,onKeyDown:_,placeholder:$="dd/mm/aaaa hh:mm",required:j=!1,size:g="md",ref:N,value:v,...R}){const E=l.useRef(null),B=l.useRef(null),k=l.useRef(null),H=`datetime-hora-${l.useId()}`,[M,I]=l.useState(!1),F={isDateUnavailable:u&&(Y=>u(Y.toString())),max:rt(y),min:rt(d)},[z,L]=l.useState(()=>bn(n)??null),[T,C]=l.useState(""),[P,G]=l.useState(!1),Q=v===void 0?void 0:bn(v)??null,A=(Q===void 0?z:Q)??void 0,[x,D]=l.useState(A),[S,w]=l.useState(0),K=l.useRef(null),V=xt(()=>{L(bn(n)??null),G(!1)}),O=$e(K,V,N);l.useEffect(()=>{M&&D(A)},[M]);const U=P?T:Uc(A);function ee(Y){L(Y),m==null||m(Y?as(Y):null)}function Z(Y){D(new re.CalendarDateTime(Y.year,Y.month,Y.day,(x==null?void 0:x.hour)??0,(x==null?void 0:x.minute)??0))}function ae(Y){const se=x??re.today(re.getLocalTimeZone());D(new re.CalendarDateTime(se.year,se.month,se.day,Y.hour,Y.minute))}function X(Y=!0){var se;I(!1),Y&&((se=k.current)==null||se.focus())}function q(Y){const se=Vo(Y);G(!0),C(se);const he=Uo(se),ce=he&&re.toCalendarDate(he);ee(he&&ce&&!mn(ce,F)?he:null)}function te(Y){_==null||_(Y),Y.key==="ArrowDown"&&!M?(Y.preventDefault(),I(!0)):Y.key==="Escape"&&M&&X(!1)}const{overlayProps:me}=ve.useOverlay({isOpen:M,onClose:()=>X(!1),isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:Y=>{var se;return!((se=E.current)!=null&&se.contains(Y))}},B),{overlayProps:W}=ve.useOverlayPosition({targetRef:E,overlayRef:B,placement:"bottom start",offset:6,containerPadding:8,isOpen:M});return o.jsx(We,{"aria-describedby":e,error:a,hint:i,id:c,label:f,required:j,children:({id:Y,describedBy:se,invalid:he})=>o.jsxs(o.Fragment,{children:[o.jsx(Pt,{disabled:r,name:s,onFocus:()=>{var ce;return(ce=K.current)==null?void 0:ce.focus()},required:j,value:A?as(A):""}),o.jsxs("div",{className:[qe.field,qe[g],a&&qe.error,t].filter(Boolean).join(" "),ref:E,children:[o.jsx("input",{...R,"aria-describedby":se,"aria-invalid":he||void 0,"aria-required":j||void 0,autoComplete:"off",className:qe.input,disabled:r,id:Y,inputMode:"numeric",onBlur:ce=>{G(!1),b==null||b(ce)},onChange:ce=>q(ce.target.value),onKeyDown:te,placeholder:$,ref:O,type:"text",value:U}),o.jsx("button",{"aria-expanded":M,"aria-haspopup":"dialog","aria-label":"Abrir calendário",className:qe.trigger,disabled:r,onClick:()=>M?X():I(!0),ref:k,type:"button",children:o.jsx(In,{size:15})})]}),M&&Pe.createPortal(o.jsxs("div",{...me,"aria-label":f?"Calendário de "+f:"Calendário",className:qe.panel,onKeyDown:ce=>{var Ie;ce.key==="Escape"&&X(),(Ie=me.onKeyDown)==null||Ie.call(me,ce)},ref:B,role:"dialog",style:W.style,children:[o.jsxs("div",{className:qe.columns,children:[o.jsx(Us,{autoFocus:!0,isDateUnavailable:F.isDateUnavailable,locale:h,max:F.max,min:F.min,onSelect:Z,value:x&&new re.CalendarDate(x.year,x.month,x.day)},S),o.jsx(Ws,{baseId:H,onChange:ae,step:p,value:x&&new re.Time(x.hour,x.minute)})]}),o.jsxs("div",{className:qe.footer,children:[o.jsx(it,{onClick:()=>{D(re.toCalendarDateTime(re.now(re.getLocalTimeZone())).set({second:0,millisecond:0})),w(ce=>ce+1)},size:"sm",variant:"ghost",type:"button",children:"Agora"}),o.jsxs("div",{className:qe.actions,children:[o.jsx(it,{onClick:()=>X(),size:"sm",variant:"secondary",type:"button",children:"Cancelar"}),o.jsx(it,{onClick:()=>{ee(x??null),G(!1),X()},size:"sm",type:"button",children:"Aplicar"})]})]})]}),document.body)]})})}const Wc="_figure_1ijj2_1",Xc="_title_1ijj2_9",Zc="_body_1ijj2_20",Yc="_plot_1ijj2_29",Qc="_plotFill_1ijj2_37",Jc="_bodyColumn_1ijj2_42",eu="_bodyRow_1ijj2_46",tu="_canvas_1ijj2_51",nu="_empty_1ijj2_58",su="_axisLine_1ijj2_67",ou="_axisLabel_1ijj2_72",au="_gutter_1ijj2_80",ru="_dynamicAxis_1ijj2_87",iu="_slideRight_1ijj2_101",lu="_slideLeft_1ijj2_105",cu="_slideUp_1ijj2_109",uu="_gridLine_1ijj2_113",du="_gridBaseline_1ijj2_118",fu="_cursor_1ijj2_159",mu="_legend_1ijj2_164",hu="_legendLeft_1ijj2_175",_u="_legendCenter_1ijj2_179",pu="_legendRight_1ijj2_183",gu="_legendSide_1ijj2_187",bu="_legendItem_1ijj2_196",yu="_legendButton_1ijj2_197",xu="_legendOff_1ijj2_244",vu="_swatch_1ijj2_248",ju="_swatchDot_1ijj2_268",$u="_legendLabel_1ijj2_273",Mu="_legendValue_1ijj2_280",ue={figure:Wc,title:Xc,body:Zc,plot:Yc,plotFill:Qc,bodyColumn:Jc,bodyRow:eu,canvas:tu,empty:nu,axisLine:su,axisLabel:ou,gutter:au,dynamicAxis:ru,slideRight:iu,slideLeft:lu,slideUp:cu,gridLine:uu,gridBaseline:du,cursor:fu,legend:mu,legendLeft:hu,legendCenter:_u,legendRight:pu,legendSide:gu,legendItem:bu,legendButton:yu,legendOff:xu,swatch:vu,swatchDot:ju,legendLabel:$u,legendValue:Mu};function Fn({offset:e,orientation:t="vertical",plot:n,size:s}){const r=t==="vertical";return o.jsx("rect",{className:ue.cursor,height:r?n.height:s,width:r?s:n.width,x:r?e:0,y:r?0:e})}const fe=8,yn=12,kn=.24;function Ht(e){return e.lineHeight+fe/2}const is=2,Xs={offset:0,thickness:0};function Zs(e,t){const n=t.reduce((r,a)=>r+a,0),s=Math.max((e-is*Math.max(n-1,0))/Math.max(n,1),0);return t.map((r,a)=>({offset:t.slice(0,a).reduce((i,c)=>i+(s+is)*c,0),thickness:s*r}))}function hn(e,t){return Math.max(Math.min(e,t)-fe*2,0)}const Nu={bottom:"middle",left:"end",right:"start"};function ku({hideLine:e=!1,labelRotation:t=0,length:n,orientation:s,ticks:r}){const a=s==="bottom",i=s==="left"?-fe:fe;return o.jsxs("g",{"aria-hidden":"true",className:ue.axis,children:[!e&&o.jsx("line",{className:ue.axisLine,x1:0,x2:a?n:0,y1:0,y2:a?0:n}),r.map((c,u)=>o.jsx("text",{className:ue.axisLabel,dominantBaseline:a?"hanging":"middle",textAnchor:a&&t!==0?"end":Nu[s],transform:a&&t!==0?`rotate(${-t} ${c.position} ${fe})`:void 0,x:a?c.position:i,y:a?fe:c.position,children:c.label},u))]})}function Du({baseline:e,length:t,lines:n,orientation:s}){const r=s==="horizontal";return o.jsx("g",{"aria-hidden":"true",children:n.map((a,i)=>o.jsx("line",{className:a===e?ue.gridBaseline:ue.gridLine,x1:r?0:a,x2:r?t:a,y1:r?a:0,y2:r?a:t},i))})}const Ys=[{display:!0,papel:"display-large",size:36,lineHeight:44},{display:!0,papel:"headline-medium",size:24,lineHeight:32},{display:!1,papel:"title",size:16,lineHeight:24}],xn={centerSteps:Ys.map(({display:e,lineHeight:t,size:n})=>({display:e,lineHeight:t,size:n})),family:"sans-serif",headingFamily:"sans-serif",lineHeight:16,size:12},wu=.58;function ls(e){if(!e||typeof getComputedStyle!="function")return xn;const t=getComputedStyle(e),n=t.getPropertyValue("--pl-font-body").trim()||t.fontFamily||xn.family,s=t.getPropertyValue("--pl-font-heading").trim()||n,r=Number.parseFloat(t.getPropertyValue("--pl-type-caption-size"))||xn.size,a=Number.parseFloat(t.getPropertyValue("--pl-type-caption-line-height")),i=u=>Number.parseFloat(t.getPropertyValue(`--pl-type-${u}`));return{centerSteps:Ys.map(u=>({display:u.display,lineHeight:i(`${u.papel}-line-height`)||u.lineHeight,size:i(`${u.papel}-size`)||u.size})),family:n,headingFamily:s,lineHeight:a||r*1.34,size:r}}let Gt;function Ru(){if(Gt===void 0)try{Gt=document.createElement("canvas").getContext("2d")}catch{Gt=null}return Gt}function Qe(e,t){const n=e.length*t.size*wu,s=Ru();return s?(s.font=`${t.size}px ${t.family}`,s.measureText(e).width||n):n}function jt(e,t){return e.reduce((n,s)=>Math.max(n,Qe(s,t)),0)}function bt(e,t,n){if(n<=0)return"";if(Qe(e,t)<=n)return e;let s=e.length;for(;s>0&&Qe(`${e.slice(0,s)}…`,t)>n;)s-=1;return s>0?`${e.slice(0,s)}…`:""}function Ue(e,{includeZero:t=!0}={}){const n=e.filter(Number.isFinite);if(n.length===0)return{min:0,max:0};const[s=0,r=0]=Nn.extent(n);return{min:t?Math.min(s,0):s,max:t?Math.max(r,0):r}}function nn(e){let t=0,n=0;return e.map(s=>{const r=Number.isFinite(s)?s:0;if(r<0){const i=n;return n+=r,[i,n]}const a=t;return t+=r,[a,t]})}function yt(e){return e.length===0?{min:0,max:0}:{min:Nn.min(e,t=>t.min)??0,max:Nn.max(e,t=>t.max)??0}}function Dn({min:e,max:t}){return t>e?-e/(t-e):void 0}function cs(e,t){const n=Dn(e)??t;return n>t?{min:e.min,max:-e.min*(1-t)/t}:n<t?{min:-e.max*t/(1-t),max:e.max}:e}function Cu(e,t){const n=Dn(e),s=Dn(t);if(n===void 0||s===void 0)return[e,t];const r=Math.max(n,s)/(1+Math.abs(n-s));return[cs(e,r),cs(t,r)]}function Lu({min:e,max:t}){return e===t?[e,e+1]:[e,t]}function xe({clamp:e=!1,domain:t,nice:n=!0,range:s}){const r=an.scaleLinear().domain(Lu(t)).range(s).clamp(e);return n?r.nice():r}function Pn({domain:e,padding:t=.2,range:n}){return an.scaleBand().domain([...e]).range(n).paddingInner(t).paddingOuter(t/2)}function Qs({domain:e,padding:t=.5,range:n}){return an.scalePoint().domain([...e]).range(n).padding(t)}function Iu(e,t){return an.scaleSqrt().domain([0,e>0?e:1]).range(t)}function Ge(e,t,n){return e.ticks(Math.max(2,Math.min(10,Math.floor(t/64))))}function Ne(e,t){return{fillHeight:e==="fill",value:e==="fill"?t:e}}function us(e,t,n){return e==="hidden"?0:jt(t,n)+fe}function Au(e,t,n){return e.length===0||n<=0||jt(e,t)+fe<=n?0:n*Math.SQRT1_2>=t.lineHeight?45:90}function Ou(e,t,n,s){if(s==="hidden")return 0;if(n===0)return t.lineHeight+fe;const r=n*Math.PI/180;return jt(e,t)*Math.sin(r)+t.lineHeight*Math.cos(r)+fe}function $t({bottomLabels:e,font:t,height:n,labelAngle:s,leftLabels:r,rightLabels:a,topRoom:i,width:c,xAxis:u,yAxis:f,yAxisRight:h}){const y=u==="hidden"?0:jt(e,t)/2,d=Math.max(us(f,r,t),yn),p=Math.max(us(h,a,t),yn),m=Math.max(c-d-p,0),b=s==="auto"?Au(e,t,m/Math.max(e.length,1)):s,_=b===0?y:0,$={bottom:Ou(e,t,b,u),left:Math.max(d,_),right:Math.max(p,_),top:Math.max(i,yn)};return{margins:$,plot:{width:Math.max(c-$.left-$.right,0),height:Math.max(n-$.top-$.bottom,0)},rotation:b}}function Je(e,t,n){const s=xe({domain:e,range:[t,0]});return Ge(s,t).map(n)}const Bn=Math.PI*2;function Su(e,{endAngle:t=Bn,padAngle:n=0,startAngle:s=0}={}){return gt.pie().sort(null).sortValues(null).value(r=>Math.max(r,0)).startAngle(s).endAngle(t).padAngle(n)([...e]).map(({endAngle:r,startAngle:a})=>({endAngle:r,startAngle:a}))}function zt({cornerRadius:e=0,endAngle:t,innerRadius:n,outerRadius:s,padAngle:r=0,startAngle:a}){return gt.arc().cornerRadius(e).innerRadius(n).outerRadius(s).padAngle(r).startAngle(a).endAngle(t)({cornerRadius:e,endAngle:t,innerRadius:n,outerRadius:s,padAngle:r,startAngle:a})??""}function Eu({endAngle:e,innerRadius:t,outerRadius:n,startAngle:s}){const r=(t+n)/2,a=(s+e)/2-Math.PI/2;return[Math.cos(a)*r,Math.sin(a)*r]}function ds(e,t){const n=(e.startAngle+e.endAngle)/2-Math.PI/2;return[Math.cos(n)*t,Math.sin(n)*t]}function Tu(e,t){const n=t.centerSteps[t.centerSteps.length-1];return Qe(e,{...t,family:n.display?t.headingFamily:t.family,size:n.size})/2+fe}function Js(e,t,n,s){const r=Math.max(s-fe*2,0),a=n.centerSteps,i=a.find(u=>Qe(e,{...n,family:u.display?n.headingFamily:n.family,size:u.size})<=r)??a[a.length-1],c=i.display?n.headingFamily:n.family;return{family:c,label:bt(t,n,r),lineHeight:i.lineHeight,size:i.size,value:bt(e,{...n,family:c,size:i.size},r)}}const zu={left:ue.legendLeft,center:ue.legendCenter,right:ue.legendRight};function Fu({align:e="center",entries:t,onToggle:n,position:s,swatch:r="square"}){const a=s==="left"||s==="right";return o.jsx("ul",{className:`${ue.legend} ${a?ue.legendSide:zu[e]}`,children:t.map((i,c)=>{const u=o.jsxs(o.Fragment,{children:[o.jsx("span",{"aria-hidden":"true",className:`${ue.swatch} ${r==="dot"?ue.swatchDot:""}`,style:i.hidden?void 0:{background:i.color}}),o.jsx("span",{className:ue.legendLabel,children:i.label}),i.value!==void 0&&o.jsx("span",{className:ue.legendValue,children:i.value})]});return o.jsx("li",{className:ue.legendItem,children:n?o.jsx("button",{"aria-pressed":!i.hidden,className:`${ue.legendButton} ${i.hidden?ue.legendOff:""}`,onClick:()=>n(i.label),type:"button",children:u}):u},c)})})}function lt({children:e,centerOrigin:t=!1,containerRef:n,empty:s,emptyMessage:r,fillHeight:a,height:i,legend:c,legendAlign:u,legendPosition:f,minLegendEntries:h=1,onToggleSeries:y,swatch:d="square",title:p,width:m}){const b=l.useId(),_=f==="left"||f==="right",$=f!=="none"&&c!==void 0&&c.length>=h&&o.jsx(Fu,{align:u,entries:c,onToggle:y,position:f,swatch:d});return o.jsxs("figure",{className:ue.figure,children:[o.jsx("figcaption",{className:ue.title,id:b,children:p}),o.jsxs("div",{className:`${ue.body} ${_?ue.bodyRow:ue.bodyColumn}`,children:[(f==="top"||f==="left")&&$,o.jsx("div",{className:`${ue.plot} ${a?ue.plotFill:""}`,ref:n,style:a?void 0:{minHeight:i},children:s?o.jsx("p",{className:ue.empty,children:r}):m===0||i===0?null:o.jsx("svg",{"aria-labelledby":b,className:ue.canvas,height:i,role:"img",viewBox:`0 0 ${m} ${i}`,width:m,children:t?o.jsx("g",{transform:`translate(${m/2} ${i/2})`,children:e}):e})}),(f==="bottom"||f==="right")&&$]})]})}const Pu={bottom:ue.slideUp,left:ue.slideRight,right:ue.slideLeft};function vn({axis:e,gutter:t,length:n,orientation:s}){const r=e.visibility??"visible";if(r==="hidden")return null;const a=r==="onHover",i=o.jsx(ku,{hideLine:e.hideLine,labelRotation:e.labelRotation,length:n,orientation:s,ticks:e.ticks});return a?o.jsxs("g",{className:`${ue.dynamicAxis} ${Pu[s]}`,children:[o.jsx("rect",{className:ue.gutter,height:t.height,width:t.width,x:t.x,y:t.y}),i]}):i}function Mt({children:e,containerRef:t,empty:n,emptyMessage:s,fillHeight:r,grid:a,height:i,legend:c,legendAlign:u,legendPosition:f,margins:h,onToggleSeries:y,plot:d,title:p,width:m,xAxis:b,yAxis:_,yAxisRight:$}){return o.jsx(lt,{containerRef:t,empty:n,emptyMessage:s,fillHeight:r,height:i,legend:c,legendAlign:u,legendPosition:f,minLegendEntries:2,onToggleSeries:y,title:p,width:m,children:o.jsxs("g",{transform:`translate(${h.left} ${h.top})`,children:[a==null?void 0:a.map(j=>o.jsx(Du,{baseline:j.baseline,length:j.orientation==="horizontal"?d.width:d.height,lines:j.lines,orientation:j.orientation},j.orientation)),e,o.jsx("g",{transform:`translate(0 ${d.height})`,children:o.jsx(vn,{axis:b,gutter:{height:h.bottom,width:d.width,x:0,y:0},length:d.width,orientation:"bottom"})}),o.jsx(vn,{axis:_,gutter:{height:d.height,width:h.left,x:-h.left,y:0},length:d.height,orientation:"left"}),$&&o.jsx("g",{transform:`translate(${d.width} 0)`,children:o.jsx(vn,{axis:$,gutter:{height:d.height,width:h.right,x:0,y:0},length:d.height,orientation:"right"})})]})})}function eo(e){return e==="smooth"?gt.curveMonotoneX:gt.curveLinear}function Hn(e,t){return gt.line().defined(n=>n!==null&&Number.isFinite(n.x)&&Number.isFinite(n.y)).x(n=>(n==null?void 0:n.x)??0).y(n=>(n==null?void 0:n.y)??0).curve(eo(t))(e)??""}function Bu(e,t){return gt.area().defined(n=>n!==null&&Number.isFinite(n.y0)&&Number.isFinite(n.y1)).x(n=>(n==null?void 0:n.x)??0).y0(n=>(n==null?void 0:n.y0)??0).y1(n=>(n==null?void 0:n.y1)??0).curve(eo(t))(e)??""}function Kn(e,t,n,s,r){const a=Math.max(Math.min(n,s)/2,0),[i,c,u,f]=r.map(d=>Math.max(Math.min(d,a),0)),h=e+n,y=t+s;return[`M${e+i},${t}`,`L${h-c},${t}`,c?`Q${h},${t} ${h},${t+c}`:"",`L${h},${y-u}`,u?`Q${h},${y} ${h-u},${y}`:"",`L${e+f},${y}`,f?`Q${e},${y} ${e},${y-f}`:"",`L${e},${t+i}`,i?`Q${e},${t} ${e+i},${t}`:"","Z"].filter(Boolean).join("")}function jn(e){return Number.isFinite(e.value)?Math.max(e.value,0):0}function Hu(e,{label:t,threshold:n}){const s=e.reduce((u,f)=>u+jn(f),0);if(n<=0||s<=0)return e;const r=u=>Number.isFinite(u.value)&&jn(u)/s<n,a=e.filter(r);if(a.length<2)return e;const i={intent:"neutral",label:t,value:a.reduce((u,f)=>u+jn(f),0)};let c=!1;return e.flatMap(u=>r(u)?c?[]:(c=!0,[i]):[u])}const wn=5;function Ku(e){return!e||typeof getComputedStyle!="function"?wn:Number.parseFloat(getComputedStyle(e).getPropertyValue("--pl-radius-sm"))||wn}function ke(){const[e,t]=l.useState(()=>({font:ls(null),height:0,radius:wn,width:0})),n=l.useRef(null),s=l.useCallback(()=>{const a=n.current,i=(a==null?void 0:a.clientWidth)??0,c=(a==null?void 0:a.clientHeight)??0,u=ls(a),f=Ku(a);t(h=>h.width===i&&h.height===c&&h.radius===f&&h.font.family===u.family&&h.font.size===u.size&&h.font.lineHeight===u.lineHeight&&h.font.centerSteps.every((y,d)=>{var p;return y.size===((p=u.centerSteps[d])==null?void 0:p.size)})?h:{font:u,height:c,radius:f,width:i})},[]),r=l.useCallback(a=>{n.current=a,s()},[s]);return l.useEffect(()=>{const a=n.current;if(!a||typeof ResizeObserver>"u")return;const i=new ResizeObserver(s);return i.observe(a),()=>i.disconnect()},[s]),{font:e.font,height:e.height,radius:e.radius,ref:r,width:e.width}}function qn(e){const[t,n]=l.useState(null);return{hover:s=>{n(s),e==null||e(s)},hovered:t}}function Xe({defaultHiddenSeries:e=[],hiddenSeries:t,onHiddenSeriesChange:n}){const[s,r]=l.useState(e),a=t??s,i=l.useCallback(c=>{const u=a.includes(c)?a.filter(f=>f!==c):[...a,c];t===void 0&&r(u),n==null||n(u)},[t,a,n]);return{isHidden:l.useCallback(c=>a.includes(c),[a]),toggle:i}}const sn=6;function on(e){return Array.from({length:Math.max(e,0)},(t,n)=>`var(--pl-chart-series-${n%sn+1})`)}const qu={"#49619c":1,"#f26b35":2,"#6e2a92":3};function to(e,t){if(t<=0)return[];const n=qu[e.trim().toLowerCase()],s=on(sn).filter((r,a)=>n===void 0||a+1!==n);return[e,...Array.from({length:t-1},(r,a)=>s[a%s.length])]}const Jt={positive:"var(--pl-chart-positive)",negative:"var(--pl-chart-negative)",warning:"var(--pl-chart-warning)",neutral:"var(--pl-chart-neutral)"},Vu=/^var\(--pl-chart-(series-\d|positive|negative|warning|neutral)\)$/,Uu=Math.sqrt(1.05*.05)-.05;function Gu(e){const t=e.trim().replace(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,"#$1$1$2$2$3$3"),n=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!n)return;const[s,r,a]=n.slice(1).map(i=>{const c=parseInt(i,16)/255;return c<=.04045?c/12.92:((c+.055)/1.055)**2.4});return .2126*s+.7152*r+.0722*a}function Rn(e){var s;const t=(s=Vu.exec(e.trim()))==null?void 0:s[1];if(t)return`var(--pl-chart-on-${t})`;const n=Gu(e);return n!==void 0&&n>Uu?"var(--pl-chart-on-light)":"var(--pl-chart-on-dark)"}function De(e,{accent:t}={}){const n=e.filter(a=>!a.color&&!a.intent).length,s=t?to(t,n):on(n);let r=0;return e.map(a=>{if(a.color)return a.color;if(a.intent)return Jt[a.intent];const i=s[r]??on(sn)[r%sn];return r+=1,i})}const Wu=320;function Xu(){return typeof matchMedia=="function"&&!matchMedia("(prefers-reduced-motion: reduce)").matches}function Zu(e){return 1-(1-e)**3}function Ce(e,{duration:t=Wu,from:n}={}){const[s,r]=l.useState(n??e),a=l.useRef(n??e),i=e.join(",");return l.useEffect(()=>{const c=a.current,u=d=>{a.current=d,r(d)};if(c.length!==e.length||t<=0||!Xu()){u(e);return}const f=performance.now();let h=0;const y=()=>{const d=Math.min((performance.now()-f)/t,1),p=Zu(d);u(c.map((m,b)=>m+(e[b]-m)*p)),d<1&&(h=requestAnimationFrame(y))};return h=requestAnimationFrame(y),()=>cancelAnimationFrame(h)},[i,t]),s}function no({accent:e,defaultHiddenSlices:t,hiddenSlices:n,onHiddenSlicesChange:s,onHoverSlice:r,otherLabel:a,slices:i,smallSliceThreshold:c}){const{isHidden:u,toggle:f}=Xe({defaultHiddenSeries:t,hiddenSeries:n,onHiddenSeriesChange:s}),[h,y]=l.useState(null),d=l.useMemo(()=>Hu(i,{label:a,threshold:c}),[a,i,c]),p=l.useMemo(()=>De(d,{accent:e}),[e,d]),m=d.map(g=>u(g.label)||!Number.isFinite(g.value)?0:Math.max(g.value,0)),b=m.reduce((g,N)=>g+N,0),_=l.useMemo(()=>Su(m).flatMap(g=>[g.startAngle,g.endAngle]),[m.join()]),$=Ce(_,{from:_.map(()=>0)});return{angles:d.map((g,N)=>({startAngle:$[N*2]??0,endAngle:$[N*2+1]??0})),colors:p,focus:g=>{y(g),r==null||r(g===null?null:d[g]??null)},focused:h,isHidden:u,ratioOf:g=>b>0?(m[g]??0)/b:0,slices:d,toggle:f,total:b,values:m}}const Yu="_bar_72sfu_3",Qu="_series_72sfu_7 _series_1ijj2_208",Ju="_seriesOff_72sfu_11 _seriesOff_1ijj2_212",ed="_valueLabel_72sfu_15 _valueLabel_1ijj2_123",Wt={bar:Yu,series:Qu,seriesOff:Ju,valueLabel:ed};function td({accent:e,categories:t,defaultHiddenSeries:n,emptyMessage:s="Sem dados no período",formatValue:r=je,height:a=260,hiddenSeries:i,labelAngle:c="auto",legend:u="bottom",legendAlign:f,onHiddenSeriesChange:h,onHoverCategory:y,orientation:d="vertical",series:p,showDataLabels:m=!1,stacked:b=!1,title:_,xAxis:$="visible",yAxis:j="visible",yAxisRight:g="hidden"}){const{font:N,height:v,radius:R,ref:E,width:B}=ke(),{fillHeight:k,value:H}=Ne(a,v),{isHidden:M,toggle:I}=Xe({defaultHiddenSeries:n,hiddenSeries:i,onHiddenSeriesChange:h}),{hover:F,hovered:z}=qn(y),L=d==="vertical",T=l.useMemo(()=>De(p,{accent:e}),[e,p]),C=Ce(p.map(J=>M(J.label)?0:1)),P=J=>C[J]??0,G=l.useMemo(()=>{const J=p.filter(ne=>!M(ne.label));return b?Ue(t.flatMap((ne,ie)=>nn(J.map(le=>le.values[ie]??0)).flat())):yt(J.map(ne=>Ue([...ne.values])))},[t,M,p,b]),Q=!L&&(u==="left"||u==="right")?"bottom":u,A=Je(G,L?H:B,r),{margins:x,plot:D,rotation:S}=$t({bottomLabels:L?t:A,font:N,height:H,labelAngle:c,leftLabels:L?A:t,rightLabels:L?A:t,topRoom:m&&L?Ht(N):0,width:B,xAxis:$,yAxis:j,yAxisRight:g}),w=L?D.width:D.height,K=L?D.height:D.width,V=L?K:0,O=L?0:K,U=l.useMemo(()=>Pn({domain:t,range:[0,w]}),[t,w]),ee=l.useMemo(()=>xe({domain:G,range:[V,O]}),[G,O,V]),[Z,ae]=Ce(ee.domain()),X=l.useMemo(()=>xe({domain:{min:Z,max:ae},nice:!1,range:[V,O]}),[O,V,ae,Z]),q=Ge(ee,K),te=U.bandwidth(),me=Zs(te,C);function W(J){return me[J]??Xs}function Y(J){return b?te:W(J).thickness}function se(J){return b?0:W(J).offset}function he(J,ne){const ie=p[J].values[ne];return(Number.isFinite(ie)?ie:0)*(b?P(J):1)}const ce=t.map((J,ne)=>b?nn(p.map((ie,le)=>he(le,ne))):[]);function Ie(J,ne){return ce[ne][J]??[0,he(J,ne)]}function et(J,ne){const[ie,le]=Ie(J,ne);if(!b)return[R,R,R,R];const _e=ce[ne],Ae=le<ie?Math.min(..._e.map(([,ct])=>ct)):Math.max(..._e.map(([,ct])=>ct)),Ze=le!==ie&&ie===0?R:0,we=le!==ie&&le===Ae?R:0,[Oe,Ye]=le<ie?[we,Ze]:[Ze,we];return L?[Ye,Ye,Oe,Oe]:[Oe,Ye,Ye,Oe]}function oe(J,ne,ie,le){const _e=J<0;return o.jsx("text",{className:Wt.valueLabel,dominantBaseline:L?_e?"hanging":"auto":"middle",textAnchor:L?"middle":_e?"end":"start",x:L?ie:ne+(_e?-6:6),y:L?ne+(_e?6:-6):ie,children:r(J)},le)}const be=t.map(J=>({label:J,position:(U(J)??0)+te/2})),Be=q.map(J=>({label:r(J),position:X(J)})),Me={labelRotation:S,ticks:be},He={hideLine:!0,ticks:Be};return o.jsxs(Mt,{containerRef:E,empty:p.length===0||t.length===0,emptyMessage:s,fillHeight:k,grid:[{baseline:X(0),lines:q.map(J=>X(J)),orientation:L?"horizontal":"vertical"}],height:H,legend:p.map((J,ne)=>({color:T[ne],hidden:M(J.label),label:J.label})),legendAlign:f,legendPosition:Q,margins:x,onToggleSeries:I,plot:D,title:_,width:B,xAxis:{...L?Me:He,visibility:$},yAxis:{...L?He:Me,visibility:j},yAxisRight:{...L?He:Me,hideLine:!0,visibility:g},children:[z!==null&&o.jsx(Fn,{offset:U(t[z])??0,orientation:d,plot:D,size:te}),p.map((J,ne)=>{const ie=M(J.label);return o.jsxs("g",{"aria-hidden":ie||void 0,className:`${Wt.series} ${ie?Wt.seriesOff:""}`,children:[t.map((le,_e)=>{if(!Number.isFinite(J.values[_e]))return null;const Ae=U(le)??0,[Ze,we]=Ie(ne,_e),Oe=X(Ze),Ye=X(we),ct=Math.abs(Ye-Oe),Vn=Y(ne),Un=se(ne);return o.jsx("path",{"aria-label":`${J.label}, ${le}: ${r(J.values[_e])}`,className:Wt.bar,d:Kn(L?Ae+Un:Math.min(Oe,Ye),L?Math.min(Oe,Ye):Ae+Un,L?Vn:ct,L?ct:Vn,et(ne,_e)),fill:T[ne],onMouseEnter:()=>F(_e),onMouseLeave:()=>F(null)},_e)}),m&&!b&&t.map((le,_e)=>{const Ae=J.values[_e];if(!Number.isFinite(Ae))return null;const Ze=(U(le)??0)+se(ne)+Y(ne)/2;return oe(Ae,X(Ae),Ze,_e)})]},ne)}),m&&b&&t.map((J,ne)=>{const ie=p.filter(we=>!M(we.label)&&Number.isFinite(we.values[ne]));if(ie.length===0)return null;const le=ie.reduce((we,Oe)=>we+Oe.values[ne],0),_e=ce[ne].map(([,we])=>we),Ae=le<0?Math.min(0,..._e):Math.max(0,..._e),Ze=(U(J)??0)+te/2;return oe(le,X(Ae),Ze,ne)})]})}const nd="_line_1r7tk_1 _line_1ijj2_131",sd="_dot_1r7tk_5 _dot_1ijj2_139",od="_dotVisible_1r7tk_9 _dotVisible_1ijj2_144",ad="_valueLabel_1r7tk_13 _valueLabel_1ijj2_123",rd="_series_1r7tk_17 _series_1ijj2_208",id="_seriesOff_1r7tk_21 _seriesOff_1ijj2_212",ft={line:nd,dot:sd,dotVisible:od,valueLabel:ad,series:rd,seriesOff:id};function ld(e,t){return e[t]!==null&&!e[t-1]&&!e[t+1]}function cd({accent:e,categories:t,curve:n="smooth",defaultHiddenSeries:s,emptyMessage:r="Sem dados no período",formatValue:a=je,height:i=260,includeZero:c=!0,hiddenSeries:u,labelAngle:f="auto",legend:h="bottom",legendAlign:y,onHiddenSeriesChange:d,series:p,showDataLabels:m=!1,showDots:b=!1,title:_,xAxis:$="visible",yAxis:j="visible",yAxisRight:g="hidden"}){const{font:N,height:v,ref:R,width:E}=ke(),{fillHeight:B,value:k}=Ne(i,v),{isHidden:H,toggle:M}=Xe({defaultHiddenSeries:s,hiddenSeries:u,onHiddenSeriesChange:d}),I=l.useMemo(()=>De(p,{accent:e}),[e,p]),F=l.useMemo(()=>yt(p.filter(V=>!H(V.label)).map(V=>Ue(V.values.filter(O=>O!==null),{includeZero:c}))),[c,H,p]),z=Je(F,k,a),{margins:L,plot:T,rotation:C}=$t({bottomLabels:t,font:N,height:k,labelAngle:f,leftLabels:z,rightLabels:z,topRoom:m?Ht(N):0,width:E,xAxis:$,yAxis:j,yAxisRight:g}),P=l.useMemo(()=>Qs({domain:t,padding:0,range:[0,T.width]}),[t,T.width]),G=l.useMemo(()=>xe({domain:F,range:[T.height,0]}),[F,T.height]),[Q,A]=Ce(G.domain()),x=l.useMemo(()=>xe({domain:{min:Q,max:A},nice:!1,range:[T.height,0]}),[A,Q,T.height]),D=Ge(G,T.height),S=p.map(V=>t.map((O,U)=>{const ee=V.values[U];return ee==null||!Number.isFinite(ee)?null:{x:P(O)??0,y:x(ee)}})),w=t.map(V=>({label:V,position:P(V)??0})),K=D.map(V=>({label:a(V),position:x(V)}));return o.jsx(Mt,{containerRef:R,empty:p.length===0||t.length===0,emptyMessage:r,fillHeight:B,grid:[{baseline:x(0),lines:D.map(V=>x(V)),orientation:"horizontal"}],height:k,legend:p.map((V,O)=>({color:I[O],hidden:H(V.label),label:V.label})),legendAlign:y,legendPosition:h,margins:L,onToggleSeries:M,plot:T,title:_,width:E,xAxis:{labelRotation:C,ticks:w,visibility:$},yAxis:{hideLine:!0,ticks:K,visibility:j},yAxisRight:{hideLine:!0,ticks:K,visibility:g},children:p.map((V,O)=>{const U=H(V.label);return o.jsxs("g",{"aria-hidden":U||void 0,className:`${ft.series} ${U?ft.seriesOff:""}`,children:[o.jsx("path",{className:ft.line,d:Hn(S[O],n),fill:"none",stroke:I[O]}),S[O].map((ee,Z)=>{if(ee===null)return null;const ae=`${V.label}, ${t[Z]}: ${a(V.values[Z]??0)}`;return o.jsx("circle",{"aria-label":ae,className:b||ld(S[O],Z)?ft.dotVisible:ft.dot,cx:ee.x,cy:ee.y,fill:I[O],r:4,children:o.jsx("title",{children:ae})},Z)}),m&&S[O].map((ee,Z)=>ee===null?null:o.jsx("text",{className:ft.valueLabel,textAnchor:"middle",x:ee.x,y:ee.y-10,children:a(V.values[Z]??0)},Z))]},O)})})}const ud="_area_8ibkx_3",dd="_tooltip_8ibkx_8",fd="_title_8ibkx_20",md="_subtitle_8ibkx_29",hd="_grid_8ibkx_38",_d="_label_8ibkx_45",pd="_swatch_8ibkx_59",gd="_value_8ibkx_68",bd="_computed_8ibkx_80 _value_8ibkx_68",yd="_emphasis_8ibkx_87",xd="_rule_8ibkx_96",vd="_totalLabel_8ibkx_102",jd="_totalValue_8ibkx_107",pe={area:ud,tooltip:dd,title:fd,subtitle:md,grid:hd,label:_d,swatch:pd,value:gd,computed:bd,emphasis:yd,rule:xd,totalLabel:vd,totalValue:jd},mt=16,Xt=8;function Cn(e){return e.reduce((t,n)=>t+n,0)}function $d(e,t){return typeof e=="function"?e(t):e==="average"?t.length===0?0:Cn(t)/t.length:Cn(t)}function Md({x:e,y:t},n,s){const r=e+mt+n<=window.innerWidth-Xt,a=t+mt+s<=window.innerHeight-Xt;return{x:r?e+mt:Math.max(e-mt-n,Xt),y:a?t+mt:Math.max(t-mt-s,Xt)}}function Nd({children:e,columns:t,computed:n,rows:s,showTotal:r=!1,subtitle:a,title:i,totalLabel:c="Total"}){const[u,f]=l.useState(null),h=u!==null&&s.length>0;l.useEffect(()=>{if(!h)return;const d=()=>f(null);return window.addEventListener("scroll",d,!0),window.addEventListener("resize",d),window.addEventListener("keydown",d),()=>{window.removeEventListener("scroll",d,!0),window.removeEventListener("resize",d),window.removeEventListener("keydown",d)}},[h]);const y=d=>f({x:d.clientX,y:d.clientY});return o.jsxs("div",{className:pe.area,onPointerLeave:()=>f(null),onPointerMove:y,children:[e,h&&Pe.createPortal(o.jsx(kd,{columns:t,computed:n,ponteiro:u,rows:s,showTotal:r,subtitle:a,title:i,totalLabel:c}),document.body)]})}function kd({columns:e,computed:t,ponteiro:n,rows:s,showTotal:r,subtitle:a,title:i,totalLabel:c}){const u=l.useRef(null),[f,h]=l.useState({altura:0,largura:0});l.useLayoutEffect(()=>{const v=u.current;if(!v)return;const{height:R,width:E}=v.getBoundingClientRect();(R!==f.altura||E!==f.largura)&&h({altura:R,largura:E})});const y=s.reduce((v,R)=>Math.max(v,R.values.length),0),d=e??Array.from({length:y},()=>({})),p=t==="none"||d.length===0?void 0:t??{},m=(p==null?void 0:p.column)??d.length-1,b=Cn(s.map(v=>v.values[m]??0)),_=(p==null?void 0:p.compute)??((v,R)=>R===0?0:v/R),$=(p==null?void 0:p.format)??(v=>As(v,{casasDecimais:2})),{x:j,y:g}=Md(n,f.largura,f.altura),N=`1fr ${"auto ".repeat(d.length+(p?1:0))}`.trim();return o.jsxs("div",{"aria-hidden":"true",className:pe.tooltip,ref:u,style:{left:j,top:g},children:[i!==void 0&&o.jsx("p",{className:pe.title,children:i}),a!==void 0&&o.jsx("p",{className:pe.subtitle,children:a}),o.jsxs("div",{className:pe.grid,style:{gridTemplateColumns:N},children:[s.map((v,R)=>o.jsxs(l.Fragment,{children:[o.jsxs("span",{className:`${pe.label} ${v.emphasis?pe.emphasis:""}`,children:[v.color!==void 0&&o.jsx("span",{className:pe.swatch,style:{background:v.color}}),v.label]}),d.map((E,B)=>o.jsx("span",{className:`${pe.value} ${v.emphasis?pe.emphasis:""}`,children:(E.format??je)(v.values[B]??0)},B)),p&&o.jsx("span",{className:`${pe.computed} ${v.emphasis?pe.emphasis:""}`,children:$(_(v.values[m]??0,b))})]},R)),r&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:pe.rule}),o.jsx("span",{className:`${pe.label} ${pe.totalLabel}`,children:c}),d.map((v,R)=>o.jsx("span",{className:`${pe.value} ${pe.totalValue}`,children:v.total==="none"?"":(v.format??je)($d(v.total??"sum",s.map(E=>E.values[R]??0)))},R)),p&&o.jsx("span",{className:`${pe.computed} ${pe.totalValue}`,children:$(_(b,b))})]})]})]})}const Dd="_bar_ycvom_1",wd="_line_ycvom_5 _line_1ijj2_131",Rd="_dot_ycvom_9 _dot_1ijj2_139",Cd="_dotVisible_ycvom_13 _dotVisible_1ijj2_144",Ld="_valueLabel_ycvom_17 _valueLabel_1ijj2_123",Id="_series_ycvom_21 _series_1ijj2_208",Ad="_seriesOff_ycvom_25 _seriesOff_1ijj2_212",Ee={bar:Dd,line:wd,dot:Rd,dotVisible:Cd,valueLabel:Ld,series:Id,seriesOff:Ad};function Od(e,t){return e[t]!==null&&!e[t-1]&&!e[t+1]}function en(e){return e.axis??"left"}function fs(e,t,n){return yt(e.filter(s=>en(s)===t&&!n(s.label)).map(s=>Ue(s.values.filter(r=>r!==null))))}function ms(e){const[t=0,n=0]=xe({domain:e,range:[0,1]}).domain();return{max:n,min:t}}function Sd({accent:e,categories:t,curve:n="smooth",defaultHiddenSeries:s,emptyMessage:r="Sem dados no período",formatRightValue:a,formatValue:i=je,height:c=260,hiddenSeries:u,labelAngle:f="auto",legend:h="bottom",legendAlign:y,onHiddenSeriesChange:d,onHoverCategory:p,series:m,showDataLabels:b=!1,showDots:_=!1,title:$,xAxis:j="visible",yAxis:g="visible",yAxisRight:N}){const{font:v,height:R,radius:E,ref:B,width:k}=ke(),{fillHeight:H,value:M}=Ne(c,R),{isHidden:I,toggle:F}=Xe({defaultHiddenSeries:s,hiddenSeries:u,onHiddenSeriesChange:d}),{hover:z,hovered:L}=qn(p),T=a??i,C=m.some(oe=>en(oe)==="right"),P=l.useMemo(()=>De(m,{accent:e}),[e,m]),G=Ce(m.map(oe=>I(oe.label)?0:1)),[Q,A]=l.useMemo(()=>{const oe=ms(fs(m,"left",I));return C?Cu(oe,ms(fs(m,"right",I))):[oe,oe]},[I,m,C]),x=N??(C?"visible":"hidden"),{margins:D,plot:S,rotation:w}=$t({bottomLabels:t,font:v,height:M,labelAngle:f,leftLabels:Je(Q,M,i),rightLabels:Je(A,M,T),topRoom:b?Ht(v):0,width:k,xAxis:j,yAxis:g,yAxisRight:x}),K=l.useMemo(()=>Pn({domain:t,range:[0,S.width]}),[t,S.width]),V=l.useMemo(()=>xe({domain:Q,nice:!1,range:[S.height,0]}),[Q,S.height]),O=l.useMemo(()=>xe({domain:A,nice:!1,range:[S.height,0]}),[A,S.height]),[U,ee,Z,ae]=Ce([...V.domain(),...O.domain()]),X=l.useMemo(()=>xe({domain:{min:U,max:ee},nice:!1,range:[S.height,0]}),[ee,U,S.height]),q=l.useMemo(()=>xe({domain:{min:Z,max:ae},nice:!1,range:[S.height,0]}),[ae,Z,S.height]),te=oe=>en(oe)==="right"?q:X,me=oe=>en(oe)==="right"?T:i,W=Ge(V,S.height),Y=Ge(O,S.height),se=K.bandwidth(),he=Zs(se,m.map((oe,be)=>oe.kind==="bar"?G[be]??0:0)),ce=oe=>he[oe]??Xs,Ie=t.map(oe=>({label:oe,position:(K(oe)??0)+se/2})),et=(oe,be,Be)=>oe.map(Me=>({label:Be(Me),position:be(Me)}));return o.jsxs(Mt,{containerRef:B,empty:m.length===0||t.length===0,emptyMessage:r,fillHeight:H,grid:[{baseline:X(0),lines:W.map(oe=>X(oe)),orientation:"horizontal"}],height:M,legend:m.map((oe,be)=>({color:P[be],hidden:I(oe.label),label:oe.label})),legendAlign:y,legendPosition:h,margins:D,onToggleSeries:F,plot:S,title:$,width:k,xAxis:{labelRotation:w,ticks:Ie,visibility:j},yAxis:{hideLine:!0,ticks:et(W,X,i),visibility:g},yAxisRight:{hideLine:!0,ticks:et(Y,q,T),visibility:x},children:[L!==null&&o.jsx(Fn,{offset:K(t[L])??0,plot:S,size:se}),m.map((oe,be)=>{if(oe.kind!=="bar")return null;const Be=I(oe.label),Me=te(oe),He=me(oe),J=Me(0);return o.jsxs("g",{"aria-hidden":Be||void 0,className:`${Ee.series} ${Be?Ee.seriesOff:""}`,children:[t.map((ne,ie)=>{const le=oe.values[ie];if(le==null||!Number.isFinite(le))return null;const _e=Me(le);return o.jsx("path",{"aria-label":`${oe.label}, ${ne}: ${He(le)}`,className:Ee.bar,d:Kn((K(ne)??0)+ce(be).offset,Math.min(J,_e),ce(be).thickness,Math.abs(_e-J),[E,E,E,E]),fill:P[be],onMouseEnter:()=>z(ie),onMouseLeave:()=>z(null)},ie)}),b&&t.map((ne,ie)=>{const le=oe.values[ie];return le==null||!Number.isFinite(le)?null:o.jsx("text",{className:Ee.valueLabel,textAnchor:"middle",x:(K(ne)??0)+ce(be).offset+ce(be).thickness/2,y:Me(le)-6,children:He(le)},ie)})]},be)}),m.map((oe,be)=>{if(oe.kind!=="line")return null;const Be=I(oe.label),Me=te(oe),He=me(oe),J=t.map((ne,ie)=>{const le=oe.values[ie];return le==null||!Number.isFinite(le)?null:{x:(K(ne)??0)+se/2,y:Me(le)}});return o.jsxs("g",{"aria-hidden":Be||void 0,className:`${Ee.series} ${Be?Ee.seriesOff:""}`,children:[o.jsx("path",{className:Ee.line,d:Hn(J,n),fill:"none",stroke:P[be]}),J.map((ne,ie)=>ne===null?null:o.jsx("circle",{"aria-label":`${oe.label}, ${t[ie]}: ${He(oe.values[ie]??0)}`,className:_||Od(J,ie)?Ee.dotVisible:Ee.dot,cx:ne.x,cy:ne.y,fill:P[be],r:4},ie)),b&&J.map((ne,ie)=>ne===null?null:o.jsx("text",{className:Ee.valueLabel,textAnchor:"middle",x:ne.x,y:ne.y-10,children:He(oe.values[ie]??0)},ie))]},be)})]})}const Ed="_outline_1lab2_1 _line_1ijj2_131",Td="_dot_1lab2_5 _dot_1ijj2_139",zd="_dotVisible_1lab2_9 _dotVisible_1ijj2_144",Fd="_valueLabel_1lab2_13 _valueLabel_1ijj2_123",Pd="_series_1lab2_17 _series_1ijj2_208",Bd="_seriesOff_1lab2_21 _seriesOff_1ijj2_212",ht={outline:Ed,dot:Td,dotVisible:zd,valueLabel:Fd,series:Pd,seriesOff:Bd};function Hd(e,t){return e[t]!==null&&!e[t-1]&&!e[t+1]}function Kd(e,t){const n=e.flatMap(a=>a===null?[]:[a.y1]),s=Math.min(t,...n),r=Math.max(t,...n);return r>s?(t-s)/(r-s):1}function qd({accent:e,categories:t,curve:n="smooth",defaultHiddenSeries:s,emptyMessage:r="Sem dados no período",formatValue:a=je,height:i=260,includeZero:c=!0,hiddenSeries:u,labelAngle:f="auto",legend:h="bottom",legendAlign:y,onHiddenSeriesChange:d,series:p,showDataLabels:m=!1,showDots:b=!1,stacked:_=!1,title:$,xAxis:j="visible",yAxis:g="visible",yAxisRight:N="hidden"}){const v=l.useId(),{font:R,height:E,ref:B,width:k}=ke(),{fillHeight:H,value:M}=Ne(i,E),{isHidden:I,toggle:F}=Xe({defaultHiddenSeries:s,hiddenSeries:u,onHiddenSeriesChange:d}),z=l.useMemo(()=>De(p,{accent:e}),[e,p]),L=Ce(p.map(X=>I(X.label)?0:1)),T=X=>L[X]??0,C=l.useMemo(()=>{const X=q=>I(p[q].label)?0:1;return _?Ue(t.flatMap((q,te)=>nn(p.map((me,W)=>(me.values[te]??0)*X(W))).flat())):yt(p.filter(q=>!I(q.label)).map(q=>Ue(q.values.filter(te=>te!==null),{includeZero:c})))},[t,c,I,p,_]),P=Je(C,M,a),{margins:G,plot:Q,rotation:A}=$t({bottomLabels:t,font:R,height:M,labelAngle:f,leftLabels:P,rightLabels:P,topRoom:m?Ht(R):0,width:k,xAxis:j,yAxis:g,yAxisRight:N}),x=l.useMemo(()=>Qs({domain:t,padding:0,range:[0,Q.width]}),[t,Q.width]),D=l.useMemo(()=>xe({domain:C,range:[Q.height,0]}),[C,Q.height]),[S,w]=Ce(D.domain()),K=l.useMemo(()=>xe({domain:{min:S,max:w},nice:!1,range:[Q.height,0]}),[w,S,Q.height]),V=Ge(D,Q.height),O=K(Math.min(Math.max(0,S),w)),U=t.map((X,q)=>nn(p.map((te,me)=>(te.values[q]??0)*T(me)))),ee=p.map((X,q)=>t.map((te,me)=>{const W=X.values[me];if(W==null||!Number.isFinite(W))return null;const[Y,se]=U[me][q];return{x:x(te)??0,y0:_?K(Y):O,y1:K(_?se:W)}})),Z=t.map(X=>({label:X,position:x(X)??0})),ae=V.map(X=>({label:a(X),position:K(X)}));return o.jsxs(Mt,{containerRef:B,empty:p.length===0||t.length===0,emptyMessage:r,grid:[{baseline:K(0),lines:V.map(X=>K(X)),orientation:"horizontal"}],fillHeight:H,height:M,legend:p.map((X,q)=>({color:z[q],hidden:I(X.label),label:X.label})),legendAlign:y,legendPosition:h,margins:G,onToggleSeries:F,plot:Q,title:$,width:k,xAxis:{labelRotation:A,ticks:Z,visibility:j},yAxis:{hideLine:!0,ticks:ae,visibility:g},yAxisRight:{hideLine:!0,ticks:ae,visibility:N},children:[!_&&o.jsx("defs",{children:p.map((X,q)=>{const te=Kd(ee[q],O);return o.jsxs("linearGradient",{id:`${v}-${q}`,x1:"0",x2:"0",y1:"0",y2:"1",children:[te>0&&o.jsx("stop",{offset:te*.05,stopColor:z[q],stopOpacity:.6}),o.jsx("stop",{offset:te,stopColor:z[q],stopOpacity:.05}),te<1&&o.jsx("stop",{offset:te+(1-te)*.95,stopColor:z[q],stopOpacity:.6})]},q)})}),p.map((X,q)=>{const te=ee[q],me=te.map(Y=>Y===null?null:{x:Y.x,y:Y.y1}),W=I(X.label);return o.jsxs("g",{"aria-hidden":W||void 0,className:`${ht.series} ${W?ht.seriesOff:""}`,children:[o.jsx("path",{d:Bu(te,n),fill:_?z[q]:`url(#${v}-${q})`}),o.jsx("path",{className:ht.outline,d:Hn(me,n),fill:"none",stroke:z[q]}),t.map((Y,se)=>{const he=te[se];if(he===null)return null;const ce=`${X.label}, ${Y}: ${a(X.values[se]??0)}`;return o.jsx("circle",{"aria-label":ce,className:b||Hd(te,se)?ht.dotVisible:ht.dot,cx:he.x,cy:he.y1,fill:z[q],r:4,children:o.jsx("title",{children:ce})},se)}),m&&t.map((Y,se)=>{const he=te[se];return he===null?null:o.jsx("text",{className:ht.valueLabel,textAnchor:"middle",x:he.x,y:he.y1-10,children:a(X.values[se]??0)},se)})]},q)})]})}const Vd="_bubble_okzta_1",Ud="_guide_okzta_11",Gd="_series_okzta_23 _series_1ijj2_208",Wd="_seriesOff_okzta_27 _seriesOff_1ijj2_212",Ct={bubble:Vd,guide:Ud,series:Gd,seriesOff:Wd},Xd=5,Zd=[4,18];function $n(e){return e.z!==void 0&&Number.isFinite(e.z)?e.z:void 0}function Yd({accent:e,defaultHiddenSeries:t,emptyMessage:n="Sem dados no período",formatX:s=je,formatY:r=je,formatZ:a=je,height:i=280,includeZero:c=!0,hiddenSeries:u,legend:f="bottom",legendAlign:h,onHiddenSeriesChange:y,series:d,title:p,xAxis:m="visible",yAxis:b="visible",yAxisRight:_="hidden"}){const{font:$,height:j,ref:g,width:N}=ke(),{fillHeight:v,value:R}=Ne(i,j),{isHidden:E,toggle:B}=Xe({defaultHiddenSeries:t,hiddenSeries:u,onHiddenSeriesChange:y}),[k,H]=l.useState(null),M=l.useMemo(()=>De(d,{accent:e}),[e,d]),I=l.useMemo(()=>d.filter(W=>!E(W.label)),[E,d]),F=c===!0||c==="x",z=c===!0||c==="y",L=l.useMemo(()=>yt(I.map(W=>Ue(W.points.map(Y=>Y.x),{includeZero:F}))),[I,F]),T=l.useMemo(()=>yt(I.map(W=>Ue(W.points.map(Y=>Y.y),{includeZero:z}))),[I,z]),C=l.useMemo(()=>d.reduce((W,Y)=>Y.points.reduce((se,he)=>Math.max(se,$n(he)??0),W),0),[d]),P=Je(T,R,r),G=Je(L,N,s),{margins:Q,plot:A,rotation:x}=$t({bottomLabels:G,font:$,height:R,labelAngle:"auto",leftLabels:P,rightLabels:P,topRoom:0,width:N,xAxis:m,yAxis:b,yAxisRight:_}),D=l.useMemo(()=>xe({domain:L,range:[0,A.width]}),[L,A.width]),S=l.useMemo(()=>xe({domain:T,range:[A.height,0]}),[T,A.height]),[w,K,V,O]=Ce([...D.domain(),...S.domain()]),U=l.useMemo(()=>xe({domain:{min:w,max:K},nice:!1,range:[0,A.width]}),[K,w,A.width]),ee=l.useMemo(()=>xe({domain:{min:V,max:O},nice:!1,range:[A.height,0]}),[O,V,A.height]),Z=l.useMemo(()=>Iu(C,Zd),[C]),ae=Ge(D,A.width),X=Ge(S,A.height),q=ae.map(W=>({label:s(W),position:U(W)})),te=X.map(W=>({label:r(W),position:ee(W)}));function me(W,Y){const se=Y.label?`${W.label}, ${Y.label}`:W.label,he=`${s(Y.x)} × ${r(Y.y)}`,ce=$n(Y);return ce===void 0?`${se}: ${he}`:`${se}: ${he} (${a(ce)})`}return o.jsxs(Mt,{containerRef:g,empty:d.every(W=>W.points.length===0),emptyMessage:n,grid:[{lines:X.map(W=>ee(W)),orientation:"horizontal"},{lines:ae.map(W=>U(W)),orientation:"vertical"}],fillHeight:v,height:R,legend:d.map((W,Y)=>({color:M[Y],hidden:E(W.label),label:W.label})),legendAlign:h,legendPosition:f,margins:Q,onToggleSeries:B,plot:A,title:p,width:N,xAxis:{hideLine:!0,labelRotation:x,ticks:q,visibility:m},yAxis:{hideLine:!0,ticks:te,visibility:b},yAxisRight:{hideLine:!0,ticks:te,visibility:_},children:[k&&o.jsxs("g",{"aria-hidden":"true",children:[o.jsx("line",{className:Ct.guide,x1:k.x,x2:k.x,y1:k.y,y2:A.height}),o.jsx("line",{className:Ct.guide,x1:0,x2:k.x,y1:k.y,y2:k.y})]}),d.map((W,Y)=>o.jsx("g",{"aria-hidden":E(W.label)||void 0,className:`${Ct.series} ${E(W.label)?Ct.seriesOff:""}`,children:W.points.map((se,he)=>{if(!Number.isFinite(se.x)||!Number.isFinite(se.y))return null;const ce=U(se.x),Ie=ee(se.y),et=$n(se);return o.jsx("circle",{"aria-label":me(W,se),className:Ct.bubble,cx:ce,cy:Ie,fill:M[Y],onMouseEnter:()=>H({x:ce,y:Ie}),onMouseLeave:()=>H(null),r:et===void 0?Xd:Z(et),children:o.jsx("title",{children:me(W,se)})},he)})},Y))]})}const Qd="_slice_91nzn_3",Jd="_sliceLabel_91nzn_13",hs={slice:Qd,sliceLabel:Jd};function ef({accent:e,defaultHiddenSlices:t,emptyMessage:n="Sem dados no período",formatPercent:s=j=>`${Math.round(j*100)}%`,formatValue:r=je,height:a=260,hiddenSlices:i,legend:c="bottom",legendAlign:u,onHiddenSlicesChange:f,onHoverSlice:h,otherLabel:y="Outros",showDataLabels:d=!1,showLegendValues:p=!1,sliceRadius:m,slices:b,smallSliceThreshold:_=.02,title:$}){const{font:j,height:g,radius:N,ref:v,width:R}=ke(),{fillHeight:E,value:B}=Ne(a,g),k=no({accent:e,defaultHiddenSlices:t,hiddenSlices:i,onHiddenSlicesChange:f,onHoverSlice:h,otherLabel:y,slices:b,smallSliceThreshold:_}),H=hn(R,B)/2,M=m??N;return o.jsxs(lt,{centerOrigin:!0,containerRef:v,empty:k.slices.length===0||b.every(I=>!(I.value>0)),emptyMessage:n,fillHeight:E,height:B,legend:k.slices.map((I,F)=>({color:k.colors[F],hidden:k.isHidden(I.label),label:I.label,value:p?s(k.ratioOf(F)):void 0})),legendAlign:u,legendPosition:c,onToggleSeries:k.toggle,swatch:"dot",title:$,width:R,children:[k.slices.map((I,F)=>o.jsx("path",{"aria-label":`${I.label}: ${r(Math.max(I.value,0))} (${s(k.ratioOf(F))})`,className:hs.slice,d:zt({...k.angles[F],cornerRadius:M,innerRadius:0,outerRadius:H}),fill:k.colors[F],onMouseEnter:()=>k.focus(F),onMouseLeave:()=>k.focus(null)},F)),d&&k.slices.map((I,F)=>{const z=s(k.ratioOf(F)),[L,T]=Eu({...k.angles[F],innerRadius:0,outerRadius:H}),C=k.angles[F].endAngle-k.angles[F].startAngle,P=C>=Math.PI?H:2*(H/2)*Math.sin(C/2);return k.isHidden(I.label)||Qe(z,j)>P?null:o.jsx("text",{className:hs.sliceLabel,dominantBaseline:"middle",fill:Rn(k.colors[F]),textAnchor:"middle",x:L,y:T,children:z},F)})]})}const tf="_slice_o9cwf_3",nf="_center_o9cwf_13",sf="_centerValue_o9cwf_17",of="_centerLabel_o9cwf_23",Zt={slice:tf,center:nf,centerValue:sf,centerLabel:of};function af({accent:e,centerLabel:t="Total",defaultHiddenSlices:n,emptyMessage:s="Sem dados no período",formatPercent:r=N=>`${Math.round(N*100)}%`,formatValue:a=je,height:i=260,hiddenSlices:c,legend:u="right",legendAlign:f,onHiddenSlicesChange:h,onHoverSlice:y,otherLabel:d="Outros",showCenter:p=!0,showLegendValues:m=!0,sliceRadius:b,slices:_,smallSliceThreshold:$=.02,thickness:j=.38,title:g}){const{font:N,height:v,radius:R,ref:E,width:B}=ke(),{fillHeight:k,value:H}=Ne(i,v),M=no({accent:e,defaultHiddenSlices:n,hiddenSlices:c,onHiddenSlicesChange:h,onHoverSlice:y,otherLabel:d,slices:_,smallSliceThreshold:$}),F=hn(B,H)/2,z=F*(1-Math.min(Math.max(j,0),1)),L=b??R,T=M.focused===null?void 0:M.slices[M.focused],C=Js(a(T?Math.max(T.value,0):M.total),T?T.label:t,N,z*2);return o.jsxs(lt,{centerOrigin:!0,containerRef:E,empty:M.slices.length===0||_.every(P=>!(P.value>0)),emptyMessage:s,fillHeight:k,height:H,legend:M.slices.map((P,G)=>({color:M.colors[G],hidden:M.isHidden(P.label),label:P.label,value:m?r(M.ratioOf(G)):void 0})),legendAlign:f,legendPosition:u,onToggleSeries:M.toggle,swatch:"dot",title:g,width:B,children:[M.slices.map((P,G)=>o.jsx("path",{"aria-label":`${P.label}: ${a(Math.max(P.value,0))} (${r(M.ratioOf(G))})`,className:Zt.slice,d:zt({...M.angles[G],cornerRadius:L,innerRadius:z,outerRadius:F}),fill:M.colors[G],onMouseEnter:()=>M.focus(G),onMouseLeave:()=>M.focus(null)},G)),p&&o.jsxs("g",{className:Zt.center,children:[o.jsx("text",{className:Zt.centerValue,dy:C.size*.1,style:{fontFamily:C.family,fontSize:C.size},textAnchor:"middle",children:C.value}),o.jsx("text",{className:Zt.centerLabel,dy:C.lineHeight*.62,textAnchor:"middle",children:C.label})]})]})}const rf="_track_dk4sj_3",lf="_fill_dk4sj_7",cf="_center_dk4sj_15",uf="_centerValue_dk4sj_19",df="_centerLabel_dk4sj_25",Lt={track:rf,fill:lf,center:cf,centerValue:uf,centerLabel:df},_s=6,ps=8;function gs(e){return e*Math.PI/180}function ff({accent:e,centerLabel:t,defaultHiddenTracks:n,emptyMessage:s="Sem dados no período",endAngle:r=360,formatValue:a=je,height:i=260,hiddenTracks:c,legend:u="bottom",legendAlign:f,onHiddenTracksChange:h,showCenter:y=!0,startAngle:d=0,thickness:p=16,trackRadius:m,title:b,tracks:_}){const{font:$,height:j,radius:g,ref:N,width:v}=ke(),{fillHeight:R,value:E}=Ne(i,j),{isHidden:B,toggle:k}=Xe({defaultHiddenSeries:n,hiddenSeries:c,onHiddenSeriesChange:h}),H=l.useMemo(()=>De(_,{accent:e}),[e,_]),M=O=>Number.isFinite(O.value),I=_.reduce((O,U)=>M(U)?Math.max(O,U.value):O,0),F=_.map(O=>{const U=O.max??I;return B(O.label)||!M(O)||!(U>0)?0:Math.min(Math.max(O.value,0)/U,1)}),z=Ce(F,{from:F.map(()=>0)}),L=gs(d),T=Math.min(gs(r)-L,Bn),C=hn(v,E)/2,P=_.find(O=>!B(O.label)),G=y&&P?a(P.value):void 0,Q=G===void 0?ps:Math.max(ps,Math.min(Tu(G,$),C/2)),A=Math.min(1,Math.max(C-Q,0)/(Math.max(_.length,1)*(p+_s))),x=Math.max(p*A,1),D=_s*A,S=O=>C-O*(x+D),w=Math.max(S(Math.max(_.length-1,0))-x,Q),K=m??g,V=P&&G!==void 0?Js(G,t??P.label,$,w*2):void 0;return o.jsxs(lt,{centerOrigin:!0,containerRef:N,empty:_.length===0,emptyMessage:s,fillHeight:R,height:E,legend:_.map((O,U)=>({color:H[U],hidden:B(O.label),label:O.label,value:M(O)?a(O.value):void 0})),legendAlign:f,legendPosition:_.length>1?u:"none",onToggleSeries:k,swatch:"dot",title:b,width:v,children:[_.map((O,U)=>{const ee=S(U),Z=ee-x,ae=z[U]??0,X=L+T*ae,q=M(O)?`${O.label}: ${a(O.value)}`:O.label;return o.jsxs("g",{children:[o.jsx("path",{"aria-label":q,className:Lt.track,d:zt({cornerRadius:K,endAngle:L+T,innerRadius:Z,outerRadius:ee,startAngle:L}),children:o.jsx("title",{children:q})}),ae>0&&o.jsx("path",{className:Lt.fill,d:zt({cornerRadius:K,endAngle:X,innerRadius:Z,outerRadius:ee,startAngle:L}),fill:H[U]})]},U)}),V&&o.jsxs("g",{className:Lt.center,children:[o.jsx("text",{className:Lt.centerValue,dy:V.size*.1,style:{fontFamily:V.family,fontSize:V.size},textAnchor:"middle",children:V.value}),o.jsx("text",{className:Lt.centerLabel,dy:V.lineHeight*.62,textAnchor:"middle",children:V.label})]})]})}const mf="_bar_1fyqf_1",hf="_connector_1fyqf_6",_f="_valueLabel_1fyqf_12 _valueLabel_1ijj2_123",Mn={bar:mf,connector:hf,valueLabel:_f};function pf(e){let t=0;return e.map(n=>{if(!Number.isFinite(n.value))return null;const s=n.total?0:t,r=s+n.value;return t=r,{inicio:s,fim:r}})}function gf(e){return e.intent?e.intent:e.total?"neutral":e.value<0?"negative":"positive"}function bf(e,t){return e===0?t(0):`${e<0?"-":"+"}${t(Math.abs(e))}`}function yf({emptyMessage:e="Sem dados no período",formatValue:t=je,height:n=280,labelAngle:s="auto",onHoverStep:r,showDataLabels:a=!0,steps:i,title:c,xAxis:u="visible",yAxis:f="visible",yAxisRight:h="hidden"}){const{font:y,height:d,radius:p,ref:m,width:b}=ke(),{fillHeight:_,value:$}=Ne(n,d),{hover:j,hovered:g}=qn(r),N=l.useMemo(()=>pf(i),[i]),v=l.useMemo(()=>De(i.map(A=>({color:A.color,intent:gf(A)}))),[i]),R=l.useMemo(()=>Ue(N.flatMap(A=>A?[A.inicio,A.fim]:[])),[N]),E=Je(R,$,t),{margins:B,plot:k,rotation:H}=$t({bottomLabels:i.map(A=>A.label),font:y,height:$,labelAngle:s,leftLabels:E,rightLabels:E,topRoom:a?Ht(y):0,width:b,xAxis:u,yAxis:f,yAxisRight:h}),M=l.useMemo(()=>Pn({domain:i.map((A,x)=>String(x)),range:[0,k.width]}),[k.width,i]),I=A=>M(String(A))??0,F=l.useMemo(()=>xe({domain:R,range:[k.height,0]}),[R,k.height]),[z,L]=Ce(F.domain()),T=l.useMemo(()=>xe({domain:{min:z,max:L},nice:!1,range:[k.height,0]}),[L,z,k.height]),C=Ge(F,k.height),P=i.map((A,x)=>({label:A.label,position:I(x)+M.bandwidth()/2})),G=C.map(A=>({label:t(A),position:T(A)}));function Q(A){return A.total?t(A.value):bf(A.value,t)}return o.jsxs(Mt,{containerRef:m,empty:i.length===0,emptyMessage:e,grid:[{baseline:T(0),lines:C.map(A=>T(A)),orientation:"horizontal"}],fillHeight:_,height:$,legendPosition:"none",margins:B,plot:k,title:c,width:b,xAxis:{labelRotation:H,ticks:P,visibility:u},yAxis:{hideLine:!0,ticks:G,visibility:f},yAxisRight:{hideLine:!0,ticks:G,visibility:h},children:[g!==null&&o.jsx(Fn,{offset:I(g),plot:k,size:M.bandwidth()}),o.jsx("g",{"aria-hidden":"true",children:N.slice(0,-1).map((A,x)=>{if(!A||!N[x+1])return null;const D=T(A.fim);return o.jsx("line",{className:Mn.connector,x1:I(x)+M.bandwidth(),x2:I(x+1),y1:D,y2:D},x)})}),i.map((A,x)=>{const D=N[x];if(!D)return null;const S=Math.min(T(D.inicio),T(D.fim)),w=Math.abs(T(D.fim)-T(D.inicio));return o.jsx("path",{"aria-label":`${A.label}: ${Q(A)}`,className:Mn.bar,d:Kn(I(x),S,M.bandwidth(),w,[p,p,p,p]),fill:v[x],onMouseEnter:()=>j(x),onMouseLeave:()=>j(null)},x)}),a&&i.map((A,x)=>{const D=N[x];if(!D)return null;const S=Math.min(T(D.inicio),T(D.fim));return o.jsx("text",{className:Mn.valueLabel,textAnchor:"middle",x:I(x)+M.bandwidth()/2,y:S-6,children:Q(A)},x)})]})}const xf="_cell_5uvni_1",vf="_tile_5uvni_5",jf="_label_5uvni_14",$f="_value_5uvni_21",Yt={cell:xf,tile:vf,label:jf,value:$f};function bs(e){return Number.isFinite(e.value)?Math.max(e.value??0,0):0}function Mf({accent:e,defaultHiddenGroups:t,emptyMessage:n="Sem dados no período",formatValue:s=je,gap:r=5,height:a=280,hiddenGroups:i,intentLabels:c,legend:u="bottom",legendAlign:f,nodes:h,onHiddenGroupsChange:y,showDataLabels:d=!0,title:p}){const{font:m,height:b,ref:_,width:$}=ke(),{fillHeight:j,value:g}=Ne(a,b),{isHidden:N,toggle:v}=Xe({defaultHiddenSeries:t,hiddenSeries:i,onHiddenSeriesChange:y}),R=l.useMemo(()=>De(h,{accent:e}),[e,h]),E=l.useMemo(()=>!((St.hierarchy({children:h,label:""}).sum(bs).value??0)>0),[h]),B=l.useMemo(()=>{const M=h.filter(z=>!N(z.label));if($===0||g===0||M.length===0)return[];const I=St.hierarchy({children:M,label:""}).sum(bs).sort((z,L)=>(L.value??0)-(z.value??0));return St.treemap().size([$,g]).paddingInner(r).round(!0)(I).leaves()},[g,r,N,h,$]);function k(M){var z;const I=M.data;if(I.color)return I.color;if(I.intent)return Jt[I.intent];const F=(z=M.ancestors().find(L=>L.depth===1))==null?void 0:z.data;return R[h.findIndex(L=>L.label===(F==null?void 0:F.label))]??Jt.neutral}const H=c?Object.entries(c).map(([M,I])=>({color:Jt[M],label:I})):h.map((M,I)=>({color:R[I],hidden:N(M.label),label:M.label}));return o.jsx(lt,{containerRef:_,empty:h.length===0||E,emptyMessage:n,fillHeight:j,height:g,legend:H,legendAlign:f,legendPosition:u,onToggleSeries:c?void 0:v,title:p,width:$,children:B.map(M=>{const I=M.x1-M.x0,F=M.y1-M.y0,z=I-fe*2,L=d&&z>0&&F>=m.lineHeight+fe,T=L&&F>=m.lineHeight*2+fe,C=`${M.data.label}: ${s(M.value??0)}`,P=k(M);return o.jsxs("g",{className:Yt.cell,children:[o.jsx("rect",{"aria-label":C,className:Yt.tile,fill:P,height:F,width:I,x:M.x0,y:M.y0,children:o.jsx("title",{children:C})}),L&&o.jsx("text",{className:Yt.label,fill:Rn(P),x:M.x0+fe,y:M.y0+fe+m.lineHeight*.6,children:bt(M.data.label,m,z)}),T&&o.jsx("text",{className:Yt.value,fill:Rn(P),x:M.x0+fe,y:M.y0+fe+m.lineHeight*1.6,children:bt(s(M.value??0),m,z)})]},`${M.data.label}-${M.x0}-${M.y0}`)})})}const Nf="_arc_fgn0g_1",kf="_arcDim_fgn0g_9",Df="_leader_fgn0g_13",wf="_connector_fgn0g_17",Rf="_label_fgn0g_23",It={arc:Nf,arcDim:kf,leader:Df,connector:wf,label:Rf},Cf=.18,Qt=14;function so(e,t=1,n=new Map){return e.forEach(s=>{var r;n.set(t,[...n.get(t)??[],s.label]),(r=s.children)!=null&&r.length&&so(s.children,t+1,n)}),n}function Lf(e,t){if(t<=1)return e;const n=Math.min((t-1)*22,66);return`color-mix(in oklab, ${e} ${100-n}%, var(--pl-color-surface))`}function If({accent:e,defaultHiddenGroups:t,emptyMessage:n="Sem dados no período",formatPercent:s=b=>`${Math.round(b*100)}%`,formatValue:r=je,height:a=320,hiddenGroups:i,legend:c="bottom",legendAlign:u,nodes:f,onHiddenGroupsChange:h,ringGap:y=2,showLabels:d=!0,sliceRadius:p,title:m}){const{font:b,height:_,radius:$,ref:j,width:g}=ke(),{fillHeight:N,value:v}=Ne(a,_),{isHidden:R,toggle:E}=Xe({defaultHiddenSeries:t,hiddenSeries:i,onHiddenSeriesChange:h}),[B,k]=l.useState(null),H=l.useMemo(()=>De(f,{accent:e}),[e,f]),M=l.useMemo(()=>f.filter(w=>!R(w.label)),[R,f]),I=l.useMemo(()=>{const w=so(M),K=Math.max(0,...w.keys());return w.get(K)??[]},[M]),F=d?Math.min(jt(I,b),g*kn):0,z=d?Qt*2+fe+F:0,T=hn(Math.max(g-z*2,0),v)/2,C=l.useMemo(()=>{if(T<=0)return[];const w=St.hierarchy({children:M,label:""}).sum(V=>Math.max(V.value??0,0)).sort((V,O)=>(O.value??0)-(V.value??0));return St.partition().size([Bn,T])(w).descendants().filter(V=>V.depth>0)},[T,M]),P=C.reduce((w,K)=>Math.max(w,K.depth),0),G=C.filter(w=>w.depth===1).reduce((w,K)=>w+(K.value??0),0);function Q(w){return w.ancestors().map(K=>K.data.label).join("/")}const A=B&&C.includes(B)?B:null;function x(w){return A===null||A.ancestors().includes(w)}function D(w){var O;const K=(O=w.ancestors().find(U=>U.depth===1))==null?void 0:O.data,V=(K==null?void 0:K.color)??H[f.findIndex(U=>U.label===(K==null?void 0:K.label))];return Lf(V??"var(--pl-chart-neutral)",w.depth)}function S(w){const K=G>0?(w.value??0)/G:0;return`${w.data.label}: ${r(w.value??0)} (${s(K)})`}return o.jsxs(lt,{centerOrigin:!0,containerRef:j,empty:f.length===0,emptyMessage:n,fillHeight:N,height:v,legend:f.map((w,K)=>({color:H[K],hidden:R(w.label),label:w.label})),legendAlign:u,legendPosition:c,onToggleSeries:E,swatch:"dot",title:m,width:g,children:[C.map(w=>o.jsx("path",{"aria-label":S(w),className:`${It.arc} ${x(w)?"":It.arcDim}`,d:zt({cornerRadius:p??$,endAngle:w.x1,innerRadius:w.y0+(w.depth>1?y:0),outerRadius:w.y1,startAngle:w.x0}),fill:D(w),onMouseEnter:()=>k(w),onMouseLeave:()=>k(null),children:o.jsx("title",{children:S(w)})},Q(w))),d&&C.filter(w=>w.depth===P&&w.x1-w.x0>=Cf).map(w=>{const K={endAngle:w.x1,startAngle:w.x0},[V,O]=ds(K,w.y1),[U,ee]=ds(K,w.y1+Qt),Z=U>=0,ae=U+(Z?Qt:-Qt);return o.jsxs("g",{className:It.leader,children:[o.jsx("polyline",{className:It.connector,points:`${V},${O} ${U},${ee} ${ae},${ee}`}),o.jsx("text",{className:It.label,dominantBaseline:"middle",textAnchor:Z?"start":"end",x:ae+(Z?fe:-fe),y:ee,children:bt(w.data.label,b,F)})]},`rotulo-${Q(w)}`)})]})}const Af="_links_1wqmi_1",Of="_link_1wqmi_1",Sf="_linkOn_1wqmi_18",Ef="_linkDim_1wqmi_22",Tf="_node_1wqmi_26",zf="_label_1wqmi_30",Ff="_flowValue_1wqmi_37",Pf="_sobreFluxo_1wqmi_47",Te={links:Af,link:Of,linkOn:Sf,linkDim:Ef,node:Tf,label:zf,flowValue:Ff,sobreFluxo:Pf};function Bf(e,t){return e.x0<t.x1&&t.x0<e.x1&&e.y0<t.y1&&t.y0<e.y1}const Hf={center:At.sankeyCenter,justify:At.sankeyJustify,left:At.sankeyLeft,right:At.sankeyRight};function Kf(e){const t=e.source.x1,n=e.target.x0,s=(t+n)/2;return`M${t},${e.y0}C${s},${e.y0} ${s},${e.y1} ${n},${e.y1}`}function qf(e){const t=new Map;for(const a of e)t.set(a.source,[...t.get(a.source)??[],a.target]);const n=new Set,s=new Set;function r(a){if(s.has(a))return!0;if(n.has(a))return!1;s.add(a);const i=(t.get(a)??[]).some(r);return s.delete(a),n.add(a),i}return[...t.keys()].some(r)}function Vf({accent:e,cyclicMessage:t="O fluxo volta sobre si mesmo e não pode ser desenhado",emptyMessage:n="Sem dados no período",flowColor:s="source",flowValuePosition:r="end",flows:a,formatValue:i=je,height:c=320,nodeAlign:u="justify",nodes:f,nodePadding:h=12,nodeWidth:y=12,showFlowValues:d=!1,showLabels:p=!0,title:m}){const{font:b,height:_,ref:$,width:j}=ke(),{fillHeight:g,value:N}=Ne(c,_),[v,R]=l.useState(null),E=l.useMemo(()=>{const x=(f??[]).map(D=>D.label);return a.forEach(({source:D,target:S})=>{[D,S].forEach(w=>{x.includes(w)||x.push(w)})}),x.map(D=>(f==null?void 0:f.find(S=>S.label===D))??{label:D})},[a,f]),B=l.useMemo(()=>De(E,{accent:e}),[e,E]),k=l.useMemo(()=>{const x=new Set(a.map(D=>D.source));return E.map(D=>D.label).filter(D=>!x.has(D))},[E,a]),H=p?Math.min(jt(k,b),j*kn)+fe:0,M=l.useMemo(()=>qf(a),[a]),I=l.useMemo(()=>a.reduce((x,D)=>x+(Number.isFinite(D.value)?Math.max(D.value,0):0),0),[a]),F=l.useMemo(()=>{const x=j-H;return x<=0||N<=0||a.length===0||M||I<=0?{links:[],nodes:[]}:At.sankey().nodeId(w=>w.label).nodeAlign(Hf[u]).nodeWidth(y).nodePadding(h).extent([[0,2],[x,N-2]])({links:a.map(w=>({...w,value:Number.isFinite(w.value)?Math.max(w.value,0):0})),nodes:E.map(w=>({label:w.label}))})},[N,H,M,E,a,u,h,y,I,j]),z=x=>B[x]??"var(--pl-chart-neutral)";function L(x){return s==="neutral"?"var(--pl-chart-neutral)":z(s==="target"?x.target.index:x.source.index)}function T(x){return`${x.source.label} → ${x.target.label}: ${i(x.value)}`}function C(x){return v===null?Te.link:`${Te.link} ${v===x?Te.linkOn:Te.linkDim}`}const P=(()=>{const x=[...new Set(F.nodes.map(S=>S.x0))].sort((S,w)=>S-w);if(x.length<2)return j*kn;const D=Math.min(...x.slice(1).map((S,w)=>S-x[w]));return Math.max(D-y-fe,0)})();function G(x){const D=k.includes(x.label),S=bt(x.label,b,(D?H:P)-fe),w=x.x1+fe,K=(x.y0+x.y1)/2;return{caixa:{x0:w,x1:w+Qe(S,b),y0:K-b.lineHeight/2,y1:K+b.lineHeight/2},texto:S,x:w,y:K}}const Q=p?F.nodes.map(G):[];function A(x){const D=i(x.value),S=Qe(D,b),w=x.source.x1,K=x.target.x0,V=(x.y0+x.y1)/2,O={end:{anchor:"end",x:K-fe},middle:{anchor:"middle",x:(w+K)/2},start:{anchor:"start",x:w+fe}},{anchor:U,x:ee}=O[r],Z={end:S,middle:S/2,start:0}[r],ae={x0:ee-Z,x1:ee-Z+S,y0:V-b.lineHeight/2,y1:V+b.lineHeight/2};if(!Q.some(X=>Bf(ae,X.caixa)))return{anchor:U,texto:D,x:ee,y:V}}return o.jsxs(lt,{containerRef:$,empty:a.length===0||M||I<=0,emptyMessage:M?t:n,fillHeight:g,height:N,legendPosition:"none",title:m,width:j,children:[o.jsx("g",{className:Te.links,children:F.links.map((x,D)=>o.jsx("path",{"aria-label":T(x),className:C(D),d:Kf(x),onMouseEnter:()=>R(D),onMouseLeave:()=>R(null),stroke:L(x),strokeWidth:Math.max(x.width,1),children:o.jsx("title",{children:T(x)})},D))}),F.nodes.map(x=>o.jsx("rect",{"aria-label":x.label,className:Te.node,fill:z(x.index),height:Math.max(x.y1-x.y0,1),width:x.x1-x.x0,x:x.x0,y:x.y0,children:o.jsx("title",{children:x.label})},x.label)),d&&F.links.map((x,D)=>{const S=A(x);return S?o.jsx("text",{className:`${Te.flowValue} ${Te.sobreFluxo}`,dominantBaseline:"middle",textAnchor:S.anchor,x:S.x,y:S.y,children:S.texto},D):null}),Q.map((x,D)=>o.jsx("text",{className:`${Te.label} ${k.includes(F.nodes[D].label)?"":Te.sobreFluxo}`,dominantBaseline:"middle",textAnchor:"start",x:x.x,y:x.y,children:x.texto},`rotulo-${F.nodes[D].label}`))]})}exports.Accordion=Br;exports.Alert=Ha;exports.Avatar=tl;exports.Badge=Xi;exports.Breadcrumb=$r;exports.Button=it;exports.Card=dn;exports.ChartArea=qd;exports.ChartBar=td;exports.ChartCombo=Sd;exports.ChartDonut=af;exports.ChartLine=cd;exports.ChartPie=ef;exports.ChartRadial=ff;exports.ChartSankey=Vf;exports.ChartScatter=Yd;exports.ChartSunburst=If;exports.ChartTooltip=Nd;exports.ChartTreemap=Mf;exports.ChartWaterfall=yf;exports.Checkbox=Ts;exports.ComboBox=yi;exports.DatePicker=$c;exports.DateTimePicker=Gc;exports.Dialog=Fi;exports.Field=We;exports.IconArrowDown=oo;exports.IconArrowUp=ys;exports.IconCalendar=In;exports.IconChevronDown=xs;exports.IconChevronLeft=An;exports.IconChevronRight=rn;exports.IconChevronUp=ao;exports.IconClock=vs;exports.IconClose=js;exports.IconMinusCircle=$s;exports.IconPlusCircle=Ms;exports.InputCurrency=ta;exports.InputNumber=Go;exports.InputPassword=ea;exports.InputText=On;exports.Label=ks;exports.List=Bt;exports.Menu=ji;exports.Pagination=Cr;exports.Popover=Ja;exports.Progress=Za;exports.Radio=ka;exports.RadioGroup=Na;exports.Select=di;exports.Spinner=Ns;exports.Switch=Oa;exports.Table=vt;exports.Tabs=gr;exports.Textarea=ra;exports.TimePicker=Sc;exports.Tooltip=Hs;exports.formatarData=Fo;exports.formatarHora=Po;exports.formatarMoeda=Bo;exports.formatarNumero=je;exports.formatarPercentual=As;exports.paletteWithAccent=to;exports.resolveSeriesColors=De;exports.seriesColors=on;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),l=require("react"),an=require("d3-scale"),Nn=require("d3-array"),bt=require("d3-shape"),At=require("d3-sankey"),Ot=require("d3-hierarchy"),Re=require("react-dom"),je=require("@react-aria/overlays"),re=require("@internationalized/date"),Cn=require("@react-aria/focus");function ke({children:e,label:t,size:n="1em",...s}){const r=t??s["aria-label"];return o.jsx("svg",{"aria-hidden":r?void 0:!0,"aria-label":r,fill:"currentColor",focusable:"false",height:n,role:r?"img":void 0,viewBox:"0 0 16 16",width:n,xmlns:"http://www.w3.org/2000/svg",...s,children:e})}function lo(e){return o.jsx(ke,{...e,children:o.jsx("path",{fillRule:"evenodd",d:"M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1"})})}function xs(e){return o.jsx(ke,{...e,children:o.jsx("path",{fillRule:"evenodd",d:"M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5"})})}function Ln(e){return o.jsx(ke,{...e,children:o.jsx("path",{d:"M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V5h16V4H0V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5"})})}function vs(e){return o.jsx(ke,{...e,children:o.jsx("path",{fillRule:"evenodd",d:"M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708"})})}function js(e){return o.jsx(ke,{...e,children:o.jsx("path",{fillRule:"evenodd",d:"M3.646 9.146a.5.5 0 0 1 .708 0L8 12.793l3.646-3.647a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 0-.708m0-2.292a.5.5 0 0 0 .708 0L8 3.207l3.646 3.647a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 0 0 0 .708"})})}function In(e){return o.jsx(ke,{...e,children:o.jsx("path",{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"})})}function rn(e){return o.jsx(ke,{...e,children:o.jsx("path",{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"})})}function co(e){return o.jsx(ke,{...e,children:o.jsx("path",{fillRule:"evenodd",d:"M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708z"})})}function $s(e){return o.jsx(ke,{...e,children:o.jsx("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71z"})})}function Ms(e){return o.jsx(ke,{...e,children:o.jsx("path",{d:"M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z"})})}function Ns(e){return o.jsxs(ke,{...e,children:[o.jsx("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"}),o.jsx("path",{d:"M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8"})]})}function ks(e){return o.jsxs(ke,{...e,children:[o.jsx("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"}),o.jsx("path",{d:"M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4"})]})}function Ds(e){return o.jsxs(ke,{...e,children:[o.jsx("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"}),o.jsx("path",{d:"M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286m1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94"})]})}const uo="_spinner_nob8y_1",fo="_sm_nob8y_10",mo="_md_nob8y_15",ho="_lg_nob8y_21",Un={spinner:uo,"pl-spin":"_pl-spin_nob8y_1",sm:fo,md:mo,lg:ho};function ws({className:e,label:t,size:n="md",...s}){const r=[Un.spinner,Un[n],e].filter(Boolean).join(" ");return t?o.jsx("span",{...s,className:r,role:"status","aria-label":t}):o.jsx("span",{...s,className:r,"aria-hidden":"true"})}const _o="_button_1opic_1",po="_primary_1opic_37",go="_secondary_1opic_47",bo="_soft_1opic_59",yo="_ghost_1opic_70",xo="_danger_1opic_81",vo="_sm_1opic_92",jo="_md_1opic_98",$o="_lg_1opic_102",_n={button:_o,primary:po,secondary:go,soft:bo,ghost:yo,danger:xo,sm:vo,md:jo,lg:$o},lt=l.forwardRef(({children:e,className:t,disabled:n=!1,loading:s=!1,onClick:r,size:a="md",type:i="button",variant:u="primary",...c},m)=>{const h=[_n.button,_n[u],_n[a],t].filter(Boolean).join(" ");function g(d){if(s){d.preventDefault();return}r==null||r(d)}return o.jsxs("button",{...c,ref:m,className:h,disabled:n,"aria-disabled":s||void 0,"aria-busy":s||void 0,onClick:g,type:i,children:[s&&o.jsx(ws,{size:a==="lg"?"md":"sm"}),e]})}),Mo="_label_1uf9d_1",No="_required_1uf9d_12",Gn={label:Mo,required:No};function Rs({children:e,className:t,required:n=!1,...s}){const r=[Gn.label,t].filter(Boolean).join(" ");return o.jsxs("label",{...s,className:r,children:[e,n&&o.jsx("span",{className:Gn.required,"aria-hidden":"true",children:"*"})]})}const ko="_field_wy7pm_1",Do="_hint_wy7pm_8",wo="_errorMessage_wy7pm_9",Ro="_characterCount_wy7pm_10",Co="_formValue_wy7pm_31",St={field:ko,hint:Do,errorMessage:wo,characterCount:Ro,formValue:Co};function Ze({"aria-describedby":e,className:t,characterCount:n=0,children:s,error:r,hint:a,id:i,label:u,maxLength:c,required:m=!1,showCharacterCount:h=!1,...g}){const d=l.useId(),p=i??`field-${d}`,f=`${p}-message`,y=`${p}-character-count`,_=[e,r||a?f:void 0,h?y:void 0].filter(Boolean).join(" ")||void 0;return o.jsxs("div",{...g,className:[St.field,t].filter(Boolean).join(" "),children:[u&&o.jsx(Rs,{htmlFor:p,required:m,children:u}),s({id:p,describedBy:_,invalid:!!r}),(r||a)&&o.jsx("span",{className:r?St.errorMessage:St.hint,id:f,role:r?"alert":void 0,children:r||a}),h&&o.jsx("span",{className:St.characterCount,id:y,children:c?`${n}/${c}`:n})]})}function Kt(e){return String(e??"").length}function Cs(e,t){const n=l.useRef(null),[s,r]=l.useState(()=>Kt(t));return l.useEffect(()=>{var u;const a=(u=n.current)==null?void 0:u.form;if(!a)return;function i(){r(Kt(t))}return a.addEventListener("reset",i),()=>a.removeEventListener("reset",i)},[t]),{ref:n,count:e===void 0?s:Kt(e),updateCount(a){e===void 0&&r(Kt(a))}}}function Lo(e,t){if(typeof e=="function"){const n=e(t);return typeof n=="function"?n:()=>e(null)}return e?(e.current=t,()=>{e.current=null}):()=>{}}function Me(...e){return l.useMemo(()=>t=>{const n=e.map(s=>Lo(s,t));return()=>n.forEach(s=>s())},e)}const Io="_input_1rs88_1",Ao="_error_1rs88_20",So="_sm_1rs88_38",Oo="_md_1rs88_44",pn={input:Io,error:Ao,sm:So,md:Oo};function An({"aria-describedby":e,"aria-invalid":t,className:n,error:s,hint:r,id:a,label:i,maxLength:u,required:c=!1,size:m="md",showCharacterCount:h=!1,defaultValue:g,onChange:d,value:p,ref:f,...y}){const{ref:_,count:$,updateCount:v}=Cs(p,g),b=Me(_,f),D=[pn.input,pn[m],s&&pn.error,n].filter(Boolean).join(" ");function j(R){v(R.target.value),d==null||d(R)}return o.jsx(Ze,{"aria-describedby":e,characterCount:$,error:s,hint:r,id:a,label:i,maxLength:u,required:c,showCharacterCount:h,children:({id:R,describedBy:E,invalid:P})=>o.jsx("input",{...y,defaultValue:g,id:R,ref:b,"aria-describedby":E,"aria-invalid":P||t,className:D,maxLength:u,onChange:j,required:c,value:p})})}const gt=",",Ls=3;function Is(e){const t=e.split(".");return e.includes(gt)||t.length!==2?null:{inteiro:t[0].replace(/\D/g,""),fracao:t[1].replace(/\D/g,"")}}function zo(e){const t=Is(e);return t!==null&&(Number(t.inteiro)===0||t.fracao.length!==Ls)?e.replace(".",gt):e.replace(/\./g,"")}function Eo(e,t){return Number.isFinite(e)?new Intl.NumberFormat("en-US",{maximumFractionDigits:Math.max(t,0),useGrouping:!1}).format(e).replace(".",gt):""}function As(e){return e.trimStart().startsWith("-")?"-":""}function rt(e,t=0){const n=typeof e=="number"?Eo(e,t):zo(e),s=As(n),r=n.replace(/[^\d,]/g,""),[a="",...i]=r.split(gt),u=a.replace(/\D/g,"");if(t<=0)return`${s}${u}`;if(!r.includes(gt))return`${s}${u}`;const c=i.join("").replace(/\D/g,"").slice(0,t);return`${s}${u}${gt}${c}`}function To(e,t=0){const n=Is(e);return t<=0||n===null||Number(n.inteiro)===0||n.fracao.length>=Ls?rt(e,t):`${As(e)}${n.inteiro}.${n.fracao}`}function Fo(e){var t;try{return((t=new Intl.NumberFormat("pt-BR",{currency:e,style:"currency"}).formatToParts(0).find(s=>s.type==="currency"))==null?void 0:t.value)??e}catch{return e}}function Bo(e,t="BRL",n=2){const s=rt(e,n),r=s.startsWith("-")?"-":"",[a="",i=""]=s.replace("-","").split(","),c=(a||"0").replace(/\B(?=(\d{3})+(?!\d))/g,"."),m=Fo(t);return n<=0?`${r}${m} ${c}`:`${r}${m} ${c},${i.padEnd(n,"0")}`}const Po={numerico:{day:"2-digit",month:"2-digit",year:"numeric"},curto:{day:"2-digit",month:"short",year:"numeric"},longo:{day:"2-digit",month:"long",year:"numeric"}},Ho=/^\d{4}-\d{2}-\d{2}$/;function Ss(e){if(e instanceof Date)return e;if(Ho.test(e)){const[t,n,s]=e.split("-").map(Number);return new Date(t,n-1,s)}return new Date(e)}function Ko(e,{localidade:t="pt-BR",formato:n="numerico"}={}){const s=Ss(e);return Number.isNaN(s.getTime())?"":new Intl.DateTimeFormat(t,Po[n]).format(s)}function qo(e,{localidade:t="pt-BR",segundos:n=!1}={}){const s=typeof e=="string"&&/^\d{2}:\d{2}/.test(e)?new Date(`1970-01-01T${e}`):Ss(e);return Number.isNaN(s.getTime())?"":new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",second:n?"2-digit":void 0,hourCycle:"h23"}).format(s)}function Sn(e){return e===void 0?{}:{maximumFractionDigits:e,minimumFractionDigits:e}}function Os(e){return e?{compactDisplay:"short",notation:"compact"}:{}}const On={signDisplay:"negative"};function $e(e,{casasDecimais:t,compacto:n,localidade:s="pt-BR"}={}){return Number.isFinite(e)?new Intl.NumberFormat(s,{...On,...Os(n),...Sn(t)}).format(e):""}function Vo(e,{casasDecimais:t,compacto:n,localidade:s="pt-BR",moeda:r="BRL"}={}){return Number.isFinite(e)?new Intl.NumberFormat(s,{...On,currency:r,style:"currency",...Os(n),...Sn(t)}).format(e):""}function zs(e,{casasDecimais:t=0,localidade:n="pt-BR"}={}){return Number.isFinite(e)?new Intl.NumberFormat(n,{...On,style:"percent",...Sn(t)}).format(e):""}function zn(e,t,n){const s=e.replace(/^\D+/,"").split(/\D+/),r=[];return s.forEach((a,i)=>{const u=i<s.length-1;let c=a;do{if(r.length===t.length)return;const m=t[r.length];r.push(c.slice(0,m)),c=u?"":c.slice(m)}while(c)}),r.map((a,i)=>i===0?a:n[i-1]+a).join("")}const Uo=/^\s*(\d{4})[/\-.](\d{1,2})[/\-.](\d{1,2})\s*$/;function Go(e){const t=e.match(Uo),n=t?[t[3].padStart(2,"0"),t[2].padStart(2,"0"),t[1]].join("/"):e;return zn(n,[2,2,4],["/","/"])}function Es(e){const t=e.trim().split(/[/\-.\s]+/).filter(Boolean);if(t.length!==3)return;const[n,s,r]=t.map(Number);if(![n,s,r].every(Number.isInteger)||r<1e3||s<1||s>12||n<1)return;const a=new re.CalendarDate(r,s,n);return a.day===n&&a.month===s?a:void 0}const Wo=/^\d{1,2}:\d{2}$/;function Ts(e){return zn(e,[2,2],[":"])}function tn(e){if(!Wo.test(e))return;const[t,n]=e.split(":").map(Number);return t>23||n>59?void 0:new re.Time(t,n)}function Xo(e){return zn(e,[2,2,4,2,2],["/","/"," ",":"])}function Zo(e){const[t,n=""]=e.trim().split(/\s+/),s=Es(t);if(!s)return;if(n==="")return new re.CalendarDateTime(s.year,s.month,s.day,0,0);const r=tn(n);return r&&new re.CalendarDateTime(s.year,s.month,s.day,r.hour,r.minute)}function vt(e){const t=l.useRef(null),n=l.useRef(e);return n.current=e,l.useEffect(()=>{var a;const s=(a=t.current)==null?void 0:a.closest("form");if(!s)return;const r=()=>n.current();return s.addEventListener("reset",r),()=>s.removeEventListener("reset",r)},[]),t}function Fs({decimalScale:e,defaultValue:t,onValueChange:n,value:s}){const[r,a]=l.useState(()=>rt(t,e)),[i,u]=l.useState(null),c=vt(()=>{a(rt(t,e)),u(null)}),m=s===void 0?r:rt(s,e),h=i!==null&&rt(i,e)===m?i:m;function g(d){const p=rt(d.target.value,e);u(To(d.target.value,e)),a(p),n==null||n(p)}return{ref:c,value:m,text:h,handleChange:g,endEditing:()=>u(null)}}function Yo({decimalScale:e=0,defaultValue:t="",onBlur:n,onKeyDown:s,onValueChange:r,value:a,...i}){const u=Fs({decimalScale:e,defaultValue:t,onValueChange:r,value:a}),c=Me(u.ref,i.ref);function m(g){u.endEditing(),n==null||n(g)}function h(g){e===0&&(g.key===","||g.key===".")&&g.preventDefault(),s==null||s(g)}return o.jsx(An,{...i,ref:c,inputMode:e>0?"decimal":"numeric",onBlur:m,onChange:u.handleChange,onKeyDown:h,pattern:e>0?void 0:"-?[0-9]*",type:"text",value:u.text})}const Qo="_control_1m42t_1",Jo="_input_1m42t_7",ea="_error_1m42t_26",ta="_sm_1m42t_44",na="_md_1m42t_51",sa="_toggle_1m42t_67",kt={control:Qo,input:Jo,error:ea,sm:ta,md:na,toggle:sa};function oa({"aria-describedby":e,"aria-invalid":t,allowCopy:n=!1,className:s,defaultValue:r,disabled:a=!1,error:i,hint:u,id:c,label:m,maxLength:h,onChange:g,onCopy:d,onCut:p,onBlur:f,onValidationChange:y,required:_=!1,showToggle:$=!0,size:v="md",validate:b,validateOnBlur:D=!0,value:j,ref:R,...E}){const[P,N]=l.useState(!1),[H,k]=l.useState(!1),[S,z]=l.useState(),I=l.useRef(null),L=Me(I,R),K=i??S,A=[kt.input,kt[v],K&&kt.error,s].filter(Boolean).join(" ");l.useEffect(()=>{var T;const w=(T=I.current)==null?void 0:T.form;if(!w)return;function M(){N(!1)}return w.addEventListener("submit",M),()=>w.removeEventListener("submit",M)},[]);function F(w){const M=b==null?void 0:b(w);z(M),y==null||y(M)}function G(w){b&&(H||!D)&&F(w.target.value),g==null||g(w)}function U(w){k(!0),b&&D&&F(w.target.value),f==null||f(w)}function C(w){d==null||d(w),n||w.preventDefault()}function x(w){p==null||p(w),n||w.preventDefault()}return o.jsx(Ze,{"aria-describedby":e,error:K,hint:u,id:c,label:m,maxLength:h,required:_,children:({id:w,describedBy:M,invalid:T})=>o.jsxs("div",{className:kt.control,children:[o.jsx("input",{...E,autoComplete:E.autoComplete??"current-password",className:A,defaultValue:r,disabled:a,id:w,ref:L,"aria-describedby":M,"aria-invalid":T||t,maxLength:h,onChange:G,onCopy:C,onCut:x,onBlur:U,required:_,type:P?"text":"password",value:j}),$&&o.jsx("button",{className:kt.toggle,type:"button","aria-label":P?"Ocultar senha":"Mostrar senha",disabled:a,onClick:()=>N(Z=>!Z),children:P?"Ocultar":"Mostrar"})]})})}function aa({currency:e="BRL",defaultValue:t="",decimalScale:n=2,onBlur:s,onFocus:r,onValueChange:a,value:i,...u}){const c=Fs({decimalScale:n,defaultValue:t,onValueChange:a,value:i}),m=Me(c.ref,u.ref),[h,g]=l.useState(!1),d=h||!c.value?c.text:Bo(c.value,e,n);function p(y){g(!0),r==null||r(y)}function f(y){g(!1),c.endEditing(),s==null||s(y)}return o.jsx(An,{...u,ref:m,inputMode:"decimal",onBlur:f,onChange:c.handleChange,onFocus:p,type:"text",value:d})}const ra="_textarea_1kzgu_1",ia="_error_1kzgu_20",la="_sm_1kzgu_39",ca="_md_1kzgu_45",gn={textarea:ra,error:ia,sm:la,md:ca};function ua({"aria-describedby":e,"aria-invalid":t,className:n,error:s,hint:r,id:a,label:i,maxLength:u,required:c=!1,rows:m=4,size:h="md",showCharacterCount:g=!1,defaultValue:d,onChange:p,value:f,ref:y,..._}){const{ref:$,count:v,updateCount:b}=Cs(f,d),D=Me($,y),j=[gn.textarea,gn[h],s&&gn.error,n].filter(Boolean).join(" ");function R(E){b(E.target.value),p==null||p(E)}return o.jsx(Ze,{"aria-describedby":e,characterCount:v,error:s,hint:r,id:a,label:i,maxLength:u,required:c,showCharacterCount:g,children:({id:E,describedBy:P,invalid:N})=>o.jsx("textarea",{..._,defaultValue:d,id:E,ref:D,"aria-describedby":P,"aria-invalid":N||t,className:j,maxLength:u,onChange:R,required:c,rows:m,value:f})})}const da="_field_thq98_1",fa="_control_thq98_8",ma="_input_thq98_15",ha="_error_thq98_36",_a="_text_thq98_76",pa="_hint_thq98_84 _hint_wy7pm_8",ga="_errorMessage_thq98_88 _errorMessage_wy7pm_9",nt={field:da,control:fa,input:ma,error:ha,text:_a,hint:pa,errorMessage:ga};function Bs({"aria-describedby":e,"aria-invalid":t,className:n,error:s,hint:r,id:a,indeterminate:i=!1,label:u,ref:c,...m}){const h=l.useId(),g=a??`checkbox-${h}`,d=`${g}-message`,p=[e,s||r?d:void 0].filter(Boolean).join(" ")||void 0,f=[nt.input,s&&nt.error,n].filter(Boolean).join(" "),y=l.useCallback($=>{$&&($.indeterminate=i)},[i]),_=Me(y,c);return o.jsxs("div",{className:nt.field,children:[o.jsxs("label",{className:nt.control,htmlFor:g,children:[o.jsx("input",{...m,ref:_,className:f,id:g,"aria-describedby":p,"aria-invalid":s?!0:t,type:"checkbox"}),u&&o.jsx("span",{className:nt.text,children:u})]}),(s||r)&&o.jsx("span",{className:s?nt.errorMessage:nt.hint,id:d,role:s?"alert":void 0,children:s||r})]})}const ba="_group_1nbsm_1",ya="_legend_1nbsm_11",xa="_required_1nbsm_20",va="_options_1nbsm_25",ja="_control_1nbsm_31",$a="_input_1nbsm_38",Ma="_error_1nbsm_59",Na="_text_1nbsm_90",ka="_hint_1nbsm_98 _hint_wy7pm_8",Da="_errorMessage_1nbsm_102 _errorMessage_wy7pm_9",Pe={group:ba,legend:ya,required:xa,options:va,control:ja,input:$a,error:Ma,text:Na,hint:ka,errorMessage:Da},Ps=l.createContext(null);function wa(){const e=l.useContext(Ps);if(!e)throw new Error("Radio precisa ser renderizado dentro de RadioGroup.");return e}function Ra({"aria-describedby":e,"aria-invalid":t,children:n,className:s,defaultValue:r,disabled:a=!1,error:i,hint:u,label:c,name:m,onValueChange:h,required:g=!1,value:d,...p}){const f=l.useId(),y=m??`radio-group-${f}`,_=`radio-group-${f}-message`,$=[e,i||u?_:void 0].filter(Boolean).join(" ")||void 0;return o.jsx(Ps.Provider,{value:{defaultValue:r,disabled:a,invalid:!!i,name:y,onValueChange:h,required:g,value:d},children:o.jsxs("fieldset",{...p,className:[Pe.group,s].filter(Boolean).join(" "),role:"radiogroup","aria-describedby":$,"aria-invalid":i?!0:t,"aria-required":g||void 0,children:[o.jsxs("legend",{className:Pe.legend,children:[c,g&&o.jsx("span",{className:Pe.required,"aria-hidden":"true",children:"*"})]}),o.jsx("div",{className:Pe.options,children:n}),(i||u)&&o.jsx("span",{className:i?Pe.errorMessage:Pe.hint,id:_,role:i?"alert":void 0,children:i||u})]})})}function Ca({className:e,disabled:t,id:n,label:s,onChange:r,ref:a,value:i,...u}){const c=wa(),m=l.useId(),h=n??`radio-${m}`,g=c.value!==void 0,d=[Pe.input,c.invalid&&Pe.error,e].filter(Boolean).join(" ");return o.jsxs("label",{className:Pe.control,htmlFor:h,children:[o.jsx("input",{...u,className:d,id:h,checked:g?c.value===i:void 0,defaultChecked:g?void 0:c.defaultValue===i,disabled:t??c.disabled,name:c.name,required:c.required,onChange:p=>{var f;(f=c.onValueChange)==null||f.call(c,i),r==null||r(p)},ref:a,type:"radio",value:i}),o.jsx("span",{className:Pe.text,children:s})]})}const La="_field_1g7qr_1",Ia="_control_1g7qr_8",Aa="_input_1g7qr_15",Sa="_error_1g7qr_56",Oa="_text_1g7qr_79",za="_hint_1g7qr_87 _hint_wy7pm_8",Ea="_errorMessage_1g7qr_91 _errorMessage_wy7pm_9",st={field:La,control:Ia,input:Aa,error:Sa,text:Oa,hint:za,errorMessage:Ea};function Ta({"aria-describedby":e,"aria-invalid":t,className:n,error:s,hint:r,id:a,label:i,ref:u,...c}){const m=l.useId(),h=a??`switch-${m}`,g=`${h}-message`,d=[e,s||r?g:void 0].filter(Boolean).join(" ")||void 0,p=[st.input,s&&st.error,n].filter(Boolean).join(" ");return o.jsxs("div",{className:st.field,children:[o.jsxs("label",{className:st.control,htmlFor:h,children:[o.jsx("input",{...c,ref:u,className:p,id:h,"aria-describedby":d,"aria-invalid":s?!0:t,role:"switch",type:"checkbox"}),o.jsx("span",{className:st.text,children:i})]}),(s||r)&&o.jsx("span",{className:s?st.errorMessage:st.hint,id:g,role:s?"alert":void 0,children:s||r})]})}const Fa="_alert_1iezv_1",Ba="_title_1iezv_16",Pa="_body_1iezv_20",Ha="_info_1iezv_24",Ka="_success_1iezv_30",qa="_warning_1iezv_36",Va="_danger_1iezv_42",qt={alert:Fa,title:Ba,body:Pa,info:Ha,success:Ka,warning:qa,danger:Va};function Ua({children:e,className:t,title:n,tone:s="info",...r}){const a=[qt.alert,qt[s],t].filter(Boolean).join(" "),i=s==="danger"||s==="warning";return o.jsxs("div",{role:i?"alert":"status",...r,className:a,children:[n&&o.jsx("strong",{className:qt.title,children:n}),e&&o.jsx("div",{className:qt.body,children:e})]})}const Ga="_progress_1cfl0_1",Wa="_track_1cfl0_8",Xa="_fill_1cfl0_15",Za="_indeterminate_1cfl0_22",Ya="_value_1cfl0_30",Qa="_sm_1cfl0_40",Ja="_md_1cfl0_44",dt={progress:Ga,track:Wa,fill:Xa,indeterminate:Za,"pl-indeterminate":"_pl-indeterminate_1cfl0_1",value:Ya,sm:Qa,md:Ja};function er({className:e,label:t,max:n=100,showValue:s=!1,size:r="md",value:a,...i}){const u=a===void 0,c=u?0:Math.min(Math.max(a,0),n),m=n>0?c/n*100:0,h=[dt.progress,dt[r],e].filter(Boolean).join(" ");return o.jsxs("div",{...i,className:h,role:"progressbar","aria-label":t,"aria-valuemin":0,"aria-valuemax":n,"aria-valuenow":u?void 0:c,children:[o.jsx("div",{className:dt.track,children:o.jsx("div",{className:u?dt.indeterminate:dt.fill,style:u?void 0:{width:`${m}%`}})}),s&&!u&&o.jsxs("span",{className:dt.value,children:[Math.round(m),"%"]})]})}const tr="_popover_12zpc_1",nr={popover:tr};function sr({open:e,...t}){return!e||typeof document>"u"?null:Re.createPortal(o.jsx(or,{...t}),document.body)}function or({children:e,className:t,offset:n=8,onClose:s,placement:r="bottom start",ref:a,style:i,triggerRef:u,...c}){const m=l.useRef(null),h=Me(m,a),{overlayProps:g}=je.useOverlay({isOpen:!0,onClose:s,isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:p=>{var f;return!((f=u.current)!=null&&f.contains(p))}},m),{overlayProps:d}=je.useOverlayPosition({targetRef:u,overlayRef:m,placement:r,offset:n,isOpen:!0});return o.jsx(Cn.FocusScope,{restoreFocus:!0,autoFocus:!0,children:o.jsx("div",{...c,...g,ref:h,className:[nr.popover,t].filter(Boolean).join(" "),"data-react-aria-top-layer":"true",style:{...i,...d.style},role:"dialog",children:e})})}const ar=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});function Hs(e,t){return ar.compare(e,t)===0}function rr(e,t){const n=e.normalize("NFC"),s=t.normalize("NFC");return Hs(n.slice(0,s.length),s)}function ir(e,t){const n=e.normalize("NFC"),s=t.normalize("NFC");if(!s)return!0;for(let r=0;r+s.length<=n.length;r+=1)if(Hs(n.slice(r,r+s.length),s))return!0;return!1}function Et(e,t){return t===void 0?-1:e.findIndex(n=>n.key===t)}function lr(e){var t;return(t=e.find(n=>!n.disabled))==null?void 0:t.key}function cr(e){for(let t=e.length-1;t>=0;t-=1)if(!e[t].disabled)return e[t].key}function ur(e,t){for(let n=Et(e,t)+1;n<e.length;n+=1)if(!e[n].disabled)return e[n].key}function Wn(e,t){const n=Et(e,t);for(let s=(n<0?e.length:n)-1;s>=0;s-=1)if(!e[s].disabled)return e[s].key}function dr(e,t,n){const s=t.trim();if(!s||e.length===0)return;const r=Et(e,n);for(let a=1;a<=e.length;a+=1){const i=e[(r+a+e.length)%e.length];if(!i.disabled&&rr(i.textValue??i.key,s))return i.key}}function Ks(e,t,n,{allowEmpty:s=!1}={}){if(n==="none")return e;if(n==="single"){const a=s&&e.selectedKeys.has(t);return{focusedKey:t,selectedKeys:a?new Set:new Set([t])}}const r=new Set(e.selectedKeys);return r.has(t)?r.delete(t):r.add(t),{anchorKey:t,focusedKey:t,selectedKeys:r}}function Xn(e,t,n){const s=e.anchorKey??e.focusedKey??t,r=Et(n,s),a=Et(n,t);if(r<0||a<0)return Ks(e,t,"multiple");const[i,u]=r<=a?[r,a]:[a,r],c=new Set(e.selectedKeys);for(let m=i;m<=u;m+=1)n[m].disabled||c.add(n[m].key);return{anchorKey:s,focusedKey:t,selectedKeys:c}}function qs(e,t){const n=t.filter(r=>!r.disabled),s=n.filter(r=>e.selectedKeys.has(r.key)).length;return s===0?"none":s===n.length?"all":"partial"}function fr(e,t){const n=t.filter(a=>!a.disabled),s=new Set(e.selectedKeys),r=qs(e,t)!=="all";return n.forEach(a=>r?s.add(a.key):s.delete(a.key)),{...e,selectedKeys:s}}function mr(e){return{focusedKey:e.focusedKey,selectedKeys:new Set}}function Ft({allowEmpty:e=!1,defaultSelectedKeys:t,items:n,mode:s="single",onSelectionChange:r,selectedKeys:a,typeaheadDelay:i=500}){const[u,c]=l.useState(()=>({selectedKeys:new Set(t??[])})),m=l.useMemo(()=>a===void 0?void 0:new Set(a),[a]),h=m?{focusedKey:u.focusedKey,selectedKeys:m}:u,g=l.useMemo(()=>new Map(n.map(b=>[b.key,b])),[n]),d=l.useRef(new Map),p=l.useMemo(()=>{const b=[...h.selectedKeys].map(D=>g.get(D)??d.current.get(D)??{key:D});return d.current=new Map(b.map(D=>[D.key,D])),b},[g,h.selectedKeys]),f=l.useRef(""),y=l.useRef(void 0);l.useEffect(()=>()=>clearTimeout(y.current),[]);const _=l.useCallback(b=>{c(D=>D.focusedKey===b?D:{...D,focusedKey:b})},[]),$=l.useCallback(b=>{c(D=>({...b,selectedKeys:m?D.selectedKeys:b.selectedKeys})),r==null||r(b.selectedKeys)},[m,r]);function v(b,D){if(b!==void 0){if(D&&s==="multiple"){$(Xn(h,b,n));return}_(b)}}return{...h,selectedItems:p,clear:()=>$(mr(h)),focus:_,focusFirst:b=>v(lr(n),b),focusLast:b=>v(cr(n),b),focusNext:b=>v(ur(n,h.focusedKey)??h.focusedKey,b),focusPrevious:b=>v(Wn(n,h.focusedKey)??h.focusedKey,b),reset:()=>c({selectedKeys:new Set(t??[])}),select:b=>$(Ks(h,b,s,{allowEmpty:e})),selectRange:b=>$(Xn(h,b,n)),status:qs(h,n),toggleAll:()=>$(fr(h,n)),search:b=>{f.current+=b,clearTimeout(y.current),y.current=setTimeout(()=>{f.current=""},i);const D=f.current.length>1?Wn(n,h.focusedKey):h.focusedKey,j=dr(n,f.current,D);j&&_(j)}}}const hr="_tabs_runad_1",_r="_horizontal_runad_7",pr="_list_runad_11",gr="_active_runad_17",br="_vertical_runad_23",yr="_tab_runad_1",xr="_panel_runad_45",ft={tabs:hr,horizontal:_r,list:pr,active:gr,vertical:br,tab:yr,panel:xr};function vr({className:e,defaultSelectedKey:t,items:n,label:s,onSelectionChange:r,orientation:a="horizontal",selectedKey:i,...u}){var v;const c=`tabs-${l.useId()}`,m=l.useRef(new Map),h=l.useMemo(()=>n.map(b=>({key:b.key,disabled:b.disabled,textValue:b.label})),[n]),g=(v=h.find(b=>!b.disabled))==null?void 0:v.key,d=Ft({items:h,mode:"single",defaultSelectedKeys:i===void 0?[t??g??""]:void 0,selectedKeys:i===void 0?void 0:[i],onSelectionChange:b=>{const[D]=b;D!==void 0&&(r==null||r(D))}}),[p]=d.selectedKeys,f=n.find(b=>b.key===p),y=h.some(b=>b.key===p&&!b.disabled)?p:g;l.useEffect(()=>{var b;d.focusedKey&&((b=m.current.get(d.focusedKey))==null||b.focus())},[d.focusedKey]);function _(b){b&&d.select(b)}function $(b){var E,P;const D=d.focusedKey??p,j=a==="vertical"?"ArrowDown":"ArrowRight",R=a==="vertical"?"ArrowUp":"ArrowLeft";b.key===j?(b.preventDefault(),_(Zn(h,D,1))):b.key===R?(b.preventDefault(),_(Zn(h,D,-1))):b.key==="Home"?(b.preventDefault(),_((E=h.find(N=>!N.disabled))==null?void 0:E.key)):b.key==="End"&&(b.preventDefault(),_((P=[...h].reverse().find(N=>!N.disabled))==null?void 0:P.key))}return o.jsxs("div",{...u,className:[ft.tabs,ft[a],e].filter(Boolean).join(" "),children:[o.jsx("div",{className:ft.list,role:"tablist","aria-label":s,"aria-orientation":a,onKeyDown:$,children:n.map(b=>o.jsx("button",{ref:D=>{D?m.current.set(b.key,D):m.current.delete(b.key)},className:[ft.tab,p===b.key&&ft.active].filter(Boolean).join(" "),type:"button",role:"tab",id:`${c}-${b.key}`,"aria-controls":p===b.key?`${c}-${b.key}-panel`:void 0,"aria-selected":p===b.key,disabled:b.disabled,tabIndex:y===b.key?0:-1,onClick:()=>d.select(b.key),children:b.label},b.key))}),f&&o.jsx("div",{className:ft.panel,role:"tabpanel",id:`${c}-${f.key}-panel`,"aria-labelledby":`${c}-${f.key}`,tabIndex:0,children:f.content})]})}function Zn(e,t,n){const s=e.length,r=e.findIndex(a=>a.key===t);for(let a=1;a<=s;a+=1){const i=e[(r+n*a+s*s)%s];if(!i.disabled)return i.key}return t}const jr="_list_ukjuq_1",$r="_item_ukjuq_11",Mr="_link_ukjuq_20",Nr="_current_ukjuq_38",kr="_separator_ukjuq_44",Dt={list:jr,item:$r,link:Mr,current:Nr,separator:kr};function Dr({as:e="a",className:t,items:n,label:s="Trilha de navegação",...r}){return o.jsx("nav",{...r,"aria-label":s,className:t,children:o.jsx("ol",{className:Dt.list,children:n.map((a,i)=>{const u=i===n.length-1;return o.jsxs("li",{className:Dt.item,children:[u||a.href===void 0&&a.linkProps===void 0?o.jsx("span",{className:Dt.current,"aria-current":u?"page":void 0,children:a.label}):o.jsx(e,{className:Dt.link,href:a.href,...a.linkProps,children:a.label}),!u&&o.jsx(rn,{className:Dt.separator,size:12})]},`${a.label}-${i}`)})})})}const wr="_pagination_1ws2p_1",Rr="_list_1ws2p_7",Cr="_page_1ws2p_16",Lr="_step_1ws2p_17",Ir="_current_1ws2p_35",Ar="_gap_1ws2p_58",ot={pagination:wr,list:Rr,page:Cr,step:Lr,current:Ir,gap:Ar};function Sr({className:e,disabled:t=!1,label:n="Paginação",onPageChange:s,page:r,pageCount:a,siblings:i=1,...u}){if(a<=1)return null;const c=Math.min(Math.max(r,1),a),m=Or(c,a,i);function h(g){t||s(g)}return o.jsxs("nav",{...u,"aria-label":n,className:[ot.pagination,e].filter(Boolean).join(" "),children:[o.jsx("button",{className:ot.step,type:"button","aria-label":"Página anterior","aria-disabled":t||c===1||void 0,onClick:()=>c>1&&h(c-1),children:o.jsx(In,{size:14})}),o.jsx("ol",{className:ot.list,children:m.map((g,d)=>g===null?o.jsx("li",{className:ot.gap,"aria-hidden":"true",children:"…"},`gap-${d}`):o.jsx("li",{children:o.jsx("button",{className:[ot.page,g===c&&ot.current].filter(Boolean).join(" "),type:"button","aria-label":`Página ${g}`,"aria-current":g===c?"page":void 0,"aria-disabled":t||void 0,onClick:()=>h(g),children:g})},g))}),o.jsx("button",{className:ot.step,type:"button","aria-label":"Próxima página","aria-disabled":t||c===a||void 0,onClick:()=>c<a&&h(c+1),children:o.jsx(rn,{size:14})})]})}function Or(e,t,n){const s=n*2+5;if(t<=s)return Array.from({length:t},(u,c)=>c+1);const r=Math.max(Math.min(e-n,t-n*2-2),3),a=Math.min(Math.max(e+n,n*2+3),t-2),i=Array.from({length:a-r+1},(u,c)=>r+c);return[1,r>3?null:2,...i,a<t-2?null:t-1,t]}const zr="_accordion_1p0q9_1",Er="_divided_1p0q9_7",Tr="_item_1p0q9_13",Fr="_trigger_1p0q9_17",Br="_panel_1p0q9_21",Pr="_heading_1p0q9_25",Hr="_icon_1p0q9_50",Kr="_label_1p0q9_59",qr="_iconLeft_1p0q9_63",Te={accordion:zr,divided:Er,item:Tr,trigger:Fr,panel:Br,heading:Pr,icon:Hr,label:Kr,iconLeft:qr};function Vr({className:e,defaultExpandedKeys:t,expandedKeys:n,items:s,multiple:r=!1,onExpandedChange:a,iconPosition:i="right",divider:u=!0,...c}){const m=`accordion-${l.useId()}`,h=l.useRef(new Map),g=l.useMemo(()=>s.map(f=>({key:f.key,disabled:f.disabled,textValue:f.label})),[s]),d=Ft({allowEmpty:!0,items:g,mode:r?"multiple":"single",defaultSelectedKeys:n===void 0?t:void 0,selectedKeys:n,onSelectionChange:f=>a==null?void 0:a([...f])});function p(f,y){var $,v,b;let _;f.key==="ArrowDown"?_=Yn(g,y,1):f.key==="ArrowUp"?_=Yn(g,y,-1):f.key==="Home"?_=($=g.find(D=>!D.disabled))==null?void 0:$.key:f.key==="End"&&(_=(v=[...g].reverse().find(D=>!D.disabled))==null?void 0:v.key),_&&(f.preventDefault(),(b=h.current.get(_))==null||b.focus())}return o.jsx("div",{...c,className:[Te.accordion,u&&Te.divided,e].filter(Boolean).join(" "),children:s.map(f=>{const y=d.selectedKeys.has(f.key);return o.jsxs("div",{className:Te.item,children:[o.jsx("h3",{className:Te.heading,children:o.jsxs("button",{ref:_=>{_?h.current.set(f.key,_):h.current.delete(f.key)},className:[Te.trigger,i==="left"&&Te.iconLeft].filter(Boolean).join(" "),type:"button",id:`${m}-${f.key}`,"aria-controls":`${m}-${f.key}-panel`,"aria-expanded":y,disabled:f.disabled,onClick:()=>d.select(f.key),onKeyDown:_=>p(_,f.key),children:[o.jsx("span",{className:Te.label,children:f.label}),y?o.jsx(Ns,{className:Te.icon,size:20}):o.jsx(ks,{className:Te.icon,size:20})]})}),o.jsx("div",{className:Te.panel,id:`${m}-${f.key}-panel`,role:"region","aria-labelledby":`${m}-${f.key}`,hidden:!y,children:f.content})]},f.key)})})}function Yn(e,t,n){const s=e.length,r=e.findIndex(a=>a.key===t);for(let a=1;a<=s;a+=1){const i=e[(r+n*a+s*s)%s];if(!i.disabled)return i.key}return t}const Qn=6,Ur=24;function Jn(e){const t=e.nextElementSibling;return t?t.offsetTop-e.offsetTop:e.offsetHeight}function Gr(e,t){const n=l.useRef(null),s=l.useRef(null),r=l.useRef(0),a=l.useRef(null),[i,u]=l.useState(null),[c,m]=l.useState(0),h=l.useCallback(D=>{if(s.current=D,D){const j=Jn(D);u(R=>j>0?j:R??0)}},[]),g=l.useCallback(D=>{var j;n.current=D,(j=a.current)==null||j.disconnect(),a.current=null,!(!D||typeof ResizeObserver>"u")&&(a.current=new ResizeObserver(()=>{const R=s.current?Jn(s.current):0;R>0&&u(R)}),a.current.observe(D))},[]),d=l.useCallback(()=>{var D;m(((D=n.current)==null?void 0:D.scrollTop)??0)},[]),p=i??0,f=t!==void 0&&p>0&&e*p>t,y=t!==void 0&&i===null,_=l.useCallback(D=>{const j=n.current,R=s.current;if(!j||!R||D<0||p<=0)return;const P=R.getBoundingClientRect().top-j.getBoundingClientRect().top+j.scrollTop+(D-r.current)*p,N=P+p;P<j.scrollTop?j.scrollTop=P:N>j.scrollTop+j.clientHeight&&(j.scrollTop=N-j.clientHeight)},[p]);if(!f)return r.current=0,{active:f,attachScroll:g,measureItem:h,onScroll:d,padding:{before:0,after:0},scrollToIndex:_,start:0,end:y?Math.min(e,Ur):e};const $=Math.ceil(t/p),v=Math.max(0,Math.floor(c/p)-Qn),b=Math.min(e,v+$+Qn*2);return r.current=v,{active:f,attachScroll:g,measureItem:h,onScroll:d,padding:{before:v*p,after:(e-b)*p},scrollToIndex:_,start:v,end:b}}const Wr="_list_dgig6_1",Xr="_search_dgig6_12",Zr="_options_dgig6_35",Yr="_spacer_dgig6_53",Qr="_option_dgig6_35",Jr="_disabled_dgig6_71",ei="_focused_dgig6_76",ti="_box_dgig6_87",ni="_checked_dgig6_96",si="_group_dgig6_102",oi="_status_dgig6_112",ai="_empty_dgig6_113",xe={list:Wr,search:Xr,options:Zr,spacer:Yr,option:Qr,disabled:Jr,focused:ei,box:ti,checked:ni,group:si,status:oi,empty:ai};function zt(e,t){return e+"-option-"+t}function ln({baseId:e,className:t,elementRef:n,empty:s,height:r,holdsFocus:a=!0,label:i,listing:u,loading:c=!1,loadingMessage:m="Carregando",onKeyDown:h,onSelect:g,style:d,tabIndex:p=0}){const{detached:f,focusedKey:y,isSelected:_,select:$,selectionMode:v,visible:b}=u,D=b.findIndex(A=>A.value===y);function j(A,F){A.disabled||($(A,F),g==null||g(A))}const{active:R,attachScroll:E,measureItem:P,onScroll:N,padding:H,scrollToIndex:k,start:S,end:z}=Gr(b.length,r),I=l.useCallback(A=>{E(A),n&&(n.current=A)},[E,n]);l.useEffect(()=>{var F,G;const A=b.findIndex(U=>U.value===y);y===void 0||A<0||(R?k(A):(G=(F=document.getElementById(zt(e,A)))==null?void 0:F.scrollIntoView)==null||G.call(F,{block:"nearest"}))},[R,e,y,k,b]);const L=b.slice(S,z);if(v==="none")return o.jsxs("ul",{"aria-busy":c||void 0,className:[xe.options,t].filter(Boolean).join(" "),id:e+"-options",onScroll:N,ref:I,style:{height:r,...d},children:[c&&o.jsx("li",{className:xe.status,children:m}),o.jsx("li",{"aria-hidden":"true",className:xe.spacer,style:{height:H.before}}),L.map((A,F)=>o.jsx("li",{className:xe.option,ref:F===0?P:void 0,children:A.label},A.value)),o.jsx("li",{"aria-hidden":"true",className:xe.spacer,style:{height:H.after}}),!c&&b.length===0&&s]});function K(A,F,G){const U=_(A.value);return o.jsxs("div",{"aria-disabled":A.disabled||void 0,"aria-posinset":F>0?F:void 0,"aria-selected":U,"aria-setsize":F>0?b.length:void 0,className:[xe.option,y===A.value&&xe.focused,A.disabled&&xe.disabled].filter(Boolean).join(" "),id:F>0?zt(e,F-1):void 0,onClick:C=>j(A,C.shiftKey),onMouseDown:a?void 0:C=>C.preventDefault(),ref:G?P:void 0,role:"option",children:[v==="multiple"&&o.jsx("span",{"aria-hidden":"true",className:[xe.box,U&&xe.checked].filter(Boolean).join(" ")}),A.label]},A.value)}return o.jsxs("div",{"aria-activedescendant":a&&D>=0?zt(e,D):void 0,"aria-busy":c||void 0,"aria-label":i,"aria-multiselectable":v==="multiple"||void 0,className:[xe.options,t].filter(Boolean).join(" "),id:e+"-options",onKeyDown:h,onScroll:N,ref:I,role:"listbox",style:{height:r,...d},tabIndex:a?p:void 0,children:[c&&o.jsx("p",{className:xe.status,children:m}),f.length>0&&o.jsx("div",{"aria-label":"Selecionados",className:xe.group,role:"group",children:f.map(A=>K(A,0,!1))}),o.jsx("div",{"aria-hidden":"true",className:xe.spacer,style:{height:H.before}}),L.map((A,F)=>K(A,S+F+1,F===0)),o.jsx("div",{"aria-hidden":"true",className:xe.spacer,style:{height:H.after}}),!c&&b.length===0&&s]})}const ri=["Home","End"," "];function cn({defaultValue:e,items:t,onSearch:n,onSelectionChange:s,selectionMode:r="none",value:a}){const[i,u]=l.useState(""),c=l.useMemo(()=>n||!i?t:t.filter(_=>ir(_.label,i)),[t,n,i]),m=l.useMemo(()=>c.map(_=>({key:_.value,disabled:_.disabled,textValue:_.label})),[c]),h=l.useRef(new Map);for(const _ of[...e??[],...a??[]])h.current.has(_.value)||h.current.set(_.value,_);for(const _ of t)h.current.set(_.value,_);const g=_=>h.current.get(_)??{value:_,label:""},d=Ft({items:m,mode:r,defaultSelectedKeys:e==null?void 0:e.map(_=>_.value),selectedKeys:a==null?void 0:a.map(_=>_.value),onSelectionChange:_=>s==null?void 0:s([..._].map(g))}),p=(a??d.selectedItems.map(_=>({value:_.key,label:""}))).map(_=>g(_.value)),f=l.useMemo(()=>{if(!i||r!=="multiple")return[];const _=new Set(c.map($=>$.value));return p.filter($=>!_.has($.value))},[p,r,i,c]);function y(_){if(r==="none"||_.target instanceof HTMLInputElement&&ri.includes(_.key))return;const $=_.shiftKey;if(_.key==="ArrowDown")_.preventDefault(),d.focusedKey===void 0?d.focusFirst($):d.focusNext($);else if(_.key==="ArrowUp")_.preventDefault(),d.focusPrevious($);else if(_.key==="Home")_.preventDefault(),d.focusFirst($);else if(_.key==="End")_.preventDefault(),d.focusLast($);else if(_.key==="Enter"||_.key===" "){const v=c.find(b=>b.value===d.focusedKey);v&&!v.disabled&&(_.preventDefault(),d.select(v.value))}}return{detached:f,focus:d.focus,focusFirst:d.focusFirst,focusLast:d.focusLast,focusedKey:d.focusedKey,handleKeyDown:y,isSelected:_=>p.some($=>$.value===_),filter:_=>{u(_),d.focus(void 0),n==null||n(_)},reset:d.reset,typeahead:d.search,select:(_,$)=>{if(!_.disabled){if($&&r==="multiple"){d.selectRange(_.value);return}d.select(_.value)}},selected:p,selectionMode:r,status:d.status,toggleAll:d.toggleAll,term:i,visible:c}}function Bt({disabled:e,name:t,onFocus:n,required:s,value:r}){return s?o.jsx("input",{"aria-hidden":!0,autoComplete:"off",className:St.formValue,disabled:e,name:t,onChange:()=>{},onFocus:n,required:!0,tabIndex:-1,value:r}):t===void 0?null:o.jsx("input",{disabled:e,name:t,type:"hidden",value:r})}const ii="_trigger_14fm6_1",li="_error_14fm6_21",ci="_sm_14fm6_51",ui="_md_14fm6_57",di="_value_14fm6_61",fi="_placeholder_14fm6_67",mi="_chevron_14fm6_71",hi="_panel_14fm6_76",at={trigger:ii,error:li,sm:ci,md:ui,value:di,placeholder:fi,chevron:mi,panel:hi};function _i({"aria-describedby":e,className:t,defaultValue:n,name:s,disabled:r=!1,error:a,hint:i,id:u,label:c,onClick:m,onKeyDown:h,onValueChange:g,options:d,placeholder:p="Selecione",ref:f,required:y=!1,size:_="md",value:$,...v}){const b=l.useRef(null),[D,j]=l.useState(!1),R=vt(()=>P.reset()),E=Me(b,R,f),P=cn({items:d,selectionMode:"single",defaultValue:n===void 0?void 0:[{value:n,label:""}],value:$===void 0?void 0:[{value:$,label:""}],onSelectionChange:I=>{const[L]=I;L&&(g==null||g(L.value))}}),[N]=P.selected;function H(){var I;j(!1),(I=b.current)==null||I.focus()}function k(){var I;r||(P.focus((N==null?void 0:N.value)??((I=d.find(L=>!L.disabled))==null?void 0:I.value)),j(!0))}function S(I){h==null||h(I),["ArrowDown","ArrowUp","Enter"," "].includes(I.key)&&(I.preventDefault(),k())}function z(I){m==null||m(I),D?H():k()}return o.jsx(Ze,{"aria-describedby":e,error:a,hint:i,id:u,label:c,required:y,children:({id:I,describedBy:L,invalid:K})=>o.jsxs(o.Fragment,{children:[o.jsx(Bt,{disabled:r,name:s,onFocus:()=>{var A;return(A=b.current)==null?void 0:A.focus()},required:y,value:(N==null?void 0:N.value)??""}),o.jsxs("button",{...v,ref:E,className:[at.trigger,at[_],a&&at.error,t].filter(Boolean).join(" "),type:"button",id:I,role:"combobox","aria-describedby":L,"aria-invalid":K||void 0,"aria-haspopup":"listbox","aria-expanded":D,"aria-required":y||void 0,disabled:r,onClick:z,onKeyDown:S,children:[o.jsx("span",{className:N!=null&&N.label?at.value:at.placeholder,children:(N==null?void 0:N.label)||p}),o.jsx(vs,{className:at.chevron,size:14})]}),D&&Re.createPortal(o.jsx(pi,{label:c??p,listing:P,onClose:H,triggerRef:b}),document.body)]})})}function pi({label:e,listing:t,onClose:n,triggerRef:s}){var p;const r=l.useRef(null),a=l.useRef(null),i=`listbox-${l.useId()}`,{overlayProps:u}=je.useOverlay({isOpen:!0,onClose:n,isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:f=>{var y;return!((y=s.current)!=null&&y.contains(f))}},r),{overlayProps:c}=je.useOverlayPosition({targetRef:s,overlayRef:r,placement:"bottom start",offset:6,containerPadding:8,isOpen:!0}),[m,h]=l.useState(),g=Math.min(Number((p=c.style)==null?void 0:p.maxHeight)||280,280);l.useLayoutEffect(()=>{var f;h((f=s.current)==null?void 0:f.offsetWidth)},[s]),l.useEffect(()=>{var f;(f=a.current)==null||f.focus()},[]);function d(f){if(f.key==="Escape"||f.key==="Tab"){n();return}if(f.key==="Enter"||f.key===" "){f.preventDefault();const y=t.visible.find(_=>_.value===t.focusedKey);y&&!y.disabled&&(t.select(y),n());return}if(f.key.length===1&&!f.metaKey&&!f.ctrlKey){t.typeahead(f.key);return}t.handleKeyDown(f)}return o.jsx("div",{...u,ref:r,className:at.panel,"data-react-aria-top-layer":"true",style:{...c.style,width:m,maxHeight:g},children:o.jsx(ln,{baseId:i,elementRef:a,label:e,listing:t,onKeyDown:f=>{var y;d(f),(y=u.onKeyDown)==null||y.call(u,f)},onSelect:n,tabIndex:-1})})}const gi="_badge_aelkb_1",bi="_dot_aelkb_18",yi="_ok_aelkb_26",xi="_warn_aelkb_31",vi="_info_aelkb_36",ji="_danger_aelkb_41",$i="_primary_aelkb_46",Mi="_outline_aelkb_51",Vt={badge:gi,dot:bi,ok:yi,warn:xi,info:vi,danger:ji,primary:$i,outline:Mi};function Vs({children:e,className:t,dot:n=!1,outline:s=!1,tone:r="neutral",...a}){const i=[Vt.badge,Vt[r],s&&Vt.outline,t].filter(Boolean).join(" ");return o.jsxs("span",{...a,className:i,children:[n&&o.jsx("span",{className:Vt.dot,"aria-hidden":"true"}),e]})}const Ni="_input_at14z_1",ki="_error_at14z_17",Di="_sm_at14z_47",wi="_md_at14z_53",Ri="_control_at14z_58 _input_at14z_1",Ci="_search_at14z_76",Li="_selection_at14z_95",Ii="_rest_at14z_105",Ai="_summary_at14z_111",Si="_panel_at14z_120",Oi="_empty_at14z_132",we={input:Ni,error:ki,sm:Di,md:wi,control:Ri,search:Ci,selection:Li,rest:Ii,summary:Ai,panel:Si,empty:Oi};function es(e){if(e!==void 0)return(typeof e=="string"?[e]:e).map(t=>({value:t,label:""}))}function zi(e,t){var s,r;if(e.selectionMode==="multiple"){(s=e.onValueChange)==null||s.call(e,t.map(a=>a.value));return}const[n]=t;n&&((r=e.onValueChange)==null||r.call(e,n.value))}function Ei(e){var V;const{"aria-describedby":t,className:n,defaultValue:s,name:r,disabled:a=!1,emptyMessage:i="Nenhum resultado",error:u,hint:c,id:m,label:h,loading:g=!1,onBlur:d,onClick:p,onKeyDown:f,onSearch:y,onValueChange:_,options:$,placeholder:v,ref:b,required:D=!1,selectionMode:j="single",size:R="md",value:E,...P}=e,N=j==="multiple",H=l.useRef(null),k=l.useRef(null),S=l.useRef(null),z=`combobox-${l.useId()}`,[I,L]=l.useState(!1),[K,A]=l.useState(!1),F=vt(()=>{U.reset(),Q()}),G=Me(H,F,b),U=cn({items:$,selectionMode:j,defaultValue:es(s),value:es(E),onSearch:y,onSelectionChange:O=>zi(e,O)}),C=U.selected,[x]=C,w=N||K?U.term:(x==null?void 0:x.label)??"",M=N?k:H,T=U.visible.findIndex(O=>O.value===U.focusedKey),{overlayProps:Z}=je.useOverlayPosition({targetRef:M,overlayRef:S,placement:"bottom start",offset:6,containerPadding:8,isOpen:I}),[W,q]=l.useState(),Y=Math.min(Number((V=Z.style)==null?void 0:V.maxHeight)||280,280);l.useLayoutEffect(()=>{var O;q((O=M.current)==null?void 0:O.offsetWidth)},[M,I]);const[oe,ee]=l.useState(!0),ae=l.useRef(null),X=C.map(O=>O.value).join(`
2
+ `);l.useLayoutEffect(()=>{const O=k.current;if(!O||typeof ResizeObserver>"u")return;const J=new ResizeObserver(()=>{Re.flushSync(()=>ee(!1));const ue=ae.current;Re.flushSync(()=>ee(!!(ue&&ue.scrollWidth>ue.clientWidth)))});return J.observe(O),()=>J.disconnect()},[X,N]);function B(){A(!1),U.filter("")}function Q(){L(!1),B()}function he(O){if(f==null||f(O),O.key==="ArrowDown"&&!I){O.preventDefault(),L(!0),U.focusFirst();return}if(O.key==="Escape"){Q();return}if(O.key==="Enter"){const ue=U.visible.find(ie=>ie.value===U.focusedKey);I&&ue&&!ue.disabled&&(O.preventDefault(),U.select(ue),N||Q());return}const J=C[C.length-1];if(O.key==="Backspace"&&N&&w===""&&J){U.select(J);return}U.handleKeyDown(O)}return o.jsx(Ze,{"aria-describedby":t,error:u,hint:c,id:m,label:h,required:D,children:({id:O,describedBy:J,invalid:ue})=>{const ie=O+"-selection",Ne=o.jsx("input",{...P,ref:G,className:[N?we.search:we.input,!N&&we[R],!N&&u&&we.error,n].filter(Boolean).join(" "),id:O,type:"text",role:"combobox",autoComplete:"off","aria-describedby":[J,N&&C.length>0&&ie].filter(Boolean).join(" ")||void 0,"aria-invalid":ue||void 0,"aria-expanded":I,"aria-autocomplete":"list","aria-controls":I?z+"-options":void 0,"aria-activedescendant":I&&T>=0?zt(z,T):void 0,"aria-required":D||void 0,disabled:a,placeholder:v,value:w,onBlur:me=>{Q(),d==null||d(me)},onChange:me=>{A(!0),L(!0),U.filter(me.target.value)},onClick:me=>{L(!0),p==null||p(me)},onKeyDown:he});return o.jsxs(o.Fragment,{children:[(C.length>0?C:[void 0]).map(me=>o.jsx(Bt,{disabled:a,name:r,onFocus:()=>{var te;return(te=H.current)==null?void 0:te.focus()},required:D,value:(me==null?void 0:me.value)??""},(me==null?void 0:me.value)??"")),N?o.jsxs("div",{className:[we.control,we[R],u&&we.error].filter(Boolean).join(" "),onMouseDown:me=>{var te;me.target!==H.current&&(me.preventDefault(),(te=H.current)==null||te.focus())},ref:k,children:[x&&o.jsxs(o.Fragment,{children:[o.jsxs("span",{"aria-hidden":"true",className:we.selection,ref:ae,children:[(oe?[x]:C).map(me=>o.jsx(Vs,{children:me.label},me.value)),oe&&C.length>1&&o.jsxs("span",{className:we.rest,children:["+",C.length-1]})]}),o.jsxs("span",{className:we.summary,id:ie,children:[C.length===1?"1 selecionado":`${C.length} selecionados`,":"," ",C.map(me=>me.label).join(", ")]})]}),Ne]}):Ne,I&&Re.createPortal(o.jsx("div",{ref:S,className:we.panel,"data-react-aria-top-layer":"true",onMouseDown:me=>me.preventDefault(),style:{...Z.style,width:W,maxHeight:Y},children:o.jsx(ln,{baseId:z,empty:o.jsx("p",{className:we.empty,children:i}),holdsFocus:!1,label:h??v??"Opções",listing:U,loading:g,onSelect:N?void 0:Q})}),document.body)]})}})}const Ti="_menu_opb5f_1",Fi="_item_opb5f_20",ts={menu:Ti,item:Fi};function ns(e,t){return n=>{e==null||e(n),t(n)}}function Bi({children:e,defaultOpen:t=!1,items:n,label:s,onOpenChange:r,open:a}){const i=l.useRef(null),[u,c]=l.useState(t),[m,h]=l.useState("first"),g=a??u;function d(v){c(v),r==null||r(v)}function p(v){h(v),d(!0)}function f(v){var b;d(!1),v&&((b=i.current)==null||b.focus())}const y=e.props,_=Me(i,y.ref),$=l.cloneElement(e,{ref:_,"aria-haspopup":"menu","aria-expanded":g,onClick:ns(y.onClick,()=>g?f(!0):p("first")),onKeyDown:ns(y.onKeyDown,v=>{(v.key==="ArrowDown"||v.key==="ArrowUp")&&(v.preventDefault(),p(v.key==="ArrowDown"?"first":"last"))})});return o.jsxs(o.Fragment,{children:[$,g&&typeof document<"u"&&Re.createPortal(o.jsx(Cn.FocusScope,{children:o.jsx(Pi,{items:n,label:s,openedWith:m,onClose:f,triggerRef:i})}),document.body)]})}function Pi({items:e,label:t,onClose:n,openedWith:s,triggerRef:r}){var D;const a=l.useRef(null),i=l.useRef(new Map),u=l.useMemo(()=>e.map(j=>({key:j.key,disabled:j.disabled,textValue:j.label})),[e]),c=Ft({items:u,mode:"none"}),{focusedKey:m,focusFirst:h,focusLast:g,focusNext:d,focusPrevious:p,search:f}=c,{overlayProps:y}=je.useOverlay({isOpen:!0,onClose:()=>n(!1),isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:j=>{var R;return!((R=r.current)!=null&&R.contains(j))}},a),{overlayProps:_}=je.useOverlayPosition({targetRef:r,overlayRef:a,placement:"bottom start",offset:6,containerPadding:8,isOpen:!0}),$=Math.min(Number((D=_.style)==null?void 0:D.maxHeight)||360,360);l.useEffect(()=>{s==="last"?g():h()},[]),l.useEffect(()=>{var j;m&&((j=i.current.get(m))==null||j.focus())},[m]);function v(j){var R;j.disabled||(n(!0),(R=j.onSelect)==null||R.call(j))}function b(j){j.key==="ArrowDown"?(j.preventDefault(),d()):j.key==="ArrowUp"?(j.preventDefault(),p()):j.key==="Home"?(j.preventDefault(),h()):j.key==="End"?(j.preventDefault(),g()):j.key==="Escape"||j.key==="Tab"?n(!0):j.key.length===1&&!j.metaKey&&!j.ctrlKey&&f(j.key)}return o.jsx("div",{...y,"data-react-aria-top-layer":"true",ref:a,className:ts.menu,style:{..._.style,maxHeight:$},role:"menu","aria-label":t,onKeyDown:j=>{var R;b(j),(R=y.onKeyDown)==null||R.call(y,j)},children:e.map(j=>o.jsx("button",{ref:R=>{R?i.current.set(j.key,R):i.current.delete(j.key)},className:ts.item,type:"button",role:"menuitem",disabled:j.disabled,tabIndex:m===j.key?0:-1,onClick:()=>v(j),children:j.label},j.key))})}const Hi="_tooltip_7n3ao_1",Ki={tooltip:Hi},qi=120;function wt(e,t){return n=>{e==null||e(n),t(n)}}function Us({children:e,content:t,delay:n=500,placement:s="top"}){const r=l.useRef(null),[a,i]=l.useState(!1),u=l.useRef(void 0),c=`tooltip-${l.useId()}`,m=l.useCallback(()=>{clearTimeout(u.current),i(!1)},[]),h=l.useCallback(()=>{clearTimeout(u.current),u.current=setTimeout(()=>i(!1),qi)},[]);l.useEffect(()=>()=>clearTimeout(u.current),[]);const g=e.props,d=Me(r,g.ref),p=l.cloneElement(e,{ref:d,"aria-describedby":a?[g["aria-describedby"],c].filter(Boolean).join(" "):g["aria-describedby"],onMouseEnter:wt(g.onMouseEnter,()=>{clearTimeout(u.current),u.current=setTimeout(()=>i(!0),n)}),onMouseLeave:wt(g.onMouseLeave,h),onFocus:wt(g.onFocus,()=>i(!0)),onBlur:wt(g.onBlur,m),onKeyDown:wt(g.onKeyDown,f=>{f.key==="Escape"&&m()})});return o.jsxs(o.Fragment,{children:[p,a&&Re.createPortal(o.jsx(Vi,{content:t,id:c,onMouseEnter:()=>clearTimeout(u.current),onMouseLeave:m,placement:s,triggerRef:r}),document.body)]})}function Vi({content:e,id:t,onMouseEnter:n,onMouseLeave:s,placement:r,triggerRef:a}){const i=l.useRef(null),{overlayProps:u}=je.useOverlayPosition({targetRef:a,overlayRef:i,placement:r,offset:6,isOpen:!0});return o.jsx("div",{ref:i,className:Ki.tooltip,"data-react-aria-top-layer":"true",id:t,onMouseEnter:n,onMouseLeave:s,role:"tooltip",style:u.style,children:e})}const Ui="_underlay_z4dy0_1",Gi="_dialog_z4dy0_12",Wi="_sm_z4dy0_29",Xi="_md_z4dy0_33",Zi="_lg_z4dy0_37",Yi="_header_z4dy0_41",Qi="_title_z4dy0_48",Ji="_close_z4dy0_57",el="_description_z4dy0_84",tl="_body_z4dy0_92",nl="_footer_z4dy0_99",Ve={underlay:Ui,dialog:Gi,sm:Wi,md:Xi,lg:Zi,header:Yi,title:Qi,close:Ji,description:el,body:tl,footer:nl};function sl({open:e,...t}){return!e||typeof document>"u"?null:Re.createPortal(o.jsx(ol,{...t}),document.body)}function ol({children:e,className:t,description:n,dismissable:s=!0,footer:r,onClose:a,ref:i,role:u="dialog",size:c="md",title:m,...h}){const g=l.useRef(null),d=Me(g,i),p=l.useId(),f=`${p}-title`,y=`${p}-description`,{overlayProps:_,underlayProps:$}=je.useOverlay({isOpen:!0,onClose:a,isDismissable:s,isKeyboardDismissDisabled:!s},g);return je.usePreventScroll(),l.useEffect(()=>g.current?je.ariaHideOutside([g.current]):void 0,[]),o.jsx("div",{...$,className:Ve.underlay,children:o.jsx(Cn.FocusScope,{contain:!0,restoreFocus:!0,autoFocus:!0,children:o.jsxs("div",{...h,..._,ref:d,className:[Ve.dialog,Ve[c],t].filter(Boolean).join(" "),role:u,"aria-modal":"true","aria-labelledby":f,"aria-describedby":n?y:void 0,children:[o.jsxs("header",{className:Ve.header,children:[o.jsx("h2",{className:Ve.title,id:f,children:m}),s&&o.jsx("button",{className:Ve.close,type:"button","aria-label":"Fechar",onClick:a,children:o.jsx(Ms,{size:16})})]}),n&&o.jsx("p",{className:Ve.description,id:y,children:n}),e&&o.jsx("div",{className:Ve.body,children:e}),r&&o.jsx("div",{className:Ve.footer,children:r})]})})})}const al="_avatar_16peg_1",rl="_sm_16peg_14",il="_md_16peg_20",ll="_lg_16peg_26",ss={avatar:al,sm:rl,md:il,lg:ll};function cl(e){return e.trim().split(/\s+/).filter(Boolean).slice(0,2).map(n=>n[0]).join("").toUpperCase()||"?"}function ul({className:e,name:t,onError:n,size:s="md",src:r,...a}){const[i,u]=l.useState(!1),c=[ss.avatar,ss[s],e].filter(Boolean).join(" "),m=!!r&&!i;l.useEffect(()=>{u(!1)},[r]);function h(g){u(!0),n==null||n(g)}return m?o.jsx("img",{...a,className:c,src:r,alt:t,onError:h}):o.jsx("span",{...a,className:c,role:"img","aria-label":t,children:cl(t)})}const Gs=l.createContext(void 0);function un(e){const t=l.useContext(Gs);if(!t)throw new Error(e+" deve ser usado dentro de List.");return t}function Pt({children:e,className:t,defaultValue:n,items:s,label:r,loading:a=!1,loadingMessage:i="Carregando",onSearch:u,onSelectionChange:c,selectionMode:m="none",value:h,...g}){const d=l.useId(),[p,f]=l.useState(!1),y=cn({defaultValue:n,items:s,onSearch:u,onSelectionChange:c,selectionMode:m,value:h}),_={baseId:d,claimFocus:l.useCallback(()=>f(!0),[]),label:r,listing:y,loading:a,loadingMessage:i,searchPresent:p};return o.jsx("div",{...g,className:[xe.list,t].filter(Boolean).join(" "),children:o.jsx(Gs.Provider,{value:_,children:e})})}function dl({placeholder:e="Buscar"}){const{baseId:t,claimFocus:n,label:s,listing:r}=un("List.Search");l.useEffect(n,[n]);const a=r.visible.findIndex(i=>i.value===r.focusedKey);return o.jsx("input",{"aria-activedescendant":a>=0?zt(t,a):void 0,"aria-controls":t+"-options","aria-label":s?"Buscar em "+s:e,autoComplete:"off",className:xe.search,onChange:i=>r.filter(i.target.value),onKeyDown:r.handleKeyDown,placeholder:e,type:"search",value:r.term})}function fl({height:e}){const{baseId:t,label:n,listing:s,loading:r,loadingMessage:a,searchPresent:i}=un("List.Options");return o.jsx(ln,{baseId:t,height:e,label:n,holdsFocus:!i,listing:s,loading:r,loadingMessage:a,onKeyDown:i?void 0:s.handleKeyDown})}function ml({label:e="Selecionar todos"}){const{listing:t}=un("List.SelectAll");return t.selectionMode!=="multiple"?null:o.jsx(Bs,{checked:t.status==="all",indeterminate:t.status==="partial",label:e,onChange:()=>t.toggleAll()})}function hl({children:e}){const{listing:t,loading:n}=un("List.Empty");return n||t.visible.length>0?null:o.jsx("p",{className:xe.empty,children:e})}Pt.Search=dl;Pt.SelectAll=ml;Pt.Options=fl;Pt.Empty=hl;const _l="_card_19kks_1",pl="_header_19kks_15",gl="_headline_19kks_23",bl="_titleRow_19kks_30",yl="_title_19kks_30",xl="_description_19kks_45",vl="_trailing_19kks_53",jl="_body_19kks_60",$l="_bodyFlush_19kks_64",Ml="_footer_19kks_68",He={card:_l,header:pl,headline:gl,titleRow:bl,title:yl,description:xl,trailing:vl,body:jl,bodyFlush:$l,footer:Ml},Ws=l.createContext(void 0);function Nl(e){const t=l.useContext(Ws);if(!t)throw new Error(e+" deve ser usado dentro de Card.");return t}function dn({"aria-labelledby":e,children:t,className:n,...s}){const r=l.useId(),[a,i]=l.useState(!1),u=r+"-title",c={registerTitle:l.useCallback(()=>(i(!0),()=>i(!1)),[]),titleId:u};return o.jsx("section",{...s,"aria-labelledby":e??(a?u:void 0),className:[He.card,n].filter(Boolean).join(" "),children:o.jsx(Ws.Provider,{value:c,children:t})})}function kl({badge:e,description:t,headingLevel:n=3,title:s,trailing:r}){const{registerTitle:a,titleId:i}=Nl("Card.Header"),u="h"+n;return l.useEffect(a,[a]),o.jsxs("header",{className:He.header,children:[o.jsxs("div",{className:He.headline,children:[o.jsxs("div",{className:He.titleRow,children:[o.jsx(u,{className:He.title,id:i,children:s}),e]}),t&&o.jsx("p",{className:He.description,children:t})]}),r&&o.jsx("div",{className:He.trailing,children:r})]})}function Dl({children:e,flush:t=!1}){return o.jsx("div",{className:t?He.bodyFlush:He.body,children:e})}function wl({children:e}){return o.jsx("footer",{className:He.footer,children:e})}dn.Header=kl;dn.Body=Dl;dn.Footer=wl;const Rl="_scroll_3171p_2",Cl="_noScroll_3171p_9",Ll="_table_3171p_13",Il="_sm_3171p_23",Al="_md_3171p_29",Sl="_head_3171p_35",Ol="_column_3171p_40",zl="_sortable_3171p_51",El="_sortHeader_3171p_55",Tl="_help_3171p_60",Fl="_sortButton_3171p_64",Bl="_sortIcon_3171p_93",Pl="_sortDescending_3171p_98",Hl="_row_3171p_119",Kl="_divider_3171p_123",ql="_cell_3171p_123",Vl="_striped_3171p_127",Ul="_numeric_3171p_141",Gl="_start_3171p_149",Wl="_center_3171p_153",Xl="_end_3171p_157",Zl="_empty_3171p_161",Yl="_status_3171p_162",Ql="_sticky_3171p_177",Jl="_lead_3171p_218",ec="_checkbox_3171p_231 _input_thq98_15",tc="_radio_3171p_235 _input_1nbsm_38",nc="_toggle_3171p_239 _input_1g7qr_15",sc="_selected_3171p_251",de={scroll:Rl,noScroll:Cl,table:Ll,sm:Il,md:Al,head:Sl,column:Ol,sortable:zl,sortHeader:El,help:Tl,sortButton:Fl,sortIcon:Bl,sortDescending:Pl,row:Hl,divider:Kl,cell:ql,striped:Vl,numeric:Ul,start:Gl,center:Wl,end:Xl,empty:Zl,status:Yl,sticky:Ql,lead:Jl,checkbox:ec,radio:tc,toggle:nc,selected:sc},Xs=l.createContext(void 0);function fn(e){const t=l.useContext(Xs);if(!t)throw new Error(e+" deve ser usado dentro de Table.");return t}function jt({children:e,className:t,defaultSelectedIds:n,defaultSort:s,divider:r=!0,highlightSelectedRow:a=!0,label:i,loading:u=!1,loadingMessage:c="Carregando",onSelectionChange:m,onSortChange:h,rows:g=[],selectedIds:d,selectionControl:p,selectionMode:f="none",size:y="md",sort:_,stickyHeader:$=!1,striped:v=!1,ref:b,...D}){const j=l.useId(),[R,E]=l.useState(s),[P,N]=l.useState(()=>new Set),H=_??R,k=p??(f==="single"?"radio":"checkbox"),[S,z]=l.useState(!0),I=l.useCallback(x=>{if(!x||typeof ResizeObserver>"u")return;const w=new ResizeObserver(()=>z(x.scrollWidth>x.clientWidth||x.scrollHeight>x.clientHeight));return w.observe(x),x.firstElementChild&&w.observe(x.firstElementChild),()=>w.disconnect()},[]),L=Me($?I:void 0,b),K=l.useCallback(x=>(N(w=>new Set(w).add(x)),()=>N(w=>{const M=new Set(w);return M.delete(x),M})),[]);function A(x){const w={column:x,direction:(H==null?void 0:H.column)===x&&H.direction==="ascending"?"descending":"ascending"};_===void 0&&E(w),h==null||h(w)}const F=l.useMemo(()=>g.map(x=>({key:x.id,disabled:x.disabled})),[g]),G=Ft({allowEmpty:k!=="radio",defaultSelectedKeys:n,items:F,mode:f,selectedKeys:d,onSelectionChange:x=>m==null?void 0:m([...x])}),U={baseId:j,countColumns:()=>Math.max(P.size,1),loading:u,registerColumn:K,requestSort:A,selection:{control:k,empty:g.length===0,highlight:a,isSelected:x=>G.selectedKeys.has(x),mode:f,status:G.status,toggle:(x,w)=>{if(w&&f==="multiple"){G.selectRange(x);return}G.select(x)},toggleAll:G.toggleAll},size:y,sort:H},C=[de.table,de[y],r&&de.divider,v&&de.striped,$&&de.sticky].filter(Boolean).join(" ");return o.jsxs("div",{...D,className:[de.scroll,$&&!S&&de.noScroll,t].filter(Boolean).join(" "),ref:L,children:[o.jsx("table",{"aria-busy":u||void 0,"aria-label":i,className:C,children:o.jsx(Xs.Provider,{value:U,children:e})}),u&&o.jsx("p",{className:de.status,role:"status",children:c})]})}function oc({children:e}){const{registerColumn:t,selection:n}=fn("Table.Header");return l.useEffect(()=>n.mode==="none"?void 0:t("__selecao__"),[t,n.mode]),o.jsx("thead",{className:de.head,children:o.jsxs("tr",{children:[n.mode==="multiple"&&o.jsx("th",{className:[de.column,de.lead].join(" "),scope:"col",children:o.jsx("input",{"aria-label":"Selecionar todas as linhas",checked:n.status==="all",className:de.checkbox,disabled:n.empty,onChange:n.toggleAll,ref:s=>{s&&(s.indeterminate=n.status==="partial")},type:"checkbox"})}),n.mode==="single"&&o.jsx("th",{className:[de.column,de.lead].join(" "),scope:"col"}),e]})})}function ac({align:e,children:t,help:n,hideBelow:s,id:r,numeric:a=!1,sortable:i=!1,width:u}){const{registerColumn:c,requestSort:m,sort:h}=fn("Table.Column");l.useEffect(()=>c(r),[r,c]);const g=(h==null?void 0:h.column)===r?h.direction:void 0,d=n&&o.jsx(Us,{content:n,children:o.jsx("span",{"aria-label":n,className:de.help,role:"img",tabIndex:0,children:o.jsx(Ds,{size:14})})});return o.jsx("th",{"aria-sort":i?g??"none":void 0,className:[de.column,de[e??(a?"end":"start")],i&&de.sortable].filter(Boolean).join(" "),"data-hide-below":s,scope:"col",style:{width:u},children:i?o.jsxs("div",{className:de.sortHeader,children:[o.jsxs("button",{className:de.sortButton,onClick:()=>m(r),type:"button",children:[t,g?o.jsx(xs,{className:[de.sortIcon,g==="descending"&&de.sortDescending].filter(Boolean).join(" "),size:12}):o.jsx(js,{className:de.sortIcon,size:12})]}),d]}):o.jsxs(o.Fragment,{children:[t,d]})})}function rc({children:e,empty:t,items:n}){const{countColumns:s,loading:r}=fn("Table.Body");return n.length===0&&!r&&t!==void 0?o.jsx("tbody",{children:o.jsx("tr",{children:o.jsx("td",{className:de.empty,colSpan:s(),children:t})})}):o.jsx("tbody",{children:n.map(a=>o.jsx(l.Fragment,{children:e(a)},a.id))})}function ic({children:e,disabled:t=!1,id:n,label:s}){const{baseId:r,selection:a}=fn("Table.Row"),i=a.mode!=="none"&&a.isSelected(n);return o.jsxs("tr",{className:[de.row,i&&a.highlight&&de.selected].filter(Boolean).join(" "),children:[a.mode!=="none"&&o.jsx("td",{className:[de.cell,de.lead].join(" "),children:o.jsx("input",{"aria-label":s??"Selecionar linha",checked:i,className:de[a.control],disabled:t,name:a.control==="radio"?`${r}-selecao`:void 0,onChange:()=>{},onClick:u=>a.toggle(n,u.shiftKey),role:a.control==="toggle"?"switch":void 0,type:a.control==="radio"?"radio":"checkbox"})}),e]})}function lc({align:e,children:t,hideBelow:n,numeric:s=!1}){return o.jsx("td",{className:[de.cell,de[e??(s?"end":"start")],s&&de.numeric].filter(Boolean).join(" "),"data-hide-below":n,children:t})}jt.Header=oc;jt.Column=ac;jt.Body=rc;jt.Row=ic;jt.Cell=lc;function mn(e,{isDateUnavailable:t,max:n,min:s}){return s&&e.compare(s)<0||n&&e.compare(n)>0?!0:(t==null?void 0:t(e))??!1}function cc(e,t,n={}){const s=re.startOfMonth(e),r=re.startOfWeek(s,t),a=[];for(let i=0;i<re.getWeeksInMonth(e,t);i+=1){const u=[];for(let c=0;c<7;c+=1){const m=r.add({days:i*7+c});u.push({date:m,outside:!re.isSameMonth(m,e),unavailable:mn(m,n)})}a.push(u)}return a}function Se(e,{max:t,min:n}){return n&&e.compare(n)<0?n:t&&e.compare(t)>0?t:e}function uc(e,t,n,s){switch(t){case"ArrowLeft":return Se(e.subtract({days:1}),s);case"ArrowRight":return Se(e.add({days:1}),s);case"ArrowUp":return Se(e.subtract({weeks:1}),s);case"ArrowDown":return Se(e.add({weeks:1}),s);case"Home":return Se(re.startOfMonth(e),s);case"End":return Se(re.endOfMonth(e),s);case"PageUp":return Se(n?e.subtract({years:1}):e.subtract({months:1}),s);case"PageDown":return Se(n?e.add({years:1}):e.add({months:1}),s);default:return}}function os(e,t){return!!(e&&t&&re.isSameDay(e,t))}function dc({isDateUnavailable:e,locale:t="pt-BR",max:n,min:s,onSelect:r,value:a}={}){const i={isDateUnavailable:e,max:n,min:s},u=l.useMemo(()=>re.today(re.getLocalTimeZone()),[]),[c,m]=l.useState(()=>Se(a??u,i)),h=a??c,[g,d]=l.useState(()=>re.startOfMonth(h)),[p,f]=l.useState(a);a&&(!p||a.compare(p)!==0)&&(f(a),d(re.startOfMonth(a)),m(Se(a,i)));const y=l.useMemo(()=>cc(g,t,i),[t,g,n,s,e]);function _(v){m(v),(v.compare(re.startOfMonth(g))<0||v.compare(re.startOfMonth(g).add({months:1}))>=0)&&d(re.startOfMonth(v))}function $(v){mn(v,i)||(_(v),r==null||r(v))}return{focus:_,focusedDate:c,goToMonth:v=>{const b=re.startOfMonth(g.add({months:v}));d(b),m(Se(b.set({day:Math.min(c.day,re.endOfMonth(b).day)}),i))},handleKeyDown:v=>{if(v.key==="Enter"||v.key===" "){v.preventDefault(),$(c);return}const b=uc(c,v.key,v.shiftKey,i);b&&(v.preventDefault(),_(b))},isSelected:v=>os(v,a),isToday:v=>os(v,u),select:$,visibleMonth:g,weeks:y}}const fc="_field_6g4z6_2",mc="_error_6g4z6_12",hc="_input_6g4z6_12",_c="_sm_6g4z6_54",pc="_md_6g4z6_59",gc="_trigger_6g4z6_72",bc="_panel_6g4z6_97",yc="_calendar_6g4z6_106",xc="_calendarHeader_6g4z6_112",vc="_month_6g4z6_119",jc="_navigate_6g4z6_127",$c="_grid_6g4z6_150",Mc="_weekday_6g4z6_154",Nc="_dayCell_6g4z6_164",kc="_day_6g4z6_164",Dc="_outside_6g4z6_190",wc="_selectedDay_6g4z6_200",Rc="_footer_6g4z6_213",Cc="_actions_6g4z6_223",be={field:fc,error:mc,input:hc,sm:_c,md:pc,trigger:gc,panel:bc,calendar:yc,calendarHeader:xc,month:vc,navigate:jc,grid:$c,weekday:Mc,dayCell:Nc,day:kc,outside:Dc,selectedDay:wc,footer:Rc,actions:Cc};function Zs({autoFocus:e=!1,locale:t="pt-BR",onSelect:n,value:s,...r}){const a=dc({...r,locale:t,onSelect:n,value:s}),i=re.getLocalTimeZone(),u=l.useMemo(()=>new Intl.DateTimeFormat(t,{month:"long",year:"numeric"}),[t]),c=l.useMemo(()=>new Intl.DateTimeFormat(t,{dateStyle:"long"}),[t]),m=l.useMemo(()=>{const y=new Intl.DateTimeFormat(t,{weekday:"short"}),_=new Intl.DateTimeFormat(t,{weekday:"long"});return a.weeks[0].map($=>{const v=$.date.toDate(i);return{curto:y.format(v).replace(".",""),longo:_.format(v)}})},[a.weeks,i,t]),h=u.format(a.visibleMonth.toDate(i)),g=l.useRef(null),d=l.useRef(!1),p=a.focusedDate.toString();l.useEffect(()=>{var y;e&&((y=g.current)==null||y.focus())},[]),l.useEffect(()=>{var y;d.current&&((y=g.current)==null||y.focus())},[p]);function f(y){y.relatedTarget&&!y.currentTarget.contains(y.relatedTarget)&&(d.current=!1)}return o.jsxs("div",{className:be.calendar,children:[o.jsxs("div",{className:be.calendarHeader,children:[o.jsx("button",{"aria-label":"Mês anterior",className:be.navigate,onClick:()=>a.goToMonth(-1),type:"button",children:o.jsx(In,{size:14})}),o.jsx("span",{"aria-live":"polite",className:be.month,children:h}),o.jsx("button",{"aria-label":"Próximo mês",className:be.navigate,onClick:()=>a.goToMonth(1),type:"button",children:o.jsx(rn,{size:14})})]}),o.jsxs("table",{"aria-label":h,className:be.grid,onBlur:f,onFocus:()=>d.current=!0,onKeyDown:a.handleKeyDown,role:"grid",children:[o.jsx("thead",{children:o.jsx("tr",{children:m.map(y=>o.jsx("th",{abbr:y.longo,className:be.weekday,scope:"col",children:y.curto},y.longo))})}),o.jsx("tbody",{children:a.weeks.map(y=>o.jsx("tr",{children:y.map(_=>{const $=a.isSelected(_.date),v=_.date.toString()===p;return o.jsx("td",{className:be.dayCell,children:o.jsx("button",{"aria-current":a.isToday(_.date)?"date":void 0,"aria-disabled":_.unavailable||void 0,"aria-label":c.format(_.date.toDate(i)),"aria-pressed":$,className:[be.day,_.outside&&be.outside,$&&be.selectedDay].filter(Boolean).join(" "),onClick:()=>a.select(_.date),ref:v?g:void 0,tabIndex:v?0:-1,type:"button",children:_.date.day})},_.date.toString())})},y[0].date.toString()))})]})]})}function En(e,t){if(e)try{return t(e)}catch{return}}const it=e=>En(e,re.parseDate),Rt=e=>En(e,re.parseTime),bn=e=>En(e,re.parseDateTime),Lc=e=>e.toString().slice(0,5),as=e=>e.toString().slice(0,16);function Ic({"aria-describedby":e,className:t,defaultValue:n,name:s,disabled:r=!1,error:a,hint:i,id:u,isDateUnavailable:c,label:m,locale:h="pt-BR",max:g,min:d,onValueChange:p,onBlur:f,onKeyDown:y,placeholder:_="dd/mm/aaaa",required:$=!1,size:v="md",ref:b,value:D,...j}){const R=l.useRef(null),E=l.useRef(null),P=l.useRef(null),[N,H]=l.useState(!1),k={isDateUnavailable:c&&(B=>c(B.toString())),max:it(g),min:it(d)},[S,z]=l.useState(()=>it(n)??null),I=D===void 0?void 0:it(D)??null,L=(I===void 0?S:I)??void 0,[K,A]=l.useState(""),[F,G]=l.useState(!1),U=l.useRef(null),C=vt(()=>{z(it(n)??null),G(!1)}),x=Me(U,C,b),[w,M]=l.useState(L),[T,Z]=l.useState(0);l.useEffect(()=>{N&&M(L)},[N]);const W=F?K:L?[String(L.day).padStart(2,"0"),String(L.month).padStart(2,"0"),L.year].join("/"):"";function q(B){z(B),p==null||p((B==null?void 0:B.toString())??null)}function Y(B=!0){var Q;H(!1),B&&((Q=P.current)==null||Q.focus())}function oe(B){const Q=Go(B);G(!0),A(Q);const he=Es(Q),V=he&&!mn(he,k)?he:null;q(V)}function ee(B){y==null||y(B),B.key==="ArrowDown"&&!N?(B.preventDefault(),H(!0)):B.key==="Escape"&&N&&Y(!1)}const{overlayProps:ae}=je.useOverlay({isOpen:N,onClose:()=>Y(!1),isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:B=>{var Q;return!((Q=R.current)!=null&&Q.contains(B))}},E),{overlayProps:X}=je.useOverlayPosition({targetRef:R,overlayRef:E,placement:"bottom start",offset:6,containerPadding:8,isOpen:N});return o.jsx(Ze,{"aria-describedby":e,error:a,hint:i,id:u,label:m,required:$,children:({id:B,describedBy:Q,invalid:he})=>o.jsxs(o.Fragment,{children:[o.jsx(Bt,{disabled:r,name:s,onFocus:()=>{var V;return(V=U.current)==null?void 0:V.focus()},required:$,value:(L==null?void 0:L.toString())??""}),o.jsxs("div",{className:[be.field,be[v],a&&be.error,t].filter(Boolean).join(" "),ref:R,children:[o.jsx("input",{...j,"aria-describedby":Q,"aria-invalid":he||void 0,"aria-required":$||void 0,autoComplete:"off",className:be.input,disabled:r,id:B,inputMode:"numeric",onBlur:V=>{G(!1),f==null||f(V)},onChange:V=>oe(V.target.value),onKeyDown:ee,placeholder:_,ref:x,type:"text",value:W}),o.jsx("button",{"aria-expanded":N,"aria-haspopup":"dialog","aria-label":"Abrir calendário",className:be.trigger,disabled:r,onClick:()=>N?Y():H(!0),ref:P,type:"button",children:o.jsx(Ln,{size:15})})]}),N&&Re.createPortal(o.jsxs("div",{...ae,"aria-label":m?"Calendário de "+m:"Calendário",className:be.panel,"data-react-aria-top-layer":"true",onKeyDown:V=>{var O;V.key==="Escape"&&Y(),(O=ae.onKeyDown)==null||O.call(ae,V)},ref:E,role:"dialog",style:X.style,children:[o.jsx(Zs,{autoFocus:!0,isDateUnavailable:k.isDateUnavailable,locale:h,max:k.max,min:k.min,onSelect:M,value:w},T),o.jsxs("div",{className:be.footer,children:[o.jsx(lt,{onClick:()=>{M(re.today(re.getLocalTimeZone())),Z(V=>V+1)},size:"sm",variant:"ghost",type:"button",children:"Hoje"}),o.jsxs("div",{className:be.actions,children:[o.jsx(lt,{onClick:()=>Y(),size:"sm",variant:"secondary",type:"button",children:"Cancelar"}),o.jsx(lt,{onClick:()=>{q(w??null),G(!1),Y()},size:"sm",type:"button",children:"Aplicar"})]})]})]}),document.body)]})})}const Ac="_field_1dizj_2 _field_6g4z6_2",Sc="_error_1dizj_6 _error_6g4z6_12",Oc="_sm_1dizj_10 _sm_6g4z6_54",zc="_md_1dizj_14 _md_6g4z6_59",Ec="_input_1dizj_18 _input_6g4z6_12",Tc="_trigger_1dizj_22 _trigger_6g4z6_72",Fc="_panel_1dizj_26",Bc="_slots_1dizj_36",Pc="_slotInput_1dizj_43",Hc="_slotList_1dizj_62",Ge={field:Ac,error:Sc,sm:Oc,md:zc,input:Ec,trigger:Tc,panel:Fc,slots:Bc,slotInput:Pc,slotList:Hc},rs=e=>String(e).padStart(2,"0");function pt(e){return e?rs(e.hour)+":"+rs(e.minute):""}function Ys(e,t,n){return(!t||e.compare(t)>=0)&&(!n||e.compare(n)<=0)}function Kc(e,t=new re.Time(0,0),n=new re.Time(23,59)){if(e<=0)return[];const s=t.hour*60+t.minute,r=n.hour*60+n.minute,a=[];for(let i=s;i<=r;i+=e)a.push(new re.Time(Math.floor(i/60),i%60));return a}function Qs({autoFocus:e=!1,baseId:t,label:n="Horário",max:s,min:r,onChange:a,step:i=30,value:u}){const[c,m]=l.useState(()=>pt(u)),[h,g]=l.useState(!1),d=l.useRef(null),p=l.useMemo(()=>Kc(i,r,s).map($=>({value:pt($),label:pt($)})),[s,r,i]),f=pt(u),y=cn({items:p,selectionMode:"single",value:u?[{value:f,label:f}]:[],onSelectionChange:([$])=>{const v=$&&tn($.value);v&&(g(!1),a(v))}});l.useEffect(()=>{var $;y.focus(p.some(v=>v.value===f)?f:void 0),e&&(($=d.current)==null||$.focus())},[]);function _($){const v=Ts($);g(!0),m(v);const b=tn(v);b&&Ys(b,r,s)&&a(b)}return o.jsxs("div",{className:Ge.slots,children:[o.jsx("input",{"aria-label":n+" em horas e minutos",autoComplete:"off",className:Ge.slotInput,inputMode:"numeric",onBlur:()=>g(!1),onChange:$=>_($.target.value),placeholder:"hh:mm",type:"text",value:h?c:f}),o.jsx(ln,{baseId:t,className:Ge.slotList,elementRef:d,holdsFocus:!0,label:n,listing:y,onKeyDown:y.handleKeyDown})]})}function qc({"aria-describedby":e,className:t,defaultValue:n,name:s,disabled:r=!1,error:a,hint:i,id:u,label:c,max:m,min:h,step:g=30,onValueChange:d,onBlur:p,onKeyDown:f,placeholder:y="hh:mm",required:_=!1,size:$="md",ref:v,value:b,...D}){const j=l.useRef(null),R=l.useRef(null),E=`hora-${l.useId()}`,P=l.useRef(null),[N,H]=l.useState(!1),k=Rt(h),S=Rt(m),[z,I]=l.useState(()=>Rt(n)??null),[L,K]=l.useState(""),[A,F]=l.useState(!1),G=b===void 0?void 0:Rt(b)??null,U=(G===void 0?z:G)??void 0,C=A?L:pt(U),x=l.useRef(null),w=vt(()=>{I(Rt(n)??null),F(!1)}),M=Me(x,w,v);function T(ee){I(ee),d==null||d(ee?Lc(ee):null)}function Z(ee=!0){var ae;H(!1),ee&&((ae=P.current)==null||ae.focus())}function W(ee){const ae=Ts(ee);F(!0),K(ae);const X=tn(ae);T(X&&Ys(X,k,S)?X:null)}function q(ee){f==null||f(ee),ee.key==="ArrowDown"&&!N?(ee.preventDefault(),H(!0)):ee.key==="Escape"&&N&&Z(!1)}const{overlayProps:Y}=je.useOverlay({isOpen:N,onClose:()=>Z(!1),isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:ee=>{var ae;return!((ae=j.current)!=null&&ae.contains(ee))}},R),{overlayProps:oe}=je.useOverlayPosition({targetRef:j,overlayRef:R,placement:"bottom start",offset:6,containerPadding:8,isOpen:N});return o.jsx(Ze,{"aria-describedby":e,error:a,hint:i,id:u,label:c,required:_,children:({id:ee,describedBy:ae,invalid:X})=>o.jsxs(o.Fragment,{children:[o.jsx(Bt,{disabled:r,name:s,onFocus:()=>{var B;return(B=x.current)==null?void 0:B.focus()},required:_,value:pt(U)}),o.jsxs("div",{className:[Ge.field,Ge[$],a&&Ge.error,t].filter(Boolean).join(" "),ref:j,children:[o.jsx("input",{...D,"aria-describedby":ae,"aria-invalid":X||void 0,"aria-required":_||void 0,autoComplete:"off",className:Ge.input,disabled:r,id:ee,inputMode:"numeric",onBlur:B=>{F(!1),p==null||p(B)},onChange:B=>W(B.target.value),onKeyDown:q,placeholder:y,ref:M,type:"text",value:C}),o.jsx("button",{"aria-expanded":N,"aria-haspopup":"dialog","aria-label":"Abrir seletor de hora",className:Ge.trigger,disabled:r,onClick:()=>N?Z():H(!0),ref:P,type:"button",children:o.jsx($s,{size:15})})]}),N&&Re.createPortal(o.jsx("div",{...Y,"aria-label":c?"Horas de "+c:"Horas",className:Ge.panel,"data-react-aria-top-layer":"true",onKeyDown:B=>{var Q;B.key==="Escape"&&Z(),(Q=Y.onKeyDown)==null||Q.call(Y,B)},ref:R,role:"dialog",style:oe.style,children:o.jsx(Qs,{autoFocus:!0,baseId:u??E,max:S,min:k,onChange:B=>{T(B),F(!1),Z()},step:g,value:U})}),document.body)]})})}const Vc="_field_1dita_2 _field_6g4z6_2",Uc="_error_1dita_6 _error_6g4z6_12",Gc="_sm_1dita_10 _sm_6g4z6_54",Wc="_md_1dita_14 _md_6g4z6_59",Xc="_input_1dita_18 _input_6g4z6_12",Zc="_trigger_1dita_22 _trigger_6g4z6_72",Yc="_panel_1dita_26",Qc="_columns_1dita_37",Jc="_footer_1dita_48",eu="_actions_1dita_58",Ue={field:Vc,error:Uc,sm:Gc,md:Wc,input:Xc,trigger:Zc,panel:Yc,columns:Qc,footer:Jc,actions:eu},Ut=e=>String(e).padStart(2,"0");function tu(e){return e?[Ut(e.day),Ut(e.month),e.year].join("/")+" "+Ut(e.hour)+":"+Ut(e.minute):""}function nu({"aria-describedby":e,className:t,defaultValue:n,name:s,disabled:r=!1,error:a,hint:i,id:u,isDateUnavailable:c,label:m,locale:h="pt-BR",max:g,min:d,step:p=30,onValueChange:f,onBlur:y,onKeyDown:_,placeholder:$="dd/mm/aaaa hh:mm",required:v=!1,size:b="md",ref:D,value:j,...R}){const E=l.useRef(null),P=l.useRef(null),N=l.useRef(null),H=`datetime-hora-${l.useId()}`,[k,S]=l.useState(!1),z={isDateUnavailable:c&&(O=>c(O.toString())),max:it(g),min:it(d)},[I,L]=l.useState(()=>bn(n)??null),[K,A]=l.useState(""),[F,G]=l.useState(!1),U=j===void 0?void 0:bn(j)??null,C=(U===void 0?I:U)??void 0,[x,w]=l.useState(C),[M,T]=l.useState(0),Z=l.useRef(null),W=vt(()=>{L(bn(n)??null),G(!1)}),q=Me(Z,W,D);l.useEffect(()=>{k&&w(C)},[k]);const Y=F?K:tu(C);function oe(O){L(O),f==null||f(O?as(O):null)}function ee(O){w(new re.CalendarDateTime(O.year,O.month,O.day,(x==null?void 0:x.hour)??0,(x==null?void 0:x.minute)??0))}function ae(O){const J=x??re.today(re.getLocalTimeZone());w(new re.CalendarDateTime(J.year,J.month,J.day,O.hour,O.minute))}function X(O=!0){var J;S(!1),O&&((J=N.current)==null||J.focus())}function B(O){const J=Xo(O);G(!0),A(J);const ue=Zo(J),ie=ue&&re.toCalendarDate(ue);oe(ue&&ie&&!mn(ie,z)?ue:null)}function Q(O){_==null||_(O),O.key==="ArrowDown"&&!k?(O.preventDefault(),S(!0)):O.key==="Escape"&&k&&X(!1)}const{overlayProps:he}=je.useOverlay({isOpen:k,onClose:()=>X(!1),isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:O=>{var J;return!((J=E.current)!=null&&J.contains(O))}},P),{overlayProps:V}=je.useOverlayPosition({targetRef:E,overlayRef:P,placement:"bottom start",offset:6,containerPadding:8,isOpen:k});return o.jsx(Ze,{"aria-describedby":e,error:a,hint:i,id:u,label:m,required:v,children:({id:O,describedBy:J,invalid:ue})=>o.jsxs(o.Fragment,{children:[o.jsx(Bt,{disabled:r,name:s,onFocus:()=>{var ie;return(ie=Z.current)==null?void 0:ie.focus()},required:v,value:C?as(C):""}),o.jsxs("div",{className:[Ue.field,Ue[b],a&&Ue.error,t].filter(Boolean).join(" "),ref:E,children:[o.jsx("input",{...R,"aria-describedby":J,"aria-invalid":ue||void 0,"aria-required":v||void 0,autoComplete:"off",className:Ue.input,disabled:r,id:O,inputMode:"numeric",onBlur:ie=>{G(!1),y==null||y(ie)},onChange:ie=>B(ie.target.value),onKeyDown:Q,placeholder:$,ref:q,type:"text",value:Y}),o.jsx("button",{"aria-expanded":k,"aria-haspopup":"dialog","aria-label":"Abrir calendário",className:Ue.trigger,disabled:r,onClick:()=>k?X():S(!0),ref:N,type:"button",children:o.jsx(Ln,{size:15})})]}),k&&Re.createPortal(o.jsxs("div",{...he,"aria-label":m?"Calendário de "+m:"Calendário",className:Ue.panel,"data-react-aria-top-layer":"true",onKeyDown:ie=>{var Ne;ie.key==="Escape"&&X(),(Ne=he.onKeyDown)==null||Ne.call(he,ie)},ref:P,role:"dialog",style:V.style,children:[o.jsxs("div",{className:Ue.columns,children:[o.jsx(Zs,{autoFocus:!0,isDateUnavailable:z.isDateUnavailable,locale:h,max:z.max,min:z.min,onSelect:ee,value:x&&new re.CalendarDate(x.year,x.month,x.day)},M),o.jsx(Qs,{baseId:H,onChange:ae,step:p,value:x&&new re.Time(x.hour,x.minute)})]}),o.jsxs("div",{className:Ue.footer,children:[o.jsx(lt,{onClick:()=>{w(re.toCalendarDateTime(re.now(re.getLocalTimeZone())).set({second:0,millisecond:0})),T(ie=>ie+1)},size:"sm",variant:"ghost",type:"button",children:"Agora"}),o.jsxs("div",{className:Ue.actions,children:[o.jsx(lt,{onClick:()=>X(),size:"sm",variant:"secondary",type:"button",children:"Cancelar"}),o.jsx(lt,{onClick:()=>{oe(x??null),G(!1),X()},size:"sm",type:"button",children:"Aplicar"})]})]})]}),document.body)]})})}const su="_figure_1ijj2_1",ou="_title_1ijj2_9",au="_body_1ijj2_20",ru="_plot_1ijj2_29",iu="_plotFill_1ijj2_37",lu="_bodyColumn_1ijj2_42",cu="_bodyRow_1ijj2_46",uu="_canvas_1ijj2_51",du="_empty_1ijj2_58",fu="_axisLine_1ijj2_67",mu="_axisLabel_1ijj2_72",hu="_gutter_1ijj2_80",_u="_dynamicAxis_1ijj2_87",pu="_slideRight_1ijj2_101",gu="_slideLeft_1ijj2_105",bu="_slideUp_1ijj2_109",yu="_gridLine_1ijj2_113",xu="_gridBaseline_1ijj2_118",vu="_cursor_1ijj2_159",ju="_legend_1ijj2_164",$u="_legendLeft_1ijj2_175",Mu="_legendCenter_1ijj2_179",Nu="_legendRight_1ijj2_183",ku="_legendSide_1ijj2_187",Du="_legendItem_1ijj2_196",wu="_legendButton_1ijj2_197",Ru="_legendOff_1ijj2_244",Cu="_swatch_1ijj2_248",Lu="_swatchDot_1ijj2_268",Iu="_legendLabel_1ijj2_273",Au="_legendValue_1ijj2_280",fe={figure:su,title:ou,body:au,plot:ru,plotFill:iu,bodyColumn:lu,bodyRow:cu,canvas:uu,empty:du,axisLine:fu,axisLabel:mu,gutter:hu,dynamicAxis:_u,slideRight:pu,slideLeft:gu,slideUp:bu,gridLine:yu,gridBaseline:xu,cursor:vu,legend:ju,legendLeft:$u,legendCenter:Mu,legendRight:Nu,legendSide:ku,legendItem:Du,legendButton:wu,legendOff:Ru,swatch:Cu,swatchDot:Lu,legendLabel:Iu,legendValue:Au};function Tn({offset:e,orientation:t="vertical",plot:n,size:s}){const r=t==="vertical";return o.jsx("rect",{className:fe.cursor,height:r?n.height:s,width:r?s:n.width,x:r?e:0,y:r?0:e})}const _e=8,yn=12,kn=.24;function Ht(e){return e.lineHeight+_e/2}const is=2,Js={offset:0,thickness:0};function eo(e,t){const n=t.reduce((r,a)=>r+a,0),s=Math.max((e-is*Math.max(n-1,0))/Math.max(n,1),0);return t.map((r,a)=>({offset:t.slice(0,a).reduce((i,u)=>i+(s+is)*u,0),thickness:s*r}))}function hn(e,t){return Math.max(Math.min(e,t)-_e*2,0)}const Su={bottom:"middle",left:"end",right:"start"};function Ou({hideLine:e=!1,labelRotation:t=0,length:n,orientation:s,ticks:r}){const a=s==="bottom",i=s==="left"?-_e:_e;return o.jsxs("g",{"aria-hidden":"true",className:fe.axis,children:[!e&&o.jsx("line",{className:fe.axisLine,x1:0,x2:a?n:0,y1:0,y2:a?0:n}),r.map((u,c)=>o.jsx("text",{className:fe.axisLabel,dominantBaseline:a?"hanging":"middle",textAnchor:a&&t!==0?"end":Su[s],transform:a&&t!==0?`rotate(${-t} ${u.position} ${_e})`:void 0,x:a?u.position:i,y:a?_e:u.position,children:u.label},c))]})}function zu({baseline:e,length:t,lines:n,orientation:s}){const r=s==="horizontal";return o.jsx("g",{"aria-hidden":"true",children:n.map((a,i)=>o.jsx("line",{className:a===e?fe.gridBaseline:fe.gridLine,x1:r?0:a,x2:r?t:a,y1:r?a:0,y2:r?a:t},i))})}const to=[{display:!0,papel:"display-large",size:36,lineHeight:44},{display:!0,papel:"headline-medium",size:24,lineHeight:32},{display:!1,papel:"title",size:16,lineHeight:24}],xn={centerSteps:to.map(({display:e,lineHeight:t,size:n})=>({display:e,lineHeight:t,size:n})),family:"sans-serif",headingFamily:"sans-serif",lineHeight:16,size:12},Eu=.58;function ls(e){if(!e||typeof getComputedStyle!="function")return xn;const t=getComputedStyle(e),n=t.getPropertyValue("--pl-font-body").trim()||t.fontFamily||xn.family,s=t.getPropertyValue("--pl-font-heading").trim()||n,r=Number.parseFloat(t.getPropertyValue("--pl-type-caption-size"))||xn.size,a=Number.parseFloat(t.getPropertyValue("--pl-type-caption-line-height")),i=c=>Number.parseFloat(t.getPropertyValue(`--pl-type-${c}`));return{centerSteps:to.map(c=>({display:c.display,lineHeight:i(`${c.papel}-line-height`)||c.lineHeight,size:i(`${c.papel}-size`)||c.size})),family:n,headingFamily:s,lineHeight:a||r*1.34,size:r}}let Gt;function Tu(){if(Gt===void 0)try{Gt=document.createElement("canvas").getContext("2d")}catch{Gt=null}return Gt}function et(e,t){const n=e.length*t.size*Eu,s=Tu();return s?(s.font=`${t.size}px ${t.family}`,s.measureText(e).width||n):n}function $t(e,t){return e.reduce((n,s)=>Math.max(n,et(s,t)),0)}function yt(e,t,n){if(n<=0)return"";if(et(e,t)<=n)return e;let s=e.length;for(;s>0&&et(`${e.slice(0,s)}…`,t)>n;)s-=1;return s>0?`${e.slice(0,s)}…`:""}function We(e,{includeZero:t=!0}={}){const n=e.filter(Number.isFinite);if(n.length===0)return{min:0,max:0};const[s=0,r=0]=Nn.extent(n);return{min:t?Math.min(s,0):s,max:t?Math.max(r,0):r}}function nn(e){let t=0,n=0;return e.map(s=>{const r=Number.isFinite(s)?s:0;if(r<0){const i=n;return n+=r,[i,n]}const a=t;return t+=r,[a,t]})}function xt(e){return e.length===0?{min:0,max:0}:{min:Nn.min(e,t=>t.min)??0,max:Nn.max(e,t=>t.max)??0}}function cs({min:e,max:t}){return t>e?-e/(t-e):void 0}function us(e,t,n){return t>n?{min:e.min,max:-e.min*(1-n)/n}:t<n?{min:-e.max*n/(1-n),max:e.max}:e}function Fu(e,t){const n=cs(e),s=cs(t);if(n===void 0||s===void 0)return[e,t];const r=Math.max(n,s)/(1+Math.abs(n-s));return[us(e,n,r),us(t,s,r)]}function Bu({min:e,max:t}){return e===t?[e,e+1]:[e,t]}function ve({clamp:e=!1,domain:t,nice:n=!0,range:s}){const r=an.scaleLinear().domain(Bu(t)).range(s).clamp(e);return n?r.nice():r}function Fn({domain:e,padding:t=.2,range:n}){return an.scaleBand().domain([...e]).range(n).paddingInner(t).paddingOuter(t/2)}function no({domain:e,padding:t=.5,range:n}){return an.scalePoint().domain([...e]).range(n).padding(t)}function Pu(e,t){return an.scaleSqrt().domain([0,e>0?e:1]).range(t)}function Xe(e,t,n){return e.ticks(Math.max(2,Math.min(10,Math.floor(t/64))))}function Ce(e,t){return{fillHeight:e==="fill",value:e==="fill"?t:e}}function ds(e,t,n){return e==="hidden"?0:$t(t,n)+_e}function Hu(e,t,n){return e.length===0||n<=0||$t(e,t)+_e<=n?0:n*Math.SQRT1_2>=t.lineHeight?45:90}function Ku(e,t,n,s){if(s==="hidden")return 0;if(n===0)return t.lineHeight+_e;const r=n*Math.PI/180;return $t(e,t)*Math.sin(r)+t.lineHeight*Math.cos(r)+_e}function Mt({bottomLabels:e,font:t,height:n,labelAngle:s,leftLabels:r,rightLabels:a,topRoom:i,width:u,xAxis:c,yAxis:m,yAxisRight:h}){const g=c==="hidden"?0:$t(e,t)/2,d=Math.max(ds(m,r,t),yn),p=Math.max(ds(h,a,t),yn),f=Math.max(u-d-p,0),y=s==="auto"?Hu(e,t,f/Math.max(e.length,1)):s,_=y===0?g:0,$={bottom:Ku(e,t,y,c),left:Math.max(d,_),right:Math.max(p,_),top:Math.max(i,yn)};return{margins:$,plot:{width:Math.max(u-$.left-$.right,0),height:Math.max(n-$.top-$.bottom,0)},rotation:y}}function tt(e,t,n){const s=ve({domain:e,range:[t,0]});return Xe(s,t).map(n)}const Bn=Math.PI*2;function qu(e,{endAngle:t=Bn,padAngle:n=0,startAngle:s=0}={}){return bt.pie().sort(null).sortValues(null).value(r=>Math.max(r,0)).startAngle(s).endAngle(t).padAngle(n)([...e]).map(({endAngle:r,startAngle:a})=>({endAngle:r,startAngle:a}))}function Tt({cornerRadius:e=0,endAngle:t,innerRadius:n,outerRadius:s,padAngle:r=0,startAngle:a}){return bt.arc().cornerRadius(e).innerRadius(n).outerRadius(s).padAngle(r).startAngle(a).endAngle(t)({cornerRadius:e,endAngle:t,innerRadius:n,outerRadius:s,padAngle:r,startAngle:a})??""}function Vu({endAngle:e,innerRadius:t,outerRadius:n,startAngle:s}){const r=(t+n)/2,a=(s+e)/2-Math.PI/2;return[Math.cos(a)*r,Math.sin(a)*r]}function fs(e,t){const n=(e.startAngle+e.endAngle)/2-Math.PI/2;return[Math.cos(n)*t,Math.sin(n)*t]}function Uu(e,t){const n=t.centerSteps[t.centerSteps.length-1];return et(e,{...t,family:n.display?t.headingFamily:t.family,size:n.size})/2+_e}function so(e,t,n,s){const r=Math.max(s-_e*2,0),a=n.centerSteps,i=a.find(c=>et(e,{...n,family:c.display?n.headingFamily:n.family,size:c.size})<=r)??a[a.length-1],u=i.display?n.headingFamily:n.family;return{family:u,label:yt(t,n,r),lineHeight:i.lineHeight,size:i.size,value:yt(e,{...n,family:u,size:i.size},r)}}const Gu={left:fe.legendLeft,center:fe.legendCenter,right:fe.legendRight};function Wu({align:e="center",entries:t,onToggle:n,position:s,swatch:r="square"}){const a=s==="left"||s==="right";return o.jsx("ul",{className:`${fe.legend} ${a?fe.legendSide:Gu[e]}`,children:t.map((i,u)=>{const c=o.jsxs(o.Fragment,{children:[o.jsx("span",{"aria-hidden":"true",className:`${fe.swatch} ${r==="dot"?fe.swatchDot:""}`,style:i.hidden?void 0:{background:i.color}}),o.jsx("span",{className:fe.legendLabel,children:i.label}),i.value!==void 0&&o.jsx("span",{className:fe.legendValue,children:i.value})]});return o.jsx("li",{className:fe.legendItem,children:n?o.jsx("button",{"aria-pressed":!i.hidden,className:`${fe.legendButton} ${i.hidden?fe.legendOff:""}`,onClick:()=>n(i.label),type:"button",children:c}):c},u)})})}function ct({children:e,centerOrigin:t=!1,containerRef:n,empty:s,emptyMessage:r,fillHeight:a,height:i,legend:u,legendAlign:c,legendPosition:m,minLegendEntries:h=1,onToggleSeries:g,swatch:d="square",title:p,width:f}){const y=l.useId(),_=m==="left"||m==="right",$=m!=="none"&&u!==void 0&&u.length>=h&&o.jsx(Wu,{align:c,entries:u,onToggle:g,position:m,swatch:d});return o.jsxs("figure",{className:fe.figure,children:[o.jsx("figcaption",{className:fe.title,id:y,children:p}),o.jsxs("div",{className:`${fe.body} ${_?fe.bodyRow:fe.bodyColumn}`,children:[(m==="top"||m==="left")&&$,o.jsx("div",{className:`${fe.plot} ${a?fe.plotFill:""}`,ref:n,style:a?void 0:{minHeight:i},children:s?o.jsx("p",{className:fe.empty,children:r}):f===0||i===0?null:o.jsx("svg",{"aria-labelledby":y,className:fe.canvas,height:i,role:"img",viewBox:`0 0 ${f} ${i}`,width:f,children:t?o.jsx("g",{transform:`translate(${f/2} ${i/2})`,children:e}):e})}),(m==="bottom"||m==="right")&&$]})]})}const Xu={bottom:fe.slideUp,left:fe.slideRight,right:fe.slideLeft};function vn({axis:e,gutter:t,length:n,orientation:s}){const r=e.visibility??"visible";if(r==="hidden")return null;const a=r==="onHover",i=o.jsx(Ou,{hideLine:e.hideLine,labelRotation:e.labelRotation,length:n,orientation:s,ticks:e.ticks});return a?o.jsxs("g",{className:`${fe.dynamicAxis} ${Xu[s]}`,children:[o.jsx("rect",{className:fe.gutter,height:t.height,width:t.width,x:t.x,y:t.y}),i]}):i}function Nt({children:e,containerRef:t,empty:n,emptyMessage:s,fillHeight:r,grid:a,height:i,legend:u,legendAlign:c,legendPosition:m,margins:h,onToggleSeries:g,plot:d,title:p,width:f,xAxis:y,yAxis:_,yAxisRight:$}){return o.jsx(ct,{containerRef:t,empty:n,emptyMessage:s,fillHeight:r,height:i,legend:u,legendAlign:c,legendPosition:m,minLegendEntries:2,onToggleSeries:g,title:p,width:f,children:o.jsxs("g",{transform:`translate(${h.left} ${h.top})`,children:[a==null?void 0:a.map(v=>o.jsx(zu,{baseline:v.baseline,length:v.orientation==="horizontal"?d.width:d.height,lines:v.lines,orientation:v.orientation},v.orientation)),e,o.jsx("g",{transform:`translate(0 ${d.height})`,children:o.jsx(vn,{axis:y,gutter:{height:h.bottom,width:d.width,x:0,y:0},length:d.width,orientation:"bottom"})}),o.jsx(vn,{axis:_,gutter:{height:d.height,width:h.left,x:-h.left,y:0},length:d.height,orientation:"left"}),$&&o.jsx("g",{transform:`translate(${d.width} 0)`,children:o.jsx(vn,{axis:$,gutter:{height:d.height,width:h.right,x:0,y:0},length:d.height,orientation:"right"})})]})})}function oo(e){return e==="smooth"?bt.curveMonotoneX:bt.curveLinear}function Pn(e,t){return bt.line().defined(n=>n!==null&&Number.isFinite(n.x)&&Number.isFinite(n.y)).x(n=>(n==null?void 0:n.x)??0).y(n=>(n==null?void 0:n.y)??0).curve(oo(t))(e)??""}function Zu(e,t){return bt.area().defined(n=>n!==null&&Number.isFinite(n.y0)&&Number.isFinite(n.y1)).x(n=>(n==null?void 0:n.x)??0).y0(n=>(n==null?void 0:n.y0)??0).y1(n=>(n==null?void 0:n.y1)??0).curve(oo(t))(e)??""}function Hn(e,t,n,s,r){const a=Math.max(Math.min(n,s)/2,0),[i,u,c,m]=r.map(d=>Math.max(Math.min(d,a),0)),h=e+n,g=t+s;return[`M${e+i},${t}`,`L${h-u},${t}`,u?`Q${h},${t} ${h},${t+u}`:"",`L${h},${g-c}`,c?`Q${h},${g} ${h-c},${g}`:"",`L${e+m},${g}`,m?`Q${e},${g} ${e},${g-m}`:"",`L${e},${t+i}`,i?`Q${e},${t} ${e+i},${t}`:"","Z"].filter(Boolean).join("")}function jn(e){return Number.isFinite(e.value)?Math.max(e.value,0):0}function Yu(e,{label:t,threshold:n}){const s=e.reduce((c,m)=>c+jn(m),0);if(n<=0||s<=0)return e;const r=c=>Number.isFinite(c.value)&&jn(c)/s<n,a=e.filter(r);if(a.length<2)return e;const i={intent:"neutral",label:t,value:a.reduce((c,m)=>c+jn(m),0)};let u=!1;return e.flatMap(c=>r(c)?u?[]:(u=!0,[i]):[c])}const Dn=5;function Qu(e){return!e||typeof getComputedStyle!="function"?Dn:Number.parseFloat(getComputedStyle(e).getPropertyValue("--pl-radius-sm"))||Dn}function Le(){const[e,t]=l.useState(()=>({font:ls(null),height:0,radius:Dn,width:0})),n=l.useRef(null),s=l.useCallback(()=>{const a=n.current,i=(a==null?void 0:a.clientWidth)??0,u=(a==null?void 0:a.clientHeight)??0,c=ls(a),m=Qu(a);t(h=>h.width===i&&h.height===u&&h.radius===m&&h.font.family===c.family&&h.font.size===c.size&&h.font.lineHeight===c.lineHeight&&h.font.centerSteps.every((g,d)=>{var p;return g.size===((p=c.centerSteps[d])==null?void 0:p.size)})?h:{font:c,height:u,radius:m,width:i})},[]),r=l.useCallback(a=>{n.current=a,s()},[s]);return l.useEffect(()=>{const a=n.current;if(!a||typeof ResizeObserver>"u")return;const i=new ResizeObserver(s);return i.observe(a),()=>i.disconnect()},[s]),{font:e.font,height:e.height,radius:e.radius,ref:r,width:e.width}}function Kn(e){const[t,n]=l.useState(null);return{hover:s=>{n(s),e==null||e(s)},hovered:t}}function Ye({defaultHiddenSeries:e=[],hiddenSeries:t,onHiddenSeriesChange:n}){const[s,r]=l.useState(e),a=t??s,i=l.useCallback(u=>{const c=a.includes(u)?a.filter(m=>m!==u):[...a,u];t===void 0&&r(c),n==null||n(c)},[t,a,n]);return{isHidden:l.useCallback(u=>a.includes(u),[a]),toggle:i}}const sn=6;function on(e){return Array.from({length:Math.max(e,0)},(t,n)=>`var(--pl-chart-series-${n%sn+1})`)}const Ju={"#49619c":1,"#f26b35":2,"#6e2a92":3};function ao(e,t){if(t<=0)return[];const n=Ju[e.trim().toLowerCase()],s=on(sn).filter((r,a)=>n===void 0||a+1!==n);return[e,...Array.from({length:t-1},(r,a)=>s[a%s.length])]}const Jt={positive:"var(--pl-chart-positive)",negative:"var(--pl-chart-negative)",warning:"var(--pl-chart-warning)",neutral:"var(--pl-chart-neutral)"},ed=/^var\(--pl-chart-(series-\d|positive|negative|warning|neutral)\)$/,td=Math.sqrt(1.05*.05)-.05;function nd(e){const t=e.trim().replace(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,"#$1$1$2$2$3$3"),n=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!n)return;const[s,r,a]=n.slice(1).map(i=>{const u=parseInt(i,16)/255;return u<=.04045?u/12.92:((u+.055)/1.055)**2.4});return .2126*s+.7152*r+.0722*a}function wn(e){var s;const t=(s=ed.exec(e.trim()))==null?void 0:s[1];if(t)return`var(--pl-chart-on-${t})`;const n=nd(e);return n!==void 0&&n>td?"var(--pl-chart-on-light)":"var(--pl-chart-on-dark)"}function Ie(e,{accent:t}={}){const n=e.filter(a=>!a.color&&!a.intent).length,s=t?ao(t,n):on(n);let r=0;return e.map(a=>{if(a.color)return a.color;if(a.intent)return Jt[a.intent];const i=s[r]??on(sn)[r%sn];return r+=1,i})}const sd=320;function od(){return typeof matchMedia=="function"&&!matchMedia("(prefers-reduced-motion: reduce)").matches}function ad(e){return 1-(1-e)**3}function Oe(e,{duration:t=sd,from:n}={}){const[s,r]=l.useState(n??e),a=l.useRef(n??e),i=e.join(",");return l.useEffect(()=>{const u=a.current,c=d=>{a.current=d,r(d)};if(u.length!==e.length||t<=0||!od()){c(e);return}const m=performance.now();let h=0;const g=()=>{const d=Math.min((performance.now()-m)/t,1),p=ad(d);c(u.map((f,y)=>f+(e[y]-f)*p)),d<1&&(h=requestAnimationFrame(g))};return h=requestAnimationFrame(g),()=>cancelAnimationFrame(h)},[i,t]),s}function ro({accent:e,defaultHiddenSlices:t,hiddenSlices:n,onHiddenSlicesChange:s,onHoverSlice:r,otherLabel:a,slices:i,smallSliceThreshold:u}){const{isHidden:c,toggle:m}=Ye({defaultHiddenSeries:t,hiddenSeries:n,onHiddenSeriesChange:s}),[h,g]=l.useState(null),d=l.useMemo(()=>Yu(i,{label:a,threshold:u}),[a,i,u]),p=l.useMemo(()=>Ie(d,{accent:e}),[e,d]),f=d.map(b=>c(b.label)||!Number.isFinite(b.value)?0:Math.max(b.value,0)),y=f.reduce((b,D)=>b+D,0),_=l.useMemo(()=>qu(f).flatMap(b=>[b.startAngle,b.endAngle]),[f.join()]),$=Oe(_,{from:_.map(()=>0)});return{angles:d.map((b,D)=>({startAngle:$[D*2]??0,endAngle:$[D*2+1]??0})),colors:p,focus:b=>{g(b),r==null||r(b===null?null:d[b]??null)},focused:h,isHidden:c,ratioOf:b=>y>0?(f[b]??0)/y:0,slices:d,toggle:m,total:y,values:f}}const rd="_bar_72sfu_3",id="_series_72sfu_7 _series_1ijj2_208",ld="_seriesOff_72sfu_11 _seriesOff_1ijj2_212",cd="_valueLabel_72sfu_15 _valueLabel_1ijj2_123",Wt={bar:rd,series:id,seriesOff:ld,valueLabel:cd};function ud({accent:e,categories:t,defaultHiddenSeries:n,emptyMessage:s="Sem dados no período",formatValue:r=$e,height:a=260,hiddenSeries:i,labelAngle:u="auto",legend:c="bottom",legendAlign:m,onHiddenSeriesChange:h,onHoverCategory:g,orientation:d="vertical",series:p,showDataLabels:f=!1,stacked:y=!1,title:_,xAxis:$="visible",yAxis:v="visible",yAxisRight:b="hidden"}){const{font:D,height:j,radius:R,ref:E,width:P}=Le(),{fillHeight:N,value:H}=Ce(a,j),{isHidden:k,toggle:S}=Ye({defaultHiddenSeries:n,hiddenSeries:i,onHiddenSeriesChange:h}),{hover:z,hovered:I}=Kn(g),L=d==="vertical",K=l.useMemo(()=>Ie(p,{accent:e}),[e,p]),A=Oe(p.map(ne=>k(ne.label)?0:1)),F=ne=>A[ne]??0,G=l.useMemo(()=>{const ne=p.filter(se=>!k(se.label));return y?We(t.flatMap((se,le)=>nn(ne.map(ce=>ce.values[le]??0)).flat())):xt(ne.map(se=>We([...se.values])))},[t,k,p,y]),U=!L&&(c==="left"||c==="right")?"bottom":c,C=tt(G,L?H:P,r),{margins:x,plot:w,rotation:M}=Mt({bottomLabels:L?t:C,font:D,height:H,labelAngle:u,leftLabels:L?C:t,rightLabels:L?C:t,topRoom:f&&L?Ht(D):0,width:P,xAxis:$,yAxis:v,yAxisRight:b}),T=L?w.width:w.height,Z=L?w.height:w.width,W=L?Z:0,q=L?0:Z,Y=l.useMemo(()=>Fn({domain:t,range:[0,T]}),[t,T]),oe=l.useMemo(()=>ve({domain:G,range:[W,q]}),[G,q,W]),[ee,ae]=Oe(oe.domain()),X=l.useMemo(()=>ve({domain:{min:ee,max:ae},nice:!1,range:[W,q]}),[q,W,ae,ee]),B=Xe(oe,Z),Q=Y.bandwidth(),he=eo(Q,A);function V(ne){return he[ne]??Js}function O(ne){return y?Q:V(ne).thickness}function J(ne){return y?0:V(ne).offset}function ue(ne,se){const le=p[ne].values[se];return(Number.isFinite(le)?le:0)*(y?F(ne):1)}const ie=t.map((ne,se)=>y?nn(p.map((le,ce)=>ue(ce,se))):[]);function Ne(ne,se){return ie[se][ne]??[0,ue(ne,se)]}function me(ne,se){const[le,ce]=Ne(ne,se);if(!y)return[R,R,R,R];const pe=ie[se],ze=ce<le?Math.min(...pe.map(([,ut])=>ut)):Math.max(...pe.map(([,ut])=>ut)),Qe=ce!==le&&le===0?R:0,Ae=ce!==le&&ce===ze?R:0,[Ee,Je]=ce<le?[Ae,Qe]:[Qe,Ae];return L?[Je,Je,Ee,Ee]:[Ee,Je,Je,Ee]}function te(ne,se,le,ce){const pe=ne<0;return o.jsx("text",{className:Wt.valueLabel,dominantBaseline:L?pe?"hanging":"auto":"middle",textAnchor:L?"middle":pe?"end":"start",x:L?le:se+(pe?-6:6),y:L?se+(pe?6:-6):le,children:r(ne)},ce)}const ye=t.map(ne=>({label:ne,position:(Y(ne)??0)+Q/2})),Ke=B.map(ne=>({label:r(ne),position:X(ne)})),De={labelRotation:M,ticks:ye},qe={hideLine:!0,ticks:Ke};return o.jsxs(Nt,{containerRef:E,empty:p.length===0||t.length===0,emptyMessage:s,fillHeight:N,grid:[{baseline:X(0),lines:B.map(ne=>X(ne)),orientation:L?"horizontal":"vertical"}],height:H,legend:p.map((ne,se)=>({color:K[se],hidden:k(ne.label),label:ne.label})),legendAlign:m,legendPosition:U,margins:x,onToggleSeries:S,plot:w,title:_,width:P,xAxis:{...L?De:qe,visibility:$},yAxis:{...L?qe:De,visibility:v},yAxisRight:{...L?qe:De,hideLine:!0,visibility:b},children:[I!==null&&o.jsx(Tn,{offset:Y(t[I])??0,orientation:d,plot:w,size:Q}),p.map((ne,se)=>{const le=k(ne.label);return o.jsxs("g",{"aria-hidden":le||void 0,className:`${Wt.series} ${le?Wt.seriesOff:""}`,children:[t.map((ce,pe)=>{if(!Number.isFinite(ne.values[pe]))return null;const ze=Y(ce)??0,[Qe,Ae]=Ne(se,pe),Ee=X(Qe),Je=X(Ae),ut=Math.abs(Je-Ee),qn=O(se),Vn=J(se);return o.jsx("path",{"aria-label":`${ne.label}, ${ce}: ${r(ne.values[pe])}`,className:Wt.bar,d:Hn(L?ze+Vn:Math.min(Ee,Je),L?Math.min(Ee,Je):ze+Vn,L?qn:ut,L?ut:qn,me(se,pe)),fill:K[se],onMouseEnter:()=>z(pe),onMouseLeave:()=>z(null)},pe)}),f&&!y&&t.map((ce,pe)=>{const ze=ne.values[pe];if(!Number.isFinite(ze))return null;const Qe=(Y(ce)??0)+J(se)+O(se)/2;return te(ze,X(ze),Qe,pe)})]},se)}),f&&y&&t.map((ne,se)=>{const le=p.filter(Ae=>!k(Ae.label)&&Number.isFinite(Ae.values[se]));if(le.length===0)return null;const ce=le.reduce((Ae,Ee)=>Ae+Ee.values[se],0),pe=ie[se].map(([,Ae])=>Ae),ze=ce<0?Math.min(0,...pe):Math.max(0,...pe),Qe=(Y(ne)??0)+Q/2;return te(ce,X(ze),Qe,se)})]})}const dd="_line_1r7tk_1 _line_1ijj2_131",fd="_dot_1r7tk_5 _dot_1ijj2_139",md="_dotVisible_1r7tk_9 _dotVisible_1ijj2_144",hd="_valueLabel_1r7tk_13 _valueLabel_1ijj2_123",_d="_series_1r7tk_17 _series_1ijj2_208",pd="_seriesOff_1r7tk_21 _seriesOff_1ijj2_212",mt={line:dd,dot:fd,dotVisible:md,valueLabel:hd,series:_d,seriesOff:pd};function gd(e,t){return e[t]!==null&&!e[t-1]&&!e[t+1]}function bd({accent:e,categories:t,curve:n="smooth",defaultHiddenSeries:s,emptyMessage:r="Sem dados no período",formatValue:a=$e,height:i=260,includeZero:u=!0,hiddenSeries:c,labelAngle:m="auto",legend:h="bottom",legendAlign:g,onHiddenSeriesChange:d,series:p,showDataLabels:f=!1,showDots:y=!1,title:_,xAxis:$="visible",yAxis:v="visible",yAxisRight:b="hidden"}){const{font:D,height:j,ref:R,width:E}=Le(),{fillHeight:P,value:N}=Ce(i,j),{isHidden:H,toggle:k}=Ye({defaultHiddenSeries:s,hiddenSeries:c,onHiddenSeriesChange:d}),S=l.useMemo(()=>Ie(p,{accent:e}),[e,p]),z=l.useMemo(()=>xt(p.filter(W=>!H(W.label)).map(W=>We(W.values.filter(q=>q!==null),{includeZero:u}))),[u,H,p]),I=tt(z,N,a),{margins:L,plot:K,rotation:A}=Mt({bottomLabels:t,font:D,height:N,labelAngle:m,leftLabels:I,rightLabels:I,topRoom:f?Ht(D):0,width:E,xAxis:$,yAxis:v,yAxisRight:b}),F=l.useMemo(()=>no({domain:t,padding:0,range:[0,K.width]}),[t,K.width]),G=l.useMemo(()=>ve({domain:z,range:[K.height,0]}),[z,K.height]),[U,C]=Oe(G.domain()),x=l.useMemo(()=>ve({domain:{min:U,max:C},nice:!1,range:[K.height,0]}),[C,U,K.height]),w=Xe(G,K.height),M=p.map(W=>t.map((q,Y)=>{const oe=W.values[Y];return oe==null||!Number.isFinite(oe)?null:{x:F(q)??0,y:x(oe)}})),T=t.map(W=>({label:W,position:F(W)??0})),Z=w.map(W=>({label:a(W),position:x(W)}));return o.jsx(Nt,{containerRef:R,empty:p.length===0||t.length===0,emptyMessage:r,fillHeight:P,grid:[{baseline:x(0),lines:w.map(W=>x(W)),orientation:"horizontal"}],height:N,legend:p.map((W,q)=>({color:S[q],hidden:H(W.label),label:W.label})),legendAlign:g,legendPosition:h,margins:L,onToggleSeries:k,plot:K,title:_,width:E,xAxis:{labelRotation:A,ticks:T,visibility:$},yAxis:{hideLine:!0,ticks:Z,visibility:v},yAxisRight:{hideLine:!0,ticks:Z,visibility:b},children:p.map((W,q)=>{const Y=H(W.label);return o.jsxs("g",{"aria-hidden":Y||void 0,className:`${mt.series} ${Y?mt.seriesOff:""}`,children:[o.jsx("path",{className:mt.line,d:Pn(M[q],n),fill:"none",stroke:S[q]}),M[q].map((oe,ee)=>{if(oe===null)return null;const ae=`${W.label}, ${t[ee]}: ${a(W.values[ee]??0)}`;return o.jsx("circle",{"aria-label":ae,className:y||gd(M[q],ee)?mt.dotVisible:mt.dot,cx:oe.x,cy:oe.y,fill:S[q],r:4,children:o.jsx("title",{children:ae})},ee)}),f&&M[q].map((oe,ee)=>oe===null?null:o.jsx("text",{className:mt.valueLabel,textAnchor:"middle",x:oe.x,y:oe.y-10,children:a(W.values[ee]??0)},ee))]},q)})})}const yd="_area_8ibkx_3",xd="_tooltip_8ibkx_8",vd="_title_8ibkx_20",jd="_subtitle_8ibkx_29",$d="_grid_8ibkx_38",Md="_label_8ibkx_45",Nd="_swatch_8ibkx_59",kd="_value_8ibkx_68",Dd="_computed_8ibkx_80 _value_8ibkx_68",wd="_emphasis_8ibkx_87",Rd="_rule_8ibkx_96",Cd="_totalLabel_8ibkx_102",Ld="_totalValue_8ibkx_107",ge={area:yd,tooltip:xd,title:vd,subtitle:jd,grid:$d,label:Md,swatch:Nd,value:kd,computed:Dd,emphasis:wd,rule:Rd,totalLabel:Cd,totalValue:Ld},ht=16,Xt=8;function Rn(e){return e.reduce((t,n)=>t+n,0)}function Id(e,t){return typeof e=="function"?e(t):e==="average"?t.length===0?0:Rn(t)/t.length:Rn(t)}function Ad({x:e,y:t},n,s){const r=e+ht+n<=window.innerWidth-Xt,a=t+ht+s<=window.innerHeight-Xt;return{x:r?e+ht:Math.max(e-ht-n,Xt),y:a?t+ht:Math.max(t-ht-s,Xt)}}function Sd({children:e,columns:t,computed:n,rows:s,showTotal:r=!1,subtitle:a,title:i,totalLabel:u="Total"}){const[c,m]=l.useState(null),h=c!==null&&s.length>0;l.useEffect(()=>{if(!h)return;const d=()=>m(null);return window.addEventListener("scroll",d,!0),window.addEventListener("resize",d),window.addEventListener("keydown",d),()=>{window.removeEventListener("scroll",d,!0),window.removeEventListener("resize",d),window.removeEventListener("keydown",d)}},[h]);const g=d=>m({x:d.clientX,y:d.clientY});return o.jsxs("div",{className:ge.area,onPointerLeave:()=>m(null),onPointerMove:g,children:[e,h&&Re.createPortal(o.jsx(Od,{columns:t,computed:n,ponteiro:c,rows:s,showTotal:r,subtitle:a,title:i,totalLabel:u}),document.body)]})}function Od({columns:e,computed:t,ponteiro:n,rows:s,showTotal:r,subtitle:a,title:i,totalLabel:u}){const c=l.useRef(null),[m,h]=l.useState({altura:0,largura:0});l.useLayoutEffect(()=>{const j=c.current;if(!j)return;const{height:R,width:E}=j.getBoundingClientRect();(R!==m.altura||E!==m.largura)&&h({altura:R,largura:E})});const g=s.reduce((j,R)=>Math.max(j,R.values.length),0),d=e??Array.from({length:g},()=>({})),p=t==="none"||d.length===0?void 0:t??{},f=(p==null?void 0:p.column)??d.length-1,y=Rn(s.map(j=>j.values[f]??0)),_=(p==null?void 0:p.compute)??((j,R)=>R===0?0:j/R),$=(p==null?void 0:p.format)??(j=>zs(j,{casasDecimais:2})),{x:v,y:b}=Ad(n,m.largura,m.altura),D=`1fr ${"auto ".repeat(d.length+(p?1:0))}`.trim();return o.jsxs("div",{"aria-hidden":"true",className:ge.tooltip,ref:c,style:{left:v,top:b},children:[i!==void 0&&o.jsx("p",{className:ge.title,children:i}),a!==void 0&&o.jsx("p",{className:ge.subtitle,children:a}),o.jsxs("div",{className:ge.grid,style:{gridTemplateColumns:D},children:[s.map((j,R)=>o.jsxs(l.Fragment,{children:[o.jsxs("span",{className:`${ge.label} ${j.emphasis?ge.emphasis:""}`,children:[j.color!==void 0&&o.jsx("span",{className:ge.swatch,style:{background:j.color}}),j.label]}),d.map((E,P)=>o.jsx("span",{className:`${ge.value} ${j.emphasis?ge.emphasis:""}`,children:(E.format??$e)(j.values[P]??0)},P)),p&&o.jsx("span",{className:`${ge.computed} ${j.emphasis?ge.emphasis:""}`,children:$(_(j.values[f]??0,y))})]},R)),r&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:ge.rule}),o.jsx("span",{className:`${ge.label} ${ge.totalLabel}`,children:u}),d.map((j,R)=>o.jsx("span",{className:`${ge.value} ${ge.totalValue}`,children:j.total==="none"?"":(j.format??$e)(Id(j.total??"sum",s.map(E=>E.values[R]??0)))},R)),p&&o.jsx("span",{className:`${ge.computed} ${ge.totalValue}`,children:$(_(y,y))})]})]})]})}const zd="_bar_ycvom_1",Ed="_line_ycvom_5 _line_1ijj2_131",Td="_dot_ycvom_9 _dot_1ijj2_139",Fd="_dotVisible_ycvom_13 _dotVisible_1ijj2_144",Bd="_valueLabel_ycvom_17 _valueLabel_1ijj2_123",Pd="_series_ycvom_21 _series_1ijj2_208",Hd="_seriesOff_ycvom_25 _seriesOff_1ijj2_212",Fe={bar:zd,line:Ed,dot:Td,dotVisible:Fd,valueLabel:Bd,series:Pd,seriesOff:Hd};function Kd(e,t){return e[t]!==null&&!e[t-1]&&!e[t+1]}function en(e){return e.axis??"left"}function ms(e,t,n){return xt(e.filter(s=>en(s)===t&&!n(s.label)).map(s=>We(s.values.filter(r=>r!==null))))}function hs(e){const[t=0,n=0]=ve({domain:e,range:[0,1]}).domain();return{max:n,min:t}}function qd({accent:e,categories:t,curve:n="smooth",defaultHiddenSeries:s,emptyMessage:r="Sem dados no período",formatRightValue:a,formatValue:i=$e,height:u=260,hiddenSeries:c,labelAngle:m="auto",legend:h="bottom",legendAlign:g,onHiddenSeriesChange:d,onHoverCategory:p,series:f,showDataLabels:y=!1,showDots:_=!1,title:$,xAxis:v="visible",yAxis:b="visible",yAxisRight:D}){const{font:j,height:R,radius:E,ref:P,width:N}=Le(),{fillHeight:H,value:k}=Ce(u,R),{isHidden:S,toggle:z}=Ye({defaultHiddenSeries:s,hiddenSeries:c,onHiddenSeriesChange:d}),{hover:I,hovered:L}=Kn(p),K=a??i,A=f.some(te=>en(te)==="right"),F=l.useMemo(()=>Ie(f,{accent:e}),[e,f]),G=Oe(f.map(te=>S(te.label)?0:1)),[U,C]=l.useMemo(()=>{const te=hs(ms(f,"left",S));return A?Fu(te,hs(ms(f,"right",S))):[te,te]},[S,f,A]),x=D??(A?"visible":"hidden"),{margins:w,plot:M,rotation:T}=Mt({bottomLabels:t,font:j,height:k,labelAngle:m,leftLabels:tt(U,k,i),rightLabels:tt(C,k,K),topRoom:y?Ht(j):0,width:N,xAxis:v,yAxis:b,yAxisRight:x}),Z=l.useMemo(()=>Fn({domain:t,range:[0,M.width]}),[t,M.width]),W=l.useMemo(()=>ve({domain:U,nice:!1,range:[M.height,0]}),[U,M.height]),q=l.useMemo(()=>ve({domain:C,nice:!1,range:[M.height,0]}),[C,M.height]),[Y,oe,ee,ae]=Oe([...W.domain(),...q.domain()]),X=l.useMemo(()=>ve({domain:{min:Y,max:oe},nice:!1,range:[M.height,0]}),[oe,Y,M.height]),B=l.useMemo(()=>ve({domain:{min:ee,max:ae},nice:!1,range:[M.height,0]}),[ae,ee,M.height]),Q=te=>en(te)==="right"?B:X,he=te=>en(te)==="right"?K:i,V=Xe(W,M.height),O=Xe(q,M.height),J=Z.bandwidth(),ue=eo(J,f.map((te,ye)=>te.kind==="bar"?G[ye]??0:0)),ie=te=>ue[te]??Js,Ne=t.map(te=>({label:te,position:(Z(te)??0)+J/2})),me=(te,ye,Ke)=>te.map(De=>({label:Ke(De),position:ye(De)}));return o.jsxs(Nt,{containerRef:P,empty:f.length===0||t.length===0,emptyMessage:r,fillHeight:H,grid:[{baseline:X(0),lines:V.map(te=>X(te)),orientation:"horizontal"}],height:k,legend:f.map((te,ye)=>({color:F[ye],hidden:S(te.label),label:te.label})),legendAlign:g,legendPosition:h,margins:w,onToggleSeries:z,plot:M,title:$,width:N,xAxis:{labelRotation:T,ticks:Ne,visibility:v},yAxis:{hideLine:!0,ticks:me(V,X,i),visibility:b},yAxisRight:{hideLine:!0,ticks:me(O,B,K),visibility:x},children:[L!==null&&o.jsx(Tn,{offset:Z(t[L])??0,plot:M,size:J}),f.map((te,ye)=>{if(te.kind!=="bar")return null;const Ke=S(te.label),De=Q(te),qe=he(te),ne=De(0);return o.jsxs("g",{"aria-hidden":Ke||void 0,className:`${Fe.series} ${Ke?Fe.seriesOff:""}`,children:[t.map((se,le)=>{const ce=te.values[le];if(ce==null||!Number.isFinite(ce))return null;const pe=De(ce);return o.jsx("path",{"aria-label":`${te.label}, ${se}: ${qe(ce)}`,className:Fe.bar,d:Hn((Z(se)??0)+ie(ye).offset,Math.min(ne,pe),ie(ye).thickness,Math.abs(pe-ne),[E,E,E,E]),fill:F[ye],onMouseEnter:()=>I(le),onMouseLeave:()=>I(null)},le)}),y&&t.map((se,le)=>{const ce=te.values[le];return ce==null||!Number.isFinite(ce)?null:o.jsx("text",{className:Fe.valueLabel,textAnchor:"middle",x:(Z(se)??0)+ie(ye).offset+ie(ye).thickness/2,y:De(ce)-6,children:qe(ce)},le)})]},ye)}),f.map((te,ye)=>{if(te.kind!=="line")return null;const Ke=S(te.label),De=Q(te),qe=he(te),ne=t.map((se,le)=>{const ce=te.values[le];return ce==null||!Number.isFinite(ce)?null:{x:(Z(se)??0)+J/2,y:De(ce)}});return o.jsxs("g",{"aria-hidden":Ke||void 0,className:`${Fe.series} ${Ke?Fe.seriesOff:""}`,children:[o.jsx("path",{className:Fe.line,d:Pn(ne,n),fill:"none",stroke:F[ye]}),ne.map((se,le)=>se===null?null:o.jsx("circle",{"aria-label":`${te.label}, ${t[le]}: ${qe(te.values[le]??0)}`,className:_||Kd(ne,le)?Fe.dotVisible:Fe.dot,cx:se.x,cy:se.y,fill:F[ye],r:4},le)),y&&ne.map((se,le)=>se===null?null:o.jsx("text",{className:Fe.valueLabel,textAnchor:"middle",x:se.x,y:se.y-10,children:qe(te.values[le]??0)},le))]},ye)})]})}const Vd="_outline_1lab2_1 _line_1ijj2_131",Ud="_dot_1lab2_5 _dot_1ijj2_139",Gd="_dotVisible_1lab2_9 _dotVisible_1ijj2_144",Wd="_valueLabel_1lab2_13 _valueLabel_1ijj2_123",Xd="_series_1lab2_17 _series_1ijj2_208",Zd="_seriesOff_1lab2_21 _seriesOff_1ijj2_212",_t={outline:Vd,dot:Ud,dotVisible:Gd,valueLabel:Wd,series:Xd,seriesOff:Zd};function Yd(e,t){return e[t]!==null&&!e[t-1]&&!e[t+1]}function Qd(e,t){const n=e.flatMap(a=>a===null?[]:[a.y1]),s=Math.min(t,...n),r=Math.max(t,...n);return r>s?(t-s)/(r-s):1}function Jd({accent:e,categories:t,curve:n="smooth",defaultHiddenSeries:s,emptyMessage:r="Sem dados no período",formatValue:a=$e,height:i=260,includeZero:u=!0,hiddenSeries:c,labelAngle:m="auto",legend:h="bottom",legendAlign:g,onHiddenSeriesChange:d,series:p,showDataLabels:f=!1,showDots:y=!1,stacked:_=!1,title:$,xAxis:v="visible",yAxis:b="visible",yAxisRight:D="hidden"}){const j=l.useId(),{font:R,height:E,ref:P,width:N}=Le(),{fillHeight:H,value:k}=Ce(i,E),{isHidden:S,toggle:z}=Ye({defaultHiddenSeries:s,hiddenSeries:c,onHiddenSeriesChange:d}),I=l.useMemo(()=>Ie(p,{accent:e}),[e,p]),L=Oe(p.map(X=>S(X.label)?0:1)),K=X=>L[X]??0,A=l.useMemo(()=>{const X=B=>S(p[B].label)?0:1;return _?We(t.flatMap((B,Q)=>nn(p.map((he,V)=>(he.values[Q]??0)*X(V))).flat())):xt(p.filter(B=>!S(B.label)).map(B=>We(B.values.filter(Q=>Q!==null),{includeZero:u})))},[t,u,S,p,_]),F=tt(A,k,a),{margins:G,plot:U,rotation:C}=Mt({bottomLabels:t,font:R,height:k,labelAngle:m,leftLabels:F,rightLabels:F,topRoom:f?Ht(R):0,width:N,xAxis:v,yAxis:b,yAxisRight:D}),x=l.useMemo(()=>no({domain:t,padding:0,range:[0,U.width]}),[t,U.width]),w=l.useMemo(()=>ve({domain:A,range:[U.height,0]}),[A,U.height]),[M,T]=Oe(w.domain()),Z=l.useMemo(()=>ve({domain:{min:M,max:T},nice:!1,range:[U.height,0]}),[T,M,U.height]),W=Xe(w,U.height),q=Z(Math.min(Math.max(0,M),T)),Y=t.map((X,B)=>nn(p.map((Q,he)=>(Q.values[B]??0)*K(he)))),oe=p.map((X,B)=>t.map((Q,he)=>{const V=X.values[he];if(V==null||!Number.isFinite(V))return null;const[O,J]=Y[he][B];return{x:x(Q)??0,y0:_?Z(O):q,y1:Z(_?J:V)}})),ee=t.map(X=>({label:X,position:x(X)??0})),ae=W.map(X=>({label:a(X),position:Z(X)}));return o.jsxs(Nt,{containerRef:P,empty:p.length===0||t.length===0,emptyMessage:r,grid:[{baseline:Z(0),lines:W.map(X=>Z(X)),orientation:"horizontal"}],fillHeight:H,height:k,legend:p.map((X,B)=>({color:I[B],hidden:S(X.label),label:X.label})),legendAlign:g,legendPosition:h,margins:G,onToggleSeries:z,plot:U,title:$,width:N,xAxis:{labelRotation:C,ticks:ee,visibility:v},yAxis:{hideLine:!0,ticks:ae,visibility:b},yAxisRight:{hideLine:!0,ticks:ae,visibility:D},children:[!_&&o.jsx("defs",{children:p.map((X,B)=>{const Q=Qd(oe[B],q);return o.jsxs("linearGradient",{id:`${j}-${B}`,x1:"0",x2:"0",y1:"0",y2:"1",children:[Q>0&&o.jsx("stop",{offset:Q*.05,stopColor:I[B],stopOpacity:.6}),o.jsx("stop",{offset:Q,stopColor:I[B],stopOpacity:.05}),Q<1&&o.jsx("stop",{offset:Q+(1-Q)*.95,stopColor:I[B],stopOpacity:.6})]},B)})}),p.map((X,B)=>{const Q=oe[B],he=Q.map(O=>O===null?null:{x:O.x,y:O.y1}),V=S(X.label);return o.jsxs("g",{"aria-hidden":V||void 0,className:`${_t.series} ${V?_t.seriesOff:""}`,children:[o.jsx("path",{d:Zu(Q,n),fill:_?I[B]:`url(#${j}-${B})`}),o.jsx("path",{className:_t.outline,d:Pn(he,n),fill:"none",stroke:I[B]}),t.map((O,J)=>{const ue=Q[J];if(ue===null)return null;const ie=`${X.label}, ${O}: ${a(X.values[J]??0)}`;return o.jsx("circle",{"aria-label":ie,className:y||Yd(Q,J)?_t.dotVisible:_t.dot,cx:ue.x,cy:ue.y1,fill:I[B],r:4,children:o.jsx("title",{children:ie})},J)}),f&&t.map((O,J)=>{const ue=Q[J];return ue===null?null:o.jsx("text",{className:_t.valueLabel,textAnchor:"middle",x:ue.x,y:ue.y1-10,children:a(X.values[J]??0)},J)})]},B)})]})}const ef="_bubble_okzta_1",tf="_guide_okzta_11",nf="_series_okzta_23 _series_1ijj2_208",sf="_seriesOff_okzta_27 _seriesOff_1ijj2_212",Ct={bubble:ef,guide:tf,series:nf,seriesOff:sf},of=5,af=[4,18];function $n(e){return e.z!==void 0&&Number.isFinite(e.z)?e.z:void 0}function rf({accent:e,defaultHiddenSeries:t,emptyMessage:n="Sem dados no período",formatX:s=$e,formatY:r=$e,formatZ:a=$e,height:i=280,includeZero:u=!0,hiddenSeries:c,legend:m="bottom",legendAlign:h,onHiddenSeriesChange:g,series:d,title:p,xAxis:f="visible",yAxis:y="visible",yAxisRight:_="hidden"}){const{font:$,height:v,ref:b,width:D}=Le(),{fillHeight:j,value:R}=Ce(i,v),{isHidden:E,toggle:P}=Ye({defaultHiddenSeries:t,hiddenSeries:c,onHiddenSeriesChange:g}),[N,H]=l.useState(null),k=l.useMemo(()=>Ie(d,{accent:e}),[e,d]),S=l.useMemo(()=>d.filter(V=>!E(V.label)),[E,d]),z=u===!0||u==="x",I=u===!0||u==="y",L=l.useMemo(()=>xt(S.map(V=>We(V.points.map(O=>O.x),{includeZero:z}))),[S,z]),K=l.useMemo(()=>xt(S.map(V=>We(V.points.map(O=>O.y),{includeZero:I}))),[S,I]),A=l.useMemo(()=>d.reduce((V,O)=>O.points.reduce((J,ue)=>Math.max(J,$n(ue)??0),V),0),[d]),F=tt(K,R,r),G=tt(L,D,s),{margins:U,plot:C,rotation:x}=Mt({bottomLabels:G,font:$,height:R,labelAngle:"auto",leftLabels:F,rightLabels:F,topRoom:0,width:D,xAxis:f,yAxis:y,yAxisRight:_}),w=l.useMemo(()=>ve({domain:L,range:[0,C.width]}),[L,C.width]),M=l.useMemo(()=>ve({domain:K,range:[C.height,0]}),[K,C.height]),[T,Z,W,q]=Oe([...w.domain(),...M.domain()]),Y=l.useMemo(()=>ve({domain:{min:T,max:Z},nice:!1,range:[0,C.width]}),[Z,T,C.width]),oe=l.useMemo(()=>ve({domain:{min:W,max:q},nice:!1,range:[C.height,0]}),[q,W,C.height]),ee=l.useMemo(()=>Pu(A,af),[A]),ae=Xe(w,C.width),X=Xe(M,C.height),B=ae.map(V=>({label:s(V),position:Y(V)})),Q=X.map(V=>({label:r(V),position:oe(V)}));function he(V,O){const J=O.label?`${V.label}, ${O.label}`:V.label,ue=`${s(O.x)} × ${r(O.y)}`,ie=$n(O);return ie===void 0?`${J}: ${ue}`:`${J}: ${ue} (${a(ie)})`}return o.jsxs(Nt,{containerRef:b,empty:d.every(V=>V.points.length===0),emptyMessage:n,grid:[{lines:X.map(V=>oe(V)),orientation:"horizontal"},{lines:ae.map(V=>Y(V)),orientation:"vertical"}],fillHeight:j,height:R,legend:d.map((V,O)=>({color:k[O],hidden:E(V.label),label:V.label})),legendAlign:h,legendPosition:m,margins:U,onToggleSeries:P,plot:C,title:p,width:D,xAxis:{hideLine:!0,labelRotation:x,ticks:B,visibility:f},yAxis:{hideLine:!0,ticks:Q,visibility:y},yAxisRight:{hideLine:!0,ticks:Q,visibility:_},children:[N&&o.jsxs("g",{"aria-hidden":"true",children:[o.jsx("line",{className:Ct.guide,x1:N.x,x2:N.x,y1:N.y,y2:C.height}),o.jsx("line",{className:Ct.guide,x1:0,x2:N.x,y1:N.y,y2:N.y})]}),d.map((V,O)=>o.jsx("g",{"aria-hidden":E(V.label)||void 0,className:`${Ct.series} ${E(V.label)?Ct.seriesOff:""}`,children:V.points.map((J,ue)=>{if(!Number.isFinite(J.x)||!Number.isFinite(J.y))return null;const ie=Y(J.x),Ne=oe(J.y),me=$n(J);return o.jsx("circle",{"aria-label":he(V,J),className:Ct.bubble,cx:ie,cy:Ne,fill:k[O],onMouseEnter:()=>H({x:ie,y:Ne}),onMouseLeave:()=>H(null),r:me===void 0?of:ee(me),children:o.jsx("title",{children:he(V,J)})},ue)})},O))]})}const lf="_slice_91nzn_3",cf="_sliceLabel_91nzn_13",_s={slice:lf,sliceLabel:cf};function uf({accent:e,defaultHiddenSlices:t,emptyMessage:n="Sem dados no período",formatPercent:s=v=>`${Math.round(v*100)}%`,formatValue:r=$e,height:a=260,hiddenSlices:i,legend:u="bottom",legendAlign:c,onHiddenSlicesChange:m,onHoverSlice:h,otherLabel:g="Outros",showDataLabels:d=!1,showLegendValues:p=!1,sliceRadius:f,slices:y,smallSliceThreshold:_=.02,title:$}){const{font:v,height:b,radius:D,ref:j,width:R}=Le(),{fillHeight:E,value:P}=Ce(a,b),N=ro({accent:e,defaultHiddenSlices:t,hiddenSlices:i,onHiddenSlicesChange:m,onHoverSlice:h,otherLabel:g,slices:y,smallSliceThreshold:_}),H=hn(R,P)/2,k=f??D;return o.jsxs(ct,{centerOrigin:!0,containerRef:j,empty:N.slices.length===0||y.every(S=>!(S.value>0)),emptyMessage:n,fillHeight:E,height:P,legend:N.slices.map((S,z)=>({color:N.colors[z],hidden:N.isHidden(S.label),label:S.label,value:p?s(N.ratioOf(z)):void 0})),legendAlign:c,legendPosition:u,onToggleSeries:N.toggle,swatch:"dot",title:$,width:R,children:[N.slices.map((S,z)=>o.jsx("path",{"aria-label":`${S.label}: ${r(Math.max(S.value,0))} (${s(N.ratioOf(z))})`,className:_s.slice,d:Tt({...N.angles[z],cornerRadius:k,innerRadius:0,outerRadius:H}),fill:N.colors[z],onMouseEnter:()=>N.focus(z),onMouseLeave:()=>N.focus(null)},z)),d&&N.slices.map((S,z)=>{const I=s(N.ratioOf(z)),[L,K]=Vu({...N.angles[z],innerRadius:0,outerRadius:H}),A=N.angles[z].endAngle-N.angles[z].startAngle,F=A>=Math.PI?H:2*(H/2)*Math.sin(A/2);return N.isHidden(S.label)||et(I,v)>F?null:o.jsx("text",{className:_s.sliceLabel,dominantBaseline:"middle",fill:wn(N.colors[z]),textAnchor:"middle",x:L,y:K,children:I},z)})]})}const df="_slice_o9cwf_3",ff="_center_o9cwf_13",mf="_centerValue_o9cwf_17",hf="_centerLabel_o9cwf_23",Zt={slice:df,center:ff,centerValue:mf,centerLabel:hf};function _f({accent:e,centerLabel:t="Total",defaultHiddenSlices:n,emptyMessage:s="Sem dados no período",formatPercent:r=D=>`${Math.round(D*100)}%`,formatValue:a=$e,height:i=260,hiddenSlices:u,legend:c="right",legendAlign:m,onHiddenSlicesChange:h,onHoverSlice:g,otherLabel:d="Outros",showCenter:p=!0,showLegendValues:f=!0,sliceRadius:y,slices:_,smallSliceThreshold:$=.02,thickness:v=.38,title:b}){const{font:D,height:j,radius:R,ref:E,width:P}=Le(),{fillHeight:N,value:H}=Ce(i,j),k=ro({accent:e,defaultHiddenSlices:n,hiddenSlices:u,onHiddenSlicesChange:h,onHoverSlice:g,otherLabel:d,slices:_,smallSliceThreshold:$}),z=hn(P,H)/2,I=z*(1-Math.min(Math.max(v,0),1)),L=y??R,K=k.focused===null?void 0:k.slices[k.focused],A=so(a(K?Math.max(K.value,0):k.total),K?K.label:t,D,I*2);return o.jsxs(ct,{centerOrigin:!0,containerRef:E,empty:k.slices.length===0||_.every(F=>!(F.value>0)),emptyMessage:s,fillHeight:N,height:H,legend:k.slices.map((F,G)=>({color:k.colors[G],hidden:k.isHidden(F.label),label:F.label,value:f?r(k.ratioOf(G)):void 0})),legendAlign:m,legendPosition:c,onToggleSeries:k.toggle,swatch:"dot",title:b,width:P,children:[k.slices.map((F,G)=>o.jsx("path",{"aria-label":`${F.label}: ${a(Math.max(F.value,0))} (${r(k.ratioOf(G))})`,className:Zt.slice,d:Tt({...k.angles[G],cornerRadius:L,innerRadius:I,outerRadius:z}),fill:k.colors[G],onMouseEnter:()=>k.focus(G),onMouseLeave:()=>k.focus(null)},G)),p&&o.jsxs("g",{className:Zt.center,children:[o.jsx("text",{className:Zt.centerValue,dy:A.size*.1,style:{fontFamily:A.family,fontSize:A.size},textAnchor:"middle",children:A.value}),o.jsx("text",{className:Zt.centerLabel,dy:A.lineHeight*.62,textAnchor:"middle",children:A.label})]})]})}const pf="_track_dk4sj_3",gf="_fill_dk4sj_7",bf="_center_dk4sj_15",yf="_centerValue_dk4sj_19",xf="_centerLabel_dk4sj_25",Lt={track:pf,fill:gf,center:bf,centerValue:yf,centerLabel:xf},ps=6,gs=8;function bs(e){return e*Math.PI/180}function vf({accent:e,centerLabel:t,defaultHiddenTracks:n,emptyMessage:s="Sem dados no período",endAngle:r=360,formatValue:a=$e,height:i=260,hiddenTracks:u,legend:c="bottom",legendAlign:m,onHiddenTracksChange:h,showCenter:g=!0,startAngle:d=0,thickness:p=16,trackRadius:f,title:y,tracks:_}){const{font:$,height:v,radius:b,ref:D,width:j}=Le(),{fillHeight:R,value:E}=Ce(i,v),{isHidden:P,toggle:N}=Ye({defaultHiddenSeries:n,hiddenSeries:u,onHiddenSeriesChange:h}),H=l.useMemo(()=>Ie(_,{accent:e}),[e,_]),k=q=>Number.isFinite(q.value),S=_.reduce((q,Y)=>k(Y)?Math.max(q,Y.value):q,0),z=_.map(q=>{const Y=q.max??S;return P(q.label)||!k(q)||!(Y>0)?0:Math.min(Math.max(q.value,0)/Y,1)}),I=Oe(z,{from:z.map(()=>0)}),L=bs(d),K=Math.min(bs(r)-L,Bn),A=hn(j,E)/2,F=_.find(q=>!P(q.label)),G=g&&F?a(F.value):void 0,U=G===void 0?gs:Math.max(gs,Math.min(Uu(G,$),A/2)),C=Math.min(1,Math.max(A-U,0)/(Math.max(_.length,1)*(p+ps))),x=Math.max(p*C,1),w=ps*C,M=q=>A-q*(x+w),T=Math.max(M(Math.max(_.length-1,0))-x,U),Z=f??b,W=F&&G!==void 0?so(G,t??F.label,$,T*2):void 0;return o.jsxs(ct,{centerOrigin:!0,containerRef:D,empty:_.length===0,emptyMessage:s,fillHeight:R,height:E,legend:_.map((q,Y)=>({color:H[Y],hidden:P(q.label),label:q.label,value:k(q)?a(q.value):void 0})),legendAlign:m,legendPosition:_.length>1?c:"none",onToggleSeries:N,swatch:"dot",title:y,width:j,children:[_.map((q,Y)=>{const oe=M(Y),ee=oe-x,ae=I[Y]??0,X=L+K*ae,B=k(q)?`${q.label}: ${a(q.value)}`:q.label;return o.jsxs("g",{children:[o.jsx("path",{"aria-label":B,className:Lt.track,d:Tt({cornerRadius:Z,endAngle:L+K,innerRadius:ee,outerRadius:oe,startAngle:L}),children:o.jsx("title",{children:B})}),ae>0&&o.jsx("path",{className:Lt.fill,d:Tt({cornerRadius:Z,endAngle:X,innerRadius:ee,outerRadius:oe,startAngle:L}),fill:H[Y]})]},Y)}),W&&o.jsxs("g",{className:Lt.center,children:[o.jsx("text",{className:Lt.centerValue,dy:W.size*.1,style:{fontFamily:W.family,fontSize:W.size},textAnchor:"middle",children:W.value}),o.jsx("text",{className:Lt.centerLabel,dy:W.lineHeight*.62,textAnchor:"middle",children:W.label})]})]})}const jf="_bar_1fyqf_1",$f="_connector_1fyqf_6",Mf="_valueLabel_1fyqf_12 _valueLabel_1ijj2_123",Mn={bar:jf,connector:$f,valueLabel:Mf};function Nf(e){let t=0;return e.map(n=>{if(!Number.isFinite(n.value))return null;const s=n.total?0:t,r=s+n.value;return t=r,{inicio:s,fim:r}})}function kf(e){return e.intent?e.intent:e.total?"neutral":e.value<0?"negative":"positive"}function Df(e,t){return e===0?t(0):`${e<0?"-":"+"}${t(Math.abs(e))}`}function wf({emptyMessage:e="Sem dados no período",formatValue:t=$e,height:n=280,labelAngle:s="auto",onHoverStep:r,showDataLabels:a=!0,steps:i,title:u,xAxis:c="visible",yAxis:m="visible",yAxisRight:h="hidden"}){const{font:g,height:d,radius:p,ref:f,width:y}=Le(),{fillHeight:_,value:$}=Ce(n,d),{hover:v,hovered:b}=Kn(r),D=l.useMemo(()=>Nf(i),[i]),j=l.useMemo(()=>Ie(i.map(C=>({color:C.color,intent:kf(C)}))),[i]),R=l.useMemo(()=>We(D.flatMap(C=>C?[C.inicio,C.fim]:[])),[D]),E=tt(R,$,t),{margins:P,plot:N,rotation:H}=Mt({bottomLabels:i.map(C=>C.label),font:g,height:$,labelAngle:s,leftLabels:E,rightLabels:E,topRoom:a?Ht(g):0,width:y,xAxis:c,yAxis:m,yAxisRight:h}),k=l.useMemo(()=>Fn({domain:i.map((C,x)=>String(x)),range:[0,N.width]}),[N.width,i]),S=C=>k(String(C))??0,z=l.useMemo(()=>ve({domain:R,range:[N.height,0]}),[R,N.height]),[I,L]=Oe(z.domain()),K=l.useMemo(()=>ve({domain:{min:I,max:L},nice:!1,range:[N.height,0]}),[L,I,N.height]),A=Xe(z,N.height),F=i.map((C,x)=>({label:C.label,position:S(x)+k.bandwidth()/2})),G=A.map(C=>({label:t(C),position:K(C)}));function U(C){return C.total?t(C.value):Df(C.value,t)}return o.jsxs(Nt,{containerRef:f,empty:i.length===0,emptyMessage:e,grid:[{baseline:K(0),lines:A.map(C=>K(C)),orientation:"horizontal"}],fillHeight:_,height:$,legendPosition:"none",margins:P,plot:N,title:u,width:y,xAxis:{labelRotation:H,ticks:F,visibility:c},yAxis:{hideLine:!0,ticks:G,visibility:m},yAxisRight:{hideLine:!0,ticks:G,visibility:h},children:[b!==null&&o.jsx(Tn,{offset:S(b),plot:N,size:k.bandwidth()}),o.jsx("g",{"aria-hidden":"true",children:D.slice(0,-1).map((C,x)=>{if(!C||!D[x+1])return null;const w=K(C.fim);return o.jsx("line",{className:Mn.connector,x1:S(x)+k.bandwidth(),x2:S(x+1),y1:w,y2:w},x)})}),i.map((C,x)=>{const w=D[x];if(!w)return null;const M=Math.min(K(w.inicio),K(w.fim)),T=Math.abs(K(w.fim)-K(w.inicio));return o.jsx("path",{"aria-label":`${C.label}: ${U(C)}`,className:Mn.bar,d:Hn(S(x),M,k.bandwidth(),T,[p,p,p,p]),fill:j[x],onMouseEnter:()=>v(x),onMouseLeave:()=>v(null)},x)}),a&&i.map((C,x)=>{const w=D[x];if(!w)return null;const M=Math.min(K(w.inicio),K(w.fim));return o.jsx("text",{className:Mn.valueLabel,textAnchor:"middle",x:S(x)+k.bandwidth()/2,y:M-6,children:U(C)},x)})]})}const Rf="_cell_5uvni_1",Cf="_tile_5uvni_5",Lf="_label_5uvni_14",If="_value_5uvni_21",Yt={cell:Rf,tile:Cf,label:Lf,value:If};function ys(e){return Number.isFinite(e.value)?Math.max(e.value??0,0):0}function Af({accent:e,defaultHiddenGroups:t,emptyMessage:n="Sem dados no período",formatValue:s=$e,gap:r=5,height:a=280,hiddenGroups:i,intentLabels:u,legend:c="bottom",legendAlign:m,nodes:h,onHiddenGroupsChange:g,showDataLabels:d=!0,title:p}){const{font:f,height:y,ref:_,width:$}=Le(),{fillHeight:v,value:b}=Ce(a,y),{isHidden:D,toggle:j}=Ye({defaultHiddenSeries:t,hiddenSeries:i,onHiddenSeriesChange:g}),R=l.useMemo(()=>Ie(h,{accent:e}),[e,h]),E=l.useMemo(()=>!((Ot.hierarchy({children:h,label:""}).sum(ys).value??0)>0),[h]),P=l.useMemo(()=>{const k=h.filter(I=>!D(I.label));if($===0||b===0||k.length===0)return[];const S=Ot.hierarchy({children:k,label:""}).sum(ys).sort((I,L)=>(L.value??0)-(I.value??0));return Ot.treemap().size([$,b]).paddingInner(r).round(!0)(S).leaves()},[b,r,D,h,$]);function N(k){var I;const S=k.data;if(S.color)return S.color;if(S.intent)return Jt[S.intent];const z=(I=k.ancestors().find(L=>L.depth===1))==null?void 0:I.data;return R[h.findIndex(L=>L.label===(z==null?void 0:z.label))]??Jt.neutral}const H=u?Object.entries(u).map(([k,S])=>({color:Jt[k],label:S})):h.map((k,S)=>({color:R[S],hidden:D(k.label),label:k.label}));return o.jsx(ct,{containerRef:_,empty:h.length===0||E,emptyMessage:n,fillHeight:v,height:b,legend:H,legendAlign:m,legendPosition:c,onToggleSeries:u?void 0:j,title:p,width:$,children:P.map(k=>{const S=k.x1-k.x0,z=k.y1-k.y0,I=S-_e*2,L=d&&I>0&&z>=f.lineHeight+_e,K=L&&z>=f.lineHeight*2+_e,A=`${k.data.label}: ${s(k.value??0)}`,F=N(k);return o.jsxs("g",{className:Yt.cell,children:[o.jsx("rect",{"aria-label":A,className:Yt.tile,fill:F,height:z,width:S,x:k.x0,y:k.y0,children:o.jsx("title",{children:A})}),L&&o.jsx("text",{className:Yt.label,fill:wn(F),x:k.x0+_e,y:k.y0+_e+f.lineHeight*.6,children:yt(k.data.label,f,I)}),K&&o.jsx("text",{className:Yt.value,fill:wn(F),x:k.x0+_e,y:k.y0+_e+f.lineHeight*1.6,children:yt(s(k.value??0),f,I)})]},`${k.data.label}-${k.x0}-${k.y0}`)})})}const Sf="_arc_fgn0g_1",Of="_arcDim_fgn0g_9",zf="_leader_fgn0g_13",Ef="_connector_fgn0g_17",Tf="_label_fgn0g_23",It={arc:Sf,arcDim:Of,leader:zf,connector:Ef,label:Tf},Ff=.18,Qt=14;function io(e,t=1,n=new Map){return e.forEach(s=>{var r;n.set(t,[...n.get(t)??[],s.label]),(r=s.children)!=null&&r.length&&io(s.children,t+1,n)}),n}function Bf(e,t){if(t<=1)return e;const n=Math.min((t-1)*22,66);return`color-mix(in oklab, ${e} ${100-n}%, var(--pl-color-surface))`}function Pf({accent:e,defaultHiddenGroups:t,emptyMessage:n="Sem dados no período",formatPercent:s=y=>`${Math.round(y*100)}%`,formatValue:r=$e,height:a=320,hiddenGroups:i,legend:u="bottom",legendAlign:c,nodes:m,onHiddenGroupsChange:h,ringGap:g=2,showLabels:d=!0,sliceRadius:p,title:f}){const{font:y,height:_,radius:$,ref:v,width:b}=Le(),{fillHeight:D,value:j}=Ce(a,_),{isHidden:R,toggle:E}=Ye({defaultHiddenSeries:t,hiddenSeries:i,onHiddenSeriesChange:h}),[P,N]=l.useState(null),H=l.useMemo(()=>Ie(m,{accent:e}),[e,m]),k=l.useMemo(()=>m.filter(M=>!R(M.label)),[R,m]),S=l.useMemo(()=>{const M=io(k),T=Math.max(0,...M.keys());return M.get(T)??[]},[k]),z=d?Math.min($t(S,y),b*kn):0,I=d?Qt*2+_e+z:0,K=hn(Math.max(b-I*2,0),j)/2,A=l.useMemo(()=>{if(K<=0)return[];const M=Ot.hierarchy({children:k,label:""}).sum(Z=>Math.max(Z.value??0,0)).sort((Z,W)=>(W.value??0)-(Z.value??0));return Ot.partition().size([Bn,K])(M).descendants().filter(Z=>Z.depth>0)},[K,k]),F=A.reduce((M,T)=>Math.max(M,T.depth),0),G=A.filter(M=>M.depth===1).reduce((M,T)=>M+(T.value??0),0),U=P&&A.includes(P)?P:null;function C(M){return U===null||U.ancestors().includes(M)}function x(M){var W;const T=(W=M.ancestors().find(q=>q.depth===1))==null?void 0:W.data,Z=(T==null?void 0:T.color)??H[m.findIndex(q=>q.label===(T==null?void 0:T.label))];return Bf(Z??"var(--pl-chart-neutral)",M.depth)}function w(M){const T=G>0?(M.value??0)/G:0;return`${M.data.label}: ${r(M.value??0)} (${s(T)})`}return o.jsxs(ct,{centerOrigin:!0,containerRef:v,empty:m.length===0,emptyMessage:n,fillHeight:D,height:j,legend:m.map((M,T)=>({color:H[T],hidden:R(M.label),label:M.label})),legendAlign:c,legendPosition:u,onToggleSeries:E,swatch:"dot",title:f,width:b,children:[A.map((M,T)=>o.jsx("path",{"aria-label":w(M),className:`${It.arc} ${C(M)?"":It.arcDim}`,d:Tt({cornerRadius:p??$,endAngle:M.x1,innerRadius:M.y0+(M.depth>1?g:0),outerRadius:M.y1,startAngle:M.x0}),fill:x(M),onMouseEnter:()=>N(M),onMouseLeave:()=>N(null),children:o.jsx("title",{children:w(M)})},T)),d&&A.filter(M=>M.depth===F&&M.x1-M.x0>=Ff).map((M,T)=>{const Z={endAngle:M.x1,startAngle:M.x0},[W,q]=fs(Z,M.y1),[Y,oe]=fs(Z,M.y1+Qt),ee=Y>=0,ae=Y+(ee?Qt:-Qt);return o.jsxs("g",{className:It.leader,children:[o.jsx("polyline",{className:It.connector,points:`${W},${q} ${Y},${oe} ${ae},${oe}`}),o.jsx("text",{className:It.label,dominantBaseline:"middle",textAnchor:ee?"start":"end",x:ae+(ee?_e:-_e),y:oe,children:yt(M.data.label,y,z)})]},T)})]})}const Hf="_links_1wqmi_1",Kf="_link_1wqmi_1",qf="_linkOn_1wqmi_18",Vf="_linkDim_1wqmi_22",Uf="_node_1wqmi_26",Gf="_label_1wqmi_30",Wf="_flowValue_1wqmi_37",Xf="_sobreFluxo_1wqmi_47",Be={links:Hf,link:Kf,linkOn:qf,linkDim:Vf,node:Uf,label:Gf,flowValue:Wf,sobreFluxo:Xf};function Zf(e,t){return e.x0<t.x1&&t.x0<e.x1&&e.y0<t.y1&&t.y0<e.y1}const Yf={center:At.sankeyCenter,justify:At.sankeyJustify,left:At.sankeyLeft,right:At.sankeyRight};function Qf(e){const t=e.source.x1,n=e.target.x0,s=(t+n)/2;return`M${t},${e.y0}C${s},${e.y0} ${s},${e.y1} ${n},${e.y1}`}function Jf(e){const t=new Map;for(const a of e)t.set(a.source,[...t.get(a.source)??[],a.target]);const n=new Set,s=new Set;function r(a){if(s.has(a))return!0;if(n.has(a))return!1;s.add(a);const i=(t.get(a)??[]).some(r);return s.delete(a),n.add(a),i}return[...t.keys()].some(r)}function em({accent:e,cyclicMessage:t="O fluxo volta sobre si mesmo e não pode ser desenhado",emptyMessage:n="Sem dados no período",flowColor:s="source",flowValuePosition:r="end",flows:a,formatValue:i=$e,height:u=320,nodeAlign:c="justify",nodes:m,nodePadding:h=12,nodeWidth:g=12,showFlowValues:d=!1,showLabels:p=!0,title:f}){const{font:y,height:_,ref:$,width:v}=Le(),{fillHeight:b,value:D}=Ce(u,_),[j,R]=l.useState(null),E=l.useMemo(()=>{const x=(m??[]).map(w=>w.label);return a.forEach(({source:w,target:M})=>{[w,M].forEach(T=>{x.includes(T)||x.push(T)})}),x.map(w=>(m==null?void 0:m.find(M=>M.label===w))??{label:w})},[a,m]),P=l.useMemo(()=>Ie(E,{accent:e}),[e,E]),N=l.useMemo(()=>{const x=new Set(a.map(w=>w.source));return E.map(w=>w.label).filter(w=>!x.has(w))},[E,a]),H=p?Math.min($t(N,y),v*kn)+_e:0,k=l.useMemo(()=>Jf(a),[a]),S=l.useMemo(()=>a.reduce((x,w)=>x+(Number.isFinite(w.value)?Math.max(w.value,0):0),0),[a]),z=l.useMemo(()=>{const x=v-H;return x<=0||D<=0||a.length===0||k||S<=0?{links:[],nodes:[]}:At.sankey().nodeId(T=>T.label).nodeAlign(Yf[c]).nodeWidth(g).nodePadding(h).extent([[0,2],[x,D-2]])({links:a.map(T=>({...T,value:Number.isFinite(T.value)?Math.max(T.value,0):0})),nodes:E.map(T=>({label:T.label}))})},[D,H,k,E,a,c,h,g,S,v]),I=x=>P[x]??"var(--pl-chart-neutral)";function L(x){return s==="neutral"?"var(--pl-chart-neutral)":I(s==="target"?x.target.index:x.source.index)}function K(x){return`${x.source.label} → ${x.target.label}: ${i(x.value)}`}function A(x){return j===null?Be.link:`${Be.link} ${j===x?Be.linkOn:Be.linkDim}`}const F=(()=>{const x=[...new Set(z.nodes.map(M=>M.x0))].sort((M,T)=>M-T);if(x.length<2)return v*kn;const w=Math.min(...x.slice(1).map((M,T)=>M-x[T]));return Math.max(w-g-_e,0)})();function G(x){const w=N.includes(x.label),M=yt(x.label,y,(w?H:F)-_e),T=x.x1+_e,Z=(x.y0+x.y1)/2;return{caixa:{x0:T,x1:T+et(M,y),y0:Z-y.lineHeight/2,y1:Z+y.lineHeight/2},texto:M,x:T,y:Z}}const U=p?z.nodes.map(G):[];function C(x){const w=i(x.value),M=et(w,y),T=x.source.x1,Z=x.target.x0,W=(x.y0+x.y1)/2,q={end:{anchor:"end",x:Z-_e},middle:{anchor:"middle",x:(T+Z)/2},start:{anchor:"start",x:T+_e}},{anchor:Y,x:oe}=q[r],ee={end:M,middle:M/2,start:0}[r],ae={x0:oe-ee,x1:oe-ee+M,y0:W-y.lineHeight/2,y1:W+y.lineHeight/2};if(!U.some(X=>Zf(ae,X.caixa)))return{anchor:Y,texto:w,x:oe,y:W}}return o.jsxs(ct,{containerRef:$,empty:a.length===0||k||S<=0,emptyMessage:k?t:n,fillHeight:b,height:D,legendPosition:"none",title:f,width:v,children:[o.jsx("g",{className:Be.links,children:z.links.map((x,w)=>o.jsx("path",{"aria-label":K(x),className:A(w),d:Qf(x),onMouseEnter:()=>R(w),onMouseLeave:()=>R(null),stroke:L(x),strokeWidth:Math.max(x.width,1),children:o.jsx("title",{children:K(x)})},w))}),z.nodes.map(x=>o.jsx("rect",{"aria-label":x.label,className:Be.node,fill:I(x.index),height:Math.max(x.y1-x.y0,1),width:x.x1-x.x0,x:x.x0,y:x.y0,children:o.jsx("title",{children:x.label})},x.label)),d&&z.links.map((x,w)=>{const M=C(x);return M?o.jsx("text",{className:`${Be.flowValue} ${Be.sobreFluxo}`,dominantBaseline:"middle",textAnchor:M.anchor,x:M.x,y:M.y,children:M.texto},w):null}),U.map((x,w)=>o.jsx("text",{className:`${Be.label} ${N.includes(z.nodes[w].label)?"":Be.sobreFluxo}`,dominantBaseline:"middle",textAnchor:"start",x:x.x,y:x.y,children:x.texto},`rotulo-${z.nodes[w].label}`))]})}exports.Accordion=Vr;exports.Alert=Ua;exports.Avatar=ul;exports.Badge=Vs;exports.Breadcrumb=Dr;exports.Button=lt;exports.Card=dn;exports.ChartArea=Jd;exports.ChartBar=ud;exports.ChartCombo=qd;exports.ChartDonut=_f;exports.ChartLine=bd;exports.ChartPie=uf;exports.ChartRadial=vf;exports.ChartSankey=em;exports.ChartScatter=rf;exports.ChartSunburst=Pf;exports.ChartTooltip=Sd;exports.ChartTreemap=Af;exports.ChartWaterfall=wf;exports.Checkbox=Bs;exports.ComboBox=Ei;exports.DatePicker=Ic;exports.DateTimePicker=nu;exports.Dialog=sl;exports.Field=Ze;exports.IconArrowDown=lo;exports.IconArrowUp=xs;exports.IconCalendar=Ln;exports.IconChevronDown=vs;exports.IconChevronExpand=js;exports.IconChevronLeft=In;exports.IconChevronRight=rn;exports.IconChevronUp=co;exports.IconClock=$s;exports.IconClose=Ms;exports.IconMinusCircle=Ns;exports.IconPlusCircle=ks;exports.IconQuestionCircle=Ds;exports.InputCurrency=aa;exports.InputNumber=Yo;exports.InputPassword=oa;exports.InputText=An;exports.Label=Rs;exports.List=Pt;exports.Menu=Bi;exports.Pagination=Sr;exports.Popover=sr;exports.Progress=er;exports.Radio=Ca;exports.RadioGroup=Ra;exports.Select=_i;exports.Spinner=ws;exports.Switch=Ta;exports.Table=jt;exports.Tabs=vr;exports.Textarea=ua;exports.TimePicker=qc;exports.Tooltip=Us;exports.formatarData=Ko;exports.formatarHora=qo;exports.formatarMoeda=Vo;exports.formatarNumero=$e;exports.formatarPercentual=zs;exports.paletteWithAccent=ao;exports.resolveSeriesColors=Ie;exports.seriesColors=on;
2
3
  //# sourceMappingURL=plenus-design-system.cjs.map