PageSourceSearch

https://salvadordigital.salvador.ba.gov.br/static/js/130.90ee3b57.chunk.js

js salvador.ba.gov.br collected 2026-10-02 03:25:15 UTC 18,940 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[130],{68858:(e,t,o)=>{o.d(t,{A:()=>u});var n=o(92239),r=o(54967),i=o(16260),s=o(43666);var a=o(33775);var l=o(16771),c=6e4,h=1440,d=30*h,p=365*h;function u(e,t,o){var u,f,g;(0,s.A)(2,arguments);var m=(0,n.q)(),x=null!==(u=null!==(f=null===o||void 0===o?void 0:o.locale)&&void 0!==f?f:m.locale)&&void 0!==u?u:l.A;if(!x.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var v=function(e,t){(0,s.A)(2,arguments);var o=(0,i.A)(e),n=(0,i.A)(t),r=o.getTime()-n.getTime();return r<0?-1:r>0?1:r}(e,t);if(isNaN(v))throw new RangeError("Invalid time value");var y,b,w,A=(0,a.A)((y=o,(0,a.A)({},y)),{addSuffix:Boolean(null===o||void 0===o?void 0:o.addSuffix),comparison:v});v>0?(b=(0,i.A)(t),w=(0,i.A)(e)):(b=(0,i.A)(e),w=(0,i.A)(t));var T,S=String(null!==(g=null===o||void 0===o?void 0:o.roundingMethod)&&void 0!==g?g:"round");if("floor"===S)T=Math.floor;else if("ceil"===S)T=Math.ceil;else{if("round"!==S)throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");T=Math.round}var j,E=w.getTime()-b.getTime(),D=E/c,L=(E-((0,r.A)(w)-(0,r.A)(b)))/c,N=null===o||void 0===o?void 0:o.unit;if("second"===(j=N?String(N):D<1?"second":D<60?"minute":D<h?"hour":L<d?"day":L<p?"month":"year")){var P=T(E/1e3);return x.formatDistance("xSeconds",P,A)}if("minute"===j){var C=T(D);return x.formatDistance("xMinutes",C,A)}if("hour"===j){var R=T(D/60);return x.formatDistance("xHours",R,A)}if("day"===j){var M=T(L/h);return x.formatDistance("xDays",M,A)}if("month"===j){var _=T(L/d);return 12===_&&"month"!==N?x.formatDistance("xYears",1,A):x.formatDistance("xMonths",_,A)}if("year"===j){var k=T(L/p);return x.formatDistance("xYears",k,A)}throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'")}},87130:(e,t,o)=>{o.r(t),o.d(t,{default:()=>W});var n=o(57066),r=o(58425),i=o(66187),s=o(65043),a=o(91688),l=o(1142),c=o(68664),h=o(80045),d=o(89379),p=o(10765),u=o(17685);const f=["pageParam"],g=["pageParam"];class m extends p.${constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions((0,d.A)((0,d.A)({},e),{},{behavior:(0,u.PL)()}),t)}getOptimisticResult(e){return e.behavior=(0,u.PL)(),super.getOptimisticResult(e)}fetchNextPage(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{pageParam:t}=e,o=(0,h.A)(e,f);return this.fetch((0,d.A)((0,d.A)({},o),{},{meta:{fetchMore:{direction:"forward",pageParam:t}}}))}fetchPreviousPage(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{pageParam:t}=e,o=(0,h.A)(e,g);return this.fetch((0,d.A)((0,d.A)({},o),{},{meta:{fetchMore:{direction:"backward",pageParam:t}}}))}createResult(e,t){var o,n,r,i,s,a;const{state:l}=e,c=super.createResult(e,t),{isFetching:h,isRefetching:p}=c,f=h&&"forward"===(null==(o=l.fetchMeta)||null==(n=o.fetchMore)?void 0:n.direction),g=h&&"backward"===(null==(r=l.fetchMeta)||null==(i=r.fetchMore)?void 0:i.direction);return(0,d.A)((0,d.A)({},c),{},{fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,u.rB)(t,null==(s=l.data)?void 0:s.pages),hasPreviousPage:(0,u.RQ)(t,null==(a=l.data)?void 0:a.pages),isFetchingNextPage:f,isFetchingPreviousPage:g,isRefetching:p&&!f&&!g})}}var x=o(24496);var v=o(4398);const y=e=>function(e,t,o){const n=(0,c.vh)(e,t,o);return(0,x.t)(n,m)}({queryKey:["services",e],queryFn:async t=>{let{pageParam:o=1}=t;const{data:n}=await(0,v.zn)(e,o);return n},getNextPageParam:e=>e.current<e.total_pages?e.current+1:void 0,staleTime:3e5,cacheTime:9e5});var b=o(396),w=o(8289),A=o(81551),T=o(86691),S=o(60397),j=o(96152),E=o(45516),D=o(70579);function L(){const{colors:e}=(0,s.useContext)(l.A),t=(0,A.A)((()=>({main:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#fff"},link:{display:"flex"},icon:{marginRight:E.A.spacing(.5),color:E.A.palette.primary.main,width:30,height:30},inputSearch:{height:50,borderRadius:0,width:"100%",border:"none",outline:"none",paddingLeft:16,color:e.textBody,background:e.colorBackgroun
1d,"&::placeholder":{color:"rgba(31, 41, 55, 0.5)"}},buttonSearch:{background:E.A.palette.primary.main,"&:hover":{background:E.A.palette.primary.main}},breadcrumbs:{flexGrow:1,color:E.A.palette.primary.main},breadcrumbItem:{color:e.accentColor,display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",maxWidth:"240px",fontSize:E.A.typography.pxToRem(14),fontWeight:400},iconSearch:{color:"#fff"}})))(),o=(0,a.W6)(),r=(0,T.A)("(max-width:660px)");return(0,D.jsx)(n.A,{className:t.main,children:(0,D.jsxs)(n.A,{display:"flex",maxWidth:"1320px",alignItems:r?"initial":"center",width:"100%",minHeight:"56px",height:"100%",justifyContent:r?"space-between":"flex-end",padding:r?"20px":"6px",flexDirection:r?"column":"row",style:{gap:r?20:0},children:[(0,D.jsxs)(b.A,{separator:"/",className:t.breadcrumbs,children:[(0,D.jsx)(w.A,{href:"/",onClick:e=>{e.preventDefault(),o.push("/")},children:(0,D.jsx)(S.TbHome,{className:t.icon})}),(0,D.jsx)(i.A,{className:t.breadcrumbItem,children:"Todos os servi\xe7os"})]}),(0,D.jsx)(j.A,{placeholder:"Buscar servi\xe7os"})]})})}function N(){const{colors:e}=(0,s.useContext)(l.A),t=(0,A.A)((t=>({main:{width:"100%",height:270,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e.accentColorBackground,marginTop:1,[t.breakpoints.down(660)]:{height:208}},container:{color:e.textAccentColor,gap:40,fontSize:32,[t.breakpoints.down(660)]:{fontSize:20,gap:35}},iconCategory:{width:60,height:60,[t.breakpoints.down(660)]:{width:45,height:45}}})))();return(0,D.jsx)(n.A,{className:t.main,children:(0,D.jsxs)(n.A,{display:"flex",maxWidth:"1320px",alignItems:"center",width:"100%",justifyContent:"center",flexDirection:"column",className:t.container,children:[(0,D.jsx)(S.TbLayoutDashboard,{className:t.iconCategory}),(0,D.jsx)(i.A,{style:{textAlign:"center",textTransform:"uppercase"},className:t.container,variant:"h4",children:"Todos os servi\xe7os"})]})})}var P=o(749),C=o(95611),R=o(39993),M=o(68858),_=o(47220),k=function(e,t){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},k(e,t)};var Y=function(){return Y=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Y.apply(this,arguments)};var B="Pixel",F="Percent",I={unit:F,value:.8};function H(e){return"number"===typeof e?{unit:F,value:100*e}:"string"===typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:B,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:F,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),I):(console.warn("scrollThreshold should be string or number"),I)}const z=function(e){function t(t){var o=e.call(this,t)||this;return o.lastScrollTop=0,o.actionTriggered=!1,o.startY=0,o.currentY=0,o.dragging=!1,o.maxPullDownDistance=0,o.getScrollableTarget=function(){return o.props.scrollableTarget instanceof HTMLElement?o.props.scrollableTarget:"string"===typeof o.props.scrollableTarget?document.getElementById(o.props.scrollableTarget):(null===o.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n        happen because the element may not have been added to DOM yet.\n        See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n      "),null)},o.onStart=function(e){o.lastScrollTop||(o.dragging=!0,e instanceof MouseEvent?o.startY=e.pageY:e instanceof TouchEvent&&(o.startY=e.touches[0].pageY),o.currentY=o.startY,o._infScroll&&(o._infScroll.style.willChange="transform",o._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},o.onMove=function(e){o.dragging&&(e instanceof MouseEvent?o.currentY=e.pageY:e instanceof TouchEvent&&(o.currentY=e.touches[0].pageY),o.currentY<o.startY||(o.currentY-o.startY>=Number(o.props.pullDownToRefreshThreshold)&&o.setState({pullToRefreshThresholdBreached:!0}),o.currentY-o.startY>1.5*o.maxPullDownDistance||o._infScroll&&(o._infScroll.style.overflow="visible",o._infScroll.
1style.transform="translate3d(0px, "+(o.currentY-o.startY)+"px, 0px)")))},o.onEnd=function(){o.startY=0,o.currentY=0,o.dragging=!1,o.state.pullToRefreshThresholdBreached&&(o.props.refreshFunction&&o.props.refreshFunction(),o.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame((function(){o._infScroll&&(o._infScroll.style.overflow="auto",o._infScroll.style.transform="none",o._infScroll.style.willChange="unset")}))},o.onScrollListener=function(e){"function"===typeof o.props.onScroll&&setTimeout((function(){return o.props.onScroll&&o.props.onScroll(e)}),0);var t=o.props.height||o._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;o.actionTriggered||((o.props.inverse?o.isElementAtTop(t,o.props.scrollThreshold):o.isElementAtBottom(t,o.props.scrollThreshold))&&o.props.hasMore&&(o.actionTriggered=!0,o.setState({showLoader:!0}),o.props.next&&o.props.next()),o.lastScrollTop=t.scrollTop)},o.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},o.throttledOnScrollListener=function(e,t,o,n){var r,i=!1,s=0;function a(){r&&clearTimeout(r)}function l(){var l=this,c=Date.now()-s,h=arguments;function d(){s=Date.now(),o.apply(l,h)}i||(n&&!r&&d(),a(),void 0===n&&c>e?d():!0!==t&&(r=setTimeout(n?function(){r=void 0}:d,void 0===n?e-c:e)))}return"boolean"!==typeof t&&(n=o,o=t,t=void 0),l.cancel=function(){a(),i=!0},l}(150,o.onScrollListener).bind(o),o.onStart=o.onStart.bind(o),o.onMove=o.onMove.bind(o),o.onEnd=o.onEnd.bind(o),o}return function(e,t){function o(){this.constructor=e}k(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}(t,e),t.prototype.componentDidMount=function(){if("undefined"===typeof this.props.dataLength)throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"===typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!==typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n          Pull Down To Refresh functionality will not work\n          as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?Y(Y({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var o=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,n=H(t);return n.unit===B?e.scrollTop<=n.value+o-e.scrollHeight+1:e.scrollTop<=n.value/100+o-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var o=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,n=H(t);return n.unit===B?e.scrollTop+o>=e.scrollHeight-n.value:e.scrollTop+o>=n.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=Y({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),o=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),n=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return s.createElement("div",{style:n,className:"infinite-scroll-component__outerdiv"},s.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&s.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},s.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!o&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(s.Component),O=e=>{let{serviceData:t,onLoadData:o,hasMore:c}=e;const{colors:h}=(0,s.useContext)(l.A),d=(0,A.A)((e=>({main:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:h.colorBackgroun
1d,padding:"80px 0px 56px 0px"},card:{width:"100%",minHeight:240,backgroundColor:h.colorBackgroundSecundary,color:"#373F41",padding:28,margin:"0px 0px 24px 0px",display:"flex",border:"1px solid ".concat(h.borderShadowsColor),flexDirection:"column",justifyContent:"space-between",borderRadius:4,boxShadow:"0px 8px 16px rgba(11, 31, 77, 0.04)",cursor:"pointer","&:hover":{color:e.palette.primary.main},[e.breakpoints.down(660)]:{padding:24}},text:{fontFamily:"Roboto",fontSize:e.typography.pxToRem(24),fontWeight:700,textAlign:"left",color:h.textBody,"&:hover":{color:h.accentColor},[e.breakpoints.down(660)]:{fontSize:e.typography.pxToRem(20)}},subTitle:{fontFamily:"Roboto",fontSize:e.typography.pxToRem(18),fontWeight:400,textAlign:"left",color:"#333333"},tag:{background:h.accentColorBackground,padding:"5px 16px 5px 4px",display:"flex",alignItems:"center",height:30,borderRadius:25},boxIcon:{width:24,height:24,borderRadius:"50%",backgroundColor:h.colorBackground,color:h.accentColor,display:"flex",justifyContent:"center",alignItems:"center"},icon:{width:14,height:16},textTag:{display:"block",fontSize:e.typography.pxToRem(13),fontWeight:700,fontFamily:"Roboto",color:h.textAccentColor},textAvaliacao:{fontFamily:"Roboto",fontSize:e.typography.pxToRem(14),fontWeight:500,marginRight:10,color:h.textBody}})))(),p=(0,a.W6)(),u=(0,T.A)("(max-width:660px)"),f=()=>{100*window.devicePixelRatio<=75&&o()};return(0,s.useEffect)((()=>(window.addEventListener("resize",f),f(),()=>{window.removeEventListener("resize",f)})),[o]),(0,D.jsx)(n.A,{className:d.main,children:(0,D.jsx)(n.A,{maxWidth:"1320px",width:"100%",padding:u?"0px 20px":"0px 10px",style:{gap:u?16:24},children:(0,D.jsx)(z,{dataLength:t.length,next:o,hasMore:c,loader:(0,D.jsx)(n.A,{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"600px",children:(0,D.jsx)(r.A,{})}),scrollThreshold:"10vh",children:null===t||void 0===t?void 0:t.map((e=>(0,D.jsxs)(P.A,{onClick:()=>p.push("/servico/".concat(e.slug)),className:d.card,children:[(0,D.jsx)(i.A,{className:d.text,children:e.titulo}),(0,D.jsx)(i.A,{style:{fontWeight:400,fontSize:u?16:18,marginTop:u?12:16,marginBottom:24,color:h.textBody},children:e.orgao_nome}),(0,D.jsxs)(n.A,{flexWrap:"wrap",display:"flex",style:{gap:10},children:[e.agendavel&&(0,D.jsxs)(n.A,{className:d.tag,children:[(0,D.jsx)("span",{className:d.boxIcon,children:(0,D.jsx)(S.TbCalendarEvent,{className:d.icon})}),(0,D.jsx)(i.A,{className:d.textTag,style:{marginLeft:4},children:"Agend\xe1vel"})]}),e.publico_especifico.length&&e.publico_especifico.map((e=>(0,D.jsxs)(n.A,{className:d.tag,children:["Cidad\xe3o"===e&&(0,D.jsx)("span",{className:d.boxIcon,children:(0,D.jsx)(S.TbMoodSmile,{className:d.icon})}),"Servidor"===e&&(0,D.jsx)("span",{className:d.boxIcon,children:(0,D.jsx)(S.TbUsersGroup,{className:d.icon})}),"Empresa"===e&&(0,D.jsx)("span",{className:d.boxIcon,children:(0,D.jsx)(S.TbBuilding,{className:d.icon})}),(0,D.jsx)(i.A,{className:d.textTag,style:{marginLeft:4},children:e})]},e))),e.online&&(0,D.jsxs)(n.A,{className:d.tag,children:[(0,D.jsx)("span",{className:d.boxIcon,children:(0,D.jsx)(S.TbMouse2,{className:d.icon})}),(0,D.jsx)(i.A,{className:d.textTag,style:{marginLeft:4},children:"Digital"})]})]}),(0,D.jsxs)(n.A,{display:"flex",flexWrap:"wrap",justifyContent:"space-between",style:{gap:16},marginTop:"24px",children:[(0,D.jsxs)(n.A,{display:"flex",alignItems:"center",children:[(0,D.jsx)(i.A,{className:d.textAvaliacao,children:"Avalia\xe7\xe3o:"}),(0,D.jsx)(C.A,{name:"read-only",value:e.total_avaliacao,readOnly:!0,icon:(0,D.jsx)(S.TbStarFilled,{style:{color:"#FFA000",width:18,height:16}}),emptyIcon:(0,D.jsx)(S.TbStar,{style:{color:"#FFA000",width:18,height:16}})})]}),(0,D.jsxs)(n.A,{display:"flex",alignItems:"center",children:[(0,D.jsx)(S.TbFilePencil,{style:{color:h.textBody,marginRight:8}}),(0,D.jsxs)(i.A,{style:{fontWeight:"normal",color:h.textBody,fontSize:14},children:["\xdaltima modifica\xe7\xe3o:"," ",e.updated_at?(0,R.A)(new Date(e.updated_at),"dd/MM/yyyy HH:mm"):"Nunca"," ",!u&&(0,D.jsxs)(D.Fragment,{children:["Atualizado h\xe1"," ",e.updated_at?(0,M.A)(new Date(e.updated_at),new Date,{locale:_.A}):"Nunca"]})]})]})]})]},e.slug)))})})})};function W(){var e;const{colors:t}=(0,s.useContext)(l.A),o=(0,a.zy)(),c=new URLSearchParams(o.search).get("publico"),{data:h,isLoading:d,fetchNextPage:p,hasNextPage:u}=y(c),f=null!==(e=null===h||void 0===h?void 0:h.pages.flatMap((e=>e.results)))&&void 0!==e?e:[];return(0,D.jsxs)("div",{children:[(0,D.jsx)(L,{}),(0,D.jsx)(N,{}),0===(null===f||void 0===f?void 0:f.length)&&(d?(0,D.jsx)(n.A,{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"600px",children:(0,D.jsx)(r.A,{})}):(0,D.jsx)(n.A,{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"600px",children:(0,D.jsx)(i.A,{style:{fontSize:25,color:t.textBody},children:"Nenhum servi\xe7o encontrado!"})})),(null===f||void 0===f?void 0:f.length)>0&&(0,D.jsx)(O,{serviceData:f,onLoadData:()=>p(),hasMore:null!==u&&void 0!==u&&u})]})}}}]);
2//# sourceMappingURL=130.90ee3b57.chunk.js.map

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.