{"version":3,"file":"PermissionGate.C3IB_MUb.mjs","names":["useState","useRef","useMemo"],"sources":["https:/framerusercontent.com/modules/m81tyF1RacpqATVAGpIe/jLIO3O4KEgqTcDzV4jNq/PermissionGate.js"],"sourcesContent":["/**\n * PermissionGate.tsx — Full-page auth gate for Framer.\n *\n * Works as a SIBLING on the page, not a wrapper.\n * - Loading → full-viewport overlay with logo spinner\n * - Not signed in → redirect to /login\n * - Wrong plan → redirect to correct plan dashboard\n * - Allowed → completely invisible (display:none + zero size)\n *\n * Smart redirect routing (strict per-plan):\n *   admin    → /dashbord-admin/home\n *   owner    → /dashbord-prj/home\n *   investor → /dashbord-inv/home\n *   guest    → /login\n *\n * IMPORTANT: Waits for Clerk session to fully resolve before checking\n * auth status. This prevents false \"not authenticated\" redirects during\n * the brief gap between Clerk.loaded and Clerk.user being populated.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,useRef,useMemo}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";const isBrowser=typeof window!==\"undefined\";const CLERK_KEY_DEFAULT=\"pk_live_Y2xlcmsubXVtdGFsYWthdC5zYSQ\";const LOGO_DEFAULT=\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\";function getDashboardForPlan(plan,adminDash,ownerDash,investorDash,loginUrl){switch(plan){case\"admin\":return adminDash;case\"owner\":return ownerDash;case\"investor\":return investorDash;default:return loginUrl;}}/* ── Full-viewport overlay (covers everything below) ── */const overlayBase={position:\"fixed\",inset:0,zIndex:99999,display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",background:\"rgb(246, 246, 246)\"};/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function PermissionGate(props){const{children,requiredPlan=\"any\",requiredFund=\"\",fallbackMode=\"redirect\",deniedMessage_en=\"You don't have access to this section.\",deniedMessage_ar=\"لا تملك صلاحية الوصول لهذا القسم.\",redirectUrl=\"/login\",adminDashboard=\"/dashbord-admin/home\",ownerDashboard=\"/dashbord-prj/home\",investorDashboard=\"/dashbord-inv/home\",locale=\"ar\",jwtTemplateName=\"supabase\",supabaseUrl=\"\",supabaseKey=\"\",clerkPublishableKey=CLERK_KEY_DEFAULT,logo=LOGO_DEFAULT,loadingText_en=\"Loading...\",loadingText_ar=\"جاري التحميل...\",accent=\"#B89040\",style}=props;const ar=locale===\"ar\";const isCanvas=RenderTarget.current()===RenderTarget.canvas;const font={fontFamily:ar?\"'Noto Kufi Arabic', 'Segoe UI', sans-serif\":\"'Inter', 'Segoe UI', sans-serif\"};// ══════════════════════════════════════════\n// ALL HOOKS FIRST\n// ══════════════════════════════════════════\n// clerkReady means: Clerk SDK loaded AND session fully resolved\n// (user is either confirmed signed-in or confirmed not-signed-in)\nconst[clerkReady,setClerkReady]=useState(false);const[userPlan,setUserPlan]=useState(null);const[userFunds,setUserFunds]=useState([]);const[authError,setAuthError]=useState(\"\");const clerkRef=useRef(null);// ── Initialize Clerk (wait for FULL session resolution) ──\nuseEffect(()=>{if(!isBrowser||isCanvas)return;let cancelled=false;const win=window;/**\n         * CRITICAL: We must wait for Clerk.user to be populated (or confirmed null)\n         * before marking ready. Clerk.loaded=true only means the SDK is loaded,\n         * NOT that the session has been verified. There's a brief gap where\n         * Clerk.loaded=true but Clerk.user=null even for signed-in users.\n         */const waitForSession=clerk=>{if(cancelled)return;// If user is already resolved, mark ready immediately\nif(clerk.user){console.log(\"[PermissionGate] Clerk ready + user found:\",clerk.user.id);clerkRef.current=clerk;setClerkReady(true);return;}// User is null — could be \"still loading session\" OR \"truly not signed in\"\n// Use Clerk.addListener to wait for session resolution\nlet resolved=false;const resolve=()=>{if(resolved||cancelled)return;resolved=true;clerkRef.current=win.Clerk// re-read to get latest state\n;console.log(\"[PermissionGate] Session resolved. User:\",win.Clerk?.user?.id||\"null (not signed in)\");setClerkReady(true);};// Method 1: Clerk's addListener (fires when user state changes)\ntry{const unsub=clerk.addListener?.(payload=>{// payload contains { user, session, client, organization }\n// Once this fires, the session is resolved\nif(payload&&!resolved){resolve();}});}catch{}// Method 2: Poll for user (fallback, checks every 100ms)\nlet pollCount=0;const poll=setInterval(()=>{pollCount++;if(win.Clerk?.user||pollCount>40){// Either user appeared OR 4 seconds passed (truly not signed in)\nclearInterval(poll);resolve();}},100);// Method 3: Hard timeout after 5s — if session never resolves, proceed anyway\nsetTimeout(()=>{clearInterval(poll);resolve();},5e3);};const tryLoad=async()=>{if(win.Clerk?.loaded){waitForSession(win.Clerk);return true;}if(win.Clerk&&!win.Clerk.loaded){try{await win.Clerk.load();if(win.Clerk.loaded){waitForSession(win.Clerk);return true;}}catch{}}return false;};const injectClerkScript=()=>{if(document.querySelector(\"script[data-clerk-script]\")||document.querySelector(\"script[data-clerk-publishable-key]\"))return;const script=document.createElement(\"script\");script.setAttribute(\"data-clerk-script\",\"true\");script.setAttribute(\"data-clerk-publishable-key\",clerkPublishableKey);script.src=\"https://cdn.jsdelivr.net/npm/@clerk/clerk-js@5/dist/clerk.browser.js\";script.async=true;script.crossOrigin=\"anonymous\";document.head.appendChild(script);};const setup=async()=>{if(await tryLoad())return;await new Promise(r=>setTimeout(r,600));if(await tryLoad())return;injectClerkScript();await new Promise(r=>setTimeout(r,1500));if(await tryLoad())return;const handler=async()=>{if(await tryLoad())document.removeEventListener(\"clerk:ready\",handler);};document.addEventListener(\"clerk:ready\",handler);let attempts=0;const pollSetup=setInterval(async()=>{attempts++;if(await tryLoad()){clearInterval(pollSetup);document.removeEventListener(\"clerk:ready\",handler);}else if(attempts>40){clearInterval(pollSetup);document.removeEventListener(\"clerk:ready\",handler);if(!cancelled)setAuthError(ar?\"فشل تحميل نظام المصادقة\":\"Failed to load authentication\");}},500);return()=>{clearInterval(pollSetup);document.removeEventListener(\"clerk:ready\",handler);};};setup();return()=>{cancelled=true;};},[isCanvas,ar,clerkPublishableKey]);// ── Resolve plan + funds ──\nuseEffect(()=>{if(!clerkReady||isCanvas)return;const clerk=clerkRef.current;if(!clerk?.user){setUserPlan(null);setUserFunds([]);return;}const meta=clerk.user.publicMetadata||{};const plan=meta.plan||null;const funds=Array.isArray(meta.funds)?meta.funds:typeof meta.funds===\"string\"?meta.funds.split(\",\").map(s=>s.trim()).filter(Boolean):[];setUserFunds(funds);console.log(\"[PermissionGate] User metadata:\",{plan,funds,userId:clerk.user.id});if(plan){setUserPlan(plan);return;}// Fallback: fetch plan from Supabase\nif(supabaseUrl&&supabaseKey){const fetchPlan=async()=>{try{let token=supabaseKey;if(clerk.session){const jwt=await clerk.session.getToken();if(jwt)token=jwt;}const res=await fetch(`${supabaseUrl}/rest/v1/users?id=eq.${clerk.user.id}&select=plan`,{headers:{apikey:supabaseKey,Authorization:`Bearer ${token}`}});if(res.ok){const data=await res.json();if(data?.[0]?.plan){setUserPlan(data[0].plan);return;}}}catch{}setUserPlan(\"investor\");};fetchPlan();}else{setUserPlan(\"investor\");}},[clerkReady,isCanvas,supabaseUrl,supabaseKey]);// ── Compute auth decision (pure, no side effects) ──\nconst decision=useMemo(()=>{if(isCanvas)return{status:\"canvas\"};if(!clerkReady){if(authError)return{status:\"error\",message:authError};return{status:\"loading\"};}if(!clerkRef.current?.user)return{status:\"not-authenticated\"};if(userPlan===null&&requiredPlan!==\"any\")return{status:\"plan-loading\"};// ── Permission check ──\nlet allowed=true;if(requiredPlan!==\"any\"){if(!userPlan){allowed=false;}else{// STRICT match: each plan only accesses their own dashboard type\nallowed=userPlan===requiredPlan;}}// Fund-level check (skip for admins)\nif(allowed&&requiredFund&&userPlan!==\"admin\"){allowed=userFunds.includes(requiredFund);}return allowed?{status:\"allowed\"}:{status:\"denied\"};},[isCanvas,clerkReady,authError,userPlan,userFunds,requiredPlan,requiredFund]);// ── Handle redirects via useEffect (NOT during render) ──\nuseEffect(()=>{if(!isBrowser||isCanvas||fallbackMode!==\"redirect\")return;let target=null;if(decision.status===\"not-authenticated\"){target=redirectUrl;console.log(\"[PermissionGate] Not authenticated → redirect to:\",target);}else if(decision.status===\"denied\"){target=getDashboardForPlan(userPlan,adminDashboard,ownerDashboard,investorDashboard,redirectUrl);console.log(\"[PermissionGate] Denied (plan:\",userPlan,\"required:\",requiredPlan,\") → redirect to:\",target);}if(target){const currentPath=window.location.pathname.replace(/\\/+$/,\"\");const targetPath=target.replace(/\\/+$/,\"\");if(currentPath!==targetPath){console.log(\"[PermissionGate] REDIRECTING:\",currentPath,\"→\",targetPath);window.location.href=target;}else{console.log(\"[PermissionGate] Already on target, allowing page:\",currentPath);}}},[decision.status,fallbackMode,isCanvas,userPlan,requiredPlan,redirectUrl,adminDashboard,ownerDashboard,investorDashboard]);// Log every decision change\nuseEffect(()=>{if(isCanvas)return;console.log(\"[PermissionGate] Decision:\",decision.status,\"| plan:\",userPlan,\"| required:\",requiredPlan,\"| mode:\",fallbackMode,\"| path:\",isBrowser?window.location.pathname:\"SSR\");},[decision.status,userPlan,requiredPlan,fallbackMode,isCanvas]);// ══════════════════════════════════════════\n// RENDERING\n// ══════════════════════════════════════════\n// Canvas preview — dashed badge\nif(decision.status===\"canvas\"){return /*#__PURE__*/_jsxs(\"div\",{style:{...style,position:\"relative\",border:`1.5px dashed ${accent}`,borderRadius:14,padding:12,minHeight:60,display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",top:-10,insetInlineStart:8,fontSize:9,fontWeight:700,color:\"#fff\",background:accent,padding:\"2px 8px\",borderRadius:6,...font},children:[ar?\"بوابة الصلاحيات\":\"PermissionGate\",\": \",requiredPlan]}),/*#__PURE__*/_jsx(\"span\",{style:{fontSize:11,color:\"#71717A\",...font},children:ar?\"بوابة حماية — تغطي الصفحة بالكامل أثناء التحميل\":\"Auth gate — full-page overlay while loading\"})]});}// ── Full-page loading overlay ──\nif(decision.status===\"loading\"){return /*#__PURE__*/_jsxs(\"div\",{dir:ar?\"rtl\":\"ltr\",style:{...overlayBase,...font},children:[/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:100,height:100,display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,border:\"3px solid rgba(184, 144, 64, 0.12)\",borderTopColor:accent,borderRadius:\"50%\",animation:\"pg-spin 1s linear infinite\"}}),/*#__PURE__*/_jsx(\"img\",{src:logo,alt:\"\",style:{width:64,height:64,objectFit:\"contain\",borderRadius:\"50%\",animation:\"pg-pulse 2s ease-in-out infinite\"}})]}),/*#__PURE__*/_jsx(\"span\",{style:{fontSize:14,color:\"#71717A\",marginTop:16,...font},children:ar?loadingText_ar:loadingText_en}),/*#__PURE__*/_jsx(\"style\",{children:`\n                    @keyframes pg-spin{to{transform:rotate(360deg)}}\n                    @keyframes pg-pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.7;transform:scale(.95)}}\n                `})]});}// ── Auth error ──\nif(decision.status===\"error\"){return /*#__PURE__*/_jsx(\"div\",{dir:ar?\"rtl\":\"ltr\",style:{...overlayBase,...font},children:/*#__PURE__*/_jsxs(\"div\",{style:{textAlign:\"center\"},children:[/*#__PURE__*/_jsx(\"img\",{src:logo,alt:\"\",style:{width:72,height:72,objectFit:\"contain\",borderRadius:\"50%\",marginBottom:16,opacity:.4,filter:\"grayscale(100%)\"}}),/*#__PURE__*/_jsx(\"div\",{style:{fontSize:16,fontWeight:700,color:\"#DC2626\",marginBottom:8,...font},children:decision.message}),/*#__PURE__*/_jsx(\"div\",{style:{fontSize:13,color:\"#71717A\",...font},children:ar?\"تأكد من إضافة Clerk في إعدادات الموقع\":\"Make sure the Clerk script is added in Site Settings\"})]})});}// ── Not Authenticated → overlay while redirect fires via useEffect ──\nif(decision.status===\"not-authenticated\"){if(fallbackMode===\"redirect\")return /*#__PURE__*/_jsx(\"div\",{style:overlayBase});if(fallbackMode===\"hidden\")return /*#__PURE__*/_jsx(\"div\",{style:overlayBase});// \"message\" mode — full-page login prompt\nreturn /*#__PURE__*/_jsx(\"div\",{dir:ar?\"rtl\":\"ltr\",style:{...overlayBase,...font},children:/*#__PURE__*/_jsxs(\"div\",{style:{width:380,maxWidth:\"90%\",background:\"#fff\",borderRadius:29,padding:32,textAlign:\"center\",boxShadow:\"0 8px 32px rgba(0,0,0,0.08)\"},children:[/*#__PURE__*/_jsx(\"img\",{src:logo,alt:\"\",style:{width:64,height:64,objectFit:\"contain\",borderRadius:\"50%\",marginBottom:14}}),/*#__PURE__*/_jsx(\"div\",{style:{fontSize:17,fontWeight:700,color:\"#18181B\",marginBottom:6,...font},children:ar?\"تسجيل الدخول مطلوب\":\"Login Required\"}),/*#__PURE__*/_jsx(\"div\",{style:{fontSize:13,color:\"#71717A\",marginBottom:18,...font},children:ar?\"يرجى تسجيل الدخول للوصول إلى هذا القسم\":\"Please sign in to access this section\"}),/*#__PURE__*/_jsx(\"button\",{onClick:()=>{if(isBrowser)window.location.href=redirectUrl;},style:{padding:\"10px 28px\",borderRadius:14,background:accent,color:\"#fff\",border:\"none\",fontSize:14,fontWeight:600,cursor:\"pointer\",...font},children:ar?\"تسجيل الدخول\":\"Sign In\"})]})});}// ── Plan still loading → full-page spinner ──\nif(decision.status===\"plan-loading\"){return /*#__PURE__*/_jsxs(\"div\",{dir:ar?\"rtl\":\"ltr\",style:{...overlayBase,...font},children:[/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:100,height:100,display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,border:\"3px solid rgba(184, 144, 64, 0.12)\",borderTopColor:accent,borderRadius:\"50%\",animation:\"pg-spin 1s linear infinite\"}}),/*#__PURE__*/_jsx(\"img\",{src:logo,alt:\"\",style:{width:64,height:64,objectFit:\"contain\",borderRadius:\"50%\",animation:\"pg-pulse 2s ease-in-out infinite\"}})]}),/*#__PURE__*/_jsx(\"span\",{style:{fontSize:14,color:\"#71717A\",marginTop:16,...font},children:ar?\"جاري التحقق من الصلاحيات...\":\"Checking permissions...\"}),/*#__PURE__*/_jsx(\"style\",{children:`\n                    @keyframes pg-spin{to{transform:rotate(360deg)}}\n                    @keyframes pg-pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.7;transform:scale(.95)}}\n                `})]});}// ── ALLOWED → disappear completely ──\nif(decision.status===\"allowed\"){return /*#__PURE__*/_jsx(\"div\",{ref:el=>{if(el?.parentElement){el.parentElement.style.display=\"none\";}},style:{display:\"none\"}});}// ── DENIED ──\n// Redirect is handled by useEffect above — just show overlay while it happens\nif(fallbackMode===\"redirect\")return /*#__PURE__*/_jsx(\"div\",{style:overlayBase});if(fallbackMode===\"hidden\")return /*#__PURE__*/_jsx(\"div\",{style:overlayBase});// \"message\" mode — full-page denied overlay\nreturn /*#__PURE__*/_jsx(\"div\",{dir:ar?\"rtl\":\"ltr\",style:{...overlayBase,...font},children:/*#__PURE__*/_jsxs(\"div\",{style:{width:380,maxWidth:\"90%\",background:\"#FEF2F2\",borderRadius:14,padding:24,textAlign:\"center\",border:\"1px solid #FECACA\"},children:[/*#__PURE__*/_jsx(\"img\",{src:logo,alt:\"\",style:{width:44,height:44,objectFit:\"contain\",borderRadius:\"50%\",marginBottom:8,opacity:.4,filter:\"grayscale(100%)\"}}),/*#__PURE__*/_jsx(\"div\",{style:{fontSize:15,fontWeight:600,color:\"#DC2626\",marginBottom:4,...font},children:ar?\"غير مصرح\":\"Access Denied\"}),/*#__PURE__*/_jsx(\"div\",{style:{fontSize:12,color:\"#71717A\",marginBottom:14,...font},children:ar?deniedMessage_ar:deniedMessage_en}),/*#__PURE__*/_jsx(\"button\",{onClick:()=>{if(!isBrowser)return;const target=getDashboardForPlan(userPlan,adminDashboard,ownerDashboard,investorDashboard,redirectUrl);window.location.href=target;},style:{padding:\"8px 22px\",borderRadius:12,background:accent,color:\"#fff\",border:\"none\",fontSize:13,fontWeight:600,cursor:\"pointer\",...font},children:ar?\"الذهاب إلى لوحتي\":\"Go to My Dashboard\"})]})});}addPropertyControls(PermissionGate,{requiredPlan:{type:ControlType.Enum,title:\"Required Plan\",options:[\"any\",\"investor\",\"owner\",\"admin\"],optionTitles:[\"Any Authenticated\",\"Investor\",\"Owner\",\"Admin\"],defaultValue:\"any\"},requiredFund:{type:ControlType.String,title:\"Required Fund ID\",placeholder:\"e.g. fund_abc123\",defaultValue:\"\",description:\"Leave empty to skip fund check.\"},fallbackMode:{type:ControlType.Enum,title:\"When Denied\",options:[\"hidden\",\"message\",\"redirect\"],optionTitles:[\"Block Page\",\"Show Message\",\"Redirect\"],defaultValue:\"redirect\"},deniedMessage_en:{type:ControlType.String,title:\"Denied Message (EN)\",defaultValue:\"You don't have access to this section.\",hidden:props=>props.fallbackMode!==\"message\"},deniedMessage_ar:{type:ControlType.String,title:\"Denied Message (AR)\",defaultValue:\"لا تملك صلاحية الوصول لهذا القسم.\",hidden:props=>props.fallbackMode!==\"message\"},redirectUrl:{type:ControlType.String,title:\"Login URL\",defaultValue:\"/login\",description:\"Where to send unauthenticated users\"},adminDashboard:{type:ControlType.String,title:\"Admin Dashboard\",defaultValue:\"/dashbord-admin/home\"},ownerDashboard:{type:ControlType.String,title:\"Owner Dashboard\",defaultValue:\"/dashbord-prj/home\"},investorDashboard:{type:ControlType.String,title:\"Investor Dashboard\",defaultValue:\"/dashbord-inv/home\"},locale:{type:ControlType.Enum,title:\"Language\",options:[\"ar\",\"en\"],optionTitles:[\"عربي\",\"English\"],defaultValue:\"ar\"},clerkPublishableKey:{type:ControlType.String,title:\"Clerk Publishable Key\",defaultValue:CLERK_KEY_DEFAULT},logo:{type:ControlType.Image,title:\"Logo\"},jwtTemplateName:{type:ControlType.String,title:\"JWT Template (legacy)\",defaultValue:\"supabase\"},supabaseUrl:{type:ControlType.String,title:\"Supabase URL\",defaultValue:\"\"},supabaseKey:{type:ControlType.String,title:\"Supabase Key\",defaultValue:\"\"},accent:{type:ControlType.Color,title:\"Accent Color\",defaultValue:\"#B89040\"},loadingText_en:{type:ControlType.String,title:\"Loading Text (EN)\",defaultValue:\"Loading...\"},loadingText_ar:{type:ControlType.String,title:\"Loading Text (AR)\",defaultValue:\"جاري التحميل...\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PermissionGate\",\"slots\":[\"children\"],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PermissionGate.map"],"mappings":"4NAqBqX,SAAS,EAAoB,EAAK,EAAU,EAAU,EAAa,EAAS,CAAC,OAAO,EAAP,CAAa,IAAI,QAAQ,OAAO,EAAU,IAAI,QAAQ,OAAO,EAAU,IAAI,WAAW,OAAO,EAAa,QAAQ,OAAO,GAGxjB,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,WAAS,eAAa,MAAM,eAAa,GAAG,eAAa,WAAW,mBAAiB,yCAAyC,mBAAiB,oCAAoC,cAAY,SAAS,iBAAe,uBAAuB,iBAAe,qBAAqB,oBAAkB,qBAAqB,SAAO,KAAK,kBAAgB,WAAW,cAAY,GAAG,cAAY,GAAG,sBAAoB,EAAkB,OAAK,EAAa,iBAAe,aAAa,iBAAe,kBAAkB,SAAO,UAAU,SAAO,EAAY,EAAG,IAAS,KAAW,EAAS,EAAa,SAAS,GAAG,EAAa,OAAa,EAAK,CAAC,WAAW,EAAG,6CAA6C,kCAAkC,CAK/vB,CAAC,EAAW,GAAeA,EAAS,GAAM,CAAM,CAAC,EAAS,GAAaA,EAAS,KAAK,CAAM,CAAC,EAAU,GAAcA,EAAS,EAAE,CAAC,CAAM,CAAC,EAAU,GAAcA,EAAS,GAAG,CAAO,EAASC,EAAO,KAAK,CAC5M,MAAc,CAAC,GAAG,CAAC,GAAW,EAAS,OAAO,IAAI,EAAU,GAAY,EAAI,EAK3D,EAAe,GAAO,CAAC,GAAG,EAAU,OACrD,GAAG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