{"ast":null,"code":"/* eslint-disable no-unused-vars */\n\n/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n  return (value, options) => {\n    const context = options?.context ? String(options.context) : \"standalone\";\n    let valuesArray;\n    if (context === \"formatting\" && args.formattingValues) {\n      const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n      const width = options?.width ? String(options.width) : defaultWidth;\n      valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];\n    } else {\n      const defaultWidth = args.defaultWidth;\n      const width = options?.width ? String(options.width) : args.defaultWidth;\n      valuesArray = args.values[width] || args.values[defaultWidth];\n    }\n    const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n    // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n    return valuesArray[index];\n  };\n}","map":{"version":3,"names":["buildLocalizeFn","args","value","options","context","String","valuesArray","formattingValues","defaultWidth","defaultFormattingWidth","width","values","index","argumentCallback"],"sources":["/root/rfcontavagas_hom/12.-Servidor-local-Docker/Front-Parking-Angular/node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs"],"sourcesContent":["/* eslint-disable no-unused-vars */\n\n/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n  return (value, options) => {\n    const context = options?.context ? String(options.context) : \"standalone\";\n\n    let valuesArray;\n    if (context === \"formatting\" && args.formattingValues) {\n      const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n      const width = options?.width ? String(options.width) : defaultWidth;\n\n      valuesArray =\n        args.formattingValues[width] || args.formattingValues[defaultWidth];\n    } else {\n      const defaultWidth = args.defaultWidth;\n      const width = options?.width ? String(options.width) : args.defaultWidth;\n\n      valuesArray = args.values[width] || args.values[defaultWidth];\n    }\n    const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n    // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n    return valuesArray[index];\n  };\n}\n"],"mappings":"AAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,OAAO,SAASA,eAAeA,CAACC,IAAI,EAAE;EACpC,OAAO,CAACC,KAAK,EAAEC,OAAO,KAAK;IACzB,MAAMC,OAAO,GAAGD,OAAO,EAAEC,OAAO,GAAGC,MAAM,CAACF,OAAO,CAACC,OAAO,CAAC,GAAG,YAAY;IAEzE,IAAIE,WAAW;IACf,IAAIF,OAAO,KAAK,YAAY,IAAIH,IAAI,CAACM,gBAAgB,EAAE;MACrD,MAAMC,YAAY,GAAGP,IAAI,CAACQ,sBAAsB,IAAIR,IAAI,CAACO,YAAY;MACrE,MAAME,KAAK,GAAGP,OAAO,EAAEO,KAAK,GAAGL,MAAM,CAACF,OAAO,CAACO,KAAK,CAAC,GAAGF,YAAY;MAEnEF,WAAW,GACTL,IAAI,CAACM,gBAAgB,CAACG,KAAK,CAAC,IAAIT,IAAI,CAACM,gBAAgB,CAACC,YAAY,CAAC;IACvE,CAAC,MAAM;MACL,MAAMA,YAAY,GAAGP,IAAI,CAACO,YAAY;MACtC,MAAME,KAAK,GAAGP,OAAO,EAAEO,KAAK,GAAGL,MAAM,CAACF,OAAO,CAACO,KAAK,CAAC,GAAGT,IAAI,CAACO,YAAY;MAExEF,WAAW,GAAGL,IAAI,CAACU,MAAM,CAACD,KAAK,CAAC,IAAIT,IAAI,CAACU,MAAM,CAACH,YAAY,CAAC;IAC/D;IACA,MAAMI,KAAK,GAAGX,IAAI,CAACY,gBAAgB,GAAGZ,IAAI,CAACY,gBAAgB,CAACX,KAAK,CAAC,GAAGA,KAAK;;IAE1E;IACA,OAAOI,WAAW,CAACM,KAAK,CAAC;EAC3B,CAAC;AACH","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}