{"version":3,"file":"Horizontal_Scroll_For_Tablet.CQ6pgAwA.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/upqbQvDu3pnkU6UPri9H/Ko4qq8vJQTjYyeNEyXdl/Horizontal_Scroll_For_Tablet.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useRef,useState,cloneElement}from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicWidth 1920\n * @framerIntrinsicHeight 1080\n */export default function SmoothSnapScrollHorizontal(props){const{sections=[],invertScroll=false,smoothness=.08,snapThreshold=1,startIndex=0,allowStacking=true,minIntervalMs=120,totalSections=0,emitNearThreshold=0,gestureLockMs=260,useTargetWhileAnimating=true,// wheel baseline (vẫn để đây, nhưng sẽ vô hiệu khi lockScroll = true)\nwheelThresholdVw=.18,clampWheelDelta=80,oneStepPerGesture=true,mouseNotchPx=80,// ===== NEW: Khóa scroll, chỉ dùng mũi tên =====\nlockScroll=true,// ===== NEW: Appear/Disappear cho nội dung section (continuous theo progress)\nappearEnable=true,appearFalloff=1,appearTranslate=24,appearScaleFrom=.98,appearOpacityCurve=1,// arrows (fixed)\nshowArrows=true,arrowDiameter=44,arrowIconSize=18,arrowGap=12,arrowRight=20,arrowBottom=24,arrowStrokeWidth=2,arrowStrokeColor=\"#FFFFFF\",arrowBg=\"transparent\",arrowBgHover=\"rgba(255,255,255,0.10)\",arrowIconColor=\"#FFFFFF\",arrowDisableOpacity=.35,arrowRadius=999,buttonsMaxWidth=0,// platform-specific (giữ nguyên để bạn có thể bật lại nếu muốn)\nplatformMode=\"auto\",macWheelThresholdVw=.16,macClampDelta=60,macMinIntervalMs=180,macGestureLockMs=240,winWheelThresholdVw=.24,winClampDelta=110,winMinIntervalMs=200,winGestureLockMs=280}=props;const containerRef=useRef(null);const isAnimating=useRef(false);const currentX=useRef(0);const targetX=useRef(0);const raf=useRef(null);const lastSnapTime=useRef(0);const gestureLockUntil=useRef(0);const[activeIndex,setActiveIndex]=useState(startIndex);// tính right theo max width (để không lệch ra ngoài ở màn rộng)\nconst[effRight,setEffRight]=useState(arrowRight);const recomputeRight=()=>{const vw=typeof window!==\"undefined\"?window.innerWidth:0;if(buttonsMaxWidth&&buttonsMaxWidth>0&&vw>0){const extra=Math.max(0,(vw-buttonsMaxWidth)/2);setEffRight(arrowRight+extra);}else setEffRight(arrowRight);};useEffect(()=>{recomputeRight();window.addEventListener(\"resize\",recomputeRight);return()=>window.removeEventListener(\"resize\",recomputeRight);},[arrowRight,buttonsMaxWidth]);// Ẩn scrollbar + khóa body\nuseEffect(()=>{const styleEl=document.createElement(\"style\");styleEl.id=\"hide-scrollbars-global\";styleEl.innerHTML=`\n      html, body { margin:0!important; padding:0!important; height:100%;\n        overflow:hidden!important; overscroll-behavior:none!important; -webkit-overflow-scrolling:auto!important; }\n      *{ scrollbar-width:none!important; -ms-overflow-style:none!important; }\n      *::-webkit-scrollbar{ width:0!important; height:0!important; background:transparent!important; }`;document.head.appendChild(styleEl);const htmlPrev=document.documentElement.style.overflow;const bodyPrev=document.body.style.overflow;document.documentElement.style.overflow=\"hidden\";document.body.style.overflow=\"hidden\";return()=>{styleEl.remove();document.documentElement.style.overflow=htmlPrev;document.body.style.overflow=bodyPrev;};},[]);// ==== helpers\nconst lastIndexRef=useRef(-1);const getCount=()=>Math.max(1,totalSections&&totalSections>0?totalSections:sections.length);const clampIndex=i=>Math.max(0,Math.min(i,getCount()-1));const dispatchIndex=idx=>{const clamped=clampIndex(idx);if(clamped===lastIndexRef.current)return;lastIndexRef.current=clamped;setActiveIndex(clamped);window.dispatchEvent(new CustomEvent(\"section:change\",{detail:{index:clamped}}));};// ====== refs cho wrappers để apply appear mượt mà không phải re-render mỗi frame\nconst wrappersRef=useRef([]);const setWrapperRef=i=>el=>{if(el)wrappersRef.current[i]=el;};const stopAnim=()=>{isAnimating.current=false;if(raf.current)cancelAnimationFrame(raf.current);raf.current=null;};// gửi progress cho gradient/overrides khác\nconst emitProgress=progress=>{window.dispatchEvent(new CustomEvent(\"section:progress\",{detail:{progress}}));};const applyAppearForAll=()=>{if(!appearEnable)return;const el=containerRef.current;if(!el)return;const vw=el.clientWidth||window.innerWidth||1;const progress=currentX.current/Math.max(1,vw);// Range mềm: khi |progress - i| >= appearFalloff => opacity ~ 0\nconst falloff=Math.max(.1,appearFalloff);for(let i=0;i<wrappersRef.current.length;i++){const w=wrappersRef.current[i];if(!w)continue;const d=Math.abs(progress-i)// chênh lệch so với index hiện tại (float)\n;let t=1-Math.min(1,d/falloff)// 1 ở tâm slide, 0 ở rìa\n;if(appearOpacityCurve!==1)t=Math.pow(t,Math.max(.5,appearOpacityCurve));const opacity=t;const ty=(1-t)*appearTranslate;const sc=1-(1-appearScaleFrom)*(1-t);w.style.opacity=String(opacity);w.style.transform=`translate3d(0, ${ty}px, 0) scale(${sc})`;}};const snapToIndex=(index,dir=0)=>{const el=containerRef.current;if(!el)return;const vw=el.clientWidth||window.innerWidth||1;const clamped=clampIndex(index);targetX.current=clamped*vw;if(!isAnimating.current){isAnimating.current=true;raf.current=requestAnimationFrame(tick);}const now=performance.now();lastSnapTime.current=now;gestureLockUntil.current=now+gestureLockMs;lastSnapDir.current=dir;};const tick=()=>{const el=containerRef.current;if(!el)return stopAnim();currentX.current+=(targetX.current-currentX.current)*smoothness;el.scrollLeft=currentX.current;const vw=el.clientWidth||window.innerWidth||1;const targetIndex=clampIndex(Math.round(targetX.current/vw));// update gradient + appear mỗi frame\nconst progressFloat=currentX.current/Math.max(1,vw);emitProgress(progressFloat);applyAppearForAll();if(emitNearThreshold>0&&Math.abs(currentX.current-targetX.current)<=emitNearThreshold*vw){dispatchIndex(targetIndex);}const distance=Math.abs(targetX.current-currentX.current);if(distance<=snapThreshold){el.scrollLeft=targetX.current;currentX.current=targetX.current;dispatchIndex(targetIndex);emitProgress(targetIndex)// chốt progress\n;applyAppearForAll();stopAnim();return;}raf.current=requestAnimationFrame(tick);};// wheel state (giữ để tương thích, nhưng sẽ không attach khi lockScroll = true)\nconst wheelAccum=useRef(0);const lastWheelAt=useRef(0);const lastWheelDir=useRef(0);const lastSnapDir=useRef(0);const gestureGapMs=180;const decayMs=240;const resetWheelGesture=()=>{wheelAccum.current=0;lastWheelDir.current=0;};useEffect(()=>{const el=containerRef.current;if(!el)return;// init\nconst vw=el.clientWidth||window.innerWidth||1;const initIdx=clampIndex(startIndex);const initLeft=initIdx*vw;el.scrollLeft=initLeft;currentX.current=targetX.current=initLeft;dispatchIndex(initIdx);emitProgress(initIdx);// apply appear ngay từ đầu\nrequestAnimationFrame(applyAppearForAll);// === WHEEL HANDLER (chỉ gắn nếu KHÔNG lockScroll)\nconst onWheel=e=>{if(lockScroll)return;if(e.ctrlKey)return;const now=performance.now();if(now-lastWheelAt.current>gestureGapMs)resetWheelGesture();// normalize → px\nlet{deltaX:dx,deltaY:dy,deltaMode}=e;if(deltaMode===1){dx*=16;dy*=16;}else if(deltaMode===2){dx*=el.clientHeight;dy*=el.clientHeight;}let primary=Math.abs(dx)>Math.abs(dy)?dx:dy;if(invertScroll)primary=-primary;const isDiscreteWheel=Math.abs(primary)>=mouseNotchPx;const cap=clampWheelDelta;if(primary>cap)primary=cap;if(primary<-cap)primary=-cap;const vwLocal=el.clientWidth||window.innerWidth||1;const thresholdPx=wheelThresholdVw*vwLocal;const nowDir=primary>0?1:primary<0?-1:0;if(isDiscreteWheel&&nowDir!==0){const baseIndex=useTargetWhileAnimating&&isAnimating.current?clampIndex(Math.round(targetX.current/vwLocal)):clampIndex(Math.round(currentX.current/vwLocal));const since=now-lastSnapTime.current;const isReverse=lastSnapDir.current!==0&&nowDir===-lastSnapDir.current;if(isReverse||since>=minIntervalMs){e.preventDefault();const nextIndex=clampIndex(baseIndex+nowDir);snapToIndex(nextIndex,nowDir);wheelAccum.current=0;lastWheelAt.current=now;lastWheelDir.current=nowDir;}return;}const dt=now-lastWheelAt.current;const decay=Math.exp(-dt/decayMs);wheelAccum.current=wheelAccum.current*decay+primary;lastWheelAt.current=now;const dir=wheelAccum.current>0?1:wheelAccum.current<0?-1:0;const locked=now<gestureLockUntil.current;const sameDir=lastSnapDir.current!==0&&dir===lastSnapDir.current;const effectiveThreshold=locked&&sameDir?Number.POSITIVE_INFINITY:thresholdPx;if(lastWheelDir.current!==0&&dir!==0&&dir!==lastWheelDir.current){wheelAccum.current=primary;}if(dir!==0)lastWheelDir.current=dir;let stepped=false;while(Math.abs(wheelAccum.current)>=effectiveThreshold){e.preventDefault();const baseIndex=useTargetWhileAnimating&&isAnimating.current?clampIndex(Math.round(targetX.current/vwLocal)):clampIndex(Math.round(currentX.current/vwLocal));const stepDir=wheelAccum.current>0?1:-1;const nextIndex=clampIndex(baseIndex+stepDir);const since=now-lastSnapTime.current;const isReverse=lastSnapDir.current!==0&&stepDir===-lastSnapDir.current;if(!isReverse&&since<minIntervalMs)break;snapToIndex(nextIndex,stepDir);wheelAccum.current-=stepDir*thresholdPx;stepped=true;if(oneStepPerGesture||!allowStacking)break;}if(!stepped)return;};const onResize=()=>{const vw2=el.clientWidth||window.innerWidth||1;const idxFromTarget=clampIndex(Math.round(targetX.current/vw2));const newLeft=idxFromTarget*vw2;el.scrollLeft=newLeft;currentX.current=targetX.current=newLeft;dispatchIndex(idxFromTarget);emitProgress(idxFromTarget);recomputeRight();applyAppearForAll();};if(!lockScroll)el.addEventListener(\"wheel\",onWheel,{passive:false});window.addEventListener(\"resize\",onResize);return()=>{if(!lockScroll)el.removeEventListener(\"wheel\",onWheel);window.removeEventListener(\"resize\",onResize);stopAnim();};},[sections.length,lockScroll,invertScroll,smoothness,startIndex,allowStacking,minIntervalMs,snapThreshold,totalSections,emitNearThreshold,gestureLockMs,useTargetWhileAnimating,wheelThresholdVw,clampWheelDelta,oneStepPerGesture,mouseNotchPx,buttonsMaxWidth,arrowRight,// appear deps\nappearEnable,appearFalloff,appearTranslate,appearScaleFrom,appearOpacityCurve]);// arrows\nconst onPrev=()=>{const prev=Math.max(0,activeIndex-1);if(prev!==activeIndex)snapToIndex(prev,-1);};const onNext=()=>{const next=Math.min(getCount()-1,activeIndex+1);if(next!==activeIndex)snapToIndex(next,1);};const canPrev=activeIndex>0;const canNext=activeIndex<getCount()-1;return /*#__PURE__*/_jsxs(\"div\",{ref:containerRef,style:{position:\"fixed\",inset:0,width:\"100%\",height:\"100%\",overflow:\"hidden\",...props.style},children:[/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:\"row\",width:\"100%\",height:\"100%\"},children:sections.map((section,i)=>/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",overflow:\"hidden\",position:\"relative\",flex:\"0 0 100%\"},children:/*#__PURE__*/_jsx(\"div\",{ref:setWrapperRef(i),style:{position:\"absolute\",inset:0,willChange:\"transform, opacity\",transform:\"translate3d(0,0,0)\",opacity:1,pointerEvents:lockScroll?\"none\":\"auto\"},children:section&&/*#__PURE__*/cloneElement(section,{style:{width:\"100%\",height:\"100%\",position:\"absolute\",inset:0}})})},i))}),showArrows&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"fixed\",right:effRight,bottom:arrowBottom,display:\"flex\",gap:arrowGap,zIndex:20,pointerEvents:\"none\"},children:[/*#__PURE__*/_jsx(\"button\",{\"aria-label\":\"Previous\",onClick:onPrev,disabled:!canPrev,style:{width:arrowDiameter,height:arrowDiameter,borderRadius:arrowRadius,background:arrowBg,border:`${arrowStrokeWidth}px solid ${arrowStrokeColor}`,color:arrowIconColor,display:\"grid\",placeItems:\"center\",cursor:canPrev?\"pointer\":\"default\",opacity:canPrev?1:arrowDisableOpacity,transition:\"background 0.2s ease, opacity 0.2s ease\",boxShadow:\"none\",padding:0,pointerEvents:\"auto\"},onMouseEnter:e=>{if(canPrev)e.currentTarget.style.background=arrowBgHover;},onMouseLeave:e=>{e.currentTarget.style.background=arrowBg;},children:/*#__PURE__*/_jsx(ChevronLeft,{size:arrowIconSize})}),/*#__PURE__*/_jsx(\"button\",{\"aria-label\":\"Next\",onClick:onNext,disabled:!canNext,style:{width:arrowDiameter,height:arrowDiameter,borderRadius:arrowRadius,background:arrowBg,border:`${arrowStrokeWidth}px solid ${arrowStrokeColor}`,color:arrowIconColor,display:\"grid\",placeItems:\"center\",cursor:canNext?\"pointer\":\"default\",opacity:canNext?1:arrowDisableOpacity,transition:\"background 0.2s ease, opacity 0.2s ease\",boxShadow:\"none\",padding:0,pointerEvents:\"auto\"},onMouseEnter:e=>{if(canNext)e.currentTarget.style.background=arrowBgHover;},onMouseLeave:e=>{e.currentTarget.style.background=arrowBg;},children:/*#__PURE__*/_jsx(ChevronRight,{size:arrowIconSize})})]})]});}SmoothSnapScrollHorizontal.displayName=\"Smooth Snap Scroll Horizontal\";function ChevronLeft({size=18}){const s=Math.max(8,size);return /*#__PURE__*/_jsx(\"svg\",{width:s,height:s,viewBox:\"0 0 24 24\",fill:\"none\",\"aria-hidden\":true,children:/*#__PURE__*/_jsx(\"path\",{d:\"M14.5 5L8.5 12L14.5 19\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})});}function ChevronRight({size=18}){const s=Math.max(8,size);return /*#__PURE__*/_jsx(\"svg\",{width:s,height:s,viewBox:\"0 0 24 24\",fill:\"none\",\"aria-hidden\":true,children:/*#__PURE__*/_jsx(\"path\",{d:\"M9.5 5L15.5 12L9.5 19\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})});}addPropertyControls(SmoothSnapScrollHorizontal,{// core\nsections:{type:ControlType.Array,title:\"Sections\",control:{type:ControlType.ComponentInstance}},invertScroll:{type:ControlType.Boolean,title:\"Invert\",defaultValue:false},smoothness:{type:ControlType.Number,title:\"Smoothness\",defaultValue:.08,min:.02,max:.25,step:.01},snapThreshold:{type:ControlType.Number,title:\"Snap Threshold (px)\",defaultValue:1,min:.1,max:10,step:.1},startIndex:{type:ControlType.Number,title:\"Start Index\",defaultValue:0,min:0,step:1},allowStacking:{type:ControlType.Boolean,title:\"Stacking\",defaultValue:true},minIntervalMs:{type:ControlType.Number,title:\"Min Interval (ms)\",defaultValue:120,min:0,max:600,step:10,unit:\"ms\"},totalSections:{type:ControlType.Number,title:\"Total Sections\",defaultValue:0,min:0,step:1},emitNearThreshold:{type:ControlType.Number,title:\"Emit Near (0–0.5 vw)\",defaultValue:0,min:0,max:.5,step:.01},gestureLockMs:{type:ControlType.Number,title:\"Gesture Lock (ms)\",defaultValue:260,min:0,max:1e3,step:10,unit:\"ms\"},useTargetWhileAnimating:{type:ControlType.Boolean,title:\"Use Target While Anim.\",defaultValue:true},// wheel (vẫn giữ để dùng khi tắt lockScroll)\nwheelThresholdVw:{type:ControlType.Number,title:\"Wheel Threshold (vw)\",defaultValue:.18,min:.05,max:.5,step:.01},clampWheelDelta:{type:ControlType.Number,title:\"Clamp Delta (px)\",defaultValue:80,min:20,max:240,step:5},oneStepPerGesture:{type:ControlType.Boolean,title:\"One Step / Gesture\",defaultValue:true},mouseNotchPx:{type:ControlType.Number,title:\"Mouse Notch (px)\",defaultValue:80,min:30,max:200,step:5},// ===== NEW\nlockScroll:{type:ControlType.Boolean,title:\"Lock Scroll (Use arrows only)\",defaultValue:true},appearEnable:{type:ControlType.Boolean,title:\"Appear FX\",defaultValue:true},appearFalloff:{type:ControlType.Number,title:\"Appear Falloff (slides)\",defaultValue:1,min:.3,max:2,step:.05},appearTranslate:{type:ControlType.Number,title:\"Appear TranslateY (px)\",defaultValue:24,min:0,max:120,step:1},appearScaleFrom:{type:ControlType.Number,title:\"Appear Scale From\",defaultValue:.98,min:.9,max:1,step:.005},appearOpacityCurve:{type:ControlType.Number,title:\"Opacity Curve (pow)\",defaultValue:1,min:.5,max:3,step:.05},// arrows\nshowArrows:{type:ControlType.Boolean,title:\"Arrows: Show\",defaultValue:true},arrowDiameter:{type:ControlType.Number,title:\"Button Size\",defaultValue:44,min:28,max:96,step:1},arrowIconSize:{type:ControlType.Number,title:\"Icon Size\",defaultValue:18,min:8,max:48,step:1},arrowGap:{type:ControlType.Number,title:\"Buttons Gap\",defaultValue:12,min:0,max:48,step:1},arrowRight:{type:ControlType.Number,title:\"Right (px)\",defaultValue:20,min:0,max:400,step:1},arrowBottom:{type:ControlType.Number,title:\"Bottom (px)\",defaultValue:24,min:0,max:400,step:1},arrowStrokeWidth:{type:ControlType.Number,title:\"Stroke Width\",defaultValue:2,min:1,max:8,step:.5},arrowStrokeColor:{type:ControlType.Color,title:\"Stroke Color\",defaultValue:\"#FFFFFF\"},arrowBg:{type:ControlType.Color,title:\"BG\",defaultValue:\"transparent\"},arrowBgHover:{type:ControlType.Color,title:\"BG Hover\",defaultValue:\"rgba(255,255,255,0.10)\"},arrowIconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#FFFFFF\"},arrowDisableOpacity:{type:ControlType.Number,title:\"Disabled Opacity\",defaultValue:.35,min:.1,max:1,step:.05},arrowRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:999,min:0,max:999,step:1},buttonsMaxWidth:{type:ControlType.Number,title:\"Buttons Max Width\",defaultValue:0,min:0,max:4e3,step:10},// platform (để nguyên)\nplatformMode:{type:ControlType.Enum,title:\"Platform Mode\",options:[\"auto\",\"mac\",\"windows\",\"unified\"],optionTitles:[\"Auto Detect\",\"Force macOS\",\"Force Windows\",\"Unified (use above)\"],defaultValue:\"auto\"},macWheelThresholdVw:{type:ControlType.Number,title:\"Mac • Wheel Thres. (vw)\",defaultValue:.16,min:.08,max:.5,step:.01},macClampDelta:{type:ControlType.Number,title:\"Mac • Clamp Delta (px)\",defaultValue:60,min:20,max:180,step:5},macMinIntervalMs:{type:ControlType.Number,title:\"Mac • Min Interval (ms)\",defaultValue:180,min:80,max:600,step:10},macGestureLockMs:{type:ControlType.Number,title:\"Mac • Lock (ms)\",defaultValue:240,min:100,max:1e3,step:10},winWheelThresholdVw:{type:ControlType.Number,title:\"Win • Wheel Thres. (vw)\",defaultValue:.24,min:.08,max:.6,step:.01},winClampDelta:{type:ControlType.Number,title:\"Win • Clamp Delta (px)\",defaultValue:110,min:20,max:240,step:5},winMinIntervalMs:{type:ControlType.Number,title:\"Win • Min Interval (ms)\",defaultValue:200,min:80,max:600,step:10},winGestureLockMs:{type:ControlType.Number,title:\"Win • Lock (ms)\",defaultValue:280,min:100,max:1e3,step:10}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SmoothSnapScrollHorizontal\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"1920\",\"framerIntrinsicHeight\":\"1080\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Horizontal_Scroll_For_Tablet.map"],"mappings":"wUAKG,SAAwB,EAA2B,EAAM,CAAC,GAAK,CAAC,WAAS,EAAE,CAAC,eAAa,GAAM,aAAW,IAAI,gBAAc,EAAE,aAAW,EAAE,gBAAc,GAAK,gBAAc,IAAI,gBAAc,EAAE,oBAAkB,EAAE,gBAAc,IAAI,0BAAwB,GACjQ,mBAAiB,IAAI,kBAAgB,GAAG,qBAAkB,GAAK,gBAAa,GAC5E,aAAW,GACX,eAAa,GAAK,gBAAc,EAAE,mBAAgB,GAAG,kBAAgB,IAAI,qBAAmB,EAC5F,cAAW,GAAK,gBAAc,GAAG,iBAAc,GAAG,YAAS,GAAG,aAAW,GAAG,eAAY,GAAG,oBAAiB,EAAE,oBAAiB,UAAU,UAAQ,cAAc,gBAAa,yBAAyB,kBAAe,UAAU,uBAAoB,IAAI,eAAY,IAAI,kBAAgB,EACtR,gBAAa,OAAO,uBAAoB,IAAI,iBAAc,GAAG,oBAAiB,IAAI,oBAAiB,IAAI,uBAAoB,IAAI,iBAAc,IAAI,oBAAiB,IAAI,oBAAiB,IAAI,CAAC,EAAY,EAAaA,EAAO,MAAY,EAAYA,EAAO,IAA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