@plenustech/design-system 0.1.1 → 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.
- package/README.md +19 -3
- package/dist/design-system.css +1 -1
- package/dist/plenus-design-system.cjs +2 -1
- package/dist/plenus-design-system.cjs.map +1 -1
- package/dist/plenus-design-system.es.js +4064 -3530
- package/dist/plenus-design-system.es.js.map +1 -1
- package/dist/reset.css +9 -8
- package/dist/types/components/charts/ChartArea/ChartArea.d.ts +1 -1
- package/dist/types/components/charts/ChartBar/ChartBar.d.ts +1 -0
- package/dist/types/components/charts/ChartLine/ChartLine.d.ts +1 -1
- package/dist/types/components/charts/ChartRadial/ChartRadial.d.ts +1 -0
- package/dist/types/components/charts/ChartScatter/ChartScatter.d.ts +4 -4
- package/dist/types/components/charts/core/centerText.d.ts +4 -3
- package/dist/types/components/charts/core/index.d.ts +1 -1
- package/dist/types/components/charts/core/measureText.d.ts +8 -0
- package/dist/types/components/charts/core/slices.d.ts +0 -8
- package/dist/types/components/charts/palette/index.d.ts +1 -1
- package/dist/types/components/charts/palette/seriesColor.d.ts +5 -0
- package/dist/types/components/charts/scales/index.d.ts +2 -2
- package/dist/types/components/charts/scales/scales.d.ts +8 -12
- package/dist/types/components/data-display/Card/Card.d.ts +1 -1
- package/dist/types/components/data-display/List/useListing.d.ts +1 -0
- package/dist/types/components/data-display/Table/Table.d.ts +6 -3
- package/dist/types/components/feedback/Progress/Progress.d.ts +2 -2
- package/dist/types/components/forms/Checkbox/Checkbox.d.ts +4 -3
- package/dist/types/components/forms/ComboBox/ComboBox.d.ts +17 -8
- package/dist/types/components/forms/ComboBox/index.d.ts +1 -1
- package/dist/types/components/forms/DatePicker/DatePicker.d.ts +15 -9
- package/dist/types/components/forms/DatePicker/iso.d.ts +7 -0
- package/dist/types/components/forms/DateTimePicker/DateTimePicker.d.ts +16 -12
- package/dist/types/components/forms/Field/FormValue.d.ts +13 -0
- package/dist/types/components/forms/InputNumber/InputNumber.d.ts +1 -1
- package/dist/types/components/forms/RadioGroup/RadioGroup.d.ts +2 -1
- package/dist/types/components/forms/Select/Select.d.ts +4 -4
- package/dist/types/components/forms/Switch/Switch.d.ts +1 -1
- package/dist/types/components/forms/TimePicker/TimePicker.d.ts +14 -8
- package/dist/types/components/forms/TimePicker/TimeSlots.d.ts +4 -9
- package/dist/types/components/icons/icons.d.ts +2 -0
- package/dist/types/components/icons/index.d.ts +1 -1
- package/dist/types/components/navigation/Pagination/Pagination.d.ts +7 -1
- package/dist/types/components/overlays/Dialog/Dialog.d.ts +6 -2
- package/dist/types/components/overlays/Dialog/index.d.ts +1 -1
- package/dist/types/components/overlays/Menu/Menu.d.ts +7 -1
- package/dist/types/components/overlays/Popover/Popover.d.ts +3 -4
- package/dist/types/hooks/useDecimalInput.d.ts +19 -0
- package/dist/types/hooks/useMergedRefs.d.ts +6 -0
- package/dist/types/hooks/useSelection/useSelection.d.ts +1 -0
- package/dist/types/index.d.ts +3 -3
- package/dist/types/utils/formatters/formatarEntradaDecimal.d.ts +5 -0
- package/dist/types/utils/formatters/formatarEntradaHora.d.ts +7 -0
- package/dist/types/utils/formatters/index.d.ts +2 -1
- package/dist/types/utils/formatters/mascararPartes.d.ts +5 -0
- package/package.json +3 -2
- package/dist/types/utils/mergeRefs.d.ts +0 -7
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("react"),Ut=require("d3-scale"),fn=require("d3-array"),it=require("d3-shape"),jt=require("d3-sankey"),Ht=require("d3-hierarchy"),Oe=require("react-dom"),xe=require("@react-aria/overlays"),Z=require("@internationalized/date"),bn=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 Ts(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 es(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 yn(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 ts(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 xn(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 Gt(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 Fs(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 ns(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 ss(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 os(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 as(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"})]})}const Bs="_spinner_nob8y_1",Ps="_sm_nob8y_10",Ks="_md_nob8y_15",zs="_lg_nob8y_21",An={spinner:Bs,"pl-spin":"_pl-spin_nob8y_1",sm:Ps,md:Ks,lg:zs};function rs({className:e,label:t,size:n="md",...s}){const r=[An.spinner,An[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 Hs="_button_orr35_1",qs="_primary_orr35_37",Vs="_secondary_orr35_47",Us="_soft_orr35_59",Gs="_ghost_orr35_70",Ws="_danger_orr35_81",Xs="_sm_orr35_91",Ys="_md_orr35_96",Qs="_lg_orr35_100",sn={button:Hs,primary:qs,secondary:Vs,soft:Us,ghost:Gs,danger:Ws,sm:Xs,md:Ys,lg:Qs},Ze=i.forwardRef(({children:e,className:t,disabled:n=!1,loading:s=!1,onClick:r,size:a="md",type:l="button",variant:c="primary",...u},d)=>{const m=[sn.button,sn[c],sn[a],t].filter(Boolean).join(" ");function g(h){if(s){h.preventDefault();return}r==null||r(h)}return o.jsxs("button",{...u,ref:d,className:m,disabled:n,"aria-disabled":s||void 0,"aria-busy":s||void 0,onClick:g,type:l,children:[s&&o.jsx(rs,{size:a==="lg"?"md":"sm"}),e]})}),Zs="_label_1uf9d_1",Js="_required_1uf9d_12",In={label:Zs,required:Js};function ls({children:e,className:t,required:n=!1,...s}){const r=[In.label,t].filter(Boolean).join(" ");return o.jsxs("label",{...s,className:r,children:[e,n&&o.jsx("span",{className:In.required,"aria-hidden":"true",children:"*"})]})}const eo="_field_n7q1m_1",to="_hint_n7q1m_8",no="_errorMessage_n7q1m_9",so="_characterCount_n7q1m_10",Ct={field:eo,hint:to,errorMessage:no,characterCount:so};function ze({"aria-describedby":e,className:t,characterCount:n=0,children:s,error:r,hint:a,id:l,label:c,maxLength:u,required:d=!1,showCharacterCount:m=!1,...g}){const h=i.useId(),p=l??`field-${h}`,_=`${p}-message`,f=`${p}-character-count`,x=[e,r||a?_:void 0,m?f:void 0].filter(Boolean).join(" ")||void 0;return o.jsxs("div",{...g,className:[Ct.field,t].filter(Boolean).join(" "),children:[c&&o.jsx(ls,{htmlFor:p,required:d,children:c}),s({id:p,describedBy:x,invalid:!!r}),(r||a)&&o.jsx("span",{className:r?Ct.errorMessage:Ct.hint,id:_,children:r||a}),m&&o.jsx("span",{className:Ct.characterCount,id:f,children:u?`${n}/${u}`:n})]})}function Lt(e){return String(e??"").length}function is(e,t){const n=i.useRef(null),[s,r]=i.useState(()=>Lt(t));return i.useEffect(()=>{var c;const a=(c=n.current)==null?void 0:c.form;if(!a)return;function l(){r(Lt(t))}return a.addEventListener("reset",l),()=>a.removeEventListener("reset",l)},[t]),{ref:n,count:e===void 0?s:Lt(e),updateCount(a){e===void 0&&r(Lt(a))}}}function Ue(...e){return t=>{for(const n of e)typeof n=="function"?n(t):n&&(n.current=t)}}const oo="_input_1rs88_1",ao="_error_1rs88_20",ro="_sm_1rs88_38",lo="_md_1rs88_44",on={input:oo,error:ao,sm:ro,md:lo};function vn({"aria-describedby":e,"aria-invalid":t,className:n,error:s,hint:r,id:a,label:l,maxLength:c,required:u=!1,size:d="md",showCharacterCount:m=!1,defaultValue:g,onChange:h,value:p,ref:_,...f}){const{ref:x,count:M,updateCount:y}=is(p,g),b=[on.input,on[d],s&&on.error,n].filter(Boolean).join(" ");function D($){y($.target.value),h==null||h($)}return o.jsx(ze,{"aria-describedby":e,characterCount:M,error:s,hint:r,id:a,label:l,maxLength:c,required:u,showCharacterCount:m,children:({id:$,describedBy:k,invalid:C})=>o.jsx("input",{...f,defaultValue:g,id:$,ref:Ue(x,_),"aria-describedby":k,"aria-invalid":C||t,className:b,maxLength:c,onChange:D,required:u,value:p})})}function cs(e){const t=i.useRef(null),n=i.useRef(e);return n.current=e,i.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}const lt=",",io=3;function co(e){if(e.includes(lt))return e.replace(/\./g,"");const t=e.split(".");return t.length!==2||t[1].replace(/\D/g,"").length===io?e.replace(/\./g,""):t.join(lt)}function uo(e,t){return Number.isFinite(e)?new Intl.NumberFormat("en-US",{maximumFractionDigits:Math.max(t,0),useGrouping:!1}).format(e).replace(".",lt):""}function Be(e,t=0){const n=typeof e=="number"?uo(e,t):co(e),s=n.trimStart().startsWith("-")?"-":"",r=n.replace(/[^\d,]/g,""),[a="",...l]=r.split(lt),c=a.replace(/\D/g,"");if(t<=0)return`${s}${c}`;if(!r.includes(lt))return`${s}${c}`;const u=l.join("").replace(/\D/g,"").slice(0,t);return`${s}${c}${lt}${u}`}function fo(e,t="BRL",n=2){const s=Be(e,n),r=s.startsWith("-")?"-":"",[a="",l=""]=s.replace("-","").split(","),u=(a||"0").replace(/\B(?=(\d{3})+(?!\d))/g,"."),d=t==="BRL"?"R$":t;return n<=0?`${r}${d} ${u}`:`${r}${d} ${u},${l.padEnd(n,"0")}`}const mo={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 us(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 _o(e,{localidade:t="pt-BR",formato:n="numerico"}={}){const s=us(e);return Number.isNaN(s.getTime())?"":new Intl.DateTimeFormat(t,mo[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}`):us(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 jn(e){return e===void 0?{}:{maximumFractionDigits:e,minimumFractionDigits:e}}function ds(e){return e?{compactDisplay:"short",notation:"compact"}:{}}function je(e,{casasDecimais:t,compacto:n,localidade:s="pt-BR"}={}){return Number.isFinite(e)?new Intl.NumberFormat(s,{...ds(n),...jn(t)}).format(e):""}function go(e,{casasDecimais:t,compacto:n,localidade:s="pt-BR",moeda:r="BRL"}={}){return Number.isFinite(e)?new Intl.NumberFormat(s,{currency:r,style:"currency",...ds(n),...jn(t)}).format(e):""}function fs(e,{casasDecimais:t=0,localidade:n="pt-BR"}={}){return Number.isFinite(e)?new Intl.NumberFormat(n,{style:"percent",...jn(t)}).format(e):""}const bo=/^\s*(\d{1,4})[/\-.](\d{1,2})[/\-.](\d{1,4})\s*$/;function yo(e){const t=e.match(bo);if(!t)return;const[,n,s,r]=t,[a,l,c]=n.length===4?[r,s,n]:[n,s,r];if(c.length===4)return a.padStart(2,"0")+l.padStart(2,"0")+c}function mn(e){const t=(yo(e)??e.replace(/\D/g,"")).slice(0,8);return t.length<=2?t:t.length<=4?t.slice(0,2)+"/"+t.slice(2):t.slice(0,2)+"/"+t.slice(2,4)+"/"+t.slice(4)}function ms(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 Z.CalendarDate(r,s,n);return a.day===n&&a.month===s?a:void 0}function xo({decimalScale:e=0,defaultValue:t="",onKeyDown:n,onValueChange:s,value:r,...a}){const[l,c]=i.useState(()=>Be(t,e)),u=cs(()=>c(Be(t,e))),d=r===void 0?l:Be(r,e);function m(h){const p=Be(h.target.value,e);c(p),s==null||s(p)}function g(h){e===0&&(h.key===","||h.key===".")&&h.preventDefault(),n==null||n(h)}return o.jsx(vn,{...a,ref:Ue(u,a.ref),inputMode:e>0?"decimal":"numeric",onChange:m,onKeyDown:g,pattern:e>0?void 0:"-?[0-9]*",type:"text",value:d})}const vo="_control_jfj5j_1",jo="_input_jfj5j_7",$o="_error_jfj5j_26",Mo="_sm_jfj5j_44",No="_md_jfj5j_51",wo="_toggle_jfj5j_67",_t={control:vo,input:jo,error:$o,sm:Mo,md:No,toggle:wo};function Do({"aria-describedby":e,"aria-invalid":t,allowCopy:n=!1,className:s,defaultValue:r,disabled:a=!1,error:l,hint:c,id:u,label:d,maxLength:m,onChange:g,onCopy:h,onCut:p,onBlur:_,onValidationChange:f,required:x=!1,showToggle:M=!0,size:y="md",validate:b,validateOnBlur:D=!0,value:$,ref:k,...C}){const[H,S]=i.useState(!1),[z,w]=i.useState(!1),[A,R]=i.useState(),E=i.useRef(null),F=l??A,T=[_t.input,_t[y],F&&_t.error,s].filter(Boolean).join(" ");i.useEffect(()=>{var v;const N=(v=E.current)==null?void 0:v.form;if(!N)return;function I(){S(!1)}return N.addEventListener("submit",I),()=>N.removeEventListener("submit",I)},[]);function O(N){const I=b==null?void 0:b(N);R(I),f==null||f(I)}function K(N){b&&(z||!D)&&O(N.target.value),g==null||g(N)}function L(N){w(!0),b&&D&&O(N.target.value),_==null||_(N)}function P(N){h==null||h(N),n||N.preventDefault()}function j(N){p==null||p(N),n||N.preventDefault()}return o.jsx(ze,{"aria-describedby":e,error:F,hint:c,id:u,label:d,maxLength:m,required:x,children:({id:N,describedBy:I,invalid:v})=>o.jsxs("div",{className:_t.control,children:[o.jsx("input",{...C,autoComplete:C.autoComplete??"current-password",className:T,defaultValue:r,disabled:a,id:N,ref:Ue(E,k),"aria-describedby":I,"aria-invalid":v||t,maxLength:m,onChange:K,onCopy:P,onCut:j,onBlur:L,required:x,type:H?"text":"password",value:$}),M&&o.jsx("button",{className:_t.toggle,type:"button","aria-label":H?"Ocultar senha":"Mostrar senha","aria-pressed":H,disabled:a,onClick:()=>S(B=>!B),children:H?"Ocultar":"Mostrar"})]})})}function ko({currency:e="BRL",defaultValue:t="",decimalScale:n=2,onBlur:s,onFocus:r,onValueChange:a,value:l,...c}){const[u,d]=i.useState(()=>Be(t,n)),[m,g]=i.useState(!1),h=cs(()=>d(Be(t,n))),p=l===void 0?u:Be(l,n),_=m||!p?p:fo(p,e,n);function f(y){const b=Be(y.target.value,n);d(b),a==null||a(b)}function x(y){g(!0),r==null||r(y)}function M(y){g(!1),s==null||s(y)}return o.jsx(vn,{...c,ref:Ue(h,c.ref),inputMode:"decimal",onBlur:M,onChange:f,onFocus:x,type:"text",value:_})}const Ro="_textarea_1kzgu_1",Co="_error_1kzgu_20",Lo="_sm_1kzgu_39",Ao="_md_1kzgu_45",an={textarea:Ro,error:Co,sm:Lo,md:Ao};function Io({"aria-describedby":e,"aria-invalid":t,className:n,error:s,hint:r,id:a,label:l,maxLength:c,required:u=!1,rows:d=4,size:m="md",showCharacterCount:g=!1,defaultValue:h,onChange:p,value:_,ref:f,...x}){const{ref:M,count:y,updateCount:b}=is(_,h),D=[an.textarea,an[m],s&&an.error,n].filter(Boolean).join(" ");function $(k){b(k.target.value),p==null||p(k)}return o.jsx(ze,{"aria-describedby":e,characterCount:y,error:s,hint:r,id:a,label:l,maxLength:c,required:u,showCharacterCount:g,children:({id:k,describedBy:C,invalid:H})=>o.jsx("textarea",{...x,defaultValue:h,id:k,ref:Ue(M,f),"aria-describedby":C,"aria-invalid":H||t,className:D,maxLength:c,onChange:$,required:u,rows:d,value:_})})}const Oo="_field_1m5ai_1",So="_control_1m5ai_8",Eo="_input_1m5ai_15",To="_error_1m5ai_36",Fo="_text_1m5ai_74",Bo="_hint_1m5ai_81",Po="_errorMessage_1m5ai_82",Ge={field:Oo,control:So,input:Eo,error:To,text:Fo,hint:Bo,errorMessage:Po};function hs({"aria-describedby":e,className:t,error:n,hint:s,id:r,indeterminate:a=!1,label:l,ref:c,...u}){const d=i.useId(),m=r??`checkbox-${d}`,g=`${m}-message`,h=[e,n||s?g:void 0].filter(Boolean).join(" ")||void 0,p=[Ge.input,n&&Ge.error,t].filter(Boolean).join(" "),_=i.useCallback(f=>{f&&(f.indeterminate=a)},[a]);return o.jsxs("div",{className:Ge.field,children:[o.jsxs("label",{className:Ge.control,htmlFor:m,children:[o.jsx("input",{...u,ref:Ue(_,c),className:p,id:m,"aria-describedby":h,"aria-invalid":n?!0:void 0,type:"checkbox"}),o.jsx("span",{className:Ge.text,children:l})]}),(n||s)&&o.jsx("span",{className:n?Ge.errorMessage:Ge.hint,id:g,children:n||s})]})}const Ko="_group_x2ar9_1",zo="_legend_x2ar9_11",Ho="_required_x2ar9_20",qo="_options_x2ar9_25",Vo="_control_x2ar9_31",Uo="_input_x2ar9_38",Go="_error_x2ar9_59",Wo="_text_x2ar9_89",Xo="_hint_x2ar9_96",Yo="_errorMessage_x2ar9_97",Ae={group:Ko,legend:zo,required:Ho,options:qo,control:Vo,input:Uo,error:Go,text:Wo,hint:Xo,errorMessage:Yo},_s=i.createContext(null);function Qo(){const e=i.useContext(_s);if(!e)throw new Error("Radio precisa ser renderizado dentro de RadioGroup.");return e}function Zo({children:e,className:t,defaultValue:n,disabled:s=!1,error:r,hint:a,label:l,name:c,onValueChange:u,required:d=!1,value:m,...g}){const h=i.useId(),p=c??`radio-group-${h}`,_=`${p}-message`,f=r||a?_:void 0;return o.jsx(_s.Provider,{value:{defaultValue:n,disabled:s,invalid:!!r,name:p,onValueChange:u,value:m},children:o.jsxs("fieldset",{...g,className:[Ae.group,t].filter(Boolean).join(" "),role:"radiogroup","aria-describedby":f,"aria-required":d||void 0,children:[o.jsxs("legend",{className:Ae.legend,children:[l,d&&o.jsx("span",{className:Ae.required,"aria-hidden":"true",children:"*"})]}),o.jsx("div",{className:Ae.options,children:e}),(r||a)&&o.jsx("span",{className:r?Ae.errorMessage:Ae.hint,id:_,children:r||a})]})})}function Jo({className:e,disabled:t,id:n,label:s,onChange:r,ref:a,value:l,...c}){const u=Qo(),d=i.useId(),m=n??`radio-${d}`,g=u.value!==void 0,h=[Ae.input,u.invalid&&Ae.error,e].filter(Boolean).join(" ");return o.jsxs("label",{className:Ae.control,htmlFor:m,children:[o.jsx("input",{...c,className:h,id:m,checked:g?u.value===l:void 0,defaultChecked:g?void 0:u.defaultValue===l,disabled:t??u.disabled,name:u.name,onChange:p=>{var _;(_=u.onValueChange)==null||_.call(u,l),r==null||r(p)},ref:a,type:"radio",value:l}),o.jsx("span",{className:Ae.text,children:s})]})}const ea="_field_qjpma_1",ta="_control_qjpma_8",na="_input_qjpma_15",sa="_error_qjpma_56",oa="_text_qjpma_79",aa="_hint_qjpma_86",ra="_errorMessage_qjpma_87",We={field:ea,control:ta,input:na,error:sa,text:oa,hint:aa,errorMessage:ra};function la({"aria-describedby":e,className:t,error:n,hint:s,id:r,label:a,ref:l,...c}){const u=i.useId(),d=r??`switch-${u}`,m=`${d}-message`,g=[e,n||s?m:void 0].filter(Boolean).join(" ")||void 0,h=[We.input,n&&We.error,t].filter(Boolean).join(" ");return o.jsxs("div",{className:We.field,children:[o.jsxs("label",{className:We.control,htmlFor:d,children:[o.jsx("input",{...c,ref:l,className:h,id:d,"aria-describedby":g,"aria-invalid":n?!0:void 0,role:"switch",type:"checkbox"}),o.jsx("span",{className:We.text,children:a})]}),(n||s)&&o.jsx("span",{className:n?We.errorMessage:We.hint,id:m,children:n||s})]})}const ia="_alert_1iezv_1",ca="_title_1iezv_16",ua="_body_1iezv_20",da="_info_1iezv_24",fa="_success_1iezv_30",ma="_warning_1iezv_36",ha="_danger_1iezv_42",At={alert:ia,title:ca,body:ua,info:da,success:fa,warning:ma,danger:ha};function _a({children:e,className:t,title:n,tone:s="info",...r}){const a=[At.alert,At[s],t].filter(Boolean).join(" "),l=s==="danger"||s==="warning";return o.jsxs("div",{role:l?"alert":"status",...r,className:a,children:[n&&o.jsx("strong",{className:At.title,children:n}),e&&o.jsx("div",{className:At.body,children:e})]})}const pa="_progress_1cfl0_1",ga="_track_1cfl0_8",ba="_fill_1cfl0_15",ya="_indeterminate_1cfl0_22",xa="_value_1cfl0_30",va="_sm_1cfl0_40",ja="_md_1cfl0_44",nt={progress:pa,track:ga,fill:ba,indeterminate:ya,"pl-indeterminate":"_pl-indeterminate_1cfl0_1",value:xa,sm:va,md:ja};function $a({className:e,label:t,max:n=100,showValue:s=!1,size:r="md",value:a,...l}){const c=a===void 0,u=c?0:Math.min(Math.max(a,0),n),d=n>0?u/n*100:0,m=[nt.progress,nt[r],e].filter(Boolean).join(" ");return o.jsxs("div",{className:m,children:[o.jsx("div",{...l,className:nt.track,role:"progressbar","aria-label":t,"aria-valuemin":0,"aria-valuemax":n,"aria-valuenow":c?void 0:u,children:o.jsx("div",{className:c?nt.indeterminate:nt.fill,style:c?void 0:{width:`${d}%`}})}),s&&!c&&o.jsxs("span",{className:nt.value,children:[Math.round(d),"%"]})]})}const Ma="_popover_12zpc_1",Na={popover:Ma};function wa({open:e,...t}){return e?Oe.createPortal(o.jsx(Da,{...t}),document.body):null}function Da({"aria-label":e,"aria-labelledby":t,children:n,offset:s=8,onClose:r,placement:a="bottom start",triggerRef:l}){const c=i.useRef(null),{overlayProps:u}=xe.useOverlay({isOpen:!0,onClose:r,isDismissable:!0,shouldCloseOnBlur:!1},c),{overlayProps:d}=xe.useOverlayPosition({targetRef:l,overlayRef:c,placement:a,offset:s,isOpen:!0});return o.jsx(bn.FocusScope,{contain:!0,restoreFocus:!0,autoFocus:!0,children:o.jsx("div",{...u,ref:c,className:Na.popover,style:d.style,role:"dialog","aria-label":e,"aria-labelledby":t,children:n})})}const ka=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});function ps(e,t){return ka.compare(e,t)===0}function Ra(e,t){const n=e.normalize("NFC"),s=t.normalize("NFC");return ps(n.slice(0,s.length),s)}function Ca(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(ps(n.slice(r,r+s.length),s))return!0;return!1}function Mt(e,t){return t===void 0?-1:e.findIndex(n=>n.key===t)}function La(e){var t;return(t=e.find(n=>!n.disabled))==null?void 0:t.key}function Aa(e){for(let t=e.length-1;t>=0;t-=1)if(!e[t].disabled)return e[t].key}function Ia(e,t){for(let n=Mt(e,t)+1;n<e.length;n+=1)if(!e[n].disabled)return e[n].key}function On(e,t){const n=Mt(e,t);for(let s=(n<0?e.length:n)-1;s>=0;s-=1)if(!e[s].disabled)return e[s].key}function Oa(e,t,n){const s=t.trim();if(!s||e.length===0)return;const r=Mt(e,n);for(let a=1;a<=e.length;a+=1){const l=e[(r+a+e.length)%e.length];if(!l.disabled&&Ra(l.textValue??l.key,s))return l.key}}function gs(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 Sn(e,t,n){const s=e.anchorKey??e.focusedKey??t,r=Mt(n,s),a=Mt(n,t);if(r<0||a<0)return gs(e,t,"multiple");const[l,c]=r<=a?[r,a]:[a,r],u=new Set(e.selectedKeys);for(let d=l;d<=c;d+=1)n[d].disabled||u.add(n[d].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 Sa(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 Ea(e){return{focusedKey:e.focusedKey,selectedKeys:new Set}}function wt({allowEmpty:e=!1,defaultSelectedKeys:t,items:n,mode:s="single",onSelectionChange:r,selectedKeys:a,typeaheadDelay:l=500}){const[c,u]=i.useState(()=>({selectedKeys:new Set(t??[])})),d=i.useMemo(()=>a===void 0?void 0:new Set(a),[a]),m=d?{focusedKey:c.focusedKey,selectedKeys:d}:c,g=i.useMemo(()=>new Map(n.map(b=>[b.key,b])),[n]),h=i.useRef(new Map),p=i.useMemo(()=>{const b=[...m.selectedKeys].map(D=>g.get(D)??h.current.get(D)??{key:D});return h.current=new Map(b.map(D=>[D.key,D])),b},[g,m.selectedKeys]),_=i.useRef(""),f=i.useRef(void 0);i.useEffect(()=>()=>clearTimeout(f.current),[]);const x=i.useCallback(b=>{u(D=>D.focusedKey===b?D:{...D,focusedKey:b})},[]),M=i.useCallback(b=>{u(D=>({...b,selectedKeys:d?D.selectedKeys:b.selectedKeys})),r==null||r(b.selectedKeys)},[d,r]);function y(b,D){if(b!==void 0){if(D&&s==="multiple"){M(Sn(m,b,n));return}x(b)}}return{...m,selectedItems:p,clear:()=>M(Ea(m)),focus:x,focusFirst:b=>y(La(n),b),focusLast:b=>y(Aa(n),b),focusNext:b=>y(Ia(n,m.focusedKey)??m.focusedKey,b),focusPrevious:b=>y(On(n,m.focusedKey)??m.focusedKey,b),select:b=>M(gs(m,b,s,{allowEmpty:e})),selectRange:b=>M(Sn(m,b,n)),status:bs(m,n),toggleAll:()=>M(Sa(m,n)),search:b=>{_.current+=b,clearTimeout(f.current),f.current=setTimeout(()=>{_.current=""},l);const D=_.current.length>1?On(n,m.focusedKey):m.focusedKey,$=Oa(n,_.current,D);$&&x($)}}}const Ta="_tabs_gs9uk_1",Fa="_horizontal_gs9uk_7",Ba="_list_gs9uk_11",Pa="_active_gs9uk_17",Ka="_vertical_gs9uk_23",za="_tab_gs9uk_1",Ha="_panel_gs9uk_45",st={tabs:Ta,horizontal:Fa,list:Ba,active:Pa,vertical:Ka,tab:za,panel:Ha};function qa({className:e,defaultSelectedKey:t,items:n,label:s,onSelectionChange:r,orientation:a="horizontal",selectedKey:l,...c}){var M;const u=`tabs-${i.useId()}`,d=i.useRef(new Map),m=i.useMemo(()=>n.map(y=>({key:y.key,disabled:y.disabled,textValue:y.label})),[n]),g=(M=m.find(y=>!y.disabled))==null?void 0:M.key,h=wt({items:m,mode:"single",defaultSelectedKeys:l===void 0?[t??g??""]:void 0,selectedKeys:l===void 0?void 0:[l],onSelectionChange:y=>{const[b]=y;b!==void 0&&(r==null||r(b))}}),[p]=h.selectedKeys,_=n.find(y=>y.key===p);i.useEffect(()=>{var y;h.focusedKey&&((y=d.current.get(h.focusedKey))==null||y.focus())},[h.focusedKey]);function f(y){y&&h.select(y)}function x(y){var k,C;const b=h.focusedKey??p,D=a==="vertical"?"ArrowDown":"ArrowRight",$=a==="vertical"?"ArrowUp":"ArrowLeft";y.key===D?(y.preventDefault(),f(En(m,b,1))):y.key===$?(y.preventDefault(),f(En(m,b,-1))):y.key==="Home"?(y.preventDefault(),f((k=m.find(H=>!H.disabled))==null?void 0:k.key)):y.key==="End"&&(y.preventDefault(),f((C=[...m].reverse().find(H=>!H.disabled))==null?void 0:C.key))}return o.jsxs("div",{...c,className:[st.tabs,st[a],e].filter(Boolean).join(" "),children:[o.jsx("div",{className:st.list,role:"tablist","aria-label":s,"aria-orientation":a,onKeyDown:x,children:n.map(y=>o.jsx("button",{ref:b=>{b?d.current.set(y.key,b):d.current.delete(y.key)},className:[st.tab,p===y.key&&st.active].filter(Boolean).join(" "),type:"button",role:"tab",id:`${u}-${y.key}`,"aria-controls":p===y.key?`${u}-${y.key}-panel`:void 0,"aria-selected":p===y.key,disabled:y.disabled,tabIndex:p===y.key?0:-1,onClick:()=>h.select(y.key),children:y.label},y.key))}),_&&o.jsx("div",{className:st.panel,role:"tabpanel",id:`${u}-${_.key}-panel`,"aria-labelledby":`${u}-${_.key}`,tabIndex:0,children:_.content})]})}function En(e,t,n){const s=e.length,r=e.findIndex(a=>a.key===t);for(let a=1;a<=s;a+=1){const l=e[(r+n*a+s*s)%s];if(!l.disabled)return l.key}return t}const Va="_list_hggu8_1",Ua="_item_hggu8_11",Ga="_link_hggu8_20",Wa="_current_hggu8_32",Xa="_separator_hggu8_38",pt={list:Va,item:Ua,link:Ga,current:Wa,separator:Xa};function Ya({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:pt.list,children:n.map((a,l)=>{const c=l===n.length-1;return o.jsxs("li",{className:pt.item,children:[c||!a.href?o.jsx("span",{className:pt.current,"aria-current":c?"page":void 0,children:a.label}):o.jsx(e,{className:pt.link,href:a.href,...a.linkProps,children:a.label}),!c&&o.jsx(Gt,{className:pt.separator,size:12})]},`${a.label}-${l}`)})})})}const Qa="_pagination_1n2yq_1",Za="_list_1n2yq_7",Ja="_page_1n2yq_16",er="_step_1n2yq_17",tr="_current_1n2yq_35",nr="_gap_1n2yq_53",Xe={pagination:Qa,list:Za,page:Ja,step:er,current:tr,gap:nr};function sr({className:e,label:t="Paginacao",onPageChange:n,page:s,pageCount:r,siblings:a=1,...l}){if(r<=1)return null;const c=Math.min(Math.max(s,1),r),u=or(c,r,a);return o.jsxs("nav",{...l,"aria-label":t,className:[Xe.pagination,e].filter(Boolean).join(" "),children:[o.jsx("button",{className:Xe.step,type:"button","aria-label":"Pagina anterior",disabled:c===1,onClick:()=>n(c-1),children:o.jsx(xn,{size:14})}),o.jsx("ol",{className:Xe.list,children:u.map((d,m)=>d===null?o.jsx("li",{className:Xe.gap,"aria-hidden":"true",children:"…"},`gap-${m}`):o.jsx("li",{children:o.jsx("button",{className:[Xe.page,d===c&&Xe.current].filter(Boolean).join(" "),type:"button","aria-label":`Pagina ${d}`,"aria-current":d===c?"page":void 0,onClick:()=>n(d),children:d})},d))}),o.jsx("button",{className:Xe.step,type:"button","aria-label":"Proxima pagina",disabled:c===r,onClick:()=>n(c+1),children:o.jsx(Gt,{size:14})})]})}function or(e,t,n){const s=n*2+5;if(t<=s)return Array.from({length:t},(c,u)=>u+1);const r=Math.max(2,e-n),a=Math.min(t-1,e+n),l=[1];r>2&&l.push(null);for(let c=r;c<=a;c+=1)l.push(c);return a<t-1&&l.push(null),t>1&&l.push(t),l}const ar="_accordion_11w1x_1",rr="_divided_11w1x_7",lr="_item_11w1x_13",ir="_trigger_11w1x_17",cr="_panel_11w1x_21",ur="_heading_11w1x_25",dr="_icon_11w1x_50",fr="_label_11w1x_59",mr="_iconLeft_11w1x_63",Re={accordion:ar,divided:rr,item:lr,trigger:ir,panel:cr,heading:ur,icon:dr,label:fr,iconLeft:mr};function hr({className:e,defaultExpandedKeys:t,expandedKeys:n,items:s,multiple:r=!1,onExpandedChange:a,iconPosition:l="right",divider:c=!0,...u}){const d=`accordion-${i.useId()}`,m=i.useRef(new Map),g=i.useMemo(()=>s.map(_=>({key:_.key,disabled:_.disabled,textValue:_.label})),[s]),h=wt({allowEmpty:!0,items:g,mode:r?"multiple":"single",defaultSelectedKeys:n===void 0?t:void 0,selectedKeys:n,onSelectionChange:_=>a==null?void 0:a([..._])});function p(_,f){var M,y,b;let x;_.key==="ArrowDown"?x=Tn(g,f,1):_.key==="ArrowUp"?x=Tn(g,f,-1):_.key==="Home"?x=(M=g.find(D=>!D.disabled))==null?void 0:M.key:_.key==="End"&&(x=(y=[...g].reverse().find(D=>!D.disabled))==null?void 0:y.key),x&&(_.preventDefault(),(b=m.current.get(x))==null||b.focus())}return o.jsx("div",{...u,className:[Re.accordion,c&&Re.divided,e].filter(Boolean).join(" "),children:s.map(_=>{const f=h.selectedKeys.has(_.key);return o.jsxs("div",{className:Re.item,children:[o.jsx("h3",{className:Re.heading,children:o.jsxs("button",{ref:x=>{x?m.current.set(_.key,x):m.current.delete(_.key)},className:[Re.trigger,l==="left"&&Re.iconLeft].filter(Boolean).join(" "),type:"button",id:`${d}-${_.key}`,"aria-controls":`${d}-${_.key}-panel`,"aria-expanded":f,disabled:_.disabled,onClick:()=>h.select(_.key),onKeyDown:x=>p(x,_.key),children:[o.jsx("span",{className:Re.label,children:_.label}),f?o.jsx(os,{className:Re.icon,size:20}):o.jsx(as,{className:Re.icon,size:20})]})}),o.jsx("div",{className:Re.panel,id:`${d}-${_.key}-panel`,role:"region","aria-labelledby":`${d}-${_.key}`,hidden:!f,children:_.content})]},_.key)})})}function Tn(e,t,n){const s=e.length,r=e.findIndex(a=>a.key===t);for(let a=1;a<=s;a+=1){const l=e[(r+n*a+s*s)%s];if(!l.disabled)return l.key}return t}const Fn=6,_r=24;function pr(e,t){const n=i.useRef(null),[s,r]=i.useState(0),[a,l]=i.useState(0),c=i.useCallback(x=>{if(!x)return;const M=x.nextElementSibling,y=M?M.offsetTop-x.offsetTop:x.offsetHeight;y>0&&r(b=>b===y?b:y)},[]),u=i.useCallback(x=>{n.current=x},[]),d=i.useCallback(()=>{var x;l(((x=n.current)==null?void 0:x.scrollTop)??0)},[]),m=t!==void 0&&s>0&&e*s>t,g=t!==void 0&&s===0,h=i.useCallback(x=>{const M=n.current;if(!M||x<0)return;const y=x*s,b=y+s;y<M.scrollTop?M.scrollTop=y:b>M.scrollTop+M.clientHeight&&(M.scrollTop=b-M.clientHeight)},[s]);if(!m)return{active:m,attachScroll:u,measureItem:c,onScroll:d,padding:{before:0,after:0},scrollToIndex:h,start:0,end:g?Math.min(e,_r):e};const p=Math.ceil(t/s),_=Math.max(0,Math.floor(a/s)-Fn),f=Math.min(e,_+p+Fn*2);return{active:m,attachScroll:u,measureItem:c,onScroll:d,padding:{before:_*s,after:(e-f)*s},scrollToIndex:h,start:_,end:f}}const gr="_list_dgig6_1",br="_search_dgig6_12",yr="_options_dgig6_35",xr="_spacer_dgig6_53",vr="_option_dgig6_35",jr="_disabled_dgig6_71",$r="_focused_dgig6_76",Mr="_box_dgig6_87",Nr="_checked_dgig6_96",wr="_group_dgig6_102",Dr="_status_dgig6_112",kr="_empty_dgig6_113",be={list:gr,search:br,options:yr,spacer:xr,option:vr,disabled:jr,focused:$r,box:Mr,checked:Nr,group:wr,status:Dr,empty:kr};function $t(e,t){return e+"-option-"+t}function Wt({baseId:e,className:t,elementRef:n,empty:s,height:r,holdsFocus:a=!0,label:l,listing:c,loading:u=!1,loadingMessage:d="Carregando",onKeyDown:m,onSelect:g,style:h,tabIndex:p=0}){const{detached:_,focusedKey:f,isSelected:x,select:M,selectionMode:y,visible:b}=c,D=b.findIndex(O=>O.value===f);function $(O,K){O.disabled||(M(O,K),g==null||g(O))}const{active:k,attachScroll:C,measureItem:H,onScroll:S,padding:z,scrollToIndex:w,start:A,end:R}=pr(b.length,r),E=i.useCallback(O=>{C(O),n&&(n.current=O)},[C,n]);i.useEffect(()=>{var K,L;const O=b.findIndex(P=>P.value===f);f===void 0||O<0||(k?w(O):(L=(K=document.getElementById($t(e,O)))==null?void 0:K.scrollIntoView)==null||L.call(K,{block:"nearest"}))},[k,e,f,w,b]);const F=b.slice(A,R);if(y==="none")return o.jsxs("ul",{"aria-busy":u||void 0,className:[be.options,t].filter(Boolean).join(" "),id:e+"-options",onScroll:S,ref:E,style:{height:r,...h},children:[u&&o.jsx("li",{className:be.status,children:d}),o.jsx("li",{"aria-hidden":"true",className:be.spacer,style:{height:z.before}}),F.map((O,K)=>o.jsx("li",{className:be.option,ref:K===0?H:void 0,children:O.label},O.value)),o.jsx("li",{"aria-hidden":"true",className:be.spacer,style:{height:z.after}}),!u&&b.length===0&&s]});function T(O,K,L){const P=x(O.value);return o.jsxs("div",{"aria-disabled":O.disabled||void 0,"aria-posinset":K>0?K:void 0,"aria-selected":P,"aria-setsize":K>0?b.length:void 0,className:[be.option,f===O.value&&be.focused,O.disabled&&be.disabled].filter(Boolean).join(" "),id:K>0?$t(e,K-1):void 0,onClick:j=>$(O,j.shiftKey),onMouseDown:j=>j.preventDefault(),ref:L?H:void 0,role:"option",children:[y==="multiple"&&o.jsx("span",{"aria-hidden":"true",className:[be.box,P&&be.checked].filter(Boolean).join(" ")}),O.label]},O.value)}return o.jsxs("div",{"aria-activedescendant":a&&D>=0?$t(e,D):void 0,"aria-busy":u||void 0,"aria-label":l,"aria-multiselectable":y==="multiple"||void 0,className:[be.options,t].filter(Boolean).join(" "),id:e+"-options",onKeyDown:m,onScroll:S,ref:E,role:"listbox",style:{height:r,...h},tabIndex:a?p:void 0,children:[u&&o.jsx("p",{className:be.status,children:d}),_.length>0&&o.jsx("div",{"aria-label":"Selecionados",className:be.group,role:"group",children:_.map(O=>T(O,0,!1))}),o.jsx("div",{"aria-hidden":"true",className:be.spacer,style:{height:z.before}}),F.map((O,K)=>T(O,A+K+1,K===0)),o.jsx("div",{"aria-hidden":"true",className:be.spacer,style:{height:z.after}}),!u&&b.length===0&&s]})}function Rr(e){return{value:e.key,label:e.textValue??e.key}}function Xt({defaultValue:e,items:t,onSearch:n,onSelectionChange:s,selectionMode:r="none",value:a}){const[l,c]=i.useState(""),u=i.useMemo(()=>n||!l?t:t.filter(f=>Ca(f.label,l)),[t,n,l]),d=i.useMemo(()=>u.map(f=>({key:f.value,disabled:f.disabled,textValue:f.label})),[u]),m=i.useRef(new Map);for(const f of t)m.current.set(f.value,f);const g=wt({items:d,mode:r,defaultSelectedKeys:e==null?void 0:e.map(f=>f.value),selectedKeys:a==null?void 0:a.map(f=>f.value),onSelectionChange:f=>s==null?void 0:s([...f].map(x=>m.current.get(x)).filter(x=>x!==void 0))}),h=a??g.selectedItems.map(Rr),p=i.useMemo(()=>{if(!l||r!=="multiple")return[];const f=new Set(u.map(x=>x.value));return h.filter(x=>!f.has(x.value))},[h,r,l,u]);function _(f){if(r==="none")return;const x=f.shiftKey;if(f.key==="ArrowDown")f.preventDefault(),g.focusedKey===void 0?g.focusFirst(x):g.focusNext(x);else if(f.key==="ArrowUp")f.preventDefault(),g.focusPrevious(x);else if(f.key==="Home")f.preventDefault(),g.focusFirst(x);else if(f.key==="End")f.preventDefault(),g.focusLast(x);else if(f.key==="Enter"||f.key===" "){const M=u.find(y=>y.value===g.focusedKey);M&&!M.disabled&&(f.preventDefault(),g.select(M.value))}}return{detached:p,focus:g.focus,focusFirst:g.focusFirst,focusLast:g.focusLast,focusedKey:g.focusedKey,handleKeyDown:_,isSelected:f=>h.some(x=>x.value===f),filter:f=>{c(f),g.focus(void 0),n==null||n(f)},typeahead:g.search,select:(f,x)=>{if(!f.disabled){if(x&&r==="multiple"){g.selectRange(f.value);return}g.select(f.value)}},selected:h,selectionMode:r,status:g.status,toggleAll:g.toggleAll,term:l,visible:u}}const Cr="_trigger_14fm6_1",Lr="_error_14fm6_21",Ar="_sm_14fm6_51",Ir="_md_14fm6_57",Or="_value_14fm6_61",Sr="_placeholder_14fm6_67",Er="_chevron_14fm6_71",Tr="_panel_14fm6_76",Ye={trigger:Cr,error:Lr,sm:Ar,md:Ir,value:Or,placeholder:Sr,chevron:Er,panel:Tr};function Fr({defaultValue:e,name:t,disabled:n=!1,error:s,hint:r,id:a,label:l,onValueChange:c,options:u,placeholder:d="Selecione",required:m=!1,size:g="md",value:h}){const p=i.useRef(null),[_,f]=i.useState(!1),x=Xt({items:u,selectionMode:"single",defaultValue:e===void 0?void 0:u.filter($=>$.value===e),value:h===void 0?void 0:u.filter($=>$.value===h),onSelectionChange:$=>{const[k]=$;k&&(c==null||c(k.value))}}),[M]=x.selected;function y(){var $;f(!1),($=p.current)==null||$.focus()}function b(){var $;n||(x.focus((M==null?void 0:M.value)??(($=u.find(k=>!k.disabled))==null?void 0:$.value)),f(!0))}function D($){["ArrowDown","ArrowUp","Enter"," "].includes($.key)&&($.preventDefault(),b())}return o.jsx(ze,{error:s,hint:r,id:a,label:l,required:m,children:({id:$,describedBy:k,invalid:C})=>o.jsxs(o.Fragment,{children:[t!==void 0&&o.jsx("input",{name:t,type:"hidden",value:(M==null?void 0:M.value)??""}),o.jsxs("button",{ref:p,className:[Ye.trigger,Ye[g],s&&Ye.error].filter(Boolean).join(" "),type:"button",id:$,role:"combobox","aria-describedby":k,"aria-invalid":C||void 0,"aria-haspopup":"listbox","aria-expanded":_,"aria-required":m||void 0,disabled:n,onClick:()=>_?y():b(),onKeyDown:D,children:[o.jsx("span",{className:M?Ye.value:Ye.placeholder,children:(M==null?void 0:M.label)??d}),o.jsx(ts,{className:Ye.chevron,size:14})]}),_&&Oe.createPortal(o.jsx(Br,{label:l??d,listing:x,onClose:y,triggerRef:p}),document.body)]})})}function Br({label:e,listing:t,onClose:n,triggerRef:s}){var p;const r=i.useRef(null),a=i.useRef(null),l=i.useRef("listbox-"+Math.random().toString(36).slice(2,9)).current,{overlayProps:c}=xe.useOverlay({isOpen:!0,onClose:n,isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:_=>{var f;return!((f=s.current)!=null&&f.contains(_))}},r),{overlayProps:u}=xe.useOverlayPosition({targetRef:s,overlayRef:r,placement:"bottom start",offset:6,containerPadding:8,isOpen:!0}),[d,m]=i.useState(),g=Math.min(Number((p=u.style)==null?void 0:p.maxHeight)||280,280);i.useLayoutEffect(()=>{var _;m((_=s.current)==null?void 0:_.offsetWidth)},[s]),i.useEffect(()=>{var _;(_=a.current)==null||_.focus()},[]);function h(_){if(_.key==="Escape"||_.key==="Tab"){n();return}if(_.key==="Enter"||_.key===" "){_.preventDefault();const f=t.visible.find(x=>x.value===t.focusedKey);f&&!f.disabled&&(t.select(f),n());return}if(_.key.length===1&&!_.metaKey&&!_.ctrlKey){t.typeahead(_.key);return}t.handleKeyDown(_)}return o.jsx("div",{...c,ref:r,className:Ye.panel,style:{...u.style,width:d,maxHeight:g},children:o.jsx(Wt,{baseId:l,elementRef:a,label:e,listing:t,onKeyDown:_=>{var f;h(_),(f=c.onKeyDown)==null||f.call(c,_)},onSelect:n,tabIndex:-1})})}const Pr="_input_1u88z_1",Kr="_error_1u88z_17",zr="_sm_1u88z_47",Hr="_md_1u88z_53",qr="_panel_1u88z_57",Vr="_empty_1u88z_69",gt={input:Pr,error:Kr,sm:zr,md:Hr,panel:qr,empty:Vr};function Ur({defaultValue:e,name:t,disabled:n=!1,emptyMessage:s="Nenhum resultado",error:r,hint:a,id:l,label:c,loading:u=!1,onSearch:d,onValueChange:m,options:g,placeholder:h,required:p=!1,size:_="md",value:f}){var K;const x=i.useRef(null),M=i.useRef(null),y=`combobox-${i.useId()}`,[b,D]=i.useState(!1),[$,k]=i.useState(!1),C=Xt({items:g,selectionMode:"single",defaultValue:e===void 0?void 0:g.filter(L=>L.value===e),value:f===void 0?void 0:g.filter(L=>L.value===f),onSearch:d,onSelectionChange:L=>{const[P]=L;P&&(m==null||m(P.value))}}),[H]=C.selected,S=$?C.term:(H==null?void 0:H.label)??"",z=C.visible.findIndex(L=>L.value===C.focusedKey),{overlayProps:w}=xe.useOverlayPosition({targetRef:x,overlayRef:M,placement:"bottom start",offset:6,containerPadding:8,isOpen:b}),[A,R]=i.useState(),E=Math.min(Number((K=w.style)==null?void 0:K.maxHeight)||280,280);i.useLayoutEffect(()=>{var L;R((L=x.current)==null?void 0:L.offsetWidth)},[b]);function F(){k(!1),C.filter("")}function T(){D(!1),F()}function O(L){if(L.key==="ArrowDown"&&!b){L.preventDefault(),D(!0),C.focusFirst();return}if(L.key==="Escape"){T();return}if(L.key==="Enter"){const P=C.visible.find(j=>j.value===C.focusedKey);b&&P&&!P.disabled&&(L.preventDefault(),C.select(P),T());return}C.handleKeyDown(L)}return o.jsx(ze,{error:r,hint:a,id:l,label:c,required:p,children:({id:L,describedBy:P,invalid:j})=>o.jsxs(o.Fragment,{children:[t!==void 0&&o.jsx("input",{name:t,type:"hidden",value:(H==null?void 0:H.value)??""}),o.jsx("input",{ref:x,className:[gt.input,gt[_],r&>.error].filter(Boolean).join(" "),id:L,type:"text",role:"combobox",autoComplete:"off","aria-describedby":P,"aria-invalid":j||void 0,"aria-expanded":b,"aria-autocomplete":"list","aria-controls":b?y+"-options":void 0,"aria-activedescendant":b&&z>=0?$t(y,z):void 0,"aria-required":p||void 0,disabled:n,placeholder:h,value:S,onBlur:()=>D(!1),onChange:N=>{k(!0),D(!0),C.filter(N.target.value)},onClick:()=>D(!0),onKeyDown:O}),b&&Oe.createPortal(o.jsx("div",{ref:M,className:gt.panel,style:{...w.style,width:A,maxHeight:E},children:o.jsx(Wt,{baseId:y,empty:o.jsx("p",{className:gt.empty,children:s}),holdsFocus:!1,label:c??h??"Opcoes",listing:C,loading:u,onSelect:T})}),document.body)]})})}const Gr="_menu_opb5f_1",Wr="_item_opb5f_20",Bn={menu:Gr,item:Wr};function Pn(e,t){return n=>{e==null||e(n),t(n)}}function Xr({children:e,items:t,label:n}){const s=i.useRef(null),[r,a]=i.useState(!1),[l,c]=i.useState("first"),u=i.useRef(!1);function d(p){c(p),a(!0)}function m(){u.current=!0,a(!1)}i.useEffect(()=>{var p;!r&&u.current&&(u.current=!1,(p=s.current)==null||p.focus())},[r]);const g=e.props,h=i.cloneElement(e,{ref:Ue(s,e.ref),"aria-haspopup":"menu","aria-expanded":r,onClick:Pn(g.onClick,()=>r?m():d("first")),onKeyDown:Pn(g.onKeyDown,p=>{(p.key==="ArrowDown"||p.key==="ArrowUp")&&(p.preventDefault(),d(p.key==="ArrowDown"?"first":"last"))})});return o.jsxs(o.Fragment,{children:[h,r&&Oe.createPortal(o.jsx(bn.FocusScope,{contain:!0,children:o.jsx(Yr,{items:t,label:n,openedWith:l,onClose:m,triggerRef:s})}),document.body)]})}function Yr({items:e,label:t,onClose:n,openedWith:s,triggerRef:r}){var D;const a=i.useRef(null),l=i.useRef(new Map),c=i.useMemo(()=>e.map($=>({key:$.key,disabled:$.disabled,textValue:$.label})),[e]),u=wt({items:c,mode:"none"}),{focusedKey:d,focusFirst:m,focusLast:g,focusNext:h,focusPrevious:p,search:_}=u,{overlayProps:f}=xe.useOverlay({isOpen:!0,onClose:n,isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:$=>{var k;return!((k=r.current)!=null&&k.contains($))}},a),{overlayProps:x}=xe.useOverlayPosition({targetRef:r,overlayRef:a,placement:"bottom start",offset:6,containerPadding:8,isOpen:!0}),M=Math.min(Number((D=x.style)==null?void 0:D.maxHeight)||360,360);i.useEffect(()=>{s==="last"?g():m()},[]),i.useEffect(()=>{var $;d&&(($=l.current.get(d))==null||$.focus())},[d]);function y($){var k;$.disabled||((k=$.onSelect)==null||k.call($),n())}function b($){$.key==="ArrowDown"?($.preventDefault(),h()):$.key==="ArrowUp"?($.preventDefault(),p()):$.key==="Home"?($.preventDefault(),m()):$.key==="End"?($.preventDefault(),g()):$.key==="Escape"||$.key==="Tab"?n():$.key.length===1&&!$.metaKey&&!$.ctrlKey&&_($.key)}return o.jsx("div",{...f,"data-react-aria-top-layer":"true",ref:a,className:Bn.menu,style:{...x.style,maxHeight:M},role:"menu","aria-label":t,onKeyDown:$=>{var k;b($),(k=f.onKeyDown)==null||k.call(f,$)},children:e.map($=>o.jsx("button",{ref:k=>{k?l.current.set($.key,k):l.current.delete($.key)},className:Bn.item,type:"button",role:"menuitem",disabled:$.disabled,tabIndex:d===$.key?0:-1,onClick:()=>y($),children:$.label},$.key))})}const Qr="_tooltip_1gje7_1",Zr={tooltip:Qr};function bt(e,t){return n=>{e==null||e(n),t(n)}}function ys({children:e,content:t,delay:n=500,placement:s="top"}){const r=i.useRef(null),[a,l]=i.useState(!1),c=i.useRef(void 0),u=`tooltip-${i.useId()}`,d=i.useCallback(()=>{clearTimeout(c.current),l(!1)},[]);i.useEffect(()=>()=>clearTimeout(c.current),[]);const m=e.props,g=i.cloneElement(e,{ref:Ue(r,e.ref),"aria-describedby":a?[m["aria-describedby"],u].filter(Boolean).join(" "):m["aria-describedby"],onMouseEnter:bt(m.onMouseEnter,()=>{clearTimeout(c.current),c.current=setTimeout(()=>l(!0),n)}),onMouseLeave:bt(m.onMouseLeave,d),onFocus:bt(m.onFocus,()=>l(!0)),onBlur:bt(m.onBlur,d),onKeyDown:bt(m.onKeyDown,h=>{h.key==="Escape"&&d()})});return o.jsxs(o.Fragment,{children:[g,a&&Oe.createPortal(o.jsx(Jr,{content:t,id:u,placement:s,triggerRef:r}),document.body)]})}function Jr({content:e,id:t,placement:n,triggerRef:s}){const r=i.useRef(null),{overlayProps:a}=xe.useOverlayPosition({targetRef:s,overlayRef:r,placement:n,offset:6,isOpen:!0});return o.jsx("div",{ref:r,className:Zr.tooltip,"data-react-aria-top-layer":"true",id:t,role:"tooltip",style:a.style,children:e})}const el="_underlay_1jlsv_1",tl="_dialog_1jlsv_12",nl="_sm_1jlsv_29",sl="_md_1jlsv_33",ol="_lg_1jlsv_37",al="_header_1jlsv_41",rl="_title_1jlsv_48",ll="_close_1jlsv_57",il="_description_1jlsv_78",cl="_body_1jlsv_86",ul="_footer_1jlsv_93",Ee={underlay:el,dialog:tl,sm:nl,md:sl,lg:ol,header:al,title:rl,close:ll,description:il,body:cl,footer:ul};function dl({open:e,...t}){return e?Oe.createPortal(o.jsx(fl,{...t}),document.body):null}function fl({children:e,description:t,dismissable:n=!0,footer:s,onClose:r,size:a="md",title:l}){const c=i.useRef(null),u=i.useId(),d=`${u}-title`,m=`${u}-description`,{overlayProps:g,underlayProps:h}=xe.useOverlay({isOpen:!0,onClose:r,isDismissable:n,isKeyboardDismissDisabled:!n},c);return xe.usePreventScroll(),i.useEffect(()=>c.current?xe.ariaHideOutside([c.current]):void 0,[]),o.jsx("div",{...h,className:Ee.underlay,children:o.jsx(bn.FocusScope,{contain:!0,restoreFocus:!0,autoFocus:!0,children:o.jsxs("div",{...g,ref:c,className:[Ee.dialog,Ee[a]].join(" "),role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":t?m:void 0,children:[o.jsxs("header",{className:Ee.header,children:[o.jsx("h2",{className:Ee.title,id:d,children:l}),n&&o.jsx("button",{className:Ee.close,type:"button","aria-label":"Fechar",onClick:r,children:o.jsx(ss,{size:16})})]}),t&&o.jsx("p",{className:Ee.description,id:m,children:t}),e&&o.jsx("div",{className:Ee.body,children:e}),s&&o.jsx("div",{className:Ee.footer,children:s})]})})})}const ml="_badge_1oren_1",hl="_dot_1oren_18",_l="_ok_1oren_26",pl="_warn_1oren_31",gl="_info_1oren_36",bl="_danger_1oren_41",yl="_primary_1oren_46",xl="_outline_1oren_51",It={badge:ml,dot:hl,ok:_l,warn:pl,info:gl,danger:bl,primary:yl,outline:xl};function vl({children:e,className:t,dot:n=!1,outline:s=!1,tone:r="neutral",...a}){const l=[It.badge,It[r],s&&It.outline,t].filter(Boolean).join(" ");return o.jsxs("span",{...a,className:l,children:[n&&o.jsx("span",{className:It.dot,"aria-hidden":"true"}),e]})}const jl="_avatar_dggqt_1",$l="_sm_dggqt_14",Ml="_md_dggqt_20",Nl="_lg_dggqt_26",Kn={avatar:jl,sm:$l,md:Ml,lg:Nl};function wl(e){return e.trim().split(/\s+/).filter(Boolean).slice(0,2).map(n=>n[0]).join("").toUpperCase()||"?"}function Dl({className:e,name:t,onError:n,size:s="md",src:r,...a}){const[l,c]=i.useState(!1),u=[Kn.avatar,Kn[s],e].filter(Boolean).join(" "),d=!!r&&!l;i.useEffect(()=>{c(!1)},[r]);function m(g){c(!0),n==null||n(g)}return d?o.jsx("img",{...a,className:u,src:r,alt:t,onError:m}):o.jsx("span",{...a,className:u,role:"img","aria-label":t,children:wl(t)})}const xs=i.createContext(void 0);function Yt(e){const t=i.useContext(xs);if(!t)throw new Error(e+" deve ser usado dentro de List.");return t}function Dt({children:e,className:t,defaultValue:n,items:s,label:r,loading:a=!1,loadingMessage:l="Carregando",onSearch:c,onSelectionChange:u,selectionMode:d="none",value:m,...g}){const h=i.useId(),[p,_]=i.useState(!1),f=Xt({defaultValue:n,items:s,onSearch:c,onSelectionChange:u,selectionMode:d,value:m}),x={baseId:h,claimFocus:i.useCallback(()=>_(!0),[]),label:r,listing:f,loading:a,loadingMessage:l,searchPresent:p};return o.jsx("div",{...g,className:[be.list,t].filter(Boolean).join(" "),children:o.jsx(xs.Provider,{value:x,children:e})})}function kl({placeholder:e="Buscar"}){const{baseId:t,claimFocus:n,label:s,listing:r}=Yt("List.Search");i.useEffect(n,[n]);const a=r.visible.findIndex(l=>l.value===r.focusedKey);return o.jsx("input",{"aria-activedescendant":a>=0?$t(t,a):void 0,"aria-controls":t+"-options","aria-label":s?"Buscar em "+s:e,autoComplete:"off",className:be.search,onChange:l=>r.filter(l.target.value),onKeyDown:r.handleKeyDown,placeholder:e,type:"search",value:r.term})}function Rl({height:e}){const{baseId:t,label:n,listing:s,loading:r,loadingMessage:a,searchPresent:l}=Yt("List.Options");return o.jsx(Wt,{baseId:t,height:e,label:n,holdsFocus:!l,listing:s,loading:r,loadingMessage:a,onKeyDown:l?void 0:s.handleKeyDown})}function Cl({label:e="Selecionar todos"}){const{listing:t}=Yt("List.SelectAll");return t.selectionMode!=="multiple"?null:o.jsx(hs,{checked:t.status==="all",indeterminate:t.status==="partial",label:e,onChange:()=>t.toggleAll()})}function Ll({children:e}){const{listing:t,loading:n}=Yt("List.Empty");return n||t.visible.length>0?null:o.jsx("p",{className:be.empty,children:e})}Dt.Search=kl;Dt.SelectAll=Cl;Dt.Options=Rl;Dt.Empty=Ll;const Al="_card_11evu_1",Il="_header_11evu_21",Ol="_headline_11evu_37",Sl="_titleRow_11evu_51",El="_title_11evu_51",Tl="_description_11evu_81",Fl="_trailing_11evu_97",Bl="_body_11evu_111",Pl="_bodyFlush_11evu_119",Kl="_footer_11evu_127",Ie={card:Al,header:Il,headline:Ol,titleRow:Sl,title:El,description:Tl,trailing:Fl,body:Bl,bodyFlush:Pl,footer:Kl},vs=i.createContext(void 0);function zl(e){const t=i.useContext(vs);if(!t)throw new Error(e+" deve ser usado dentro de Card.");return t}function Qt({children:e,className:t,...n}){const s=i.useId(),[r,a]=i.useState(!1),l=s+"-title",c={registerTitle:i.useCallback(()=>a(!0),[]),titleId:l};return o.jsx("section",{...n,"aria-labelledby":r?l:void 0,className:[Ie.card,t].filter(Boolean).join(" "),children:o.jsx(vs.Provider,{value:c,children:e})})}function Hl({badge:e,description:t,headingLevel:n=3,title:s,trailing:r}){const{registerTitle:a,titleId:l}=zl("Card.Header"),c="h"+n;return i.useEffect(a,[a]),o.jsxs("header",{className:Ie.header,children:[o.jsxs("div",{className:Ie.headline,children:[o.jsxs("div",{className:Ie.titleRow,children:[o.jsx(c,{className:Ie.title,id:l,children:s}),e]}),t&&o.jsx("p",{className:Ie.description,children:t})]}),r&&o.jsx("div",{className:Ie.trailing,children:r})]})}function ql({children:e,flush:t=!1}){return o.jsx("div",{className:t?Ie.bodyFlush:Ie.body,children:e})}function Vl({children:e}){return o.jsx("footer",{className:Ie.footer,children:e})}Qt.Header=Hl;Qt.Body=ql;Qt.Footer=Vl;const Ul="_scroll_l0epy_1",Gl="_table_l0epy_6",Wl="_sm_l0epy_16",Xl="_md_l0epy_21",Yl="_head_l0epy_26",Ql="_column_l0epy_30",Zl="_sortable_l0epy_41",Jl="_sortButton_l0epy_45",ei="_sortIcon_l0epy_69",ti="_sortDescending_l0epy_81",ni="_help_l0epy_85",si="_row_l0epy_102",oi="_divider_l0epy_106",ai="_cell_l0epy_106",ri="_striped_l0epy_110",li="_numeric_l0epy_124",ii="_start_l0epy_132",ci="_center_l0epy_136",ui="_end_l0epy_140",di="_empty_l0epy_144",fi="_status_l0epy_145",mi="_sticky_l0epy_158",hi="_lead_l0epy_202",_i="_control_l0epy_208",pi="_toggle_l0epy_219",gi="_selected_l0epy_224",ne={scroll:Ul,table:Gl,sm:Wl,md:Xl,head:Yl,column:Ql,sortable:Zl,sortButton:Jl,sortIcon:ei,sortDescending:ti,help:ni,row:si,divider:oi,cell:ai,striped:ri,numeric:li,start:ii,center:ci,end:ui,empty:di,status:fi,sticky:mi,lead:hi,control:_i,toggle:pi,selected:gi},js=i.createContext(void 0);function Zt(e){const t=i.useContext(js);if(!t)throw new Error(e+" deve ser usado dentro de Table.");return t}function dt({children:e,className:t,defaultSort:n,divider:s=!0,highlightSelectedRow:r=!0,label:a,loading:l=!1,loadingMessage:c="Carregando",onSelectionChange:u,onSortChange:d,rows:m=[],selectedIds:g,selectionControl:h,selectionMode:p="none",size:_="md",sort:f,stickyHeader:x=!1,striped:M=!1,...y}){const b=i.useId(),[D,$]=i.useState(n),k=i.useMemo(()=>new Map,[]),C=f??D;function H(R){const E={column:R,direction:(C==null?void 0:C.column)===R&&C.direction==="ascending"?"descending":"ascending"};f===void 0&&$(E),d==null||d(E)}const S=i.useMemo(()=>m.map(R=>({key:R.id,disabled:R.disabled})),[m]),z=wt({items:S,mode:p,selectedKeys:g,onSelectionChange:R=>u==null?void 0:u([...R])}),w={baseId:b,countColumns:()=>Math.max(k.size,1),loading:l,registerColumn:R=>(k.has(R)||k.set(R,k.size),k.get(R)),requestSort:H,selection:{control:h??(p==="single"?"radio":"checkbox"),highlight:r,isSelected:R=>z.selectedKeys.has(R),mode:p,status:z.status,toggle:(R,E)=>{if(E&&p==="multiple"){z.selectRange(R);return}z.select(R)},toggleAll:z.toggleAll},size:_,sort:C},A=[ne.table,ne[_],s&&ne.divider,M&&ne.striped,x&&ne.sticky].filter(Boolean).join(" ");return o.jsxs("div",{...y,className:[ne.scroll,t].filter(Boolean).join(" "),children:[o.jsx("table",{"aria-busy":l||void 0,"aria-label":a,className:A,children:o.jsx(js.Provider,{value:w,children:e})}),l&&o.jsx("p",{className:ne.status,role:"status",children:c})]})}function bi({children:e}){const{registerColumn:t,selection:n}=Zt("Table.Header");return n.mode!=="none"&&t("__selecao__"),o.jsx("thead",{className:ne.head,children:o.jsxs("tr",{children:[n.mode==="multiple"&&o.jsx("th",{className:[ne.column,ne.lead].join(" "),scope:"col",children:o.jsx("input",{"aria-label":"Selecionar todas as linhas",checked:n.status==="all",className:ne.control,onChange:n.toggleAll,ref:s=>{s&&(s.indeterminate=n.status==="partial")},type:"checkbox"})}),n.mode==="single"&&o.jsx("th",{className:[ne.column,ne.lead].join(" "),scope:"col"}),e]})})}function yi({align:e,children:t,help:n,hideBelow:s,id:r,numeric:a=!1,sortable:l=!1,width:c}){const{registerColumn:u,requestSort:d,sort:m}=Zt("Table.Column");u(r);const g=(m==null?void 0:m.column)===r?m.direction:void 0,h=o.jsxs(o.Fragment,{children:[t,n&&o.jsx(ys,{content:n,children:o.jsx("span",{"aria-label":n,className:ne.help,role:"img",tabIndex:0,children:"?"})}),l&&o.jsx(es,{className:[ne.sortIcon,g==="descending"&&ne.sortDescending].filter(Boolean).join(" "),size:12})]});return o.jsx("th",{"aria-sort":l?g??"none":void 0,className:[ne.column,ne[e??(a?"end":"start")],l&&ne.sortable].filter(Boolean).join(" "),"data-hide-below":s,scope:"col",style:{width:c},children:l?o.jsx("button",{className:ne.sortButton,onClick:()=>d(r),type:"button",children:h}):h})}function xi({children:e,empty:t,items:n}){const{countColumns:s,loading:r}=Zt("Table.Body");return n.length===0&&!r&&t!==void 0?o.jsx("tbody",{children:o.jsx("tr",{children:o.jsx("td",{className:ne.empty,colSpan:s(),children:t})})}):o.jsx("tbody",{children:n.map(e)})}function vi({children:e,disabled:t=!1,id:n,label:s}){const{baseId:r,selection:a}=Zt("Table.Row"),l=a.mode!=="none"&&a.isSelected(n);return o.jsxs("tr",{"aria-selected":a.mode==="none"?void 0:l,className:[ne.row,l&&a.highlight&&ne.selected].filter(Boolean).join(" "),children:[a.mode!=="none"&&o.jsx("td",{className:[ne.cell,ne.lead].join(" "),children:o.jsx("input",{"aria-label":s??"Selecionar linha",checked:l,className:[ne.control,a.control==="toggle"&&ne.toggle].filter(Boolean).join(" "),disabled:t,name:a.control==="radio"?`${r}-selecao`:void 0,onChange:()=>{},onClick:c=>a.toggle(n,c.shiftKey),type:a.control==="radio"?"radio":"checkbox"})}),e]})}function ji({align:e,children:t,hideBelow:n,numeric:s=!1}){return o.jsx("td",{className:[ne.cell,ne[e??(s?"end":"start")],s&&ne.numeric].filter(Boolean).join(" "),"data-hide-below":n,children:t})}dt.Header=bi;dt.Column=yi;dt.Body=xi;dt.Row=vi;dt.Cell=ji;function Jt(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 $i(e,t,n={}){const s=Z.startOfMonth(e),r=Z.startOfWeek(s,t),a=[];for(let l=0;l<Z.getWeeksInMonth(e,t);l+=1){const c=[];for(let u=0;u<7;u+=1){const d=r.add({days:l*7+u});c.push({date:d,outside:!Z.isSameMonth(d,e),unavailable:Jt(d,n)})}a.push(c)}return a}function we(e,{max:t,min:n}){return n&&e.compare(n)<0?n:t&&e.compare(t)>0?t:e}function Mi(e,t,n,s){switch(t){case"ArrowLeft":return we(e.subtract({days:1}),s);case"ArrowRight":return we(e.add({days:1}),s);case"ArrowUp":return we(e.subtract({weeks:1}),s);case"ArrowDown":return we(e.add({weeks:1}),s);case"Home":return we(Z.startOfMonth(e),s);case"End":return we(Z.endOfMonth(e),s);case"PageUp":return we(n?e.subtract({years:1}):e.subtract({months:1}),s);case"PageDown":return we(n?e.add({years:1}):e.add({months:1}),s);default:return}}function zn(e,t){return!!(e&&t&&Z.isSameDay(e,t))}function Ni({isDateUnavailable:e,locale:t="pt-BR",max:n,min:s,onSelect:r,value:a}={}){const l={isDateUnavailable:e,max:n,min:s},c=i.useMemo(()=>Z.today(Z.getLocalTimeZone()),[]),[u,d]=i.useState(()=>we(a??c,l)),m=a??u,[g,h]=i.useState(()=>Z.startOfMonth(m)),[p,_]=i.useState(a);a&&(!p||a.compare(p)!==0)&&(_(a),h(Z.startOfMonth(a)),d(we(a,l)));const f=i.useMemo(()=>$i(g,t,l),[t,g,n,s,e]);function x(y){d(y),(y.compare(Z.startOfMonth(g))<0||y.compare(Z.startOfMonth(g).add({months:1}))>=0)&&h(Z.startOfMonth(y))}function M(y){Jt(y,l)||(x(y),r==null||r(y))}return{focus:x,focusedDate:u,goToMonth:y=>{const b=Z.startOfMonth(g.add({months:y}));h(b),d(we(b.set({day:Math.min(u.day,Z.endOfMonth(b).day)}),l))},handleKeyDown:y=>{if(y.key==="Enter"||y.key===" "){y.preventDefault(),M(u);return}const b=Mi(u,y.key,y.shiftKey,l);b&&(y.preventDefault(),x(b))},isSelected:y=>zn(y,a),isToday:y=>zn(y,c),select:M,visibleMonth:g,weeks:f}}const wi="_field_3kuuv_1",Di="_error_3kuuv_10",ki="_sm_3kuuv_24",Ri="_input_3kuuv_24",Ci="_md_3kuuv_28",Li="_trigger_3kuuv_51",Ai="_panel_3kuuv_76",Ii="_calendar_3kuuv_85",Oi="_calendarHeader_3kuuv_91",Si="_month_3kuuv_98",Ei="_navigate_3kuuv_106",Ti="_grid_3kuuv_129",Fi="_weekday_3kuuv_137",Bi="_dayCell_3kuuv_147",Pi="_day_3kuuv_147",Ki="_outside_3kuuv_173",zi="_selectedDay_3kuuv_183",Hi="_focusedDay_3kuuv_190",qi="_footer_3kuuv_195",Vi="_actions_3kuuv_205",me={field:wi,error:Di,sm:ki,input:Ri,md:Ci,trigger:Li,panel:Ai,calendar:Ii,calendarHeader:Oi,month:Si,navigate:Ei,grid:Ti,weekday:Fi,dayCell:Bi,day:Pi,outside:Ki,selectedDay:zi,focusedDay:Hi,footer:qi,actions:Vi};function $s({autoFocus:e=!1,locale:t="pt-BR",onSelect:n,value:s,...r}){const a=Ni({...r,locale:t,onSelect:n,value:s}),l=Z.getLocalTimeZone(),c=i.useMemo(()=>new Intl.DateTimeFormat(t,{month:"long",year:"numeric"}),[t]),u=i.useMemo(()=>new Intl.DateTimeFormat(t,{dateStyle:"long"}),[t]),d=i.useMemo(()=>{const g=new Intl.DateTimeFormat(t,{weekday:"short"}),h=new Intl.DateTimeFormat(t,{weekday:"long"});return a.weeks[0].map(p=>{const _=p.date.toDate(l);return{curto:g.format(_).replace(".",""),longo:h.format(_)}})},[a.weeks,l,t]),m=c.format(a.visibleMonth.toDate(l));return o.jsxs("div",{className:me.calendar,children:[o.jsxs("div",{className:me.calendarHeader,children:[o.jsx("button",{"aria-label":"Mês anterior",className:me.navigate,onClick:()=>a.goToMonth(-1),type:"button",children:o.jsx(xn,{size:14})}),o.jsx("span",{"aria-live":"polite",className:me.month,children:m}),o.jsx("button",{"aria-label":"Próximo mês",className:me.navigate,onClick:()=>a.goToMonth(1),type:"button",children:o.jsx(Gt,{size:14})})]}),o.jsxs("table",{"aria-label":m,className:me.grid,onKeyDown:a.handleKeyDown,role:"grid",tabIndex:0,ref:g=>{e&&(g==null||g.focus())},children:[o.jsx("thead",{children:o.jsx("tr",{children:d.map(g=>o.jsx("th",{abbr:g.longo,className:me.weekday,scope:"col",children:g.curto},g.longo))})}),o.jsx("tbody",{children:a.weeks.map(g=>o.jsx("tr",{children:g.map(h=>{const p=a.isSelected(h.date),_=h.date.compare(a.focusedDate)===0;return o.jsx("td",{className:me.dayCell,children:o.jsx("button",{"aria-current":a.isToday(h.date)?"date":void 0,"aria-label":u.format(h.date.toDate(l)),"aria-pressed":p,className:[me.day,h.outside&&me.outside,p&&me.selectedDay,_&&me.focusedDay].filter(Boolean).join(" "),disabled:h.unavailable,onClick:()=>a.select(h.date),tabIndex:-1,type:"button",children:h.date.day})},h.date.toString())})},g[0].date.toString()))})]})]})}function Ui({defaultValue:e,name:t,disabled:n=!1,error:s,hint:r,id:a,isDateUnavailable:l,label:c,locale:u="pt-BR",max:d,min:m,onValueChange:g,placeholder:h="dd/mm/aaaa",required:p=!1,size:_="md",value:f}){const x=i.useRef(null),M=i.useRef(null),y=i.useRef(null),[b,D]=i.useState(!1),[$,k]=i.useState(e),C=f===void 0?$:f??void 0,[H,S]=i.useState(()=>C?mn(C.toString().split("-").reverse().join("")):""),[z,w]=i.useState(!1),[A,R]=i.useState(C);i.useEffect(()=>{b&&R(C)},[b]);const E=z?H:C?[String(C.day).padStart(2,"0"),String(C.month).padStart(2,"0"),C.year].join("/"):"";function F(j){f===void 0&&k(j),g==null||g(j)}function T(j=!0){var N;D(!1),j&&((N=y.current)==null||N.focus())}function O(j){const N=mn(j);w(!0),S(N);const I=ms(N),v=I&&!Jt(I,{isDateUnavailable:l,max:d,min:m})?I:void 0;F(v)}function K(j){j.key==="ArrowDown"&&!b&&(j.preventDefault(),D(!0))}const{overlayProps:L}=xe.useOverlay({isOpen:b,onClose:()=>T(!1),isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:j=>{var N;return!((N=x.current)!=null&&N.contains(j))}},M),{overlayProps:P}=xe.useOverlayPosition({targetRef:x,overlayRef:M,placement:"bottom start",offset:6,containerPadding:8,isOpen:b});return o.jsx(ze,{error:s,hint:r,id:a,label:c,required:p,children:({id:j,describedBy:N,invalid:I})=>o.jsxs(o.Fragment,{children:[t!==void 0&&o.jsx("input",{name:t,type:"hidden",value:(C==null?void 0:C.toString())??""}),o.jsxs("div",{className:[me.field,me[_],s&&me.error].filter(Boolean).join(" "),ref:x,children:[o.jsx("input",{"aria-describedby":N,"aria-invalid":I||void 0,"aria-required":p||void 0,autoComplete:"off",className:me.input,disabled:n,id:j,inputMode:"numeric",onBlur:()=>w(!1),onChange:v=>O(v.target.value),onKeyDown:K,placeholder:h,type:"text",value:E}),o.jsx("button",{"aria-expanded":b,"aria-haspopup":"dialog","aria-label":"Abrir calendário",className:me.trigger,disabled:n,onClick:()=>b?T():D(!0),ref:y,type:"button",children:o.jsx(yn,{size:15})})]}),b&&Oe.createPortal(o.jsxs("div",{...L,"aria-label":c?"Calendário de "+c:"Calendário",className:me.panel,onKeyDown:v=>{var B;v.key==="Escape"&&T(),(B=L.onKeyDown)==null||B.call(L,v)},ref:M,role:"dialog",style:P.style,children:[o.jsx($s,{autoFocus:!0,isDateUnavailable:l,locale:u,max:d,min:m,onSelect:R,value:A}),o.jsxs("div",{className:me.footer,children:[o.jsx(Ze,{onClick:()=>R(Z.today(Z.getLocalTimeZone())),size:"sm",variant:"ghost",type:"button",children:"Hoje"}),o.jsxs("div",{className:me.actions,children:[o.jsx(Ze,{onClick:()=>T(),size:"sm",variant:"secondary",type:"button",children:"Cancelar"}),o.jsx(Ze,{onClick:()=>{F(A),w(!1),T()},size:"sm",type:"button",children:"Aplicar"})]})]})]}),document.body)]})})}const Gi="_field_1p60x_1",Wi="_error_1p60x_19",Xi="_input_1p60x_47",Yi="_sm_1p60x_69",Qi="_md_1p60x_77",Zi="_trigger_1p60x_101",Ji="_panel_1p60x_151",ec="_slots_1p60x_171",tc="_slotInput_1p60x_185",nc="_slotList_1p60x_223",Fe={field:Gi,error:Wi,input:Xi,sm:Yi,md:Qi,trigger:Zi,panel:Ji,slots:ec,slotInput:tc,slotList:nc},Hn=e=>String(e).padStart(2,"0");function Qe(e){return e?Hn(e.hour)+":"+Hn(e.minute):""}function Ms(e){const t=e.replace(/\D/g,"").slice(0,4);return t.length<=2?t:t.slice(0,2)+":"+t.slice(2)}function hn(e){if(!/^\d{2}:\d{2}$/.test(e))return;const[t,n]=e.split(":").map(Number);return t>23||n>59?void 0:new Z.Time(t,n)}function sc(e,t=new Z.Time(0,0),n=new Z.Time(23,59)){if(e<=0)return[];const s=t.hour*60+t.minute,r=n.hour*60+n.minute,a=[];for(let l=s;l<=r;l+=e)a.push(new Z.Time(Math.floor(l/60),l%60));return a}function Ns({baseId:e,label:t="Horário",max:n,min:s,onChange:r,step:a=30,value:l}){const[c,u]=i.useState(()=>Qe(l)),[d,m]=i.useState(!1),g=i.useMemo(()=>sc(a,s,n).map(f=>({value:Qe(f),label:Qe(f)})),[n,s,a]),h=Qe(l),p=Xt({items:g,selectionMode:"single",value:l?[{value:h,label:h}]:[],onSelectionChange:([f])=>{const x=f&&hn(f.value);x&&(m(!1),r(x))}});function _(f){const x=Ms(f);m(!0),u(x);const M=hn(x);M&&r(M)}return o.jsxs("div",{className:Fe.slots,children:[o.jsx("input",{"aria-label":t+" em horas e minutos",autoComplete:"off",className:Fe.slotInput,inputMode:"numeric",onBlur:()=>m(!1),onChange:f=>_(f.target.value),placeholder:"hh:mm",type:"text",value:d?c:h}),o.jsx(Wt,{baseId:e,className:Fe.slotList,holdsFocus:!0,label:t,listing:p,onKeyDown:p.handleKeyDown})]})}function oc({defaultValue:e,name:t,disabled:n=!1,error:s,hint:r,id:a,label:l,max:c,min:u,step:d=30,onValueChange:m,placeholder:g="hh:mm",required:h=!1,size:p="md",value:_}){const f=i.useRef(null),x=i.useRef(null),M=`hora-${i.useId()}`,y=i.useRef(null),[b,D]=i.useState(!1),[$,k]=i.useState(e),[C,H]=i.useState(()=>Qe(e)),[S,z]=i.useState(!1),w=_===void 0?$:_??void 0,A=S?C:Qe(w);function R(L){_===void 0&&k(L),m==null||m(L)}function E(L=!0){var P;D(!1),L&&((P=y.current)==null||P.focus())}function F(L){const P=Ms(L);z(!0),H(P);const j=hn(P);j?R(j):P===""&&R(void 0)}function T(L){L.key==="ArrowDown"&&!b&&(L.preventDefault(),D(!0))}const{overlayProps:O}=xe.useOverlay({isOpen:b,onClose:()=>E(!1),isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:L=>{var P;return!((P=f.current)!=null&&P.contains(L))}},x),{overlayProps:K}=xe.useOverlayPosition({targetRef:f,overlayRef:x,placement:"bottom start",offset:6,containerPadding:8,isOpen:b});return o.jsx(ze,{error:s,hint:r,id:a,label:l,required:h,children:({id:L,describedBy:P,invalid:j})=>o.jsxs(o.Fragment,{children:[t!==void 0&&o.jsx("input",{name:t,type:"hidden",value:w?Qe(w):""}),o.jsxs("div",{className:[Fe.field,Fe[p],s&&Fe.error].filter(Boolean).join(" "),ref:f,children:[o.jsx("input",{"aria-describedby":P,"aria-invalid":j||void 0,"aria-required":h||void 0,autoComplete:"off",className:Fe.input,disabled:n,id:L,inputMode:"numeric",onBlur:()=>z(!1),onChange:N=>F(N.target.value),onKeyDown:T,placeholder:g,type:"text",value:A}),o.jsx("button",{"aria-expanded":b,"aria-haspopup":"dialog","aria-label":"Abrir seletor de hora",className:Fe.trigger,disabled:n,onClick:()=>b?E():D(!0),ref:y,type:"button",children:o.jsx(ns,{size:15})})]}),b&&Oe.createPortal(o.jsx("div",{...O,"aria-label":l?"Horas de "+l:"Horas",className:Fe.panel,onKeyDown:N=>{var I;N.key==="Escape"&&E(),(I=O.onKeyDown)==null||I.call(O,N)},ref:x,role:"dialog",style:K.style,children:o.jsx(Ns,{baseId:a??M,max:c,min:u,onChange:N=>{R(N),z(!1),E()},step:d,value:w})}),document.body)]})})}const ac="_field_pv9z2_1",rc="_error_pv9z2_19",lc="_input_pv9z2_47",ic="_sm_pv9z2_69",cc="_md_pv9z2_77",uc="_trigger_pv9z2_101",dc="_panel_pv9z2_151",fc="_columns_pv9z2_173",mc="_footer_pv9z2_195",hc="_actions_pv9z2_215",Te={field:ac,error:rc,input:lc,sm:ic,md:cc,trigger:uc,panel:dc,columns:fc,footer:mc,actions:hc},Ot=e=>String(e).padStart(2,"0");function _c(e){const t=e.replace(/\D/g,"").slice(0,12),n=mn(t.slice(0,8));if(t.length<=8)return n;const s=t.slice(8);return n+" "+(s.length<=2?s:s.slice(0,2)+":"+s.slice(2))}function pc(e){const[t,n=""]=e.trim().split(/\s+/),s=ms(t);if(!s)return;if(n==="")return new Z.CalendarDateTime(s.year,s.month,s.day,0,0);if(!/^\d{2}:\d{2}$/.test(n))return;const[r,a]=n.split(":").map(Number);if(!(r>23||a>59))return new Z.CalendarDateTime(s.year,s.month,s.day,r,a)}function qn(e){return e?[Ot(e.day),Ot(e.month),e.year].join("/")+" "+Ot(e.hour)+":"+Ot(e.minute):""}function gc({defaultValue:e,name:t,disabled:n=!1,error:s,hint:r,id:a,isDateUnavailable:l,label:c,locale:u="pt-BR",max:d,min:m,step:g=30,onValueChange:h,placeholder:p="dd/mm/aaaa hh:mm",required:_=!1,size:f="md",value:x}){const M=i.useRef(null),y=i.useRef(null),b=i.useRef(null),[D,$]=i.useState(!1),[k,C]=i.useState(e),[H,S]=i.useState(()=>qn(e)),[z,w]=i.useState(!1),A=x===void 0?k:x??void 0,[R,E]=i.useState(A);i.useEffect(()=>{D&&E(A)},[D]);const F=z?H:qn(A);function T(v){x===void 0&&C(v),h==null||h(v)}function O(v){E(new Z.CalendarDateTime(v.year,v.month,v.day,(R==null?void 0:R.hour)??0,(R==null?void 0:R.minute)??0))}function K(v){const B=R??Z.today(Z.getLocalTimeZone());E(new Z.CalendarDateTime(B.year,B.month,B.day,v.hour,v.minute))}function L(v=!0){var B;$(!1),v&&((B=b.current)==null||B.focus())}function P(v){const B=_c(v);w(!0),S(B);const V=pc(B),q=V&&Z.toCalendarDate(V);T(q&&!Jt(q,{isDateUnavailable:l,max:d,min:m})?V:void 0)}function j(v){v.key==="ArrowDown"&&!D&&(v.preventDefault(),$(!0))}const{overlayProps:N}=xe.useOverlay({isOpen:D,onClose:()=>L(!1),isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:v=>{var B;return!((B=M.current)!=null&&B.contains(v))}},y),{overlayProps:I}=xe.useOverlayPosition({targetRef:M,overlayRef:y,placement:"bottom start",offset:6,containerPadding:8,isOpen:D});return o.jsx(ze,{error:s,hint:r,id:a,label:c,required:_,children:({id:v,describedBy:B,invalid:V})=>o.jsxs(o.Fragment,{children:[t!==void 0&&o.jsx("input",{name:t,type:"hidden",value:(A==null?void 0:A.toString())??""}),o.jsxs("div",{className:[Te.field,Te[f],s&&Te.error].filter(Boolean).join(" "),ref:M,children:[o.jsx("input",{"aria-describedby":B,"aria-invalid":V||void 0,"aria-required":_||void 0,autoComplete:"off",className:Te.input,disabled:n,id:v,inputMode:"numeric",onBlur:()=>w(!1),onChange:q=>P(q.target.value),onKeyDown:j,placeholder:p,type:"text",value:F}),o.jsx("button",{"aria-expanded":D,"aria-haspopup":"dialog","aria-label":"Abrir calendário",className:Te.trigger,disabled:n,onClick:()=>D?L():$(!0),ref:b,type:"button",children:o.jsx(yn,{size:15})})]}),D&&Oe.createPortal(o.jsxs("div",{...N,"aria-label":c?"Calendário de "+c:"Calendário",className:Te.panel,onKeyDown:q=>{var X;q.key==="Escape"&&L(),(X=N.onKeyDown)==null||X.call(N,q)},ref:y,role:"dialog",style:I.style,children:[o.jsxs("div",{className:Te.columns,children:[o.jsx($s,{autoFocus:!0,isDateUnavailable:l,locale:u,max:d,min:m,onSelect:O,value:R&&new Z.CalendarDate(R.year,R.month,R.day)}),o.jsx(Ns,{baseId:(a??"datetime")+"-hora",onChange:K,step:g,value:R&&new Z.Time(R.hour,R.minute)})]}),o.jsxs("div",{className:Te.footer,children:[o.jsx(Ze,{onClick:()=>E(Z.toCalendarDateTime(Z.now(Z.getLocalTimeZone())).set({second:0,millisecond:0})),size:"sm",variant:"ghost",type:"button",children:"Agora"}),o.jsxs("div",{className:Te.actions,children:[o.jsx(Ze,{onClick:()=>L(),size:"sm",variant:"secondary",type:"button",children:"Cancelar"}),o.jsx(Ze,{onClick:()=>{T(R),w(!1),L()},size:"sm",type:"button",children:"Aplicar"})]})]})]}),document.body)]})})}const bc="_figure_gr8jr_1",yc="_title_gr8jr_9",xc="_body_gr8jr_20",vc="_plot_gr8jr_29",jc="_plotFill_gr8jr_37",$c="_bodyColumn_gr8jr_42",Mc="_bodyRow_gr8jr_46",Nc="_canvas_gr8jr_51",wc="_empty_gr8jr_58",Dc="_axisLine_gr8jr_67",kc="_axisLabel_gr8jr_72",Rc="_gutter_gr8jr_80",Cc="_dynamicAxis_gr8jr_87",Lc="_slideRight_gr8jr_101",Ac="_slideLeft_gr8jr_105",Ic="_slideUp_gr8jr_109",Oc="_gridLine_gr8jr_113",Sc="_gridBaseline_gr8jr_118",Ec="_cursor_gr8jr_159",Tc="_legend_gr8jr_164",Fc="_legendLeft_gr8jr_175",Bc="_legendCenter_gr8jr_179",Pc="_legendRight_gr8jr_183",Kc="_legendSide_gr8jr_187",zc="_legendItem_gr8jr_196",Hc="_legendButton_gr8jr_197",qc="_legendOff_gr8jr_245",Vc="_swatch_gr8jr_249",Uc="_swatchDot_gr8jr_269",Gc="_legendLabel_gr8jr_274",Wc="_legendValue_gr8jr_281",ee={figure:bc,title:yc,body:xc,plot:vc,plotFill:jc,bodyColumn:$c,bodyRow:Mc,canvas:Nc,empty:wc,axisLine:Dc,axisLabel:kc,gutter:Rc,dynamicAxis:Cc,slideRight:Lc,slideLeft:Ac,slideUp:Ic,gridLine:Oc,gridBaseline:Sc,cursor:Ec,legend:Tc,legendLeft:Fc,legendCenter:Bc,legendRight:Pc,legendSide:Kc,legendItem:zc,legendButton:Hc,legendOff:qc,swatch:Vc,swatchDot:Uc,legendLabel:Gc,legendValue:Wc};function $n({offset:e,orientation:t="vertical",plot:n,size:s}){const r=t==="vertical";return o.jsx("rect",{className:ee.cursor,height:r?n.height:s,width:r?s:n.width,x:r?e:0,y:r?0:e})}const re=8,rn=12,_n=.24;function kt(e){return e.lineHeight+re/2}const Vn=2,ws={offset:0,thickness:0};function Ds(e,t){const n=t.reduce((r,a)=>r+a,0),s=Math.max((e-Vn*Math.max(n-1,0))/Math.max(n,1),0);return t.map((r,a)=>({offset:t.slice(0,a).reduce((l,c)=>l+(s+Vn)*c,0),thickness:s*r}))}function en(e,t){return Math.max(Math.min(e,t)-re*2,0)}const Xc={bottom:"middle",left:"end",right:"start"};function Yc({hideLine:e=!1,labelRotation:t=0,length:n,orientation:s,ticks:r}){const a=s==="bottom",l=s==="left"?-re:re;return o.jsxs("g",{"aria-hidden":"true",className:ee.axis,children:[!e&&o.jsx("line",{className:ee.axisLine,x1:0,x2:a?n:0,y1:0,y2:a?0:n}),r.map((c,u)=>o.jsx("text",{className:ee.axisLabel,dominantBaseline:a?"hanging":"middle",textAnchor:a&&t!==0?"end":Xc[s],transform:a&&t!==0?`rotate(${-t} ${c.position} ${re})`:void 0,x:a?c.position:l,y:a?re:c.position,children:c.label},u))]})}function Qc({baseline:e,length:t,lines:n,orientation:s}){const r=s==="horizontal";return o.jsx("g",{"aria-hidden":"true",children:n.map((a,l)=>o.jsx("line",{className:a===e?ee.gridBaseline:ee.gridLine,x1:r?0:a,x2:r?t:a,y1:r?a:0,y2:r?a:t},l))})}const ln={family:"sans-serif",headingFamily:"sans-serif",lineHeight:16,size:12},Zc=.58;function Un(e){if(!e||typeof getComputedStyle!="function")return ln;const t=getComputedStyle(e),n=t.getPropertyValue("--pl-font-body").trim()||t.fontFamily||ln.family,s=t.getPropertyValue("--pl-font-heading").trim()||n,r=Number.parseFloat(t.getPropertyValue("--pl-type-caption-size"))||ln.size,a=Number.parseFloat(t.getPropertyValue("--pl-type-caption-line-height"));return{family:n,headingFamily:s,lineHeight:a||r*1.34,size:r}}let St;function Jc(){if(St===void 0)try{St=document.createElement("canvas").getContext("2d")}catch{St=null}return St}function Je(e,t){const n=e.length*t.size*Zc,s=Jc();return s?(s.font=`${t.size}px ${t.family}`,s.measureText(e).width||n):n}function ft(e,t){return e.reduce((n,s)=>Math.max(n,Je(s,t)),0)}function ct(e,t,n){if(n<=0)return"";if(Je(e,t)<=n)return e;let s=e.length;for(;s>0&&Je(`${e.slice(0,s)}…`,t)>n;)s-=1;return s>0?`${e.slice(0,s)}…`:""}function Pe(e,{includeZero:t=!0}={}){const n=e.filter(Number.isFinite);if(n.length===0)return{min:0,max:0};const[s=0,r=0]=fn.extent(n);return{min:t?Math.min(s,0):s,max:t?Math.max(r,0):r}}function ks(e){const t=[0];let n=0;for(const s of e)n+=Number.isFinite(s)?s:0,t.push(n);return t}function ut(e){return e.length===0?{min:0,max:0}:{min:fn.min(e,t=>t.min)??0,max:fn.max(e,t=>t.max)??0}}function eu({min:e,max:t}){return e===t?[e,e+1]:[e,t]}function ye({clamp:e=!1,domain:t,nice:n=!0,range:s}){const r=Ut.scaleLinear().domain(eu(t)).range(s).clamp(e);return n?r.nice():r}function Mn({domain:e,padding:t=.2,range:n}){return Ut.scaleBand().domain([...e]).range(n).paddingInner(t).paddingOuter(t/2)}function Rs({domain:e,padding:t=.5,range:n}){return Ut.scalePoint().domain([...e]).range(n).padding(t)}function tu(e,t){return Ut.scaleSqrt().domain([0,e>0?e:1]).range(t)}function Ke(e,t,n){return e.ticks(Math.max(2,Math.min(10,Math.floor(t/64))))}function $e(e,t){return{fillHeight:e==="fill",value:e==="fill"?t:e}}function Gn(e,t,n){return e==="hidden"?0:ft(t,n)+re}function nu(e,t,n){return e.length===0||n<=0||ft(e,t)+re<=n?0:n*Math.SQRT1_2>=t.lineHeight?45:90}function su(e,t,n,s){if(s==="hidden")return 0;if(n===0)return t.lineHeight+re;const r=n*Math.PI/180;return ft(e,t)*Math.sin(r)+t.lineHeight*Math.cos(r)+re}function mt({bottomLabels:e,font:t,height:n,labelAngle:s,leftLabels:r,rightLabels:a,topRoom:l,width:c,xAxis:u,yAxis:d,yAxisRight:m}){const g=u==="hidden"?0:ft(e,t)/2,h=Math.max(Gn(d,r,t),rn),p=Math.max(Gn(m,a,t),rn),_=Math.max(c-h-p,0),f=s==="auto"?nu(e,t,_/Math.max(e.length,1)):s,x=f===0?g:0,M={bottom:su(e,t,f,u),left:Math.max(h,x),right:Math.max(p,x),top:Math.max(l,rn)};return{margins:M,plot:{width:Math.max(c-M.left-M.right,0),height:Math.max(n-M.top-M.bottom,0)},rotation:f}}function Ve(e,t,n){const s=ye({domain:e,range:[t,0]});return Ke(s,t).map(n)}const Nn=Math.PI*2;function ou(e,{endAngle:t=Nn,padAngle:n=0,startAngle:s=0}={}){return it.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 Nt({cornerRadius:e=0,endAngle:t,innerRadius:n,outerRadius:s,padAngle:r=0,startAngle:a}){return it.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 au({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 Wn(e,t){const n=(e.startAngle+e.endAngle)/2-Math.PI/2;return[Math.cos(n)*t,Math.sin(n)*t]}const cn=[{display:!0,lineHeight:44,size:36},{display:!0,lineHeight:32,size:24},{display:!1,lineHeight:24,size:16}];function Cs(e,t,n,s){const r=Math.max(s-re*2,0),a=cn.find(c=>Je(e,{...n,family:c.display?n.headingFamily:n.family,size:c.size})<=r)??cn[cn.length-1],l=a.display?n.headingFamily:n.family;return{family:l,label:ct(t,n,r),lineHeight:a.lineHeight,size:a.size,value:ct(e,{...n,family:l,size:a.size},r)}}const ru={left:ee.legendLeft,center:ee.legendCenter,right:ee.legendRight};function lu({align:e="center",entries:t,onToggle:n,position:s,swatch:r="square"}){const a=s==="left"||s==="right";return o.jsx("ul",{className:`${ee.legend} ${a?ee.legendSide:ru[e]}`,children:t.map(l=>{const c=o.jsxs(o.Fragment,{children:[o.jsx("span",{"aria-hidden":"true",className:`${ee.swatch} ${r==="dot"?ee.swatchDot:""}`,style:l.hidden?void 0:{background:l.color}}),o.jsx("span",{className:ee.legendLabel,children:l.label}),l.value!==void 0&&o.jsx("span",{className:ee.legendValue,children:l.value})]});return o.jsx("li",{className:ee.legendItem,children:n?o.jsx("button",{"aria-pressed":!l.hidden,className:`${ee.legendButton} ${l.hidden?ee.legendOff:""}`,onClick:()=>n(l.label),type:"button",children:c}):c},l.label)})})}function et({children:e,centerOrigin:t=!1,containerRef:n,empty:s,emptyMessage:r,fillHeight:a,height:l,legend:c,legendAlign:u,legendPosition:d,minLegendEntries:m=1,onToggleSeries:g,swatch:h="square",title:p,width:_}){const f=i.useId(),x=d==="left"||d==="right",M=d!=="none"&&c!==void 0&&c.length>=m&&o.jsx(lu,{align:u,entries:c,onToggle:g,position:d,swatch:h});return o.jsxs("figure",{className:ee.figure,children:[o.jsx("figcaption",{className:ee.title,id:f,children:p}),o.jsxs("div",{className:`${ee.body} ${x?ee.bodyRow:ee.bodyColumn}`,children:[(d==="top"||d==="left")&&M,o.jsx("div",{className:`${ee.plot} ${a?ee.plotFill:""}`,ref:n,style:a?void 0:{minHeight:l},children:s?o.jsx("p",{className:ee.empty,children:r}):_===0||l===0?null:o.jsx("svg",{"aria-labelledby":f,className:ee.canvas,height:l,role:"img",viewBox:`0 0 ${_} ${l}`,width:_,children:t?o.jsx("g",{transform:`translate(${_/2} ${l/2})`,children:e}):e})}),(d==="bottom"||d==="right")&&M]})]})}const iu={bottom:ee.slideUp,left:ee.slideRight,right:ee.slideLeft};function un({axis:e,gutter:t,length:n,orientation:s}){const r=e.visibility??"visible";if(r==="hidden")return null;const a=r==="onHover",l=o.jsx(Yc,{hideLine:e.hideLine,labelRotation:e.labelRotation,length:n,orientation:s,ticks:e.ticks});return a?o.jsxs("g",{className:`${ee.dynamicAxis} ${iu[s]}`,children:[o.jsx("rect",{className:ee.gutter,height:t.height,width:t.width,x:t.x,y:t.y}),l]}):l}function ht({children:e,containerRef:t,empty:n,emptyMessage:s,fillHeight:r,grid:a,height:l,legend:c,legendAlign:u,legendPosition:d,margins:m,onToggleSeries:g,plot:h,title:p,width:_,xAxis:f,yAxis:x,yAxisRight:M}){return o.jsx(et,{containerRef:t,empty:n,emptyMessage:s,fillHeight:r,height:l,legend:c,legendAlign:u,legendPosition:d,minLegendEntries:2,onToggleSeries:g,title:p,width:_,children:o.jsxs("g",{transform:`translate(${m.left} ${m.top})`,children:[a==null?void 0:a.map(y=>o.jsx(Qc,{baseline:y.baseline,length:y.orientation==="horizontal"?h.width:h.height,lines:y.lines,orientation:y.orientation},y.orientation)),e,o.jsx("g",{transform:`translate(0 ${h.height})`,children:o.jsx(un,{axis:f,gutter:{height:m.bottom,width:h.width,x:0,y:0},length:h.width,orientation:"bottom"})}),o.jsx(un,{axis:x,gutter:{height:h.height,width:m.left,x:-m.left,y:0},length:h.height,orientation:"left"}),M&&o.jsx("g",{transform:`translate(${h.width} 0)`,children:o.jsx(un,{axis:M,gutter:{height:h.height,width:m.right,x:0,y:0},length:h.height,orientation:"right"})})]})})}function Ls(e){return e==="smooth"?it.curveMonotoneX:it.curveLinear}function wn(e,t){return it.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(Ls(t))(e)??""}function cu(e,t){return it.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(Ls(t))(e)??""}function Dn(e,t,n,s,r){const a=Math.max(Math.min(n,s)/2,0),[l,c,u,d]=r.map(h=>Math.max(Math.min(h,a),0)),m=e+n,g=t+s;return[`M${e+l},${t}`,`L${m-c},${t}`,c?`Q${m},${t} ${m},${t+c}`:"",`L${m},${g-u}`,u?`Q${m},${g} ${m-u},${g}`:"",`L${e+d},${g}`,d?`Q${e},${g} ${e},${g-d}`:"",`L${e},${t+l}`,l?`Q${e},${t} ${e+l},${t}`:"","Z"].filter(Boolean).join("")}function uu(e,{label:t,threshold:n}){const s=e.reduce((u,d)=>u+Math.max(d.value,0),0);if(n<=0||s<=0)return e;const r=u=>Math.max(u.value,0)/s<n,a=e.filter(r);if(a.length<2)return e;const l={intent:"neutral",label:t,value:a.reduce((u,d)=>u+Math.max(d.value,0),0)};let c=!1;return e.flatMap(u=>r(u)?c?[]:(c=!0,[l]):[u])}const pn=5;function du(e){return!e||typeof getComputedStyle!="function"?pn:Number.parseFloat(getComputedStyle(e).getPropertyValue("--pl-radius-sm"))||pn}function Me(){const[e,t]=i.useState(()=>({font:Un(null),height:0,radius:pn,width:0})),n=i.useRef(null),s=i.useCallback(()=>{const a=n.current,l=(a==null?void 0:a.clientWidth)??0,c=(a==null?void 0:a.clientHeight)??0,u=Un(a),d=du(a);t(m=>m.width===l&&m.height===c&&m.radius===d&&m.font.family===u.family&&m.font.size===u.size&&m.font.lineHeight===u.lineHeight?m:{font:u,height:c,radius:d,width:l})},[]),r=i.useCallback(a=>{n.current=a,s()},[s]);return i.useEffect(()=>{const a=n.current;if(!a||typeof ResizeObserver>"u")return;const l=new ResizeObserver(s);return l.observe(a),()=>l.disconnect()},[s]),{font:e.font,height:e.height,radius:e.radius,ref:r,width:e.width}}function kn(e){const[t,n]=i.useState(null);return{hover:s=>{n(s),e==null||e(s)},hovered:t}}function He({defaultHiddenSeries:e=[],hiddenSeries:t,onHiddenSeriesChange:n}){const[s,r]=i.useState(e),a=t??s,l=i.useCallback(c=>{const u=a.includes(c)?a.filter(d=>d!==c):[...a,c];t===void 0&&r(u),n==null||n(u)},[t,a,n]);return{isHidden:i.useCallback(c=>a.includes(c),[a]),toggle:l}}const qt=6;function Vt(e){return Array.from({length:Math.max(e,0)},(t,n)=>`var(--pl-chart-series-${n%qt+1})`)}const fu={"#49619c":1,"#f26b35":2,"#6e2a92":3};function As(e,t){if(t<=0)return[];const n=fu[e.trim().toLowerCase()],s=Vt(qt).filter((r,a)=>n===void 0||a+1!==n);return[e,...Array.from({length:t-1},(r,a)=>s[a%s.length])]}const Kt={positive:"var(--pl-chart-positive)",negative:"var(--pl-chart-negative)",warning:"var(--pl-chart-warning)",neutral:"var(--pl-chart-neutral)"};function Ne(e,{accent:t}={}){const n=e.filter(a=>!a.color&&!a.intent).length,s=t?As(t,n):Vt(n);let r=0;return e.map(a=>{if(a.color)return a.color;if(a.intent)return Kt[a.intent];const l=s[r]??Vt(qt)[r%qt];return r+=1,l})}const mu=320;function hu(){return typeof matchMedia=="function"&&!matchMedia("(prefers-reduced-motion: reduce)").matches}function _u(e){return 1-(1-e)**3}function De(e,{duration:t=mu,from:n}={}){const[s,r]=i.useState(n??e),a=i.useRef(n??e),l=e.join(",");return i.useEffect(()=>{const c=a.current,u=h=>{a.current=h,r(h)};if(c.length!==e.length||t<=0||!hu()){u(e);return}const d=performance.now();let m=0;const g=()=>{const h=Math.min((performance.now()-d)/t,1),p=_u(h);u(c.map((_,f)=>_+(e[f]-_)*p)),h<1&&(m=requestAnimationFrame(g))};return m=requestAnimationFrame(g),()=>cancelAnimationFrame(m)},[l,t]),s}function Is({accent:e,defaultHiddenSlices:t,hiddenSlices:n,onHiddenSlicesChange:s,onHoverSlice:r,otherLabel:a,slices:l,smallSliceThreshold:c}){const{isHidden:u,toggle:d}=He({defaultHiddenSeries:t,hiddenSeries:n,onHiddenSeriesChange:s}),[m,g]=i.useState(null),h=i.useMemo(()=>uu(l,{label:a,threshold:c}),[a,l,c]),p=i.useMemo(()=>Ne(h,{accent:e}),[e,h]),_=h.map(b=>u(b.label)||!Number.isFinite(b.value)?0:Math.max(b.value,0)),f=_.reduce((b,D)=>b+D,0),x=i.useMemo(()=>ou(_).flatMap(b=>[b.startAngle,b.endAngle]),[_.join()]),M=De(x,{from:x.map(()=>0)});return{angles:h.map((b,D)=>({startAngle:M[D*2]??0,endAngle:M[D*2+1]??0})),colors:p,focus:b=>{g(b),r==null||r(b===null?null:h[b]??null)},focused:m,isHidden:u,ratioOf:b=>f>0?(_[b]??0)/f:0,slices:h,toggle:d,total:f,values:_}}const pu="_bar_72sfu_3",gu="_series_72sfu_7 _series_gr8jr_208",bu="_seriesOff_72sfu_11 _seriesOff_gr8jr_212",yu="_valueLabel_72sfu_15 _valueLabel_gr8jr_123",Et={bar:pu,series:gu,seriesOff:bu,valueLabel:yu};function xu({accent:e,categories:t,defaultHiddenSeries:n,emptyMessage:s="Sem dados no período",formatValue:r=je,height:a=260,hiddenSeries:l,labelAngle:c="auto",legend:u="bottom",legendAlign:d,onHiddenSeriesChange:m,onHoverCategory:g,orientation:h="vertical",series:p,showDataLabels:_=!1,stacked:f=!1,title:x,xAxis:M="visible",yAxis:y="visible",yAxisRight:b="hidden"}){const{font:D,height:$,radius:k,ref:C,width:H}=Me(),{fillHeight:S,value:z}=$e(a,$),{isHidden:w,toggle:A}=He({defaultHiddenSeries:n,hiddenSeries:l,onHiddenSeriesChange:m}),{hover:R,hovered:E}=kn(g),F=h==="vertical",T=i.useMemo(()=>Ne(p,{accent:e}),[e,p]),O=De(p.map(W=>w(W.label)?0:1)),K=W=>O[W]??0,L=i.useMemo(()=>{const W=p.filter(ae=>!w(ae.label));return f?Pe(t.flatMap((ae,ve)=>ks(W.map(de=>de.values[ve]??0)))):ut(W.map(ae=>Pe([...ae.values])))},[t,w,p,f]),P=!F&&(u==="left"||u==="right")?"bottom":u,j=Ve(L,F?z:H,r),{margins:N,plot:I,rotation:v}=mt({bottomLabels:F?t:j,font:D,height:z,labelAngle:c,leftLabels:F?j:t,rightLabels:F?j:t,topRoom:_&&F?kt(D):0,width:H,xAxis:M,yAxis:y,yAxisRight:b}),B=F?I.width:I.height,V=F?I.height:I.width,q=F?V:0,X=F?0:V,le=i.useMemo(()=>Mn({domain:t,range:[0,B]}),[t,B]),te=i.useMemo(()=>ye({domain:L,range:[q,X]}),[L,X,q]),[ie,Y]=De(te.domain()),Q=i.useMemo(()=>ye({domain:{min:ie,max:Y},nice:!1,range:[q,X]}),[X,q,Y,ie]),he=Ke(te,V),U=le.bandwidth(),J=Ds(U,O);function oe(W){return J[W]??ws}function fe(W){return f?U:oe(W).thickness}function pe(W){return f?0:oe(W).offset}function qe(W,ae){const ve=p[W].values[ae];return(Number.isFinite(ve)?ve:0)*(f?K(W):1)}function tt(W,ae){if(!f)return[k,k,k,k];const ve=p.map((ue,ce)=>ce).filter(ue=>qe(ue,ae)!==0),de=ve[0]===W,se=ve.at(-1)===W;return F?[se?k:0,se?k:0,de?k:0,de?k:0]:[de?k:0,se?k:0,se?k:0,de?k:0]}const tn=t.map(W=>({label:W,position:(le(W)??0)+U/2})),Rt=he.map(W=>({label:r(W),position:Q(W)})),G={labelRotation:v,ticks:tn},ge={hideLine:!0,ticks:Rt};return o.jsxs(ht,{containerRef:C,empty:p.length===0||t.length===0,emptyMessage:s,fillHeight:S,grid:[{baseline:Q(0),lines:he.map(W=>Q(W)),orientation:F?"horizontal":"vertical"}],height:z,legend:p.map((W,ae)=>({color:T[ae],hidden:w(W.label),label:W.label})),legendAlign:d,legendPosition:P,margins:N,onToggleSeries:A,plot:I,title:x,width:H,xAxis:{...F?G:ge,visibility:M},yAxis:{...F?ge:G,visibility:y},yAxisRight:{...F?ge:G,hideLine:!0,visibility:b},children:[E!==null&&o.jsx($n,{offset:le(t[E])??0,orientation:h,plot:I,size:U}),p.map((W,ae)=>{const ve=w(W.label);return o.jsxs("g",{"aria-hidden":ve||void 0,className:`${Et.series} ${ve?Et.seriesOff:""}`,children:[t.map((de,se)=>{const ue=le(de)??0,ce=f?p.slice(0,ae).reduce((Ss,df,Es)=>Ss+qe(Es,se),0):0,Se=Q(ce),nn=Q(ce+qe(ae,se)),Rn=Math.abs(nn-Se),Cn=fe(ae),Ln=pe(ae);return o.jsx("path",{"aria-label":`${W.label}, ${de}: ${r(W.values[se]??0)}`,className:Et.bar,d:Dn(F?ue+Ln:Math.min(Se,nn),F?Math.min(Se,nn):ue+Ln,F?Cn:Rn,F?Rn:Cn,tt(ae,se)),fill:T[ae],onMouseEnter:()=>R(se),onMouseLeave:()=>R(null)},de)}),_&&!f&&t.map((de,se)=>{const ue=W.values[se]??0,ce=Q(ue),Se=(le(de)??0)+pe(ae)+fe(ae)/2;return o.jsx("text",{className:Et.valueLabel,dominantBaseline:F?"auto":"middle",textAnchor:F?"middle":"start",x:F?Se:ce+6,y:F?ce-6:Se,children:r(ue)},de)})]},W.label)})]})}const vu="_line_1r7tk_1 _line_gr8jr_131",ju="_dot_1r7tk_5 _dot_gr8jr_139",$u="_dotVisible_1r7tk_9 _dotVisible_gr8jr_144",Mu="_valueLabel_1r7tk_13 _valueLabel_gr8jr_123",Nu="_series_1r7tk_17 _series_gr8jr_208",wu="_seriesOff_1r7tk_21 _seriesOff_gr8jr_212",ot={line:vu,dot:ju,dotVisible:$u,valueLabel:Mu,series:Nu,seriesOff:wu};function Du(e,t){return e[t]!==null&&!e[t-1]&&!e[t+1]}function ku({accent:e,categories:t,curve:n="smooth",defaultHiddenSeries:s,emptyMessage:r="Sem dados no período",formatValue:a=je,height:l=260,includeZero:c=!0,hiddenSeries:u,labelAngle:d="auto",legend:m="bottom",legendAlign:g,onHiddenSeriesChange:h,series:p,showDataLabels:_=!1,showDots:f=!1,title:x,xAxis:M="visible",yAxis:y="visible",yAxisRight:b="hidden"}){const{font:D,height:$,ref:k,width:C}=Me(),{fillHeight:H,value:S}=$e(l,$),{isHidden:z,toggle:w}=He({defaultHiddenSeries:s,hiddenSeries:u,onHiddenSeriesChange:h}),A=i.useMemo(()=>Ne(p,{accent:e}),[e,p]),R=i.useMemo(()=>ut(p.filter(q=>!z(q.label)).map(q=>Pe(q.values.filter(X=>X!==null),{includeZero:c}))),[c,z,p]),E=Ve(R,S,a),{margins:F,plot:T,rotation:O}=mt({bottomLabels:t,font:D,height:S,labelAngle:d,leftLabels:E,rightLabels:E,topRoom:_?kt(D):0,width:C,xAxis:M,yAxis:y,yAxisRight:b}),K=i.useMemo(()=>Rs({domain:t,padding:0,range:[0,T.width]}),[t,T.width]),L=i.useMemo(()=>ye({domain:R,range:[T.height,0]}),[R,T.height]),[P,j]=De(L.domain()),N=i.useMemo(()=>ye({domain:{min:P,max:j},nice:!1,range:[T.height,0]}),[j,P,T.height]),I=Ke(L,T.height),v=p.map(q=>t.map((X,le)=>{const te=q.values[le];return te==null||!Number.isFinite(te)?null:{x:K(X)??0,y:N(te)}})),B=t.map(q=>({label:q,position:K(q)??0})),V=I.map(q=>({label:a(q),position:N(q)}));return o.jsx(ht,{containerRef:k,empty:p.length===0||t.length===0,emptyMessage:r,fillHeight:H,grid:[{baseline:N(0),lines:I.map(q=>N(q)),orientation:"horizontal"}],height:S,legend:p.map((q,X)=>({color:A[X],hidden:z(q.label),label:q.label})),legendAlign:g,legendPosition:m,margins:F,onToggleSeries:w,plot:T,title:x,width:C,xAxis:{labelRotation:O,ticks:B,visibility:M},yAxis:{hideLine:!0,ticks:V,visibility:y},yAxisRight:{hideLine:!0,ticks:V,visibility:b},children:p.map((q,X)=>{const le=z(q.label);return o.jsxs("g",{"aria-hidden":le||void 0,className:`${ot.series} ${le?ot.seriesOff:""}`,children:[o.jsx("path",{className:ot.line,d:wn(v[X],n),fill:"none",stroke:A[X]}),v[X].map((te,ie)=>te===null?null:o.jsx("circle",{"aria-label":`${q.label}, ${t[ie]}: ${a(q.values[ie]??0)}`,className:f||Du(v[X],ie)?ot.dotVisible:ot.dot,cx:te.x,cy:te.y,fill:A[X],r:4},t[ie])),_&&v[X].map((te,ie)=>te===null?null:o.jsx("text",{className:ot.valueLabel,textAnchor:"middle",x:te.x,y:te.y-10,children:a(q.values[ie]??0)},t[ie]))]},q.label)})})}const Ru="_area_1qxb1_3",Cu="_tooltip_1qxb1_8",Lu="_title_1qxb1_19",Au="_subtitle_1qxb1_28",Iu="_grid_1qxb1_37",Ou="_label_1qxb1_44",Su="_swatch_1qxb1_58",Eu="_value_1qxb1_67",Tu="_computed_1qxb1_79 _value_1qxb1_67",Fu="_emphasis_1qxb1_85",Bu="_rule_1qxb1_91",Pu="_totalLabel_1qxb1_97",Ku="_totalValue_1qxb1_102",_e={area:Ru,tooltip:Cu,title:Lu,subtitle:Au,grid:Iu,label:Ou,swatch:Su,value:Eu,computed:Tu,emphasis:Fu,rule:Bu,totalLabel:Pu,totalValue:Ku},at=16,Tt=8;function gn(e){return e.reduce((t,n)=>t+n,0)}function zu(e,t){return typeof e=="function"?e(t):e==="average"?t.length===0?0:gn(t)/t.length:gn(t)}function Hu({x:e,y:t},n,s){const r=e+at+n<=window.innerWidth-Tt,a=t+at+s<=window.innerHeight-Tt;return{x:r?e+at:Math.max(e-at-n,Tt),y:a?t+at:Math.max(t-at-s,Tt)}}function qu({children:e,columns:t,computed:n,rows:s,showTotal:r=!1,subtitle:a,title:l,totalLabel:c="Total"}){const[u,d]=i.useState(null),m=u!==null&&s.length>0;i.useEffect(()=>{if(!m)return;const h=()=>d(null);return window.addEventListener("scroll",h,!0),window.addEventListener("resize",h),window.addEventListener("keydown",h),()=>{window.removeEventListener("scroll",h,!0),window.removeEventListener("resize",h),window.removeEventListener("keydown",h)}},[m]);const g=h=>d({x:h.clientX,y:h.clientY});return o.jsxs("div",{className:_e.area,onPointerLeave:()=>d(null),onPointerMove:g,children:[e,m&&Oe.createPortal(o.jsx(Vu,{columns:t,computed:n,ponteiro:u,rows:s,showTotal:r,subtitle:a,title:l,totalLabel:c}),document.body)]})}function Vu({columns:e,computed:t,ponteiro:n,rows:s,showTotal:r,subtitle:a,title:l,totalLabel:c}){const u=i.useRef(null),[d,m]=i.useState({altura:0,largura:0});i.useLayoutEffect(()=>{const $=u.current;if(!$)return;const{height:k,width:C}=$.getBoundingClientRect();(k!==d.altura||C!==d.largura)&&m({altura:k,largura:C})});const g=s.reduce(($,k)=>Math.max($,k.values.length),0),h=e??Array.from({length:g},()=>({})),p=t==="none"||h.length===0?void 0:t??{},_=(p==null?void 0:p.column)??h.length-1,f=gn(s.map($=>$.values[_]??0)),x=(p==null?void 0:p.compute)??(($,k)=>k===0?0:$/k),M=(p==null?void 0:p.format)??($=>fs($,{casasDecimais:2})),{x:y,y:b}=Hu(n,d.largura,d.altura),D=`1fr ${"auto ".repeat(h.length+(p?1:0))}`.trim();return o.jsxs("div",{"aria-hidden":"true",className:_e.tooltip,ref:u,style:{left:y,top:b},children:[l!==void 0&&o.jsx("p",{className:_e.title,children:l}),a!==void 0&&o.jsx("p",{className:_e.subtitle,children:a}),o.jsxs("div",{className:_e.grid,style:{gridTemplateColumns:D},children:[s.map($=>o.jsxs(i.Fragment,{children:[o.jsxs("span",{className:`${_e.label} ${$.emphasis?_e.emphasis:""}`,children:[$.color!==void 0&&o.jsx("span",{className:_e.swatch,style:{background:$.color}}),$.label]}),h.map((k,C)=>o.jsx("span",{className:`${_e.value} ${$.emphasis?_e.emphasis:""}`,children:(k.format??String)($.values[C]??0)},C)),p&&o.jsx("span",{className:`${_e.computed} ${$.emphasis?_e.emphasis:""}`,children:M(x($.values[_]??0,f))})]},$.label)),r&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:_e.rule}),o.jsx("span",{className:`${_e.label} ${_e.totalLabel}`,children:c}),h.map(($,k)=>o.jsx("span",{className:`${_e.value} ${_e.totalValue}`,children:$.total==="none"?"":($.format??String)(zu($.total??"sum",s.map(C=>C.values[k]??0)))},k)),p&&o.jsx("span",{className:`${_e.computed} ${_e.totalValue}`,children:M(x(f,f))})]})]})]})}const Uu="_bar_ycvom_1",Gu="_line_ycvom_5 _line_gr8jr_131",Wu="_dot_ycvom_9 _dot_gr8jr_139",Xu="_dotVisible_ycvom_13 _dotVisible_gr8jr_144",Yu="_valueLabel_ycvom_17 _valueLabel_gr8jr_123",Qu="_series_ycvom_21 _series_gr8jr_208",Zu="_seriesOff_ycvom_25 _seriesOff_gr8jr_212",Ce={bar:Uu,line:Gu,dot:Wu,dotVisible:Xu,valueLabel:Yu,series:Qu,seriesOff:Zu};function Ju(e,t){return e[t]!==null&&!e[t-1]&&!e[t+1]}function zt(e){return e.axis??"left"}function Xn(e,t,n){return ut(e.filter(s=>zt(s)===t&&!n(s.label)).map(s=>Pe(s.values.filter(r=>r!==null))))}function ed({accent:e,categories:t,curve:n="smooth",defaultHiddenSeries:s,emptyMessage:r="Sem dados no período",formatRightValue:a,formatValue:l=je,height:c=260,hiddenSeries:u,labelAngle:d="auto",legend:m="bottom",legendAlign:g,onHiddenSeriesChange:h,onHoverCategory:p,series:_,showDataLabels:f=!1,showDots:x=!1,title:M,xAxis:y="visible",yAxis:b="visible",yAxisRight:D}){const{font:$,height:k,radius:C,ref:H,width:S}=Me(),{fillHeight:z,value:w}=$e(c,k),{isHidden:A,toggle:R}=He({defaultHiddenSeries:s,hiddenSeries:u,onHiddenSeriesChange:h}),{hover:E,hovered:F}=kn(p),T=a??l,O=_.some(G=>zt(G)==="right"),K=i.useMemo(()=>Ne(_,{accent:e}),[e,_]),L=De(_.map(G=>A(G.label)?0:1)),P=i.useMemo(()=>Xn(_,"left",A),[A,_]),j=i.useMemo(()=>O?Xn(_,"right",A):P,[P,A,_,O]),N=D??(O?"visible":"hidden"),{margins:I,plot:v,rotation:B}=mt({bottomLabels:t,font:$,height:w,labelAngle:d,leftLabels:Ve(P,w,l),rightLabels:Ve(j,w,T),topRoom:f?kt($):0,width:S,xAxis:y,yAxis:b,yAxisRight:N}),V=i.useMemo(()=>Mn({domain:t,range:[0,v.width]}),[t,v.width]),q=i.useMemo(()=>ye({domain:P,range:[v.height,0]}),[P,v.height]),X=i.useMemo(()=>ye({domain:j,range:[v.height,0]}),[j,v.height]),[le,te,ie,Y]=De([...q.domain(),...X.domain()]),Q=i.useMemo(()=>ye({domain:{min:le,max:te},nice:!1,range:[v.height,0]}),[te,le,v.height]),he=i.useMemo(()=>ye({domain:{min:ie,max:Y},nice:!1,range:[v.height,0]}),[Y,ie,v.height]),U=G=>zt(G)==="right"?he:Q,J=G=>zt(G)==="right"?T:l,oe=Ke(q,v.height),fe=Ke(X,v.height),pe=V.bandwidth(),qe=Ds(pe,_.map((G,ge)=>G.kind==="bar"?L[ge]??0:0)),tt=G=>qe[G]??ws,tn=t.map(G=>({label:G,position:(V(G)??0)+pe/2})),Rt=(G,ge,W)=>G.map(ae=>({label:W(ae),position:ge(ae)}));return o.jsxs(ht,{containerRef:H,empty:_.length===0||t.length===0,emptyMessage:r,fillHeight:z,grid:[{baseline:Q(0),lines:oe.map(G=>Q(G)),orientation:"horizontal"}],height:w,legend:_.map((G,ge)=>({color:K[ge],hidden:A(G.label),label:G.label})),legendAlign:g,legendPosition:m,margins:I,onToggleSeries:R,plot:v,title:M,width:S,xAxis:{labelRotation:B,ticks:tn,visibility:y},yAxis:{hideLine:!0,ticks:Rt(oe,Q,l),visibility:b},yAxisRight:{hideLine:!0,ticks:Rt(fe,he,T),visibility:N},children:[F!==null&&o.jsx($n,{offset:V(t[F])??0,plot:v,size:pe}),_.map((G,ge)=>{if(G.kind!=="bar")return null;const W=A(G.label),ae=U(G),ve=J(G),de=ae(0);return o.jsxs("g",{"aria-hidden":W||void 0,className:`${Ce.series} ${W?Ce.seriesOff:""}`,children:[t.map((se,ue)=>{const ce=G.values[ue];if(ce==null||!Number.isFinite(ce))return null;const Se=ae(ce);return o.jsx("path",{"aria-label":`${G.label}, ${se}: ${ve(ce)}`,className:Ce.bar,d:Dn((V(se)??0)+tt(ge).offset,Math.min(de,Se),tt(ge).thickness,Math.abs(Se-de),[C,C,C,C]),fill:K[ge],onMouseEnter:()=>E(ue),onMouseLeave:()=>E(null)},se)}),f&&t.map((se,ue)=>{const ce=G.values[ue];return ce==null||!Number.isFinite(ce)?null:o.jsx("text",{className:Ce.valueLabel,textAnchor:"middle",x:(V(se)??0)+tt(ge).offset+tt(ge).thickness/2,y:ae(ce)-6,children:ve(ce)},se)})]},G.label)}),_.map((G,ge)=>{if(G.kind!=="line")return null;const W=A(G.label),ae=U(G),ve=J(G),de=t.map((se,ue)=>{const ce=G.values[ue];return ce==null||!Number.isFinite(ce)?null:{x:(V(se)??0)+pe/2,y:ae(ce)}});return o.jsxs("g",{"aria-hidden":W||void 0,className:`${Ce.series} ${W?Ce.seriesOff:""}`,children:[o.jsx("path",{className:Ce.line,d:wn(de,n),fill:"none",stroke:K[ge]}),de.map((se,ue)=>se===null?null:o.jsx("circle",{"aria-label":`${G.label}, ${t[ue]}: ${ve(G.values[ue]??0)}`,className:x||Ju(de,ue)?Ce.dotVisible:Ce.dot,cx:se.x,cy:se.y,fill:K[ge],r:4},t[ue])),f&&de.map((se,ue)=>se===null?null:o.jsx("text",{className:Ce.valueLabel,textAnchor:"middle",x:se.x,y:se.y-10,children:ve(G.values[ue]??0)},t[ue]))]},G.label)})]})}const td="_outline_1lab2_1 _line_gr8jr_131",nd="_dot_1lab2_5 _dot_gr8jr_139",sd="_dotVisible_1lab2_9 _dotVisible_gr8jr_144",od="_valueLabel_1lab2_13 _valueLabel_gr8jr_123",ad="_series_1lab2_17 _series_gr8jr_208",rd="_seriesOff_1lab2_21 _seriesOff_gr8jr_212",rt={outline:td,dot:nd,dotVisible:sd,valueLabel:od,series:ad,seriesOff:rd};function ld(e,t){return e[t]!==null&&!e[t-1]&&!e[t+1]}function id(e,t,n,s){return e.slice(0,t).reduce((r,a,l)=>r+(a.values[n]??0)*s(l),0)}function cd({accent:e,categories:t,curve:n="smooth",defaultHiddenSeries:s,emptyMessage:r="Sem dados no período",formatValue:a=je,height:l=260,includeZero:c=!0,hiddenSeries:u,labelAngle:d="auto",legend:m="bottom",legendAlign:g,onHiddenSeriesChange:h,series:p,showDataLabels:_=!1,showDots:f=!1,stacked:x=!1,title:M,xAxis:y="visible",yAxis:b="visible",yAxisRight:D="hidden"}){const $=i.useId(),{font:k,height:C,ref:H,width:S}=Me(),{fillHeight:z,value:w}=$e(l,C),{isHidden:A,toggle:R}=He({defaultHiddenSeries:s,hiddenSeries:u,onHiddenSeriesChange:h}),E=i.useMemo(()=>Ne(p,{accent:e}),[e,p]),F=De(p.map(Y=>A(Y.label)?0:1)),T=Y=>F[Y]??0,O=i.useMemo(()=>{const Y=Q=>A(p[Q].label)?0:1;return x?Pe(t.flatMap((Q,he)=>ks(p.map((U,J)=>(U.values[he]??0)*Y(J))))):ut(p.filter(Q=>!A(Q.label)).map(Q=>Pe(Q.values.filter(he=>he!==null),{includeZero:c})))},[t,c,A,p,x]),K=Ve(O,w,a),{margins:L,plot:P,rotation:j}=mt({bottomLabels:t,font:k,height:w,labelAngle:d,leftLabels:K,rightLabels:K,topRoom:_?kt(k):0,width:S,xAxis:y,yAxis:b,yAxisRight:D}),N=i.useMemo(()=>Rs({domain:t,padding:0,range:[0,P.width]}),[t,P.width]),I=i.useMemo(()=>ye({domain:O,range:[P.height,0]}),[O,P.height]),[v,B]=De(I.domain()),V=i.useMemo(()=>ye({domain:{min:v,max:B},nice:!1,range:[P.height,0]}),[B,v,P.height]),q=Ke(I,P.height),X=V(0),le=p.map((Y,Q)=>t.map((he,U)=>{const J=Y.values[U];if(J==null||!Number.isFinite(J))return null;const oe=x?id(p,Q,U,T):0,fe=x?J*T(Q):J;return{x:N(he)??0,y0:x?V(oe):X,y1:V(oe+fe)}})),te=t.map(Y=>({label:Y,position:N(Y)??0})),ie=q.map(Y=>({label:a(Y),position:V(Y)}));return o.jsxs(ht,{containerRef:H,empty:p.length===0||t.length===0,emptyMessage:r,grid:[{baseline:X,lines:q.map(Y=>V(Y)),orientation:"horizontal"}],fillHeight:z,height:w,legend:p.map((Y,Q)=>({color:E[Q],hidden:A(Y.label),label:Y.label})),legendAlign:g,legendPosition:m,margins:L,onToggleSeries:R,plot:P,title:M,width:S,xAxis:{labelRotation:j,ticks:te,visibility:y},yAxis:{hideLine:!0,ticks:ie,visibility:b},yAxisRight:{hideLine:!0,ticks:ie,visibility:D},children:[!x&&o.jsx("defs",{children:p.map((Y,Q)=>o.jsxs("linearGradient",{id:`${$}-${Q}`,x1:"0",x2:"0",y1:"0",y2:"1",children:[o.jsx("stop",{offset:"5%",stopColor:E[Q],stopOpacity:.6}),o.jsx("stop",{offset:"95%",stopColor:E[Q],stopOpacity:.05})]},Y.label))}),p.map((Y,Q)=>{const he=le[Q],U=he.map(oe=>oe===null?null:{x:oe.x,y:oe.y1}),J=A(Y.label);return o.jsxs("g",{"aria-hidden":J||void 0,className:`${rt.series} ${J?rt.seriesOff:""}`,children:[o.jsx("path",{d:cu(he,n),fill:x?E[Q]:`url(#${$}-${Q})`}),o.jsx("path",{className:rt.outline,d:wn(U,n),fill:"none",stroke:E[Q]}),t.map((oe,fe)=>{const pe=he[fe];return pe===null?null:o.jsx("circle",{"aria-label":`${Y.label}, ${oe}: ${a(Y.values[fe]??0)}`,className:f||ld(he,fe)?rt.dotVisible:rt.dot,cx:pe.x,cy:pe.y1,fill:E[Q],r:4},oe)}),_&&t.map((oe,fe)=>{const pe=he[fe];return pe===null?null:o.jsx("text",{className:rt.valueLabel,textAnchor:"middle",x:pe.x,y:pe.y1-10,children:a(Y.values[fe]??0)},oe)})]},Y.label)})]})}const ud="_bubble_okzta_1",dd="_guide_okzta_11",fd="_series_okzta_23 _series_gr8jr_208",md="_seriesOff_okzta_27 _seriesOff_gr8jr_212",yt={bubble:ud,guide:dd,series:fd,seriesOff:md},hd=5,_d=[4,18];function pd({accent:e,defaultHiddenSeries:t,emptyMessage:n="Sem dados no período",formatX:s=M=>String(M),formatY:r=M=>String(M),formatZ:a=M=>String(M),height:l=280,includeZero:c=!0,hiddenSeries:u,legend:d="bottom",legendAlign:m,onHiddenSeriesChange:g,series:h,title:p,xAxis:_="visible",yAxis:f="visible",yAxisRight:x="hidden"}){const{font:M,height:y,ref:b,width:D}=Me(),{fillHeight:$,value:k}=$e(l,y),{isHidden:C,toggle:H}=He({defaultHiddenSeries:t,hiddenSeries:u,onHiddenSeriesChange:g}),[S,z]=i.useState(null),w=i.useMemo(()=>Ne(h,{accent:e}),[e,h]),A=i.useMemo(()=>h.filter(U=>!C(U.label)),[C,h]),R=i.useMemo(()=>ut(A.map(U=>Pe(U.points.map(J=>J.x),{includeZero:c}))),[c,A]),E=i.useMemo(()=>ut(A.map(U=>Pe(U.points.map(J=>J.y),{includeZero:c}))),[c,A]),F=i.useMemo(()=>h.reduce((U,J)=>J.points.reduce((oe,fe)=>Math.max(oe,fe.z??0),U),0),[h]),T=Ve(E,k,r),O=Ve(R,D,s),{margins:K,plot:L,rotation:P}=mt({bottomLabels:O,font:M,height:k,labelAngle:"auto",leftLabels:T,rightLabels:T,topRoom:0,width:D,xAxis:_,yAxis:f,yAxisRight:x}),j=i.useMemo(()=>ye({domain:R,range:[0,L.width]}),[R,L.width]),N=i.useMemo(()=>ye({domain:E,range:[L.height,0]}),[E,L.height]),[I,v,B,V]=De([...j.domain(),...N.domain()]),q=i.useMemo(()=>ye({domain:{min:I,max:v},nice:!1,range:[0,L.width]}),[v,I,L.width]),X=i.useMemo(()=>ye({domain:{min:B,max:V},nice:!1,range:[L.height,0]}),[V,B,L.height]),le=i.useMemo(()=>tu(F,_d),[F]),te=Ke(j,L.width),ie=Ke(N,L.height),Y=te.map(U=>({label:s(U),position:q(U)})),Q=ie.map(U=>({label:r(U),position:X(U)}));function he(U,J){const oe=J.label?`${U.label}, ${J.label}`:U.label,fe=`${s(J.x)} × ${r(J.y)}`;return J.z===void 0?`${oe}: ${fe}`:`${oe}: ${fe} (${a(J.z)})`}return o.jsxs(ht,{containerRef:b,empty:h.every(U=>U.points.length===0),emptyMessage:n,grid:[{lines:ie.map(U=>X(U)),orientation:"horizontal"},{lines:te.map(U=>q(U)),orientation:"vertical"}],fillHeight:$,height:k,legend:h.map((U,J)=>({color:w[J],hidden:C(U.label),label:U.label})),legendAlign:m,legendPosition:d,margins:K,onToggleSeries:H,plot:L,title:p,width:D,xAxis:{hideLine:!0,labelRotation:P,ticks:Y,visibility:_},yAxis:{hideLine:!0,ticks:Q,visibility:f},yAxisRight:{hideLine:!0,ticks:Q,visibility:x},children:[S&&o.jsxs("g",{"aria-hidden":"true",children:[o.jsx("line",{className:yt.guide,x1:S.x,x2:S.x,y1:S.y,y2:L.height}),o.jsx("line",{className:yt.guide,x1:0,x2:S.x,y1:S.y,y2:S.y})]}),h.map((U,J)=>o.jsx("g",{"aria-hidden":C(U.label)||void 0,className:`${yt.series} ${C(U.label)?yt.seriesOff:""}`,children:U.points.map((oe,fe)=>{const pe=q(oe.x),qe=X(oe.y);return o.jsx("circle",{"aria-label":he(U,oe),className:yt.bubble,cx:pe,cy:qe,fill:w[J],onMouseEnter:()=>z({x:pe,y:qe}),onMouseLeave:()=>z(null),r:oe.z===void 0?hd:le(oe.z)},fe)})},U.label))]})}const gd="_slice_1c5i5_3",bd="_sliceLabel_1c5i5_13",Yn={slice:gd,sliceLabel:bd};function yd({accent:e,defaultHiddenSlices:t,emptyMessage:n="Sem dados no período",formatPercent:s=y=>`${Math.round(y*100)}%`,formatValue:r=je,height:a=260,hiddenSlices:l,legend:c="bottom",legendAlign:u,onHiddenSlicesChange:d,onHoverSlice:m,otherLabel:g="Outros",showDataLabels:h=!1,showLegendValues:p=!1,sliceRadius:_,slices:f,smallSliceThreshold:x=.02,title:M}){const{font:y,height:b,radius:D,ref:$,width:k}=Me(),{fillHeight:C,value:H}=$e(a,b),S=Is({accent:e,defaultHiddenSlices:t,hiddenSlices:l,onHiddenSlicesChange:d,onHoverSlice:m,otherLabel:g,slices:f,smallSliceThreshold:x}),z=en(k,H)/2,w=_??D;return o.jsxs(et,{centerOrigin:!0,containerRef:$,empty:S.slices.length===0||f.every(A=>Math.max(A.value,0)===0),emptyMessage:n,fillHeight:C,height:H,legend:S.slices.map((A,R)=>({color:S.colors[R],hidden:S.isHidden(A.label),label:A.label,value:p?s(S.ratioOf(R)):void 0})),legendAlign:u,legendPosition:c,onToggleSeries:S.toggle,swatch:"dot",title:M,width:k,children:[S.slices.map((A,R)=>o.jsx("path",{"aria-label":`${A.label}: ${r(Math.max(A.value,0))} (${s(S.ratioOf(R))})`,className:Yn.slice,d:Nt({...S.angles[R],cornerRadius:w,innerRadius:0,outerRadius:z}),fill:S.colors[R],onMouseEnter:()=>S.focus(R),onMouseLeave:()=>S.focus(null)},A.label)),h&&S.slices.map((A,R)=>{const E=s(S.ratioOf(R)),[F,T]=au({...S.angles[R],innerRadius:0,outerRadius:z}),O=S.angles[R].endAngle-S.angles[R].startAngle,K=O>=Math.PI?z:2*(z/2)*Math.sin(O/2);return S.isHidden(A.label)||Je(E,y)>K?null:o.jsx("text",{className:Yn.sliceLabel,dominantBaseline:"middle",textAnchor:"middle",x:F,y:T,children:E},A.label)})]})}const xd="_slice_1gir8_3",vd="_center_1gir8_13",jd="_centerValue_1gir8_17",$d="_centerLabel_1gir8_22",Ft={slice:xd,center:vd,centerValue:jd,centerLabel:$d};function Md({accent:e,centerLabel:t="Total",defaultHiddenSlices:n,emptyMessage:s="Sem dados no período",formatPercent:r=D=>`${Math.round(D*100)}%`,formatValue:a=je,height:l=260,hiddenSlices:c,legend:u="right",legendAlign:d,onHiddenSlicesChange:m,onHoverSlice:g,otherLabel:h="Outros",showCenter:p=!0,showLegendValues:_=!0,sliceRadius:f,slices:x,smallSliceThreshold:M=.02,thickness:y=.38,title:b}){const{font:D,height:$,radius:k,ref:C,width:H}=Me(),{fillHeight:S,value:z}=$e(l,$),w=Is({accent:e,defaultHiddenSlices:n,hiddenSlices:c,onHiddenSlicesChange:m,onHoverSlice:g,otherLabel:h,slices:x,smallSliceThreshold:M}),R=en(H,z)/2,E=R*(1-y),F=f??k,T=w.focused===null?void 0:w.slices[w.focused],O=Cs(a(T?Math.max(T.value,0):w.total),T?T.label:t,D,E*2);return o.jsxs(et,{centerOrigin:!0,containerRef:C,empty:w.slices.length===0||x.every(K=>Math.max(K.value,0)===0),emptyMessage:s,fillHeight:S,height:z,legend:w.slices.map((K,L)=>({color:w.colors[L],hidden:w.isHidden(K.label),label:K.label,value:_?r(w.ratioOf(L)):void 0})),legendAlign:d,legendPosition:u,onToggleSeries:w.toggle,swatch:"dot",title:b,width:H,children:[w.slices.map((K,L)=>o.jsx("path",{"aria-label":`${K.label}: ${a(Math.max(K.value,0))} (${r(w.ratioOf(L))})`,className:Ft.slice,d:Nt({...w.angles[L],cornerRadius:F,innerRadius:E,outerRadius:R}),fill:w.colors[L],onMouseEnter:()=>w.focus(L),onMouseLeave:()=>w.focus(null)},K.label)),p&&o.jsxs("g",{className:Ft.center,children:[o.jsx("text",{className:Ft.centerValue,dy:O.size*.1,style:{fontFamily:O.family,fontSize:O.size},textAnchor:"middle",children:O.value}),o.jsx("text",{className:Ft.centerLabel,dy:O.lineHeight*.62,textAnchor:"middle",children:O.label})]})]})}const Nd="_track_1rbw6_3",wd="_fill_1rbw6_7",Dd="_center_1rbw6_15",kd="_centerValue_1rbw6_19",Rd="_centerLabel_1rbw6_24",xt={track:Nd,fill:wd,center:Dd,centerValue:kd,centerLabel:Rd},Qn=6,Zn=8;function Jn(e){return e*Math.PI/180}function Cd({accent:e,centerLabel:t,defaultHiddenTracks:n,emptyMessage:s="Sem dados no período",endAngle:r=360,formatValue:a=je,height:l=260,hiddenTracks:c,legend:u="bottom",legendAlign:d,onHiddenTracksChange:m,showCenter:g=!0,startAngle:h=0,thickness:p=16,trackRadius:_,title:f,tracks:x}){const{font:M,height:y,radius:b,ref:D,width:$}=Me(),{fillHeight:k,value:C}=$e(l,y),{isHidden:H,toggle:S}=He({defaultHiddenSeries:n,hiddenSeries:c,onHiddenSeriesChange:m}),z=i.useMemo(()=>Ne(x,{accent:e}),[e,x]),w=x.reduce((I,v)=>Math.max(I,v.value),0),A=x.map(I=>{const v=I.max??w;return H(I.label)||v<=0?0:Math.min(Math.max(I.value,0)/v,1)}),R=De(A,{from:A.map(()=>0)}),E=Jn(h),F=Math.min(Jn(r)-E,Nn),T=en($,C)/2,O=Math.min(p,Math.max((T-Zn)/Math.max(x.length,1)-Qn,1)),K=I=>T-I*(O+Qn),L=Math.max(K(Math.max(x.length-1,0))-O,Zn),P=_??b,j=x.find(I=>!H(I.label))??x[0],N=j?Cs(a(j.value),t??j.label,M,L*2):void 0;return o.jsxs(et,{centerOrigin:!0,containerRef:D,empty:x.length===0,emptyMessage:s,fillHeight:k,height:C,legend:x.map((I,v)=>({color:z[v],hidden:H(I.label),label:I.label,value:a(I.value)})),legendAlign:d,legendPosition:x.length>1?u:"none",onToggleSeries:S,swatch:"dot",title:f,width:$,children:[x.map((I,v)=>{const B=K(v),V=B-O,q=R[v]??0,X=E+F*q;return o.jsxs("g",{children:[o.jsx("path",{"aria-label":`${I.label}: ${a(I.value)}`,className:xt.track,d:Nt({cornerRadius:P,endAngle:E+F,innerRadius:V,outerRadius:B,startAngle:E})}),q>0&&o.jsx("path",{className:xt.fill,d:Nt({cornerRadius:P,endAngle:X,innerRadius:V,outerRadius:B,startAngle:E}),fill:z[v]})]},I.label)}),g&&N&&o.jsxs("g",{className:xt.center,children:[o.jsx("text",{className:xt.centerValue,dy:N.size*.1,style:{fontFamily:N.family,fontSize:N.size},textAnchor:"middle",children:N.value}),o.jsx("text",{className:xt.centerLabel,dy:N.lineHeight*.62,textAnchor:"middle",children:N.label})]})]})}const Ld="_bar_1fyqf_1",Ad="_connector_1fyqf_6",Id="_valueLabel_1fyqf_12 _valueLabel_gr8jr_123",dn={bar:Ld,connector:Ad,valueLabel:Id};function Od(e){let t=0;return e.map(n=>{const s=n.total?0:t,r=s+n.value;return t=r,{inicio:s,fim:r}})}function Sd(e){return e.intent?e.intent:e.total?"neutral":e.value<0?"negative":"positive"}function Ed(e,t){return e===0?t(0):`${e<0?"-":"+"}${t(Math.abs(e))}`}function Td({emptyMessage:e="Sem dados no período",formatValue:t=je,height:n=280,labelAngle:s="auto",onHoverStep:r,showDataLabels:a=!0,steps:l,title:c,xAxis:u="visible",yAxis:d="visible",yAxisRight:m="hidden"}){const{font:g,height:h,radius:p,ref:_,width:f}=Me(),{fillHeight:x,value:M}=$e(n,h),{hover:y,hovered:b}=kn(r),D=i.useMemo(()=>Od(l),[l]),$=i.useMemo(()=>Ne(l.map(j=>({color:j.color,intent:Sd(j)}))),[l]),k=i.useMemo(()=>Pe(D.flatMap(j=>[j.inicio,j.fim])),[D]),C=Ve(k,M,t),{margins:H,plot:S,rotation:z}=mt({bottomLabels:l.map(j=>j.label),font:g,height:M,labelAngle:s,leftLabels:C,rightLabels:C,topRoom:a?kt(g):0,width:f,xAxis:u,yAxis:d,yAxisRight:m}),w=i.useMemo(()=>Mn({domain:l.map((j,N)=>String(N)),range:[0,S.width]}),[S.width,l]),A=j=>w(String(j))??0,R=i.useMemo(()=>ye({domain:k,range:[S.height,0]}),[k,S.height]),[E,F]=De(R.domain()),T=i.useMemo(()=>ye({domain:{min:E,max:F},nice:!1,range:[S.height,0]}),[F,E,S.height]),O=Ke(R,S.height),K=l.map((j,N)=>({label:j.label,position:A(N)+w.bandwidth()/2})),L=O.map(j=>({label:t(j),position:T(j)}));function P(j){return j.total?t(j.value):Ed(j.value,t)}return o.jsxs(ht,{containerRef:_,empty:l.length===0,emptyMessage:e,grid:[{baseline:T(0),lines:O.map(j=>T(j)),orientation:"horizontal"}],fillHeight:x,height:M,legendPosition:"none",margins:H,plot:S,title:c,width:f,xAxis:{labelRotation:z,ticks:K,visibility:u},yAxis:{hideLine:!0,ticks:L,visibility:d},yAxisRight:{hideLine:!0,ticks:L,visibility:m},children:[b!==null&&o.jsx($n,{offset:A(b),plot:S,size:w.bandwidth()}),o.jsx("g",{"aria-hidden":"true",children:D.slice(0,-1).map((j,N)=>{const I=T(j.fim);return o.jsx("line",{className:dn.connector,x1:A(N)+w.bandwidth(),x2:A(N+1),y1:I,y2:I},N)})}),l.map((j,N)=>{const{fim:I,inicio:v}=D[N],B=Math.min(T(v),T(I)),V=Math.abs(T(I)-T(v));return o.jsx("path",{"aria-label":`${j.label}: ${P(j)}`,className:dn.bar,d:Dn(A(N),B,w.bandwidth(),V,[p,p,p,p]),fill:$[N],onMouseEnter:()=>y(N),onMouseLeave:()=>y(null)},N)}),a&&l.map((j,N)=>{const{fim:I,inicio:v}=D[N],B=Math.min(T(v),T(I));return o.jsx("text",{className:dn.valueLabel,textAnchor:"middle",x:A(N)+w.bandwidth()/2,y:B-6,children:P(j)},N)})]})}const Fd="_cell_1f86e_1",Bd="_tile_1f86e_5",Pd="_label_1f86e_16",Kd="_value_1f86e_24",Bt={cell:Fd,tile:Bd,label:Pd,value:Kd};function zd({accent:e,defaultHiddenGroups:t,emptyMessage:n="Sem dados no período",formatValue:s=je,gap:r=5,height:a=280,hiddenGroups:l,intentLabels:c,legend:u="bottom",legendAlign:d,nodes:m,onHiddenGroupsChange:g,showDataLabels:h=!0,title:p}){const{font:_,height:f,ref:x,width:M}=Me(),{fillHeight:y,value:b}=$e(a,f),{isHidden:D,toggle:$}=He({defaultHiddenSeries:t,hiddenSeries:l,onHiddenSeriesChange:g}),k=i.useMemo(()=>Ne(m,{accent:e}),[e,m]),C=m.filter(w=>!D(w.label)),H=i.useMemo(()=>{if(M===0||b===0)return[];const w=Ht.hierarchy({children:C,label:""}).sum(R=>Math.max(R.value??0,0)).sort((R,E)=>(E.value??0)-(R.value??0));return Ht.treemap().size([M,b]).paddingInner(r).round(!0)(w).leaves()},[b,r,C,M]);function S(w){var E;const A=w.data;if(A.color)return A.color;if(A.intent)return Kt[A.intent];const R=(E=w.ancestors().find(F=>F.depth===1))==null?void 0:E.data;return k[m.findIndex(F=>F.label===(R==null?void 0:R.label))]??Kt.neutral}const z=c?Object.entries(c).map(([w,A])=>({color:Kt[w],label:A})):m.map((w,A)=>({color:k[A],hidden:D(w.label),label:w.label}));return o.jsx(et,{containerRef:x,empty:m.length===0,emptyMessage:n,fillHeight:y,height:b,legend:z,legendAlign:d,legendPosition:u,onToggleSeries:c?void 0:$,title:p,width:M,children:H.map(w=>{const A=w.x1-w.x0,R=w.y1-w.y0,E=A-re*2,F=h&&E>0&&R>=_.lineHeight+re,T=F&&R>=_.lineHeight*2+re;return o.jsxs("g",{className:Bt.cell,children:[o.jsx("rect",{"aria-label":`${w.data.label}: ${s(w.value??0)}`,className:Bt.tile,fill:S(w),height:R,width:A,x:w.x0,y:w.y0}),F&&o.jsx("text",{className:Bt.label,x:w.x0+re,y:w.y0+re+_.lineHeight*.6,children:ct(w.data.label,_,E)}),T&&o.jsx("text",{className:Bt.value,x:w.x0+re,y:w.y0+re+_.lineHeight*1.6,children:ct(s(w.value??0),_,E)})]},`${w.data.label}-${w.x0}-${w.y0}`)})})}const Hd="_arc_fgn0g_1",qd="_arcDim_fgn0g_9",Vd="_leader_fgn0g_13",Ud="_connector_fgn0g_17",Gd="_label_fgn0g_23",vt={arc:Hd,arcDim:qd,leader:Vd,connector:Ud,label:Gd},Wd=.18,Pt=14;function Os(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&&Os(s.children,t+1,n)}),n}function Xd(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 Yd({accent:e,defaultHiddenGroups:t,emptyMessage:n="Sem dados no período",formatPercent:s=f=>`${Math.round(f*100)}%`,formatValue:r=je,height:a=320,hiddenGroups:l,legend:c="bottom",legendAlign:u,nodes:d,onHiddenGroupsChange:m,ringGap:g=2,showLabels:h=!0,sliceRadius:p,title:_}){const{font:f,height:x,radius:M,ref:y,width:b}=Me(),{fillHeight:D,value:$}=$e(a,x),{isHidden:k,toggle:C}=He({defaultHiddenSeries:t,hiddenSeries:l,onHiddenSeriesChange:m}),[H,S]=i.useState(null),z=i.useMemo(()=>Ne(d,{accent:e}),[e,d]),w=i.useMemo(()=>d.filter(v=>!k(v.label)),[k,d]),A=i.useMemo(()=>{const v=Os(w),B=Math.max(0,...v.keys());return v.get(B)??[]},[w]),R=h?Math.min(ft(A,f),b*_n):0,E=h?Pt*2+re+R:0,T=en(Math.max(b-E*2,0),$)/2,O=i.useMemo(()=>{if(T<=0)return[];const v=Ht.hierarchy({children:w,label:""}).sum(V=>Math.max(V.value??0,0)).sort((V,q)=>(q.value??0)-(V.value??0));return Ht.partition().size([Nn,T])(v).descendants().filter(V=>V.depth>0)},[T,w]),K=O.reduce((v,B)=>Math.max(v,B.depth),0),L=O.filter(v=>v.depth===1).reduce((v,B)=>v+(B.value??0),0);function P(v){return v.ancestors().map(B=>B.data.label).join("/")}const j=H&&O.includes(H)?H:null;function N(v){return j===null||j.ancestors().includes(v)}function I(v){var q;const B=(q=v.ancestors().find(X=>X.depth===1))==null?void 0:q.data,V=(B==null?void 0:B.color)??z[d.findIndex(X=>X.label===(B==null?void 0:B.label))];return Xd(V??"var(--pl-chart-neutral)",v.depth)}return o.jsxs(et,{centerOrigin:!0,containerRef:y,empty:d.length===0,emptyMessage:n,fillHeight:D,height:$,legend:d.map((v,B)=>({color:z[B],hidden:k(v.label),label:v.label})),legendAlign:u,legendPosition:c,onToggleSeries:C,swatch:"dot",title:_,width:b,children:[O.map(v=>o.jsx("path",{"aria-label":`${v.data.label}: ${r(v.value??0)} (${s(L>0?(v.value??0)/L:0)})`,className:`${vt.arc} ${N(v)?"":vt.arcDim}`,d:Nt({cornerRadius:p??M,endAngle:v.x1,innerRadius:v.y0+(v.depth>1?g:0),outerRadius:v.y1,startAngle:v.x0}),fill:I(v),onMouseEnter:()=>S(v),onMouseLeave:()=>S(null)},P(v))),h&&O.filter(v=>v.depth===K&&v.x1-v.x0>=Wd).map(v=>{const B={endAngle:v.x1,startAngle:v.x0},[V,q]=Wn(B,v.y1),[X,le]=Wn(B,v.y1+Pt),te=X>=0,ie=X+(te?Pt:-Pt);return o.jsxs("g",{className:vt.leader,children:[o.jsx("polyline",{className:vt.connector,points:`${V},${q} ${X},${le} ${ie},${le}`}),o.jsx("text",{className:vt.label,dominantBaseline:"middle",textAnchor:te?"start":"end",x:ie+(te?re:-re),y:le,children:ct(v.data.label,f,R)})]},`rotulo-${P(v)}`)})]})}const Qd="_links_1wqmi_1",Zd="_link_1wqmi_1",Jd="_linkOn_1wqmi_18",ef="_linkDim_1wqmi_22",tf="_node_1wqmi_26",nf="_label_1wqmi_30",sf="_flowValue_1wqmi_37",of="_sobreFluxo_1wqmi_47",Le={links:Qd,link:Zd,linkOn:Jd,linkDim:ef,node:tf,label:nf,flowValue:sf,sobreFluxo:of};function af(e,t){return e.x0<t.x1&&t.x0<e.x1&&e.y0<t.y1&&t.y0<e.y1}const rf={center:jt.sankeyCenter,justify:jt.sankeyJustify,left:jt.sankeyLeft,right:jt.sankeyRight};function lf(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 cf(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 l=(t.get(a)??[]).some(r);return s.delete(a),n.add(a),l}return[...t.keys()].some(r)}function uf({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:l=je,height:c=320,nodeAlign:u="justify",nodes:d,nodePadding:m=12,nodeWidth:g=12,showFlowValues:h=!1,showLabels:p=!0,title:_}){const{font:f,height:x,ref:M,width:y}=Me(),{fillHeight:b,value:D}=$e(c,x),[$,k]=i.useState(null),C=i.useMemo(()=>{const j=(d??[]).map(N=>N.label);return a.forEach(({source:N,target:I})=>{[N,I].forEach(v=>{j.includes(v)||j.push(v)})}),j.map(N=>(d==null?void 0:d.find(I=>I.label===N))??{label:N})},[a,d]),H=i.useMemo(()=>Ne(C,{accent:e}),[e,C]),S=i.useMemo(()=>{const j=new Set(a.map(N=>N.source));return C.map(N=>N.label).filter(N=>!j.has(N))},[C,a]),z=p?Math.min(ft(S,f),y*_n)+re:0,w=i.useMemo(()=>cf(a),[a]),A=i.useMemo(()=>a.reduce((j,N)=>j+(Number.isFinite(N.value)?Math.max(N.value,0):0),0),[a]),R=i.useMemo(()=>{const j=y-z;return j<=0||D<=0||a.length===0||w||A<=0?{links:[],nodes:[]}:jt.sankey().nodeId(v=>v.label).nodeAlign(rf[u]).nodeWidth(g).nodePadding(m).extent([[0,2],[j,D-2]])({links:a.map(v=>({...v,value:Number.isFinite(v.value)?Math.max(v.value,0):0})),nodes:C.map(v=>({label:v.label}))})},[D,z,w,C,a,u,m,g,A,y]),E=j=>H[j]??"var(--pl-chart-neutral)";function F(j){return s==="neutral"?"var(--pl-chart-neutral)":E(s==="target"?j.target.index:j.source.index)}function T(j){return $===null?Le.link:`${Le.link} ${$===j?Le.linkOn:Le.linkDim}`}const O=(()=>{const j=[...new Set(R.nodes.map(I=>I.x0))].sort((I,v)=>I-v);if(j.length<2)return y*_n;const N=Math.min(...j.slice(1).map((I,v)=>I-j[v]));return Math.max(N-g-re,0)})();function K(j){const N=S.includes(j.label),I=ct(j.label,f,(N?z:O)-re),v=j.x1+re,B=(j.y0+j.y1)/2;return{caixa:{x0:v,x1:v+Je(I,f),y0:B-f.lineHeight/2,y1:B+f.lineHeight/2},texto:I,x:v,y:B}}const L=p?R.nodes.map(K):[];function P(j){const N=l(j.value),I=Je(N,f),v=j.source.x1,B=j.target.x0,V=(j.y0+j.y1)/2,q={end:{anchor:"end",x:B-re},middle:{anchor:"middle",x:(v+B)/2},start:{anchor:"start",x:v+re}},{anchor:X,x:le}=q[r],te={end:I,middle:I/2,start:0}[r],ie={x0:le-te,x1:le-te+I,y0:V-f.lineHeight/2,y1:V+f.lineHeight/2};if(!L.some(Y=>af(ie,Y.caixa)))return{anchor:X,texto:N,x:le,y:V}}return o.jsxs(et,{containerRef:M,empty:a.length===0||w||A<=0,emptyMessage:w?t:n,fillHeight:b,height:D,legendPosition:"none",title:_,width:y,children:[o.jsx("g",{className:Le.links,children:R.links.map((j,N)=>o.jsx("path",{"aria-label":`${j.source.label} → ${j.target.label}: ${l(j.value)}`,className:T(N),d:lf(j),onMouseEnter:()=>k(N),onMouseLeave:()=>k(null),stroke:F(j),strokeWidth:Math.max(j.width,1)},`${j.source.label}-${j.target.label}`))}),R.nodes.map(j=>o.jsx("rect",{"aria-label":j.label,className:Le.node,fill:E(j.index),height:Math.max(j.y1-j.y0,1),width:j.x1-j.x0,x:j.x0,y:j.y0},j.label)),h&&R.links.map(j=>{const N=P(j);return N?o.jsx("text",{className:`${Le.flowValue} ${Le.sobreFluxo}`,dominantBaseline:"middle",textAnchor:N.anchor,x:N.x,y:N.y,children:N.texto},`valor-${j.source.label}-${j.target.label}`):null}),L.map((j,N)=>o.jsx("text",{className:`${Le.label} ${S.includes(R.nodes[N].label)?"":Le.sobreFluxo}`,dominantBaseline:"middle",textAnchor:"start",x:j.x,y:j.y,children:j.texto},`rotulo-${R.nodes[N].label}`))]})}exports.Accordion=hr;exports.Alert=_a;exports.Avatar=Dl;exports.Badge=vl;exports.Breadcrumb=Ya;exports.Button=Ze;exports.Card=Qt;exports.ChartArea=cd;exports.ChartBar=xu;exports.ChartCombo=ed;exports.ChartDonut=Md;exports.ChartLine=ku;exports.ChartPie=yd;exports.ChartRadial=Cd;exports.ChartSankey=uf;exports.ChartScatter=pd;exports.ChartSunburst=Yd;exports.ChartTooltip=qu;exports.ChartTreemap=zd;exports.ChartWaterfall=Td;exports.Checkbox=hs;exports.ComboBox=Ur;exports.DatePicker=Ui;exports.DateTimePicker=gc;exports.Dialog=dl;exports.Field=ze;exports.IconArrowDown=Ts;exports.IconArrowUp=es;exports.IconCalendar=yn;exports.IconChevronDown=ts;exports.IconChevronLeft=xn;exports.IconChevronRight=Gt;exports.IconChevronUp=Fs;exports.IconClock=ns;exports.IconClose=ss;exports.IconMinusCircle=os;exports.IconPlusCircle=as;exports.InputCurrency=ko;exports.InputNumber=xo;exports.InputPassword=Do;exports.InputText=vn;exports.Label=ls;exports.List=Dt;exports.Menu=Xr;exports.Pagination=sr;exports.Popover=wa;exports.Progress=$a;exports.Radio=Jo;exports.RadioGroup=Zo;exports.Select=Fr;exports.Spinner=rs;exports.Switch=la;exports.Table=dt;exports.Tabs=qa;exports.Textarea=Io;exports.TimePicker=oc;exports.Tooltip=ys;exports.formatarData=_o;exports.formatarHora=po;exports.formatarMoeda=go;exports.formatarNumero=je;exports.formatarPercentual=fs;exports.paletteWithAccent=As;exports.resolveSeriesColors=Ne;exports.seriesColors=Vt;
|
|
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
|