tempest-react-sdk 0.17.0 → 0.19.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/bin/tempest.mjs +445 -35
- package/dist/AC-Brw7ZrEs.cjs +2 -0
- package/dist/AC-Brw7ZrEs.cjs.map +1 -0
- package/dist/AC-DLl3Z4oj.js +12 -0
- package/dist/AC-DLl3Z4oj.js.map +1 -0
- package/dist/AL-DPGoZjht.cjs +2 -0
- package/dist/AL-DPGoZjht.cjs.map +1 -0
- package/dist/AL-gswGaWlj.js +12 -0
- package/dist/AL-gswGaWlj.js.map +1 -0
- package/dist/AM-QN1eL4Tn.js +12 -0
- package/dist/AM-QN1eL4Tn.js.map +1 -0
- package/dist/AM-VqNWvsI-.cjs +2 -0
- package/dist/AM-VqNWvsI-.cjs.map +1 -0
- package/dist/AP-CPvBa_FK.cjs +2 -0
- package/dist/AP-CPvBa_FK.cjs.map +1 -0
- package/dist/AP-CRAbh1js.js +12 -0
- package/dist/AP-CRAbh1js.js.map +1 -0
- package/dist/BA-CKy_HnnV.js +12 -0
- package/dist/BA-CKy_HnnV.js.map +1 -0
- package/dist/BA-DoMQ6slK.cjs +2 -0
- package/dist/BA-DoMQ6slK.cjs.map +1 -0
- package/dist/CE-Ca-XMDFW.js +12 -0
- package/dist/CE-Ca-XMDFW.js.map +1 -0
- package/dist/CE-as-pGPQa.cjs +2 -0
- package/dist/CE-as-pGPQa.cjs.map +1 -0
- package/dist/DF-8kzFoovF.js +12 -0
- package/dist/DF-8kzFoovF.js.map +1 -0
- package/dist/DF-Wr8WNxSX.cjs +2 -0
- package/dist/DF-Wr8WNxSX.cjs.map +1 -0
- package/dist/ES-B4uWNG6s.js +12 -0
- package/dist/ES-B4uWNG6s.js.map +1 -0
- package/dist/ES-wKVjD_TM.cjs +2 -0
- package/dist/ES-wKVjD_TM.cjs.map +1 -0
- package/dist/GO-D4m4rOqy.cjs +2 -0
- package/dist/GO-D4m4rOqy.cjs.map +1 -0
- package/dist/GO-DuaAgIfo.js +12 -0
- package/dist/GO-DuaAgIfo.js.map +1 -0
- package/dist/MA-BmaUZZKe.cjs +2 -0
- package/dist/MA-BmaUZZKe.cjs.map +1 -0
- package/dist/MA-wOyPxG_M.js +12 -0
- package/dist/MA-wOyPxG_M.js.map +1 -0
- package/dist/MG-BYsqJd-S.js +12 -0
- package/dist/MG-BYsqJd-S.js.map +1 -0
- package/dist/MG-BchdfJXp.cjs +2 -0
- package/dist/MG-BchdfJXp.cjs.map +1 -0
- package/dist/MS-DZkgtN_7.js +12 -0
- package/dist/MS-DZkgtN_7.js.map +1 -0
- package/dist/MS-Dz9lDw37.cjs +2 -0
- package/dist/MS-Dz9lDw37.cjs.map +1 -0
- package/dist/MT-BkVchoah.cjs +2 -0
- package/dist/MT-BkVchoah.cjs.map +1 -0
- package/dist/MT-GmMwFWw2.js +12 -0
- package/dist/MT-GmMwFWw2.js.map +1 -0
- package/dist/PA-C2FpT6Ew.cjs +2 -0
- package/dist/PA-C2FpT6Ew.cjs.map +1 -0
- package/dist/PA-DgyDzDFi.js +12 -0
- package/dist/PA-DgyDzDFi.js.map +1 -0
- package/dist/PB-BGkzbQup.cjs +2 -0
- package/dist/PB-BGkzbQup.cjs.map +1 -0
- package/dist/PB-D-6NE6KM.js +12 -0
- package/dist/PB-D-6NE6KM.js.map +1 -0
- package/dist/PE-D8V7gWY-.cjs +2 -0
- package/dist/PE-D8V7gWY-.cjs.map +1 -0
- package/dist/PE-vqm-t7Nh.js +12 -0
- package/dist/PE-vqm-t7Nh.js.map +1 -0
- package/dist/PI-CILuGJlW.js +12 -0
- package/dist/PI-CILuGJlW.js.map +1 -0
- package/dist/PI-dJYCbXQM.cjs +2 -0
- package/dist/PI-dJYCbXQM.cjs.map +1 -0
- package/dist/PR-DN8AV__r.js +12 -0
- package/dist/PR-DN8AV__r.js.map +1 -0
- package/dist/PR-P17oBdNH.cjs +2 -0
- package/dist/PR-P17oBdNH.cjs.map +1 -0
- package/dist/RJ-Bccz05Em.js +12 -0
- package/dist/RJ-Bccz05Em.js.map +1 -0
- package/dist/RJ-Budqx7QP.cjs +2 -0
- package/dist/RJ-Budqx7QP.cjs.map +1 -0
- package/dist/RN-DLcJBxo3.cjs +2 -0
- package/dist/RN-DLcJBxo3.cjs.map +1 -0
- package/dist/RN-DTqFP-Nm.js +12 -0
- package/dist/RN-DTqFP-Nm.js.map +1 -0
- package/dist/RO-BCC54UTU.js +12 -0
- package/dist/RO-BCC54UTU.js.map +1 -0
- package/dist/RO-B_IDyci4.cjs +2 -0
- package/dist/RO-B_IDyci4.cjs.map +1 -0
- package/dist/RR-CDGUEyla.cjs +2 -0
- package/dist/RR-CDGUEyla.cjs.map +1 -0
- package/dist/RR-OCnI_XpU.js +12 -0
- package/dist/RR-OCnI_XpU.js.map +1 -0
- package/dist/RS-DiBeY_u5.cjs +2 -0
- package/dist/RS-DiBeY_u5.cjs.map +1 -0
- package/dist/RS-Dy7gBbbH.js +12 -0
- package/dist/RS-Dy7gBbbH.js.map +1 -0
- package/dist/SC-CEMoj8g2.cjs +2 -0
- package/dist/SC-CEMoj8g2.cjs.map +1 -0
- package/dist/SC-trCqQDXz.js +12 -0
- package/dist/SC-trCqQDXz.js.map +1 -0
- package/dist/SE-DAfFbZcK.cjs +2 -0
- package/dist/SE-DAfFbZcK.cjs.map +1 -0
- package/dist/SE-DBdfSrGk.js +12 -0
- package/dist/SE-DBdfSrGk.js.map +1 -0
- package/dist/SP-Cse4d68i.cjs +2 -0
- package/dist/SP-Cse4d68i.cjs.map +1 -0
- package/dist/SP-qPZjJDOT.js +12 -0
- package/dist/SP-qPZjJDOT.js.map +1 -0
- package/dist/TO-CZtMDVug.js +12 -0
- package/dist/TO-CZtMDVug.js.map +1 -0
- package/dist/TO-Dwi5zIyF.cjs +2 -0
- package/dist/TO-Dwi5zIyF.cjs.map +1 -0
- package/dist/br-centroids--O7-1KXz.cjs +2 -0
- package/dist/br-centroids--O7-1KXz.cjs.map +1 -0
- package/dist/br-centroids-IHN7PIzD.js +10 -0
- package/dist/br-centroids-IHN7PIzD.js.map +1 -0
- package/dist/br-geo-BYynYOwK.cjs +2 -0
- package/dist/br-geo-BYynYOwK.cjs.map +1 -0
- package/dist/br-geo-DFRuvjuU.js +8 -0
- package/dist/br-geo-DFRuvjuU.js.map +1 -0
- package/dist/br.cjs +1 -1
- package/dist/br.cjs.map +1 -1
- package/dist/br.d.ts +356 -6
- package/dist/br.js +825 -348
- package/dist/br.js.map +1 -1
- package/dist/projection-CILVBdpd.cjs +2 -0
- package/dist/projection-CILVBdpd.cjs.map +1 -0
- package/dist/projection-Wnqr_svy.js +215 -0
- package/dist/projection-Wnqr_svy.js.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 +21 -1
- package/dist/tempest-react-sdk.js +2790 -2848
- package/dist/tempest-react-sdk.js.map +1 -1
- package/package.json +2 -1
- package/dist/AC-BQUmmKrw.cjs +0 -2
- package/dist/AC-BQUmmKrw.cjs.map +0 -1
- package/dist/AC-DOvYXax1.js +0 -12
- package/dist/AC-DOvYXax1.js.map +0 -1
- package/dist/AL-DH1wKIxj.js +0 -12
- package/dist/AL-DH1wKIxj.js.map +0 -1
- package/dist/AL-oN2X02DP.cjs +0 -2
- package/dist/AL-oN2X02DP.cjs.map +0 -1
- package/dist/AM-Cn_JOc_u.cjs +0 -2
- package/dist/AM-Cn_JOc_u.cjs.map +0 -1
- package/dist/AM-D-l4ioxq.js +0 -12
- package/dist/AM-D-l4ioxq.js.map +0 -1
- package/dist/AP-B8H3590m.cjs +0 -2
- package/dist/AP-B8H3590m.cjs.map +0 -1
- package/dist/AP-pl_IXUrz.js +0 -12
- package/dist/AP-pl_IXUrz.js.map +0 -1
- package/dist/BA-DsPuESbp.cjs +0 -2
- package/dist/BA-DsPuESbp.cjs.map +0 -1
- package/dist/BA-HvFNaSvC.js +0 -12
- package/dist/BA-HvFNaSvC.js.map +0 -1
- package/dist/CE-BhzlM8v8.cjs +0 -2
- package/dist/CE-BhzlM8v8.cjs.map +0 -1
- package/dist/CE-C4VCDB2_.js +0 -12
- package/dist/CE-C4VCDB2_.js.map +0 -1
- package/dist/DF-CdR_I7qu.cjs +0 -2
- package/dist/DF-CdR_I7qu.cjs.map +0 -1
- package/dist/DF-DCepvNQG.js +0 -12
- package/dist/DF-DCepvNQG.js.map +0 -1
- package/dist/ES-BNECOgN8.js +0 -12
- package/dist/ES-BNECOgN8.js.map +0 -1
- package/dist/ES-CzZdWdcw.cjs +0 -2
- package/dist/ES-CzZdWdcw.cjs.map +0 -1
- package/dist/GO-CTgkFwbh.js +0 -12
- package/dist/GO-CTgkFwbh.js.map +0 -1
- package/dist/GO-VqQUIkMG.cjs +0 -2
- package/dist/GO-VqQUIkMG.cjs.map +0 -1
- package/dist/MA-CwpNlEs4.cjs +0 -2
- package/dist/MA-CwpNlEs4.cjs.map +0 -1
- package/dist/MA-DC3zmbpX.js +0 -12
- package/dist/MA-DC3zmbpX.js.map +0 -1
- package/dist/MG-DLTyPn6U.js +0 -12
- package/dist/MG-DLTyPn6U.js.map +0 -1
- package/dist/MG-P3ePmTdM.cjs +0 -2
- package/dist/MG-P3ePmTdM.cjs.map +0 -1
- package/dist/MS-Crc916be.js +0 -12
- package/dist/MS-Crc916be.js.map +0 -1
- package/dist/MS-MikLSXO-.cjs +0 -2
- package/dist/MS-MikLSXO-.cjs.map +0 -1
- package/dist/MT-BzUTgqTr.cjs +0 -2
- package/dist/MT-BzUTgqTr.cjs.map +0 -1
- package/dist/MT-DEqs4lmz.js +0 -12
- package/dist/MT-DEqs4lmz.js.map +0 -1
- package/dist/PA-BmFg98qS.cjs +0 -2
- package/dist/PA-BmFg98qS.cjs.map +0 -1
- package/dist/PA-DCJkLLiT.js +0 -12
- package/dist/PA-DCJkLLiT.js.map +0 -1
- package/dist/PB-_6qWqUQe.js +0 -12
- package/dist/PB-_6qWqUQe.js.map +0 -1
- package/dist/PB-cCwnP4jh.cjs +0 -2
- package/dist/PB-cCwnP4jh.cjs.map +0 -1
- package/dist/PE-BCeDGzmC.cjs +0 -2
- package/dist/PE-BCeDGzmC.cjs.map +0 -1
- package/dist/PE-DhAJD50w.js +0 -12
- package/dist/PE-DhAJD50w.js.map +0 -1
- package/dist/PI-8mJVmMWn.cjs +0 -2
- package/dist/PI-8mJVmMWn.cjs.map +0 -1
- package/dist/PI-BBpuVgnF.js +0 -12
- package/dist/PI-BBpuVgnF.js.map +0 -1
- package/dist/PR-Ck8PsNQr.cjs +0 -2
- package/dist/PR-Ck8PsNQr.cjs.map +0 -1
- package/dist/PR-DIU_pEzX.js +0 -12
- package/dist/PR-DIU_pEzX.js.map +0 -1
- package/dist/RJ-BM_31L8v.js +0 -12
- package/dist/RJ-BM_31L8v.js.map +0 -1
- package/dist/RJ-RO2nzm45.cjs +0 -2
- package/dist/RJ-RO2nzm45.cjs.map +0 -1
- package/dist/RN-CGDsj5y7.cjs +0 -2
- package/dist/RN-CGDsj5y7.cjs.map +0 -1
- package/dist/RN-Cb6kQMBf.js +0 -12
- package/dist/RN-Cb6kQMBf.js.map +0 -1
- package/dist/RO-DQlMmLkh.js +0 -12
- package/dist/RO-DQlMmLkh.js.map +0 -1
- package/dist/RO-bBzN2q3e.cjs +0 -2
- package/dist/RO-bBzN2q3e.cjs.map +0 -1
- package/dist/RR-27xmMYjp.cjs +0 -2
- package/dist/RR-27xmMYjp.cjs.map +0 -1
- package/dist/RR-DT5Iz7pA.js +0 -12
- package/dist/RR-DT5Iz7pA.js.map +0 -1
- package/dist/RS-Ax08xnx2.cjs +0 -2
- package/dist/RS-Ax08xnx2.cjs.map +0 -1
- package/dist/RS-Be6-eibq.js +0 -12
- package/dist/RS-Be6-eibq.js.map +0 -1
- package/dist/SC-CR4B6n9K.js +0 -12
- package/dist/SC-CR4B6n9K.js.map +0 -1
- package/dist/SC-D7CvUmBl.cjs +0 -2
- package/dist/SC-D7CvUmBl.cjs.map +0 -1
- package/dist/SE-DYnzRCQV.js +0 -12
- package/dist/SE-DYnzRCQV.js.map +0 -1
- package/dist/SE-fXsuEuvK.cjs +0 -2
- package/dist/SE-fXsuEuvK.cjs.map +0 -1
- package/dist/SP-Cks7QGPk.cjs +0 -2
- package/dist/SP-Cks7QGPk.cjs.map +0 -1
- package/dist/SP-D7R54yvO.js +0 -12
- package/dist/SP-D7R54yvO.js.map +0 -1
- package/dist/TO-CWXJNpx2.js +0 -12
- package/dist/TO-CWXJNpx2.js.map +0 -1
- package/dist/TO-DyvJcNhT.cjs +0 -2
- package/dist/TO-DyvJcNhT.cjs.map +0 -1
- package/dist/br-geo-Q_VQpVMX.js +0 -8
- package/dist/br-geo-Q_VQpVMX.js.map +0 -1
- package/dist/br-geo-rADqOFQL.cjs +0 -2
- package/dist/br-geo-rADqOFQL.cjs.map +0 -1
- package/dist/projection-C2VXUKZJ.js +0 -124
- package/dist/projection-C2VXUKZJ.js.map +0 -1
- package/dist/projection-CkMNK7HA.cjs +0 -2
- package/dist/projection-CkMNK7HA.cjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _e=require("./sw.cjs"),o=require("react/jsx-runtime"),l=require("react"),w=require("./cn-CNScIEB4.cjs"),In=require("lucide-react"),G=require("@tanstack/react-query"),P=require("react-router-dom"),Ve=require("react-dom"),he=require("react-hook-form"),ue=require("./projection-CkMNK7HA.cjs"),Wt=require("zustand"),$t=require("zustand/middleware"),Gs=require("dexie"),Qs="tempest_accordion_LVhhv",Js="tempest_item_7ryVk",Ys="tempest_header_WaTdJ",Xs="tempest_trigger_9BYFY",Vs="tempest_chevron_i-HVZ",Zs="tempest_open_98jLY",er="tempest_panel_Wx50w",Me={accordion:Qs,item:Js,header:Ys,trigger:Xs,chevron:Vs,open:Zs,panel:er};function tr({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(y=>y!==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`,y=`${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:y,className:Me.trigger,"aria-expanded":h,"aria-controls":_,disabled:f.disabled,onClick:()=>m(f.id),children:[o.jsx("span",{children:f.title}),o.jsx(nr,{className:Me.chevron})]})}),h&&o.jsx("div",{id:_,role:"region","aria-labelledby":y,className:Me.panel,children:f.children})]},f.id)})})}function nr({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 sr="tempest_alert_7cYyI",rr="tempest_content_UXnmZ",or="tempest_title_abGgF",ar="tempest_description_pXPvw",cr="tempest_icon_Zg6SB",ir="tempest_close_narep",lr="tempest_neutral_J7MH1",ur="tempest_solid_s-oW5",dr="tempest_outline_v7w9b",pr="tempest_info_9r3r1",mr="tempest_success_1bzoB",fr="tempest_warning_q-j1Q",hr="tempest_danger_CiZkW",ge={alert:sr,content:rr,title:or,description:ar,icon:cr,close:ir,neutral:lr,solid:ur,outline:dr,info:pr,success:mr,warning:fr,danger:hr};function _r({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(ge.alert,ge[e],t==="solid"&&ge.solid,t==="outline"&&ge.outline,i),...d,children:[r&&o.jsx("span",{className:ge.icon,children:r}),o.jsxs("div",{className:ge.content,children:[n&&o.jsx("p",{className:ge.title,children:n}),s&&o.jsx("p",{className:ge.description,children:s}),u]}),a&&o.jsx("button",{type:"button",className:ge.close,onClick:a,"aria-label":c,children:o.jsx(gr,{})})]})}function gr(){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 br="tempest_bar_SHqWS",yr="tempest_centered_S0CCw",vr="tempest_surface_fusKb",xr="tempest_primary_QcCyN",wr="tempest_transparent_uGrsu",jr="tempest_bordered_5M9FZ",$r="tempest_sticky_DStUO",kr="tempest_safeArea_Vo3Bi",Nr="tempest_leading_mXv-d",Sr="tempest_actions_x7tMx",Cr="tempest_title_qaMMQ",Er="tempest_brand_xKt54",Tr="tempest_iconBtn_S-BTg",te={bar:br,centered:yr,surface:vr,primary:xr,transparent:wr,bordered:jr,sticky:$r,safeArea:kr,leading:Nr,actions:Sr,title:Cr,brand:Er,iconBtn:Tr};function Mr({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 y=s??(()=>window.history.back()),v=t??o.jsxs(o.Fragment,{children:[n&&o.jsx("button",{type:"button",className:te.iconBtn,onClick:y,"aria-label":r,children:a??o.jsx(In.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 kt={xs:480,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},Rr=["xs","sm","md","lg","xl","2xl"];function Lr(e){let t="xs";for(const n of Rr)e>=kt[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=Lr(e),s=a=>e>=kt[a],r=a=>e<kt[a];return{current:n,width:e,above:s,below:r,isMobile:r("md"),isTablet:s("md")&&r("lg"),isDesktop:s("lg")}}const Dr="tempest_shell_-xp0O",Pr="tempest_navbar_liTKV",Ir="tempest_row_PE41P",Ar="tempest_sidebar_wyx-V",Fr="tempest_main_O3GFv",Or="tempest_footer_IFW4q",Br="tempest_bottomNav_pKJ1v",Re={shell:Dr,navbar:Pr,row:Ir,sidebar:Ar,main:Fr,footer:Or,bottomNav:Br};function zr({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(Re.shell,a),...i,children:[e&&o.jsx("div",{className:Re.navbar,children:e}),o.jsxs("div",{className:Re.row,children:[t&&d&&o.jsx("div",{className:Re.sidebar,children:t}),o.jsx("main",{className:Re.main,children:c})]}),s&&o.jsx("div",{className:Re.footer,children:s}),n&&!d&&o.jsx("div",{className:Re.bottomNav,children:n})]})}const Wr="tempest_aspect_GnAJt",qr={aspect:Wr};function Ur({ratio:e=16/9,className:t,style:n,children:s,...r}){const a={aspectRatio:String(e),...n};return o.jsx("div",{className:w.cn(qr.aspect,t),style:a,...r,children:s})}const Kr="tempest_avatar_3xMuZ",Hr="tempest_image_ieqGp",Gr="tempest_xs_oSaLL",Qr="tempest_sm_sZ2bk",Jr="tempest_md_Fdkbz",Yr="tempest_lg_pTTUA",Xr="tempest_xl_mW58F",Vr="tempest_status_ISBnL",Zr="tempest_dot_Wgfo-",eo="tempest_online_-aWoW",to="tempest_offline_-StX3",no="tempest_busy_TbwuF",qe={avatar:Kr,image:Hr,xs:Gr,sm:Qr,md:Jr,lg:Yr,xl:Xr,status:Vr,dot:Zr,online:eo,offline:to,busy:no};function so(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 ro({src:e,alt:t,name:n="",size:s="md",status:r,className:a,onClick:c}){const[i,u]=l.useState(!1),d=l.useMemo(()=>so(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 oo="tempest_badge_RsuMz",ao="tempest_sm_LYsCn",co="tempest_md_4Or8q",io="tempest_lg_Bseje",lo="tempest_square_l63D-",uo="tempest_neutral_lulSm",po="tempest_solid_0Leug",mo="tempest_outline_x06HL",fo="tempest_success_u9JiS",ho="tempest_warning_nsGp-",_o="tempest_danger_PD2hz",go="tempest_info_na6DQ",bo="tempest_primary_S0WCS",yo="tempest_dot_i0c-G",Le={badge:oo,sm:ao,md:co,lg:io,square:lo,neutral:uo,solid:po,outline:mo,success:fo,warning:ho,danger:_o,info:go,primary:bo,dot:yo};function vo({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(Le.badge,Le[e],t==="solid"&&Le.solid,t==="outline"&&Le.outline,Le[n],s==="square"&&Le.square,a),...i,children:[r&&o.jsx("span",{className:Le.dot,"aria-hidden":!0}),c]})}const xo="tempest_banner_oyoWE",wo="tempest_info_s2q0P",jo="tempest_success_uLYQ3",$o="tempest_warning_9rua8",ko="tempest_danger_Uzb-6",No="tempest_icon_vzKmx",So="tempest_body_-Qm4K",Co="tempest_title_AeTHT",Eo="tempest_description_nbyf-",To="tempest_action_47P8e",Mo="tempest_close_Iy2oN",Ne={banner:xo,info:wo,success:jo,warning:$o,danger:ko,icon:No,body:So,title:Co,description:Eo,action:To,close:Mo};function Ro({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 Lo="tempest_bar_kp35Q",Do="tempest_item_XfDIW",Po="tempest_active_sK54f",Io="tempest_iconWrap_yJ20b",Ao="tempest_icon_TAjtI",Fo="tempest_badge_-c3Do",Oo="tempest_label_qJj3L",De={bar:Lo,item:Do,active:Po,iconWrap:Io,icon:Ao,badge:Fo,label:Oo};function Bo({items:e,value:t,onChange:n,showLabels:s=!0,className:r,...a}){return o.jsx("nav",{className:w.cn(De.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(De.item,i&&De.active),"aria-current":i?"page":void 0,disabled:c.disabled,onClick:()=>n(c.key),children:[o.jsxs("span",{className:De.iconWrap,children:[c.icon&&o.jsx("span",{className:De.icon,children:c.icon}),c.badge!==void 0&&o.jsx("span",{className:De.badge,children:c.badge})]}),s&&o.jsx("span",{className:De.label,children:c.label})]},c.key)})})}const zo="tempest_root_qXce2",Wo="tempest_backdrop_WLqh0",qo="tempest_sheet_Okz1P",Uo="tempest_handle_GWCoK",Ko="tempest_handleBar_XPPiI",Ho="tempest_title_i5Vuc",Go="tempest_body_bgDhJ",Pe={root:zo,backdrop:Wo,sheet:qo,handle:Uo,handleBar:Ko,title:Ho,body:Go};function Qo({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:Pe.root,role:"dialog","aria-modal":"true",children:[o.jsx("div",{className:Pe.backdrop,onClick:()=>r&&t(),"aria-hidden":"true"}),o.jsxs("div",{className:w.cn(Pe.sheet,c),...u,children:[s&&o.jsx("button",{type:"button",className:Pe.handle,"aria-label":"Arrastar para fechar",onClick:t,children:o.jsx("span",{className:Pe.handleBar})}),n&&o.jsx("div",{className:Pe.title,children:n}),o.jsx("div",{className:Pe.body,children:i})]})]}),document.body)}const Jo="tempest_nav_H4g6P",Yo="tempest_item_O4g3P",Xo="tempest_link_7WM67",Vo="tempest_current_JdlcS",Zo="tempest_separator_zGWyJ",et={nav:Jo,item:Yo,link:Xo,current:Vo,separator:Zo};function ea({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 ta="tempest_button_2ZuB7",na="tempest_primary_s1sM6",sa="tempest_secondary_R0waJ",ra="tempest_danger_V4fX8",oa="tempest_success_w6qB6",aa="tempest_ghost_1KINV",ca="tempest_soft_c3kzm",ia="tempest_outline_F5jq-",la="tempest_link_Zt5hw",ua="tempest_xs_cF6m0",da="tempest_sm_NhG0g",pa="tempest_md_hH4h3",ma="tempest_lg_2plQf",fa="tempest_xl_nx4V0",ha="tempest_iconOnly_WCpTS",_a="tempest_pill_lx8lt",ga="tempest_fullWidth_36oJT",ba="tempest_loading_EQAt2",ya="tempest_hiddenText_hIiJ2",va="tempest_spinner_ZExvW",xa="tempest_tempest-spin_UOSVC",be={button:ta,primary:na,secondary:sa,danger:ra,success:oa,ghost:aa,soft:ca,outline:ia,link:la,xs:ua,sm:da,md:pa,lg:ma,xl:fa,iconOnly:ha,pill:_a,fullWidth:ga,loading:ba,hiddenText:ya,spinner:va,tempestSpin:xa};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(be.button,be[e],be[t],r&&be.iconOnly,a&&be.pill,n&&be.loading,s&&be.fullWidth,d),disabled:u||n,...m,children:[n&&o.jsx("span",{className:be.spinner,"aria-hidden":!0,children:o.jsx(wa,{})}),o.jsxs("span",{className:w.cn(n&&be.hiddenText),children:[c,p,i]})]})}function wa(){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 ja="tempest_card_Cb1o4",$a="tempest_flat_LRpce",ka="tempest_raised_WmIqk",Na="tempest_elevated_5VEDw",Sa="tempest_interactive_B8Tah",Ca="tempest_padded_oOxwN",Ea="tempest_flush_aiDZi",Ta="tempest_header_PTXf2",Ma="tempest_title_mSgoo",Ra="tempest_body_W441Z",La="tempest_footer_Mu-JC",ne={card:ja,flat:$a,raised:ka,elevated:Na,interactive:Sa,padded:Ca,flush:Ea,header:Ta,title:Ma,body:Ra,footer:La};function Da({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 Pa="tempest_center_Pu1Pf",Ia="tempest_both_53GWn",Aa="tempest_horizontal_94-Bt",Fa="tempest_vertical_Q7Kyg",on={center:Pa,both:Ia,horizontal:Aa,vertical:Fa};function Oa({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(on.center,on[e],s),style:i,...c,children:a})}const Ba="tempest_wrapper_rpthW",za="tempest_disabled_x7-eg",Wa="tempest_input_2kt-h",qa="tempest_box_OCPee",Ua="tempest_labelWrap_Ktbp0",Ka="tempest_label_cwRtI",Ha="tempest_description_rMhG1",Ie={wrapper:Ba,disabled:za,input:Wa,box:qa,labelWrap:Ua,label:Ka,description:Ha},Ga=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(Ja,{}):o.jsx(Qa,{})}),(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 Qa(){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 Ja(){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 Ya="tempest_wrapper_KR4-F",Xa="tempest_label_Mz-wX",Va="tempest_field_iIBJw",Za="tempest_error_O9n-9",ec="tempest_chip_GEwrc",tc="tempest_remove_JYDIq",nc="tempest_input_frJmk",sc="tempest_helper_Yts53",rc="tempest_errorText_llJGq",ye={wrapper:Ya,label:Xa,field:Va,error:Za,chip:ec,remove:tc,input:nc,helper:sc,errorText:rc};function oc({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 y=i?d.trim().toLowerCase():d.trim();if(y){if(e.includes(y)){p("");return}t([...e,y]),p("")}}function h(y){if(c.includes(y.key)){y.preventDefault(),f();return}y.key==="Backspace"&&!d&&e.length>0&&t(e.slice(0,-1))}function _(y){const v=e.slice();v.splice(y,1),t(v)}return o.jsxs("div",{className:w.cn(ye.wrapper,a&&ye.error,u),children:[n&&o.jsx("label",{className:ye.label,children:n}),o.jsxs("div",{className:ye.field,onClick:()=>m.current?.focus(),children:[e.map((y,v)=>o.jsxs("span",{className:ye.chip,children:[y,o.jsx("button",{type:"button",className:ye.remove,"aria-label":`Remover ${y}`,onClick:()=>_(v),children:"×"})]},`${y}-${v}`)),o.jsx("input",{ref:m,className:ye.input,value:d,placeholder:e.length===0?s:"",onChange:y=>p(y.target.value),onKeyDown:h,onBlur:f})]}),a?o.jsx("span",{className:ye.errorText,children:a}):r?o.jsx("span",{className:ye.helper,children:r}):null]})}const ac="tempest_wrapper_TNvle",cc="tempest_label_KVkZO",ic="tempest_field_BenH0",lc="tempest_input_-HTv1",uc="tempest_caret_jRplQ",dc="tempest_menu_zPQG3",pc="tempest_option_vhhn5",mc="tempest_active_XCgtX",fc="tempest_selected_T6nm2",hc="tempest_empty_Ahw5K",_c="tempest_helper_OzB7V",gc="tempest_errorText_X18sQ",bc="tempest_error_bnVuM",U={wrapper:ac,label:cc,field:ic,input:lc,caret:uc,menu:dc,option:pc,active:mc,selected:fc,empty:hc,helper:_c,errorText:gc,error:bc};function yc(e,t){return t?e.label.toLowerCase().includes(t.toLowerCase()):!0}function vc({options:e,value:t,onChange:n,label:s,placeholder:r="Selecione",helperText:a,error:c,disabled:i,filter:u=yc,emptyMessage:d="Nenhuma opção encontrada",className:p}){const m=l.useId(),f=l.useRef(null),h=l.useRef(null),[_,y]=l.useState(!1),[v,g]=l.useState(""),[x,b]=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(()=>{y(!1),g(""),b(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(),y(!0),b(E=>Math.min(S.length-1,E+1));else if(k.key==="ArrowUp")k.preventDefault(),b(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:()=>y(!0),onChange:k=>{g(k.target.value),y(!0),b(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:()=>b(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 xc="tempest_overlay_dd9h1",wc="tempest_tempest-fade-in_DvgSp",jc="tempest_dialog_ptM-K",$c="tempest_tempest-modal-in_UoxQC",kc="tempest_sm_K5k3W",Nc="tempest_md_gvyR7",Sc="tempest_lg_BgB1a",Cc="tempest_xl_MR-68",Ec="tempest_size2xl_-PH9e",Tc="tempest_size3xl_iqDwN",Mc="tempest_fullscreen_o84Xi",Rc="tempest_fullscreenOnMobile_0bDwe",Lc="tempest_body_lVhql",Dc="tempest_header_ILG9i",Pc="tempest_footer_rro2w",Ic="tempest_title_A5OeE",Ac="tempest_close_-ER1C",V={overlay:xc,tempestFadeIn:wc,dialog:jc,tempestModalIn:$c,sm:kc,md:Nc,lg:Sc,xl:Cc,size2Xl:Ec,size3Xl:Tc,fullscreen:Mc,fullscreenOnMobile:Rc,body:Lc,header:Dc,footer:Pc,title:Ic,close:Ac};function Yt({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,Fc(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(Oc,{})})]}),o.jsx("div",{className:V.body,children:s}),r&&o.jsx("footer",{className:V.footer,children:r})]})}),document.body)}function Fc(e){return e==="2xl"?V.size2xl:e==="3xl"?V.size3xl:V[e]}function Oc(){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 An({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(Yt,{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 Bc="tempest_wrapper_iHNUs",zc="tempest_label_-OEBL",Wc="tempest_required_CTss-",qc="tempest_field_65yGJ",Uc="tempest_input_WjT81",Kc="tempest_sizeSm_cgds6",Hc="tempest_sizeMd_EPFGy",Gc="tempest_sizeLg_5Cq8k",Qc="tempest_hasLeftIcon_xYO-v",Jc="tempest_hasRightIcon_C7uyr",Yc="tempest_iconLeft_KrUhI",Xc="tempest_iconRight_Ssr47",Vc="tempest_error_VLISa",Zc="tempest_helper_7Vc-s",ei="tempest_errorText_xz4xS",z={wrapper:Bc,label:zc,required:Wc,field:qc,input:Uc,sizeSm:Kc,sizeMd:Hc,sizeLg:Gc,hasLeftIcon:Qc,hasRightIcon:Jc,iconLeft:Yc,iconRight:Xc,error:Vc,helper:Zc,errorText:ei},Ct=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,y=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":y,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]})}),ti=l.forwardRef(function({value:t,onChange:n,mode:s="date",...r},a){return o.jsx(Ct,{...r,ref:a,type:s,value:t,onChange:c=>n(c.target.value)})}),ni="tempest_divider_KSGsi",si="tempest_horizontal_pZ05Y",ri="tempest_bare_elDbS",oi="tempest_vertical_p-jD4",ai="tempest_dashed_JWxCU",ci="tempest_alignStart_QAIi1",ii="tempest_alignEnd_eZDwa",Q={divider:ni,horizontal:si,bare:ri,vertical:oi,dashed:ai,alignStart:ci,alignEnd:ii};function li({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 ui="tempest_overlay_hcG1G",di="tempest_tempest-drawer-overlay_XFbxY",pi="tempest_panel_wUX0N",mi="tempest_right_-oX-6",fi="tempest_tempest-drawer-in-right_pWYHv",hi="tempest_left_xi3nD",_i="tempest_tempest-drawer-in-left_o7JSb",gi="tempest_top_7rGCn",bi="tempest_tempest-drawer-in-top_kn6AF",yi="tempest_bottom_zd-25",vi="tempest_tempest-drawer-in-bottom_0x3u7",xi="tempest_handle_5B-TB",wi="tempest_handleTop_7aMf-",ji="tempest_header_sYoP1",$i="tempest_title_LqUOu",ki="tempest_close_tYPhU",Ni="tempest_body_aV9FG",Si="tempest_footer_AuvUP",de={overlay:ui,tempestDrawerOverlay:di,panel:pi,right:mi,tempestDrawerInRight:fi,left:hi,tempestDrawerInLeft:_i,top:gi,tempestDrawerInTop:bi,bottom:yi,tempestDrawerInBottom:vi,handle:xi,handleTop:wi,header:ji,title:$i,close:ki,body:Ni,footer:Si};function Ci({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 y=v=>{i&&v.key==="Escape"&&t()};return window.addEventListener("keydown",y),()=>{document.body.style.overflow=_,window.removeEventListener("keydown",y)}},[e,i,t]),!e||typeof document>"u"?null:Ve.createPortal(o.jsxs(o.Fragment,{children:[o.jsx("div",{className:de.overlay,onClick:()=>{c&&t()}}),o.jsxs("aside",{role:"dialog","aria-modal":"true",className:w.cn(de.panel,de[h],d),children:[m&&(h==="bottom"||h==="top")&&o.jsx("div",{className:w.cn(de.handle,h==="top"&&de.handleTop),"aria-hidden":!0}),(s||!u)&&o.jsxs("header",{className:de.header,children:[o.jsx("h3",{className:de.title,children:s}),!u&&o.jsx("button",{type:"button","aria-label":"Fechar",className:de.close,onClick:t,children:o.jsx(Ei,{})})]}),o.jsx("div",{className:de.body,children:r}),a&&o.jsx("footer",{className:de.footer,children:a})]})]}),document.body)}function Ei(){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 Ti="tempest_root_5ZetV",Mi="tempest_menu_-RiRW",Ri="tempest_bottomStart_z60h9",Li="tempest_bottomEnd_b1tmU",Di="tempest_topStart_A0em2",Pi="tempest_topEnd_cFA5-",Ii="tempest_item_T-QPZ",Ai="tempest_active_WNqoX",Fi="tempest_danger_C0jN3",Oi="tempest_separator_RimQa",Bi="tempest_label_6yP76",ce={root:Ti,menu:Mi,bottomStart:Ri,bottomEnd:Li,topStart:Di,topEnd:Pi,item:Ii,active:Ai,danger:Fi,separator:Oi,label:Bi};function zi(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 Wi({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 b=m.indexOf(c),j=m[(b+1)%m.length]??-1;i(j),p.current[j]?.focus()}if(x.key==="ArrowUp"){x.preventDefault();const b=m.indexOf(c),j=m[(b-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"}},y=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,zi(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:()=>y(v),onMouseEnter:()=>i(g),children:[v.icon&&o.jsx("span",{"aria-hidden":!0,children:v.icon}),v.label]})},v.id))})]})}const qi="tempest_zone_u04pu",Ui="tempest_dragging_uGtl4",Ki="tempest_disabled_GTKfV",Hi="tempest_input_qhJ1u",Gi="tempest_prompt_mlpWz",tt={zone:qi,dragging:Ui,disabled:Ki,input:Hi,prompt:Gi};function Qi({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 b=Array.from(x),j=n?b:b.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()},y=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:y,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 Ji="tempest_wrapper_gzyTd",Yi="tempest_icon_qVCyh",Xi="tempest_title_xPfUf",Vi="tempest_description_oWwH1",Zi="tempest_action_dqxw1",nt={wrapper:Ji,icon:Yi,title:Xi,description:Vi,action:Zi};function el({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 tl="tempest_wrapper_luRyF",nl="tempest_icon_dEdBl",sl="tempest_title_StutD",rl="tempest_description_A2XCb",ol="tempest_action_vm1LC",st={wrapper:tl,icon:nl,title:sl,description:rl,action:ol};function al({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(cl,{})}),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 cl(){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 il="tempest_wrapper_E0qHs",ll="tempest_label_lbMkx",ul="tempest_dropzone_jqua0",dl="tempest_active_CG9Uk",pl="tempest_disabled_WNUUl",ml="tempest_icon_i9fGH",fl="tempest_title_bTVFl",hl="tempest_subtitle_S54OV",_l="tempest_files_WljYm",gl="tempest_file_Lp-dR",bl="tempest_fileMeta_LTnN2",yl="tempest_remove_jskra",vl="tempest_hidden_ReEq6",K={wrapper:il,label:ll,dropzone:ul,active:dl,disabled:pl,icon:ml,title:fl,subtitle:hl,files:_l,file:gl,fileMeta:bl,remove:yl,hidden:vl};function xl(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function wl(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 jl({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=[],b=[];for(const S of Array.from(g)){if(!wl(S,s)){b.push({file:S,reason:"type"});continue}if(a&&S.size>a){b.push({file:S,reason:"size"});continue}x.push(S)}if(b.length>0&&c?.(b),x.length===0)return;const j=r?[...e,...x]:x.slice(0,1);t(j)}function y(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:y,children:[o.jsx("div",{className:K.icon,"aria-hidden":!0,children:o.jsx($l,{})}),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:xl(g.size)})]}),o.jsx("button",{type:"button","aria-label":`Remover ${g.name}`,className:K.remove,onClick:()=>v(x),children:"×"})]},`${g.name}-${x}`))})]})}function $l(){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 kl="tempest_form_jNBDR",Nl="tempest_stack_O1Hl-",Sl="tempest_inline_LBQAv",Cl="tempest_grid_-B86T",El="tempest_section_HGqw3",Tl="tempest_sectionHeader_ji9hQ",Ml="tempest_sectionTitle_GTPwe",Rl="tempest_sectionDescription_KjW7k",Ll="tempest_sectionBody_Vp2wz",Dl="tempest_row_1EkVR",Pl="tempest_actions_hK95I",Il="tempest_start_gXnm3",Al="tempest_center_mKkz4",Fl="tempest_end_O3yDQ",Ol="tempest_between_tte2z",ie={form:kl,stack:Nl,inline:Sl,grid:Cl,section:El,sectionHeader:Tl,sectionTitle:Ml,sectionDescription:Rl,sectionBody:Ll,row:Dl,actions:Pl,start:Il,center:Al,end:Fl,between:Ol};function Et(e,t){return e===void 0?`${t*4}px`:typeof e=="number"?`${e*4}px`:e}function Fn(e){return e===void 0?"repeat(2, minmax(0, 1fr))":typeof e=="number"?`repeat(${e}, minmax(0, 1fr))`:e}const Bl=l.forwardRef(function({layout:t="stack",columns:n,gap:s,className:r,style:a,children:c,...i},u){const d={gap:Et(s,4),...t==="grid"?{gridTemplateColumns:Fn(n)}:null,...a};return o.jsx("form",{ref:u,className:w.cn(ie.form,ie[t],r),style:d,...i,children:c})});function zl({title:e,description:t,layout:n="stack",columns:s,gap:r,className:a,style:c,children:i,...u}){const d={gap:Et(r,4),...n==="grid"?{gridTemplateColumns:Fn(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 Wl({gap:e,className:t,style:n,children:s,...r}){const a={gap:Et(e,3),...n};return o.jsx("div",{className:w.cn(ie.row,t),style:a,...r,children:s})}function ql({align:e="end",gap:t,className:n,style:s,children:r,...a}){const c={gap:Et(t,2),...s};return o.jsx("div",{className:w.cn(ie.actions,ie[e],n),style:c,...a,children:r})}const Ul="tempest_container_fJfOt",Kl="tempest_sm_k8D4-",Hl="tempest_md_EnpYy",Gl="tempest_lg_UU-Ig",Ql="tempest_xl_2TEWj",Jl="tempest_full_l8bvG",Yl="tempest_stack_sxR8u",Xl="tempest_vertical_2TMf5",Vl="tempest_horizontal_r7-c-",Zl="tempest_center_EDSAh",eu="tempest_start_ucQ-K",tu="tempest_end_pnKlF",nu="tempest_stretch_pX6l7",su="tempest_justifyStart_lHYsS",ru="tempest_justifyCenter_JH2m6",ou="tempest_justifyEnd_EBisT",au="tempest_justifyBetween_mAJwT",cu="tempest_wrap_-xxOh",iu="tempest_grid_o-JIX",Z={container:Ul,sm:Kl,md:Hl,lg:Gl,xl:Ql,full:Jl,stack:Yl,vertical:Xl,horizontal:Vl,center:Zl,start:eu,end:tu,stretch:nu,justifyStart:su,justifyCenter:ru,justifyEnd:ou,justifyBetween:au,wrap:cu,grid:iu};function lu({size:e="lg",className:t,children:n,...s}){return o.jsx("div",{className:w.cn(Z.container,Z[e],t),...s,children:n})}function uu(e){return typeof e=="object"&&e!==null&&("mobile"in e||"tablet"in e||"desktop"in e)}function Nt(e,t){if(e!==void 0)return uu(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 On(e){if(e!==void 0)return typeof e=="number"?`${e*4}px`:e}function Bn(e,t){return e?"mobile":t?"tablet":"desktop"}function du({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=Bn(d,p),f=Nt(e,m)??"vertical",_={gap:On(Nt(t,m)),...c},y=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],y,r&&Z.wrap,a),style:_,...u,children:i})}function pu(e){if(e!==void 0)return typeof e=="number"?`repeat(${e}, minmax(0, 1fr))`:e}function mu({columns:e=2,gap:t=4,className:n,style:s,children:r,...a}){const{isMobile:c,isTablet:i}=We(),u=Bn(c,i),d=pu(Nt(e,u)),p=On(Nt(t,u));return o.jsx("div",{className:w.cn(Z.grid,n),style:{gridTemplateColumns:d,gap:p,...s},...a,children:r})}function an(){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 Xt(){const[e,t]=l.useState(null),[n,s]=l.useState(!1),[r,a]=l.useState(an);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(an());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 fu="tempest_banner_0oCIc",hu="tempest_icon_izjRL",_u="tempest_body_9JAQv",gu="tempest_title_1E50X",bu="tempest_description_QY25-",yu="tempest_close_RN6FO",Ue={banner:fu,icon:hu,body:_u,title:gu,description:bu,close:yu};function vu(e){if(!e||typeof window>"u")return!1;try{return window.localStorage.getItem(e)==="1"}catch{return!1}}function xu({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}=Xt(),[f,h]=l.useState(()=>vu(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(In.X,{size:18,"aria-hidden":!0})})]})}function wu({label:e="Instalar app",onResult:t,...n}){const{installable:s,installed:r,isStandalone:a,prompt:c}=Xt();return!s||r||a?null:o.jsx(Xe,{onClick:async()=>{t?.(await c())},...n,children:e})}const ju="tempest_kbd_jgbYx",$u="tempest_sm_9WPWA",ku="tempest_md_BePC0",Nu="tempest_lg_cBKum",cn={kbd:ju,sm:$u,md:ku,lg:Nu};function Su({size:e="md",className:t,children:n,...s}){return o.jsx("kbd",{className:w.cn(cn.kbd,cn[e],t),...s,children:n})}const Cu="tempest_stack_zYzdv",Eu={stack:Cu},zn=l.createContext(null);function Tu({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(zn.Provider,{value:d,children:[e,o.jsx("div",{className:Eu.stack,children:t.map(p=>p.kind==="content"?o.jsx(Mu,{entry:p,close:a},p.id):o.jsx(Ru,{entry:p,close:a},p.id))})]})}function Mu({entry:e,close:t}){const{options:n,id:s}=e,r=()=>{n.onClose?.(),t(s)};return o.jsx(Yt,{open:!0,onClose:r,title:n.title,size:n.size,closeOnBackdrop:n.closeOnBackdrop,closeOnEsc:n.closeOnEsc,hideCloseButton:n.hideCloseButton,children:n.children})}function Ru({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(An,{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 Lu(){const e=l.useContext(zn);if(e===null)throw new Error("useModals must be used within a <ModalsProvider>");return e}const Du="tempest_navbar_Ey25T",Pu="tempest_surface_xyKhM",Iu="tempest_primary_w3ft-",Au="tempest_transparent_N1vMR",Fu="tempest_bordered_HD49R",Ou="tempest_sticky_0XsOs",Bu="tempest_logo_O9j3q",zu="tempest_nav_0oisE",Wu="tempest_actions_8BNWJ",Ae={navbar:Du,surface:Pu,primary:Iu,transparent:Au,bordered:Fu,sticky:Ou,logo:Bu,nav:zu,actions:Wu};function qu({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 Uu="tempest_bar_zxTqx",Ku={bar:Uu},Hu=300,ln=.9,Gu=300;function un(e){return e<0?0:e>1?1:e}function Qu(){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(_>=ln)return;const y=h??(1-_)*.1+.01;a({value:Math.min(un(_+y),ln)})};return{start:()=>{i(),!e.active&&(a({active:!0,value:e.value>0?e.value:.08}),c(),n=setInterval(()=>u(),Hu))},done:()=>{c(),i(),a({value:1,active:!0}),s=setTimeout(()=>{a({active:!1,value:0}),s=null},Gu)},set:h=>{i();const _=un(h);a({value:_,active:_<1?!0:e.active})},inc:u,subscribe:h=>(t.add(h),h(e),()=>{t.delete(h)})}}const Wn=Qu();function Ju({color:e,height:t=3,className:n}){const[s,r]=l.useState({value:0,active:!1});if(l.useEffect(()=>Wn.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(Ku.bar,n),style:a,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(s.value*100)})}const Yu="tempest_page_THNNc",Xu="tempest_padded_bzjoF",Vu="tempest_header_PZEzk",Zu="tempest_headerText_qYXFI",ed="tempest_eyebrow_651RV",td="tempest_title_2oGnT",nd="tempest_description_YzmWl",sd="tempest_actions_-rB3U",rd="tempest_toolbar_sA7sD",od="tempest_content_RCB4b",ad="tempest_footer_540pQ",se={page:Yu,padded:Xu,header:Vu,headerText:Zu,eyebrow:ed,title:td,description:nd,actions:sd,toolbar:rd,content:od,footer:ad};function cd({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 id="tempest_wrapper_cRGQm",ld="tempest_controls_fdL-y",ud="tempest_page_WjG0l",dd="tempest_active_1kqsJ",pd="tempest_ellipsis_V294k",md="tempest_sizeSelect_ZayTo",fd="tempest_numeric_ztI0I",hd="tempest_summary_ZTggV",re={wrapper:id,controls:ld,page:ud,active:dd,ellipsis:pd,sizeSelect:md,numeric:fd,summary:hd};function _d(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 qn({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(()=>_d(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 gd="tempest_wrapper_zEU-L",bd="tempest_label_ps3gD",yd="tempest_field_7taZG",vd="tempest_input_FWEvb",xd="tempest_sm_3-CZz",wd="tempest_md_ReV0O",jd="tempest_lg_DiTiB",$d="tempest_toggle_WNeX9",kd="tempest_error_QdIFf",Nd="tempest_helper_mBUna",Sd="tempest_errorText_73Uvv",Cd="tempest_strength_i6RaQ",Ed="tempest_strengthBar_PAPHR",Td="tempest_strengthLabel_u9QHS",Md="tempest_level0_n6tWv",Rd="tempest_level1_FOI93",Ld="tempest_level2_q5Wii",Dd="tempest_level3_BpB53",Pd="tempest_level4_vyQ3x",H={wrapper:gd,label:bd,field:yd,input:vd,sm:xd,md:wd,lg:jd,toggle:$d,error:kd,helper:Nd,errorText:Sd,strength:Cd,strengthBar:Ed,strengthLabel:Td,level0:Md,level1:Rd,level2:Ld,level3:Dd,level4:Pd},Id=["Muito fraca","Fraca","Razoável","Forte","Excelente"];function Un(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 Ad=l.forwardRef(function({label:t,helperText:n,error:s,size:r="md",showStrength:a=!1,strength:c,strengthLabels:i=Id,toggleLabels:u={show:"Mostrar senha",hide:"Esconder senha"},className:d,value:p,defaultValue:m,...f},h){const[_,y]=l.useState(!1),v=String(p??m??""),g=c??Un(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:()=>y(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]})}),Fd="tempest_wrapper_3WAh7",Od="tempest_label_Hk01i",Bd="tempest_cells_URO3v",zd="tempest_cell_fxLzs",Wd="tempest_sm_SQM-s",qd="tempest_md_aHCGl",Ud="tempest_lg_JpI4A",Kd="tempest_error_Kou0o",Hd="tempest_helper_W04iL",Gd="tempest_errorText_h4svq",Se={wrapper:Fd,label:Od,cells:Bd,cell:zd,sm:Wd,md:qd,lg:Ud,error:Kd,helper:Hd,errorText:Gd},Qd=/[0-9]/,Jd=/[A-Za-z0-9]/,Yd=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:y},v){const g=l.useId(),x=_??g,b=r!==void 0,[j,S]=l.useState(a??""),M=b?r??"":j,T=Array.from({length:t},(L,R)=>M[R]??""),N=l.useRef([]),k=n==="numeric"?Qd:Jd;l.useEffect(()=>{h&&N.current[0]?.focus()},[h]);const E=L=>{const R=L.slice(0,t);b||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 mt=T.slice();mt[L]=q,E(mt.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))},I=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:w.cn(Se.wrapper,m&&Se.error,y),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((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:Se.cell,"aria-label":`Dígito ${R+1}`,"aria-invalid":!!m,onChange:$(R),onKeyDown:C(R),onPaste:I},R))}),m?o.jsx("span",{className:Se.errorText,children:m}):p?o.jsx("span",{className:Se.helper,children:p}):null]})}),Xd="tempest_root_vEMon",Vd="tempest_popover_E9K9X",Zd="tempest_tempest-popover-in_W8miP",ep="tempest_top_TYlrh",tp="tempest_bottom_wGs70",np="tempest_left_h7fCr",sp="tempest_right_--bJW",Mt={root:Xd,popover:Vd,tempestPopoverIn:Zd,top:ep,bottom:tp,left:np,right:sp};function rp({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),y=l.useCallback(x=>{d||m(x),r?.(x)},[d,r]);l.useEffect(()=>{if(!f)return;const x=j=>{c&&j.key==="Escape"&&y(!1)},b=j=>{i&&_.current&&!_.current.contains(j.target)&&y(!1)};return window.addEventListener("keydown",x),window.addEventListener("mousedown",b),()=>{window.removeEventListener("keydown",x),window.removeEventListener("mousedown",b)}},[f,c,i,y]);const v=x=>{e.props.onClick?.(x),y(!f)},g={...e,props:{...e.props,onClick:v,"aria-expanded":f,"aria-controls":h}};return o.jsxs("span",{ref:_,className:Mt.root,children:[g,f&&o.jsx("div",{id:h,role:"dialog",className:w.cn(Mt.popover,Mt[n],u),children:t})]})}const op="tempest_wrapper_BQek1",ap="tempest_bar_uC-0x",cp="tempest_fill_vmg7x",ip="tempest_success_gWJ8U",lp="tempest_warning_DGkPO",up="tempest_danger_gfwHh",dp="tempest_indeterminate_HojUj",pp="tempest_tempest-progress-loop_0nEdF",mp="tempest_label_qqHJM",Ke={wrapper:op,bar:ap,fill:cp,success:ip,warning:lp,danger:up,indeterminate:dp,tempestProgressLoop:pp,label:mp};function fp({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 hp="tempest_wrapper_P-gFm",_p="tempest_disabled_0-cna",gp="tempest_input_7R8ZN",bp="tempest_dot_P7ejP",yp="tempest_labelWrap_iQ1HR",vp="tempest_label_vAFIP",xp="tempest_description_bEB8u",wp="tempest_group_oi329",jp="tempest_horizontal_1Ovgu",ke={wrapper:hp,disabled:_p,input:gp,dot:bp,labelWrap:yp,label:vp,description:xp,group:wp,horizontal:jp},Kn=l.createContext(null),$p=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(Kn),h=f?.name??a,_=f?.disabled??r,y=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:y,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 kp({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 _(y){f||m(y),n?.(y)}return o.jsx(Kn.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 Np="tempest_wrapper_o1aOo",Sp="tempest_label_jaBOA",Cp="tempest_value_GKfOu",Ep="tempest_field_YxCzt",Tp="tempest_track_j-2iy",Mp="tempest_fill_1pbqj",Rp="tempest_input_1MASw",Lp="tempest_helper_uqxKu",ve={wrapper:Np,label:Sp,value:Cp,field:Ep,track:Tp,fill:Mp,input:Rp,helper:Lp};function Dp({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]),y=u?.(e)??`${p} – ${m}`,v=l.useCallback(x=>{const b=Math.min(Number(x.target.value),m);t([b,m])},[m,t]),g=l.useCallback(x=>{const b=Math.max(Number(x.target.value),p);t([p,b])},[p,t]);return o.jsxs("div",{className:w.cn(ve.wrapper,d),children:[a&&o.jsxs("div",{className:ve.label,children:[o.jsx("span",{children:a}),o.jsx("span",{className:ve.value,children:y})]}),o.jsxs("div",{className:ve.field,children:[o.jsx("div",{className:ve.track}),o.jsx("div",{className:ve.fill,style:{left:`${h}%`,right:`${100-_}%`}}),o.jsx("input",{type:"range",className:ve.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:ve.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:ve.helper,children:c})]})}const Pp="tempest_wrapper_K9Mqa",Ip="tempest_star_goIGS",Ap="tempest_filled_mMs-d",Fp="tempest_disabled_tyUlQ",Op="tempest_readonly_bnKLN",Bp="tempest_sm_K7-y9",zp="tempest_md_ex2Tb",Wp="tempest_lg_TstLJ",He={wrapper:Pp,star:Ip,filled:Ap,disabled:Fp,readonly:Op,sm:Bp,md:zp,lg:Wp};function qp({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,y=_<=p;return o.jsx("button",{type:"button",role:"radio","aria-checked":e===_,"aria-label":`${_} ${_===1?"estrela":"estrelas"}`,className:w.cn(He.star,y&&He.filled),disabled:a,onMouseEnter:()=>!r&&!a&&d(_),onClick:()=>m(_),children:o.jsx(Up,{filled:y})},_)})})}function Up({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 Hn(e,t,n,s,r){return s?(Array.isArray(s)?s:[s]).includes(e):!(t&&!r.above(t)||n&&!r.below(n))}function Kp({above:e,below:t,only:n,children:s}){const r=We();return Hn(r.current,e,t,n,r)?s:null}function Hp({above:e,below:t,only:n,children:s}){const r=We();return Hn(r.current,e,t,n,r)?null:s}const Gp="tempest_safe_iqDFY",Qp="tempest_inline_V9eMG",Jp="tempest_top_Xse9E",Yp="tempest_right_GZm9b",Xp="tempest_bottom_kkyD7",Vp="tempest_left_Z4Q72",Ge={safe:Gp,inline:Qp,top:Jp,right:Yp,bottom:Xp,left:Vp},Zp=["top","right","bottom","left"];function em({edges:e=Zp,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 tm="tempest_wrapper_dKXJJ",nm="tempest_input_m0lPc",sm="tempest_iconLeft_030-U",rm="tempest_clear_nb6lG",ft={wrapper:tm,input:nm,iconLeft:sm,clear:rm},Gn=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(om,{})}),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(am,{})})]})});function om(){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 am(){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 cm="tempest_group_mYyFC",im="tempest_fullWidth_unSMm",lm="tempest_segment_cu-EL",um="tempest_sm_CfD41",dm="tempest_md_2ixuM",pm="tempest_lg_2Kt7-",mm="tempest_active_GmyKg",fm="tempest_icon_9h6GK",hm="tempest_label_mS17q",Fe={group:cm,fullWidth:im,segment:lm,sm:um,md:dm,lg:pm,active:mm,icon:fm,label:hm};function _m({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 gm="tempest_sidebar_UB1qz",bm="tempest_header_zupoS",ym="tempest_nav_aLYuL",vm="tempest_item_IAjHb",xm="tempest_collapsed_ZbZYA",wm="tempest_active_BgcFy",jm="tempest_icon_UQswn",$m="tempest_label_TPvJ9",km="tempest_badge_xwEZv",Nm="tempest_footer_TyRyi",pe={sidebar:gm,header:bm,nav:ym,item:vm,collapsed:xm,active:wm,icon:jm,label:$m,badge:km,footer:Nm};function Sm({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(pe.sidebar,a&&pe.collapsed,u),style:{width:m,...d},...p,children:[e&&o.jsx("div",{className:pe.header,children:e}),o.jsx("nav",{className:pe.nav,"aria-label":"Navegação lateral",children:t.map(f=>{const h=f.key===n;return o.jsxs("button",{type:"button",className:w.cn(pe.item,h&&pe.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:pe.icon,children:f.icon}),!a&&o.jsx("span",{className:pe.label,children:f.label}),!a&&f.badge!==void 0&&o.jsx("span",{className:pe.badge,children:f.badge})]},f.key)})}),r&&o.jsx("div",{className:pe.footer,children:r})]})}const Cm="tempest_skeleton_CB4uF",Em="tempest_text_-A8IF",Tm="tempest_circle_DYcl8",Rt={skeleton:Cm,text:Em,circle:Tm};function Mm({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 Rm="tempest_spacer_okdOd",Lm="tempest_both_85qSF",Dm="tempest_x_QiU2B",Pm="tempest_y_hTtCp",dn={spacer:Rm,both:Lm,x:Dm,y:Pm};function Im({axis:e="both",className:t,...n}){return o.jsx("div",{className:w.cn(dn.spacer,dn[e],t),...n})}const Am="tempest_spinner_GpFZS",Fm="tempest_tempest-spinner_wKVCY",Om="tempest_xs_p8BFI",Bm="tempest_sm_3sIoD",zm="tempest_md_M2sPj",Wm="tempest_lg_IxTw2",qm="tempest_xl_cgwqq",Um="tempest_wrap_Xkv-I",Km="tempest_overlay_sVSe9",Hm="tempest_caption_B0ED9",Oe={spinner:Am,tempestSpinner:Fm,xs:Om,sm:Bm,md:zm,lg:Wm,xl:qm,wrap:Um,overlay:Km,caption:Hm};function Qn({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 Gm="tempest_stat_zoo9y",Qm="tempest_header_3UQqq",Jm="tempest_icon_zUG3e",Ym="tempest_label_lIH47",Xm="tempest_row_Ifyts",Vm="tempest_value_JBWnr",Zm="tempest_delta_mRVrE",ef="tempest_up_7qgUO",tf="tempest_down_3Rq2Z",nf="tempest_flat_R5pZT",sf="tempest_hint_YkTF8",oe={stat:Gm,header:Qm,icon:Jm,label:Ym,row:Xm,value:Vm,delta:Zm,up:ef,down:tf,flat:nf,hint:sf};function rf(e){if(typeof e!="string")return;const t=e.trim();if(t.startsWith("+"))return"up";if(t.startsWith("-")||t.startsWith("−"))return"down"}function of({label:e,value:t,delta:n,trend:s,hint:r,icon:a,className:c,...i}){const u=s??rf(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 af="tempest_stepper_w3qjQ",cf="tempest_vertical_d4mOs",lf="tempest_step_s2nqL",uf="tempest_dot_d1bSL",df="tempest_completed_gcFHM",pf="tempest_active_kL-CH",mf="tempest_label_8irAI",ff="tempest_connector_lyeWp",xe={stepper:af,vertical:cf,step:lf,dot:uf,completed:df,active:pf,label:mf,connector:ff};function hf({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 qt(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 _f(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 gf(e,t="en-US"){return new Intl.NumberFormat(t,{notation:"compact",maximumFractionDigits:1}).format(e)}const bf="tempest_wrapper_JNjXK",yf="tempest_label_9XKNm",vf="tempest_row_cOARX",xf="tempest_sm_RzVSU",wf="tempest_md_pezRm",jf="tempest_lg_kYbIN",$f="tempest_disabled_vqmo2",kf="tempest_btn_xuHhj",Nf="tempest_value_NEatO",Ce={wrapper:bf,label:yf,row:vf,sm:xf,md:wf,lg:jf,disabled:$f,btn:kf,value:Nf},Sf=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(qt(t-a,s,r))},_=()=>{i||n(qt(t+a,s,r))},y=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:y}),o.jsx("button",{type:"button",className:Ce.btn,"aria-label":p.increment,onClick:_,disabled:!g,children:"+"})]})]})}),Cf="tempest_wrapper_kudO9",Ef="tempest_disabled_2aZ0V",Tf="tempest_input_5BPNu",Mf="tempest_track_7ObdZ",Rf="tempest_thumb_-FTeK",Lf="tempest_label_LrH7V",Qe={wrapper:Cf,disabled:Ef,input:Tf,track:Mf,thumb:Rf,label:Lf},Df=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})]})}),Pf="tempest_tag_16VPH",If="tempest_sm_pzyd5",Af="tempest_md_GL6tQ",Ff="tempest_lg_8tgXU",Of="tempest_neutral_jAd-x",Bf="tempest_primary_AXKlN",zf="tempest_success_56lz4",Wf="tempest_warning_UK7SC",qf="tempest_danger_kJ-yx",Uf="tempest_info_hmHE-",Kf="tempest_label_ZBPfO",Hf="tempest_remove_UEwgr",rt={tag:Pf,sm:If,md:Af,lg:Ff,neutral:Of,primary:Bf,success:zf,warning:Wf,danger:qf,info:Uf,label:Kf,remove:Hf};function Gf({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 Qf="tempest_scroll_unrJp",Jf="tempest_table_Dkosn",Yf="tempest_th_PNuEx",Xf="tempest_td_jv9tA",Vf="tempest_tr_7UG8J",Zf="tempest_clickable_B6Si-",eh="tempest_alignRight_9hY0G",th="tempest_alignCenter_YiUQy",nh="tempest_emptyRow_kdMiv",sh="tempest_priorityTablet_3alUt",rh="tempest_priorityDesktop_3f8Fq",oh="tempest_stackable_heix7",ah="tempest_stackableHead_mKGcA",ch="tempest_stackableRow_qPNqc",B={scroll:Qf,table:Jf,th:Yf,td:Xf,tr:Vf,clickable:Zf,alignRight:eh,alignCenter:th,emptyRow:nh,priorityTablet:sh,priorityDesktop:rh,stackable:oh,stackableHead:ah,stackableRow:ch};function pn(e){if(e==="tablet")return B.priorityTablet;if(e==="desktop")return B.priorityDesktop}function Jn({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,pn(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,pn(d.priority),d.className),"data-label":typeof d.header=="string"?d.header:void 0,children:p},d.key)})},n(i,u)))})]})})}const ih="tempest_tablist_WR6ag",lh="tempest_tab_IdDYc",uh="tempest_active_PTNtG",dh="tempest_panel_08i9c",ph="tempest_pill_lGuqn",ot={tablist:ih,tab:lh,active:uh,panel:dh,pill:ph};function mh({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 fh="tempest_wrapper_C0gfg",hh="tempest_label_cWLXP",_h="tempest_required_rDZXE",gh="tempest_textarea_Z-y6g",bh="tempest_error_NWC9f",yh="tempest_helper_gedut",vh="tempest_errorText_ey07q",Be={wrapper:fh,label:hh,required:_h,textarea:gh,error:bh,helper:yh,errorText:vh},xh=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]})}),wh="tempest_timeline_utrkA",jh="tempest_item_T5xdQ",$h="tempest_markerColumn_BMe4d",kh="tempest_marker_kmPV-",Nh="tempest_marker-primary_s9BNB",Sh="tempest_marker-success_areMM",Ch="tempest_marker-warning_rRrS8",Eh="tempest_marker-danger_3GEBk",Th="tempest_marker-neutral_M2mnw",Mh="tempest_line_CwY-N",Rh="tempest_body_KpMJ6",Lh="tempest_row_AX2ti",Dh="tempest_title_DxfAX",Ph="tempest_meta_GU0ih",Ih="tempest_description_f9sxV",J={timeline:wh,item:jh,markerColumn:$h,marker:kh,markerPrimary:Nh,markerSuccess:Sh,markerWarning:Ch,markerDanger:Eh,markerNeutral:Th,line:Mh,body:Rh,row:Lh,title:Dh,meta:Ph,description:Ih};function Ah({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 Fh="tempest_trigger_Dmc5E",Oh="tempest_bubble_TPGHB",Bh="tempest_tempest-tooltip-in_csYeZ",zh="tempest_top_m2tnn",Wh="tempest_bottom_9Twz4",qh="tempest_left_UPdrG",Uh="tempest_right_CV--T",Lt={trigger:Fh,bubble:Oh,tempestTooltipIn:Bh,top:zh,bottom:Wh,left:qh,right:Uh};function Kh({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:Lt.trigger,children:[m,a&&o.jsx("span",{id:i,role:"tooltip",className:w.cn(Lt.bubble,Lt[t]),children:e})]})}const Hh="tempest_container_x4-Qm",Gh="tempest_positionTopRight_gbUCQ",Qh="tempest_positionTopLeft_Z-tMJ",Jh="tempest_positionTopCenter_A4Ze4",Yh="tempest_positionBottomRight_MGo19",Xh="tempest_positionBottomLeft_DpiNe",Vh="tempest_positionBottomCenter_XUdok",Zh="tempest_toast_FLdHz",e_="tempest_tempest-toast-in_E2d-A",t_="tempest_success_Oy694",n_="tempest_warning_84GC8",s_="tempest_error_hrQAA",r_="tempest_info_eq5bQ",o_="tempest_title_-H6R2",a_="tempest_description_-QwfC",c_="tempest_close_i10-s",ee={container:Hh,positionTopRight:Gh,positionTopLeft:Qh,positionTopCenter:Jh,positionBottomRight:Yh,positionBottomLeft:Xh,positionBottomCenter:Vh,toast:Zh,tempestToastIn:e_,success:t_,warning:n_,error:s_,info:r_,title:o_,description:a_,close:c_},Yn=l.createContext(null);function i_(){const e=l.useContext(Yn);if(!e)throw new Error("useToast must be used inside a <ToastProvider>");return e}function l_({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(Yn.Provider,{value:u,children:[e,o.jsx(d_,{toasts:s,onDismiss:c,position:n})]})}function u_(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 d_({toasts:e,onDismiss:t,position:n}){return typeof document>"u"?null:Ve.createPortal(o.jsx("div",{className:w.cn(ee.container,u_(n)),"aria-live":"polite","aria-atomic":"true",children:e.map(s=>o.jsx(p_,{toast:s,onDismiss:t},s.id))}),document.body)}function p_({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(m_,{})})]})}function m_(){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 f_="tempest_scroll_8Giwl",h_="tempest_spacer_P3Pvl",__="tempest_row_Ff0VU",Dt={scroll:f_,spacer:h_,row:__};function g_({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),y=Math.ceil(m/t)+r*2,v=Math.min(e.length,_+y);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 b=_+x,j=a?a(g,b):b;return o.jsx("div",{role:"listitem",className:Dt.row,style:{top:b*t,height:t},children:n(g,b)},j)})})})}const b_="tempest_button_58f9i",y_="tempest_copied_WkLgR",mn={button:b_,copied:y_};function v_({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(mn.button,i&&mn.copied,r),"data-copied":i||void 0,onClick:p,...c,children:n??(i?"Copied":"Copy")})}const x_={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"}`},w_={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`},j_={"pt-BR":x_,en:w_},Ut=1e3,Kt=60*Ut,Ht=60*Kt,ut=24*Ht,fn=7*ut,hn=30*ut,_n=365*ut;function Xn(e,t={}){const{locale:n="pt-BR",now:s=Date.now()}=t,r=j_[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*Ut)return r.justNow;if(d<Kt){const m=Math.round(d/Ut);return u?r.secondsAgo(m):r.inSeconds(m)}if(d<Ht){const m=Math.round(d/Kt);return u?r.minutesAgo(m):r.inMinutes(m)}if(d<ut){const m=Math.round(d/Ht);return u?r.hoursAgo(m):r.inHours(m)}if(d<fn){const m=Math.round(d/ut);return u?r.daysAgo(m):r.inDays(m)}if(d<hn){const m=Math.round(d/fn);return u?r.weeksAgo(m):r.inWeeks(m)}if(d<_n){const m=Math.round(d/hn);return u?r.monthsAgo(m):r.inMonths(m)}const p=Math.round(d/_n);return u?r.yearsAgo(p):r.inYears(p)}function $_({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=Xn(e,{locale:t==="pt"?"pt-BR":"en"});return o.jsx("time",{dateTime:r,...n,children:a})}function k_({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 N_="tempest_clamp_r43C-",S_={clamp:N_};function C_({lines:e=1,className:t,style:n,children:s,...r}){const a={...n,"--tempest-clamp-lines":e};return o.jsx("div",{className:w.cn(S_.clamp,t),style:a,...r,children:s})}const E_="tempest_hidden_k7p-e",T_={hidden:E_};function M_({as:e="span",className:t,children:n,...s}){return l.createElement(e,{className:w.cn(T_.hidden,t),...s},n)}function Vn({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 R_({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 L_({condition:e,wrapper:t,children:n}){return e?t(n):o.jsx(o.Fragment,{children:n})}function D_({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 P_="tempest_errorText_LU3jn",I_={errorText:P_};function A_({children:e,className:t,...n}){return e==null||e===!1||e===""?null:o.jsx("p",{role:"alert",className:w.cn(I_.errorText,t),...n,children:e})}const F_="tempest_image_Zq9Zs",O_={image:F_};function B_({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(O_.image,r),onError:m=>{t&&!d&&i!==t&&(p(!0),u(t)),a?.(m)},...c})}const z_="tempest_list_bAP4Q",W_="tempest_item_oRy5T",gn={list:z_,item:W_};function q_({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(gn.list,r),...a,children:e.map((c,i)=>o.jsx("li",{className:gn.item,children:t(c,i)},n?n(c,i):i))})}const U_="tempest_list_fwIXq",K_="tempest_term_QkQNZ",H_="tempest_description_e1bNN",Pt={list:U_,term:K_,description:H_};function G_({items:e,className:t,...n}){return o.jsx("dl",{className:w.cn(Pt.list,t),...n,children:e.map((s,r)=>o.jsxs(l.Fragment,{children:[o.jsx("dt",{className:Pt.term,children:s.term}),o.jsx("dd",{className:Pt.description,children:s.description})]},r))})}const Q_="tempest_toggle_kmzmH",J_="tempest_outline_aFbzy",Y_="tempest_pressed_hX319",X_="tempest_sm_JTqaB",V_="tempest_md_QfS4K",Z_="tempest_lg_ajzsM",ht={toggle:Q_,outline:J_,pressed:Y_,sm:X_,md:V_,lg:Z_},eg=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),y=f?t:h,v=l.useCallback(g=>{if(u?.(g),g.defaultPrevented)return;const x=!y;f||_(x),s?.(x)},[y,f,u,s]);return o.jsx("button",{ref:m,type:"button","aria-pressed":y,disabled:i,"data-state":y?"on":"off",className:w.cn(ht.toggle,ht[r],ht[a],y&&ht.pressed,c),onClick:v,...p,children:d})}),tg="tempest_group_XZCDJ",ng="tempest_item_B-27E",sg="tempest_selected_OHPVQ",Gt={group:tg,item:ng,selected:sg},Zn=l.createContext(null);function rg(){const e=l.useContext(Zn);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e}function bn(e){return e===void 0?[]:Array.isArray(e)?e:[e]}function og({type:e="single",value:t,defaultValue:n,onValueChange:s,className:r,children:a,...c}){const i=t!==void 0,[u,d]=l.useState(()=>bn(n)),p=i?bn(t):u,m=l.useCallback(_=>{i||d(_),s?.(e==="single"?_[0]??"":_)},[i,s,e]),f=l.useCallback(_=>{const y=p.includes(_);m(e==="single"?y?[]:[_]:y?p.filter(v=>v!==_):[...p,_])},[p,e,m]),h=l.useMemo(()=>({type:e,isSelected:_=>p.includes(_),toggle:f}),[e,p,f]);return o.jsx(Zn.Provider,{value:h,children:o.jsx("div",{role:"group",className:w.cn(Gt.group,r),...c,children:a})})}function ag({value:e,disabled:t,className:n,children:s,...r}){const{isSelected:a,toggle:c}=rg(),i=a(e);return o.jsx("button",{type:"button",role:"button","aria-pressed":i,disabled:t,"data-state":i?"on":"off",className:w.cn(Gt.item,i&&Gt.selected,n),onClick:()=>c(e),...r,children:s})}const cg="tempest_label_RaRvM",ig="tempest_asterisk_1CgE8",yn={label:cg,asterisk:ig},lg=l.forwardRef(function({required:t=!1,className:n,children:s,...r},a){return o.jsxs("label",{ref:a,className:w.cn(yn.label,n),...r,children:[s,t&&o.jsx("span",{className:yn.asterisk,"aria-hidden":!0,children:"*"})]})}),ug="tempest_collapsible_8jmKP",dg="tempest_trigger_ers75",pg="tempest_content_XmUZL",_t={collapsible:ug,trigger:dg,content:pg};function mg({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 y=!h;p||f(y),n?.(y)},[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 fg="tempest_root_OxRHj",hg="tempest_menu_MDn4t",_g="tempest_item_PoiMY",gg="tempest_active_ATcDu",bg="tempest_danger_COgly",yg="tempest_separator_omuCz",Je={root:fg,menu:hg,item:_g,active:gg,danger:bg,separator:yg};function vn(e){return"separator"in e&&e.separator===!0}function vg({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)=>!vn(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 b=f.indexOf(i),j=f[(b+1)%f.length]??-1;u(j),m.current[j]?.focus()}if(x.key==="ArrowUp"){x.preventDefault();const b=f.indexOf(i),j=f[(b-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 y=v=>{v.onSelect?.(),h()};return o.jsxs(o.Fragment,{children:[o.jsx("span",{className:Je.root,onContextMenu:_,children:t}),s&&o.jsx(Vn,{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)=>vn(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:()=>y(v),onMouseEnter:()=>u(g),children:v.label})},`item-${g}`))})})]})}const xg="tempest_root_2KoZA",wg="tempest_trigger_OXsnr",jg="tempest_card_CoGx4",$g="tempest_tempest-hover-card-in_jD85J",kg="tempest_top_AVcQ0",Ng="tempest_bottom_2rLAA",Sg="tempest_left_tqGPt",Cg="tempest_right_9Fe6S",gt={root:xg,trigger:wg,card:jg,tempestHoverCardIn:$g,top:kg,bottom:Ng,left:Sg,right:Cg};function Eg({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 Tg=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function es(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(Tg)??[]).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 Mg="tempest_overlay_drnPW",Rg="tempest_dialog_lPl6k",Lg="tempest_inputRow_KxWoQ",Dg="tempest_searchIcon_8PULr",Pg="tempest_input_D3HQr",Ig="tempest_list_5UzZU",Ag="tempest_group_vLaWy",Fg="tempest_groupHeading_d01fo",Og="tempest_groupList_QFMjK",Bg="tempest_option_doqib",zg="tempest_active_LdCIJ",Wg="tempest_icon_CyCCx",qg="tempest_label_QePT-",Ug="tempest_empty_al68D",W={overlay:Mg,dialog:Rg,inputRow:Lg,searchIcon:Dg,input:Pg,list:Ig,group:Ag,groupHeading:Fg,groupList:Og,option:Bg,active:zg,icon:Wg,label:qg,empty:Ug};function Kg(e,t){return t===""||e.label.toLowerCase().includes(t)?!0:(e.keywords??[]).some(n=>n.toLowerCase().includes(t))}function xn(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 Hg({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";es(c,e);const f=l.useMemo(()=>{const g=i.trim().toLowerCase(),x=n.filter(b=>Kg(b,g));return xn(x).flatMap(b=>b.items)},[n,i]),h=l.useMemo(()=>xn(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 y(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(Gg,{}),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:y})]}),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 b=v===d,j=v;return o.jsxs("li",{role:"option","aria-selected":b,className:w.cn(W.option,b&&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 Gg(){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 Qg="tempest_root_cWKqF",Jg={root:Qg},Yg=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(Jg.root,s),style:u,...c,children:a})}),Xg="tempest_root_-Xerf",Vg="tempest_horizontal_3QOMV",Zg="tempest_vertical_6A7lb",eb="tempest_pane_x6yUG",tb="tempest_divider_fhaTB",nb="tempest_handle_eCe1B",ze={root:Xg,horizontal:Vg,vertical:Zg,pane:eb,divider:tb,handle:nb},bt=2;function It(e,t,n){return Math.min(n,Math.max(t,e))}function sb({direction:e="horizontal",defaultSize:t=50,min:n=10,max:s=90,children:r,className:a,...c}){const[i,u]=l.useState(()=>It(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 b=x.getBoundingClientRect(),j=f?b.width:b.height;if(j<=0)return;const M=(f?v-b.left:g-b.top)/j*100;u(It(M,n,s))},[f,n,s]),_=l.useCallback(v=>{v.preventDefault(),v.currentTarget.setPointerCapture(v.pointerId);const x=j=>{h(j.clientX,j.clientY)},b=()=>{window.removeEventListener("pointermove",x),window.removeEventListener("pointerup",b)};window.addEventListener("pointermove",x),window.addEventListener("pointerup",b)},[h]),y=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=>It(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:y,children:o.jsx("span",{className:ze.handle,"aria-hidden":"true"})}),o.jsx("div",{className:ze.pane,style:{flexBasis:`${100-i}%`},children:m})]})}const rb="tempest_root_ObO-Z",ob="tempest_header_5nSJG",ab="tempest_title_Jd3Xb",cb="tempest_nav_4h58I",ib="tempest_weekdays_YzRfx",lb="tempest_grid_nbaFm",ub="tempest_weekday_k-7Vr",db="tempest_day_ao-IC",pb="tempest_outside_HkC-6",mb="tempest_today_p18-m",fb="tempest_selected_C9bTY",Y={root:rb,header:ob,title:ab,nav:cb,weekdays:ib,grid:lb,weekday:ub,day:db,outside:pb,today:mb,selected:fb},hb=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],_b=["January","February","March","April","May","June","July","August","September","October","November","December"],ts=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 wn(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function jn(e,t,n){const s=wt(e).getTime();return!!(t&&s<wt(t).getTime()||n&&s>wt(n).getTime())}function gb(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<ts;d+=1)u.push(Ye(i.getFullYear(),i.getMonth(),i.getDate()+d));return u}function bb({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,[y,v]=l.useState(()=>{const $=s??e??t??new Date;return Ye($.getFullYear(),$.getMonth(),1)}),g=_?Ye(s.getFullYear(),s.getMonth(),1):y,[x,b]=l.useState(null),j=l.useRef(null),S=l.useMemo(()=>wt(new Date),[]),M=l.useMemo(()=>gb(g,i),[g,i]),T=l.useMemo(()=>Array.from({length:7},($,C)=>hb[(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($=>{jn($,a,c)||(n&&n($),p||f($))},[a,c,n,p]),E=l.useCallback($=>{const C=Math.max(0,Math.min(ts-1,$));b(C);const I=j.current;if(!I)return;I.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: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:[_b[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(),L=h?wn($,h):!1,R=wn($,S),q=jn($,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,L&&Y.selected,R&&Y.today),"aria-pressed":L,"aria-selected":L,"aria-current":R?"date":void 0,disabled:q,tabIndex:mt?0:-1,onClick:()=>k($),onKeyDown:Hs=>D(Hs,C),children:$.getDate()},C)})})]})}const yb="tempest_wrapper_KCCs1",vb="tempest_label_N4ak-",xb="tempest_value_-33zj",wb="tempest_field_wFJsg",jb="tempest_track_kaJkL",$b="tempest_fill_tio-b",kb="tempest_input_J48Um",Nb="tempest_helper_yn8VW",Ee={wrapper:yb,label:vb,value:xb,field:wb,track:jb,fill:$b,input:kb,helper:Nb};function Sb({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 Cb="tempest_wrapper_6xZZr",Eb="tempest_label_Jwj7I",Tb="tempest_field_GpA0V",Mb="tempest_disabled_BIKaG",Rb="tempest_chip_Zk0ch",Lb="tempest_chipRemove_R-mNv",Db="tempest_input_SjOXU",Pb="tempest_menu_3xnmo",Ib="tempest_option_lqEl1",Ab="tempest_check_aUM1w",Fb="tempest_active_S9sQ-",Ob="tempest_selected_Rw8yr",Bb="tempest_empty_-5B16",zb="tempest_helper_c7aH3",Wb="tempest_errorText_qZR9s",qb="tempest_error_DIOTW",O={wrapper:Cb,label:Eb,field:Tb,disabled:Mb,chip:Rb,chipRemove:Lb,input:Db,menu:Pb,option:Ib,check:Ab,active:Fb,selected:Ob,empty:Bb,helper:zb,errorText:Wb,error:qb};function Ub(e,t){return t?e.label.toLowerCase().includes(t.toLowerCase()):!0}function Kb({options:e,value:t,onChange:n,label:s,placeholder:r="Selecione",helperText:a,error:c,disabled:i,maxItems:u,filter:d=Ub,emptyMessage:p="Nenhuma opção encontrada",className:m}){const f=l.useId(),h=l.useRef(null),_=l.useRef(null),[y,v]=l.useState(!1),[g,x]=l.useState(""),[b,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(!y)return;const $=C=>{h.current&&!h.current.contains(C.target)&&(v(!1),x(""))};return window.addEventListener("mousedown",$),()=>window.removeEventListener("mousedown",$)},[y]);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[b];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":y,"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:D})]}),y&&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===b&&O.active,I&&O.selected),onMouseEnter:()=>j(C),onMouseDown:L=>{L.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 Hb="tempest_root_fVC66",Gb="tempest_header_sTdRM",Qb="tempest_headerSpacer_nqeNO",Jb="tempest_nav_7nFJE",Yb="tempest_months_fbwtK",Xb="tempest_month_0WfUc",Vb="tempest_title_OGQrm",Zb="tempest_weekdays_nYTrg",ey="tempest_grid_O0eUF",ty="tempest_weekday_cy-Mz",ny="tempest_day_-V6FX",sy="tempest_outside_3otid",ry="tempest_today_gwmhs",oy="tempest_inRange_iQJYA",ay="tempest_selected_DRsBO",cy="tempest_rangeStart_-Oe1u",iy="tempest_rangeEnd_mUaKW",A={root:Hb,header:Gb,headerSpacer:Qb,nav:Jb,months:Yb,month:Xb,title:Vb,weekdays:Zb,grid:ey,weekday:ty,day:ny,outside:sy,today:ry,inRange:oy,selected:ay,rangeStart:cy,rangeEnd:iy},ly=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],$n=["January","February","March","April","May","June","July","August","September","October","November","December"],uy=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 kn(e,t){return it(e.getFullYear(),e.getMonth()+t,1)}function At(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Nn(e,t,n){const s=le(e).getTime();return!!(t&&s<le(t).getTime()||n&&s>le(n).getTime())}function dy(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 py(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:uy},(i,u)=>it(c.getFullYear(),c.getMonth(),c.getDate()+u))}function my({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 b=s??e.start??new Date;return it(b.getFullYear(),b.getMonth(),1)}),[m,f]=l.useState(null),h=l.useMemo(()=>le(new Date),[]),_=l.useMemo(()=>Array.from({length:7},(b,j)=>ly[(j+c)%7]),[c]),y=l.useCallback(b=>{if(Nn(b,r,a))return;const{start:j,end:S}=e;!j||S?t({start:b,end:null}):le(b).getTime()<le(j).getTime()?t({start:b,end:j}):t({start:j,end:b})},[e,t,r,a]),v=l.useCallback(b=>{p(j=>kn(j,b))},[]),g=e.start&&!e.end?m:e.end;function x(b){const{start:j}=e,S=g,M=j?At(b,j):!1,T=S?At(b,S):!1,N=j&&S?dy(b,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)},(b,j)=>{const S=kn(d,j),M=py(S,c);return o.jsxs("div",{className:A.month,children:[o.jsxs("div",{className:A.title,"aria-live":"polite",children:[$n[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=Nn(T,r,a),{selected:D,inRange:$,isStart:C,isEnd:I}=x(T),L=At(T,h);return o.jsx("button",{type:"button",role:"gridcell",className:w.cn(A.day,!k&&A.outside,$&&A.inRange,D&&A.selected,C&&A.rangeStart,I&&A.rangeEnd,L&&A.today),"aria-label":`${$n[T.getMonth()]} ${T.getDate()}, ${T.getFullYear()}`,"aria-selected":D,"aria-current":L?"date":void 0,disabled:E,onClick:()=>y(T),onMouseEnter:()=>f(T),children:T.getDate()},N)})})]},j)})})]})}const fy="tempest_root_Nosqs",hy="tempest_list_v9FNC",_y="tempest_item_9RzZ7",gy="tempest_link_67ULr",by="tempest_trigger_2gBDu",yy="tempest_panel_N2ujp",vy="tempest_subItem_LjtO7",we={root:fy,list:hy,item:_y,link:gy,trigger:by,panel:yy,subItem:vy};function xy({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 y=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":y,"aria-controls":v,onClick:()=>r(g=>g===h?-1:h),onFocus:()=>c(h),children:f.label}),y&&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 wy="tempest_root_PGUO2",jy="tempest_menu_hEVLT",$y="tempest_trigger_ZlZBx",ky="tempest_triggerOpen_Hpfbu",Ny="tempest_panel_6ta6u",Sy="tempest_item_wM-61",Cy="tempest_itemLabel_wXfB2",Ey="tempest_shortcut_qNlmN",Ty="tempest_separator_LfK3t",je={root:wy,menu:jy,trigger:$y,triggerOpen:ky,panel:Ny,item:Sy,itemLabel:Cy,shortcut:Ey,separator:Ty};function My(e){return"separator"in e}function Ry({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,_)=>My(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 Ly="tempest_root_-w3-j",Dy="tempest_viewport_n0hzM",Py="tempest_track_5PA8h",Iy="tempest_slide_fhfjg",Ay="tempest_arrow_S92Lt",Fy="tempest_prev_X8whU",Oy="tempest_next_jBRSz",By="tempest_dots_fL3Hr",zy="tempest_dot_vEB56",Wy="tempest_dotActive_OSSUg",ae={root:Ly,viewport:Dy,track:Py,slide:Iy,arrow:Ay,prev:Fy,next:Oy,dots:By,dot:zy,dotActive:Wy};function qy({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 b=x;b<0?b=t?d-1:0:b>=d&&(b=t?0:d-1),b!==h&&(p||f(b),c?.(b))},[d,t,h,p,c]),y=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,b)=>o.jsx("div",{role:"group","aria-roledescription":"slide","aria-label":`${b+1} of ${d}`,"aria-hidden":b!==h,className:ae.slide,children:x},b))})}),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&&y,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,b)=>o.jsx("button",{type:"button",role:"tab","aria-label":`Go to slide ${b+1}`,"aria-selected":b===h,className:w.cn(ae.dot,b===h&&ae.dotActive),onClick:()=>_(b)},b))})]})}function Uy(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 ns(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 Ky(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 Hy(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 Gy(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 Qy=JSON.stringify,Jy=e=>JSON.parse(e);function Yy(e,t,n={}){const s=n.serialize??Qy,r=n.deserialize??Jy,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 Xy(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 Vy(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 Zy(){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 ev(){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 tv(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 nv(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 sv(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 rv(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 ov(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase();return t==="input"||t==="textarea"||t==="select"?!0:e.isContentEditable}function av(e,t,n={}){const{disabled:s=!1,ignoreInput:r=!0}=n;l.useEffect(()=>{if(s||typeof window>"u")return;const a=c=>{r&&ov(c.target)||rv(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 Sn=["mousemove","mousedown","keydown","touchstart","wheel","scroll"];function cv(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 Sn)window.addEventListener(a,r,{passive:!0});return()=>{clearTimeout(s);for(const a of Sn)window.removeEventListener(a,r)}},[e]),t}function iv(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 lv(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 uv(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 dv(e){const t=l.useRef(e);return Qt(t.current,e)||(t.current=e),t.current}function pv(e){const t=l.useRef(void 0);return l.useEffect(()=>{t.current=e},[e]),t.current}function mv(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 fv(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 hv(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 _v(){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 gv(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 bv(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,y=h.clientY-d;Math.hypot(_,y)>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 yv(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 vv(e=[]){const[t,n]=l.useState(e),s=l.useCallback((...h)=>{n(_=>[..._,...h])},[]),r=l.useCallback((...h)=>{n(_=>[...h,..._])},[]),a=l.useCallback((h,..._)=>{n(y=>[...y.slice(0,h),..._,...y.slice(h)])},[]),c=l.useCallback((...h)=>{const _=new Set(h);n(y=>y.filter((v,g)=>!_.has(g)))},[]),i=l.useCallback(({from:h,to:_})=>{n(y=>{const v=[...y],[g]=v.splice(h,1);return v.splice(_,0,g),v})},[]),u=l.useCallback((h,_)=>{n(y=>y.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 xv(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 wv(e){l.useEffect(()=>{if(typeof document>"u")return;const t=document.title;return document.title=e,()=>{document.title=t}},[e])}function jv(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 $v(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 kv(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 Nv(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 Sv(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 Cv(){const e=l.useRef(!0);return e.current?(e.current=!1,!0):!1}const Ev="tempest_wrapper_iB6ka",Tv="tempest_search_2y-yM",Mv="tempest_sortButton_9p6w4",Rv="tempest_sortIndicator_bZMlH",yt={wrapper:Ev,search:Tv,sortButton:Mv,sortIndicator:Rv};function Lv(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 Dv({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:y}=ns(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]),x=l.useMemo(()=>{if(!f)return g;const N=f.direction==="asc"?1:-1;return[...g].sort((k,E)=>Lv(k[f.key],E[f.key])*N)},[g,f]),b=Math.max(1,Math.ceil(x.length/n));l.useEffect(()=>{_>b&&y(b)},[_,b,y]);const j=Math.min(_,b),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"?" ▲":" ▼":"",D=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: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:w.cn(yt.wrapper,u),...d,children:[s&&o.jsx(Gn,{value:p,onChange:N=>{m(N),y(1)},wrapperClassName:yt.search}),o.jsx(Jn,{columns:T,data:S,rowKey:(N,k)=>c(N,(j-1)*n+k),emptyMessage:i}),b>1&&o.jsx(qn,{page:j,totalPages:b,onPageChange:y,totalItems:x.length})]})}const Pv="tempest_tile_ZpED6",Iv="tempest_interactive_3ICXQ",Av="tempest_selected_dMY11",Fv="tempest_disabled_HnXxf",Ov="tempest_leading_gSuBb",Bv="tempest_trailing_cVd1n",zv="tempest_body_gyEl2",Wv="tempest_title_jWFBN",qv="tempest_subtitle_GUtn7",$e={tile:Pv,interactive:Iv,selected:Av,disabled:Fv,leading:Ov,trailing:Bv,body:zv,title:Wv,subtitle:qv};function Uv({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 Kv="tempest_fab_U3NIL",Hv="tempest_primary_8lnHI",Gv="tempest_surface_ZTMQ4",Qv="tempest_round_ljguw",Jv="tempest_sm_3-rLi",Yv="tempest_md_vOdzW",Xv="tempest_lg_Xc6vE",Vv="tempest_extended_GhPio",Zv="tempest_icon_cZ8Nq",ex="tempest_label_tfoCq",tx="tempest_fixed_Xr8Xa",nx="tempest_bottomRight_bJ8Oo",sx="tempest_bottomLeft_USN6N",me={fab:Kv,primary:Hv,surface:Gv,round:Qv,sm:Jv,md:Yv,lg:Xv,extended:Vv,icon:Zv,label:ex,fixed:tx,bottomRight:nx,bottomLeft:sx};function rx({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(me.fab,me[s],me[r],i?me.extended:me.round,n!=="none"&&me.fixed,n==="bottom-right"&&me.bottomRight,n==="bottom-left"&&me.bottomLeft,a),...c,children:[o.jsx("span",{className:me.icon,children:e}),i&&o.jsx("span",{className:me.label,children:t})]})}const ox="tempest_rail_bvns5",ax="tempest_header_Mikit",cx="tempest_list_rS6XJ",ix="tempest_footer_ojpGC",lx="tempest_item_XEXI9",ux="tempest_active_U3hSU",dx="tempest_iconWrap_iVwlb",px="tempest_icon_-hpb6",mx="tempest_badge_1YxwU",fx="tempest_label_zCKyA",fe={rail:ox,header:ax,list:cx,footer:ix,item:lx,active:ux,iconWrap:dx,icon:px,badge:mx,label:fx};function hx({items:e,value:t,onChange:n,header:s,footer:r,labelVisibility:a="all",className:c,...i}){return o.jsxs("nav",{className:w.cn(fe.rail,c),"aria-label":"Navegação lateral",...i,children:[s!==void 0&&o.jsx("div",{className:fe.header,children:s}),o.jsx("ul",{className:fe.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(fe.item,d&&fe.active),"aria-current":d?"page":void 0,disabled:u.disabled,onClick:()=>n(u.key),children:[o.jsxs("span",{className:fe.iconWrap,children:[u.icon&&o.jsx("span",{className:fe.icon,children:u.icon}),u.badge!==void 0&&o.jsx("span",{className:fe.badge,children:u.badge})]}),p&&o.jsx("span",{className:fe.label,children:u.label})]})},u.key)})}),r!==void 0&&o.jsx("div",{className:fe.footer,children:r})]})}const _x="tempest_wrapper_tFKNC",gx="tempest_label_FUecv",bx="tempest_columns_XMru6",yx="tempest_column_bwotJ",vx="tempest_cellWrapper_xRos3",xx="tempest_cell_eSc7G",wx="tempest_active_6amgd",jx="tempest_helper_ihHGE",$x="tempest_disabled_NDezB",F={wrapper:_x,label:gx,columns:bx,column:yx,cellWrapper:vx,cell:xx,active:wx,helper:jx,disabled:$x};function vt(e){return e.toString().padStart(2,"0")}function kx(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 Nx(e){const t=e%12;return t===0?12:t}function Ft(e,t){const n=e%12;return t==="PM"?n+12:n}function Sx({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(()=>kx(e),[e]),m=d!==null&&d>=12?"PM":"AM",f=l.useMemo(()=>s?Array.from({length:12},(b,j)=>j+1):Array.from({length:24},(b,j)=>j),[s]),h=l.useMemo(()=>{const b=n>0?n:1,j=[];for(let S=0;S<60;S+=b)j.push(S);return j},[n]),_=d===null?null:s?Nx(d):d,y=(b,j)=>{t(`${vt(b)}:${vt(j)}`)},v=b=>{if(c)return;const j=p??0,S=s?Ft(b,m):b;y(S,j)},g=b=>{if(c)return;const j=d??(s?Ft(12,"AM"):0);y(j,b)},x=b=>{if(c)return;const j=_??12,S=p??0;y(Ft(j,b),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(b=>{const j=b===_;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(b),children:s?b:vt(b)})},b)})}),o.jsx("ul",{role:"listbox","aria-label":"Minutos",className:F.column,children:h.map(b=>{const j=b===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(b),children:vt(b)})},b)})}),s&&o.jsx("ul",{role:"listbox","aria-label":"Período",className:F.column,children:["AM","PM"].map(b=>{const j=_!==null&&b===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(b),children:b})},b)})})]}),a&&o.jsx("span",{className:F.helper,children:a})]})}const Cx="tempest_wrapper_vGp-3",Ex="tempest_indicator_S7mV0",Tx="tempest_content_bZdpc",Mx="tempest_dragging_BvUty",xt={wrapper:Cx,indicator:Ex,content:Tx,dragging:Mx};function Rx(e,t){const n=t*1.5;return Math.min(e/2,n)}function Lx({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 b=a.current;if(!b||b.scrollTop>0)return;const j=x.touches[0];j&&(c.current=j.clientY)},h=x=>{if(s||d)return;const b=c.current;if(b===null)return;const j=x.touches[0];if(!j)return;const S=j.clientY-b;if(S<=0){u(0);return}u(Rx(S,n))},_=()=>{c.current=null,u(0)},y=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:y,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(Qn,{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 Dx(e){return new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(e)}function Px(e){const t=typeof e=="string"?new Date(e):e;return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat("pt-BR").format(t)}function Ix(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 ss(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 rs(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 Ax(e){return new Intl.NumberFormat("pt-BR",{style:"percent",minimumFractionDigits:1,maximumFractionDigits:1}).format(e)}const Fx={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 Ox(e){return e.normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function Bx(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 zx(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function Wx(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 qx(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 Ux(e,t,n){return e===1?t:n??`${t}s`}function Kx(e,t){const n={};for(const s of e){const r=t(s);(n[r]??=[]).push(s)}return n}function Hx(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 Gx(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 Qx(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 Jx(e,t){const n={};for(const s of t)Object.prototype.hasOwnProperty.call(e,s)&&(n[s]=e[s]);return n}function Yx(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 os(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]=os(a,r):n[s]=r}return n}function Xx(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 Vx(e){return e!=null}function Zx(e){return typeof e=="string"}function ew(e){return typeof e=="number"&&!Number.isNaN(e)}function tw(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function nw(e,t){throw new Error(t??`Unexpected value: ${String(e)}`)}function sw(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 rw(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 ow(e){let t=!1,n;return(...s)=>(t||(t=!0,n=e(...s)),n)}function aw(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 cw(e){return new Promise(t=>setTimeout(t,e))}function iw(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 Vt(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 St 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 lw(e){return typeof e=="object"&&e!==null&&typeof e.status=="number"&&typeof e.detail=="string"}function Zt(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:uw(n?.get("Retry-After")),body:t}}function uw(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 dw(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 pw(e){return typeof FormData<"u"&&e instanceof FormData}async function Cn(e,t){let n=null;try{n=await e.clone().json()}catch{try{n=await e.text()}catch{n=null}}return new St(Zt(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=pw(d),_={...h?{}:{"Content-Type":"application/json"},...u?{"X-Request-ID":u}:{},...e.headers,...n(),...m},y={...f,headers:_,credentials:e.withCredentials?"include":f.credentials,body:d==null?void 0:h?d:JSON.stringify(d)};return t(dw(e.baseURL,c,p),y)}async function r(c,i={}){const u=e.requestId?e.requestId():Vt();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 Cn(d,u)}else await e.onUnauthorized?.(d);if(!d.ok)throw await Cn(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 mw(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"),Ln=require("lucide-react"),Q=require("@tanstack/react-query"),A=require("react-router-dom"),Ve=require("react-dom"),P=require("./projection-CILVBdpd.cjs"),fe=require("react-hook-form"),Ot=require("zustand"),wt=require("zustand/middleware"),Ws=require("dexie"),qs="tempest_accordion_LVhhv",Ks="tempest_item_7ryVk",Us="tempest_header_WaTdJ",Hs="tempest_trigger_9BYFY",Gs="tempest_chevron_i-HVZ",Qs="tempest_open_98jLY",Js="tempest_panel_Wx50w",Te={accordion:qs,item:Ks,header:Us,trigger:Hs,chevron:Gs,open:Qs,panel:Js};function Ys({items:e,multiple:t=!1,value:n,defaultValue:s=[],onChange:r,className:a}){const i=l.useId(),c=n!==void 0,[u,d]=l.useState(s),p=c?n:u,m=l.useCallback(f=>{const h=p.includes(f),_=t?h?p.filter(v=>v!==f):[...p,f]:h?[]:[f];c||d(_),r?.(_)},[p,t,c,r]);return o.jsx("div",{className:w.cn(Te.accordion,a),children:e.map(f=>{const h=p.includes(f.id),_=`${i}-${f.id}-panel`,v=`${i}-${f.id}-trigger`;return o.jsxs("div",{className:w.cn(Te.item,h&&Te.open),children:[o.jsx("h3",{className:Te.header,children:o.jsxs("button",{type:"button",id:v,className:Te.trigger,"aria-expanded":h,"aria-controls":_,disabled:f.disabled,onClick:()=>m(f.id),children:[o.jsx("span",{children:f.title}),o.jsx(Xs,{className:Te.chevron})]})}),h&&o.jsx("div",{id:_,role:"region","aria-labelledby":v,className:Te.panel,children:f.children})]},f.id)})})}function Xs({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 Vs="tempest_alert_7cYyI",Zs="tempest_content_UXnmZ",er="tempest_title_abGgF",tr="tempest_description_pXPvw",nr="tempest_icon_Zg6SB",sr="tempest_close_narep",rr="tempest_neutral_J7MH1",or="tempest_solid_s-oW5",ar="tempest_outline_v7w9b",ir="tempest_info_9r3r1",cr="tempest_success_1bzoB",lr="tempest_warning_q-j1Q",ur="tempest_danger_CiZkW",ge={alert:Vs,content:Zs,title:er,description:tr,icon:nr,close:sr,neutral:rr,solid:or,outline:ar,info:ir,success:cr,warning:lr,danger:ur};function dr({variant:e="info",appearance:t="soft",title:n,description:s,icon:r,onClose:a,closeLabel:i="Dismiss",className:c,children:u,...d}){return o.jsxs("div",{role:"alert",className:w.cn(ge.alert,ge[e],t==="solid"&&ge.solid,t==="outline"&&ge.outline,c),...d,children:[r&&o.jsx("span",{className:ge.icon,children:r}),o.jsxs("div",{className:ge.content,children:[n&&o.jsx("p",{className:ge.title,children:n}),s&&o.jsx("p",{className:ge.description,children:s}),u]}),a&&o.jsx("button",{type:"button",className:ge.close,onClick:a,"aria-label":i,children:o.jsx(pr,{})})]})}function pr(){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 mr="tempest_bar_SHqWS",fr="tempest_centered_S0CCw",hr="tempest_surface_fusKb",_r="tempest_primary_QcCyN",gr="tempest_transparent_uGrsu",br="tempest_bordered_5M9FZ",yr="tempest_sticky_DStUO",vr="tempest_safeArea_Vo3Bi",xr="tempest_leading_mXv-d",wr="tempest_actions_x7tMx",jr="tempest_title_qaMMQ",$r="tempest_brand_xKt54",kr="tempest_iconBtn_S-BTg",te={bar:mr,centered:fr,surface:hr,primary:_r,transparent:gr,bordered:br,sticky:yr,safeArea:vr,leading:xr,actions:wr,title:jr,brand:$r,iconBtn:kr};function Nr({title:e,leading:t,showBack:n=!1,onBack:s,backLabel:r="Go back",backIcon:a,brand:i,actions:c,centered:u=!1,sticky:d=!0,tone:p="surface",bordered:m=!0,safeArea:f=!0,className:h,..._}){const v=s??(()=>window.history.back()),y=t??o.jsxs(o.Fragment,{children:[n&&o.jsx("button",{type:"button",className:te.iconBtn,onClick:v,"aria-label":r,children:a??o.jsx(Ln.ArrowLeft,{size:22,"aria-hidden":"true"})}),i&&o.jsx("span",{className:te.brand,children:i})]});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:y}),e!=null&&e!==""&&o.jsx("h1",{className:te.title,"aria-live":"polite",children:e}),o.jsx("div",{className:te.actions,children:c})]})}const jt={xs:480,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},Sr=["xs","sm","md","lg","xl","2xl"];function Cr(e){let t="xs";for(const n of Sr)e>=jt[n]&&(t=n);return t}function ze(){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=Cr(e),s=a=>e>=jt[a],r=a=>e<jt[a];return{current:n,width:e,above:s,below:r,isMobile:r("md"),isTablet:s("md")&&r("lg"),isDesktop:s("lg")}}const Er="tempest_shell_-xp0O",Tr="tempest_navbar_liTKV",Mr="tempest_row_PE41P",Rr="tempest_sidebar_wyx-V",Lr="tempest_main_O3GFv",Dr="tempest_footer_IFW4q",Pr="tempest_bottomNav_pKJ1v",Me={shell:Er,navbar:Tr,row:Mr,sidebar:Rr,main:Lr,footer:Dr,bottomNav:Pr};function Ar({navbar:e,sidebar:t,bottomNav:n,footer:s,sidebarBreakpoint:r="md",className:a,children:i,...c}){const d=ze().above(r);return o.jsxs("div",{className:w.cn(Me.shell,a),...c,children:[e&&o.jsx("div",{className:Me.navbar,children:e}),o.jsxs("div",{className:Me.row,children:[t&&d&&o.jsx("div",{className:Me.sidebar,children:t}),o.jsx("main",{className:Me.main,children:i})]}),s&&o.jsx("div",{className:Me.footer,children:s}),n&&!d&&o.jsx("div",{className:Me.bottomNav,children:n})]})}const Ir="tempest_aspect_GnAJt",Fr={aspect:Ir};function Or({ratio:e=16/9,className:t,style:n,children:s,...r}){const a={aspectRatio:String(e),...n};return o.jsx("div",{className:w.cn(Fr.aspect,t),style:a,...r,children:s})}const Br="tempest_avatar_3xMuZ",zr="tempest_image_ieqGp",Wr="tempest_xs_oSaLL",qr="tempest_sm_sZ2bk",Kr="tempest_md_Fdkbz",Ur="tempest_lg_pTTUA",Hr="tempest_xl_mW58F",Gr="tempest_status_ISBnL",Qr="tempest_dot_Wgfo-",Jr="tempest_online_-aWoW",Yr="tempest_offline_-StX3",Xr="tempest_busy_TbwuF",qe={avatar:Br,image:zr,xs:Wr,sm:qr,md:Kr,lg:Ur,xl:Hr,status:Gr,dot:Qr,online:Jr,offline:Yr,busy:Xr};function Vr(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 Zr({src:e,alt:t,name:n="",size:s="md",status:r,className:a,onClick:i}){const[c,u]=l.useState(!1),d=l.useMemo(()=>Vr(n),[n]),p=e&&!c,m=i?"button":void 0,f=i?0:void 0;return o.jsxs("span",{className:w.cn(qe.avatar,qe[s],r&&qe.status,a),role:m,tabIndex:f,onClick:i,onKeyDown:i?h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),i())}: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 eo="tempest_badge_RsuMz",to="tempest_sm_LYsCn",no="tempest_md_4Or8q",so="tempest_lg_Bseje",ro="tempest_square_l63D-",oo="tempest_neutral_lulSm",ao="tempest_solid_0Leug",io="tempest_outline_x06HL",co="tempest_success_u9JiS",lo="tempest_warning_nsGp-",uo="tempest_danger_PD2hz",po="tempest_info_na6DQ",mo="tempest_primary_S0WCS",fo="tempest_dot_i0c-G",Re={badge:eo,sm:to,md:no,lg:so,square:ro,neutral:oo,solid:ao,outline:io,success:co,warning:lo,danger:uo,info:po,primary:mo,dot:fo};function ho({variant:e="neutral",appearance:t="soft",size:n="md",shape:s="pill",dot:r=!1,className:a,children:i,...c}){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),...c,children:[r&&o.jsx("span",{className:Re.dot,"aria-hidden":!0}),i]})}const _o="tempest_banner_oyoWE",go="tempest_info_s2q0P",bo="tempest_success_uLYQ3",yo="tempest_warning_9rua8",vo="tempest_danger_Uzb-6",xo="tempest_icon_vzKmx",wo="tempest_body_-Qm4K",jo="tempest_title_AeTHT",$o="tempest_description_nbyf-",ko="tempest_action_47P8e",No="tempest_close_Iy2oN",Ne={banner:_o,info:go,success:bo,warning:yo,danger:vo,icon:xo,body:wo,title:jo,description:$o,action:ko,close:No};function So({variant:e="info",icon:t,title:n,action:s,dismissible:r=!1,onDismiss:a,className:i,children:c,...u}){const[d,p]=l.useState(!0);return d?o.jsxs("div",{className:w.cn(Ne.banner,Ne[e],i),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}),c&&o.jsx("p",{className:Ne.description,children:c})]}),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 Co="tempest_bar_kp35Q",Eo="tempest_item_XfDIW",To="tempest_active_sK54f",Mo="tempest_iconWrap_yJ20b",Ro="tempest_icon_TAjtI",Lo="tempest_badge_-c3Do",Do="tempest_label_qJj3L",Le={bar:Co,item:Eo,active:To,iconWrap:Mo,icon:Ro,badge:Lo,label:Do};function Po({items:e,value:t,onChange:n,showLabels:s=!0,className:r,...a}){return o.jsx("nav",{className:w.cn(Le.bar,r),"aria-label":"Navegação principal",...a,children:e.map(i=>{const c=i.key===t;return o.jsxs("button",{type:"button",className:w.cn(Le.item,c&&Le.active),"aria-current":c?"page":void 0,disabled:i.disabled,onClick:()=>n(i.key),children:[o.jsxs("span",{className:Le.iconWrap,children:[i.icon&&o.jsx("span",{className:Le.icon,children:i.icon}),i.badge!==void 0&&o.jsx("span",{className:Le.badge,children:i.badge})]}),s&&o.jsx("span",{className:Le.label,children:i.label})]},i.key)})})}const Ao="tempest_root_qXce2",Io="tempest_backdrop_WLqh0",Fo="tempest_sheet_Okz1P",Oo="tempest_handle_GWCoK",Bo="tempest_handleBar_XPPiI",zo="tempest_title_i5Vuc",Wo="tempest_body_bgDhJ",De={root:Ao,backdrop:Io,sheet:Fo,handle:Oo,handleBar:Bo,title:zo,body:Wo};function qo({open:e,onClose:t,title:n,showHandle:s=!0,dismissOnBackdrop:r=!0,dismissOnEsc:a=!0,className:i,children:c,...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,i),...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:c})]})]}),document.body)}const Ko="tempest_nav_H4g6P",Uo="tempest_item_O4g3P",Ho="tempest_link_7WM67",Go="tempest_current_JdlcS",Qo="tempest_separator_zGWyJ",et={nav:Ko,item:Uo,link:Ho,current:Go,separator:Qo};function Jo({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,i=!a&&(s.href||s.onClick);return o.jsxs(l.Fragment,{children:[o.jsx("span",{className:et.item,children:i?o.jsx("a",{href:s.href,onClick:c=>{s.onClick&&(c.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 Yo="tempest_button_2ZuB7",Xo="tempest_primary_s1sM6",Vo="tempest_secondary_R0waJ",Zo="tempest_danger_V4fX8",ea="tempest_success_w6qB6",ta="tempest_ghost_1KINV",na="tempest_soft_c3kzm",sa="tempest_outline_F5jq-",ra="tempest_link_Zt5hw",oa="tempest_xs_cF6m0",aa="tempest_sm_NhG0g",ia="tempest_md_hH4h3",ca="tempest_lg_2plQf",la="tempest_xl_nx4V0",ua="tempest_iconOnly_WCpTS",da="tempest_pill_lx8lt",pa="tempest_fullWidth_36oJT",ma="tempest_loading_EQAt2",fa="tempest_hiddenText_hIiJ2",ha="tempest_spinner_ZExvW",_a="tempest_tempest-spin_UOSVC",be={button:Yo,primary:Xo,secondary:Vo,danger:Zo,success:ea,ghost:ta,soft:na,outline:sa,link:ra,xs:oa,sm:aa,md:ia,lg:ca,xl:la,iconOnly:ua,pill:da,fullWidth:pa,loading:ma,hiddenText:fa,spinner:ha,tempestSpin:_a};function Xe({variant:e="primary",size:t="md",loading:n=!1,fullWidth:s=!1,iconOnly:r=!1,pill:a=!1,leftIcon:i,rightIcon:c,disabled:u,className:d,children:p,...m}){return o.jsxs("button",{className:w.cn(be.button,be[e],be[t],r&&be.iconOnly,a&&be.pill,n&&be.loading,s&&be.fullWidth,d),disabled:u||n,...m,children:[n&&o.jsx("span",{className:be.spinner,"aria-hidden":!0,children:o.jsx(ga,{})}),o.jsxs("span",{className:w.cn(n&&be.hiddenText),children:[i,p,c]})]})}function ga(){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 ba="tempest_card_Cb1o4",ya="tempest_flat_LRpce",va="tempest_raised_WmIqk",xa="tempest_elevated_5VEDw",wa="tempest_interactive_B8Tah",ja="tempest_padded_oOxwN",$a="tempest_flush_aiDZi",ka="tempest_header_PTXf2",Na="tempest_title_mSgoo",Sa="tempest_body_W441Z",Ca="tempest_footer_Mu-JC",ne={card:ba,flat:ya,raised:va,elevated:xa,interactive:wa,padded:ja,flush:$a,header:ka,title:Na,body:Sa,footer:Ca};function Ea({title:e,actions:t,footer:n,flush:s=!1,interactive:r=!1,elevation:a="default",className:i,children:c,...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,i),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:c}):c,n&&o.jsx("footer",{className:ne.footer,children:n})]})}const Ta="tempest_center_Pu1Pf",Ma="tempest_both_53GWn",Ra="tempest_horizontal_94-Bt",La="tempest_vertical_Q7Kyg",nn={center:Ta,both:Ma,horizontal:Ra,vertical:La};function Da({axis:e="both",minHeight:t,fullWidth:n=!0,className:s,style:r,children:a,...i}){const c={...t!==void 0?{minHeight:typeof t=="number"?`${t}px`:t}:null,...n?{width:"100%"}:null,...r};return o.jsx("div",{className:w.cn(nn.center,nn[e],s),style:c,...i,children:a})}const Pa="tempest_wrapper_rpthW",Aa="tempest_disabled_x7-eg",Ia="tempest_input_2kt-h",Fa="tempest_box_OCPee",Oa="tempest_labelWrap_Ktbp0",Ba="tempest_label_cwRtI",za="tempest_description_rMhG1",Pe={wrapper:Pa,disabled:Aa,input:Ia,box:Fa,labelWrap:Oa,label:Ba,description:za},Wa=l.forwardRef(function({label:t,description:n,indeterminate:s,disabled:r,wrapperClassName:a,className:i,...c},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(Pe.wrapper,r&&Pe.disabled,a),children:[o.jsx("input",{ref:p,type:"checkbox",disabled:r,className:w.cn(Pe.input,i),...c}),o.jsx("span",{className:Pe.box,"aria-hidden":!0,children:s?o.jsx(Ka,{}):o.jsx(qa,{})}),(t||n)&&o.jsxs("span",{className:Pe.labelWrap,children:[t&&o.jsx("span",{className:Pe.label,children:t}),n&&o.jsx("span",{className:Pe.description,children:n})]})]})});function qa(){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 Ka(){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 Ua="tempest_wrapper_KR4-F",Ha="tempest_label_Mz-wX",Ga="tempest_field_iIBJw",Qa="tempest_error_O9n-9",Ja="tempest_chip_GEwrc",Ya="tempest_remove_JYDIq",Xa="tempest_input_frJmk",Va="tempest_helper_Yts53",Za="tempest_errorText_llJGq",ye={wrapper:Ua,label:Ha,field:Ga,error:Qa,chip:Ja,remove:Ya,input:Xa,helper:Va,errorText:Za};function ei({value:e,onChange:t,label:n,placeholder:s="Adicionar e pressionar Enter…",helperText:r,error:a,commitKeys:i=["Enter",",","Tab"],normalize:c=!0,className:u}){const[d,p]=l.useState(""),m=l.useRef(null);function f(){const v=c?d.trim().toLowerCase():d.trim();if(v){if(e.includes(v)){p("");return}t([...e,v]),p("")}}function h(v){if(i.includes(v.key)){v.preventDefault(),f();return}v.key==="Backspace"&&!d&&e.length>0&&t(e.slice(0,-1))}function _(v){const y=e.slice();y.splice(v,1),t(y)}return o.jsxs("div",{className:w.cn(ye.wrapper,a&&ye.error,u),children:[n&&o.jsx("label",{className:ye.label,children:n}),o.jsxs("div",{className:ye.field,onClick:()=>m.current?.focus(),children:[e.map((v,y)=>o.jsxs("span",{className:ye.chip,children:[v,o.jsx("button",{type:"button",className:ye.remove,"aria-label":`Remover ${v}`,onClick:()=>_(y),children:"×"})]},`${v}-${y}`)),o.jsx("input",{ref:m,className:ye.input,value:d,placeholder:e.length===0?s:"",onChange:v=>p(v.target.value),onKeyDown:h,onBlur:f})]}),a?o.jsx("span",{className:ye.errorText,children:a}):r?o.jsx("span",{className:ye.helper,children:r}):null]})}const ti="tempest_wrapper_TNvle",ni="tempest_label_KVkZO",si="tempest_field_BenH0",ri="tempest_input_-HTv1",oi="tempest_caret_jRplQ",ai="tempest_menu_zPQG3",ii="tempest_option_vhhn5",ci="tempest_active_XCgtX",li="tempest_selected_T6nm2",ui="tempest_empty_Ahw5K",di="tempest_helper_OzB7V",pi="tempest_errorText_X18sQ",mi="tempest_error_bnVuM",K={wrapper:ti,label:ni,field:si,input:ri,caret:oi,menu:ai,option:ii,active:ci,selected:li,empty:ui,helper:di,errorText:pi,error:mi};function fi(e,t){return t?e.label.toLowerCase().includes(t.toLowerCase()):!0}function hi({options:e,value:t,onChange:n,label:s,placeholder:r="Selecione",helperText:a,error:i,disabled:c,filter:u=fi,emptyMessage:d="Nenhuma opção encontrada",className:p}){const m=l.useId(),f=l.useRef(null),h=l.useRef(null),[_,v]=l.useState(!1),[y,g]=l.useState(""),[x,b]=l.useState(0),j=l.useMemo(()=>e.find(S=>S.value===t)?.label??"",[e,t]),k=l.useMemo(()=>e.filter(S=>u(S,y)),[e,u,y]),M=l.useCallback(()=>{v(!1),g(""),b(0)},[]),E=l.useCallback(S=>{S.disabled||(n(S.value),M())},[n,M]);l.useEffect(()=>{if(!_)return;const S=T=>{f.current&&!f.current.contains(T.target)&&M()};return window.addEventListener("mousedown",S),()=>window.removeEventListener("mousedown",S)},[_,M]);const N=S=>{if(S.key==="ArrowDown")S.preventDefault(),v(!0),b(T=>Math.min(k.length-1,T+1));else if(S.key==="ArrowUp")S.preventDefault(),b(T=>Math.max(0,T-1));else if(S.key==="Enter"){S.preventDefault();const T=k[x];T&&E(T)}else S.key==="Escape"&&M()};return o.jsxs("div",{ref:f,className:w.cn(K.wrapper,i&&K.error,p),children:[s&&o.jsx("label",{htmlFor:m,className:K.label,children:s}),o.jsxs("div",{className:K.field,children:[o.jsx("input",{id:m,ref:h,type:"text",role:"combobox","aria-expanded":_,"aria-controls":`${m}-listbox`,"aria-autocomplete":"list",className:K.input,placeholder:r,disabled:c,value:_?y:j,onFocus:()=>v(!0),onChange:S=>{g(S.target.value),v(!0),b(0)},onKeyDown:N}),o.jsx("span",{className:K.caret,"aria-hidden":!0,children:"▾"})]}),_&&o.jsx("ul",{id:`${m}-listbox`,role:"listbox",className:K.menu,children:k.length===0?o.jsx("li",{className:K.empty,children:d}):k.map((S,T)=>o.jsx("li",{role:"option","aria-selected":S.value===t,className:w.cn(K.option,T===x&&K.active,S.value===t&&K.selected),onMouseEnter:()=>b(T),onMouseDown:D=>{D.preventDefault(),E(S)},children:S.label},S.value))}),i?o.jsx("span",{className:K.errorText,children:i}):a?o.jsx("span",{className:K.helper,children:a}):null]})}const _i="tempest_overlay_dd9h1",gi="tempest_tempest-fade-in_DvgSp",bi="tempest_dialog_ptM-K",yi="tempest_tempest-modal-in_UoxQC",vi="tempest_sm_K5k3W",xi="tempest_md_gvyR7",wi="tempest_lg_BgB1a",ji="tempest_xl_MR-68",$i="tempest_size2xl_-PH9e",ki="tempest_size3xl_iqDwN",Ni="tempest_fullscreen_o84Xi",Si="tempest_fullscreenOnMobile_0bDwe",Ci="tempest_body_lVhql",Ei="tempest_header_ILG9i",Ti="tempest_footer_rro2w",Mi="tempest_title_A5OeE",Ri="tempest_close_-ER1C",V={overlay:_i,tempestFadeIn:gi,dialog:bi,tempestModalIn:yi,sm:vi,md:xi,lg:wi,xl:ji,size2Xl:$i,size3Xl:ki,fullscreen:Ni,fullscreenOnMobile:Si,body:Ci,header:Ei,footer:Ti,title:Mi,close:Ri};function Gt({open:e,onClose:t,title:n,children:s,footer:r,size:a="md",closeOnBackdrop:i=!0,closeOnEsc:c=!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=_=>{c&&_.key==="Escape"&&t()};return window.addEventListener("keydown",h),()=>{document.body.style.overflow=f,window.removeEventListener("keydown",h)}},[e,c,t]),!e||typeof document>"u"?null:Ve.createPortal(o.jsx("div",{className:V.overlay,role:"presentation",onClick:()=>{i&&t()},children:o.jsxs("div",{role:"dialog","aria-modal":"true",className:w.cn(V.dialog,Li(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(Di,{})})]}),o.jsx("div",{className:V.body,children:s}),r&&o.jsx("footer",{className:V.footer,children:r})]})}),document.body)}function Li(e){return e==="2xl"?V.size2xl:e==="3xl"?V.size3xl:V[e]}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"})})}function Dn({open:e,title:t,description:n,confirmLabel:s="Confirmar",cancelLabel:r="Cancelar",variant:a="primary",loading:i=!1,onConfirm:c,onCancel:u}){return o.jsx(Gt,{open:e,onClose:u,title:t,size:"sm",footer:o.jsxs(o.Fragment,{children:[o.jsx(Xe,{variant:"secondary",onClick:u,disabled:i,children:r}),o.jsx(Xe,{variant:a,loading:i,onClick:()=>{c()},children:s})]}),children:n})}const Pi=l.forwardRef(function({value:t,onChange:n,mode:s="date",...r},a){return o.jsx(P.Input,{...r,ref:a,type:s,value:t,onChange:i=>n(i.target.value)})}),Ai="tempest_divider_KSGsi",Ii="tempest_horizontal_pZ05Y",Fi="tempest_bare_elDbS",Oi="tempest_vertical_p-jD4",Bi="tempest_dashed_JWxCU",zi="tempest_alignStart_QAIi1",Wi="tempest_alignEnd_eZDwa",J={divider:Ai,horizontal:Ii,bare:Fi,vertical:Oi,dashed:Bi,alignStart:zi,alignEnd:Wi};function qi({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(J.divider,J.vertical,t==="dashed"&&J.dashed,r),...a}):n?o.jsx("div",{role:"separator","aria-orientation":"horizontal",className:w.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:w.cn(J.divider,J.horizontal,J.bare,t==="dashed"&&J.dashed,r)})}const Ki="tempest_overlay_hcG1G",Ui="tempest_tempest-drawer-overlay_XFbxY",Hi="tempest_panel_wUX0N",Gi="tempest_right_-oX-6",Qi="tempest_tempest-drawer-in-right_pWYHv",Ji="tempest_left_xi3nD",Yi="tempest_tempest-drawer-in-left_o7JSb",Xi="tempest_top_7rGCn",Vi="tempest_tempest-drawer-in-top_kn6AF",Zi="tempest_bottom_zd-25",ec="tempest_tempest-drawer-in-bottom_0x3u7",tc="tempest_handle_5B-TB",nc="tempest_handleTop_7aMf-",sc="tempest_header_sYoP1",rc="tempest_title_LqUOu",oc="tempest_close_tYPhU",ac="tempest_body_aV9FG",ic="tempest_footer_AuvUP",ue={overlay:Ki,tempestDrawerOverlay:Ui,panel:Hi,right:Gi,tempestDrawerInRight:Qi,left:Ji,tempestDrawerInLeft:Yi,top:Xi,tempestDrawerInTop:Vi,bottom:Zi,tempestDrawerInBottom:ec,handle:tc,handleTop:nc,header:sc,title:rc,close:oc,body:ac,footer:ic};function cc({open:e,onClose:t,placement:n="right",title:s,children:r,footer:a,closeOnBackdrop:i=!0,closeOnEsc:c=!0,hideCloseButton:u=!1,className:d,mobilePlacement:p,showHandle:m=!1}){const{isMobile:f}=ze(),h=f&&p?p:n;return l.useEffect(()=>{if(!e)return;const _=document.body.style.overflow;document.body.style.overflow="hidden";const v=y=>{c&&y.key==="Escape"&&t()};return window.addEventListener("keydown",v),()=>{document.body.style.overflow=_,window.removeEventListener("keydown",v)}},[e,c,t]),!e||typeof document>"u"?null:Ve.createPortal(o.jsxs(o.Fragment,{children:[o.jsx("div",{className:ue.overlay,onClick:()=>{i&&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(lc,{})})]}),o.jsx("div",{className:ue.body,children:r}),a&&o.jsx("footer",{className:ue.footer,children:a})]})]}),document.body)}function lc(){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 uc="tempest_root_5ZetV",dc="tempest_menu_-RiRW",pc="tempest_bottomStart_z60h9",mc="tempest_bottomEnd_b1tmU",fc="tempest_topStart_A0em2",hc="tempest_topEnd_cFA5-",_c="tempest_item_T-QPZ",gc="tempest_active_WNqoX",bc="tempest_danger_C0jN3",yc="tempest_separator_RimQa",vc="tempest_label_6yP76",ie={root:uc,menu:dc,bottomStart:pc,bottomEnd:mc,topStart:fc,topEnd:hc,item:_c,active:gc,danger:bc,separator:yc,label:vc};function xc(e){switch(e){case"bottom-end":return ie.bottomEnd;case"top-start":return ie.topStart;case"top-end":return ie.topEnd;default:return ie.bottomStart}}function wc({trigger:e,items:t,placement:n="bottom-start",className:s}){const[r,a]=l.useState(!1),[i,c]=l.useState(-1),u=l.useId(),d=l.useRef(null),p=l.useRef([]),m=t.map((y,g)=>y.type==="item"&&!y.disabled?g:-1).filter(y=>y!==-1),f=l.useCallback(()=>{a(!1),c(-1)},[]);l.useEffect(()=>{if(!r)return;const y=x=>{if(x.key==="Escape"){f();return}if(x.key==="ArrowDown"){x.preventDefault();const b=m.indexOf(i),j=m[(b+1)%m.length]??-1;c(j),p.current[j]?.focus()}if(x.key==="ArrowUp"){x.preventDefault();const b=m.indexOf(i),j=m[(b-1+m.length)%m.length]??-1;c(j),p.current[j]?.focus()}},g=x=>{d.current&&!d.current.contains(x.target)&&f()};return window.addEventListener("keydown",y),window.addEventListener("mousedown",g),()=>{window.removeEventListener("keydown",y),window.removeEventListener("mousedown",g)}},[r,i,m,f]);const h=y=>{e.props.onClick?.(y),a(g=>!g)},_={...e,props:{...e.props,onClick:h,"aria-expanded":r,"aria-controls":u,"aria-haspopup":"menu"}},v=y=>{y.onSelect(),f()};return o.jsxs("span",{ref:d,className:ie.root,children:[_,r&&o.jsx("ul",{id:u,role:"menu",className:w.cn(ie.menu,xc(n),s),children:t.map((y,g)=>y.type==="separator"?o.jsx("li",{role:"separator",className:ie.separator,"aria-hidden":!0},y.id):y.type==="label"?o.jsx("li",{role:"presentation",className:ie.label,children:y.label},y.id):o.jsx("li",{role:"none",children:o.jsxs("button",{ref:x=>{p.current[g]=x},type:"button",role:"menuitem",className:w.cn(ie.item,y.danger&&ie.danger,i===g&&ie.active),disabled:y.disabled,onClick:()=>v(y),onMouseEnter:()=>c(g),children:[y.icon&&o.jsx("span",{"aria-hidden":!0,children:y.icon}),y.label]})},y.id))})]})}const jc="tempest_zone_u04pu",$c="tempest_dragging_uGtl4",kc="tempest_disabled_GTKfV",Nc="tempest_input_qhJ1u",Sc="tempest_prompt_mlpWz",tt={zone:jc,dragging:$c,disabled:kc,input:Nc,prompt:Sc};function Cc({onDrop:e,accept:t,multiple:n=!0,disabled:s=!1,maxSize:r,onReject:a,children:i,className:c}){const u=l.useRef(null),[d,p]=l.useState(!1),m=x=>{if(!x||x.length===0)return;const b=Array.from(x),j=n?b:b.slice(0,1);if(r===void 0){e(j);return}const k=[],M=[];for(const E of j)E.size>r?M.push(E):k.push(E);M.length>0&&a?.(M),k.length>0&&e(k)},f=()=>{s||u.current?.click()},h=x=>{x.preventDefault(),!s&&p(!0)},_=x=>{x.preventDefault()},v=x=>{x.preventDefault(),p(!1)},y=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,c),onClick:f,onKeyDown:g,onDragEnter:h,onDragOver:_,onDragLeave:v,onDrop:y,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=""}}),i??o.jsx("span",{className:tt.prompt,children:"Arraste arquivos aqui ou clique para selecionar"})]})}const Ec="tempest_wrapper_gzyTd",Tc="tempest_icon_qVCyh",Mc="tempest_title_xPfUf",Rc="tempest_description_oWwH1",Lc="tempest_action_dqxw1",nt={wrapper:Ec,icon:Tc,title:Mc,description:Rc,action:Lc};function Dc({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 Pc="tempest_wrapper_luRyF",Ac="tempest_icon_dEdBl",Ic="tempest_title_StutD",Fc="tempest_description_A2XCb",Oc="tempest_action_vm1LC",st={wrapper:Pc,icon:Ac,title:Ic,description:Fc,action:Oc};function Bc({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(zc,{})}),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 zc(){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 Wc="tempest_wrapper_E0qHs",qc="tempest_label_lbMkx",Kc="tempest_dropzone_jqua0",Uc="tempest_active_CG9Uk",Hc="tempest_disabled_WNUUl",Gc="tempest_icon_i9fGH",Qc="tempest_title_bTVFl",Jc="tempest_subtitle_S54OV",Yc="tempest_files_WljYm",Xc="tempest_file_Lp-dR",Vc="tempest_fileMeta_LTnN2",Zc="tempest_remove_jskra",el="tempest_hidden_ReEq6",U={wrapper:Wc,label:qc,dropzone:Kc,active:Uc,disabled:Hc,icon:Gc,title:Qc,subtitle:Jc,files:Yc,file:Xc,fileMeta:Vc,remove:Zc,hidden:el};function tl(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function nl(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 sl({value:e,onChange:t,label:n,accept:s,multiple:r=!1,maxSize:a,onReject:i,disabled:c,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=[],b=[];for(const k of Array.from(g)){if(!nl(k,s)){b.push({file:k,reason:"type"});continue}if(a&&k.size>a){b.push({file:k,reason:"size"});continue}x.push(k)}if(b.length>0&&i?.(b),x.length===0)return;const j=r?[...e,...x]:x.slice(0,1);t(j)}function v(g){g.preventDefault(),f(!1),!c&&g.dataTransfer?.files&&_(g.dataTransfer.files)}function y(g){const x=e.slice();x.splice(g,1),t(x)}return o.jsxs("div",{className:w.cn(U.wrapper,p),children:[n&&o.jsx("label",{className:U.label,children:n}),o.jsxs("div",{className:w.cn(U.dropzone,m&&U.active,c&&U.disabled),role:"button",tabIndex:c?-1:0,onClick:()=>!c&&h.current?.click(),onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),h.current?.click())},onDragEnter:g=>{g.preventDefault(),c||f(!0)},onDragOver:g=>g.preventDefault(),onDragLeave:()=>f(!1),onDrop:v,children:[o.jsx("div",{className:U.icon,"aria-hidden":!0,children:o.jsx(rl,{})}),o.jsx("p",{className:U.title,children:u}),d&&o.jsx("p",{className:U.subtitle,children:d}),o.jsx("input",{ref:h,type:"file",accept:s,multiple:r,disabled:c,className:U.hidden,onChange:g=>{g.target.files&&_(g.target.files),g.target.value=""}})]}),e.length>0&&o.jsx("ul",{className:U.files,children:e.map((g,x)=>o.jsxs("li",{className:U.file,children:[o.jsxs("div",{children:[o.jsx("div",{children:g.name}),o.jsx("div",{className:U.fileMeta,children:tl(g.size)})]}),o.jsx("button",{type:"button","aria-label":`Remover ${g.name}`,className:U.remove,onClick:()=>y(x),children:"×"})]},`${g.name}-${x}`))})]})}function rl(){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 ol="tempest_form_jNBDR",al="tempest_stack_O1Hl-",il="tempest_inline_LBQAv",cl="tempest_grid_-B86T",ll="tempest_section_HGqw3",ul="tempest_sectionHeader_ji9hQ",dl="tempest_sectionTitle_GTPwe",pl="tempest_sectionDescription_KjW7k",ml="tempest_sectionBody_Vp2wz",fl="tempest_row_1EkVR",hl="tempest_actions_hK95I",_l="tempest_start_gXnm3",gl="tempest_center_mKkz4",bl="tempest_end_O3yDQ",yl="tempest_between_tte2z",ce={form:ol,stack:al,inline:il,grid:cl,section:ll,sectionHeader:ul,sectionTitle:dl,sectionDescription:pl,sectionBody:ml,row:fl,actions:hl,start:_l,center:gl,end:bl,between:yl};function Nt(e,t){return e===void 0?`${t*4}px`:typeof e=="number"?`${e*4}px`:e}function Pn(e){return e===void 0?"repeat(2, minmax(0, 1fr))":typeof e=="number"?`repeat(${e}, minmax(0, 1fr))`:e}const vl=l.forwardRef(function({layout:t="stack",columns:n,gap:s,className:r,style:a,children:i,...c},u){const d={gap:Nt(s,4),...t==="grid"?{gridTemplateColumns:Pn(n)}:null,...a};return o.jsx("form",{ref:u,className:w.cn(ce.form,ce[t],r),style:d,...c,children:i})});function xl({title:e,description:t,layout:n="stack",columns:s,gap:r,className:a,style:i,children:c,...u}){const d={gap:Nt(r,4),...n==="grid"?{gridTemplateColumns:Pn(s)}:null};return o.jsxs("section",{className:w.cn(ce.section,a),style:i,...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:w.cn(ce.sectionBody,ce[n]),style:d,children:c})]})}function wl({gap:e,className:t,style:n,children:s,...r}){const a={gap:Nt(e,3),...n};return o.jsx("div",{className:w.cn(ce.row,t),style:a,...r,children:s})}function jl({align:e="end",gap:t,className:n,style:s,children:r,...a}){const i={gap:Nt(t,2),...s};return o.jsx("div",{className:w.cn(ce.actions,ce[e],n),style:i,...a,children:r})}const $l="tempest_container_fJfOt",kl="tempest_sm_k8D4-",Nl="tempest_md_EnpYy",Sl="tempest_lg_UU-Ig",Cl="tempest_xl_2TEWj",El="tempest_full_l8bvG",Tl="tempest_stack_sxR8u",Ml="tempest_vertical_2TMf5",Rl="tempest_horizontal_r7-c-",Ll="tempest_center_EDSAh",Dl="tempest_start_ucQ-K",Pl="tempest_end_pnKlF",Al="tempest_stretch_pX6l7",Il="tempest_justifyStart_lHYsS",Fl="tempest_justifyCenter_JH2m6",Ol="tempest_justifyEnd_EBisT",Bl="tempest_justifyBetween_mAJwT",zl="tempest_wrap_-xxOh",Wl="tempest_grid_o-JIX",Z={container:$l,sm:kl,md:Nl,lg:Sl,xl:Cl,full:El,stack:Tl,vertical:Ml,horizontal:Rl,center:Ll,start:Dl,end:Pl,stretch:Al,justifyStart:Il,justifyCenter:Fl,justifyEnd:Ol,justifyBetween:Bl,wrap:zl,grid:Wl};function ql({size:e="lg",className:t,children:n,...s}){return o.jsx("div",{className:w.cn(Z.container,Z[e],t),...s,children:n})}function Kl(e){return typeof e=="object"&&e!==null&&("mobile"in e||"tablet"in e||"desktop"in e)}function $t(e,t){if(e!==void 0)return Kl(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 An(e){if(e!==void 0)return typeof e=="number"?`${e*4}px`:e}function In(e,t){return e?"mobile":t?"tablet":"desktop"}function Ul({direction:e="vertical",gap:t=2,align:n,justify:s,wrap:r=!1,className:a,style:i,children:c,...u}){const{isMobile:d,isTablet:p}=ze(),m=In(d,p),f=$t(e,m)??"vertical",_={gap:An($t(t,m)),...i},v=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],v,r&&Z.wrap,a),style:_,...u,children:c})}function Hl(e){if(e!==void 0)return typeof e=="number"?`repeat(${e}, minmax(0, 1fr))`:e}function Gl({columns:e=2,gap:t=4,className:n,style:s,children:r,...a}){const{isMobile:i,isTablet:c}=ze(),u=In(i,c),d=Hl($t(e,u)),p=An($t(t,u));return o.jsx("div",{className:w.cn(Z.grid,n),style:{gridTemplateColumns:d,gap:p,...s},...a,children:r})}function sn(){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 Qt(){const[e,t]=l.useState(null),[n,s]=l.useState(!1),[r,a]=l.useState(sn);l.useEffect(()=>{if(typeof window>"u")return;const c=m=>{m.preventDefault(),t(m)},u=()=>{t(null),s(!0),a(!0)},d=window.matchMedia?.("(display-mode: standalone)"),p=()=>a(sn());return window.addEventListener("beforeinstallprompt",c),window.addEventListener("appinstalled",u),d?.addEventListener("change",p),()=>{window.removeEventListener("beforeinstallprompt",c),window.removeEventListener("appinstalled",u),d?.removeEventListener("change",p)}},[]);const i=l.useCallback(async()=>{if(!e)return"unsupported";await e.prompt();const c=await e.userChoice;return t(null),c.outcome==="accepted"&&s(!0),c.outcome},[e]);return{installable:!!e,installed:n,isStandalone:r,prompt:i}}const Ql="tempest_banner_0oCIc",Jl="tempest_icon_izjRL",Yl="tempest_body_9JAQv",Xl="tempest_title_1E50X",Vl="tempest_description_QY25-",Zl="tempest_close_RN6FO",Ke={banner:Ql,icon:Jl,body:Yl,title:Xl,description:Vl,close:Zl};function eu(e){if(!e||typeof window>"u")return!1;try{return window.localStorage.getItem(e)==="1"}catch{return!1}}function tu({title:e="Instale o app",description:t,installLabel:n="Instalar",dismissLabel:s="Dispensar",icon:r,storageKey:a,onResult:i,className:c}){const{installable:u,installed:d,isStandalone:p,prompt:m}=Qt(),[f,h]=l.useState(()=>eu(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(Ke.banner,c),role:"region","aria-label":String(e),children:[r&&o.jsx("span",{className:Ke.icon,children:r}),o.jsxs("div",{className:Ke.body,children:[o.jsx("p",{className:Ke.title,children:e}),t&&o.jsx("p",{className:Ke.description,children:t})]}),o.jsx(Xe,{size:"sm",onClick:async()=>{i?.(await m())},children:n}),o.jsx("button",{type:"button",className:Ke.close,"aria-label":s,onClick:_,children:o.jsx(Ln.X,{size:18,"aria-hidden":!0})})]})}function nu({label:e="Instalar app",onResult:t,...n}){const{installable:s,installed:r,isStandalone:a,prompt:i}=Qt();return!s||r||a?null:o.jsx(Xe,{onClick:async()=>{t?.(await i())},...n,children:e})}const su="tempest_kbd_jgbYx",ru="tempest_sm_9WPWA",ou="tempest_md_BePC0",au="tempest_lg_cBKum",rn={kbd:su,sm:ru,md:ou,lg:au};function iu({size:e="md",className:t,children:n,...s}){return o.jsx("kbd",{className:w.cn(rn.kbd,rn[e],t),...s,children:n})}const cu="tempest_stack_zYzdv",lu={stack:cu},Fn=l.createContext(null);function uu({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))},[]),i=l.useCallback(()=>{n([])},[]),c=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:c,confirm:u,close:a,closeAll:i}),[c,u,a,i]);return o.jsxs(Fn.Provider,{value:d,children:[e,o.jsx("div",{className:lu.stack,children:t.map(p=>p.kind==="content"?o.jsx(du,{entry:p,close:a},p.id):o.jsx(pu,{entry:p,close:a},p.id))})]})}function du({entry:e,close:t}){const{options:n,id:s}=e,r=()=>{n.onClose?.(),t(s)};return o.jsx(Gt,{open:!0,onClose:r,title:n.title,size:n.size,closeOnBackdrop:n.closeOnBackdrop,closeOnEsc:n.closeOnEsc,hideCloseButton:n.hideCloseButton,children:n.children})}function pu({entry:e,close:t}){const{options:n,id:s}=e,[r,a]=l.useState(!1),i=async()=>{try{a(!0),await n.onConfirm?.()}finally{a(!1),t(s)}},c=()=>{n.onCancel?.(),t(s)};return o.jsx(Dn,{open:!0,title:n.title??"",description:n.message,confirmLabel:n.confirmLabel,cancelLabel:n.cancelLabel,variant:n.danger?"danger":"primary",loading:r,onConfirm:i,onCancel:c})}function mu(){const e=l.useContext(Fn);if(e===null)throw new Error("useModals must be used within a <ModalsProvider>");return e}const fu="tempest_navbar_Ey25T",hu="tempest_surface_xyKhM",_u="tempest_primary_w3ft-",gu="tempest_transparent_N1vMR",bu="tempest_bordered_HD49R",yu="tempest_sticky_0XsOs",vu="tempest_logo_O9j3q",xu="tempest_nav_0oisE",wu="tempest_actions_8BNWJ",Ae={navbar:fu,surface:hu,primary:_u,transparent:gu,bordered:bu,sticky:yu,logo:vu,nav:xu,actions:wu};function ju({logo:e,nav:t,actions:n,sticky:s=!0,tone:r="surface",bordered:a=!0,className:i,...c}){return o.jsxs("header",{className:w.cn(Ae.navbar,Ae[r],s&&Ae.sticky,a&&Ae.bordered,i),...c,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 $u="tempest_bar_zxTqx",ku={bar:$u},Nu=300,on=.9,Su=300;function an(e){return e<0?0:e>1?1:e}function Cu(){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()},i=()=>{n!==null&&(clearInterval(n),n=null)},c=()=>{s!==null&&(clearTimeout(s),s=null)},u=h=>{const _=e.value;if(_>=on)return;const v=h??(1-_)*.1+.01;a({value:Math.min(an(_+v),on)})};return{start:()=>{c(),!e.active&&(a({active:!0,value:e.value>0?e.value:.08}),i(),n=setInterval(()=>u(),Nu))},done:()=>{i(),c(),a({value:1,active:!0}),s=setTimeout(()=>{a({active:!1,value:0}),s=null},Su)},set:h=>{c();const _=an(h);a({value:_,active:_<1?!0:e.active})},inc:u,subscribe:h=>(t.add(h),h(e),()=>{t.delete(h)})}}const On=Cu();function Eu({color:e,height:t=3,className:n}){const[s,r]=l.useState({value:0,active:!1});if(l.useEffect(()=>On.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(ku.bar,n),style:a,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(s.value*100)})}const Tu="tempest_page_THNNc",Mu="tempest_padded_bzjoF",Ru="tempest_header_PZEzk",Lu="tempest_headerText_qYXFI",Du="tempest_eyebrow_651RV",Pu="tempest_title_2oGnT",Au="tempest_description_YzmWl",Iu="tempest_actions_-rB3U",Fu="tempest_toolbar_sA7sD",Ou="tempest_content_RCB4b",Bu="tempest_footer_540pQ",se={page:Tu,padded:Mu,header:Ru,headerText:Lu,eyebrow:Du,title:Pu,description:Au,actions:Iu,toolbar:Fu,content:Ou,footer:Bu};function zu({title:e,eyebrow:t,description:n,actions:s,toolbar:r,footer:a,padded:i=!0,className:c,children:u,...d}){const p=e||t||n||s;return o.jsxs("main",{className:w.cn(se.page,i&&se.padded,c),...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 Wu="tempest_wrapper_cRGQm",qu="tempest_controls_fdL-y",Ku="tempest_page_WjG0l",Uu="tempest_active_1kqsJ",Hu="tempest_ellipsis_V294k",Gu="tempest_sizeSelect_ZayTo",Qu="tempest_numeric_ztI0I",Ju="tempest_summary_ZTggV",re={wrapper:Wu,controls:qu,page:Ku,active:Uu,ellipsis:Hu,sizeSelect:Gu,numeric:Qu,summary:Ju};function Yu(e,t,n){const s=n+4;if(t<=s)return Array.from({length:t},(c,u)=>u+1);const r=Math.max(2,e-Math.floor(n/2)),a=Math.min(t-1,r+n-1),i=[1];r>2&&i.push("...");for(let c=r;c<=a;c++)i.push(c);return a<t-1&&i.push("..."),i.push(t),i}function Bn({page:e,totalPages:t,onPageChange:n,pageSize:s,onPageSizeChange:r,pageSizeOptions:a=[10,25,50,100],totalItems:i,siblingCount:c=3,className:u}){const d=l.useMemo(()=>Yu(e,t,c),[e,t,c]);return t<=1&&!r?null:o.jsxs("div",{className:w.cn(re.wrapper,u),children:[o.jsx("div",{className:re.summary,children:typeof i=="number"?`${i} resultado${i===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 Xu="tempest_wrapper_zEU-L",Vu="tempest_label_ps3gD",Zu="tempest_field_7taZG",ed="tempest_input_FWEvb",td="tempest_sm_3-CZz",nd="tempest_md_ReV0O",sd="tempest_lg_DiTiB",rd="tempest_toggle_WNeX9",od="tempest_error_QdIFf",ad="tempest_helper_mBUna",id="tempest_errorText_73Uvv",cd="tempest_strength_i6RaQ",ld="tempest_strengthBar_PAPHR",ud="tempest_strengthLabel_u9QHS",dd="tempest_level0_n6tWv",pd="tempest_level1_FOI93",md="tempest_level2_q5Wii",fd="tempest_level3_BpB53",hd="tempest_level4_vyQ3x",H={wrapper:Xu,label:Vu,field:Zu,input:ed,sm:td,md:nd,lg:sd,toggle:rd,error:od,helper:ad,errorText:id,strength:cd,strengthBar:ld,strengthLabel:ud,level0:dd,level1:pd,level2:md,level3:fd,level4:hd},_d=["Muito fraca","Fraca","Razoável","Forte","Excelente"];function zn(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 gd=l.forwardRef(function({label:t,helperText:n,error:s,size:r="md",showStrength:a=!1,strength:i,strengthLabels:c=_d,toggleLabels:u={show:"Mostrar senha",hide:"Esconder senha"},className:d,value:p,defaultValue:m,...f},h){const[_,v]=l.useState(!1),y=String(p??m??""),g=i??zn(y);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:()=>v(x=>!x),children:_?"🙈":"👁"})]}),a&&o.jsxs("div",{className:w.cn(H.strength,H[`level${g}`]),"aria-label":c[g],children:[o.jsx("div",{className:H.strengthBar,children:o.jsx("span",{style:{width:`${g/4*100}%`}})}),o.jsx("span",{className:H.strengthLabel,children:c[g]})]}),s?o.jsx("span",{className:H.errorText,children:s}):n?o.jsx("span",{className:H.helper,children:n}):null]})}),bd="tempest_wrapper_3WAh7",yd="tempest_label_Hk01i",vd="tempest_cells_URO3v",xd="tempest_cell_fxLzs",wd="tempest_sm_SQM-s",jd="tempest_md_aHCGl",$d="tempest_lg_JpI4A",kd="tempest_error_Kou0o",Nd="tempest_helper_W04iL",Sd="tempest_errorText_h4svq",Se={wrapper:bd,label:yd,cells:vd,cell:xd,sm:wd,md:jd,lg:$d,error:kd,helper:Nd,errorText:Sd},Cd=/[0-9]/,Ed=/[A-Za-z0-9]/,Td=l.forwardRef(function({length:t=6,type:n="numeric",size:s="md",value:r,defaultValue:a,onChange:i,onComplete:c,masked:u=!1,label:d,helperText:p,error:m,disabled:f=!1,autoFocus:h=!1,id:_,className:v},y){const g=l.useId(),x=_??g,b=r!==void 0,[j,k]=l.useState(a??""),M=b?r??"":j,E=Array.from({length:t},(L,R)=>M[R]??""),N=l.useRef([]),S=n==="numeric"?Cd:Ed;l.useEffect(()=>{h&&N.current[0]?.focus()},[h]);const T=L=>{const R=L.slice(0,t);b||k(R),i?.(R),R.length===t&&c?.(R)},D=L=>{const R=Math.max(0,Math.min(t-1,L));N.current[R]?.focus(),N.current[R]?.select()},$=L=>R=>{const W=R.target.value.slice(-1);if(W&&!S.test(W))return;const We=E.slice();We[L]=W,T(We.join("")),W&&D(L+1)},C=L=>R=>{if(R.key==="Backspace"){if(!E[L]&&L>0){R.preventDefault();const W=E.slice();W[L-1]="",T(W.join("")),D(L-1)}}else R.key==="ArrowLeft"?(R.preventDefault(),D(L-1)):R.key==="ArrowRight"&&(R.preventDefault(),D(L+1))},I=L=>{const R=L.clipboardData.getData("text").split("").filter(W=>S.test(W)).join("");R&&(L.preventDefault(),T(R),D(Math.min(t-1,R.length)))};return o.jsxs("div",{ref:y,className:w.cn(Se.wrapper,m&&Se.error,v),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:E.map((L,R)=>o.jsx("input",{ref:W=>{N.current[R]=W},type:u?"password":"text",inputMode:n==="numeric"?"numeric":"text",autoComplete:R===0?"one-time-code":"off",maxLength:1,value:L,disabled:f,className:Se.cell,"aria-label":`Dígito ${R+1}`,"aria-invalid":!!m,onChange:$(R),onKeyDown:C(R),onPaste:I},R))}),m?o.jsx("span",{className:Se.errorText,children:m}):p?o.jsx("span",{className:Se.helper,children:p}):null]})}),Md="tempest_root_vEMon",Rd="tempest_popover_E9K9X",Ld="tempest_tempest-popover-in_W8miP",Dd="tempest_top_TYlrh",Pd="tempest_bottom_wGs70",Ad="tempest_left_h7fCr",Id="tempest_right_--bJW",Ct={root:Md,popover:Rd,tempestPopoverIn:Ld,top:Dd,bottom:Pd,left:Ad,right:Id};function Fd({trigger:e,children:t,placement:n="bottom",open:s,onOpenChange:r,defaultOpen:a=!1,closeOnEsc:i=!0,closeOnOutsideClick:c=!0,className:u}){const d=s!==void 0,[p,m]=l.useState(a),f=d?s:p,h=l.useId(),_=l.useRef(null),v=l.useCallback(x=>{d||m(x),r?.(x)},[d,r]);l.useEffect(()=>{if(!f)return;const x=j=>{i&&j.key==="Escape"&&v(!1)},b=j=>{c&&_.current&&!_.current.contains(j.target)&&v(!1)};return window.addEventListener("keydown",x),window.addEventListener("mousedown",b),()=>{window.removeEventListener("keydown",x),window.removeEventListener("mousedown",b)}},[f,i,c,v]);const y=x=>{e.props.onClick?.(x),v(!f)},g={...e,props:{...e.props,onClick:y,"aria-expanded":f,"aria-controls":h}};return o.jsxs("span",{ref:_,className:Ct.root,children:[g,f&&o.jsx("div",{id:h,role:"dialog",className:w.cn(Ct.popover,Ct[n],u),children:t})]})}const Od="tempest_wrapper_BQek1",Bd="tempest_bar_uC-0x",zd="tempest_fill_vmg7x",Wd="tempest_success_gWJ8U",qd="tempest_warning_DGkPO",Kd="tempest_danger_gfwHh",Ud="tempest_indeterminate_HojUj",Hd="tempest_tempest-progress-loop_0nEdF",Gd="tempest_label_qqHJM",Ue={wrapper:Od,bar:Bd,fill:zd,success:Wd,warning:qd,danger:Kd,indeterminate:Ud,tempestProgressLoop:Hd,label:Gd};function Qd({value:e=0,max:t=100,variant:n="primary",indeterminate:s=!1,showLabel:r=!1,label:a,className:i}){const c=s?0:Math.max(0,Math.min(100,e/t*100));return o.jsxs("div",{className:w.cn(Ue.wrapper,i),children:[(r||a)&&o.jsxs("div",{className:Ue.label,children:[a&&o.jsx("span",{children:a}),r&&!s&&o.jsxs("span",{children:[Math.round(c),"%"]})]}),o.jsx("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":s?void 0:e,className:w.cn(Ue.bar,s&&Ue.indeterminate),children:o.jsx("div",{className:w.cn(Ue.fill,n!=="primary"&&Ue[n]),style:{width:s?void 0:`${c}%`}})})]})}const Jd="tempest_wrapper_P-gFm",Yd="tempest_disabled_0-cna",Xd="tempest_input_7R8ZN",Vd="tempest_dot_P7ejP",Zd="tempest_labelWrap_iQ1HR",ep="tempest_label_vAFIP",tp="tempest_description_bEB8u",np="tempest_group_oi329",sp="tempest_horizontal_1Ovgu",ke={wrapper:Jd,disabled:Yd,input:Xd,dot:Vd,labelWrap:Zd,label:ep,description:tp,group:np,horizontal:sp},Wn=l.createContext(null),rp=l.forwardRef(function({label:t,description:n,value:s,disabled:r,name:a,checked:i,onChange:c,wrapperClassName:u,className:d,...p},m){const f=l.useContext(Wn),h=f?.name??a,_=f?.disabled??r,v=f?f.value===s:i;function y(g){f&&f.onChange?.(s),c?.(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:v,disabled:_,onChange:y,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 op({value:e,defaultValue:t,onChange:n,name:s,disabled:r,horizontal:a=!1,className:i,children:c}){const u=l.useId(),d=s??u,[p,m]=l.useState(t),f=e!==void 0,h=f?e:p;function _(v){f||m(v),n?.(v)}return o.jsx(Wn.Provider,{value:{name:d,value:h,onChange:_,disabled:r},children:o.jsx("div",{role:"radiogroup",className:w.cn(ke.group,a&&ke.horizontal,i),children:c})})}const ap="tempest_wrapper_o1aOo",ip="tempest_label_jaBOA",cp="tempest_value_GKfOu",lp="tempest_field_YxCzt",up="tempest_track_j-2iy",dp="tempest_fill_1pbqj",pp="tempest_input_1MASw",mp="tempest_helper_uqxKu",ve={wrapper:ap,label:ip,value:cp,field:lp,track:up,fill:dp,input:pp,helper:mp};function fp({value:e,onChange:t,min:n=0,max:s=100,step:r=1,label:a,helperText:i,disabled:c=!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]),v=u?.(e)??`${p} – ${m}`,y=l.useCallback(x=>{const b=Math.min(Number(x.target.value),m);t([b,m])},[m,t]),g=l.useCallback(x=>{const b=Math.max(Number(x.target.value),p);t([p,b])},[p,t]);return o.jsxs("div",{className:w.cn(ve.wrapper,d),children:[a&&o.jsxs("div",{className:ve.label,children:[o.jsx("span",{children:a}),o.jsx("span",{className:ve.value,children:v})]}),o.jsxs("div",{className:ve.field,children:[o.jsx("div",{className:ve.track}),o.jsx("div",{className:ve.fill,style:{left:`${h}%`,right:`${100-_}%`}}),o.jsx("input",{type:"range",className:ve.input,min:n,max:s,step:r,value:p,onChange:y,disabled:c,"aria-label":a?`${a} (mínimo)`:"Mínimo"}),o.jsx("input",{type:"range",className:ve.input,min:n,max:s,step:r,value:m,onChange:g,disabled:c,"aria-label":a?`${a} (máximo)`:"Máximo"})]}),i&&o.jsx("span",{className:ve.helper,children:i})]})}const hp="tempest_wrapper_K9Mqa",_p="tempest_star_goIGS",gp="tempest_filled_mMs-d",bp="tempest_disabled_tyUlQ",yp="tempest_readonly_bnKLN",vp="tempest_sm_K7-y9",xp="tempest_md_ex2Tb",wp="tempest_lg_TstLJ",He={wrapper:hp,star:_p,filled:gp,disabled:bp,readonly:yp,sm:vp,md:xp,lg:wp};function jp({value:e,max:t=5,onChange:n,size:s="md",readonly:r=!1,disabled:a=!1,label:i="Avaliação",className:c}){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":i,className:w.cn(He.wrapper,He[s],a&&He.disabled,r&&He.readonly,c),onMouseLeave:()=>d(0),children:Array.from({length:t},(f,h)=>{const _=h+1,v=_<=p;return o.jsx("button",{type:"button",role:"radio","aria-checked":e===_,"aria-label":`${_} ${_===1?"estrela":"estrelas"}`,className:w.cn(He.star,v&&He.filled),disabled:a,onMouseEnter:()=>!r&&!a&&d(_),onClick:()=>m(_),children:o.jsx($p,{filled:v})},_)})})}function $p({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 kp({above:e,below:t,only:n,children:s}){const r=ze();return qn(r.current,e,t,n,r)?s:null}function Np({above:e,below:t,only:n,children:s}){const r=ze();return qn(r.current,e,t,n,r)?null:s}const Sp="tempest_safe_iqDFY",Cp="tempest_inline_V9eMG",Ep="tempest_top_Xse9E",Tp="tempest_right_GZm9b",Mp="tempest_bottom_kkyD7",Rp="tempest_left_Z4Q72",Ge={safe:Sp,inline:Cp,top:Ep,right:Tp,bottom:Mp,left:Rp},Lp=["top","right","bottom","left"];function Dp({edges:e=Lp,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 Pp="tempest_wrapper_dKXJJ",Ap="tempest_input_m0lPc",Ip="tempest_iconLeft_030-U",Fp="tempest_clear_nb6lG",pt={wrapper:Pp,input:Ap,iconLeft:Ip,clear:Fp},Kn=l.forwardRef(function({value:t,onChange:n,onClear:s,wrapperClassName:r,placeholder:a="Buscar...",className:i,...c},u){function d(){n(""),s?.()}return o.jsxs("div",{className:w.cn(pt.wrapper,r),children:[o.jsx("span",{className:pt.iconLeft,"aria-hidden":!0,children:o.jsx(Op,{})}),o.jsx("input",{ref:u,type:"search",value:t,onChange:p=>n(p.target.value),placeholder:a,className:w.cn(pt.input,i),...c}),t&&o.jsx("button",{type:"button",className:pt.clear,"aria-label":"Limpar busca",onClick:d,children:o.jsx(Bp,{})})]})});function Op(){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 Bp(){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 zp="tempest_group_mYyFC",Wp="tempest_fullWidth_unSMm",qp="tempest_segment_cu-EL",Kp="tempest_sm_CfD41",Up="tempest_md_2ixuM",Hp="tempest_lg_2Kt7-",Gp="tempest_active_GmyKg",Qp="tempest_icon_9h6GK",Jp="tempest_label_mS17q",Ie={group:zp,fullWidth:Wp,segment:qp,sm:Kp,md:Up,lg:Hp,active:Gp,icon:Qp,label:Jp};function Yp({options:e,value:t,onChange:n,size:s="md",fullWidth:r=!1,className:a,"aria-label":i,...c}){return o.jsx("div",{role:"radiogroup","aria-label":i,className:w.cn(Ie.group,Ie[s],r&&Ie.fullWidth,a),...c,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(Ie.segment,d&&Ie.active),onClick:()=>n(u.value),children:[u.icon&&o.jsx("span",{className:Ie.icon,children:u.icon}),o.jsx("span",{className:Ie.label,children:u.label})]},u.value)})})}const Xp="tempest_sidebar_UB1qz",Vp="tempest_header_zupoS",Zp="tempest_nav_aLYuL",em="tempest_item_IAjHb",tm="tempest_collapsed_ZbZYA",nm="tempest_active_BgcFy",sm="tempest_icon_UQswn",rm="tempest_label_TPvJ9",om="tempest_badge_xwEZv",am="tempest_footer_TyRyi",de={sidebar:Xp,header:Vp,nav:Zp,item:em,collapsed:tm,active:nm,icon:sm,label:rm,badge:om,footer:am};function im({header:e,items:t,value:n,onChange:s,footer:r,collapsed:a=!1,width:i=240,collapsedWidth:c=64,className:u,style:d,...p}){const m=typeof(a?c:i)=="number"?`${a?c:i}px`:a?c:i;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 cm="tempest_skeleton_CB4uF",lm="tempest_text_-A8IF",um="tempest_circle_DYcl8",Et={skeleton:cm,text:lm,circle:um};function dm({variant:e="rect",width:t,height:n,className:s,style:r}){return o.jsx("span",{"aria-hidden":!0,className:w.cn(Et.skeleton,e==="text"&&Et.text,e==="circle"&&Et.circle,s),style:{width:t,height:n,...r}})}const pm="tempest_spacer_okdOd",mm="tempest_both_85qSF",fm="tempest_x_QiU2B",hm="tempest_y_hTtCp",cn={spacer:pm,both:mm,x:fm,y:hm};function _m({axis:e="both",className:t,...n}){return o.jsx("div",{className:w.cn(cn.spacer,cn[e],t),...n})}const gm="tempest_spinner_GpFZS",bm="tempest_tempest-spinner_wKVCY",ym="tempest_xs_p8BFI",vm="tempest_sm_3sIoD",xm="tempest_md_M2sPj",wm="tempest_lg_IxTw2",jm="tempest_xl_cgwqq",$m="tempest_wrap_Xkv-I",km="tempest_overlay_sVSe9",Nm="tempest_caption_B0ED9",Fe={spinner:gm,tempestSpinner:bm,xs:ym,sm:vm,md:xm,lg:wm,xl:jm,wrap:$m,overlay:km,caption:Nm};function Un({size:e="md",className:t,label:n="Carregando",caption:s,overlay:r=!1}){const a=o.jsx("span",{"aria-hidden":!0,className:w.cn(Fe.spinner,Fe[e])});return!r&&s===void 0?o.jsx("span",{role:"status","aria-label":n,className:w.cn(Fe.spinner,Fe[e],t)}):o.jsxs("div",{role:"status","aria-label":n,"aria-live":"polite",className:w.cn(Fe.wrap,r&&Fe.overlay,t),children:[a,s!==void 0&&o.jsx("span",{className:Fe.caption,children:s})]})}const Sm="tempest_stat_zoo9y",Cm="tempest_header_3UQqq",Em="tempest_icon_zUG3e",Tm="tempest_label_lIH47",Mm="tempest_row_Ifyts",Rm="tempest_value_JBWnr",Lm="tempest_delta_mRVrE",Dm="tempest_up_7qgUO",Pm="tempest_down_3Rq2Z",Am="tempest_flat_R5pZT",Im="tempest_hint_YkTF8",oe={stat:Sm,header:Cm,icon:Em,label:Tm,row:Mm,value:Rm,delta:Lm,up:Dm,down:Pm,flat:Am,hint:Im};function Fm(e){if(typeof e!="string")return;const t=e.trim();if(t.startsWith("+"))return"up";if(t.startsWith("-")||t.startsWith("−"))return"down"}function Om({label:e,value:t,delta:n,trend:s,hint:r,icon:a,className:i,...c}){const u=s??Fm(n);return o.jsxs("div",{className:w.cn(oe.stat,i),...c,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 Bm="tempest_stepper_w3qjQ",zm="tempest_vertical_d4mOs",Wm="tempest_step_s2nqL",qm="tempest_dot_d1bSL",Km="tempest_completed_gcFHM",Um="tempest_active_kL-CH",Hm="tempest_label_8irAI",Gm="tempest_connector_lyeWp",xe={stepper:Bm,vertical:zm,step:Wm,dot:qm,completed:Km,active:Um,label:Hm,connector:Gm};function Qm({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 i=a<t,c=a===t;return o.jsxs(l.Fragment,{children:[o.jsxs("li",{className:w.cn(xe.step,i&&xe.completed,c&&xe.active),"aria-current":c?"step":void 0,children:[o.jsx("span",{className:xe.dot,children:i?"✓":a+1}),o.jsx("span",{className:xe.label,children:r.label})]}),a<e.length-1&&o.jsx("span",{className:w.cn(xe.connector,i&&xe.completed),"aria-hidden":!0})]},a)})})}function Bt(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 Jm(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,i=r===0?0:Math.max(0,t);return`${parseFloat(a.toFixed(i)).toString()} ${n[r]}`}function Ym(e,t="en-US"){return new Intl.NumberFormat(t,{notation:"compact",maximumFractionDigits:1}).format(e)}const Xm="tempest_wrapper_JNjXK",Vm="tempest_label_9XKNm",Zm="tempest_row_cOARX",ef="tempest_sm_RzVSU",tf="tempest_md_pezRm",nf="tempest_lg_kYbIN",sf="tempest_disabled_vqmo2",rf="tempest_btn_xuHhj",of="tempest_value_NEatO",Ce={wrapper:Xm,label:Vm,row:Zm,sm:ef,md:tf,lg:nf,disabled:sf,btn:rf,value:of},af=l.forwardRef(function({value:t,onChange:n,min:s=0,max:r=Number.POSITIVE_INFINITY,step:a=1,size:i="md",disabled:c=!1,label:u,format:d,labels:p={decrement:"Diminuir",increment:"Aumentar"},className:m},f){const h=()=>{c||n(Bt(t-a,s,r))},_=()=>{c||n(Bt(t+a,s,r))},v=d?d(t):String(t),y=!c&&t>s,g=!c&&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[i],c&&Ce.disabled),children:[o.jsx("button",{type:"button",className:Ce.btn,"aria-label":p.decrement,onClick:h,disabled:!y,children:"−"}),o.jsx("span",{className:Ce.value,role:"status","aria-live":"polite",children:v}),o.jsx("button",{type:"button",className:Ce.btn,"aria-label":p.increment,onClick:_,disabled:!g,children:"+"})]})]})}),cf="tempest_wrapper_kudO9",lf="tempest_disabled_2aZ0V",uf="tempest_input_5BPNu",df="tempest_track_7ObdZ",pf="tempest_thumb_-FTeK",mf="tempest_label_LrH7V",Qe={wrapper:cf,disabled:lf,input:uf,track:df,thumb:pf,label:mf},ff=l.forwardRef(function({label:t,disabled:n,wrapperClassName:s,className:r,...a},i){return o.jsxs("label",{className:w.cn(Qe.wrapper,n&&Qe.disabled,s),children:[o.jsx("input",{ref:i,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})]})}),hf="tempest_tag_16VPH",_f="tempest_sm_pzyd5",gf="tempest_md_GL6tQ",bf="tempest_lg_8tgXU",yf="tempest_neutral_jAd-x",vf="tempest_primary_AXKlN",xf="tempest_success_56lz4",wf="tempest_warning_UK7SC",jf="tempest_danger_kJ-yx",$f="tempest_info_hmHE-",kf="tempest_label_ZBPfO",Nf="tempest_remove_UEwgr",rt={tag:hf,sm:_f,md:gf,lg:bf,neutral:yf,primary:vf,success:xf,warning:wf,danger:jf,info:$f,label:kf,remove:Nf};function Sf({variant:e="neutral",size:t="md",onRemove:n,removeLabel:s="Remover",className:r,children:a,...i}){return o.jsxs("span",{className:w.cn(rt.tag,rt[e],rt[t],r),...i,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 Cf="tempest_scroll_unrJp",Ef="tempest_table_Dkosn",Tf="tempest_th_PNuEx",Mf="tempest_td_jv9tA",Rf="tempest_tr_7UG8J",Lf="tempest_clickable_B6Si-",Df="tempest_alignRight_9hY0G",Pf="tempest_alignCenter_YiUQy",Af="tempest_emptyRow_kdMiv",If="tempest_priorityTablet_3alUt",Ff="tempest_priorityDesktop_3f8Fq",Of="tempest_stackable_heix7",Bf="tempest_stackableHead_mKGcA",zf="tempest_stackableRow_qPNqc",z={scroll:Cf,table:Ef,th:Tf,td:Mf,tr:Rf,clickable:Lf,alignRight:Df,alignCenter:Pf,emptyRow:Af,priorityTablet:If,priorityDesktop:Ff,stackable:Of,stackableHead:Bf,stackableRow:zf};function ln(e){if(e==="tablet")return z.priorityTablet;if(e==="desktop")return z.priorityDesktop}function Hn({columns:e,data:t,rowKey:n,onRowClick:s,emptyMessage:r="Nenhum registro encontrado.",className:a,stackOnMobile:i=!1}){return o.jsx("div",{className:w.cn(z.scroll,i&&z.stackable,a),children:o.jsxs("table",{className:z.table,children:[o.jsx("thead",{className:w.cn(i&&z.stackableHead),children:o.jsx("tr",{children:e.map(c=>o.jsx("th",{className:w.cn(z.th,c.align==="right"&&z.alignRight,c.align==="center"&&z.alignCenter,ln(c.priority)),style:{width:c.width},children:c.header},c.key))})}),o.jsx("tbody",{children:t.length===0?o.jsx("tr",{children:o.jsx("td",{className:z.emptyRow,colSpan:e.length,children:r})}):t.map((c,u)=>o.jsx("tr",{className:w.cn(z.tr,s&&z.clickable,i&&z.stackableRow),onClick:s?()=>s(c):void 0,children:e.map(d=>{const p=d.render?d.render(c,u):c[d.key];return o.jsx("td",{className:w.cn(z.td,d.align==="right"&&z.alignRight,d.align==="center"&&z.alignCenter,ln(d.priority),d.className),"data-label":typeof d.header=="string"?d.header:void 0,children:p},d.key)})},n(c,u)))})]})})}const Wf="tempest_tablist_WR6ag",qf="tempest_tab_IdDYc",Kf="tempest_active_PTNtG",Uf="tempest_panel_08i9c",Hf="tempest_pill_lGuqn",ot={tablist:Wf,tab:qf,active:Kf,panel:Uf,pill:Hf};function Gf({items:e,defaultId:t,activeId:n,onChange:s,variant:r="underline",className:a}){const i=e.find(h=>!h.disabled),[c,u]=l.useState(t??i?.id),d=n!==void 0,p=d?n:c,m=e.find(h=>h.id===p)??i;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 Qf="tempest_wrapper_C0gfg",Jf="tempest_label_cWLXP",Yf="tempest_required_rDZXE",Xf="tempest_textarea_Z-y6g",Vf="tempest_error_NWC9f",Zf="tempest_helper_gedut",eh="tempest_errorText_ey07q",Oe={wrapper:Qf,label:Jf,required:Yf,textarea:Xf,error:Vf,helper:Zf,errorText:eh},th=l.forwardRef(function({label:t,helperText:n,error:s,wrapperClassName:r,className:a,id:i,required:c,...u},d){const p=l.useId(),m=i??p;return o.jsxs("div",{className:w.cn(Oe.wrapper,s&&Oe.error,r),children:[t&&o.jsxs("label",{htmlFor:m,className:Oe.label,children:[t,c&&o.jsx("span",{className:Oe.required,children:"*"})]}),o.jsx("textarea",{ref:d,id:m,"aria-invalid":!!s,required:c,className:w.cn(Oe.textarea,a),...u}),s?o.jsx("span",{className:Oe.errorText,children:s}):n?o.jsx("span",{className:Oe.helper,children:n}):null]})}),nh="tempest_timeline_utrkA",sh="tempest_item_T5xdQ",rh="tempest_markerColumn_BMe4d",oh="tempest_marker_kmPV-",ah="tempest_marker-primary_s9BNB",ih="tempest_marker-success_areMM",ch="tempest_marker-warning_rRrS8",lh="tempest_marker-danger_3GEBk",uh="tempest_marker-neutral_M2mnw",dh="tempest_line_CwY-N",ph="tempest_body_KpMJ6",mh="tempest_row_AX2ti",fh="tempest_title_DxfAX",hh="tempest_meta_GU0ih",_h="tempest_description_f9sxV",Y={timeline:nh,item:sh,markerColumn:rh,marker:oh,markerPrimary:ah,markerSuccess:ih,markerWarning:ch,markerDanger:lh,markerNeutral:uh,line:dh,body:ph,row:mh,title:fh,meta:hh,description:_h};function gh({items:e,connector:t=!0,className:n,...s}){return o.jsx("ol",{className:w.cn(Y.timeline,t&&Y.connector,n),...s,children:e.map((r,a)=>{const i=a===e.length-1;return o.jsxs("li",{className:Y.item,children:[o.jsxs("div",{className:Y.markerColumn,children:[o.jsx("span",{className:w.cn(Y.marker,Y[`marker-${r.marker??"primary"}`]),"aria-hidden":"true",children:r.icon}),t&&!i&&o.jsx("span",{className:Y.line,"aria-hidden":"true"})]}),o.jsxs("div",{className:Y.body,children:[o.jsxs("div",{className:Y.row,children:[o.jsx("span",{className:Y.title,children:r.title}),r.meta&&o.jsx("span",{className:Y.meta,children:r.meta})]}),r.description&&o.jsx("p",{className:Y.description,children:r.description})]})]},r.id)})})}const bh="tempest_trigger_Dmc5E",yh="tempest_bubble_TPGHB",vh="tempest_tempest-tooltip-in_csYeZ",xh="tempest_top_m2tnn",wh="tempest_bottom_9Twz4",jh="tempest_left_UPdrG",$h="tempest_right_CV--T",Tt={trigger:bh,bubble:yh,tempestTooltipIn:vh,top:xh,bottom:wh,left:jh,right:$h};function kh({content:e,placement:t="top",children:n,disabled:s=!1,openDelay:r=150}){const[a,i]=l.useState(!1),c=l.useId();let u=null;function d(){s||(u&&clearTimeout(u),u=setTimeout(()=>i(!0),r))}function p(){u&&(clearTimeout(u),u=null),i(!1)}const m=l.cloneElement(n,{onMouseEnter:d,onMouseLeave:p,onFocus:d,onBlur:p,"aria-describedby":a?c:void 0});return o.jsxs("span",{className:Tt.trigger,children:[m,a&&o.jsx("span",{id:c,role:"tooltip",className:w.cn(Tt.bubble,Tt[t]),children:e})]})}const Nh="tempest_container_x4-Qm",Sh="tempest_positionTopRight_gbUCQ",Ch="tempest_positionTopLeft_Z-tMJ",Eh="tempest_positionTopCenter_A4Ze4",Th="tempest_positionBottomRight_MGo19",Mh="tempest_positionBottomLeft_DpiNe",Rh="tempest_positionBottomCenter_XUdok",Lh="tempest_toast_FLdHz",Dh="tempest_tempest-toast-in_E2d-A",Ph="tempest_success_Oy694",Ah="tempest_warning_84GC8",Ih="tempest_error_hrQAA",Fh="tempest_info_eq5bQ",Oh="tempest_title_-H6R2",Bh="tempest_description_-QwfC",zh="tempest_close_i10-s",ee={container:Nh,positionTopRight:Sh,positionTopLeft:Ch,positionTopCenter:Eh,positionBottomRight:Th,positionBottomLeft:Mh,positionBottomCenter:Rh,toast:Lh,tempestToastIn:Dh,success:Ph,warning:Ah,error:Ih,info:Fh,title:Oh,description:Bh,close:zh},Gn=l.createContext(null);function Wh(){const e=l.useContext(Gn);if(!e)throw new Error("useToast must be used inside a <ToastProvider>");return e}function qh({children:e,defaultDuration:t=4e3,position:n="top-right"}){const[s,r]=l.useState([]),a=l.useRef(0),i=l.useCallback(d=>{r(p=>p.filter(m=>m.id!==d))},[]),c=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:c,dismiss:i,success:(d,p)=>c({...p,description:d,variant:"success"}),error:(d,p)=>c({...p,description:d,variant:"error"}),warning:(d,p)=>c({...p,description:d,variant:"warning"}),info:(d,p)=>c({...p,description:d,variant:"info"})}),[c,i]);return o.jsxs(Gn.Provider,{value:u,children:[e,o.jsx(Uh,{toasts:s,onDismiss:i,position:n})]})}function Kh(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 Uh({toasts:e,onDismiss:t,position:n}){return typeof document>"u"?null:Ve.createPortal(o.jsx("div",{className:w.cn(ee.container,Kh(n)),"aria-live":"polite","aria-atomic":"true",children:e.map(s=>o.jsx(Hh,{toast:s,onDismiss:t},s.id))}),document.body)}function Hh({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(Gh,{})})]})}function Gh(){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 Qh="tempest_scroll_8Giwl",Jh="tempest_spacer_P3Pvl",Yh="tempest_row_Ff0VU",Mt={scroll:Qh,spacer:Jh,row:Yh};function Xh({items:e,itemHeight:t,renderItem:n,height:s,overscan:r=4,getKey:a,className:i,style:c}){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),v=Math.ceil(m/t)+r*2,y=Math.min(e.length,_+v);return o.jsx("div",{ref:u,className:w.cn(Mt.scroll,i),style:{height:s,...c},onScroll:g=>p(g.target.scrollTop),role:"list",children:o.jsx("div",{className:Mt.spacer,style:{height:h},children:e.slice(_,y).map((g,x)=>{const b=_+x,j=a?a(g,b):b;return o.jsx("div",{role:"listitem",className:Mt.row,style:{top:b*t,height:t},children:n(g,b)},j)})})})}const Vh="tempest_button_58f9i",Zh="tempest_copied_WkLgR",un={button:Vh,copied:Zh};function e_({value:e,timeout:t=2e3,children:n,onCopied:s,className:r,onClick:a,...i}){const[c,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(un.button,c&&un.copied,r),"data-copied":c||void 0,onClick:p,...i,children:n??(c?"Copied":"Copy")})}const t_={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"}`},n_={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`},s_={"pt-BR":t_,en:n_},zt=1e3,Wt=60*zt,qt=60*Wt,ut=24*qt,dn=7*ut,pn=30*ut,mn=365*ut;function Qn(e,t={}){const{locale:n="pt-BR",now:s=Date.now()}=t,r=s_[n],a=e instanceof Date?e.getTime():new Date(e).getTime(),c=(typeof s=="number"?s:s.getTime())-a,u=c>=0,d=Math.abs(c);if(d<30*zt)return r.justNow;if(d<Wt){const m=Math.round(d/zt);return u?r.secondsAgo(m):r.inSeconds(m)}if(d<qt){const m=Math.round(d/Wt);return u?r.minutesAgo(m):r.inMinutes(m)}if(d<ut){const m=Math.round(d/qt);return u?r.hoursAgo(m):r.inHours(m)}if(d<dn){const m=Math.round(d/ut);return u?r.daysAgo(m):r.inDays(m)}if(d<pn){const m=Math.round(d/dn);return u?r.weeksAgo(m):r.inWeeks(m)}if(d<mn){const m=Math.round(d/pn);return u?r.monthsAgo(m):r.inMonths(m)}const p=Math.round(d/mn);return u?r.yearsAgo(p):r.inYears(p)}function r_({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=Qn(e,{locale:t==="pt"?"pt-BR":"en"});return o.jsx("time",{dateTime:r,...n,children:a})}function o_({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 a_="tempest_clamp_r43C-",i_={clamp:a_};function c_({lines:e=1,className:t,style:n,children:s,...r}){const a={...n,"--tempest-clamp-lines":e};return o.jsx("div",{className:w.cn(i_.clamp,t),style:a,...r,children:s})}const l_="tempest_hidden_k7p-e",u_={hidden:l_};function d_({as:e="span",className:t,children:n,...s}){return l.createElement(e,{className:w.cn(u_.hidden,t),...s},n)}function Jn({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 p_({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(i){const c=s.current,u=i.target;c&&u&&!c.contains(u)&&r.current(i)}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 m_({condition:e,wrapper:t,children:n}){return e?t(n):o.jsx(o.Fragment,{children:n})}function f_({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 h_="tempest_errorText_LU3jn",__={errorText:h_};function g_({children:e,className:t,...n}){return e==null||e===!1||e===""?null:o.jsx("p",{role:"alert",className:w.cn(__.errorText,t),...n,children:e})}const b_="tempest_image_Zq9Zs",y_={image:b_};function v_({src:e,fallback:t,alt:n,lazy:s=!0,className:r,onError:a,...i}){const[c,u]=l.useState(e),[d,p]=l.useState(!1);return o.jsx("img",{src:c,alt:n,loading:s?"lazy":"eager",className:w.cn(y_.image,r),onError:m=>{t&&!d&&c!==t&&(p(!0),u(t)),a?.(m)},...i})}const x_="tempest_list_bAP4Q",w_="tempest_item_oRy5T",fn={list:x_,item:w_};function j_({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(fn.list,r),...a,children:e.map((i,c)=>o.jsx("li",{className:fn.item,children:t(i,c)},n?n(i,c):c))})}const $_="tempest_list_fwIXq",k_="tempest_term_QkQNZ",N_="tempest_description_e1bNN",Rt={list:$_,term:k_,description:N_};function S_({items:e,className:t,...n}){return o.jsx("dl",{className:w.cn(Rt.list,t),...n,children:e.map((s,r)=>o.jsxs(l.Fragment,{children:[o.jsx("dt",{className:Rt.term,children:s.term}),o.jsx("dd",{className:Rt.description,children:s.description})]},r))})}const C_="tempest_toggle_kmzmH",E_="tempest_outline_aFbzy",T_="tempest_pressed_hX319",M_="tempest_sm_JTqaB",R_="tempest_md_QfS4K",L_="tempest_lg_ajzsM",mt={toggle:C_,outline:E_,pressed:T_,sm:M_,md:R_,lg:L_},D_=l.forwardRef(function({pressed:t,defaultPressed:n=!1,onPressedChange:s,size:r="md",variant:a="default",className:i,disabled:c,onClick:u,children:d,...p},m){const f=t!==void 0,[h,_]=l.useState(n),v=f?t:h,y=l.useCallback(g=>{if(u?.(g),g.defaultPrevented)return;const x=!v;f||_(x),s?.(x)},[v,f,u,s]);return o.jsx("button",{ref:m,type:"button","aria-pressed":v,disabled:c,"data-state":v?"on":"off",className:w.cn(mt.toggle,mt[r],mt[a],v&&mt.pressed,i),onClick:y,...p,children:d})}),P_="tempest_group_XZCDJ",A_="tempest_item_B-27E",I_="tempest_selected_OHPVQ",Kt={group:P_,item:A_,selected:I_},Yn=l.createContext(null);function F_(){const e=l.useContext(Yn);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e}function hn(e){return e===void 0?[]:Array.isArray(e)?e:[e]}function O_({type:e="single",value:t,defaultValue:n,onValueChange:s,className:r,children:a,...i}){const c=t!==void 0,[u,d]=l.useState(()=>hn(n)),p=c?hn(t):u,m=l.useCallback(_=>{c||d(_),s?.(e==="single"?_[0]??"":_)},[c,s,e]),f=l.useCallback(_=>{const v=p.includes(_);m(e==="single"?v?[]:[_]:v?p.filter(y=>y!==_):[...p,_])},[p,e,m]),h=l.useMemo(()=>({type:e,isSelected:_=>p.includes(_),toggle:f}),[e,p,f]);return o.jsx(Yn.Provider,{value:h,children:o.jsx("div",{role:"group",className:w.cn(Kt.group,r),...i,children:a})})}function B_({value:e,disabled:t,className:n,children:s,...r}){const{isSelected:a,toggle:i}=F_(),c=a(e);return o.jsx("button",{type:"button",role:"button","aria-pressed":c,disabled:t,"data-state":c?"on":"off",className:w.cn(Kt.item,c&&Kt.selected,n),onClick:()=>i(e),...r,children:s})}const z_="tempest_label_RaRvM",W_="tempest_asterisk_1CgE8",_n={label:z_,asterisk:W_},q_=l.forwardRef(function({required:t=!1,className:n,children:s,...r},a){return o.jsxs("label",{ref:a,className:w.cn(_n.label,n),...r,children:[s,t&&o.jsx("span",{className:_n.asterisk,"aria-hidden":!0,children:"*"})]})}),K_="tempest_collapsible_8jmKP",U_="tempest_trigger_ers75",H_="tempest_content_XmUZL",ft={collapsible:K_,trigger:U_,content:H_};function G_({open:e,defaultOpen:t=!1,onOpenChange:n,trigger:s,className:r,children:a,...i}){const c=l.useId(),u=`${c}-content`,d=`${c}-trigger`,p=e!==void 0,[m,f]=l.useState(t),h=p?e:m,_=l.useCallback(()=>{const v=!h;p||f(v),n?.(v)},[h,p,n]);return o.jsxs("div",{className:w.cn(ft.collapsible,h&&ft.open,r),...i,children:[o.jsx("button",{type:"button",id:d,className:ft.trigger,"aria-expanded":h,"aria-controls":u,onClick:_,children:s}),o.jsx("div",{id:u,role:"region","aria-labelledby":d,hidden:!h,className:ft.content,children:a})]})}const Q_="tempest_root_OxRHj",J_="tempest_menu_MDn4t",Y_="tempest_item_PoiMY",X_="tempest_active_ATcDu",V_="tempest_danger_COgly",Z_="tempest_separator_omuCz",Je={root:Q_,menu:J_,item:Y_,active:X_,danger:V_,separator:Z_};function gn(e){return"separator"in e&&e.separator===!0}function eg({items:e,children:t,className:n}){const[s,r]=l.useState(!1),[a,i]=l.useState({x:0,y:0}),[c,u]=l.useState(-1),d=l.useId(),p=l.useRef(null),m=l.useRef([]),f=e.map((y,g)=>!gn(y)&&!y.disabled?g:-1).filter(y=>y!==-1),h=l.useCallback(()=>{r(!1),u(-1)},[]),_=y=>{y.preventDefault(),i({x:y.clientX,y:y.clientY}),u(-1),r(!0)};l.useEffect(()=>{if(!s)return;const y=x=>{if(x.key==="Escape"){h();return}if(x.key==="ArrowDown"){x.preventDefault();const b=f.indexOf(c),j=f[(b+1)%f.length]??-1;u(j),m.current[j]?.focus()}if(x.key==="ArrowUp"){x.preventDefault();const b=f.indexOf(c),j=f[(b-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",y),window.addEventListener("mousedown",g),()=>{window.removeEventListener("keydown",y),window.removeEventListener("mousedown",g)}},[s,c,f,h]);const v=y=>{y.onSelect?.(),h()};return o.jsxs(o.Fragment,{children:[o.jsx("span",{className:Je.root,onContextMenu:_,children:t}),s&&o.jsx(Jn,{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((y,g)=>gn(y)?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,y.danger&&Je.danger,c===g&&Je.active),disabled:y.disabled,onClick:()=>v(y),onMouseEnter:()=>u(g),children:y.label})},`item-${g}`))})})]})}const tg="tempest_root_2KoZA",ng="tempest_trigger_OXsnr",sg="tempest_card_CoGx4",rg="tempest_tempest-hover-card-in_jD85J",og="tempest_top_AVcQ0",ag="tempest_bottom_2rLAA",ig="tempest_left_tqGPt",cg="tempest_right_9Fe6S",ht={root:tg,trigger:ng,card:sg,tempestHoverCardIn:rg,top:og,bottom:ag,left:ig,right:cg};function lg({trigger:e,children:t,openDelay:n=300,closeDelay:s=150,placement:r="bottom",className:a,...i}){const[c,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:ht.root,onMouseEnter:f,onMouseLeave:h,onFocus:f,onBlur:h,children:[o.jsx("span",{"aria-describedby":c?d:void 0,className:ht.trigger,children:e}),c&&o.jsx("div",{id:d,role:"dialog",className:w.cn(ht.card,ht[r],a),...i,children:t})]})}const ug=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function Xn(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(ug)??[]).filter(c=>{if(c.hasAttribute("aria-hidden"))return!1;const u=typeof window<"u"?window.getComputedStyle(c):null;return!(u&&(u.display==="none"||u.visibility==="hidden"))})}function a(c){if(c.key!=="Tab")return;const u=r();if(u.length===0){c.preventDefault();return}const d=u[0],p=u[u.length-1],m=document.activeElement;c.shiftKey?(m===d||!m||!n?.contains(m))&&(c.preventDefault(),p.focus()):m===p&&(c.preventDefault(),d.focus())}return r()[0]?.focus(),document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a),s?.focus?.()}},[e,t])}const dg="tempest_overlay_drnPW",pg="tempest_dialog_lPl6k",mg="tempest_inputRow_KxWoQ",fg="tempest_searchIcon_8PULr",hg="tempest_input_D3HQr",_g="tempest_list_5UzZU",gg="tempest_group_vLaWy",bg="tempest_groupHeading_d01fo",yg="tempest_groupList_QFMjK",vg="tempest_option_doqib",xg="tempest_active_LdCIJ",wg="tempest_icon_CyCCx",jg="tempest_label_QePT-",$g="tempest_empty_al68D",q={overlay:dg,dialog:pg,inputRow:mg,searchIcon:fg,input:hg,list:_g,group:gg,groupHeading:bg,groupList:yg,option:vg,active:xg,icon:wg,label:jg,empty:$g};function kg(e,t){return t===""||e.label.toLowerCase().includes(t)?!0:(e.keywords??[]).some(n=>n.toLowerCase().includes(t))}function bn(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 Ng({open:e,onOpenChange:t,items:n,placeholder:s="Type a command…",emptyMessage:r="No results",className:a}){const i=l.useRef(null),[c,u]=l.useState(""),[d,p]=l.useState(0),m="tempest-command-list";Xn(i,e);const f=l.useMemo(()=>{const g=c.trim().toLowerCase(),x=n.filter(b=>kg(b,g));return bn(x).flatMap(b=>b.items)},[n,c]),h=l.useMemo(()=>bn(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 v(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 y=-1;return Ve.createPortal(o.jsx("div",{className:q.overlay,role:"presentation",onClick:()=>t(!1),children:o.jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-label":"Command palette",className:w.cn(q.dialog,a),onClick:g=>g.stopPropagation(),children:[o.jsxs("div",{className:q.inputRow,children:[o.jsx(Sg,{}),o.jsx("input",{type:"text",role:"combobox","aria-expanded":"true","aria-controls":m,"aria-autocomplete":"list",autoFocus:!0,className:q.input,placeholder:s,value:c,onChange:g=>u(g.target.value),onKeyDown:v})]}),o.jsx("ul",{id:m,role:"listbox",className:q.list,children:f.length===0?o.jsx("li",{className:q.empty,children:r}):h.map(g=>o.jsxs("li",{className:q.group,children:[g.name&&o.jsx("div",{className:q.groupHeading,children:g.name}),o.jsx("ul",{role:"presentation",className:q.groupList,children:g.items.map(x=>{y+=1;const b=y===d,j=y;return o.jsxs("li",{role:"option","aria-selected":b,className:w.cn(q.option,b&&q.active),onMouseMove:()=>p(j),onClick:()=>_(x),children:[x.icon&&o.jsx("span",{className:q.icon,children:x.icon}),o.jsx("span",{className:q.label,children:x.label})]},x.id)})})]},g.name??"__ungrouped__"))})]})}),document.body)}function Sg(){return o.jsxs("svg",{className:q.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 Cg="tempest_root_cWKqF",Eg={root:Cg},Tg=l.forwardRef(function({maxHeight:t,orientation:n="vertical",className:s,style:r,children:a,...i},c){const u={overflowX:n==="vertical"?"hidden":"auto",overflowY:n==="horizontal"?"hidden":"auto",...t!==void 0?{maxHeight:t}:{},...r};return o.jsx("div",{ref:c,className:w.cn(Eg.root,s),style:u,...i,children:a})}),Mg="tempest_root_-Xerf",Rg="tempest_horizontal_3QOMV",Lg="tempest_vertical_6A7lb",Dg="tempest_pane_x6yUG",Pg="tempest_divider_fhaTB",Ag="tempest_handle_eCe1B",Be={root:Mg,horizontal:Rg,vertical:Lg,pane:Dg,divider:Pg,handle:Ag},_t=2;function Lt(e,t,n){return Math.min(n,Math.max(t,e))}function Ig({direction:e="horizontal",defaultSize:t=50,min:n=10,max:s=90,children:r,className:a,...i}){const[c,u]=l.useState(()=>Lt(t,n,s)),d=l.useRef(null),[p,m]=r,f=e==="horizontal",h=l.useCallback((y,g)=>{const x=d.current;if(!x)return;const b=x.getBoundingClientRect(),j=f?b.width:b.height;if(j<=0)return;const M=(f?y-b.left:g-b.top)/j*100;u(Lt(M,n,s))},[f,n,s]),_=l.useCallback(y=>{y.preventDefault(),y.currentTarget.setPointerCapture(y.pointerId);const x=j=>{h(j.clientX,j.clientY)},b=()=>{window.removeEventListener("pointermove",x),window.removeEventListener("pointerup",b)};window.addEventListener("pointermove",x),window.addEventListener("pointerup",b)},[h]),v=l.useCallback(y=>{let g=0;if(f?y.key==="ArrowRight"?g=_t:y.key==="ArrowLeft"&&(g=-_t):y.key==="ArrowDown"?g=_t:y.key==="ArrowUp"&&(g=-_t),y.key==="Home"){y.preventDefault(),u(n);return}if(y.key==="End"){y.preventDefault(),u(s);return}g!==0&&(y.preventDefault(),u(x=>Lt(x+g,n,s)))},[f,n,s]);return o.jsxs("div",{ref:d,className:w.cn(Be.root,f?Be.horizontal:Be.vertical,a),...i,children:[o.jsx("div",{className:Be.pane,style:{flexBasis:`${c}%`},children:p}),o.jsx("div",{role:"separator","aria-orientation":f?"vertical":"horizontal","aria-valuenow":Math.round(c),"aria-valuemin":n,"aria-valuemax":s,tabIndex:0,className:Be.divider,onPointerDown:_,onKeyDown:v,children:o.jsx("span",{className:Be.handle,"aria-hidden":"true"})}),o.jsx("div",{className:Be.pane,style:{flexBasis:`${100-c}%`},children:m})]})}const Fg="tempest_root_ObO-Z",Og="tempest_header_5nSJG",Bg="tempest_title_Jd3Xb",zg="tempest_nav_4h58I",Wg="tempest_weekdays_YzRfx",qg="tempest_grid_nbaFm",Kg="tempest_weekday_k-7Vr",Ug="tempest_day_ao-IC",Hg="tempest_outside_HkC-6",Gg="tempest_today_p18-m",Qg="tempest_selected_C9bTY",X={root:Fg,header:Og,title:Bg,nav:zg,weekdays:Wg,grid:qg,weekday:Kg,day:Ug,outside:Hg,today:Gg,selected:Qg},Jg=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Yg=["January","February","March","April","May","June","July","August","September","October","November","December"],Vn=42;function Ye(e,t,n){return new Date(e,t,n)}function vt(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function yn(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function vn(e,t,n){const s=vt(e).getTime();return!!(t&&s<vt(t).getTime()||n&&s>vt(n).getTime())}function Xg(e,t){const n=e.getFullYear(),s=e.getMonth(),i=(Ye(n,s,1).getDay()-t+7)%7,c=Ye(n,s,1-i),u=[];for(let d=0;d<Vn;d+=1)u.push(Ye(c.getFullYear(),c.getMonth(),c.getDate()+d));return u}function Vg({value:e,defaultValue:t,onChange:n,month:s,onMonthChange:r,minDate:a,maxDate:i,weekStartsOn:c=0,className:u,...d}){const p=e!==void 0,[m,f]=l.useState(t),h=p?e:m,_=s!==void 0,[v,y]=l.useState(()=>{const $=s??e??t??new Date;return Ye($.getFullYear(),$.getMonth(),1)}),g=_?Ye(s.getFullYear(),s.getMonth(),1):v,[x,b]=l.useState(null),j=l.useRef(null),k=l.useMemo(()=>vt(new Date),[]),M=l.useMemo(()=>Xg(g,c),[g,c]),E=l.useMemo(()=>Array.from({length:7},($,C)=>Jg[(C+c)%7]),[c]),N=l.useCallback($=>{const C=Ye(g.getFullYear(),g.getMonth()+$,1);r&&r(C),_||y(C)},[g,r,_]),S=l.useCallback($=>{vn($,a,i)||(n&&n($),p||f($))},[a,i,n,p]),T=l.useCallback($=>{const C=Math.max(0,Math.min(Vn-1,$));b(C);const I=j.current;if(!I)return;I.querySelectorAll("button[data-day]")[C]?.focus()},[]),D=l.useCallback(($,C)=>{switch($.key){case"ArrowLeft":$.preventDefault(),T(C-1);break;case"ArrowRight":$.preventDefault(),T(C+1);break;case"ArrowUp":$.preventDefault(),T(C-7);break;case"ArrowDown":$.preventDefault(),T(C+7);break;case"Enter":case" ":$.preventDefault(),S(M[C]);break}},[T,S,M]);return o.jsxs("div",{className:w.cn(X.root,u),...d,children:[o.jsxs("div",{className:X.header,children:[o.jsx("button",{type:"button",className:X.nav,"aria-label":"Previous month",onClick:()=>N(-1),children:"‹"}),o.jsxs("span",{className:X.title,"aria-live":"polite",children:[Yg[g.getMonth()]," ",g.getFullYear()]}),o.jsx("button",{type:"button",className:X.nav,"aria-label":"Next month",onClick:()=>N(1),children:"›"})]}),o.jsx("div",{className:X.weekdays,role:"row",children:E.map($=>o.jsx("span",{className:X.weekday,role:"columnheader",children:$},$))}),o.jsx("div",{className:X.grid,role:"grid",ref:j,children:M.map(($,C)=>{const I=$.getMonth()===g.getMonth(),L=h?yn($,h):!1,R=yn($,k),W=vn($,a,i),We=x===null?I&&$.getDate()===1:x===C;return o.jsx("button",{type:"button","data-day":!0,role:"gridcell",className:w.cn(X.day,!I&&X.outside,L&&X.selected,R&&X.today),"aria-pressed":L,"aria-selected":L,"aria-current":R?"date":void 0,disabled:W,tabIndex:We?0:-1,onClick:()=>S($),onKeyDown:_e=>D(_e,C),children:$.getDate()},C)})})]})}const Zg="tempest_wrapper_KCCs1",eb="tempest_label_N4ak-",tb="tempest_value_-33zj",nb="tempest_field_wFJsg",sb="tempest_track_kaJkL",rb="tempest_fill_tio-b",ob="tempest_input_J48Um",ab="tempest_helper_yn8VW",Ee={wrapper:Zg,label:eb,value:tb,field:nb,track:sb,fill:rb,input:ob,helper:ab};function ib({value:e,onChange:t,min:n=0,max:s=100,step:r=1,label:a,helperText:i,disabled:c=!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:c,"aria-label":a??"Slider","aria-valuetext":m})]}),i&&o.jsx("span",{className:Ee.helper,children:i})]})}const cb="tempest_wrapper_6xZZr",lb="tempest_label_Jwj7I",ub="tempest_field_GpA0V",db="tempest_disabled_BIKaG",pb="tempest_chip_Zk0ch",mb="tempest_chipRemove_R-mNv",fb="tempest_input_SjOXU",hb="tempest_menu_3xnmo",_b="tempest_option_lqEl1",gb="tempest_check_aUM1w",bb="tempest_active_S9sQ-",yb="tempest_selected_Rw8yr",vb="tempest_empty_-5B16",xb="tempest_helper_c7aH3",wb="tempest_errorText_qZR9s",jb="tempest_error_DIOTW",B={wrapper:cb,label:lb,field:ub,disabled:db,chip:pb,chipRemove:mb,input:fb,menu:hb,option:_b,check:gb,active:bb,selected:yb,empty:vb,helper:xb,errorText:wb,error:jb};function $b(e,t){return t?e.label.toLowerCase().includes(t.toLowerCase()):!0}function kb({options:e,value:t,onChange:n,label:s,placeholder:r="Selecione",helperText:a,error:i,disabled:c,maxItems:u,filter:d=$b,emptyMessage:p="Nenhuma opção encontrada",className:m}){const f=l.useId(),h=l.useRef(null),_=l.useRef(null),[v,y]=l.useState(!1),[g,x]=l.useState(""),[b,j]=l.useState(0),k=l.useMemo(()=>new Set(t),[t]),M=l.useMemo(()=>t.map($=>e.find(C=>C.value===$)).filter($=>!!$),[t,e]),E=l.useMemo(()=>e.filter($=>d($,g)),[e,d,g]),N=u!==void 0&&t.length>=u,S=l.useCallback($=>{if(!$.disabled){if(k.has($.value))n(t.filter(C=>C!==$.value));else{if(N)return;n([...t,$.value])}x(""),_.current?.focus()}},[k,n,t,N]),T=l.useCallback($=>{n(t.filter(C=>C!==$))},[n,t]);l.useEffect(()=>{if(!v)return;const $=C=>{h.current&&!h.current.contains(C.target)&&(y(!1),x(""))};return window.addEventListener("mousedown",$),()=>window.removeEventListener("mousedown",$)},[v]);const D=$=>{if($.key==="ArrowDown")$.preventDefault(),y(!0),j(C=>Math.min(E.length-1,C+1));else if($.key==="ArrowUp")$.preventDefault(),j(C=>Math.max(0,C-1));else if($.key==="Enter"){$.preventDefault();const C=E[b];C&&S(C)}else $.key==="Escape"?(y(!1),x("")):$.key==="Backspace"&&g===""&&t.length>0&&T(t[t.length-1])};return o.jsxs("div",{ref:h,className:w.cn(B.wrapper,i&&B.error,m),children:[s&&o.jsx("label",{htmlFor:f,className:B.label,children:s}),o.jsxs("div",{className:w.cn(B.field,c&&B.disabled),onMouseDown:$=>{c||$.target===$.currentTarget&&($.preventDefault(),_.current?.focus(),y(!0))},children:[M.map($=>o.jsxs("span",{className:B.chip,children:[$.label,o.jsx("button",{type:"button",className:B.chipRemove,"aria-label":`Remover ${$.label}`,disabled:c,onMouseDown:C=>{C.preventDefault(),T($.value)},children:"×"})]},$.value)),o.jsx("input",{id:f,ref:_,type:"text",role:"combobox","aria-expanded":v,"aria-controls":`${f}-listbox`,"aria-autocomplete":"list",className:B.input,placeholder:t.length===0?r:"",disabled:c,value:g,onFocus:()=>y(!0),onChange:$=>{x($.target.value),y(!0),j(0)},onKeyDown:D})]}),v&&o.jsx("ul",{id:`${f}-listbox`,role:"listbox","aria-multiselectable":!0,className:B.menu,children:E.length===0?o.jsx("li",{className:B.empty,children:p}):E.map(($,C)=>{const I=k.has($.value);return o.jsxs("li",{role:"option","aria-selected":I,"aria-disabled":$.disabled||!I&&N,className:w.cn(B.option,C===b&&B.active,I&&B.selected),onMouseEnter:()=>j(C),onMouseDown:L=>{L.preventDefault(),S($)},children:[o.jsx("span",{className:B.check,"aria-hidden":!0,children:I?"✓":""}),$.label]},$.value)})}),i?o.jsx("span",{className:B.errorText,children:i}):a?o.jsx("span",{className:B.helper,children:a}):null]})}const Nb="tempest_root_fVC66",Sb="tempest_header_sTdRM",Cb="tempest_headerSpacer_nqeNO",Eb="tempest_nav_7nFJE",Tb="tempest_months_fbwtK",Mb="tempest_month_0WfUc",Rb="tempest_title_OGQrm",Lb="tempest_weekdays_nYTrg",Db="tempest_grid_O0eUF",Pb="tempest_weekday_cy-Mz",Ab="tempest_day_-V6FX",Ib="tempest_outside_3otid",Fb="tempest_today_gwmhs",Ob="tempest_inRange_iQJYA",Bb="tempest_selected_DRsBO",zb="tempest_rangeStart_-Oe1u",Wb="tempest_rangeEnd_mUaKW",F={root:Nb,header:Sb,headerSpacer:Cb,nav:Eb,months:Tb,month:Mb,title:Rb,weekdays:Lb,grid:Db,weekday:Pb,day:Ab,outside:Ib,today:Fb,inRange:Ob,selected:Bb,rangeStart:zb,rangeEnd:Wb},qb=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],xn=["January","February","March","April","May","June","July","August","September","October","November","December"],Kb=42;function ct(e,t,n){return new Date(e,t,n)}function le(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function wn(e,t){return ct(e.getFullYear(),e.getMonth()+t,1)}function Dt(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function jn(e,t,n){const s=le(e).getTime();return!!(t&&s<le(t).getTime()||n&&s>le(n).getTime())}function Ub(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 Hb(e,t){const n=e.getFullYear(),s=e.getMonth(),a=(ct(n,s,1).getDay()-t+7)%7,i=ct(n,s,1-a);return Array.from({length:Kb},(c,u)=>ct(i.getFullYear(),i.getMonth(),i.getDate()+u))}function Gb({value:e,onChange:t,numberOfMonths:n=2,defaultMonth:s,minDate:r,maxDate:a,weekStartsOn:i=0,className:c,...u}){const[d,p]=l.useState(()=>{const b=s??e.start??new Date;return ct(b.getFullYear(),b.getMonth(),1)}),[m,f]=l.useState(null),h=l.useMemo(()=>le(new Date),[]),_=l.useMemo(()=>Array.from({length:7},(b,j)=>qb[(j+i)%7]),[i]),v=l.useCallback(b=>{if(jn(b,r,a))return;const{start:j,end:k}=e;!j||k?t({start:b,end:null}):le(b).getTime()<le(j).getTime()?t({start:b,end:j}):t({start:j,end:b})},[e,t,r,a]),y=l.useCallback(b=>{p(j=>wn(j,b))},[]),g=e.start&&!e.end?m:e.end;function x(b){const{start:j}=e,k=g,M=j?Dt(b,j):!1,E=k?Dt(b,k):!1,N=j&&k?Ub(b,j,k):!1;return{selected:M||E,inRange:N,isStart:M,isEnd:E}}return o.jsxs("div",{className:w.cn(F.root,c),...u,children:[o.jsxs("div",{className:F.header,children:[o.jsx("button",{type:"button",className:F.nav,"aria-label":"Previous month",onClick:()=>y(-1),children:"‹"}),o.jsx("span",{className:F.headerSpacer,"aria-hidden":!0}),o.jsx("button",{type:"button",className:F.nav,"aria-label":"Next month",onClick:()=>y(1),children:"›"})]}),o.jsx("div",{className:F.months,onMouseLeave:()=>f(null),children:Array.from({length:Math.max(1,n)},(b,j)=>{const k=wn(d,j),M=Hb(k,i);return o.jsxs("div",{className:F.month,children:[o.jsxs("div",{className:F.title,"aria-live":"polite",children:[xn[k.getMonth()]," ",k.getFullYear()]}),o.jsx("div",{className:F.weekdays,role:"row",children:_.map(E=>o.jsx("span",{className:F.weekday,role:"columnheader",children:E},E))}),o.jsx("div",{className:F.grid,role:"grid",children:M.map((E,N)=>{const S=E.getMonth()===k.getMonth(),T=jn(E,r,a),{selected:D,inRange:$,isStart:C,isEnd:I}=x(E),L=Dt(E,h);return o.jsx("button",{type:"button",role:"gridcell",className:w.cn(F.day,!S&&F.outside,$&&F.inRange,D&&F.selected,C&&F.rangeStart,I&&F.rangeEnd,L&&F.today),"aria-label":`${xn[E.getMonth()]} ${E.getDate()}, ${E.getFullYear()}`,"aria-selected":D,"aria-current":L?"date":void 0,disabled:T,onClick:()=>v(E),onMouseEnter:()=>f(E),children:E.getDate()},N)})})]},j)})})]})}const Qb="tempest_root_Nosqs",Jb="tempest_list_v9FNC",Yb="tempest_item_9RzZ7",Xb="tempest_link_67ULr",Vb="tempest_trigger_2gBDu",Zb="tempest_panel_N2ujp",ey="tempest_subItem_LjtO7",we={root:Qb,list:Jb,item:Yb,link:Xb,trigger:Vb,panel:Zb,subItem:ey};function ty({items:e,className:t,...n}){const[s,r]=l.useState(-1),[a,i]=l.useState(-1),c=l.useId(),u=l.useRef(null),d=l.useCallback(()=>{r(-1),i(-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 v=p===h,y=`${c}-panel-${h}`;return o.jsxs("li",{className:we.item,onMouseEnter:()=>i(h),onMouseLeave:()=>i(g=>g===h?-1:g),children:[o.jsx("button",{type:"button",className:we.trigger,"aria-haspopup":"menu","aria-expanded":v,"aria-controls":y,onClick:()=>r(g=>g===h?-1:h),onFocus:()=>i(h),children:f.label}),v&&o.jsx("ul",{id:y,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 ny="tempest_root_PGUO2",sy="tempest_menu_hEVLT",ry="tempest_trigger_ZlZBx",oy="tempest_triggerOpen_Hpfbu",ay="tempest_panel_6ta6u",iy="tempest_item_wM-61",cy="tempest_itemLabel_wXfB2",ly="tempest_shortcut_qNlmN",uy="tempest_separator_LfK3t",je={root:ny,menu:sy,trigger:ry,triggerOpen:oy,panel:ay,item:iy,itemLabel:cy,shortcut:ly,separator:uy};function dy(e){return"separator"in e}function py({menus:e,className:t,...n}){const[s,r]=l.useState(-1),a=l.useId(),i=l.useRef(null),c=l.useRef([]),u=l.useCallback(()=>{r(-1)},[]);return l.useEffect(()=>{if(s===-1)return;const d=m=>{if(m.key==="Escape"){u(),c.current[s]?.focus();return}if(m.key==="ArrowRight"){m.preventDefault();const f=(s+1)%e.length;r(f),c.current[f]?.focus()}if(m.key==="ArrowLeft"){m.preventDefault();const f=(s-1+e.length)%e.length;r(f),c.current[f]?.focus()}},p=m=>{i.current&&!i.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:i,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=>{c.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,_)=>dy(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 my="tempest_root_-w3-j",fy="tempest_viewport_n0hzM",hy="tempest_track_5PA8h",_y="tempest_slide_fhfjg",gy="tempest_arrow_S92Lt",by="tempest_prev_X8whU",yy="tempest_next_jBRSz",vy="tempest_dots_fL3Hr",xy="tempest_dot_vEB56",wy="tempest_dotActive_OSSUg",ae={root:my,viewport:fy,track:hy,slide:_y,arrow:gy,prev:by,next:yy,dots:vy,dot:xy,dotActive:wy};function jy({children:e,loop:t=!1,showArrows:n=!0,showDots:s=!0,index:r,defaultIndex:a=0,onIndexChange:i,className:c,...u}){const d=e.length,p=r!==void 0,[m,f]=l.useState(a),h=p?r:m,_=l.useCallback(x=>{let b=x;b<0?b=t?d-1:0:b>=d&&(b=t?0:d-1),b!==h&&(p||f(b),i?.(b))},[d,t,h,p,i]),v=h<=0,y=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,c),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,b)=>o.jsx("div",{role:"group","aria-roledescription":"slide","aria-label":`${b+1} of ${d}`,"aria-hidden":b!==h,className:ae.slide,children:x},b))})}),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&&v,onClick:()=>_(h-1),children:"‹"}),o.jsx("button",{type:"button",className:w.cn(ae.arrow,ae.next),"aria-label":"Next slide",disabled:!t&&y,onClick:()=>_(h+1),children:"›"})]}),s&&d>1&&o.jsx("div",{className:ae.dots,role:"tablist","aria-label":"Slides",children:e.map((x,b)=>o.jsx("button",{type:"button",role:"tab","aria-label":`Go to slide ${b+1}`,"aria-selected":b===h,className:w.cn(ae.dot,b===h&&ae.dotActive),onClick:()=>_(b)},b))})]})}function Zn(e=1,t=50){const[n,s]=l.useState(e),[r,a]=l.useState(t),i=l.useCallback(()=>s(1),[]);return{page:n,size:r,setPage:s,setSize:a,reset:i}}function $y(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 i=r[a];return i!=null&&String(i).toLowerCase().includes(s)})):e},[e,t,n])}function ky(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 Ny(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 i=c=>r.current(c);return a.addEventListener(e,i,s),()=>a.removeEventListener(e,i,s)},[e,n,s])}const Sy=JSON.stringify,Cy=e=>JSON.parse(e);function Ey(e,t,n={}){const s=n.serialize??Sy,r=n.deserialize??Cy,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]),[i,c]=l.useState(a);l.useEffect(()=>{c(a())},[a]);const u=l.useCallback(p=>{c(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{}c(t)},[e,t]);return l.useEffect(()=>{if(typeof window>"u")return;const p=m=>{if(m.key===e){if(m.newValue===null){c(t);return}try{c(r(m.newValue))}catch{}}};return window.addEventListener("storage",p),()=>window.removeEventListener("storage",p)},[e,t,r]),[i,u,d]}function Ty(e=!1){const[t,n]=l.useState(e),s=l.useCallback(()=>n(c=>!c),[]),r=l.useCallback(()=>n(!0),[]),a=l.useCallback(()=>n(!1),[]),i=l.useCallback(c=>n(c),[]);return[t,{toggle:s,setTrue:r,setFalse:a,set:i}]}function My(e,t=[],n={}){const{immediate:s=!1}=n,[r,a]=l.useState({status:"idle",data:void 0,error:void 0}),i=l.useRef(e);i.current=e;const c=l.useRef(0),u=l.useRef(!0);l.useEffect(()=>(u.current=!0,()=>{u.current=!1}),[]);const d=l.useCallback(async()=>{const m=++c.current;a(f=>({...f,status:"pending",error:void 0}));try{const f=await i.current();return u.current&&c.current===m&&a({status:"success",data:f,error:void 0}),f}catch(f){throw u.current&&c.current===m&&a({status:"error",data:void 0,error:f}),f}},[]),p=l.useCallback(()=>{c.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 Ry(){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 Ly(){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 Dy(e,t={}){const[n,s]=l.useState(null),{once:r=!1,root:a,rootMargin:i,threshold:c}=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:i,threshold:c});return d.observe(u),()=>d.disconnect()},[e,r,a,i,c]),n}function Py(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 i=a[0];if(!i)return;const c=i.contentRect;n({width:c.width,height:c.height})});return r.observe(s),()=>r.disconnect()},[e]),t}function Ay(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 i=l.useCallback(async c=>{try{if(typeof navigator<"u"&&navigator.clipboard?.writeText)await navigator.clipboard.writeText(c);else if(typeof document<"u"){const u=document.createElement("textarea");u.value=c,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:i,reset:a}}function Iy(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 Fy(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase();return t==="input"||t==="textarea"||t==="select"?!0:e.isContentEditable}function Oy(e,t,n={}){const{disabled:s=!1,ignoreInput:r=!0}=n;l.useEffect(()=>{if(s||typeof window>"u")return;const a=i=>{r&&Fy(i.target)||Iy(i,e)&&t(i)};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 $n=["mousemove","mousedown","keydown","touchstart","wheel","scroll"];function By(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 $n)window.addEventListener(a,r,{passive:!0});return()=>{clearTimeout(s);for(const a of $n)window.removeEventListener(a,r)}},[e]),t}function zy(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 i=u=>{a({loading:!1,error:null,coords:u.coords,timestamp:u.timestamp})},c=u=>{a(d=>({...d,loading:!1,error:u}))};if(t){const u=navigator.geolocation.watchPosition(i,c,s);return()=>navigator.geolocation.clearWatch(u)}navigator.geolocation.getCurrentPosition(i,c,s)},[n,t,s.enableHighAccuracy,s.maximumAge,s.timeout]),r}function Wy(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 qy(e){const t=l.useRef(e);return t.current=e,l.useCallback((...n)=>t.current(...n),[])}function Ut(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)=>Ut(r,t[a]));const n=Object.keys(e),s=Object.keys(t);return n.length!==s.length?!1:n.every(r=>Ut(e[r],t[r]))}function Ky(e){const t=l.useRef(e);return Ut(t.current,e)||(t.current=e),t.current}function Uy(e){const t=l.useRef(void 0);return l.useEffect(()=>{t.current=e},[e]),t.current}function Hy(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 Gy(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 Qy(e,t){const[n,s]=l.useState(e),r=l.useRef(0),a=l.useRef(null);return l.useEffect(()=>{const i=Date.now(),c=i-r.current;return c>=t?(r.current=i,s(e)):(a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{r.current=Date.now(),s(e)},t-c)),()=>{a.current&&clearTimeout(a.current)}},[e,t]),n}function Jy(){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 Yy(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 Xy(e,t,n={}){const{delay:s=500,moveThreshold:r=10}=n,a=l.useRef(t);a.current=t,l.useEffect(()=>{const i=e.current;if(!i)return;let c=null,u=0,d=0;const p=()=>{c&&(clearTimeout(c),c=null)},m=h=>{u=h.clientX,d=h.clientY,p(),c=setTimeout(()=>{c=null,a.current()},s)},f=h=>{if(c===null)return;const _=h.clientX-u,v=h.clientY-d;Math.hypot(_,v)>r&&p()};return i.addEventListener("pointerdown",m),i.addEventListener("pointermove",f),i.addEventListener("pointerup",p),i.addEventListener("pointercancel",p),i.addEventListener("pointerleave",p),()=>{p(),i.removeEventListener("pointerdown",m),i.removeEventListener("pointermove",f),i.removeEventListener("pointerup",p),i.removeEventListener("pointercancel",p),i.removeEventListener("pointerleave",p)}},[e,s,r])}function Vy(e=!1){const[t,n]=l.useState(e),s=l.useCallback(()=>n(!0),[]),r=l.useCallback(()=>n(!1),[]),a=l.useCallback(()=>n(c=>!c),[]),i=l.useMemo(()=>({open:s,close:r,toggle:a}),[s,r,a]);return[t,i]}function Zy(e=[]){const[t,n]=l.useState(e),s=l.useCallback((...h)=>{n(_=>[..._,...h])},[]),r=l.useCallback((...h)=>{n(_=>[...h,..._])},[]),a=l.useCallback((h,..._)=>{n(v=>[...v.slice(0,h),..._,...v.slice(h)])},[]),i=l.useCallback((...h)=>{const _=new Set(h);n(v=>v.filter((y,g)=>!_.has(g)))},[]),c=l.useCallback(({from:h,to:_})=>{n(v=>{const y=[...v],[g]=y.splice(h,1);return y.splice(_,0,g),y})},[]),u=l.useCallback((h,_)=>{n(v=>v.map((y,g)=>g===h?_:y))},[]),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:i,reorder:c,setItem:u,setState:d,apply:p,clear:m}),[s,r,a,i,c,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 ev(e=0,t={}){const{min:n,max:s}=t,[r,a]=l.useState(()=>at(e,n,s)),i=l.useCallback(()=>{a(m=>at(m+1,n,s))},[n,s]),c=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:i,decrement:c,set:u,reset:d}),[i,c,u,d]);return[r,p]}function tv(e){l.useEffect(()=>{if(typeof document>"u")return;const t=document.title;return document.title=e,()=>{document.title=t}},[e])}function nv(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 sv(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)},[]),i=l.useCallback(u=>t.get(u),[t]),c=l.useCallback(u=>t.has(u),[t]);return l.useMemo(()=>({map:t,set:s,delete:r,clear:a,get:i,has:c,size:t.size}),[t,s,r,a,i,c])}function rv(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)},[]),i=l.useCallback(u=>t.has(u),[t]),c=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:i,toggle:c,size:t.size}),[t,s,r,a,i,c])}function ov(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]),i=l.useCallback(u=>{r(d=>{const p=[...u(d.queue),...d.overflow];return{queue:p.slice(0,n),overflow:p.slice(n)}})},[n]),c=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:i,cleanQueue:c,size:s.queue.length}),[s.queue,a,i,c])}function av(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 iv(){const e=l.useRef(!0);return e.current?(e.current=!1,!0):!1}const cv="tempest_wrapper_iB6ka",lv="tempest_search_2y-yM",uv="tempest_sortButton_9p6w4",dv="tempest_sortIndicator_bZMlH",gt={wrapper:cv,search:lv,sortButton:uv,sortIndicator:dv};function pv(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 mv({data:e,columns:t,pageSize:n=10,searchable:s=!1,searchKeys:r,initialSort:a,rowKey:i=(p,m)=>m,emptyMessage:c,className:u,...d}){const[p,m]=l.useState(""),[f,h]=l.useState(a??null),{page:_,setPage:v}=Zn(1,n),y=l.useMemo(()=>r&&r.length>0?r:t.filter(N=>{const S=e.find(D=>D[N.key]!=null),T=S?S[N.key]:void 0;return typeof T=="string"||typeof T=="number"}).map(N=>N.key),[r,t,e]),g=l.useMemo(()=>{const N=p.trim().toLowerCase();return!N||!s?e:e.filter(S=>y.some(T=>{const D=S[T];return D!=null&&String(D).toLowerCase().includes(N)}))},[e,p,s,y]),x=l.useMemo(()=>{if(!f)return g;const N=f.direction==="asc"?1:-1;return[...g].sort((S,T)=>pv(S[f.key],T[f.key])*N)},[g,f]),b=Math.max(1,Math.ceil(x.length/n));l.useEffect(()=>{_>b&&v(b)},[_,b,v]);const j=Math.min(_,b),k=l.useMemo(()=>{const N=(j-1)*n;return x.slice(N,N+n)},[x,j,n]);function M(N){h(S=>!S||S.key!==N?{key:N,direction:"asc"}:S.direction==="asc"?{key:N,direction:"desc"}:null)}const E=l.useMemo(()=>t.map(N=>{const T=f?.key===N.key?f?.direction==="asc"?" ▲":" ▼":"",D=N.sortable?o.jsxs("button",{type:"button",className:gt.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:gt.sortIndicator,"aria-hidden":!0,children:T})]}):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:w.cn(gt.wrapper,u),...d,children:[s&&o.jsx(Kn,{value:p,onChange:N=>{m(N),v(1)},wrapperClassName:gt.search}),o.jsx(Hn,{columns:E,data:k,rowKey:(N,S)=>i(N,(j-1)*n+S),emptyMessage:c}),b>1&&o.jsx(Bn,{page:j,totalPages:b,onPageChange:v,totalItems:x.length})]})}const fv="tempest_tile_ZpED6",hv="tempest_interactive_3ICXQ",_v="tempest_selected_dMY11",gv="tempest_disabled_HnXxf",bv="tempest_leading_gSuBb",yv="tempest_trailing_cVd1n",vv="tempest_body_gyEl2",xv="tempest_title_jWFBN",wv="tempest_subtitle_GUtn7",$e={tile:fv,interactive:hv,selected:_v,disabled:gv,leading:bv,trailing:yv,body:vv,title:xv,subtitle:wv};function jv({leading:e,title:t,subtitle:n,trailing:s,onClick:r,disabled:a=!1,selected:i=!1,className:c}){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,i&&$e.selected,a&&$e.disabled,c);return r?o.jsx("button",{type:"button",className:w.cn(d,$e.interactive),"aria-pressed":i?!0:void 0,disabled:a,onClick:r,children:u}):o.jsx("div",{className:d,children:u})}const $v="tempest_fab_U3NIL",kv="tempest_primary_8lnHI",Nv="tempest_surface_ZTMQ4",Sv="tempest_round_ljguw",Cv="tempest_sm_3-rLi",Ev="tempest_md_vOdzW",Tv="tempest_lg_Xc6vE",Mv="tempest_extended_GhPio",Rv="tempest_icon_cZ8Nq",Lv="tempest_label_tfoCq",Dv="tempest_fixed_Xr8Xa",Pv="tempest_bottomRight_bJ8Oo",Av="tempest_bottomLeft_USN6N",pe={fab:$v,primary:kv,surface:Nv,round:Sv,sm:Cv,md:Ev,lg:Tv,extended:Mv,icon:Rv,label:Lv,fixed:Dv,bottomRight:Pv,bottomLeft:Av};function Iv({icon:e,label:t,position:n="bottom-right",size:s="md",variant:r="primary",className:a,...i}){const c=t!==void 0;return o.jsxs("button",{type:"button",className:w.cn(pe.fab,pe[s],pe[r],c?pe.extended:pe.round,n!=="none"&&pe.fixed,n==="bottom-right"&&pe.bottomRight,n==="bottom-left"&&pe.bottomLeft,a),...i,children:[o.jsx("span",{className:pe.icon,children:e}),c&&o.jsx("span",{className:pe.label,children:t})]})}const Fv="tempest_rail_bvns5",Ov="tempest_header_Mikit",Bv="tempest_list_rS6XJ",zv="tempest_footer_ojpGC",Wv="tempest_item_XEXI9",qv="tempest_active_U3hSU",Kv="tempest_iconWrap_iVwlb",Uv="tempest_icon_-hpb6",Hv="tempest_badge_1YxwU",Gv="tempest_label_zCKyA",me={rail:Fv,header:Ov,list:Bv,footer:zv,item:Wv,active:qv,iconWrap:Kv,icon:Uv,badge:Hv,label:Gv};function Qv({items:e,value:t,onChange:n,header:s,footer:r,labelVisibility:a="all",className:i,...c}){return o.jsxs("nav",{className:w.cn(me.rail,i),"aria-label":"Navegação lateral",...c,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 Jv="tempest_wrapper_tFKNC",Yv="tempest_label_FUecv",Xv="tempest_columns_XMru6",Vv="tempest_column_bwotJ",Zv="tempest_cellWrapper_xRos3",ex="tempest_cell_eSc7G",tx="tempest_active_6amgd",nx="tempest_helper_ihHGE",sx="tempest_disabled_NDezB",O={wrapper:Jv,label:Yv,columns:Xv,column:Vv,cellWrapper:Zv,cell:ex,active:tx,helper:nx,disabled:sx};function bt(e){return e.toString().padStart(2,"0")}function rx(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 ox(e){const t=e%12;return t===0?12:t}function Pt(e,t){const n=e%12;return t==="PM"?n+12:n}function ax({value:e,onChange:t,minuteStep:n=5,use12Hours:s=!1,label:r,helperText:a,disabled:i,className:c}){const u=l.useId(),{hour24:d,minute:p}=l.useMemo(()=>rx(e),[e]),m=d!==null&&d>=12?"PM":"AM",f=l.useMemo(()=>s?Array.from({length:12},(b,j)=>j+1):Array.from({length:24},(b,j)=>j),[s]),h=l.useMemo(()=>{const b=n>0?n:1,j=[];for(let k=0;k<60;k+=b)j.push(k);return j},[n]),_=d===null?null:s?ox(d):d,v=(b,j)=>{t(`${bt(b)}:${bt(j)}`)},y=b=>{if(i)return;const j=p??0,k=s?Pt(b,m):b;v(k,j)},g=b=>{if(i)return;const j=d??(s?Pt(12,"AM"):0);v(j,b)},x=b=>{if(i)return;const j=_??12,k=p??0;v(Pt(j,b),k)};return o.jsxs("div",{className:w.cn(O.wrapper,i&&O.disabled,c),children:[r&&o.jsx("span",{id:`${u}-label`,className:O.label,children:r}),o.jsxs("div",{className:O.columns,children:[o.jsx("ul",{role:"listbox","aria-label":"Horas",className:O.column,children:f.map(b=>{const j=b===_;return o.jsx("li",{className:O.cellWrapper,children:o.jsx("button",{type:"button",role:"option","aria-selected":j,disabled:i,className:w.cn(O.cell,j&&O.active),onClick:()=>y(b),children:s?b:bt(b)})},b)})}),o.jsx("ul",{role:"listbox","aria-label":"Minutos",className:O.column,children:h.map(b=>{const j=b===p;return o.jsx("li",{className:O.cellWrapper,children:o.jsx("button",{type:"button",role:"option","aria-selected":j,disabled:i,className:w.cn(O.cell,j&&O.active),onClick:()=>g(b),children:bt(b)})},b)})}),s&&o.jsx("ul",{role:"listbox","aria-label":"Período",className:O.column,children:["AM","PM"].map(b=>{const j=_!==null&&b===m;return o.jsx("li",{className:O.cellWrapper,children:o.jsx("button",{type:"button",role:"option","aria-selected":j,disabled:i,className:w.cn(O.cell,j&&O.active),onClick:()=>x(b),children:b})},b)})})]}),a&&o.jsx("span",{className:O.helper,children:a})]})}const ix="tempest_wrapper_vGp-3",cx="tempest_indicator_S7mV0",lx="tempest_content_bZdpc",ux="tempest_dragging_BvUty",yt={wrapper:ix,indicator:cx,content:lx,dragging:ux};function dx(e,t){const n=t*1.5;return Math.min(e/2,n)}function px({onRefresh:e,children:t,threshold:n=80,disabled:s,className:r}){const a=l.useRef(null),i=l.useRef(null),[c,u]=l.useState(0),[d,p]=l.useState(!1),m=i.current!==null,f=x=>{if(s||d)return;const b=a.current;if(!b||b.scrollTop>0)return;const j=x.touches[0];j&&(i.current=j.clientY)},h=x=>{if(s||d)return;const b=i.current;if(b===null)return;const j=x.touches[0];if(!j)return;const k=j.clientY-b;if(k<=0){u(0);return}u(dx(k,n))},_=()=>{i.current=null,u(0)},v=async()=>{if(s||d){_();return}if(!(i.current!==null&&c>=n)){_();return}i.current=null,p(!0),u(n);try{await e()}finally{p(!1),u(0)}},y=d||c>0,g=Math.min(1,c/n);return o.jsxs("div",{ref:a,className:w.cn(yt.wrapper,r),"data-refreshing":d,onTouchStart:f,onTouchMove:h,onTouchEnd:v,children:[o.jsx("div",{className:yt.indicator,"aria-hidden":!y,style:{opacity:d?1:g,transform:`translateX(-50%) translateY(${y?c:0}px) rotate(${g*360}deg)`},children:o.jsx(Un,{size:"sm",label:"Atualizando"})}),o.jsx("div",{className:w.cn(yt.content,(m||d)&&yt.dragging),style:{transform:`translateY(${y?c:0}px)`},children:t})]})}function mx(e){return new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(e)}function fx(e){const t=typeof e=="string"?new Date(e):e;return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat("pt-BR").format(t)}function hx(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 es(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 ts(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 _x(e){return new Intl.NumberFormat("pt-BR",{style:"percent",minimumFractionDigits:1,maximumFractionDigits:1}).format(e)}const gx={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 bx(e){return e.normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function yx(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 vx(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function xx(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 wx(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 jx(e,t,n){return e===1?t:n??`${t}s`}function $x(e,t){const n={};for(const s of e){const r=t(s);(n[r]??=[]).push(s)}return n}function kx(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 Nx(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 Sx(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 it(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Cx(e,t){const n={};for(const s of t)Object.prototype.hasOwnProperty.call(e,s)&&(n[s]=e[s]);return n}function Ex(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 ns(e,t){if(!it(e)||!it(t))return t===void 0?e:t;const n={...e};for(const s of Object.keys(t)){const r=t[s],a=n[s];it(a)&&it(r)?n[s]=ns(a,r):n[s]=r}return n}function Tx(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:e instanceof Map||e instanceof Set?e.size===0:it(e)?Object.keys(e).length===0:!1}function Mx(e){return e!=null}function Rx(e){return typeof e=="string"}function Lx(e){return typeof e=="number"&&!Number.isNaN(e)}function Dx(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Px(e,t){throw new Error(t??`Unexpected value: ${String(e)}`)}function Ax(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 Ix(e,t){let n,s,r=0;const a=c=>{r=Date.now(),e(...c)},i=(...c)=>{const u=Date.now(),d=t-(u-r);d<=0?(n!==void 0&&(clearTimeout(n),n=void 0),a(c)):(s=c,n===void 0&&(n=setTimeout(()=>{if(n=void 0,s!==void 0){const p=s;s=void 0,a(p)}},d)))};return i.cancel=()=>{n!==void 0&&(clearTimeout(n),n=void 0),s=void 0,r=0},i}function Fx(e){let t=!1,n;return(...s)=>(t||(t=!0,n=e(...s)),n)}function Ox(e){let t=!1,n,s;const r=a=>{if(!t||a.length!==n.length)return!1;for(let i=0;i<a.length;i++)if(!Object.is(a[i],n[i]))return!1;return!0};return(...a)=>(r(a)||(n=a,s=e(...a),t=!0),s)}function Bx(e){return new Promise(t=>setTimeout(t,e))}function zx(e,t,n){return new Promise((s,r)=>{const a=setTimeout(()=>{const i=new Error(n??`Operation timed out after ${t}ms`);i.name="TimeoutError",r(i)},t);e.then(i=>{clearTimeout(a),s(i)},i=>{clearTimeout(a),r(i)})})}function Jt(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 kt 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 Wx(e){return typeof e=="object"&&e!==null&&typeof e.status=="number"&&typeof e.detail=="string"}function Yt(e,t,n,s){const r=typeof t=="object"&&t!==null?t:null,a=r?.detail??r?.message??`Erro ${e}`,i=typeof r?.code=="string"?r.code:void 0,c=typeof r?.details=="object"&&r.details!==null?r.details:null,u=(typeof c?.request_id=="string"?c.request_id:void 0)??n?.get("X-Request-ID")??s??void 0;return{status:e,detail:String(a),code:i,requestId:u??void 0,retryAfter:qx(n?.get("Retry-After")),body:t}}function qx(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 Kx(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 Ux(e){return typeof FormData<"u"&&e instanceof FormData}async function kn(e,t){let n=null;try{n=await e.clone().json()}catch{try{n=await e.text()}catch{n=null}}return new kt(Yt(e.status,n,e.headers,t))}function xt(e){const t=e.fetcher??globalThis.fetch.bind(globalThis);function n(){const i=e.getToken?.();return i?{Authorization:`Bearer ${i}`}:{}}async function s(i,c,u){const{body:d,params:p,headers:m,...f}=c,h=Ux(d),_={...h?{}:{"Content-Type":"application/json"},...u?{"X-Request-ID":u}:{},...e.headers,...n(),...m},v={...f,headers:_,credentials:e.withCredentials?"include":f.credentials,body:d==null?void 0:h?d:JSON.stringify(d)};return t(Kx(e.baseURL,i,p),v)}async function r(i,c={}){const u=e.requestId?e.requestId():Jt();let d=await s(i,c,u);if(d.status===401)if(e.refresh)try{await e.refresh(),d=await s(i,c,u)}catch{throw await e.onUnauthorized?.(d),await kn(d,u)}else await e.onUnauthorized?.(d);if(!d.ok)throw await kn(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(i,c,u="POST"){return r(i,{method:u,body:c})}return{request:r,get:(i,c)=>r(i,{...c,method:"GET"}),post:(i,c)=>r(i,{...c,method:"POST"}),put:(i,c)=>r(i,{...c,method:"PUT"}),patch:(i,c)=>r(i,{...c,method:"PATCH"}),delete:(i,c)=>r(i,{...c,method:"DELETE"}),upload:a}}function Hx(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(i=>` - ${i.path.join(".")||"<root>"}: ${i.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 fw(e){if(!e)return null;try{return JSON.parse(e)}catch{return e}}function hw(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?.(),y=p?p():Vt(),v={...r};_&&!("Authorization"in v)&&(v.Authorization=`Bearer ${_}`),y&&!("X-Request-ID"in v)&&(v["X-Request-ID"]=y);for(const[x,b]of Object.entries(v))h.setRequestHeader(x,b);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,b=h.getResponseHeader("content-type")??"";if(!x){const j=fw(h.responseText);f(new St(Zt(h.status,j,{get:S=>h.getResponseHeader(S)},y)));return}if(h.status===204||!h.responseText){m(void 0);return}if(b.includes("application/json"))try{m(d(h.responseText))}catch(j){f(j)}else m(h.responseText)},h.onerror=()=>{u?.removeEventListener("abort",g),f(new St({status:0,detail:"Falha de rede no upload.",requestId:y||void 0}))},h.onabort=()=>{u?.removeEventListener("abort",g),f(new DOMException("Aborted","AbortError"))},h.send(n)})}function _w(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 gw(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 _w(h,u)}}throw p}function bw(){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 yw(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 y(){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(y,n))}}}return l.useEffect(()=>{if(f.current=s,s){_.current&&clearTimeout(_.current);return}return m(!0),y(),()=>{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,y())}}}function as(e={}){const t=e.name??"tempest-auth",n=e.storage==="session"?()=>sessionStorage:()=>localStorage;return Wt.create()($t.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:$t.createJSONStorage(n),partialize:s=>({user:s.user,token:s.token}),onRehydrateStorage:()=>s=>{s&&(s.isAuthenticated=!!s.token)}}))}function vw({isAuthenticated:e,children:t,fallback:n}){return o.jsx(o.Fragment,{children:e?t:n})}function En(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 en(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(En(n)),payload:JSON.parse(En(s)),signature:r}}catch{throw new Error("Invalid JWT: header or payload is not valid JSON.")}}function xw(e,t=0){try{const{payload:n}=en(e);if(typeof n.exp!="number")return!0;const s=Math.floor(Date.now()/1e3);return n.exp<=s+t}catch{return!0}}function cs(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 is(e){let t=null;return()=>t||(t=(async()=>{try{await e()}finally{t=null}})(),t)}function ww(e){const t=e??{};return{token:t.access_token,refreshToken:t.refresh_token}}function jw(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=ww,parseUser:p,refreshBody:m=k=>k?{refresh_token:k}:void 0}=e,f=as({name:a,storage:c}),h=`${a}-refresh`;function _(){return typeof window>"u"?null:c==="session"?window.sessionStorage:window.localStorage}function y(){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,b=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 b.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=is(async()=>{const k=await b.post(s,{body:m(y())}),{token:E,refreshToken:D}=d(k);g().setToken(E),D&&v(D)}),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 ls=l.createContext(null);function $w({control:e,children:t}){return o.jsx(ls.Provider,{value:e,children:t})}function us(){return l.useContext(ls)}function kw(e){return typeof e=="boolean"?{can:e}:e}function ds(e){const t=us(),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=kw(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 Nw({action:e,resource:t,params:n,children:s,fallback:r}){const{allowed:a,isLoading:c}=ds({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 Sw(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 Cw(e){const t=Sw(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 Ot(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):typeof e=="string"?e.split(/\s+/).filter(Boolean):[]}function Ew(e,t){try{const{payload:n}=en(e),s=t?.claim??"permissions",r=Ot(n[s]);if(r.length>0)return r;if(t?.claim===void 0){const a=Ot(n.scopes);return a.length>0?a:Ot(n.scope)}return r}catch{return[]}}function Tw({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 Mw(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 ps={SHORT:30*1e3,DEFAULT:300*1e3,LONG:1800*1e3,INFINITE:1/0},ms={SHORT:300*1e3,DEFAULT:1800*1e3,LONG:3600*1e3},Rw={REALTIME:5*1e3,FAST:30*1e3,DEFAULT:60*1e3,SLOW:300*1e3};function Lw(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 fs({children:e,client:t,defaultOptions:n}){const[s]=l.useState(()=>t??new G.QueryClient({defaultOptions:{queries:{staleTime:ps.DEFAULT,gcTime:ms.DEFAULT,retry:1,refetchOnWindowFocus:!1,...n?.queries??{}},mutations:{retry:0,...n?.mutations??{}}}}));return o.jsx(G.QueryClientProvider,{client:s,children:e})}function Dw(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 Pw(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 Iw(e=20){return{items:[],total:0,page:1,size:e,pages:0}}function Aw(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 b={page:d,[a]:r};return c&&(b.order_by=c,b.ascending=i),n(b)},placeholderData:G.keepPreviousData}),f=m.data,h=f?.pages??0,_=d<h,y=d>1,v=l.useCallback(b=>p(Math.max(1,b)),[]),g=l.useCallback(()=>p(b=>b<h?b+1:b),[h]),x=l.useCallback(()=>p(b=>b>1?b-1:b),[]);return{page:f,items:f?.items??[],pageNumber:d,pageCount:h,total:f?.total??0,hasNext:_,hasPrev:y,isLoading:m.isLoading,isFetching:m.isFetching,error:m.error,setPage:v,next:g,prev:x,refetch:()=>{m.refetch()}}}function Fw(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 Ow=(e,t)=>t==null?`/${e}`:`/${e}/${t}`;function Bw(e,t={}){const{pageParam:n="page",sizeParam:s="size",sortFieldParam:r="order_by",sortOrderParam:a="ascending",sortOrderAsBoolean:c=!0,updateMethod:i="patch",buildPath:u=Ow}=t,d={getList(p,m={}){const{pagination:f,sort:h,filters:_}=m,y={};if(f?.page!=null&&(y[n]=f.page),f?.pageSize!=null&&(y[s]=f.pageSize),h?.field){const g=h.order??"asc";y[r]=h.field,y[a]=c?g==="asc":g}if(_)for(const[g,x]of Object.entries(_))y[g]=x;const v={params:y};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 hs=l.createContext(null);function zw({provider:e,children:t}){return o.jsx(hs.Provider,{value:e,children:t})}function Ze(){const e=l.useContext(hs);if(!e)throw new Error("useDataProvider must be used within a <TempestDataProvider>");return e}function _s(e,t){return["data",e,"list",t]}function tn(e,t){return["data",e,"one",t]}function Ww(e,t,n){const s=Ze();return G.useQuery({queryKey:_s(e,t),queryFn:()=>s.getList(e,t),...n})}function qw(e,t,n){const s=Ze(),{enabled:r,...a}=n??{};return G.useQuery({queryKey:tn(e,t),queryFn:()=>s.getOne(e,t),enabled:t!=null&&(r??!0),...a})}function Uw(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 Kw(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:tn(e,a.id)}),t?.onSuccess?.(...r)},...t})}function Hw(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 gs({when:e,redirectTo:t="/",replace:n=!0,children:s}){return o.jsx(o.Fragment,{children:e?s:o.jsx(P.Navigate,{to:t,replace:n})})}function Gw(e){return e}const Tn=new WeakMap;function Qw(e){let t=Tn.get(e);return t||(t=cs(e.lazy),Tn.set(e,t)),t}function Jw({guard:e,redirectTo:t,children:n}){const s=typeof e=="function"?e():e;return o.jsx(gs,{when:s,redirectTo:t,children:n})}function bs(e){return e.map((t,n)=>{let s=t.element;if(t.lazy){const r=Qw(t);s=o.jsx(r,{})}return t.guard!==void 0&&(s=o.jsx(Jw,{guard:t.guard,redirectTo:t.redirectTo,children:s})),t.index?o.jsx(P.Route,{index:!0,element:s},`index-${n}`):o.jsx(P.Route,{path:t.path,element:s,caseSensitive:t.caseSensitive,children:t.children?bs(t.children):null},t.path??`route-${n}`)})}const Yw={browser:P.BrowserRouter,hash:P.HashRouter,memory:P.MemoryRouter};function Xw({routes:e,router:t="browser",basename:n,initialEntries:s,fallback:r=null}){const a=l.useMemo(()=>bs(e),[e]),c=Yw[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(P.Routes,{children:a})})})}function Vw(e,t={}){if(!t.persist)return Wt.create()(e);const{name:n,storage:s="local",partialize:r,version:a,migrate:c}=t.persist,i=s==="session"?()=>sessionStorage:()=>localStorage;return Wt.create()($t.persist(e,{name:n,storage:$t.createJSONStorage(i),...r?{partialize:r}:{},...a!==void 0?{version:a}:{},...c?{migrate:c}:{}}))}function Zw(e){const t=e;t.use={};for(const n of Object.keys(e.getState()))t.use[n]=()=>e(s=>s[n]);return t}const ys=l.createContext(null);function Mn(e){return e==="dark"||e==="light"?e:typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Rn(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 ej(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 vs({children:e,defaultTheme:t="system",storageKey:n="tempest-theme",target:s,attribute:r="data-tempest-theme",themeColor:a}){const[c,i]=l.useState(()=>ej(n)??t),[u,d]=l.useState(()=>Mn(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=Mn(c);Rn(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 b=v.matches?"dark":"light";Rn(x,b,r,f.current),d(b)};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]),y=l.useMemo(()=>({theme:c,resolvedTheme:u,setTheme:h,toggle:_}),[c,u,h,_]);return o.jsx(ys.Provider,{value:y,children:e})}function tj(){const e=l.useContext(ys);if(!e)throw new Error("useTheme must be used inside a <ThemeProvider>");return e}function Ln(e,t){return t?e.replace(/\{(\w+)\}/g,(n,s)=>{const r=t[s];return r===void 0?`{${s}}`:String(r)}):e}function Bt(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 nn(e){const{locale:t,fallbackLocale:n=null,messages:s}=e;function r(u,d){const p=Bt(s,t,n,u);return p===null?u:Ln(p,d)}function a(u,d,p){const f=Bt(s,t,n,`${u}${d===1?"_one":"_other"}`)??Bt(s,t,n,u);return f===null?u:Ln(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=>nn({locale:u,fallbackLocale:n??void 0,messages:s})}}const xs=l.createContext(null);function nj(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 ws({children:e,locale:t,fallbackLocale:n,messages:s,storageKey:r="tempest-locale"}){const a=l.useMemo(()=>Object.keys(s),[s]),[c,i]=l.useState(()=>nj(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(()=>({...nn({locale:c,fallbackLocale:n,messages:s}),setLocale:u,availableLocales:a}),[c,n,s,u,a]);return o.jsx(xs.Provider,{value:d,children:e})}function js(){const e=l.useContext(xs);if(!e)throw new Error("useI18n must be used inside an <I18nProvider>");return e}function sj(){return js().t}function rj(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 $s 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&&rj(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 oj({children:e,query:t,theme:n,i18n:s,errorBoundary:r}){let a=e;return s&&(a=o.jsx(ws,{...s,children:a})),n!==!1&&(a=o.jsx(vs,{...n||{},children:a})),t!==!1&&(a=o.jsx(fs,{...t||{},children:a})),r&&(a=o.jsx($s,{...r,children:a})),o.jsx(o.Fragment,{children:a})}function aj(e){try{return JSON.parse(e)}catch{return e}}function ks(e,t={}){const{withCredentials:n=!1,namedEvents:s=[],heartbeatEvents:r=["ping"],maxRetries:a=10,initialBackoff:c=1e3,maxBackoff:i=3e4,parser:u=aj,onOpen:d,onMessage:p,onError:m,onStatusChange:f}=t;let h=null,_=null,y=0,v="idle",g=!1;function x(N){v!==N&&(v=N,f?.(N))}function b(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(y>=a){x("error");return}const N=Math.min(c*2**y,i);y+=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=()=>{y=0,x("open"),d?.()},N.onmessage=k=>b("message",k);for(const k of s)N.addEventListener(k,E=>b(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),y=0,h&&(h.close(),h=null),x("closed")}function T(){_&&(clearTimeout(_),_=null),y=0,g=!1,S()}return S(),{close:M,reconnect:T,get status(){return v}}}function cj(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=ks(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 Ns(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 Jt extends Error{constructor(){super("Web Push não suportado neste navegador."),this.name="WebPushUnsupportedError"}}class Ss extends Error{constructor(){super("Permissão de notificação negada pelo usuário."),this.name="WebPushPermissionDeniedError"}}class Cs{config;constructor(t){this.config=t}static isSupported(){return lt()}async registration(){if(!lt())throw new Jt;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 Jt;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 Ss;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:Ns(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 ij(e){const t=l.useRef(e);t.current=e;const n=l.useMemo(()=>new Cs({vapidPublicKey:e.vapidPublicKey,onSubscribe:y=>t.current.onSubscribe(y),onUnsubscribe:y=>t.current.onUnsubscribe?.(y),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 y=await n.isSubscribed();i(y)}catch(y){m(y instanceof Error?y:new Error(String(y)))}}},[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(y){throw m(y instanceof Error?y:new Error(String(y))),y}finally{d(!1)}}},[n,s]),_=l.useCallback(async()=>{if(s){d(!0),m(null);try{await n.unsubscribe(),i(!1)}catch(y){throw m(y instanceof Error?y:new Error(String(y))),y}finally{d(!1)}}},[n,s]);return{supported:s,permission:r,subscribed:c,loading:u,error:p,subscribe:h,unsubscribe:_,refresh:f}}function sn(){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 zt=null;function Es(){return zt||(zt=sn()),zt}async function lj(e,t){return Es().play(e,t)}function uj(){Es().stop()}function dj(){const e=l.useRef(null),[t,n]=l.useState(!1);e.current||(e.current=sn()),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 pj extends Gs{store;constructor(t,n,s,r){super(t),this.version(n).stores({[s]:r}),this.store=this.table(s)}}function mj(e){const{databaseName:t,version:n,tableName:s,indexes:r,keyPath:a="id",ownerField:c}=e,i=new pj(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:y,offset:v,filter:g}=f;let x=c&&m?u.where(c).equals(m):u.toCollection();g&&(x=x.filter(g));let b=h===a?await x.toArray():await x.sortBy(h);return _&&(b=b.reverse()),v&&(b=b.slice(v)),typeof y=="number"&&(b=b.slice(0,y)),b}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 fj(){const[,e]=l.useState(null);return l.useCallback(t=>{e(()=>{throw t instanceof Error?t:new Error(String(t))})},[])}function hj({name:e,label:t,helperText:n,required:s,control:r,children:a}){const c=he.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(he.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 _j(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 Ts(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 gj(e,t={}){return he.useForm({...t,resolver:Ts(e)})}function dt(e){return e.replace(/\D/g,"")}function bj(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 yj(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 Ms(e){return dt(e).slice(0,8).replace(/(\d{5})(\d)/,"$1-$2")}function Rs(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 vj(e){return dt(e)}function Tt(e,t="numeric"){return l.forwardRef(function({value:s,onChange:r,...a},c){return o.jsx(Ct,{...a,ref:c,value:e(s??""),inputMode:t,onChange:i=>r(e(i.target.value))})})}const xj=Tt(rs),wj=Tt(Rs),jj=Tt(ss,"tel"),$j=Tt(Ms);function kj(e,t,n){return new Intl.NumberFormat(t,{style:"currency",currency:n}).format(e/100)}function Nj(e){const t=e.replace(/\D/g,"");return t?Number.parseInt(t,10):0}const Sj=l.forwardRef(function({value:t,onChange:n,currency:s="BRL",locale:r="pt-BR",...a},c){return o.jsx(Ct,{...a,ref:c,type:"text",inputMode:"numeric",value:kj(t||0,r,s),onChange:i=>n(Nj(i.target.value))})});function Cj(){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 Ej(e){try{return JSON.parse(e)}catch{return e}}function Ls(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=Ej,onOpen:d,onMessage:p,onClose:m,onError:f,onStatusChange:h}=t;let _=null,y=null,v=null,g=0,x="idle",b=!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(b)return;if(g>=s){j("error");return}const $=Math.min(r*2**g,a);g+=1,y=setTimeout(N,$)}function N(){if(b)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"),!b&&!C.wasClean&&T()}}function k($){return _?.readyState!==WebSocket.OPEN?!1:(_.send($),!0)}function E($,C){b=!0,y&&(clearTimeout(y),y=null),S(),g=0,_&&(j("closing"),_.close($,C),_=null),j("closed")}function D(){y&&(clearTimeout(y),y=null),g=0,b=!1,N()}return N(),{send:k,close:E,reconnect:D,get status(){return x}}}function Tj(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=Ls(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}}const Ds=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*Ds*Math.asin(Math.sqrt(c))}function Mj(e){let t=0;for(let n=1;n<e.length;n+=1)t+=pt(e[n-1],e[n]);return t}function Rj(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 Ps=1.3,Is=50,As={car:1,motorcycle:.95,bus:1.6};function rn(e,t){return t?.[e]??As[e]??1}function Lj(e,t,n="car",s={}){const{circuityFactor:r=Ps,carSpeedKmh:a=Is,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*rn(n,c);return{mode:n,distance_km:i,duration_minutes:d,source:"heuristic"}}function Fs(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 Dj(e){return{latitude:(e.minLatitude+e.maxLatitude)/2,longitude:(e.minLongitude+e.maxLongitude)/2}}function Os(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}}function Pj(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,y=f.duration/60*rn(u,s);return{mode:u,distance_km:h,duration_minutes:y,source:"osrm"}}}}function Bs(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 b={latitude:x.coords.latitude,longitude:x.coords.longitude,timestamp:x.timestamp,accuracy:x.coords.accuracy};if(d){const j=pt(d,b);if(j<t)return;u+=j}d=b,i.push(b),i.length>n&&(i=i.slice(i.length-n)),r?.(i)}function _(x){f("error"),a?.(x)}function y(){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:y,stop:v,clear:g,get points(){return i},get distanceKm(){return u},get status(){return m}}}function Ij(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 y=Bs({...s,onUpdate:v=>{a([...v]),i(y.distanceKm)},onStatusChange:d,onError:v=>m.current?.(v)});return p.current=y,t&&y.start(),()=>{y.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 Aj="tempest_map_3qgBX",Fj="tempest_svg_Da-XM",Oj="tempest_empty_QQGkP",Bj="tempest_loading_R6YCf",zj="tempest_grid_xFsTS",Wj="tempest_path_-A7Sl",qj="tempest_start_OPmUL",Uj="tempest_end_7SX7p",Kj="tempest_current_WFLJk",Hj="tempest_pulse_DUzgL",Gj="tempest_scale_YuwqB",X={map:Aj,svg:Fj,empty:Oj,loading:Bj,grid:zj,path:Wj,start:qj,end:Uj,current:Kj,pulse:Hj,scale:Gj},Qj=l.lazy(()=>Promise.resolve().then(()=>require("./leaflet-map-BzYV9czG.cjs")).then(e=>({default:e.LeafletTrajectory}))),Dn=[.05,.1,.25,.5,1,2,5,10,25,50,100,250,500,1e3];function Jj(e,t){const n=e*t;let s=Dn[0];for(const r of Dn)r<=n&&(s=r);return{km:s,pixels:s/e}}function Yj(e){return e<1?`${Math.round(e*1e3)} m`:`${e%1===0?e:e.toFixed(1)} km`}function Xj({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),[_,y]=l.useState(600);l.useEffect(()=>{const b=h.current;if(!b||typeof ResizeObserver>"u")return;const j=new ResizeObserver(S=>{const M=S[0]?.contentRect.width;M&&M>0&&y(M)});return j.observe(b),()=>j.disconnect()},[]);const v=l.useMemo(()=>t?[...e,t]:[...e],[e,t]),g=l.useMemo(()=>{const b=Fs(v);if(!b)return null;const j=ue.fitProjection(Os(b,.12),_,n,{padding:s}),S=e.map(R=>j.project(R)),M=S.map(R=>`${R.x.toFixed(1)},${R.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:(b.minLatitude+b.maxLatitude)/2,longitude:(b.minLongitude+b.maxLongitude)/2},D=j.project(E),$=j.project({...E,longitude:b.maxLongitude}),C=pt(E,{...E,longitude:b.maxLongitude}),I=Math.abs($.x-D.x)||1,L=C/I||0;return{polyline:M,startPixel:T,endPixel:N,currentPixel:k,kmPerPixel:L}},[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(Qj,{points:e,current:t,tileUrl:i,tileAttribution:u,strokeColor:c})})});const x=a&&g&&g.kmPerPixel>0?Jj(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(b=>o.jsx("line",{x1:0,y1:n*b,x2:_,y2:n*b},`h${b}`)),[.25,.5,.75].map(b=>o.jsx("line",{x1:_*b,y1:0,x2:_*b,y2:n},`v${b}`))]}),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:Yj(x.km)})]})]}):o.jsx("div",{className:X.empty,children:"Sem pontos de trajetória ainda."})})}function Vj(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 Zj(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 Gx(e){if(!e)return null;try{return JSON.parse(e)}catch{return e}}function Qx(e){const{url:t,body:n,method:s="POST",headers:r={},getToken:a,withCredentials:i=!1,onProgress:c,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=i;const _=a?.(),v=p?p():Jt(),y={...r};_&&!("Authorization"in y)&&(y.Authorization=`Bearer ${_}`),v&&!("X-Request-ID"in y)&&(y["X-Request-ID"]=v);for(const[x,b]of Object.entries(y))h.setRequestHeader(x,b);c&&(h.upload.onprogress=x=>{c({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,b=h.getResponseHeader("content-type")??"";if(!x){const j=Gx(h.responseText);f(new kt(Yt(h.status,j,{get:k=>h.getResponseHeader(k)},v)));return}if(h.status===204||!h.responseText){m(void 0);return}if(b.includes("application/json"))try{m(d(h.responseText))}catch(j){f(j)}else m(h.responseText)},h.onerror=()=>{u?.removeEventListener("abort",g),f(new kt({status:0,detail:"Falha de rede no upload.",requestId:v||void 0}))},h.onabort=()=>{u?.removeEventListener("abort",g),f(new DOMException("Aborted","AbortError"))},h.send(n)})}function Jx(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 Yx(e,t={}){const{retries:n=3,initialDelay:s=300,maxDelay:r=1e4,respectRetryAfter:a=!0,shouldRetry:i=()=>!0,onRetry:c,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||!i(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);c?.({attempt:d,delay:h,error:m}),await Jx(h,u)}}throw p}function Xx(){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 Vx(e,t){const{interval:n,disabled:s=!1,stopWhen:r,onError:a}=t,[i,c]=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 v(){if(!(f.current||h.current)){h.current=!0;try{const y=await e();if(f.current)return;c(y),d(null),r?.(y)&&(f.current=!0)}catch(y){f.current||(d(y),a?.(y))}finally{h.current=!1,m(!1),f.current||(_.current=setTimeout(v,n))}}}return l.useEffect(()=>{if(f.current=s,s){_.current&&clearTimeout(_.current);return}return m(!0),v(),()=>{f.current=!0,_.current&&clearTimeout(_.current)}},[n,s]),{data:i,error:u,loading:p,stop:()=>{f.current=!0,_.current&&clearTimeout(_.current)},start:()=>{f.current&&(f.current=!1,v())}}}function ss(e={}){const t=e.name??"tempest-auth",n=e.storage==="session"?()=>sessionStorage:()=>localStorage;return Ot.create()(wt.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:wt.createJSONStorage(n),partialize:s=>({user:s.user,token:s.token}),onRehydrateStorage:()=>s=>{s&&(s.isAuthenticated=!!s.token)}}))}function Zx({isAuthenticated:e,children:t,fallback:n}){return o.jsx(o.Fragment,{children:e?t:n})}function Nn(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 Xt(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(Nn(n)),payload:JSON.parse(Nn(s)),signature:r}}catch{throw new Error("Invalid JWT: header or payload is not valid JSON.")}}function ew(e,t=0){try{const{payload:n}=Xt(e);if(typeof n.exp!="number")return!0;const s=Math.floor(Date.now()/1e3);return n.exp<=s+t}catch{return!0}}function rs(e,t={}){const{retries:n=3,initialDelay:s=400,reloadOnFinalFailure:r=!0}=t;async function a(i=1){try{return await e()}catch(c){if(i>=n)throw r&&typeof window<"u"&&window.location.reload(),c;return await new Promise(u=>setTimeout(u,s*2**(i-1))),a(i+1)}}return l.lazy(a)}function os(e){let t=null;return()=>t||(t=(async()=>{try{await e()}finally{t=null}})(),t)}function tw(e){const t=e??{};return{token:t.access_token,refreshToken:t.refresh_token}}function nw(e){const{baseURL:t,loginPath:n="/api/auth/login",refreshPath:s="/api/auth/refresh",mePath:r,storeName:a="tempest-auth",storage:i="local",withCredentials:c=!1,fetcher:u,parseTokens:d=tw,parseUser:p,refreshBody:m=S=>S?{refresh_token:S}:void 0}=e,f=ss({name:a,storage:i}),h=`${a}-refresh`;function _(){return typeof window>"u"?null:i==="session"?window.sessionStorage:window.localStorage}function v(){return _()?.getItem(h)??null}function y(S){const T=_();T&&(S?T.setItem(h,S):T.removeItem(h))}const g=()=>f.getState(),x=()=>g().token,b=xt({baseURL:t,withCredentials:c,fetcher:u});async function j(){if(!r)return g().user;const S=x(),T=await xt({baseURL:t,withCredentials:c,fetcher:u,getToken:()=>S}).get(r);return g().setUser(T),T}async function k(S){const T=await b.post(n,{body:S}),{token:D,refreshToken:$}=d(T);g().setToken(D),y($??null);const C=p?.(T);return C!=null?(g().setUser(C),C):j()}function M(){g().logout(),y(null)}const E=os(async()=>{const S=await b.post(s,{body:m(v())}),{token:T,refreshToken:D}=d(S);g().setToken(T),D&&y(D)}),N=xt({baseURL:t,withCredentials:c,fetcher:u,getToken:x,refresh:E,onUnauthorized:()=>M()});return{useAuthStore:f,api:N,login:k,logout:M,refresh:E,getToken:x}}const as=l.createContext(null);function sw({control:e,children:t}){return o.jsx(as.Provider,{value:e,children:t})}function is(){return l.useContext(as)}function rw(e){return typeof e=="boolean"?{can:e}:e}function cs(e){const t=is(),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(i=>({...i,isLoading:!0})),Promise.resolve(t.can(e)).then(i=>{if(a)return;const c=rw(i);r({allowed:c.can,isLoading:!1,reason:c.reason})}).catch(i=>{a||r({allowed:!1,isLoading:!1,reason:i instanceof Error?i.message:"access check failed"})}),()=>{a=!0}},[t,n]),s}function ow({action:e,resource:t,params:n,children:s,fallback:r}){const{allowed:a,isLoading:i}=cs({action:e,resource:t,params:n});return i?o.jsx(o.Fragment,{children:r??null}):o.jsx(o.Fragment,{children:a?s:r??null})}function aw(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 iw(e){const t=aw(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 At(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):typeof e=="string"?e.split(/\s+/).filter(Boolean):[]}function cw(e,t){try{const{payload:n}=Xt(e),s=t?.claim??"permissions",r=At(n[s]);if(r.length>0)return r;if(t?.claim===void 0){const a=At(n.scopes);return a.length>0?a:At(n.scope)}return r}catch{return[]}}function lw({component:e,onSuccess:t,onError:n,locale:s,theme:r,text:a,shape:i,size:c,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:i,size:c,useOneTap:!u,width:d})})}function uw(e){const{exchange:t,onSuccess:n,onError:s}=e,[r,a]=l.useState(null),[i,c]=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||(c(f),d("error"),s?.(f))}),()=>{m=!0}},[t,n,s]),{loading:u==="pending",data:r,error:i,status:u}}const ls={SHORT:30*1e3,DEFAULT:300*1e3,LONG:1800*1e3,INFINITE:1/0},us={SHORT:300*1e3,DEFAULT:1800*1e3,LONG:3600*1e3},dw={REALTIME:5*1e3,FAST:30*1e3,DEFAULT:60*1e3,SLOW:300*1e3};function pw(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 ds({children:e,client:t,defaultOptions:n}){const[s]=l.useState(()=>t??new Q.QueryClient({defaultOptions:{queries:{staleTime:ls.DEFAULT,gcTime:us.DEFAULT,retry:1,refetchOnWindowFocus:!1,...n?.queries??{}},mutations:{retry:0,...n?.mutations??{}}}}));return o.jsx(Q.QueryClientProvider,{client:s,children:e})}function mw(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 fw(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 hw(e=20){return{items:[],total:0,page:1,size:e,pages:0}}function _w(e){const{queryKey:t,queryFn:n,initialPage:s=1,pageSize:r=20,sizeParam:a="size",orderBy:i,ascending:c=!1,...u}=e,[d,p]=l.useState(s),m=Q.useQuery({...u,queryKey:[...t,{page:d,pageSize:r,sizeParam:a,orderBy:i,ascending:c}],queryFn:()=>{const b={page:d,[a]:r};return i&&(b.order_by=i,b.ascending=c),n(b)},placeholderData:Q.keepPreviousData}),f=m.data,h=f?.pages??0,_=d<h,v=d>1,y=l.useCallback(b=>p(Math.max(1,b)),[]),g=l.useCallback(()=>p(b=>b<h?b+1:b),[h]),x=l.useCallback(()=>p(b=>b>1?b-1:b),[]);return{page:f,items:f?.items??[],pageNumber:d,pageCount:h,total:f?.total??0,hasNext:_,hasPrev:v,isLoading:m.isLoading,isFetching:m.isFetching,error:m.error,setPage:y,next:g,prev:x,refetch:()=>{m.refetch()}}}function gw(e){const{queryKey:t,queryFn:n,limit:s=20,orderBy:r,ascending:a=!1,...i}=e,c=Q.useInfiniteQuery({...i,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=c.data?.pages??[];return{items:u.flatMap(d=>d.items),pages:u,hasNextPage:c.hasNextPage,isLoading:c.isLoading,isFetchingNextPage:c.isFetchingNextPage,error:c.error,fetchNextPage:()=>{c.fetchNextPage()},refetch:()=>{c.refetch()}}}const bw=(e,t)=>t==null?`/${e}`:`/${e}/${t}`;function yw(e,t={}){const{pageParam:n="page",sizeParam:s="size",sortFieldParam:r="order_by",sortOrderParam:a="ascending",sortOrderAsBoolean:i=!0,updateMethod:c="patch",buildPath:u=bw}=t,d={getList(p,m={}){const{pagination:f,sort:h,filters:_}=m,v={};if(f?.page!=null&&(v[n]=f.page),f?.pageSize!=null&&(v[s]=f.pageSize),h?.field){const g=h.order??"asc";v[r]=h.field,v[a]=i?g==="asc":g}if(_)for(const[g,x]of Object.entries(_))v[g]=x;const y={params:v};return e.get(u(p),y)},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 c==="put"?e.put(h,{body:f}):e.patch(h,{body:f})},deleteOne(p,m){return e.delete(u(p,m))}};return d}const ps=l.createContext(null);function vw({provider:e,children:t}){return o.jsx(ps.Provider,{value:e,children:t})}function Ze(){const e=l.useContext(ps);if(!e)throw new Error("useDataProvider must be used within a <TempestDataProvider>");return e}function ms(e,t){return["data",e,"list",t]}function Vt(e,t){return["data",e,"one",t]}function xw(e,t,n){const s=Ze();return Q.useQuery({queryKey:ms(e,t),queryFn:()=>s.getList(e,t),...n})}function ww(e,t,n){const s=Ze(),{enabled:r,...a}=n??{};return Q.useQuery({queryKey:Vt(e,t),queryFn:()=>s.getOne(e,t),enabled:t!=null&&(r??!0),...a})}function jw(e,t){const n=Ze(),s=Q.useQueryClient();return Q.useMutation({mutationFn:r=>n.create(e,r),onSuccess:(...r)=>{s.invalidateQueries({queryKey:["data",e,"list"]}),t?.onSuccess?.(...r)},...t})}function $w(e,t){const n=Ze(),s=Q.useQueryClient();return Q.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:Vt(e,a.id)}),t?.onSuccess?.(...r)},...t})}function kw(e,t){const n=Ze(),s=Q.useQueryClient();return Q.useMutation({mutationFn:r=>n.deleteOne(e,r),onSuccess:(...r)=>{s.invalidateQueries({queryKey:["data",e,"list"]}),t?.onSuccess?.(...r)},...t})}function fs({when:e,redirectTo:t="/",replace:n=!0,children:s}){return o.jsx(o.Fragment,{children:e?s:o.jsx(A.Navigate,{to:t,replace:n})})}function Nw(e){return e}const Sn=new WeakMap;function Sw(e){let t=Sn.get(e);return t||(t=rs(e.lazy),Sn.set(e,t)),t}function Cw({guard:e,redirectTo:t,children:n}){const s=typeof e=="function"?e():e;return o.jsx(fs,{when:s,redirectTo:t,children:n})}function hs(e){return e.map((t,n)=>{let s=t.element;if(t.lazy){const r=Sw(t);s=o.jsx(r,{})}return t.guard!==void 0&&(s=o.jsx(Cw,{guard:t.guard,redirectTo:t.redirectTo,children:s})),t.index?o.jsx(A.Route,{index:!0,element:s},`index-${n}`):o.jsx(A.Route,{path:t.path,element:s,caseSensitive:t.caseSensitive,children:t.children?hs(t.children):null},t.path??`route-${n}`)})}const Ew={browser:A.BrowserRouter,hash:A.HashRouter,memory:A.MemoryRouter};function Tw({routes:e,router:t="browser",basename:n,initialEntries:s,fallback:r=null}){const a=l.useMemo(()=>hs(e),[e]),i=Ew[t],c=t==="memory"?{basename:n,initialEntries:s}:{basename:n};return o.jsx(i,{...c,children:o.jsx(l.Suspense,{fallback:r,children:o.jsx(A.Routes,{children:a})})})}function Mw(e,t={}){if(!t.persist)return Ot.create()(e);const{name:n,storage:s="local",partialize:r,version:a,migrate:i}=t.persist,c=s==="session"?()=>sessionStorage:()=>localStorage;return Ot.create()(wt.persist(e,{name:n,storage:wt.createJSONStorage(c),...r?{partialize:r}:{},...a!==void 0?{version:a}:{},...i?{migrate:i}:{}}))}function Rw(e){const t=e;t.use={};for(const n of Object.keys(e.getState()))t.use[n]=()=>e(s=>s[n]);return t}const _s=l.createContext(null);function Cn(e){return e==="dark"||e==="light"?e:typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function En(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 Lw(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 gs({children:e,defaultTheme:t="system",storageKey:n="tempest-theme",target:s,attribute:r="data-tempest-theme",themeColor:a}){const[i,c]=l.useState(()=>Lw(n)??t),[u,d]=l.useState(()=>Cn(i)),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 y=p.current?.()??document.documentElement;if(!y)return;const g=Cn(i);En(y,g,r,f.current),d(g)},[i,m]),l.useEffect(()=>{if(i!=="system"||typeof window>"u")return;const y=window.matchMedia("(prefers-color-scheme: dark)"),g=()=>{const x=p.current?.()??document.documentElement;if(!x)return;const b=y.matches?"dark":"light";En(x,b,r,f.current),d(b)};return y.addEventListener("change",g),()=>y.removeEventListener("change",g)},[i,m]);const h=l.useCallback(y=>{if(c(y),n&&typeof window<"u")try{window.localStorage.setItem(n,y)}catch{}},[n]),_=l.useCallback(()=>{h(u==="dark"?"light":"dark")},[u,h]),v=l.useMemo(()=>({theme:i,resolvedTheme:u,setTheme:h,toggle:_}),[i,u,h,_]);return o.jsx(_s.Provider,{value:v,children:e})}function Dw(){const e=l.useContext(_s);if(!e)throw new Error("useTheme must be used inside a <ThemeProvider>");return e}function Tn(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 Zt(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:Tn(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:Tn(f,{count:d,...p??{}})}function i(u,d){return new Intl.NumberFormat(t,d).format(u)}function c(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:i,formatDate:c,withLocale:u=>Zt({locale:u,fallbackLocale:n??void 0,messages:s})}}const bs=l.createContext(null);function Pw(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 ys({children:e,locale:t,fallbackLocale:n,messages:s,storageKey:r="tempest-locale"}){const a=l.useMemo(()=>Object.keys(s),[s]),[i,c]=l.useState(()=>Pw(r,a)??t);l.useEffect(()=>{typeof document<"u"&&document.documentElement.setAttribute("lang",i)},[i]);const u=l.useCallback(p=>{if(c(p),r&&typeof window<"u")try{window.localStorage.setItem(r,p)}catch{}},[r]),d=l.useMemo(()=>({...Zt({locale:i,fallbackLocale:n,messages:s}),setLocale:u,availableLocales:a}),[i,n,s,u,a]);return o.jsx(bs.Provider,{value:d,children:e})}function vs(){const e=l.useContext(bs);if(!e)throw new Error("useI18n must be used inside an <I18nProvider>");return e}function Aw(){return vs().t}function Iw(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 xs 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&&Iw(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 Fw({children:e,query:t,theme:n,i18n:s,errorBoundary:r}){let a=e;return s&&(a=o.jsx(ys,{...s,children:a})),n!==!1&&(a=o.jsx(gs,{...n||{},children:a})),t!==!1&&(a=o.jsx(ds,{...t||{},children:a})),r&&(a=o.jsx(xs,{...r,children:a})),o.jsx(o.Fragment,{children:a})}function Ow(e){try{return JSON.parse(e)}catch{return e}}function ws(e,t={}){const{withCredentials:n=!1,namedEvents:s=[],heartbeatEvents:r=["ping"],maxRetries:a=10,initialBackoff:i=1e3,maxBackoff:c=3e4,parser:u=Ow,onOpen:d,onMessage:p,onError:m,onStatusChange:f}=t;let h=null,_=null,v=0,y="idle",g=!1;function x(N){y!==N&&(y=N,f?.(N))}function b(N,S){r.includes(N)||p?.({event:N,data:u(S.data),id:S.lastEventId||void 0,raw:S})}function j(){if(g)return;if(v>=a){x("error");return}const N=Math.min(i*2**v,c);v+=1,_=setTimeout(k,N)}function k(){if(g)return;h&&h.close(),x("connecting");const N=new EventSource(e,{withCredentials:n});h=N,N.onopen=()=>{v=0,x("open"),d?.()},N.onmessage=S=>b("message",S);for(const S of s)N.addEventListener(S,T=>b(S,T));for(const S of r)N.addEventListener(S,()=>{});N.onerror=S=>{m?.(S),N.close(),h=null,x("closed"),j()}}function M(){g=!0,_&&(clearTimeout(_),_=null),v=0,h&&(h.close(),h=null),x("closed")}function E(){_&&(clearTimeout(_),_=null),v=0,g=!1,k()}return k(),{close:M,reconnect:E,get status(){return y}}}function Bw(e,t={}){const{enabled:n=!0,onMessage:s,...r}=t,[a,i]=l.useState("idle"),[c,u]=l.useState(null),d=l.useRef(null),p=l.useRef(s);return p.current=s,l.useEffect(()=>{if(!n||!e){i("idle");return}const m=ws(e,{...r,onStatusChange:i,onMessage:f=>{u(f),p.current?.(f)}});return d.current=m.reconnect,()=>{m.close(),d.current=null}},[e,n]),{status:a,lastMessage:c,reconnect:()=>d.current?.()}}function js(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 i=0;i<s.length;i++)a[i]=s.charCodeAt(i);return a}function lt(){return typeof window<"u"&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window}class Ht extends Error{constructor(){super("Web Push não suportado neste navegador."),this.name="WebPushUnsupportedError"}}class $s extends Error{constructor(){super("Permissão de notificação negada pelo usuário."),this.name="WebPushPermissionDeniedError"}}class ks{config;constructor(t){this.config=t}static isSupported(){return lt()}async registration(){if(!lt())throw new Ht;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 Ht;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 $s;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:js(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 zw(e){const t=l.useRef(e);t.current=e;const n=l.useMemo(()=>new ks({vapidPublicKey:e.vapidPublicKey,onSubscribe:v=>t.current.onSubscribe(v),onUnsubscribe:v=>t.current.onUnsubscribe?.(v),getRegistration:e.getRegistration}),[e.vapidPublicKey,e.getRegistration]),[s]=l.useState(()=>lt()),[r,a]=l.useState(()=>n.permission()),[i,c]=l.useState(!1),[u,d]=l.useState(!1),[p,m]=l.useState(null),f=l.useCallback(async()=>{if(s){a(n.permission());try{const v=await n.isSubscribed();c(v)}catch(v){m(v instanceof Error?v:new Error(String(v)))}}},[n,s]);l.useEffect(()=>{f()},[f]);const h=l.useCallback(async()=>{if(s){d(!0),m(null);try{await n.subscribe(),c(!0),a(n.permission())}catch(v){throw m(v instanceof Error?v:new Error(String(v))),v}finally{d(!1)}}},[n,s]),_=l.useCallback(async()=>{if(s){d(!0),m(null);try{await n.unsubscribe(),c(!1)}catch(v){throw m(v instanceof Error?v:new Error(String(v))),v}finally{d(!1)}}},[n,s]);return{supported:s,permission:r,subscribed:i,loading:u,error:p,subscribe:h,unsubscribe:_,refresh:f}}function en(){let e=null;async function t(s,{volume:r=1,loop:a=!1,autoplay:i=!0,stopPrevious:c=!1,onEnded:u,onError:d}={}){try{c&&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,i&&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 Ft=null;function Ns(){return Ft||(Ft=en()),Ft}async function Ww(e,t){return Ns().play(e,t)}function qw(){Ns().stop()}function Kw(){const e=l.useRef(null),[t,n]=l.useState(!1);e.current||(e.current=en()),l.useEffect(()=>()=>{e.current?.stop()},[]);const s=l.useCallback(async(a,i)=>{await e.current.play(a,i)&&n(!0)},[]),r=l.useCallback(()=>{e.current?.stop()},[]);return{play:s,stop:r,unlocked:t}}class Uw extends Ws{store;constructor(t,n,s,r){super(t),this.version(n).stores({[s]:r}),this.store=this.table(s)}}function Hw(e){const{databaseName:t,version:n,tableName:s,indexes:r,keyPath:a="id",ownerField:i}=e,c=new Uw(t,n,s,r),u=c.store;function d(m,f){return!i||!f?m:{...m,[i]:f}}async function p(m,f={}){const{orderBy:h=a,reverse:_=!1,limit:v,offset:y,filter:g}=f;let x=i&&m?u.where(i).equals(m):u.toCollection();g&&(x=x.filter(g));let b=h===a?await x.toArray():await x.sortBy(h);return _&&(b=b.reverse()),y&&(b=b.slice(y)),typeof v=="number"&&(b=b.slice(0,v)),b}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 i&&m?u.where(i).equals(m).modify(h):u.toCollection().modify(h)},delete:m=>u.delete(m),clear:async m=>{if(i&&m){await u.where(i).equals(m).delete();return}await u.clear()},count:m=>i&&m?u.where(i).equals(m).count():u.count(),raw:u,db:c}}function Gw(){const[,e]=l.useState(null);return l.useCallback(t=>{e(()=>{throw t instanceof Error?t:new Error(String(t))})},[])}function Qw({name:e,label:t,helperText:n,required:s,control:r,children:a}){const i=fe.useFormContext(),c=r??i?.control;if(!c)throw new Error("FormField requires either a `control` prop or a <FormProvider> in the tree.");return o.jsx(fe.Controller,{name:e,control:c,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 Jw(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 Ss(e){return async(t,n,s)=>{const r=e.safeParse(t);if(r.success)return{values:r.data,errors:{}};const a={},i=s.criteriaMode??"firstError";for(const c of r.error.issues){const u=c.path.length===0?"_root":c.path.join(".");i==="firstError"&&a[u]||(a[u]={type:c.code,message:c.message})}return{values:{},errors:a}}}function Yw(e,t={}){return fe.useForm({...t,resolver:Ss(e)})}function dt(e){return e.replace(/\D/g,"")}function Xw(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 Vw(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 c=0;c<12;c++)a+=n[c]*s[c];let i=a%11;if(i=i<2?0:11-i,i!==n[12])return!1;a=0;for(let c=0;c<13;c++)a+=n[c]*r[c];return i=a%11,i=i<2?0:11-i,i===n[13]}function Cs(e){return dt(e).slice(0,8).replace(/(\d{5})(\d)/,"$1-$2")}function Es(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 Zw(e){return dt(e)}function St(e,t="numeric"){return l.forwardRef(function({value:s,onChange:r,...a},i){return o.jsx(P.Input,{...a,ref:i,value:e(s??""),inputMode:t,onChange:c=>r(e(c.target.value))})})}const ej=St(ts),tj=St(Es),nj=St(es,"tel"),sj=St(Cs);function rj(e,t,n){return new Intl.NumberFormat(t,{style:"currency",currency:n}).format(e/100)}function oj(e){const t=e.replace(/\D/g,"");return t?Number.parseInt(t,10):0}const aj=l.forwardRef(function({value:t,onChange:n,currency:s="BRL",locale:r="pt-BR",...a},i){return o.jsx(P.Input,{...a,ref:i,type:"text",inputMode:"numeric",value:rj(t||0,r,s),onChange:c=>n(oj(c.target.value))})});function ij(){const[e,t]=l.useState(!1),[n,s]=l.useState(null),[r,a]=l.useState(null),i=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)}},[]),c=l.useCallback(()=>{t(!1),s(null),a(null)},[]);return{loading:e,error:n,data:r,lookup:i,reset:c}}function cj(e){try{return JSON.parse(e)}catch{return e}}function Ts(e,t={}){const{protocols:n,maxRetries:s=10,initialBackoff:r=1e3,maxBackoff:a=3e4,pingInterval:i=0,pingPayload:c=JSON.stringify({type:"ping"}),parser:u=cj,onOpen:d,onMessage:p,onClose:m,onError:f,onStatusChange:h}=t;let _=null,v=null,y=null,g=0,x="idle",b=!1;function j($){x!==$&&(x=$,h?.($))}function k(){y&&(clearInterval(y),y=null)}function M(){!i||i<=0||(k(),y=setInterval(()=>{_?.readyState===WebSocket.OPEN&&_.send(c)},i))}function E(){if(b)return;if(g>=s){j("error");return}const $=Math.min(r*2**g,a);g+=1,v=setTimeout(N,$)}function N(){if(b)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=>{k(),m?.(C),_=null,j("closed"),!b&&!C.wasClean&&E()}}function S($){return _?.readyState!==WebSocket.OPEN?!1:(_.send($),!0)}function T($,C){b=!0,v&&(clearTimeout(v),v=null),k(),g=0,_&&(j("closing"),_.close($,C),_=null),j("closed")}function D(){v&&(clearTimeout(v),v=null),g=0,b=!1,N()}return N(),{send:S,close:T,reconnect:D,get status(){return x}}}function lj(e,t={}){const{enabled:n=!0,onMessage:s,...r}=t,[a,i]=l.useState("idle"),[c,u]=l.useState(null),d=l.useRef(null),p=l.useRef(s);p.current=s,l.useEffect(()=>{if(!n||!e){i("idle");return}const h=Ts(e,{...r,onStatusChange:i,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:c,send:m,reconnect:f}}const Ms=1.3,Rs=50,Ls={car:1,motorcycle:.95,bus:1.6};function tn(e,t){return t?.[e]??Ls[e]??1}function uj(e,t,n="car",s={}){const{circuityFactor:r=Ms,carSpeedKmh:a=Rs,modeDurationFactors:i}=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 c=P.haversineKm(e,t)*r,d=c/a*60*tn(n,i);return{mode:n,distance_km:c,duration_minutes:d,source:"heuristic"}}function Ds(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 dj(e){return{latitude:(e.minLatitude+e.maxLatitude)/2,longitude:(e.minLongitude+e.maxLongitude)/2}}function Ps(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}}function pj(e){const{baseUrl:t,fetch:n=globalThis.fetch,modeDurationFactors:s}=e,r=t.replace(/\/+$/,"");return{async route(a,i,c={}){const u=c.mode??"car",d=`${a.longitude},${a.latitude};${i.longitude},${i.latitude}`,p=`${r}/route/v1/driving/${d}?overview=false`;let m;try{m=await(await n(p)).json()}catch(y){throw new Error(`OSRM request failed: ${String(y)}`,{cause:y})}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,v=f.duration/60*tn(u,s);return{mode:u,distance_km:h,duration_minutes:v,source:"osrm"}}}}function As(e={}){const{minDistanceKm:t=.005,maxPoints:n=1/0,positionOptions:s,onUpdate:r,onError:a,onStatusChange:i}=e;let c=[],u=0,d=null,p=null,m="idle";function f(x){m!==x&&(m=x,i?.(x))}function h(x){const b={latitude:x.coords.latitude,longitude:x.coords.longitude,timestamp:x.timestamp,accuracy:x.coords.accuracy};if(d){const j=P.haversineKm(d,b);if(j<t)return;u+=j}d=b,c.push(b),c.length>n&&(c=c.slice(c.length-n)),r?.(c)}function _(x){f("error"),a?.(x)}function v(){if(p===null){if(typeof navigator>"u"||!navigator.geolocation){f("error");return}f("tracking"),p=navigator.geolocation.watchPosition(h,_,s)}}function y(){p!==null&&typeof navigator<"u"&&navigator.geolocation&&navigator.geolocation.clearWatch(p),p=null,f("idle")}function g(){y(),c=[],u=0,d=null,r?.(c)}return{start:v,stop:y,clear:g,get points(){return c},get distanceKm(){return u},get status(){return m}}}function mj(e={}){const{autoStart:t=!1,onError:n,...s}=e,[r,a]=l.useState([]),[i,c]=l.useState(0),[u,d]=l.useState("idle"),p=l.useRef(null),m=l.useRef(n);m.current=n,l.useEffect(()=>{const v=As({...s,onUpdate:y=>{a([...y]),c(v.distanceKm)},onStatusChange:d,onError:y=>m.current?.(y)});return p.current=v,t&&v.start(),()=>{v.stop(),p.current=null}},[]);const f=l.useCallback(()=>p.current?.start(),[]),h=l.useCallback(()=>p.current?.stop(),[]),_=l.useCallback(()=>{p.current?.clear(),c(0)},[]);return{points:r,lastPoint:r.length>0?r[r.length-1]:null,distanceKm:i,status:u,isTracking:u==="tracking",start:f,stop:h,clear:_}}const fj="tempest_map_3qgBX",hj="tempest_svg_Da-XM",_j="tempest_empty_QQGkP",gj="tempest_loading_R6YCf",bj="tempest_grid_xFsTS",yj="tempest_path_-A7Sl",vj="tempest_start_OPmUL",xj="tempest_end_7SX7p",wj="tempest_current_WFLJk",jj="tempest_pulse_DUzgL",$j="tempest_marker_HB3Rb",kj="tempest_scale_YuwqB",G={map:fj,svg:hj,empty:_j,loading:gj,grid:bj,path:yj,start:vj,end:xj,current:wj,pulse:jj,marker:$j,scale:kj},Nj=l.lazy(()=>Promise.resolve().then(()=>require("./leaflet-map-BzYV9czG.cjs")).then(e=>({default:e.LeafletTrajectory}))),Mn=[.05,.1,.25,.5,1,2,5,10,25,50,100,250,500,1e3];function Sj(e,t){const n=e*t;let s=Mn[0];for(const r of Mn)r<=n&&(s=r);return{km:s,pixels:s/e}}function Cj(e){return e<1?`${Math.round(e*1e3)} m`:`${e%1===0?e:e.toFixed(1)} km`}function Ej({points:e,current:t,height:n=320,padding:s=24,showGrid:r=!0,showScale:a=!0,strokeColor:i,tileUrl:c,tileAttribution:u,label:d="Trajetória",markers:p,onMarkerClick:m,className:f,style:h,..._}){const v=l.useRef(null),[y,g]=l.useState(600);l.useEffect(()=>{const k=v.current;if(!k||typeof ResizeObserver>"u")return;const M=new ResizeObserver(E=>{const N=E[0]?.contentRect.width;N&&N>0&&g(N)});return M.observe(k),()=>M.disconnect()},[]);const x=l.useMemo(()=>[...e,...t?[t]:[],...p??[]],[e,t,p]),b=l.useMemo(()=>{const k=Ds(x);if(!k)return null;const M=P.fitProjection(Ps(k,.12),y,n,{padding:s}),E=e.map(_e=>M.project(_e)),N=E.map(_e=>`${_e.x.toFixed(1)},${_e.y.toFixed(1)}`).join(" "),S=E[0]??null,T=E.length>0?E[E.length-1]:null,D=t?M.project(t):null,$={latitude:(k.minLatitude+k.maxLatitude)/2,longitude:(k.minLongitude+k.maxLongitude)/2},C=M.project($),I=M.project({...$,longitude:k.maxLongitude}),L=P.haversineKm($,{...$,longitude:k.maxLongitude}),R=Math.abs(I.x-C.x)||1,W=L/R||0,We=(p??[]).map(_e=>({marker:_e,p:M.project(_e)}));return{polyline:N,startPixel:S,endPixel:T,currentPixel:D,kmPerPixel:W,markerPixels:We}},[x,e,t,p,y,n,s]);if(c)return o.jsx("div",{ref:v,className:w.cn(G.map,f),style:{height:n,...h},role:"img","aria-label":d,..._,children:o.jsx(l.Suspense,{fallback:o.jsx("div",{className:G.loading,children:"Carregando mapa…"}),children:o.jsx(Nj,{points:e,current:t,tileUrl:c,tileAttribution:u,strokeColor:i})})});const j=a&&b&&b.kmPerPixel>0?Sj(b.kmPerPixel,Math.min(120,y*.35)):null;return o.jsx("div",{ref:v,className:w.cn(G.map,f),style:{height:n,...h},role:"img","aria-label":d,..._,children:b?o.jsxs("svg",{className:G.svg,width:"100%",height:n,viewBox:`0 0 ${y} ${n}`,preserveAspectRatio:"xMidYMid meet",children:[r&&o.jsxs("g",{className:G.grid,children:[[.25,.5,.75].map(k=>o.jsx("line",{x1:0,y1:n*k,x2:y,y2:n*k},`h${k}`)),[.25,.5,.75].map(k=>o.jsx("line",{x1:y*k,y1:0,x2:y*k,y2:n},`v${k}`))]}),b.polyline&&o.jsx("polyline",{className:G.path,points:b.polyline,fill:"none",stroke:i,"data-testid":"trajectory-path"}),b.startPixel&&o.jsx("circle",{className:G.start,cx:b.startPixel.x,cy:b.startPixel.y,r:5}),b.endPixel&&!t&&o.jsx("circle",{className:G.end,cx:b.endPixel.x,cy:b.endPixel.y,r:5}),b.currentPixel&&o.jsxs(o.Fragment,{children:[o.jsx("circle",{className:G.pulse,cx:b.currentPixel.x,cy:b.currentPixel.y,r:10}),o.jsx("circle",{className:G.current,cx:b.currentPixel.x,cy:b.currentPixel.y,r:5})]}),b.markerPixels.map(({marker:k,p:M},E)=>{const N=!!m;return o.jsx("circle",{className:G.marker,cx:M.x,cy:M.y,r:k.radius??6,style:k.color?{fill:k.color}:void 0,"data-marker-id":k.id??E,tabIndex:N?0:void 0,role:N?"button":void 0,"aria-label":k.label,onClick:N?()=>m?.(k,E):void 0,onKeyDown:N?S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),m?.(k,E))}:void 0,children:k.label?o.jsx("title",{children:k.label}):null},k.id??E)}),j&&o.jsxs("g",{className:G.scale,transform:`translate(${s}, ${n-s})`,children:[o.jsx("line",{x1:0,y1:0,x2:j.pixels,y2:0}),o.jsx("line",{x1:0,y1:-4,x2:0,y2:4}),o.jsx("line",{x1:j.pixels,y1:-4,x2:j.pixels,y2:4}),o.jsx("text",{x:j.pixels/2,y:-8,textAnchor:"middle",children:Cj(j.km)})]})]}):o.jsx("div",{className:G.empty,children:"Sem pontos de trajetória ainda."})})}function Tj(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 Mj(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 Pn=["debug","info","warn","error"];function e$(e,t){return Pn.indexOf(t)>=Pn.indexOf(e)}const zs=({level:e,message:t,context:n})=>{const s=e==="debug"?"log":e;n?console[s](t,n):console[s](t)};function Ws(e={}){const t=e.level??"info",n=e.sinks??[zs],s=e.namespace??"";function r(a,c,i){if(!e$(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=>Ws({level:t,sinks:n,namespace:s?`${s}:${a}`:a})}}const qs=l.createContext(null);function t$({adapter:e,children:t}){l.useEffect(()=>(e.init?.(),()=>{e.flush?.()}),[e]);const n=l.useMemo(()=>e,[e]);return o.jsx(qs.Provider,{value:n,children:t})}function n$(){return l.useContext(qs)}const s$={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 r$(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 o$(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(r$(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 a$(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 c$(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,a$(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 Us=l.createContext(null);function i$({adapter:e,children:t}){const n=l.useMemo(()=>e,[e]);return l.useEffect(()=>{},[n]),o.jsx(Us.Provider,{value:n,children:t})}function Ks(){const e=l.useContext(Us);if(!e)throw new Error("useFeatureFlag requires <FeatureFlagsProvider>");return e}function l$(e,t=!1){const n=Ks(),s=a=>n.onChange?n.onChange(a):()=>{},r=()=>n.isEnabled(e,t);return l.useSyncExternalStore(s,r,r)}function u$(e,t){const n=Ks(),s=a=>n.onChange?n.onChange(a):()=>{},r=()=>n.get(e,t);return l.useSyncExternalStore(s,r,r)}function d$(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 p$(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 m$(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 f$(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 h$(){return typeof navigator<"u"&&"share"in navigator}exports.createPartialResponse=_e.createPartialResponse;exports.installBackgroundSync=_e.installBackgroundSync;exports.installNotificationClickHandler=_e.installNotificationClickHandler;exports.installPrecache=_e.installPrecache;exports.installPushHandler=_e.installPushHandler;exports.installRuntimeCache=_e.installRuntimeCache;exports.installSkipWaitingListener=_e.installSkipWaitingListener;exports.registerServiceWorker=_e.registerServiceWorker;exports.skipWaiting=_e.skipWaiting;exports.unregisterAllServiceWorkers=_e.unregisterAllServiceWorkers;exports.cn=w.cn;Object.defineProperty(exports,"BrowserRouter",{enumerable:!0,get:()=>P.BrowserRouter});Object.defineProperty(exports,"HashRouter",{enumerable:!0,get:()=>P.HashRouter});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>P.Link});Object.defineProperty(exports,"MemoryRouter",{enumerable:!0,get:()=>P.MemoryRouter});Object.defineProperty(exports,"NavLink",{enumerable:!0,get:()=>P.NavLink});Object.defineProperty(exports,"Navigate",{enumerable:!0,get:()=>P.Navigate});Object.defineProperty(exports,"Outlet",{enumerable:!0,get:()=>P.Outlet});Object.defineProperty(exports,"Route",{enumerable:!0,get:()=>P.Route});Object.defineProperty(exports,"Routes",{enumerable:!0,get:()=>P.Routes});Object.defineProperty(exports,"redirect",{enumerable:!0,get:()=>P.redirect});Object.defineProperty(exports,"useLocation",{enumerable:!0,get:()=>P.useLocation});Object.defineProperty(exports,"useMatch",{enumerable:!0,get:()=>P.useMatch});Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:()=>P.useNavigate});Object.defineProperty(exports,"useParams",{enumerable:!0,get:()=>P.useParams});Object.defineProperty(exports,"useRouteError",{enumerable:!0,get:()=>P.useRouteError});Object.defineProperty(exports,"useSearchParams",{enumerable:!0,get:()=>P.useSearchParams});Object.defineProperty(exports,"Controller",{enumerable:!0,get:()=>he.Controller});Object.defineProperty(exports,"FormProvider",{enumerable:!0,get:()=>he.FormProvider});Object.defineProperty(exports,"useFieldArray",{enumerable:!0,get:()=>he.useFieldArray});Object.defineProperty(exports,"useForm",{enumerable:!0,get:()=>he.useForm});Object.defineProperty(exports,"useFormContext",{enumerable:!0,get:()=>he.useFormContext});Object.defineProperty(exports,"useFormState",{enumerable:!0,get:()=>he.useFormState});Object.defineProperty(exports,"useWatch",{enumerable:!0,get:()=>he.useWatch});exports.MERCATOR_MAX_LATITUDE=ue.MERCATOR_MAX_LATITUDE;exports.Select=ue.Select;exports.clampLatitude=ue.clampLatitude;exports.fitProjection=ue.fitProjection;exports.isCoordinate=ue.isCoordinate;exports.isValidLatitude=ue.isValidLatitude;exports.isValidLongitude=ue.isValidLongitude;exports.normalizeLongitude=ue.normalizeLongitude;exports.projectMercator=ue.projectMercator;exports.unprojectMercator=ue.unprojectMercator;exports.AccessControlProvider=$w;exports.Accordion=tr;exports.Alert=_r;exports.AppBar=Mr;exports.AppProviders=oj;exports.AppRouter=Xw;exports.AppShell=zr;exports.AspectRatio=Ur;exports.AuthGuard=vw;exports.Avatar=ro;exports.BREAKPOINTS=kt;exports.Badge=vo;exports.Banner=Ro;exports.BottomNavigation=Bo;exports.BottomSheet=Qo;exports.Breadcrumbs=ea;exports.Button=Xe;exports.CACHE_TIME=ms;exports.CEPInput=$j;exports.CNPJInput=wj;exports.CPFInput=xj;exports.Calendar=bb;exports.Can=Nw;exports.Card=Da;exports.Carousel=qy;exports.Center=Oa;exports.Checkbox=Ga;exports.ChipInput=oc;exports.ClickOutside=R_;exports.Collapsible=mg;exports.Combobox=vc;exports.Command=Hg;exports.ConditionalWrapper=L_;exports.ConfirmDialog=An;exports.Container=lu;exports.ContextMenu=vg;exports.CopyButton=v_;exports.DEFAULT_CAR_SPEED_KMH=Is;exports.DEFAULT_CIRCUITY_FACTOR=Ps;exports.DEFAULT_MODE_DURATION_FACTORS=As;exports.DataList=q_;exports.DataTable=Dv;exports.DatePicker=ti;exports.DateRangePicker=my;exports.DescriptionList=G_;exports.Divider=li;exports.Drawer=Ci;exports.DropdownMenu=Wi;exports.Dropzone=Qi;exports.EARTH_RADIUS_KM=Ds;exports.EmptyState=el;exports.ErrorBoundary=$s;exports.ErrorState=al;exports.ErrorText=A_;exports.FeatureFlagsProvider=i$;exports.FileUpload=jl;exports.FloatingActionButton=rx;exports.For=D_;exports.Form=Bl;exports.FormActions=ql;exports.FormField=hj;exports.FormRow=Wl;exports.FormSection=zl;exports.GoogleSignIn=Tw;exports.Grid=mu;exports.Hide=Hp;exports.HoverCard=Eg;exports.I18nProvider=ws;exports.Image=B_;exports.Input=Ct;exports.InstallBanner=xu;exports.InstallButton=wu;exports.Kbd=Su;exports.Label=lg;exports.ListTile=Uv;exports.Menubar=Ry;exports.Modal=Yt;exports.ModalsProvider=Tu;exports.Money=k_;exports.MoneyInput=Sj;exports.MultiSelect=Kb;exports.NProgressBar=Ju;exports.Navbar=qu;exports.NavigationMenu=xy;exports.NavigationRail=hx;exports.Page=cd;exports.Pagination=qn;exports.PasswordInput=Ad;exports.PhoneInput=jj;exports.PinInput=Yd;exports.Popover=rp;exports.Portal=Vn;exports.Progress=fp;exports.QueryProvider=fs;exports.REFETCH_TIME=Rw;exports.Radio=$p;exports.RadioGroup=kp;exports.RangeSlider=Dp;exports.RatingStars=qp;exports.RefreshIndicator=Lx;exports.RelativeTime=$_;exports.Resizable=sb;exports.RouteGuard=gs;exports.STALE_TIME=ps;exports.SafeArea=em;exports.ScrollArea=Yg;exports.SearchBar=Gn;exports.SegmentedControl=_m;exports.Show=Kp;exports.Sidebar=Sm;exports.Skeleton=Mm;exports.Slider=Sb;exports.Spacer=Im;exports.Spinner=Qn;exports.Stack=du;exports.Stat=of;exports.Stepper=hf;exports.StepperInput=Sf;exports.Switch=Df;exports.Table=Jn;exports.Tabs=mh;exports.Tag=Gf;exports.TelemetryProvider=t$;exports.TempestApiError=St;exports.TempestDataProvider=zw;exports.Textarea=xh;exports.ThemeProvider=vs;exports.TimePicker=Sx;exports.Timeline=Ah;exports.ToastProvider=l_;exports.Toggle=eg;exports.ToggleGroup=og;exports.ToggleGroupItem=ag;exports.Tooltip=Kh;exports.TrajectoryMap=Xj;exports.TruncateText=C_;exports.VirtualList=g_;exports.VisuallyHidden=M_;exports.WebPushClient=Cs;exports.WebPushPermissionDeniedError=Ss;exports.WebPushUnsupportedError=Jt;exports.assertNever=nw;exports.bearingDeg=Rj;exports.boundingBox=Fs;exports.boundsCenter=Dj;exports.buildApiError=Zt;exports.camelCase=Wx;exports.capitalize=zx;exports.chunk=Gx;exports.clamp=qt;exports.consoleSink=zs;exports.consoleTelemetryAdapter=s$;exports.createApiClient=jt;exports.createAudioPlayer=sn;exports.createAuthStore=as;exports.createDataProvider=Bw;exports.createEventStream=ks;exports.createGrowthBookFeatureFlagsAdapter=p$;exports.createI18n=nn;exports.createInMemoryFlags=d$;exports.createLaunchDarklyFeatureFlagsAdapter=m$;exports.createLogger=Ws;exports.createOSRMBackend=Pj;exports.createOfflineStore=mj;exports.createPositionTracker=Bs;exports.createPostHogTelemetryAdapter=c$;exports.createQueryKeys=Lw;exports.createRefreshQueue=is;exports.createRoleAccessControl=Cw;exports.createSelectors=Zw;exports.createSentryTelemetryAdapter=o$;exports.createStore=Vw;exports.createTempestAuth=jw;exports.createWebSocket=Ls;exports.debounce=sw;exports.decodeJWT=en;exports.deepMerge=os;exports.defineRoutes=Gw;exports.durationFactor=rn;exports.emptyOffsetPage=Iw;exports.estimatePasswordStrength=Un;exports.estimateTravel=Lj;exports.expandBounds=Os;exports.formatBytes=_f;exports.formatCEP=Ms;exports.formatCNPJ=Rs;exports.formatCPF=rs;exports.formatCompactNumber=gf;exports.formatCurrency=Dx;exports.formatDate=Px;exports.formatDateTime=Ix;exports.formatPercent=Ax;exports.formatPhone=ss;exports.generateIdempotencyKey=bw;exports.getInitialTheme=Vj;exports.groupBy=Kx;exports.haversineKm=pt;exports.isApiError=lw;exports.isCursorPage=Pw;exports.isDefined=Vx;exports.isEmpty=Xx;exports.isJWTExpired=xw;exports.isNumber=ew;exports.isOffsetPage=Dw;exports.isPlainObject=tw;exports.isPushSupported=lt;exports.isShareSupported=h$;exports.isString=Zx;exports.kebabCase=qx;exports.lazyWithRetry=cs;exports.listQueryKey=_s;exports.memoizeOne=aw;exports.nprogress=Wn;exports.omit=Yx;exports.once=ow;exports.oneQueryKey=tn;exports.parseResponse=mw;exports.pathLengthKm=Mj;exports.permissionsFromToken=Ew;exports.pick=Jx;exports.playAudio=lj;exports.pluralize=Ux;exports.randomId=Vt;exports.range=Qx;exports.relativeTime=Xn;exports.retry=gw;exports.share=f$;exports.sleep=cw;exports.slugify=Ox;exports.stopAudio=uj;exports.storage=Fx;exports.themeInitScript=Zj;exports.throttle=rw;exports.toRadians=Te;exports.truncate=Bx;exports.uniqueBy=Hx;exports.unmask=vj;exports.uploadWithProgress=hw;exports.urlBase64ToUint8Array=Ns;exports.useAccessControl=us;exports.useAsync=Vy;exports.useAudio=dj;exports.useBeforeInstallPrompt=Xt;exports.useBreakpoint=We;exports.useCan=ds;exports.useClickOutside=Sv;exports.useClientFilter=Ky;exports.useClipboard=sv;exports.useCounter=xv;exports.useCreate=Uw;exports.useCursorQuery=Fw;exports.useDataProvider=Ze;exports.useDebounce=Uy;exports.useDeepMemo=dv;exports.useDelete=Hw;exports.useDisclosure=yv;exports.useDocumentTitle=wv;exports.useDocumentVisibility=ev;exports.useErrorHandler=fj;exports.useEventListener=Gy;exports.useEventStream=cj;exports.useFavicon=jv;exports.useFeatureFlag=l$;exports.useFlagValue=u$;exports.useFocusTrap=es;exports.useGeolocation=iv;exports.useHover=gv;exports.useI18n=js;exports.useIdle=cv;exports.useIntersectionObserver=tv;exports.useInterval=mv;exports.useIsFirstRender=Cv;exports.useKeyboardShortcut=av;exports.useList=Ww;exports.useListState=vv;exports.useLocalStorage=Yy;exports.useLongPress=bv;exports.useMap=$v;exports.useMediaQuery=Hy;exports.useModals=Lu;exports.useOAuthCallback=Mw;exports.useOne=qw;exports.useOnline=Zy;exports.usePaginatedQuery=Aw;exports.usePagination=ns;exports.usePoll=yw;exports.usePositionTracker=Ij;exports.usePrevious=pv;exports.usePushSubscription=ij;exports.useQueue=Nv;exports.useResizeObserver=nv;exports.useScrollLock=lv;exports.useSet=kv;exports.useStableCallback=uv;exports.useTelemetry=n$;exports.useTheme=tj;exports.useThrottle=hv;exports.useTimeout=fv;exports.useToast=i_;exports.useToggle=Xy;exports.useTranslate=sj;exports.useUpdate=Kw;exports.useViaCEP=Cj;exports.useWebSocket=Tj;exports.useWindowSize=_v;exports.useZodForm=gj;exports.validateCNPJ=yj;exports.validateCPF=bj;exports.validateForm=_j;exports.withTimeout=iw;exports.zodResolver=Ts;
|
|
14
|
+
`.trim()}const Rn=["debug","info","warn","error"];function Rj(e,t){return Rn.indexOf(t)>=Rn.indexOf(e)}const Is=({level:e,message:t,context:n})=>{const s=e==="debug"?"log":e;n?console[s](t,n):console[s](t)};function Fs(e={}){const t=e.level??"info",n=e.sinks??[Is],s=e.namespace??"";function r(a,i,c){if(!Rj(t,a))return;const u={level:a,message:s?`[${s}] ${i}`:i,context:c,timestamp:Date.now()};for(const d of n)try{d(u)}catch{}}return{debug:(a,i)=>r("debug",a,i),info:(a,i)=>r("info",a,i),warn:(a,i)=>r("warn",a,i),error:(a,i)=>r("error",a,i),child:a=>Fs({level:t,sinks:n,namespace:s?`${s}:${a}`:a})}}const Os=l.createContext(null);function Lj({adapter:e,children:t}){l.useEffect(()=>(e.init?.(),()=>{e.flush?.()}),[e]);const n=l.useMemo(()=>e,[e]);return o.jsx(Os.Provider,{value:n,children:t})}function Dj(){return l.useContext(Os)}const Pj={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 Aj(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 Ij(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(Aj(a))},track(a){t.addBreadcrumb({category:r,message:a.name,level:"info",...a.properties?{data:a.properties}:null})},captureException(a,i){t.captureException(a,i?{extra:i}:void 0)},async flush(){t.flush&&await t.flush(s)}}}function Fj(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 Oj(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,Fj(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 Bs=l.createContext(null);function Bj({adapter:e,children:t}){const n=l.useMemo(()=>e,[e]);return l.useEffect(()=>{},[n]),o.jsx(Bs.Provider,{value:n,children:t})}function zs(){const e=l.useContext(Bs);if(!e)throw new Error("useFeatureFlag requires <FeatureFlagsProvider>");return e}function zj(e,t=!1){const n=zs(),s=a=>n.onChange?n.onChange(a):()=>{},r=()=>n.isEnabled(e,t);return l.useSyncExternalStore(s,r,r)}function Wj(e,t){const n=zs(),s=a=>n.onChange?n.onChange(a):()=>{},r=()=>n.get(e,t);return l.useSyncExternalStore(s,r,r)}function qj(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 Kj(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,i=!1){const c=t.isOn(a);return typeof c=="boolean"?c:i},get(a,i){return t.getFeatureValue(a,i)},onChange(a){return r(),n.add(a),()=>{n.delete(a)}}}}function Uj(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 Hj(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 Gj(){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:()=>A.BrowserRouter});Object.defineProperty(exports,"HashRouter",{enumerable:!0,get:()=>A.HashRouter});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>A.Link});Object.defineProperty(exports,"MemoryRouter",{enumerable:!0,get:()=>A.MemoryRouter});Object.defineProperty(exports,"NavLink",{enumerable:!0,get:()=>A.NavLink});Object.defineProperty(exports,"Navigate",{enumerable:!0,get:()=>A.Navigate});Object.defineProperty(exports,"Outlet",{enumerable:!0,get:()=>A.Outlet});Object.defineProperty(exports,"Route",{enumerable:!0,get:()=>A.Route});Object.defineProperty(exports,"Routes",{enumerable:!0,get:()=>A.Routes});Object.defineProperty(exports,"redirect",{enumerable:!0,get:()=>A.redirect});Object.defineProperty(exports,"useLocation",{enumerable:!0,get:()=>A.useLocation});Object.defineProperty(exports,"useMatch",{enumerable:!0,get:()=>A.useMatch});Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:()=>A.useNavigate});Object.defineProperty(exports,"useParams",{enumerable:!0,get:()=>A.useParams});Object.defineProperty(exports,"useRouteError",{enumerable:!0,get:()=>A.useRouteError});Object.defineProperty(exports,"useSearchParams",{enumerable:!0,get:()=>A.useSearchParams});exports.EARTH_RADIUS_KM=P.EARTH_RADIUS_KM;exports.Input=P.Input;exports.MERCATOR_MAX_LATITUDE=P.MERCATOR_MAX_LATITUDE;exports.Select=P.Select;exports.bearingDeg=P.bearingDeg;exports.clampLatitude=P.clampLatitude;exports.fitProjection=P.fitProjection;exports.haversineKm=P.haversineKm;exports.isCoordinate=P.isCoordinate;exports.isValidLatitude=P.isValidLatitude;exports.isValidLongitude=P.isValidLongitude;exports.normalizeLongitude=P.normalizeLongitude;exports.pathLengthKm=P.pathLengthKm;exports.projectMercator=P.projectMercator;exports.toRadians=P.toRadians;exports.unprojectMercator=P.unprojectMercator;exports.useDebounce=P.useDebounce;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=sw;exports.Accordion=Ys;exports.Alert=dr;exports.AppBar=Nr;exports.AppProviders=Fw;exports.AppRouter=Tw;exports.AppShell=Ar;exports.AspectRatio=Or;exports.AuthGuard=Zx;exports.Avatar=Zr;exports.BREAKPOINTS=jt;exports.Badge=ho;exports.Banner=So;exports.BottomNavigation=Po;exports.BottomSheet=qo;exports.Breadcrumbs=Jo;exports.Button=Xe;exports.CACHE_TIME=us;exports.CEPInput=sj;exports.CNPJInput=tj;exports.CPFInput=ej;exports.Calendar=Vg;exports.Can=ow;exports.Card=Ea;exports.Carousel=jy;exports.Center=Da;exports.Checkbox=Wa;exports.ChipInput=ei;exports.ClickOutside=p_;exports.Collapsible=G_;exports.Combobox=hi;exports.Command=Ng;exports.ConditionalWrapper=m_;exports.ConfirmDialog=Dn;exports.Container=ql;exports.ContextMenu=eg;exports.CopyButton=e_;exports.DEFAULT_CAR_SPEED_KMH=Rs;exports.DEFAULT_CIRCUITY_FACTOR=Ms;exports.DEFAULT_MODE_DURATION_FACTORS=Ls;exports.DataList=j_;exports.DataTable=mv;exports.DatePicker=Pi;exports.DateRangePicker=Gb;exports.DescriptionList=S_;exports.Divider=qi;exports.Drawer=cc;exports.DropdownMenu=wc;exports.Dropzone=Cc;exports.EmptyState=Dc;exports.ErrorBoundary=xs;exports.ErrorState=Bc;exports.ErrorText=g_;exports.FeatureFlagsProvider=Bj;exports.FileUpload=sl;exports.FloatingActionButton=Iv;exports.For=f_;exports.Form=vl;exports.FormActions=jl;exports.FormField=Qw;exports.FormRow=wl;exports.FormSection=xl;exports.GoogleSignIn=lw;exports.Grid=Gl;exports.Hide=Np;exports.HoverCard=lg;exports.I18nProvider=ys;exports.Image=v_;exports.InstallBanner=tu;exports.InstallButton=nu;exports.Kbd=iu;exports.Label=q_;exports.ListTile=jv;exports.Menubar=py;exports.Modal=Gt;exports.ModalsProvider=uu;exports.Money=o_;exports.MoneyInput=aj;exports.MultiSelect=kb;exports.NProgressBar=Eu;exports.Navbar=ju;exports.NavigationMenu=ty;exports.NavigationRail=Qv;exports.Page=zu;exports.Pagination=Bn;exports.PasswordInput=gd;exports.PhoneInput=nj;exports.PinInput=Td;exports.Popover=Fd;exports.Portal=Jn;exports.Progress=Qd;exports.QueryProvider=ds;exports.REFETCH_TIME=dw;exports.Radio=rp;exports.RadioGroup=op;exports.RangeSlider=fp;exports.RatingStars=jp;exports.RefreshIndicator=px;exports.RelativeTime=r_;exports.Resizable=Ig;exports.RouteGuard=fs;exports.STALE_TIME=ls;exports.SafeArea=Dp;exports.ScrollArea=Tg;exports.SearchBar=Kn;exports.SegmentedControl=Yp;exports.Show=kp;exports.Sidebar=im;exports.Skeleton=dm;exports.Slider=ib;exports.Spacer=_m;exports.Spinner=Un;exports.Stack=Ul;exports.Stat=Om;exports.Stepper=Qm;exports.StepperInput=af;exports.Switch=ff;exports.Table=Hn;exports.Tabs=Gf;exports.Tag=Sf;exports.TelemetryProvider=Lj;exports.TempestApiError=kt;exports.TempestDataProvider=vw;exports.Textarea=th;exports.ThemeProvider=gs;exports.TimePicker=ax;exports.Timeline=gh;exports.ToastProvider=qh;exports.Toggle=D_;exports.ToggleGroup=O_;exports.ToggleGroupItem=B_;exports.Tooltip=kh;exports.TrajectoryMap=Ej;exports.TruncateText=c_;exports.VirtualList=Xh;exports.VisuallyHidden=d_;exports.WebPushClient=ks;exports.WebPushPermissionDeniedError=$s;exports.WebPushUnsupportedError=Ht;exports.assertNever=Px;exports.boundingBox=Ds;exports.boundsCenter=dj;exports.buildApiError=Yt;exports.camelCase=xx;exports.capitalize=vx;exports.chunk=Nx;exports.clamp=Bt;exports.consoleSink=Is;exports.consoleTelemetryAdapter=Pj;exports.createApiClient=xt;exports.createAudioPlayer=en;exports.createAuthStore=ss;exports.createDataProvider=yw;exports.createEventStream=ws;exports.createGrowthBookFeatureFlagsAdapter=Kj;exports.createI18n=Zt;exports.createInMemoryFlags=qj;exports.createLaunchDarklyFeatureFlagsAdapter=Uj;exports.createLogger=Fs;exports.createOSRMBackend=pj;exports.createOfflineStore=Hw;exports.createPositionTracker=As;exports.createPostHogTelemetryAdapter=Oj;exports.createQueryKeys=pw;exports.createRefreshQueue=os;exports.createRoleAccessControl=iw;exports.createSelectors=Rw;exports.createSentryTelemetryAdapter=Ij;exports.createStore=Mw;exports.createTempestAuth=nw;exports.createWebSocket=Ts;exports.debounce=Ax;exports.decodeJWT=Xt;exports.deepMerge=ns;exports.defineRoutes=Nw;exports.durationFactor=tn;exports.emptyOffsetPage=hw;exports.estimatePasswordStrength=zn;exports.estimateTravel=uj;exports.expandBounds=Ps;exports.formatBytes=Jm;exports.formatCEP=Cs;exports.formatCNPJ=Es;exports.formatCPF=ts;exports.formatCompactNumber=Ym;exports.formatCurrency=mx;exports.formatDate=fx;exports.formatDateTime=hx;exports.formatPercent=_x;exports.formatPhone=es;exports.generateIdempotencyKey=Xx;exports.getInitialTheme=Tj;exports.groupBy=$x;exports.isApiError=Wx;exports.isCursorPage=fw;exports.isDefined=Mx;exports.isEmpty=Tx;exports.isJWTExpired=ew;exports.isNumber=Lx;exports.isOffsetPage=mw;exports.isPlainObject=Dx;exports.isPushSupported=lt;exports.isShareSupported=Gj;exports.isString=Rx;exports.kebabCase=wx;exports.lazyWithRetry=rs;exports.listQueryKey=ms;exports.memoizeOne=Ox;exports.nprogress=On;exports.omit=Ex;exports.once=Fx;exports.oneQueryKey=Vt;exports.parseResponse=Hx;exports.permissionsFromToken=cw;exports.pick=Cx;exports.playAudio=Ww;exports.pluralize=jx;exports.randomId=Jt;exports.range=Sx;exports.relativeTime=Qn;exports.retry=Yx;exports.share=Hj;exports.sleep=Bx;exports.slugify=bx;exports.stopAudio=qw;exports.storage=gx;exports.themeInitScript=Mj;exports.throttle=Ix;exports.truncate=yx;exports.uniqueBy=kx;exports.unmask=Zw;exports.uploadWithProgress=Qx;exports.urlBase64ToUint8Array=js;exports.useAccessControl=is;exports.useAsync=My;exports.useAudio=Kw;exports.useBeforeInstallPrompt=Qt;exports.useBreakpoint=ze;exports.useCan=cs;exports.useClickOutside=av;exports.useClientFilter=$y;exports.useClipboard=Ay;exports.useCounter=ev;exports.useCreate=jw;exports.useCursorQuery=gw;exports.useDataProvider=Ze;exports.useDeepMemo=Ky;exports.useDelete=kw;exports.useDisclosure=Vy;exports.useDocumentTitle=tv;exports.useDocumentVisibility=Ly;exports.useErrorHandler=Gw;exports.useEventListener=Ny;exports.useEventStream=Bw;exports.useFavicon=nv;exports.useFeatureFlag=zj;exports.useFlagValue=Wj;exports.useFocusTrap=Xn;exports.useGeolocation=zy;exports.useHover=Yy;exports.useI18n=vs;exports.useIdle=By;exports.useIntersectionObserver=Dy;exports.useInterval=Hy;exports.useIsFirstRender=iv;exports.useKeyboardShortcut=Oy;exports.useList=xw;exports.useListState=Zy;exports.useLocalStorage=Ey;exports.useLongPress=Xy;exports.useMap=sv;exports.useMediaQuery=ky;exports.useModals=mu;exports.useOAuthCallback=uw;exports.useOne=ww;exports.useOnline=Ry;exports.usePaginatedQuery=_w;exports.usePagination=Zn;exports.usePoll=Vx;exports.usePositionTracker=mj;exports.usePrevious=Uy;exports.usePushSubscription=zw;exports.useQueue=ov;exports.useResizeObserver=Py;exports.useScrollLock=Wy;exports.useSet=rv;exports.useStableCallback=qy;exports.useTelemetry=Dj;exports.useTheme=Dw;exports.useThrottle=Qy;exports.useTimeout=Gy;exports.useToast=Wh;exports.useToggle=Ty;exports.useTranslate=Aw;exports.useUpdate=$w;exports.useViaCEP=ij;exports.useWebSocket=lj;exports.useWindowSize=Jy;exports.useZodForm=Yw;exports.validateCNPJ=Vw;exports.validateCPF=Xw;exports.validateForm=Jw;exports.withTimeout=zx;exports.zodResolver=Ss;
|
|
15
15
|
//# sourceMappingURL=tempest-react-sdk.cjs.map
|