{"version":3,"file":"Text_override.DAPMPJL2.mjs","names":[],"sources":["https:/framerusercontent.com/modules/jGDhzZiD93ftUzFFoWZi/pJMdO8C0AFR6ehzEq5Q8/Text_override.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef}from\"react\";export function withTextTruncation(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const style={width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",whiteSpace:\"nowrap\",overflow:\"hidden\",textOverflow:\"ellipsis\"};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style,...style}});});}export function withMultiLineTruncation(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style,width:\"100%\",height:\"100%\",display:\"-webkit-box\",WebkitBoxOrient:\"vertical\",WebkitLineClamp:3,overflow:\"hidden\",textOverflow:\"ellipsis\"}});});}export function withCMSClamp(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"-webkit-box\",WebkitBoxOrient:\"vertical\",WebkitLineClamp:3,overflow:\"hidden\",textOverflow:\"ellipsis\"},children:/*#__PURE__*/_jsx(Component,{ref:ref,...props})});});}// Words that should stay lowercase unless at start or end\nconst lowerCaseWords=[\"a\",\"an\",\"and\",\"as\",\"at\",\"but\",\"by\",\"for\",\"in\",\"nor\",\"of\",\"on\",\"or\",\"so\",\"the\",\"to\",\"up\",\"yet\"];function toTitleCase(str){// Convert to string and handle non-string values\nif(!str||typeof str!==\"string\")return\"\";const words=str.toLowerCase().split(\" \");return words.map((word,index)=>{const isFirstOrLast=index===0||index===words.length-1;const shouldCapitalize=isFirstOrLast||!lowerCaseWords.includes(word);return shouldCapitalize?word.charAt(0).toUpperCase()+word.slice(1):word;}).join(\" \");}export function withTitleCase(Component){return /*#__PURE__*/forwardRef((props,ref)=>{// Safely extract text value\nconst textValue=props.text||props.children||\"\";// Only process if it's actually a string\nconst newText=typeof textValue===\"string\"?toTitleCase(textValue):textValue;return /*#__PURE__*/_jsx(Component,{ref:ref,...props,text:newText});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withCMSClamp\":{\"type\":\"reactHoc\",\"name\":\"withCMSClamp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTextTruncation\":{\"type\":\"reactHoc\",\"name\":\"withTextTruncation\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMultiLineTruncation\":{\"type\":\"reactHoc\",\"name\":\"withMultiLineTruncation\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTitleCase\":{\"type\":\"reactHoc\",\"name\":\"withTitleCase\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Text_override.map"],"mappings":"kHAAyY,SAAgB,EAAwB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAA2B,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,MAAM,CAAC,GAAG,EAAM,MAAM,MAAM,OAAO,OAAO,OAAO,QAAQ,cAAc,gBAAgB,WAAW,gBAAgB,EAAE,SAAS,SAAS,aAAa,WAAW,CAAC,CAAC,CAAG,CAC3kB,SAAS,EAAY,EAAI,CAC/I,GAAG,CAAC,GAAK,OAAO,GAAM,SAAS,MAAM,GAAG,IAAM,EAAM,EAAI,aAAa,CAAC,MAAM,IAAI,CAAC,OAAO,EAAM,KAAK,EAAK,IAA6B,IAAQ,GAAG,IAAQ,EAAM,OAAO,GAAwC,CAAC,EAAe,SAAS,EAAK,CAAyB,EAAK,OAAO,EAAE,CAAC,aAAa,CAAC,EAAK,MAAM,EAAE,CAAC,EAAO,CAAC,KAAK,IAAI,CAAE,SAAgB,EAAc,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CACvZ,IAAM,EAAU,EAAM,MAAM,EAAM,UAAU,GACtC,EAAQ,OAAO,GAAY,SAAS,EAAY,EAAU,CAAC,EAAU,OAAoB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,KAAK,EAAQ,CAAC,EAAG,oBAJtG,IAA8B,CACnE,EAAe,CAAC,IAAI,KAAK,MAAM,KAAK,KAAK,MAAM,KAAK,MAAM,KAAK,MAAM,KAAK,KAAK,KAAK,KAAK,MAAM,KAAK,KAAK,MAAM"}