{"version":3,"file":"getDecodedHtml-DA5Zyx4s-chunk.js","sources":["../../../src/utils/getDecodedHtml.js"],"sourcesContent":["export function getDecodedHtml(enc) {\n\tif (enc) {\n\t\tif (enc.match(/(\\d+);/g)) {\n\t\t\t// Présentation de la Société => 'Présentation de la Société'\n\t\t\treturn enc.replace(/(\\d+);/g, (_match, number) => String.fromCharCode(number));\n\t\t}\n\t\t// if there is a 25% or 1% or just the % sign by itself do not try to decode\n\t\tconst leavePercentages = (enc + \"\").replace(/(\\d+)%([,|.|\\s+])|%([,|.|\\s+])/, \"$1%25$2\");\n\t\ttry {\n\t\t\treturn decodeURIComponent((leavePercentages + \"\").replace(/\\+/g, \"%20\"));\n\t\t} catch (e) {\n\t\t\tconsole.error(\"URI Component not decodable: \" + enc);\n\t\t\treturn enc;\n\t\t}\n\t\t//TODO: work on more robust error handling; may need to handle errors at each replace method\n\t}\n\treturn \"\";\n}\n"],"names":["getDecodedHtml","enc","_match","number","leavePercentages"],"mappings":"AAAO,SAASA,EAAeC,EAAK,CACnC,GAAIA,EAAK,CACR,GAAIA,EAAI,MAAM,WAAW,EAExB,OAAOA,EAAI,QAAQ,YAAa,CAACC,EAAQC,IAAW,OAAO,aAAaA,CAAM,CAAC,EAGhF,MAAMC,GAAoBH,EAAM,IAAI,QAAQ,iCAAkC,SAAS,EACvF,GAAI,CACH,OAAO,oBAAoBG,EAAmB,IAAI,QAAQ,MAAO,KAAK,CAAC,CACvE,MAAW,CACX,eAAQ,MAAM,gCAAkCH,CAAG,EAC5CA,CACV,CAEA,CACC,MAAO,EACR"}