{"version":3,"file":"shared-lib.DWPXgp86.mjs","names":["useState","useCallback","__esmMin","le","init_ssg_sandbox_shims","te","ne","window","_e","init_jsx_runtime","J","c","init_npm_react_18_3_1","createScaleOverrideRenderer","WrappedComponent","Component","zoom","setZoom","updateZoom","width","nextZoom","isActive","refWidth","props","createScaleFullHeightOverrideRenderer","scaledHeight","setScaledHeight","updateScale","nextScaledHeight","withScalePhone","ref","w","withScaleTablet","withScaleDesktop","withScaleTablet834","withScalePhoneFullHeight","withScaleTabletFullHeight","withScaleDesktopFullHeight","init_ScalePhone"],"sources":["https:/framerusercontent.com/modules/VvPUZAf1GIyub75yKwZL/rrWijNxguWcVM9weJbN7/ScalePhone.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{startTransition,forwardRef,useCallback,useLayoutEffect,useState}from\"react\";// User request: Rewrite with exactly three override exports (withScalePhone, withScaleTablet, withScaleDesktop) using a shared internal factory; fix SSR hydration mismatch by always starting state as undefined and computing zoom in useLayoutEffect + window listeners; apply only CSS zoom with width/minWidth/maxWidth when active; pass props unchanged when inactive; forward ref.\nfunction createScaleOverrideRenderer(Component,props,ref,refWidth,isActive){const WrappedComponent=Component;const[zoom,setZoom]=useState(undefined);const updateZoom=useCallback(()=>{if(typeof window===\"undefined\")return;const width=window.innerWidth;const nextZoom=isActive(width)?width/refWidth:undefined;setZoom(nextZoom);},[isActive,refWidth]);useLayoutEffect(()=>{if(typeof window===\"undefined\")return;updateZoom();window.addEventListener(\"resize\",updateZoom);window.addEventListener(\"orientationchange\",updateZoom);window.visualViewport?.addEventListener(\"resize\",updateZoom);return()=>{window.removeEventListener(\"resize\",updateZoom);window.removeEventListener(\"orientationchange\",updateZoom);window.visualViewport?.removeEventListener(\"resize\",updateZoom);};},[updateZoom]);if(zoom===undefined)return /*#__PURE__*/_jsx(WrappedComponent,{ref:ref,...props});return /*#__PURE__*/_jsx(WrappedComponent,{ref:ref,...props,style:{...props.style,width:refWidth,minWidth:refWidth,maxWidth:refWidth,zoom}});}function createScaleFullHeightOverrideRenderer(Component,props,ref,refWidth,isActive){const WrappedComponent=Component;const[zoom,setZoom]=useState(undefined);const[scaledHeight,setScaledHeight]=useState(undefined);const updateScale=useCallback(()=>{if(typeof window===\"undefined\")return;const width=window.innerWidth;const active=isActive(width);if(!active){startTransition(()=>{setZoom(undefined);setScaledHeight(undefined);});return;}const nextZoom=width/refWidth;const nextScaledHeight=window.innerHeight/nextZoom;startTransition(()=>{setZoom(nextZoom);setScaledHeight(nextScaledHeight);});},[isActive,refWidth]);useLayoutEffect(()=>{if(typeof window===\"undefined\")return;updateScale();window.addEventListener(\"resize\",updateScale);window.addEventListener(\"orientationchange\",updateScale);window.visualViewport?.addEventListener(\"resize\",updateScale);return()=>{window.removeEventListener(\"resize\",updateScale);window.removeEventListener(\"orientationchange\",updateScale);window.visualViewport?.removeEventListener(\"resize\",updateScale);};},[updateScale]);if(zoom===undefined||scaledHeight===undefined){return /*#__PURE__*/_jsx(WrappedComponent,{ref:ref,...props});}return /*#__PURE__*/_jsx(WrappedComponent,{ref:ref,...props,style:{...props.style,width:refWidth,minWidth:refWidth,maxWidth:refWidth,height:scaledHeight,minHeight:scaledHeight,maxHeight:scaledHeight,zoom}});}export function withScalePhone(Component){return /*#__PURE__*/forwardRef((props,ref)=>createScaleOverrideRenderer(Component,props,ref,390,w=>w<810));}export function withScaleTablet(Component){return /*#__PURE__*/forwardRef((props,ref)=>createScaleOverrideRenderer(Component,props,ref,810,w=>w>=810&&w<1200));}export function withScaleDesktop(Component){return /*#__PURE__*/forwardRef((props,ref)=>createScaleOverrideRenderer(Component,props,ref,1200,w=>w>=1200));}export function withScaleTablet834(Component){return /*#__PURE__*/forwardRef((props,ref)=>createScaleOverrideRenderer(Component,props,ref,834,w=>w>=810&&w<1200));}export function withScalePhoneFullHeight(Component){return /*#__PURE__*/forwardRef((props,ref)=>createScaleFullHeightOverrideRenderer(Component,props,ref,390,w=>w<810));}export function withScaleTabletFullHeight(Component){return /*#__PURE__*/forwardRef((props,ref)=>createScaleFullHeightOverrideRenderer(Component,props,ref,810,w=>w>=810&&w<1200));}export function withScaleDesktopFullHeight(Component){return /*#__PURE__*/forwardRef((props,ref)=>createScaleFullHeightOverrideRenderer(Component,props,ref,1200,w=>w>=1200));}\nexport const __FramerMetadata__ = {\"exports\":{\"withScaleDesktop\":{\"type\":\"reactHoc\",\"name\":\"withScaleDesktop\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withScalePhoneFullHeight\":{\"type\":\"reactHoc\",\"name\":\"withScalePhoneFullHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withScaleDesktopFullHeight\":{\"type\":\"reactHoc\",\"name\":\"withScaleDesktopFullHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withScalePhone\":{\"type\":\"reactHoc\",\"name\":\"withScalePhone\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withScaleTablet\":{\"type\":\"reactHoc\",\"name\":\"withScaleTablet\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withScaleTablet834\":{\"type\":\"reactHoc\",\"name\":\"withScaleTablet834\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withScaleTabletFullHeight\":{\"type\":\"reactHoc\",\"name\":\"withScaleTabletFullHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScalePhone.map"],"mappings":"A,4JACA,SAASa,EAA4B,EAAU,EAAM,EAAI,EAAS,EAAS,CAAC,IAAMC,EAAiBC,EAAe,CAACC,EAAKC,GAASjB,EAAS,IAAA,EAAS,EAAQkB,EAAWjB,MAAgB,CAAC,GAAUM,IAAS,OAAY,OAAO,IAAMY,EAAMZ,EAAO,WAAiBa,EAASC,EAASF,CAAK,EAAEA,EAAMG,EAAS,IAAA,GAAUL,EAAQG,CAAQ,CAAE,EAAE,CAACC,EAASC,CAAQ,CAAC,EAAsgB,OAApgBnB,MAAoB,CAAC,GAAUI,IAAS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