1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7749],{477:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var a=n(37876),r=n(14232),i=n(54182),l=n(89731),o=n(43123),m=n(30488),s=n(61847),c=n(34922),d=n(99917),u=n(55436);let h={light:{label:{color:"color1"},select:{color:"#333",borderColor:"#333"}},dark:{label:{color:"color1"},select:{borderColor:"#fff"}},grey:{label:{color:"#333"},select:{color:"#333",borderColor:"#333",_hover:{borderColor:"#333"}}}};function f({mode:e="dark",position:t="flex-end"}){let{site:n}=(0,c.Q)(),{timezone:g,setTimezone:x}=(0,d.BF)(),[p,w]=(0,r.useState)([]),E=(0,l.A)({base:!0,sm:!1},{fallback:"sm"});return((0,r.useEffect)(()=>{function e(e,t){(e=e.filter(e=>e.value!==t.value)).unshift(t)}let t=u.A.map(e=>({value:e.name,label:e.label})),a=new window.Intl.DateTimeFormat().resolvedOptions().timeZone;a&&e(t,{value:a,label:"Your local time"}),e(t,n.meeting.timezone),w(t)},[n.meeting.timezone]),(0,i.d)(new Date,new Date(n.meeting.meetingEndDate))||!p?.length)?null:(0,a.jsxs)(o.s,{className:"program__timezoneSelector",alignItems:"center",justify:t,mb:2,mt:E?"20px":0,children:[(0,a.jsx)(m.E,{fontWeight:600,color:h[e].label.color,m:"0 10px 0 0",children:E?"Timezone:":"Select Timezone:"}),(0,a.jsxs)(s.MQ,{maxW:"300px",my:0,...h[e].select,className:"crf-timezoneSelect",children:[(0,a.jsx)(s.uT,{onChange:e=>x(e.target.value),value:g,borderRadius:0,children:p.map((e,t)=>(0,a.jsx)("option",{value:e.value,children:e.label},t))}),(0,a.jsx)(s.Nv,{})]})]})}},25864:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var a=n(37876),r=n(30488),i=n(66193),l=n(64041),o=n(99917);function m({date:e,format:t=""}){let{timezone:n}=(0,o.BF)(),s=(0,i.GP)(new l.BB(new Date(e),n),t||"MMMM d, y");return(0,a.jsx)(r.E,{as:"span",children:s})}},44088:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(37876),r=n(43123),i=n(39822);function l({children:e,id:t=null,fullWidth:n=!1,...o}){return(0,a.jsx)(r.s,{className:"pageWrapper__outer scroll-offset",direction:"column",w:"100%",align:"center",bgSize:"cover",px:"30px",...o,children:(0,a.jsx)(i.a,{id:t,className:"pageWrapper__inner scroll-offset",w:"100%",maxW:n?"none":{xl:1200},children:e})})}},55436:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});let a=[{name:"America/New_York",label:"Eastern U.S.",format:"h:mm a"},{name:"America/Chicago",label:"Central U.S.",format:"h:mm a"},{name:"America/Los_Angeles",label:"Pacific U.S.",format:"h:mm a"},{name:"Asia/Shanghai",label:"China",format:"H:mm"},{name:"Asia/Kolkata",label:"India",format:"H:mm"},{name:"Asia/Riyadh",label:"Saudi Arabia",format:"H:mm"},{name:"Europe/Bucharest",label:"Eastern Europe",format:"H:mm"},{name:"Europe/Paris",label:"Central Europe",format:"H:mm"},{name:"Europe/Lisbon",label:"Western Europe",format:"H:mm"}]},59449:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/tests/time",function(){return n(66255)}])},66255:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSP:()=>f,default:()=>g});var a=n(37876),r=n(14232),i=n(20529),l=n(30488),o=n(45503),m=n(98361),s=n(44088),c=n(25864),d=n(79833),u=n(99917),h=n(477),f=!0;function g({site:e}){let[t,n]=(0,r.useState)(),f=new Date,{data:x}=(0,m.Bl)(e.meeting.emmaMeetingId);return(0,r.useEffect)(()=>{x&&n(x[0])},[x]),(0,a.jsx)(s.A,{py:"20px",bgColor:"#fff",color:"#111",h:"100vh",children:(0,a.jsxs)(u.Bd,{children:[(0,a.jsx)(h.A,{mode:"light"}),(0,a.jsx)(i.D,{children:"Time Utilities"}),(0,a.jsx)(l.E,{children:"new Date().toString()"}),(0,a.jsx)(o.C,{p:3,children:f.toString()}),(0,a.jsx)(l.E,{children:"new Date().toLocaleTimeString()"}),(0,a.jsx)(o.C,{p:3,children:f.toLocaleTimeString()}),(0,a.jsxs)(l.E,{children:["Raw ",(0,a.jsx)("strong",{children:"meetingStartDate"})," from Craft:"]}),(0,a.jsx)(o.C,{p:3,children:e.meeting.meetingStartDate}),t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(l.E,{children:["Raw ",(0,a.jsx)("strong",{children:"datetime_start"})," from an Emma event: "]}),(0,a.jsx)(o.C,{p:3,children:t.datetime_start}),(0,a.jsx)(l.E,{children:"Emma datetime passed to new Date()"}),(0,a.jsx)(o.C,{p:3,children:new Date(t.datetime_start).toString()}),(0,a.jsx)(i.D,{children:"Formatting"}),(0,a.jsx)(i.D,{as:"h3",children:"date-fns-tz"}),(0,a.jsxs)(l.E,{children:[(0,a.jsx)("strong",{children:"Format:"})," MMMM d â h:mm a z"]}),(0,a.jsx)(c.A,{date:t.datetime_start,format:"MMMM d"})," â ",(0,a.jsx)(d.A,{event:t})]})]})})}}
1,79833:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(37876),r=n(30488),i=n(66193),l=n(64041),o=n(99917),m=n(55436);function s({event:e,config:t={},styles:n={}}){let c,{timezone:d}=(0,o.BF)(),u={timeFormat:"h:mm a",showEndTime:!1,showTimezone:!1},h={...u,...t},f=m.A.find(e=>e.name===d),g=t.timeFormat||f?.format||u.timeFormat,x=(0,i.GP)(new l.BB(new Date(e.datetime_start),d),g);h.showEndTime&&(x+=" â "+(0,i.GP)(new l.BB(new Date(e.datetime_end),d),g)),h.showTimezone&&(x+=" "+(c=(0,l.KY)(d,new Date(e.datetime_start),"short"))),("MST"===x||"MST"===c)&&(x+="/PDT");let p=RegExp("([A-Z/ ]{2,8})","g");return x=x.replace(p,'<small class="agendaTime__unit">$1</small>'),(0,a.jsx)(r.E,{as:"span",dangerouslySetInnerHTML:{__html:x},...n})}},99917:(e,t,n)=>{"use strict";n.d(t,{BF:()=>c,Bd:()=>d,OH:()=>u});var a=n(37876),r=n(14232),i=n(38248),l=n(34922),o=n(54182),m=n(98361);let s=(0,r.createContext)({});function c(){let e=(0,r.useContext)(s);if(!e)throw Error("useTimezone() must be used within a TimezoneProvider");return e}function d({children:e,defaultZone:t="America/New_York"}){let{site:n}=(0,l.Q)(),c=(0,i.getCookie)("timeZone")||n?.meeting?.timezone?.value||t,[u,h]=(0,r.useState)(c),{data:f}=(0,m.yX)(n?.meeting?.emmaMeetingId,null,!!n?.meeting?.emmaMeetingId);return(0,r.useEffect)(()=>{(0,i.getCookie)("timeZone")},[]),(0,r.useEffect)(()=>{if(!f)return;if((0,o.d)(new Date,new Date(n.meeting.meetingEndDate)))return void(0,i.deleteCookie)("timeZone",{path:"/"});if("In-Person"===f.type){(0,i.deleteCookie)("timeZone",{path:"/"}),h(n.meeting.timezone.value);return}let e=(0,i.getCookie)("timeZone");e?.includes("/")&&h(e)},[f,n.meeting.meetingEndDate,n.meeting.timezone.value]),(0,r.useEffect)(()=>{if(n?.meeting?.meetingEndDate&&!(0,o.d)(new Date,new Date(n.meeting.meetingEndDate))){let e=new Date(Date.now()+6048e5);(0,i.setCookie)("timeZone",u,{expires:e,path:"/",sameSite:"lax"}),(0,i.getCookie)("timeZone")}},[u]),(0,a.jsx)(s.Provider,{value:{timezone:u,setTimezone:h},children:e})}let u=s.Consumer}},e=>{e.O(0,[67914,78028,39865,9701,71705,38248,14657,98361,90636,46593,38792],()=>e(e.s=59449)),_N_E=e.O()}]); 2//# sourceMappingURL=time-3eb5e6c3fdc23528.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.