{"version":3,"file":"ArticleReadTime.CTgBit8p.mjs","names":["React.useContext","React.useMemo","React.Fragment","useRef","React.useId","Image","readingTime"],"sources":["https:/framerusercontent.com/modules/A1U1cHgnS2oF3Wr71CnG/4rVnayP7ZAP7L7rPCpX6/Bj5OvrLrc.js","https:/framerusercontent.com/modules/fTlhoJ46Q3wZNVeWU318/toUJdcxH9eaoQysCSKm8/ArticleReadTime.js"],"sourcesContent":["// Generated by Framer (9045c1a)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addFonts,addPropertyControls,ControlType,cx,getLoadingLazyAtYPosition,Image,Link,useComponentViewport,useLocaleInfo,useVariantState,withCSS}from\"framer\";import{LayoutGroup,motion,MotionConfigContext}from\"framer-motion\";import*as React from\"react\";import{useRef}from\"react\";const enabledGestures={AM9rYwCyh:{hover:true}};const cycleOrder=[\"AM9rYwCyh\",\"vxyUDM9Va\"];const serializationHash=\"framer-dwtdh\";const variantClassNames={AM9rYwCyh:\"framer-v-1f4cfuj\",vxyUDM9Va:\"framer-v-10rsd9g\"};function addPropertyOverrides(overrides,...variants){const nextOverrides={};variants?.forEach(variant=>variant&&Object.assign(nextOverrides,overrides[variant]));return nextOverrides;}const transition1={damping:80,delay:0,mass:1,stiffness:350,type:\"spring\"};const toResponsiveImage=value=>{if(typeof value===\"object\"&&value!==null&&typeof value.src===\"string\"){return value;}return typeof value===\"string\"?{src:value}:undefined;};const Transition=({value,children})=>{const config=React.useContext(MotionConfigContext);const transition=value??config.transition;const contextValue=React.useMemo(()=>({...config,transition}),[JSON.stringify(transition)]);return /*#__PURE__*/_jsx(MotionConfigContext.Provider,{value:contextValue,children:children});};const Variants=motion.create(React.Fragment);const humanReadableVariantMap={\"No - Hover\":\"vxyUDM9Va\",Default:\"AM9rYwCyh\"};const getProps=({height,id,link,photo,width,...props})=>{return{...props,fL0bviXjD:link??props.fL0bviXjD,variant:humanReadableVariantMap[props.variant]??props.variant??\"AM9rYwCyh\",vdfvQ0swh:photo??props.vdfvQ0swh??{src:\"https://framerusercontent.com/images/X1wJoY3OJDOHh8ll6t8lLcPxLOU.png?scale-down-to=1024\",srcSet:\"https://framerusercontent.com/images/X1wJoY3OJDOHh8ll6t8lLcPxLOU.png?scale-down-to=512 512w,https://framerusercontent.com/images/X1wJoY3OJDOHh8ll6t8lLcPxLOU.png?scale-down-to=1024 1024w,https://framerusercontent.com/images/X1wJoY3OJDOHh8ll6t8lLcPxLOU.png 1200w\"}};};const createLayoutDependency=(props,variants)=>{if(props.layoutDependency)return variants.join(\"-\")+props.layoutDependency;return variants.join(\"-\");};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const fallbackRef=useRef(null);const refBinding=ref??fallbackRef;const defaultLayoutId=React.useId();const{activeLocale,setLocale}=useLocaleInfo();const componentViewport=useComponentViewport();const{style,className,layoutId,variant,vdfvQ0swh,fL0bviXjD,...restProps}=getProps(props);const{baseVariant,classNames,clearLoadingGesture,gestureHandlers,gestureVariant,isLoading,setGestureState,setVariant,variants}=useVariantState({cycleOrder,defaultVariant:\"AM9rYwCyh\",enabledGestures,ref:refBinding,variant,variantClassNames});const layoutDependency=createLayoutDependency(props,variants);const sharedStyleClassNames=[];const scopingClassNames=cx(serializationHash,...sharedStyleClassNames);return /*#__PURE__*/_jsx(LayoutGroup,{id:layoutId??defaultLayoutId,children:/*#__PURE__*/_jsx(Variants,{animate:variants,initial:false,children:/*#__PURE__*/_jsx(Transition,{value:transition1,children:/*#__PURE__*/_jsx(Link,{href:fL0bviXjD,motionChild:true,nodeId:\"AM9rYwCyh\",scopeId:\"Bj5OvrLrc\",children:/*#__PURE__*/_jsx(motion.a,{...restProps,...gestureHandlers,className:`${cx(scopingClassNames,\"framer-1f4cfuj\",className,classNames)} framer-1js08j8`,\"data-framer-name\":\"Default\",layoutDependency:layoutDependency,layoutId:\"AM9rYwCyh\",ref:refBinding,style:{...style},...addPropertyOverrides({\"AM9rYwCyh-hover\":{\"data-framer-name\":undefined},vxyUDM9Va:{\"data-framer-name\":\"No - Hover\"}},baseVariant,gestureVariant),children:/*#__PURE__*/_jsx(Image,{background:{alt:\"\",fit:\"fill\",loading:getLoadingLazyAtYPosition((componentViewport?.y||0)+(0+((componentViewport?.height||523)-0-((componentViewport?.height||523)-0)*1)/2)),sizes:componentViewport?.width||\"100vw\",...toResponsiveImage(vdfvQ0swh),...{positionX:\"center\",positionY:\"top\"}},className:\"framer-d59spo\",\"data-framer-name\":\"Photo\",layoutDependency:layoutDependency,layoutId:\"JKnl46u2X\",...addPropertyOverrides({\"AM9rYwCyh-hover\":{background:{alt:\"\",fit:\"fill\",loading:getLoadingLazyAtYPosition((componentViewport?.y||0)+(0+((componentViewport?.height||523)-0-((componentViewport?.height||523)-0)*1.03)/2)),sizes:`calc(${componentViewport?.width||\"100vw\"} * 1.03)`,...toResponsiveImage(vdfvQ0swh),...{positionX:\"center\",positionY:\"top\"}}}},baseVariant,gestureVariant)})})})})})});});const css=[\"@supports (aspect-ratio: 1) { body { --framer-aspect-ratio-supported: auto; } }\",\".framer-dwtdh.framer-1js08j8, .framer-dwtdh .framer-1js08j8 { display: block; }\",\".framer-dwtdh.framer-1f4cfuj { align-content: center; align-items: center; cursor: pointer; display: flex; flex-direction: row; flex-wrap: nowrap; gap: 10px; height: 523px; justify-content: center; overflow: hidden; padding: 0px; position: relative; text-decoration: none; width: 484px; }\",\".framer-dwtdh .framer-d59spo { flex: none; height: 100%; overflow: hidden; position: relative; width: 100%; }\",\"@supports (background: -webkit-named-image(i)) and (not (font-palette:dark)) { .framer-dwtdh.framer-1f4cfuj { gap: 0px; } .framer-dwtdh.framer-1f4cfuj > * { margin: 0px; margin-left: calc(10px / 2); margin-right: calc(10px / 2); } .framer-dwtdh.framer-1f4cfuj > :first-child { margin-left: 0px; } .framer-dwtdh.framer-1f4cfuj > :last-child { margin-right: 0px; } }\",\".framer-dwtdh.framer-v-1f4cfuj.hover .framer-d59spo { height: 103%; width: 103%; }\"];/**\n * This is a generated Framer component.\n * @framerIntrinsicHeight 523\n * @framerIntrinsicWidth 484\n * @framerCanvasComponentVariantDetails {\"propertyName\":\"variant\",\"data\":{\"default\":{\"layout\":[\"fixed\",\"fixed\"]},\"vxyUDM9Va\":{\"layout\":[\"fixed\",\"fixed\"]},\"B0PYwfC_n\":{\"layout\":[\"fixed\",\"fixed\"]}}}\n * @framerVariables {\"vdfvQ0swh\":\"photo\",\"fL0bviXjD\":\"link\"}\n * @framerImmutableVariables true\n * @framerDisplayContentsDiv false\n * @framerComponentViewportWidth true\n */const FramerBj5OvrLrc=withCSS(Component,css,\"framer-dwtdh\");export default FramerBj5OvrLrc;FramerBj5OvrLrc.displayName=\"Photo Container\";FramerBj5OvrLrc.defaultProps={height:523,width:484};addPropertyControls(FramerBj5OvrLrc,{variant:{options:[\"AM9rYwCyh\",\"vxyUDM9Va\"],optionTitles:[\"Default\",\"No - Hover\"],title:\"Variant\",type:ControlType.Enum},vdfvQ0swh:{__defaultAssetReference:\"data:framer/asset-reference,X1wJoY3OJDOHh8ll6t8lLcPxLOU.png?originalFilename=QmWGZWModhCnALaH4w28LbwF43A1sifzFC6E64LmvGV18t%3Fauto%3Dformat%26w%3D1200.png&preferredSize=auto\",title:\"Photo\",type:ControlType.ResponsiveImage},fL0bviXjD:{title:\"Link\",type:ControlType.Link}});addFonts(FramerBj5OvrLrc,[{explicitInter:true,fonts:[]}],{supportsExplicitInterCodegen:true});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FramerBj5OvrLrc\",\"slots\":[],\"annotations\":{\"framerDisplayContentsDiv\":\"false\",\"framerComponentViewportWidth\":\"true\",\"framerIntrinsicHeight\":\"523\",\"framerVariables\":\"{\\\"vdfvQ0swh\\\":\\\"photo\\\",\\\"fL0bviXjD\\\":\\\"link\\\"}\",\"framerCanvasComponentVariantDetails\":\"{\\\"propertyName\\\":\\\"variant\\\",\\\"data\\\":{\\\"default\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"vxyUDM9Va\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"B0PYwfC_n\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]}}}\",\"framerIntrinsicWidth\":\"484\",\"framerContractVersion\":\"1\",\"framerImmutableVariables\":\"true\"}},\"Props\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Bj5OvrLrc.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import readingTime from\"reading-time\";function getTextContentArrayFromReactElement(element){if(!element){return[];}if(typeof element===\"string\"){return[element];}if(Array.isArray(element)){return element.flatMap(getTextContentArrayFromReactElement);}if(element.props&&element.props.children){const children=Array.isArray(element.props.children)?element.props.children:[element.props.children];return children.flatMap(getTextContentArrayFromReactElement);}return[];}/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function ArticleReadTime(props){let hasText=false;let strings=[];if(props.formatted){strings=getTextContentArrayFromReactElement(props.formattedText);hasText=!props.formattedText||strings.length==0?false:true;}else{strings.push(props.plainText);hasText=props.plainText!==\"\";}let timeData=readingTime(strings.join(\" \"),{wordsPerMinute:props.wpm});return /*#__PURE__*/_jsx(\"p\",{style:{color:props.fontColor,userSelect:props.textSelect?\"auto\":\"none\",margin:0,...props.font},children:hasText?`${props.prefix}\n            ${Math.max(Math.round(timeData.minutes),1)}\n            ${props.suffix}`:\"No text content connected.\"});}ArticleReadTime.displayName=\"Article Read Time\";addPropertyControls(ArticleReadTime,{formatted:{type:ControlType.Boolean,defaultValue:true},formattedText:{type:ControlType.RichText,title:\"Text\",hidden(props){return!props.formatted;}},plainText:{type:ControlType.String,displayTextArea:true,title:\"Text\",hidden(props){return props.formatted;}},wpm:{type:ControlType.Number,defaultValue:200,step:1,min:1,title:\"WPM\",description:\"Words per minute\"},fontColor:{type:ControlType.Color,defaultValue:\"#000\"},font:{type:\"font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:14,lineHeight:1.4}},prefix:{type:ControlType.String},suffix:{type:ControlType.String,defaultValue:\" min read\"},textSelect:{type:ControlType.Boolean,defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ArticleReadTime\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ArticleReadTime.map"],"mappings":"mYACwhB,SAAS,EAAqB,EAAU,GAAG,EAAS,CAAC,IAAM,EAAc,EAAE,CAAsF,OAArF,GAAU,QAAQ,GAAS,GAAS,OAAO,OAAO,EAAc,EAAU,GAAS,CAAC,CAAQ,6CAArpB,IAAgK,IAAkE,IAA4B,CAAgC,EAAgB,CAAC,UAAU,CAAC,MAAM,GAAK,CAAC,CAAO,EAAW,CAAC,YAAY,YAAY,CAAO,EAAkB,eAAqB,EAAkB,CAAC,UAAU,mBAAmB,UAAU,mBAAmB,CAA8L,EAAY,CAAC,QAAQ,GAAG,MAAM,EAAE,KAAK,EAAE,UAAU,IAAI,KAAK,SAAS,CAAO,EAAkB,GAAW,OAAO,GAAQ,UAAU,GAAc,OAAO,EAAM,KAAM,SAAiB,EAAc,OAAO,GAAQ,SAAS,CAAC,IAAI,EAAM,CAAC,IAAA,GAAkB,GAAY,CAAC,QAAM,cAAY,CAAC,IAAM,EAAOA,EAAiB,EAAoB,CAAO,EAAW,GAAO,EAAO,WAAiB,EAAaC,OAAmB,CAAC,GAAG,EAAO,aAAW,EAAE,CAAC,KAAK,UAAU,EAAW,CAAC,CAAC,CAAC,OAAoB,EAAK,EAAoB,SAAS,CAAC,MAAM,EAAsB,WAAS,CAAC,EAAS,EAAS,EAAO,OAAOC,EAAe,CAAO,EAAwB,CAAC,aAAa,YAAY,QAAQ,YAAY,C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