{"version":3,"file":"Bit7ra1L.js","sources":["../../../../node_modules/date-fns-tz/esm/utcToZonedTime/index.js"],"sourcesContent":["import tzParseTimezone from '../_lib/tzParseTimezone/index.js'\nimport toDate from '../toDate/index.js'\n\n/**\n * @name utcToZonedTime\n * @category Time Zone Helpers\n * @summary Get a date/time representing local time in a given time zone from the UTC date\n *\n * @description\n * Returns a date instance with values representing the local time in the time zone\n * specified of the UTC time from the date provided. In other words, when the new date\n * is formatted it will show the equivalent hours in the target time zone regardless\n * of the current system time zone.\n *\n * @param {Date|String|Number} date - the date with the relevant UTC time\n * @param {String} timeZone - the time zone to get local time for, can be an offset or IANA time zone\n * @param {OptionsWithTZ} [options] - the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * @returns {Date} the new date with the equivalent time in the time zone\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // In June 10am UTC is 6am in New York (-04:00)\n * const result = utcToZonedTime('2014-06-25T10:00:00.000Z', 'America/New_York')\n * //=> Jun 25 2014 06:00:00\n */\nexport default function utcToZonedTime(dirtyDate, timeZone, options) {\n var date = toDate(dirtyDate, options)\n\n var offsetMilliseconds = tzParseTimezone(timeZone, date, true)\n\n var d = new Date(date.getTime() - offsetMilliseconds)\n\n var resultDate = new Date(0)\n\n resultDate.setFullYear(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate())\n\n resultDate.setHours(d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds())\n\n return resultDate\n}\n"],"names":["utcToZonedTime","dirtyDate","timeZone","options","date","toDate","offsetMilliseconds","tzParseTimezone","d","resultDate"],"mappings":";;kWA2Be,SAASA,EAAeC,EAAWC,EAAUC,EAAS,CACnE,IAAIC,EAAOC,EAAOJ,EAAWE,CAAO,EAEhCG,EAAqBC,EAAgBL,EAAUE,EAAM,EAAI,EAEzDI,EAAI,IAAI,KAAKJ,EAAK,QAAS,EAAGE,CAAkB,EAEhDG,EAAa,IAAI,KAAK,CAAC,EAE3B,OAAAA,EAAW,YAAYD,EAAE,eAAc,EAAIA,EAAE,YAAW,EAAIA,EAAE,WAAY,CAAA,EAE1EC,EAAW,SAASD,EAAE,YAAa,EAAEA,EAAE,cAAe,EAAEA,EAAE,gBAAiBA,EAAE,mBAAoB,CAAA,EAE1FC,CACT","debug_id":"fe1d20f4-fe41-51c1-8043-d50f0c5350bc"}