{"version":3,"file":"FitScale.CILuX7Ql.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/Sdu02FYf8NUui3o2Wm1B/Y3JAga6orxt48XzT7YeD/FitScale.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{pageScale,STACK_BELOW,PHONE_BELOW}from\"https://framerusercontent.com/modules/Ng45YrpyAOriq23Rp3Gd/Rhl7BCZJ2aOqb2ZcHvNC/PageScale.js\";import{useEffect,useRef}from\"react\";export default function FitScale(props){const{targetName=\"\",designHeight=964,offset=64,floor=.6,designWidth=0,steps=1}=props;const isStatic=useIsStaticRenderer();const ref=useRef(null);useEffect(()=>{if(isStatic||typeof window===\"undefined\")return;const own=ref.current;if(!own)return;// the named frames, or the nearest named Framer frame this point sits in\nconst names=targetName.split(\",\").map(s=>s.trim()).filter(Boolean);const targets=(names.length?names.map(n=>document.querySelector(`[data-framer-name=\"${n.replace(/\"/g,'\\\\\"')}\"]`)):[(own.parentElement?.parentElement||own.parentElement)?.closest(\"[data-framer-name]\")]).filter(Boolean);if(names.length&&targets.length<names.length){console.warn(`Fit Scale: ${names.length-targets.length} of ${names.length} target frames not found (${targetName})`);}if(!targets.length)return;const apply=()=>{// the site's one size rule (PageScale.tsx, Henry 2026-09-19): two fixed sizes by width. Design Height, Offset, Floor and\n// Design Width are kept so existing instances load, but they no longer change the scale.\n// STEPS (Henry 2026-09-22, the /services six panel grid: \"can we double reduce\"): the page step applied this many times, so a\n// section can take the site rule twice where its own layout needs the room; 1920 and up is untouched either way (z is 1)\nconst z=Math.pow(pageScale(),Math.max(1,Math.round(steps)));for(const t of targets)t.style.zoom=z===1?\"\":String(z);// STACKED FOOTER (Henry 2026-09-19): the footer is canvas frames in a layout template, and a template cannot take a\n// breakpoint from the plugin API, so on a tablet or phone this point restyles the frame it sits in by layer NAME:\n// less padding, the Columns grid two across (one on a phone), and the Legal row allowed to wrap. Other targets have\n// no layers with these names, so nothing else is touched.\nconst w=document.documentElement.clientWidth;const stacked=w>0&&w<STACK_BELOW;const phone=w>0&&w<PHONE_BELOW;const set=(el,prop,value)=>{if(!el)return;const s=el.style;if(stacked)s.setProperty(prop,value,\"important\");else s.removeProperty(prop);};for(const t of targets){const cols=t.querySelector('[data-framer-name=\"Columns\"]');if(!cols)continue;set(t,\"padding\",phone?\"56px 24px 40px\":\"64px 48px 48px\");set(t,\"gap\",\"40px\");set(cols,\"grid-template-columns\",phone?\"minmax(0, 1fr)\":\"repeat(2, minmax(0, 1fr))\");set(cols,\"gap\",phone?\"40px\":\"48px\");const legal=t.querySelector('[data-framer-name=\"Legal\"]');set(legal,\"flex-wrap\",\"wrap\");set(legal,\"row-gap\",\"20px\");set(legal,\"column-gap\",\"32px\");set(legal,\"justify-content\",\"flex-start\");const links=t.querySelector('[data-framer-name=\"Legal Links\"]');set(links,\"gap\",phone?\"12px 24px\":\"28px\");// on a phone \"Privacy Policy\" and \"Investor Login\" in wide caps do not fit one line beside each other\nset(links,\"flex-wrap\",phone?\"wrap\":\"nowrap\");set(legal,\"flex-direction\",phone?\"column\":\"row\");set(legal,\"align-items\",phone?\"flex-start\":\"center\");}};apply();window.addEventListener(\"resize\",apply);return()=>{window.removeEventListener(\"resize\",apply);for(const t of targets)t.style.zoom=\"\";};},[isStatic,targetName,designHeight,offset,floor,designWidth,steps]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{width:1,height:1,pointerEvents:\"none\",opacity:0},\"aria-hidden\":\"true\"});}FitScale.displayName=\"Fit Scale\";addPropertyControls(FitScale,{targetName:{type:ControlType.String,title:\"Target Frame\",defaultValue:\"\",description:\"Frame or section name to scale; several separated by commas. Blank = the frame this sits in.\"},designHeight:{type:ControlType.Number,title:\"Design Height\",defaultValue:964,min:400,max:2e3,unit:\"px\",description:\"Viewport height (minus Offset) at which the target is full size. 964 = the inset heroes.\"},offset:{type:ControlType.Number,title:\"Offset\",defaultValue:64,min:0,max:200,unit:\"px\",description:\"Menu bar height taken off the viewport first.\"},floor:{type:ControlType.Number,title:\"Floor\",defaultValue:.6,min:.3,max:1,step:.01},steps:{type:ControlType.Number,title:\"Steps\",defaultValue:1,min:1,max:2,step:1,displayStepper:true,description:\"How many times the page scale applies: 2 shrinks the targets twice on laptops and small desktops.\"},designWidth:{type:ControlType.Number,title:\"Design Width\",defaultValue:0,min:0,max:3e3,unit:\"px\",description:\"Window width below which the targets also shrink (the smaller of the two factors wins). 0 = height only.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FitScale\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FitScale.map"],"mappings":"2PAAmS,SAAwB,EAAS,EAAM,CAAC,GAAK,CAAC,aAAW,GAAG,eAAa,IAAI,SAAO,GAAG,QAAM,GAAG,cAAY,EAAE,QAAM,GAAG,EAAY,EAAS,EAAoB,EAAQ,EAAIA,EAAO,IAAI,EAUhH,OAVkH,MAAc,CAAC,GAAG,GAAiB,IAAS,OAAY,OAAO,IAAM,EAAI,EAAI,QAAQ,GAAG,CAAC,EAAI,OACzjB,IAAM,EAAM,EAAW,MAAM,GAAG,CAAC,CAAC,IAAI,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,OAAO,EAAQ,GAAS,EAAM,OAAO,EAAM,IAAI,GAAG,SAAS,cAAc,sBAAsB,EAAE,QAAQ,KAAK,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE,EAAI,eAAe,eAAe,EAAI,cAAA,EAAgB,QAAQ,oBAAoB,CAAC,EAAA,CAAG,OAAO,OAAO,EAAsK,GAAjK,EAAM,QAAQ,EAAQ,OAAO,EAAM,QAAQ,QAAQ,KAAK,cAAc,EAAM,OAAO,EAAQ,OAAO,MAAM,EAAM,OAAO,4BAA4B,EAAW,EAAE,EAAM,CAAC,EAAQ,OAAO,OAAO,IAAM,MAAU,CAI3e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