{"version":3,"file":"UseViewportLayoutMode-xepRC7.BE0oTbs2.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/fzCvlHNtQSlJmSZcjTsK/iXED818UaTgoTFWQuVvp/UseViewportLayoutMode.js","https:/framer.com/m/UseViewportLayoutMode-xepRC7.js@iXED818UaTgoTFWQuVvp"],"sourcesContent":["import*as React from\"react\";export function useViewportLayoutMode({mobileMax=809,tabletMax=1439,initialMode=\"desktop\"}={}){const[layoutMode,setLayoutMode]=React.useState(initialMode);React.useEffect(()=>{// Guard untuk environment yang tidak punya window\nif(typeof window===\"undefined\")return;const mqMobile=window.matchMedia(`(max-width: ${mobileMax}px)`);const mqTablet=window.matchMedia(`(min-width: ${mobileMax+1}px) and (max-width: ${tabletMax}px)`);const compute=()=>{if(mqMobile.matches)return\"mobile\";if(mqTablet.matches)return\"tablet\";return\"desktop\";};const onChange=()=>setLayoutMode(compute());// init\nsetLayoutMode(compute());// listen\nmqMobile.addEventListener?.(\"change\",onChange);mqTablet.addEventListener?.(\"change\",onChange);// fallback Safari lama\nmqMobile.addListener?.(onChange);mqTablet.addListener?.(onChange);return()=>{mqMobile.removeEventListener?.(\"change\",onChange);mqTablet.removeEventListener?.(\"change\",onChange);mqMobile.removeListener?.(onChange);mqTablet.removeListener?.(onChange);};},[mobileMax,tabletMax]);return layoutMode;}\nexport const __FramerMetadata__ = {\"exports\":{\"useViewportLayoutMode\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./UseViewportLayoutMode.map","/*\n * UseViewportLayoutMode\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/fzCvlHNtQSlJmSZcjTsK/iXED818UaTgoTFWQuVvp/UseViewportLayoutMode.js\"\n"],"mappings":"yHAA4B,SAAgB,EAAsB,CAAC,YAAU,IAAI,YAAU,KAAK,cAAY,WAAW,EAAE,CAAC,CAAC,GAAK,CAAC,EAAW,GAAeA,EAAe,EAAY,CAI8F,OAJ7F,MAAoB,CAC3M,GAAU,IAAS,OAAY,OAAO,IAAM,EAAS,EAAO,WAAW,eAAe,EAAU,KAAK,CAAO,EAAS,EAAO,WAAW,eAAe,EAAU,EAAE,sBAAsB,EAAU,KAAK,CAAO,MAAgB,EAAS,QAAc,SAAY,EAAS,QAAc,SAAe,UAAkB,MAAa,EAAc,GAAS,CAAC,CAG5R,OAFlE,EAAc,GAAS,CAAC,CACxB,EAAS,mBAAmB,SAAS,EAAS,CAAC,EAAS,mBAAmB,SAAS,EAAS,CAC7F,EAAS,cAAc,EAAS,CAAC,EAAS,cAAc,EAAS,KAAW,CAAC,EAAS,sBAAsB,SAAS,EAAS,CAAC,EAAS,sBAAsB,SAAS,EAAS,CAAC,EAAS,iBAAiB,EAAS,CAAC,EAAS,iBAAiB,EAAS,GAAK,CAAC,EAAU,EAAU,CAAC,CAAQ,uBAJ/P"}