tempest-react-sdk 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/leaflet-map-BHBcL_7k.js +51 -0
- package/dist/leaflet-map-BHBcL_7k.js.map +1 -0
- package/dist/leaflet-map-BzYV9czG.cjs +2 -0
- package/dist/leaflet-map-BzYV9czG.cjs.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/tempest-react-sdk.cjs +3 -3
- package/dist/tempest-react-sdk.cjs.map +1 -1
- package/dist/tempest-react-sdk.d.ts +587 -6
- package/dist/tempest-react-sdk.js +3905 -3342
- package/dist/tempest-react-sdk.js.map +1 -1
- package/package.json +5 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const fe=require("./sw.cjs"),o=require("react/jsx-runtime"),l=require("react"),x=require("./cn-CNScIEB4.cjs"),Ts=require("lucide-react"),G=require("@tanstack/react-query"),I=require("react-router-dom"),Ge=require("react-dom"),me=require("react-hook-form"),At=require("zustand"),bt=require("zustand/middleware"),Ms=require("dexie"),Rs="tempest_accordion_LVhhv",Ls="tempest_item_7ryVk",Ds="tempest_header_WaTdJ",Is="tempest_trigger_9BYFY",Ps="tempest_chevron_i-HVZ",As="tempest_open_98jLY",Fs="tempest_panel_Wx50w",Ee={accordion:Rs,item:Ls,header:Ds,trigger:Is,chevron:Ps,open:As,panel:Fs};function Os({items:e,multiple:t=!1,value:n,defaultValue:s=[],onChange:r,className:a}){const c=l.useId(),i=n!==void 0,[u,d]=l.useState(s),p=i?n:u,m=l.useCallback(f=>{const h=p.includes(f),_=t?h?p.filter(b=>b!==f):[...p,f]:h?[]:[f];i||d(_),r?.(_)},[p,t,i,r]);return o.jsx("div",{className:x.cn(Ee.accordion,a),children:e.map(f=>{const h=p.includes(f.id),_=`${c}-${f.id}-panel`,b=`${c}-${f.id}-trigger`;return o.jsxs("div",{className:x.cn(Ee.item,h&&Ee.open),children:[o.jsx("h3",{className:Ee.header,children:o.jsxs("button",{type:"button",id:b,className:Ee.trigger,"aria-expanded":h,"aria-controls":_,disabled:f.disabled,onClick:()=>m(f.id),children:[o.jsx("span",{children:f.title}),o.jsx(Bs,{className:Ee.chevron})]})}),h&&o.jsx("div",{id:_,role:"region","aria-labelledby":b,className:Ee.panel,children:f.children})]},f.id)})})}function Bs({className:e}){return o.jsx("svg",{className:e,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:o.jsx("path",{d:"M6 9l6 6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}const zs="tempest_alert_7cYyI",Ws="tempest_content_UXnmZ",qs="tempest_title_abGgF",Us="tempest_description_pXPvw",Ks="tempest_icon_Zg6SB",Hs="tempest_close_narep",Gs="tempest_neutral_J7MH1",Js="tempest_solid_s-oW5",Qs="tempest_outline_v7w9b",Ys="tempest_info_9r3r1",Vs="tempest_success_1bzoB",Xs="tempest_warning_q-j1Q",Zs="tempest_danger_CiZkW",he={alert:zs,content:Ws,title:qs,description:Us,icon:Ks,close:Hs,neutral:Gs,solid:Js,outline:Qs,info:Ys,success:Vs,warning:Xs,danger:Zs};function er({variant:e="info",appearance:t="soft",title:n,description:s,icon:r,onClose:a,closeLabel:c="Dismiss",className:i,children:u,...d}){return o.jsxs("div",{role:"alert",className:x.cn(he.alert,he[e],t==="solid"&&he.solid,t==="outline"&&he.outline,i),...d,children:[r&&o.jsx("span",{className:he.icon,children:r}),o.jsxs("div",{className:he.content,children:[n&&o.jsx("p",{className:he.title,children:n}),s&&o.jsx("p",{className:he.description,children:s}),u]}),a&&o.jsx("button",{type:"button",className:he.close,onClick:a,"aria-label":c,children:o.jsx(tr,{})})]})}function tr(){return o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:o.jsx("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const nr="tempest_bar_SHqWS",sr="tempest_centered_S0CCw",rr="tempest_surface_fusKb",or="tempest_primary_QcCyN",ar="tempest_transparent_uGrsu",cr="tempest_bordered_5M9FZ",ir="tempest_sticky_DStUO",lr="tempest_safeArea_Vo3Bi",ur="tempest_leading_mXv-d",dr="tempest_actions_x7tMx",pr="tempest_title_qaMMQ",mr="tempest_brand_xKt54",fr="tempest_iconBtn_S-BTg",ee={bar:nr,centered:sr,surface:rr,primary:or,transparent:ar,bordered:cr,sticky:ir,safeArea:lr,leading:ur,actions:dr,title:pr,brand:mr,iconBtn:fr};function hr({title:e,leading:t,showBack:n=!1,onBack:s,backLabel:r="Go back",backIcon:a,brand:c,actions:i,centered:u=!1,sticky:d=!0,tone:p="surface",bordered:m=!0,safeArea:f=!0,className:h,..._}){const b=s??(()=>window.history.back()),v=t??o.jsxs(o.Fragment,{children:[n&&o.jsx("button",{type:"button",className:ee.iconBtn,onClick:b,"aria-label":r,children:a??o.jsx(Ts.ArrowLeft,{size:22,"aria-hidden":"true"})}),c&&o.jsx("span",{className:ee.brand,children:c})]});return o.jsxs("header",{className:x.cn(ee.bar,ee[p],u&&ee.centered,d&&ee.sticky,m&&ee.bordered,f&&ee.safeArea,h),..._,children:[o.jsx("div",{className:ee.leading,children:v}),e!=null&&e!==""&&o.jsx("h1",{className:ee.title,"aria-live":"polite",children:e}),o.jsx("div",{className:ee.actions,children:i})]})}const yt={xs:480,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},_r=["xs","sm","md","lg","xl","2xl"];function gr(e){let t="xs";for(const n of _r)e>=yt[n]&&(t=n);return t}function Oe(){const[e,t]=l.useState(()=>typeof window>"u"?0:window.innerWidth);l.useEffect(()=>{if(typeof window>"u")return;const a=()=>t(window.innerWidth);return a(),window.addEventListener("resize",a,{passive:!0}),()=>window.removeEventListener("resize",a)},[]);const n=gr(e),s=a=>e>=yt[a],r=a=>e<yt[a];return{current:n,width:e,above:s,below:r,isMobile:r("md"),isTablet:s("md")&&r("lg"),isDesktop:s("lg")}}const br="tempest_shell_-xp0O",yr="tempest_navbar_liTKV",vr="tempest_row_PE41P",wr="tempest_sidebar_wyx-V",xr="tempest_main_O3GFv",jr="tempest_footer_IFW4q",$r="tempest_bottomNav_pKJ1v",Te={shell:br,navbar:yr,row:vr,sidebar:wr,main:xr,footer:jr,bottomNav:$r};function kr({navbar:e,sidebar:t,bottomNav:n,footer:s,sidebarBreakpoint:r="md",className:a,children:c,...i}){const d=Oe().above(r);return o.jsxs("div",{className:x.cn(Te.shell,a),...i,children:[e&&o.jsx("div",{className:Te.navbar,children:e}),o.jsxs("div",{className:Te.row,children:[t&&d&&o.jsx("div",{className:Te.sidebar,children:t}),o.jsx("main",{className:Te.main,children:c})]}),s&&o.jsx("div",{className:Te.footer,children:s}),n&&!d&&o.jsx("div",{className:Te.bottomNav,children:n})]})}const Nr="tempest_aspect_GnAJt",Sr={aspect:Nr};function Cr({ratio:e=16/9,className:t,style:n,children:s,...r}){const a={aspectRatio:String(e),...n};return o.jsx("div",{className:x.cn(Sr.aspect,t),style:a,...r,children:s})}const Er="tempest_avatar_3xMuZ",Tr="tempest_image_ieqGp",Mr="tempest_xs_oSaLL",Rr="tempest_sm_sZ2bk",Lr="tempest_md_Fdkbz",Dr="tempest_lg_pTTUA",Ir="tempest_xl_mW58F",Pr="tempest_status_ISBnL",Ar="tempest_dot_Wgfo-",Fr="tempest_online_-aWoW",Or="tempest_offline_-StX3",Br="tempest_busy_TbwuF",Be={avatar:Er,image:Tr,xs:Mr,sm:Rr,md:Lr,lg:Dr,xl:Ir,status:Pr,dot:Ar,online:Fr,offline:Or,busy:Br};function zr(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":t.length===1?t[0].slice(0,2):`${t[0].charAt(0)}${t[t.length-1].charAt(0)}`}function Wr({src:e,alt:t,name:n="",size:s="md",status:r,className:a,onClick:c}){const[i,u]=l.useState(!1),d=l.useMemo(()=>zr(n),[n]),p=e&&!i,m=c?"button":void 0,f=c?0:void 0;return o.jsxs("span",{className:x.cn(Be.avatar,Be[s],r&&Be.status,a),role:m,tabIndex:f,onClick:c,onKeyDown:c?h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),c())}:void 0,children:[p?o.jsx("img",{src:e,alt:t??n,className:Be.image,onError:()=>u(!0)}):o.jsx("span",{"aria-label":t??n,children:d}),r&&o.jsx("span",{className:x.cn(Be.dot,Be[r]),"aria-hidden":!0})]})}const qr="tempest_badge_RsuMz",Ur="tempest_sm_LYsCn",Kr="tempest_md_4Or8q",Hr="tempest_lg_Bseje",Gr="tempest_square_l63D-",Jr="tempest_neutral_lulSm",Qr="tempest_solid_0Leug",Yr="tempest_outline_x06HL",Vr="tempest_success_u9JiS",Xr="tempest_warning_nsGp-",Zr="tempest_danger_PD2hz",eo="tempest_info_na6DQ",to="tempest_primary_S0WCS",no="tempest_dot_i0c-G",Me={badge:qr,sm:Ur,md:Kr,lg:Hr,square:Gr,neutral:Jr,solid:Qr,outline:Yr,success:Vr,warning:Xr,danger:Zr,info:eo,primary:to,dot:no};function so({variant:e="neutral",appearance:t="soft",size:n="md",shape:s="pill",dot:r=!1,className:a,children:c,...i}){return o.jsxs("span",{className:x.cn(Me.badge,Me[e],t==="solid"&&Me.solid,t==="outline"&&Me.outline,Me[n],s==="square"&&Me.square,a),...i,children:[r&&o.jsx("span",{className:Me.dot,"aria-hidden":!0}),c]})}const ro="tempest_banner_oyoWE",oo="tempest_info_s2q0P",ao="tempest_success_uLYQ3",co="tempest_warning_9rua8",io="tempest_danger_Uzb-6",lo="tempest_icon_vzKmx",uo="tempest_body_-Qm4K",po="tempest_title_AeTHT",mo="tempest_description_nbyf-",fo="tempest_action_47P8e",ho="tempest_close_Iy2oN",ke={banner:ro,info:oo,success:ao,warning:co,danger:io,icon:lo,body:uo,title:po,description:mo,action:fo,close:ho};function _o({variant:e="info",icon:t,title:n,action:s,dismissible:r=!1,onDismiss:a,className:c,children:i,...u}){const[d,p]=l.useState(!0);return d?o.jsxs("div",{className:x.cn(ke.banner,ke[e],c),role:"status",...u,children:[t&&o.jsx("span",{className:ke.icon,children:t}),o.jsxs("div",{className:ke.body,children:[n&&o.jsx("p",{className:ke.title,children:n}),i&&o.jsx("p",{className:ke.description,children:i})]}),s&&o.jsx("div",{className:ke.action,children:s}),r&&o.jsx("button",{type:"button",className:ke.close,"aria-label":"Fechar",onClick:()=>{p(!1),a?.()},children:"×"})]}):null}const go="tempest_bar_kp35Q",bo="tempest_item_XfDIW",yo="tempest_active_sK54f",vo="tempest_iconWrap_yJ20b",wo="tempest_icon_TAjtI",xo="tempest_badge_-c3Do",jo="tempest_label_qJj3L",Re={bar:go,item:bo,active:yo,iconWrap:vo,icon:wo,badge:xo,label:jo};function $o({items:e,value:t,onChange:n,showLabels:s=!0,className:r,...a}){return o.jsx("nav",{className:x.cn(Re.bar,r),"aria-label":"Navegação principal",...a,children:e.map(c=>{const i=c.key===t;return o.jsxs("button",{type:"button",className:x.cn(Re.item,i&&Re.active),"aria-current":i?"page":void 0,disabled:c.disabled,onClick:()=>n(c.key),children:[o.jsxs("span",{className:Re.iconWrap,children:[c.icon&&o.jsx("span",{className:Re.icon,children:c.icon}),c.badge!==void 0&&o.jsx("span",{className:Re.badge,children:c.badge})]}),s&&o.jsx("span",{className:Re.label,children:c.label})]},c.key)})})}const ko="tempest_root_qXce2",No="tempest_backdrop_WLqh0",So="tempest_sheet_Okz1P",Co="tempest_handle_GWCoK",Eo="tempest_handleBar_XPPiI",To="tempest_title_i5Vuc",Mo="tempest_body_bgDhJ",Le={root:ko,backdrop:No,sheet:So,handle:Co,handleBar:Eo,title:To,body:Mo};function Ro({open:e,onClose:t,title:n,showHandle:s=!0,dismissOnBackdrop:r=!0,dismissOnEsc:a=!0,className:c,children:i,...u}){return l.useEffect(()=>{if(!e||!a)return;const d=p=>{p.key==="Escape"&&t()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[e,a,t]),l.useEffect(()=>{if(!e)return;const d=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=d}},[e]),!e||typeof document>"u"?null:Ge.createPortal(o.jsxs("div",{className:Le.root,role:"dialog","aria-modal":"true",children:[o.jsx("div",{className:Le.backdrop,onClick:()=>r&&t(),"aria-hidden":"true"}),o.jsxs("div",{className:x.cn(Le.sheet,c),...u,children:[s&&o.jsx("button",{type:"button",className:Le.handle,"aria-label":"Arrastar para fechar",onClick:t,children:o.jsx("span",{className:Le.handleBar})}),n&&o.jsx("div",{className:Le.title,children:n}),o.jsx("div",{className:Le.body,children:i})]})]}),document.body)}const Lo="tempest_nav_H4g6P",Do="tempest_item_O4g3P",Io="tempest_link_7WM67",Po="tempest_current_JdlcS",Ao="tempest_separator_zGWyJ",Qe={nav:Lo,item:Do,link:Io,current:Po,separator:Ao};function Fo({items:e,separator:t="/",className:n}){return o.jsx("nav",{"aria-label":"breadcrumb",className:x.cn(Qe.nav,n),children:e.map((s,r)=>{const a=r===e.length-1,c=!a&&(s.href||s.onClick);return o.jsxs(l.Fragment,{children:[o.jsx("span",{className:Qe.item,children:c?o.jsx("a",{href:s.href,onClick:i=>{s.onClick&&(i.preventDefault(),s.onClick())},className:Qe.link,children:s.label}):o.jsx("span",{"aria-current":a?"page":void 0,className:a?Qe.current:void 0,children:s.label})}),!a&&o.jsx("span",{className:Qe.separator,"aria-hidden":!0,children:t})]},r)})})}const Oo="tempest_button_2ZuB7",Bo="tempest_primary_s1sM6",zo="tempest_secondary_R0waJ",Wo="tempest_danger_V4fX8",qo="tempest_success_w6qB6",Uo="tempest_ghost_1KINV",Ko="tempest_soft_c3kzm",Ho="tempest_outline_F5jq-",Go="tempest_link_Zt5hw",Jo="tempest_xs_cF6m0",Qo="tempest_sm_NhG0g",Yo="tempest_md_hH4h3",Vo="tempest_lg_2plQf",Xo="tempest_xl_nx4V0",Zo="tempest_iconOnly_WCpTS",ea="tempest_pill_lx8lt",ta="tempest_fullWidth_36oJT",na="tempest_loading_EQAt2",sa="tempest_hiddenText_hIiJ2",ra="tempest_spinner_ZExvW",oa="tempest_tempest-spin_UOSVC",_e={button:Oo,primary:Bo,secondary:zo,danger:Wo,success:qo,ghost:Uo,soft:Ko,outline:Ho,link:Go,xs:Jo,sm:Qo,md:Yo,lg:Vo,xl:Xo,iconOnly:Zo,pill:ea,fullWidth:ta,loading:na,hiddenText:sa,spinner:ra,tempestSpin:oa};function vt({variant:e="primary",size:t="md",loading:n=!1,fullWidth:s=!1,iconOnly:r=!1,pill:a=!1,leftIcon:c,rightIcon:i,disabled:u,className:d,children:p,...m}){return o.jsxs("button",{className:x.cn(_e.button,_e[e],_e[t],r&&_e.iconOnly,a&&_e.pill,n&&_e.loading,s&&_e.fullWidth,d),disabled:u||n,...m,children:[n&&o.jsx("span",{className:_e.spinner,"aria-hidden":!0,children:o.jsx(aa,{})}),o.jsxs("span",{className:x.cn(n&&_e.hiddenText),children:[c,p,i]})]})}function aa(){return o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const ca="tempest_card_Cb1o4",ia="tempest_flat_LRpce",la="tempest_raised_WmIqk",ua="tempest_elevated_5VEDw",da="tempest_interactive_B8Tah",pa="tempest_padded_oOxwN",ma="tempest_flush_aiDZi",fa="tempest_header_PTXf2",ha="tempest_title_mSgoo",_a="tempest_body_W441Z",ga="tempest_footer_Mu-JC",te={card:ca,flat:ia,raised:la,elevated:ua,interactive:da,padded:pa,flush:ma,header:fa,title:ha,body:_a,footer:ga};function ba({title:e,actions:t,footer:n,flush:s=!1,interactive:r=!1,elevation:a="default",className:c,children:i,...u}){const d=!!(e||t);return o.jsxs("div",{className:x.cn(te.card,a==="flat"&&te.flat,a==="raised"&&te.raised,a==="elevated"&&te.elevated,r&&te.interactive,!d&&!s&&te.padded,s&&te.flush,c),tabIndex:r?u.tabIndex??0:u.tabIndex,...u,children:[d&&o.jsxs("header",{className:te.header,children:[typeof e=="string"?o.jsx("h3",{className:te.title,children:e}):e,t]}),d?o.jsx("div",{className:te.body,children:i}):i,n&&o.jsx("footer",{className:te.footer,children:n})]})}const ya="tempest_center_Pu1Pf",va="tempest_both_53GWn",wa="tempest_horizontal_94-Bt",xa="tempest_vertical_Q7Kyg",Xt={center:ya,both:va,horizontal:wa,vertical:xa};function ja({axis:e="both",minHeight:t,fullWidth:n=!0,className:s,style:r,children:a,...c}){const i={...t!==void 0?{minHeight:typeof t=="number"?`${t}px`:t}:null,...n?{width:"100%"}:null,...r};return o.jsx("div",{className:x.cn(Xt.center,Xt[e],s),style:i,...c,children:a})}const $a="tempest_wrapper_rpthW",ka="tempest_disabled_x7-eg",Na="tempest_input_2kt-h",Sa="tempest_box_OCPee",Ca="tempest_labelWrap_Ktbp0",Ea="tempest_label_cwRtI",Ta="tempest_description_rMhG1",De={wrapper:$a,disabled:ka,input:Na,box:Sa,labelWrap:Ca,label:Ea,description:Ta},Ma=l.forwardRef(function({label:t,description:n,indeterminate:s,disabled:r,wrapperClassName:a,className:c,...i},u){const d=l.useRef(null);l.useEffect(()=>{d.current&&(d.current.indeterminate=!!s)},[s]);function p(m){d.current=m,typeof u=="function"?u(m):u&&(u.current=m)}return o.jsxs("label",{className:x.cn(De.wrapper,r&&De.disabled,a),children:[o.jsx("input",{ref:p,type:"checkbox",disabled:r,className:x.cn(De.input,c),...i}),o.jsx("span",{className:De.box,"aria-hidden":!0,children:s?o.jsx(La,{}):o.jsx(Ra,{})}),(t||n)&&o.jsxs("span",{className:De.labelWrap,children:[t&&o.jsx("span",{className:De.label,children:t}),n&&o.jsx("span",{className:De.description,children:n})]})]})});function Ra(){return o.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M5 12l5 5L20 7",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})})}function La(){return o.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M5 12h14",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})})}const Da="tempest_wrapper_KR4-F",Ia="tempest_label_Mz-wX",Pa="tempest_field_iIBJw",Aa="tempest_error_O9n-9",Fa="tempest_chip_GEwrc",Oa="tempest_remove_JYDIq",Ba="tempest_input_frJmk",za="tempest_helper_Yts53",Wa="tempest_errorText_llJGq",ge={wrapper:Da,label:Ia,field:Pa,error:Aa,chip:Fa,remove:Oa,input:Ba,helper:za,errorText:Wa};function qa({value:e,onChange:t,label:n,placeholder:s="Adicionar e pressionar Enter…",helperText:r,error:a,commitKeys:c=["Enter",",","Tab"],normalize:i=!0,className:u}){const[d,p]=l.useState(""),m=l.useRef(null);function f(){const b=i?d.trim().toLowerCase():d.trim();if(b){if(e.includes(b)){p("");return}t([...e,b]),p("")}}function h(b){if(c.includes(b.key)){b.preventDefault(),f();return}b.key==="Backspace"&&!d&&e.length>0&&t(e.slice(0,-1))}function _(b){const v=e.slice();v.splice(b,1),t(v)}return o.jsxs("div",{className:x.cn(ge.wrapper,a&&ge.error,u),children:[n&&o.jsx("label",{className:ge.label,children:n}),o.jsxs("div",{className:ge.field,onClick:()=>m.current?.focus(),children:[e.map((b,v)=>o.jsxs("span",{className:ge.chip,children:[b,o.jsx("button",{type:"button",className:ge.remove,"aria-label":`Remover ${b}`,onClick:()=>_(v),children:"×"})]},`${b}-${v}`)),o.jsx("input",{ref:m,className:ge.input,value:d,placeholder:e.length===0?s:"",onChange:b=>p(b.target.value),onKeyDown:h,onBlur:f})]}),a?o.jsx("span",{className:ge.errorText,children:a}):r?o.jsx("span",{className:ge.helper,children:r}):null]})}const Ua="tempest_wrapper_TNvle",Ka="tempest_label_KVkZO",Ha="tempest_field_BenH0",Ga="tempest_input_-HTv1",Ja="tempest_caret_jRplQ",Qa="tempest_menu_zPQG3",Ya="tempest_option_vhhn5",Va="tempest_active_XCgtX",Xa="tempest_selected_T6nm2",Za="tempest_empty_Ahw5K",ec="tempest_helper_OzB7V",tc="tempest_errorText_X18sQ",nc="tempest_error_bnVuM",U={wrapper:Ua,label:Ka,field:Ha,input:Ga,caret:Ja,menu:Qa,option:Ya,active:Va,selected:Xa,empty:Za,helper:ec,errorText:tc,error:nc};function sc(e,t){return t?e.label.toLowerCase().includes(t.toLowerCase()):!0}function rc({options:e,value:t,onChange:n,label:s,placeholder:r="Selecione",helperText:a,error:c,disabled:i,filter:u=sc,emptyMessage:d="Nenhuma opção encontrada",className:p}){const m=l.useId(),f=l.useRef(null),h=l.useRef(null),[_,b]=l.useState(!1),[v,g]=l.useState(""),[w,y]=l.useState(0),j=l.useMemo(()=>e.find(k=>k.value===t)?.label??"",[e,t]),S=l.useMemo(()=>e.filter(k=>u(k,v)),[e,u,v]),M=l.useCallback(()=>{b(!1),g(""),y(0)},[]),T=l.useCallback(k=>{k.disabled||(n(k.value),M())},[n,M]);l.useEffect(()=>{if(!_)return;const k=E=>{f.current&&!f.current.contains(E.target)&&M()};return window.addEventListener("mousedown",k),()=>window.removeEventListener("mousedown",k)},[_,M]);const N=k=>{if(k.key==="ArrowDown")k.preventDefault(),b(!0),y(E=>Math.min(S.length-1,E+1));else if(k.key==="ArrowUp")k.preventDefault(),y(E=>Math.max(0,E-1));else if(k.key==="Enter"){k.preventDefault();const E=S[w];E&&T(E)}else k.key==="Escape"&&M()};return o.jsxs("div",{ref:f,className:x.cn(U.wrapper,c&&U.error,p),children:[s&&o.jsx("label",{htmlFor:m,className:U.label,children:s}),o.jsxs("div",{className:U.field,children:[o.jsx("input",{id:m,ref:h,type:"text",role:"combobox","aria-expanded":_,"aria-controls":`${m}-listbox`,"aria-autocomplete":"list",className:U.input,placeholder:r,disabled:i,value:_?v:j,onFocus:()=>b(!0),onChange:k=>{g(k.target.value),b(!0),y(0)},onKeyDown:N}),o.jsx("span",{className:U.caret,"aria-hidden":!0,children:"▾"})]}),_&&o.jsx("ul",{id:`${m}-listbox`,role:"listbox",className:U.menu,children:S.length===0?o.jsx("li",{className:U.empty,children:d}):S.map((k,E)=>o.jsx("li",{role:"option","aria-selected":k.value===t,className:x.cn(U.option,E===w&&U.active,k.value===t&&U.selected),onMouseEnter:()=>y(E),onMouseDown:D=>{D.preventDefault(),T(k)},children:k.label},k.value))}),c?o.jsx("span",{className:U.errorText,children:c}):a?o.jsx("span",{className:U.helper,children:a}):null]})}const oc="tempest_overlay_dd9h1",ac="tempest_tempest-fade-in_DvgSp",cc="tempest_dialog_ptM-K",ic="tempest_tempest-modal-in_UoxQC",lc="tempest_sm_K5k3W",uc="tempest_md_gvyR7",dc="tempest_lg_BgB1a",pc="tempest_xl_MR-68",mc="tempest_size2xl_-PH9e",fc="tempest_size3xl_iqDwN",hc="tempest_fullscreen_o84Xi",_c="tempest_fullscreenOnMobile_0bDwe",gc="tempest_body_lVhql",bc="tempest_header_ILG9i",yc="tempest_footer_rro2w",vc="tempest_title_A5OeE",wc="tempest_close_-ER1C",V={overlay:oc,tempestFadeIn:ac,dialog:cc,tempestModalIn:ic,sm:lc,md:uc,lg:dc,xl:pc,size2Xl:mc,size3Xl:fc,fullscreen:hc,fullscreenOnMobile:_c,body:gc,header:bc,footer:yc,title:vc,close:wc};function Kt({open:e,onClose:t,title:n,children:s,footer:r,size:a="md",closeOnBackdrop:c=!0,closeOnEsc:i=!0,className:u,hideCloseButton:d=!1,fullscreen:p=!1,fullscreenOnMobile:m=!1}){return l.useEffect(()=>{if(!e)return;const f=document.body.style.overflow;document.body.style.overflow="hidden";const h=_=>{i&&_.key==="Escape"&&t()};return window.addEventListener("keydown",h),()=>{document.body.style.overflow=f,window.removeEventListener("keydown",h)}},[e,i,t]),!e||typeof document>"u"?null:Ge.createPortal(o.jsx("div",{className:V.overlay,role:"presentation",onClick:()=>{c&&t()},children:o.jsxs("div",{role:"dialog","aria-modal":"true",className:x.cn(V.dialog,xc(a),p&&V.fullscreen,m&&V.fullscreenOnMobile,u),onClick:f=>f.stopPropagation(),children:[(n||!d)&&o.jsxs("header",{className:V.header,children:[o.jsx("h3",{className:V.title,children:n}),!d&&o.jsx("button",{type:"button",className:V.close,"aria-label":"Fechar",onClick:t,children:o.jsx(jc,{})})]}),o.jsx("div",{className:V.body,children:s}),r&&o.jsx("footer",{className:V.footer,children:r})]})}),document.body)}function xc(e){return e==="2xl"?V.size2xl:e==="3xl"?V.size3xl:V[e]}function jc(){return o.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 6l12 12M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}function Sn({open:e,title:t,description:n,confirmLabel:s="Confirmar",cancelLabel:r="Cancelar",variant:a="primary",loading:c=!1,onConfirm:i,onCancel:u}){return o.jsx(Kt,{open:e,onClose:u,title:t,size:"sm",footer:o.jsxs(o.Fragment,{children:[o.jsx(vt,{variant:"secondary",onClick:u,disabled:c,children:r}),o.jsx(vt,{variant:a,loading:c,onClick:()=>{i()},children:s})]}),children:n})}const $c="tempest_wrapper_iHNUs",kc="tempest_label_-OEBL",Nc="tempest_required_CTss-",Sc="tempest_field_65yGJ",Cc="tempest_input_WjT81",Ec="tempest_sizeSm_cgds6",Tc="tempest_sizeMd_EPFGy",Mc="tempest_sizeLg_5Cq8k",Rc="tempest_hasLeftIcon_xYO-v",Lc="tempest_hasRightIcon_C7uyr",Dc="tempest_iconLeft_KrUhI",Ic="tempest_iconRight_Ssr47",Pc="tempest_error_VLISa",Ac="tempest_helper_7Vc-s",Fc="tempest_errorText_xz4xS",z={wrapper:$c,label:kc,required:Nc,field:Sc,input:Cc,sizeSm:Ec,sizeMd:Tc,sizeLg:Mc,hasLeftIcon:Rc,hasRightIcon:Lc,iconLeft:Dc,iconRight:Ic,error:Pc,helper:Ac,errorText:Fc},jt=l.forwardRef(function({label:t,helperText:n,error:s,leftIcon:r,rightIcon:a,wrapperClassName:c,className:i,id:u,required:d,size:p="md",...m},f){const h=l.useId(),_=u??h,b=s?`${_}-error`:n?`${_}-helper`:void 0,v=p==="sm"?z.sizeSm:p==="lg"?z.sizeLg:z.sizeMd;return o.jsxs("div",{className:x.cn(z.wrapper,s&&z.error,c),children:[t&&o.jsxs("label",{htmlFor:_,className:z.label,children:[t,d&&o.jsx("span",{className:z.required,children:"*"})]}),o.jsxs("div",{className:z.field,children:[r&&o.jsx("span",{className:z.iconLeft,children:r}),o.jsx("input",{ref:f,id:_,"aria-invalid":!!s,"aria-describedby":b,required:d,className:x.cn(z.input,v,r&&z.hasLeftIcon,a&&z.hasRightIcon,i),...m}),a&&o.jsx("span",{className:z.iconRight,children:a})]}),s?o.jsx("span",{id:`${_}-error`,className:z.errorText,children:s}):n?o.jsx("span",{id:`${_}-helper`,className:z.helper,children:n}):null]})}),Oc=l.forwardRef(function({value:t,onChange:n,mode:s="date",...r},a){return o.jsx(jt,{...r,ref:a,type:s,value:t,onChange:c=>n(c.target.value)})}),Bc="tempest_divider_KSGsi",zc="tempest_horizontal_pZ05Y",Wc="tempest_bare_elDbS",qc="tempest_vertical_p-jD4",Uc="tempest_dashed_JWxCU",Kc="tempest_alignStart_QAIi1",Hc="tempest_alignEnd_eZDwa",J={divider:Bc,horizontal:zc,bare:Wc,vertical:qc,dashed:Uc,alignStart:Kc,alignEnd:Hc};function Gc({orientation:e="horizontal",variant:t="solid",label:n,align:s="center",className:r,...a}){return e==="vertical"?o.jsx("span",{role:"separator","aria-orientation":"vertical",className:x.cn(J.divider,J.vertical,t==="dashed"&&J.dashed,r),...a}):n?o.jsx("div",{role:"separator","aria-orientation":"horizontal",className:x.cn(J.divider,J.horizontal,t==="dashed"&&J.dashed,s==="start"&&J.alignStart,s==="end"&&J.alignEnd,r),...a,children:n}):o.jsx("hr",{className:x.cn(J.divider,J.horizontal,J.bare,t==="dashed"&&J.dashed,r)})}const Jc="tempest_overlay_hcG1G",Qc="tempest_tempest-drawer-overlay_XFbxY",Yc="tempest_panel_wUX0N",Vc="tempest_right_-oX-6",Xc="tempest_tempest-drawer-in-right_pWYHv",Zc="tempest_left_xi3nD",ei="tempest_tempest-drawer-in-left_o7JSb",ti="tempest_top_7rGCn",ni="tempest_tempest-drawer-in-top_kn6AF",si="tempest_bottom_zd-25",ri="tempest_tempest-drawer-in-bottom_0x3u7",oi="tempest_handle_5B-TB",ai="tempest_handleTop_7aMf-",ci="tempest_header_sYoP1",ii="tempest_title_LqUOu",li="tempest_close_tYPhU",ui="tempest_body_aV9FG",di="tempest_footer_AuvUP",le={overlay:Jc,tempestDrawerOverlay:Qc,panel:Yc,right:Vc,tempestDrawerInRight:Xc,left:Zc,tempestDrawerInLeft:ei,top:ti,tempestDrawerInTop:ni,bottom:si,tempestDrawerInBottom:ri,handle:oi,handleTop:ai,header:ci,title:ii,close:li,body:ui,footer:di};function pi({open:e,onClose:t,placement:n="right",title:s,children:r,footer:a,closeOnBackdrop:c=!0,closeOnEsc:i=!0,hideCloseButton:u=!1,className:d,mobilePlacement:p,showHandle:m=!1}){const{isMobile:f}=Oe(),h=f&&p?p:n;return l.useEffect(()=>{if(!e)return;const _=document.body.style.overflow;document.body.style.overflow="hidden";const b=v=>{i&&v.key==="Escape"&&t()};return window.addEventListener("keydown",b),()=>{document.body.style.overflow=_,window.removeEventListener("keydown",b)}},[e,i,t]),!e||typeof document>"u"?null:Ge.createPortal(o.jsxs(o.Fragment,{children:[o.jsx("div",{className:le.overlay,onClick:()=>{c&&t()}}),o.jsxs("aside",{role:"dialog","aria-modal":"true",className:x.cn(le.panel,le[h],d),children:[m&&(h==="bottom"||h==="top")&&o.jsx("div",{className:x.cn(le.handle,h==="top"&&le.handleTop),"aria-hidden":!0}),(s||!u)&&o.jsxs("header",{className:le.header,children:[o.jsx("h3",{className:le.title,children:s}),!u&&o.jsx("button",{type:"button","aria-label":"Fechar",className:le.close,onClick:t,children:o.jsx(mi,{})})]}),o.jsx("div",{className:le.body,children:r}),a&&o.jsx("footer",{className:le.footer,children:a})]})]}),document.body)}function mi(){return o.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 6l12 12M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const fi="tempest_root_5ZetV",hi="tempest_menu_-RiRW",_i="tempest_bottomStart_z60h9",gi="tempest_bottomEnd_b1tmU",bi="tempest_topStart_A0em2",yi="tempest_topEnd_cFA5-",vi="tempest_item_T-QPZ",wi="tempest_active_WNqoX",xi="tempest_danger_C0jN3",ji="tempest_separator_RimQa",$i="tempest_label_6yP76",ae={root:fi,menu:hi,bottomStart:_i,bottomEnd:gi,topStart:bi,topEnd:yi,item:vi,active:wi,danger:xi,separator:ji,label:$i};function ki(e){switch(e){case"bottom-end":return ae.bottomEnd;case"top-start":return ae.topStart;case"top-end":return ae.topEnd;default:return ae.bottomStart}}function Ni({trigger:e,items:t,placement:n="bottom-start",className:s}){const[r,a]=l.useState(!1),[c,i]=l.useState(-1),u=l.useId(),d=l.useRef(null),p=l.useRef([]),m=t.map((v,g)=>v.type==="item"&&!v.disabled?g:-1).filter(v=>v!==-1),f=l.useCallback(()=>{a(!1),i(-1)},[]);l.useEffect(()=>{if(!r)return;const v=w=>{if(w.key==="Escape"){f();return}if(w.key==="ArrowDown"){w.preventDefault();const y=m.indexOf(c),j=m[(y+1)%m.length]??-1;i(j),p.current[j]?.focus()}if(w.key==="ArrowUp"){w.preventDefault();const y=m.indexOf(c),j=m[(y-1+m.length)%m.length]??-1;i(j),p.current[j]?.focus()}},g=w=>{d.current&&!d.current.contains(w.target)&&f()};return window.addEventListener("keydown",v),window.addEventListener("mousedown",g),()=>{window.removeEventListener("keydown",v),window.removeEventListener("mousedown",g)}},[r,c,m,f]);const h=v=>{e.props.onClick?.(v),a(g=>!g)},_={...e,props:{...e.props,onClick:h,"aria-expanded":r,"aria-controls":u,"aria-haspopup":"menu"}},b=v=>{v.onSelect(),f()};return o.jsxs("span",{ref:d,className:ae.root,children:[_,r&&o.jsx("ul",{id:u,role:"menu",className:x.cn(ae.menu,ki(n),s),children:t.map((v,g)=>v.type==="separator"?o.jsx("li",{role:"separator",className:ae.separator,"aria-hidden":!0},v.id):v.type==="label"?o.jsx("li",{role:"presentation",className:ae.label,children:v.label},v.id):o.jsx("li",{role:"none",children:o.jsxs("button",{ref:w=>{p.current[g]=w},type:"button",role:"menuitem",className:x.cn(ae.item,v.danger&&ae.danger,c===g&&ae.active),disabled:v.disabled,onClick:()=>b(v),onMouseEnter:()=>i(g),children:[v.icon&&o.jsx("span",{"aria-hidden":!0,children:v.icon}),v.label]})},v.id))})]})}const Si="tempest_zone_u04pu",Ci="tempest_dragging_uGtl4",Ei="tempest_disabled_GTKfV",Ti="tempest_input_qhJ1u",Mi="tempest_prompt_mlpWz",Ye={zone:Si,dragging:Ci,disabled:Ei,input:Ti,prompt:Mi};function Ri({onDrop:e,accept:t,multiple:n=!0,disabled:s=!1,maxSize:r,onReject:a,children:c,className:i}){const u=l.useRef(null),[d,p]=l.useState(!1),m=w=>{if(!w||w.length===0)return;const y=Array.from(w),j=n?y:y.slice(0,1);if(r===void 0){e(j);return}const S=[],M=[];for(const T of j)T.size>r?M.push(T):S.push(T);M.length>0&&a?.(M),S.length>0&&e(S)},f=()=>{s||u.current?.click()},h=w=>{w.preventDefault(),!s&&p(!0)},_=w=>{w.preventDefault()},b=w=>{w.preventDefault(),p(!1)},v=w=>{w.preventDefault(),p(!1),!s&&m(w.dataTransfer.files)},g=w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),f())};return o.jsxs("div",{role:"button",tabIndex:s?-1:0,"aria-disabled":s||void 0,className:x.cn(Ye.zone,d&&Ye.dragging,s&&Ye.disabled,i),onClick:f,onKeyDown:g,onDragEnter:h,onDragOver:_,onDragLeave:b,onDrop:v,children:[o.jsx("input",{ref:u,type:"file",className:Ye.input,accept:t,multiple:n,disabled:s,onChange:w=>{m(w.target.files),w.target.value=""}}),c??o.jsx("span",{className:Ye.prompt,children:"Arraste arquivos aqui ou clique para selecionar"})]})}const Li="tempest_wrapper_gzyTd",Di="tempest_icon_qVCyh",Ii="tempest_title_xPfUf",Pi="tempest_description_oWwH1",Ai="tempest_action_dqxw1",Ve={wrapper:Li,icon:Di,title:Ii,description:Pi,action:Ai};function Fi({icon:e,title:t,description:n,action:s,className:r}){return o.jsxs("div",{className:x.cn(Ve.wrapper,r),children:[e&&o.jsx("div",{className:Ve.icon,children:e}),o.jsx("h4",{className:Ve.title,children:t}),n&&o.jsx("p",{className:Ve.description,children:n}),s&&o.jsx("div",{className:Ve.action,children:s})]})}const Oi="tempest_wrapper_luRyF",Bi="tempest_icon_dEdBl",zi="tempest_title_StutD",Wi="tempest_description_A2XCb",qi="tempest_action_vm1LC",Xe={wrapper:Oi,icon:Bi,title:zi,description:Wi,action:qi};function Ui({title:e="Algo deu errado",description:t="Não foi possível carregar essas informações.",onRetry:n,retryLabel:s="Tentar novamente",icon:r,className:a}){return o.jsxs("div",{className:x.cn(Xe.wrapper,a),children:[o.jsx("div",{className:Xe.icon,children:r??o.jsx(Ki,{})}),o.jsx("h4",{className:Xe.title,children:e}),t&&o.jsx("p",{className:Xe.description,children:t}),n&&o.jsx("div",{className:Xe.action,children:o.jsx(vt,{variant:"secondary",onClick:n,children:s})})]})}function Ki(){return o.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M12 9v4m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}const Hi="tempest_wrapper_E0qHs",Gi="tempest_label_lbMkx",Ji="tempest_dropzone_jqua0",Qi="tempest_active_CG9Uk",Yi="tempest_disabled_WNUUl",Vi="tempest_icon_i9fGH",Xi="tempest_title_bTVFl",Zi="tempest_subtitle_S54OV",el="tempest_files_WljYm",tl="tempest_file_Lp-dR",nl="tempest_fileMeta_LTnN2",sl="tempest_remove_jskra",rl="tempest_hidden_ReEq6",K={wrapper:Hi,label:Gi,dropzone:Ji,active:Qi,disabled:Yi,icon:Vi,title:Xi,subtitle:Zi,files:el,file:tl,fileMeta:nl,remove:sl,hidden:rl};function ol(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function al(e,t){if(!t)return!0;const n=t.split(",").map(a=>a.trim().toLowerCase()),s=e.name.toLowerCase(),r=e.type.toLowerCase();return n.some(a=>a.startsWith(".")?s.endsWith(a):a.endsWith("/*")?r.startsWith(a.replace("/*","/")):r===a)}function cl({value:e,onChange:t,label:n,accept:s,multiple:r=!1,maxSize:a,onReject:c,disabled:i,title:u="Arraste arquivos aqui ou clique para selecionar",subtitle:d,className:p}){const[m,f]=l.useState(!1),h=l.useRef(null);function _(g){const w=[],y=[];for(const S of Array.from(g)){if(!al(S,s)){y.push({file:S,reason:"type"});continue}if(a&&S.size>a){y.push({file:S,reason:"size"});continue}w.push(S)}if(y.length>0&&c?.(y),w.length===0)return;const j=r?[...e,...w]:w.slice(0,1);t(j)}function b(g){g.preventDefault(),f(!1),!i&&g.dataTransfer?.files&&_(g.dataTransfer.files)}function v(g){const w=e.slice();w.splice(g,1),t(w)}return o.jsxs("div",{className:x.cn(K.wrapper,p),children:[n&&o.jsx("label",{className:K.label,children:n}),o.jsxs("div",{className:x.cn(K.dropzone,m&&K.active,i&&K.disabled),role:"button",tabIndex:i?-1:0,onClick:()=>!i&&h.current?.click(),onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),h.current?.click())},onDragEnter:g=>{g.preventDefault(),i||f(!0)},onDragOver:g=>g.preventDefault(),onDragLeave:()=>f(!1),onDrop:b,children:[o.jsx("div",{className:K.icon,"aria-hidden":!0,children:o.jsx(il,{})}),o.jsx("p",{className:K.title,children:u}),d&&o.jsx("p",{className:K.subtitle,children:d}),o.jsx("input",{ref:h,type:"file",accept:s,multiple:r,disabled:i,className:K.hidden,onChange:g=>{g.target.files&&_(g.target.files),g.target.value=""}})]}),e.length>0&&o.jsx("ul",{className:K.files,children:e.map((g,w)=>o.jsxs("li",{className:K.file,children:[o.jsxs("div",{children:[o.jsx("div",{children:g.name}),o.jsx("div",{className:K.fileMeta,children:ol(g.size)})]}),o.jsx("button",{type:"button","aria-label":`Remover ${g.name}`,className:K.remove,onClick:()=>v(w),children:"×"})]},`${g.name}-${w}`))})]})}function il(){return o.jsx("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M12 16V4m0 0l-4 4m4-4l4 4M4 20h16",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}const ll="tempest_form_jNBDR",ul="tempest_stack_O1Hl-",dl="tempest_inline_LBQAv",pl="tempest_grid_-B86T",ml="tempest_section_HGqw3",fl="tempest_sectionHeader_ji9hQ",hl="tempest_sectionTitle_GTPwe",_l="tempest_sectionDescription_KjW7k",gl="tempest_sectionBody_Vp2wz",bl="tempest_row_1EkVR",yl="tempest_actions_hK95I",vl="tempest_start_gXnm3",wl="tempest_center_mKkz4",xl="tempest_end_O3yDQ",jl="tempest_between_tte2z",ce={form:ll,stack:ul,inline:dl,grid:pl,section:ml,sectionHeader:fl,sectionTitle:hl,sectionDescription:_l,sectionBody:gl,row:bl,actions:yl,start:vl,center:wl,end:xl,between:jl};function $t(e,t){return e===void 0?`${t*4}px`:typeof e=="number"?`${e*4}px`:e}function Cn(e){return e===void 0?"repeat(2, minmax(0, 1fr))":typeof e=="number"?`repeat(${e}, minmax(0, 1fr))`:e}const $l=l.forwardRef(function({layout:t="stack",columns:n,gap:s,className:r,style:a,children:c,...i},u){const d={gap:$t(s,4),...t==="grid"?{gridTemplateColumns:Cn(n)}:null,...a};return o.jsx("form",{ref:u,className:x.cn(ce.form,ce[t],r),style:d,...i,children:c})});function kl({title:e,description:t,layout:n="stack",columns:s,gap:r,className:a,style:c,children:i,...u}){const d={gap:$t(r,4),...n==="grid"?{gridTemplateColumns:Cn(s)}:null};return o.jsxs("section",{className:x.cn(ce.section,a),style:c,...u,children:[(e||t)&&o.jsxs("header",{className:ce.sectionHeader,children:[e&&o.jsx("h3",{className:ce.sectionTitle,children:e}),t&&o.jsx("p",{className:ce.sectionDescription,children:t})]}),o.jsx("div",{className:x.cn(ce.sectionBody,ce[n]),style:d,children:i})]})}function Nl({gap:e,className:t,style:n,children:s,...r}){const a={gap:$t(e,3),...n};return o.jsx("div",{className:x.cn(ce.row,t),style:a,...r,children:s})}function Sl({align:e="end",gap:t,className:n,style:s,children:r,...a}){const c={gap:$t(t,2),...s};return o.jsx("div",{className:x.cn(ce.actions,ce[e],n),style:c,...a,children:r})}const Cl="tempest_container_fJfOt",El="tempest_sm_k8D4-",Tl="tempest_md_EnpYy",Ml="tempest_lg_UU-Ig",Rl="tempest_xl_2TEWj",Ll="tempest_full_l8bvG",Dl="tempest_stack_sxR8u",Il="tempest_vertical_2TMf5",Pl="tempest_horizontal_r7-c-",Al="tempest_center_EDSAh",Fl="tempest_start_ucQ-K",Ol="tempest_end_pnKlF",Bl="tempest_stretch_pX6l7",zl="tempest_justifyStart_lHYsS",Wl="tempest_justifyCenter_JH2m6",ql="tempest_justifyEnd_EBisT",Ul="tempest_justifyBetween_mAJwT",Kl="tempest_wrap_-xxOh",Hl="tempest_grid_o-JIX",X={container:Cl,sm:El,md:Tl,lg:Ml,xl:Rl,full:Ll,stack:Dl,vertical:Il,horizontal:Pl,center:Al,start:Fl,end:Ol,stretch:Bl,justifyStart:zl,justifyCenter:Wl,justifyEnd:ql,justifyBetween:Ul,wrap:Kl,grid:Hl};function Gl({size:e="lg",className:t,children:n,...s}){return o.jsx("div",{className:x.cn(X.container,X[e],t),...s,children:n})}function Jl(e){return typeof e=="object"&&e!==null&&("mobile"in e||"tablet"in e||"desktop"in e)}function wt(e,t){if(e!==void 0)return Jl(e)?t==="desktop"?e.desktop??e.tablet??e.mobile:t==="tablet"?e.tablet??e.mobile??e.desktop:e.mobile??e.tablet??e.desktop:e}function En(e){if(e!==void 0)return typeof e=="number"?`${e*4}px`:e}function Tn(e,t){return e?"mobile":t?"tablet":"desktop"}function Ql({direction:e="vertical",gap:t=2,align:n,justify:s,wrap:r=!1,className:a,style:c,children:i,...u}){const{isMobile:d,isTablet:p}=Oe(),m=Tn(d,p),f=wt(e,m)??"vertical",_={gap:En(wt(t,m)),...c},b=s==="between"?X.justifyBetween:s==="center"?X.justifyCenter:s==="end"?X.justifyEnd:s==="start"?X.justifyStart:void 0;return o.jsx("div",{className:x.cn(X.stack,f==="vertical"?X.vertical:X.horizontal,n&&X[n],b,r&&X.wrap,a),style:_,...u,children:i})}function Yl(e){if(e!==void 0)return typeof e=="number"?`repeat(${e}, minmax(0, 1fr))`:e}function Vl({columns:e=2,gap:t=4,className:n,style:s,children:r,...a}){const{isMobile:c,isTablet:i}=Oe(),u=Tn(c,i),d=Yl(wt(e,u)),p=En(wt(t,u));return o.jsx("div",{className:x.cn(X.grid,n),style:{gridTemplateColumns:d,gap:p,...s},...a,children:r})}const Xl="tempest_kbd_jgbYx",Zl="tempest_sm_9WPWA",eu="tempest_md_BePC0",tu="tempest_lg_cBKum",Zt={kbd:Xl,sm:Zl,md:eu,lg:tu};function nu({size:e="md",className:t,children:n,...s}){return o.jsx("kbd",{className:x.cn(Zt.kbd,Zt[e],t),...s,children:n})}const su="tempest_stack_zYzdv",ru={stack:su},Mn=l.createContext(null);function ou({children:e}){const[t,n]=l.useState([]),s=l.useRef(0),r=l.useCallback(()=>(s.current+=1,`modal-${s.current}`),[]),a=l.useCallback(p=>{n(m=>m.filter(f=>f.id!==p))},[]),c=l.useCallback(()=>{n([])},[]),i=l.useCallback(p=>{const m=r();return n(f=>[...f,{kind:"content",id:m,options:p}]),m},[r]),u=l.useCallback(p=>{const m=r();return n(f=>[...f,{kind:"confirm",id:m,options:p}]),m},[r]),d=l.useMemo(()=>({open:i,confirm:u,close:a,closeAll:c}),[i,u,a,c]);return o.jsxs(Mn.Provider,{value:d,children:[e,o.jsx("div",{className:ru.stack,children:t.map(p=>p.kind==="content"?o.jsx(au,{entry:p,close:a},p.id):o.jsx(cu,{entry:p,close:a},p.id))})]})}function au({entry:e,close:t}){const{options:n,id:s}=e,r=()=>{n.onClose?.(),t(s)};return o.jsx(Kt,{open:!0,onClose:r,title:n.title,size:n.size,closeOnBackdrop:n.closeOnBackdrop,closeOnEsc:n.closeOnEsc,hideCloseButton:n.hideCloseButton,children:n.children})}function cu({entry:e,close:t}){const{options:n,id:s}=e,[r,a]=l.useState(!1),c=async()=>{try{a(!0),await n.onConfirm?.()}finally{a(!1),t(s)}},i=()=>{n.onCancel?.(),t(s)};return o.jsx(Sn,{open:!0,title:n.title??"",description:n.message,confirmLabel:n.confirmLabel,cancelLabel:n.cancelLabel,variant:n.danger?"danger":"primary",loading:r,onConfirm:c,onCancel:i})}function iu(){const e=l.useContext(Mn);if(e===null)throw new Error("useModals must be used within a <ModalsProvider>");return e}const lu="tempest_navbar_Ey25T",uu="tempest_surface_xyKhM",du="tempest_primary_w3ft-",pu="tempest_transparent_N1vMR",mu="tempest_bordered_HD49R",fu="tempest_sticky_0XsOs",hu="tempest_logo_O9j3q",_u="tempest_nav_0oisE",gu="tempest_actions_8BNWJ",Ie={navbar:lu,surface:uu,primary:du,transparent:pu,bordered:mu,sticky:fu,logo:hu,nav:_u,actions:gu};function bu({logo:e,nav:t,actions:n,sticky:s=!0,tone:r="surface",bordered:a=!0,className:c,...i}){return o.jsxs("header",{className:x.cn(Ie.navbar,Ie[r],s&&Ie.sticky,a&&Ie.bordered,c),...i,children:[e&&o.jsx("div",{className:Ie.logo,children:e}),t&&o.jsx("nav",{className:Ie.nav,children:t}),n&&o.jsx("div",{className:Ie.actions,children:n})]})}const yu="tempest_bar_zxTqx",vu={bar:yu},wu=300,en=.9,xu=300;function tn(e){return e<0?0:e>1?1:e}function ju(){let e={value:0,active:!1};const t=new Set;let n=null,s=null;const r=()=>{for(const h of t)h(e)},a=h=>{e={...e,...h},r()},c=()=>{n!==null&&(clearInterval(n),n=null)},i=()=>{s!==null&&(clearTimeout(s),s=null)},u=h=>{const _=e.value;if(_>=en)return;const b=h??(1-_)*.1+.01;a({value:Math.min(tn(_+b),en)})};return{start:()=>{i(),!e.active&&(a({active:!0,value:e.value>0?e.value:.08}),c(),n=setInterval(()=>u(),wu))},done:()=>{c(),i(),a({value:1,active:!0}),s=setTimeout(()=>{a({active:!1,value:0}),s=null},xu)},set:h=>{i();const _=tn(h);a({value:_,active:_<1?!0:e.active})},inc:u,subscribe:h=>(t.add(h),h(e),()=>{t.delete(h)})}}const Rn=ju();function $u({color:e,height:t=3,className:n}){const[s,r]=l.useState({value:0,active:!1});if(l.useEffect(()=>Rn.subscribe(r),[]),!s.active)return null;const a={width:`${Math.round(s.value*100)}%`,height:`${t}px`,background:e??"var(--tempest-primary)"};return o.jsx("div",{className:x.cn(vu.bar,n),style:a,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(s.value*100)})}const ku="tempest_page_THNNc",Nu="tempest_padded_bzjoF",Su="tempest_header_PZEzk",Cu="tempest_headerText_qYXFI",Eu="tempest_eyebrow_651RV",Tu="tempest_title_2oGnT",Mu="tempest_description_YzmWl",Ru="tempest_actions_-rB3U",Lu="tempest_toolbar_sA7sD",Du="tempest_content_RCB4b",Iu="tempest_footer_540pQ",ne={page:ku,padded:Nu,header:Su,headerText:Cu,eyebrow:Eu,title:Tu,description:Mu,actions:Ru,toolbar:Lu,content:Du,footer:Iu};function Pu({title:e,eyebrow:t,description:n,actions:s,toolbar:r,footer:a,padded:c=!0,className:i,children:u,...d}){const p=e||t||n||s;return o.jsxs("main",{className:x.cn(ne.page,c&&ne.padded,i),...d,children:[p&&o.jsxs("header",{className:ne.header,children:[o.jsxs("div",{className:ne.headerText,children:[t&&o.jsx("div",{className:ne.eyebrow,children:t}),e&&o.jsx("h1",{className:ne.title,children:e}),n&&o.jsx("p",{className:ne.description,children:n})]}),s&&o.jsx("div",{className:ne.actions,children:s})]}),r&&o.jsx("div",{className:ne.toolbar,children:r}),o.jsx("div",{className:ne.content,children:u}),a&&o.jsx("footer",{className:ne.footer,children:a})]})}const Au="tempest_wrapper_cRGQm",Fu="tempest_controls_fdL-y",Ou="tempest_page_WjG0l",Bu="tempest_active_1kqsJ",zu="tempest_ellipsis_V294k",Wu="tempest_sizeSelect_ZayTo",qu="tempest_numeric_ztI0I",Uu="tempest_summary_ZTggV",se={wrapper:Au,controls:Fu,page:Ou,active:Bu,ellipsis:zu,sizeSelect:Wu,numeric:qu,summary:Uu};function Ku(e,t,n){const s=n+4;if(t<=s)return Array.from({length:t},(i,u)=>u+1);const r=Math.max(2,e-Math.floor(n/2)),a=Math.min(t-1,r+n-1),c=[1];r>2&&c.push("...");for(let i=r;i<=a;i++)c.push(i);return a<t-1&&c.push("..."),c.push(t),c}function Ln({page:e,totalPages:t,onPageChange:n,pageSize:s,onPageSizeChange:r,pageSizeOptions:a=[10,25,50,100],totalItems:c,siblingCount:i=3,className:u}){const d=l.useMemo(()=>Ku(e,t,i),[e,t,i]);return t<=1&&!r?null:o.jsxs("div",{className:x.cn(se.wrapper,u),children:[o.jsx("div",{className:se.summary,children:typeof c=="number"?`${c} resultado${c===1?"":"s"}`:`Página ${e} de ${t}`}),o.jsxs("div",{className:se.controls,children:[o.jsx("button",{type:"button",className:se.page,onClick:()=>n(Math.max(1,e-1)),disabled:e<=1,"aria-label":"Página anterior",children:"‹"}),d.map((p,m)=>p==="..."?o.jsx("span",{className:x.cn(se.ellipsis,se.numeric),children:"…"},`ellipsis-${m}`):o.jsx("button",{type:"button",className:x.cn(se.page,se.numeric,p===e&&se.active),onClick:()=>n(p),"aria-current":p===e?"page":void 0,children:p},p)),o.jsx("button",{type:"button",className:se.page,onClick:()=>n(Math.min(t,e+1)),disabled:e>=t,"aria-label":"Próxima página",children:"›"}),r&&o.jsx("select",{className:se.sizeSelect,value:s,onChange:p=>r(Number(p.target.value)),"aria-label":"Itens por página",children:a.map(p=>o.jsxs("option",{value:p,children:[p," / página"]},p))})]})]})}const Hu="tempest_wrapper_zEU-L",Gu="tempest_label_ps3gD",Ju="tempest_field_7taZG",Qu="tempest_input_FWEvb",Yu="tempest_sm_3-CZz",Vu="tempest_md_ReV0O",Xu="tempest_lg_DiTiB",Zu="tempest_toggle_WNeX9",ed="tempest_error_QdIFf",td="tempest_helper_mBUna",nd="tempest_errorText_73Uvv",sd="tempest_strength_i6RaQ",rd="tempest_strengthBar_PAPHR",od="tempest_strengthLabel_u9QHS",ad="tempest_level0_n6tWv",cd="tempest_level1_FOI93",id="tempest_level2_q5Wii",ld="tempest_level3_BpB53",ud="tempest_level4_vyQ3x",H={wrapper:Hu,label:Gu,field:Ju,input:Qu,sm:Yu,md:Vu,lg:Xu,toggle:Zu,error:ed,helper:td,errorText:nd,strength:sd,strengthBar:rd,strengthLabel:od,level0:ad,level1:cd,level2:id,level3:ld,level4:ud},dd=["Muito fraca","Fraca","Razoável","Forte","Excelente"];function Dn(e){if(!e)return 0;let t=0;return e.length>=8&&(t+=1),e.length>=12&&(t+=1),/[a-z]/.test(e)&&/[A-Z]/.test(e)&&(t+=1),/[0-9]/.test(e)&&(t+=1),/[^A-Za-z0-9]/.test(e)&&(t+=1),Math.min(4,t)}const pd=l.forwardRef(function({label:t,helperText:n,error:s,size:r="md",showStrength:a=!1,strength:c,strengthLabels:i=dd,toggleLabels:u={show:"Mostrar senha",hide:"Esconder senha"},className:d,value:p,defaultValue:m,...f},h){const[_,b]=l.useState(!1),v=String(p??m??""),g=c??Dn(v);return o.jsxs("div",{className:x.cn(H.wrapper,H[r],s&&H.error,d),children:[t&&o.jsx("label",{className:H.label,children:t}),o.jsxs("div",{className:H.field,children:[o.jsx("input",{ref:h,...f,value:p,defaultValue:m,type:_?"text":"password","aria-invalid":!!s,className:H.input}),o.jsx("button",{type:"button",className:H.toggle,"aria-label":_?u.hide:u.show,"aria-pressed":_,onClick:()=>b(w=>!w),children:_?"🙈":"👁"})]}),a&&o.jsxs("div",{className:x.cn(H.strength,H[`level${g}`]),"aria-label":i[g],children:[o.jsx("div",{className:H.strengthBar,children:o.jsx("span",{style:{width:`${g/4*100}%`}})}),o.jsx("span",{className:H.strengthLabel,children:i[g]})]}),s?o.jsx("span",{className:H.errorText,children:s}):n?o.jsx("span",{className:H.helper,children:n}):null]})}),md="tempest_wrapper_3WAh7",fd="tempest_label_Hk01i",hd="tempest_cells_URO3v",_d="tempest_cell_fxLzs",gd="tempest_sm_SQM-s",bd="tempest_md_aHCGl",yd="tempest_lg_JpI4A",vd="tempest_error_Kou0o",wd="tempest_helper_W04iL",xd="tempest_errorText_h4svq",Ne={wrapper:md,label:fd,cells:hd,cell:_d,sm:gd,md:bd,lg:yd,error:vd,helper:wd,errorText:xd},jd=/[0-9]/,$d=/[A-Za-z0-9]/,kd=l.forwardRef(function({length:t=6,type:n="numeric",size:s="md",value:r,defaultValue:a,onChange:c,onComplete:i,masked:u=!1,label:d,helperText:p,error:m,disabled:f=!1,autoFocus:h=!1,id:_,className:b},v){const g=l.useId(),w=_??g,y=r!==void 0,[j,S]=l.useState(a??""),M=y?r??"":j,T=Array.from({length:t},(L,R)=>M[R]??""),N=l.useRef([]),k=n==="numeric"?jd:$d;l.useEffect(()=>{h&&N.current[0]?.focus()},[h]);const E=L=>{const R=L.slice(0,t);y||S(R),c?.(R),R.length===t&&i?.(R)},D=L=>{const R=Math.max(0,Math.min(t-1,L));N.current[R]?.focus(),N.current[R]?.select()},$=L=>R=>{const q=R.target.value.slice(-1);if(q&&!k.test(q))return;const ct=T.slice();ct[L]=q,E(ct.join("")),q&&D(L+1)},C=L=>R=>{if(R.key==="Backspace"){if(!T[L]&&L>0){R.preventDefault();const q=T.slice();q[L-1]="",E(q.join("")),D(L-1)}}else R.key==="ArrowLeft"?(R.preventDefault(),D(L-1)):R.key==="ArrowRight"&&(R.preventDefault(),D(L+1))},F=L=>{const R=L.clipboardData.getData("text").split("").filter(q=>k.test(q)).join("");R&&(L.preventDefault(),E(R),D(Math.min(t-1,R.length)))};return o.jsxs("div",{ref:v,className:x.cn(Ne.wrapper,m&&Ne.error,b),id:w,children:[d&&o.jsx("label",{className:Ne.label,children:d}),o.jsx("div",{className:x.cn(Ne.cells,Ne[s]),role:"group","aria-label":d,children:T.map((L,R)=>o.jsx("input",{ref:q=>{N.current[R]=q},type:u?"password":"text",inputMode:n==="numeric"?"numeric":"text",autoComplete:R===0?"one-time-code":"off",maxLength:1,value:L,disabled:f,className:Ne.cell,"aria-label":`Dígito ${R+1}`,"aria-invalid":!!m,onChange:$(R),onKeyDown:C(R),onPaste:F},R))}),m?o.jsx("span",{className:Ne.errorText,children:m}):p?o.jsx("span",{className:Ne.helper,children:p}):null]})}),Nd="tempest_root_vEMon",Sd="tempest_popover_E9K9X",Cd="tempest_tempest-popover-in_W8miP",Ed="tempest_top_TYlrh",Td="tempest_bottom_wGs70",Md="tempest_left_h7fCr",Rd="tempest_right_--bJW",Nt={root:Nd,popover:Sd,tempestPopoverIn:Cd,top:Ed,bottom:Td,left:Md,right:Rd};function Ld({trigger:e,children:t,placement:n="bottom",open:s,onOpenChange:r,defaultOpen:a=!1,closeOnEsc:c=!0,closeOnOutsideClick:i=!0,className:u}){const d=s!==void 0,[p,m]=l.useState(a),f=d?s:p,h=l.useId(),_=l.useRef(null),b=l.useCallback(w=>{d||m(w),r?.(w)},[d,r]);l.useEffect(()=>{if(!f)return;const w=j=>{c&&j.key==="Escape"&&b(!1)},y=j=>{i&&_.current&&!_.current.contains(j.target)&&b(!1)};return window.addEventListener("keydown",w),window.addEventListener("mousedown",y),()=>{window.removeEventListener("keydown",w),window.removeEventListener("mousedown",y)}},[f,c,i,b]);const v=w=>{e.props.onClick?.(w),b(!f)},g={...e,props:{...e.props,onClick:v,"aria-expanded":f,"aria-controls":h}};return o.jsxs("span",{ref:_,className:Nt.root,children:[g,f&&o.jsx("div",{id:h,role:"dialog",className:x.cn(Nt.popover,Nt[n],u),children:t})]})}const Dd="tempest_wrapper_BQek1",Id="tempest_bar_uC-0x",Pd="tempest_fill_vmg7x",Ad="tempest_success_gWJ8U",Fd="tempest_warning_DGkPO",Od="tempest_danger_gfwHh",Bd="tempest_indeterminate_HojUj",zd="tempest_tempest-progress-loop_0nEdF",Wd="tempest_label_qqHJM",ze={wrapper:Dd,bar:Id,fill:Pd,success:Ad,warning:Fd,danger:Od,indeterminate:Bd,tempestProgressLoop:zd,label:Wd};function qd({value:e=0,max:t=100,variant:n="primary",indeterminate:s=!1,showLabel:r=!1,label:a,className:c}){const i=s?0:Math.max(0,Math.min(100,e/t*100));return o.jsxs("div",{className:x.cn(ze.wrapper,c),children:[(r||a)&&o.jsxs("div",{className:ze.label,children:[a&&o.jsx("span",{children:a}),r&&!s&&o.jsxs("span",{children:[Math.round(i),"%"]})]}),o.jsx("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":s?void 0:e,className:x.cn(ze.bar,s&&ze.indeterminate),children:o.jsx("div",{className:x.cn(ze.fill,n!=="primary"&&ze[n]),style:{width:s?void 0:`${i}%`}})})]})}const Ud="tempest_wrapper_P-gFm",Kd="tempest_disabled_0-cna",Hd="tempest_input_7R8ZN",Gd="tempest_dot_P7ejP",Jd="tempest_labelWrap_iQ1HR",Qd="tempest_label_vAFIP",Yd="tempest_description_bEB8u",Vd="tempest_group_oi329",Xd="tempest_horizontal_1Ovgu",$e={wrapper:Ud,disabled:Kd,input:Hd,dot:Gd,labelWrap:Jd,label:Qd,description:Yd,group:Vd,horizontal:Xd},In=l.createContext(null),Zd=l.forwardRef(function({label:t,description:n,value:s,disabled:r,name:a,checked:c,onChange:i,wrapperClassName:u,className:d,...p},m){const f=l.useContext(In),h=f?.name??a,_=f?.disabled??r,b=f?f.value===s:c;function v(g){f&&f.onChange?.(s),i?.(g)}return o.jsxs("label",{className:x.cn($e.wrapper,_&&$e.disabled,u),children:[o.jsx("input",{ref:m,type:"radio",name:h,value:s,checked:b,disabled:_,onChange:v,className:x.cn($e.input,d),...p}),o.jsx("span",{className:$e.dot,"aria-hidden":!0}),(t||n)&&o.jsxs("span",{className:$e.labelWrap,children:[t&&o.jsx("span",{className:$e.label,children:t}),n&&o.jsx("span",{className:$e.description,children:n})]})]})});function ep({value:e,defaultValue:t,onChange:n,name:s,disabled:r,horizontal:a=!1,className:c,children:i}){const u=l.useId(),d=s??u,[p,m]=l.useState(t),f=e!==void 0,h=f?e:p;function _(b){f||m(b),n?.(b)}return o.jsx(In.Provider,{value:{name:d,value:h,onChange:_,disabled:r},children:o.jsx("div",{role:"radiogroup",className:x.cn($e.group,a&&$e.horizontal,c),children:i})})}const tp="tempest_wrapper_o1aOo",np="tempest_label_jaBOA",sp="tempest_value_GKfOu",rp="tempest_field_YxCzt",op="tempest_track_j-2iy",ap="tempest_fill_1pbqj",cp="tempest_input_1MASw",ip="tempest_helper_uqxKu",be={wrapper:tp,label:np,value:sp,field:rp,track:op,fill:ap,input:cp,helper:ip};function lp({value:e,onChange:t,min:n=0,max:s=100,step:r=1,label:a,helperText:c,disabled:i=!1,formatValue:u,className:d}){const[p,m]=e,f=s-n,h=l.useMemo(()=>(p-n)/f*100,[p,n,f]),_=l.useMemo(()=>(m-n)/f*100,[m,n,f]),b=u?.(e)??`${p} – ${m}`,v=l.useCallback(w=>{const y=Math.min(Number(w.target.value),m);t([y,m])},[m,t]),g=l.useCallback(w=>{const y=Math.max(Number(w.target.value),p);t([p,y])},[p,t]);return o.jsxs("div",{className:x.cn(be.wrapper,d),children:[a&&o.jsxs("div",{className:be.label,children:[o.jsx("span",{children:a}),o.jsx("span",{className:be.value,children:b})]}),o.jsxs("div",{className:be.field,children:[o.jsx("div",{className:be.track}),o.jsx("div",{className:be.fill,style:{left:`${h}%`,right:`${100-_}%`}}),o.jsx("input",{type:"range",className:be.input,min:n,max:s,step:r,value:p,onChange:v,disabled:i,"aria-label":a?`${a} (mínimo)`:"Mínimo"}),o.jsx("input",{type:"range",className:be.input,min:n,max:s,step:r,value:m,onChange:g,disabled:i,"aria-label":a?`${a} (máximo)`:"Máximo"})]}),c&&o.jsx("span",{className:be.helper,children:c})]})}const up="tempest_wrapper_K9Mqa",dp="tempest_star_goIGS",pp="tempest_filled_mMs-d",mp="tempest_disabled_tyUlQ",fp="tempest_readonly_bnKLN",hp="tempest_sm_K7-y9",_p="tempest_md_ex2Tb",gp="tempest_lg_TstLJ",We={wrapper:up,star:dp,filled:pp,disabled:mp,readonly:fp,sm:hp,md:_p,lg:gp};function bp({value:e,max:t=5,onChange:n,size:s="md",readonly:r=!1,disabled:a=!1,label:c="Avaliação",className:i}){const[u,d]=l.useState(0),p=u>0?u:e,m=f=>{r||a||n?.(f)};return o.jsx("span",{role:"radiogroup","aria-label":c,className:x.cn(We.wrapper,We[s],a&&We.disabled,r&&We.readonly,i),onMouseLeave:()=>d(0),children:Array.from({length:t},(f,h)=>{const _=h+1,b=_<=p;return o.jsx("button",{type:"button",role:"radio","aria-checked":e===_,"aria-label":`${_} ${_===1?"estrela":"estrelas"}`,className:x.cn(We.star,b&&We.filled),disabled:a,onMouseEnter:()=>!r&&!a&&d(_),onClick:()=>m(_),children:o.jsx(yp,{filled:b})},_)})})}function yp({filled:e}){return o.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:e?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round","aria-hidden":!0,children:o.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.56 5.82 22 7 14.14 2 9.27l6.91-1.01L12 2z"})})}function Pn(e,t,n,s,r){return s?(Array.isArray(s)?s:[s]).includes(e):!(t&&!r.above(t)||n&&!r.below(n))}function vp({above:e,below:t,only:n,children:s}){const r=Oe();return Pn(r.current,e,t,n,r)?s:null}function wp({above:e,below:t,only:n,children:s}){const r=Oe();return Pn(r.current,e,t,n,r)?null:s}const xp="tempest_safe_iqDFY",jp="tempest_inline_V9eMG",$p="tempest_top_Xse9E",kp="tempest_right_GZm9b",Np="tempest_bottom_kkyD7",Sp="tempest_left_Z4Q72",qe={safe:xp,inline:jp,top:$p,right:kp,bottom:Np,left:Sp},Cp=["top","right","bottom","left"];function Ep({edges:e=Cp,inline:t=!1,className:n,children:s,...r}){return o.jsx("div",{className:x.cn(qe.safe,t&&qe.inline,e.includes("top")&&qe.top,e.includes("right")&&qe.right,e.includes("bottom")&&qe.bottom,e.includes("left")&&qe.left,n),"data-edges":e.join(" "),...r,children:s})}const Tp="tempest_wrapper_dKXJJ",Mp="tempest_input_m0lPc",Rp="tempest_iconLeft_030-U",Lp="tempest_clear_nb6lG",it={wrapper:Tp,input:Mp,iconLeft:Rp,clear:Lp},An=l.forwardRef(function({value:t,onChange:n,onClear:s,wrapperClassName:r,placeholder:a="Buscar...",className:c,...i},u){function d(){n(""),s?.()}return o.jsxs("div",{className:x.cn(it.wrapper,r),children:[o.jsx("span",{className:it.iconLeft,"aria-hidden":!0,children:o.jsx(Dp,{})}),o.jsx("input",{ref:u,type:"search",value:t,onChange:p=>n(p.target.value),placeholder:a,className:x.cn(it.input,c),...i}),t&&o.jsx("button",{type:"button",className:it.clear,"aria-label":"Limpar busca",onClick:d,children:o.jsx(Ip,{})})]})});function Dp(){return o.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:[o.jsx("circle",{cx:"11",cy:"11",r:"7",stroke:"currentColor",strokeWidth:"2"}),o.jsx("path",{d:"M20 20l-3.5-3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function Ip(){return o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 6l12 12M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const Pp="tempest_group_mYyFC",Ap="tempest_fullWidth_unSMm",Fp="tempest_segment_cu-EL",Op="tempest_sm_CfD41",Bp="tempest_md_2ixuM",zp="tempest_lg_2Kt7-",Wp="tempest_active_GmyKg",qp="tempest_icon_9h6GK",Up="tempest_label_mS17q",Pe={group:Pp,fullWidth:Ap,segment:Fp,sm:Op,md:Bp,lg:zp,active:Wp,icon:qp,label:Up};function Kp({options:e,value:t,onChange:n,size:s="md",fullWidth:r=!1,className:a,"aria-label":c,...i}){return o.jsx("div",{role:"radiogroup","aria-label":c,className:x.cn(Pe.group,Pe[s],r&&Pe.fullWidth,a),...i,children:e.map(u=>{const d=u.value===t;return o.jsxs("button",{type:"button",role:"radio","aria-checked":d,disabled:u.disabled,className:x.cn(Pe.segment,d&&Pe.active),onClick:()=>n(u.value),children:[u.icon&&o.jsx("span",{className:Pe.icon,children:u.icon}),o.jsx("span",{className:Pe.label,children:u.label})]},u.value)})})}const Hp="tempest_wrapper_KS2K3",Gp="tempest_label_Lmgos",Jp="tempest_required_PvDVJ",Qp="tempest_field_h-wBy",Yp="tempest_select_cjdcr",Vp="tempest_caret_MdCao",Xp="tempest_error_sw9MU",Zp="tempest_helper_frosK",em="tempest_errorText_-zd6i",ye={wrapper:Hp,label:Gp,required:Jp,field:Qp,select:Yp,caret:Vp,error:Xp,helper:Zp,errorText:em},tm=l.forwardRef(function({label:t,helperText:n,error:s,options:r,placeholder:a,wrapperClassName:c,className:i,children:u,id:d,required:p,...m},f){const h=l.useId(),_=d??h;return o.jsxs("div",{className:x.cn(ye.wrapper,s&&ye.error,c),children:[t&&o.jsxs("label",{htmlFor:_,className:ye.label,children:[t,p&&o.jsx("span",{className:ye.required,children:"*"})]}),o.jsxs("div",{className:ye.field,children:[o.jsxs("select",{ref:f,id:_,"aria-invalid":!!s,required:p,className:x.cn(ye.select,i),...m,children:[a&&o.jsx("option",{value:"",disabled:!0,hidden:!0,children:a}),r?.map(b=>o.jsx("option",{value:b.value,disabled:b.disabled,children:b.label},b.value)),u]}),o.jsx("span",{className:ye.caret,"aria-hidden":!0,children:o.jsx(nm,{})})]}),s?o.jsx("span",{className:ye.errorText,children:s}):n?o.jsx("span",{className:ye.helper,children:n}):null]})});function nm(){return o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 9l6 6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}const sm="tempest_sidebar_UB1qz",rm="tempest_header_zupoS",om="tempest_nav_aLYuL",am="tempest_item_IAjHb",cm="tempest_collapsed_ZbZYA",im="tempest_active_BgcFy",lm="tempest_icon_UQswn",um="tempest_label_TPvJ9",dm="tempest_badge_xwEZv",pm="tempest_footer_TyRyi",ue={sidebar:sm,header:rm,nav:om,item:am,collapsed:cm,active:im,icon:lm,label:um,badge:dm,footer:pm};function mm({header:e,items:t,value:n,onChange:s,footer:r,collapsed:a=!1,width:c=240,collapsedWidth:i=64,className:u,style:d,...p}){const m=typeof(a?i:c)=="number"?`${a?i:c}px`:a?i:c;return o.jsxs("aside",{className:x.cn(ue.sidebar,a&&ue.collapsed,u),style:{width:m,...d},...p,children:[e&&o.jsx("div",{className:ue.header,children:e}),o.jsx("nav",{className:ue.nav,"aria-label":"Navegação lateral",children:t.map(f=>{const h=f.key===n;return o.jsxs("button",{type:"button",className:x.cn(ue.item,h&&ue.active),"aria-current":h?"page":void 0,disabled:f.disabled,onClick:()=>s?.(f.key),title:a&&typeof f.label=="string"?f.label:void 0,children:[f.icon&&o.jsx("span",{className:ue.icon,children:f.icon}),!a&&o.jsx("span",{className:ue.label,children:f.label}),!a&&f.badge!==void 0&&o.jsx("span",{className:ue.badge,children:f.badge})]},f.key)})}),r&&o.jsx("div",{className:ue.footer,children:r})]})}const fm="tempest_skeleton_CB4uF",hm="tempest_text_-A8IF",_m="tempest_circle_DYcl8",St={skeleton:fm,text:hm,circle:_m};function gm({variant:e="rect",width:t,height:n,className:s,style:r}){return o.jsx("span",{"aria-hidden":!0,className:x.cn(St.skeleton,e==="text"&&St.text,e==="circle"&&St.circle,s),style:{width:t,height:n,...r}})}const bm="tempest_spacer_okdOd",ym="tempest_both_85qSF",vm="tempest_x_QiU2B",wm="tempest_y_hTtCp",nn={spacer:bm,both:ym,x:vm,y:wm};function xm({axis:e="both",className:t,...n}){return o.jsx("div",{className:x.cn(nn.spacer,nn[e],t),...n})}const jm="tempest_spinner_GpFZS",$m="tempest_tempest-spinner_wKVCY",km="tempest_xs_p8BFI",Nm="tempest_sm_3sIoD",Sm="tempest_md_M2sPj",Cm="tempest_lg_IxTw2",Em="tempest_xl_cgwqq",sn={spinner:jm,tempestSpinner:$m,xs:km,sm:Nm,md:Sm,lg:Cm,xl:Em};function Fn({size:e="md",className:t,label:n="Carregando"}){return o.jsx("span",{role:"status","aria-label":n,className:x.cn(sn.spinner,sn[e],t)})}const Tm="tempest_stat_zoo9y",Mm="tempest_header_3UQqq",Rm="tempest_icon_zUG3e",Lm="tempest_label_lIH47",Dm="tempest_row_Ifyts",Im="tempest_value_JBWnr",Pm="tempest_delta_mRVrE",Am="tempest_up_7qgUO",Fm="tempest_down_3Rq2Z",Om="tempest_flat_R5pZT",Bm="tempest_hint_YkTF8",re={stat:Tm,header:Mm,icon:Rm,label:Lm,row:Dm,value:Im,delta:Pm,up:Am,down:Fm,flat:Om,hint:Bm};function zm(e){if(typeof e!="string")return;const t=e.trim();if(t.startsWith("+"))return"up";if(t.startsWith("-")||t.startsWith("−"))return"down"}function Wm({label:e,value:t,delta:n,trend:s,hint:r,icon:a,className:c,...i}){const u=s??zm(n);return o.jsxs("div",{className:x.cn(re.stat,c),...i,children:[o.jsxs("div",{className:re.header,children:[a&&o.jsx("span",{className:re.icon,children:a}),o.jsx("span",{className:re.label,children:e})]}),o.jsxs("div",{className:re.row,children:[o.jsx("span",{className:re.value,children:t}),n!==void 0&&o.jsx("span",{className:x.cn(re.delta,u==="up"&&re.up,u==="down"&&re.down,u==="flat"&&re.flat),children:n})]}),r&&o.jsx("p",{className:re.hint,children:r})]})}const qm="tempest_stepper_w3qjQ",Um="tempest_vertical_d4mOs",Km="tempest_step_s2nqL",Hm="tempest_dot_d1bSL",Gm="tempest_completed_gcFHM",Jm="tempest_active_kL-CH",Qm="tempest_label_8irAI",Ym="tempest_connector_lyeWp",ve={stepper:qm,vertical:Um,step:Km,dot:Hm,completed:Gm,active:Jm,label:Qm,connector:Ym};function Vm({steps:e,current:t,orientation:n="horizontal",className:s}){return o.jsx("ol",{className:x.cn(ve.stepper,n==="vertical"&&ve.vertical,s),children:e.map((r,a)=>{const c=a<t,i=a===t;return o.jsxs(l.Fragment,{children:[o.jsxs("li",{className:x.cn(ve.step,c&&ve.completed,i&&ve.active),"aria-current":i?"step":void 0,children:[o.jsx("span",{className:ve.dot,children:c?"✓":a+1}),o.jsx("span",{className:ve.label,children:r.label})]}),a<e.length-1&&o.jsx("span",{className:x.cn(ve.connector,c&&ve.completed),"aria-hidden":!0})]},a)})})}function Ft(e,t,n){if(Number.isNaN(e))return e;if(t>n){const s=t;t=n,n=s}return e<t?t:e>n?n:e}function Xm(e,t=1){if(e===0)return"0 B";const n=["B","KB","MB","GB","TB"],s=1024,r=Math.min(Math.floor(Math.log(Math.abs(e))/Math.log(s)),n.length-1),a=e/s**r,c=r===0?0:Math.max(0,t);return`${parseFloat(a.toFixed(c)).toString()} ${n[r]}`}function Zm(e,t="en-US"){return new Intl.NumberFormat(t,{notation:"compact",maximumFractionDigits:1}).format(e)}const ef="tempest_wrapper_JNjXK",tf="tempest_label_9XKNm",nf="tempest_row_cOARX",sf="tempest_sm_RzVSU",rf="tempest_md_pezRm",of="tempest_lg_kYbIN",af="tempest_disabled_vqmo2",cf="tempest_btn_xuHhj",lf="tempest_value_NEatO",Se={wrapper:ef,label:tf,row:nf,sm:sf,md:rf,lg:of,disabled:af,btn:cf,value:lf},uf=l.forwardRef(function({value:t,onChange:n,min:s=0,max:r=Number.POSITIVE_INFINITY,step:a=1,size:c="md",disabled:i=!1,label:u,format:d,labels:p={decrement:"Diminuir",increment:"Aumentar"},className:m},f){const h=()=>{i||n(Ft(t-a,s,r))},_=()=>{i||n(Ft(t+a,s,r))},b=d?d(t):String(t),v=!i&&t>s,g=!i&&t<r;return o.jsxs("div",{ref:f,className:x.cn(Se.wrapper,m),children:[u&&o.jsx("label",{className:Se.label,children:u}),o.jsxs("div",{className:x.cn(Se.row,Se[c],i&&Se.disabled),children:[o.jsx("button",{type:"button",className:Se.btn,"aria-label":p.decrement,onClick:h,disabled:!v,children:"−"}),o.jsx("span",{className:Se.value,role:"status","aria-live":"polite",children:b}),o.jsx("button",{type:"button",className:Se.btn,"aria-label":p.increment,onClick:_,disabled:!g,children:"+"})]})]})}),df="tempest_wrapper_kudO9",pf="tempest_disabled_2aZ0V",mf="tempest_input_5BPNu",ff="tempest_track_7ObdZ",hf="tempest_thumb_-FTeK",_f="tempest_label_LrH7V",Ue={wrapper:df,disabled:pf,input:mf,track:ff,thumb:hf,label:_f},gf=l.forwardRef(function({label:t,disabled:n,wrapperClassName:s,className:r,...a},c){return o.jsxs("label",{className:x.cn(Ue.wrapper,n&&Ue.disabled,s),children:[o.jsx("input",{ref:c,type:"checkbox",role:"switch",disabled:n,className:x.cn(Ue.input,r),...a}),o.jsx("span",{className:Ue.track,"aria-hidden":!0,children:o.jsx("span",{className:Ue.thumb})}),t&&o.jsx("span",{className:Ue.label,children:t})]})}),bf="tempest_tag_16VPH",yf="tempest_sm_pzyd5",vf="tempest_md_GL6tQ",wf="tempest_lg_8tgXU",xf="tempest_neutral_jAd-x",jf="tempest_primary_AXKlN",$f="tempest_success_56lz4",kf="tempest_warning_UK7SC",Nf="tempest_danger_kJ-yx",Sf="tempest_info_hmHE-",Cf="tempest_label_ZBPfO",Ef="tempest_remove_UEwgr",Ze={tag:bf,sm:yf,md:vf,lg:wf,neutral:xf,primary:jf,success:$f,warning:kf,danger:Nf,info:Sf,label:Cf,remove:Ef};function Tf({variant:e="neutral",size:t="md",onRemove:n,removeLabel:s="Remover",className:r,children:a,...c}){return o.jsxs("span",{className:x.cn(Ze.tag,Ze[e],Ze[t],r),...c,children:[o.jsx("span",{className:Ze.label,children:a}),n&&o.jsx("button",{type:"button",className:Ze.remove,"aria-label":s,onClick:n,children:"×"})]})}const Mf="tempest_scroll_unrJp",Rf="tempest_table_Dkosn",Lf="tempest_th_PNuEx",Df="tempest_td_jv9tA",If="tempest_tr_7UG8J",Pf="tempest_clickable_B6Si-",Af="tempest_alignRight_9hY0G",Ff="tempest_alignCenter_YiUQy",Of="tempest_emptyRow_kdMiv",Bf="tempest_priorityTablet_3alUt",zf="tempest_priorityDesktop_3f8Fq",Wf="tempest_stackable_heix7",qf="tempest_stackableHead_mKGcA",Uf="tempest_stackableRow_qPNqc",B={scroll:Mf,table:Rf,th:Lf,td:Df,tr:If,clickable:Pf,alignRight:Af,alignCenter:Ff,emptyRow:Of,priorityTablet:Bf,priorityDesktop:zf,stackable:Wf,stackableHead:qf,stackableRow:Uf};function rn(e){if(e==="tablet")return B.priorityTablet;if(e==="desktop")return B.priorityDesktop}function On({columns:e,data:t,rowKey:n,onRowClick:s,emptyMessage:r="Nenhum registro encontrado.",className:a,stackOnMobile:c=!1}){return o.jsx("div",{className:x.cn(B.scroll,c&&B.stackable,a),children:o.jsxs("table",{className:B.table,children:[o.jsx("thead",{className:x.cn(c&&B.stackableHead),children:o.jsx("tr",{children:e.map(i=>o.jsx("th",{className:x.cn(B.th,i.align==="right"&&B.alignRight,i.align==="center"&&B.alignCenter,rn(i.priority)),style:{width:i.width},children:i.header},i.key))})}),o.jsx("tbody",{children:t.length===0?o.jsx("tr",{children:o.jsx("td",{className:B.emptyRow,colSpan:e.length,children:r})}):t.map((i,u)=>o.jsx("tr",{className:x.cn(B.tr,s&&B.clickable,c&&B.stackableRow),onClick:s?()=>s(i):void 0,children:e.map(d=>{const p=d.render?d.render(i,u):i[d.key];return o.jsx("td",{className:x.cn(B.td,d.align==="right"&&B.alignRight,d.align==="center"&&B.alignCenter,rn(d.priority),d.className),"data-label":typeof d.header=="string"?d.header:void 0,children:p},d.key)})},n(i,u)))})]})})}const Kf="tempest_tablist_WR6ag",Hf="tempest_tab_IdDYc",Gf="tempest_active_PTNtG",Jf="tempest_panel_08i9c",Qf="tempest_pill_lGuqn",et={tablist:Kf,tab:Hf,active:Gf,panel:Jf,pill:Qf};function Yf({items:e,defaultId:t,activeId:n,onChange:s,variant:r="underline",className:a}){const c=e.find(h=>!h.disabled),[i,u]=l.useState(t??c?.id),d=n!==void 0,p=d?n:i,m=e.find(h=>h.id===p)??c;function f(h){d||u(h),s?.(h)}return o.jsxs("div",{className:a,children:[o.jsx("div",{role:"tablist",className:x.cn(et.tablist,r==="pill"&&et.pill),children:e.map(h=>{const _=h.id===m?.id;return o.jsx("button",{type:"button",role:"tab","aria-selected":_,"aria-controls":`panel-${h.id}`,id:`tab-${h.id}`,disabled:h.disabled,className:x.cn(et.tab,_&&et.active),onClick:()=>f(h.id),children:h.label},h.id)})}),m&&o.jsx("div",{role:"tabpanel",id:`panel-${m.id}`,"aria-labelledby":`tab-${m.id}`,className:et.panel,children:m.content})]})}const Vf="tempest_wrapper_C0gfg",Xf="tempest_label_cWLXP",Zf="tempest_required_rDZXE",eh="tempest_textarea_Z-y6g",th="tempest_error_NWC9f",nh="tempest_helper_gedut",sh="tempest_errorText_ey07q",Ae={wrapper:Vf,label:Xf,required:Zf,textarea:eh,error:th,helper:nh,errorText:sh},rh=l.forwardRef(function({label:t,helperText:n,error:s,wrapperClassName:r,className:a,id:c,required:i,...u},d){const p=l.useId(),m=c??p;return o.jsxs("div",{className:x.cn(Ae.wrapper,s&&Ae.error,r),children:[t&&o.jsxs("label",{htmlFor:m,className:Ae.label,children:[t,i&&o.jsx("span",{className:Ae.required,children:"*"})]}),o.jsx("textarea",{ref:d,id:m,"aria-invalid":!!s,required:i,className:x.cn(Ae.textarea,a),...u}),s?o.jsx("span",{className:Ae.errorText,children:s}):n?o.jsx("span",{className:Ae.helper,children:n}):null]})}),oh="tempest_timeline_utrkA",ah="tempest_item_T5xdQ",ch="tempest_markerColumn_BMe4d",ih="tempest_marker_kmPV-",lh="tempest_marker-primary_s9BNB",uh="tempest_marker-success_areMM",dh="tempest_marker-warning_rRrS8",ph="tempest_marker-danger_3GEBk",mh="tempest_marker-neutral_M2mnw",fh="tempest_line_CwY-N",hh="tempest_body_KpMJ6",_h="tempest_row_AX2ti",gh="tempest_title_DxfAX",bh="tempest_meta_GU0ih",yh="tempest_description_f9sxV",Q={timeline:oh,item:ah,markerColumn:ch,marker:ih,markerPrimary:lh,markerSuccess:uh,markerWarning:dh,markerDanger:ph,markerNeutral:mh,line:fh,body:hh,row:_h,title:gh,meta:bh,description:yh};function vh({items:e,connector:t=!0,className:n,...s}){return o.jsx("ol",{className:x.cn(Q.timeline,t&&Q.connector,n),...s,children:e.map((r,a)=>{const c=a===e.length-1;return o.jsxs("li",{className:Q.item,children:[o.jsxs("div",{className:Q.markerColumn,children:[o.jsx("span",{className:x.cn(Q.marker,Q[`marker-${r.marker??"primary"}`]),"aria-hidden":"true",children:r.icon}),t&&!c&&o.jsx("span",{className:Q.line,"aria-hidden":"true"})]}),o.jsxs("div",{className:Q.body,children:[o.jsxs("div",{className:Q.row,children:[o.jsx("span",{className:Q.title,children:r.title}),r.meta&&o.jsx("span",{className:Q.meta,children:r.meta})]}),r.description&&o.jsx("p",{className:Q.description,children:r.description})]})]},r.id)})})}const wh="tempest_trigger_Dmc5E",xh="tempest_bubble_TPGHB",jh="tempest_tempest-tooltip-in_csYeZ",$h="tempest_top_m2tnn",kh="tempest_bottom_9Twz4",Nh="tempest_left_UPdrG",Sh="tempest_right_CV--T",Ct={trigger:wh,bubble:xh,tempestTooltipIn:jh,top:$h,bottom:kh,left:Nh,right:Sh};function Ch({content:e,placement:t="top",children:n,disabled:s=!1,openDelay:r=150}){const[a,c]=l.useState(!1),i=l.useId();let u=null;function d(){s||(u&&clearTimeout(u),u=setTimeout(()=>c(!0),r))}function p(){u&&(clearTimeout(u),u=null),c(!1)}const m=l.cloneElement(n,{onMouseEnter:d,onMouseLeave:p,onFocus:d,onBlur:p,"aria-describedby":a?i:void 0});return o.jsxs("span",{className:Ct.trigger,children:[m,a&&o.jsx("span",{id:i,role:"tooltip",className:x.cn(Ct.bubble,Ct[t]),children:e})]})}const Eh="tempest_container_x4-Qm",Th="tempest_positionTopRight_gbUCQ",Mh="tempest_positionTopLeft_Z-tMJ",Rh="tempest_positionTopCenter_A4Ze4",Lh="tempest_positionBottomRight_MGo19",Dh="tempest_positionBottomLeft_DpiNe",Ih="tempest_positionBottomCenter_XUdok",Ph="tempest_toast_FLdHz",Ah="tempest_tempest-toast-in_E2d-A",Fh="tempest_success_Oy694",Oh="tempest_warning_84GC8",Bh="tempest_error_hrQAA",zh="tempest_info_eq5bQ",Wh="tempest_title_-H6R2",qh="tempest_description_-QwfC",Uh="tempest_close_i10-s",Z={container:Eh,positionTopRight:Th,positionTopLeft:Mh,positionTopCenter:Rh,positionBottomRight:Lh,positionBottomLeft:Dh,positionBottomCenter:Ih,toast:Ph,tempestToastIn:Ah,success:Fh,warning:Oh,error:Bh,info:zh,title:Wh,description:qh,close:Uh},Bn=l.createContext(null);function Kh(){const e=l.useContext(Bn);if(!e)throw new Error("useToast must be used inside a <ToastProvider>");return e}function Hh({children:e,defaultDuration:t=4e3,position:n="top-right"}){const[s,r]=l.useState([]),a=l.useRef(0),c=l.useCallback(d=>{r(p=>p.filter(m=>m.id!==d))},[]),i=l.useCallback(d=>{const p=d.id??`toast-${++a.current}`,m={id:p,title:d.title,description:d.description,variant:d.variant??"info",duration:d.duration??t};return r(f=>[...f,m]),p},[t]),u=l.useMemo(()=>({show:i,dismiss:c,success:(d,p)=>i({...p,description:d,variant:"success"}),error:(d,p)=>i({...p,description:d,variant:"error"}),warning:(d,p)=>i({...p,description:d,variant:"warning"}),info:(d,p)=>i({...p,description:d,variant:"info"})}),[i,c]);return o.jsxs(Bn.Provider,{value:u,children:[e,o.jsx(Jh,{toasts:s,onDismiss:c,position:n})]})}function Gh(e){switch(e){case"top-left":return Z.positionTopLeft;case"top-center":return Z.positionTopCenter;case"bottom-right":return Z.positionBottomRight;case"bottom-left":return Z.positionBottomLeft;case"bottom-center":return Z.positionBottomCenter;default:return Z.positionTopRight}}function Jh({toasts:e,onDismiss:t,position:n}){return typeof document>"u"?null:Ge.createPortal(o.jsx("div",{className:x.cn(Z.container,Gh(n)),"aria-live":"polite","aria-atomic":"true",children:e.map(s=>o.jsx(Qh,{toast:s,onDismiss:t},s.id))}),document.body)}function Qh({toast:e,onDismiss:t}){return l.useEffect(()=>{if(!e.duration)return;const n=setTimeout(()=>t(e.id),e.duration);return()=>clearTimeout(n)},[e.id,e.duration,t]),o.jsxs("div",{className:x.cn(Z.toast,Z[e.variant]),role:"status",children:[o.jsxs("div",{children:[e.title&&o.jsx("p",{className:Z.title,children:e.title}),e.description&&o.jsx("p",{className:Z.description,children:e.description})]}),o.jsx("button",{type:"button",className:Z.close,"aria-label":"Fechar notificação",onClick:()=>t(e.id),children:o.jsx(Yh,{})})]})}function Yh(){return o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 6l12 12M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const Vh="tempest_scroll_8Giwl",Xh="tempest_spacer_P3Pvl",Zh="tempest_row_Ff0VU",Et={scroll:Vh,spacer:Xh,row:Zh};function e_({items:e,itemHeight:t,renderItem:n,height:s,overscan:r=4,getKey:a,className:c,style:i}){const u=l.useRef(null),[d,p]=l.useState(0),[m,f]=l.useState(0);l.useEffect(()=>{const g=u.current;if(!g||(f(g.clientHeight),typeof ResizeObserver>"u"))return;const w=new ResizeObserver(()=>f(g.clientHeight));return w.observe(g),()=>w.disconnect()},[]);const h=e.length*t,_=Math.max(0,Math.floor(d/t)-r),b=Math.ceil(m/t)+r*2,v=Math.min(e.length,_+b);return o.jsx("div",{ref:u,className:x.cn(Et.scroll,c),style:{height:s,...i},onScroll:g=>p(g.target.scrollTop),role:"list",children:o.jsx("div",{className:Et.spacer,style:{height:h},children:e.slice(_,v).map((g,w)=>{const y=_+w,j=a?a(g,y):y;return o.jsx("div",{role:"listitem",className:Et.row,style:{top:y*t,height:t},children:n(g,y)},j)})})})}const t_="tempest_button_58f9i",n_="tempest_copied_WkLgR",on={button:t_,copied:n_};function s_({value:e,timeout:t=2e3,children:n,onCopied:s,className:r,onClick:a,...c}){const[i,u]=l.useState(!1),d=l.useRef(null);l.useEffect(()=>()=>{d.current!==null&&clearTimeout(d.current)},[]);const p=l.useCallback(async m=>{a?.(m);try{await navigator.clipboard.writeText(e),u(!0),s?.(),d.current!==null&&clearTimeout(d.current),d.current=setTimeout(()=>u(!1),t)}catch{}},[e,t,s,a]);return o.jsx("button",{type:"button",className:x.cn(on.button,i&&on.copied,r),"data-copied":i||void 0,onClick:p,...c,children:n??(i?"Copied":"Copy")})}const r_={justNow:"agora há pouco",secondsAgo:e=>`${e} s atrás`,minutesAgo:e=>`${e} min atrás`,hoursAgo:e=>e===1?"1 hora atrás":`${e} horas atrás`,daysAgo:e=>e===1?"ontem":`${e} dias atrás`,weeksAgo:e=>e===1?"semana passada":`${e} semanas atrás`,monthsAgo:e=>e===1?"mês passado":`${e} meses atrás`,yearsAgo:e=>e===1?"ano passado":`${e} anos atrás`,inSeconds:e=>`em ${e} s`,inMinutes:e=>`em ${e} min`,inHours:e=>`em ${e} h`,inDays:e=>`em ${e} ${e===1?"dia":"dias"}`,inWeeks:e=>`em ${e} ${e===1?"semana":"semanas"}`,inMonths:e=>`em ${e} ${e===1?"mês":"meses"}`,inYears:e=>`em ${e} ${e===1?"ano":"anos"}`},o_={justNow:"just now",secondsAgo:e=>`${e}s ago`,minutesAgo:e=>`${e}m ago`,hoursAgo:e=>`${e}h ago`,daysAgo:e=>e===1?"yesterday":`${e} days ago`,weeksAgo:e=>`${e}w ago`,monthsAgo:e=>`${e}mo ago`,yearsAgo:e=>`${e}y ago`,inSeconds:e=>`in ${e}s`,inMinutes:e=>`in ${e}m`,inHours:e=>`in ${e}h`,inDays:e=>`in ${e}d`,inWeeks:e=>`in ${e}w`,inMonths:e=>`in ${e}mo`,inYears:e=>`in ${e}y`},a_={"pt-BR":r_,en:o_},Ot=1e3,Bt=60*Ot,zt=60*Bt,ot=24*zt,an=7*ot,cn=30*ot,ln=365*ot;function zn(e,t={}){const{locale:n="pt-BR",now:s=Date.now()}=t,r=a_[n],a=e instanceof Date?e.getTime():new Date(e).getTime(),i=(typeof s=="number"?s:s.getTime())-a,u=i>=0,d=Math.abs(i);if(d<30*Ot)return r.justNow;if(d<Bt){const m=Math.round(d/Ot);return u?r.secondsAgo(m):r.inSeconds(m)}if(d<zt){const m=Math.round(d/Bt);return u?r.minutesAgo(m):r.inMinutes(m)}if(d<ot){const m=Math.round(d/zt);return u?r.hoursAgo(m):r.inHours(m)}if(d<an){const m=Math.round(d/ot);return u?r.daysAgo(m):r.inDays(m)}if(d<cn){const m=Math.round(d/an);return u?r.weeksAgo(m):r.inWeeks(m)}if(d<ln){const m=Math.round(d/cn);return u?r.monthsAgo(m):r.inMonths(m)}const p=Math.round(d/ln);return u?r.yearsAgo(p):r.inYears(p)}function c_({date:e,locale:t="pt",...n}){const s=e instanceof Date?e:new Date(e),r=Number.isNaN(s.getTime())?void 0:s.toISOString(),a=zn(e,{locale:t==="pt"?"pt-BR":"en"});return o.jsx("time",{dateTime:r,...n,children:a})}function i_({cents:e,currency:t="BRL",locale:n="pt-BR",...s}){const r=new Intl.NumberFormat(n,{style:"currency",currency:t}).format(e/100);return o.jsx("span",{...s,children:r})}const l_="tempest_clamp_r43C-",u_={clamp:l_};function d_({lines:e=1,className:t,style:n,children:s,...r}){const a={...n,"--tempest-clamp-lines":e};return o.jsx("div",{className:x.cn(u_.clamp,t),style:a,...r,children:s})}const p_="tempest_hidden_k7p-e",m_={hidden:p_};function f_({as:e="span",className:t,children:n,...s}){return l.createElement(e,{className:x.cn(m_.hidden,t),...s},n)}function Wn({children:e,container:t}){const[n,s]=l.useState(!1);return l.useEffect(()=>(s(!0),()=>s(!1)),[]),!n||typeof document>"u"?null:Ge.createPortal(e,t??document.body)}function h_({onOutside:e,children:t,...n}){const s=l.useRef(null),r=l.useRef(e);return r.current=e,l.useEffect(()=>{if(typeof document>"u")return;function a(c){const i=s.current,u=c.target;i&&u&&!i.contains(u)&&r.current(c)}return document.addEventListener("mousedown",a),document.addEventListener("touchstart",a),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("touchstart",a)}},[]),o.jsx("div",{ref:s,...n,children:t})}function __({condition:e,wrapper:t,children:n}){return e?t(n):o.jsx(o.Fragment,{children:n})}function g_({each:e,children:t,fallback:n=null}){return e.length===0?o.jsx(o.Fragment,{children:n}):o.jsx(o.Fragment,{children:e.map((s,r)=>o.jsx(l.Fragment,{children:t(s,r)},r))})}const b_="tempest_errorText_LU3jn",y_={errorText:b_};function v_({children:e,className:t,...n}){return e==null||e===!1||e===""?null:o.jsx("p",{role:"alert",className:x.cn(y_.errorText,t),...n,children:e})}const w_="tempest_image_Zq9Zs",x_={image:w_};function j_({src:e,fallback:t,alt:n,lazy:s=!0,className:r,onError:a,...c}){const[i,u]=l.useState(e),[d,p]=l.useState(!1);return o.jsx("img",{src:i,alt:n,loading:s?"lazy":"eager",className:x.cn(x_.image,r),onError:m=>{t&&!d&&i!==t&&(p(!0),u(t)),a?.(m)},...c})}const $_="tempest_list_bAP4Q",k_="tempest_item_oRy5T",un={list:$_,item:k_};function N_({items:e,renderItem:t,keyExtractor:n,empty:s,className:r,...a}){return e.length===0?o.jsx(o.Fragment,{children:s??null}):o.jsx("ul",{className:x.cn(un.list,r),...a,children:e.map((c,i)=>o.jsx("li",{className:un.item,children:t(c,i)},n?n(c,i):i))})}const S_="tempest_list_fwIXq",C_="tempest_term_QkQNZ",E_="tempest_description_e1bNN",Tt={list:S_,term:C_,description:E_};function T_({items:e,className:t,...n}){return o.jsx("dl",{className:x.cn(Tt.list,t),...n,children:e.map((s,r)=>o.jsxs(l.Fragment,{children:[o.jsx("dt",{className:Tt.term,children:s.term}),o.jsx("dd",{className:Tt.description,children:s.description})]},r))})}const M_="tempest_toggle_kmzmH",R_="tempest_outline_aFbzy",L_="tempest_pressed_hX319",D_="tempest_sm_JTqaB",I_="tempest_md_QfS4K",P_="tempest_lg_ajzsM",lt={toggle:M_,outline:R_,pressed:L_,sm:D_,md:I_,lg:P_},A_=l.forwardRef(function({pressed:t,defaultPressed:n=!1,onPressedChange:s,size:r="md",variant:a="default",className:c,disabled:i,onClick:u,children:d,...p},m){const f=t!==void 0,[h,_]=l.useState(n),b=f?t:h,v=l.useCallback(g=>{if(u?.(g),g.defaultPrevented)return;const w=!b;f||_(w),s?.(w)},[b,f,u,s]);return o.jsx("button",{ref:m,type:"button","aria-pressed":b,disabled:i,"data-state":b?"on":"off",className:x.cn(lt.toggle,lt[r],lt[a],b&<.pressed,c),onClick:v,...p,children:d})}),F_="tempest_group_XZCDJ",O_="tempest_item_B-27E",B_="tempest_selected_OHPVQ",Wt={group:F_,item:O_,selected:B_},qn=l.createContext(null);function z_(){const e=l.useContext(qn);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e}function dn(e){return e===void 0?[]:Array.isArray(e)?e:[e]}function W_({type:e="single",value:t,defaultValue:n,onValueChange:s,className:r,children:a,...c}){const i=t!==void 0,[u,d]=l.useState(()=>dn(n)),p=i?dn(t):u,m=l.useCallback(_=>{i||d(_),s?.(e==="single"?_[0]??"":_)},[i,s,e]),f=l.useCallback(_=>{const b=p.includes(_);m(e==="single"?b?[]:[_]:b?p.filter(v=>v!==_):[...p,_])},[p,e,m]),h=l.useMemo(()=>({type:e,isSelected:_=>p.includes(_),toggle:f}),[e,p,f]);return o.jsx(qn.Provider,{value:h,children:o.jsx("div",{role:"group",className:x.cn(Wt.group,r),...c,children:a})})}function q_({value:e,disabled:t,className:n,children:s,...r}){const{isSelected:a,toggle:c}=z_(),i=a(e);return o.jsx("button",{type:"button",role:"button","aria-pressed":i,disabled:t,"data-state":i?"on":"off",className:x.cn(Wt.item,i&&Wt.selected,n),onClick:()=>c(e),...r,children:s})}const U_="tempest_label_RaRvM",K_="tempest_asterisk_1CgE8",pn={label:U_,asterisk:K_},H_=l.forwardRef(function({required:t=!1,className:n,children:s,...r},a){return o.jsxs("label",{ref:a,className:x.cn(pn.label,n),...r,children:[s,t&&o.jsx("span",{className:pn.asterisk,"aria-hidden":!0,children:"*"})]})}),G_="tempest_collapsible_8jmKP",J_="tempest_trigger_ers75",Q_="tempest_content_XmUZL",ut={collapsible:G_,trigger:J_,content:Q_};function Y_({open:e,defaultOpen:t=!1,onOpenChange:n,trigger:s,className:r,children:a,...c}){const i=l.useId(),u=`${i}-content`,d=`${i}-trigger`,p=e!==void 0,[m,f]=l.useState(t),h=p?e:m,_=l.useCallback(()=>{const b=!h;p||f(b),n?.(b)},[h,p,n]);return o.jsxs("div",{className:x.cn(ut.collapsible,h&&ut.open,r),...c,children:[o.jsx("button",{type:"button",id:d,className:ut.trigger,"aria-expanded":h,"aria-controls":u,onClick:_,children:s}),o.jsx("div",{id:u,role:"region","aria-labelledby":d,hidden:!h,className:ut.content,children:a})]})}const V_="tempest_root_OxRHj",X_="tempest_menu_MDn4t",Z_="tempest_item_PoiMY",eg="tempest_active_ATcDu",tg="tempest_danger_COgly",ng="tempest_separator_omuCz",Ke={root:V_,menu:X_,item:Z_,active:eg,danger:tg,separator:ng};function mn(e){return"separator"in e&&e.separator===!0}function sg({items:e,children:t,className:n}){const[s,r]=l.useState(!1),[a,c]=l.useState({x:0,y:0}),[i,u]=l.useState(-1),d=l.useId(),p=l.useRef(null),m=l.useRef([]),f=e.map((v,g)=>!mn(v)&&!v.disabled?g:-1).filter(v=>v!==-1),h=l.useCallback(()=>{r(!1),u(-1)},[]),_=v=>{v.preventDefault(),c({x:v.clientX,y:v.clientY}),u(-1),r(!0)};l.useEffect(()=>{if(!s)return;const v=w=>{if(w.key==="Escape"){h();return}if(w.key==="ArrowDown"){w.preventDefault();const y=f.indexOf(i),j=f[(y+1)%f.length]??-1;u(j),m.current[j]?.focus()}if(w.key==="ArrowUp"){w.preventDefault();const y=f.indexOf(i),j=f[(y-1+f.length)%f.length]??-1;u(j),m.current[j]?.focus()}},g=w=>{p.current&&!p.current.contains(w.target)&&h()};return window.addEventListener("keydown",v),window.addEventListener("mousedown",g),()=>{window.removeEventListener("keydown",v),window.removeEventListener("mousedown",g)}},[s,i,f,h]);const b=v=>{v.onSelect?.(),h()};return o.jsxs(o.Fragment,{children:[o.jsx("span",{className:Ke.root,onContextMenu:_,children:t}),s&&o.jsx(Wn,{children:o.jsx("ul",{ref:p,id:d,role:"menu",className:x.cn(Ke.menu,n),style:{top:a.y,left:a.x},children:e.map((v,g)=>mn(v)?o.jsx("li",{role:"separator",className:Ke.separator,"aria-hidden":!0},`separator-${g}`):o.jsx("li",{role:"none",children:o.jsx("button",{ref:w=>{m.current[g]=w},type:"button",role:"menuitem",className:x.cn(Ke.item,v.danger&&Ke.danger,i===g&&Ke.active),disabled:v.disabled,onClick:()=>b(v),onMouseEnter:()=>u(g),children:v.label})},`item-${g}`))})})]})}const rg="tempest_root_2KoZA",og="tempest_trigger_OXsnr",ag="tempest_card_CoGx4",cg="tempest_tempest-hover-card-in_jD85J",ig="tempest_top_AVcQ0",lg="tempest_bottom_2rLAA",ug="tempest_left_tqGPt",dg="tempest_right_9Fe6S",dt={root:rg,trigger:og,card:ag,tempestHoverCardIn:cg,top:ig,bottom:lg,left:ug,right:dg};function pg({trigger:e,children:t,openDelay:n=300,closeDelay:s=150,placement:r="bottom",className:a,...c}){const[i,u]=l.useState(!1),d=l.useId(),p=l.useRef(null),m=l.useCallback(()=>{p.current!==null&&(clearTimeout(p.current),p.current=null)},[]),f=l.useCallback(()=>{m(),p.current=setTimeout(()=>u(!0),n)},[m,n]),h=l.useCallback(()=>{m(),p.current=setTimeout(()=>u(!1),s)},[m,s]);return l.useEffect(()=>m,[m]),o.jsxs("span",{className:dt.root,onMouseEnter:f,onMouseLeave:h,onFocus:f,onBlur:h,children:[o.jsx("span",{"aria-describedby":i?d:void 0,className:dt.trigger,children:e}),i&&o.jsx("div",{id:d,role:"dialog",className:x.cn(dt.card,dt[r],a),...c,children:t})]})}const mg=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function Un(e,t){l.useEffect(()=>{if(!t)return;const n=e.current;if(!n)return;const s=document.activeElement;function r(){return Array.from(n?.querySelectorAll(mg)??[]).filter(i=>{if(i.hasAttribute("aria-hidden"))return!1;const u=typeof window<"u"?window.getComputedStyle(i):null;return!(u&&(u.display==="none"||u.visibility==="hidden"))})}function a(i){if(i.key!=="Tab")return;const u=r();if(u.length===0){i.preventDefault();return}const d=u[0],p=u[u.length-1],m=document.activeElement;i.shiftKey?(m===d||!m||!n?.contains(m))&&(i.preventDefault(),p.focus()):m===p&&(i.preventDefault(),d.focus())}return r()[0]?.focus(),document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a),s?.focus?.()}},[e,t])}const fg="tempest_overlay_drnPW",hg="tempest_dialog_lPl6k",_g="tempest_inputRow_KxWoQ",gg="tempest_searchIcon_8PULr",bg="tempest_input_D3HQr",yg="tempest_list_5UzZU",vg="tempest_group_vLaWy",wg="tempest_groupHeading_d01fo",xg="tempest_groupList_QFMjK",jg="tempest_option_doqib",$g="tempest_active_LdCIJ",kg="tempest_icon_CyCCx",Ng="tempest_label_QePT-",Sg="tempest_empty_al68D",W={overlay:fg,dialog:hg,inputRow:_g,searchIcon:gg,input:bg,list:yg,group:vg,groupHeading:wg,groupList:xg,option:jg,active:$g,icon:kg,label:Ng,empty:Sg};function Cg(e,t){return t===""||e.label.toLowerCase().includes(t)?!0:(e.keywords??[]).some(n=>n.toLowerCase().includes(t))}function fn(e){const t=[],n=new Map;for(const s of e){const r=n.get(s.group);r===void 0?(n.set(s.group,t.length),t.push({name:s.group,items:[s]})):t[r].items.push(s)}return t}function Eg({open:e,onOpenChange:t,items:n,placeholder:s="Type a command…",emptyMessage:r="No results",className:a}){const c=l.useRef(null),[i,u]=l.useState(""),[d,p]=l.useState(0),m="tempest-command-list";Un(c,e);const f=l.useMemo(()=>{const g=i.trim().toLowerCase(),w=n.filter(y=>Cg(y,g));return fn(w).flatMap(y=>y.items)},[n,i]),h=l.useMemo(()=>fn(f),[f]);if(l.useEffect(()=>{e&&(u(""),p(0))},[e]),l.useEffect(()=>{p(g=>f.length===0?0:Math.min(g,f.length-1))},[f.length]),!e||typeof document>"u")return null;function _(g){g.onSelect(),t(!1)}function b(g){if(g.key==="Escape"){g.preventDefault(),t(!1);return}if(g.key==="ArrowDown"){if(g.preventDefault(),f.length===0)return;p(w=>(w+1)%f.length);return}if(g.key==="ArrowUp"){if(g.preventDefault(),f.length===0)return;p(w=>(w-1+f.length)%f.length);return}if(g.key==="Enter"){g.preventDefault();const w=f[d];w&&_(w)}}let v=-1;return Ge.createPortal(o.jsx("div",{className:W.overlay,role:"presentation",onClick:()=>t(!1),children:o.jsxs("div",{ref:c,role:"dialog","aria-modal":"true","aria-label":"Command palette",className:x.cn(W.dialog,a),onClick:g=>g.stopPropagation(),children:[o.jsxs("div",{className:W.inputRow,children:[o.jsx(Tg,{}),o.jsx("input",{type:"text",role:"combobox","aria-expanded":"true","aria-controls":m,"aria-autocomplete":"list",autoFocus:!0,className:W.input,placeholder:s,value:i,onChange:g=>u(g.target.value),onKeyDown:b})]}),o.jsx("ul",{id:m,role:"listbox",className:W.list,children:f.length===0?o.jsx("li",{className:W.empty,children:r}):h.map(g=>o.jsxs("li",{className:W.group,children:[g.name&&o.jsx("div",{className:W.groupHeading,children:g.name}),o.jsx("ul",{role:"presentation",className:W.groupList,children:g.items.map(w=>{v+=1;const y=v===d,j=v;return o.jsxs("li",{role:"option","aria-selected":y,className:x.cn(W.option,y&&W.active),onMouseMove:()=>p(j),onClick:()=>_(w),children:[w.icon&&o.jsx("span",{className:W.icon,children:w.icon}),o.jsx("span",{className:W.label,children:w.label})]},w.id)})})]},g.name??"__ungrouped__"))})]})}),document.body)}function Tg(){return o.jsxs("svg",{className:W.searchIcon,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[o.jsx("circle",{cx:"11",cy:"11",r:"7",stroke:"currentColor",strokeWidth:"2"}),o.jsx("path",{d:"M20 20l-3.5-3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}const Mg="tempest_root_cWKqF",Rg={root:Mg},Lg=l.forwardRef(function({maxHeight:t,orientation:n="vertical",className:s,style:r,children:a,...c},i){const u={overflowX:n==="vertical"?"hidden":"auto",overflowY:n==="horizontal"?"hidden":"auto",...t!==void 0?{maxHeight:t}:{},...r};return o.jsx("div",{ref:i,className:x.cn(Rg.root,s),style:u,...c,children:a})}),Dg="tempest_root_-Xerf",Ig="tempest_horizontal_3QOMV",Pg="tempest_vertical_6A7lb",Ag="tempest_pane_x6yUG",Fg="tempest_divider_fhaTB",Og="tempest_handle_eCe1B",Fe={root:Dg,horizontal:Ig,vertical:Pg,pane:Ag,divider:Fg,handle:Og},pt=2;function Mt(e,t,n){return Math.min(n,Math.max(t,e))}function Bg({direction:e="horizontal",defaultSize:t=50,min:n=10,max:s=90,children:r,className:a,...c}){const[i,u]=l.useState(()=>Mt(t,n,s)),d=l.useRef(null),[p,m]=r,f=e==="horizontal",h=l.useCallback((v,g)=>{const w=d.current;if(!w)return;const y=w.getBoundingClientRect(),j=f?y.width:y.height;if(j<=0)return;const M=(f?v-y.left:g-y.top)/j*100;u(Mt(M,n,s))},[f,n,s]),_=l.useCallback(v=>{v.preventDefault(),v.currentTarget.setPointerCapture(v.pointerId);const w=j=>{h(j.clientX,j.clientY)},y=()=>{window.removeEventListener("pointermove",w),window.removeEventListener("pointerup",y)};window.addEventListener("pointermove",w),window.addEventListener("pointerup",y)},[h]),b=l.useCallback(v=>{let g=0;if(f?v.key==="ArrowRight"?g=pt:v.key==="ArrowLeft"&&(g=-pt):v.key==="ArrowDown"?g=pt:v.key==="ArrowUp"&&(g=-pt),v.key==="Home"){v.preventDefault(),u(n);return}if(v.key==="End"){v.preventDefault(),u(s);return}g!==0&&(v.preventDefault(),u(w=>Mt(w+g,n,s)))},[f,n,s]);return o.jsxs("div",{ref:d,className:x.cn(Fe.root,f?Fe.horizontal:Fe.vertical,a),...c,children:[o.jsx("div",{className:Fe.pane,style:{flexBasis:`${i}%`},children:p}),o.jsx("div",{role:"separator","aria-orientation":f?"vertical":"horizontal","aria-valuenow":Math.round(i),"aria-valuemin":n,"aria-valuemax":s,tabIndex:0,className:Fe.divider,onPointerDown:_,onKeyDown:b,children:o.jsx("span",{className:Fe.handle,"aria-hidden":"true"})}),o.jsx("div",{className:Fe.pane,style:{flexBasis:`${100-i}%`},children:m})]})}const zg="tempest_root_ObO-Z",Wg="tempest_header_5nSJG",qg="tempest_title_Jd3Xb",Ug="tempest_nav_4h58I",Kg="tempest_weekdays_YzRfx",Hg="tempest_grid_nbaFm",Gg="tempest_weekday_k-7Vr",Jg="tempest_day_ao-IC",Qg="tempest_outside_HkC-6",Yg="tempest_today_p18-m",Vg="tempest_selected_C9bTY",Y={root:zg,header:Wg,title:qg,nav:Ug,weekdays:Kg,grid:Hg,weekday:Gg,day:Jg,outside:Qg,today:Yg,selected:Vg},Xg=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Zg=["January","February","March","April","May","June","July","August","September","October","November","December"],Kn=42;function He(e,t,n){return new Date(e,t,n)}function _t(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function hn(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function _n(e,t,n){const s=_t(e).getTime();return!!(t&&s<_t(t).getTime()||n&&s>_t(n).getTime())}function eb(e,t){const n=e.getFullYear(),s=e.getMonth(),c=(He(n,s,1).getDay()-t+7)%7,i=He(n,s,1-c),u=[];for(let d=0;d<Kn;d+=1)u.push(He(i.getFullYear(),i.getMonth(),i.getDate()+d));return u}function tb({value:e,defaultValue:t,onChange:n,month:s,onMonthChange:r,minDate:a,maxDate:c,weekStartsOn:i=0,className:u,...d}){const p=e!==void 0,[m,f]=l.useState(t),h=p?e:m,_=s!==void 0,[b,v]=l.useState(()=>{const $=s??e??t??new Date;return He($.getFullYear(),$.getMonth(),1)}),g=_?He(s.getFullYear(),s.getMonth(),1):b,[w,y]=l.useState(null),j=l.useRef(null),S=l.useMemo(()=>_t(new Date),[]),M=l.useMemo(()=>eb(g,i),[g,i]),T=l.useMemo(()=>Array.from({length:7},($,C)=>Xg[(C+i)%7]),[i]),N=l.useCallback($=>{const C=He(g.getFullYear(),g.getMonth()+$,1);r&&r(C),_||v(C)},[g,r,_]),k=l.useCallback($=>{_n($,a,c)||(n&&n($),p||f($))},[a,c,n,p]),E=l.useCallback($=>{const C=Math.max(0,Math.min(Kn-1,$));y(C);const F=j.current;if(!F)return;F.querySelectorAll("button[data-day]")[C]?.focus()},[]),D=l.useCallback(($,C)=>{switch($.key){case"ArrowLeft":$.preventDefault(),E(C-1);break;case"ArrowRight":$.preventDefault(),E(C+1);break;case"ArrowUp":$.preventDefault(),E(C-7);break;case"ArrowDown":$.preventDefault(),E(C+7);break;case"Enter":case" ":$.preventDefault(),k(M[C]);break}},[E,k,M]);return o.jsxs("div",{className:x.cn(Y.root,u),...d,children:[o.jsxs("div",{className:Y.header,children:[o.jsx("button",{type:"button",className:Y.nav,"aria-label":"Previous month",onClick:()=>N(-1),children:"‹"}),o.jsxs("span",{className:Y.title,"aria-live":"polite",children:[Zg[g.getMonth()]," ",g.getFullYear()]}),o.jsx("button",{type:"button",className:Y.nav,"aria-label":"Next month",onClick:()=>N(1),children:"›"})]}),o.jsx("div",{className:Y.weekdays,role:"row",children:T.map($=>o.jsx("span",{className:Y.weekday,role:"columnheader",children:$},$))}),o.jsx("div",{className:Y.grid,role:"grid",ref:j,children:M.map(($,C)=>{const F=$.getMonth()===g.getMonth(),L=h?hn($,h):!1,R=hn($,S),q=_n($,a,c),ct=w===null?F&&$.getDate()===1:w===C;return o.jsx("button",{type:"button","data-day":!0,role:"gridcell",className:x.cn(Y.day,!F&&Y.outside,L&&Y.selected,R&&Y.today),"aria-pressed":L,"aria-selected":L,"aria-current":R?"date":void 0,disabled:q,tabIndex:ct?0:-1,onClick:()=>k($),onKeyDown:Es=>D(Es,C),children:$.getDate()},C)})})]})}const nb="tempest_wrapper_KCCs1",sb="tempest_label_N4ak-",rb="tempest_value_-33zj",ob="tempest_field_wFJsg",ab="tempest_track_kaJkL",cb="tempest_fill_tio-b",ib="tempest_input_J48Um",lb="tempest_helper_yn8VW",Ce={wrapper:nb,label:sb,value:rb,field:ob,track:ab,fill:cb,input:ib,helper:lb};function ub({value:e,onChange:t,min:n=0,max:s=100,step:r=1,label:a,helperText:c,disabled:i=!1,formatValue:u,className:d}){const p=l.useMemo(()=>{const h=s-n;return h<=0?0:Math.min(100,Math.max(0,(e-n)/h*100))},[e,n,s]),m=u?.(e)??String(e),f=l.useCallback(h=>{t(Number(h.target.value))},[t]);return o.jsxs("div",{className:x.cn(Ce.wrapper,d),children:[a&&o.jsxs("div",{className:Ce.label,children:[o.jsx("span",{children:a}),o.jsx("span",{className:Ce.value,children:m})]}),o.jsxs("div",{className:Ce.field,children:[o.jsx("div",{className:Ce.track}),o.jsx("div",{className:Ce.fill,style:{width:`${p}%`}}),o.jsx("input",{type:"range",className:Ce.input,min:n,max:s,step:r,value:e,onChange:f,disabled:i,"aria-label":a??"Slider","aria-valuetext":m})]}),c&&o.jsx("span",{className:Ce.helper,children:c})]})}const db="tempest_wrapper_6xZZr",pb="tempest_label_Jwj7I",mb="tempest_field_GpA0V",fb="tempest_disabled_BIKaG",hb="tempest_chip_Zk0ch",_b="tempest_chipRemove_R-mNv",gb="tempest_input_SjOXU",bb="tempest_menu_3xnmo",yb="tempest_option_lqEl1",vb="tempest_check_aUM1w",wb="tempest_active_S9sQ-",xb="tempest_selected_Rw8yr",jb="tempest_empty_-5B16",$b="tempest_helper_c7aH3",kb="tempest_errorText_qZR9s",Nb="tempest_error_DIOTW",O={wrapper:db,label:pb,field:mb,disabled:fb,chip:hb,chipRemove:_b,input:gb,menu:bb,option:yb,check:vb,active:wb,selected:xb,empty:jb,helper:$b,errorText:kb,error:Nb};function Sb(e,t){return t?e.label.toLowerCase().includes(t.toLowerCase()):!0}function Cb({options:e,value:t,onChange:n,label:s,placeholder:r="Selecione",helperText:a,error:c,disabled:i,maxItems:u,filter:d=Sb,emptyMessage:p="Nenhuma opção encontrada",className:m}){const f=l.useId(),h=l.useRef(null),_=l.useRef(null),[b,v]=l.useState(!1),[g,w]=l.useState(""),[y,j]=l.useState(0),S=l.useMemo(()=>new Set(t),[t]),M=l.useMemo(()=>t.map($=>e.find(C=>C.value===$)).filter($=>!!$),[t,e]),T=l.useMemo(()=>e.filter($=>d($,g)),[e,d,g]),N=u!==void 0&&t.length>=u,k=l.useCallback($=>{if(!$.disabled){if(S.has($.value))n(t.filter(C=>C!==$.value));else{if(N)return;n([...t,$.value])}w(""),_.current?.focus()}},[S,n,t,N]),E=l.useCallback($=>{n(t.filter(C=>C!==$))},[n,t]);l.useEffect(()=>{if(!b)return;const $=C=>{h.current&&!h.current.contains(C.target)&&(v(!1),w(""))};return window.addEventListener("mousedown",$),()=>window.removeEventListener("mousedown",$)},[b]);const D=$=>{if($.key==="ArrowDown")$.preventDefault(),v(!0),j(C=>Math.min(T.length-1,C+1));else if($.key==="ArrowUp")$.preventDefault(),j(C=>Math.max(0,C-1));else if($.key==="Enter"){$.preventDefault();const C=T[y];C&&k(C)}else $.key==="Escape"?(v(!1),w("")):$.key==="Backspace"&&g===""&&t.length>0&&E(t[t.length-1])};return o.jsxs("div",{ref:h,className:x.cn(O.wrapper,c&&O.error,m),children:[s&&o.jsx("label",{htmlFor:f,className:O.label,children:s}),o.jsxs("div",{className:x.cn(O.field,i&&O.disabled),onMouseDown:$=>{i||$.target===$.currentTarget&&($.preventDefault(),_.current?.focus(),v(!0))},children:[M.map($=>o.jsxs("span",{className:O.chip,children:[$.label,o.jsx("button",{type:"button",className:O.chipRemove,"aria-label":`Remover ${$.label}`,disabled:i,onMouseDown:C=>{C.preventDefault(),E($.value)},children:"×"})]},$.value)),o.jsx("input",{id:f,ref:_,type:"text",role:"combobox","aria-expanded":b,"aria-controls":`${f}-listbox`,"aria-autocomplete":"list",className:O.input,placeholder:t.length===0?r:"",disabled:i,value:g,onFocus:()=>v(!0),onChange:$=>{w($.target.value),v(!0),j(0)},onKeyDown:D})]}),b&&o.jsx("ul",{id:`${f}-listbox`,role:"listbox","aria-multiselectable":!0,className:O.menu,children:T.length===0?o.jsx("li",{className:O.empty,children:p}):T.map(($,C)=>{const F=S.has($.value);return o.jsxs("li",{role:"option","aria-selected":F,"aria-disabled":$.disabled||!F&&N,className:x.cn(O.option,C===y&&O.active,F&&O.selected),onMouseEnter:()=>j(C),onMouseDown:L=>{L.preventDefault(),k($)},children:[o.jsx("span",{className:O.check,"aria-hidden":!0,children:F?"✓":""}),$.label]},$.value)})}),c?o.jsx("span",{className:O.errorText,children:c}):a?o.jsx("span",{className:O.helper,children:a}):null]})}const Eb="tempest_root_fVC66",Tb="tempest_header_sTdRM",Mb="tempest_headerSpacer_nqeNO",Rb="tempest_nav_7nFJE",Lb="tempest_months_fbwtK",Db="tempest_month_0WfUc",Ib="tempest_title_OGQrm",Pb="tempest_weekdays_nYTrg",Ab="tempest_grid_O0eUF",Fb="tempest_weekday_cy-Mz",Ob="tempest_day_-V6FX",Bb="tempest_outside_3otid",zb="tempest_today_gwmhs",Wb="tempest_inRange_iQJYA",qb="tempest_selected_DRsBO",Ub="tempest_rangeStart_-Oe1u",Kb="tempest_rangeEnd_mUaKW",P={root:Eb,header:Tb,headerSpacer:Mb,nav:Rb,months:Lb,month:Db,title:Ib,weekdays:Pb,grid:Ab,weekday:Fb,day:Ob,outside:Bb,today:zb,inRange:Wb,selected:qb,rangeStart:Ub,rangeEnd:Kb},Hb=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],gn=["January","February","March","April","May","June","July","August","September","October","November","December"],Gb=42;function st(e,t,n){return new Date(e,t,n)}function ie(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function bn(e,t){return st(e.getFullYear(),e.getMonth()+t,1)}function Rt(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function yn(e,t,n){const s=ie(e).getTime();return!!(t&&s<ie(t).getTime()||n&&s>ie(n).getTime())}function Jb(e,t,n){const s=ie(e).getTime(),r=Math.min(ie(t).getTime(),ie(n).getTime()),a=Math.max(ie(t).getTime(),ie(n).getTime());return s>r&&s<a}function Qb(e,t){const n=e.getFullYear(),s=e.getMonth(),a=(st(n,s,1).getDay()-t+7)%7,c=st(n,s,1-a);return Array.from({length:Gb},(i,u)=>st(c.getFullYear(),c.getMonth(),c.getDate()+u))}function Yb({value:e,onChange:t,numberOfMonths:n=2,defaultMonth:s,minDate:r,maxDate:a,weekStartsOn:c=0,className:i,...u}){const[d,p]=l.useState(()=>{const y=s??e.start??new Date;return st(y.getFullYear(),y.getMonth(),1)}),[m,f]=l.useState(null),h=l.useMemo(()=>ie(new Date),[]),_=l.useMemo(()=>Array.from({length:7},(y,j)=>Hb[(j+c)%7]),[c]),b=l.useCallback(y=>{if(yn(y,r,a))return;const{start:j,end:S}=e;!j||S?t({start:y,end:null}):ie(y).getTime()<ie(j).getTime()?t({start:y,end:j}):t({start:j,end:y})},[e,t,r,a]),v=l.useCallback(y=>{p(j=>bn(j,y))},[]),g=e.start&&!e.end?m:e.end;function w(y){const{start:j}=e,S=g,M=j?Rt(y,j):!1,T=S?Rt(y,S):!1,N=j&&S?Jb(y,j,S):!1;return{selected:M||T,inRange:N,isStart:M,isEnd:T}}return o.jsxs("div",{className:x.cn(P.root,i),...u,children:[o.jsxs("div",{className:P.header,children:[o.jsx("button",{type:"button",className:P.nav,"aria-label":"Previous month",onClick:()=>v(-1),children:"‹"}),o.jsx("span",{className:P.headerSpacer,"aria-hidden":!0}),o.jsx("button",{type:"button",className:P.nav,"aria-label":"Next month",onClick:()=>v(1),children:"›"})]}),o.jsx("div",{className:P.months,onMouseLeave:()=>f(null),children:Array.from({length:Math.max(1,n)},(y,j)=>{const S=bn(d,j),M=Qb(S,c);return o.jsxs("div",{className:P.month,children:[o.jsxs("div",{className:P.title,"aria-live":"polite",children:[gn[S.getMonth()]," ",S.getFullYear()]}),o.jsx("div",{className:P.weekdays,role:"row",children:_.map(T=>o.jsx("span",{className:P.weekday,role:"columnheader",children:T},T))}),o.jsx("div",{className:P.grid,role:"grid",children:M.map((T,N)=>{const k=T.getMonth()===S.getMonth(),E=yn(T,r,a),{selected:D,inRange:$,isStart:C,isEnd:F}=w(T),L=Rt(T,h);return o.jsx("button",{type:"button",role:"gridcell",className:x.cn(P.day,!k&&P.outside,$&&P.inRange,D&&P.selected,C&&P.rangeStart,F&&P.rangeEnd,L&&P.today),"aria-label":`${gn[T.getMonth()]} ${T.getDate()}, ${T.getFullYear()}`,"aria-selected":D,"aria-current":L?"date":void 0,disabled:E,onClick:()=>b(T),onMouseEnter:()=>f(T),children:T.getDate()},N)})})]},j)})})]})}const Vb="tempest_root_Nosqs",Xb="tempest_list_v9FNC",Zb="tempest_item_9RzZ7",ey="tempest_link_67ULr",ty="tempest_trigger_2gBDu",ny="tempest_panel_N2ujp",sy="tempest_subItem_LjtO7",we={root:Vb,list:Xb,item:Zb,link:ey,trigger:ty,panel:ny,subItem:sy};function ry({items:e,className:t,...n}){const[s,r]=l.useState(-1),[a,c]=l.useState(-1),i=l.useId(),u=l.useRef(null),d=l.useCallback(()=>{r(-1),c(-1)},[]),p=s!==-1?s:a;l.useEffect(()=>{if(p===-1)return;const f=_=>{_.key==="Escape"&&d()},h=_=>{u.current&&!u.current.contains(_.target)&&d()};return window.addEventListener("keydown",f),window.addEventListener("mousedown",h),()=>{window.removeEventListener("keydown",f),window.removeEventListener("mousedown",h)}},[p,d]);const m=(f,h)=>{const _=()=>{f.onSelect?.(),d()};return f.href?o.jsx("a",{href:f.href,role:h==="menuitem"?"menuitem":void 0,className:we.link,onClick:_,children:f.label}):o.jsx("button",{type:"button",role:h==="menuitem"?"menuitem":void 0,className:we.link,onClick:_,children:f.label})};return o.jsx("nav",{ref:u,className:x.cn(we.root,t),...n,children:o.jsx("ul",{className:we.list,children:e.map((f,h)=>{if(!(!!f.children&&f.children.length>0))return o.jsx("li",{className:we.item,children:m(f,"none")},h);const b=p===h,v=`${i}-panel-${h}`;return o.jsxs("li",{className:we.item,onMouseEnter:()=>c(h),onMouseLeave:()=>c(g=>g===h?-1:g),children:[o.jsx("button",{type:"button",className:we.trigger,"aria-haspopup":"menu","aria-expanded":b,"aria-controls":v,onClick:()=>r(g=>g===h?-1:h),onFocus:()=>c(h),children:f.label}),b&&o.jsx("ul",{id:v,role:"menu",className:we.panel,children:f.children.map((g,w)=>o.jsx("li",{role:"none",className:we.subItem,children:m(g,"menuitem")},w))})]},h)})})})}const oy="tempest_root_PGUO2",ay="tempest_menu_hEVLT",cy="tempest_trigger_ZlZBx",iy="tempest_triggerOpen_Hpfbu",ly="tempest_panel_6ta6u",uy="tempest_item_wM-61",dy="tempest_itemLabel_wXfB2",py="tempest_shortcut_qNlmN",my="tempest_separator_LfK3t",xe={root:oy,menu:ay,trigger:cy,triggerOpen:iy,panel:ly,item:uy,itemLabel:dy,shortcut:py,separator:my};function fy(e){return"separator"in e}function hy({menus:e,className:t,...n}){const[s,r]=l.useState(-1),a=l.useId(),c=l.useRef(null),i=l.useRef([]),u=l.useCallback(()=>{r(-1)},[]);return l.useEffect(()=>{if(s===-1)return;const d=m=>{if(m.key==="Escape"){u(),i.current[s]?.focus();return}if(m.key==="ArrowRight"){m.preventDefault();const f=(s+1)%e.length;r(f),i.current[f]?.focus()}if(m.key==="ArrowLeft"){m.preventDefault();const f=(s-1+e.length)%e.length;r(f),i.current[f]?.focus()}},p=m=>{c.current&&!c.current.contains(m.target)&&u()};return window.addEventListener("keydown",d),window.addEventListener("mousedown",p),()=>{window.removeEventListener("keydown",d),window.removeEventListener("mousedown",p)}},[s,e.length,u]),o.jsx("div",{ref:c,role:"menubar",className:x.cn(xe.root,t),...n,children:e.map((d,p)=>{const m=s===p,f=`${a}-panel-${p}`;return o.jsxs("div",{className:xe.menu,children:[o.jsx("button",{ref:h=>{i.current[p]=h},type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":m,"aria-controls":m?f:void 0,className:x.cn(xe.trigger,m&&xe.triggerOpen),onClick:()=>r(h=>h===p?-1:p),children:d.label}),m&&o.jsx("ul",{id:f,role:"menu",className:xe.panel,children:d.items.map((h,_)=>fy(h)?o.jsx("li",{role:"separator",className:xe.separator,"aria-hidden":!0},_):o.jsx("li",{role:"none",children:o.jsxs("button",{type:"button",role:"menuitem",className:xe.item,disabled:h.disabled,onClick:()=>{h.onSelect?.(),u()},children:[o.jsx("span",{className:xe.itemLabel,children:h.label}),h.shortcut&&o.jsx("span",{className:xe.shortcut,children:h.shortcut})]})},_))})]},p)})})}const _y="tempest_root_-w3-j",gy="tempest_viewport_n0hzM",by="tempest_track_5PA8h",yy="tempest_slide_fhfjg",vy="tempest_arrow_S92Lt",wy="tempest_prev_X8whU",xy="tempest_next_jBRSz",jy="tempest_dots_fL3Hr",$y="tempest_dot_vEB56",ky="tempest_dotActive_OSSUg",oe={root:_y,viewport:gy,track:by,slide:yy,arrow:vy,prev:wy,next:xy,dots:jy,dot:$y,dotActive:ky};function Ny({children:e,loop:t=!1,showArrows:n=!0,showDots:s=!0,index:r,defaultIndex:a=0,onIndexChange:c,className:i,...u}){const d=e.length,p=r!==void 0,[m,f]=l.useState(a),h=p?r:m,_=l.useCallback(w=>{let y=w;y<0?y=t?d-1:0:y>=d&&(y=t?0:d-1),y!==h&&(p||f(y),c?.(y))},[d,t,h,p,c]),b=h<=0,v=h>=d-1,g=w=>{w.key==="ArrowRight"?(w.preventDefault(),_(h+1)):w.key==="ArrowLeft"&&(w.preventDefault(),_(h-1))};return o.jsxs("div",{role:"region","aria-roledescription":"carousel",tabIndex:0,className:x.cn(oe.root,i),onKeyDown:g,...u,children:[o.jsx("div",{className:oe.viewport,children:o.jsx("div",{className:oe.track,style:{transform:`translateX(-${h*100}%)`},children:e.map((w,y)=>o.jsx("div",{role:"group","aria-roledescription":"slide","aria-label":`${y+1} of ${d}`,"aria-hidden":y!==h,className:oe.slide,children:w},y))})}),n&&d>1&&o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",className:x.cn(oe.arrow,oe.prev),"aria-label":"Previous slide",disabled:!t&&b,onClick:()=>_(h-1),children:"‹"}),o.jsx("button",{type:"button",className:x.cn(oe.arrow,oe.next),"aria-label":"Next slide",disabled:!t&&v,onClick:()=>_(h+1),children:"›"})]}),s&&d>1&&o.jsx("div",{className:oe.dots,role:"tablist","aria-label":"Slides",children:e.map((w,y)=>o.jsx("button",{type:"button",role:"tab","aria-label":`Go to slide ${y+1}`,"aria-selected":y===h,className:x.cn(oe.dot,y===h&&oe.dotActive),onClick:()=>_(y)},y))})]})}function Sy(e,t=300){const[n,s]=l.useState(e);return l.useEffect(()=>{const r=setTimeout(()=>s(e),t);return()=>clearTimeout(r)},[e,t]),n}function Hn(e=1,t=50){const[n,s]=l.useState(e),[r,a]=l.useState(t),c=l.useCallback(()=>s(1),[]);return{page:n,size:r,setPage:s,setSize:a,reset:c}}function Cy(e,t,n){return l.useMemo(()=>{const s=t.trim().toLowerCase();return s?typeof n=="function"?e.filter(r=>n(r,s)):e.filter(r=>n.some(a=>{const c=r[a];return c!=null&&String(c).toLowerCase().includes(s)})):e},[e,t,n])}function Ey(e){const[t,n]=l.useState(()=>typeof window>"u"?!1:window.matchMedia(e).matches);return l.useEffect(()=>{if(typeof window>"u")return;const s=window.matchMedia(e),r=a=>n(a.matches);return n(s.matches),s.addEventListener("change",r),()=>s.removeEventListener("change",r)},[e]),t}function Ty(e,t,n,s){const r=l.useRef(t);r.current=t,l.useEffect(()=>{const a=n===void 0?typeof window>"u"?null:window:"current"in n?n.current??null:n;if(!a?.addEventListener)return;const c=i=>r.current(i);return a.addEventListener(e,c,s),()=>a.removeEventListener(e,c,s)},[e,n,s])}const My=JSON.stringify,Ry=e=>JSON.parse(e);function Ly(e,t,n={}){const s=n.serialize??My,r=n.deserialize??Ry,a=l.useCallback(()=>{if(typeof window>"u")return t;try{const p=window.localStorage.getItem(e);return p===null?t:r(p)}catch{return t}},[e,t,r]),[c,i]=l.useState(a);l.useEffect(()=>{i(a())},[a]);const u=l.useCallback(p=>{i(m=>{const f=typeof p=="function"?p(m):p;try{typeof window<"u"&&window.localStorage.setItem(e,s(f))}catch{}return f})},[e,s]),d=l.useCallback(()=>{try{typeof window<"u"&&window.localStorage.removeItem(e)}catch{}i(t)},[e,t]);return l.useEffect(()=>{if(typeof window>"u")return;const p=m=>{if(m.key===e){if(m.newValue===null){i(t);return}try{i(r(m.newValue))}catch{}}};return window.addEventListener("storage",p),()=>window.removeEventListener("storage",p)},[e,t,r]),[c,u,d]}function Dy(e=!1){const[t,n]=l.useState(e),s=l.useCallback(()=>n(i=>!i),[]),r=l.useCallback(()=>n(!0),[]),a=l.useCallback(()=>n(!1),[]),c=l.useCallback(i=>n(i),[]);return[t,{toggle:s,setTrue:r,setFalse:a,set:c}]}function Iy(e,t=[],n={}){const{immediate:s=!1}=n,[r,a]=l.useState({status:"idle",data:void 0,error:void 0}),c=l.useRef(e);c.current=e;const i=l.useRef(0),u=l.useRef(!0);l.useEffect(()=>(u.current=!0,()=>{u.current=!1}),[]);const d=l.useCallback(async()=>{const m=++i.current;a(f=>({...f,status:"pending",error:void 0}));try{const f=await c.current();return u.current&&i.current===m&&a({status:"success",data:f,error:void 0}),f}catch(f){throw u.current&&i.current===m&&a({status:"error",data:void 0,error:f}),f}},[]),p=l.useCallback(()=>{i.current++,a({status:"idle",data:void 0,error:void 0})},[]);return l.useEffect(()=>{s&&d().catch(()=>{})},[s,...t]),{status:r.status,data:r.data,error:r.error,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",run:d,reset:p}}function Py(){const[e,t]=l.useState(()=>typeof navigator>"u"?!0:navigator.onLine);return l.useEffect(()=>{if(typeof window>"u")return;const n=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",n),window.addEventListener("offline",s),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}},[]),e}function Ay(){const[e,t]=l.useState(()=>typeof document>"u"?"visible":document.visibilityState);return l.useEffect(()=>{if(typeof document>"u")return;const n=()=>t(document.visibilityState);return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)},[]),e}function Fy(e,t={}){const[n,s]=l.useState(null),{once:r=!1,root:a,rootMargin:c,threshold:i}=t;return l.useEffect(()=>{const u=e.current;if(!u||typeof IntersectionObserver>"u")return;const d=new IntersectionObserver(([p])=>{p&&(s(p),r&&p.isIntersecting&&d.unobserve(u))},{root:a,rootMargin:c,threshold:i});return d.observe(u),()=>d.disconnect()},[e,r,a,c,i]),n}function Oy(e){const[t,n]=l.useState(null);return l.useEffect(()=>{const s=e.current;if(!s||typeof ResizeObserver>"u")return;const r=new ResizeObserver(a=>{const c=a[0];if(!c)return;const i=c.contentRect;n({width:i.width,height:i.height})});return r.observe(s),()=>r.disconnect()},[e]),t}function By(e={}){const{resetAfter:t=1500}=e,[n,s]=l.useState(!1),r=l.useRef(null),a=l.useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null),s(!1)},[]);l.useEffect(()=>()=>a(),[a]);const c=l.useCallback(async i=>{try{if(typeof navigator<"u"&&navigator.clipboard?.writeText)await navigator.clipboard.writeText(i);else if(typeof document<"u"){const u=document.createElement("textarea");u.value=i,u.style.position="fixed",u.style.opacity="0",document.body.appendChild(u),u.select(),document.execCommand("copy"),document.body.removeChild(u)}else return!1;return s(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>s(!1),t),!0}catch{return!1}},[t]);return{copied:n,copy:c,reset:a}}function zy(e,t){if(e.key.toLowerCase()!==t.key.toLowerCase())return!1;const n=!!t.ctrl,s=!!t.meta,r=!!t.shift,a=!!t.alt;if(t.mod){if(!e.ctrlKey&&!e.metaKey)return!1}else if(e.ctrlKey!==n||e.metaKey!==s)return!1;return!(e.shiftKey!==r||e.altKey!==a)}function Wy(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase();return t==="input"||t==="textarea"||t==="select"?!0:e.isContentEditable}function qy(e,t,n={}){const{disabled:s=!1,ignoreInput:r=!0}=n;l.useEffect(()=>{if(s||typeof window>"u")return;const a=c=>{r&&Wy(c.target)||zy(c,e)&&t(c)};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[s,r,e.key,e.ctrl,e.meta,e.shift,e.alt,e.mod,t])}function Uy(){const[e,t]=l.useState(null),[n,s]=l.useState(!1);l.useEffect(()=>{if(typeof window>"u")return;const a=i=>{i.preventDefault(),t(i)},c=()=>{t(null),s(!0)};return window.addEventListener("beforeinstallprompt",a),window.addEventListener("appinstalled",c),()=>{window.removeEventListener("beforeinstallprompt",a),window.removeEventListener("appinstalled",c)}},[]);const r=l.useCallback(async()=>{if(!e)return"unsupported";await e.prompt();const a=await e.userChoice;return t(null),a.outcome==="accepted"&&s(!0),a.outcome},[e]);return{installable:!!e,installed:n,prompt:r}}const vn=["mousemove","mousedown","keydown","touchstart","wheel","scroll"];function Ky(e=6e4){const[t,n]=l.useState(!1);return l.useEffect(()=>{if(typeof window>"u")return;let s=setTimeout(()=>n(!0),e);function r(){n(!1),clearTimeout(s),s=setTimeout(()=>n(!0),e)}for(const a of vn)window.addEventListener(a,r,{passive:!0});return()=>{clearTimeout(s);for(const a of vn)window.removeEventListener(a,r)}},[e]),t}function Hy(e={}){const{watch:t=!1,disabled:n=!1,...s}=e,[r,a]=l.useState({loading:!n,error:null,coords:null,timestamp:null});return l.useEffect(()=>{if(n||typeof navigator>"u"||!navigator.geolocation){a(u=>({...u,loading:!1}));return}const c=u=>{a({loading:!1,error:null,coords:u.coords,timestamp:u.timestamp})},i=u=>{a(d=>({...d,loading:!1,error:u}))};if(t){const u=navigator.geolocation.watchPosition(c,i,s);return()=>navigator.geolocation.clearWatch(u)}navigator.geolocation.getCurrentPosition(c,i,s)},[n,t,s.enableHighAccuracy,s.maximumAge,s.timeout]),r}function Gy(e){l.useEffect(()=>{if(!e||typeof document>"u")return;const t=document.body,n=t.style.overflow;return t.style.overflow="hidden",()=>{t.style.overflow=n}},[e])}function Jy(e){const t=l.useRef(e);return t.current=e,l.useCallback((...n)=>t.current(...n),[])}function qt(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||typeof t!="object"||e===null||t===null||Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((r,a)=>qt(r,t[a]));const n=Object.keys(e),s=Object.keys(t);return n.length!==s.length?!1:n.every(r=>qt(e[r],t[r]))}function Qy(e){const t=l.useRef(e);return qt(t.current,e)||(t.current=e),t.current}function Yy(e){const t=l.useRef(void 0);return l.useEffect(()=>{t.current=e},[e]),t.current}function Vy(e,t){const n=l.useRef(e);n.current=e,l.useEffect(()=>{if(t===null)return;const s=setInterval(()=>n.current(),t);return()=>clearInterval(s)},[t])}function Xy(e,t){const n=l.useRef(e);n.current=e,l.useEffect(()=>{if(t===null)return;const s=setTimeout(()=>n.current(),t);return()=>clearTimeout(s)},[t])}function Zy(e,t){const[n,s]=l.useState(e),r=l.useRef(0),a=l.useRef(null);return l.useEffect(()=>{const c=Date.now(),i=c-r.current;return i>=t?(r.current=c,s(e)):(a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{r.current=Date.now(),s(e)},t-i)),()=>{a.current&&clearTimeout(a.current)}},[e,t]),n}function ev(){const[e,t]=l.useState(()=>typeof window>"u"?{width:0,height:0}:{width:window.innerWidth,height:window.innerHeight});return l.useEffect(()=>{if(typeof window>"u")return;const n=()=>t({width:window.innerWidth,height:window.innerHeight});return n(),window.addEventListener("resize",n,{passive:!0}),()=>window.removeEventListener("resize",n)},[]),e}function tv(e){const[t,n]=l.useState(!1);return l.useEffect(()=>{const s=e.current;if(!s)return;const r=()=>n(!0),a=()=>n(!1);return s.addEventListener("mouseenter",r),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",r),s.removeEventListener("mouseleave",a)}},[e]),t}function nv(e,t,n={}){const{delay:s=500,moveThreshold:r=10}=n,a=l.useRef(t);a.current=t,l.useEffect(()=>{const c=e.current;if(!c)return;let i=null,u=0,d=0;const p=()=>{i&&(clearTimeout(i),i=null)},m=h=>{u=h.clientX,d=h.clientY,p(),i=setTimeout(()=>{i=null,a.current()},s)},f=h=>{if(i===null)return;const _=h.clientX-u,b=h.clientY-d;Math.hypot(_,b)>r&&p()};return c.addEventListener("pointerdown",m),c.addEventListener("pointermove",f),c.addEventListener("pointerup",p),c.addEventListener("pointercancel",p),c.addEventListener("pointerleave",p),()=>{p(),c.removeEventListener("pointerdown",m),c.removeEventListener("pointermove",f),c.removeEventListener("pointerup",p),c.removeEventListener("pointercancel",p),c.removeEventListener("pointerleave",p)}},[e,s,r])}function sv(e=!1){const[t,n]=l.useState(e),s=l.useCallback(()=>n(!0),[]),r=l.useCallback(()=>n(!1),[]),a=l.useCallback(()=>n(i=>!i),[]),c=l.useMemo(()=>({open:s,close:r,toggle:a}),[s,r,a]);return[t,c]}function rv(e=[]){const[t,n]=l.useState(e),s=l.useCallback((...h)=>{n(_=>[..._,...h])},[]),r=l.useCallback((...h)=>{n(_=>[...h,..._])},[]),a=l.useCallback((h,..._)=>{n(b=>[...b.slice(0,h),..._,...b.slice(h)])},[]),c=l.useCallback((...h)=>{const _=new Set(h);n(b=>b.filter((v,g)=>!_.has(g)))},[]),i=l.useCallback(({from:h,to:_})=>{n(b=>{const v=[...b],[g]=v.splice(h,1);return v.splice(_,0,g),v})},[]),u=l.useCallback((h,_)=>{n(b=>b.map((v,g)=>g===h?_:v))},[]),d=l.useCallback(h=>n(h),[]),p=l.useCallback(h=>{n(_=>_.map(h))},[]),m=l.useCallback(()=>n([]),[]),f=l.useMemo(()=>({append:s,prepend:r,insert:a,remove:c,reorder:i,setItem:u,setState:d,apply:p,clear:m}),[s,r,a,c,i,u,d,p,m]);return[t,f]}const tt=(e,t,n)=>{let s=e;return typeof t=="number"&&(s=Math.max(t,s)),typeof n=="number"&&(s=Math.min(n,s)),s};function ov(e=0,t={}){const{min:n,max:s}=t,[r,a]=l.useState(()=>tt(e,n,s)),c=l.useCallback(()=>{a(m=>tt(m+1,n,s))},[n,s]),i=l.useCallback(()=>{a(m=>tt(m-1,n,s))},[n,s]),u=l.useCallback(m=>{a(tt(m,n,s))},[n,s]),d=l.useCallback(()=>{a(tt(e,n,s))},[e,n,s]),p=l.useMemo(()=>({increment:c,decrement:i,set:u,reset:d}),[c,i,u,d]);return[r,p]}function av(e){l.useEffect(()=>{if(typeof document>"u")return;const t=document.title;return document.title=e,()=>{document.title=t}},[e])}function cv(e){l.useEffect(()=>{if(typeof document>"u")return;let t=document.querySelector('link[rel="icon"]');t||(t=document.createElement("link"),t.rel="icon",document.head.appendChild(t)),t.href=e},[e])}function iv(e){const[t,n]=l.useState(()=>new Map(e)),s=l.useCallback((u,d)=>{n(p=>{const m=new Map(p);return m.set(u,d),m})},[]),r=l.useCallback(u=>{n(d=>{if(!d.has(u))return d;const p=new Map(d);return p.delete(u),p})},[]),a=l.useCallback(()=>{n(u=>u.size===0?u:new Map)},[]),c=l.useCallback(u=>t.get(u),[t]),i=l.useCallback(u=>t.has(u),[t]);return l.useMemo(()=>({map:t,set:s,delete:r,clear:a,get:c,has:i,size:t.size}),[t,s,r,a,c,i])}function lv(e){const[t,n]=l.useState(()=>new Set(e)),s=l.useCallback(u=>{n(d=>{if(d.has(u))return d;const p=new Set(d);return p.add(u),p})},[]),r=l.useCallback(u=>{n(d=>{if(!d.has(u))return d;const p=new Set(d);return p.delete(u),p})},[]),a=l.useCallback(()=>{n(u=>u.size===0?u:new Set)},[]),c=l.useCallback(u=>t.has(u),[t]),i=l.useCallback(u=>{n(d=>{const p=new Set(d);return p.has(u)?p.delete(u):p.add(u),p})},[]);return l.useMemo(()=>({set:t,add:s,delete:r,clear:a,has:c,toggle:i,size:t.size}),[t,s,r,a,c,i])}function uv(e={}){const{initialValues:t=[],limit:n=1/0}=e,[s,r]=l.useState(()=>({queue:t.slice(0,n),overflow:t.slice(n)})),a=l.useCallback((...u)=>{r(d=>{const p=[...d.queue,...d.overflow,...u];return{queue:p.slice(0,n),overflow:p.slice(n)}})},[n]),c=l.useCallback(u=>{r(d=>{const p=[...u(d.queue),...d.overflow];return{queue:p.slice(0,n),overflow:p.slice(n)}})},[n]),i=l.useCallback(()=>{r(u=>({queue:u.overflow.slice(0,n),overflow:u.overflow.slice(n)}))},[n]);return l.useMemo(()=>({queue:s.queue,add:a,update:c,cleanQueue:i,size:s.queue.length}),[s.queue,a,c,i])}function dv(e){const t=l.useRef(null),n=l.useRef(e);return n.current=e,l.useEffect(()=>{if(typeof document>"u")return;const s=r=>{const a=r.target;!t.current||a&&t.current.contains(a)||n.current()};return document.addEventListener("mousedown",s),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",s),document.removeEventListener("touchstart",s)}},[]),t}function pv(){const e=l.useRef(!0);return e.current?(e.current=!1,!0):!1}const mv="tempest_wrapper_iB6ka",fv="tempest_search_2y-yM",hv="tempest_sortButton_9p6w4",_v="tempest_sortIndicator_bZMlH",mt={wrapper:mv,search:fv,sortButton:hv,sortIndicator:_v};function gv(e,t){return e==null&&t==null?0:e==null?-1:t==null?1:typeof e=="number"&&typeof t=="number"?e-t:e instanceof Date&&t instanceof Date?e.getTime()-t.getTime():typeof e=="boolean"&&typeof t=="boolean"?Number(e)-Number(t):String(e).localeCompare(String(t),void 0,{numeric:!0})}function bv({data:e,columns:t,pageSize:n=10,searchable:s=!1,searchKeys:r,initialSort:a,rowKey:c=(p,m)=>m,emptyMessage:i,className:u,...d}){const[p,m]=l.useState(""),[f,h]=l.useState(a??null),{page:_,setPage:b}=Hn(1,n),v=l.useMemo(()=>r&&r.length>0?r:t.filter(N=>{const k=e.find(D=>D[N.key]!=null),E=k?k[N.key]:void 0;return typeof E=="string"||typeof E=="number"}).map(N=>N.key),[r,t,e]),g=l.useMemo(()=>{const N=p.trim().toLowerCase();return!N||!s?e:e.filter(k=>v.some(E=>{const D=k[E];return D!=null&&String(D).toLowerCase().includes(N)}))},[e,p,s,v]),w=l.useMemo(()=>{if(!f)return g;const N=f.direction==="asc"?1:-1;return[...g].sort((k,E)=>gv(k[f.key],E[f.key])*N)},[g,f]),y=Math.max(1,Math.ceil(w.length/n));l.useEffect(()=>{_>y&&b(y)},[_,y,b]);const j=Math.min(_,y),S=l.useMemo(()=>{const N=(j-1)*n;return w.slice(N,N+n)},[w,j,n]);function M(N){h(k=>!k||k.key!==N?{key:N,direction:"asc"}:k.direction==="asc"?{key:N,direction:"desc"}:null)}const T=l.useMemo(()=>t.map(N=>{const E=f?.key===N.key?f?.direction==="asc"?" ▲":" ▼":"",D=N.sortable?o.jsxs("button",{type:"button",className:mt.sortButton,onClick:()=>M(N.key),"aria-label":`Ordenar por ${typeof N.header=="string"?N.header:String(N.key)}`,children:[N.header,o.jsx("span",{className:mt.sortIndicator,"aria-hidden":!0,children:E})]}):N.header;return{key:String(N.key),header:D,align:N.align,priority:N.priority,width:N.width,render:N.render?$=>N.render($):$=>$[N.key]??null}}),[t,f]);return o.jsxs("div",{className:x.cn(mt.wrapper,u),...d,children:[s&&o.jsx(An,{value:p,onChange:N=>{m(N),b(1)},wrapperClassName:mt.search}),o.jsx(On,{columns:T,data:S,rowKey:(N,k)=>c(N,(j-1)*n+k),emptyMessage:i}),y>1&&o.jsx(Ln,{page:j,totalPages:y,onPageChange:b,totalItems:w.length})]})}const yv="tempest_tile_ZpED6",vv="tempest_interactive_3ICXQ",wv="tempest_selected_dMY11",xv="tempest_disabled_HnXxf",jv="tempest_leading_gSuBb",$v="tempest_trailing_cVd1n",kv="tempest_body_gyEl2",Nv="tempest_title_jWFBN",Sv="tempest_subtitle_GUtn7",je={tile:yv,interactive:vv,selected:wv,disabled:xv,leading:jv,trailing:$v,body:kv,title:Nv,subtitle:Sv};function Cv({leading:e,title:t,subtitle:n,trailing:s,onClick:r,disabled:a=!1,selected:c=!1,className:i}){const u=o.jsxs(o.Fragment,{children:[e!==void 0&&o.jsx("span",{className:je.leading,children:e}),o.jsxs("span",{className:je.body,children:[o.jsx("span",{className:je.title,children:t}),n!==void 0&&o.jsx("span",{className:je.subtitle,children:n})]}),s!==void 0&&o.jsx("span",{className:je.trailing,children:s})]}),d=x.cn(je.tile,c&&je.selected,a&&je.disabled,i);return r?o.jsx("button",{type:"button",className:x.cn(d,je.interactive),"aria-pressed":c?!0:void 0,disabled:a,onClick:r,children:u}):o.jsx("div",{className:d,children:u})}const Ev="tempest_fab_U3NIL",Tv="tempest_primary_8lnHI",Mv="tempest_surface_ZTMQ4",Rv="tempest_round_ljguw",Lv="tempest_sm_3-rLi",Dv="tempest_md_vOdzW",Iv="tempest_lg_Xc6vE",Pv="tempest_extended_GhPio",Av="tempest_icon_cZ8Nq",Fv="tempest_label_tfoCq",Ov="tempest_fixed_Xr8Xa",Bv="tempest_bottomRight_bJ8Oo",zv="tempest_bottomLeft_USN6N",de={fab:Ev,primary:Tv,surface:Mv,round:Rv,sm:Lv,md:Dv,lg:Iv,extended:Pv,icon:Av,label:Fv,fixed:Ov,bottomRight:Bv,bottomLeft:zv};function Wv({icon:e,label:t,position:n="bottom-right",size:s="md",variant:r="primary",className:a,...c}){const i=t!==void 0;return o.jsxs("button",{type:"button",className:x.cn(de.fab,de[s],de[r],i?de.extended:de.round,n!=="none"&&de.fixed,n==="bottom-right"&&de.bottomRight,n==="bottom-left"&&de.bottomLeft,a),...c,children:[o.jsx("span",{className:de.icon,children:e}),i&&o.jsx("span",{className:de.label,children:t})]})}const qv="tempest_rail_bvns5",Uv="tempest_header_Mikit",Kv="tempest_list_rS6XJ",Hv="tempest_footer_ojpGC",Gv="tempest_item_XEXI9",Jv="tempest_active_U3hSU",Qv="tempest_iconWrap_iVwlb",Yv="tempest_icon_-hpb6",Vv="tempest_badge_1YxwU",Xv="tempest_label_zCKyA",pe={rail:qv,header:Uv,list:Kv,footer:Hv,item:Gv,active:Jv,iconWrap:Qv,icon:Yv,badge:Vv,label:Xv};function Zv({items:e,value:t,onChange:n,header:s,footer:r,labelVisibility:a="all",className:c,...i}){return o.jsxs("nav",{className:x.cn(pe.rail,c),"aria-label":"Navegação lateral",...i,children:[s!==void 0&&o.jsx("div",{className:pe.header,children:s}),o.jsx("ul",{className:pe.list,children:e.map(u=>{const d=u.key===t,p=a==="all"||a==="selected"&&d;return o.jsx("li",{children:o.jsxs("button",{type:"button",className:x.cn(pe.item,d&&pe.active),"aria-current":d?"page":void 0,disabled:u.disabled,onClick:()=>n(u.key),children:[o.jsxs("span",{className:pe.iconWrap,children:[u.icon&&o.jsx("span",{className:pe.icon,children:u.icon}),u.badge!==void 0&&o.jsx("span",{className:pe.badge,children:u.badge})]}),p&&o.jsx("span",{className:pe.label,children:u.label})]})},u.key)})}),r!==void 0&&o.jsx("div",{className:pe.footer,children:r})]})}const ew="tempest_wrapper_tFKNC",tw="tempest_label_FUecv",nw="tempest_columns_XMru6",sw="tempest_column_bwotJ",rw="tempest_cellWrapper_xRos3",ow="tempest_cell_eSc7G",aw="tempest_active_6amgd",cw="tempest_helper_ihHGE",iw="tempest_disabled_NDezB",A={wrapper:ew,label:tw,columns:nw,column:sw,cellWrapper:rw,cell:ow,active:aw,helper:cw,disabled:iw};function ft(e){return e.toString().padStart(2,"0")}function lw(e){const t=/^(\d{1,2}):(\d{1,2})$/.exec(e.trim());if(!t)return{hour24:null,minute:null};const n=Number(t[1]),s=Number(t[2]);return n<0||n>23||s<0||s>59?{hour24:null,minute:null}:{hour24:n,minute:s}}function uw(e){const t=e%12;return t===0?12:t}function Lt(e,t){const n=e%12;return t==="PM"?n+12:n}function dw({value:e,onChange:t,minuteStep:n=5,use12Hours:s=!1,label:r,helperText:a,disabled:c,className:i}){const u=l.useId(),{hour24:d,minute:p}=l.useMemo(()=>lw(e),[e]),m=d!==null&&d>=12?"PM":"AM",f=l.useMemo(()=>s?Array.from({length:12},(y,j)=>j+1):Array.from({length:24},(y,j)=>j),[s]),h=l.useMemo(()=>{const y=n>0?n:1,j=[];for(let S=0;S<60;S+=y)j.push(S);return j},[n]),_=d===null?null:s?uw(d):d,b=(y,j)=>{t(`${ft(y)}:${ft(j)}`)},v=y=>{if(c)return;const j=p??0,S=s?Lt(y,m):y;b(S,j)},g=y=>{if(c)return;const j=d??(s?Lt(12,"AM"):0);b(j,y)},w=y=>{if(c)return;const j=_??12,S=p??0;b(Lt(j,y),S)};return o.jsxs("div",{className:x.cn(A.wrapper,c&&A.disabled,i),children:[r&&o.jsx("span",{id:`${u}-label`,className:A.label,children:r}),o.jsxs("div",{className:A.columns,children:[o.jsx("ul",{role:"listbox","aria-label":"Horas",className:A.column,children:f.map(y=>{const j=y===_;return o.jsx("li",{className:A.cellWrapper,children:o.jsx("button",{type:"button",role:"option","aria-selected":j,disabled:c,className:x.cn(A.cell,j&&A.active),onClick:()=>v(y),children:s?y:ft(y)})},y)})}),o.jsx("ul",{role:"listbox","aria-label":"Minutos",className:A.column,children:h.map(y=>{const j=y===p;return o.jsx("li",{className:A.cellWrapper,children:o.jsx("button",{type:"button",role:"option","aria-selected":j,disabled:c,className:x.cn(A.cell,j&&A.active),onClick:()=>g(y),children:ft(y)})},y)})}),s&&o.jsx("ul",{role:"listbox","aria-label":"Período",className:A.column,children:["AM","PM"].map(y=>{const j=_!==null&&y===m;return o.jsx("li",{className:A.cellWrapper,children:o.jsx("button",{type:"button",role:"option","aria-selected":j,disabled:c,className:x.cn(A.cell,j&&A.active),onClick:()=>w(y),children:y})},y)})})]}),a&&o.jsx("span",{className:A.helper,children:a})]})}const pw="tempest_wrapper_vGp-3",mw="tempest_indicator_S7mV0",fw="tempest_content_bZdpc",hw="tempest_dragging_BvUty",ht={wrapper:pw,indicator:mw,content:fw,dragging:hw};function _w(e,t){const n=t*1.5;return Math.min(e/2,n)}function gw({onRefresh:e,children:t,threshold:n=80,disabled:s,className:r}){const a=l.useRef(null),c=l.useRef(null),[i,u]=l.useState(0),[d,p]=l.useState(!1),m=c.current!==null,f=w=>{if(s||d)return;const y=a.current;if(!y||y.scrollTop>0)return;const j=w.touches[0];j&&(c.current=j.clientY)},h=w=>{if(s||d)return;const y=c.current;if(y===null)return;const j=w.touches[0];if(!j)return;const S=j.clientY-y;if(S<=0){u(0);return}u(_w(S,n))},_=()=>{c.current=null,u(0)},b=async()=>{if(s||d){_();return}if(!(c.current!==null&&i>=n)){_();return}c.current=null,p(!0),u(n);try{await e()}finally{p(!1),u(0)}},v=d||i>0,g=Math.min(1,i/n);return o.jsxs("div",{ref:a,className:x.cn(ht.wrapper,r),"data-refreshing":d,onTouchStart:f,onTouchMove:h,onTouchEnd:b,children:[o.jsx("div",{className:ht.indicator,"aria-hidden":!v,style:{opacity:d?1:g,transform:`translateX(-50%) translateY(${v?i:0}px) rotate(${g*360}deg)`},children:o.jsx(Fn,{size:"sm",label:"Atualizando"})}),o.jsx("div",{className:x.cn(ht.content,(m||d)&&ht.dragging),style:{transform:`translateY(${v?i:0}px)`},children:t})]})}function bw(e){return new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(e)}function yw(e){const t=typeof e=="string"?new Date(e):e;return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat("pt-BR").format(t)}function vw(e){const t=typeof e=="string"?new Date(e):e;return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat("pt-BR",{dateStyle:"short",timeStyle:"short"}).format(t)}function Gn(e){const t=e.replace(/\D/g,"").slice(0,11);return t.length<=10?t.replace(/(\d{2})(\d)/,"($1) $2").replace(/(\d{4})(\d)/,"$1-$2"):t.replace(/(\d{2})(\d)/,"($1) $2").replace(/(\d{5})(\d)/,"$1-$2")}function Jn(e){return e.replace(/\D/g,"").slice(0,11).replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})$/,"$1-$2")}function ww(e){return new Intl.NumberFormat("pt-BR",{style:"percent",minimumFractionDigits:1,maximumFractionDigits:1}).format(e)}const xw={get(e,t){if(typeof window>"u")return t;try{const n=window.localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}},set(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,JSON.stringify(t))}catch{}},remove(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(e)}catch{}}};function jw(e){return e.normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function $w(e,t,n="…"){if(e.length<=t)return e;const s=Math.max(0,t-n.length);return e.slice(0,s).trimEnd()+n}function kw(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function Nw(e){const t=e.replace(/[^a-zA-Z0-9]+/g," ").trim().split(/\s+/).filter(Boolean);return t.length===0?"":t.map((n,s)=>{const r=n.toLowerCase();return s===0?r:r.charAt(0).toUpperCase()+r.slice(1)}).join("")}function Sw(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase()}function Cw(e,t,n){return e===1?t:n??`${t}s`}function Ew(e,t){const n={};for(const s of e){const r=t(s);(n[r]??=[]).push(s)}return n}function Tw(e,t){const n=new Set,s=[];for(const r of e){const a=t(r);n.has(a)||(n.add(a),s.push(r))}return s}function Mw(e,t){if(t<1)throw new RangeError(`chunk size must be >= 1, received ${t}`);const n=[];for(let s=0;s<e.length;s+=t)n.push(e.slice(s,s+t));return n}function Rw(e,t,n=1){const s=[];if(n===0)return s;if(n>0)for(let r=e;r<t;r+=n)s.push(r);else for(let r=e;r>t;r+=n)s.push(r);return s}function nt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Lw(e,t){const n={};for(const s of t)Object.prototype.hasOwnProperty.call(e,s)&&(n[s]=e[s]);return n}function Dw(e,t){const n=new Set(t),s={};for(const r of Object.keys(e))n.has(r)||(s[r]=e[r]);return s}function Qn(e,t){if(!nt(e)||!nt(t))return t===void 0?e:t;const n={...e};for(const s of Object.keys(t)){const r=t[s],a=n[s];nt(a)&&nt(r)?n[s]=Qn(a,r):n[s]=r}return n}function Iw(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:e instanceof Map||e instanceof Set?e.size===0:nt(e)?Object.keys(e).length===0:!1}function Pw(e){return e!=null}function Aw(e){return typeof e=="string"}function Fw(e){return typeof e=="number"&&!Number.isNaN(e)}function Ow(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Bw(e,t){throw new Error(t??`Unexpected value: ${String(e)}`)}function zw(e,t){let n;const s=(...r)=>{n!==void 0&&clearTimeout(n),n=setTimeout(()=>{n=void 0,e(...r)},t)};return s.cancel=()=>{n!==void 0&&(clearTimeout(n),n=void 0)},s}function Ww(e,t){let n,s,r=0;const a=i=>{r=Date.now(),e(...i)},c=(...i)=>{const u=Date.now(),d=t-(u-r);d<=0?(n!==void 0&&(clearTimeout(n),n=void 0),a(i)):(s=i,n===void 0&&(n=setTimeout(()=>{if(n=void 0,s!==void 0){const p=s;s=void 0,a(p)}},d)))};return c.cancel=()=>{n!==void 0&&(clearTimeout(n),n=void 0),s=void 0,r=0},c}function qw(e){let t=!1,n;return(...s)=>(t||(t=!0,n=e(...s)),n)}function Uw(e){let t=!1,n,s;const r=a=>{if(!t||a.length!==n.length)return!1;for(let c=0;c<a.length;c++)if(!Object.is(a[c],n[c]))return!1;return!0};return(...a)=>(r(a)||(n=a,s=e(...a),t=!0),s)}function Kw(e){return new Promise(t=>setTimeout(t,e))}function Hw(e,t,n){return new Promise((s,r)=>{const a=setTimeout(()=>{const c=new Error(n??`Operation timed out after ${t}ms`);c.name="TimeoutError",r(c)},t);e.then(c=>{clearTimeout(a),s(c)},c=>{clearTimeout(a),r(c)})})}function Ht(e){let t;if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")t=crypto.randomUUID();else{const n=Date.now().toString(36),s=Math.random().toString(36).slice(2,10);t=`${n}-${s}`}return e?`${e}-${t}`:t}class xt extends Error{status;detail;code;requestId;body;constructor(t){super(t.detail),this.name="TempestApiError",this.status=t.status,this.detail=t.detail,this.code=t.code,this.requestId=t.requestId,this.body=t.body}}function Gw(e){return typeof e=="object"&&e!==null&&typeof e.status=="number"&&typeof e.detail=="string"}function Gt(e,t,n,s){const r=typeof t=="object"&&t!==null?t:null,a=r?.detail??r?.message??`Erro ${e}`,c=typeof r?.code=="string"?r.code:void 0,i=typeof r?.details=="object"&&r.details!==null?r.details:null,u=(typeof i?.request_id=="string"?i.request_id:void 0)??n?.get("X-Request-ID")??s??void 0;return{status:e,detail:String(a),code:c,requestId:u??void 0,retryAfter:Jw(n?.get("Retry-After")),body:t}}function Jw(e){if(!e)return;const t=e.trim();if(/^\d+$/.test(t))return Number(t);const n=Date.parse(t);if(!Number.isNaN(n))return Math.max(0,Math.round((n-Date.now())/1e3))}function Qw(e,t,n){const s=new URL(t,e.endsWith("/")?e:`${e}/`);if(n)for(const[r,a]of Object.entries(n))a!=null&&s.searchParams.set(r,String(a));return s.toString()}function Yw(e){return typeof FormData<"u"&&e instanceof FormData}async function wn(e,t){let n=null;try{n=await e.clone().json()}catch{try{n=await e.text()}catch{n=null}}return new xt(Gt(e.status,n,e.headers,t))}function gt(e){const t=e.fetcher??globalThis.fetch.bind(globalThis);function n(){const c=e.getToken?.();return c?{Authorization:`Bearer ${c}`}:{}}async function s(c,i,u){const{body:d,params:p,headers:m,...f}=i,h=Yw(d),_={...h?{}:{"Content-Type":"application/json"},...u?{"X-Request-ID":u}:{},...e.headers,...n(),...m},b={...f,headers:_,credentials:e.withCredentials?"include":f.credentials,body:d==null?void 0:h?d:JSON.stringify(d)};return t(Qw(e.baseURL,c,p),b)}async function r(c,i={}){const u=e.requestId?e.requestId():Ht();let d=await s(c,i,u);if(d.status===401)if(e.refresh)try{await e.refresh(),d=await s(c,i,u)}catch{throw await e.onUnauthorized?.(d),await wn(d,u)}else await e.onUnauthorized?.(d);if(!d.ok)throw await wn(d,u);return d.status===204?void 0:(d.headers.get("content-type")??"").includes("application/json")?await d.json():await d.text()}async function a(c,i,u="POST"){return r(c,{method:u,body:i})}return{request:r,get:(c,i)=>r(c,{...i,method:"GET"}),post:(c,i)=>r(c,{...i,method:"POST"}),put:(c,i)=>r(c,{...i,method:"PUT"}),patch:(c,i)=>r(c,{...i,method:"PATCH"}),delete:(c,i)=>r(c,{...i,method:"DELETE"}),upload:a}}function Vw(e,t,n){const s=e.safeParse(t);if(s.success)return s.data;if(typeof process<"u"&&(process.env?.NODE_ENV==="development"||process.env?.NODE_ENV==="test")){const a=s.error.issues.map(c=>` - ${c.path.join(".")||"<root>"}: ${c.message}`).join(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./sw.cjs"),o=require("react/jsx-runtime"),l=require("react"),w=require("./cn-CNScIEB4.cjs"),Fn=require("lucide-react"),G=require("@tanstack/react-query"),D=require("react-router-dom"),Ve=require("react-dom"),fe=require("react-hook-form"),qt=require("zustand"),kt=require("zustand/middleware"),Zs=require("dexie"),er="tempest_accordion_LVhhv",tr="tempest_item_7ryVk",nr="tempest_header_WaTdJ",sr="tempest_trigger_9BYFY",rr="tempest_chevron_i-HVZ",or="tempest_open_98jLY",ar="tempest_panel_Wx50w",Me={accordion:er,item:tr,header:nr,trigger:sr,chevron:rr,open:or,panel:ar};function cr({items:e,multiple:t=!1,value:n,defaultValue:s=[],onChange:r,className:a}){const c=l.useId(),i=n!==void 0,[u,d]=l.useState(s),p=i?n:u,m=l.useCallback(f=>{const h=p.includes(f),_=t?h?p.filter(b=>b!==f):[...p,f]:h?[]:[f];i||d(_),r?.(_)},[p,t,i,r]);return o.jsx("div",{className:w.cn(Me.accordion,a),children:e.map(f=>{const h=p.includes(f.id),_=`${c}-${f.id}-panel`,b=`${c}-${f.id}-trigger`;return o.jsxs("div",{className:w.cn(Me.item,h&&Me.open),children:[o.jsx("h3",{className:Me.header,children:o.jsxs("button",{type:"button",id:b,className:Me.trigger,"aria-expanded":h,"aria-controls":_,disabled:f.disabled,onClick:()=>m(f.id),children:[o.jsx("span",{children:f.title}),o.jsx(ir,{className:Me.chevron})]})}),h&&o.jsx("div",{id:_,role:"region","aria-labelledby":b,className:Me.panel,children:f.children})]},f.id)})})}function ir({className:e}){return o.jsx("svg",{className:e,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:o.jsx("path",{d:"M6 9l6 6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}const lr="tempest_alert_7cYyI",ur="tempest_content_UXnmZ",dr="tempest_title_abGgF",pr="tempest_description_pXPvw",mr="tempest_icon_Zg6SB",fr="tempest_close_narep",hr="tempest_neutral_J7MH1",_r="tempest_solid_s-oW5",gr="tempest_outline_v7w9b",br="tempest_info_9r3r1",yr="tempest_success_1bzoB",vr="tempest_warning_q-j1Q",xr="tempest_danger_CiZkW",_e={alert:lr,content:ur,title:dr,description:pr,icon:mr,close:fr,neutral:hr,solid:_r,outline:gr,info:br,success:yr,warning:vr,danger:xr};function wr({variant:e="info",appearance:t="soft",title:n,description:s,icon:r,onClose:a,closeLabel:c="Dismiss",className:i,children:u,...d}){return o.jsxs("div",{role:"alert",className:w.cn(_e.alert,_e[e],t==="solid"&&_e.solid,t==="outline"&&_e.outline,i),...d,children:[r&&o.jsx("span",{className:_e.icon,children:r}),o.jsxs("div",{className:_e.content,children:[n&&o.jsx("p",{className:_e.title,children:n}),s&&o.jsx("p",{className:_e.description,children:s}),u]}),a&&o.jsx("button",{type:"button",className:_e.close,onClick:a,"aria-label":c,children:o.jsx(jr,{})})]})}function jr(){return o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:o.jsx("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const $r="tempest_bar_SHqWS",kr="tempest_centered_S0CCw",Nr="tempest_surface_fusKb",Sr="tempest_primary_QcCyN",Cr="tempest_transparent_uGrsu",Er="tempest_bordered_5M9FZ",Tr="tempest_sticky_DStUO",Mr="tempest_safeArea_Vo3Bi",Lr="tempest_leading_mXv-d",Rr="tempest_actions_x7tMx",Pr="tempest_title_qaMMQ",Dr="tempest_brand_xKt54",Ir="tempest_iconBtn_S-BTg",te={bar:$r,centered:kr,surface:Nr,primary:Sr,transparent:Cr,bordered:Er,sticky:Tr,safeArea:Mr,leading:Lr,actions:Rr,title:Pr,brand:Dr,iconBtn:Ir};function Ar({title:e,leading:t,showBack:n=!1,onBack:s,backLabel:r="Go back",backIcon:a,brand:c,actions:i,centered:u=!1,sticky:d=!0,tone:p="surface",bordered:m=!0,safeArea:f=!0,className:h,..._}){const b=s??(()=>window.history.back()),v=t??o.jsxs(o.Fragment,{children:[n&&o.jsx("button",{type:"button",className:te.iconBtn,onClick:b,"aria-label":r,children:a??o.jsx(Fn.ArrowLeft,{size:22,"aria-hidden":"true"})}),c&&o.jsx("span",{className:te.brand,children:c})]});return o.jsxs("header",{className:w.cn(te.bar,te[p],u&&te.centered,d&&te.sticky,m&&te.bordered,f&&te.safeArea,h),..._,children:[o.jsx("div",{className:te.leading,children:v}),e!=null&&e!==""&&o.jsx("h1",{className:te.title,"aria-live":"polite",children:e}),o.jsx("div",{className:te.actions,children:i})]})}const Nt={xs:480,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},Fr=["xs","sm","md","lg","xl","2xl"];function Or(e){let t="xs";for(const n of Fr)e>=Nt[n]&&(t=n);return t}function We(){const[e,t]=l.useState(()=>typeof window>"u"?0:window.innerWidth);l.useEffect(()=>{if(typeof window>"u")return;const a=()=>t(window.innerWidth);return a(),window.addEventListener("resize",a,{passive:!0}),()=>window.removeEventListener("resize",a)},[]);const n=Or(e),s=a=>e>=Nt[a],r=a=>e<Nt[a];return{current:n,width:e,above:s,below:r,isMobile:r("md"),isTablet:s("md")&&r("lg"),isDesktop:s("lg")}}const Br="tempest_shell_-xp0O",zr="tempest_navbar_liTKV",Wr="tempest_row_PE41P",qr="tempest_sidebar_wyx-V",Ur="tempest_main_O3GFv",Kr="tempest_footer_IFW4q",Hr="tempest_bottomNav_pKJ1v",Le={shell:Br,navbar:zr,row:Wr,sidebar:qr,main:Ur,footer:Kr,bottomNav:Hr};function Gr({navbar:e,sidebar:t,bottomNav:n,footer:s,sidebarBreakpoint:r="md",className:a,children:c,...i}){const d=We().above(r);return o.jsxs("div",{className:w.cn(Le.shell,a),...i,children:[e&&o.jsx("div",{className:Le.navbar,children:e}),o.jsxs("div",{className:Le.row,children:[t&&d&&o.jsx("div",{className:Le.sidebar,children:t}),o.jsx("main",{className:Le.main,children:c})]}),s&&o.jsx("div",{className:Le.footer,children:s}),n&&!d&&o.jsx("div",{className:Le.bottomNav,children:n})]})}const Qr="tempest_aspect_GnAJt",Jr={aspect:Qr};function Yr({ratio:e=16/9,className:t,style:n,children:s,...r}){const a={aspectRatio:String(e),...n};return o.jsx("div",{className:w.cn(Jr.aspect,t),style:a,...r,children:s})}const Xr="tempest_avatar_3xMuZ",Vr="tempest_image_ieqGp",Zr="tempest_xs_oSaLL",eo="tempest_sm_sZ2bk",to="tempest_md_Fdkbz",no="tempest_lg_pTTUA",so="tempest_xl_mW58F",ro="tempest_status_ISBnL",oo="tempest_dot_Wgfo-",ao="tempest_online_-aWoW",co="tempest_offline_-StX3",io="tempest_busy_TbwuF",qe={avatar:Xr,image:Vr,xs:Zr,sm:eo,md:to,lg:no,xl:so,status:ro,dot:oo,online:ao,offline:co,busy:io};function lo(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":t.length===1?t[0].slice(0,2):`${t[0].charAt(0)}${t[t.length-1].charAt(0)}`}function uo({src:e,alt:t,name:n="",size:s="md",status:r,className:a,onClick:c}){const[i,u]=l.useState(!1),d=l.useMemo(()=>lo(n),[n]),p=e&&!i,m=c?"button":void 0,f=c?0:void 0;return o.jsxs("span",{className:w.cn(qe.avatar,qe[s],r&&qe.status,a),role:m,tabIndex:f,onClick:c,onKeyDown:c?h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),c())}:void 0,children:[p?o.jsx("img",{src:e,alt:t??n,className:qe.image,onError:()=>u(!0)}):o.jsx("span",{"aria-label":t??n,children:d}),r&&o.jsx("span",{className:w.cn(qe.dot,qe[r]),"aria-hidden":!0})]})}const po="tempest_badge_RsuMz",mo="tempest_sm_LYsCn",fo="tempest_md_4Or8q",ho="tempest_lg_Bseje",_o="tempest_square_l63D-",go="tempest_neutral_lulSm",bo="tempest_solid_0Leug",yo="tempest_outline_x06HL",vo="tempest_success_u9JiS",xo="tempest_warning_nsGp-",wo="tempest_danger_PD2hz",jo="tempest_info_na6DQ",$o="tempest_primary_S0WCS",ko="tempest_dot_i0c-G",Re={badge:po,sm:mo,md:fo,lg:ho,square:_o,neutral:go,solid:bo,outline:yo,success:vo,warning:xo,danger:wo,info:jo,primary:$o,dot:ko};function No({variant:e="neutral",appearance:t="soft",size:n="md",shape:s="pill",dot:r=!1,className:a,children:c,...i}){return o.jsxs("span",{className:w.cn(Re.badge,Re[e],t==="solid"&&Re.solid,t==="outline"&&Re.outline,Re[n],s==="square"&&Re.square,a),...i,children:[r&&o.jsx("span",{className:Re.dot,"aria-hidden":!0}),c]})}const So="tempest_banner_oyoWE",Co="tempest_info_s2q0P",Eo="tempest_success_uLYQ3",To="tempest_warning_9rua8",Mo="tempest_danger_Uzb-6",Lo="tempest_icon_vzKmx",Ro="tempest_body_-Qm4K",Po="tempest_title_AeTHT",Do="tempest_description_nbyf-",Io="tempest_action_47P8e",Ao="tempest_close_Iy2oN",Ne={banner:So,info:Co,success:Eo,warning:To,danger:Mo,icon:Lo,body:Ro,title:Po,description:Do,action:Io,close:Ao};function Fo({variant:e="info",icon:t,title:n,action:s,dismissible:r=!1,onDismiss:a,className:c,children:i,...u}){const[d,p]=l.useState(!0);return d?o.jsxs("div",{className:w.cn(Ne.banner,Ne[e],c),role:"status",...u,children:[t&&o.jsx("span",{className:Ne.icon,children:t}),o.jsxs("div",{className:Ne.body,children:[n&&o.jsx("p",{className:Ne.title,children:n}),i&&o.jsx("p",{className:Ne.description,children:i})]}),s&&o.jsx("div",{className:Ne.action,children:s}),r&&o.jsx("button",{type:"button",className:Ne.close,"aria-label":"Fechar",onClick:()=>{p(!1),a?.()},children:"×"})]}):null}const Oo="tempest_bar_kp35Q",Bo="tempest_item_XfDIW",zo="tempest_active_sK54f",Wo="tempest_iconWrap_yJ20b",qo="tempest_icon_TAjtI",Uo="tempest_badge_-c3Do",Ko="tempest_label_qJj3L",Pe={bar:Oo,item:Bo,active:zo,iconWrap:Wo,icon:qo,badge:Uo,label:Ko};function Ho({items:e,value:t,onChange:n,showLabels:s=!0,className:r,...a}){return o.jsx("nav",{className:w.cn(Pe.bar,r),"aria-label":"Navegação principal",...a,children:e.map(c=>{const i=c.key===t;return o.jsxs("button",{type:"button",className:w.cn(Pe.item,i&&Pe.active),"aria-current":i?"page":void 0,disabled:c.disabled,onClick:()=>n(c.key),children:[o.jsxs("span",{className:Pe.iconWrap,children:[c.icon&&o.jsx("span",{className:Pe.icon,children:c.icon}),c.badge!==void 0&&o.jsx("span",{className:Pe.badge,children:c.badge})]}),s&&o.jsx("span",{className:Pe.label,children:c.label})]},c.key)})})}const Go="tempest_root_qXce2",Qo="tempest_backdrop_WLqh0",Jo="tempest_sheet_Okz1P",Yo="tempest_handle_GWCoK",Xo="tempest_handleBar_XPPiI",Vo="tempest_title_i5Vuc",Zo="tempest_body_bgDhJ",De={root:Go,backdrop:Qo,sheet:Jo,handle:Yo,handleBar:Xo,title:Vo,body:Zo};function ea({open:e,onClose:t,title:n,showHandle:s=!0,dismissOnBackdrop:r=!0,dismissOnEsc:a=!0,className:c,children:i,...u}){return l.useEffect(()=>{if(!e||!a)return;const d=p=>{p.key==="Escape"&&t()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[e,a,t]),l.useEffect(()=>{if(!e)return;const d=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=d}},[e]),!e||typeof document>"u"?null:Ve.createPortal(o.jsxs("div",{className:De.root,role:"dialog","aria-modal":"true",children:[o.jsx("div",{className:De.backdrop,onClick:()=>r&&t(),"aria-hidden":"true"}),o.jsxs("div",{className:w.cn(De.sheet,c),...u,children:[s&&o.jsx("button",{type:"button",className:De.handle,"aria-label":"Arrastar para fechar",onClick:t,children:o.jsx("span",{className:De.handleBar})}),n&&o.jsx("div",{className:De.title,children:n}),o.jsx("div",{className:De.body,children:i})]})]}),document.body)}const ta="tempest_nav_H4g6P",na="tempest_item_O4g3P",sa="tempest_link_7WM67",ra="tempest_current_JdlcS",oa="tempest_separator_zGWyJ",et={nav:ta,item:na,link:sa,current:ra,separator:oa};function aa({items:e,separator:t="/",className:n}){return o.jsx("nav",{"aria-label":"breadcrumb",className:w.cn(et.nav,n),children:e.map((s,r)=>{const a=r===e.length-1,c=!a&&(s.href||s.onClick);return o.jsxs(l.Fragment,{children:[o.jsx("span",{className:et.item,children:c?o.jsx("a",{href:s.href,onClick:i=>{s.onClick&&(i.preventDefault(),s.onClick())},className:et.link,children:s.label}):o.jsx("span",{"aria-current":a?"page":void 0,className:a?et.current:void 0,children:s.label})}),!a&&o.jsx("span",{className:et.separator,"aria-hidden":!0,children:t})]},r)})})}const ca="tempest_button_2ZuB7",ia="tempest_primary_s1sM6",la="tempest_secondary_R0waJ",ua="tempest_danger_V4fX8",da="tempest_success_w6qB6",pa="tempest_ghost_1KINV",ma="tempest_soft_c3kzm",fa="tempest_outline_F5jq-",ha="tempest_link_Zt5hw",_a="tempest_xs_cF6m0",ga="tempest_sm_NhG0g",ba="tempest_md_hH4h3",ya="tempest_lg_2plQf",va="tempest_xl_nx4V0",xa="tempest_iconOnly_WCpTS",wa="tempest_pill_lx8lt",ja="tempest_fullWidth_36oJT",$a="tempest_loading_EQAt2",ka="tempest_hiddenText_hIiJ2",Na="tempest_spinner_ZExvW",Sa="tempest_tempest-spin_UOSVC",ge={button:ca,primary:ia,secondary:la,danger:ua,success:da,ghost:pa,soft:ma,outline:fa,link:ha,xs:_a,sm:ga,md:ba,lg:ya,xl:va,iconOnly:xa,pill:wa,fullWidth:ja,loading:$a,hiddenText:ka,spinner:Na,tempestSpin:Sa};function Xe({variant:e="primary",size:t="md",loading:n=!1,fullWidth:s=!1,iconOnly:r=!1,pill:a=!1,leftIcon:c,rightIcon:i,disabled:u,className:d,children:p,...m}){return o.jsxs("button",{className:w.cn(ge.button,ge[e],ge[t],r&&ge.iconOnly,a&&ge.pill,n&&ge.loading,s&&ge.fullWidth,d),disabled:u||n,...m,children:[n&&o.jsx("span",{className:ge.spinner,"aria-hidden":!0,children:o.jsx(Ca,{})}),o.jsxs("span",{className:w.cn(n&&ge.hiddenText),children:[c,p,i]})]})}function Ca(){return o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const Ea="tempest_card_Cb1o4",Ta="tempest_flat_LRpce",Ma="tempest_raised_WmIqk",La="tempest_elevated_5VEDw",Ra="tempest_interactive_B8Tah",Pa="tempest_padded_oOxwN",Da="tempest_flush_aiDZi",Ia="tempest_header_PTXf2",Aa="tempest_title_mSgoo",Fa="tempest_body_W441Z",Oa="tempest_footer_Mu-JC",ne={card:Ea,flat:Ta,raised:Ma,elevated:La,interactive:Ra,padded:Pa,flush:Da,header:Ia,title:Aa,body:Fa,footer:Oa};function Ba({title:e,actions:t,footer:n,flush:s=!1,interactive:r=!1,elevation:a="default",className:c,children:i,...u}){const d=!!(e||t);return o.jsxs("div",{className:w.cn(ne.card,a==="flat"&&ne.flat,a==="raised"&&ne.raised,a==="elevated"&&ne.elevated,r&&ne.interactive,!d&&!s&&ne.padded,s&&ne.flush,c),tabIndex:r?u.tabIndex??0:u.tabIndex,...u,children:[d&&o.jsxs("header",{className:ne.header,children:[typeof e=="string"?o.jsx("h3",{className:ne.title,children:e}):e,t]}),d?o.jsx("div",{className:ne.body,children:i}):i,n&&o.jsx("footer",{className:ne.footer,children:n})]})}const za="tempest_center_Pu1Pf",Wa="tempest_both_53GWn",qa="tempest_horizontal_94-Bt",Ua="tempest_vertical_Q7Kyg",cn={center:za,both:Wa,horizontal:qa,vertical:Ua};function Ka({axis:e="both",minHeight:t,fullWidth:n=!0,className:s,style:r,children:a,...c}){const i={...t!==void 0?{minHeight:typeof t=="number"?`${t}px`:t}:null,...n?{width:"100%"}:null,...r};return o.jsx("div",{className:w.cn(cn.center,cn[e],s),style:i,...c,children:a})}const Ha="tempest_wrapper_rpthW",Ga="tempest_disabled_x7-eg",Qa="tempest_input_2kt-h",Ja="tempest_box_OCPee",Ya="tempest_labelWrap_Ktbp0",Xa="tempest_label_cwRtI",Va="tempest_description_rMhG1",Ie={wrapper:Ha,disabled:Ga,input:Qa,box:Ja,labelWrap:Ya,label:Xa,description:Va},Za=l.forwardRef(function({label:t,description:n,indeterminate:s,disabled:r,wrapperClassName:a,className:c,...i},u){const d=l.useRef(null);l.useEffect(()=>{d.current&&(d.current.indeterminate=!!s)},[s]);function p(m){d.current=m,typeof u=="function"?u(m):u&&(u.current=m)}return o.jsxs("label",{className:w.cn(Ie.wrapper,r&&Ie.disabled,a),children:[o.jsx("input",{ref:p,type:"checkbox",disabled:r,className:w.cn(Ie.input,c),...i}),o.jsx("span",{className:Ie.box,"aria-hidden":!0,children:s?o.jsx(tc,{}):o.jsx(ec,{})}),(t||n)&&o.jsxs("span",{className:Ie.labelWrap,children:[t&&o.jsx("span",{className:Ie.label,children:t}),n&&o.jsx("span",{className:Ie.description,children:n})]})]})});function ec(){return o.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M5 12l5 5L20 7",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})})}function tc(){return o.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M5 12h14",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})})}const nc="tempest_wrapper_KR4-F",sc="tempest_label_Mz-wX",rc="tempest_field_iIBJw",oc="tempest_error_O9n-9",ac="tempest_chip_GEwrc",cc="tempest_remove_JYDIq",ic="tempest_input_frJmk",lc="tempest_helper_Yts53",uc="tempest_errorText_llJGq",be={wrapper:nc,label:sc,field:rc,error:oc,chip:ac,remove:cc,input:ic,helper:lc,errorText:uc};function dc({value:e,onChange:t,label:n,placeholder:s="Adicionar e pressionar Enter…",helperText:r,error:a,commitKeys:c=["Enter",",","Tab"],normalize:i=!0,className:u}){const[d,p]=l.useState(""),m=l.useRef(null);function f(){const b=i?d.trim().toLowerCase():d.trim();if(b){if(e.includes(b)){p("");return}t([...e,b]),p("")}}function h(b){if(c.includes(b.key)){b.preventDefault(),f();return}b.key==="Backspace"&&!d&&e.length>0&&t(e.slice(0,-1))}function _(b){const v=e.slice();v.splice(b,1),t(v)}return o.jsxs("div",{className:w.cn(be.wrapper,a&&be.error,u),children:[n&&o.jsx("label",{className:be.label,children:n}),o.jsxs("div",{className:be.field,onClick:()=>m.current?.focus(),children:[e.map((b,v)=>o.jsxs("span",{className:be.chip,children:[b,o.jsx("button",{type:"button",className:be.remove,"aria-label":`Remover ${b}`,onClick:()=>_(v),children:"×"})]},`${b}-${v}`)),o.jsx("input",{ref:m,className:be.input,value:d,placeholder:e.length===0?s:"",onChange:b=>p(b.target.value),onKeyDown:h,onBlur:f})]}),a?o.jsx("span",{className:be.errorText,children:a}):r?o.jsx("span",{className:be.helper,children:r}):null]})}const pc="tempest_wrapper_TNvle",mc="tempest_label_KVkZO",fc="tempest_field_BenH0",hc="tempest_input_-HTv1",_c="tempest_caret_jRplQ",gc="tempest_menu_zPQG3",bc="tempest_option_vhhn5",yc="tempest_active_XCgtX",vc="tempest_selected_T6nm2",xc="tempest_empty_Ahw5K",wc="tempest_helper_OzB7V",jc="tempest_errorText_X18sQ",$c="tempest_error_bnVuM",U={wrapper:pc,label:mc,field:fc,input:hc,caret:_c,menu:gc,option:bc,active:yc,selected:vc,empty:xc,helper:wc,errorText:jc,error:$c};function kc(e,t){return t?e.label.toLowerCase().includes(t.toLowerCase()):!0}function Nc({options:e,value:t,onChange:n,label:s,placeholder:r="Selecione",helperText:a,error:c,disabled:i,filter:u=kc,emptyMessage:d="Nenhuma opção encontrada",className:p}){const m=l.useId(),f=l.useRef(null),h=l.useRef(null),[_,b]=l.useState(!1),[v,g]=l.useState(""),[x,y]=l.useState(0),j=l.useMemo(()=>e.find(k=>k.value===t)?.label??"",[e,t]),S=l.useMemo(()=>e.filter(k=>u(k,v)),[e,u,v]),M=l.useCallback(()=>{b(!1),g(""),y(0)},[]),T=l.useCallback(k=>{k.disabled||(n(k.value),M())},[n,M]);l.useEffect(()=>{if(!_)return;const k=E=>{f.current&&!f.current.contains(E.target)&&M()};return window.addEventListener("mousedown",k),()=>window.removeEventListener("mousedown",k)},[_,M]);const N=k=>{if(k.key==="ArrowDown")k.preventDefault(),b(!0),y(E=>Math.min(S.length-1,E+1));else if(k.key==="ArrowUp")k.preventDefault(),y(E=>Math.max(0,E-1));else if(k.key==="Enter"){k.preventDefault();const E=S[x];E&&T(E)}else k.key==="Escape"&&M()};return o.jsxs("div",{ref:f,className:w.cn(U.wrapper,c&&U.error,p),children:[s&&o.jsx("label",{htmlFor:m,className:U.label,children:s}),o.jsxs("div",{className:U.field,children:[o.jsx("input",{id:m,ref:h,type:"text",role:"combobox","aria-expanded":_,"aria-controls":`${m}-listbox`,"aria-autocomplete":"list",className:U.input,placeholder:r,disabled:i,value:_?v:j,onFocus:()=>b(!0),onChange:k=>{g(k.target.value),b(!0),y(0)},onKeyDown:N}),o.jsx("span",{className:U.caret,"aria-hidden":!0,children:"▾"})]}),_&&o.jsx("ul",{id:`${m}-listbox`,role:"listbox",className:U.menu,children:S.length===0?o.jsx("li",{className:U.empty,children:d}):S.map((k,E)=>o.jsx("li",{role:"option","aria-selected":k.value===t,className:w.cn(U.option,E===x&&U.active,k.value===t&&U.selected),onMouseEnter:()=>y(E),onMouseDown:P=>{P.preventDefault(),T(k)},children:k.label},k.value))}),c?o.jsx("span",{className:U.errorText,children:c}):a?o.jsx("span",{className:U.helper,children:a}):null]})}const Sc="tempest_overlay_dd9h1",Cc="tempest_tempest-fade-in_DvgSp",Ec="tempest_dialog_ptM-K",Tc="tempest_tempest-modal-in_UoxQC",Mc="tempest_sm_K5k3W",Lc="tempest_md_gvyR7",Rc="tempest_lg_BgB1a",Pc="tempest_xl_MR-68",Dc="tempest_size2xl_-PH9e",Ic="tempest_size3xl_iqDwN",Ac="tempest_fullscreen_o84Xi",Fc="tempest_fullscreenOnMobile_0bDwe",Oc="tempest_body_lVhql",Bc="tempest_header_ILG9i",zc="tempest_footer_rro2w",Wc="tempest_title_A5OeE",qc="tempest_close_-ER1C",V={overlay:Sc,tempestFadeIn:Cc,dialog:Ec,tempestModalIn:Tc,sm:Mc,md:Lc,lg:Rc,xl:Pc,size2Xl:Dc,size3Xl:Ic,fullscreen:Ac,fullscreenOnMobile:Fc,body:Oc,header:Bc,footer:zc,title:Wc,close:qc};function Vt({open:e,onClose:t,title:n,children:s,footer:r,size:a="md",closeOnBackdrop:c=!0,closeOnEsc:i=!0,className:u,hideCloseButton:d=!1,fullscreen:p=!1,fullscreenOnMobile:m=!1}){return l.useEffect(()=>{if(!e)return;const f=document.body.style.overflow;document.body.style.overflow="hidden";const h=_=>{i&&_.key==="Escape"&&t()};return window.addEventListener("keydown",h),()=>{document.body.style.overflow=f,window.removeEventListener("keydown",h)}},[e,i,t]),!e||typeof document>"u"?null:Ve.createPortal(o.jsx("div",{className:V.overlay,role:"presentation",onClick:()=>{c&&t()},children:o.jsxs("div",{role:"dialog","aria-modal":"true",className:w.cn(V.dialog,Uc(a),p&&V.fullscreen,m&&V.fullscreenOnMobile,u),onClick:f=>f.stopPropagation(),children:[(n||!d)&&o.jsxs("header",{className:V.header,children:[o.jsx("h3",{className:V.title,children:n}),!d&&o.jsx("button",{type:"button",className:V.close,"aria-label":"Fechar",onClick:t,children:o.jsx(Kc,{})})]}),o.jsx("div",{className:V.body,children:s}),r&&o.jsx("footer",{className:V.footer,children:r})]})}),document.body)}function Uc(e){return e==="2xl"?V.size2xl:e==="3xl"?V.size3xl:V[e]}function Kc(){return o.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 6l12 12M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}function On({open:e,title:t,description:n,confirmLabel:s="Confirmar",cancelLabel:r="Cancelar",variant:a="primary",loading:c=!1,onConfirm:i,onCancel:u}){return o.jsx(Vt,{open:e,onClose:u,title:t,size:"sm",footer:o.jsxs(o.Fragment,{children:[o.jsx(Xe,{variant:"secondary",onClick:u,disabled:c,children:r}),o.jsx(Xe,{variant:a,loading:c,onClick:()=>{i()},children:s})]}),children:n})}const Hc="tempest_wrapper_iHNUs",Gc="tempest_label_-OEBL",Qc="tempest_required_CTss-",Jc="tempest_field_65yGJ",Yc="tempest_input_WjT81",Xc="tempest_sizeSm_cgds6",Vc="tempest_sizeMd_EPFGy",Zc="tempest_sizeLg_5Cq8k",ei="tempest_hasLeftIcon_xYO-v",ti="tempest_hasRightIcon_C7uyr",ni="tempest_iconLeft_KrUhI",si="tempest_iconRight_Ssr47",ri="tempest_error_VLISa",oi="tempest_helper_7Vc-s",ai="tempest_errorText_xz4xS",z={wrapper:Hc,label:Gc,required:Qc,field:Jc,input:Yc,sizeSm:Xc,sizeMd:Vc,sizeLg:Zc,hasLeftIcon:ei,hasRightIcon:ti,iconLeft:ni,iconRight:si,error:ri,helper:oi,errorText:ai},Et=l.forwardRef(function({label:t,helperText:n,error:s,leftIcon:r,rightIcon:a,wrapperClassName:c,className:i,id:u,required:d,size:p="md",...m},f){const h=l.useId(),_=u??h,b=s?`${_}-error`:n?`${_}-helper`:void 0,v=p==="sm"?z.sizeSm:p==="lg"?z.sizeLg:z.sizeMd;return o.jsxs("div",{className:w.cn(z.wrapper,s&&z.error,c),children:[t&&o.jsxs("label",{htmlFor:_,className:z.label,children:[t,d&&o.jsx("span",{className:z.required,children:"*"})]}),o.jsxs("div",{className:z.field,children:[r&&o.jsx("span",{className:z.iconLeft,children:r}),o.jsx("input",{ref:f,id:_,"aria-invalid":!!s,"aria-describedby":b,required:d,className:w.cn(z.input,v,r&&z.hasLeftIcon,a&&z.hasRightIcon,i),...m}),a&&o.jsx("span",{className:z.iconRight,children:a})]}),s?o.jsx("span",{id:`${_}-error`,className:z.errorText,children:s}):n?o.jsx("span",{id:`${_}-helper`,className:z.helper,children:n}):null]})}),ci=l.forwardRef(function({value:t,onChange:n,mode:s="date",...r},a){return o.jsx(Et,{...r,ref:a,type:s,value:t,onChange:c=>n(c.target.value)})}),ii="tempest_divider_KSGsi",li="tempest_horizontal_pZ05Y",ui="tempest_bare_elDbS",di="tempest_vertical_p-jD4",pi="tempest_dashed_JWxCU",mi="tempest_alignStart_QAIi1",fi="tempest_alignEnd_eZDwa",Q={divider:ii,horizontal:li,bare:ui,vertical:di,dashed:pi,alignStart:mi,alignEnd:fi};function hi({orientation:e="horizontal",variant:t="solid",label:n,align:s="center",className:r,...a}){return e==="vertical"?o.jsx("span",{role:"separator","aria-orientation":"vertical",className:w.cn(Q.divider,Q.vertical,t==="dashed"&&Q.dashed,r),...a}):n?o.jsx("div",{role:"separator","aria-orientation":"horizontal",className:w.cn(Q.divider,Q.horizontal,t==="dashed"&&Q.dashed,s==="start"&&Q.alignStart,s==="end"&&Q.alignEnd,r),...a,children:n}):o.jsx("hr",{className:w.cn(Q.divider,Q.horizontal,Q.bare,t==="dashed"&&Q.dashed,r)})}const _i="tempest_overlay_hcG1G",gi="tempest_tempest-drawer-overlay_XFbxY",bi="tempest_panel_wUX0N",yi="tempest_right_-oX-6",vi="tempest_tempest-drawer-in-right_pWYHv",xi="tempest_left_xi3nD",wi="tempest_tempest-drawer-in-left_o7JSb",ji="tempest_top_7rGCn",$i="tempest_tempest-drawer-in-top_kn6AF",ki="tempest_bottom_zd-25",Ni="tempest_tempest-drawer-in-bottom_0x3u7",Si="tempest_handle_5B-TB",Ci="tempest_handleTop_7aMf-",Ei="tempest_header_sYoP1",Ti="tempest_title_LqUOu",Mi="tempest_close_tYPhU",Li="tempest_body_aV9FG",Ri="tempest_footer_AuvUP",ue={overlay:_i,tempestDrawerOverlay:gi,panel:bi,right:yi,tempestDrawerInRight:vi,left:xi,tempestDrawerInLeft:wi,top:ji,tempestDrawerInTop:$i,bottom:ki,tempestDrawerInBottom:Ni,handle:Si,handleTop:Ci,header:Ei,title:Ti,close:Mi,body:Li,footer:Ri};function Pi({open:e,onClose:t,placement:n="right",title:s,children:r,footer:a,closeOnBackdrop:c=!0,closeOnEsc:i=!0,hideCloseButton:u=!1,className:d,mobilePlacement:p,showHandle:m=!1}){const{isMobile:f}=We(),h=f&&p?p:n;return l.useEffect(()=>{if(!e)return;const _=document.body.style.overflow;document.body.style.overflow="hidden";const b=v=>{i&&v.key==="Escape"&&t()};return window.addEventListener("keydown",b),()=>{document.body.style.overflow=_,window.removeEventListener("keydown",b)}},[e,i,t]),!e||typeof document>"u"?null:Ve.createPortal(o.jsxs(o.Fragment,{children:[o.jsx("div",{className:ue.overlay,onClick:()=>{c&&t()}}),o.jsxs("aside",{role:"dialog","aria-modal":"true",className:w.cn(ue.panel,ue[h],d),children:[m&&(h==="bottom"||h==="top")&&o.jsx("div",{className:w.cn(ue.handle,h==="top"&&ue.handleTop),"aria-hidden":!0}),(s||!u)&&o.jsxs("header",{className:ue.header,children:[o.jsx("h3",{className:ue.title,children:s}),!u&&o.jsx("button",{type:"button","aria-label":"Fechar",className:ue.close,onClick:t,children:o.jsx(Di,{})})]}),o.jsx("div",{className:ue.body,children:r}),a&&o.jsx("footer",{className:ue.footer,children:a})]})]}),document.body)}function Di(){return o.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 6l12 12M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const Ii="tempest_root_5ZetV",Ai="tempest_menu_-RiRW",Fi="tempest_bottomStart_z60h9",Oi="tempest_bottomEnd_b1tmU",Bi="tempest_topStart_A0em2",zi="tempest_topEnd_cFA5-",Wi="tempest_item_T-QPZ",qi="tempest_active_WNqoX",Ui="tempest_danger_C0jN3",Ki="tempest_separator_RimQa",Hi="tempest_label_6yP76",ce={root:Ii,menu:Ai,bottomStart:Fi,bottomEnd:Oi,topStart:Bi,topEnd:zi,item:Wi,active:qi,danger:Ui,separator:Ki,label:Hi};function Gi(e){switch(e){case"bottom-end":return ce.bottomEnd;case"top-start":return ce.topStart;case"top-end":return ce.topEnd;default:return ce.bottomStart}}function Qi({trigger:e,items:t,placement:n="bottom-start",className:s}){const[r,a]=l.useState(!1),[c,i]=l.useState(-1),u=l.useId(),d=l.useRef(null),p=l.useRef([]),m=t.map((v,g)=>v.type==="item"&&!v.disabled?g:-1).filter(v=>v!==-1),f=l.useCallback(()=>{a(!1),i(-1)},[]);l.useEffect(()=>{if(!r)return;const v=x=>{if(x.key==="Escape"){f();return}if(x.key==="ArrowDown"){x.preventDefault();const y=m.indexOf(c),j=m[(y+1)%m.length]??-1;i(j),p.current[j]?.focus()}if(x.key==="ArrowUp"){x.preventDefault();const y=m.indexOf(c),j=m[(y-1+m.length)%m.length]??-1;i(j),p.current[j]?.focus()}},g=x=>{d.current&&!d.current.contains(x.target)&&f()};return window.addEventListener("keydown",v),window.addEventListener("mousedown",g),()=>{window.removeEventListener("keydown",v),window.removeEventListener("mousedown",g)}},[r,c,m,f]);const h=v=>{e.props.onClick?.(v),a(g=>!g)},_={...e,props:{...e.props,onClick:h,"aria-expanded":r,"aria-controls":u,"aria-haspopup":"menu"}},b=v=>{v.onSelect(),f()};return o.jsxs("span",{ref:d,className:ce.root,children:[_,r&&o.jsx("ul",{id:u,role:"menu",className:w.cn(ce.menu,Gi(n),s),children:t.map((v,g)=>v.type==="separator"?o.jsx("li",{role:"separator",className:ce.separator,"aria-hidden":!0},v.id):v.type==="label"?o.jsx("li",{role:"presentation",className:ce.label,children:v.label},v.id):o.jsx("li",{role:"none",children:o.jsxs("button",{ref:x=>{p.current[g]=x},type:"button",role:"menuitem",className:w.cn(ce.item,v.danger&&ce.danger,c===g&&ce.active),disabled:v.disabled,onClick:()=>b(v),onMouseEnter:()=>i(g),children:[v.icon&&o.jsx("span",{"aria-hidden":!0,children:v.icon}),v.label]})},v.id))})]})}const Ji="tempest_zone_u04pu",Yi="tempest_dragging_uGtl4",Xi="tempest_disabled_GTKfV",Vi="tempest_input_qhJ1u",Zi="tempest_prompt_mlpWz",tt={zone:Ji,dragging:Yi,disabled:Xi,input:Vi,prompt:Zi};function el({onDrop:e,accept:t,multiple:n=!0,disabled:s=!1,maxSize:r,onReject:a,children:c,className:i}){const u=l.useRef(null),[d,p]=l.useState(!1),m=x=>{if(!x||x.length===0)return;const y=Array.from(x),j=n?y:y.slice(0,1);if(r===void 0){e(j);return}const S=[],M=[];for(const T of j)T.size>r?M.push(T):S.push(T);M.length>0&&a?.(M),S.length>0&&e(S)},f=()=>{s||u.current?.click()},h=x=>{x.preventDefault(),!s&&p(!0)},_=x=>{x.preventDefault()},b=x=>{x.preventDefault(),p(!1)},v=x=>{x.preventDefault(),p(!1),!s&&m(x.dataTransfer.files)},g=x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),f())};return o.jsxs("div",{role:"button",tabIndex:s?-1:0,"aria-disabled":s||void 0,className:w.cn(tt.zone,d&&tt.dragging,s&&tt.disabled,i),onClick:f,onKeyDown:g,onDragEnter:h,onDragOver:_,onDragLeave:b,onDrop:v,children:[o.jsx("input",{ref:u,type:"file",className:tt.input,accept:t,multiple:n,disabled:s,onChange:x=>{m(x.target.files),x.target.value=""}}),c??o.jsx("span",{className:tt.prompt,children:"Arraste arquivos aqui ou clique para selecionar"})]})}const tl="tempest_wrapper_gzyTd",nl="tempest_icon_qVCyh",sl="tempest_title_xPfUf",rl="tempest_description_oWwH1",ol="tempest_action_dqxw1",nt={wrapper:tl,icon:nl,title:sl,description:rl,action:ol};function al({icon:e,title:t,description:n,action:s,className:r}){return o.jsxs("div",{className:w.cn(nt.wrapper,r),children:[e&&o.jsx("div",{className:nt.icon,children:e}),o.jsx("h4",{className:nt.title,children:t}),n&&o.jsx("p",{className:nt.description,children:n}),s&&o.jsx("div",{className:nt.action,children:s})]})}const cl="tempest_wrapper_luRyF",il="tempest_icon_dEdBl",ll="tempest_title_StutD",ul="tempest_description_A2XCb",dl="tempest_action_vm1LC",st={wrapper:cl,icon:il,title:ll,description:ul,action:dl};function pl({title:e="Algo deu errado",description:t="Não foi possível carregar essas informações.",onRetry:n,retryLabel:s="Tentar novamente",icon:r,className:a}){return o.jsxs("div",{className:w.cn(st.wrapper,a),children:[o.jsx("div",{className:st.icon,children:r??o.jsx(ml,{})}),o.jsx("h4",{className:st.title,children:e}),t&&o.jsx("p",{className:st.description,children:t}),n&&o.jsx("div",{className:st.action,children:o.jsx(Xe,{variant:"secondary",onClick:n,children:s})})]})}function ml(){return o.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M12 9v4m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}const fl="tempest_wrapper_E0qHs",hl="tempest_label_lbMkx",_l="tempest_dropzone_jqua0",gl="tempest_active_CG9Uk",bl="tempest_disabled_WNUUl",yl="tempest_icon_i9fGH",vl="tempest_title_bTVFl",xl="tempest_subtitle_S54OV",wl="tempest_files_WljYm",jl="tempest_file_Lp-dR",$l="tempest_fileMeta_LTnN2",kl="tempest_remove_jskra",Nl="tempest_hidden_ReEq6",K={wrapper:fl,label:hl,dropzone:_l,active:gl,disabled:bl,icon:yl,title:vl,subtitle:xl,files:wl,file:jl,fileMeta:$l,remove:kl,hidden:Nl};function Sl(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function Cl(e,t){if(!t)return!0;const n=t.split(",").map(a=>a.trim().toLowerCase()),s=e.name.toLowerCase(),r=e.type.toLowerCase();return n.some(a=>a.startsWith(".")?s.endsWith(a):a.endsWith("/*")?r.startsWith(a.replace("/*","/")):r===a)}function El({value:e,onChange:t,label:n,accept:s,multiple:r=!1,maxSize:a,onReject:c,disabled:i,title:u="Arraste arquivos aqui ou clique para selecionar",subtitle:d,className:p}){const[m,f]=l.useState(!1),h=l.useRef(null);function _(g){const x=[],y=[];for(const S of Array.from(g)){if(!Cl(S,s)){y.push({file:S,reason:"type"});continue}if(a&&S.size>a){y.push({file:S,reason:"size"});continue}x.push(S)}if(y.length>0&&c?.(y),x.length===0)return;const j=r?[...e,...x]:x.slice(0,1);t(j)}function b(g){g.preventDefault(),f(!1),!i&&g.dataTransfer?.files&&_(g.dataTransfer.files)}function v(g){const x=e.slice();x.splice(g,1),t(x)}return o.jsxs("div",{className:w.cn(K.wrapper,p),children:[n&&o.jsx("label",{className:K.label,children:n}),o.jsxs("div",{className:w.cn(K.dropzone,m&&K.active,i&&K.disabled),role:"button",tabIndex:i?-1:0,onClick:()=>!i&&h.current?.click(),onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),h.current?.click())},onDragEnter:g=>{g.preventDefault(),i||f(!0)},onDragOver:g=>g.preventDefault(),onDragLeave:()=>f(!1),onDrop:b,children:[o.jsx("div",{className:K.icon,"aria-hidden":!0,children:o.jsx(Tl,{})}),o.jsx("p",{className:K.title,children:u}),d&&o.jsx("p",{className:K.subtitle,children:d}),o.jsx("input",{ref:h,type:"file",accept:s,multiple:r,disabled:i,className:K.hidden,onChange:g=>{g.target.files&&_(g.target.files),g.target.value=""}})]}),e.length>0&&o.jsx("ul",{className:K.files,children:e.map((g,x)=>o.jsxs("li",{className:K.file,children:[o.jsxs("div",{children:[o.jsx("div",{children:g.name}),o.jsx("div",{className:K.fileMeta,children:Sl(g.size)})]}),o.jsx("button",{type:"button","aria-label":`Remover ${g.name}`,className:K.remove,onClick:()=>v(x),children:"×"})]},`${g.name}-${x}`))})]})}function Tl(){return o.jsx("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M12 16V4m0 0l-4 4m4-4l4 4M4 20h16",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}const Ml="tempest_form_jNBDR",Ll="tempest_stack_O1Hl-",Rl="tempest_inline_LBQAv",Pl="tempest_grid_-B86T",Dl="tempest_section_HGqw3",Il="tempest_sectionHeader_ji9hQ",Al="tempest_sectionTitle_GTPwe",Fl="tempest_sectionDescription_KjW7k",Ol="tempest_sectionBody_Vp2wz",Bl="tempest_row_1EkVR",zl="tempest_actions_hK95I",Wl="tempest_start_gXnm3",ql="tempest_center_mKkz4",Ul="tempest_end_O3yDQ",Kl="tempest_between_tte2z",ie={form:Ml,stack:Ll,inline:Rl,grid:Pl,section:Dl,sectionHeader:Il,sectionTitle:Al,sectionDescription:Fl,sectionBody:Ol,row:Bl,actions:zl,start:Wl,center:ql,end:Ul,between:Kl};function Tt(e,t){return e===void 0?`${t*4}px`:typeof e=="number"?`${e*4}px`:e}function Bn(e){return e===void 0?"repeat(2, minmax(0, 1fr))":typeof e=="number"?`repeat(${e}, minmax(0, 1fr))`:e}const Hl=l.forwardRef(function({layout:t="stack",columns:n,gap:s,className:r,style:a,children:c,...i},u){const d={gap:Tt(s,4),...t==="grid"?{gridTemplateColumns:Bn(n)}:null,...a};return o.jsx("form",{ref:u,className:w.cn(ie.form,ie[t],r),style:d,...i,children:c})});function Gl({title:e,description:t,layout:n="stack",columns:s,gap:r,className:a,style:c,children:i,...u}){const d={gap:Tt(r,4),...n==="grid"?{gridTemplateColumns:Bn(s)}:null};return o.jsxs("section",{className:w.cn(ie.section,a),style:c,...u,children:[(e||t)&&o.jsxs("header",{className:ie.sectionHeader,children:[e&&o.jsx("h3",{className:ie.sectionTitle,children:e}),t&&o.jsx("p",{className:ie.sectionDescription,children:t})]}),o.jsx("div",{className:w.cn(ie.sectionBody,ie[n]),style:d,children:i})]})}function Ql({gap:e,className:t,style:n,children:s,...r}){const a={gap:Tt(e,3),...n};return o.jsx("div",{className:w.cn(ie.row,t),style:a,...r,children:s})}function Jl({align:e="end",gap:t,className:n,style:s,children:r,...a}){const c={gap:Tt(t,2),...s};return o.jsx("div",{className:w.cn(ie.actions,ie[e],n),style:c,...a,children:r})}const Yl="tempest_container_fJfOt",Xl="tempest_sm_k8D4-",Vl="tempest_md_EnpYy",Zl="tempest_lg_UU-Ig",eu="tempest_xl_2TEWj",tu="tempest_full_l8bvG",nu="tempest_stack_sxR8u",su="tempest_vertical_2TMf5",ru="tempest_horizontal_r7-c-",ou="tempest_center_EDSAh",au="tempest_start_ucQ-K",cu="tempest_end_pnKlF",iu="tempest_stretch_pX6l7",lu="tempest_justifyStart_lHYsS",uu="tempest_justifyCenter_JH2m6",du="tempest_justifyEnd_EBisT",pu="tempest_justifyBetween_mAJwT",mu="tempest_wrap_-xxOh",fu="tempest_grid_o-JIX",Z={container:Yl,sm:Xl,md:Vl,lg:Zl,xl:eu,full:tu,stack:nu,vertical:su,horizontal:ru,center:ou,start:au,end:cu,stretch:iu,justifyStart:lu,justifyCenter:uu,justifyEnd:du,justifyBetween:pu,wrap:mu,grid:fu};function hu({size:e="lg",className:t,children:n,...s}){return o.jsx("div",{className:w.cn(Z.container,Z[e],t),...s,children:n})}function _u(e){return typeof e=="object"&&e!==null&&("mobile"in e||"tablet"in e||"desktop"in e)}function St(e,t){if(e!==void 0)return _u(e)?t==="desktop"?e.desktop??e.tablet??e.mobile:t==="tablet"?e.tablet??e.mobile??e.desktop:e.mobile??e.tablet??e.desktop:e}function zn(e){if(e!==void 0)return typeof e=="number"?`${e*4}px`:e}function Wn(e,t){return e?"mobile":t?"tablet":"desktop"}function gu({direction:e="vertical",gap:t=2,align:n,justify:s,wrap:r=!1,className:a,style:c,children:i,...u}){const{isMobile:d,isTablet:p}=We(),m=Wn(d,p),f=St(e,m)??"vertical",_={gap:zn(St(t,m)),...c},b=s==="between"?Z.justifyBetween:s==="center"?Z.justifyCenter:s==="end"?Z.justifyEnd:s==="start"?Z.justifyStart:void 0;return o.jsx("div",{className:w.cn(Z.stack,f==="vertical"?Z.vertical:Z.horizontal,n&&Z[n],b,r&&Z.wrap,a),style:_,...u,children:i})}function bu(e){if(e!==void 0)return typeof e=="number"?`repeat(${e}, minmax(0, 1fr))`:e}function yu({columns:e=2,gap:t=4,className:n,style:s,children:r,...a}){const{isMobile:c,isTablet:i}=We(),u=Wn(c,i),d=bu(St(e,u)),p=zn(St(t,u));return o.jsx("div",{className:w.cn(Z.grid,n),style:{gridTemplateColumns:d,gap:p,...s},...a,children:r})}function ln(){if(typeof window>"u")return!1;const t=["standalone","fullscreen","minimal-ui"].some(s=>window.matchMedia?.(`(display-mode: ${s})`)?.matches),n=window.navigator.standalone===!0;return t||n}function Zt(){const[e,t]=l.useState(null),[n,s]=l.useState(!1),[r,a]=l.useState(ln);l.useEffect(()=>{if(typeof window>"u")return;const i=m=>{m.preventDefault(),t(m)},u=()=>{t(null),s(!0),a(!0)},d=window.matchMedia?.("(display-mode: standalone)"),p=()=>a(ln());return window.addEventListener("beforeinstallprompt",i),window.addEventListener("appinstalled",u),d?.addEventListener("change",p),()=>{window.removeEventListener("beforeinstallprompt",i),window.removeEventListener("appinstalled",u),d?.removeEventListener("change",p)}},[]);const c=l.useCallback(async()=>{if(!e)return"unsupported";await e.prompt();const i=await e.userChoice;return t(null),i.outcome==="accepted"&&s(!0),i.outcome},[e]);return{installable:!!e,installed:n,isStandalone:r,prompt:c}}const vu="tempest_banner_0oCIc",xu="tempest_icon_izjRL",wu="tempest_body_9JAQv",ju="tempest_title_1E50X",$u="tempest_description_QY25-",ku="tempest_close_RN6FO",Ue={banner:vu,icon:xu,body:wu,title:ju,description:$u,close:ku};function Nu(e){if(!e||typeof window>"u")return!1;try{return window.localStorage.getItem(e)==="1"}catch{return!1}}function Su({title:e="Instale o app",description:t,installLabel:n="Instalar",dismissLabel:s="Dispensar",icon:r,storageKey:a,onResult:c,className:i}){const{installable:u,installed:d,isStandalone:p,prompt:m}=Zt(),[f,h]=l.useState(()=>Nu(a));if(!u||d||p||f)return null;const _=()=>{if(h(!0),a&&typeof window<"u")try{window.localStorage.setItem(a,"1")}catch{}};return o.jsxs("div",{className:w.cn(Ue.banner,i),role:"region","aria-label":String(e),children:[r&&o.jsx("span",{className:Ue.icon,children:r}),o.jsxs("div",{className:Ue.body,children:[o.jsx("p",{className:Ue.title,children:e}),t&&o.jsx("p",{className:Ue.description,children:t})]}),o.jsx(Xe,{size:"sm",onClick:async()=>{c?.(await m())},children:n}),o.jsx("button",{type:"button",className:Ue.close,"aria-label":s,onClick:_,children:o.jsx(Fn.X,{size:18,"aria-hidden":!0})})]})}function Cu({label:e="Instalar app",onResult:t,...n}){const{installable:s,installed:r,isStandalone:a,prompt:c}=Zt();return!s||r||a?null:o.jsx(Xe,{onClick:async()=>{t?.(await c())},...n,children:e})}const Eu="tempest_kbd_jgbYx",Tu="tempest_sm_9WPWA",Mu="tempest_md_BePC0",Lu="tempest_lg_cBKum",un={kbd:Eu,sm:Tu,md:Mu,lg:Lu};function Ru({size:e="md",className:t,children:n,...s}){return o.jsx("kbd",{className:w.cn(un.kbd,un[e],t),...s,children:n})}const Pu="tempest_stack_zYzdv",Du={stack:Pu},qn=l.createContext(null);function Iu({children:e}){const[t,n]=l.useState([]),s=l.useRef(0),r=l.useCallback(()=>(s.current+=1,`modal-${s.current}`),[]),a=l.useCallback(p=>{n(m=>m.filter(f=>f.id!==p))},[]),c=l.useCallback(()=>{n([])},[]),i=l.useCallback(p=>{const m=r();return n(f=>[...f,{kind:"content",id:m,options:p}]),m},[r]),u=l.useCallback(p=>{const m=r();return n(f=>[...f,{kind:"confirm",id:m,options:p}]),m},[r]),d=l.useMemo(()=>({open:i,confirm:u,close:a,closeAll:c}),[i,u,a,c]);return o.jsxs(qn.Provider,{value:d,children:[e,o.jsx("div",{className:Du.stack,children:t.map(p=>p.kind==="content"?o.jsx(Au,{entry:p,close:a},p.id):o.jsx(Fu,{entry:p,close:a},p.id))})]})}function Au({entry:e,close:t}){const{options:n,id:s}=e,r=()=>{n.onClose?.(),t(s)};return o.jsx(Vt,{open:!0,onClose:r,title:n.title,size:n.size,closeOnBackdrop:n.closeOnBackdrop,closeOnEsc:n.closeOnEsc,hideCloseButton:n.hideCloseButton,children:n.children})}function Fu({entry:e,close:t}){const{options:n,id:s}=e,[r,a]=l.useState(!1),c=async()=>{try{a(!0),await n.onConfirm?.()}finally{a(!1),t(s)}},i=()=>{n.onCancel?.(),t(s)};return o.jsx(On,{open:!0,title:n.title??"",description:n.message,confirmLabel:n.confirmLabel,cancelLabel:n.cancelLabel,variant:n.danger?"danger":"primary",loading:r,onConfirm:c,onCancel:i})}function Ou(){const e=l.useContext(qn);if(e===null)throw new Error("useModals must be used within a <ModalsProvider>");return e}const Bu="tempest_navbar_Ey25T",zu="tempest_surface_xyKhM",Wu="tempest_primary_w3ft-",qu="tempest_transparent_N1vMR",Uu="tempest_bordered_HD49R",Ku="tempest_sticky_0XsOs",Hu="tempest_logo_O9j3q",Gu="tempest_nav_0oisE",Qu="tempest_actions_8BNWJ",Ae={navbar:Bu,surface:zu,primary:Wu,transparent:qu,bordered:Uu,sticky:Ku,logo:Hu,nav:Gu,actions:Qu};function Ju({logo:e,nav:t,actions:n,sticky:s=!0,tone:r="surface",bordered:a=!0,className:c,...i}){return o.jsxs("header",{className:w.cn(Ae.navbar,Ae[r],s&&Ae.sticky,a&&Ae.bordered,c),...i,children:[e&&o.jsx("div",{className:Ae.logo,children:e}),t&&o.jsx("nav",{className:Ae.nav,children:t}),n&&o.jsx("div",{className:Ae.actions,children:n})]})}const Yu="tempest_bar_zxTqx",Xu={bar:Yu},Vu=300,dn=.9,Zu=300;function pn(e){return e<0?0:e>1?1:e}function ed(){let e={value:0,active:!1};const t=new Set;let n=null,s=null;const r=()=>{for(const h of t)h(e)},a=h=>{e={...e,...h},r()},c=()=>{n!==null&&(clearInterval(n),n=null)},i=()=>{s!==null&&(clearTimeout(s),s=null)},u=h=>{const _=e.value;if(_>=dn)return;const b=h??(1-_)*.1+.01;a({value:Math.min(pn(_+b),dn)})};return{start:()=>{i(),!e.active&&(a({active:!0,value:e.value>0?e.value:.08}),c(),n=setInterval(()=>u(),Vu))},done:()=>{c(),i(),a({value:1,active:!0}),s=setTimeout(()=>{a({active:!1,value:0}),s=null},Zu)},set:h=>{i();const _=pn(h);a({value:_,active:_<1?!0:e.active})},inc:u,subscribe:h=>(t.add(h),h(e),()=>{t.delete(h)})}}const Un=ed();function td({color:e,height:t=3,className:n}){const[s,r]=l.useState({value:0,active:!1});if(l.useEffect(()=>Un.subscribe(r),[]),!s.active)return null;const a={width:`${Math.round(s.value*100)}%`,height:`${t}px`,background:e??"var(--tempest-primary)"};return o.jsx("div",{className:w.cn(Xu.bar,n),style:a,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(s.value*100)})}const nd="tempest_page_THNNc",sd="tempest_padded_bzjoF",rd="tempest_header_PZEzk",od="tempest_headerText_qYXFI",ad="tempest_eyebrow_651RV",cd="tempest_title_2oGnT",id="tempest_description_YzmWl",ld="tempest_actions_-rB3U",ud="tempest_toolbar_sA7sD",dd="tempest_content_RCB4b",pd="tempest_footer_540pQ",se={page:nd,padded:sd,header:rd,headerText:od,eyebrow:ad,title:cd,description:id,actions:ld,toolbar:ud,content:dd,footer:pd};function md({title:e,eyebrow:t,description:n,actions:s,toolbar:r,footer:a,padded:c=!0,className:i,children:u,...d}){const p=e||t||n||s;return o.jsxs("main",{className:w.cn(se.page,c&&se.padded,i),...d,children:[p&&o.jsxs("header",{className:se.header,children:[o.jsxs("div",{className:se.headerText,children:[t&&o.jsx("div",{className:se.eyebrow,children:t}),e&&o.jsx("h1",{className:se.title,children:e}),n&&o.jsx("p",{className:se.description,children:n})]}),s&&o.jsx("div",{className:se.actions,children:s})]}),r&&o.jsx("div",{className:se.toolbar,children:r}),o.jsx("div",{className:se.content,children:u}),a&&o.jsx("footer",{className:se.footer,children:a})]})}const fd="tempest_wrapper_cRGQm",hd="tempest_controls_fdL-y",_d="tempest_page_WjG0l",gd="tempest_active_1kqsJ",bd="tempest_ellipsis_V294k",yd="tempest_sizeSelect_ZayTo",vd="tempest_numeric_ztI0I",xd="tempest_summary_ZTggV",re={wrapper:fd,controls:hd,page:_d,active:gd,ellipsis:bd,sizeSelect:yd,numeric:vd,summary:xd};function wd(e,t,n){const s=n+4;if(t<=s)return Array.from({length:t},(i,u)=>u+1);const r=Math.max(2,e-Math.floor(n/2)),a=Math.min(t-1,r+n-1),c=[1];r>2&&c.push("...");for(let i=r;i<=a;i++)c.push(i);return a<t-1&&c.push("..."),c.push(t),c}function Kn({page:e,totalPages:t,onPageChange:n,pageSize:s,onPageSizeChange:r,pageSizeOptions:a=[10,25,50,100],totalItems:c,siblingCount:i=3,className:u}){const d=l.useMemo(()=>wd(e,t,i),[e,t,i]);return t<=1&&!r?null:o.jsxs("div",{className:w.cn(re.wrapper,u),children:[o.jsx("div",{className:re.summary,children:typeof c=="number"?`${c} resultado${c===1?"":"s"}`:`Página ${e} de ${t}`}),o.jsxs("div",{className:re.controls,children:[o.jsx("button",{type:"button",className:re.page,onClick:()=>n(Math.max(1,e-1)),disabled:e<=1,"aria-label":"Página anterior",children:"‹"}),d.map((p,m)=>p==="..."?o.jsx("span",{className:w.cn(re.ellipsis,re.numeric),children:"…"},`ellipsis-${m}`):o.jsx("button",{type:"button",className:w.cn(re.page,re.numeric,p===e&&re.active),onClick:()=>n(p),"aria-current":p===e?"page":void 0,children:p},p)),o.jsx("button",{type:"button",className:re.page,onClick:()=>n(Math.min(t,e+1)),disabled:e>=t,"aria-label":"Próxima página",children:"›"}),r&&o.jsx("select",{className:re.sizeSelect,value:s,onChange:p=>r(Number(p.target.value)),"aria-label":"Itens por página",children:a.map(p=>o.jsxs("option",{value:p,children:[p," / página"]},p))})]})]})}const jd="tempest_wrapper_zEU-L",$d="tempest_label_ps3gD",kd="tempest_field_7taZG",Nd="tempest_input_FWEvb",Sd="tempest_sm_3-CZz",Cd="tempest_md_ReV0O",Ed="tempest_lg_DiTiB",Td="tempest_toggle_WNeX9",Md="tempest_error_QdIFf",Ld="tempest_helper_mBUna",Rd="tempest_errorText_73Uvv",Pd="tempest_strength_i6RaQ",Dd="tempest_strengthBar_PAPHR",Id="tempest_strengthLabel_u9QHS",Ad="tempest_level0_n6tWv",Fd="tempest_level1_FOI93",Od="tempest_level2_q5Wii",Bd="tempest_level3_BpB53",zd="tempest_level4_vyQ3x",H={wrapper:jd,label:$d,field:kd,input:Nd,sm:Sd,md:Cd,lg:Ed,toggle:Td,error:Md,helper:Ld,errorText:Rd,strength:Pd,strengthBar:Dd,strengthLabel:Id,level0:Ad,level1:Fd,level2:Od,level3:Bd,level4:zd},Wd=["Muito fraca","Fraca","Razoável","Forte","Excelente"];function Hn(e){if(!e)return 0;let t=0;return e.length>=8&&(t+=1),e.length>=12&&(t+=1),/[a-z]/.test(e)&&/[A-Z]/.test(e)&&(t+=1),/[0-9]/.test(e)&&(t+=1),/[^A-Za-z0-9]/.test(e)&&(t+=1),Math.min(4,t)}const qd=l.forwardRef(function({label:t,helperText:n,error:s,size:r="md",showStrength:a=!1,strength:c,strengthLabels:i=Wd,toggleLabels:u={show:"Mostrar senha",hide:"Esconder senha"},className:d,value:p,defaultValue:m,...f},h){const[_,b]=l.useState(!1),v=String(p??m??""),g=c??Hn(v);return o.jsxs("div",{className:w.cn(H.wrapper,H[r],s&&H.error,d),children:[t&&o.jsx("label",{className:H.label,children:t}),o.jsxs("div",{className:H.field,children:[o.jsx("input",{ref:h,...f,value:p,defaultValue:m,type:_?"text":"password","aria-invalid":!!s,className:H.input}),o.jsx("button",{type:"button",className:H.toggle,"aria-label":_?u.hide:u.show,"aria-pressed":_,onClick:()=>b(x=>!x),children:_?"🙈":"👁"})]}),a&&o.jsxs("div",{className:w.cn(H.strength,H[`level${g}`]),"aria-label":i[g],children:[o.jsx("div",{className:H.strengthBar,children:o.jsx("span",{style:{width:`${g/4*100}%`}})}),o.jsx("span",{className:H.strengthLabel,children:i[g]})]}),s?o.jsx("span",{className:H.errorText,children:s}):n?o.jsx("span",{className:H.helper,children:n}):null]})}),Ud="tempest_wrapper_3WAh7",Kd="tempest_label_Hk01i",Hd="tempest_cells_URO3v",Gd="tempest_cell_fxLzs",Qd="tempest_sm_SQM-s",Jd="tempest_md_aHCGl",Yd="tempest_lg_JpI4A",Xd="tempest_error_Kou0o",Vd="tempest_helper_W04iL",Zd="tempest_errorText_h4svq",Se={wrapper:Ud,label:Kd,cells:Hd,cell:Gd,sm:Qd,md:Jd,lg:Yd,error:Xd,helper:Vd,errorText:Zd},ep=/[0-9]/,tp=/[A-Za-z0-9]/,np=l.forwardRef(function({length:t=6,type:n="numeric",size:s="md",value:r,defaultValue:a,onChange:c,onComplete:i,masked:u=!1,label:d,helperText:p,error:m,disabled:f=!1,autoFocus:h=!1,id:_,className:b},v){const g=l.useId(),x=_??g,y=r!==void 0,[j,S]=l.useState(a??""),M=y?r??"":j,T=Array.from({length:t},(R,L)=>M[L]??""),N=l.useRef([]),k=n==="numeric"?ep:tp;l.useEffect(()=>{h&&N.current[0]?.focus()},[h]);const E=R=>{const L=R.slice(0,t);y||S(L),c?.(L),L.length===t&&i?.(L)},P=R=>{const L=Math.max(0,Math.min(t-1,R));N.current[L]?.focus(),N.current[L]?.select()},$=R=>L=>{const q=L.target.value.slice(-1);if(q&&!k.test(q))return;const mt=T.slice();mt[R]=q,E(mt.join("")),q&&P(R+1)},C=R=>L=>{if(L.key==="Backspace"){if(!T[R]&&R>0){L.preventDefault();const q=T.slice();q[R-1]="",E(q.join("")),P(R-1)}}else L.key==="ArrowLeft"?(L.preventDefault(),P(R-1)):L.key==="ArrowRight"&&(L.preventDefault(),P(R+1))},I=R=>{const L=R.clipboardData.getData("text").split("").filter(q=>k.test(q)).join("");L&&(R.preventDefault(),E(L),P(Math.min(t-1,L.length)))};return o.jsxs("div",{ref:v,className:w.cn(Se.wrapper,m&&Se.error,b),id:x,children:[d&&o.jsx("label",{className:Se.label,children:d}),o.jsx("div",{className:w.cn(Se.cells,Se[s]),role:"group","aria-label":d,children:T.map((R,L)=>o.jsx("input",{ref:q=>{N.current[L]=q},type:u?"password":"text",inputMode:n==="numeric"?"numeric":"text",autoComplete:L===0?"one-time-code":"off",maxLength:1,value:R,disabled:f,className:Se.cell,"aria-label":`Dígito ${L+1}`,"aria-invalid":!!m,onChange:$(L),onKeyDown:C(L),onPaste:I},L))}),m?o.jsx("span",{className:Se.errorText,children:m}):p?o.jsx("span",{className:Se.helper,children:p}):null]})}),sp="tempest_root_vEMon",rp="tempest_popover_E9K9X",op="tempest_tempest-popover-in_W8miP",ap="tempest_top_TYlrh",cp="tempest_bottom_wGs70",ip="tempest_left_h7fCr",lp="tempest_right_--bJW",Lt={root:sp,popover:rp,tempestPopoverIn:op,top:ap,bottom:cp,left:ip,right:lp};function up({trigger:e,children:t,placement:n="bottom",open:s,onOpenChange:r,defaultOpen:a=!1,closeOnEsc:c=!0,closeOnOutsideClick:i=!0,className:u}){const d=s!==void 0,[p,m]=l.useState(a),f=d?s:p,h=l.useId(),_=l.useRef(null),b=l.useCallback(x=>{d||m(x),r?.(x)},[d,r]);l.useEffect(()=>{if(!f)return;const x=j=>{c&&j.key==="Escape"&&b(!1)},y=j=>{i&&_.current&&!_.current.contains(j.target)&&b(!1)};return window.addEventListener("keydown",x),window.addEventListener("mousedown",y),()=>{window.removeEventListener("keydown",x),window.removeEventListener("mousedown",y)}},[f,c,i,b]);const v=x=>{e.props.onClick?.(x),b(!f)},g={...e,props:{...e.props,onClick:v,"aria-expanded":f,"aria-controls":h}};return o.jsxs("span",{ref:_,className:Lt.root,children:[g,f&&o.jsx("div",{id:h,role:"dialog",className:w.cn(Lt.popover,Lt[n],u),children:t})]})}const dp="tempest_wrapper_BQek1",pp="tempest_bar_uC-0x",mp="tempest_fill_vmg7x",fp="tempest_success_gWJ8U",hp="tempest_warning_DGkPO",_p="tempest_danger_gfwHh",gp="tempest_indeterminate_HojUj",bp="tempest_tempest-progress-loop_0nEdF",yp="tempest_label_qqHJM",Ke={wrapper:dp,bar:pp,fill:mp,success:fp,warning:hp,danger:_p,indeterminate:gp,tempestProgressLoop:bp,label:yp};function vp({value:e=0,max:t=100,variant:n="primary",indeterminate:s=!1,showLabel:r=!1,label:a,className:c}){const i=s?0:Math.max(0,Math.min(100,e/t*100));return o.jsxs("div",{className:w.cn(Ke.wrapper,c),children:[(r||a)&&o.jsxs("div",{className:Ke.label,children:[a&&o.jsx("span",{children:a}),r&&!s&&o.jsxs("span",{children:[Math.round(i),"%"]})]}),o.jsx("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":s?void 0:e,className:w.cn(Ke.bar,s&&Ke.indeterminate),children:o.jsx("div",{className:w.cn(Ke.fill,n!=="primary"&&Ke[n]),style:{width:s?void 0:`${i}%`}})})]})}const xp="tempest_wrapper_P-gFm",wp="tempest_disabled_0-cna",jp="tempest_input_7R8ZN",$p="tempest_dot_P7ejP",kp="tempest_labelWrap_iQ1HR",Np="tempest_label_vAFIP",Sp="tempest_description_bEB8u",Cp="tempest_group_oi329",Ep="tempest_horizontal_1Ovgu",ke={wrapper:xp,disabled:wp,input:jp,dot:$p,labelWrap:kp,label:Np,description:Sp,group:Cp,horizontal:Ep},Gn=l.createContext(null),Tp=l.forwardRef(function({label:t,description:n,value:s,disabled:r,name:a,checked:c,onChange:i,wrapperClassName:u,className:d,...p},m){const f=l.useContext(Gn),h=f?.name??a,_=f?.disabled??r,b=f?f.value===s:c;function v(g){f&&f.onChange?.(s),i?.(g)}return o.jsxs("label",{className:w.cn(ke.wrapper,_&&ke.disabled,u),children:[o.jsx("input",{ref:m,type:"radio",name:h,value:s,checked:b,disabled:_,onChange:v,className:w.cn(ke.input,d),...p}),o.jsx("span",{className:ke.dot,"aria-hidden":!0}),(t||n)&&o.jsxs("span",{className:ke.labelWrap,children:[t&&o.jsx("span",{className:ke.label,children:t}),n&&o.jsx("span",{className:ke.description,children:n})]})]})});function Mp({value:e,defaultValue:t,onChange:n,name:s,disabled:r,horizontal:a=!1,className:c,children:i}){const u=l.useId(),d=s??u,[p,m]=l.useState(t),f=e!==void 0,h=f?e:p;function _(b){f||m(b),n?.(b)}return o.jsx(Gn.Provider,{value:{name:d,value:h,onChange:_,disabled:r},children:o.jsx("div",{role:"radiogroup",className:w.cn(ke.group,a&&ke.horizontal,c),children:i})})}const Lp="tempest_wrapper_o1aOo",Rp="tempest_label_jaBOA",Pp="tempest_value_GKfOu",Dp="tempest_field_YxCzt",Ip="tempest_track_j-2iy",Ap="tempest_fill_1pbqj",Fp="tempest_input_1MASw",Op="tempest_helper_uqxKu",ye={wrapper:Lp,label:Rp,value:Pp,field:Dp,track:Ip,fill:Ap,input:Fp,helper:Op};function Bp({value:e,onChange:t,min:n=0,max:s=100,step:r=1,label:a,helperText:c,disabled:i=!1,formatValue:u,className:d}){const[p,m]=e,f=s-n,h=l.useMemo(()=>(p-n)/f*100,[p,n,f]),_=l.useMemo(()=>(m-n)/f*100,[m,n,f]),b=u?.(e)??`${p} – ${m}`,v=l.useCallback(x=>{const y=Math.min(Number(x.target.value),m);t([y,m])},[m,t]),g=l.useCallback(x=>{const y=Math.max(Number(x.target.value),p);t([p,y])},[p,t]);return o.jsxs("div",{className:w.cn(ye.wrapper,d),children:[a&&o.jsxs("div",{className:ye.label,children:[o.jsx("span",{children:a}),o.jsx("span",{className:ye.value,children:b})]}),o.jsxs("div",{className:ye.field,children:[o.jsx("div",{className:ye.track}),o.jsx("div",{className:ye.fill,style:{left:`${h}%`,right:`${100-_}%`}}),o.jsx("input",{type:"range",className:ye.input,min:n,max:s,step:r,value:p,onChange:v,disabled:i,"aria-label":a?`${a} (mínimo)`:"Mínimo"}),o.jsx("input",{type:"range",className:ye.input,min:n,max:s,step:r,value:m,onChange:g,disabled:i,"aria-label":a?`${a} (máximo)`:"Máximo"})]}),c&&o.jsx("span",{className:ye.helper,children:c})]})}const zp="tempest_wrapper_K9Mqa",Wp="tempest_star_goIGS",qp="tempest_filled_mMs-d",Up="tempest_disabled_tyUlQ",Kp="tempest_readonly_bnKLN",Hp="tempest_sm_K7-y9",Gp="tempest_md_ex2Tb",Qp="tempest_lg_TstLJ",He={wrapper:zp,star:Wp,filled:qp,disabled:Up,readonly:Kp,sm:Hp,md:Gp,lg:Qp};function Jp({value:e,max:t=5,onChange:n,size:s="md",readonly:r=!1,disabled:a=!1,label:c="Avaliação",className:i}){const[u,d]=l.useState(0),p=u>0?u:e,m=f=>{r||a||n?.(f)};return o.jsx("span",{role:"radiogroup","aria-label":c,className:w.cn(He.wrapper,He[s],a&&He.disabled,r&&He.readonly,i),onMouseLeave:()=>d(0),children:Array.from({length:t},(f,h)=>{const _=h+1,b=_<=p;return o.jsx("button",{type:"button",role:"radio","aria-checked":e===_,"aria-label":`${_} ${_===1?"estrela":"estrelas"}`,className:w.cn(He.star,b&&He.filled),disabled:a,onMouseEnter:()=>!r&&!a&&d(_),onClick:()=>m(_),children:o.jsx(Yp,{filled:b})},_)})})}function Yp({filled:e}){return o.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:e?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round","aria-hidden":!0,children:o.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.56 5.82 22 7 14.14 2 9.27l6.91-1.01L12 2z"})})}function Qn(e,t,n,s,r){return s?(Array.isArray(s)?s:[s]).includes(e):!(t&&!r.above(t)||n&&!r.below(n))}function Xp({above:e,below:t,only:n,children:s}){const r=We();return Qn(r.current,e,t,n,r)?s:null}function Vp({above:e,below:t,only:n,children:s}){const r=We();return Qn(r.current,e,t,n,r)?null:s}const Zp="tempest_safe_iqDFY",em="tempest_inline_V9eMG",tm="tempest_top_Xse9E",nm="tempest_right_GZm9b",sm="tempest_bottom_kkyD7",rm="tempest_left_Z4Q72",Ge={safe:Zp,inline:em,top:tm,right:nm,bottom:sm,left:rm},om=["top","right","bottom","left"];function am({edges:e=om,inline:t=!1,className:n,children:s,...r}){return o.jsx("div",{className:w.cn(Ge.safe,t&&Ge.inline,e.includes("top")&&Ge.top,e.includes("right")&&Ge.right,e.includes("bottom")&&Ge.bottom,e.includes("left")&&Ge.left,n),"data-edges":e.join(" "),...r,children:s})}const cm="tempest_wrapper_dKXJJ",im="tempest_input_m0lPc",lm="tempest_iconLeft_030-U",um="tempest_clear_nb6lG",ft={wrapper:cm,input:im,iconLeft:lm,clear:um},Jn=l.forwardRef(function({value:t,onChange:n,onClear:s,wrapperClassName:r,placeholder:a="Buscar...",className:c,...i},u){function d(){n(""),s?.()}return o.jsxs("div",{className:w.cn(ft.wrapper,r),children:[o.jsx("span",{className:ft.iconLeft,"aria-hidden":!0,children:o.jsx(dm,{})}),o.jsx("input",{ref:u,type:"search",value:t,onChange:p=>n(p.target.value),placeholder:a,className:w.cn(ft.input,c),...i}),t&&o.jsx("button",{type:"button",className:ft.clear,"aria-label":"Limpar busca",onClick:d,children:o.jsx(pm,{})})]})});function dm(){return o.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:[o.jsx("circle",{cx:"11",cy:"11",r:"7",stroke:"currentColor",strokeWidth:"2"}),o.jsx("path",{d:"M20 20l-3.5-3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function pm(){return o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 6l12 12M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const mm="tempest_group_mYyFC",fm="tempest_fullWidth_unSMm",hm="tempest_segment_cu-EL",_m="tempest_sm_CfD41",gm="tempest_md_2ixuM",bm="tempest_lg_2Kt7-",ym="tempest_active_GmyKg",vm="tempest_icon_9h6GK",xm="tempest_label_mS17q",Fe={group:mm,fullWidth:fm,segment:hm,sm:_m,md:gm,lg:bm,active:ym,icon:vm,label:xm};function wm({options:e,value:t,onChange:n,size:s="md",fullWidth:r=!1,className:a,"aria-label":c,...i}){return o.jsx("div",{role:"radiogroup","aria-label":c,className:w.cn(Fe.group,Fe[s],r&&Fe.fullWidth,a),...i,children:e.map(u=>{const d=u.value===t;return o.jsxs("button",{type:"button",role:"radio","aria-checked":d,disabled:u.disabled,className:w.cn(Fe.segment,d&&Fe.active),onClick:()=>n(u.value),children:[u.icon&&o.jsx("span",{className:Fe.icon,children:u.icon}),o.jsx("span",{className:Fe.label,children:u.label})]},u.value)})})}const jm="tempest_wrapper_KS2K3",$m="tempest_label_Lmgos",km="tempest_required_PvDVJ",Nm="tempest_field_h-wBy",Sm="tempest_select_cjdcr",Cm="tempest_caret_MdCao",Em="tempest_error_sw9MU",Tm="tempest_helper_frosK",Mm="tempest_errorText_-zd6i",ve={wrapper:jm,label:$m,required:km,field:Nm,select:Sm,caret:Cm,error:Em,helper:Tm,errorText:Mm},Lm=l.forwardRef(function({label:t,helperText:n,error:s,options:r,placeholder:a,wrapperClassName:c,className:i,children:u,id:d,required:p,...m},f){const h=l.useId(),_=d??h;return o.jsxs("div",{className:w.cn(ve.wrapper,s&&ve.error,c),children:[t&&o.jsxs("label",{htmlFor:_,className:ve.label,children:[t,p&&o.jsx("span",{className:ve.required,children:"*"})]}),o.jsxs("div",{className:ve.field,children:[o.jsxs("select",{ref:f,id:_,"aria-invalid":!!s,required:p,className:w.cn(ve.select,i),...m,children:[a&&o.jsx("option",{value:"",disabled:!0,hidden:!0,children:a}),r?.map(b=>o.jsx("option",{value:b.value,disabled:b.disabled,children:b.label},b.value)),u]}),o.jsx("span",{className:ve.caret,"aria-hidden":!0,children:o.jsx(Rm,{})})]}),s?o.jsx("span",{className:ve.errorText,children:s}):n?o.jsx("span",{className:ve.helper,children:n}):null]})});function Rm(){return o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 9l6 6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}const Pm="tempest_sidebar_UB1qz",Dm="tempest_header_zupoS",Im="tempest_nav_aLYuL",Am="tempest_item_IAjHb",Fm="tempest_collapsed_ZbZYA",Om="tempest_active_BgcFy",Bm="tempest_icon_UQswn",zm="tempest_label_TPvJ9",Wm="tempest_badge_xwEZv",qm="tempest_footer_TyRyi",de={sidebar:Pm,header:Dm,nav:Im,item:Am,collapsed:Fm,active:Om,icon:Bm,label:zm,badge:Wm,footer:qm};function Um({header:e,items:t,value:n,onChange:s,footer:r,collapsed:a=!1,width:c=240,collapsedWidth:i=64,className:u,style:d,...p}){const m=typeof(a?i:c)=="number"?`${a?i:c}px`:a?i:c;return o.jsxs("aside",{className:w.cn(de.sidebar,a&&de.collapsed,u),style:{width:m,...d},...p,children:[e&&o.jsx("div",{className:de.header,children:e}),o.jsx("nav",{className:de.nav,"aria-label":"Navegação lateral",children:t.map(f=>{const h=f.key===n;return o.jsxs("button",{type:"button",className:w.cn(de.item,h&&de.active),"aria-current":h?"page":void 0,disabled:f.disabled,onClick:()=>s?.(f.key),title:a&&typeof f.label=="string"?f.label:void 0,children:[f.icon&&o.jsx("span",{className:de.icon,children:f.icon}),!a&&o.jsx("span",{className:de.label,children:f.label}),!a&&f.badge!==void 0&&o.jsx("span",{className:de.badge,children:f.badge})]},f.key)})}),r&&o.jsx("div",{className:de.footer,children:r})]})}const Km="tempest_skeleton_CB4uF",Hm="tempest_text_-A8IF",Gm="tempest_circle_DYcl8",Rt={skeleton:Km,text:Hm,circle:Gm};function Qm({variant:e="rect",width:t,height:n,className:s,style:r}){return o.jsx("span",{"aria-hidden":!0,className:w.cn(Rt.skeleton,e==="text"&&Rt.text,e==="circle"&&Rt.circle,s),style:{width:t,height:n,...r}})}const Jm="tempest_spacer_okdOd",Ym="tempest_both_85qSF",Xm="tempest_x_QiU2B",Vm="tempest_y_hTtCp",mn={spacer:Jm,both:Ym,x:Xm,y:Vm};function Zm({axis:e="both",className:t,...n}){return o.jsx("div",{className:w.cn(mn.spacer,mn[e],t),...n})}const ef="tempest_spinner_GpFZS",tf="tempest_tempest-spinner_wKVCY",nf="tempest_xs_p8BFI",sf="tempest_sm_3sIoD",rf="tempest_md_M2sPj",of="tempest_lg_IxTw2",af="tempest_xl_cgwqq",cf="tempest_wrap_Xkv-I",lf="tempest_overlay_sVSe9",uf="tempest_caption_B0ED9",Oe={spinner:ef,tempestSpinner:tf,xs:nf,sm:sf,md:rf,lg:of,xl:af,wrap:cf,overlay:lf,caption:uf};function Yn({size:e="md",className:t,label:n="Carregando",caption:s,overlay:r=!1}){const a=o.jsx("span",{"aria-hidden":!0,className:w.cn(Oe.spinner,Oe[e])});return!r&&s===void 0?o.jsx("span",{role:"status","aria-label":n,className:w.cn(Oe.spinner,Oe[e],t)}):o.jsxs("div",{role:"status","aria-label":n,"aria-live":"polite",className:w.cn(Oe.wrap,r&&Oe.overlay,t),children:[a,s!==void 0&&o.jsx("span",{className:Oe.caption,children:s})]})}const df="tempest_stat_zoo9y",pf="tempest_header_3UQqq",mf="tempest_icon_zUG3e",ff="tempest_label_lIH47",hf="tempest_row_Ifyts",_f="tempest_value_JBWnr",gf="tempest_delta_mRVrE",bf="tempest_up_7qgUO",yf="tempest_down_3Rq2Z",vf="tempest_flat_R5pZT",xf="tempest_hint_YkTF8",oe={stat:df,header:pf,icon:mf,label:ff,row:hf,value:_f,delta:gf,up:bf,down:yf,flat:vf,hint:xf};function wf(e){if(typeof e!="string")return;const t=e.trim();if(t.startsWith("+"))return"up";if(t.startsWith("-")||t.startsWith("−"))return"down"}function jf({label:e,value:t,delta:n,trend:s,hint:r,icon:a,className:c,...i}){const u=s??wf(n);return o.jsxs("div",{className:w.cn(oe.stat,c),...i,children:[o.jsxs("div",{className:oe.header,children:[a&&o.jsx("span",{className:oe.icon,children:a}),o.jsx("span",{className:oe.label,children:e})]}),o.jsxs("div",{className:oe.row,children:[o.jsx("span",{className:oe.value,children:t}),n!==void 0&&o.jsx("span",{className:w.cn(oe.delta,u==="up"&&oe.up,u==="down"&&oe.down,u==="flat"&&oe.flat),children:n})]}),r&&o.jsx("p",{className:oe.hint,children:r})]})}const $f="tempest_stepper_w3qjQ",kf="tempest_vertical_d4mOs",Nf="tempest_step_s2nqL",Sf="tempest_dot_d1bSL",Cf="tempest_completed_gcFHM",Ef="tempest_active_kL-CH",Tf="tempest_label_8irAI",Mf="tempest_connector_lyeWp",xe={stepper:$f,vertical:kf,step:Nf,dot:Sf,completed:Cf,active:Ef,label:Tf,connector:Mf};function Lf({steps:e,current:t,orientation:n="horizontal",className:s}){return o.jsx("ol",{className:w.cn(xe.stepper,n==="vertical"&&xe.vertical,s),children:e.map((r,a)=>{const c=a<t,i=a===t;return o.jsxs(l.Fragment,{children:[o.jsxs("li",{className:w.cn(xe.step,c&&xe.completed,i&&xe.active),"aria-current":i?"step":void 0,children:[o.jsx("span",{className:xe.dot,children:c?"✓":a+1}),o.jsx("span",{className:xe.label,children:r.label})]}),a<e.length-1&&o.jsx("span",{className:w.cn(xe.connector,c&&xe.completed),"aria-hidden":!0})]},a)})})}function Ut(e,t,n){if(Number.isNaN(e))return e;if(t>n){const s=t;t=n,n=s}return e<t?t:e>n?n:e}function Rf(e,t=1){if(e===0)return"0 B";const n=["B","KB","MB","GB","TB"],s=1024,r=Math.min(Math.floor(Math.log(Math.abs(e))/Math.log(s)),n.length-1),a=e/s**r,c=r===0?0:Math.max(0,t);return`${parseFloat(a.toFixed(c)).toString()} ${n[r]}`}function Pf(e,t="en-US"){return new Intl.NumberFormat(t,{notation:"compact",maximumFractionDigits:1}).format(e)}const Df="tempest_wrapper_JNjXK",If="tempest_label_9XKNm",Af="tempest_row_cOARX",Ff="tempest_sm_RzVSU",Of="tempest_md_pezRm",Bf="tempest_lg_kYbIN",zf="tempest_disabled_vqmo2",Wf="tempest_btn_xuHhj",qf="tempest_value_NEatO",Ce={wrapper:Df,label:If,row:Af,sm:Ff,md:Of,lg:Bf,disabled:zf,btn:Wf,value:qf},Uf=l.forwardRef(function({value:t,onChange:n,min:s=0,max:r=Number.POSITIVE_INFINITY,step:a=1,size:c="md",disabled:i=!1,label:u,format:d,labels:p={decrement:"Diminuir",increment:"Aumentar"},className:m},f){const h=()=>{i||n(Ut(t-a,s,r))},_=()=>{i||n(Ut(t+a,s,r))},b=d?d(t):String(t),v=!i&&t>s,g=!i&&t<r;return o.jsxs("div",{ref:f,className:w.cn(Ce.wrapper,m),children:[u&&o.jsx("label",{className:Ce.label,children:u}),o.jsxs("div",{className:w.cn(Ce.row,Ce[c],i&&Ce.disabled),children:[o.jsx("button",{type:"button",className:Ce.btn,"aria-label":p.decrement,onClick:h,disabled:!v,children:"−"}),o.jsx("span",{className:Ce.value,role:"status","aria-live":"polite",children:b}),o.jsx("button",{type:"button",className:Ce.btn,"aria-label":p.increment,onClick:_,disabled:!g,children:"+"})]})]})}),Kf="tempest_wrapper_kudO9",Hf="tempest_disabled_2aZ0V",Gf="tempest_input_5BPNu",Qf="tempest_track_7ObdZ",Jf="tempest_thumb_-FTeK",Yf="tempest_label_LrH7V",Qe={wrapper:Kf,disabled:Hf,input:Gf,track:Qf,thumb:Jf,label:Yf},Xf=l.forwardRef(function({label:t,disabled:n,wrapperClassName:s,className:r,...a},c){return o.jsxs("label",{className:w.cn(Qe.wrapper,n&&Qe.disabled,s),children:[o.jsx("input",{ref:c,type:"checkbox",role:"switch",disabled:n,className:w.cn(Qe.input,r),...a}),o.jsx("span",{className:Qe.track,"aria-hidden":!0,children:o.jsx("span",{className:Qe.thumb})}),t&&o.jsx("span",{className:Qe.label,children:t})]})}),Vf="tempest_tag_16VPH",Zf="tempest_sm_pzyd5",eh="tempest_md_GL6tQ",th="tempest_lg_8tgXU",nh="tempest_neutral_jAd-x",sh="tempest_primary_AXKlN",rh="tempest_success_56lz4",oh="tempest_warning_UK7SC",ah="tempest_danger_kJ-yx",ch="tempest_info_hmHE-",ih="tempest_label_ZBPfO",lh="tempest_remove_UEwgr",rt={tag:Vf,sm:Zf,md:eh,lg:th,neutral:nh,primary:sh,success:rh,warning:oh,danger:ah,info:ch,label:ih,remove:lh};function uh({variant:e="neutral",size:t="md",onRemove:n,removeLabel:s="Remover",className:r,children:a,...c}){return o.jsxs("span",{className:w.cn(rt.tag,rt[e],rt[t],r),...c,children:[o.jsx("span",{className:rt.label,children:a}),n&&o.jsx("button",{type:"button",className:rt.remove,"aria-label":s,onClick:n,children:"×"})]})}const dh="tempest_scroll_unrJp",ph="tempest_table_Dkosn",mh="tempest_th_PNuEx",fh="tempest_td_jv9tA",hh="tempest_tr_7UG8J",_h="tempest_clickable_B6Si-",gh="tempest_alignRight_9hY0G",bh="tempest_alignCenter_YiUQy",yh="tempest_emptyRow_kdMiv",vh="tempest_priorityTablet_3alUt",xh="tempest_priorityDesktop_3f8Fq",wh="tempest_stackable_heix7",jh="tempest_stackableHead_mKGcA",$h="tempest_stackableRow_qPNqc",B={scroll:dh,table:ph,th:mh,td:fh,tr:hh,clickable:_h,alignRight:gh,alignCenter:bh,emptyRow:yh,priorityTablet:vh,priorityDesktop:xh,stackable:wh,stackableHead:jh,stackableRow:$h};function fn(e){if(e==="tablet")return B.priorityTablet;if(e==="desktop")return B.priorityDesktop}function Xn({columns:e,data:t,rowKey:n,onRowClick:s,emptyMessage:r="Nenhum registro encontrado.",className:a,stackOnMobile:c=!1}){return o.jsx("div",{className:w.cn(B.scroll,c&&B.stackable,a),children:o.jsxs("table",{className:B.table,children:[o.jsx("thead",{className:w.cn(c&&B.stackableHead),children:o.jsx("tr",{children:e.map(i=>o.jsx("th",{className:w.cn(B.th,i.align==="right"&&B.alignRight,i.align==="center"&&B.alignCenter,fn(i.priority)),style:{width:i.width},children:i.header},i.key))})}),o.jsx("tbody",{children:t.length===0?o.jsx("tr",{children:o.jsx("td",{className:B.emptyRow,colSpan:e.length,children:r})}):t.map((i,u)=>o.jsx("tr",{className:w.cn(B.tr,s&&B.clickable,c&&B.stackableRow),onClick:s?()=>s(i):void 0,children:e.map(d=>{const p=d.render?d.render(i,u):i[d.key];return o.jsx("td",{className:w.cn(B.td,d.align==="right"&&B.alignRight,d.align==="center"&&B.alignCenter,fn(d.priority),d.className),"data-label":typeof d.header=="string"?d.header:void 0,children:p},d.key)})},n(i,u)))})]})})}const kh="tempest_tablist_WR6ag",Nh="tempest_tab_IdDYc",Sh="tempest_active_PTNtG",Ch="tempest_panel_08i9c",Eh="tempest_pill_lGuqn",ot={tablist:kh,tab:Nh,active:Sh,panel:Ch,pill:Eh};function Th({items:e,defaultId:t,activeId:n,onChange:s,variant:r="underline",className:a}){const c=e.find(h=>!h.disabled),[i,u]=l.useState(t??c?.id),d=n!==void 0,p=d?n:i,m=e.find(h=>h.id===p)??c;function f(h){d||u(h),s?.(h)}return o.jsxs("div",{className:a,children:[o.jsx("div",{role:"tablist",className:w.cn(ot.tablist,r==="pill"&&ot.pill),children:e.map(h=>{const _=h.id===m?.id;return o.jsx("button",{type:"button",role:"tab","aria-selected":_,"aria-controls":`panel-${h.id}`,id:`tab-${h.id}`,disabled:h.disabled,className:w.cn(ot.tab,_&&ot.active),onClick:()=>f(h.id),children:h.label},h.id)})}),m&&o.jsx("div",{role:"tabpanel",id:`panel-${m.id}`,"aria-labelledby":`tab-${m.id}`,className:ot.panel,children:m.content})]})}const Mh="tempest_wrapper_C0gfg",Lh="tempest_label_cWLXP",Rh="tempest_required_rDZXE",Ph="tempest_textarea_Z-y6g",Dh="tempest_error_NWC9f",Ih="tempest_helper_gedut",Ah="tempest_errorText_ey07q",Be={wrapper:Mh,label:Lh,required:Rh,textarea:Ph,error:Dh,helper:Ih,errorText:Ah},Fh=l.forwardRef(function({label:t,helperText:n,error:s,wrapperClassName:r,className:a,id:c,required:i,...u},d){const p=l.useId(),m=c??p;return o.jsxs("div",{className:w.cn(Be.wrapper,s&&Be.error,r),children:[t&&o.jsxs("label",{htmlFor:m,className:Be.label,children:[t,i&&o.jsx("span",{className:Be.required,children:"*"})]}),o.jsx("textarea",{ref:d,id:m,"aria-invalid":!!s,required:i,className:w.cn(Be.textarea,a),...u}),s?o.jsx("span",{className:Be.errorText,children:s}):n?o.jsx("span",{className:Be.helper,children:n}):null]})}),Oh="tempest_timeline_utrkA",Bh="tempest_item_T5xdQ",zh="tempest_markerColumn_BMe4d",Wh="tempest_marker_kmPV-",qh="tempest_marker-primary_s9BNB",Uh="tempest_marker-success_areMM",Kh="tempest_marker-warning_rRrS8",Hh="tempest_marker-danger_3GEBk",Gh="tempest_marker-neutral_M2mnw",Qh="tempest_line_CwY-N",Jh="tempest_body_KpMJ6",Yh="tempest_row_AX2ti",Xh="tempest_title_DxfAX",Vh="tempest_meta_GU0ih",Zh="tempest_description_f9sxV",J={timeline:Oh,item:Bh,markerColumn:zh,marker:Wh,markerPrimary:qh,markerSuccess:Uh,markerWarning:Kh,markerDanger:Hh,markerNeutral:Gh,line:Qh,body:Jh,row:Yh,title:Xh,meta:Vh,description:Zh};function e_({items:e,connector:t=!0,className:n,...s}){return o.jsx("ol",{className:w.cn(J.timeline,t&&J.connector,n),...s,children:e.map((r,a)=>{const c=a===e.length-1;return o.jsxs("li",{className:J.item,children:[o.jsxs("div",{className:J.markerColumn,children:[o.jsx("span",{className:w.cn(J.marker,J[`marker-${r.marker??"primary"}`]),"aria-hidden":"true",children:r.icon}),t&&!c&&o.jsx("span",{className:J.line,"aria-hidden":"true"})]}),o.jsxs("div",{className:J.body,children:[o.jsxs("div",{className:J.row,children:[o.jsx("span",{className:J.title,children:r.title}),r.meta&&o.jsx("span",{className:J.meta,children:r.meta})]}),r.description&&o.jsx("p",{className:J.description,children:r.description})]})]},r.id)})})}const t_="tempest_trigger_Dmc5E",n_="tempest_bubble_TPGHB",s_="tempest_tempest-tooltip-in_csYeZ",r_="tempest_top_m2tnn",o_="tempest_bottom_9Twz4",a_="tempest_left_UPdrG",c_="tempest_right_CV--T",Pt={trigger:t_,bubble:n_,tempestTooltipIn:s_,top:r_,bottom:o_,left:a_,right:c_};function i_({content:e,placement:t="top",children:n,disabled:s=!1,openDelay:r=150}){const[a,c]=l.useState(!1),i=l.useId();let u=null;function d(){s||(u&&clearTimeout(u),u=setTimeout(()=>c(!0),r))}function p(){u&&(clearTimeout(u),u=null),c(!1)}const m=l.cloneElement(n,{onMouseEnter:d,onMouseLeave:p,onFocus:d,onBlur:p,"aria-describedby":a?i:void 0});return o.jsxs("span",{className:Pt.trigger,children:[m,a&&o.jsx("span",{id:i,role:"tooltip",className:w.cn(Pt.bubble,Pt[t]),children:e})]})}const l_="tempest_container_x4-Qm",u_="tempest_positionTopRight_gbUCQ",d_="tempest_positionTopLeft_Z-tMJ",p_="tempest_positionTopCenter_A4Ze4",m_="tempest_positionBottomRight_MGo19",f_="tempest_positionBottomLeft_DpiNe",h_="tempest_positionBottomCenter_XUdok",__="tempest_toast_FLdHz",g_="tempest_tempest-toast-in_E2d-A",b_="tempest_success_Oy694",y_="tempest_warning_84GC8",v_="tempest_error_hrQAA",x_="tempest_info_eq5bQ",w_="tempest_title_-H6R2",j_="tempest_description_-QwfC",$_="tempest_close_i10-s",ee={container:l_,positionTopRight:u_,positionTopLeft:d_,positionTopCenter:p_,positionBottomRight:m_,positionBottomLeft:f_,positionBottomCenter:h_,toast:__,tempestToastIn:g_,success:b_,warning:y_,error:v_,info:x_,title:w_,description:j_,close:$_},Vn=l.createContext(null);function k_(){const e=l.useContext(Vn);if(!e)throw new Error("useToast must be used inside a <ToastProvider>");return e}function N_({children:e,defaultDuration:t=4e3,position:n="top-right"}){const[s,r]=l.useState([]),a=l.useRef(0),c=l.useCallback(d=>{r(p=>p.filter(m=>m.id!==d))},[]),i=l.useCallback(d=>{const p=d.id??`toast-${++a.current}`,m={id:p,title:d.title,description:d.description,variant:d.variant??"info",duration:d.duration??t};return r(f=>[...f,m]),p},[t]),u=l.useMemo(()=>({show:i,dismiss:c,success:(d,p)=>i({...p,description:d,variant:"success"}),error:(d,p)=>i({...p,description:d,variant:"error"}),warning:(d,p)=>i({...p,description:d,variant:"warning"}),info:(d,p)=>i({...p,description:d,variant:"info"})}),[i,c]);return o.jsxs(Vn.Provider,{value:u,children:[e,o.jsx(C_,{toasts:s,onDismiss:c,position:n})]})}function S_(e){switch(e){case"top-left":return ee.positionTopLeft;case"top-center":return ee.positionTopCenter;case"bottom-right":return ee.positionBottomRight;case"bottom-left":return ee.positionBottomLeft;case"bottom-center":return ee.positionBottomCenter;default:return ee.positionTopRight}}function C_({toasts:e,onDismiss:t,position:n}){return typeof document>"u"?null:Ve.createPortal(o.jsx("div",{className:w.cn(ee.container,S_(n)),"aria-live":"polite","aria-atomic":"true",children:e.map(s=>o.jsx(E_,{toast:s,onDismiss:t},s.id))}),document.body)}function E_({toast:e,onDismiss:t}){return l.useEffect(()=>{if(!e.duration)return;const n=setTimeout(()=>t(e.id),e.duration);return()=>clearTimeout(n)},[e.id,e.duration,t]),o.jsxs("div",{className:w.cn(ee.toast,ee[e.variant]),role:"status",children:[o.jsxs("div",{children:[e.title&&o.jsx("p",{className:ee.title,children:e.title}),e.description&&o.jsx("p",{className:ee.description,children:e.description})]}),o.jsx("button",{type:"button",className:ee.close,"aria-label":"Fechar notificação",onClick:()=>t(e.id),children:o.jsx(T_,{})})]})}function T_(){return o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 6l12 12M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const M_="tempest_scroll_8Giwl",L_="tempest_spacer_P3Pvl",R_="tempest_row_Ff0VU",Dt={scroll:M_,spacer:L_,row:R_};function P_({items:e,itemHeight:t,renderItem:n,height:s,overscan:r=4,getKey:a,className:c,style:i}){const u=l.useRef(null),[d,p]=l.useState(0),[m,f]=l.useState(0);l.useEffect(()=>{const g=u.current;if(!g||(f(g.clientHeight),typeof ResizeObserver>"u"))return;const x=new ResizeObserver(()=>f(g.clientHeight));return x.observe(g),()=>x.disconnect()},[]);const h=e.length*t,_=Math.max(0,Math.floor(d/t)-r),b=Math.ceil(m/t)+r*2,v=Math.min(e.length,_+b);return o.jsx("div",{ref:u,className:w.cn(Dt.scroll,c),style:{height:s,...i},onScroll:g=>p(g.target.scrollTop),role:"list",children:o.jsx("div",{className:Dt.spacer,style:{height:h},children:e.slice(_,v).map((g,x)=>{const y=_+x,j=a?a(g,y):y;return o.jsx("div",{role:"listitem",className:Dt.row,style:{top:y*t,height:t},children:n(g,y)},j)})})})}const D_="tempest_button_58f9i",I_="tempest_copied_WkLgR",hn={button:D_,copied:I_};function A_({value:e,timeout:t=2e3,children:n,onCopied:s,className:r,onClick:a,...c}){const[i,u]=l.useState(!1),d=l.useRef(null);l.useEffect(()=>()=>{d.current!==null&&clearTimeout(d.current)},[]);const p=l.useCallback(async m=>{a?.(m);try{await navigator.clipboard.writeText(e),u(!0),s?.(),d.current!==null&&clearTimeout(d.current),d.current=setTimeout(()=>u(!1),t)}catch{}},[e,t,s,a]);return o.jsx("button",{type:"button",className:w.cn(hn.button,i&&hn.copied,r),"data-copied":i||void 0,onClick:p,...c,children:n??(i?"Copied":"Copy")})}const F_={justNow:"agora há pouco",secondsAgo:e=>`${e} s atrás`,minutesAgo:e=>`${e} min atrás`,hoursAgo:e=>e===1?"1 hora atrás":`${e} horas atrás`,daysAgo:e=>e===1?"ontem":`${e} dias atrás`,weeksAgo:e=>e===1?"semana passada":`${e} semanas atrás`,monthsAgo:e=>e===1?"mês passado":`${e} meses atrás`,yearsAgo:e=>e===1?"ano passado":`${e} anos atrás`,inSeconds:e=>`em ${e} s`,inMinutes:e=>`em ${e} min`,inHours:e=>`em ${e} h`,inDays:e=>`em ${e} ${e===1?"dia":"dias"}`,inWeeks:e=>`em ${e} ${e===1?"semana":"semanas"}`,inMonths:e=>`em ${e} ${e===1?"mês":"meses"}`,inYears:e=>`em ${e} ${e===1?"ano":"anos"}`},O_={justNow:"just now",secondsAgo:e=>`${e}s ago`,minutesAgo:e=>`${e}m ago`,hoursAgo:e=>`${e}h ago`,daysAgo:e=>e===1?"yesterday":`${e} days ago`,weeksAgo:e=>`${e}w ago`,monthsAgo:e=>`${e}mo ago`,yearsAgo:e=>`${e}y ago`,inSeconds:e=>`in ${e}s`,inMinutes:e=>`in ${e}m`,inHours:e=>`in ${e}h`,inDays:e=>`in ${e}d`,inWeeks:e=>`in ${e}w`,inMonths:e=>`in ${e}mo`,inYears:e=>`in ${e}y`},B_={"pt-BR":F_,en:O_},Kt=1e3,Ht=60*Kt,Gt=60*Ht,ut=24*Gt,_n=7*ut,gn=30*ut,bn=365*ut;function Zn(e,t={}){const{locale:n="pt-BR",now:s=Date.now()}=t,r=B_[n],a=e instanceof Date?e.getTime():new Date(e).getTime(),i=(typeof s=="number"?s:s.getTime())-a,u=i>=0,d=Math.abs(i);if(d<30*Kt)return r.justNow;if(d<Ht){const m=Math.round(d/Kt);return u?r.secondsAgo(m):r.inSeconds(m)}if(d<Gt){const m=Math.round(d/Ht);return u?r.minutesAgo(m):r.inMinutes(m)}if(d<ut){const m=Math.round(d/Gt);return u?r.hoursAgo(m):r.inHours(m)}if(d<_n){const m=Math.round(d/ut);return u?r.daysAgo(m):r.inDays(m)}if(d<gn){const m=Math.round(d/_n);return u?r.weeksAgo(m):r.inWeeks(m)}if(d<bn){const m=Math.round(d/gn);return u?r.monthsAgo(m):r.inMonths(m)}const p=Math.round(d/bn);return u?r.yearsAgo(p):r.inYears(p)}function z_({date:e,locale:t="pt",...n}){const s=e instanceof Date?e:new Date(e),r=Number.isNaN(s.getTime())?void 0:s.toISOString(),a=Zn(e,{locale:t==="pt"?"pt-BR":"en"});return o.jsx("time",{dateTime:r,...n,children:a})}function W_({cents:e,currency:t="BRL",locale:n="pt-BR",...s}){const r=new Intl.NumberFormat(n,{style:"currency",currency:t}).format(e/100);return o.jsx("span",{...s,children:r})}const q_="tempest_clamp_r43C-",U_={clamp:q_};function K_({lines:e=1,className:t,style:n,children:s,...r}){const a={...n,"--tempest-clamp-lines":e};return o.jsx("div",{className:w.cn(U_.clamp,t),style:a,...r,children:s})}const H_="tempest_hidden_k7p-e",G_={hidden:H_};function Q_({as:e="span",className:t,children:n,...s}){return l.createElement(e,{className:w.cn(G_.hidden,t),...s},n)}function es({children:e,container:t}){const[n,s]=l.useState(!1);return l.useEffect(()=>(s(!0),()=>s(!1)),[]),!n||typeof document>"u"?null:Ve.createPortal(e,t??document.body)}function J_({onOutside:e,children:t,...n}){const s=l.useRef(null),r=l.useRef(e);return r.current=e,l.useEffect(()=>{if(typeof document>"u")return;function a(c){const i=s.current,u=c.target;i&&u&&!i.contains(u)&&r.current(c)}return document.addEventListener("mousedown",a),document.addEventListener("touchstart",a),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("touchstart",a)}},[]),o.jsx("div",{ref:s,...n,children:t})}function Y_({condition:e,wrapper:t,children:n}){return e?t(n):o.jsx(o.Fragment,{children:n})}function X_({each:e,children:t,fallback:n=null}){return e.length===0?o.jsx(o.Fragment,{children:n}):o.jsx(o.Fragment,{children:e.map((s,r)=>o.jsx(l.Fragment,{children:t(s,r)},r))})}const V_="tempest_errorText_LU3jn",Z_={errorText:V_};function eg({children:e,className:t,...n}){return e==null||e===!1||e===""?null:o.jsx("p",{role:"alert",className:w.cn(Z_.errorText,t),...n,children:e})}const tg="tempest_image_Zq9Zs",ng={image:tg};function sg({src:e,fallback:t,alt:n,lazy:s=!0,className:r,onError:a,...c}){const[i,u]=l.useState(e),[d,p]=l.useState(!1);return o.jsx("img",{src:i,alt:n,loading:s?"lazy":"eager",className:w.cn(ng.image,r),onError:m=>{t&&!d&&i!==t&&(p(!0),u(t)),a?.(m)},...c})}const rg="tempest_list_bAP4Q",og="tempest_item_oRy5T",yn={list:rg,item:og};function ag({items:e,renderItem:t,keyExtractor:n,empty:s,className:r,...a}){return e.length===0?o.jsx(o.Fragment,{children:s??null}):o.jsx("ul",{className:w.cn(yn.list,r),...a,children:e.map((c,i)=>o.jsx("li",{className:yn.item,children:t(c,i)},n?n(c,i):i))})}const cg="tempest_list_fwIXq",ig="tempest_term_QkQNZ",lg="tempest_description_e1bNN",It={list:cg,term:ig,description:lg};function ug({items:e,className:t,...n}){return o.jsx("dl",{className:w.cn(It.list,t),...n,children:e.map((s,r)=>o.jsxs(l.Fragment,{children:[o.jsx("dt",{className:It.term,children:s.term}),o.jsx("dd",{className:It.description,children:s.description})]},r))})}const dg="tempest_toggle_kmzmH",pg="tempest_outline_aFbzy",mg="tempest_pressed_hX319",fg="tempest_sm_JTqaB",hg="tempest_md_QfS4K",_g="tempest_lg_ajzsM",ht={toggle:dg,outline:pg,pressed:mg,sm:fg,md:hg,lg:_g},gg=l.forwardRef(function({pressed:t,defaultPressed:n=!1,onPressedChange:s,size:r="md",variant:a="default",className:c,disabled:i,onClick:u,children:d,...p},m){const f=t!==void 0,[h,_]=l.useState(n),b=f?t:h,v=l.useCallback(g=>{if(u?.(g),g.defaultPrevented)return;const x=!b;f||_(x),s?.(x)},[b,f,u,s]);return o.jsx("button",{ref:m,type:"button","aria-pressed":b,disabled:i,"data-state":b?"on":"off",className:w.cn(ht.toggle,ht[r],ht[a],b&&ht.pressed,c),onClick:v,...p,children:d})}),bg="tempest_group_XZCDJ",yg="tempest_item_B-27E",vg="tempest_selected_OHPVQ",Qt={group:bg,item:yg,selected:vg},ts=l.createContext(null);function xg(){const e=l.useContext(ts);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e}function vn(e){return e===void 0?[]:Array.isArray(e)?e:[e]}function wg({type:e="single",value:t,defaultValue:n,onValueChange:s,className:r,children:a,...c}){const i=t!==void 0,[u,d]=l.useState(()=>vn(n)),p=i?vn(t):u,m=l.useCallback(_=>{i||d(_),s?.(e==="single"?_[0]??"":_)},[i,s,e]),f=l.useCallback(_=>{const b=p.includes(_);m(e==="single"?b?[]:[_]:b?p.filter(v=>v!==_):[...p,_])},[p,e,m]),h=l.useMemo(()=>({type:e,isSelected:_=>p.includes(_),toggle:f}),[e,p,f]);return o.jsx(ts.Provider,{value:h,children:o.jsx("div",{role:"group",className:w.cn(Qt.group,r),...c,children:a})})}function jg({value:e,disabled:t,className:n,children:s,...r}){const{isSelected:a,toggle:c}=xg(),i=a(e);return o.jsx("button",{type:"button",role:"button","aria-pressed":i,disabled:t,"data-state":i?"on":"off",className:w.cn(Qt.item,i&&Qt.selected,n),onClick:()=>c(e),...r,children:s})}const $g="tempest_label_RaRvM",kg="tempest_asterisk_1CgE8",xn={label:$g,asterisk:kg},Ng=l.forwardRef(function({required:t=!1,className:n,children:s,...r},a){return o.jsxs("label",{ref:a,className:w.cn(xn.label,n),...r,children:[s,t&&o.jsx("span",{className:xn.asterisk,"aria-hidden":!0,children:"*"})]})}),Sg="tempest_collapsible_8jmKP",Cg="tempest_trigger_ers75",Eg="tempest_content_XmUZL",_t={collapsible:Sg,trigger:Cg,content:Eg};function Tg({open:e,defaultOpen:t=!1,onOpenChange:n,trigger:s,className:r,children:a,...c}){const i=l.useId(),u=`${i}-content`,d=`${i}-trigger`,p=e!==void 0,[m,f]=l.useState(t),h=p?e:m,_=l.useCallback(()=>{const b=!h;p||f(b),n?.(b)},[h,p,n]);return o.jsxs("div",{className:w.cn(_t.collapsible,h&&_t.open,r),...c,children:[o.jsx("button",{type:"button",id:d,className:_t.trigger,"aria-expanded":h,"aria-controls":u,onClick:_,children:s}),o.jsx("div",{id:u,role:"region","aria-labelledby":d,hidden:!h,className:_t.content,children:a})]})}const Mg="tempest_root_OxRHj",Lg="tempest_menu_MDn4t",Rg="tempest_item_PoiMY",Pg="tempest_active_ATcDu",Dg="tempest_danger_COgly",Ig="tempest_separator_omuCz",Je={root:Mg,menu:Lg,item:Rg,active:Pg,danger:Dg,separator:Ig};function wn(e){return"separator"in e&&e.separator===!0}function Ag({items:e,children:t,className:n}){const[s,r]=l.useState(!1),[a,c]=l.useState({x:0,y:0}),[i,u]=l.useState(-1),d=l.useId(),p=l.useRef(null),m=l.useRef([]),f=e.map((v,g)=>!wn(v)&&!v.disabled?g:-1).filter(v=>v!==-1),h=l.useCallback(()=>{r(!1),u(-1)},[]),_=v=>{v.preventDefault(),c({x:v.clientX,y:v.clientY}),u(-1),r(!0)};l.useEffect(()=>{if(!s)return;const v=x=>{if(x.key==="Escape"){h();return}if(x.key==="ArrowDown"){x.preventDefault();const y=f.indexOf(i),j=f[(y+1)%f.length]??-1;u(j),m.current[j]?.focus()}if(x.key==="ArrowUp"){x.preventDefault();const y=f.indexOf(i),j=f[(y-1+f.length)%f.length]??-1;u(j),m.current[j]?.focus()}},g=x=>{p.current&&!p.current.contains(x.target)&&h()};return window.addEventListener("keydown",v),window.addEventListener("mousedown",g),()=>{window.removeEventListener("keydown",v),window.removeEventListener("mousedown",g)}},[s,i,f,h]);const b=v=>{v.onSelect?.(),h()};return o.jsxs(o.Fragment,{children:[o.jsx("span",{className:Je.root,onContextMenu:_,children:t}),s&&o.jsx(es,{children:o.jsx("ul",{ref:p,id:d,role:"menu",className:w.cn(Je.menu,n),style:{top:a.y,left:a.x},children:e.map((v,g)=>wn(v)?o.jsx("li",{role:"separator",className:Je.separator,"aria-hidden":!0},`separator-${g}`):o.jsx("li",{role:"none",children:o.jsx("button",{ref:x=>{m.current[g]=x},type:"button",role:"menuitem",className:w.cn(Je.item,v.danger&&Je.danger,i===g&&Je.active),disabled:v.disabled,onClick:()=>b(v),onMouseEnter:()=>u(g),children:v.label})},`item-${g}`))})})]})}const Fg="tempest_root_2KoZA",Og="tempest_trigger_OXsnr",Bg="tempest_card_CoGx4",zg="tempest_tempest-hover-card-in_jD85J",Wg="tempest_top_AVcQ0",qg="tempest_bottom_2rLAA",Ug="tempest_left_tqGPt",Kg="tempest_right_9Fe6S",gt={root:Fg,trigger:Og,card:Bg,tempestHoverCardIn:zg,top:Wg,bottom:qg,left:Ug,right:Kg};function Hg({trigger:e,children:t,openDelay:n=300,closeDelay:s=150,placement:r="bottom",className:a,...c}){const[i,u]=l.useState(!1),d=l.useId(),p=l.useRef(null),m=l.useCallback(()=>{p.current!==null&&(clearTimeout(p.current),p.current=null)},[]),f=l.useCallback(()=>{m(),p.current=setTimeout(()=>u(!0),n)},[m,n]),h=l.useCallback(()=>{m(),p.current=setTimeout(()=>u(!1),s)},[m,s]);return l.useEffect(()=>m,[m]),o.jsxs("span",{className:gt.root,onMouseEnter:f,onMouseLeave:h,onFocus:f,onBlur:h,children:[o.jsx("span",{"aria-describedby":i?d:void 0,className:gt.trigger,children:e}),i&&o.jsx("div",{id:d,role:"dialog",className:w.cn(gt.card,gt[r],a),...c,children:t})]})}const Gg=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function ns(e,t){l.useEffect(()=>{if(!t)return;const n=e.current;if(!n)return;const s=document.activeElement;function r(){return Array.from(n?.querySelectorAll(Gg)??[]).filter(i=>{if(i.hasAttribute("aria-hidden"))return!1;const u=typeof window<"u"?window.getComputedStyle(i):null;return!(u&&(u.display==="none"||u.visibility==="hidden"))})}function a(i){if(i.key!=="Tab")return;const u=r();if(u.length===0){i.preventDefault();return}const d=u[0],p=u[u.length-1],m=document.activeElement;i.shiftKey?(m===d||!m||!n?.contains(m))&&(i.preventDefault(),p.focus()):m===p&&(i.preventDefault(),d.focus())}return r()[0]?.focus(),document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a),s?.focus?.()}},[e,t])}const Qg="tempest_overlay_drnPW",Jg="tempest_dialog_lPl6k",Yg="tempest_inputRow_KxWoQ",Xg="tempest_searchIcon_8PULr",Vg="tempest_input_D3HQr",Zg="tempest_list_5UzZU",eb="tempest_group_vLaWy",tb="tempest_groupHeading_d01fo",nb="tempest_groupList_QFMjK",sb="tempest_option_doqib",rb="tempest_active_LdCIJ",ob="tempest_icon_CyCCx",ab="tempest_label_QePT-",cb="tempest_empty_al68D",W={overlay:Qg,dialog:Jg,inputRow:Yg,searchIcon:Xg,input:Vg,list:Zg,group:eb,groupHeading:tb,groupList:nb,option:sb,active:rb,icon:ob,label:ab,empty:cb};function ib(e,t){return t===""||e.label.toLowerCase().includes(t)?!0:(e.keywords??[]).some(n=>n.toLowerCase().includes(t))}function jn(e){const t=[],n=new Map;for(const s of e){const r=n.get(s.group);r===void 0?(n.set(s.group,t.length),t.push({name:s.group,items:[s]})):t[r].items.push(s)}return t}function lb({open:e,onOpenChange:t,items:n,placeholder:s="Type a command…",emptyMessage:r="No results",className:a}){const c=l.useRef(null),[i,u]=l.useState(""),[d,p]=l.useState(0),m="tempest-command-list";ns(c,e);const f=l.useMemo(()=>{const g=i.trim().toLowerCase(),x=n.filter(y=>ib(y,g));return jn(x).flatMap(y=>y.items)},[n,i]),h=l.useMemo(()=>jn(f),[f]);if(l.useEffect(()=>{e&&(u(""),p(0))},[e]),l.useEffect(()=>{p(g=>f.length===0?0:Math.min(g,f.length-1))},[f.length]),!e||typeof document>"u")return null;function _(g){g.onSelect(),t(!1)}function b(g){if(g.key==="Escape"){g.preventDefault(),t(!1);return}if(g.key==="ArrowDown"){if(g.preventDefault(),f.length===0)return;p(x=>(x+1)%f.length);return}if(g.key==="ArrowUp"){if(g.preventDefault(),f.length===0)return;p(x=>(x-1+f.length)%f.length);return}if(g.key==="Enter"){g.preventDefault();const x=f[d];x&&_(x)}}let v=-1;return Ve.createPortal(o.jsx("div",{className:W.overlay,role:"presentation",onClick:()=>t(!1),children:o.jsxs("div",{ref:c,role:"dialog","aria-modal":"true","aria-label":"Command palette",className:w.cn(W.dialog,a),onClick:g=>g.stopPropagation(),children:[o.jsxs("div",{className:W.inputRow,children:[o.jsx(ub,{}),o.jsx("input",{type:"text",role:"combobox","aria-expanded":"true","aria-controls":m,"aria-autocomplete":"list",autoFocus:!0,className:W.input,placeholder:s,value:i,onChange:g=>u(g.target.value),onKeyDown:b})]}),o.jsx("ul",{id:m,role:"listbox",className:W.list,children:f.length===0?o.jsx("li",{className:W.empty,children:r}):h.map(g=>o.jsxs("li",{className:W.group,children:[g.name&&o.jsx("div",{className:W.groupHeading,children:g.name}),o.jsx("ul",{role:"presentation",className:W.groupList,children:g.items.map(x=>{v+=1;const y=v===d,j=v;return o.jsxs("li",{role:"option","aria-selected":y,className:w.cn(W.option,y&&W.active),onMouseMove:()=>p(j),onClick:()=>_(x),children:[x.icon&&o.jsx("span",{className:W.icon,children:x.icon}),o.jsx("span",{className:W.label,children:x.label})]},x.id)})})]},g.name??"__ungrouped__"))})]})}),document.body)}function ub(){return o.jsxs("svg",{className:W.searchIcon,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[o.jsx("circle",{cx:"11",cy:"11",r:"7",stroke:"currentColor",strokeWidth:"2"}),o.jsx("path",{d:"M20 20l-3.5-3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}const db="tempest_root_cWKqF",pb={root:db},mb=l.forwardRef(function({maxHeight:t,orientation:n="vertical",className:s,style:r,children:a,...c},i){const u={overflowX:n==="vertical"?"hidden":"auto",overflowY:n==="horizontal"?"hidden":"auto",...t!==void 0?{maxHeight:t}:{},...r};return o.jsx("div",{ref:i,className:w.cn(pb.root,s),style:u,...c,children:a})}),fb="tempest_root_-Xerf",hb="tempest_horizontal_3QOMV",_b="tempest_vertical_6A7lb",gb="tempest_pane_x6yUG",bb="tempest_divider_fhaTB",yb="tempest_handle_eCe1B",ze={root:fb,horizontal:hb,vertical:_b,pane:gb,divider:bb,handle:yb},bt=2;function At(e,t,n){return Math.min(n,Math.max(t,e))}function vb({direction:e="horizontal",defaultSize:t=50,min:n=10,max:s=90,children:r,className:a,...c}){const[i,u]=l.useState(()=>At(t,n,s)),d=l.useRef(null),[p,m]=r,f=e==="horizontal",h=l.useCallback((v,g)=>{const x=d.current;if(!x)return;const y=x.getBoundingClientRect(),j=f?y.width:y.height;if(j<=0)return;const M=(f?v-y.left:g-y.top)/j*100;u(At(M,n,s))},[f,n,s]),_=l.useCallback(v=>{v.preventDefault(),v.currentTarget.setPointerCapture(v.pointerId);const x=j=>{h(j.clientX,j.clientY)},y=()=>{window.removeEventListener("pointermove",x),window.removeEventListener("pointerup",y)};window.addEventListener("pointermove",x),window.addEventListener("pointerup",y)},[h]),b=l.useCallback(v=>{let g=0;if(f?v.key==="ArrowRight"?g=bt:v.key==="ArrowLeft"&&(g=-bt):v.key==="ArrowDown"?g=bt:v.key==="ArrowUp"&&(g=-bt),v.key==="Home"){v.preventDefault(),u(n);return}if(v.key==="End"){v.preventDefault(),u(s);return}g!==0&&(v.preventDefault(),u(x=>At(x+g,n,s)))},[f,n,s]);return o.jsxs("div",{ref:d,className:w.cn(ze.root,f?ze.horizontal:ze.vertical,a),...c,children:[o.jsx("div",{className:ze.pane,style:{flexBasis:`${i}%`},children:p}),o.jsx("div",{role:"separator","aria-orientation":f?"vertical":"horizontal","aria-valuenow":Math.round(i),"aria-valuemin":n,"aria-valuemax":s,tabIndex:0,className:ze.divider,onPointerDown:_,onKeyDown:b,children:o.jsx("span",{className:ze.handle,"aria-hidden":"true"})}),o.jsx("div",{className:ze.pane,style:{flexBasis:`${100-i}%`},children:m})]})}const xb="tempest_root_ObO-Z",wb="tempest_header_5nSJG",jb="tempest_title_Jd3Xb",$b="tempest_nav_4h58I",kb="tempest_weekdays_YzRfx",Nb="tempest_grid_nbaFm",Sb="tempest_weekday_k-7Vr",Cb="tempest_day_ao-IC",Eb="tempest_outside_HkC-6",Tb="tempest_today_p18-m",Mb="tempest_selected_C9bTY",Y={root:xb,header:wb,title:jb,nav:$b,weekdays:kb,grid:Nb,weekday:Sb,day:Cb,outside:Eb,today:Tb,selected:Mb},Lb=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Rb=["January","February","March","April","May","June","July","August","September","October","November","December"],ss=42;function Ye(e,t,n){return new Date(e,t,n)}function wt(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function $n(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function kn(e,t,n){const s=wt(e).getTime();return!!(t&&s<wt(t).getTime()||n&&s>wt(n).getTime())}function Pb(e,t){const n=e.getFullYear(),s=e.getMonth(),c=(Ye(n,s,1).getDay()-t+7)%7,i=Ye(n,s,1-c),u=[];for(let d=0;d<ss;d+=1)u.push(Ye(i.getFullYear(),i.getMonth(),i.getDate()+d));return u}function Db({value:e,defaultValue:t,onChange:n,month:s,onMonthChange:r,minDate:a,maxDate:c,weekStartsOn:i=0,className:u,...d}){const p=e!==void 0,[m,f]=l.useState(t),h=p?e:m,_=s!==void 0,[b,v]=l.useState(()=>{const $=s??e??t??new Date;return Ye($.getFullYear(),$.getMonth(),1)}),g=_?Ye(s.getFullYear(),s.getMonth(),1):b,[x,y]=l.useState(null),j=l.useRef(null),S=l.useMemo(()=>wt(new Date),[]),M=l.useMemo(()=>Pb(g,i),[g,i]),T=l.useMemo(()=>Array.from({length:7},($,C)=>Lb[(C+i)%7]),[i]),N=l.useCallback($=>{const C=Ye(g.getFullYear(),g.getMonth()+$,1);r&&r(C),_||v(C)},[g,r,_]),k=l.useCallback($=>{kn($,a,c)||(n&&n($),p||f($))},[a,c,n,p]),E=l.useCallback($=>{const C=Math.max(0,Math.min(ss-1,$));y(C);const I=j.current;if(!I)return;I.querySelectorAll("button[data-day]")[C]?.focus()},[]),P=l.useCallback(($,C)=>{switch($.key){case"ArrowLeft":$.preventDefault(),E(C-1);break;case"ArrowRight":$.preventDefault(),E(C+1);break;case"ArrowUp":$.preventDefault(),E(C-7);break;case"ArrowDown":$.preventDefault(),E(C+7);break;case"Enter":case" ":$.preventDefault(),k(M[C]);break}},[E,k,M]);return o.jsxs("div",{className:w.cn(Y.root,u),...d,children:[o.jsxs("div",{className:Y.header,children:[o.jsx("button",{type:"button",className:Y.nav,"aria-label":"Previous month",onClick:()=>N(-1),children:"‹"}),o.jsxs("span",{className:Y.title,"aria-live":"polite",children:[Rb[g.getMonth()]," ",g.getFullYear()]}),o.jsx("button",{type:"button",className:Y.nav,"aria-label":"Next month",onClick:()=>N(1),children:"›"})]}),o.jsx("div",{className:Y.weekdays,role:"row",children:T.map($=>o.jsx("span",{className:Y.weekday,role:"columnheader",children:$},$))}),o.jsx("div",{className:Y.grid,role:"grid",ref:j,children:M.map(($,C)=>{const I=$.getMonth()===g.getMonth(),R=h?$n($,h):!1,L=$n($,S),q=kn($,a,c),mt=x===null?I&&$.getDate()===1:x===C;return o.jsx("button",{type:"button","data-day":!0,role:"gridcell",className:w.cn(Y.day,!I&&Y.outside,R&&Y.selected,L&&Y.today),"aria-pressed":R,"aria-selected":R,"aria-current":L?"date":void 0,disabled:q,tabIndex:mt?0:-1,onClick:()=>k($),onKeyDown:Vs=>P(Vs,C),children:$.getDate()},C)})})]})}const Ib="tempest_wrapper_KCCs1",Ab="tempest_label_N4ak-",Fb="tempest_value_-33zj",Ob="tempest_field_wFJsg",Bb="tempest_track_kaJkL",zb="tempest_fill_tio-b",Wb="tempest_input_J48Um",qb="tempest_helper_yn8VW",Ee={wrapper:Ib,label:Ab,value:Fb,field:Ob,track:Bb,fill:zb,input:Wb,helper:qb};function Ub({value:e,onChange:t,min:n=0,max:s=100,step:r=1,label:a,helperText:c,disabled:i=!1,formatValue:u,className:d}){const p=l.useMemo(()=>{const h=s-n;return h<=0?0:Math.min(100,Math.max(0,(e-n)/h*100))},[e,n,s]),m=u?.(e)??String(e),f=l.useCallback(h=>{t(Number(h.target.value))},[t]);return o.jsxs("div",{className:w.cn(Ee.wrapper,d),children:[a&&o.jsxs("div",{className:Ee.label,children:[o.jsx("span",{children:a}),o.jsx("span",{className:Ee.value,children:m})]}),o.jsxs("div",{className:Ee.field,children:[o.jsx("div",{className:Ee.track}),o.jsx("div",{className:Ee.fill,style:{width:`${p}%`}}),o.jsx("input",{type:"range",className:Ee.input,min:n,max:s,step:r,value:e,onChange:f,disabled:i,"aria-label":a??"Slider","aria-valuetext":m})]}),c&&o.jsx("span",{className:Ee.helper,children:c})]})}const Kb="tempest_wrapper_6xZZr",Hb="tempest_label_Jwj7I",Gb="tempest_field_GpA0V",Qb="tempest_disabled_BIKaG",Jb="tempest_chip_Zk0ch",Yb="tempest_chipRemove_R-mNv",Xb="tempest_input_SjOXU",Vb="tempest_menu_3xnmo",Zb="tempest_option_lqEl1",ey="tempest_check_aUM1w",ty="tempest_active_S9sQ-",ny="tempest_selected_Rw8yr",sy="tempest_empty_-5B16",ry="tempest_helper_c7aH3",oy="tempest_errorText_qZR9s",ay="tempest_error_DIOTW",O={wrapper:Kb,label:Hb,field:Gb,disabled:Qb,chip:Jb,chipRemove:Yb,input:Xb,menu:Vb,option:Zb,check:ey,active:ty,selected:ny,empty:sy,helper:ry,errorText:oy,error:ay};function cy(e,t){return t?e.label.toLowerCase().includes(t.toLowerCase()):!0}function iy({options:e,value:t,onChange:n,label:s,placeholder:r="Selecione",helperText:a,error:c,disabled:i,maxItems:u,filter:d=cy,emptyMessage:p="Nenhuma opção encontrada",className:m}){const f=l.useId(),h=l.useRef(null),_=l.useRef(null),[b,v]=l.useState(!1),[g,x]=l.useState(""),[y,j]=l.useState(0),S=l.useMemo(()=>new Set(t),[t]),M=l.useMemo(()=>t.map($=>e.find(C=>C.value===$)).filter($=>!!$),[t,e]),T=l.useMemo(()=>e.filter($=>d($,g)),[e,d,g]),N=u!==void 0&&t.length>=u,k=l.useCallback($=>{if(!$.disabled){if(S.has($.value))n(t.filter(C=>C!==$.value));else{if(N)return;n([...t,$.value])}x(""),_.current?.focus()}},[S,n,t,N]),E=l.useCallback($=>{n(t.filter(C=>C!==$))},[n,t]);l.useEffect(()=>{if(!b)return;const $=C=>{h.current&&!h.current.contains(C.target)&&(v(!1),x(""))};return window.addEventListener("mousedown",$),()=>window.removeEventListener("mousedown",$)},[b]);const P=$=>{if($.key==="ArrowDown")$.preventDefault(),v(!0),j(C=>Math.min(T.length-1,C+1));else if($.key==="ArrowUp")$.preventDefault(),j(C=>Math.max(0,C-1));else if($.key==="Enter"){$.preventDefault();const C=T[y];C&&k(C)}else $.key==="Escape"?(v(!1),x("")):$.key==="Backspace"&&g===""&&t.length>0&&E(t[t.length-1])};return o.jsxs("div",{ref:h,className:w.cn(O.wrapper,c&&O.error,m),children:[s&&o.jsx("label",{htmlFor:f,className:O.label,children:s}),o.jsxs("div",{className:w.cn(O.field,i&&O.disabled),onMouseDown:$=>{i||$.target===$.currentTarget&&($.preventDefault(),_.current?.focus(),v(!0))},children:[M.map($=>o.jsxs("span",{className:O.chip,children:[$.label,o.jsx("button",{type:"button",className:O.chipRemove,"aria-label":`Remover ${$.label}`,disabled:i,onMouseDown:C=>{C.preventDefault(),E($.value)},children:"×"})]},$.value)),o.jsx("input",{id:f,ref:_,type:"text",role:"combobox","aria-expanded":b,"aria-controls":`${f}-listbox`,"aria-autocomplete":"list",className:O.input,placeholder:t.length===0?r:"",disabled:i,value:g,onFocus:()=>v(!0),onChange:$=>{x($.target.value),v(!0),j(0)},onKeyDown:P})]}),b&&o.jsx("ul",{id:`${f}-listbox`,role:"listbox","aria-multiselectable":!0,className:O.menu,children:T.length===0?o.jsx("li",{className:O.empty,children:p}):T.map(($,C)=>{const I=S.has($.value);return o.jsxs("li",{role:"option","aria-selected":I,"aria-disabled":$.disabled||!I&&N,className:w.cn(O.option,C===y&&O.active,I&&O.selected),onMouseEnter:()=>j(C),onMouseDown:R=>{R.preventDefault(),k($)},children:[o.jsx("span",{className:O.check,"aria-hidden":!0,children:I?"✓":""}),$.label]},$.value)})}),c?o.jsx("span",{className:O.errorText,children:c}):a?o.jsx("span",{className:O.helper,children:a}):null]})}const ly="tempest_root_fVC66",uy="tempest_header_sTdRM",dy="tempest_headerSpacer_nqeNO",py="tempest_nav_7nFJE",my="tempest_months_fbwtK",fy="tempest_month_0WfUc",hy="tempest_title_OGQrm",_y="tempest_weekdays_nYTrg",gy="tempest_grid_O0eUF",by="tempest_weekday_cy-Mz",yy="tempest_day_-V6FX",vy="tempest_outside_3otid",xy="tempest_today_gwmhs",wy="tempest_inRange_iQJYA",jy="tempest_selected_DRsBO",$y="tempest_rangeStart_-Oe1u",ky="tempest_rangeEnd_mUaKW",A={root:ly,header:uy,headerSpacer:dy,nav:py,months:my,month:fy,title:hy,weekdays:_y,grid:gy,weekday:by,day:yy,outside:vy,today:xy,inRange:wy,selected:jy,rangeStart:$y,rangeEnd:ky},Ny=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Nn=["January","February","March","April","May","June","July","August","September","October","November","December"],Sy=42;function it(e,t,n){return new Date(e,t,n)}function le(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function Sn(e,t){return it(e.getFullYear(),e.getMonth()+t,1)}function Ft(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Cn(e,t,n){const s=le(e).getTime();return!!(t&&s<le(t).getTime()||n&&s>le(n).getTime())}function Cy(e,t,n){const s=le(e).getTime(),r=Math.min(le(t).getTime(),le(n).getTime()),a=Math.max(le(t).getTime(),le(n).getTime());return s>r&&s<a}function Ey(e,t){const n=e.getFullYear(),s=e.getMonth(),a=(it(n,s,1).getDay()-t+7)%7,c=it(n,s,1-a);return Array.from({length:Sy},(i,u)=>it(c.getFullYear(),c.getMonth(),c.getDate()+u))}function Ty({value:e,onChange:t,numberOfMonths:n=2,defaultMonth:s,minDate:r,maxDate:a,weekStartsOn:c=0,className:i,...u}){const[d,p]=l.useState(()=>{const y=s??e.start??new Date;return it(y.getFullYear(),y.getMonth(),1)}),[m,f]=l.useState(null),h=l.useMemo(()=>le(new Date),[]),_=l.useMemo(()=>Array.from({length:7},(y,j)=>Ny[(j+c)%7]),[c]),b=l.useCallback(y=>{if(Cn(y,r,a))return;const{start:j,end:S}=e;!j||S?t({start:y,end:null}):le(y).getTime()<le(j).getTime()?t({start:y,end:j}):t({start:j,end:y})},[e,t,r,a]),v=l.useCallback(y=>{p(j=>Sn(j,y))},[]),g=e.start&&!e.end?m:e.end;function x(y){const{start:j}=e,S=g,M=j?Ft(y,j):!1,T=S?Ft(y,S):!1,N=j&&S?Cy(y,j,S):!1;return{selected:M||T,inRange:N,isStart:M,isEnd:T}}return o.jsxs("div",{className:w.cn(A.root,i),...u,children:[o.jsxs("div",{className:A.header,children:[o.jsx("button",{type:"button",className:A.nav,"aria-label":"Previous month",onClick:()=>v(-1),children:"‹"}),o.jsx("span",{className:A.headerSpacer,"aria-hidden":!0}),o.jsx("button",{type:"button",className:A.nav,"aria-label":"Next month",onClick:()=>v(1),children:"›"})]}),o.jsx("div",{className:A.months,onMouseLeave:()=>f(null),children:Array.from({length:Math.max(1,n)},(y,j)=>{const S=Sn(d,j),M=Ey(S,c);return o.jsxs("div",{className:A.month,children:[o.jsxs("div",{className:A.title,"aria-live":"polite",children:[Nn[S.getMonth()]," ",S.getFullYear()]}),o.jsx("div",{className:A.weekdays,role:"row",children:_.map(T=>o.jsx("span",{className:A.weekday,role:"columnheader",children:T},T))}),o.jsx("div",{className:A.grid,role:"grid",children:M.map((T,N)=>{const k=T.getMonth()===S.getMonth(),E=Cn(T,r,a),{selected:P,inRange:$,isStart:C,isEnd:I}=x(T),R=Ft(T,h);return o.jsx("button",{type:"button",role:"gridcell",className:w.cn(A.day,!k&&A.outside,$&&A.inRange,P&&A.selected,C&&A.rangeStart,I&&A.rangeEnd,R&&A.today),"aria-label":`${Nn[T.getMonth()]} ${T.getDate()}, ${T.getFullYear()}`,"aria-selected":P,"aria-current":R?"date":void 0,disabled:E,onClick:()=>b(T),onMouseEnter:()=>f(T),children:T.getDate()},N)})})]},j)})})]})}const My="tempest_root_Nosqs",Ly="tempest_list_v9FNC",Ry="tempest_item_9RzZ7",Py="tempest_link_67ULr",Dy="tempest_trigger_2gBDu",Iy="tempest_panel_N2ujp",Ay="tempest_subItem_LjtO7",we={root:My,list:Ly,item:Ry,link:Py,trigger:Dy,panel:Iy,subItem:Ay};function Fy({items:e,className:t,...n}){const[s,r]=l.useState(-1),[a,c]=l.useState(-1),i=l.useId(),u=l.useRef(null),d=l.useCallback(()=>{r(-1),c(-1)},[]),p=s!==-1?s:a;l.useEffect(()=>{if(p===-1)return;const f=_=>{_.key==="Escape"&&d()},h=_=>{u.current&&!u.current.contains(_.target)&&d()};return window.addEventListener("keydown",f),window.addEventListener("mousedown",h),()=>{window.removeEventListener("keydown",f),window.removeEventListener("mousedown",h)}},[p,d]);const m=(f,h)=>{const _=()=>{f.onSelect?.(),d()};return f.href?o.jsx("a",{href:f.href,role:h==="menuitem"?"menuitem":void 0,className:we.link,onClick:_,children:f.label}):o.jsx("button",{type:"button",role:h==="menuitem"?"menuitem":void 0,className:we.link,onClick:_,children:f.label})};return o.jsx("nav",{ref:u,className:w.cn(we.root,t),...n,children:o.jsx("ul",{className:we.list,children:e.map((f,h)=>{if(!(!!f.children&&f.children.length>0))return o.jsx("li",{className:we.item,children:m(f,"none")},h);const b=p===h,v=`${i}-panel-${h}`;return o.jsxs("li",{className:we.item,onMouseEnter:()=>c(h),onMouseLeave:()=>c(g=>g===h?-1:g),children:[o.jsx("button",{type:"button",className:we.trigger,"aria-haspopup":"menu","aria-expanded":b,"aria-controls":v,onClick:()=>r(g=>g===h?-1:h),onFocus:()=>c(h),children:f.label}),b&&o.jsx("ul",{id:v,role:"menu",className:we.panel,children:f.children.map((g,x)=>o.jsx("li",{role:"none",className:we.subItem,children:m(g,"menuitem")},x))})]},h)})})})}const Oy="tempest_root_PGUO2",By="tempest_menu_hEVLT",zy="tempest_trigger_ZlZBx",Wy="tempest_triggerOpen_Hpfbu",qy="tempest_panel_6ta6u",Uy="tempest_item_wM-61",Ky="tempest_itemLabel_wXfB2",Hy="tempest_shortcut_qNlmN",Gy="tempest_separator_LfK3t",je={root:Oy,menu:By,trigger:zy,triggerOpen:Wy,panel:qy,item:Uy,itemLabel:Ky,shortcut:Hy,separator:Gy};function Qy(e){return"separator"in e}function Jy({menus:e,className:t,...n}){const[s,r]=l.useState(-1),a=l.useId(),c=l.useRef(null),i=l.useRef([]),u=l.useCallback(()=>{r(-1)},[]);return l.useEffect(()=>{if(s===-1)return;const d=m=>{if(m.key==="Escape"){u(),i.current[s]?.focus();return}if(m.key==="ArrowRight"){m.preventDefault();const f=(s+1)%e.length;r(f),i.current[f]?.focus()}if(m.key==="ArrowLeft"){m.preventDefault();const f=(s-1+e.length)%e.length;r(f),i.current[f]?.focus()}},p=m=>{c.current&&!c.current.contains(m.target)&&u()};return window.addEventListener("keydown",d),window.addEventListener("mousedown",p),()=>{window.removeEventListener("keydown",d),window.removeEventListener("mousedown",p)}},[s,e.length,u]),o.jsx("div",{ref:c,role:"menubar",className:w.cn(je.root,t),...n,children:e.map((d,p)=>{const m=s===p,f=`${a}-panel-${p}`;return o.jsxs("div",{className:je.menu,children:[o.jsx("button",{ref:h=>{i.current[p]=h},type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":m,"aria-controls":m?f:void 0,className:w.cn(je.trigger,m&&je.triggerOpen),onClick:()=>r(h=>h===p?-1:p),children:d.label}),m&&o.jsx("ul",{id:f,role:"menu",className:je.panel,children:d.items.map((h,_)=>Qy(h)?o.jsx("li",{role:"separator",className:je.separator,"aria-hidden":!0},_):o.jsx("li",{role:"none",children:o.jsxs("button",{type:"button",role:"menuitem",className:je.item,disabled:h.disabled,onClick:()=>{h.onSelect?.(),u()},children:[o.jsx("span",{className:je.itemLabel,children:h.label}),h.shortcut&&o.jsx("span",{className:je.shortcut,children:h.shortcut})]})},_))})]},p)})})}const Yy="tempest_root_-w3-j",Xy="tempest_viewport_n0hzM",Vy="tempest_track_5PA8h",Zy="tempest_slide_fhfjg",ev="tempest_arrow_S92Lt",tv="tempest_prev_X8whU",nv="tempest_next_jBRSz",sv="tempest_dots_fL3Hr",rv="tempest_dot_vEB56",ov="tempest_dotActive_OSSUg",ae={root:Yy,viewport:Xy,track:Vy,slide:Zy,arrow:ev,prev:tv,next:nv,dots:sv,dot:rv,dotActive:ov};function av({children:e,loop:t=!1,showArrows:n=!0,showDots:s=!0,index:r,defaultIndex:a=0,onIndexChange:c,className:i,...u}){const d=e.length,p=r!==void 0,[m,f]=l.useState(a),h=p?r:m,_=l.useCallback(x=>{let y=x;y<0?y=t?d-1:0:y>=d&&(y=t?0:d-1),y!==h&&(p||f(y),c?.(y))},[d,t,h,p,c]),b=h<=0,v=h>=d-1,g=x=>{x.key==="ArrowRight"?(x.preventDefault(),_(h+1)):x.key==="ArrowLeft"&&(x.preventDefault(),_(h-1))};return o.jsxs("div",{role:"region","aria-roledescription":"carousel",tabIndex:0,className:w.cn(ae.root,i),onKeyDown:g,...u,children:[o.jsx("div",{className:ae.viewport,children:o.jsx("div",{className:ae.track,style:{transform:`translateX(-${h*100}%)`},children:e.map((x,y)=>o.jsx("div",{role:"group","aria-roledescription":"slide","aria-label":`${y+1} of ${d}`,"aria-hidden":y!==h,className:ae.slide,children:x},y))})}),n&&d>1&&o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",className:w.cn(ae.arrow,ae.prev),"aria-label":"Previous slide",disabled:!t&&b,onClick:()=>_(h-1),children:"‹"}),o.jsx("button",{type:"button",className:w.cn(ae.arrow,ae.next),"aria-label":"Next slide",disabled:!t&&v,onClick:()=>_(h+1),children:"›"})]}),s&&d>1&&o.jsx("div",{className:ae.dots,role:"tablist","aria-label":"Slides",children:e.map((x,y)=>o.jsx("button",{type:"button",role:"tab","aria-label":`Go to slide ${y+1}`,"aria-selected":y===h,className:w.cn(ae.dot,y===h&&ae.dotActive),onClick:()=>_(y)},y))})]})}function cv(e,t=300){const[n,s]=l.useState(e);return l.useEffect(()=>{const r=setTimeout(()=>s(e),t);return()=>clearTimeout(r)},[e,t]),n}function rs(e=1,t=50){const[n,s]=l.useState(e),[r,a]=l.useState(t),c=l.useCallback(()=>s(1),[]);return{page:n,size:r,setPage:s,setSize:a,reset:c}}function iv(e,t,n){return l.useMemo(()=>{const s=t.trim().toLowerCase();return s?typeof n=="function"?e.filter(r=>n(r,s)):e.filter(r=>n.some(a=>{const c=r[a];return c!=null&&String(c).toLowerCase().includes(s)})):e},[e,t,n])}function lv(e){const[t,n]=l.useState(()=>typeof window>"u"?!1:window.matchMedia(e).matches);return l.useEffect(()=>{if(typeof window>"u")return;const s=window.matchMedia(e),r=a=>n(a.matches);return n(s.matches),s.addEventListener("change",r),()=>s.removeEventListener("change",r)},[e]),t}function uv(e,t,n,s){const r=l.useRef(t);r.current=t,l.useEffect(()=>{const a=n===void 0?typeof window>"u"?null:window:"current"in n?n.current??null:n;if(!a?.addEventListener)return;const c=i=>r.current(i);return a.addEventListener(e,c,s),()=>a.removeEventListener(e,c,s)},[e,n,s])}const dv=JSON.stringify,pv=e=>JSON.parse(e);function mv(e,t,n={}){const s=n.serialize??dv,r=n.deserialize??pv,a=l.useCallback(()=>{if(typeof window>"u")return t;try{const p=window.localStorage.getItem(e);return p===null?t:r(p)}catch{return t}},[e,t,r]),[c,i]=l.useState(a);l.useEffect(()=>{i(a())},[a]);const u=l.useCallback(p=>{i(m=>{const f=typeof p=="function"?p(m):p;try{typeof window<"u"&&window.localStorage.setItem(e,s(f))}catch{}return f})},[e,s]),d=l.useCallback(()=>{try{typeof window<"u"&&window.localStorage.removeItem(e)}catch{}i(t)},[e,t]);return l.useEffect(()=>{if(typeof window>"u")return;const p=m=>{if(m.key===e){if(m.newValue===null){i(t);return}try{i(r(m.newValue))}catch{}}};return window.addEventListener("storage",p),()=>window.removeEventListener("storage",p)},[e,t,r]),[c,u,d]}function fv(e=!1){const[t,n]=l.useState(e),s=l.useCallback(()=>n(i=>!i),[]),r=l.useCallback(()=>n(!0),[]),a=l.useCallback(()=>n(!1),[]),c=l.useCallback(i=>n(i),[]);return[t,{toggle:s,setTrue:r,setFalse:a,set:c}]}function hv(e,t=[],n={}){const{immediate:s=!1}=n,[r,a]=l.useState({status:"idle",data:void 0,error:void 0}),c=l.useRef(e);c.current=e;const i=l.useRef(0),u=l.useRef(!0);l.useEffect(()=>(u.current=!0,()=>{u.current=!1}),[]);const d=l.useCallback(async()=>{const m=++i.current;a(f=>({...f,status:"pending",error:void 0}));try{const f=await c.current();return u.current&&i.current===m&&a({status:"success",data:f,error:void 0}),f}catch(f){throw u.current&&i.current===m&&a({status:"error",data:void 0,error:f}),f}},[]),p=l.useCallback(()=>{i.current++,a({status:"idle",data:void 0,error:void 0})},[]);return l.useEffect(()=>{s&&d().catch(()=>{})},[s,...t]),{status:r.status,data:r.data,error:r.error,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",run:d,reset:p}}function _v(){const[e,t]=l.useState(()=>typeof navigator>"u"?!0:navigator.onLine);return l.useEffect(()=>{if(typeof window>"u")return;const n=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",n),window.addEventListener("offline",s),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}},[]),e}function gv(){const[e,t]=l.useState(()=>typeof document>"u"?"visible":document.visibilityState);return l.useEffect(()=>{if(typeof document>"u")return;const n=()=>t(document.visibilityState);return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)},[]),e}function bv(e,t={}){const[n,s]=l.useState(null),{once:r=!1,root:a,rootMargin:c,threshold:i}=t;return l.useEffect(()=>{const u=e.current;if(!u||typeof IntersectionObserver>"u")return;const d=new IntersectionObserver(([p])=>{p&&(s(p),r&&p.isIntersecting&&d.unobserve(u))},{root:a,rootMargin:c,threshold:i});return d.observe(u),()=>d.disconnect()},[e,r,a,c,i]),n}function yv(e){const[t,n]=l.useState(null);return l.useEffect(()=>{const s=e.current;if(!s||typeof ResizeObserver>"u")return;const r=new ResizeObserver(a=>{const c=a[0];if(!c)return;const i=c.contentRect;n({width:i.width,height:i.height})});return r.observe(s),()=>r.disconnect()},[e]),t}function vv(e={}){const{resetAfter:t=1500}=e,[n,s]=l.useState(!1),r=l.useRef(null),a=l.useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null),s(!1)},[]);l.useEffect(()=>()=>a(),[a]);const c=l.useCallback(async i=>{try{if(typeof navigator<"u"&&navigator.clipboard?.writeText)await navigator.clipboard.writeText(i);else if(typeof document<"u"){const u=document.createElement("textarea");u.value=i,u.style.position="fixed",u.style.opacity="0",document.body.appendChild(u),u.select(),document.execCommand("copy"),document.body.removeChild(u)}else return!1;return s(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>s(!1),t),!0}catch{return!1}},[t]);return{copied:n,copy:c,reset:a}}function xv(e,t){if(e.key.toLowerCase()!==t.key.toLowerCase())return!1;const n=!!t.ctrl,s=!!t.meta,r=!!t.shift,a=!!t.alt;if(t.mod){if(!e.ctrlKey&&!e.metaKey)return!1}else if(e.ctrlKey!==n||e.metaKey!==s)return!1;return!(e.shiftKey!==r||e.altKey!==a)}function wv(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase();return t==="input"||t==="textarea"||t==="select"?!0:e.isContentEditable}function jv(e,t,n={}){const{disabled:s=!1,ignoreInput:r=!0}=n;l.useEffect(()=>{if(s||typeof window>"u")return;const a=c=>{r&&wv(c.target)||xv(c,e)&&t(c)};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[s,r,e.key,e.ctrl,e.meta,e.shift,e.alt,e.mod,t])}const En=["mousemove","mousedown","keydown","touchstart","wheel","scroll"];function $v(e=6e4){const[t,n]=l.useState(!1);return l.useEffect(()=>{if(typeof window>"u")return;let s=setTimeout(()=>n(!0),e);function r(){n(!1),clearTimeout(s),s=setTimeout(()=>n(!0),e)}for(const a of En)window.addEventListener(a,r,{passive:!0});return()=>{clearTimeout(s);for(const a of En)window.removeEventListener(a,r)}},[e]),t}function kv(e={}){const{watch:t=!1,disabled:n=!1,...s}=e,[r,a]=l.useState({loading:!n,error:null,coords:null,timestamp:null});return l.useEffect(()=>{if(n||typeof navigator>"u"||!navigator.geolocation){a(u=>({...u,loading:!1}));return}const c=u=>{a({loading:!1,error:null,coords:u.coords,timestamp:u.timestamp})},i=u=>{a(d=>({...d,loading:!1,error:u}))};if(t){const u=navigator.geolocation.watchPosition(c,i,s);return()=>navigator.geolocation.clearWatch(u)}navigator.geolocation.getCurrentPosition(c,i,s)},[n,t,s.enableHighAccuracy,s.maximumAge,s.timeout]),r}function Nv(e){l.useEffect(()=>{if(!e||typeof document>"u")return;const t=document.body,n=t.style.overflow;return t.style.overflow="hidden",()=>{t.style.overflow=n}},[e])}function Sv(e){const t=l.useRef(e);return t.current=e,l.useCallback((...n)=>t.current(...n),[])}function Jt(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||typeof t!="object"||e===null||t===null||Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((r,a)=>Jt(r,t[a]));const n=Object.keys(e),s=Object.keys(t);return n.length!==s.length?!1:n.every(r=>Jt(e[r],t[r]))}function Cv(e){const t=l.useRef(e);return Jt(t.current,e)||(t.current=e),t.current}function Ev(e){const t=l.useRef(void 0);return l.useEffect(()=>{t.current=e},[e]),t.current}function Tv(e,t){const n=l.useRef(e);n.current=e,l.useEffect(()=>{if(t===null)return;const s=setInterval(()=>n.current(),t);return()=>clearInterval(s)},[t])}function Mv(e,t){const n=l.useRef(e);n.current=e,l.useEffect(()=>{if(t===null)return;const s=setTimeout(()=>n.current(),t);return()=>clearTimeout(s)},[t])}function Lv(e,t){const[n,s]=l.useState(e),r=l.useRef(0),a=l.useRef(null);return l.useEffect(()=>{const c=Date.now(),i=c-r.current;return i>=t?(r.current=c,s(e)):(a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{r.current=Date.now(),s(e)},t-i)),()=>{a.current&&clearTimeout(a.current)}},[e,t]),n}function Rv(){const[e,t]=l.useState(()=>typeof window>"u"?{width:0,height:0}:{width:window.innerWidth,height:window.innerHeight});return l.useEffect(()=>{if(typeof window>"u")return;const n=()=>t({width:window.innerWidth,height:window.innerHeight});return n(),window.addEventListener("resize",n,{passive:!0}),()=>window.removeEventListener("resize",n)},[]),e}function Pv(e){const[t,n]=l.useState(!1);return l.useEffect(()=>{const s=e.current;if(!s)return;const r=()=>n(!0),a=()=>n(!1);return s.addEventListener("mouseenter",r),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",r),s.removeEventListener("mouseleave",a)}},[e]),t}function Dv(e,t,n={}){const{delay:s=500,moveThreshold:r=10}=n,a=l.useRef(t);a.current=t,l.useEffect(()=>{const c=e.current;if(!c)return;let i=null,u=0,d=0;const p=()=>{i&&(clearTimeout(i),i=null)},m=h=>{u=h.clientX,d=h.clientY,p(),i=setTimeout(()=>{i=null,a.current()},s)},f=h=>{if(i===null)return;const _=h.clientX-u,b=h.clientY-d;Math.hypot(_,b)>r&&p()};return c.addEventListener("pointerdown",m),c.addEventListener("pointermove",f),c.addEventListener("pointerup",p),c.addEventListener("pointercancel",p),c.addEventListener("pointerleave",p),()=>{p(),c.removeEventListener("pointerdown",m),c.removeEventListener("pointermove",f),c.removeEventListener("pointerup",p),c.removeEventListener("pointercancel",p),c.removeEventListener("pointerleave",p)}},[e,s,r])}function Iv(e=!1){const[t,n]=l.useState(e),s=l.useCallback(()=>n(!0),[]),r=l.useCallback(()=>n(!1),[]),a=l.useCallback(()=>n(i=>!i),[]),c=l.useMemo(()=>({open:s,close:r,toggle:a}),[s,r,a]);return[t,c]}function Av(e=[]){const[t,n]=l.useState(e),s=l.useCallback((...h)=>{n(_=>[..._,...h])},[]),r=l.useCallback((...h)=>{n(_=>[...h,..._])},[]),a=l.useCallback((h,..._)=>{n(b=>[...b.slice(0,h),..._,...b.slice(h)])},[]),c=l.useCallback((...h)=>{const _=new Set(h);n(b=>b.filter((v,g)=>!_.has(g)))},[]),i=l.useCallback(({from:h,to:_})=>{n(b=>{const v=[...b],[g]=v.splice(h,1);return v.splice(_,0,g),v})},[]),u=l.useCallback((h,_)=>{n(b=>b.map((v,g)=>g===h?_:v))},[]),d=l.useCallback(h=>n(h),[]),p=l.useCallback(h=>{n(_=>_.map(h))},[]),m=l.useCallback(()=>n([]),[]),f=l.useMemo(()=>({append:s,prepend:r,insert:a,remove:c,reorder:i,setItem:u,setState:d,apply:p,clear:m}),[s,r,a,c,i,u,d,p,m]);return[t,f]}const at=(e,t,n)=>{let s=e;return typeof t=="number"&&(s=Math.max(t,s)),typeof n=="number"&&(s=Math.min(n,s)),s};function Fv(e=0,t={}){const{min:n,max:s}=t,[r,a]=l.useState(()=>at(e,n,s)),c=l.useCallback(()=>{a(m=>at(m+1,n,s))},[n,s]),i=l.useCallback(()=>{a(m=>at(m-1,n,s))},[n,s]),u=l.useCallback(m=>{a(at(m,n,s))},[n,s]),d=l.useCallback(()=>{a(at(e,n,s))},[e,n,s]),p=l.useMemo(()=>({increment:c,decrement:i,set:u,reset:d}),[c,i,u,d]);return[r,p]}function Ov(e){l.useEffect(()=>{if(typeof document>"u")return;const t=document.title;return document.title=e,()=>{document.title=t}},[e])}function Bv(e){l.useEffect(()=>{if(typeof document>"u")return;let t=document.querySelector('link[rel="icon"]');t||(t=document.createElement("link"),t.rel="icon",document.head.appendChild(t)),t.href=e},[e])}function zv(e){const[t,n]=l.useState(()=>new Map(e)),s=l.useCallback((u,d)=>{n(p=>{const m=new Map(p);return m.set(u,d),m})},[]),r=l.useCallback(u=>{n(d=>{if(!d.has(u))return d;const p=new Map(d);return p.delete(u),p})},[]),a=l.useCallback(()=>{n(u=>u.size===0?u:new Map)},[]),c=l.useCallback(u=>t.get(u),[t]),i=l.useCallback(u=>t.has(u),[t]);return l.useMemo(()=>({map:t,set:s,delete:r,clear:a,get:c,has:i,size:t.size}),[t,s,r,a,c,i])}function Wv(e){const[t,n]=l.useState(()=>new Set(e)),s=l.useCallback(u=>{n(d=>{if(d.has(u))return d;const p=new Set(d);return p.add(u),p})},[]),r=l.useCallback(u=>{n(d=>{if(!d.has(u))return d;const p=new Set(d);return p.delete(u),p})},[]),a=l.useCallback(()=>{n(u=>u.size===0?u:new Set)},[]),c=l.useCallback(u=>t.has(u),[t]),i=l.useCallback(u=>{n(d=>{const p=new Set(d);return p.has(u)?p.delete(u):p.add(u),p})},[]);return l.useMemo(()=>({set:t,add:s,delete:r,clear:a,has:c,toggle:i,size:t.size}),[t,s,r,a,c,i])}function qv(e={}){const{initialValues:t=[],limit:n=1/0}=e,[s,r]=l.useState(()=>({queue:t.slice(0,n),overflow:t.slice(n)})),a=l.useCallback((...u)=>{r(d=>{const p=[...d.queue,...d.overflow,...u];return{queue:p.slice(0,n),overflow:p.slice(n)}})},[n]),c=l.useCallback(u=>{r(d=>{const p=[...u(d.queue),...d.overflow];return{queue:p.slice(0,n),overflow:p.slice(n)}})},[n]),i=l.useCallback(()=>{r(u=>({queue:u.overflow.slice(0,n),overflow:u.overflow.slice(n)}))},[n]);return l.useMemo(()=>({queue:s.queue,add:a,update:c,cleanQueue:i,size:s.queue.length}),[s.queue,a,c,i])}function Uv(e){const t=l.useRef(null),n=l.useRef(e);return n.current=e,l.useEffect(()=>{if(typeof document>"u")return;const s=r=>{const a=r.target;!t.current||a&&t.current.contains(a)||n.current()};return document.addEventListener("mousedown",s),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",s),document.removeEventListener("touchstart",s)}},[]),t}function Kv(){const e=l.useRef(!0);return e.current?(e.current=!1,!0):!1}const Hv="tempest_wrapper_iB6ka",Gv="tempest_search_2y-yM",Qv="tempest_sortButton_9p6w4",Jv="tempest_sortIndicator_bZMlH",yt={wrapper:Hv,search:Gv,sortButton:Qv,sortIndicator:Jv};function Yv(e,t){return e==null&&t==null?0:e==null?-1:t==null?1:typeof e=="number"&&typeof t=="number"?e-t:e instanceof Date&&t instanceof Date?e.getTime()-t.getTime():typeof e=="boolean"&&typeof t=="boolean"?Number(e)-Number(t):String(e).localeCompare(String(t),void 0,{numeric:!0})}function Xv({data:e,columns:t,pageSize:n=10,searchable:s=!1,searchKeys:r,initialSort:a,rowKey:c=(p,m)=>m,emptyMessage:i,className:u,...d}){const[p,m]=l.useState(""),[f,h]=l.useState(a??null),{page:_,setPage:b}=rs(1,n),v=l.useMemo(()=>r&&r.length>0?r:t.filter(N=>{const k=e.find(P=>P[N.key]!=null),E=k?k[N.key]:void 0;return typeof E=="string"||typeof E=="number"}).map(N=>N.key),[r,t,e]),g=l.useMemo(()=>{const N=p.trim().toLowerCase();return!N||!s?e:e.filter(k=>v.some(E=>{const P=k[E];return P!=null&&String(P).toLowerCase().includes(N)}))},[e,p,s,v]),x=l.useMemo(()=>{if(!f)return g;const N=f.direction==="asc"?1:-1;return[...g].sort((k,E)=>Yv(k[f.key],E[f.key])*N)},[g,f]),y=Math.max(1,Math.ceil(x.length/n));l.useEffect(()=>{_>y&&b(y)},[_,y,b]);const j=Math.min(_,y),S=l.useMemo(()=>{const N=(j-1)*n;return x.slice(N,N+n)},[x,j,n]);function M(N){h(k=>!k||k.key!==N?{key:N,direction:"asc"}:k.direction==="asc"?{key:N,direction:"desc"}:null)}const T=l.useMemo(()=>t.map(N=>{const E=f?.key===N.key?f?.direction==="asc"?" ▲":" ▼":"",P=N.sortable?o.jsxs("button",{type:"button",className:yt.sortButton,onClick:()=>M(N.key),"aria-label":`Ordenar por ${typeof N.header=="string"?N.header:String(N.key)}`,children:[N.header,o.jsx("span",{className:yt.sortIndicator,"aria-hidden":!0,children:E})]}):N.header;return{key:String(N.key),header:P,align:N.align,priority:N.priority,width:N.width,render:N.render?$=>N.render($):$=>$[N.key]??null}}),[t,f]);return o.jsxs("div",{className:w.cn(yt.wrapper,u),...d,children:[s&&o.jsx(Jn,{value:p,onChange:N=>{m(N),b(1)},wrapperClassName:yt.search}),o.jsx(Xn,{columns:T,data:S,rowKey:(N,k)=>c(N,(j-1)*n+k),emptyMessage:i}),y>1&&o.jsx(Kn,{page:j,totalPages:y,onPageChange:b,totalItems:x.length})]})}const Vv="tempest_tile_ZpED6",Zv="tempest_interactive_3ICXQ",ex="tempest_selected_dMY11",tx="tempest_disabled_HnXxf",nx="tempest_leading_gSuBb",sx="tempest_trailing_cVd1n",rx="tempest_body_gyEl2",ox="tempest_title_jWFBN",ax="tempest_subtitle_GUtn7",$e={tile:Vv,interactive:Zv,selected:ex,disabled:tx,leading:nx,trailing:sx,body:rx,title:ox,subtitle:ax};function cx({leading:e,title:t,subtitle:n,trailing:s,onClick:r,disabled:a=!1,selected:c=!1,className:i}){const u=o.jsxs(o.Fragment,{children:[e!==void 0&&o.jsx("span",{className:$e.leading,children:e}),o.jsxs("span",{className:$e.body,children:[o.jsx("span",{className:$e.title,children:t}),n!==void 0&&o.jsx("span",{className:$e.subtitle,children:n})]}),s!==void 0&&o.jsx("span",{className:$e.trailing,children:s})]}),d=w.cn($e.tile,c&&$e.selected,a&&$e.disabled,i);return r?o.jsx("button",{type:"button",className:w.cn(d,$e.interactive),"aria-pressed":c?!0:void 0,disabled:a,onClick:r,children:u}):o.jsx("div",{className:d,children:u})}const ix="tempest_fab_U3NIL",lx="tempest_primary_8lnHI",ux="tempest_surface_ZTMQ4",dx="tempest_round_ljguw",px="tempest_sm_3-rLi",mx="tempest_md_vOdzW",fx="tempest_lg_Xc6vE",hx="tempest_extended_GhPio",_x="tempest_icon_cZ8Nq",gx="tempest_label_tfoCq",bx="tempest_fixed_Xr8Xa",yx="tempest_bottomRight_bJ8Oo",vx="tempest_bottomLeft_USN6N",pe={fab:ix,primary:lx,surface:ux,round:dx,sm:px,md:mx,lg:fx,extended:hx,icon:_x,label:gx,fixed:bx,bottomRight:yx,bottomLeft:vx};function xx({icon:e,label:t,position:n="bottom-right",size:s="md",variant:r="primary",className:a,...c}){const i=t!==void 0;return o.jsxs("button",{type:"button",className:w.cn(pe.fab,pe[s],pe[r],i?pe.extended:pe.round,n!=="none"&&pe.fixed,n==="bottom-right"&&pe.bottomRight,n==="bottom-left"&&pe.bottomLeft,a),...c,children:[o.jsx("span",{className:pe.icon,children:e}),i&&o.jsx("span",{className:pe.label,children:t})]})}const wx="tempest_rail_bvns5",jx="tempest_header_Mikit",$x="tempest_list_rS6XJ",kx="tempest_footer_ojpGC",Nx="tempest_item_XEXI9",Sx="tempest_active_U3hSU",Cx="tempest_iconWrap_iVwlb",Ex="tempest_icon_-hpb6",Tx="tempest_badge_1YxwU",Mx="tempest_label_zCKyA",me={rail:wx,header:jx,list:$x,footer:kx,item:Nx,active:Sx,iconWrap:Cx,icon:Ex,badge:Tx,label:Mx};function Lx({items:e,value:t,onChange:n,header:s,footer:r,labelVisibility:a="all",className:c,...i}){return o.jsxs("nav",{className:w.cn(me.rail,c),"aria-label":"Navegação lateral",...i,children:[s!==void 0&&o.jsx("div",{className:me.header,children:s}),o.jsx("ul",{className:me.list,children:e.map(u=>{const d=u.key===t,p=a==="all"||a==="selected"&&d;return o.jsx("li",{children:o.jsxs("button",{type:"button",className:w.cn(me.item,d&&me.active),"aria-current":d?"page":void 0,disabled:u.disabled,onClick:()=>n(u.key),children:[o.jsxs("span",{className:me.iconWrap,children:[u.icon&&o.jsx("span",{className:me.icon,children:u.icon}),u.badge!==void 0&&o.jsx("span",{className:me.badge,children:u.badge})]}),p&&o.jsx("span",{className:me.label,children:u.label})]})},u.key)})}),r!==void 0&&o.jsx("div",{className:me.footer,children:r})]})}const Rx="tempest_wrapper_tFKNC",Px="tempest_label_FUecv",Dx="tempest_columns_XMru6",Ix="tempest_column_bwotJ",Ax="tempest_cellWrapper_xRos3",Fx="tempest_cell_eSc7G",Ox="tempest_active_6amgd",Bx="tempest_helper_ihHGE",zx="tempest_disabled_NDezB",F={wrapper:Rx,label:Px,columns:Dx,column:Ix,cellWrapper:Ax,cell:Fx,active:Ox,helper:Bx,disabled:zx};function vt(e){return e.toString().padStart(2,"0")}function Wx(e){const t=/^(\d{1,2}):(\d{1,2})$/.exec(e.trim());if(!t)return{hour24:null,minute:null};const n=Number(t[1]),s=Number(t[2]);return n<0||n>23||s<0||s>59?{hour24:null,minute:null}:{hour24:n,minute:s}}function qx(e){const t=e%12;return t===0?12:t}function Ot(e,t){const n=e%12;return t==="PM"?n+12:n}function Ux({value:e,onChange:t,minuteStep:n=5,use12Hours:s=!1,label:r,helperText:a,disabled:c,className:i}){const u=l.useId(),{hour24:d,minute:p}=l.useMemo(()=>Wx(e),[e]),m=d!==null&&d>=12?"PM":"AM",f=l.useMemo(()=>s?Array.from({length:12},(y,j)=>j+1):Array.from({length:24},(y,j)=>j),[s]),h=l.useMemo(()=>{const y=n>0?n:1,j=[];for(let S=0;S<60;S+=y)j.push(S);return j},[n]),_=d===null?null:s?qx(d):d,b=(y,j)=>{t(`${vt(y)}:${vt(j)}`)},v=y=>{if(c)return;const j=p??0,S=s?Ot(y,m):y;b(S,j)},g=y=>{if(c)return;const j=d??(s?Ot(12,"AM"):0);b(j,y)},x=y=>{if(c)return;const j=_??12,S=p??0;b(Ot(j,y),S)};return o.jsxs("div",{className:w.cn(F.wrapper,c&&F.disabled,i),children:[r&&o.jsx("span",{id:`${u}-label`,className:F.label,children:r}),o.jsxs("div",{className:F.columns,children:[o.jsx("ul",{role:"listbox","aria-label":"Horas",className:F.column,children:f.map(y=>{const j=y===_;return o.jsx("li",{className:F.cellWrapper,children:o.jsx("button",{type:"button",role:"option","aria-selected":j,disabled:c,className:w.cn(F.cell,j&&F.active),onClick:()=>v(y),children:s?y:vt(y)})},y)})}),o.jsx("ul",{role:"listbox","aria-label":"Minutos",className:F.column,children:h.map(y=>{const j=y===p;return o.jsx("li",{className:F.cellWrapper,children:o.jsx("button",{type:"button",role:"option","aria-selected":j,disabled:c,className:w.cn(F.cell,j&&F.active),onClick:()=>g(y),children:vt(y)})},y)})}),s&&o.jsx("ul",{role:"listbox","aria-label":"Período",className:F.column,children:["AM","PM"].map(y=>{const j=_!==null&&y===m;return o.jsx("li",{className:F.cellWrapper,children:o.jsx("button",{type:"button",role:"option","aria-selected":j,disabled:c,className:w.cn(F.cell,j&&F.active),onClick:()=>x(y),children:y})},y)})})]}),a&&o.jsx("span",{className:F.helper,children:a})]})}const Kx="tempest_wrapper_vGp-3",Hx="tempest_indicator_S7mV0",Gx="tempest_content_bZdpc",Qx="tempest_dragging_BvUty",xt={wrapper:Kx,indicator:Hx,content:Gx,dragging:Qx};function Jx(e,t){const n=t*1.5;return Math.min(e/2,n)}function Yx({onRefresh:e,children:t,threshold:n=80,disabled:s,className:r}){const a=l.useRef(null),c=l.useRef(null),[i,u]=l.useState(0),[d,p]=l.useState(!1),m=c.current!==null,f=x=>{if(s||d)return;const y=a.current;if(!y||y.scrollTop>0)return;const j=x.touches[0];j&&(c.current=j.clientY)},h=x=>{if(s||d)return;const y=c.current;if(y===null)return;const j=x.touches[0];if(!j)return;const S=j.clientY-y;if(S<=0){u(0);return}u(Jx(S,n))},_=()=>{c.current=null,u(0)},b=async()=>{if(s||d){_();return}if(!(c.current!==null&&i>=n)){_();return}c.current=null,p(!0),u(n);try{await e()}finally{p(!1),u(0)}},v=d||i>0,g=Math.min(1,i/n);return o.jsxs("div",{ref:a,className:w.cn(xt.wrapper,r),"data-refreshing":d,onTouchStart:f,onTouchMove:h,onTouchEnd:b,children:[o.jsx("div",{className:xt.indicator,"aria-hidden":!v,style:{opacity:d?1:g,transform:`translateX(-50%) translateY(${v?i:0}px) rotate(${g*360}deg)`},children:o.jsx(Yn,{size:"sm",label:"Atualizando"})}),o.jsx("div",{className:w.cn(xt.content,(m||d)&&xt.dragging),style:{transform:`translateY(${v?i:0}px)`},children:t})]})}function Xx(e){return new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(e)}function Vx(e){const t=typeof e=="string"?new Date(e):e;return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat("pt-BR").format(t)}function Zx(e){const t=typeof e=="string"?new Date(e):e;return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat("pt-BR",{dateStyle:"short",timeStyle:"short"}).format(t)}function os(e){const t=e.replace(/\D/g,"").slice(0,11);return t.length<=10?t.replace(/(\d{2})(\d)/,"($1) $2").replace(/(\d{4})(\d)/,"$1-$2"):t.replace(/(\d{2})(\d)/,"($1) $2").replace(/(\d{5})(\d)/,"$1-$2")}function as(e){return e.replace(/\D/g,"").slice(0,11).replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})$/,"$1-$2")}function ew(e){return new Intl.NumberFormat("pt-BR",{style:"percent",minimumFractionDigits:1,maximumFractionDigits:1}).format(e)}const tw={get(e,t){if(typeof window>"u")return t;try{const n=window.localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}},set(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,JSON.stringify(t))}catch{}},remove(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(e)}catch{}}};function nw(e){return e.normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function sw(e,t,n="…"){if(e.length<=t)return e;const s=Math.max(0,t-n.length);return e.slice(0,s).trimEnd()+n}function rw(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function ow(e){const t=e.replace(/[^a-zA-Z0-9]+/g," ").trim().split(/\s+/).filter(Boolean);return t.length===0?"":t.map((n,s)=>{const r=n.toLowerCase();return s===0?r:r.charAt(0).toUpperCase()+r.slice(1)}).join("")}function aw(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase()}function cw(e,t,n){return e===1?t:n??`${t}s`}function iw(e,t){const n={};for(const s of e){const r=t(s);(n[r]??=[]).push(s)}return n}function lw(e,t){const n=new Set,s=[];for(const r of e){const a=t(r);n.has(a)||(n.add(a),s.push(r))}return s}function uw(e,t){if(t<1)throw new RangeError(`chunk size must be >= 1, received ${t}`);const n=[];for(let s=0;s<e.length;s+=t)n.push(e.slice(s,s+t));return n}function dw(e,t,n=1){const s=[];if(n===0)return s;if(n>0)for(let r=e;r<t;r+=n)s.push(r);else for(let r=e;r>t;r+=n)s.push(r);return s}function ct(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function pw(e,t){const n={};for(const s of t)Object.prototype.hasOwnProperty.call(e,s)&&(n[s]=e[s]);return n}function mw(e,t){const n=new Set(t),s={};for(const r of Object.keys(e))n.has(r)||(s[r]=e[r]);return s}function cs(e,t){if(!ct(e)||!ct(t))return t===void 0?e:t;const n={...e};for(const s of Object.keys(t)){const r=t[s],a=n[s];ct(a)&&ct(r)?n[s]=cs(a,r):n[s]=r}return n}function fw(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:e instanceof Map||e instanceof Set?e.size===0:ct(e)?Object.keys(e).length===0:!1}function hw(e){return e!=null}function _w(e){return typeof e=="string"}function gw(e){return typeof e=="number"&&!Number.isNaN(e)}function bw(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function yw(e,t){throw new Error(t??`Unexpected value: ${String(e)}`)}function vw(e,t){let n;const s=(...r)=>{n!==void 0&&clearTimeout(n),n=setTimeout(()=>{n=void 0,e(...r)},t)};return s.cancel=()=>{n!==void 0&&(clearTimeout(n),n=void 0)},s}function xw(e,t){let n,s,r=0;const a=i=>{r=Date.now(),e(...i)},c=(...i)=>{const u=Date.now(),d=t-(u-r);d<=0?(n!==void 0&&(clearTimeout(n),n=void 0),a(i)):(s=i,n===void 0&&(n=setTimeout(()=>{if(n=void 0,s!==void 0){const p=s;s=void 0,a(p)}},d)))};return c.cancel=()=>{n!==void 0&&(clearTimeout(n),n=void 0),s=void 0,r=0},c}function ww(e){let t=!1,n;return(...s)=>(t||(t=!0,n=e(...s)),n)}function jw(e){let t=!1,n,s;const r=a=>{if(!t||a.length!==n.length)return!1;for(let c=0;c<a.length;c++)if(!Object.is(a[c],n[c]))return!1;return!0};return(...a)=>(r(a)||(n=a,s=e(...a),t=!0),s)}function $w(e){return new Promise(t=>setTimeout(t,e))}function kw(e,t,n){return new Promise((s,r)=>{const a=setTimeout(()=>{const c=new Error(n??`Operation timed out after ${t}ms`);c.name="TimeoutError",r(c)},t);e.then(c=>{clearTimeout(a),s(c)},c=>{clearTimeout(a),r(c)})})}function en(e){let t;if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")t=crypto.randomUUID();else{const n=Date.now().toString(36),s=Math.random().toString(36).slice(2,10);t=`${n}-${s}`}return e?`${e}-${t}`:t}class Ct extends Error{status;detail;code;requestId;body;constructor(t){super(t.detail),this.name="TempestApiError",this.status=t.status,this.detail=t.detail,this.code=t.code,this.requestId=t.requestId,this.body=t.body}}function Nw(e){return typeof e=="object"&&e!==null&&typeof e.status=="number"&&typeof e.detail=="string"}function tn(e,t,n,s){const r=typeof t=="object"&&t!==null?t:null,a=r?.detail??r?.message??`Erro ${e}`,c=typeof r?.code=="string"?r.code:void 0,i=typeof r?.details=="object"&&r.details!==null?r.details:null,u=(typeof i?.request_id=="string"?i.request_id:void 0)??n?.get("X-Request-ID")??s??void 0;return{status:e,detail:String(a),code:c,requestId:u??void 0,retryAfter:Sw(n?.get("Retry-After")),body:t}}function Sw(e){if(!e)return;const t=e.trim();if(/^\d+$/.test(t))return Number(t);const n=Date.parse(t);if(!Number.isNaN(n))return Math.max(0,Math.round((n-Date.now())/1e3))}function Cw(e,t,n){const s=new URL(t,e.endsWith("/")?e:`${e}/`);if(n)for(const[r,a]of Object.entries(n))a!=null&&s.searchParams.set(r,String(a));return s.toString()}function Ew(e){return typeof FormData<"u"&&e instanceof FormData}async function Tn(e,t){let n=null;try{n=await e.clone().json()}catch{try{n=await e.text()}catch{n=null}}return new Ct(tn(e.status,n,e.headers,t))}function jt(e){const t=e.fetcher??globalThis.fetch.bind(globalThis);function n(){const c=e.getToken?.();return c?{Authorization:`Bearer ${c}`}:{}}async function s(c,i,u){const{body:d,params:p,headers:m,...f}=i,h=Ew(d),_={...h?{}:{"Content-Type":"application/json"},...u?{"X-Request-ID":u}:{},...e.headers,...n(),...m},b={...f,headers:_,credentials:e.withCredentials?"include":f.credentials,body:d==null?void 0:h?d:JSON.stringify(d)};return t(Cw(e.baseURL,c,p),b)}async function r(c,i={}){const u=e.requestId?e.requestId():en();let d=await s(c,i,u);if(d.status===401)if(e.refresh)try{await e.refresh(),d=await s(c,i,u)}catch{throw await e.onUnauthorized?.(d),await Tn(d,u)}else await e.onUnauthorized?.(d);if(!d.ok)throw await Tn(d,u);return d.status===204?void 0:(d.headers.get("content-type")??"").includes("application/json")?await d.json():await d.text()}async function a(c,i,u="POST"){return r(c,{method:u,body:i})}return{request:r,get:(c,i)=>r(c,{...i,method:"GET"}),post:(c,i)=>r(c,{...i,method:"POST"}),put:(c,i)=>r(c,{...i,method:"PUT"}),patch:(c,i)=>r(c,{...i,method:"PATCH"}),delete:(c,i)=>r(c,{...i,method:"DELETE"}),upload:a}}function Tw(e,t,n){const s=e.safeParse(t);if(s.success)return s.data;if(typeof process<"u"&&(process.env?.NODE_ENV==="development"||process.env?.NODE_ENV==="test")){const a=s.error.issues.map(c=>` - ${c.path.join(".")||"<root>"}: ${c.message}`).join(`
|
|
2
2
|
`);throw new Error(`[parseResponse] Contract drift on ${n}:
|
|
3
3
|
${a}
|
|
4
4
|
|
|
5
|
-
Raw payload: ${JSON.stringify(t,null,2)}`)}throw new Error(`Resposta inválida do servidor (${n}).`)}function Xw(e){if(!e)return null;try{return JSON.parse(e)}catch{return e}}function Zw(e){const{url:t,body:n,method:s="POST",headers:r={},getToken:a,withCredentials:c=!1,onProgress:i,signal:u,parser:d=JSON.parse,requestId:p}=e;return new Promise((m,f)=>{if(u?.aborted){f(new DOMException("Aborted","AbortError"));return}const h=new XMLHttpRequest;h.open(s,t),h.withCredentials=c;const _=a?.(),b=p?p():Ht(),v={...r};_&&!("Authorization"in v)&&(v.Authorization=`Bearer ${_}`),b&&!("X-Request-ID"in v)&&(v["X-Request-ID"]=b);for(const[w,y]of Object.entries(v))h.setRequestHeader(w,y);i&&(h.upload.onprogress=w=>{i({loaded:w.loaded,total:w.total,fraction:w.lengthComputable?w.loaded/w.total:null,lengthComputable:w.lengthComputable})});function g(){h.abort()}u?.addEventListener("abort",g),h.onload=()=>{u?.removeEventListener("abort",g);const w=h.status>=200&&h.status<300,y=h.getResponseHeader("content-type")??"";if(!w){const j=Xw(h.responseText);f(new xt(Gt(h.status,j,{get:S=>h.getResponseHeader(S)},b)));return}if(h.status===204||!h.responseText){m(void 0);return}if(y.includes("application/json"))try{m(d(h.responseText))}catch(j){f(j)}else m(h.responseText)},h.onerror=()=>{u?.removeEventListener("abort",g),f(new xt({status:0,detail:"Falha de rede no upload.",requestId:b||void 0}))},h.onabort=()=>{u?.removeEventListener("abort",g),f(new DOMException("Aborted","AbortError"))},h.send(n)})}function ex(e,t){return new Promise((n,s)=>{if(t?.aborted){s(new DOMException("Aborted","AbortError"));return}const r=setTimeout(n,e);t?.addEventListener("abort",()=>{clearTimeout(r),s(new DOMException("Aborted","AbortError"))},{once:!0})})}async function tx(e,t={}){const{retries:n=3,initialDelay:s=300,maxDelay:r=1e4,respectRetryAfter:a=!0,shouldRetry:c=()=>!0,onRetry:i,signal:u}=t;let d=0,p;for(;d<n;){if(u?.aborted)throw new DOMException("Aborted","AbortError");try{return await e()}catch(m){if(p=m,d+=1,d>=n||!c(m,d))throw m;const f=a&&typeof m?.retryAfter=="number"?m.retryAfter*1e3:null,h=Math.min(f!==null?f:s*2**(d-1),r);i?.({attempt:d,delay:h,error:m}),await ex(h,u)}}throw p}function nx(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16;return(e==="x"?Math.floor(t):Math.floor(t)&3|8).toString(16)})}function sx(e,t){const{interval:n,disabled:s=!1,stopWhen:r,onError:a}=t,[c,i]=l.useState(null),[u,d]=l.useState(null),[p,m]=l.useState(!s),f=l.useRef(s),h=l.useRef(!1),_=l.useRef(null);async function b(){if(!(f.current||h.current)){h.current=!0;try{const v=await e();if(f.current)return;i(v),d(null),r?.(v)&&(f.current=!0)}catch(v){f.current||(d(v),a?.(v))}finally{h.current=!1,m(!1),f.current||(_.current=setTimeout(b,n))}}}return l.useEffect(()=>{if(f.current=s,s){_.current&&clearTimeout(_.current);return}return m(!0),b(),()=>{f.current=!0,_.current&&clearTimeout(_.current)}},[n,s]),{data:c,error:u,loading:p,stop:()=>{f.current=!0,_.current&&clearTimeout(_.current)},start:()=>{f.current&&(f.current=!1,b())}}}function Yn(e={}){const t=e.name??"tempest-auth",n=e.storage==="session"?()=>sessionStorage:()=>localStorage;return At.create()(bt.persist(s=>({user:e.initialUser??null,token:e.initialToken??null,isAuthenticated:!!e.initialToken,setSession:({user:r,token:a})=>s({user:r,token:a,isAuthenticated:!0}),setUser:r=>s({user:r}),setToken:r=>s({token:r,isAuthenticated:!!r}),logout:()=>s({user:null,token:null,isAuthenticated:!1})}),{name:t,storage:bt.createJSONStorage(n),partialize:s=>({user:s.user,token:s.token}),onRehydrateStorage:()=>s=>{s&&(s.isAuthenticated=!!s.token)}}))}function rx({isAuthenticated:e,children:t,fallback:n}){return o.jsx(o.Fragment,{children:e?t:n})}function xn(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.length%4===0?"":"=".repeat(4-t.length%4);return typeof atob<"u"?atob(t+n):Buffer.from(t+n,"base64").toString("binary")}function Jt(e){const t=e.split(".");if(t.length!==3)throw new Error("Invalid JWT: must contain three segments.");const[n,s,r]=t;try{return{header:JSON.parse(xn(n)),payload:JSON.parse(xn(s)),signature:r}}catch{throw new Error("Invalid JWT: header or payload is not valid JSON.")}}function ox(e,t=0){try{const{payload:n}=Jt(e);if(typeof n.exp!="number")return!0;const s=Math.floor(Date.now()/1e3);return n.exp<=s+t}catch{return!0}}function Vn(e,t={}){const{retries:n=3,initialDelay:s=400,reloadOnFinalFailure:r=!0}=t;async function a(c=1){try{return await e()}catch(i){if(c>=n)throw r&&typeof window<"u"&&window.location.reload(),i;return await new Promise(u=>setTimeout(u,s*2**(c-1))),a(c+1)}}return l.lazy(a)}function Xn(e){let t=null;return()=>t||(t=(async()=>{try{await e()}finally{t=null}})(),t)}function ax(e){const t=e??{};return{token:t.access_token,refreshToken:t.refresh_token}}function cx(e){const{baseURL:t,loginPath:n="/api/auth/login",refreshPath:s="/api/auth/refresh",mePath:r,storeName:a="tempest-auth",storage:c="local",withCredentials:i=!1,fetcher:u,parseTokens:d=ax,parseUser:p,refreshBody:m=k=>k?{refresh_token:k}:void 0}=e,f=Yn({name:a,storage:c}),h=`${a}-refresh`;function _(){return typeof window>"u"?null:c==="session"?window.sessionStorage:window.localStorage}function b(){return _()?.getItem(h)??null}function v(k){const E=_();E&&(k?E.setItem(h,k):E.removeItem(h))}const g=()=>f.getState(),w=()=>g().token,y=gt({baseURL:t,withCredentials:i,fetcher:u});async function j(){if(!r)return g().user;const k=w(),E=await gt({baseURL:t,withCredentials:i,fetcher:u,getToken:()=>k}).get(r);return g().setUser(E),E}async function S(k){const E=await y.post(n,{body:k}),{token:D,refreshToken:$}=d(E);g().setToken(D),v($??null);const C=p?.(E);return C!=null?(g().setUser(C),C):j()}function M(){g().logout(),v(null)}const T=Xn(async()=>{const k=await y.post(s,{body:m(b())}),{token:E,refreshToken:D}=d(k);g().setToken(E),D&&v(D)}),N=gt({baseURL:t,withCredentials:i,fetcher:u,getToken:w,refresh:T,onUnauthorized:()=>M()});return{useAuthStore:f,api:N,login:S,logout:M,refresh:T,getToken:w}}const Zn=l.createContext(null);function ix({control:e,children:t}){return o.jsx(Zn.Provider,{value:e,children:t})}function es(){return l.useContext(Zn)}function lx(e){return typeof e=="boolean"?{can:e}:e}function ts(e){const t=es(),n=JSON.stringify(e),[s,r]=l.useState(()=>t?{allowed:!1,isLoading:!0}:{allowed:!0,isLoading:!1});return l.useEffect(()=>{if(!t){r({allowed:!0,isLoading:!1});return}let a=!1;return r(c=>({...c,isLoading:!0})),Promise.resolve(t.can(e)).then(c=>{if(a)return;const i=lx(c);r({allowed:i.can,isLoading:!1,reason:i.reason})}).catch(c=>{a||r({allowed:!1,isLoading:!1,reason:c instanceof Error?c.message:"access check failed"})}),()=>{a=!0}},[t,n]),s}function ux({action:e,resource:t,params:n,children:s,fallback:r}){const{allowed:a,isLoading:c}=ts({action:e,resource:t,params:n});return c?o.jsx(o.Fragment,{children:r??null}):o.jsx(o.Fragment,{children:a?s:r??null})}function dx(e){const t=new Set(e.permissions??[]),n=e.role?Array.isArray(e.role)?e.role:[e.role]:[];for(const s of n)for(const r of e.roles?.[s]??[])t.add(r);return t}function px(e){const t=dx(e);return{can({action:n,resource:s}){return t.has("*")||s!==void 0&&(t.has(`${s}:*`)||t.has(`${s}:${n}`))||s===void 0&&t.has(n)?{can:!0}:{can:!1,reason:"missing permission"}}}}function Dt(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):typeof e=="string"?e.split(/\s+/).filter(Boolean):[]}function mx(e,t){try{const{payload:n}=Jt(e),s=t?.claim??"permissions",r=Dt(n[s]);if(r.length>0)return r;if(t?.claim===void 0){const a=Dt(n.scopes);return a.length>0?a:Dt(n.scope)}return r}catch{return[]}}function fx({component:e,onSuccess:t,onError:n,locale:s,theme:r,text:a,shape:c,size:i,disableOneTap:u,width:d,className:p,style:m}){return o.jsx("div",{className:p,style:m,children:e({onSuccess:f=>{if(!f.credential){n?.({provider:"google",message:"Google returned no credential",raw:f});return}return t({idToken:f.credential,provider:"google",raw:f})},onError:()=>{n?.({provider:"google",message:"Google login failed"})},locale:s,theme:r,text:a,shape:c,size:i,useOneTap:!u,width:d})})}function hx(e){const{exchange:t,onSuccess:n,onError:s}=e,[r,a]=l.useState(null),[c,i]=l.useState(null),[u,d]=l.useState("pending"),p=l.useRef(!1);return l.useEffect(()=>{if(p.current)return;p.current=!0;let m=!1;return t().then(f=>{if(!m)return a(f),d("success"),n?.(f)}).catch(f=>{m||(i(f),d("error"),s?.(f))}),()=>{m=!0}},[t,n,s]),{loading:u==="pending",data:r,error:c,status:u}}const ns={SHORT:30*1e3,DEFAULT:300*1e3,LONG:1800*1e3,INFINITE:1/0},ss={SHORT:300*1e3,DEFAULT:1800*1e3,LONG:3600*1e3},_x={REALTIME:5*1e3,FAST:30*1e3,DEFAULT:60*1e3,SLOW:300*1e3};function gx(e,t){const n={all:[e]};for(const[s,r]of Object.entries(t))typeof r=="function"?n[s]=(...a)=>[e,...r(...a)]:n[s]=[e,...r];return n}function rs({children:e,client:t,defaultOptions:n}){const[s]=l.useState(()=>t??new G.QueryClient({defaultOptions:{queries:{staleTime:ns.DEFAULT,gcTime:ss.DEFAULT,retry:1,refetchOnWindowFocus:!1,...n?.queries??{}},mutations:{retry:0,...n?.mutations??{}}}}));return o.jsx(G.QueryClientProvider,{client:s,children:e})}function bx(e){if(typeof e!="object"||e===null)return!1;const t=e;return Array.isArray(t.items)&&typeof t.total=="number"&&typeof t.pages=="number"}function yx(e){if(typeof e!="object"||e===null)return!1;const t=e;return Array.isArray(t.items)&&typeof t.has_more=="boolean"&&"next_cursor"in t}function vx(e=20){return{items:[],total:0,page:1,size:e,pages:0}}function wx(e){const{queryKey:t,queryFn:n,initialPage:s=1,pageSize:r=20,sizeParam:a="size",orderBy:c,ascending:i=!1,...u}=e,[d,p]=l.useState(s),m=G.useQuery({...u,queryKey:[...t,{page:d,pageSize:r,sizeParam:a,orderBy:c,ascending:i}],queryFn:()=>{const y={page:d,[a]:r};return c&&(y.order_by=c,y.ascending=i),n(y)},placeholderData:G.keepPreviousData}),f=m.data,h=f?.pages??0,_=d<h,b=d>1,v=l.useCallback(y=>p(Math.max(1,y)),[]),g=l.useCallback(()=>p(y=>y<h?y+1:y),[h]),w=l.useCallback(()=>p(y=>y>1?y-1:y),[]);return{page:f,items:f?.items??[],pageNumber:d,pageCount:h,total:f?.total??0,hasNext:_,hasPrev:b,isLoading:m.isLoading,isFetching:m.isFetching,error:m.error,setPage:v,next:g,prev:w,refetch:()=>{m.refetch()}}}function xx(e){const{queryKey:t,queryFn:n,limit:s=20,orderBy:r,ascending:a=!1,...c}=e,i=G.useInfiniteQuery({...c,queryKey:[...t,{limit:s,orderBy:r,ascending:a}],initialPageParam:null,queryFn:({pageParam:d})=>n({cursor:d,limit:s,order_by:r,ascending:a}),getNextPageParam:d=>d.has_more?d.next_cursor:void 0}),u=i.data?.pages??[];return{items:u.flatMap(d=>d.items),pages:u,hasNextPage:i.hasNextPage,isLoading:i.isLoading,isFetchingNextPage:i.isFetchingNextPage,error:i.error,fetchNextPage:()=>{i.fetchNextPage()},refetch:()=>{i.refetch()}}}const jx=(e,t)=>t==null?`/${e}`:`/${e}/${t}`;function $x(e,t={}){const{pageParam:n="page",sizeParam:s="size",sortFieldParam:r="order_by",sortOrderParam:a="ascending",sortOrderAsBoolean:c=!0,updateMethod:i="patch",buildPath:u=jx}=t,d={getList(p,m={}){const{pagination:f,sort:h,filters:_}=m,b={};if(f?.page!=null&&(b[n]=f.page),f?.pageSize!=null&&(b[s]=f.pageSize),h?.field){const g=h.order??"asc";b[r]=h.field,b[a]=c?g==="asc":g}if(_)for(const[g,w]of Object.entries(_))b[g]=w;const v={params:b};return e.get(u(p),v)},getOne(p,m){return e.get(u(p,m))},getMany(p,m){return Promise.all(m.map(f=>d.getOne(p,f)))},create(p,m){return e.post(u(p),{body:m})},update(p,m,f){const h=u(p,m);return i==="put"?e.put(h,{body:f}):e.patch(h,{body:f})},deleteOne(p,m){return e.delete(u(p,m))}};return d}const os=l.createContext(null);function kx({provider:e,children:t}){return o.jsx(os.Provider,{value:e,children:t})}function Je(){const e=l.useContext(os);if(!e)throw new Error("useDataProvider must be used within a <TempestDataProvider>");return e}function as(e,t){return["data",e,"list",t]}function Qt(e,t){return["data",e,"one",t]}function Nx(e,t,n){const s=Je();return G.useQuery({queryKey:as(e,t),queryFn:()=>s.getList(e,t),...n})}function Sx(e,t,n){const s=Je(),{enabled:r,...a}=n??{};return G.useQuery({queryKey:Qt(e,t),queryFn:()=>s.getOne(e,t),enabled:t!=null&&(r??!0),...a})}function Cx(e,t){const n=Je(),s=G.useQueryClient();return G.useMutation({mutationFn:r=>n.create(e,r),onSuccess:(...r)=>{s.invalidateQueries({queryKey:["data",e,"list"]}),t?.onSuccess?.(...r)},...t})}function Ex(e,t){const n=Je(),s=G.useQueryClient();return G.useMutation({mutationFn:({id:r,data:a})=>n.update(e,r,a),onSuccess:(...r)=>{const[,a]=r;s.invalidateQueries({queryKey:["data",e,"list"]}),s.invalidateQueries({queryKey:Qt(e,a.id)}),t?.onSuccess?.(...r)},...t})}function Tx(e,t){const n=Je(),s=G.useQueryClient();return G.useMutation({mutationFn:r=>n.deleteOne(e,r),onSuccess:(...r)=>{s.invalidateQueries({queryKey:["data",e,"list"]}),t?.onSuccess?.(...r)},...t})}function cs({when:e,redirectTo:t="/",replace:n=!0,children:s}){return o.jsx(o.Fragment,{children:e?s:o.jsx(I.Navigate,{to:t,replace:n})})}function Mx(e){return e}const jn=new WeakMap;function Rx(e){let t=jn.get(e);return t||(t=Vn(e.lazy),jn.set(e,t)),t}function Lx({guard:e,redirectTo:t,children:n}){const s=typeof e=="function"?e():e;return o.jsx(cs,{when:s,redirectTo:t,children:n})}function is(e){return e.map((t,n)=>{let s=t.element;if(t.lazy){const r=Rx(t);s=o.jsx(r,{})}return t.guard!==void 0&&(s=o.jsx(Lx,{guard:t.guard,redirectTo:t.redirectTo,children:s})),t.index?o.jsx(I.Route,{index:!0,element:s},`index-${n}`):o.jsx(I.Route,{path:t.path,element:s,caseSensitive:t.caseSensitive,children:t.children?is(t.children):null},t.path??`route-${n}`)})}const Dx={browser:I.BrowserRouter,hash:I.HashRouter,memory:I.MemoryRouter};function Ix({routes:e,router:t="browser",basename:n,initialEntries:s,fallback:r=null}){const a=l.useMemo(()=>is(e),[e]),c=Dx[t],i=t==="memory"?{basename:n,initialEntries:s}:{basename:n};return o.jsx(c,{...i,children:o.jsx(l.Suspense,{fallback:r,children:o.jsx(I.Routes,{children:a})})})}function Px(e,t={}){if(!t.persist)return At.create()(e);const{name:n,storage:s="local",partialize:r,version:a,migrate:c}=t.persist,i=s==="session"?()=>sessionStorage:()=>localStorage;return At.create()(bt.persist(e,{name:n,storage:bt.createJSONStorage(i),...r?{partialize:r}:{},...a!==void 0?{version:a}:{},...c?{migrate:c}:{}}))}function Ax(e){const t=e;t.use={};for(const n of Object.keys(e.getState()))t.use[n]=()=>e(s=>s[n]);return t}const ls=l.createContext(null);function $n(e){return e==="dark"||e==="light"?e:typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Fx(e){if(!e||typeof window>"u")return null;try{const t=window.localStorage.getItem(e);return t==="light"||t==="dark"||t==="system"?t:null}catch{return null}}function us({children:e,defaultTheme:t="system",storageKey:n="tempest-theme",target:s,attribute:r="data-tempest-theme"}){const[a,c]=l.useState(()=>Fx(n)??t),[i,u]=l.useState(()=>$n(a)),d=l.useRef(s);d.current=s,l.useEffect(()=>{const h=d.current?.()??document.documentElement;if(!h)return;const _=$n(a);h.setAttribute(r,_),u(_)},[a,r]),l.useEffect(()=>{if(a!=="system"||typeof window>"u")return;const h=window.matchMedia("(prefers-color-scheme: dark)"),_=()=>{const b=d.current?.()??document.documentElement,v=h.matches?"dark":"light";b?.setAttribute(r,v),u(v)};return h.addEventListener("change",_),()=>h.removeEventListener("change",_)},[a,r]);const p=l.useCallback(h=>{if(c(h),n&&typeof window<"u")try{window.localStorage.setItem(n,h)}catch{}},[n]),m=l.useCallback(()=>{p(i==="dark"?"light":"dark")},[i,p]),f=l.useMemo(()=>({theme:a,resolvedTheme:i,setTheme:p,toggle:m}),[a,i,p,m]);return o.jsx(ls.Provider,{value:f,children:e})}function Ox(){const e=l.useContext(ls);if(!e)throw new Error("useTheme must be used inside a <ThemeProvider>");return e}function kn(e,t){return t?e.replace(/\{(\w+)\}/g,(n,s)=>{const r=t[s];return r===void 0?`{${s}}`:String(r)}):e}function It(e,t,n,s){const r=e[t]?.[s];if(r!==void 0)return r;if(n){const a=e[n]?.[s];if(a!==void 0)return a}return null}function Yt(e){const{locale:t,fallbackLocale:n=null,messages:s}=e;function r(u,d){const p=It(s,t,n,u);return p===null?u:kn(p,d)}function a(u,d,p){const f=It(s,t,n,`${u}${d===1?"_one":"_other"}`)??It(s,t,n,u);return f===null?u:kn(f,{count:d,...p??{}})}function c(u,d){return new Intl.NumberFormat(t,d).format(u)}function i(u,d){const p=typeof u=="string"?new Date(u):u;return Number.isNaN(p.getTime())?"":new Intl.DateTimeFormat(t,d).format(p)}return{locale:t,fallbackLocale:n,t:r,plural:a,formatNumber:c,formatDate:i,withLocale:u=>Yt({locale:u,fallbackLocale:n??void 0,messages:s})}}const ds=l.createContext(null);function Bx(e,t){if(!e||typeof window>"u")return null;try{const n=window.localStorage.getItem(e);return n&&t.includes(n)?n:null}catch{return null}}function ps({children:e,locale:t,fallbackLocale:n,messages:s,storageKey:r="tempest-locale"}){const a=l.useMemo(()=>Object.keys(s),[s]),[c,i]=l.useState(()=>Bx(r,a)??t);l.useEffect(()=>{typeof document<"u"&&document.documentElement.setAttribute("lang",c)},[c]);const u=l.useCallback(p=>{if(i(p),r&&typeof window<"u")try{window.localStorage.setItem(r,p)}catch{}},[r]),d=l.useMemo(()=>({...Yt({locale:c,fallbackLocale:n,messages:s}),setLocale:u,availableLocales:a}),[c,n,s,u,a]);return o.jsx(ds.Provider,{value:d,children:e})}function ms(){const e=l.useContext(ds);if(!e)throw new Error("useI18n must be used inside an <I18nProvider>");return e}function zx(){return ms().t}function Wx(e=[],t=[]){if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!0;return!1}class fs extends l.Component{state={error:null};static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,n){this.props.onError?.(t,n)}componentDidUpdate(t){this.state.error&&Wx(t.resetKeys,this.props.resetKeys)&&this.reset()}reset=()=>{this.setState({error:null})};render(){const{error:t}=this.state;if(!t)return this.props.children;const{fallback:n}=this.props;return typeof n=="function"?n({error:t,reset:this.reset}):n}}function qx({children:e,query:t,theme:n,i18n:s,errorBoundary:r}){let a=e;return s&&(a=o.jsx(ps,{...s,children:a})),n!==!1&&(a=o.jsx(us,{...n||{},children:a})),t!==!1&&(a=o.jsx(rs,{...t||{},children:a})),r&&(a=o.jsx(fs,{...r,children:a})),o.jsx(o.Fragment,{children:a})}function Ux(e){try{return JSON.parse(e)}catch{return e}}function hs(e,t={}){const{withCredentials:n=!1,namedEvents:s=[],heartbeatEvents:r=["ping"],maxRetries:a=10,initialBackoff:c=1e3,maxBackoff:i=3e4,parser:u=Ux,onOpen:d,onMessage:p,onError:m,onStatusChange:f}=t;let h=null,_=null,b=0,v="idle",g=!1;function w(N){v!==N&&(v=N,f?.(N))}function y(N,k){r.includes(N)||p?.({event:N,data:u(k.data),id:k.lastEventId||void 0,raw:k})}function j(){if(g)return;if(b>=a){w("error");return}const N=Math.min(c*2**b,i);b+=1,_=setTimeout(S,N)}function S(){if(g)return;h&&h.close(),w("connecting");const N=new EventSource(e,{withCredentials:n});h=N,N.onopen=()=>{b=0,w("open"),d?.()},N.onmessage=k=>y("message",k);for(const k of s)N.addEventListener(k,E=>y(k,E));for(const k of r)N.addEventListener(k,()=>{});N.onerror=k=>{m?.(k),N.close(),h=null,w("closed"),j()}}function M(){g=!0,_&&(clearTimeout(_),_=null),b=0,h&&(h.close(),h=null),w("closed")}function T(){_&&(clearTimeout(_),_=null),b=0,g=!1,S()}return S(),{close:M,reconnect:T,get status(){return v}}}function Kx(e,t={}){const{enabled:n=!0,onMessage:s,...r}=t,[a,c]=l.useState("idle"),[i,u]=l.useState(null),d=l.useRef(null),p=l.useRef(s);return p.current=s,l.useEffect(()=>{if(!n||!e){c("idle");return}const m=hs(e,{...r,onStatusChange:c,onMessage:f=>{u(f),p.current?.(f)}});return d.current=m.reconnect,()=>{m.close(),d.current=null}},[e,n]),{status:a,lastMessage:i,reconnect:()=>d.current?.()}}function _s(e){const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),s=window.atob(n),r=new ArrayBuffer(s.length),a=new Uint8Array(r);for(let c=0;c<s.length;c++)a[c]=s.charCodeAt(c);return a}function rt(){return typeof window<"u"&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window}class Ut extends Error{constructor(){super("Web Push não suportado neste navegador."),this.name="WebPushUnsupportedError"}}class gs extends Error{constructor(){super("Permissão de notificação negada pelo usuário."),this.name="WebPushPermissionDeniedError"}}class bs{config;constructor(t){this.config=t}static isSupported(){return rt()}async registration(){if(!rt())throw new Ut;return this.config.getRegistration?await this.config.getRegistration():await navigator.serviceWorker.ready}permission(){return typeof Notification>"u"?"unsupported":Notification.permission}async requestPermission(){if(typeof Notification>"u")throw new Ut;return Notification.requestPermission()}async getSubscription(){return(await this.registration()).pushManager.getSubscription()}async isSubscribed(){return rt()?await this.getSubscription()!==null:!1}async subscribe(){if(await this.requestPermission()!=="granted")throw new gs;const n=await this.registration(),s=await n.pushManager.getSubscription();if(s)return await this.config.onSubscribe(s.toJSON()),s;const r=await n.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:_s(this.config.vapidPublicKey)});return await this.config.onSubscribe(r.toJSON()),r}async unsubscribe(){const t=await this.getSubscription();return t?(this.config.onUnsubscribe&&await this.config.onUnsubscribe(t.toJSON()),t.unsubscribe()):!1}}function Hx(e){const t=l.useRef(e);t.current=e;const n=l.useMemo(()=>new bs({vapidPublicKey:e.vapidPublicKey,onSubscribe:b=>t.current.onSubscribe(b),onUnsubscribe:b=>t.current.onUnsubscribe?.(b),getRegistration:e.getRegistration}),[e.vapidPublicKey,e.getRegistration]),[s]=l.useState(()=>rt()),[r,a]=l.useState(()=>n.permission()),[c,i]=l.useState(!1),[u,d]=l.useState(!1),[p,m]=l.useState(null),f=l.useCallback(async()=>{if(s){a(n.permission());try{const b=await n.isSubscribed();i(b)}catch(b){m(b instanceof Error?b:new Error(String(b)))}}},[n,s]);l.useEffect(()=>{f()},[f]);const h=l.useCallback(async()=>{if(s){d(!0),m(null);try{await n.subscribe(),i(!0),a(n.permission())}catch(b){throw m(b instanceof Error?b:new Error(String(b))),b}finally{d(!1)}}},[n,s]),_=l.useCallback(async()=>{if(s){d(!0),m(null);try{await n.unsubscribe(),i(!1)}catch(b){throw m(b instanceof Error?b:new Error(String(b))),b}finally{d(!1)}}},[n,s]);return{supported:s,permission:r,subscribed:c,loading:u,error:p,subscribe:h,unsubscribe:_,refresh:f}}function Vt(){let e=null;async function t(s,{volume:r=1,loop:a=!1,autoplay:c=!0,stopPrevious:i=!1,onEnded:u,onError:d}={}){try{i&&e&&(e.pause(),e.currentTime=0);const p=new Audio(s);return p.volume=Math.max(0,Math.min(1,r)),p.loop=a,p.preload="auto",u&&(p.onended=u),d&&(p.onerror=m=>d(m)),e=p,c&&await p.play(),p}catch(p){return d?.(p),null}}function n(){e&&(e.pause(),e.currentTime=0)}return{play:t,stop:n,current:()=>e}}let Pt=null;function ys(){return Pt||(Pt=Vt()),Pt}async function Gx(e,t){return ys().play(e,t)}function Jx(){ys().stop()}function Qx(){const e=l.useRef(null),[t,n]=l.useState(!1);e.current||(e.current=Vt()),l.useEffect(()=>()=>{e.current?.stop()},[]);const s=l.useCallback(async(a,c)=>{await e.current.play(a,c)&&n(!0)},[]),r=l.useCallback(()=>{e.current?.stop()},[]);return{play:s,stop:r,unlocked:t}}class Yx extends Ms{store;constructor(t,n,s,r){super(t),this.version(n).stores({[s]:r}),this.store=this.table(s)}}function Vx(e){const{databaseName:t,version:n,tableName:s,indexes:r,keyPath:a="id",ownerField:c}=e,i=new Yx(t,n,s,r),u=i.store;function d(m,f){return!c||!f?m:{...m,[c]:f}}async function p(m,f={}){const{orderBy:h=a,reverse:_=!1,limit:b,offset:v,filter:g}=f;let w=c&&m?u.where(c).equals(m):u.toCollection();g&&(w=w.filter(g));let y=h===a?await w.toArray():await w.sortBy(h);return _&&(y=y.reverse()),v&&(y=y.slice(v)),typeof b=="number"&&(y=y.slice(0,b)),y}return{put:(m,f)=>u.put(d(m,f)),bulkPut:(m,f)=>u.bulkPut(m.map(h=>d(h,f))),get:m=>u.get(m),list:p,update:(m,f)=>u.update(m,f),updateMany:async(m,f)=>{const h=f;return c&&m?u.where(c).equals(m).modify(h):u.toCollection().modify(h)},delete:m=>u.delete(m),clear:async m=>{if(c&&m){await u.where(c).equals(m).delete();return}await u.clear()},count:m=>c&&m?u.where(c).equals(m).count():u.count(),raw:u,db:i}}function Xx(){const[,e]=l.useState(null);return l.useCallback(t=>{e(()=>{throw t instanceof Error?t:new Error(String(t))})},[])}function Zx({name:e,label:t,helperText:n,required:s,control:r,children:a}){const c=me.useFormContext(),i=r??c?.control;if(!i)throw new Error("FormField requires either a `control` prop or a <FormProvider> in the tree.");return o.jsx(me.Controller,{name:e,control:i,render:({field:u,fieldState:d})=>{if(!l.isValidElement(a))return a;const p=d.error?.message;return l.cloneElement(a,{name:u.name,value:u.value,onChange:u.onChange,onBlur:u.onBlur,ref:u.ref,label:t,helperText:p?void 0:n,error:p,required:s,"aria-invalid":!!p})}})}function ej(e,t){const n=e.safeParse(t);if(n.success)return{success:!0,data:n.data,errors:{}};const s={};for(const r of n.error.issues){const a=r.path.length===0?"_root":r.path.join(".");a in s||(s[a]=r.message)}return{success:!1,errors:s}}function vs(e){return async(t,n,s)=>{const r=e.safeParse(t);if(r.success)return{values:r.data,errors:{}};const a={},c=s.criteriaMode??"firstError";for(const i of r.error.issues){const u=i.path.length===0?"_root":i.path.join(".");c==="firstError"&&a[u]||(a[u]={type:i.code,message:i.message})}return{values:{},errors:a}}}function tj(e,t={}){return me.useForm({...t,resolver:vs(e)})}function at(e){return e.replace(/\D/g,"")}function nj(e){const t=at(e);if(t.length!==11||/^(\d)\1+$/.test(t))return!1;const n=t.split("").map(Number);let s=0;for(let a=0;a<9;a++)s+=n[a]*(10-a);let r=s*10%11;if(r===10&&(r=0),r!==n[9])return!1;s=0;for(let a=0;a<10;a++)s+=n[a]*(11-a);return r=s*10%11,r===10&&(r=0),r===n[10]}function sj(e){const t=at(e);if(t.length!==14||/^(\d)\1+$/.test(t))return!1;const n=t.split("").map(Number),s=[5,4,3,2,9,8,7,6,5,4,3,2],r=[6,5,4,3,2,9,8,7,6,5,4,3,2];let a=0;for(let i=0;i<12;i++)a+=n[i]*s[i];let c=a%11;if(c=c<2?0:11-c,c!==n[12])return!1;a=0;for(let i=0;i<13;i++)a+=n[i]*r[i];return c=a%11,c=c<2?0:11-c,c===n[13]}function ws(e){return at(e).slice(0,8).replace(/(\d{5})(\d)/,"$1-$2")}function xs(e){return at(e).slice(0,14).replace(/(\d{2})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1/$2").replace(/(\d{4})(\d)/,"$1-$2")}function rj(e){return at(e)}function kt(e,t="numeric"){return l.forwardRef(function({value:s,onChange:r,...a},c){return o.jsx(jt,{...a,ref:c,value:e(s??""),inputMode:t,onChange:i=>r(e(i.target.value))})})}const oj=kt(Jn),aj=kt(xs),cj=kt(Gn,"tel"),ij=kt(ws);function lj(e,t,n){return new Intl.NumberFormat(t,{style:"currency",currency:n}).format(e/100)}function uj(e){const t=e.replace(/\D/g,"");return t?Number.parseInt(t,10):0}const dj=l.forwardRef(function({value:t,onChange:n,currency:s="BRL",locale:r="pt-BR",...a},c){return o.jsx(jt,{...a,ref:c,type:"text",inputMode:"numeric",value:lj(t||0,r,s),onChange:i=>n(uj(i.target.value))})});function pj(){const[e,t]=l.useState(!1),[n,s]=l.useState(null),[r,a]=l.useState(null),c=l.useCallback(async u=>{const d=u.replace(/\D/g,"");if(d.length!==8)return s("CEP inválido."),null;t(!0),s(null);try{const m=await(await fetch(`https://viacep.com.br/ws/${d}/json/`)).json();return"erro"in m&&m.erro?(s("CEP não encontrado."),a(null),null):(a(m),m)}catch(p){return s(p instanceof Error?p.message:String(p)),null}finally{t(!1)}},[]),i=l.useCallback(()=>{t(!1),s(null),a(null)},[]);return{loading:e,error:n,data:r,lookup:c,reset:i}}function mj(e){try{return JSON.parse(e)}catch{return e}}function js(e,t={}){const{protocols:n,maxRetries:s=10,initialBackoff:r=1e3,maxBackoff:a=3e4,pingInterval:c=0,pingPayload:i=JSON.stringify({type:"ping"}),parser:u=mj,onOpen:d,onMessage:p,onClose:m,onError:f,onStatusChange:h}=t;let _=null,b=null,v=null,g=0,w="idle",y=!1;function j($){w!==$&&(w=$,h?.($))}function S(){v&&(clearInterval(v),v=null)}function M(){!c||c<=0||(S(),v=setInterval(()=>{_?.readyState===WebSocket.OPEN&&_.send(i)},c))}function T(){if(y)return;if(g>=s){j("error");return}const $=Math.min(r*2**g,a);g+=1,b=setTimeout(N,$)}function N(){if(y)return;_&&(_.onopen=null,_.onmessage=null,_.onclose=null,_.onerror=null,_.close()),j("connecting");const $=new WebSocket(e,n);_=$,$.onopen=C=>{g=0,j("open"),M(),d?.(C)},$.onmessage=C=>{const F=typeof C.data=="string"?C.data:"";p?.({data:u(F),raw:C})},$.onerror=C=>{f?.(C)},$.onclose=C=>{S(),m?.(C),_=null,j("closed"),!y&&!C.wasClean&&T()}}function k($){return _?.readyState!==WebSocket.OPEN?!1:(_.send($),!0)}function E($,C){y=!0,b&&(clearTimeout(b),b=null),S(),g=0,_&&(j("closing"),_.close($,C),_=null),j("closed")}function D(){b&&(clearTimeout(b),b=null),g=0,y=!1,N()}return N(),{send:k,close:E,reconnect:D,get status(){return w}}}function fj(e,t={}){const{enabled:n=!0,onMessage:s,...r}=t,[a,c]=l.useState("idle"),[i,u]=l.useState(null),d=l.useRef(null),p=l.useRef(s);p.current=s,l.useEffect(()=>{if(!n||!e){c("idle");return}const h=js(e,{...r,onStatusChange:c,onMessage:_=>{u(_),p.current?.(_)}});return d.current=h,()=>{h.close(),d.current=null}},[e,n]);const m=l.useCallback(h=>d.current?.send(h)??!1,[]),f=l.useCallback(()=>{d.current?.reconnect()},[]);return{status:a,lastMessage:i,send:m,reconnect:f}}function hj(e={}){const{storageKey:t="tempest-theme",defaultTheme:n="system"}=e;if(typeof window>"u")return n==="dark"?"dark":"light";let s=null;try{s=window.localStorage.getItem(t)}catch{s=null}const r=s??n;return r==="dark"||r==="light"?r:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function _j(e={}){const t=e.storageKey??"tempest-theme",n=e.defaultTheme??"system";return`
|
|
5
|
+
Raw payload: ${JSON.stringify(t,null,2)}`)}throw new Error(`Resposta inválida do servidor (${n}).`)}function Mw(e){if(!e)return null;try{return JSON.parse(e)}catch{return e}}function Lw(e){const{url:t,body:n,method:s="POST",headers:r={},getToken:a,withCredentials:c=!1,onProgress:i,signal:u,parser:d=JSON.parse,requestId:p}=e;return new Promise((m,f)=>{if(u?.aborted){f(new DOMException("Aborted","AbortError"));return}const h=new XMLHttpRequest;h.open(s,t),h.withCredentials=c;const _=a?.(),b=p?p():en(),v={...r};_&&!("Authorization"in v)&&(v.Authorization=`Bearer ${_}`),b&&!("X-Request-ID"in v)&&(v["X-Request-ID"]=b);for(const[x,y]of Object.entries(v))h.setRequestHeader(x,y);i&&(h.upload.onprogress=x=>{i({loaded:x.loaded,total:x.total,fraction:x.lengthComputable?x.loaded/x.total:null,lengthComputable:x.lengthComputable})});function g(){h.abort()}u?.addEventListener("abort",g),h.onload=()=>{u?.removeEventListener("abort",g);const x=h.status>=200&&h.status<300,y=h.getResponseHeader("content-type")??"";if(!x){const j=Mw(h.responseText);f(new Ct(tn(h.status,j,{get:S=>h.getResponseHeader(S)},b)));return}if(h.status===204||!h.responseText){m(void 0);return}if(y.includes("application/json"))try{m(d(h.responseText))}catch(j){f(j)}else m(h.responseText)},h.onerror=()=>{u?.removeEventListener("abort",g),f(new Ct({status:0,detail:"Falha de rede no upload.",requestId:b||void 0}))},h.onabort=()=>{u?.removeEventListener("abort",g),f(new DOMException("Aborted","AbortError"))},h.send(n)})}function Rw(e,t){return new Promise((n,s)=>{if(t?.aborted){s(new DOMException("Aborted","AbortError"));return}const r=setTimeout(n,e);t?.addEventListener("abort",()=>{clearTimeout(r),s(new DOMException("Aborted","AbortError"))},{once:!0})})}async function Pw(e,t={}){const{retries:n=3,initialDelay:s=300,maxDelay:r=1e4,respectRetryAfter:a=!0,shouldRetry:c=()=>!0,onRetry:i,signal:u}=t;let d=0,p;for(;d<n;){if(u?.aborted)throw new DOMException("Aborted","AbortError");try{return await e()}catch(m){if(p=m,d+=1,d>=n||!c(m,d))throw m;const f=a&&typeof m?.retryAfter=="number"?m.retryAfter*1e3:null,h=Math.min(f!==null?f:s*2**(d-1),r);i?.({attempt:d,delay:h,error:m}),await Rw(h,u)}}throw p}function Dw(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16;return(e==="x"?Math.floor(t):Math.floor(t)&3|8).toString(16)})}function Iw(e,t){const{interval:n,disabled:s=!1,stopWhen:r,onError:a}=t,[c,i]=l.useState(null),[u,d]=l.useState(null),[p,m]=l.useState(!s),f=l.useRef(s),h=l.useRef(!1),_=l.useRef(null);async function b(){if(!(f.current||h.current)){h.current=!0;try{const v=await e();if(f.current)return;i(v),d(null),r?.(v)&&(f.current=!0)}catch(v){f.current||(d(v),a?.(v))}finally{h.current=!1,m(!1),f.current||(_.current=setTimeout(b,n))}}}return l.useEffect(()=>{if(f.current=s,s){_.current&&clearTimeout(_.current);return}return m(!0),b(),()=>{f.current=!0,_.current&&clearTimeout(_.current)}},[n,s]),{data:c,error:u,loading:p,stop:()=>{f.current=!0,_.current&&clearTimeout(_.current)},start:()=>{f.current&&(f.current=!1,b())}}}function is(e={}){const t=e.name??"tempest-auth",n=e.storage==="session"?()=>sessionStorage:()=>localStorage;return qt.create()(kt.persist(s=>({user:e.initialUser??null,token:e.initialToken??null,isAuthenticated:!!e.initialToken,setSession:({user:r,token:a})=>s({user:r,token:a,isAuthenticated:!0}),setUser:r=>s({user:r}),setToken:r=>s({token:r,isAuthenticated:!!r}),logout:()=>s({user:null,token:null,isAuthenticated:!1})}),{name:t,storage:kt.createJSONStorage(n),partialize:s=>({user:s.user,token:s.token}),onRehydrateStorage:()=>s=>{s&&(s.isAuthenticated=!!s.token)}}))}function Aw({isAuthenticated:e,children:t,fallback:n}){return o.jsx(o.Fragment,{children:e?t:n})}function Mn(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.length%4===0?"":"=".repeat(4-t.length%4);return typeof atob<"u"?atob(t+n):Buffer.from(t+n,"base64").toString("binary")}function nn(e){const t=e.split(".");if(t.length!==3)throw new Error("Invalid JWT: must contain three segments.");const[n,s,r]=t;try{return{header:JSON.parse(Mn(n)),payload:JSON.parse(Mn(s)),signature:r}}catch{throw new Error("Invalid JWT: header or payload is not valid JSON.")}}function Fw(e,t=0){try{const{payload:n}=nn(e);if(typeof n.exp!="number")return!0;const s=Math.floor(Date.now()/1e3);return n.exp<=s+t}catch{return!0}}function ls(e,t={}){const{retries:n=3,initialDelay:s=400,reloadOnFinalFailure:r=!0}=t;async function a(c=1){try{return await e()}catch(i){if(c>=n)throw r&&typeof window<"u"&&window.location.reload(),i;return await new Promise(u=>setTimeout(u,s*2**(c-1))),a(c+1)}}return l.lazy(a)}function us(e){let t=null;return()=>t||(t=(async()=>{try{await e()}finally{t=null}})(),t)}function Ow(e){const t=e??{};return{token:t.access_token,refreshToken:t.refresh_token}}function Bw(e){const{baseURL:t,loginPath:n="/api/auth/login",refreshPath:s="/api/auth/refresh",mePath:r,storeName:a="tempest-auth",storage:c="local",withCredentials:i=!1,fetcher:u,parseTokens:d=Ow,parseUser:p,refreshBody:m=k=>k?{refresh_token:k}:void 0}=e,f=is({name:a,storage:c}),h=`${a}-refresh`;function _(){return typeof window>"u"?null:c==="session"?window.sessionStorage:window.localStorage}function b(){return _()?.getItem(h)??null}function v(k){const E=_();E&&(k?E.setItem(h,k):E.removeItem(h))}const g=()=>f.getState(),x=()=>g().token,y=jt({baseURL:t,withCredentials:i,fetcher:u});async function j(){if(!r)return g().user;const k=x(),E=await jt({baseURL:t,withCredentials:i,fetcher:u,getToken:()=>k}).get(r);return g().setUser(E),E}async function S(k){const E=await y.post(n,{body:k}),{token:P,refreshToken:$}=d(E);g().setToken(P),v($??null);const C=p?.(E);return C!=null?(g().setUser(C),C):j()}function M(){g().logout(),v(null)}const T=us(async()=>{const k=await y.post(s,{body:m(b())}),{token:E,refreshToken:P}=d(k);g().setToken(E),P&&v(P)}),N=jt({baseURL:t,withCredentials:i,fetcher:u,getToken:x,refresh:T,onUnauthorized:()=>M()});return{useAuthStore:f,api:N,login:S,logout:M,refresh:T,getToken:x}}const ds=l.createContext(null);function zw({control:e,children:t}){return o.jsx(ds.Provider,{value:e,children:t})}function ps(){return l.useContext(ds)}function Ww(e){return typeof e=="boolean"?{can:e}:e}function ms(e){const t=ps(),n=JSON.stringify(e),[s,r]=l.useState(()=>t?{allowed:!1,isLoading:!0}:{allowed:!0,isLoading:!1});return l.useEffect(()=>{if(!t){r({allowed:!0,isLoading:!1});return}let a=!1;return r(c=>({...c,isLoading:!0})),Promise.resolve(t.can(e)).then(c=>{if(a)return;const i=Ww(c);r({allowed:i.can,isLoading:!1,reason:i.reason})}).catch(c=>{a||r({allowed:!1,isLoading:!1,reason:c instanceof Error?c.message:"access check failed"})}),()=>{a=!0}},[t,n]),s}function qw({action:e,resource:t,params:n,children:s,fallback:r}){const{allowed:a,isLoading:c}=ms({action:e,resource:t,params:n});return c?o.jsx(o.Fragment,{children:r??null}):o.jsx(o.Fragment,{children:a?s:r??null})}function Uw(e){const t=new Set(e.permissions??[]),n=e.role?Array.isArray(e.role)?e.role:[e.role]:[];for(const s of n)for(const r of e.roles?.[s]??[])t.add(r);return t}function Kw(e){const t=Uw(e);return{can({action:n,resource:s}){return t.has("*")||s!==void 0&&(t.has(`${s}:*`)||t.has(`${s}:${n}`))||s===void 0&&t.has(n)?{can:!0}:{can:!1,reason:"missing permission"}}}}function Bt(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):typeof e=="string"?e.split(/\s+/).filter(Boolean):[]}function Hw(e,t){try{const{payload:n}=nn(e),s=t?.claim??"permissions",r=Bt(n[s]);if(r.length>0)return r;if(t?.claim===void 0){const a=Bt(n.scopes);return a.length>0?a:Bt(n.scope)}return r}catch{return[]}}function Gw({component:e,onSuccess:t,onError:n,locale:s,theme:r,text:a,shape:c,size:i,disableOneTap:u,width:d,className:p,style:m}){return o.jsx("div",{className:p,style:m,children:e({onSuccess:f=>{if(!f.credential){n?.({provider:"google",message:"Google returned no credential",raw:f});return}return t({idToken:f.credential,provider:"google",raw:f})},onError:()=>{n?.({provider:"google",message:"Google login failed"})},locale:s,theme:r,text:a,shape:c,size:i,useOneTap:!u,width:d})})}function Qw(e){const{exchange:t,onSuccess:n,onError:s}=e,[r,a]=l.useState(null),[c,i]=l.useState(null),[u,d]=l.useState("pending"),p=l.useRef(!1);return l.useEffect(()=>{if(p.current)return;p.current=!0;let m=!1;return t().then(f=>{if(!m)return a(f),d("success"),n?.(f)}).catch(f=>{m||(i(f),d("error"),s?.(f))}),()=>{m=!0}},[t,n,s]),{loading:u==="pending",data:r,error:c,status:u}}const fs={SHORT:30*1e3,DEFAULT:300*1e3,LONG:1800*1e3,INFINITE:1/0},hs={SHORT:300*1e3,DEFAULT:1800*1e3,LONG:3600*1e3},Jw={REALTIME:5*1e3,FAST:30*1e3,DEFAULT:60*1e3,SLOW:300*1e3};function Yw(e,t){const n={all:[e]};for(const[s,r]of Object.entries(t))typeof r=="function"?n[s]=(...a)=>[e,...r(...a)]:n[s]=[e,...r];return n}function _s({children:e,client:t,defaultOptions:n}){const[s]=l.useState(()=>t??new G.QueryClient({defaultOptions:{queries:{staleTime:fs.DEFAULT,gcTime:hs.DEFAULT,retry:1,refetchOnWindowFocus:!1,...n?.queries??{}},mutations:{retry:0,...n?.mutations??{}}}}));return o.jsx(G.QueryClientProvider,{client:s,children:e})}function Xw(e){if(typeof e!="object"||e===null)return!1;const t=e;return Array.isArray(t.items)&&typeof t.total=="number"&&typeof t.pages=="number"}function Vw(e){if(typeof e!="object"||e===null)return!1;const t=e;return Array.isArray(t.items)&&typeof t.has_more=="boolean"&&"next_cursor"in t}function Zw(e=20){return{items:[],total:0,page:1,size:e,pages:0}}function ej(e){const{queryKey:t,queryFn:n,initialPage:s=1,pageSize:r=20,sizeParam:a="size",orderBy:c,ascending:i=!1,...u}=e,[d,p]=l.useState(s),m=G.useQuery({...u,queryKey:[...t,{page:d,pageSize:r,sizeParam:a,orderBy:c,ascending:i}],queryFn:()=>{const y={page:d,[a]:r};return c&&(y.order_by=c,y.ascending=i),n(y)},placeholderData:G.keepPreviousData}),f=m.data,h=f?.pages??0,_=d<h,b=d>1,v=l.useCallback(y=>p(Math.max(1,y)),[]),g=l.useCallback(()=>p(y=>y<h?y+1:y),[h]),x=l.useCallback(()=>p(y=>y>1?y-1:y),[]);return{page:f,items:f?.items??[],pageNumber:d,pageCount:h,total:f?.total??0,hasNext:_,hasPrev:b,isLoading:m.isLoading,isFetching:m.isFetching,error:m.error,setPage:v,next:g,prev:x,refetch:()=>{m.refetch()}}}function tj(e){const{queryKey:t,queryFn:n,limit:s=20,orderBy:r,ascending:a=!1,...c}=e,i=G.useInfiniteQuery({...c,queryKey:[...t,{limit:s,orderBy:r,ascending:a}],initialPageParam:null,queryFn:({pageParam:d})=>n({cursor:d,limit:s,order_by:r,ascending:a}),getNextPageParam:d=>d.has_more?d.next_cursor:void 0}),u=i.data?.pages??[];return{items:u.flatMap(d=>d.items),pages:u,hasNextPage:i.hasNextPage,isLoading:i.isLoading,isFetchingNextPage:i.isFetchingNextPage,error:i.error,fetchNextPage:()=>{i.fetchNextPage()},refetch:()=>{i.refetch()}}}const nj=(e,t)=>t==null?`/${e}`:`/${e}/${t}`;function sj(e,t={}){const{pageParam:n="page",sizeParam:s="size",sortFieldParam:r="order_by",sortOrderParam:a="ascending",sortOrderAsBoolean:c=!0,updateMethod:i="patch",buildPath:u=nj}=t,d={getList(p,m={}){const{pagination:f,sort:h,filters:_}=m,b={};if(f?.page!=null&&(b[n]=f.page),f?.pageSize!=null&&(b[s]=f.pageSize),h?.field){const g=h.order??"asc";b[r]=h.field,b[a]=c?g==="asc":g}if(_)for(const[g,x]of Object.entries(_))b[g]=x;const v={params:b};return e.get(u(p),v)},getOne(p,m){return e.get(u(p,m))},getMany(p,m){return Promise.all(m.map(f=>d.getOne(p,f)))},create(p,m){return e.post(u(p),{body:m})},update(p,m,f){const h=u(p,m);return i==="put"?e.put(h,{body:f}):e.patch(h,{body:f})},deleteOne(p,m){return e.delete(u(p,m))}};return d}const gs=l.createContext(null);function rj({provider:e,children:t}){return o.jsx(gs.Provider,{value:e,children:t})}function Ze(){const e=l.useContext(gs);if(!e)throw new Error("useDataProvider must be used within a <TempestDataProvider>");return e}function bs(e,t){return["data",e,"list",t]}function sn(e,t){return["data",e,"one",t]}function oj(e,t,n){const s=Ze();return G.useQuery({queryKey:bs(e,t),queryFn:()=>s.getList(e,t),...n})}function aj(e,t,n){const s=Ze(),{enabled:r,...a}=n??{};return G.useQuery({queryKey:sn(e,t),queryFn:()=>s.getOne(e,t),enabled:t!=null&&(r??!0),...a})}function cj(e,t){const n=Ze(),s=G.useQueryClient();return G.useMutation({mutationFn:r=>n.create(e,r),onSuccess:(...r)=>{s.invalidateQueries({queryKey:["data",e,"list"]}),t?.onSuccess?.(...r)},...t})}function ij(e,t){const n=Ze(),s=G.useQueryClient();return G.useMutation({mutationFn:({id:r,data:a})=>n.update(e,r,a),onSuccess:(...r)=>{const[,a]=r;s.invalidateQueries({queryKey:["data",e,"list"]}),s.invalidateQueries({queryKey:sn(e,a.id)}),t?.onSuccess?.(...r)},...t})}function lj(e,t){const n=Ze(),s=G.useQueryClient();return G.useMutation({mutationFn:r=>n.deleteOne(e,r),onSuccess:(...r)=>{s.invalidateQueries({queryKey:["data",e,"list"]}),t?.onSuccess?.(...r)},...t})}function ys({when:e,redirectTo:t="/",replace:n=!0,children:s}){return o.jsx(o.Fragment,{children:e?s:o.jsx(D.Navigate,{to:t,replace:n})})}function uj(e){return e}const Ln=new WeakMap;function dj(e){let t=Ln.get(e);return t||(t=ls(e.lazy),Ln.set(e,t)),t}function pj({guard:e,redirectTo:t,children:n}){const s=typeof e=="function"?e():e;return o.jsx(ys,{when:s,redirectTo:t,children:n})}function vs(e){return e.map((t,n)=>{let s=t.element;if(t.lazy){const r=dj(t);s=o.jsx(r,{})}return t.guard!==void 0&&(s=o.jsx(pj,{guard:t.guard,redirectTo:t.redirectTo,children:s})),t.index?o.jsx(D.Route,{index:!0,element:s},`index-${n}`):o.jsx(D.Route,{path:t.path,element:s,caseSensitive:t.caseSensitive,children:t.children?vs(t.children):null},t.path??`route-${n}`)})}const mj={browser:D.BrowserRouter,hash:D.HashRouter,memory:D.MemoryRouter};function fj({routes:e,router:t="browser",basename:n,initialEntries:s,fallback:r=null}){const a=l.useMemo(()=>vs(e),[e]),c=mj[t],i=t==="memory"?{basename:n,initialEntries:s}:{basename:n};return o.jsx(c,{...i,children:o.jsx(l.Suspense,{fallback:r,children:o.jsx(D.Routes,{children:a})})})}function hj(e,t={}){if(!t.persist)return qt.create()(e);const{name:n,storage:s="local",partialize:r,version:a,migrate:c}=t.persist,i=s==="session"?()=>sessionStorage:()=>localStorage;return qt.create()(kt.persist(e,{name:n,storage:kt.createJSONStorage(i),...r?{partialize:r}:{},...a!==void 0?{version:a}:{},...c?{migrate:c}:{}}))}function _j(e){const t=e;t.use={};for(const n of Object.keys(e.getState()))t.use[n]=()=>e(s=>s[n]);return t}const xs=l.createContext(null);function Rn(e){return e==="dark"||e==="light"?e:typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Pn(e,t,n,s){const r=Array.isArray(n)?n:[n];for(const a of r)e.setAttribute(a,t);if(s&&typeof document<"u"){const a=document.querySelector('meta[name="theme-color"]');a&&(a.content=s[t])}}function gj(e){if(!e||typeof window>"u")return null;try{const t=window.localStorage.getItem(e);return t==="light"||t==="dark"||t==="system"?t:null}catch{return null}}function ws({children:e,defaultTheme:t="system",storageKey:n="tempest-theme",target:s,attribute:r="data-tempest-theme",themeColor:a}){const[c,i]=l.useState(()=>gj(n)??t),[u,d]=l.useState(()=>Rn(c)),p=l.useRef(s);p.current=s;const m=Array.isArray(r)?r.join(","):r,f=l.useRef(a);f.current=a,l.useEffect(()=>{const v=p.current?.()??document.documentElement;if(!v)return;const g=Rn(c);Pn(v,g,r,f.current),d(g)},[c,m]),l.useEffect(()=>{if(c!=="system"||typeof window>"u")return;const v=window.matchMedia("(prefers-color-scheme: dark)"),g=()=>{const x=p.current?.()??document.documentElement;if(!x)return;const y=v.matches?"dark":"light";Pn(x,y,r,f.current),d(y)};return v.addEventListener("change",g),()=>v.removeEventListener("change",g)},[c,m]);const h=l.useCallback(v=>{if(i(v),n&&typeof window<"u")try{window.localStorage.setItem(n,v)}catch{}},[n]),_=l.useCallback(()=>{h(u==="dark"?"light":"dark")},[u,h]),b=l.useMemo(()=>({theme:c,resolvedTheme:u,setTheme:h,toggle:_}),[c,u,h,_]);return o.jsx(xs.Provider,{value:b,children:e})}function bj(){const e=l.useContext(xs);if(!e)throw new Error("useTheme must be used inside a <ThemeProvider>");return e}function Dn(e,t){return t?e.replace(/\{(\w+)\}/g,(n,s)=>{const r=t[s];return r===void 0?`{${s}}`:String(r)}):e}function zt(e,t,n,s){const r=e[t]?.[s];if(r!==void 0)return r;if(n){const a=e[n]?.[s];if(a!==void 0)return a}return null}function rn(e){const{locale:t,fallbackLocale:n=null,messages:s}=e;function r(u,d){const p=zt(s,t,n,u);return p===null?u:Dn(p,d)}function a(u,d,p){const f=zt(s,t,n,`${u}${d===1?"_one":"_other"}`)??zt(s,t,n,u);return f===null?u:Dn(f,{count:d,...p??{}})}function c(u,d){return new Intl.NumberFormat(t,d).format(u)}function i(u,d){const p=typeof u=="string"?new Date(u):u;return Number.isNaN(p.getTime())?"":new Intl.DateTimeFormat(t,d).format(p)}return{locale:t,fallbackLocale:n,t:r,plural:a,formatNumber:c,formatDate:i,withLocale:u=>rn({locale:u,fallbackLocale:n??void 0,messages:s})}}const js=l.createContext(null);function yj(e,t){if(!e||typeof window>"u")return null;try{const n=window.localStorage.getItem(e);return n&&t.includes(n)?n:null}catch{return null}}function $s({children:e,locale:t,fallbackLocale:n,messages:s,storageKey:r="tempest-locale"}){const a=l.useMemo(()=>Object.keys(s),[s]),[c,i]=l.useState(()=>yj(r,a)??t);l.useEffect(()=>{typeof document<"u"&&document.documentElement.setAttribute("lang",c)},[c]);const u=l.useCallback(p=>{if(i(p),r&&typeof window<"u")try{window.localStorage.setItem(r,p)}catch{}},[r]),d=l.useMemo(()=>({...rn({locale:c,fallbackLocale:n,messages:s}),setLocale:u,availableLocales:a}),[c,n,s,u,a]);return o.jsx(js.Provider,{value:d,children:e})}function ks(){const e=l.useContext(js);if(!e)throw new Error("useI18n must be used inside an <I18nProvider>");return e}function vj(){return ks().t}function xj(e=[],t=[]){if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!0;return!1}class Ns extends l.Component{state={error:null};static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,n){this.props.onError?.(t,n)}componentDidUpdate(t){this.state.error&&xj(t.resetKeys,this.props.resetKeys)&&this.reset()}reset=()=>{this.setState({error:null})};render(){const{error:t}=this.state;if(!t)return this.props.children;const{fallback:n}=this.props;return typeof n=="function"?n({error:t,reset:this.reset}):n}}function wj({children:e,query:t,theme:n,i18n:s,errorBoundary:r}){let a=e;return s&&(a=o.jsx($s,{...s,children:a})),n!==!1&&(a=o.jsx(ws,{...n||{},children:a})),t!==!1&&(a=o.jsx(_s,{...t||{},children:a})),r&&(a=o.jsx(Ns,{...r,children:a})),o.jsx(o.Fragment,{children:a})}function jj(e){try{return JSON.parse(e)}catch{return e}}function Ss(e,t={}){const{withCredentials:n=!1,namedEvents:s=[],heartbeatEvents:r=["ping"],maxRetries:a=10,initialBackoff:c=1e3,maxBackoff:i=3e4,parser:u=jj,onOpen:d,onMessage:p,onError:m,onStatusChange:f}=t;let h=null,_=null,b=0,v="idle",g=!1;function x(N){v!==N&&(v=N,f?.(N))}function y(N,k){r.includes(N)||p?.({event:N,data:u(k.data),id:k.lastEventId||void 0,raw:k})}function j(){if(g)return;if(b>=a){x("error");return}const N=Math.min(c*2**b,i);b+=1,_=setTimeout(S,N)}function S(){if(g)return;h&&h.close(),x("connecting");const N=new EventSource(e,{withCredentials:n});h=N,N.onopen=()=>{b=0,x("open"),d?.()},N.onmessage=k=>y("message",k);for(const k of s)N.addEventListener(k,E=>y(k,E));for(const k of r)N.addEventListener(k,()=>{});N.onerror=k=>{m?.(k),N.close(),h=null,x("closed"),j()}}function M(){g=!0,_&&(clearTimeout(_),_=null),b=0,h&&(h.close(),h=null),x("closed")}function T(){_&&(clearTimeout(_),_=null),b=0,g=!1,S()}return S(),{close:M,reconnect:T,get status(){return v}}}function $j(e,t={}){const{enabled:n=!0,onMessage:s,...r}=t,[a,c]=l.useState("idle"),[i,u]=l.useState(null),d=l.useRef(null),p=l.useRef(s);return p.current=s,l.useEffect(()=>{if(!n||!e){c("idle");return}const m=Ss(e,{...r,onStatusChange:c,onMessage:f=>{u(f),p.current?.(f)}});return d.current=m.reconnect,()=>{m.close(),d.current=null}},[e,n]),{status:a,lastMessage:i,reconnect:()=>d.current?.()}}function Cs(e){const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),s=window.atob(n),r=new ArrayBuffer(s.length),a=new Uint8Array(r);for(let c=0;c<s.length;c++)a[c]=s.charCodeAt(c);return a}function lt(){return typeof window<"u"&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window}class Yt extends Error{constructor(){super("Web Push não suportado neste navegador."),this.name="WebPushUnsupportedError"}}class Es extends Error{constructor(){super("Permissão de notificação negada pelo usuário."),this.name="WebPushPermissionDeniedError"}}class Ts{config;constructor(t){this.config=t}static isSupported(){return lt()}async registration(){if(!lt())throw new Yt;return this.config.getRegistration?await this.config.getRegistration():await navigator.serviceWorker.ready}permission(){return typeof Notification>"u"?"unsupported":Notification.permission}async requestPermission(){if(typeof Notification>"u")throw new Yt;return Notification.requestPermission()}async getSubscription(){return(await this.registration()).pushManager.getSubscription()}async isSubscribed(){return lt()?await this.getSubscription()!==null:!1}async subscribe(){if(await this.requestPermission()!=="granted")throw new Es;const n=await this.registration(),s=await n.pushManager.getSubscription();if(s)return await this.config.onSubscribe(s.toJSON()),s;const r=await n.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:Cs(this.config.vapidPublicKey)});return await this.config.onSubscribe(r.toJSON()),r}async unsubscribe(){const t=await this.getSubscription();return t?(this.config.onUnsubscribe&&await this.config.onUnsubscribe(t.toJSON()),t.unsubscribe()):!1}}function kj(e){const t=l.useRef(e);t.current=e;const n=l.useMemo(()=>new Ts({vapidPublicKey:e.vapidPublicKey,onSubscribe:b=>t.current.onSubscribe(b),onUnsubscribe:b=>t.current.onUnsubscribe?.(b),getRegistration:e.getRegistration}),[e.vapidPublicKey,e.getRegistration]),[s]=l.useState(()=>lt()),[r,a]=l.useState(()=>n.permission()),[c,i]=l.useState(!1),[u,d]=l.useState(!1),[p,m]=l.useState(null),f=l.useCallback(async()=>{if(s){a(n.permission());try{const b=await n.isSubscribed();i(b)}catch(b){m(b instanceof Error?b:new Error(String(b)))}}},[n,s]);l.useEffect(()=>{f()},[f]);const h=l.useCallback(async()=>{if(s){d(!0),m(null);try{await n.subscribe(),i(!0),a(n.permission())}catch(b){throw m(b instanceof Error?b:new Error(String(b))),b}finally{d(!1)}}},[n,s]),_=l.useCallback(async()=>{if(s){d(!0),m(null);try{await n.unsubscribe(),i(!1)}catch(b){throw m(b instanceof Error?b:new Error(String(b))),b}finally{d(!1)}}},[n,s]);return{supported:s,permission:r,subscribed:c,loading:u,error:p,subscribe:h,unsubscribe:_,refresh:f}}function on(){let e=null;async function t(s,{volume:r=1,loop:a=!1,autoplay:c=!0,stopPrevious:i=!1,onEnded:u,onError:d}={}){try{i&&e&&(e.pause(),e.currentTime=0);const p=new Audio(s);return p.volume=Math.max(0,Math.min(1,r)),p.loop=a,p.preload="auto",u&&(p.onended=u),d&&(p.onerror=m=>d(m)),e=p,c&&await p.play(),p}catch(p){return d?.(p),null}}function n(){e&&(e.pause(),e.currentTime=0)}return{play:t,stop:n,current:()=>e}}let Wt=null;function Ms(){return Wt||(Wt=on()),Wt}async function Nj(e,t){return Ms().play(e,t)}function Sj(){Ms().stop()}function Cj(){const e=l.useRef(null),[t,n]=l.useState(!1);e.current||(e.current=on()),l.useEffect(()=>()=>{e.current?.stop()},[]);const s=l.useCallback(async(a,c)=>{await e.current.play(a,c)&&n(!0)},[]),r=l.useCallback(()=>{e.current?.stop()},[]);return{play:s,stop:r,unlocked:t}}class Ej extends Zs{store;constructor(t,n,s,r){super(t),this.version(n).stores({[s]:r}),this.store=this.table(s)}}function Tj(e){const{databaseName:t,version:n,tableName:s,indexes:r,keyPath:a="id",ownerField:c}=e,i=new Ej(t,n,s,r),u=i.store;function d(m,f){return!c||!f?m:{...m,[c]:f}}async function p(m,f={}){const{orderBy:h=a,reverse:_=!1,limit:b,offset:v,filter:g}=f;let x=c&&m?u.where(c).equals(m):u.toCollection();g&&(x=x.filter(g));let y=h===a?await x.toArray():await x.sortBy(h);return _&&(y=y.reverse()),v&&(y=y.slice(v)),typeof b=="number"&&(y=y.slice(0,b)),y}return{put:(m,f)=>u.put(d(m,f)),bulkPut:(m,f)=>u.bulkPut(m.map(h=>d(h,f))),get:m=>u.get(m),list:p,update:(m,f)=>u.update(m,f),updateMany:async(m,f)=>{const h=f;return c&&m?u.where(c).equals(m).modify(h):u.toCollection().modify(h)},delete:m=>u.delete(m),clear:async m=>{if(c&&m){await u.where(c).equals(m).delete();return}await u.clear()},count:m=>c&&m?u.where(c).equals(m).count():u.count(),raw:u,db:i}}function Mj(){const[,e]=l.useState(null);return l.useCallback(t=>{e(()=>{throw t instanceof Error?t:new Error(String(t))})},[])}function Lj({name:e,label:t,helperText:n,required:s,control:r,children:a}){const c=fe.useFormContext(),i=r??c?.control;if(!i)throw new Error("FormField requires either a `control` prop or a <FormProvider> in the tree.");return o.jsx(fe.Controller,{name:e,control:i,render:({field:u,fieldState:d})=>{if(!l.isValidElement(a))return a;const p=d.error?.message;return l.cloneElement(a,{name:u.name,value:u.value,onChange:u.onChange,onBlur:u.onBlur,ref:u.ref,label:t,helperText:p?void 0:n,error:p,required:s,"aria-invalid":!!p})}})}function Rj(e,t){const n=e.safeParse(t);if(n.success)return{success:!0,data:n.data,errors:{}};const s={};for(const r of n.error.issues){const a=r.path.length===0?"_root":r.path.join(".");a in s||(s[a]=r.message)}return{success:!1,errors:s}}function Ls(e){return async(t,n,s)=>{const r=e.safeParse(t);if(r.success)return{values:r.data,errors:{}};const a={},c=s.criteriaMode??"firstError";for(const i of r.error.issues){const u=i.path.length===0?"_root":i.path.join(".");c==="firstError"&&a[u]||(a[u]={type:i.code,message:i.message})}return{values:{},errors:a}}}function Pj(e,t={}){return fe.useForm({...t,resolver:Ls(e)})}function dt(e){return e.replace(/\D/g,"")}function Dj(e){const t=dt(e);if(t.length!==11||/^(\d)\1+$/.test(t))return!1;const n=t.split("").map(Number);let s=0;for(let a=0;a<9;a++)s+=n[a]*(10-a);let r=s*10%11;if(r===10&&(r=0),r!==n[9])return!1;s=0;for(let a=0;a<10;a++)s+=n[a]*(11-a);return r=s*10%11,r===10&&(r=0),r===n[10]}function Ij(e){const t=dt(e);if(t.length!==14||/^(\d)\1+$/.test(t))return!1;const n=t.split("").map(Number),s=[5,4,3,2,9,8,7,6,5,4,3,2],r=[6,5,4,3,2,9,8,7,6,5,4,3,2];let a=0;for(let i=0;i<12;i++)a+=n[i]*s[i];let c=a%11;if(c=c<2?0:11-c,c!==n[12])return!1;a=0;for(let i=0;i<13;i++)a+=n[i]*r[i];return c=a%11,c=c<2?0:11-c,c===n[13]}function Rs(e){return dt(e).slice(0,8).replace(/(\d{5})(\d)/,"$1-$2")}function Ps(e){return dt(e).slice(0,14).replace(/(\d{2})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1/$2").replace(/(\d{4})(\d)/,"$1-$2")}function Aj(e){return dt(e)}function Mt(e,t="numeric"){return l.forwardRef(function({value:s,onChange:r,...a},c){return o.jsx(Et,{...a,ref:c,value:e(s??""),inputMode:t,onChange:i=>r(e(i.target.value))})})}const Fj=Mt(as),Oj=Mt(Ps),Bj=Mt(os,"tel"),zj=Mt(Rs);function Wj(e,t,n){return new Intl.NumberFormat(t,{style:"currency",currency:n}).format(e/100)}function qj(e){const t=e.replace(/\D/g,"");return t?Number.parseInt(t,10):0}const Uj=l.forwardRef(function({value:t,onChange:n,currency:s="BRL",locale:r="pt-BR",...a},c){return o.jsx(Et,{...a,ref:c,type:"text",inputMode:"numeric",value:Wj(t||0,r,s),onChange:i=>n(qj(i.target.value))})});function Kj(){const[e,t]=l.useState(!1),[n,s]=l.useState(null),[r,a]=l.useState(null),c=l.useCallback(async u=>{const d=u.replace(/\D/g,"");if(d.length!==8)return s("CEP inválido."),null;t(!0),s(null);try{const m=await(await fetch(`https://viacep.com.br/ws/${d}/json/`)).json();return"erro"in m&&m.erro?(s("CEP não encontrado."),a(null),null):(a(m),m)}catch(p){return s(p instanceof Error?p.message:String(p)),null}finally{t(!1)}},[]),i=l.useCallback(()=>{t(!1),s(null),a(null)},[]);return{loading:e,error:n,data:r,lookup:c,reset:i}}function Hj(e){try{return JSON.parse(e)}catch{return e}}function Ds(e,t={}){const{protocols:n,maxRetries:s=10,initialBackoff:r=1e3,maxBackoff:a=3e4,pingInterval:c=0,pingPayload:i=JSON.stringify({type:"ping"}),parser:u=Hj,onOpen:d,onMessage:p,onClose:m,onError:f,onStatusChange:h}=t;let _=null,b=null,v=null,g=0,x="idle",y=!1;function j($){x!==$&&(x=$,h?.($))}function S(){v&&(clearInterval(v),v=null)}function M(){!c||c<=0||(S(),v=setInterval(()=>{_?.readyState===WebSocket.OPEN&&_.send(i)},c))}function T(){if(y)return;if(g>=s){j("error");return}const $=Math.min(r*2**g,a);g+=1,b=setTimeout(N,$)}function N(){if(y)return;_&&(_.onopen=null,_.onmessage=null,_.onclose=null,_.onerror=null,_.close()),j("connecting");const $=new WebSocket(e,n);_=$,$.onopen=C=>{g=0,j("open"),M(),d?.(C)},$.onmessage=C=>{const I=typeof C.data=="string"?C.data:"";p?.({data:u(I),raw:C})},$.onerror=C=>{f?.(C)},$.onclose=C=>{S(),m?.(C),_=null,j("closed"),!y&&!C.wasClean&&T()}}function k($){return _?.readyState!==WebSocket.OPEN?!1:(_.send($),!0)}function E($,C){y=!0,b&&(clearTimeout(b),b=null),S(),g=0,_&&(j("closing"),_.close($,C),_=null),j("closed")}function P(){b&&(clearTimeout(b),b=null),g=0,y=!1,N()}return N(),{send:k,close:E,reconnect:P,get status(){return x}}}function Gj(e,t={}){const{enabled:n=!0,onMessage:s,...r}=t,[a,c]=l.useState("idle"),[i,u]=l.useState(null),d=l.useRef(null),p=l.useRef(s);p.current=s,l.useEffect(()=>{if(!n||!e){c("idle");return}const h=Ds(e,{...r,onStatusChange:c,onMessage:_=>{u(_),p.current?.(_)}});return d.current=h,()=>{h.close(),d.current=null}},[e,n]);const m=l.useCallback(h=>d.current?.send(h)??!1,[]),f=l.useCallback(()=>{d.current?.reconnect()},[]);return{status:a,lastMessage:i,send:m,reconnect:f}}function Is(e){return Number.isFinite(e)&&e>=-90&&e<=90}function As(e){return Number.isFinite(e)&&e>=-180&&e<=180}function Qj(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.latitude=="number"&&typeof t.longitude=="number"&&Is(t.latitude)&&As(t.longitude)}function Fs(e){return Math.min(90,Math.max(-90,e))}function Jj(e){return((e+180)%360+360)%360-180}const Os=6371.0088;function Te(e){return e*Math.PI/180}function pt(e,t){const n=Te(e.latitude),s=Te(t.latitude),r=Te(t.latitude-e.latitude),a=Te(t.longitude-e.longitude),c=Math.sin(r/2)**2+Math.cos(n)*Math.cos(s)*Math.sin(a/2)**2;return 2*Os*Math.asin(Math.sqrt(c))}function Yj(e){let t=0;for(let n=1;n<e.length;n+=1)t+=pt(e[n-1],e[n]);return t}function Xj(e,t){const n=Te(e.latitude),s=Te(t.latitude),r=Te(t.longitude-e.longitude),a=Math.sin(r)*Math.cos(s),c=Math.cos(n)*Math.sin(s)-Math.sin(n)*Math.cos(s)*Math.cos(r);return(Math.atan2(a,c)*180/Math.PI+360)%360}const Bs=1.3,zs=50,Ws={car:1,motorcycle:.95,bus:1.6};function an(e,t){return t?.[e]??Ws[e]??1}function Vj(e,t,n="car",s={}){const{circuityFactor:r=Bs,carSpeedKmh:a=zs,modeDurationFactors:c}=s;if(a<=0)throw new RangeError("carSpeedKmh must be greater than 0");if(r<=0)throw new RangeError("circuityFactor must be greater than 0");const i=pt(e,t)*r,d=i/a*60*an(n,c);return{mode:n,distance_km:i,duration_minutes:d,source:"heuristic"}}function qs(e){if(e.length===0)return null;let t=e[0].latitude,n=e[0].latitude,s=e[0].longitude,r=e[0].longitude;for(const a of e)a.latitude<t&&(t=a.latitude),a.latitude>n&&(n=a.latitude),a.longitude<s&&(s=a.longitude),a.longitude>r&&(r=a.longitude);return{minLatitude:t,maxLatitude:n,minLongitude:s,maxLongitude:r}}function Zj(e){return{latitude:(e.minLatitude+e.maxLatitude)/2,longitude:(e.minLongitude+e.maxLongitude)/2}}function Us(e,t=.1){const n=e.maxLatitude-e.minLatitude,s=e.maxLongitude-e.minLongitude,r=n*t||.001,a=s*t||.001;return{minLatitude:e.minLatitude-r,maxLatitude:e.maxLatitude+r,minLongitude:e.minLongitude-a,maxLongitude:e.maxLongitude+a}}const Xt=85.05112878;function $t(e){const n=Math.max(-Xt,Math.min(Xt,Fs(e.latitude)))*Math.PI/180,s=(e.longitude+180)/360,r=(1-Math.log(Math.tan(n)+1/Math.cos(n))/Math.PI)/2;return{x:s,y:r}}function e$(e){const t=e.x*360-180,n=Math.PI*(1-2*e.y);return{latitude:Math.atan(Math.sinh(n))*180/Math.PI,longitude:t}}function Ks(e,t,n,s={}){const{padding:r=16}=s,a=$t({latitude:e.maxLatitude,longitude:e.minLongitude}),c=$t({latitude:e.minLatitude,longitude:e.maxLongitude}),i=c.x-a.x||Number.EPSILON,u=c.y-a.y||Number.EPSILON,d=Math.max(1,t-r*2),p=Math.max(1,n-r*2),m=Math.min(d/i,p/u),f=r+(d-i*m)/2,h=r+(p-u*m)/2;return{project:b=>{const v=$t(b);return{x:f+(v.x-a.x)*m,y:h+(v.y-a.y)*m}},scale:m,width:t,height:n}}function t$(e){const{baseUrl:t,fetch:n=globalThis.fetch,modeDurationFactors:s}=e,r=t.replace(/\/+$/,"");return{async route(a,c,i={}){const u=i.mode??"car",d=`${a.longitude},${a.latitude};${c.longitude},${c.latitude}`,p=`${r}/route/v1/driving/${d}?overview=false`;let m;try{m=await(await n(p)).json()}catch(v){throw new Error(`OSRM request failed: ${String(v)}`,{cause:v})}const f=m.routes?.[0];if(m.code!=="Ok"||!f)throw new Error(`OSRM returned no route (code: ${m.code??"unknown"})`);const h=f.distance/1e3,b=f.duration/60*an(u,s);return{mode:u,distance_km:h,duration_minutes:b,source:"osrm"}}}}function Hs(e={}){const{minDistanceKm:t=.005,maxPoints:n=1/0,positionOptions:s,onUpdate:r,onError:a,onStatusChange:c}=e;let i=[],u=0,d=null,p=null,m="idle";function f(x){m!==x&&(m=x,c?.(x))}function h(x){const y={latitude:x.coords.latitude,longitude:x.coords.longitude,timestamp:x.timestamp,accuracy:x.coords.accuracy};if(d){const j=pt(d,y);if(j<t)return;u+=j}d=y,i.push(y),i.length>n&&(i=i.slice(i.length-n)),r?.(i)}function _(x){f("error"),a?.(x)}function b(){if(p===null){if(typeof navigator>"u"||!navigator.geolocation){f("error");return}f("tracking"),p=navigator.geolocation.watchPosition(h,_,s)}}function v(){p!==null&&typeof navigator<"u"&&navigator.geolocation&&navigator.geolocation.clearWatch(p),p=null,f("idle")}function g(){v(),i=[],u=0,d=null,r?.(i)}return{start:b,stop:v,clear:g,get points(){return i},get distanceKm(){return u},get status(){return m}}}function n$(e={}){const{autoStart:t=!1,onError:n,...s}=e,[r,a]=l.useState([]),[c,i]=l.useState(0),[u,d]=l.useState("idle"),p=l.useRef(null),m=l.useRef(n);m.current=n,l.useEffect(()=>{const b=Hs({...s,onUpdate:v=>{a([...v]),i(b.distanceKm)},onStatusChange:d,onError:v=>m.current?.(v)});return p.current=b,t&&b.start(),()=>{b.stop(),p.current=null}},[]);const f=l.useCallback(()=>p.current?.start(),[]),h=l.useCallback(()=>p.current?.stop(),[]),_=l.useCallback(()=>{p.current?.clear(),i(0)},[]);return{points:r,lastPoint:r.length>0?r[r.length-1]:null,distanceKm:c,status:u,isTracking:u==="tracking",start:f,stop:h,clear:_}}const s$="tempest_map_3qgBX",r$="tempest_svg_Da-XM",o$="tempest_empty_QQGkP",a$="tempest_loading_R6YCf",c$="tempest_grid_xFsTS",i$="tempest_path_-A7Sl",l$="tempest_start_OPmUL",u$="tempest_end_7SX7p",d$="tempest_current_WFLJk",p$="tempest_pulse_DUzgL",m$="tempest_scale_YuwqB",X={map:s$,svg:r$,empty:o$,loading:a$,grid:c$,path:i$,start:l$,end:u$,current:d$,pulse:p$,scale:m$},f$=l.lazy(()=>Promise.resolve().then(()=>require("./leaflet-map-BzYV9czG.cjs")).then(e=>({default:e.LeafletTrajectory}))),In=[.05,.1,.25,.5,1,2,5,10,25,50,100,250,500,1e3];function h$(e,t){const n=e*t;let s=In[0];for(const r of In)r<=n&&(s=r);return{km:s,pixels:s/e}}function _$(e){return e<1?`${Math.round(e*1e3)} m`:`${e%1===0?e:e.toFixed(1)} km`}function g$({points:e,current:t,height:n=320,padding:s=24,showGrid:r=!0,showScale:a=!0,strokeColor:c,tileUrl:i,tileAttribution:u,label:d="Trajetória",className:p,style:m,...f}){const h=l.useRef(null),[_,b]=l.useState(600);l.useEffect(()=>{const y=h.current;if(!y||typeof ResizeObserver>"u")return;const j=new ResizeObserver(S=>{const M=S[0]?.contentRect.width;M&&M>0&&b(M)});return j.observe(y),()=>j.disconnect()},[]);const v=l.useMemo(()=>t?[...e,t]:[...e],[e,t]),g=l.useMemo(()=>{const y=qs(v);if(!y)return null;const j=Ks(Us(y,.12),_,n,{padding:s}),S=e.map(L=>j.project(L)),M=S.map(L=>`${L.x.toFixed(1)},${L.y.toFixed(1)}`).join(" "),T=S[0]??null,N=S.length>0?S[S.length-1]:null,k=t?j.project(t):null,E={latitude:(y.minLatitude+y.maxLatitude)/2,longitude:(y.minLongitude+y.maxLongitude)/2},P=j.project(E),$=j.project({...E,longitude:y.maxLongitude}),C=pt(E,{...E,longitude:y.maxLongitude}),I=Math.abs($.x-P.x)||1,R=C/I||0;return{polyline:M,startPixel:T,endPixel:N,currentPixel:k,kmPerPixel:R}},[v,e,t,_,n,s]);if(i)return o.jsx("div",{ref:h,className:w.cn(X.map,p),style:{height:n,...m},role:"img","aria-label":d,...f,children:o.jsx(l.Suspense,{fallback:o.jsx("div",{className:X.loading,children:"Carregando mapa…"}),children:o.jsx(f$,{points:e,current:t,tileUrl:i,tileAttribution:u,strokeColor:c})})});const x=a&&g&&g.kmPerPixel>0?h$(g.kmPerPixel,Math.min(120,_*.35)):null;return o.jsx("div",{ref:h,className:w.cn(X.map,p),style:{height:n,...m},role:"img","aria-label":d,...f,children:g?o.jsxs("svg",{className:X.svg,width:"100%",height:n,viewBox:`0 0 ${_} ${n}`,preserveAspectRatio:"xMidYMid meet",children:[r&&o.jsxs("g",{className:X.grid,children:[[.25,.5,.75].map(y=>o.jsx("line",{x1:0,y1:n*y,x2:_,y2:n*y},`h${y}`)),[.25,.5,.75].map(y=>o.jsx("line",{x1:_*y,y1:0,x2:_*y,y2:n},`v${y}`))]}),g.polyline&&o.jsx("polyline",{className:X.path,points:g.polyline,fill:"none",stroke:c,"data-testid":"trajectory-path"}),g.startPixel&&o.jsx("circle",{className:X.start,cx:g.startPixel.x,cy:g.startPixel.y,r:5}),g.endPixel&&!t&&o.jsx("circle",{className:X.end,cx:g.endPixel.x,cy:g.endPixel.y,r:5}),g.currentPixel&&o.jsxs(o.Fragment,{children:[o.jsx("circle",{className:X.pulse,cx:g.currentPixel.x,cy:g.currentPixel.y,r:10}),o.jsx("circle",{className:X.current,cx:g.currentPixel.x,cy:g.currentPixel.y,r:5})]}),x&&o.jsxs("g",{className:X.scale,transform:`translate(${s}, ${n-s})`,children:[o.jsx("line",{x1:0,y1:0,x2:x.pixels,y2:0}),o.jsx("line",{x1:0,y1:-4,x2:0,y2:4}),o.jsx("line",{x1:x.pixels,y1:-4,x2:x.pixels,y2:4}),o.jsx("text",{x:x.pixels/2,y:-8,textAnchor:"middle",children:_$(x.km)})]})]}):o.jsx("div",{className:X.empty,children:"Sem pontos de trajetória ainda."})})}function b$(e={}){const{storageKey:t="tempest-theme",defaultTheme:n="system"}=e;if(typeof window>"u")return n==="dark"?"dark":"light";let s=null;try{s=window.localStorage.getItem(t)}catch{s=null}const r=s??n;return r==="dark"||r==="light"?r:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function y$(e={}){const t=e.storageKey??"tempest-theme",n=e.defaultTheme??"system";return`
|
|
6
6
|
(function(){try{
|
|
7
7
|
var key=${JSON.stringify(t)};
|
|
8
8
|
var def=${JSON.stringify(n)};
|
|
@@ -11,5 +11,5 @@ Raw payload: ${JSON.stringify(t,null,2)}`)}throw new Error(`Resposta inválida d
|
|
|
11
11
|
var resolved=mode==="dark"||mode==="light"?mode:(matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");
|
|
12
12
|
document.documentElement.setAttribute("data-tempest-theme",resolved);
|
|
13
13
|
}catch(e){}})();
|
|
14
|
-
`.trim()}const Nn=["debug","info","warn","error"];function gj(e,t){return Nn.indexOf(t)>=Nn.indexOf(e)}const $s=({level:e,message:t,context:n})=>{const s=e==="debug"?"log":e;n?console[s](t,n):console[s](t)};function ks(e={}){const t=e.level??"info",n=e.sinks??[$s],s=e.namespace??"";function r(a,c,i){if(!gj(t,a))return;const u={level:a,message:s?`[${s}] ${c}`:c,context:i,timestamp:Date.now()};for(const d of n)try{d(u)}catch{}}return{debug:(a,c)=>r("debug",a,c),info:(a,c)=>r("info",a,c),warn:(a,c)=>r("warn",a,c),error:(a,c)=>r("error",a,c),child:a=>ks({level:t,sinks:n,namespace:s?`${s}:${a}`:a})}}const Ns=l.createContext(null);function bj({adapter:e,children:t}){l.useEffect(()=>(e.init?.(),()=>{e.flush?.()}),[e]);const n=l.useMemo(()=>e,[e]);return o.jsx(Ns.Provider,{value:n,children:t})}function yj(){return l.useContext(Ns)}const vj={identify(e){console.info("[telemetry] identify",e)},track(e){console.info("[telemetry] track",e.name,e.properties)},captureException(e,t){console.error("[telemetry] exception",e,t)}};function wj(e){if(e===null)return null;const{id:t,email:n,name:s,traits:r}=e;return{...t!==void 0?{id:t}:null,...n!==void 0?{email:n}:null,...s!==void 0?{username:s}:null,...r??null}}function xj(e){const{sentry:t,initOptions:n,flushTimeout:s=2e3,breadcrumbCategory:r="app"}=e;return{init(){n&&t.init&&t.init(n)},identify(a){t.setUser(wj(a))},track(a){t.addBreadcrumb({category:r,message:a.name,level:"info",...a.properties?{data:a.properties}:null})},captureException(a,c){t.captureException(a,c?{extra:c}:void 0)},async flush(){t.flush&&await t.flush(s)}}}function jj(e){const{email:t,name:n,traits:s}=e;return{...t!==void 0?{email:t}:null,...n!==void 0?{name:n}:null,...s??null}}function $j(e){const{posthog:t,init:n}=e;return{init(){n&&t.init&&t.init(n.apiKey,n.options)},identify(s){if(s===null){t.reset?.();return}s.id!==void 0&&t.identify(s.id,jj(s))},track(s){t.capture(s.name,s.properties)},captureException(s,r){if(t.captureException){t.captureException(s,r);return}const a=s instanceof Error?s:new Error(String(s));t.capture("$exception",{$exception_message:a.message,$exception_type:a.name,$exception_stack_trace_raw:a.stack,...r})}}}const Ss=l.createContext(null);function kj({adapter:e,children:t}){const n=l.useMemo(()=>e,[e]);return l.useEffect(()=>{},[n]),o.jsx(Ss.Provider,{value:n,children:t})}function Cs(){const e=l.useContext(Ss);if(!e)throw new Error("useFeatureFlag requires <FeatureFlagsProvider>");return e}function Nj(e,t=!1){const n=Cs(),s=a=>n.onChange?n.onChange(a):()=>{},r=()=>n.isEnabled(e,t);return l.useSyncExternalStore(s,r,r)}function Sj(e,t){const n=Cs(),s=a=>n.onChange?n.onChange(a):()=>{},r=()=>n.get(e,t);return l.useSyncExternalStore(s,r,r)}function Cj(e={}){const t={...e.initial??{}},n=new Set;function s(){for(const r of n)r()}return{isEnabled(r,a=!1){return r in t?!!t[r]:a},get(r,a){return r in t?t[r]:a},onChange(r){return n.add(r),()=>n.delete(r)},set(r,a){t[r]=a,s()}}}function Ej(e){const{growthbook:t}=e,n=new Set;let s=!1;function r(){s||!t.setRenderer||(s=!0,t.setRenderer(()=>{for(const a of n)a()}))}return{isEnabled(a,c=!1){const i=t.isOn(a);return typeof i=="boolean"?i:c},get(a,c){return t.getFeatureValue(a,c)},onChange(a){return r(),n.add(a),()=>{n.delete(a)}}}}function Tj(e){const{client:t}=e;return{isEnabled(n,s=!1){return t.variation(n,s)===!0},get(n,s){return t.variation(n,s)},onChange(n){return!t.on||!t.off?()=>{}:(t.on("change",n),()=>{t.off("change",n)})}}}async function Mj(e){if(typeof navigator>"u"||!("share"in navigator))return{shared:!1,unsupported:!0,cancelled:!1};if(e.files&&!navigator.canShare?.({files:e.files}))return{shared:!1,unsupported:!0,cancelled:!1};try{return await navigator.share(e),{shared:!0,unsupported:!1,cancelled:!1}}catch(t){return t instanceof DOMException&&t.name==="AbortError"?{shared:!1,unsupported:!1,cancelled:!0}:{shared:!1,unsupported:!1,cancelled:!1,error:t}}}function Rj(){return typeof navigator<"u"&&"share"in navigator}exports.createPartialResponse=fe.createPartialResponse;exports.installBackgroundSync=fe.installBackgroundSync;exports.installNotificationClickHandler=fe.installNotificationClickHandler;exports.installPrecache=fe.installPrecache;exports.installPushHandler=fe.installPushHandler;exports.installRuntimeCache=fe.installRuntimeCache;exports.installSkipWaitingListener=fe.installSkipWaitingListener;exports.registerServiceWorker=fe.registerServiceWorker;exports.skipWaiting=fe.skipWaiting;exports.unregisterAllServiceWorkers=fe.unregisterAllServiceWorkers;exports.cn=x.cn;Object.defineProperty(exports,"BrowserRouter",{enumerable:!0,get:()=>I.BrowserRouter});Object.defineProperty(exports,"HashRouter",{enumerable:!0,get:()=>I.HashRouter});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>I.Link});Object.defineProperty(exports,"MemoryRouter",{enumerable:!0,get:()=>I.MemoryRouter});Object.defineProperty(exports,"NavLink",{enumerable:!0,get:()=>I.NavLink});Object.defineProperty(exports,"Navigate",{enumerable:!0,get:()=>I.Navigate});Object.defineProperty(exports,"Outlet",{enumerable:!0,get:()=>I.Outlet});Object.defineProperty(exports,"Route",{enumerable:!0,get:()=>I.Route});Object.defineProperty(exports,"Routes",{enumerable:!0,get:()=>I.Routes});Object.defineProperty(exports,"redirect",{enumerable:!0,get:()=>I.redirect});Object.defineProperty(exports,"useLocation",{enumerable:!0,get:()=>I.useLocation});Object.defineProperty(exports,"useMatch",{enumerable:!0,get:()=>I.useMatch});Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:()=>I.useNavigate});Object.defineProperty(exports,"useParams",{enumerable:!0,get:()=>I.useParams});Object.defineProperty(exports,"useRouteError",{enumerable:!0,get:()=>I.useRouteError});Object.defineProperty(exports,"useSearchParams",{enumerable:!0,get:()=>I.useSearchParams});Object.defineProperty(exports,"Controller",{enumerable:!0,get:()=>me.Controller});Object.defineProperty(exports,"FormProvider",{enumerable:!0,get:()=>me.FormProvider});Object.defineProperty(exports,"useFieldArray",{enumerable:!0,get:()=>me.useFieldArray});Object.defineProperty(exports,"useForm",{enumerable:!0,get:()=>me.useForm});Object.defineProperty(exports,"useFormContext",{enumerable:!0,get:()=>me.useFormContext});Object.defineProperty(exports,"useFormState",{enumerable:!0,get:()=>me.useFormState});Object.defineProperty(exports,"useWatch",{enumerable:!0,get:()=>me.useWatch});exports.AccessControlProvider=ix;exports.Accordion=Os;exports.Alert=er;exports.AppBar=hr;exports.AppProviders=qx;exports.AppRouter=Ix;exports.AppShell=kr;exports.AspectRatio=Cr;exports.AuthGuard=rx;exports.Avatar=Wr;exports.BREAKPOINTS=yt;exports.Badge=so;exports.Banner=_o;exports.BottomNavigation=$o;exports.BottomSheet=Ro;exports.Breadcrumbs=Fo;exports.Button=vt;exports.CACHE_TIME=ss;exports.CEPInput=ij;exports.CNPJInput=aj;exports.CPFInput=oj;exports.Calendar=tb;exports.Can=ux;exports.Card=ba;exports.Carousel=Ny;exports.Center=ja;exports.Checkbox=Ma;exports.ChipInput=qa;exports.ClickOutside=h_;exports.Collapsible=Y_;exports.Combobox=rc;exports.Command=Eg;exports.ConditionalWrapper=__;exports.ConfirmDialog=Sn;exports.Container=Gl;exports.ContextMenu=sg;exports.CopyButton=s_;exports.DataList=N_;exports.DataTable=bv;exports.DatePicker=Oc;exports.DateRangePicker=Yb;exports.DescriptionList=T_;exports.Divider=Gc;exports.Drawer=pi;exports.DropdownMenu=Ni;exports.Dropzone=Ri;exports.EmptyState=Fi;exports.ErrorBoundary=fs;exports.ErrorState=Ui;exports.ErrorText=v_;exports.FeatureFlagsProvider=kj;exports.FileUpload=cl;exports.FloatingActionButton=Wv;exports.For=g_;exports.Form=$l;exports.FormActions=Sl;exports.FormField=Zx;exports.FormRow=Nl;exports.FormSection=kl;exports.GoogleSignIn=fx;exports.Grid=Vl;exports.Hide=wp;exports.HoverCard=pg;exports.I18nProvider=ps;exports.Image=j_;exports.Input=jt;exports.Kbd=nu;exports.Label=H_;exports.ListTile=Cv;exports.Menubar=hy;exports.Modal=Kt;exports.ModalsProvider=ou;exports.Money=i_;exports.MoneyInput=dj;exports.MultiSelect=Cb;exports.NProgressBar=$u;exports.Navbar=bu;exports.NavigationMenu=ry;exports.NavigationRail=Zv;exports.Page=Pu;exports.Pagination=Ln;exports.PasswordInput=pd;exports.PhoneInput=cj;exports.PinInput=kd;exports.Popover=Ld;exports.Portal=Wn;exports.Progress=qd;exports.QueryProvider=rs;exports.REFETCH_TIME=_x;exports.Radio=Zd;exports.RadioGroup=ep;exports.RangeSlider=lp;exports.RatingStars=bp;exports.RefreshIndicator=gw;exports.RelativeTime=c_;exports.Resizable=Bg;exports.RouteGuard=cs;exports.STALE_TIME=ns;exports.SafeArea=Ep;exports.ScrollArea=Lg;exports.SearchBar=An;exports.SegmentedControl=Kp;exports.Select=tm;exports.Show=vp;exports.Sidebar=mm;exports.Skeleton=gm;exports.Slider=ub;exports.Spacer=xm;exports.Spinner=Fn;exports.Stack=Ql;exports.Stat=Wm;exports.Stepper=Vm;exports.StepperInput=uf;exports.Switch=gf;exports.Table=On;exports.Tabs=Yf;exports.Tag=Tf;exports.TelemetryProvider=bj;exports.TempestApiError=xt;exports.TempestDataProvider=kx;exports.Textarea=rh;exports.ThemeProvider=us;exports.TimePicker=dw;exports.Timeline=vh;exports.ToastProvider=Hh;exports.Toggle=A_;exports.ToggleGroup=W_;exports.ToggleGroupItem=q_;exports.Tooltip=Ch;exports.TruncateText=d_;exports.VirtualList=e_;exports.VisuallyHidden=f_;exports.WebPushClient=bs;exports.WebPushPermissionDeniedError=gs;exports.WebPushUnsupportedError=Ut;exports.assertNever=Bw;exports.buildApiError=Gt;exports.camelCase=Nw;exports.capitalize=kw;exports.chunk=Mw;exports.clamp=Ft;exports.consoleSink=$s;exports.consoleTelemetryAdapter=vj;exports.createApiClient=gt;exports.createAudioPlayer=Vt;exports.createAuthStore=Yn;exports.createDataProvider=$x;exports.createEventStream=hs;exports.createGrowthBookFeatureFlagsAdapter=Ej;exports.createI18n=Yt;exports.createInMemoryFlags=Cj;exports.createLaunchDarklyFeatureFlagsAdapter=Tj;exports.createLogger=ks;exports.createOfflineStore=Vx;exports.createPostHogTelemetryAdapter=$j;exports.createQueryKeys=gx;exports.createRefreshQueue=Xn;exports.createRoleAccessControl=px;exports.createSelectors=Ax;exports.createSentryTelemetryAdapter=xj;exports.createStore=Px;exports.createTempestAuth=cx;exports.createWebSocket=js;exports.debounce=zw;exports.decodeJWT=Jt;exports.deepMerge=Qn;exports.defineRoutes=Mx;exports.emptyOffsetPage=vx;exports.estimatePasswordStrength=Dn;exports.formatBytes=Xm;exports.formatCEP=ws;exports.formatCNPJ=xs;exports.formatCPF=Jn;exports.formatCompactNumber=Zm;exports.formatCurrency=bw;exports.formatDate=yw;exports.formatDateTime=vw;exports.formatPercent=ww;exports.formatPhone=Gn;exports.generateIdempotencyKey=nx;exports.getInitialTheme=hj;exports.groupBy=Ew;exports.isApiError=Gw;exports.isCursorPage=yx;exports.isDefined=Pw;exports.isEmpty=Iw;exports.isJWTExpired=ox;exports.isNumber=Fw;exports.isOffsetPage=bx;exports.isPlainObject=Ow;exports.isPushSupported=rt;exports.isShareSupported=Rj;exports.isString=Aw;exports.kebabCase=Sw;exports.lazyWithRetry=Vn;exports.listQueryKey=as;exports.memoizeOne=Uw;exports.nprogress=Rn;exports.omit=Dw;exports.once=qw;exports.oneQueryKey=Qt;exports.parseResponse=Vw;exports.permissionsFromToken=mx;exports.pick=Lw;exports.playAudio=Gx;exports.pluralize=Cw;exports.randomId=Ht;exports.range=Rw;exports.relativeTime=zn;exports.retry=tx;exports.share=Mj;exports.sleep=Kw;exports.slugify=jw;exports.stopAudio=Jx;exports.storage=xw;exports.themeInitScript=_j;exports.throttle=Ww;exports.truncate=$w;exports.uniqueBy=Tw;exports.unmask=rj;exports.uploadWithProgress=Zw;exports.urlBase64ToUint8Array=_s;exports.useAccessControl=es;exports.useAsync=Iy;exports.useAudio=Qx;exports.useBeforeInstallPrompt=Uy;exports.useBreakpoint=Oe;exports.useCan=ts;exports.useClickOutside=dv;exports.useClientFilter=Cy;exports.useClipboard=By;exports.useCounter=ov;exports.useCreate=Cx;exports.useCursorQuery=xx;exports.useDataProvider=Je;exports.useDebounce=Sy;exports.useDeepMemo=Qy;exports.useDelete=Tx;exports.useDisclosure=sv;exports.useDocumentTitle=av;exports.useDocumentVisibility=Ay;exports.useErrorHandler=Xx;exports.useEventListener=Ty;exports.useEventStream=Kx;exports.useFavicon=cv;exports.useFeatureFlag=Nj;exports.useFlagValue=Sj;exports.useFocusTrap=Un;exports.useGeolocation=Hy;exports.useHover=tv;exports.useI18n=ms;exports.useIdle=Ky;exports.useIntersectionObserver=Fy;exports.useInterval=Vy;exports.useIsFirstRender=pv;exports.useKeyboardShortcut=qy;exports.useList=Nx;exports.useListState=rv;exports.useLocalStorage=Ly;exports.useLongPress=nv;exports.useMap=iv;exports.useMediaQuery=Ey;exports.useModals=iu;exports.useOAuthCallback=hx;exports.useOne=Sx;exports.useOnline=Py;exports.usePaginatedQuery=wx;exports.usePagination=Hn;exports.usePoll=sx;exports.usePrevious=Yy;exports.usePushSubscription=Hx;exports.useQueue=uv;exports.useResizeObserver=Oy;exports.useScrollLock=Gy;exports.useSet=lv;exports.useStableCallback=Jy;exports.useTelemetry=yj;exports.useTheme=Ox;exports.useThrottle=Zy;exports.useTimeout=Xy;exports.useToast=Kh;exports.useToggle=Dy;exports.useTranslate=zx;exports.useUpdate=Ex;exports.useViaCEP=pj;exports.useWebSocket=fj;exports.useWindowSize=ev;exports.useZodForm=tj;exports.validateCNPJ=sj;exports.validateCPF=nj;exports.validateForm=ej;exports.withTimeout=Hw;exports.zodResolver=vs;
|
|
14
|
+
`.trim()}const An=["debug","info","warn","error"];function v$(e,t){return An.indexOf(t)>=An.indexOf(e)}const Gs=({level:e,message:t,context:n})=>{const s=e==="debug"?"log":e;n?console[s](t,n):console[s](t)};function Qs(e={}){const t=e.level??"info",n=e.sinks??[Gs],s=e.namespace??"";function r(a,c,i){if(!v$(t,a))return;const u={level:a,message:s?`[${s}] ${c}`:c,context:i,timestamp:Date.now()};for(const d of n)try{d(u)}catch{}}return{debug:(a,c)=>r("debug",a,c),info:(a,c)=>r("info",a,c),warn:(a,c)=>r("warn",a,c),error:(a,c)=>r("error",a,c),child:a=>Qs({level:t,sinks:n,namespace:s?`${s}:${a}`:a})}}const Js=l.createContext(null);function x$({adapter:e,children:t}){l.useEffect(()=>(e.init?.(),()=>{e.flush?.()}),[e]);const n=l.useMemo(()=>e,[e]);return o.jsx(Js.Provider,{value:n,children:t})}function w$(){return l.useContext(Js)}const j$={identify(e){console.info("[telemetry] identify",e)},track(e){console.info("[telemetry] track",e.name,e.properties)},captureException(e,t){console.error("[telemetry] exception",e,t)}};function $$(e){if(e===null)return null;const{id:t,email:n,name:s,traits:r}=e;return{...t!==void 0?{id:t}:null,...n!==void 0?{email:n}:null,...s!==void 0?{username:s}:null,...r??null}}function k$(e){const{sentry:t,initOptions:n,flushTimeout:s=2e3,breadcrumbCategory:r="app"}=e;return{init(){n&&t.init&&t.init(n)},identify(a){t.setUser($$(a))},track(a){t.addBreadcrumb({category:r,message:a.name,level:"info",...a.properties?{data:a.properties}:null})},captureException(a,c){t.captureException(a,c?{extra:c}:void 0)},async flush(){t.flush&&await t.flush(s)}}}function N$(e){const{email:t,name:n,traits:s}=e;return{...t!==void 0?{email:t}:null,...n!==void 0?{name:n}:null,...s??null}}function S$(e){const{posthog:t,init:n}=e;return{init(){n&&t.init&&t.init(n.apiKey,n.options)},identify(s){if(s===null){t.reset?.();return}s.id!==void 0&&t.identify(s.id,N$(s))},track(s){t.capture(s.name,s.properties)},captureException(s,r){if(t.captureException){t.captureException(s,r);return}const a=s instanceof Error?s:new Error(String(s));t.capture("$exception",{$exception_message:a.message,$exception_type:a.name,$exception_stack_trace_raw:a.stack,...r})}}}const Ys=l.createContext(null);function C$({adapter:e,children:t}){const n=l.useMemo(()=>e,[e]);return l.useEffect(()=>{},[n]),o.jsx(Ys.Provider,{value:n,children:t})}function Xs(){const e=l.useContext(Ys);if(!e)throw new Error("useFeatureFlag requires <FeatureFlagsProvider>");return e}function E$(e,t=!1){const n=Xs(),s=a=>n.onChange?n.onChange(a):()=>{},r=()=>n.isEnabled(e,t);return l.useSyncExternalStore(s,r,r)}function T$(e,t){const n=Xs(),s=a=>n.onChange?n.onChange(a):()=>{},r=()=>n.get(e,t);return l.useSyncExternalStore(s,r,r)}function M$(e={}){const t={...e.initial??{}},n=new Set;function s(){for(const r of n)r()}return{isEnabled(r,a=!1){return r in t?!!t[r]:a},get(r,a){return r in t?t[r]:a},onChange(r){return n.add(r),()=>n.delete(r)},set(r,a){t[r]=a,s()}}}function L$(e){const{growthbook:t}=e,n=new Set;let s=!1;function r(){s||!t.setRenderer||(s=!0,t.setRenderer(()=>{for(const a of n)a()}))}return{isEnabled(a,c=!1){const i=t.isOn(a);return typeof i=="boolean"?i:c},get(a,c){return t.getFeatureValue(a,c)},onChange(a){return r(),n.add(a),()=>{n.delete(a)}}}}function R$(e){const{client:t}=e;return{isEnabled(n,s=!1){return t.variation(n,s)===!0},get(n,s){return t.variation(n,s)},onChange(n){return!t.on||!t.off?()=>{}:(t.on("change",n),()=>{t.off("change",n)})}}}async function P$(e){if(typeof navigator>"u"||!("share"in navigator))return{shared:!1,unsupported:!0,cancelled:!1};if(e.files&&!navigator.canShare?.({files:e.files}))return{shared:!1,unsupported:!0,cancelled:!1};try{return await navigator.share(e),{shared:!0,unsupported:!1,cancelled:!1}}catch(t){return t instanceof DOMException&&t.name==="AbortError"?{shared:!1,unsupported:!1,cancelled:!0}:{shared:!1,unsupported:!1,cancelled:!1,error:t}}}function D$(){return typeof navigator<"u"&&"share"in navigator}exports.createPartialResponse=he.createPartialResponse;exports.installBackgroundSync=he.installBackgroundSync;exports.installNotificationClickHandler=he.installNotificationClickHandler;exports.installPrecache=he.installPrecache;exports.installPushHandler=he.installPushHandler;exports.installRuntimeCache=he.installRuntimeCache;exports.installSkipWaitingListener=he.installSkipWaitingListener;exports.registerServiceWorker=he.registerServiceWorker;exports.skipWaiting=he.skipWaiting;exports.unregisterAllServiceWorkers=he.unregisterAllServiceWorkers;exports.cn=w.cn;Object.defineProperty(exports,"BrowserRouter",{enumerable:!0,get:()=>D.BrowserRouter});Object.defineProperty(exports,"HashRouter",{enumerable:!0,get:()=>D.HashRouter});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>D.Link});Object.defineProperty(exports,"MemoryRouter",{enumerable:!0,get:()=>D.MemoryRouter});Object.defineProperty(exports,"NavLink",{enumerable:!0,get:()=>D.NavLink});Object.defineProperty(exports,"Navigate",{enumerable:!0,get:()=>D.Navigate});Object.defineProperty(exports,"Outlet",{enumerable:!0,get:()=>D.Outlet});Object.defineProperty(exports,"Route",{enumerable:!0,get:()=>D.Route});Object.defineProperty(exports,"Routes",{enumerable:!0,get:()=>D.Routes});Object.defineProperty(exports,"redirect",{enumerable:!0,get:()=>D.redirect});Object.defineProperty(exports,"useLocation",{enumerable:!0,get:()=>D.useLocation});Object.defineProperty(exports,"useMatch",{enumerable:!0,get:()=>D.useMatch});Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:()=>D.useNavigate});Object.defineProperty(exports,"useParams",{enumerable:!0,get:()=>D.useParams});Object.defineProperty(exports,"useRouteError",{enumerable:!0,get:()=>D.useRouteError});Object.defineProperty(exports,"useSearchParams",{enumerable:!0,get:()=>D.useSearchParams});Object.defineProperty(exports,"Controller",{enumerable:!0,get:()=>fe.Controller});Object.defineProperty(exports,"FormProvider",{enumerable:!0,get:()=>fe.FormProvider});Object.defineProperty(exports,"useFieldArray",{enumerable:!0,get:()=>fe.useFieldArray});Object.defineProperty(exports,"useForm",{enumerable:!0,get:()=>fe.useForm});Object.defineProperty(exports,"useFormContext",{enumerable:!0,get:()=>fe.useFormContext});Object.defineProperty(exports,"useFormState",{enumerable:!0,get:()=>fe.useFormState});Object.defineProperty(exports,"useWatch",{enumerable:!0,get:()=>fe.useWatch});exports.AccessControlProvider=zw;exports.Accordion=cr;exports.Alert=wr;exports.AppBar=Ar;exports.AppProviders=wj;exports.AppRouter=fj;exports.AppShell=Gr;exports.AspectRatio=Yr;exports.AuthGuard=Aw;exports.Avatar=uo;exports.BREAKPOINTS=Nt;exports.Badge=No;exports.Banner=Fo;exports.BottomNavigation=Ho;exports.BottomSheet=ea;exports.Breadcrumbs=aa;exports.Button=Xe;exports.CACHE_TIME=hs;exports.CEPInput=zj;exports.CNPJInput=Oj;exports.CPFInput=Fj;exports.Calendar=Db;exports.Can=qw;exports.Card=Ba;exports.Carousel=av;exports.Center=Ka;exports.Checkbox=Za;exports.ChipInput=dc;exports.ClickOutside=J_;exports.Collapsible=Tg;exports.Combobox=Nc;exports.Command=lb;exports.ConditionalWrapper=Y_;exports.ConfirmDialog=On;exports.Container=hu;exports.ContextMenu=Ag;exports.CopyButton=A_;exports.DEFAULT_CAR_SPEED_KMH=zs;exports.DEFAULT_CIRCUITY_FACTOR=Bs;exports.DEFAULT_MODE_DURATION_FACTORS=Ws;exports.DataList=ag;exports.DataTable=Xv;exports.DatePicker=ci;exports.DateRangePicker=Ty;exports.DescriptionList=ug;exports.Divider=hi;exports.Drawer=Pi;exports.DropdownMenu=Qi;exports.Dropzone=el;exports.EARTH_RADIUS_KM=Os;exports.EmptyState=al;exports.ErrorBoundary=Ns;exports.ErrorState=pl;exports.ErrorText=eg;exports.FeatureFlagsProvider=C$;exports.FileUpload=El;exports.FloatingActionButton=xx;exports.For=X_;exports.Form=Hl;exports.FormActions=Jl;exports.FormField=Lj;exports.FormRow=Ql;exports.FormSection=Gl;exports.GoogleSignIn=Gw;exports.Grid=yu;exports.Hide=Vp;exports.HoverCard=Hg;exports.I18nProvider=$s;exports.Image=sg;exports.Input=Et;exports.InstallBanner=Su;exports.InstallButton=Cu;exports.Kbd=Ru;exports.Label=Ng;exports.ListTile=cx;exports.MERCATOR_MAX_LATITUDE=Xt;exports.Menubar=Jy;exports.Modal=Vt;exports.ModalsProvider=Iu;exports.Money=W_;exports.MoneyInput=Uj;exports.MultiSelect=iy;exports.NProgressBar=td;exports.Navbar=Ju;exports.NavigationMenu=Fy;exports.NavigationRail=Lx;exports.Page=md;exports.Pagination=Kn;exports.PasswordInput=qd;exports.PhoneInput=Bj;exports.PinInput=np;exports.Popover=up;exports.Portal=es;exports.Progress=vp;exports.QueryProvider=_s;exports.REFETCH_TIME=Jw;exports.Radio=Tp;exports.RadioGroup=Mp;exports.RangeSlider=Bp;exports.RatingStars=Jp;exports.RefreshIndicator=Yx;exports.RelativeTime=z_;exports.Resizable=vb;exports.RouteGuard=ys;exports.STALE_TIME=fs;exports.SafeArea=am;exports.ScrollArea=mb;exports.SearchBar=Jn;exports.SegmentedControl=wm;exports.Select=Lm;exports.Show=Xp;exports.Sidebar=Um;exports.Skeleton=Qm;exports.Slider=Ub;exports.Spacer=Zm;exports.Spinner=Yn;exports.Stack=gu;exports.Stat=jf;exports.Stepper=Lf;exports.StepperInput=Uf;exports.Switch=Xf;exports.Table=Xn;exports.Tabs=Th;exports.Tag=uh;exports.TelemetryProvider=x$;exports.TempestApiError=Ct;exports.TempestDataProvider=rj;exports.Textarea=Fh;exports.ThemeProvider=ws;exports.TimePicker=Ux;exports.Timeline=e_;exports.ToastProvider=N_;exports.Toggle=gg;exports.ToggleGroup=wg;exports.ToggleGroupItem=jg;exports.Tooltip=i_;exports.TrajectoryMap=g$;exports.TruncateText=K_;exports.VirtualList=P_;exports.VisuallyHidden=Q_;exports.WebPushClient=Ts;exports.WebPushPermissionDeniedError=Es;exports.WebPushUnsupportedError=Yt;exports.assertNever=yw;exports.bearingDeg=Xj;exports.boundingBox=qs;exports.boundsCenter=Zj;exports.buildApiError=tn;exports.camelCase=ow;exports.capitalize=rw;exports.chunk=uw;exports.clamp=Ut;exports.clampLatitude=Fs;exports.consoleSink=Gs;exports.consoleTelemetryAdapter=j$;exports.createApiClient=jt;exports.createAudioPlayer=on;exports.createAuthStore=is;exports.createDataProvider=sj;exports.createEventStream=Ss;exports.createGrowthBookFeatureFlagsAdapter=L$;exports.createI18n=rn;exports.createInMemoryFlags=M$;exports.createLaunchDarklyFeatureFlagsAdapter=R$;exports.createLogger=Qs;exports.createOSRMBackend=t$;exports.createOfflineStore=Tj;exports.createPositionTracker=Hs;exports.createPostHogTelemetryAdapter=S$;exports.createQueryKeys=Yw;exports.createRefreshQueue=us;exports.createRoleAccessControl=Kw;exports.createSelectors=_j;exports.createSentryTelemetryAdapter=k$;exports.createStore=hj;exports.createTempestAuth=Bw;exports.createWebSocket=Ds;exports.debounce=vw;exports.decodeJWT=nn;exports.deepMerge=cs;exports.defineRoutes=uj;exports.durationFactor=an;exports.emptyOffsetPage=Zw;exports.estimatePasswordStrength=Hn;exports.estimateTravel=Vj;exports.expandBounds=Us;exports.fitProjection=Ks;exports.formatBytes=Rf;exports.formatCEP=Rs;exports.formatCNPJ=Ps;exports.formatCPF=as;exports.formatCompactNumber=Pf;exports.formatCurrency=Xx;exports.formatDate=Vx;exports.formatDateTime=Zx;exports.formatPercent=ew;exports.formatPhone=os;exports.generateIdempotencyKey=Dw;exports.getInitialTheme=b$;exports.groupBy=iw;exports.haversineKm=pt;exports.isApiError=Nw;exports.isCoordinate=Qj;exports.isCursorPage=Vw;exports.isDefined=hw;exports.isEmpty=fw;exports.isJWTExpired=Fw;exports.isNumber=gw;exports.isOffsetPage=Xw;exports.isPlainObject=bw;exports.isPushSupported=lt;exports.isShareSupported=D$;exports.isString=_w;exports.isValidLatitude=Is;exports.isValidLongitude=As;exports.kebabCase=aw;exports.lazyWithRetry=ls;exports.listQueryKey=bs;exports.memoizeOne=jw;exports.normalizeLongitude=Jj;exports.nprogress=Un;exports.omit=mw;exports.once=ww;exports.oneQueryKey=sn;exports.parseResponse=Tw;exports.pathLengthKm=Yj;exports.permissionsFromToken=Hw;exports.pick=pw;exports.playAudio=Nj;exports.pluralize=cw;exports.projectMercator=$t;exports.randomId=en;exports.range=dw;exports.relativeTime=Zn;exports.retry=Pw;exports.share=P$;exports.sleep=$w;exports.slugify=nw;exports.stopAudio=Sj;exports.storage=tw;exports.themeInitScript=y$;exports.throttle=xw;exports.toRadians=Te;exports.truncate=sw;exports.uniqueBy=lw;exports.unmask=Aj;exports.unprojectMercator=e$;exports.uploadWithProgress=Lw;exports.urlBase64ToUint8Array=Cs;exports.useAccessControl=ps;exports.useAsync=hv;exports.useAudio=Cj;exports.useBeforeInstallPrompt=Zt;exports.useBreakpoint=We;exports.useCan=ms;exports.useClickOutside=Uv;exports.useClientFilter=iv;exports.useClipboard=vv;exports.useCounter=Fv;exports.useCreate=cj;exports.useCursorQuery=tj;exports.useDataProvider=Ze;exports.useDebounce=cv;exports.useDeepMemo=Cv;exports.useDelete=lj;exports.useDisclosure=Iv;exports.useDocumentTitle=Ov;exports.useDocumentVisibility=gv;exports.useErrorHandler=Mj;exports.useEventListener=uv;exports.useEventStream=$j;exports.useFavicon=Bv;exports.useFeatureFlag=E$;exports.useFlagValue=T$;exports.useFocusTrap=ns;exports.useGeolocation=kv;exports.useHover=Pv;exports.useI18n=ks;exports.useIdle=$v;exports.useIntersectionObserver=bv;exports.useInterval=Tv;exports.useIsFirstRender=Kv;exports.useKeyboardShortcut=jv;exports.useList=oj;exports.useListState=Av;exports.useLocalStorage=mv;exports.useLongPress=Dv;exports.useMap=zv;exports.useMediaQuery=lv;exports.useModals=Ou;exports.useOAuthCallback=Qw;exports.useOne=aj;exports.useOnline=_v;exports.usePaginatedQuery=ej;exports.usePagination=rs;exports.usePoll=Iw;exports.usePositionTracker=n$;exports.usePrevious=Ev;exports.usePushSubscription=kj;exports.useQueue=qv;exports.useResizeObserver=yv;exports.useScrollLock=Nv;exports.useSet=Wv;exports.useStableCallback=Sv;exports.useTelemetry=w$;exports.useTheme=bj;exports.useThrottle=Lv;exports.useTimeout=Mv;exports.useToast=k_;exports.useToggle=fv;exports.useTranslate=vj;exports.useUpdate=ij;exports.useViaCEP=Kj;exports.useWebSocket=Gj;exports.useWindowSize=Rv;exports.useZodForm=Pj;exports.validateCNPJ=Ij;exports.validateCPF=Dj;exports.validateForm=Rj;exports.withTimeout=kw;exports.zodResolver=Ls;
|
|
15
15
|
//# sourceMappingURL=tempest-react-sdk.cjs.map
|