1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c5e04427-c584-58e8-b7c3-98455a41d2e0")}catch(e){}}(); 3import{R as m,j as e,ag as k,a3 as V,r as d,Y as u,Z as v,$ as f,c as W,P as g,B as y,D as L}from"./index-CVhO1mfm.js";import{u as E,n as h}from"./useDefaultNavigationApp-vJvP7xlz.js";import{u as _,a as G}from"./useLogisticsPIN-DX0Kedau.js";import{u as q,L as x,a as A,P as n}from"./usePushNotificationStatus-DuNyDhUX.js";function H(){const o=E(t=>t.defaultNavigationApp),r=E(t=>t.setDefaultNavigationApp),[l,i]=m.useState(null),c=t=>{i(t.currentTarget)},p=()=>{i(null)},a=["googleMaps","waze"].filter(t=>t!==o);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex cursor-pointer items-center space-x-4 rounded-md border border-divider bg-white p-3 text-gray-700 hover:bg-gray-50",onClick:c,children:[e.jsx("div",{className:"flex p-1",children:e.jsx("img",{src:h[o].icon,alt:"Navigation App",className:"h-10 w-auto rounded-md"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"text-sm font-light text-gray-700",children:"Aplicativo de navegação padrão"}),e.jsx("div",{className:"text-base font-medium text-gray-600",children:h[o].name})]}),e.jsx(k,{color:"inherit"})]}),e.jsx(V,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},anchorEl:l,open:!!l,onClose:p,keepMounted:!1,PaperProps:{className:"border border-solid border-grey-300 shadow rounded-md mt-1 w-full max-w-sm"},children:e.jsx("div",{className:"w-full space-y-2 text-gray-600",children:a.map(t=>e.jsxs("div",{className:"flex cursor-pointer items-center space-x-4 rounded-md px-3 py-1 hover:bg-gray-100",onClick:()=>{r(t),p()},children:[e.jsx("div",{className:"flex p-1",children:e.jsx("img",{src:h[t].icon,alt:"Navigation App",className:"h-10 w-auto rounded-md"})}),e.jsx("div",{className:"text-base font-medium text-gray-600",children:h[t].name})]},t))})})]})}var z={},U=f,B=v;Object.defineProperty(z,"__esModule",{value:!0});var j=z.default=void 0,F=B(d),Y=U(u()),Z=(0,Y.default)(F.createElement("path",{d:"M22 13c.55 0 1-.45 1-1s-.45-1-1-1h-1.06c-.46-4.17-3.77-7.48-7.94-7.94V2c0-.55-.45-1-1-1s-1 .45-1 1v1.06c-.98.11-1.91.38-2.77.78l1.53 1.53C10.46 5.13 11.22 5 12 5c3.87 0 7 3.13 7 7 0 .79-.13 1.54-.37 2.24l1.53 1.53c.4-.86.67-1.79.78-2.77H22zm-1.56 5.88L5.12 3.56a.9959.9959 0 00-1.41 0c-.39.39-.39 1.02 0 1.41L5.04 6.3C3.97 7.62 3.26 9.23 3.06 11H2c-.55 0-1 .45-1 1s.45 1 1 1h1.06c.46 4.17 3.77 7.48 7.94 7.94V22c0 .55.45 1 1 1s1-.45 1-1v-1.06c1.77-.2 3.38-.91 4.69-1.98l1.33 1.33c.39.39 1.02.39 1.41 0 .4-.39.4-1.02.01-1.41zM12 19c-3.87 0-7-3.13-7-7 0-1.61.55-3.09 1.46-4.27l9.81 9.81C15.09 18.45 13.61 19 12 19z"}),"LocationDisabledRounded");j=z.default=Z;var $={},J=f,K=v;Object.defineProperty($,"__esModule",{value:!0});var N=$.default=void 0,Q=K(d),X=J(u()),ee=(0,X.default)(Q.createElement("path",{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V2c0-.55-.45-1-1-1s-1 .45-1 1v1.06C6.83 3.52 3.52 6.83 3.06 11H2c-.55 0-1 .45-1 1s.45 1 1 1h1.06c.46 4.17 3.77 7.48 7.94 7.94V22c0 .55.45 1 1 1s1-.45 1-1v-1.06c4.17-.46 7.48-3.77 7.94-7.94H22c.55 0 1-.45 1-1s-.45-1-1-1h-1.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"}),"MyLocationRounded");N=$.default=ee;var P={},te=f,ae=v;Object.defineProperty(P,"__esModule",{value:!0});var O=P.default=void 0,oe=ae(d),re=te(u()),ie=(0,re.default)(oe.createElement("path",{d:"M12 2c-4.2 0-8 3.22-8 8.2 0 3.18 2.45 6.92 7.34 11.23.38.33.95.33 1.33 0C17.55 17.12 20 13.38 20 10.2 20 5.22 16.2 2 12 2m.71 13.7c-.19.2-.43.3-.71.3-.27 0-.53-.11-.71-.3-.19-.19-.3-.44-.29-.71-.01-.55.43-.99.98-1H12c.55-.01.99.43 1 .98v.02c0 .28-.1.52-.29.71m1.98-5.79c-.21.35-.48.71-.89 1.09-.32.3-.53.56-.65.77-.1.19-.16.49-.16.69v.07c-.01.27-.24.47-.51.47h-.85c-.28 0-.5-.22-.5-.5v-.16c0-.45.1-.84.29-1.16.19-.33.52-.7 1-1.12.28-.25.48-.47.61-.66s.19-.4.19-.64c0-.29-.11-.54-.32-.74-.22-.2-.5-.3-.85-.3-.37 0-.74.1-.96.3-.12.12-.21.23-.29.38-.03.07-.08.21-.09.26-.05.17-.24.34-.47.34h-.69c-.26 0-.47-.19-.5-.45-.01-.08 0-.16.02-.24.18-.72.52-1.16.9-1.52.56-.5 1.28-.79 2.03-.79.59 0 1.11.12 1.57.35s.79.55 1.05.96c.25.41.38.85.38 1.35 0 .49-.11.9-.31 1.25"}),"NotListedLocationRounded");O=P.default=ie;const I={green:"text-green-700 bg-green-100",red:"text-red-700 bg-red-100",yellow:"text-yellow-700 bg-yellow-100",blue:"text-blue-700 bg-blue-100",gray:"text-gray-700 bg-gray-100"};function s({title:o,subtitle:r,icon:l,color:i="gray",children:c}){return e.jsxs("div",{className:"flex flex-col space-y-4 rounded-md border border-divider bg-white p-3 text-gray-700",children:[e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx("div",{className:W("flex rounded-full p-3",I[i]),children:l}),e.jsxs("div",{children:[e.jsx("div",{className:"text-base font-medium text-gray-700",children:o}),r&&e.jsx("div",{className:"text-sm font-light text-gray-600",children:r})]})]}),c]})}s.propTypes={title:g.string.isRequired,subtitle:g.string,icon:g.element.isRequired,children:g.element,color:g.oneOf(Object.keys(I))};
3s.defaultProps={subtitle:void 0,children:void 0,color:"gray"};function se(){const o=q(a=>a.status),r=q(a=>a.setStatus),[l,i]=m.useState(!1),c=_(a=>{var t;return(t=a.deliveryMan)==null?void 0:t.status}),p=m.useCallback(async()=>{i(!0);try{await new Promise((a,t)=>{navigator.geolocation.getCurrentPosition(a,t)}),r(x.GRANTED)}catch{r(x.DENIED)}i(!1)},[r]);return o===x.NO_SUPPORT?e.jsx(s,{title:"Seu navegador não suporta geolocalização",subtitle:"Atualize seu navegador ou utilize um outro",icon:e.jsx(j,{}),color:"gray"}):o===x.PENDING?e.jsx(s,{title:"Autorize o acesso à localização",subtitle:"Clique no botão abaixo para autorizar o acesso",icon:e.jsx(O,{}),color:"gray",children:e.jsx(y,{variant:"outlined",color:"primary",fullWidth:!0,size:"large",onClick:p,disabled:l,children:l?e.jsx(L,{color:"inherit",size:24}):"Autorizar geolocalização"})}):[x.DENIED,x.ERROR].includes(o)?e.jsx(s,{title:"Acesso à localização bloqueado",subtitle:"Libere o acesso à localização",icon:e.jsx(j,{}),color:"red"}):c==="offline"?e.jsx(s,{title:"Rastreamento da localização pausado",subtitle:"Ele será retomado quando estiver Online",icon:e.jsx(N,{}),color:"yellow"}):e.jsx(s,{title:"Acesso à localização liberado",subtitle:"Rastreamento da localização ativo",icon:e.jsx(N,{}),color:"green"})}var S={},le=f,ce=v;Object.defineProperty(S,"__esModule",{value:!0});var b=S.default=void 0,ne=ce(d),de=le(u()),ue=(0,de.default)(ne.createElement("path",{d:"M12 23c1.1 0 1.99-.89 1.99-1.99h-3.98c0 1.1.89 1.99 1.99 1.99zm8.29-4.71L19 17v-6c0-3.35-2.3
36-6.15-5.5-6.83V3c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v1.17C7.36 4.85 5 7.65 5 11v6l-1.29 1.29c-.63.63-.19 1.71.7 1.71h15.17c.9 0 1.34-1.08.71-1.71zM13 16h-2v-2h2v2zm0-5c0 .55-.45 1-1 1s-1-.45-1-1V9c0-.55.45-1 1-1s1 .45 1 1v2z"}),"NotificationImportantRounded");b=S.default=ue;var C={},ve=f,fe=v;Object.defineProperty(C,"__esModule",{value:!0});var w=C.default=void 0,pe=fe(d),xe=ve(u()),me=(0,xe.default)(pe.createElement("path",{d:"M18 16v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.68-1.5-1.51-1.5S10.5 3.17 10.5 4v.68C7.63 5.36 6 7.92 6 11v5l-1.3 1.29c-.63.63-.19 1.71.7 1.71h13.17c.89 0 1.34-1.08.71-1.71L18 16zm-6.01 6c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zM6.77 4.73c.42-.38.43-1.03.03-1.43-.38-.38-1-.39-1.39-.02C3.7 4.84 2.52 6.96 2.14 9.34c-.09.61.38 1.16 1 1.16.48 0 .9-.35.98-.83.3-1.94 1.26-3.67 2.65-4.94zM18.6 3.28c-.4-.37-1.02-.36-1.4.02-.4.4-.38 1.04.03 1.42 1.38 1.27 2.35 3 2.65 4.94.07.48.49.83.98.83.61 0 1.09-.55.99-1.16-.38-2.37-1.55-4.48-3.25-6.05z"}),"NotificationsActiveRounded");w=C.default=me;var M={},ge=f,he=v;Object.defineProperty(M,"__esModule",{value:!0});var R=M.default=void 0,je=he(d),Ne=ge(u()),be=(0,Ne.default)(je.createElement("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-11c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68c-.24.06-.47.15-.69.23L18 13.1V11zM5.41 3.35L4 4.76l2.81 2.81C6.29 8.57 6 9.73 6 11v5l-1.29 1.29c-.63.63-.19 1.71.7 1.71h12.83l1.74 1.74 1.41-1.41L5.41 3.35z"}),"NotificationsOffRounded");R=M.default=be;var D={},Re=f,ye=v;Object.defineProperty(D,"__esModule",{value:!0});var T=D.default=void 0,_e=ye(d),ze=Re(u()),$e=(0,ze.default)(_e.createElement("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm7.29-4.71L18 16v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-1.29 1.29c-.63.63-.19 1.71.7 1.71h13.17c.9 0 1.34-1.08.71-1.71zM14.5 9.33c0 .31-.11.6-.3.84l-2.5 3.03h1.9c.5 0 .9.4.9.9s-.4.9-.9.9h-2.78c-.73 0-1.32-.59-1.32-1.32v-.01c0-.31.11-.6.3-.84l2.5-3.03h-1.9c-.5 0-.9-.4-.9-.9s.4-.9.9-.9h2.78c.73 0 1.32.59 1.32 1.33z"}),"NotificationsPausedRounded");T=D.default=$e;function Pe(){const o=A(a=>a.status),r=A(a=>a.setStatus),[l,i]=m.useState(!1),c=_(a=>{var t;return(t=a.deliveryMan)==null?void 0:t.status}),p=m.useCallback(async()=>{i(!0);try{const a=await Notification.requestPermission();r(a==="granted"?n.GRANTED:n.DENIED)}catch{r(n.ERROR)}i(!1)},[r]);return o===n.NO_SUPPORT?e.jsx(s,{title:"Seu navegador não suporta notificações",subtitle:"Atualize seu navegador ou utilize um outro",icon:e.jsx(b,{}),color:"gray"}):o===n.ERROR?e.jsx(s,{title:"Falha ao configurar notificações",subtitle:"Atualize a página e tente novamente",icon:e.jsx(b,{}),color:"red"}):o===n.PENDING?e.jsx(s,{title:"Autorize o acesso à notificações",subtitle:"Clique no botão abaixo para autorizar o acesso",icon:e.jsx(R,{}),color:"gray",children:e.jsx(y,{variant:"outlined",color:"primary",fullWidth:!0,size:"large",onClick:p,disabled:l,children:l?e.jsx(L,{color:"inherit",size:24}):"Autorizar notificações"})}):o===n.DENIED?e.jsx(s,{title:"Notificações bloqueadas",subtitle:"Libere o acesso às notificações",icon:e.jsx(R,{}),color:"red"}):c==="offline"?e.jsx(s,{title:"Notificações pausadas",subtitle:"Elas serão retomadas quando estiver Online",icon:e.jsx(T,{}),color:"yellow"}):e.jsx(s,{title:"Notificações ativas",subtitle:"Você será notificado de novos pedidos",icon:e.jsx(w,{}),color:"green"})}function Ee(){const o=_(i=>i.setDeliveryMan),r=G(i=>i.setPinCode),l=m.useCallback(()=>{o(null),r(null)},[o,r]);return e.jsxs("div",{className:"space-y-12 p-3 pt-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx(Pe,{}),e.jsx(se,{}),e.jsx(H,{})]}),e.jsx(y,{variant:"contained",color:"primary",fullWidth:!0,size:"large",className:"relative rounded-lg",onClick:l,children:"Sair da conta"})]})}export{Ee as default}; 4 5//# debugId=c5e04427-c584-58e8-b7c3-98455a41d2e0
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.