{"version":3,"file":"primer_view_components.js","sources":["../../../node_modules/@github/tab-container-element/dist/index.js","../../../node_modules/@github/time-elements/dist/time-elements.js"],"sourcesContent":["export default class TabContainerElement extends HTMLElement {\n constructor() {\n super();\n this.addEventListener('keydown', (event) => {\n const target = event.target;\n if (!(target instanceof HTMLElement))\n return;\n if (target.getAttribute('role') !== 'tab' && !target.closest('[role=\"tablist\"]'))\n return;\n const tabs = Array.from(this.querySelectorAll('[role=\"tablist\"] [role=\"tab\"]'));\n const currentIndex = tabs.indexOf(tabs.find(tab => tab.matches('[aria-selected=\"true\"]')));\n if (event.code === 'ArrowRight') {\n let index = currentIndex + 1;\n if (index >= tabs.length)\n index = 0;\n selectTab(this, index);\n }\n else if (event.code === 'ArrowLeft') {\n let index = currentIndex - 1;\n if (index < 0)\n index = tabs.length - 1;\n selectTab(this, index);\n }\n else if (event.code === 'Home') {\n selectTab(this, 0);\n event.preventDefault();\n }\n else if (event.code === 'End') {\n selectTab(this, tabs.length - 1);\n event.preventDefault();\n }\n });\n this.addEventListener('click', (event) => {\n const tabs = Array.from(this.querySelectorAll('[role=\"tablist\"] [role=\"tab\"]'));\n if (!(event.target instanceof Element))\n return;\n const tab = event.target.closest('[role=\"tab\"]');\n if (!tab || !tab.closest('[role=\"tablist\"]'))\n return;\n const index = tabs.indexOf(tab);\n selectTab(this, index);\n });\n }\n connectedCallback() {\n for (const tab of this.querySelectorAll('[role=\"tablist\"] [role=\"tab\"]')) {\n if (!tab.hasAttribute('aria-selected')) {\n tab.setAttribute('aria-selected', 'false');\n }\n if (!tab.hasAttribute('tabindex')) {\n if (tab.getAttribute('aria-selected') === 'true') {\n tab.setAttribute('tabindex', '0');\n }\n else {\n tab.setAttribute('tabindex', '-1');\n }\n }\n }\n }\n}\nfunction selectTab(tabContainer, index) {\n const tabs = tabContainer.querySelectorAll('[role=\"tablist\"] [role=\"tab\"]');\n const panels = tabContainer.querySelectorAll('[role=\"tabpanel\"]');\n const selectedTab = tabs[index];\n const selectedPanel = panels[index];\n const cancelled = !tabContainer.dispatchEvent(new CustomEvent('tab-container-change', {\n bubbles: true,\n cancelable: true,\n detail: { relatedTarget: selectedPanel }\n }));\n if (cancelled)\n return;\n for (const tab of tabs) {\n tab.setAttribute('aria-selected', 'false');\n tab.setAttribute('tabindex', '-1');\n }\n for (const panel of panels) {\n panel.hidden = true;\n if (!panel.hasAttribute('tabindex') && !panel.hasAttribute('data-tab-container-no-tabstop')) {\n panel.setAttribute('tabindex', '0');\n }\n }\n selectedTab.setAttribute('aria-selected', 'true');\n selectedTab.setAttribute('tabindex', '0');\n selectedTab.focus();\n selectedPanel.hidden = false;\n tabContainer.dispatchEvent(new CustomEvent('tab-container-changed', {\n bubbles: true,\n detail: { relatedTarget: selectedPanel }\n }));\n}\nif (!window.customElements.get('tab-container')) {\n window.TabContainerElement = TabContainerElement;\n window.customElements.define('tab-container', TabContainerElement);\n}\n//# sourceMappingURL=index.js.map","const weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\nconst months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n\nfunction pad(num) {\n return \"0\".concat(num).slice(-2);\n}\n\nfunction strftime(time, formatString) {\n const day = time.getDay();\n const date = time.getDate();\n const month = time.getMonth();\n const year = time.getFullYear();\n const hour = time.getHours();\n const minute = time.getMinutes();\n const second = time.getSeconds();\n return formatString.replace(/%([%aAbBcdeHIlmMpPSwyYZz])/g, function (_arg) {\n let match;\n const modifier = _arg[1];\n\n switch (modifier) {\n case '%':\n return '%';\n\n case 'a':\n return weekdays[day].slice(0, 3);\n\n case 'A':\n return weekdays[day];\n\n case 'b':\n return months[month].slice(0, 3);\n\n case 'B':\n return months[month];\n\n case 'c':\n return time.toString();\n\n case 'd':\n return pad(date);\n\n case 'e':\n return String(date);\n\n case 'H':\n return pad(hour);\n\n case 'I':\n return pad(strftime(time, '%l'));\n\n case 'l':\n if (hour === 0 || hour === 12) {\n return String(12);\n } else {\n return String((hour + 12) % 12);\n }\n\n case 'm':\n return pad(month + 1);\n\n case 'M':\n return pad(minute);\n\n case 'p':\n if (hour > 11) {\n return 'PM';\n } else {\n return 'AM';\n }\n\n case 'P':\n if (hour > 11) {\n return 'pm';\n } else {\n return 'am';\n }\n\n case 'S':\n return pad(second);\n\n case 'w':\n return String(day);\n\n case 'y':\n return pad(year % 100);\n\n case 'Y':\n return String(year);\n\n case 'Z':\n match = time.toString().match(/\\((\\w+)\\)$/);\n return match ? match[1] : '';\n\n case 'z':\n match = time.toString().match(/\\w([+-]\\d\\d\\d\\d) /);\n return match ? match[1] : '';\n }\n\n return '';\n });\n}\nfunction makeFormatter(options) {\n let format;\n return function () {\n if (format) return format;\n\n if ('Intl' in window) {\n try {\n format = new Intl.DateTimeFormat(undefined, options);\n return format;\n } catch (e) {\n if (!(e instanceof RangeError)) {\n throw e;\n }\n }\n }\n };\n}\nlet dayFirst = null;\nconst dayFirstFormatter = makeFormatter({\n day: 'numeric',\n month: 'short'\n}); // Private: Determine if the day should be formatted before the month name in\n// the user's current locale. For example, `9 Jun` for en-GB and `Jun 9`\n// for en-US.\n//\n// Returns true if the day appears before the month.\n\nfunction isDayFirst() {\n if (dayFirst !== null) {\n return dayFirst;\n }\n\n const formatter = dayFirstFormatter();\n\n if (formatter) {\n const output = formatter.format(new Date(0));\n dayFirst = !!output.match(/^\\d/);\n return dayFirst;\n } else {\n return false;\n }\n}\nlet yearSeparator = null;\nconst yearFormatter = makeFormatter({\n day: 'numeric',\n month: 'short',\n year: 'numeric'\n}); // Private: Determine if the year should be separated from the month and day\n// with a comma. For example, `9 Jun 2014` in en-GB and `Jun 9, 2014` in en-US.\n//\n// Returns true if the date needs a separator.\n\nfunction isYearSeparator() {\n if (yearSeparator !== null) {\n return yearSeparator;\n }\n\n const formatter = yearFormatter();\n\n if (formatter) {\n const output = formatter.format(new Date(0));\n yearSeparator = !!output.match(/\\d,/);\n return yearSeparator;\n } else {\n return true;\n }\n} // Private: Determine if the date occurs in the same year as today's date.\n//\n// date - The Date to test.\n//\n// Returns true if it's this year.\n\nfunction isThisYear(date) {\n const now = new Date();\n return now.getUTCFullYear() === date.getUTCFullYear();\n}\nfunction makeRelativeFormat(locale, options) {\n if ('Intl' in window && 'RelativeTimeFormat' in window.Intl) {\n try {\n // eslint-disable-next-line flowtype/no-flow-fix-me-comments\n // $FlowFixMe: missing RelativeTimeFormat type\n return new Intl.RelativeTimeFormat(locale, options);\n } catch (e) {\n if (!(e instanceof RangeError)) {\n throw e;\n }\n }\n }\n} // Private: Get preferred Intl locale for a target element.\n//\n// Traverses parents until it finds an explicit `lang` other returns \"default\".\n\nfunction localeFromElement(el) {\n const container = el.closest('[lang]');\n\n if (container instanceof HTMLElement && container.lang) {\n return container.lang;\n }\n\n return 'default';\n}\n\nconst datetimes = new WeakMap();\nclass ExtendedTimeElement extends HTMLElement {\n static get observedAttributes() {\n return ['datetime', 'day', 'format', 'lang', 'hour', 'minute', 'month', 'second', 'title', 'weekday', 'year'];\n }\n\n connectedCallback() {\n const title = this.getFormattedTitle();\n\n if (title && !this.hasAttribute('title')) {\n this.setAttribute('title', title);\n }\n\n const text = this.getFormattedDate();\n\n if (text) {\n this.textContent = text;\n }\n } // Internal: Refresh the time element's formatted date when an attribute changes.\n\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n const oldTitle = this.getFormattedTitle();\n\n if (attrName === 'datetime') {\n const millis = Date.parse(newValue);\n\n if (isNaN(millis)) {\n datetimes.delete(this);\n } else {\n datetimes.set(this, new Date(millis));\n }\n }\n\n const title = this.getFormattedTitle();\n const currentTitle = this.getAttribute('title');\n\n if (attrName !== 'title' && title && (!currentTitle || currentTitle === oldTitle)) {\n this.setAttribute('title', title);\n }\n\n const text = this.getFormattedDate();\n\n if (text) {\n this.textContent = text;\n }\n }\n\n get date() {\n return datetimes.get(this);\n } // Internal: Format the ISO 8601 timestamp according to the user agent's\n // locale-aware formatting rules. The element's existing `title` attribute\n // value takes precedence over this custom format.\n //\n // Returns a formatted time String.\n\n\n getFormattedTitle() {\n const date = this.date;\n if (!date) return;\n const formatter = titleFormatter();\n\n if (formatter) {\n return formatter.format(date);\n } else {\n try {\n return date.toLocaleString();\n } catch (e) {\n if (e instanceof RangeError) {\n return date.toString();\n } else {\n throw e;\n }\n }\n }\n }\n\n getFormattedDate() {}\n\n}\nconst titleFormatter = makeFormatter({\n day: 'numeric',\n month: 'short',\n year: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n timeZoneName: 'short'\n});\n\nconst formatters = new WeakMap();\nclass LocalTimeElement extends ExtendedTimeElement {\n attributeChangedCallback(attrName, oldValue, newValue) {\n if (attrName === 'hour' || attrName === 'minute' || attrName === 'second' || attrName === 'time-zone-name') {\n formatters.delete(this);\n }\n\n super.attributeChangedCallback(attrName, oldValue, newValue);\n } // Formats the element's date, in the user's current locale, according to\n // the formatting attribute values. Values are not passed straight through to\n // an Intl.DateTimeFormat instance so that weekday and month names are always\n // displayed in English, for now.\n //\n // Supported attributes are:\n //\n // weekday - \"short\", \"long\"\n // year - \"numeric\", \"2-digit\"\n // month - \"short\", \"long\"\n // day - \"numeric\", \"2-digit\"\n // hour - \"numeric\", \"2-digit\"\n // minute - \"numeric\", \"2-digit\"\n // second - \"numeric\", \"2-digit\"\n //\n // Returns a formatted time String.\n\n\n getFormattedDate() {\n const d = this.date;\n if (!d) return;\n const date = formatDate(this, d) || '';\n const time = formatTime(this, d) || '';\n return \"\".concat(date, \" \").concat(time).trim();\n }\n\n} // Private: Format a date according to the `weekday`, `day`, `month`,\n// and `year` attribute values.\n//\n// This doesn't use Intl.DateTimeFormat to avoid creating text in the user's\n// language when the majority of the surrounding text is in English. There's\n// currently no way to separate the language from the format in Intl.\n//\n// el - The local-time element to format.\n//\n// Returns a date String or null if no date formats are provided.\n\nfunction formatDate(el, date) {\n // map attribute values to strftime\n const props = {\n weekday: {\n short: '%a',\n long: '%A'\n },\n day: {\n numeric: '%e',\n '2-digit': '%d'\n },\n month: {\n short: '%b',\n long: '%B'\n },\n year: {\n numeric: '%Y',\n '2-digit': '%y'\n }\n }; // build a strftime format string\n\n let format = isDayFirst() ? 'weekday day month year' : 'weekday month day, year';\n\n for (const prop in props) {\n const value = props[prop][el.getAttribute(prop)];\n format = format.replace(prop, value || '');\n } // clean up year separator comma\n\n\n format = format.replace(/(\\s,)|(,\\s$)/, ''); // squeeze spaces from final string\n\n return strftime(date, format).replace(/\\s+/, ' ').trim();\n} // Private: Format a time according to the `hour`, `minute`, and `second`\n// attribute values.\n//\n// el - The local-time element to format.\n//\n// Returns a time String or null if no time formats are provided.\n\n\nfunction formatTime(el, date) {\n const options = {}; // retrieve format settings from attributes\n\n const hour = el.getAttribute('hour');\n if (hour === 'numeric' || hour === '2-digit') options.hour = hour;\n const minute = el.getAttribute('minute');\n if (minute === 'numeric' || minute === '2-digit') options.minute = minute;\n const second = el.getAttribute('second');\n if (second === 'numeric' || second === '2-digit') options.second = second;\n const tz = el.getAttribute('time-zone-name');\n if (tz === 'short' || tz === 'long') options.timeZoneName = tz; // No time format attributes provided.\n\n if (Object.keys(options).length === 0) {\n return;\n }\n\n let factory = formatters.get(el);\n\n if (!factory) {\n factory = makeFormatter(options);\n formatters.set(el, factory);\n }\n\n const formatter = factory();\n\n if (formatter) {\n // locale-aware formatting of 24 or 12 hour times\n return formatter.format(date);\n } else {\n // fall back to strftime for non-Intl browsers\n const timef = options.second ? '%H:%M:%S' : '%H:%M';\n return strftime(date, timef);\n }\n} // Public: LocalTimeElement constructor.\n//\n// var time = new LocalTimeElement()\n// # => \n//\n\n\nif (!window.customElements.get('local-time')) {\n window.LocalTimeElement = LocalTimeElement;\n window.customElements.define('local-time', LocalTimeElement);\n}\n\nclass RelativeTime {\n constructor(date, locale) {\n this.date = date;\n this.locale = locale;\n }\n\n toString() {\n const ago = this.timeElapsed();\n\n if (ago) {\n return ago;\n } else {\n const ahead = this.timeAhead();\n\n if (ahead) {\n return ahead;\n } else {\n return \"on \".concat(this.formatDate());\n }\n }\n }\n\n timeElapsed() {\n const ms = new Date().getTime() - this.date.getTime();\n const sec = Math.round(ms / 1000);\n const min = Math.round(sec / 60);\n const hr = Math.round(min / 60);\n const day = Math.round(hr / 24);\n\n if (ms >= 0 && day < 30) {\n return this.timeAgoFromMs(ms);\n } else {\n return null;\n }\n }\n\n timeAhead() {\n const ms = this.date.getTime() - new Date().getTime();\n const sec = Math.round(ms / 1000);\n const min = Math.round(sec / 60);\n const hr = Math.round(min / 60);\n const day = Math.round(hr / 24);\n\n if (ms >= 0 && day < 30) {\n return this.timeUntil();\n } else {\n return null;\n }\n }\n\n timeAgo() {\n const ms = new Date().getTime() - this.date.getTime();\n return this.timeAgoFromMs(ms);\n }\n\n timeAgoFromMs(ms) {\n const sec = Math.round(ms / 1000);\n const min = Math.round(sec / 60);\n const hr = Math.round(min / 60);\n const day = Math.round(hr / 24);\n const month = Math.round(day / 30);\n const year = Math.round(month / 12);\n\n if (ms < 0) {\n return formatRelativeTime(this.locale, 0, 'second');\n } else if (sec < 10) {\n return formatRelativeTime(this.locale, 0, 'second');\n } else if (sec < 45) {\n return formatRelativeTime(this.locale, -sec, 'second');\n } else if (sec < 90) {\n return formatRelativeTime(this.locale, -min, 'minute');\n } else if (min < 45) {\n return formatRelativeTime(this.locale, -min, 'minute');\n } else if (min < 90) {\n return formatRelativeTime(this.locale, -hr, 'hour');\n } else if (hr < 24) {\n return formatRelativeTime(this.locale, -hr, 'hour');\n } else if (hr < 36) {\n return formatRelativeTime(this.locale, -day, 'day');\n } else if (day < 30) {\n return formatRelativeTime(this.locale, -day, 'day');\n } else if (month < 18) {\n return formatRelativeTime(this.locale, -month, 'month');\n } else {\n return formatRelativeTime(this.locale, -year, 'year');\n }\n }\n\n microTimeAgo() {\n const ms = new Date().getTime() - this.date.getTime();\n const sec = Math.round(ms / 1000);\n const min = Math.round(sec / 60);\n const hr = Math.round(min / 60);\n const day = Math.round(hr / 24);\n const month = Math.round(day / 30);\n const year = Math.round(month / 12);\n\n if (min < 1) {\n return '1m';\n } else if (min < 60) {\n return \"\".concat(min, \"m\");\n } else if (hr < 24) {\n return \"\".concat(hr, \"h\");\n } else if (day < 365) {\n return \"\".concat(day, \"d\");\n } else {\n return \"\".concat(year, \"y\");\n }\n }\n\n timeUntil() {\n const ms = this.date.getTime() - new Date().getTime();\n return this.timeUntilFromMs(ms);\n }\n\n timeUntilFromMs(ms) {\n const sec = Math.round(ms / 1000);\n const min = Math.round(sec / 60);\n const hr = Math.round(min / 60);\n const day = Math.round(hr / 24);\n const month = Math.round(day / 30);\n const year = Math.round(month / 12);\n\n if (month >= 18) {\n return formatRelativeTime(this.locale, year, 'year');\n } else if (month >= 12) {\n return formatRelativeTime(this.locale, year, 'year');\n } else if (day >= 45) {\n return formatRelativeTime(this.locale, month, 'month');\n } else if (day >= 30) {\n return formatRelativeTime(this.locale, month, 'month');\n } else if (hr >= 36) {\n return formatRelativeTime(this.locale, day, 'day');\n } else if (hr >= 24) {\n return formatRelativeTime(this.locale, day, 'day');\n } else if (min >= 90) {\n return formatRelativeTime(this.locale, hr, 'hour');\n } else if (min >= 45) {\n return formatRelativeTime(this.locale, hr, 'hour');\n } else if (sec >= 90) {\n return formatRelativeTime(this.locale, min, 'minute');\n } else if (sec >= 45) {\n return formatRelativeTime(this.locale, min, 'minute');\n } else if (sec >= 10) {\n return formatRelativeTime(this.locale, sec, 'second');\n } else {\n return formatRelativeTime(this.locale, 0, 'second');\n }\n }\n\n microTimeUntil() {\n const ms = this.date.getTime() - new Date().getTime();\n const sec = Math.round(ms / 1000);\n const min = Math.round(sec / 60);\n const hr = Math.round(min / 60);\n const day = Math.round(hr / 24);\n const month = Math.round(day / 30);\n const year = Math.round(month / 12);\n\n if (day >= 365) {\n return \"\".concat(year, \"y\");\n } else if (hr >= 24) {\n return \"\".concat(day, \"d\");\n } else if (min >= 60) {\n return \"\".concat(hr, \"h\");\n } else if (min > 1) {\n return \"\".concat(min, \"m\");\n } else {\n return '1m';\n }\n }\n\n formatDate() {\n let format = isDayFirst() ? '%e %b' : '%b %e';\n\n if (!isThisYear(this.date)) {\n format += isYearSeparator() ? ', %Y' : ' %Y';\n }\n\n return strftime(this.date, format);\n }\n\n formatTime() {\n const formatter = timeFormatter();\n\n if (formatter) {\n return formatter.format(this.date);\n } else {\n return strftime(this.date, '%l:%M%P');\n }\n }\n\n}\n\nfunction formatRelativeTime(locale, value, unit) {\n const formatter = makeRelativeFormat(locale, {\n numeric: 'auto'\n });\n\n if (formatter) {\n return formatter.format(value, unit);\n } else {\n return formatEnRelativeTime(value, unit);\n }\n} // Simplified \"en\" RelativeTimeFormat.format function\n//\n// Values should roughly match\n// new Intl.RelativeTimeFormat('en', {numeric: 'auto'}).format(value, unit)\n//\n\n\nfunction formatEnRelativeTime(value, unit) {\n if (value === 0) {\n switch (unit) {\n case 'year':\n case 'quarter':\n case 'month':\n case 'week':\n return \"this \".concat(unit);\n\n case 'day':\n return 'today';\n\n case 'hour':\n case 'minute':\n return \"in 0 \".concat(unit, \"s\");\n\n case 'second':\n return 'now';\n }\n } else if (value === 1) {\n switch (unit) {\n case 'year':\n case 'quarter':\n case 'month':\n case 'week':\n return \"next \".concat(unit);\n\n case 'day':\n return 'tomorrow';\n\n case 'hour':\n case 'minute':\n case 'second':\n return \"in 1 \".concat(unit);\n }\n } else if (value === -1) {\n switch (unit) {\n case 'year':\n case 'quarter':\n case 'month':\n case 'week':\n return \"last \".concat(unit);\n\n case 'day':\n return 'yesterday';\n\n case 'hour':\n case 'minute':\n case 'second':\n return \"1 \".concat(unit, \" ago\");\n }\n } else if (value > 1) {\n switch (unit) {\n case 'year':\n case 'quarter':\n case 'month':\n case 'week':\n case 'day':\n case 'hour':\n case 'minute':\n case 'second':\n return \"in \".concat(value, \" \").concat(unit, \"s\");\n }\n } else if (value < -1) {\n switch (unit) {\n case 'year':\n case 'quarter':\n case 'month':\n case 'week':\n case 'day':\n case 'hour':\n case 'minute':\n case 'second':\n return \"\".concat(-value, \" \").concat(unit, \"s ago\");\n }\n }\n\n throw new RangeError(\"Invalid unit argument for format() '\".concat(unit, \"'\"));\n}\n\nconst timeFormatter = makeFormatter({\n hour: 'numeric',\n minute: '2-digit'\n});\n\nclass RelativeTimeElement extends ExtendedTimeElement {\n getFormattedDate() {\n const date = this.date;\n\n if (date) {\n return new RelativeTime(date, localeFromElement(this)).toString();\n }\n }\n\n connectedCallback() {\n nowElements.push(this);\n\n if (!updateNowElementsId) {\n updateNowElements();\n updateNowElementsId = setInterval(updateNowElements, 60 * 1000);\n }\n\n super.connectedCallback();\n }\n\n disconnectedCallback() {\n const ix = nowElements.indexOf(this);\n\n if (ix !== -1) {\n nowElements.splice(ix, 1);\n }\n\n if (!nowElements.length) {\n if (updateNowElementsId) {\n clearInterval(updateNowElementsId);\n updateNowElementsId = null;\n }\n }\n }\n\n} // Internal: Array tracking all elements attached to the document that need\n// to be updated every minute.\n\nconst nowElements = []; // Internal: Timer ID for `updateNowElements` interval.\n\nlet updateNowElementsId; // Internal: Install a timer to refresh all attached relative-time elements every\n// minute.\n\nfunction updateNowElements() {\n let time, i, len;\n\n for (i = 0, len = nowElements.length; i < len; i++) {\n time = nowElements[i];\n time.textContent = time.getFormattedDate() || '';\n }\n} // Public: RelativeTimeElement constructor.\n//\n// var time = new RelativeTimeElement()\n// # => \n//\n\n\nif (!window.customElements.get('relative-time')) {\n window.RelativeTimeElement = RelativeTimeElement;\n window.customElements.define('relative-time', RelativeTimeElement);\n}\n\nclass TimeAgoElement extends RelativeTimeElement {\n getFormattedDate() {\n const format = this.getAttribute('format');\n const date = this.date;\n if (!date) return;\n\n if (format === 'micro') {\n return new RelativeTime(date, localeFromElement(this)).microTimeAgo();\n } else {\n return new RelativeTime(date, localeFromElement(this)).timeAgo();\n }\n }\n\n}\n\nif (!window.customElements.get('time-ago')) {\n window.TimeAgoElement = TimeAgoElement;\n window.customElements.define('time-ago', TimeAgoElement);\n}\n\nclass TimeUntilElement extends RelativeTimeElement {\n getFormattedDate() {\n const format = this.getAttribute('format');\n const date = this.date;\n if (!date) return;\n\n if (format === 'micro') {\n return new RelativeTime(date, localeFromElement(this)).microTimeUntil();\n } else {\n return new RelativeTime(date, localeFromElement(this)).timeUntil();\n }\n }\n\n}\n\nif (!window.customElements.get('time-until')) {\n window.TimeUntilElement = TimeUntilElement;\n window.customElements.define('time-until', TimeUntilElement);\n}\n\nexport { LocalTimeElement, RelativeTimeElement, TimeAgoElement, TimeUntilElement };\n"],"names":["TabContainerElement","HTMLElement","[object Object]","super","this","addEventListener","event","target","getAttribute","closest","tabs","Array","from","querySelectorAll","currentIndex","indexOf","find","tab","matches","code","index","length","selectTab","preventDefault","Element","hasAttribute","setAttribute","tabContainer","panels","selectedTab","selectedPanel","dispatchEvent","CustomEvent","bubbles","cancelable","detail","relatedTarget","panel","hidden","focus","window","customElements","get","define","weekdays","months","pad","num","concat","slice","strftime","time","formatString","day","getDay","date","getDate","month","getMonth","year","getFullYear","hour","getHours","minute","getMinutes","second","getSeconds","replace","_arg","match","toString","String","makeFormatter","options","format","Intl","DateTimeFormat","undefined","e","RangeError","dayFirst","dayFirstFormatter","isDayFirst","formatter","output","Date","yearSeparator","yearFormatter","localeFromElement","el","container","lang","datetimes","WeakMap","ExtendedTimeElement","observedAttributes","title","getFormattedTitle","text","getFormattedDate","textContent","attrName","oldValue","newValue","oldTitle","millis","parse","isNaN","delete","set","currentTitle","titleFormatter","toLocaleString","timeZoneName","formatters","LocalTimeElement","attributeChangedCallback","d","props","weekday","short","long","numeric","2-digit","prop","value","trim","formatDate","tz","Object","keys","factory","formatTime","RelativeTime","locale","ago","timeElapsed","ahead","timeAhead","ms","getTime","sec","Math","round","min","hr","timeAgoFromMs","timeUntil","formatRelativeTime","timeUntilFromMs","getUTCFullYear","isYearSeparator","timeFormatter","unit","RelativeTimeFormat","makeRelativeFormat","formatEnRelativeTime","RelativeTimeElement","nowElements","push","updateNowElementsId","updateNowElements","setInterval","connectedCallback","ix","splice","clearInterval","i","len","TimeAgoElement","microTimeAgo","timeAg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