PageSourceSearch

https://rockfamilydental.com/component---src-templates-locations-js-b637267e811cff5eb249.js

js rockfamilydental.com collected 2026-10-04 05:41:18 UTC 15,793 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkgatsby_starter_default=self.webpackChunkgatsby_starter_default||[]).push([[832],{917:function(e,t,n){n.d(t,{Z:function(){return l}});var a=n(5861),o=n(4687),r=n.n(o),i=n(7294),c="index-module--change--Xx8qa",l=function(e){var t=e.locationHours,n=e.timezone,o=void 0===n?"Central Standard Time":n,l=e.passedStyles,s=(e.locationTitle,(0,i.useState)(null)),u=s[0],d=s[1],m=(0,i.useState)(null),p=m[0],f=m[1],y=(0,i.useState)(null),h=y[0],b=y[1],g=(0,i.useState)(null),L=g[0],v=g[1],k=(0,i.useState)(null),E=k[0],C=k[1],w=(0,i.useState)(null),N=w[0],S=w[1],x=function(){var e=(0,a.Z)(r().mark((function e(){var t,n,a,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t="America/Chicago",e.t0=o,e.next="Alaska Standard Time"===e.t0?4:"Alaska Daylight Time"===e.t0?6:"Hawaii-Aleutian Standard Time"===e.t0?8:"Hawaii-Aleutian Daylight Time"===e.t0?10:"Central Standard Time"===e.t0?12:"Central Daylight Time"===e.t0?14:"Eastern Standard Time"===e.t0?16:"Eastern Daylight Time"===e.t0?18:"Mountain Standard Time"===e.t0?20:"Mountain Daylight Time"===e.t0?22:"Pacific Standard Time"===e.t0?24:"Pacific Daylight Time"===e.t0?26:28;break;case 4:case 6:return t="America/Anchorage",e.abrupt("break",29);case 8:case 10:return t="Pacific/Honolulu",e.abrupt("break",29);case 12:case 14:return t="America/Chicago",e.abrupt("break",29);case 16:case 18:return t="America/New_York",e.abrupt("break",29);case 20:case 22:return t="America/Denver",e.abrupt("break",29);case 24:case 26:return t="America/Los_Angeles",e.abrupt("break",29);case 28:t="America/Chicago";case 29:n=new Intl.DateTimeFormat("en-US",{timeZone:t,year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"numeric",second:"numeric"}),a=n.format(new Date),f(new Date(a).getTime()),i=new Date(a).getDay(),b(i=i<=0?6:i-1);case 35:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=function(){var e=new Date(p).getHours(),t=new Date(p).getMinutes();return Number(""+e+(t<10?"0"+t:t))},H=function(){for(var e=null,n=A(),a=function(a){if(null===e&&t[a].isOpen&&(e=a,C(t[a].workingHours[0].startHour)),t[a]&&t[a].isOpen)if(a===h)t[a].workingHours.forEach((function(t){Number(t.startHour.replace(":","")>n)?(e=a,C(t.startHour)):e===a&&(e=null,C(null))}));else if(a>h)return e=a,C(t[a].workingHours[0].startHour),"break"},o=0;o<7;o++){if("break"===a(o))break}switch(e){case 0:S("Monday");break;case 1:S("Tuesday");break;case 2:S("Wednesday");break;case 3:S("Thursday");break;case 4:S("Friday");break;case 5:S("Saturday");break;case 6:S("Sunday")}},T=function(){var e=(0,a.Z)(r().mark((function e(){var n,a,o,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t[h]){e.next=3;break}return e.abrupt("return");case 3:if(!1!==n.isOpen&&null!==n.workingHours){e.next=7;break}return d(!1),H(),e.abrupt("return");case 7:a=!1,o=null,i=A(),n.workingHours.forEach((function(e){if(e.startHour&&e.endHour){var t=Number(e.startHour.replace(":","")),n=Number(e.endHour.replace(":",""));t<=i&&n>=i&&(a=!0,o=e.endHour)}})),d(a),a?v(o):H();case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=function(e){return(e=e.toString().match(/^([01]\d|2[0-3])(:)([0-5]\d)(:[0-5]\d)?$/)||[e]).length>1&&((e=e.slice(1))[5]=+e[0]<12?"AM":"PM",e[0]=+e[0]%12||12),e.join("")};return(0,i.useEffect)((function(){x()}),[]),(0,i.useEffect)((function(){null!==p&&null!==h&&T()}),[p,h]),i.createElement("div",{className:l?l.Hours:"index-module--Hours--jjOim"},null!==u&&i.createElement("span",{className:l?l.status:"index-module--status--kmK1r"},u?"Open":"Closed"),null!==L&&i.createElement("span",{className:l?l.change:c},"Closes: ",M(L)),null!==E&&i.createElement("span",{className:l?l.change:c},"Opens: ",M(E)," ",N))}},9173:function(e,t,n){n.d(t,{Z:function(){return p}});var a=n(7294),o=n(1597),r=n(917),i=n(8067),c=n(2115),l=n(9687),s="index-module--address--TdymP",u="index-module--icon--HnIUf",d="index-module--link--2xdh3",m="index-module--linkappointments--aIpBW",p=function(e){var t=e.location,n=e.arrowRedLocal,p=e.rightArrowYellowOffsite,f=e.rightArrowGray,y=void 0!==f&&f,h=e.isTeamPage,b
1=void 0!==h&&h,g=e.isAppointmentsPage,L=void 0!==g&&g;return a.createElement("div",{className:b?"index-module--LocationCardTeamPage--2jgwD":"index-module--LocationCard--VUSiO"},a.createElement("div",{className:"index-module--top--I0est"},!L&&a.createElement(o.Link,{to:t.link,className:"index-module--title--lyYz8",dangerouslySetInnerHTML:{__html:t.title}}),L&&a.createElement(o.Link,{to:t.link,className:"index-module--titleappointments--u6ZCm",dangerouslySetInnerHTML:{__html:t.title}}),t.birdeyeLocation.hoursOfOperations&&!L&&a.createElement(r.Z,{locationHours:t.birdeyeLocation.hoursOfOperations,utcOffset:t.birdeyeLocation.timezone})),a.createElement("div",{className:"index-module--bottom--gk3b+"},t.ACFLocation.briefDescription&&a.createElement("p",{dangerouslySetInnerHTML:{__html:t.ACFLocation.briefDescription.length>100?t.ACFLocation.briefDescription.substring(0,99)+"...":t.ACFLocation.briefDescription}}),t.birdeyeLocation.location.address1&&a.createElement("span",{className:s,dangerouslySetInnerHTML:{__html:t.birdeyeLocation.location.address1}}),t.birdeyeLocation.location.address2&&a.createElement("span",{className:s,dangerouslySetInnerHTML:{__html:t.birdeyeLocation.location.address2}}),t.birdeyeLocation.location.zip&&t.birdeyeLocation.location.state&&t.birdeyeLocation.location.city&&a.createElement("span",{className:s,dangerouslySetInnerHTML:{__html:t.birdeyeLocation.location.city+", "+t.birdeyeLocation.location.state+" "+t.birdeyeLocation.location.zip}}),function(){if(null!=t&&t.birdeyeLocation.location.lat&&t.birdeyeLocation.location.lng){var e="";return t.ACFLocation.googlePlaceId&&(e="&destination_place_id="+t.ACFLocation.googlePlaceId),a.createElement("a",{className:"index-module--directions--Zxk35",href:"https://www.google.com/maps/dir/?api=1&destination="+t.birdeyeLocation.location.lat+" ,"+t.birdeyeLocation.location.lng+e,target:"_blank",rel:"noopener noreferrer"},"Get Directions ",a.createElement(i.Z,{image:p,passedClass:u}))}}(),t.birdeyeLocation.phone&&a.createElement("a",{className:"index-module--phone--donTi",href:"tel:"+t.birdeyeLocation.phone},(0,c.Z)(t.birdeyeLocation.phone)),t.ACFLocation.bookMyAppointmentLink&&!L&&a.createElement(l.Z,{link:t.ACFLocation.bookMyAppointmentLink,passedClass:d,icon:n}),t.ACFLocation.bookMyAppointmentLink&&L&&a.createElement(o.Link,{to:t.ACFLocation.bookMyAppointmentLink.url,className:m,target:"_blank"},"Book now ",a.createElement(i.Z,{image:n,passedClass:"index-module--iconhover--SIrAv"})," ",y&&a.createElement(i.Z,{image:y,passedClass:u})," "),!t.ACFLocation.bookMyAppointmentLink&&t.birdeyeLocation.phone&&!L&&a.createElement("a",{className:d,href:"tel:"+t.birdeyeLocation.phone},"Call Now"),!t.ACFLocation.bookMyAppointmentLink&&t.birdeyeLocation.phone&&L&&a.createElement("a",{className:m,href:"tel:"+t.birdeyeLocation.phone},"Call Now")))}},6731:function(e,t){var n=function(e){switch(e){case 0:return"Mo";case 1:return"Tu";case 2:return"We";case 3:return"Th";case 4:return"Fr";case 5:return"Sa";case 6:return"Su"}};t.Z=function(e){var t=[];return e&&e.forEach((function(e){if(0!==e.isOpen){var a=n(e.day);null!==a&&e.workingHours.forEach((function(e){t.push('"'+a+" "+e.startHour+"-"+e.endHour+'"')}))}})),t}},8737:function(e,t,n){n.r(t),n.d(t,{default:function(){return g}});var a=n(2982),o=n(5861),r=n(4687),i=n.n(r),c=n(7294),l=n(5414),s=n(1597),u=n(3030),d=n(1278),m=n(6736),p=n(9173),f=n(4659),y=n(6731),h="locations-module--card--nOQ4n",b="locations-module--heading--4VPoc",g=function(e){var t,n,r=e.data,g=r.page,L=r.options.headerSection.ACFHeaderOptions.mainNavigationSettings.headerLogo,v=r.locations.nodes,k=r.rightArrowYellowOffsite,E=r.arrowRedLocal,C=(0,c.useRef)(),w=(0,c.useRef)(),N=(0,c.useRef)(),S=(0,c.useContext)(d.Z),x=S.location,A=(S.getLocation,S.setLocation),H=(0,c.useState)(""),T=H[0],M=H[1],Z=(0,c.useState)(v),_=Z[0],I=Z[1],O=(0,c.useState)(!1),D=O[0],F=O[1],P=(0,c.useState)(null),z=P[0],R=P[1],j=function(){var e=(0,o.Z)(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:M(""),t=function(){var e=(0,o.Z)(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="https://maps.googleapis.com/ma
1ps/api/geocode/json?address="+N.current.value+"&key=AIzaSyCizEZ4SjbzOevyLze0n0RMnyEIxzqRVMU",e.prev=1,e.next=4,fetch(t).then((function(e){return e.json()})).then((function(e){e&&"OK"===e.status&&e.results.length?(A({lat:e.results[0].geometry.location.lat,lng:e.results[0].geometry.location.lng}),F(!0)):alert("Sorry, that zipcode did not return a location.")}));case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),console.log(e.t0);case 9:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(){return e.apply(this,arguments)}}(),w&&w.current&&w.current.options.selectedIndex&&w.current.options[w.current.options.selectedIndex].value&&!1!==w.current.options[w.current.options.selectedIndex].value?(0,s.navigate)(w.current.options[w.current.options.selectedIndex].value):N&&N.current&&N.current.value&&5===N.current.value.length?t():N&&N.current&&N.current.value&&N.current.value.length>0&&5!==N.current.value.length?M("zip"):M("both");case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,c.useEffect)((function(){D&&function(e,t){var n=v.map((function(n){return Object.assign({},n,{distance:(o=n.birdeyeLocation.location.lat,r=n.birdeyeLocation.location.lng,i=e,c=t,l=a(i-o),s=a(c-r),u=Math.sin(l/2)*Math.sin(l/2)+Math.cos(a(o))*Math.cos(a(i))*Math.sin(s/2)*Math.sin(s/2),d=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),m=6371*d,.621371*m)});var o,r,i,c,l,s,u,d,m}));function a(e){return e*(Math.PI/180)}n.sort((function(e,t){return e.distance-t.distance})),I(n)}(x.lat,x.lng)}),[x,D]),(0,c.useEffect)((function(){if(!(v.length<1)){var e=v.find((function(e){return e.title.includes("Chenal")})),t=v.filter((function(e){return!e.title.includes("Chenal")}));if(e){var n=t.map((function(e){var t=(0,y.Z)(e.birdeyeLocation.hoursOfOperations);return'{\n\t\t\t\t"@context": "https://schema.org",\n\t\t\t\t"@type": "Dentist",\n\t\t\t\t"name": "'+e.birdeyeLocation.name+'",\n\t\t\t\t"url": "'+e.link+'",\n\t\t\t\t"telephone": "'+e.birdeyeLocation.phone+'",\n\t\t\t\t"address": {\n\t\t\t\t\t"@type": "PostalAddress",\n\t\t\t\t\t"streetAddress": "'+e.birdeyeLocation.location.address1+" "+e.birdeyeLocation.location.address2+'",\n\t\t\t\t\t"addressLocality": "'+e.birdeyeLocation.location.city+'",\n\t\t\t\t\t"addressRegion": "'+e.birdeyeLocation.location.state+'",\n\t\t\t\t\t"postalCode": "'+e.birdeyeLocation.location.zip+'",\n\t\t\t\t\t"addressCountry": "US"\n\t\t\t\t},\n\t\t\t\t"geo": {\n\t\t\t\t\t"@type": "GeoCoordinates",\n\t\t\t\t\t"latitude": '+e.birdeyeLocation.location.lat+',\n\t\t\t\t\t"longitude": '+e.birdeyeLocation.location.lng+'\n\t\t\t\t},\n\t\t\t\t"openingHours": ['+t+"]\n\t\t\t}"})),a=(0,y.Z)(e.birdeyeLocation.hoursOfOperations),o='{\n\t\t\t"@context": "https://schema.org",\n\t\t\t"@type": "Dentist",\n\t\t\t"name": "'+e.birdeyeLocation.name+'",\n\t\t\t"url": "'+e.link+'",\n\t\t\t"telephone": "'+e.birdeyeLocation.phone+'",\n\t\t\t"address": {\n\t\t\t\t"@type": "PostalAddress",\n\t\t\t\t"streetAddress": "'+e.birdeyeLocation.location.address1+" "+e.birdeyeLocation.location.address2+'",\n\t\t\t\t"addressLocality": "'+e.birdeyeLocation.location.city+'",\n\t\t\t\t"addressRegion": "'+e.birdeyeLocation.location.state+'",\n\t\t\t\t"postalCode": "'+e.birdeyeLocation.location.zip+'",\n\t\t\t\t"addressCountry": "US"\n\t\t\t},\n\t\t\t"geo": {\n\t\t\t\t"@type": "GeoCoordinates",\n\t\t\t\t"latitude": '+e.birdeyeLocation.location.lat+',\n\t\t\t\t"longitude": '+e.birdeyeLocation.location.lng+'\n\t\t\t},\n\t\t\t"openingHours": ['+a+'],\n\t\t\t"department": ['+n+"]\n\t\t}";R(o)}}}),[]),c.createElement(u.Z,null,c.createElement(f.ZP,{post:g}),c.createElement(l.Z,null,z&&c.createElement("script",{type:"application/ld+json"},z)),c.createElement("div",{className:"locations-module--Locations--ywAxo"},c.createElement("div",{className:"locations-module--container--8PMhm"},c.createElement("div",{className:"locations-module--top--nnga8"},c.createElement("h1",{className:"locations-module--screenreader--BH9Rc"},"Rock Family Dental Locations"),L&&c.createElement(s.Link,{to:"/",className:"locations-module--logolink--OEvT2"},c.createElement(m.Z,{image:L,passedClass:"locations-module--logo--D1+zb",loading:"eager"}))),c.createElement("div",{className:"locations-module--middle--FIR4e"},(null==g||null===(t=g.Locations)||void 0===t?void 0:t.heading)&&
1c.createElement("h2",{className:b,dangerouslySetInnerHTML:{__html:g.Locations.heading}}),(null==g||null===(n=g.Locations)||void 0===n?void 0:n.blurb)&&c.createElement("div",{className:"locations-module--blurb--iJhop",dangerouslySetInnerHTML:{__html:g.Locations.blurb}})),c.createElement("div",{className:"locations-module--bottom--+gx0U"},c.createElement("div",{className:"locations-module--full--cVR9U"},c.createElement("div",{className:"locations-module--filters--Oydbk"},c.createElement("div",{className:"locations-module--LocationSelector--SZvdE"},c.createElement("span",{className:b},"Quick Select:"),c.createElement("div",{className:"location"===T||"both"===T?"locations-module--selectcontainererror--tP0BP":"locations-module--selectcontainer--YPns7"},c.createElement("select",{className:"locations-module--select--k3qSv",ref:w,"aria-label":"Quick select a location:",onChange:function(e){e.target.value&&"false"!==e.target.value&&(0,s.navigate)(e.target.value)}},c.createElement("option",{value:!1},"Choose a location"),v.map((function(e,t){return c.createElement("option",{key:e.id,value:e.link,"aria-label":"Select "+e.title,dangerouslySetInnerHTML:{__html:e.ACFLocation.menuTitle?""+e.ACFLocation.menuTitle:e.birdeyeLocation.location.city+", "+e.birdeyeLocation.location.state}})}))))),c.createElement("div",{className:"locations-module--ZipSelector--0Q-c5"},c.createElement("span",{className:b},"Search by ZIP:"),c.createElement("input",{type:"text","aria-label":"Search by ZIP:",ref:N,className:"zip"===T||"both"===T?"locations-module--zipinputerror--CjJZE":"locations-module--zipinput--95x8l",placeholder:"Zip Code",onKeyDown:function(e){"Enter"===e.key&&j()}}),c.createElement("button",{className:"locations-module--go--k+8nc","aria-label":"Go to location",onClick:function(e){j()}},"Go"))),D&&c.createElement("div",{className:"locations-module--ClearFilters--CJTV6"},c.createElement("button",{className:"locations-module--clearfilters--ck-Hb","aria-label":"Clear zip code filter",onClick:function(){F(!1),M(""),N.current&&(N.current.value="");var e=(0,a.Z)(v).sort((function(e,t){return e.title.localeCompare(t.title)}));I(e)}},c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true",focusable:"false"},c.createElement("line",{x1:"1",y1:"1",x2:"11",y2:"11",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),c.createElement("line",{x1:"11",y1:"1",x2:"1",y2:"11",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})),"Clear Filters")),c.createElement("div",{className:"locations-module--cardcontainer--egssE"},_&&_.map((function(e,t){return c.createElement("div",{key:e.id,className:h,ref:t===_.length-1?C:null},c.createElement(p.Z,{key:e.id,location:e,arrowRedLocal:E,rightArrowYellowOffsite:k,isTeamPage:!0}))})),0===_.length&&c.createElement("div",{className:h},c.createElement("p",{className:"locations-module--nolocations---INmo"},"No locations found nearby. Try expanding your search."))))))))}}}]);
2//# sourceMappingURL=component---src-templates-locations-js-b637267e811cff5eb249.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.