(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[558],{8593:(e,t,r)=>{"use strict";r.d(t,{u:()=>d});var i=r(85556),n=r(38711),o=r(64082);function a(e){let t=["h1","h2","h3","h4","h5","h6","b","strong"].map(e=>document.querySelectorAll(e)),r=[];t.forEach(t=>{t.forEach(t=>{let i=function(e,t){function r(e){let t=[],r=e;for(;r;)t.push(r),r=r.parentNode;return t}let i=r(e),n=r(t),o=null;for(let e=0;e{e.score=2*(1/(e.domDistance+1))+1/(e.physicalDistance+1)*1}),r.sort((e,t)=>t.score-e.score);let i=r[0];return l(i?.text??"Unknown")}function s(e){return e.includes("rgb")?function(e){let[t,r,i]=e.replace("rgb(","").replace(")","").split(",").map(e=>Number(e).toString(16).padStart(2,"0"));return`#${t?.toUpperCase()}${r?.toUpperCase()}${i?.toUpperCase()}`}(e):e}function c(e){let t=e.textContent;if(""!==t&&t||(t=e.ariaLabel??void 0),!t)return;let r="";for(let e=0;e100?`${t.slice(0,100)}...`:t}function d({analytics:e,active:t=!0,events:r=["click","hover","focus"]}){let l=(0,n.usePathname)(),[d,u]=(0,i.useState)(new Set);(0,i.useEffect)(()=>{let e=()=>{if("undefined"!=typeof document)u(new Set([...document.querySelectorAll("[data-track]"),...document.querySelectorAll("[data-track-intent]")]))},t=null,r=setTimeout(()=>{e(),(t=new MutationObserver(t=>{let r=!1;t.forEach(e=>{"childList"===e.type&&[...e.addedNodes,...e.removedNodes].forEach(e=>{e instanceof Element&&(e.matches("[data-track], [data-track-intent]")||e.querySelector("[data-track], [data-track-intent]"))&&(r=!0)})}),r&&e()})).observe(document.body,{childList:!0,subtree:!0})},200);return()=>{clearTimeout(r),t&&t.disconnect()}},[l]),(0,i.useEffect)(()=>{if("undefined"==typeof document)return;async function i(r,i){if(await new Promise(e=>{setTimeout(e,100),requestAnimationFrame(()=>{setTimeout(e,0)})}),!t||!i.target)return;let n=i.target.closest("[data-track], [data-track-intent]");if(!n)return;let l=n.getAttribute("data-track-context")??a(n);n.setAttribute("data-track-context",l);let d=n.getAttribute("data-track-intent")??void 0,u=window.getComputedStyle(n),p=Number.parseInt(u.fontSize),f=n.getAttribute("data-track-click-name")||l,h=n.getAttribute("data-track-click-value")||d,g={text:n.getAttribute("data-track-text")||c(n),tag:n.tagName,intent:d,fontSize:p,context:l,width:n.clientWidth,height:n.clientHeight,color:s(u.color),ctaSize:function(e){let t=e.clientHeight;return t<=24?"tiny":t<=32?"small":t<=40?"medium":"large"}(n),backgroundColor:s(u.backgroundColor),...n instanceof HTMLAnchorElement&&n.href&&{href:n.href},..."Click"===r&&f&&{click_name:f},..."Click"===r&&h&&{click_value:h}},v={Click:o.X.CLICK_ELEMENT,Focus:o.X.FOCUS_ELEMENT}[r];e.track(v,g)}let n=e=>{i("Click",e)},l=e=>{i("Focus",e)};return d.forEach(e=>{r.includes("click")&&e.addEventListener("click",n),r.includes("focus")&&e.addEventListener("focus",l,!0)}),()=>{d.forEach(e=>{r.includes("click")&&e.removeEventListener("click",n),r.includes("focus")&&e.removeEventListener("focus",l,!0)})}},[t,e,d,r]);let[p,f]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if("undefined"==typeof document)return;let e=e=>{e.ctrlKey&&e.shiftKey&&"a"===e.key.toLowerCase()&&f(e=>!e)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[d]),(0,i.useEffect)(()=>{p?(d.forEach(e=>{let t=e.getAttribute("data-track-intent"),r=e.getAttribute("data-track-context")||a(e),i=e.getAttribute("data-track-text")||c(e);e.setAttribute("data-track-debug",`Intent: ${t} Context: ${r} Text: ${i}`)}),document.documentElement.classList.add("view-analytics")):document.documentElement.classList.remove("view-analytics")},[p,d])}r(96083)},50558:(e,t,r)=>{"use strict";r.d(t,{XN:()=>M.wZ,zS:()=>O,uF:()=>N.u});var i=r(10488),n=function(e){return e.Heap="Heap",e.Koala="Koala",e.Vercel="Vercel",e.Algolia="Algolia",e.Test="Test",e}({});let o=!!r(84125).env.CI,a=e=>!!s(e)&&(e instanceof Error||function e(t){if("[object Error]"===Object.prototype.toString.call(t))return!0;let r=Object.getPrototypeOf(t);return null!==r&&e(r)}(e)),s=e=>"object"==typeof e&&null!==e&&!Array.isArray(e);r(84125);let c="@vercel/site-analytics";var l=function(e){return e.Service="Service",e.Providers="Providers",e}({});function d(e){return!1}let u={error:function(e,t,r){if(!o){console.error(`analytics error: ${t}`);return}},warn:function(e,t,r){var i;i=0},debug:function(e,t,...r){var i;i=0}};class p{#e;#t;constructor(e){this.#e=new Map,this.#t=e,this.logCreation()}track(e,t){let r={};for(let[e,t]of this.#e.entries())r[e]=t.id;this.executeOnProviders("track",{event:e,properties:{...t,...r}})}addScope(e,{managedByHook:t=!1}={}){let r=p.scopeName(e),i=this.#e.get(r);p.guardAgainstBadScopeManagement({scope:i,managedByHook:t,action:"add"}),this.#e.set(r,{id:crypto.randomUUID(),managedByHook:t})}removeScope(e,{managedByHook:t=!1}={}){let r=p.scopeName(e),i=this.#e.get(r);return p.guardAgainstBadScopeManagement({scope:i,managedByHook:t,action:"remove"}),this.#e.delete(r)}resetScope(e){let t=p.scopeName(e);this.#e.set(t,{id:crypto.randomUUID(),managedByHook:this.#e.get(t)?.managedByHook??!1})}executeOnProvider(e,t,...r){let i=this.#t.find(t=>t.id===e);if(!i)return u.warn(l.Service,`'${e}' not found when attempting to execute '${t}'. To execute '${t}', you will need to supply the '${e}' with '${t}' implemented. Returning null.`,{}),null;let n=i.actions[t];if(!n)return u.warn(l.Service,`'${t}' not found implemented by '${i.id}', but was called. Returning null`,{}),null;try{return u.debug(l.Service,`Executed '${t}' on '${i.id}' with args:`,r),n(...r)}catch(e){return u.error(`Failed to run '${t}' on ${i.id} provider`,`Action failed to run on ${i.id}`,e),null}}executeOnProviders(e,...t){let r=[];if(this.#t.forEach(i=>{let n=i.actions[e];if(n){try{n(...t)}catch(r){u.error(`Failed to run '${e}' on ${i.id} provider with args ${JSON.stringify(t)}`,`Action failed to run on ${i.id}`,r)}r.push(i.id)}}),0===r.length){u.warn(l.Service,`NO OP, No providers found when executing '${e}'. To execute '${e}', you will need to supply a provider with '${e}' implemented.`);return}u.debug(l.Service,`Executed '${e}' for provider${r.length>1?"s":""}: ${r.join(", ")} with args`,t)}identify(e,t){this.executeOnProviders("identify",e,t)}reset(){this.executeOnProviders("reset")}setPersistedGlobalProperties(e){this.executeOnProviders("setPersistedGlobalProperties",e)}clearPersistedGlobalProperties(){this.executeOnProviders("clearPersistedGlobalProperties")}setGlobalProperties(e){this.executeOnProviders("setGlobalProperties",e)}setTraits(e){this.executeOnProviders("setTraits",e)}enabled(e){if(!e)return this.#t.every(e=>e.enabled);let t=this.#t.find(t=>t.id===e);return!!t&&t.enabled}getDisabledProviders(){return this.#t.filter(e=>!e.enabled)}setKoalaAutocapture(e){this.executeOnProvider(n.Koala,"setKoalaAutocapture",e)}getAlgoliaClient(){let e=this.executeOnProvider(n.Algolia,"getAlgoliaClient");if(!e)throw Error("Algolia client not found. If you wish to use algolia please provide an Algolia provider when creating your analytics service.");return e}getAnonymousId(){return this.executeOnProvider(n.Heap,"getAnonymousId")}getScripts(e,t){let r=this.getDisabledProviders();if(u.debug(l.Service,"Loading analytics scripts..."),r.length>0){let e=r.map(e=>e.id).join(", ");u.debug(l.Service,`Found disabled providers when creating analytics scripts: ${e}. Read the README.md in @vercel/site-analytics for more information on why these providers may be disabled.`)}return(0,i.jsx)(i.Fragment,{children:this.#t.map(r=>{let i=`Excluding provider '${r.id}' from 'getScripts' function`;return r.Script?r.enabled?e.includes(r.category)?t&&t.includes(r.id)?(u.debug(l.Service,`${i} because it was explicitly excluded from the 'getScripts' function.`),null):r.Script:(u.debug(l.Service,`${i} because it's category '${r.category}' is not included in the categories provided to 'getScripts' function.`),null):(u.debug(l.Service,`${i} because it not enabled.`),null):null})})}getAllCookies(){let e=[];return this.#t.forEach(t=>{t.cookies&&e.push(...t.cookies)}),e}getAllCookiesMappedToConsentCategory(){let e=new Map;return this.#t.forEach(t=>{t.cookies&&t.cookies.forEach(r=>{e.set(r,t.category)})}),e}getProvidersDebugInfo(){return Object.fromEntries(this.#t.map(e=>[["enabled",e.enabled],["actions",Object.keys(e.actions)]]))}logCreation(){u.debug(l.Service,`Analytics service created with providers: ${this.#t.map(e=>`'${e.id}'`).join(", ")}. Of those, the following are disabled: ${this.getDisabledProviders().length?this.getDisabledProviders().map(e=>`'${e.id}'`).join(", "):"All providers are enabled"}. `,{providers:this.getProvidersDebugInfo()})}static scopeName(e){return`scope-${e}`}static guardAgainstBadScopeManagement({scope:e,managedByHook:t,action:r}){e&&e.managedByHook}}var f=r(19722);function h({appId:e}){let t=`window.heap=window.heap||[],heap.load=function(e,t){window.heap.appid=e,window.heap.config=t=t||{};var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src="/_stream/external/cdn.heapanalytics.com/js/heap-"+e+".js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r,a);for(var n=function(e){return function(){heap.push([e].concat(Array.prototype.slice.call(arguments,0)))}},p=["addEventProperties","addUserProperties","clearEventProperties","identify","resetIdentity","removeEventProperty","setEventProperties","track","unsetEventProperty"],o=0;o{w={...e},u.debug(l.Providers,"Heap Mock: heap.addEventProperties",{...e,...w})},clearEventProperties:()=>{w={},u.debug(l.Providers,"Heap Mock: heap.clearEventProperties")},identify:e=>u.debug(l.Providers,"Heap Mock: heap.identify",e),resetIdentity:()=>{w={},u.debug(l.Providers,"Heap Mock: heap.resetIdentity")},track:(...e)=>u.debug(l.Providers,"Heap Mock: heap.track",...e)};async function P({condition:e,onConditionMet:t,onTimeout:r,interval:i=250,maxAttempts:n=32}){return new Promise(o=>{let a=0,s=async()=>{await e()?(t&&await t(),o()):++a>=n?(r&&r(),o()):setTimeout(()=>{s()},i)};s()})}function A({slug:e}){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.default,{dangerouslySetInnerHTML:{__html:'!function(t){if(window.ko)return;window.ko=[],["identify","track", "removeListeners", "open", "on", "off", "qualify", "ready"].forEach(function(t){ko[t]=function(){var n=[].slice.call(arguments);return n.unshift(t),ko.push(n),ko}});}();'},id:"script-koala-placeholder"},"script-koala-placeholder"),(0,i.jsx)(f.default,{id:"script-koala-cdn",onReady:()=>{let e=window.ko;e.ready(S),e.on("profile-update",S)},src:`/_stream/external/cdn.koala.live/v1/${e}/sdk.js`},"script-koala-cdn")]})}function S(){P({condition:()=>!!(window.heap&&(window.ko?.profile?.user.id||window.ko?.profile?.qualification?.account_score?.fit_grade_letter)),onConditionMet:()=>{let e=window.ko.profile.user.id,t=window.ko.profile.qualification?.account_score?.fit_grade_letter;window.heap.addUserProperties({...e?{koala_user_id:e}:{},...t?{koala_fit_grade_letter:t}:{}})}})}function C(e){if(!e||Array.isArray(e))return;let t="Koala `identify` call in `setTraits` failed for an unknown reason.";"string"==typeof e?t=e:a(e)&&(t=e.message),u.warn(l.Service,t)}r(84125);let _=["ko_sid","ko_id"],I={initialized:!1,identify:(...e)=>(u.debug(l.Providers,"Koala Mock: koala.identify",...e),Promise.resolve(void 0)),track:(...e)=>(u.debug(l.Providers,"Koala Mock: koala.track",...e),Promise.resolve(void 0)),ready:e=>e(),startAutocapture:()=>{u.debug(l.Providers,"Koala Mock: koala.startAutocapture")},stopAutocapture:()=>{u.debug(l.Providers,"Koala Mock: koala.stopAutocapture")},profile:void 0};var $=r(6521),x=r.n($),T=r(85778),M=r(88732),N=r(8593);let O=new p([function({appId:e}){function t(){return(0,window.heap)?window.heap:b}return{id:n.Heap,enabled:!0,cookies:g,category:"analytics",actions:{identify:function(e){t().identity!==e&&t().identify(e)},track:function({event:e,properties:r}){let i={...r,...r?v.reduce((e,t)=>(t in r&&(e[t]="REDACTED"),e),{}):{}};t().track(e,i),function({event:e,properties:r}){0,window.heap||(y.push({event:e,properties:r}),k&&clearInterval(k),k=setInterval(()=>{if(window.heap){for(let e of(k&&clearInterval(k),y))t().track(e.event,e.properties);y.length,y.splice(0,y.length)}},250))}({event:e,properties:i})},setPersistedGlobalProperties:function(e){m={...e.experimentParameters},t().addEventProperties({...m})},clearPersistedGlobalProperties:function(){m={}},setGlobalProperties:function(e){E&&clearInterval(E),E=setInterval(()=>{window.heap&&(E&&clearInterval(E),t().clearEventProperties(),t().addEventProperties({...m,isLoggedIn:e.isLoggedIn,isVercelian:e.isVercelian,isVercelianEncoded:e.isVercelian.toString(),...e.plan&&{"Subscription Plan":e.plan},...e.role&&{Role:e.role},...e.teamId&&{"Team Id":e.teamId},...e.isTrial&&{"Is Trial":e.isTrial},userVersion:e.userVersion,userDefaultTeamId:e.userDefaultTeamId,...e.firmographicScore&&{firmographicScore:e.firmographicScore}}))},250)},getAnonymousId:function(){return t().userId},reset:()=>{t().resetIdentity()}},Script:(0,i.jsx)(h,{appId:e.prod},"script-heap-analytics")}}({appId:{prod:"3987253934",dev:"624982907"}}),function({slug:e}){function t(){return window.ko??I}function r(e){try{Promise.resolve("string"==typeof e?function(e){if(!t().profile||t().profile?.user.id!==e)return t().identify({id:e})}(e):function(e){let{userId:r,...i}=e;return t().identify({...i,id:r})}(e)).catch(C)}catch(e){C(e)}}return{id:n.Koala,enabled:!0,cookies:_,category:"analytics",actions:{identify:(e,t)=>{if(t)return r(t)},track:function({event:e,properties:r}){let{context:i,intent:n,text:o}=r;i&&n?t().track(`${e} ${i}${o?` ${o}`:""}`,r):t().track(e,r)},setTraits:function(e){return r(e)},setKoalaAutocapture:function e(r,i=0){if(!(i>5)){if(!t().initialized){setTimeout(()=>{e(r,i+1)},2e3);return}r?t().startAutocapture():t().stopAutocapture()}}},Script:(0,i.jsx)(A,{slug:e.prod},"script-koala-analytics-group")}}({slug:{dev:"vercel-dev",prod:"vercel"}}),{id:n.Vercel,enabled:!0,category:"essential",actions:{track:function({event:e,properties:t}){(0,T.u4)(e,t?x()(t):void 0)}}}])},64082:(e,t,r)=>{"use strict";r.d(t,{X:()=>i});var i=function(e){return e.CLICK_EVENT="Clicked a button or link",e.EXPERIMENT_VIEWED="Experiment Viewed",e.FEEDBACK_SUBMITTED="Feedback Submitted",e.CLICK_ELEMENT="Click Element",e.FOCUS_ELEMENT="Focus Element",e}({})},88732:(e,t,r)=>{"use strict";r.d(t,{wZ:()=>a});var i=r(64082),n=function(e){return e.DOC_SEARCH_AI="Doc Search AI Method",e}({}),o=function(e){return e.GAME_STARTED="Game started",e.GAME_CATEGORY_COMPLETE="Game category complete",e.GAME_WON="Game won",e.REGISTRATION_COMPLETE="Registration complete",e.COMMAND_RABBIT="Command Rabbit",e.COMMAND_VERCEL="Command Vercel",e.COMMAND_SANITY="Command Sanity",e.VIEW_STREAM="Viewed stream",e}({});let a={...i.X,...n,...o}},96083:()=>{}}]);