{"version":3,"file":"Utils.DIAVR3IF.mjs","names":["__esmMin","getIdToken","getUserId","getUserInfoFromToken","token","payload","error","determineRedirectPath","userInfo","role","formatErrorMessage","err","fieldErrors","field","message","formatSuccessMessage","data","entityType","isValidEmail","email","validateRequired","value","fieldName","validateEmail","validateStringLength","trimmed","minLength","maxLength","validateCurrencyValue","numValue","cleanValue","calculateOwnRisk","config","calculatedAmount","boatValue","validateOwnRiskConfig","fixedAmount","currencyError","percentage","calculatePremium","validatePremiumConfig","formatObjectSummary","summary","objectData","key","fieldSchema","schema","label","formatLabel","formattedValue","formatCurrency","formatDate","camelCaseString","str","roundedAmount","decimals","amount","dateString","API_BASE_URL","COGNITO_CLIENT_ID","REGION","COGNITO_ENDPOINT","API_PATHS","init_Utils"],"sources":["https:/framerusercontent.com/modules/7EgB8i3nKjMNv3mNiBUb/6iCsN0iTKRAlFYc1M6Qd/Utils.js"],"sourcesContent":["// ——— API Configuration: Version dependent.  ———\n//Dev\n//export const API_BASE_URL = \"https://dev.api.hienfeld.io\"\n//Acc\n// export const API_BASE_URL = \"https://acc.api.hienfeld.io\"\n// //Prod\nexport const API_BASE_URL=\"https://api.hienfeld.io\";// ——— CLIENT ID : Version dependent ———\n//Dev\n//export const COGNITO_CLIENT_ID = \"di3vf3gteg48eqk0fdpu1b75a\"\n//Acc\n//export const COGNITO_CLIENT_ID = \"6iv6ngli2ncro1r15lg4tit8gd\"\n//Prod\nexport const COGNITO_CLIENT_ID=\"77ebf6re0i6rs978o1hn10dl4c\";export const REGION=\"eu-central-1\";export const COGNITO_ENDPOINT=`https://cognito-idp.${REGION}.amazonaws.com/`;// API Paths\nexport const API_PATHS={USER:\"/neptunus/user\",SIGNUP:\"/neptunus/signup\",LOGIN:\"/neptunus/login\",EXCHANGE_CODE:\"/neptunus/exchange-code\",ORGANIZATION:\"/neptunus/organization\",POLICY:\"/neptunus/policy\",BOAT:\"/neptunus/boat\",INSURED_OBJECT:\"/neptunus/insured-object\",CHANGELOG:\"/neptunus/changelog\",SCHEMA:\"/neptunus/schema\"};//test\n// ——— Authentication Helpers ———\nexport function getIdToken(){return sessionStorage.getItem(\"idToken\");}export function getUserId(){return sessionStorage.getItem(\"userId\");}export function getAccessToken(){return sessionStorage.getItem(\"accessToken\");}export function isAuthenticated(){const token=getIdToken();if(!token)return false;try{// Check if token is expired\nconst payload=JSON.parse(atob(token.split(\".\")[1]));const currentTime=Math.floor(Date.now()/1e3);return payload.exp>currentTime;}catch(error){console.error(\"Error checking token expiration:\",error);return false;}}export function clearAuthTokens(){sessionStorage.removeItem(\"idToken\");sessionStorage.removeItem(\"accessToken\");sessionStorage.removeItem(\"refreshToken\");sessionStorage.removeItem(\"userId\");}export function getUserInfoFromToken(){const token=getIdToken();if(!token)return null;try{const payload=JSON.parse(atob(token.split(\".\")[1]));return{userId:payload.sub,email:payload.email,name:payload.name||payload.given_name||payload.email,groups:payload[\"cognito:groups\"]||[],role:payload[\"custom:role\"]||\"user\",organization:payload[\"custom:organization\"],organizations:payload[\"custom:organizations\"]?payload[\"custom:organizations\"].split(\",\"):[]};}catch(error){console.error(\"Error parsing user info from token:\",error);return null;}}// Determine optimal redirect path based on user role and organization access\nexport async function determineRedirectPath(){const userInfo=getUserInfoFromToken();if(!userInfo){return\"/organizations\"// Default fallback\n;}const role=userInfo.role||\"user\";// Admin: Always go to organizations page to choose their workflow\nif(role===\"admin\"){return\"/organizations\";}// Editor: Always go to organizations page to choose which org to work with\nif(role===\"editor\"){return\"/organizations\";}// User: Check if they have only one organization\nif(role===\"user\"){// If user has a single organization, redirect directly to insured objects\nif(userInfo.organization){return\"/insuredobjects\";}// Fallback: if organization info is unclear, go to organizations page\nreturn\"/organizations\";}// Default fallback\nreturn\"/organizations\";}// ——— Error & Success Message Formatting ———\nexport function formatErrorMessage(error){if(typeof error===\"string\")return error;if(error&&typeof error===\"object\"){if(error.message)return error.message;if(error.errors&&Array.isArray(error.errors)){return error.errors.map(err=>typeof err===\"string\"?err:err.message||\"Validation error\").join(\"\\n\");}if(error.fieldErrors||error.validationErrors){const fieldErrors=error.fieldErrors||error.validationErrors;return Object.entries(fieldErrors).map(([field,message])=>`${field}: ${message}`).join(\"\\n\");}return JSON.stringify(error,null,2);}return\"An unexpected error occurred\";}export function formatSuccessMessage(data,entityType){if(typeof data===\"string\")return data;if(data&&typeof data===\"object\"){if(data.message)return data.message;if(data.id){const entity=entityType||\"Item\";return`${entity} succesvol aangemaakt!`;}const entity=entityType||\"Item\";return`${entity} is succesvol aangemaakt!`;}return\"Bewerking succesvol voltooid!\";}// ——— Validation Helpers ———\nexport function isValidEmail(email){const emailRegex=/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;return emailRegex.test(email.trim());}export function isValidPhoneNumber(phone){const phoneRegex=/^\\+?[\\d\\s-()]+$/;return phoneRegex.test(phone.trim());}export function isValidContactInfo(contact){return isValidEmail(contact)||isValidPhoneNumber(contact);}// ——— Form Validation Helpers ———\nexport function validateRequired(value,fieldName){if(typeof value===\"string\"&&!value.trim()){return`${fieldName} is verplicht`;}if(typeof value===\"number\"&&(isNaN(value)||value===0)){return`${fieldName} is verplicht`;}return null;}export function validateEmail(email){if(!email.trim())return\"E-mailadres is verplicht\";if(!isValidEmail(email))return\"Voer een geldig e-mailadres in\";return null;}export function validateStringLength(value,fieldName,minLength,maxLength){const trimmed=value.trim();if(trimmed.length<minLength){return`${fieldName} moet minimaal ${minLength} karakters bevatten`;}if(maxLength&&trimmed.length>maxLength){return`${fieldName} moet minder dan ${maxLength} karakters bevatten`;}return null;}export function validateNumberRange(value,fieldName,min,max){if(isNaN(value)){return`${fieldName} moet een geldig nummer zijn`;}if(min!==undefined&&value<min){return`${fieldName} moet minimaal ${min} zijn`;}if(max!==undefined&&value>max){return`${fieldName} mag maximaal ${max} zijn`;}return null;}// Enhanced validation for high-value currency fields (boat values, own risk, etc.)\nexport function validateCurrencyValue(value,fieldName=\"Waarde\"){let numValue;if(typeof value===\"string\"){// Remove any currency symbols and format characters\nconst cleanValue=value.replace(/[€$,\\s]/g,\"\").replace(\",\",\".\");numValue=parseFloat(cleanValue);}else{numValue=value;}if(isNaN(numValue)){return`${fieldName} moet een geldig bedrag zijn`;}if(numValue<0){return`${fieldName} kan niet negatief zijn`;}// Reasonable upper limit check for very high values (10 million euros)\nif(numValue>1e7){return`${fieldName} lijkt ongewoon hoog (€${numValue.toLocaleString(\"nl-NL\")}). Controleer of dit correct is.`;}return null;}// Enhanced promillage validation with automatic decimal handling\nexport function validatePromillage(value,fieldName=\"Premiepromillage\"){// Convert string to number and handle automatic decimal conversion\nlet numValue;if(typeof value===\"string\"){// Remove any non-numeric characters except decimal point\nconst cleanValue=value.replace(/[^0-9.,]/g,\"\").replace(\",\",\".\");numValue=parseFloat(cleanValue);}else{numValue=value;}if(isNaN(numValue)){return`${fieldName} moet een geldig nummer zijn`;}// Automatically handle decimal values (e.g., 5 becomes 5.0, 50 becomes 5.0 if >10)\nif(numValue>100){return`${fieldName} lijkt te hoog (${numValue}). Controleer of dit een promillage waarde is (bijvoorbeeld: 5.0 voor 5‰)`;}if(numValue<=0){return`${fieldName} moet groter dan 0 zijn`;}// Reasonable range check for promillage values\nif(numValue>50){return`${fieldName} lijkt ongewoon hoog (${numValue}‰). Typische waarden liggen tussen 1-20‰`;}return null;}// Convert promillage input to standardized format\nexport function normalizePromillageValue(value){let numValue;if(typeof value===\"string\"){const cleanValue=value.replace(/[^0-9.,]/g,\"\").replace(\",\",\".\");numValue=parseFloat(cleanValue);}else{numValue=value;}if(isNaN(numValue))return 0;// Round to 1 decimal place for promillage precision\nreturn Math.round(numValue*10)/10;}// Calculate own risk based on method and boat value\nexport function calculateOwnRisk(config,boatValue){if(config.method===\"percentage\"&&config.percentage){// Convert string to number if needed\nconst percentage=typeof config.percentage===\"string\"?parseFloat(config.percentage):config.percentage;const calculatedAmount=boatValue*percentage/100;// Round to nearest 100 euros as per business requirement\nreturn Math.round(calculatedAmount/100)*100;}else if(config.method===\"fixed\"&&config.fixedAmount){// Convert string to number if needed\nconst fixedAmount=typeof config.fixedAmount===\"string\"?parseFloat(config.fixedAmount):config.fixedAmount;return fixedAmount;}return 0;}// Validate own risk configuration\nexport function validateOwnRiskConfig(config){if(!config.method){return\"Selecteer een berekeningswijze voor eigen risico\";}if(config.method===\"fixed\"){// Convert string to number if needed\nconst fixedAmount=typeof config.fixedAmount===\"string\"?parseFloat(config.fixedAmount):config.fixedAmount;if(!fixedAmount||isNaN(fixedAmount)||fixedAmount<0){return\"Voer een geldig vast bedrag in voor eigen risico\";}const currencyError=validateCurrencyValue(fixedAmount,\"Vast bedrag eigen risico\");if(currencyError)return currencyError;}else if(config.method===\"percentage\"){// Convert string to number if needed\nconst percentage=typeof config.percentage===\"string\"?parseFloat(config.percentage):config.percentage;if(!percentage||isNaN(percentage)||percentage<=0||percentage>100){return\"Voer een geldig percentage in (0-100%) voor eigen risico\";}}return null;}// Format own risk display text\nexport function formatOwnRiskDisplay(config,boatValue){if(config.method===\"fixed\"&&config.fixedAmount){// Convert string to number if needed\nconst fixedAmount=typeof config.fixedAmount===\"string\"?parseFloat(config.fixedAmount):config.fixedAmount;return formatCurrency(fixedAmount);}else if(config.method===\"percentage\"&&config.percentage){// Convert string to number if needed\nconst percentage=typeof config.percentage===\"string\"?parseFloat(config.percentage):config.percentage;const baseText=`${percentage}% van bootwaarde`;if(boatValue){const calculatedAmount=calculateOwnRisk(config,boatValue);return`${baseText} (${formatCurrency(calculatedAmount)})`;}return baseText;}return\"Niet geconfigureerd\";}// Calculate premium based on method and boat value\nexport function calculatePremium(config,boatValue){if(config.method===\"percentage\"&&config.percentage){// Convert string to number if needed\nconst percentage=typeof config.percentage===\"string\"?parseFloat(config.percentage):config.percentage;const calculatedAmount=boatValue*percentage/100;// Round to 3 decimal places for premium precision\nreturn Math.round(calculatedAmount*1e3)/1e3;}else if(config.method===\"fixed\"&&config.fixedAmount){// Convert string to number if needed\nconst fixedAmount=typeof config.fixedAmount===\"string\"?parseFloat(config.fixedAmount):config.fixedAmount;return fixedAmount;}return 0;}// Validate premium configuration\nexport function validatePremiumConfig(config){if(!config.method){return\"Selecteer een berekeningswijze voor premie\";}if(config.method===\"fixed\"){// Convert string to number if needed\nconst fixedAmount=typeof config.fixedAmount===\"string\"?parseFloat(config.fixedAmount):config.fixedAmount;if(!fixedAmount||isNaN(fixedAmount)||fixedAmount<=0){return\"Voer een geldig vast bedrag in voor premie\";}const currencyError=validateCurrencyValue(fixedAmount,\"Vast bedrag premie\");if(currencyError)return currencyError;}else if(config.method===\"percentage\"){// Convert string to number if needed\nconst percentage=typeof config.percentage===\"string\"?parseFloat(config.percentage):config.percentage;if(!percentage||isNaN(percentage)||percentage<=0||percentage>100){return\"Voer een geldig percentage in (0-100%) voor premie\";}}return null;}// Format premium display text\nexport function formatPremiumDisplay(config,boatValue){if(config.method===\"fixed\"&&config.fixedAmount){// Convert string to number if needed\nconst fixedAmount=typeof config.fixedAmount===\"string\"?parseFloat(config.fixedAmount):config.fixedAmount;return formatCurrency(fixedAmount);}else if(config.method===\"percentage\"&&config.percentage){// Convert string to number if needed\nconst percentage=typeof config.percentage===\"string\"?parseFloat(config.percentage):config.percentage;const baseText=`${percentage}% van bootwaarde`;if(boatValue){const calculatedAmount=calculatePremium(config,boatValue);return`${baseText} (${formatCurrency(calculatedAmount)})`;}return baseText;}return\"Niet geconfigureerd\";}// Confirmation Dialog Utilities\nexport function formatObjectSummary(objectData,schema){const summary={};if(!objectData)return summary;// Format each field with proper labels and values\nObject.keys(objectData).forEach(key=>{const value=objectData[key];if(value===null||value===undefined||value===\"\")return;// Find field schema for proper label\nconst fieldSchema=schema?.find(field=>field.key===key);const label=fieldSchema?.label||formatLabel(key);// Format value based on field type\nlet formattedValue=value;if(fieldSchema?.type===\"currency\"&&typeof value===\"number\"){formattedValue=formatCurrency(value);}else if(fieldSchema?.type===\"date\"&&value){formattedValue=formatDate(value);}else if(typeof value===\"boolean\"){formattedValue=value?\"Ja\":\"Nee\";}else if(Array.isArray(value)){formattedValue=value.join(\", \");}summary[label]=String(formattedValue);});return summary;}export function validateYear(year,fieldName=\"Year\"){const currentYear=new Date().getFullYear();if(year<=1900||year>currentYear){return`${fieldName} moet tussen 1900 en ${currentYear} liggen`;}return null;}// ——— Utility Functions ———\nexport function formatLabel(camelCaseString){return camelCaseString.replace(/([A-Z])/g,\" $1\").replace(/^./,str=>str.toUpperCase()).trim();}export function getCurrentYear(){return new Date().getFullYear();}export function formatCurrency(amount,currency=\"EUR\",decimals=0){// Round to specified decimals (default: whole euros for values, 2 decimals for premiums)\nconst roundedAmount=decimals>0?amount:Math.round(amount);return new Intl.NumberFormat(\"nl-NL\",{style:\"currency\",currency:currency,minimumFractionDigits:decimals,maximumFractionDigits:decimals}).format(roundedAmount);}export function formatDate(dateString){if(!dateString)return\"\";const date=new Date(dateString);return date.toLocaleDateString(\"nl-NL\",{year:\"numeric\",month:\"2-digit\",day:\"2-digit\"});}// ——— HTTP Request Helpers ———\nexport function createAuthHeaders(token){const headers={\"Content-Type\":\"application/json\"};const authToken=token||getIdToken();if(authToken){headers.Authorization=`Bearer ${authToken}`;}return headers;}export async function apiRequest(endpoint,options={}){const token=getIdToken();if(!token){throw new Error(\"Geen authenticatietoken gevonden. Log opnieuw in.\");}const response=await fetch(`${API_BASE_URL}${endpoint}`,{...options,headers:{...createAuthHeaders(token),...options.headers},mode:\"cors\"});if(!response.ok){if(response.status===403){throw new Error(\"Authenticatie mislukt. Je sessie is mogelijk verlopen. Log opnieuw in.\");}throw new Error(`${response.status} ${response.statusText}`);}return response.json();}// ——— Type Guards ———\nexport function isString(value){return typeof value===\"string\";}export function isNumber(value){return typeof value===\"number\"&&!isNaN(value);}export function isEmpty(value){if(value===null||value===undefined)return true;if(typeof value===\"string\")return value.trim()===\"\";if(typeof value===\"number\")return isNaN(value);if(Array.isArray(value))return value.length===0;if(typeof value===\"object\")return Object.keys(value).length===0;return false;}\nexport const __FramerMetadata__ = {\"exports\":{\"calculatePremium\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"formatSuccessMessage\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"calculateOwnRisk\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"validatePremiumConfig\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"validateOwnRiskConfig\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"validateCurrencyValue\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"REGION\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"isValidPhoneNumber\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"createAuthHeaders\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"clearAuthTokens\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"formatCurrency\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"validateEmail\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"validateStringLength\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"normalizePromillageValue\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getAccessToken\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"formatLabel\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"validatePromillage\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"isAuthenticated\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"isString\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"OwnRiskCalculationMethod\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"COGNITO_ENDPOINT\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"determineRedirectPath\":{\"type\":\"function\",\"isAsync\":true,\"annotations\":{\"framerContractVersion\":\"1\"}},\"getUserInfoFromToken\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PremiumCalculationMethod\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"formatPremiumDisplay\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"apiRequest\":{\"type\":\"function\",\"isAsync\":true,\"annotations\":{\"framerContractVersion\":\"1\"}},\"formatErrorMessage\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"formatDate\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"formatObjectSummary\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"OwnRiskConfig\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"isValidEmail\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getCurrentYear\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"isNumber\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"isEmpty\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"validateNumberRange\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"formatOwnRiskDisplay\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"API_PATHS\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"COGNITO_CLIENT_ID\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"validateRequired\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"API_BASE_URL\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"isValidContactInfo\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PremiumConfig\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getIdToken\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"validateYear\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getUserId\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Utils.map"],"mappings":"A,oDAeA,SAAgBC,GAAY,CAAC,OAAO,eAAe,QAAQ,SAAS,CAAE,CAAC,SAAgBC,GAAW,CAAC,OAAO,eAAe,QAAQ,QAAQ,CAAE,CACyQ,SAAgBC,GAAsB,CAAC,IAAMC,EAAMH,EAAW,EAAE,GAAG,CAACG,EAAM,OAAO,KAAK,GAAG,CAAC,IAAMC,EAAQ,KAAK,MAAM,KAAKD,EAAM,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,OAAOC,EAAQ,IAAI,MAAMA,EAAQ,MAAM,KAAKA,EAAQ,MAAMA,EAAQ,YAAYA,EAAQ,MAAM,OAAOA,EAAQ,mBAAmB,CAAC,EAAE,KAAKA,EAAQ,gBAAgB,OAAO,aAAaA,EAAQ,uBAAuB,cAAcA,EAAQ,wBAAwBA,EAAQ,uBAAuB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAE,OAAOC,EAAM,CAA4D,OAA3D,QAAQ,MAAM,sCAAsCA,CAAK,EAAS,IAAK,CAAC,CAC76B,eAAsBC,GAAuB,CAAC,IAAMC,EAASL,EAAqB,EAAE,GAAG,CAACK,EAAU,MAAM,iBACtG,IAAMC,EAAKD,EAAS,MAAM,OAM5B,OALGC,IAAO,SACPA,IAAO,SAAgB,iBACvBA,IAAO,QACPD,EAAS,aAAoB,kBAE1B,gBAAiB,CACvB,SAAgBE,EAAmB,EAAM,CAAC,GAAG,OAAOJ,GAAQ,SAAS,OAAOA,EAAM,GAAGA,GAAO,OAAOA,GAAQ,SAAS,CAAC,GAAGA,EAAM,QAAQ,OAAOA,EAAM,QAAQ,GAAGA,EAAM,QA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