{"version":3,"file":"STPGDriverBadgeData.DjKfEu_o.mjs","names":["React.useState","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","te","window","_e","J","init_jsx_runtime","ce","supabase","init_supabase","emitHeroDriverStore","heroDriverListeners","listener","setHeroDriverStore","heroDriverStore","next","subscribeHeroDriverStore","emitSharedBadgePhotoStore","sharedBadgePhotoListeners","setSharedBadgePhotoStore","sharedBadgePhotoStore","subscribeSharedBadgePhotoStore","loadSharedBadgePhotoData","sharedBadgePhotoInFlight","force","userError","user","error","row","data","path","savedX","savedY","clampedX","clampedY","signedData","signedError","loadAuthenticatedHeroDriverData","heroDriverInFlight","driverData","driverError","resolvedDriverNumber","formatted","formatDriverNumber","sharedPhoto","ensureHeroDriverAuthWatcher","authWatcherInitialized","formatDriverName","value","fullName","parts","firstInitial","finalWord","driverNumber","formatVehicle","vehicle","shouldUseCompactName","name","words","word","withAuthenticatedDriverBadgeData","badgeData","setBadgeData","isMobileWidth","setIsMobileWidth","syncIsMobile","MOBILE_BREAKPOINT_MAX","cancelled","loadDriverBadgeData","renderMobileScaledBadge","BADGE_MOBILE_WIDTH","BADGE_MOBILE_HEIGHT","BADGE_SOURCE_WIDTH","BADGE_SOURCE_HEIGHT","BADGE_MOBILE_SCALE","Component","componentProps","baseProps","props","useCompactName","withAuthenticatedDriverBadgePhoto","photoUrl","setPhotoUrl","photoChecked","setPhotoChecked","focalX","setFocalX","focalY","setFocalY","loadPhoto","withAuthenticatedRaptorFallback","setVersion","unsubscribeShared","current","subscription","isLoadingOrUnresolved","showRaptor","withAuthenticatedDriverHeroBackground","HERO_RAPTOR_URL","withAuthenticatedDriverHeroNumber","withAuthenticatedDriverHeroContent","init_STPGDriverBadgeData"],"sources":["https:/framerusercontent.com/modules/RvOauhjTk0257CsTDqcl/ucOr4l2uLpyssXdRLTdp/STPGDriverBadgeData.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";// @ts-ignore\nimport{supabase}from\"https://framerusercontent.com/modules/UPsPLHTsnLusMJKVd80p/XzBJOS8JKX2Im1BZmeRN/supabase.js\";const MOBILE_BREAKPOINT_MAX=1199.98;const BADGE_SOURCE_WIDTH=340;const BADGE_SOURCE_HEIGHT=450;const BADGE_MOBILE_WIDTH=270;const BADGE_MOBILE_HEIGHT=357;const BADGE_MOBILE_SCALE=BADGE_MOBILE_WIDTH/BADGE_SOURCE_WIDTH;const HERO_RAPTOR_URL=\"https://framerusercontent.com/images/lfjdeNSp0KIKas5sYEb3nlaW5A.png\";const heroDriverStore={loading:true,resolved:false,driverNumberText:\"DRIVER\",photoUrl:null,focalX:50,focalY:50,canUseRaptorFallback:false};const sharedBadgePhotoStore={loading:true,checked:false,status:\"error\",photoUrl:null,focalX:50,focalY:50};const heroDriverListeners=new Set;const sharedBadgePhotoListeners=new Set;let heroDriverInFlight=null;let sharedBadgePhotoInFlight=null;let authWatcherInitialized=false;function emitHeroDriverStore(){heroDriverListeners.forEach(listener=>{listener();});}function setHeroDriverStore(next){Object.assign(heroDriverStore,next);emitHeroDriverStore();}function subscribeHeroDriverStore(listener){heroDriverListeners.add(listener);return()=>{heroDriverListeners.delete(listener);};}function emitSharedBadgePhotoStore(){sharedBadgePhotoListeners.forEach(listener=>{listener();});}function setSharedBadgePhotoStore(next){Object.assign(sharedBadgePhotoStore,next);emitSharedBadgePhotoStore();}function subscribeSharedBadgePhotoStore(listener){sharedBadgePhotoListeners.add(listener);return()=>{sharedBadgePhotoListeners.delete(listener);};}async function loadSharedBadgePhotoData(force=false){if(sharedBadgePhotoInFlight)return sharedBadgePhotoInFlight;if(sharedBadgePhotoStore.checked&&!force)return sharedBadgePhotoStore;setSharedBadgePhotoStore({loading:true,checked:false,status:\"error\",photoUrl:null,focalX:50,focalY:50});sharedBadgePhotoInFlight=(async()=>{try{const{data:{user},error:userError}=await supabase.auth.getUser();if(userError||!user){setSharedBadgePhotoStore({loading:false,checked:true,status:\"unauth\",photoUrl:null});return sharedBadgePhotoStore;}const{data,error}=await supabase.from(\"driver_badge_media\").select(\"badge_photo_path, focal_x, focal_y\").eq(\"user_id\",user.id).maybeSingle();if(error){console.error(\"Badge media error:\",error);setSharedBadgePhotoStore({loading:false,checked:true,status:\"error\",photoUrl:null});return sharedBadgePhotoStore;}const row=data;if(!row?.badge_photo_path){setSharedBadgePhotoStore({loading:false,checked:true,status:\"no-photo\",photoUrl:null});return sharedBadgePhotoStore;}const path=row.badge_photo_path.trim().replace(/^\\/+/,\"\");const savedX=typeof row.focal_x===\"number\"?row.focal_x:50;const savedY=typeof row.focal_y===\"number\"?row.focal_y:50;const clampedX=Math.min(100,Math.max(0,savedX));const clampedY=Math.min(100,Math.max(0,savedY));const{data:signedData,error:signedError}=await supabase.storage.from(\"driver-badge-photos\").createSignedUrl(path,3600);if(signedError||!signedData?.signedUrl){console.error(\"Signed URL error:\",signedError);setSharedBadgePhotoStore({loading:false,checked:true,status:\"error\",photoUrl:null});return sharedBadgePhotoStore;}setSharedBadgePhotoStore({loading:false,checked:true,status:\"photo\",photoUrl:signedData.signedUrl,focalX:clampedX,focalY:clampedY});return sharedBadgePhotoStore;}catch(error){console.error(\"Badge photo load failed:\",error);setSharedBadgePhotoStore({loading:false,checked:true,status:\"error\",photoUrl:null});return sharedBadgePhotoStore;}finally{sharedBadgePhotoInFlight=null;}})();return sharedBadgePhotoInFlight;}async function loadAuthenticatedHeroDriverData(force=false){if(heroDriverInFlight)return heroDriverInFlight;if(heroDriverStore.resolved&&!force)return;setHeroDriverStore({loading:true,resolved:false,driverNumberText:\"DRIVER\",photoUrl:null,focalX:50,focalY:50,canUseRaptorFallback:false});heroDriverInFlight=(async()=>{try{const{data:{user},error:userError}=await supabase.auth.getUser();if(userError||!user){setHeroDriverStore({loading:false,resolved:true,driverNumberText:\"DRIVER\",photoUrl:null});return;}const{data:driverData,error:driverError}=await supabase.from(\"founding_drivers\").select(\"driver_number\").eq(\"user_id\",user.id).maybeSingle();let resolvedDriverNumber=\"DRIVER\";if(!driverError){const formatted=formatDriverNumber(driverData?.driver_number??null);if(formatted)resolvedDriverNumber=formatted;}else{console.error(\"Hero driver-number error:\",driverError);}const sharedPhoto=await loadSharedBadgePhotoData(force);if(sharedPhoto.status===\"photo\"&&sharedPhoto.photoUrl){setHeroDriverStore({loading:false,resolved:true,driverNumberText:resolvedDriverNumber,photoUrl:sharedPhoto.photoUrl,focalX:sharedPhoto.focalX,focalY:sharedPhoto.focalY,canUseRaptorFallback:false});return;}setHeroDriverStore({loading:false,resolved:true,driverNumberText:resolvedDriverNumber,photoUrl:null,focalX:50,focalY:50,canUseRaptorFallback:sharedPhoto.status===\"no-photo\"});}catch(error){console.error(\"Hero driver data load failed:\",error);setHeroDriverStore({loading:false,resolved:true,driverNumberText:\"DRIVER\",photoUrl:null,canUseRaptorFallback:false});}finally{heroDriverInFlight=null;}})();return heroDriverInFlight;}function ensureHeroDriverAuthWatcher(){if(authWatcherInitialized)return;authWatcherInitialized=true;supabase.auth.onAuthStateChange(()=>{void loadSharedBadgePhotoData(true);void loadAuthenticatedHeroDriverData(true);});}/* =========================================================\n   FORMATTING\n   ========================================================= */function formatDriverName(fullName){const value=(fullName||\"\").trim();if(!value)return\"\";const parts=value.split(/\\s+/).filter(Boolean);if(!parts.length)return\"\";const firstInitial=parts[0]?.charAt(0)?.toUpperCase();const finalWord=parts[parts.length-1]?.toUpperCase();if(!firstInitial||!finalWord)return\"\";return`${firstInitial}. ${finalWord}`;}function formatDriverNumber(driverNumber){if(typeof driverNumber!==\"number\"||Number.isNaN(driverNumber)){return\"\";}const padded=String(Math.max(0,Math.round(driverNumber))).padStart(3,\"0\");return`DRIVER #${padded}`;}function formatVehicle(vehicle){const value=(vehicle||\"\").trim();if(!value)return\"\";return value.toUpperCase();}function shouldUseCompactName(name){if(!name)return false;const words=name.trim().split(/\\s+/).filter(Boolean);if(words.length>=3)return true;const lettersOnly=words.join(\"\").replace(/[^a-zA-Z]/g,\"\");if(lettersOnly.length>=14)return true;return words.some(word=>word.replace(/[^a-zA-Z]/g,\"\").length>=10);}/* =========================================================\n   AUTHENTICATED DRIVER BADGE DATA\n\n   APPLY THIS TO:\n   The WHOLE STPG Driver Badge component instance.\n   ========================================================= */export function withAuthenticatedDriverBadgeData(Component){return /*#__PURE__*/React.forwardRef(function WithAuthenticatedDriverBadgeData(props,ref){const[badgeData,setBadgeData]=React.useState(null);const[isMobileWidth,setIsMobileWidth]=React.useState(false);React.useEffect(()=>{if(typeof window===\"undefined\")return;const syncIsMobile=()=>{React.startTransition(()=>{setIsMobileWidth(window.innerWidth<=MOBILE_BREAKPOINT_MAX);});};syncIsMobile();window.addEventListener(\"resize\",syncIsMobile);return()=>{window.removeEventListener(\"resize\",syncIsMobile);};},[]);React.useEffect(()=>{let cancelled=false;async function loadDriverBadgeData(){try{const{data:{user},error:userError}=await supabase.auth.getUser();if(cancelled)return;if(userError||!user){console.log(\"STPG badge data: no authenticated user\");return;}const{data,error}=await supabase.from(\"founding_drivers\").select(\"full_name, driver_number, vehicle\").eq(\"user_id\",user.id).maybeSingle();if(cancelled)return;if(error||!data){console.error(\"Badge data error:\",error);return;}const row=data;setBadgeData({driverName:formatDriverName(row.full_name),driverNumber:formatDriverNumber(row.driver_number),vehicle:formatVehicle(row.vehicle)});}catch(error){console.error(\"Badge data load failed:\",error);}}loadDriverBadgeData();return()=>{cancelled=true;};},[]);/*\n             * IMPORTANT:\n             *\n             * Keep the badge itself visible while authenticated\n             * driver data loads.\n             *\n             * Do NOT show the editor's J. GARZA / #001 defaults\n             * to another driver. Instead, temporarily blank only\n             * the personalized text fields.\n             */const renderMobileScaledBadge=componentProps=>{return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:BADGE_MOBILE_WIDTH,height:BADGE_MOBILE_HEIGHT,margin:\"0 auto\",overflow:\"visible\",pointerEvents:\"auto\"},children:/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:BADGE_SOURCE_WIDTH,height:BADGE_SOURCE_HEIGHT,transform:`scale(${BADGE_MOBILE_SCALE})`,transformOrigin:\"top left\"},children:/*#__PURE__*/_jsx(Component,{ref:ref,...componentProps,style:{...componentProps.style||{},width:BADGE_SOURCE_WIDTH,height:BADGE_SOURCE_HEIGHT}})})});};if(!badgeData){const baseProps={...props,driverName:\"\",driverNumber:\"\",vehicle:\"\",showStandardName:false,showCompactName:false,style:{...props.style||{},visibility:\"visible\"}};if(isMobileWidth){return renderMobileScaledBadge(baseProps);}return /*#__PURE__*/_jsx(Component,{ref:ref,...baseProps});}const useCompactName=shouldUseCompactName(badgeData.driverName);const baseProps={...props,driverName:badgeData.driverName,driverNumber:badgeData.driverNumber,vehicle:badgeData.vehicle,showStandardName:!useCompactName,showCompactName:useCompactName,style:{...props.style||{},visibility:\"visible\"}};if(isMobileWidth){return renderMobileScaledBadge(baseProps);}return /*#__PURE__*/_jsx(Component,{ref:ref,...baseProps});});}/* =========================================================\n   AUTHENTICATED DRIVER BADGE PHOTO\n\n   APPLY THIS ONLY TO:\n   STPGDriverPhoto\n\n   This is NOT for the whole badge.\n\n   If the driver has no custom photo:\n   leave the original Framer image alone.\n\n   If the driver has a custom photo:\n   load it from the private Supabase bucket.\n   ========================================================= */export function withAuthenticatedDriverBadgePhoto(Component){return /*#__PURE__*/React.forwardRef(function WithAuthenticatedDriverBadgePhoto(props,ref){const[photoUrl,setPhotoUrl]=React.useState(null);const[photoChecked,setPhotoChecked]=React.useState(false);const[focalX,setFocalX]=React.useState(50);const[focalY,setFocalY]=React.useState(50);React.useEffect(()=>{let cancelled=false;async function loadPhoto(){try{const sharedPhoto=await loadSharedBadgePhotoData(true);if(cancelled)return;if(sharedPhoto.status===\"photo\"&&typeof sharedPhoto.photoUrl===\"string\"&&sharedPhoto.photoUrl.length>0){setFocalX(sharedPhoto.focalX);setFocalY(sharedPhoto.focalY);setPhotoUrl(sharedPhoto.photoUrl);}setPhotoChecked(true);}catch(error){console.error(\"Badge photo load failed:\",error);if(!cancelled){setPhotoChecked(true);}}}loadPhoto();return()=>{cancelled=true;};},[]);/*\n             * Do not show this layer until Supabase has\n             * finished checking the driver's media.\n             */if(!photoChecked){return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style||{},visibility:\"hidden\"}});}/*\n             * No custom photo.\n             * Keep STPGDriverPhoto hidden.\n             * The separate Raptor layer handles the fallback.\n             */if(!photoUrl){return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style||{},visibility:\"hidden\"}});}/*\n             * Custom driver photo exists.\n             */return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style||{},visibility:\"visible\",backgroundImage:`url(\"${photoUrl}\")`,backgroundSize:\"cover\",backgroundPosition:`${focalX}% ${focalY}%`,backgroundRepeat:\"no-repeat\"}});});}/* =========================================================\n   RAPTOR FALLBACK CONTROL\n\n   APPLY THIS ONLY TO:\n   Front Raptor Centerpiece\n\n   Behavior:\n   - Checking Supabase = Raptor hidden\n   - Custom driver photo exists = Raptor hidden\n   - No custom driver photo = Raptor visible\n\n   This prevents the default Raptor from flashing before\n   an uploaded driver photo loads.\n   ========================================================= */export function withAuthenticatedRaptorFallback(Component){return /*#__PURE__*/React.forwardRef(function WithAuthenticatedRaptorFallback(props,ref){const[,setVersion]=React.useState(0);React.useEffect(()=>{void loadSharedBadgePhotoData(true);const{data:{subscription}}=supabase.auth.onAuthStateChange(()=>{void loadSharedBadgePhotoData(true);});const unsubscribeShared=subscribeSharedBadgePhotoStore(()=>{React.startTransition(()=>{setVersion(current=>current+1);});});return()=>{unsubscribeShared();subscription.unsubscribe();};},[]);const isLoadingOrUnresolved=sharedBadgePhotoStore.loading||!sharedBadgePhotoStore.checked;const showRaptor=sharedBadgePhotoStore.status===\"no-photo\";/*\n             * CRITICAL:\n             * On the very first render, the Raptor is hidden.\n             * It cannot flash while Supabase is loading.\n             */if(isLoadingOrUnresolved||!showRaptor){return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style||{},visibility:\"hidden\"}});}/*\n             * Supabase confirmed this driver has no custom\n             * image, so show the original Framer Raptor.\n             */return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style||{},visibility:\"visible\"}});});}/* =========================================================\n   DRIVER PORTAL HERO: AUTHENTICATED BACKGROUND\n   ========================================================= */export function withAuthenticatedDriverHeroBackground(Component){return /*#__PURE__*/React.forwardRef(function WithAuthenticatedDriverHeroBackground(props,ref){const[,setVersion]=React.useState(0);React.useEffect(()=>{void loadSharedBadgePhotoData(true);const{data:{subscription}}=supabase.auth.onAuthStateChange(()=>{void loadSharedBadgePhotoData(true);});const unsubscribeShared=subscribeSharedBadgePhotoStore(()=>{React.startTransition(()=>{setVersion(current=>current+1);});});return()=>{unsubscribeShared();subscription.unsubscribe();};},[]);if(sharedBadgePhotoStore.loading||!sharedBadgePhotoStore.checked){return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style||{},background:\"#0D0D0E\",backgroundColor:\"#0D0D0E\",backgroundImage:\"none\",backgroundRepeat:\"no-repeat\"}});}if(sharedBadgePhotoStore.status===\"error\"||sharedBadgePhotoStore.status===\"unauth\"){return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style||{},background:\"#0D0D0E\",backgroundColor:\"#0D0D0E\",backgroundImage:\"none\",backgroundRepeat:\"no-repeat\"}});}if(sharedBadgePhotoStore.status===\"no-photo\"){return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style||{},background:`url(\"${HERO_RAPTOR_URL}\") center / cover no-repeat`,backgroundImage:`url(\"${HERO_RAPTOR_URL}\")`,backgroundSize:\"cover\",backgroundPosition:\"50% 50%\",backgroundRepeat:\"no-repeat\"}});}if(sharedBadgePhotoStore.status===\"photo\"&&sharedBadgePhotoStore.photoUrl){return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style||{},backgroundColor:\"transparent\",background:`url(\"${sharedBadgePhotoStore.photoUrl}\") ${sharedBadgePhotoStore.focalX}% ${sharedBadgePhotoStore.focalY}% / cover no-repeat`,backgroundImage:`url(\"${sharedBadgePhotoStore.photoUrl}\")`,backgroundSize:\"cover\",backgroundPosition:`${sharedBadgePhotoStore.focalX}% ${sharedBadgePhotoStore.focalY}%`,backgroundRepeat:\"no-repeat\"}});}return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style||{},background:\"#0D0D0E\",backgroundColor:\"#0D0D0E\",backgroundImage:\"none\",backgroundRepeat:\"no-repeat\"}});});}/* =========================================================\n   DRIVER PORTAL HERO: AUTHENTICATED NUMBER TEXT\n   ========================================================= */export function withAuthenticatedDriverHeroNumber(Component){return /*#__PURE__*/React.forwardRef(function WithAuthenticatedDriverHeroNumber(props,ref){const[,setVersion]=React.useState(0);React.useEffect(()=>{ensureHeroDriverAuthWatcher();void loadAuthenticatedHeroDriverData(true);return subscribeHeroDriverStore(()=>{React.startTransition(()=>{setVersion(current=>current+1);});});},[]);if(heroDriverStore.loading||!heroDriverStore.resolved){return /*#__PURE__*/_jsx(Component,{ref:ref,...props,text:\"\",style:{...props.style||{},visibility:\"hidden\"}});}return /*#__PURE__*/_jsx(Component,{ref:ref,...props,text:heroDriverStore.driverNumberText||\"DRIVER\",style:{...props.style||{},visibility:\"visible\"}});});}/* =========================================================\n   DRIVER PORTAL HERO: AUTHENTICATED CONTENT VISIBILITY\n   ========================================================= */export function withAuthenticatedDriverHeroContent(Component){return /*#__PURE__*/React.forwardRef(function WithAuthenticatedDriverHeroContent(props,ref){const[,setVersion]=React.useState(0);React.useEffect(()=>{ensureHeroDriverAuthWatcher();void loadAuthenticatedHeroDriverData(true);return subscribeHeroDriverStore(()=>{React.startTransition(()=>{setVersion(current=>current+1);});});},[]);if(heroDriverStore.loading||!heroDriverStore.resolved){return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style||{},visibility:\"hidden\"}});}return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style||{},visibility:\"visible\"}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withAuthenticatedDriverHeroBackground\":{\"type\":\"reactHoc\",\"name\":\"withAuthenticatedDriverHeroBackground\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAuthenticatedDriverHeroContent\":{\"type\":\"reactHoc\",\"name\":\"withAuthenticatedDriverHeroContent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAuthenticatedRaptorFallback\":{\"type\":\"reactHoc\",\"name\":\"withAuthenticatedRaptorFallback\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAuthenticatedDriverHeroNumber\":{\"type\":\"reactHoc\",\"name\":\"withAuthenticatedDriverHeroNumber\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAuthenticatedDriverBadgeData\":{\"type\":\"reactHoc\",\"name\":\"withAuthenticatedDriverBadgeData\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAuthenticatedDriverBadgePhoto\":{\"type\":\"reactHoc\",\"name\":\"withAuthenticatedDriverBadgePhoto\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./STPGDriverBadgeData.map"],"mappings":"A,mMACq0B,SAASY,GAAqB,CAACC,EAAoB,QAAQ,GAAU,CAACC,EAAS,CAAE,CAAC,CAAE,CAAC,SAASC,EAAmB,EAAK,CAAC,OAAO,OAAOC,EAAgBC,CAAI,EAAEL,EAAoB,CAAE,CAAC,SAASM,EAAyB,EAAS,CAAmC,OAAlCL,EAAoB,IAAIC,CAAQ,MAAY,CAACD,EAAoB,OAAOC,CAAQ,CAAE,CAAE,CAAC,SAASK,GAA2B,CAACC,EAA0B,QAAQ,GAAU,CAACN,EAAS,CAAE,CAAC,CAAE,CAAC,SAASO,EAAyB,EAAK,CAAC,OAAO,OAAOC,EAAsBL,CAAI,EAAEE,EAA0B,CAAE,CAAC,SAASI,EAA+B,EAAS,CAAyC,OAAxCH,EAA0B,IAAIN,CAAQ,MAAY,CAACM,EAA0B,OAAON,CAAQ,CAAE,CAAE,CAAC,eAAeU,EAAyB,EAAM,GAA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