(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6532],{19883:function(e,i,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/webcam-mic-test",function(){return t(41779)}])},70741:function(e,i,t){"use strict";t.d(i,{s:function(){return u}});var l=t(85893),n=t(64225),o=t(40416),a=t(93967),r=t.n(a),s=t(29572),d=t(20082),c=t(4243);function u(e){var i=e.className,t=e.themeColor,a=void 0===t?"grey-text":t,u=e.items,m=e.answerType,h=void 0===m?"default":m,v=e.numerals,x=e.hLevel,f=null!=x?x:"span";return(0,l.jsx)("div",{className:i,children:null==u?void 0:u.map(function(e,i){var t=(0,c.b)(a),u={"icon-list":(0,l.jsx)(s.Z,{bFont:"sm",className:"thd-list-numerals mx-auto grid md:grid-cols-2 lg:grid-cols-3 gap-fluid-sm",list:e.answer,numerals:v,showIcons:"hideOnMobile",themeColor:a}),default:(0,l.jsx)(d.J,{content:e.answer,themeColor:a})}[h];return(0,l.jsxs)("details",{className:r()(null==t?void 0:t.bgInner,null==t?void 0:t.bodyText,"thd-details py-fluid-sm thd-rounded-int mb-lg"),style:{"--button-color-fr":null==t?void 0:t.buttonFg,"--focus-color-bg":"transparent","--focus-color-fg":"initial"},children:[(null==e?void 0:e.question)&&(0,l.jsx)("summary",{className:"px-fluid-base thd-summary thd-focus-thick thd-heading-xs list-none",children:(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)(f,{children:e.question}),(0,l.jsx)("div",{className:"chevron",children:(0,l.jsx)(n.JO$,{icon:(0,l.jsx)(o.r,{})})})]})}),(0,l.jsx)("div",{className:r()(t.border,"thd-body-md border-t mt-32 px-fluid-base pt-32"),children:u})]},i)})})}},93360:function(e,i,t){"use strict";t.d(i,{N:function(){return f}});var l=t(85893),n=t(93967),o=t.n(n),a=t(30587),r=t(81986),s=t(51695),d=t(82333),c=t(4243),u=t(91847),m=t(64225),h=t(25675),v=t.n(h),x=t(94471);function f(e){var i,t,n,h,f,g,p,b,j,y=e.ariaLabel,N=e.buttonType,w=e.buttonAlign,C=e.buttonSize,k=e.bgDesktop,_=e.bgMobile,D=e.bFont,M=e.bLineLength,A=e.bMaxWidth,S=e.buttonClassName,L=e.className,F=e.columnClassName,I=e.content,T=e.cta,E=e.eColor,B=e.eStyle,U=e.header,O=e.hClassName,z=e.hFont,R=e.hLineLength,q=e.innerClassName,P=e.innerOverride,J=e.logo,V=void 0===J?null:J,G=e.nested,H=e.stats,W=e.themeColor,$=e.themeColorMode,Z=null===(i=(0,c.b)(W))||void 0===i?void 0:i.bg,Q=(0,a.ZP)("(min-width: 1024px)"),X=null==V?void 0:null===(h=V.image)||void 0===h?void 0:null===(n=h.asset)||void 0===n?void 0:null===(t=n.metadata)||void 0===t?void 0:t.dimensions,K=null==X?void 0:X.aspectRatio,Y=(0,u.U)(147,45,{aspectRatio:K,type:"optimized"}),ee=Y.width,ei=Y.height;return(0,l.jsxs)("section",{className:o()(L,Z,"relative"),children:[(0,l.jsxs)("div",{className:null!=P?P:o()(q,"pt-fluid-sm thd-container-max-inner gap-fluid-sm grid grid-cols-1 relative z-10 lg:grid-cols-2"),children:[(0,l.jsxs)("div",{className:o()(Z,F,"px-fluid-base flex flex-col h-full justify-center items-start",I?"mb-fluid-sm lg:mb-0 lg:pl-0":void 0),style:{"--logo-height":ei+"px","--logo-width":ee+"px","--filter-color":null===(f=(0,c.b)("black"))||void 0===f?void 0:f.logoFilter},children:[V?(0,l.jsxs)("div",{className:"flex flex-cols items-center gap-md mb-2xl w-max-content justify-start",children:[(0,l.jsx)(m.TRl,{maxWidth:20,symbolColor:"white",wordmarkColor:"white"}),(0,l.jsx)("span",{className:"thd-heading-sm thd-regular w-max-content",children:"+"}),(0,l.jsx)(r.d,{altText:null!==(b=null==V?void 0:V.name)&&void 0!==b?b:"",className:"thd-filter thd-logo shrink",height:ei,image:null==V?void 0:V.image,layout:"fixed",style:{"--filter-color":null===(g=(0,c.b)(W))||void 0===g?void 0:g.logoFilter},width:ee})]}):null,(0,l.jsx)(d.B,{bFont:null!=D?D:"lg",bLineLength:null!=M?M:"3xl",bMaxWidth:null!=A?A:void 0,className:o()(T||I?"mb-xl":void 0,"w-full"),eColor:E,eStyle:B,gap:"mb-md",hAlign:"start",hClassName:O,hFont:null!=z?z:"xl",hLevel:"h1",hLineLength:null!=R?R:"lg",header:U,nested:G,themeColor:W,themeColorMode:$,vAlign:"center"}),T&&(0,l.jsx)(s.h,{align:w,ariaLabel:y,buttonType:N,className:S,color:"primary-dark",cta:T,icon:null!==(j=null==T?void 0:null===(p=T.iconRef)||void 0===p?void 0:p.icon)&&void 0!==j?j:void 0,size:C,themeColor:W}),H]}),I]}),(k||_)&&(0,l.jsx)(v(),{src:Q?(0,x.uH)(k).url():(0,x.uH)(_).url(),alt:k?null==k?void 0:k.altText:null==_?void 0:_.altText,width:1e3,height:1200,className:"lg:absolute lg:top-0 lg:right-0 lg:h-full lg:w-auto h-full w-full"})]})}},41779:function(e,i,t){"use strict";t.r(i),t.d(i,{__N_SSG:function(){return R},default:function(){return q}});var l=t(11010),n=t(24043),o=t(97582),a=t(85893),r=t(67294),s=t(30587),d=t(18751),c=t(12441),u=t(31099),m=t(73794),h=t(93360),v=t(12900),x=t(54066),f=t(17097),g=t(64225),p=t(93967),b=t.n(p),j=t(51695),y=t(34439),N=t.n(y);function w(e){var i=e.devices,t=e.setAudioDevice,l=e.setVideoDevice,n=e.onClick,o=i.reduce(function(e,i){return e[i.kind]||(e[i.kind]=[]),e[i.kind].push({deviceType:i.deviceType||i,deviceId:i.deviceId||i,label:i.label||i,kind:i.kind||i}),e},{}),r=i.reduce(function(e,i){return e[i.deviceId]=i,e},{});return(0,a.jsx)("div",{className:"w-full rounded-sm",children:(0,a.jsxs)("div",{className:"w-full flex flex-col",children:[(0,a.jsxs)("fieldset",{className:"flex mb-16 items-center",children:[(0,a.jsxs)("label",{className:b()(o.videoinput?"bg-thd-color-violet-80":"bg-thd-color-violet-100","rounded-sm mr-16 p-6 xl:p-0 w-[32px] h-[32px] md:h-[44px] lg:w-[50px] flex items-center justify-center"),htmlFor:"select-cam",children:[(0,a.jsx)(g.JO$,{color:o.videoinput?"var(--thd-color-violet-20)":"grey6",icon:(0,a.jsx)(f.x,{}),size:"24px"}),o.videoinput&&(0,a.jsx)("span",{className:"sr-only",children:"Select a camera"})]}),(0,a.jsx)("select",{className:b()(N().select,"flex-shrink w-full md:flex-grow h-[32px] md:h-[44px] text-left b-0 items-center border-2 text-thd-color-violet-10",o.videoinput&&"border-primary",o.videoinput&&"bg-thd-color-violet-90"),defaultValue:"selectCam",disabled:!o.videoinput,id:"select-cam",onChange:function(e){l(r[e.target.value])},children:o.videoinput?o.videoinput.map(function(e){return(0,a.jsx)("option",{value:e.deviceId,children:e.label},e.deviceId)}):(0,a.jsx)("option",{disabled:!0,value:"selectCam",children:"Camera is blocked/not found"})}),(0,a.jsx)("span",{"aria-hidden":"true",className:N().arrow,children:(0,a.jsx)(g.JO$,{className:N().arrowIcon,color:o.videoinput?"primary":"grey50",icon:(0,a.jsx)(v.u,{})})})]}),(0,a.jsxs)("fieldset",{className:"flex mb-16 items-center",children:[(0,a.jsxs)("label",{className:b()(o.audioinput?"bg-thd-color-violet-80":"bg-thd-color-violet-100","rounded-sm mr-16 p-6 md:p-0 w-[32px] h-[32px] md:h-[44px] lg:w-[50px] flex items-center justify-center"),htmlFor:"select-mic",children:[(0,a.jsx)(g.JO$,{color:o.audioinput?"var(--thd-color-violet-20)":"grey6",icon:(0,a.jsx)(x.z,{}),size:"24px"}),o.audioinput&&(0,a.jsx)("span",{className:"sr-only",children:"Select a microphone"})]}),(0,a.jsx)("select",{className:b()(N().select,"flex-shrink w-full md:flex-grow h-[32px] md:h-[44px] text-left b-0 items-center border-2 border-thd-color-violet-80 text-thd-color-violet-10",o.audioinput&&"border-primary",o.audioinput&&"bg-thd-color-violet-90"),defaultValue:"selectMic",disabled:!o.audioinput,id:"select-mic",onChange:function(e){t(e.target.value)},children:o.audioinput?o.audioinput.map(function(e){return(0,a.jsx)("option",{value:e.deviceId,children:e.label},e.deviceId)}):(0,a.jsx)("option",{disabled:!0,value:"selectMic",children:"Microphone is blocked/not found"})}),(0,a.jsx)("span",{"aria-hidden":"true",className:N().arrow,children:(0,a.jsx)(g.JO$,{className:N().arrowIcon,color:o.audioinput?"primary":"grey50",icon:(0,a.jsx)(v.u,{})})})]}),(0,a.jsx)(j.h,{align:"start",buttonType:"primary",className:"mt-16",color:"primary-dark",onClick:n,size:"lg",themeColor:"primary",themeColorMode:"dark",children:o.audioinput&&o.videoinput?"Test Settings":"Allow Access"})]})})}var C=t(29572),k=t(82333),_=t(10953),D=t(4243);function M(e){var i=e.list,t=e.heading;return(0,a.jsx)("section",{className:"py-fluid-md md:px-fluid-base lg:px-0",children:(0,a.jsx)("div",{className:b()((0,D.b)("violet-dark").bg,"mx-auto max-w-screen-lg thd-container-plate py-fluid-md md:p-fluid-md lg:p-fluid-lg md:thd-rounded-ext"),children:(0,a.jsx)(_.Q,{contentAlign:"right",contentBlock:(0,a.jsx)(C.Z,{bFont:"sm",className:"px-fluid-base md:thd-px-lg lg:px-0 grid lg:grid-cols-3 gap-y-xl gap-x-xl",hFont:"xs",iconAlign:"center",iconClassName:"flex justify-center items-center",iconSize:"md",list:i,showIcons:"yes",themeColor:"violet-dark"}),headerBlock:(0,a.jsx)(k.B,{bFont:"lg",bLineLength:"2xl",className:"px-fluid-base md:px-0 w-full mx-auto",gap:"mb-sm lg:mb-md",hAlign:"center-end",hFont:"lg",hLineLength:"lg",header:t,nested:!0,themeColor:"violet-dark",vAlign:"center"}),layout:"horizontal",themeColor:"violet-dark"})})})}var A=t(70741);function S(e){var i,t,l,n=e.heading,o=e.items,r=e.themeColor;return(0,a.jsx)("section",{className:b()(null===(i=(0,D.b)(r))||void 0===i?void 0:i.bodyText,null===(t=(0,D.b)(r))||void 0===t?void 0:t.bg,"py-fluid-md"),style:{"--bg-color":null===(l=(0,D.b)(r))||void 0===l?void 0:l.bg},children:(0,a.jsxs)("div",{className:"px-fluid-base max-w-screen-lg mx-auto",children:[(0,a.jsx)(k.B,{bFont:"md",bLineLength:"2xl",className:"px-fluid-base order-last md:order-none mb-fluid-md",hAlign:"center",hFont:"lg",header:n,themeColor:"violet-10",vAlign:"center"}),(0,a.jsx)(A.s,{className:"px-fluid-bassse max-w-screen-xl mx-auto",items:o,themeColor:"violet-20"})]})})}var L=t(81986);function F(e){var i=e.header,t=e.ctaOnClick,l=e.ctaCopy,n=e.image;return(0,a.jsx)("section",{className:"px-fluid-base grid gap-16 lg:gap-64 items-center pb-fluid-sm",children:(0,a.jsx)(_.Q,{contentAlign:"left",headerBlock:(0,a.jsxs)("div",{className:"flex flex-col gap-24 justify-center md:px-fluid-xs xl:px-fluid-sm",children:[(0,a.jsx)(k.B,{bFont:"sm",gap:"mb-md lg:mb-lg",hAlign:"start",hFont:"lg",hLineLength:"lg",header:i,nested:!0,themeColor:"text-thd-color-grey-90",vAlign:"center"}),(0,a.jsx)(j.h,{align:"start",buttonType:"primary",className:"mt-16",color:"primary-dark",onClick:t,size:"lg",children:l})]}),mediaBlock:(0,a.jsx)(L.d,{className:"thd-rounded-int",image:n})})})}var I=t(64970),T=t.n(I),E=t(68685);function B(e){var i=e.audio;return(0,a.jsx)("canvas",{className:"rounded-sm border-2 border-primary h-24 md:h-[40px] w-full",height:"40px",ref:i})}function U(e){var i=e.image;return(0,a.jsxs)("div",{className:"rounded-md text-grey-3 flex flex-col items-center justify-center h-full",children:[(0,a.jsx)(L.d,{className:"thd-rounded-int",image:i}),(0,a.jsx)("p",{className:"thd-body-md text-center mb-8 font-bold",children:"Video Offline"}),(0,a.jsx)("p",{className:"thd-overline text-center",children:"Allow access to begin"})]})}function O(e){var i=e.isDesktop,t=e.video,l=e.hasVideoError,n=e.videoRef,o=e.audio,r=e.audioRef,s=e.hasAudioError,d=e.videoDeviceId,c=e.image;return(0,a.jsx)("section",{className:"px-fluid-base max-w-screen-xl flex flex-col lg:flex-row items-center md:pb-12",children:(0,a.jsxs)("div",{className:"w-full h-auto lg:block rounded-sm bg-white p-lg flex flex-col object-contain",children:[(0,a.jsx)(E.o,{className:"w-full rounded-sm bg-thd-color-violet-100 mb-16",ratio:i?"4:3":"1:1",children:t?(0,a.jsxs)(a.Fragment,{children:[!l&&(0,a.jsx)("span",{className:"sr-only",children:"Webcam is streaming!"}),(0,a.jsx)(T(),{className:"w-full h-full rounded-sm",mirrored:!0,ref:n,videoConstraints:d})]}):(0,a.jsx)(U,{image:c})}),o?(0,a.jsxs)(a.Fragment,{children:[!s&&(0,a.jsx)("span",{className:"sr-only",children:"Mic is working!"}),(0,a.jsx)(B,{audio:r})]}):(0,a.jsx)("canvas",{className:"rounded-sm border-2 border-grey-3 h-24 md:h-[40px] w-full",height:"40px"})]})})}var z=t(27079),R=!0;function q(e){var i,t,v,x,f,g,p=e.initialData,b=e.navData,j=e.accountNavData,y=e.eopData,N=e.footerNavData,C=(0,n._)((0,r.useState)(!1),2),k=C[0],_=C[1],D=(0,n._)((0,r.useState)(!1),2),A=D[0],L=D[1],I=(0,r.useRef)(null),T=(0,r.useRef)(null),E=(0,n._)((0,r.useState)(null),2),B=E[0],U=E[1],R=(0,n._)((0,r.useState)(null),2),q=R[0],P=R[1],J=(0,n._)((0,r.useState)([]),2),V=J[0],G=J[1],H=(0,s.ZP)("(min-width: 1024px)"),W=(0,n._)((0,r.useState)(!1),2),$=W[0],Z=W[1],Q=(0,n._)((0,r.useState)(!1),2),X=Q[0],K=Q[1],Y=function(e,i){var t=document.querySelector("#errorMsg");if(t){var l=document.createElement("p");l.textContent=e,t.appendChild(l)}void 0!==i&&console.error(i)},ee=function(){var e,i,t,l,n,o=navigator;return null!==(n=null!==(l=null!==(t=null!==(i=null!==(e=o.getUserMedia)&&void 0!==e?e:o.webKitGetUserMedia)&&void 0!==i?i:o.webkitGetUserMedia)&&void 0!==t?t:o.moxGetUserMedia)&&void 0!==l?l:o.mozGetUserMedia)&&void 0!==n?n:o.msGetUserMedia},ei=function(e){if(e)return"string"==typeof e?e:e.deviceId},et=function(e){var i=ei(e);return i?{exact:i}:void 0},el=function(e){var i=new AudioContext,t=i.createAnalyser();t.fftSize=128,t.minDecibels=-90,t.maxDecibels=-10,i.createMediaStreamSource(e).connect(t);var l=t.frequencyBinCount,n=new Uint8Array(l);t.smoothingTimeConstant=.6;var o=T.current,a=null==o?void 0:o.getContext("2d");if(a){var r=function(e){for(var i=0,t=0;t