1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6421],{31994:(e,t,a)=>{a.d(t,{J:()=>r});let r=["rn","ce","ro","sc","go"]},35409:(e,t,a)=>{a.d(t,{K:()=>o});var r=a(30131),s=a(31994),l=a(75183);async function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{size:t=100,sort:a="name,asc"}=e;return(await l.F.get("/states",{params:{size:t,sort:a}})).data}function o(e){return(0,r.I)({queryKey:["states"],queryFn:()=>n(),select:t=>{if(null==e?void 0:e.availableOnly){let e=t.data.content.filter(e=>s.J.includes(e.abbreviation.toLocaleLowerCase()));return{...t.data,content:e}}return t.data}})}},43281:(e,t,a)=>{a.d(t,{lV:()=>m,MJ:()=>N,zB:()=>f,eI:()=>g,lR:()=>y,C5:()=>v});var r=a(95155),s=a(32467),l=a(12115),n=a(22544),o=a(85408),d=a(83101),i=a(64269);let u=(0,d.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=(0,l.forwardRef)((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)(o.b,{ref:t,className:(0,i.cn)(u(),a),...s})});c.displayName=o.b.displayName;let m=n.Op,p=(0,l.createContext)({}),f=e=>{let{...t}=e;return(0,r.jsx)(p.Provider,{value:{name:t.name},children:(0,r.jsx)(n.xI,{...t})})},h=()=>{let e=(0,l.useContext)(p),t=(0,l.useContext)(x),{getFieldState:a,formState:r}=(0,n.xW)(),s=a(e.name,r);if(!e)throw Error("useFormField should be used within <FormField>");let{id:o}=t;return{id:o,name:e.name,formItemId:"".concat(o,"-form-item"),formDescriptionId:"".concat(o,"-form-item-description"),formMessageId:"".concat(o,"-form-item-message"),...s}},x=(0,l.createContext)({}),g=(0,l.forwardRef)((e,t)=>{let{className:a,...s}=e,n=(0,l.useId)();return(0,r.jsx)(x.Provider,{value:{id:n},children:(0,r.jsx)("div",{ref:t,className:(0,i.cn)("space-y-2",a),...s})})});g.displayName="FormItem";let y=(0,l.forwardRef)((e,t)=>{let{className:a,...s}=e,{error:l,formItemId:n}=h();return(0,r.jsx)(c,{ref:t,className:(0,i.cn)(l&&"text-destructive",a),htmlFor:n,...s})});y.displayName="FormLabel";let N=(0,l.forwardRef)((e,t)=>{let{...a}=e,{error:l,formItemId:n,formDescriptionId:o,formMessageId:d}=h();return(0,r.jsx)(s.DX,{ref:t,id:n,"aria-describedby":l?"".concat(o," ").concat(d):"".concat(o),"aria-invalid":!!l,...a})});N.displayName="FormControl",(0,l.forwardRef)((e,t)=>{let{className:a,...s}=e,{formDescriptionId:l}=h();return(0,r.jsx)("p",{ref:t,id:l,className:(0,i.cn)("text-sm text-muted-foreground",a),...s})}).displayName="FormDescription";let v=(0,l.forwardRef)((e,t)=>{let{className:a,children:s,...l}=e,{error:n,formMessageId:o}=h(),d=n?String(null==n?void 0:n.message):s;return d?(0,r.jsx)("p",{ref:t,id:o,className:(0,i.cn)("text-sm font-medium text-destructive",a),...l,children:d}):null});v.displayName="FormMessage"},51444:(e,t,a)=>{a.d(t,{n:()=>n});var r=a(25959),s=a(89863);let l={userLogged:null,isAuthenticated:!1,_hasHydratedAuth:!1},n=(0,r.v)((0,s.Zr)(e=>({...l,updateUserLogged:t=>e({userLogged:t}),updateIsAuthenticated:t=>e({isAuthenticated:t}),logout:()=>e({userLogged:null,isAuthenticated:!1})}),{name:"rota-22-auth",storage:(0,s.KU)(()=>localStorage),onRehydrateStorage:()=>e=>{e&&(e._hasHydratedAuth=!0)}}))},51834:(e,t,a)=>{a.d(t,{Cf:()=>p,HM:()=>c,L3:()=>h,c7:()=>f,lG:()=>d,zM:()=>i});var r=a(95155),s=a(89511),l=a(26615),n=a(12115),o=a(64269);let d=s.bL,i=s.l9,u=s.ZL,c=s.bm,m=(0,n.forwardRef)((e,t)=>{let{className:a,...l}=e;return(0,r.jsx)(s.hJ,{ref:t,className:(0,o.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...l})});m.displayName=s.hJ.displayName;let p=(0,n.forwardRef)((e,t)=>{let{className:a,children:n,showCloseButton:d=!0,showOverlay:i=!0,...c}=e;return(0,r.jsxs)(u,{children:[(0,r.jsx)(m,{}),(0,r.jsxs)(s.UC,{ref:t,className:(0,o.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 bg-background p-6 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out sm:rounded-lg",a,i?"border shadow-lg":""),...c,children:[n,d&&(0,r.jsxs)(s.bm,{className:"absolute right-4 top-4 roun
1ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[(0,r.jsx)(l.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});p.displayName=s.UC.displayName;let f=e=>{let{className:t,...a}=e;return(0,r.jsx)("div",{className:(0,o.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...a})};f.displayName="DialogHeader";let h=(0,n.forwardRef)((e,t)=>{let{className:a,...l}=e;return(0,r.jsx)(s.hE,{ref:t,className:(0,o.cn)("text-lg font-semibold leading-none tracking-tight",a),...l})});h.displayName=s.hE.displayName,(0,n.forwardRef)((e,t)=>{let{className:a,...l}=e;return(0,r.jsx)(s.VY,{ref:t,className:(0,o.cn)("text-sm text-muted-foreground",a),...l})}).displayName=s.VY.displayName},70957:(e,t,a)=>{a.d(t,{G:()=>w});var r=a(95155),s=a(59007),l=a(30848),n=a(72251),o=a(12115),d=a(3998),i=a(41808),u=a(90109);a(51834);var c=a(64269);let m=(0,o.forwardRef)((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)(i.uB,{ref:t,className:(0,c.cn)("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",a),...s})});m.displayName=i.uB.displayName;let p=(0,o.forwardRef)((e,t)=>{let{className:a,...s}=e;return(0,r.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,r.jsx)(u.A,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,r.jsx)(i.uB.Input,{ref:t,className:(0,c.cn)("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",a),...s})]})});p.displayName=i.uB.Input.displayName;let f=(0,o.forwardRef)((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)(i.uB.List,{ref:t,className:(0,c.cn)("max-h-[300px] overflow-y-auto overflow-x-hidden",a),...s})});f.displayName=i.uB.List.displayName;let h=(0,o.forwardRef)((e,t)=>(0,r.jsx)(i.uB.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));h.displayName=i.uB.Empty.displayName;let x=(0,o.forwardRef)((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)(i.uB.Group,{ref:t,className:(0,c.cn)("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",a),...s})});x.displayName=i.uB.Group.displayName,(0,o.forwardRef)((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)(i.uB.Separator,{ref:t,className:(0,c.cn)("-mx-1 h-px bg-border",a),...s})}).displayName=i.uB.Separator.displayName;let g=(0,o.forwardRef)((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)(i.uB.Item,{ref:t,className:(0,c.cn)("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",a),...s})});g.displayName=i.uB.Item.displayName;var y=a(52659);let N=y.bL,v=y.l9,b=(0,o.forwardRef)((e,t)=>{let{className:a,align:s="center",sideOffset:l=4,...n}=e;return(0,r.jsx)(y.ZL,{children:(0,r.jsx)(y.UC,{ref:t,align:s,sideOffset:l,className:(0,c.cn)("z-50 w-72 rounded-xl border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...n})})});function w(e){var t;let{id:a,onChange:i,options:u,onChangeSearch:y,value:w,defaultValue:j,searchPlaceHolder:C,onBlur:R,disabled:k=!1,navBarVersion:F=!1}=e,[A,L]=(0,o.useState)(w),[B,I]=(0,o.useState)(!1),[S,E]=(0,o.useState)(""),_=(0,o.useMemo)(()=>u?null==u?void 0:u.filter(e=>e.label.toLowerCase().includes(S.toLowerCase())):[],[u,S]);return(0,o.useEffect)(()=>{L(w||"")},[w]),(0,o.useEffect)(()=>{j&&L(j.id)},[j]),(0,r.jsxs)(N,{open:B,onOpenChange:I,children:[(0,r.jsx)(v,{asChild:!0,id:a,children:(0,r.jsxs)(d.$,{variant:"outline","aria-expanded":B,disabled:k,className:(0,
1c.cn)("w-full justify-between text-foreground","disabled:text-gray-400",F&&"justify-center border-0 bg-[#FFC43C] text-[#0155AE] hover:bg-[#FFC43C]/90"),children:[w&&""!==w&&"undefined"!==w?null==(t=u.find(e=>e.value===w))?void 0:t.label:F?"Selecione um estado":"Selecione",F?(0,r.jsx)(s.A,{className:"ml-2 h-4 w-4 shrink-0 text-[#0155AE] opacity-50",color:"#0155AE"}):(0,r.jsx)(l.A,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,r.jsx)(b,{className:"z-[9999] p-0",onBlur:R,children:(0,r.jsxs)(m,{children:[(0,r.jsx)(p,{placeholder:C||"Buscar munic\xedpio",onValueChange:e=>{E(e),null==y||y(e),I(!0)},value:S}),(0,r.jsxs)(f,{children:[(0,r.jsx)(h,{children:"Nenhum item"}),(0,r.jsx)(x,{children:_.map(e=>(0,r.jsxs)(g,{value:e.label,onSelect:()=>{e.value!==A&&(L(e.value),null==i||i(e),I(!1))},children:[e.label,(0,r.jsx)(n.A,{className:(0,c.cn)("mr-2 h-4 w-4",A===e.value?"opacity-100":"opacity-0")})]},e.value))})]})]})})]})}b.displayName=y.UC.displayName},75183:(e,t,a)=>{a.d(t,{C:()=>i,F:()=>d});var r=a(12870),s=a(51444);let l="/auth/csrf",n="X-CSRF-TOKEN",o=new Set(["get","head","options","trace"]),d=r.A.create({timeout:6e4,headers:{common:{Accept:"application/json","Content-Type":"application/json"}},baseURL:"https://gestao.plrota22.com.br/rota-api",withCredentials:!0}),i=r.A.create({timeout:6e4,headers:{common:{Accept:"application/json","Content-Type":"application/json"}},baseURL:"https://gestao.plrota22.com.br/cms-api",withCredentials:!0}),u=null,c=null,m=n,p=e=>{var t;return null!=(t=null==e?void 0:e.split("?")[0])?t:""},f=e=>!!e&&!o.has(e.toLowerCase()),h=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!e&&u?Promise.resolve(u):(null!=c||(c=d.get(l).then(e=>{let t=e.data.data;if(!(null==t?void 0:t.token))throw Error("The API did not return a CSRF token");return u=t.token,m=t.headerName||n,u}).catch(e=>{throw u=null,e}).finally(()=>{c=null})),c)};d.interceptors.request.use(e=>f(e.method)&&p(e.url)!==l?h().then(t=>(((e,t)=>{let a=e.headers;if(a&&"set"in a&&"function"==typeof a.set)return a.set(m,t);e.headers={...a,[m]:t}})(e,t),e)):e,e=>Promise.reject(e)),d.interceptors.response.use(e=>{var t,a;return f(null==(t=e.config)?void 0:t.method)&&(e=>{let t=p(e);return"/auth"===t||"/auth/logout"===t})(null==(a=e.config)?void 0:a.url)?h(!0).then(()=>e):e},e=>(e.response&&403===e.response.status&&(u=null,m=n,s.n.getState().logout()),Promise.reject(e)))}}]);
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.