{
  "version": 3,
  "sources": ["ssg:https://ga.jspm.io/npm:@uidotdev/usehooks@2.2.0/index.js", "ssg:https://framer.com/m/Canvas-OhxN.js", "ssg:https://framer.com/m/PostHog-rnMD.js@xpfQw1vfs9MpzZFQPJup", "ssg:https://framerusercontent.com/modules/w9cIGibYYzwMpEWJvJCA/xVVgbEL0PZyXhkmJoL5B/templates.js"],
  "sourcesContent": ["import*as e from\"react\";function isShallowEqual(e,t){const n=Object.keys(e);const o=Object.keys(t);if(n.length!==o.length)return false;for(let o of n)if(e[o]!==t[o])return false;return true}function isTouchEvent({nativeEvent:e}){return window.TouchEvent?e instanceof TouchEvent:\"touches\"in e}function isMouseEvent(e){return e.nativeEvent instanceof MouseEvent}function throttle(e,t){let n=0;return()=>{const o=Date.now();if(o-n>=t){e();n=o}}}const dispatchStorageEvent=(e,t)=>{window.dispatchEvent(new StorageEvent(\"storage\",{key:e,newValue:t}))};function useBattery(){const[t,n]=e.useState({supported:true,loading:true,level:null,charging:null,chargingTime:null,dischargingTime:null});e.useEffect((()=>{if(!navigator.getBattery){n((e=>({...e,supported:false,loading:false})));return}let e=null;const handleChange=()=>{n({supported:true,loading:false,level:e.level,charging:e.charging,chargingTime:e.chargingTime,dischargingTime:e.dischargingTime})};navigator.getBattery().then((t=>{e=t;handleChange();t.addEventListener(\"levelchange\",handleChange);t.addEventListener(\"chargingchange\",handleChange);t.addEventListener(\"chargingtimechange\",handleChange);t.addEventListener(\"dischargingtimechange\",handleChange)}));return()=>{if(e){e.removeEventListener(\"levelchange\",handleChange);e.removeEventListener(\"chargingchange\",handleChange);e.removeEventListener(\"chargingtimechange\",handleChange);e.removeEventListener(\"dischargingtimechange\",handleChange)}}}),[]);return t}function useClickAway(t){const n=e.useRef(null);const o=e.useRef(t);e.useLayoutEffect((()=>{o.current=t}));e.useEffect((()=>{const handler=e=>{const t=n.current;t&&!t.contains(e.target)&&o.current(e)};document.addEventListener(\"mousedown\",handler);document.addEventListener(\"touchstart\",handler);return()=>{document.removeEventListener(\"mousedown\",handler);document.removeEventListener(\"touchstart\",handler)}}),[]);return n}function oldSchoolCopy(e){const t=document.createElement(\"textarea\");t.value=e;document.body.appendChild(t);t.select();document.execCommand(\"copy\");document.body.removeChild(t)}function useCopyToClipboard(){const[t,n]=e.useState(null);const o=e.useCallback((e=>{const handleCopy=async()=>{try{if(!navigator?.clipboard?.writeText)throw new Error(\"writeText not supported\");await navigator.clipboard.writeText(e);n(e)}catch(t){oldSchoolCopy(e);n(e)}};handleCopy()}),[]);return[t,o]}function useCounter(t=0,n={}){const{min:o,max:r}=n;if(o&&t<o)throw new Error(`Your starting value of ${t} is less than your min of ${o}.`);if(r&&t>r)throw new Error(`Your starting value of ${t} is greater than your max of ${r}.`);const[s,u]=e.useState(t);const increment=()=>{const e=s+1;r&&e>r||u(e)};const decrement=()=>{const e=s-1;o&&e<o||u(e)};const set=e=>{r&&e>r||o&&e<o||e!==s&&u(e)};const reset=()=>{s!==t&&u(t)};return[s,{increment:increment,decrement:decrement,set:set,reset:reset}]}function useDebounce(t,n){const[o,r]=e.useState(t);e.useEffect((()=>{const e=setTimeout((()=>{r(t)}),n);return()=>{clearTimeout(e)}}),[t,n]);return o}function useDefault(t,n){const[o,r]=e.useState(t);return\"undefined\"===typeof o||null===o?[n,r]:[o,r]}function useDocumentTitle(t){e.useEffect((()=>{document.title=t}),[t])}function useFavicon(t){e.useEffect((()=>{const e=document.querySelector(\"link[rel*='icon']\")||document.createElement(\"link\");e.type=\"image/x-icon\";e.rel=\"shortcut icon\";e.href=t;document.getElementsByTagName(\"head\")[0].appendChild(e)}),[t])}function useGeolocation(t={}){const[n,o]=e.useState({loading:true,accuracy:null,altitude:null,altitudeAccuracy:null,heading:null,latitude:null,longitude:null,speed:null,timestamp:null,error:null});const r=e.useRef(t);e.useEffect((()=>{const onEvent=({coords:e,timestamp:t})=>{o({loading:false,timestamp:t,latitude:e.latitude,longitude:e.longitude,altitude:e.altitude,accuracy:e.accuracy,altitudeAccuracy:e.altitudeAccuracy,heading:e.heading,speed:e.speed})};const onEventError=e=>{o((t=>({...t,loading:false,error:e})))};navigator.geolocation.getCurrentPosition(onEvent,onEventError,r.current);const e=navigator.geolocation.watchPosition(onEvent,onEventError,r.current);return()=>{navigator.geolocation.clearWatch(e)}}),[]);return n}const t={past:[],present:null,future:[]};const useHistoryStateReducer=(e,t)=>{const{past:n,present:o,future:r}=e;if(\"UNDO\"===t.type)return{past:n.slice(0,n.length-1),present:n[n.length-1],future:[o,...r]};if(\"REDO\"===t.type)return{past:[...n,o],present:r[0],future:r.slice(1)};if(\"SET\"===t.type){const{newPresent:r}=t;return t.newPresent===o?e:{past:[...n,o],present:r,future:[]}}if(\"CLEAR\"===t.type)return{...initialState,present:t.initialPresent};throw new Error(\"Unsupported action type\")};function useHistoryState(n={}){const o=e.useRef(n);const[r,s]=e.useReducer(useHistoryStateReducer,{...t,present:o.current});const u=0!==r.past.length;const c=0!==r.future.length;const i=e.useCallback((()=>{u&&s({type:\"UNDO\"})}),[u]);const a=e.useCallback((()=>{c&&s({type:\"REDO\"})}),[c]);const l=e.useCallback((e=>s({type:\"SET\",newPresent:e})),[]);const d=e.useCallback((()=>s({type:\"CLEAR\",initialPresent:o.current})),[]);return{state:r.present,set:l,undo:i,redo:a,clear:d,canUndo:u,canRedo:c}}function useHover(){const[t,n]=e.useState(false);const o=e.useRef(null);e.useEffect((()=>{const e=o.current;if(!e)return;const handleMouseEnter=()=>{n(true)};const handleMouseLeave=()=>{n(false)};e.addEventListener(\"mouseenter\",handleMouseEnter);e.addEventListener(\"mouseleave\",handleMouseLeave);return()=>{e.removeEventListener(\"mouseenter\",handleMouseEnter);e.removeEventListener(\"mouseleave\",handleMouseLeave)}}),[]);return[o,t]}function useIdle(t=6e4){const[n,o]=e.useState(false);e.useEffect((()=>{let e;const handleTimeout=()=>{o(true)};const n=throttle((n=>{o(false);window.clearTimeout(e);e=window.setTimeout(handleTimeout,t)}),500);const handleVisibilityChange=()=>{document.hidden||n()};e=window.setTimeout(handleTimeout,t);window.addEventListener(\"mousemove\",n);window.addEventListener(\"mousedown\",n);window.addEventListener(\"resize\",n);window.addEventListener(\"keydown\",n);window.addEventListener(\"touchstart\",n);window.addEventListener(\"wheel\",n);document.addEventListener(\"visibilitychange\",handleVisibilityChange);return()=>{window.removeEventListener(\"mousemove\",n);window.removeEventListener(\"mousedown\",n);window.removeEventListener(\"resize\",n);window.removeEventListener(\"keydown\",n);window.removeEventListener(\"touchstart\",n);window.removeEventListener(\"wheel\",n);document.removeEventListener(\"visibilitychange\",handleVisibilityChange);window.clearTimeout(e)}}),[t]);return n}function useIntersectionObserver(t={}){const{threshold:n=1,root:o=null,rootMargin:r=\"0%\"}=t;const s=e.useRef(null);const[u,c]=e.useState(null);e.useEffect((()=>{const e=s?.current;if(!e||\"function\"!==typeof IntersectionObserver)return;const t=new IntersectionObserver((([e])=>{c(e)}),{threshold:n,root:o,rootMargin:r});t.observe(e);return()=>{c(null);t.disconnect()}}),[n,o,r]);return[s,u]}function useIsClient(){const[t,n]=e.useState(false);e.useEffect((()=>{n(true)}),[]);return t}function useIsFirstRender(){const t=e.useRef(true);if(true===t.current){t.current=false;return true}return t.current}function useList(t=[]){const[n,o]=e.useState(t);const r=e.useCallback((e=>{o(e)}),[]);const s=e.useCallback((e=>{o((t=>[...t,e]))}),[]);const u=e.useCallback((e=>{o((t=>[...t.slice(0,e),...t.slice(e+1)]))}),[]);const c=e.useCallback(((e,t)=>{o((n=>[...n.slice(0,e),t,...n.slice(e)]))}),[]);const i=e.useCallback(((e,t)=>{o((n=>n.map(((n,o)=>o===e?t:n))))}),[]);const a=e.useCallback((()=>o([])),[]);return[n,{set:r,push:s,removeAt:u,insertAt:c,updateAt:i,clear:a}]}const setLocalStorageItem=(e,t)=>{const n=JSON.stringify(t);window.localStorage.setItem(e,n);dispatchStorageEvent(e,n)};const removeLocalStorageItem=e=>{window.localStorage.removeItem(e);dispatchStorageEvent(e,null)};const getLocalStorageItem=e=>window.localStorage.getItem(e);const useLocalStorageSubscribe=e=>{window.addEventListener(\"storage\",e);return()=>window.removeEventListener(\"storage\",e)};const getLocalStorageServerSnapshot=()=>{throw Error(\"useLocalStorage is a client-only hook\")};function useLocalStorage(t,n){const getSnapshot=()=>getLocalStorageItem(t);const o=e.useSyncExternalStore(useLocalStorageSubscribe,getSnapshot,getLocalStorageServerSnapshot);const r=e.useCallback((e=>{try{const n=\"function\"===typeof e?e(JSON.parse(o)):e;void 0===n||null===n?removeLocalStorageItem(t):setLocalStorageItem(t,n)}catch(e){console.warn(e)}}),[t,o]);e.useEffect((()=>{null===getLocalStorageItem(t)&&\"undefined\"!==typeof n&&setLocalStorageItem(t,n)}),[t,n]);return[o?JSON.parse(o):n,r]}function useLockBodyScroll(){e.useEffect((()=>{const e=window.getComputedStyle(document.body).overflow;document.body.style.overflow=\"hidden\";return()=>{document.body.style.overflow=e}}),[])}function useLongPress(t,n={}){const{threshold:o=400,onStart:r,onFinish:s,onCancel:u}=n;const c=e.useRef(false);const i=e.useRef(false);const a=e.useRef();return e.useMemo((()=>{if(\"function\"!==typeof t)return{};const start=e=>{if(isMouseEvent(e)||isTouchEvent(e)){r&&r(e);i.current=true;a.current=setTimeout((()=>{t(e);c.current=true}),o)}};const cancel=e=>{if(isMouseEvent(e)||isTouchEvent(e)){c.current?s&&s(e):i.current&&u&&u(e);c.current=false;i.current=false;a.current&&window.clearTimeout(a.current)}};const e={onMouseDown:start,onMouseUp:cancel,onMouseLeave:cancel};const n={onTouchStart:start,onTouchEnd:cancel};return{...e,...n}}),[t,o,u,s,r])}function useMap(t){const n=e.useRef(new Map(t));const[,o]=e.useReducer((e=>e+1),0);n.current.set=(...e)=>{Map.prototype.set.apply(n.current,e);o();return n.current};n.current.clear=(...e)=>{Map.prototype.clear.apply(n.current,e);o()};n.current.delete=(...e)=>{const t=Map.prototype.delete.apply(n.current,e);o();return t};return n.current}function useMeasure(){const t=e.useRef(null);const[n,o]=e.useState({width:null,height:null});e.useLayoutEffect((()=>{if(!t.current)return;const e=new ResizeObserver((([e])=>{e&&e.contentRect&&o({width:e.contentRect.width,height:e.contentRect.height})}));e.observe(t.current);return()=>{e.disconnect()}}),[]);return[t,n]}function useMediaQuery(t){const n=e.useCallback((e=>{const n=window.matchMedia(t);n.addEventListener(\"change\",e);return()=>{n.removeEventListener(\"change\",e)}}),[t]);const getSnapshot=()=>window.matchMedia(t).matches;const getServerSnapshot=()=>{throw Error(\"useMediaQuery is a client-only hook\")};return e.useSyncExternalStore(n,getSnapshot,getServerSnapshot)}function useMouse(){const[t,n]=e.useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0});const o=e.useRef(null);e.useLayoutEffect((()=>{const handleMouseMove=e=>{let t={x:e.pageX,y:e.pageY};if(o.current instanceof HTMLElement){const{left:n,top:r}=o.current.getBoundingClientRect();const s=n+window.pageXOffset;const u=r+window.pageYOffset;const c=e.pageX-s;const i=e.pageY-u;t.elementX=c;t.elementY=i;t.elementPositionX=s;t.elementPositionY=u}n((e=>({...e,...t})))};document.addEventListener(\"mousemove\",handleMouseMove);return()=>{document.removeEventListener(\"mousemove\",handleMouseMove)}}),[]);return[t,o]}const getConnection=()=>navigator?.connection||navigator?.mozConnection||navigator?.webkitConnection;function useNetworkState(){const t=e.useRef({});const n=e.useCallback((e=>{window.addEventListener(\"online\",e,{passive:true});window.addEventListener(\"offline\",e,{passive:true});const t=getConnection();t&&t.addEventListener(\"change\",e,{passive:true});return()=>{window.removeEventListener(\"online\",e);window.removeEventListener(\"offline\",e);t&&t.removeEventListener(\"change\",e)}}),[]);const getSnapshot=()=>{const e=navigator.onLine;const n=getConnection();const o={online:e,downlink:n?.downlink,downlinkMax:n?.downlinkMax,effectiveType:n?.effectiveType,rtt:n?.rtt,saveData:n?.saveData,type:n?.type};if(isShallowEqual(t.current,o))return t.current;t.current=o;return o};const getServerSnapshot=()=>{throw Error(\"useNetworkState is a client-only hook\")};return e.useSyncExternalStore(n,getSnapshot,getServerSnapshot)}function useObjectState(t){const[n,o]=e.useState(t);const r=e.useCallback((e=>{\"function\"===typeof e&&o((t=>{const n=e(t);return{...t,...n}}));\"object\"===typeof e&&o((t=>({...t,...e})))}),[]);return[n,r]}function useOrientation(){const[t,n]=e.useState({angle:0,type:\"landscape-primary\"});e.useLayoutEffect((()=>{const handleChange=()=>{const{angle:e,type:t}=window.screen.orientation;n({angle:e,type:t})};const handle_orientationchange=()=>{n({type:\"UNKNOWN\",angle:window.orientation})};if(window.screen?.orientation){handleChange();window.screen.orientation.addEventListener(\"change\",handleChange)}else{handle_orientationchange();window.addEventListener(\"orientationchange\",handle_orientationchange)}return()=>{window.screen?.orientation?window.screen.orientation.removeEventListener(\"change\",handleChange):window.removeEventListener(\"orientationchange\",handle_orientationchange)}}),[]);return t}const usePreferredLanguageSubscribe=e=>{window.addEventListener(\"languagechange\",e);return()=>window.removeEventListener(\"languagechange\",e)};const getPreferredLanguageSnapshot=()=>navigator.language;const getPreferredLanguageServerSnapshot=()=>{throw Error(\"usePreferredLanguage is a client-only hook\")};function usePreferredLanguage(){return e.useSyncExternalStore(usePreferredLanguageSubscribe,getPreferredLanguageSnapshot,getPreferredLanguageServerSnapshot)}function usePrevious(t){const[n,o]=e.useState(t);const[r,s]=e.useState(null);if(t!==n){s(n);o(t)}return r}function useQueue(t=[]){const[n,o]=e.useState(t);const r=e.useCallback((e=>{o((t=>[...t,e]))}),[]);const s=e.useCallback((()=>{let e;o((([t,...n])=>{e=t;return n}));return e}),[]);const u=e.useCallback((()=>{o([])}),[]);return{add:r,remove:s,clear:u,first:n[0],last:n[n.length-1],size:n.length,queue:n}}function useRenderCount(){const t=e.useRef(0);t.current++;return t.current}function useRenderInfo(t=\"Unknown\"){const n=e.useRef(0);const o=e.useRef();const r=Date.now();n.current++;e.useEffect((()=>{o.current=Date.now()}));const s=o.current?r-o.current:0;if(\"production\"!==process.env.NODE_ENV){const e={name:t,renders:n.current,sinceLastRender:s,timestamp:r};console.log(e);return e}}function useScript(t,n={}){const[o,r]=e.useState((()=>t?\"loading\":\"idle\"));const s=e.useRef({});e.useEffect((()=>{if(!t)return;const e=s.current[t];if(\"ready\"===e||\"error\"===e){r(e);return}let o=document.querySelector(`script[src=\"${t}\"]`);if(o)r(e??\"loading\");else{o=document.createElement(\"script\");o.src=t;o.async=true;document.body.appendChild(o)}const setStateFromEvent=e=>{const n=\"load\"===e.type?\"ready\":\"error\";r(n);s.current[t]=n};o.addEventListener(\"load\",setStateFromEvent);o.addEventListener(\"error\",setStateFromEvent);return()=>{if(o){o.removeEventListener(\"load\",setStateFromEvent);o.removeEventListener(\"error\",setStateFromEvent)}o&&n.removeOnUnmount&&o.remove()}}),[t,n.removeOnUnmount]);return o}const setSessionStorageItem=(e,t)=>{const n=JSON.stringify(t);window.sessionStorage.setItem(e,n);dispatchStorageEvent(e,n)};const removeSessionStorageItem=e=>{window.sessionStorage.removeItem(e);dispatchStorageEvent(e,null)};const getSessionStorageItem=e=>window.sessionStorage.getItem(e);const useSessionStorageSubscribe=e=>{window.addEventListener(\"storage\",e);return()=>window.removeEventListener(\"storage\",e)};const getSessionStorageServerSnapshot=()=>{throw Error(\"useSessionStorage is a client-only hook\")};function useSessionStorage(t,n){const getSnapshot=()=>getSessionStorageItem(t);const o=e.useSyncExternalStore(useSessionStorageSubscribe,getSnapshot,getSessionStorageServerSnapshot);const r=e.useCallback((e=>{try{const n=\"function\"===typeof e?e(JSON.parse(o)):e;void 0===n||null===n?removeSessionStorageItem(t):setSessionStorageItem(t,n)}catch(e){console.warn(e)}}),[t,o]);e.useEffect((()=>{null===getSessionStorageItem(t)&&\"undefined\"!==typeof n&&setSessionStorageItem(t,n)}),[t,n]);return[o?JSON.parse(o):n,r]}function useSet(t){const n=e.useRef(new Set(t));const[,o]=e.useReducer((e=>e+1),0);n.current.add=(...e)=>{const t=Set.prototype.add.apply(n.current,e);o();return t};n.current.clear=(...e)=>{Set.prototype.clear.apply(n.current,e);o()};n.current.delete=(...e)=>{const t=Set.prototype.delete.apply(n.current,e);o();return t};return n.current}function useThrottle(t,n=500){const[o,r]=e.useState(t);const s=e.useRef();e.useEffect((()=>{const e=Date.now();if(!(e>=s.current+n)){const o=window.setTimeout((()=>{s.current=e;r(t)}),n);return()=>window.clearTimeout(o)}s.current=e;r(t)}),[t,n]);return o}function useToggle(t){const[n,o]=e.useState(t);const r=e.useCallback((e=>o(\"boolean\"===typeof e?e:e=>!e)),[]);return[n,r]}const useVisibilityChangeSubscribe=e=>{document.addEventListener(\"visibilitychange\",e);return()=>{document.removeEventListener(\"visibilitychange\",e)}};const getVisibilityChangeSnapshot=()=>document.visibilityState;const getVisibilityChangeServerSnapshot=()=>{throw Error(\"useVisibilityChange is a client-only hook\")};function useVisibilityChange(){const t=e.useSyncExternalStore(useVisibilityChangeSubscribe,getVisibilityChangeSnapshot,getVisibilityChangeServerSnapshot);return\"visible\"===t}function useWindowScroll(){const[t,n]=e.useState({x:null,y:null});const o=e.useCallback(((...e)=>{if(\"object\"===typeof e[0])window.scrollTo(e[0]);else{if(\"number\"!==typeof e[0]||\"number\"!==typeof e[1])throw new Error(\"Invalid arguments passed to scrollTo. See here for more info. https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollTo\");window.scrollTo(e[0],e[1])}}),[]);e.useLayoutEffect((()=>{const handleScroll=()=>{n({x:window.pageXOffset,y:window.pageYOffset})};handleScroll();window.addEventListener(\"scroll\",handleScroll);return()=>{window.removeEventListener(\"scroll\",handleScroll)}}),[]);return[t,o]}function useWindowSize(){const[t,n]=e.useState({width:null,height:null});e.useLayoutEffect((()=>{const handleResize=()=>{n({width:window.innerWidth,height:window.innerHeight})};handleResize();window.addEventListener(\"resize\",handleResize);return()=>{window.removeEventListener(\"resize\",handleResize)}}),[]);return t}export{useBattery,useClickAway,useCopyToClipboard,useCounter,useDebounce,useDefault,useDocumentTitle,useFavicon,useGeolocation,useHistoryState,useHover,useIdle,useIntersectionObserver,useIsClient,useIsFirstRender,useList,useLocalStorage,useLockBodyScroll,useLongPress,useMap,useMeasure,useMediaQuery,useMouse,useNetworkState,useObjectState,useOrientation,usePreferredLanguage,usePrevious,useQueue,useRenderCount,useRenderInfo,useScript,useSessionStorage,useSet,useThrottle,useToggle,useVisibilityChange,useWindowScroll,useWindowSize};\n\n//# sourceMappingURL=index.js.map", "import{jsx as _jsx}from\"react/jsx-runtime\";import{RenderTarget}from\"framer\";/**\n * --------------------------------------------------------------------\n * Canvas\n * --------------------------------------------------------------------\n *//**\n * Get the text from a React node.\n *\n * @param node\n * @returns\n */export const getNodeText=node=>{if(node==null)return\"\";switch(typeof node){case\"string\":case\"number\":return node.toString();case\"boolean\":return\"\";case\"object\":{if(node instanceof Array)return node.map(getNodeText).join(\"\");if(\"props\"in node)return getNodeText(node.props.children);}default:console.warn(\"Unresolved `node` of type:\",typeof node,node);return\"\";}};/**\n * Check if we're viewing the canvas.\n */export const isCanvas=RenderTarget.current()===RenderTarget.canvas;/**\n * --------------------------------------------------------------------\n * Root\n * --------------------------------------------------------------------\n */export default function Canvas(Component){return({children,...props})=>{return /*#__PURE__*/_jsx(Component,{...props,children:children});};}\nexport const __FramerMetadata__ = {\"exports\":{\"isCanvas\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getNodeText\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"Canvas\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Canvas.map", "import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{usePathname,useSearchParams}from\"https://framer.com/m/Router-vdQr.js\";/**\n * --------------------------------------------------------------------\n * Overrides\n * --------------------------------------------------------------------\n *//**\n * Create the PageView component used to track views via PostHog.\n */export function PageView(Component,config){return props=>{const pathname=usePathname();const searchParams=useSearchParams();/**\n         * Set up the dependencies used to track page views.\n         */// Get the globals and referrer from the props.\nconst{globals,referrer:{isLoadingReferrer,...referrer}}=props;// Get the globals.\nconst{isLoading,isLoggedIn,user}=globals;// Get the private status from the config.\nconst{isPrivate=false}=config||{};// Use a ref to track the last captured URL to prevent duplicate pageview captures\nconst lastCapturedUrl=useRef(\"\");/**\n         * Capture page views when the pathname changes.\n         */useEffect(()=>{if(typeof window!==\"undefined\"&&!isLoadingReferrer&&pathname){const posthog=window.posthog;if(posthog){let $current_url=window.origin+pathname;// Add the search params if they exist.\nif(searchParams.toString()){$current_url=$current_url+`?${searchParams.toString()}`;}// Only track the pageview if the URL hasn't been captured before\nif(lastCapturedUrl.current!==$current_url){// Get the event.\nconst event={$current_url};// Add custom properties to the event.\nif(isPrivate){// If the event is private, mark it as such.\nevent[\"$destacked_members:isPrivate\"]=true;}else{// Attach the referrer ID to the click.\nif(referrer?.affiliateUuid){event[\"$destacked_affiliates:referrer_id\"]=referrer.affiliateUuid;}}// Capture the page view.\nposthog.capture(\"$pageview\",event);// Update the last captured URL to prevent future triggers for the same URL\nlastCapturedUrl.current=$current_url;}}}},[pathname,searchParams,isLoadingReferrer,referrer?.uuid]);/**\n         * Identify in PostHog when the user changes.\n         */useEffect(()=>{if(!isLoading&&typeof window!==\"undefined\"){const posthog=window.posthog;if(posthog){if(!isLoggedIn||!user)return;// Get the user properties.\nconst{username,email}=user;// Identify the user.\nposthog.identify(user.id,{username,email});}}},[isLoading,isLoggedIn,user]);/**\n         * Return an empty component.\n         */return /*#__PURE__*/_jsx(Component,{...props});};}/**\n * Track views across private pages using PostHog.\n */export const PageViewPrivate=props=>{return PageView(props,{isPrivate:true});};/**\n * --------------------------------------------------------------------\n * Root\n * --------------------------------------------------------------------\n */export default function PostHog(Component){return({children,...props})=>{return /*#__PURE__*/_jsx(Component,{...props,children:children});};}\nexport const __FramerMetadata__ = {\"exports\":{\"PageViewPrivate\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PageView\":{\"type\":\"reactHoc\",\"name\":\"PageView\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"PostHog\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PostHog.map", "import{jsx as _jsx}from\"react/jsx-runtime\";import{useMediaQuery}from\"@uidotdev/usehooks\";/**\n * --------------------------------------------------------------------\n * Templates\n * --------------------------------------------------------------------\n */import{compose}from\"https://framer.com/m/Development-7oqH.js\";import{isCanvas}from\"https://framer.com/m/Canvas-OhxN.js\";import{PageView,PageViewPrivate}from\"https://framer.com/m/PostHog-rnMD.js@xpfQw1vfs9MpzZFQPJup\";import{App}from\"https://framerusercontent.com/modules/xbyJH4uSP5O2i9iSVF4l/fygiY4oI49kqISnRvGPq/core.js\";import{MemberRedirect,ProfileProvider,requireSetupComplete,requireSetupIncomplete,requirePlanFree,requirePlanPlus}from\"https://framerusercontent.com/modules/vF0buUnOASZw4Wp6mgq5/3FYAEdX4fGrR1qWUBv7j/members.js\";import{AffiliateProvider,requireAffiliateExists,requireAffiliateMissing}from\"https://framerusercontent.com/modules/GUpqlGhtCQnSE7iqb9Iq/kuPBxVsuSEu0RzPeDzgY/affiliates.js\";/**\n * --------------------------------------------------------------------\n * Site\n * --------------------------------------------------------------------\n *//**\n * Template root used on public pages by the main Framer component.\n */export function Page(Component){return compose(App,PageView)(props=>{return /*#__PURE__*/_jsx(Component,{...props});});}/**\n * --------------------------------------------------------------------\n * App\n * --------------------------------------------------------------------\n *//**\n * Template root used throughout the platform for members.\n */export function Dashboard(Component){return compose(App,MemberRedirect,ProfileProvider,requireSetupComplete,PageViewPrivate)(props=>{const isSmallDevice=useMediaQuery(\"only screen and (max-width : 767px)\");return /*#__PURE__*/_jsx(\"div\",{style:{...!isCanvas&&{display:\"flex\",height:\"100vh\",...!isSmallDevice&&{padding:\"8px\"}}},children:/*#__PURE__*/_jsx(Component,{...props,style:{...!isCanvas&&{height:\"initial\",...!isSmallDevice&&{border:\"1px solid var(--token-4ee600e9-b261-4d58-ac71-46221076960e)\",borderRadius:\"8px\"}}}})});});}/**\n * Temporary wrapper used until Framer supports nested placeholder layouts.\n */export function DashboardPage(Component){return props=>{return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",overflow:\"hidden\"},children:/*#__PURE__*/_jsx(Component,{...props,style:{height:\"initial\"}})});};}/**\n * --------------------------------------------------------------------\n * Members\n * --------------------------------------------------------------------\n *//**\n * Template used on the setup page.\n */export function Setup(Component){return compose(App,MemberRedirect,ProfileProvider,requireSetupIncomplete,PageViewPrivate)(props=>{return /*#__PURE__*/_jsx(Component,{...props});});}/**\n * Template that extends the app dashboard, but forces Agent Free membership.\n */export function DashboardFree(Component){return compose(Dashboard,requirePlanFree)(Component);}/**\n * Template that extends the app dashboard, but forces Agent Plus membership.\n */export function DashboardPlus(Component){return compose(Dashboard,requirePlanPlus)(Component);}/**\n * --------------------------------------------------------------------\n * Affiliates\n * --------------------------------------------------------------------\n *//**\n * Template used to set up affiliate profiles for members.\n */export function AffiliateSetup(Component){return compose(App,MemberRedirect,AffiliateProvider,requireAffiliateMissing,PageViewPrivate)(props=>{return /*#__PURE__*/_jsx(Component,{...props});});}/**\n * Template used for affiliate dashboard pages. Extends the Dashboard template.\n */export function AffiliateDashboard(Component){return compose(Dashboard,AffiliateProvider,requireAffiliateExists)(Component);}\nexport const __FramerMetadata__ = {\"exports\":{\"DashboardFree\":{\"type\":\"reactHoc\",\"name\":\"DashboardFree\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Page\":{\"type\":\"reactHoc\",\"name\":\"Page\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"DashboardPage\":{\"type\":\"reactHoc\",\"name\":\"DashboardPage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"AffiliateSetup\":{\"type\":\"reactHoc\",\"name\":\"AffiliateSetup\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"DashboardPlus\":{\"type\":\"reactHoc\",\"name\":\"DashboardPlus\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Setup\":{\"type\":\"reactHoc\",\"name\":\"Setup\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"AffiliateDashboard\":{\"type\":\"reactHoc\",\"name\":\"AffiliateDashboard\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Dashboard\":{\"type\":\"reactHoc\",\"name\":\"Dashboard\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],
  "mappings": "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",
  "names": ["useMediaQuery", "t", "n", "te", "e", "window", "de", "isCanvas", "RenderTarget", "PageView", "Component", "config", "props", "pathname", "usePathname", "searchParams", "useSearchParams", "globals", "isLoadingReferrer", "referrer", "isLoading", "isLoggedIn", "user", "isPrivate", "lastCapturedUrl", "pe", "ue", "window", "posthog", "$current_url", "event", "username", "email", "p", "PageViewPrivate", "Page", "Component", "compose", "App", "PageView", "props", "p", "Dashboard", "MemberRedirect", "ProfileProvider", "requireSetupComplete", "PageViewPrivate", "isSmallDevice", "useMediaQuery", "isCanvas", "DashboardPage", "Setup", "requireSetupIncomplete", "DashboardFree", "requirePlanFree", "DashboardPlus", "requirePlanPlus", "AffiliateSetup", "AffiliateProvider", "requireAffiliateMissing", "AffiliateDashboard", "requireAffiliateExists"]
}
