{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/c8XnpOTYapYG2cWZbeiK/AdbxifeI63TnKFdZVhbM/BlogTools.js"],
  "sourcesContent": ["// A custom Framer code component/override/plugin by Chris Kellett - Framerverse\n// Version 1.2\nimport{jsx as _jsx,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";// BLOG - Readtime script\nconst useStore=createStore({content:\"\",numberOfWords:0,text:\"Store TEXT\"});// Function to calculate read time\nexport function calculateReadTime(Component){return props=>{const[store,setStore]=useStore();useEffect(()=>{const allParagraphs=document.querySelectorAll(\"p\");let concatenatedText=\"\";allParagraphs.forEach(paragraph=>{concatenatedText+=paragraph.textContent;});setStore({content:concatenatedText,numberOfWords:concatenatedText.trim().split(/\\s+/).length});},[]);return /*#__PURE__*/_jsx(Component,{...props});};}// Override to show read time\nexport function showReadTime(Component){return props=>{const[store]=useStore();return /*#__PURE__*/_jsx(Component,{...props,text:`${Math.ceil(store.numberOfWords/200)} min read`});};}// BLOG - Share Sheet Functions\n// Function to share on LinkedIn\nfunction shareOnLinkedIn(){const currentURL=window.location.href;const linkedinShareURL=`https://www.linkedin.com/shareArticle?mini=true&url=${encodeURIComponent(currentURL)}`;window.open(linkedinShareURL,\"Share\",\"width=600,height=400\");}// LinkedIn share button\nexport function shareOnLinkedInButton(Component){return props=>/*#__PURE__*/_jsx(Component,{...props,onClick:shareOnLinkedIn});}// Function to share on X (Twitter)\nfunction shareOnX(){const currentURL=window.location.href;const twitterShareURL=`https://twitter.com/intent/tweet?text=${encodeURIComponent(currentURL)}`;window.open(twitterShareURL,\"Share\",\"width=600,height=400\");}// X (Twitter) share button\nexport function shareOnXButton(Component){return props=>/*#__PURE__*/_jsx(Component,{...props,onClick:shareOnX});}// Function to share on Facebook\nfunction shareOnFacebook(){const currentURL=window.location.href;const facebookShareURL=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(currentURL)}`;window.open(facebookShareURL,\"Share\",\"width=600,height=400\");}// Facebook share button\nexport function shareOnFacebookButton(Component){return props=>/*#__PURE__*/_jsx(Component,{...props,onClick:shareOnFacebook});}// Function to share on Reddit\nfunction shareOnReddit(){const currentURL=window.location.href;const redditShareURL=`https://www.reddit.com/submit?url=${encodeURIComponent(currentURL)}`;window.open(redditShareURL,\"Share\",\"width=600,height=400\");}// Reddit share button\nexport function shareOnRedditButton(Component){return props=>/*#__PURE__*/_jsx(Component,{...props,onClick:shareOnReddit});}// Function to share via Email\nfunction shareViaEmail(){const currentURL=window.location.href;const pageTitle=document.title;const mailtoLink=`mailto:?subject=Take a look at this: ${encodeURIComponent(pageTitle)}&body=Found this thought you might like it.%0D%0A%0D%0A${encodeURIComponent(currentURL)}`;window.open(mailtoLink);}// Email share button\nexport function shareEmailButton(Component){return props=>/*#__PURE__*/_jsx(Component,{...props,onClick:shareViaEmail});}// Function to print page\nfunction printPage(){window.print();}// Print button\nexport function PrintButton(Component){return props=>/*#__PURE__*/_jsx(Component,{...props,onClick:printPage});}//--------------------------------------------------------------------------\n// Truncate the text in the customer work comments\nexport function withCharacterTruncateBlog(Component){return props=>{const maxCharactersWork=120// Set a default value for maxCharactersWork\n;const averageCharactersPerLine=50// Adjust this value according to your content\n;const maxLines=Math.ceil(maxCharactersWork/averageCharactersPerLine);const styles={...props===null||props===void 0?void 0:props.style,WebkitLineClamp:`${maxLines}`,WebkitBoxOrient:\"vertical\",textOverflow:\"ellipsis\",display:\"-webkit-box\",overflow:\"hidden\"};return /*#__PURE__*/_jsx(_Fragment,{children:/*#__PURE__*/_jsx(Component,{...props,style:styles})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withCharacterTruncateBlog\":{\"type\":\"reactHoc\",\"name\":\"withCharacterTruncateBlog\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"shareOnXButton\":{\"type\":\"reactHoc\",\"name\":\"shareOnXButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"shareEmailButton\":{\"type\":\"reactHoc\",\"name\":\"shareEmailButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"shareOnFacebookButton\":{\"type\":\"reactHoc\",\"name\":\"shareOnFacebookButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showReadTime\":{\"type\":\"reactHoc\",\"name\":\"showReadTime\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PrintButton\":{\"type\":\"reactHoc\",\"name\":\"PrintButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"calculateReadTime\":{\"type\":\"reactHoc\",\"name\":\"calculateReadTime\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"shareOnLinkedInButton\":{\"type\":\"reactHoc\",\"name\":\"shareOnLinkedInButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"shareOnRedditButton\":{\"type\":\"reactHoc\",\"name\":\"shareOnRedditButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BlogTools.map"],
  "mappings": "qJAAAA,IAGA,IAAMC,EAASC,EAAY,CAAC,QAAQ,GAAG,cAAc,EAAE,KAAK,YAAY,CAAC,EAClE,SAASC,EAAkBC,EAAU,CAAC,OAAOC,GAAO,CAAC,GAAK,CAACC,EAAMC,CAAQ,EAAEN,EAAS,EAAE,OAAAO,EAAU,IAAI,CAAC,IAAMC,EAAc,SAAS,iBAAiB,GAAG,EAAMC,EAAiB,GAAGD,EAAc,QAAQE,GAAW,CAACD,GAAkBC,EAAU,WAAY,CAAC,EAAEJ,EAAS,CAAC,QAAQG,EAAiB,cAAcA,EAAiB,KAAK,EAAE,MAAM,KAAK,EAAE,MAAM,CAAC,CAAE,EAAE,CAAC,CAAC,EAAsBE,EAAKR,EAAU,CAAC,GAAGC,CAAK,CAAC,CAAE,CAAE,CACnZ,SAASQ,EAAaT,EAAU,CAAC,OAAOC,GAAO,CAAC,GAAK,CAACC,CAAK,EAAEL,EAAS,EAAE,OAAoBW,EAAK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,QAAQ,EAAE,OAAoBJ,EAAKM,EAAU,CAAC,SAAsBN,EAAKF,EAAU,CAAC,GAAGC,EAAM,MAAMM,CAAM,CAAC,CAAC,CAAC,CAAE,CAAE",
  "names": ["init_ssg_sandbox_shims", "useStore", "createStore", "calculateReadTime", "Component", "props", "store", "setStore", "ue", "allParagraphs", "concatenatedText", "paragraph", "p", "showReadTime", "shareOnLinkedIn", "currentURL", "linkedinShareURL", "shareOnLinkedInButton", "shareOnX", "twitterShareURL", "shareOnXButton", "shareViaEmail", "currentURL", "pageTitle", "mailtoLink", "shareEmailButton", "Component", "props", "p", "printPage", "PrintButton", "withCharacterTruncateBlog", "maxLines", "styles", "l"]
}
