{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/7hoW8N4kOnHor1k5VpXm/ki7YwCDvO6AM4oQ1Lg1o/Character_limit.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";// Setting Maximum Text Character Limit in Framer CMS by Doruk Kavcioglu\n// Framer.guide | Framer Course - Coming Soon\nexport function withCharacterLimit(Component){return props=>{// Extract text property\nconst{text,...otherProps}=props;const limit=120// Set character limit\n;// Check if text is longer than limit, if so, trim it\nlet trimmedText=text;if((text===null||text===void 0?void 0:text.length)>limit){// Trim text to the limit\ntrimmedText=text.slice(0,limit);// Find the last space within the trimmed text to ensure it ends with a full word\nconst lastSpaceIndex=trimmedText.lastIndexOf(\" \");// Trim the text at the last space index to ensure it ends with a full word\nif(lastSpaceIndex!==-1){trimmedText=trimmedText.slice(0,lastSpaceIndex).trim();}trimmedText+=\"... v\\xedce\"// Add three dots\n;}return /*#__PURE__*/_jsx(Component,{...otherProps,text:trimmedText});};}export function withCharacterLimit300(Component){return props=>{// Extract text property\nconst{text,...otherProps}=props;const limit=300// Set character limit\n;// Check if text is longer than limit, if so, trim it\nlet trimmedText=text;if((text===null||text===void 0?void 0:text.length)>limit){// Trim text to the limit\ntrimmedText=text.slice(0,limit);// Find the last space within the trimmed text to ensure it ends with a full word\nconst lastSpaceIndex=trimmedText.lastIndexOf(\" \");// Trim the text at the last space index to ensure it ends with a full word\nif(lastSpaceIndex!==-1){trimmedText=trimmedText.slice(0,lastSpaceIndex).trim();}trimmedText+=\"... v\\xedce\"// Add three dots\n;}return /*#__PURE__*/_jsx(Component,{...otherProps,text:trimmedText});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withCharacterLimit300\":{\"type\":\"reactHoc\",\"name\":\"withCharacterLimit300\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCharacterLimit\":{\"type\":\"reactHoc\",\"name\":\"withCharacterLimit\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Character_limit.map"],
  "mappings": "yCAEO,SAASA,EAAmBC,EAAU,CAAC,OAAOC,GAAO,CAC5D,GAAK,CAAC,KAAAC,EAAK,GAAGC,CAAU,EAAEF,EAAYG,EAAM,IAExCC,EAAYH,EAAK,GAAsCA,GAAK,OAAQE,EAAM,CAC9EC,EAAYH,EAAK,MAAM,EAAEE,CAAK,EAC9B,IAAME,EAAeD,EAAY,YAAY,GAAG,EAC7CC,IAAiB,KAAID,EAAYA,EAAY,MAAM,EAAEC,CAAc,EAAE,KAAK,GAAGD,GAAa,aAC5F,CAAC,OAAoBE,EAAKP,EAAU,CAAC,GAAGG,EAAW,KAAKE,CAAW,CAAC,CAAE,CAAE,CAAQ,SAASG,EAAsBR,EAAU,CAAC,OAAOC,GAAO,CACzI,GAAK,CAAC,KAAAC,EAAK,GAAGC,CAAU,EAAEF,EAAYG,EAAM,IAExCC,EAAYH,EAAK,GAAsCA,GAAK,OAAQE,EAAM,CAC9EC,EAAYH,EAAK,MAAM,EAAEE,CAAK,EAC9B,IAAME,EAAeD,EAAY,YAAY,GAAG,EAC7CC,IAAiB,KAAID,EAAYA,EAAY,MAAM,EAAEC,CAAc,EAAE,KAAK,GAAGD,GAAa,aAC5F,CAAC,OAAoBE,EAAKP,EAAU,CAAC,GAAGG,EAAW,KAAKE,CAAW,CAAC,CAAE,CAAE",
  "names": ["withCharacterLimit", "Component", "props", "text", "otherProps", "limit", "trimmedText", "lastSpaceIndex", "p", "withCharacterLimit300"]
}
