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,kBACN,UAAW,WAAM,OAAO,8BAA4B,6EACrD,EACD,CACE,KAAM,aACN,KAAM,YACN,UAAW,WAAM,OAAO,yBAAuB,8EAChD,EACD,CACE,KAAM,IACN,UAAWC,GACX,SAAU,CACR,CACE,KAAM,GACN,KAAM,OACN,UAAW,IAAMC,GAAA,WAAO,oBAAkB,0EAC3C,EACD,CACE,KAAM,gBACN,KAAM,eACN,UAAW,IAAMA,GAAA,WAAO,2BAAyB,6EAClD,EACD,CACE,KAAM,YACN,KAAM,WACN,UAAW,IAAMA,GAAA,WAAO,wBAAsB,8FAC/C,EACD,CACE,KAAM,WACN,KAAM,iBACN,UAAW,IAAMA,GAAA,WAAO,6BAA2B,6BACpD,CACF,CACF,CACF,CACH,CAAC,ECzBKC,GAAOC,GAAW,CACtB,OAAQ,GACR,OAAQ,KACR,SAAUC,EACZ,CAAC,EAEKzD,EAAM0D,GAAUC,EAAG,EACzB3D,EAAI,IAAIuD,EAAI,EACZvD,EAAI,IAAIhZ,EAAK,EACbgZ,EAAI,IAAIkD,EAAM,EACdlD,EAAI,IAAI4D,GAAkBC,EAAe,EACzC7D,EAAI,UAAU,eAAgB8D,EAAW,EAEzC9D,EAAI,IACF+D,GACAC,GAAc,CACZ,MAAO,CACL,eAAgB,CAAC,CAAE,MAAA/oB,KAAYgpB,GAAehpB,CAAK,EACnD,mBAAoB,CAAC,CAAE,MAAAA,KAAYipB,GAA+BjpB,CAAK,CACxE,CACL,CAAG,CACH,EAQA,OAAO,OAAS,IAAM,CACpB,OAAO,YAAc+kB,EAAI,MAAM,MAAM,EACrC,OAAO,YAAc,IAAIF,GACvB,OAAO,YACP,OAAO,mBACX,CACA","names":["API","axios","APP_BASE_URL","setHeader","value","key","generateEventParams","events$1","name","search","buildSearchParamsWithLocale","createConversation","params","referrerURL","sendMessage","content","replyTo","sendAttachment","attachment","timestamp","file","formData","getConversation","before","after","updateMessage","id","getAvailableAgents","token","getCampaigns","triggerCampaign","websiteToken","campaignId","customAttributes","getMostReadArticles","slug","locale","endPoints","urlData","state","getters","$state","agent","actions","commit","data","payload","mutations","MutationHelpers.updatePresence","CLEAR_CONVERSATION_ATTRIBUTES","SET_CONVERSATION_ATTRIBUTES","SET_WIDGET_APP_CONFIG","SET_WIDGET_COLOR","SET_COLOR_SCHEME","UPDATE_CONVERSATION_ATTRIBUTES","TOGGLE_WIDGET_OPEN","SET_REFERRER_HOST","SET_BUBBLE_VISIBILITY","showPopoutButton","position","hideMessageBubble","showUnreadMessagesDialog","widgetStyle","darkMode","isWidgetOpen","widgetColor","referrerHost","appConfig","isEmptyObject","obj","msg","IFrameHelper","WOOT_PREFIX","RNHelper","groupBy","array","predicate","acc","_a","buildUrl","endPoint","ContactsAPI","userObject","identifier","customAttribute","SET_CURRENT_USER","parseErrorData","error","updateWidgetAuthToken","widgetAuthToken","_state","dispatch","user","email","avatar_url","identifierHash","phone_number","company_name","city","country_code","description","custom_attributes","social_profiles","SET_USER_ERROR","_","currentUser","contacts","createTemporaryMessage","attachments","getUuid","MESSAGE_TYPE","getSenderName","message","shouldShowAvatar","nextMessage","currentSender","nextSender","isASubmittedFormMessage","groupConversationBySender","conversationsForADate","index","showAvatar","isLastMessage","findUndeliveredMessage","messageInbox","getNonDeletedMessages","messages","item","conversation","conversationGroupedByDate","formatUnixDate","date","userLastSeenAt","chat","createdAt","messageType","isOutGoing","_getters","unreadCount","unreadAgentMessages","maxUnreadCount","createConversationAPI","sendMessageAPI","sendAttachmentAPI","getMessagesAPI","getConversationAPI","toggleTyping","typingStatus","setUserLastSeenAt","lastSeen","sendEmailTranscript","toggleStatus","setCustomAttributes","deleteCustomAttribute","ON_AGENT_MESSAGE_RECEIVED","ON_UNREAD_MESSAGE_CLICK","ON_CAMPAIGN_MESSAGE_CLICK","ON_CONVERSATION_CREATED","emitter","meta","thumbUrl","fileType","tempMessage","formattedMessages","lastMessageId","conversations","missingMessages","updatedConversation","a","b","content_attributes","appGetters","status","type","messagesInbox","messageInConversation","tempId","uiFlags","newMeta","lastMessage","conversationAttributes","conversationLabels$1","label","conversationLabels","events","MessageAPI","messageId","values","authEndPoint","submittedValues","CampaignTimer","__publicField","campaigns","campaign","timeOnPage","store","timerId","campaignTimer","isPatternMatchingWithURL","urlPattern","url","updatedUrlPattern","locationObj","URLPattern","formatCampaigns","_b","filterCampaigns","currentURL","isInBusinessHours","resetCampaignTimers","formattedCampaigns","filteredCampaigns","article","createStore","globalConfig","configMixin","preChatMessage","options","preChatFields","hasEnabledFields","field","exports","requiredArgs","required","args","module","toDate","_index","_interopRequireDefault","require$$0","argument","argStr","isValid","_index2","require$$1","dirtyDate","formatDistance","formatDistanceLocale","count","result","buildFormatLongFn","dirtyOptions","width","format","dateFormats","timeFormats","dateTimeFormats","formatLong","_default","formatRelative","formatRelativeLocale","_date","_baseDate","_options","buildLocalizeFn","dirtyIndex","context","valuesArray","defaultWidth","_defaultWidth","_width","eraValues","quarterValues","monthValues","dayValues","dayPeriodValues","formattingDayPeriodValues","ordinalNumber","dirtyNumber","_dirtyOptions","number","rem100","localize","quarter","buildMatchPatternFn","dirtyString","string","matchResult","matchedString","parseResult","buildMatchFn","matchPattern","parsePatterns","findIndex","pattern","findKey","object","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","match","_index3","require$$2","_index4","require$$3","_index5","require$$4","toInteger","addMilliseconds","dirtyAmount","amount","subMilliseconds","addLeadingZeros","targetLength","sign","output","formatters","signedYear","year","month","dayPeriodEnumValue","numberOfDigits","milliseconds","fractionalSeconds","getUTCDayOfYear","MILLISECONDS_IN_DAY","startOfYearTimestamp","difference","startOfUTCISOWeek","weekStartsOn","day","diff","getUTCISOWeekYear","fourthOfJanuaryOfNextYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","startOfUTCISOWeekYear","fourthOfJanuary","getUTCISOWeek","MILLISECONDS_IN_WEEK","startOfUTCWeek","localeWeekStartsOn","defaultWeekStartsOn","getUTCWeekYear","localeFirstWeekContainsDate","defaultFirstWeekContainsDate","firstWeekContainsDate","firstWeekOfNextYear","firstWeekOfThisYear","startOfUTCWeekYear","firstWeek","getUTCWeek","_index6","require$$5","_index7","require$$6","dayPeriodEnum","era","signedWeekYear","weekYear","twoDigitYear","isoWeekYear","week","isoWeek","dayOfYear","dayOfWeek","localDayOfWeek","isoDayOfWeek","hours","_localize","originalDate","timezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","formatTimezoneShort","offset","dirtyDelimiter","absOffset","minutes","delimiter","dateLongFormatter","timeLongFormatter","dateTimeLongFormatter","datePattern","timePattern","dateTimeFormat","longFormatters","getTimezoneOffsetInMilliseconds","utcDate","protectedTokens","isProtectedDayOfYearToken","isProtectedWeekYearToken","throwProtectedError","protectedDayOfYearTokens","protectedWeekYearTokens","input","_index8","require$$7","_index9","require$$8","_index10","require$$9","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","dirtyFormatStr","formatStr","formatterOptions","substring","firstCharacter","longFormatter","cleanEscapedString","formatter","tzIntlTimeZoneName","length","dtf","getDTF","partsTimeZone","hackyTimeZone","formatted","i","tzNameMatch","timeZone","tzTokenizeDate","getDateTimeFormat","partsOffset","hackyOffset","typeToPos","filled","pos","parsed","dtfCache","testDateFormatted","hourCycleSupported","newDateUTC","fullYear","hour","minute","second","millisecond","tzParseTimezone","MILLISECONDS_IN_HOUR","MILLISECONDS_IN_MINUTE","patterns","timezoneString","isUtcDate","absoluteOffset","validateTimezone","isValidTimezoneIANAString","toUtcDate","calcOffset","fixedOffset","fixOffset","tokens","asUTC","asTS","over","localTS","utcGuess","o2","o3","validIANATimezoneCache","timeZoneString","getTimeZoneOffset","timeZoneOffset","dirtyDelimeter","delimeter","tzPattern","DEFAULT_ADDITIONAL_DIGITS","additionalDigits","dateStrings","splitDateString","parseYearResult","parseYear","restDateString","parseDate","time","parseTime","dateString","parts","timeString","patternYYY","patternYYYYY","yearString","centuryString","validateDate","validateDayOfYearDate","validateWeekDate","dayOfISOWeekYear","validateTime","seconds","fourthOfJanuaryDay","DAYS_IN_MONTH","DAYS_IN_MONTH_LEAP_YEAR","isLeapYearIndex","isLeapYear","tzFormattingTokensRegExp","matches","precededByQuotedSection","replaced","assign","target","dirtyObject","property","cloneObject","utcToZonedTime","offsetMilliseconds","d","resultDate","formatInTimeZone","extendedOptions","getTimezoneOffset","zonedTimeToUtc","utc","dateFnsTz","availabilityMixin","workingHoursEnabled","currentDayWorkingHours","firstWorkingHour","utcOffset","today","currentHours","currentMinutes","workingHour","isAfterStartTime","isTimeAfter","isBeforeEndTime","overrideDates","overrideDate","dayOfTheWeek","routerMixin","loadedEventConfig","getExtraSpaceToScroll","unreadMessageWrap","unreadCloseWrap","readViewWrap","extraHeight","shouldTriggerMessageUpdateEvent","previousChanges","isDarkModeAuto","mode","isDarkMode","getSystemPreference","calculatePrefersDarkMode","systemPreference","calculateThemeClass","light","dark","useDarkMode","useMapGetter","computed","prefersDarkMode","_sfc_main","Spinner","mapGetters","getLocale","mapActions","container","isFixedHeight","localeWithVariation","enabledLanguages","localeWithoutVariation","hasLocaleWithoutVariation","lang","routeName","campaignDetails","expireBy","addHours","messageCount","activeCampaign","shouldSnoozeCampaign","isCampaignReadyToExecute","unreadMessageCount","eventName","e","shouldShowMessageView","shouldShowHomeView","SDK_SET_BUBBLE_VISIBILITY","snoozedTill","_ctx","_createElementBlock","_normalizeClass","$setup","_createVNode","_component_Spinner","$data","_component_router_view","playNewMessageNotificationInWidget","isMessageInActiveConversation","conversationId","activeConversationId","ActionCableConnector","BaseActionCableConnector","app","pubsubToken","CHATWOOT_ON_MESSAGE","BUS_EVENTS","_createElementVNode","_createCommentVNode","nextAvailabilityTime","defaultTimeSlot","workingHours","dayOffset","currentDate","nextDay","nextDate","nextDayOfMonth","nextMonth","nextYear","nextDayOverrideDate","nextDayWorkingHours","openHour","openMinutes","timezone","FluentIcon","getThemeClass","CONVERSATION_STATUS","origin","authToken","popoutChatWindow","_hoisted_2","$options","_openBlock","_hoisted_1","$props","_component_FluentIcon","HeaderActions","anyAgentOnline","_hoisted_3","_withDirectives","_component_HeaderActions","Banner","Branding","ChatHeader","ChatHeaderExpanded","event","_cache","_withKeys","_createBlock","_component_ChatHeaderExpanded","_component_ChatHeader","_component_Banner","_component_Branding","router","createRouter","createWebHashHistory","ViewWithHeader","__vitePreload","i18n","createI18n","i18nMessages","createApp","App","VueDOMPurifyHTML","domPurifyConfig","onClickaway","plugin","defaultConfig","startsWithPlus","isPhoneNumberValidWithDialCode"],"ignoreList":[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77],"sources":["../../../app/javascript/widget/helpers/axios.js","../../../app/javascript/widget/api/events.js","../../../app/javascript/widget/api/endPoints.js","../../../app/javascript/widget/api/agent.js","../../../app/javascript/widget/store/modules/agent.js","../../../app/javascript/widget/store/types.js","../../../app/javascript/widget/store/modules/appConfig.js","../../../app/javascript/widget/helpers/utils.js","../../../app/javascript/widget/api/contacts.js","../../../app/javascript/widget/store/modules/contacts.js","../../../app/javascript/widget/store/modules/conversation/helpers.js","../../../app/javascript/widget/store/modules/conversation/getters.js","../../../app/javascript/widget/api/conversation.js","../../../app/javascript/widget/constants/widgetBusEvents.js","../../../app/javascript/widget/store/modules/conversation/actions.js","../../../app/javascript/widget/store/modules/conversation/mutations.js","../../../app/javascript/widget/store/modules/conversation/index.js","../../../app/javascript/widget/store/modules/conversationAttributes.js","../../../app/javascript/widget/api/conversationLabels.js","../../../app/javascript/widget/store/modules/conversationLabels.js","../../../app/javascript/widget/store/modules/events.js","../../../app/javascript/widget/api/message.js","../../../app/javascript/widget/store/modules/message.js","../../../app/javascript/widget/api/campaign.js","../../../app/javascript/widget/helpers/campaignTimer.js","../../../app/javascript/widget/helpers/campaignHelper.js","../../../app/javascript/widget/store/modules/campaign.js","../../../app/javascript/widget/api/article.js","../../../app/javascript/widget/store/modules/articles.js","../../../app/javascript/widget/store/index.js","../../../app/javascript/widget/mixins/configMixin.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/_lib/requiredArgs/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/toDate/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/isValid/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/locale/en-US/_lib/formatDistance/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/locale/_lib/buildFormatLongFn/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/locale/en-US/_lib/formatLong/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/locale/en-US/_lib/formatRelative/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/locale/_lib/buildLocalizeFn/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/locale/en-US/_lib/localize/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/locale/_lib/buildMatchPatternFn/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/locale/_lib/buildMatchFn/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/locale/en-US/_lib/match/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/locale/en-US/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/_lib/toInteger/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/addMilliseconds/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/subMilliseconds/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/_lib/addLeadingZeros/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/_lib/format/lightFormatters/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/_lib/getUTCDayOfYear/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/_lib/startOfUTCISOWeek/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/_lib/getUTCISOWeekYear/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/_lib/startOfUTCISOWeekYear/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/_lib/getUTCISOWeek/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/_lib/startOfUTCWeek/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/_lib/getUTCWeekYear/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/_lib/startOfUTCWeekYear/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/_lib/getUTCWeek/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/_lib/format/formatters/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/_lib/format/longFormatters/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/_lib/protectedTokens/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/format/index.js","../../../node_modules/.pnpm/date-fns-tz@1.3.8_date-fns@2.21.1/node_modules/date-fns-tz/_lib/tzIntlTimeZoneName/index.js","../../../node_modules/.pnpm/date-fns-tz@1.3.8_date-fns@2.21.1/node_modules/date-fns-tz/_lib/tzTokenizeDate/index.js","../../../node_modules/.pnpm/date-fns-tz@1.3.8_date-fns@2.21.1/node_modules/date-fns-tz/_lib/newDateUTC/index.js","../../../node_modules/.pnpm/date-fns-tz@1.3.8_date-fns@2.21.1/node_modules/date-fns-tz/_lib/tzParseTimezone/index.js","../../../node_modules/.pnpm/date-fns-tz@1.3.8_date-fns@2.21.1/node_modules/date-fns-tz/format/formatters/index.js","../../../node_modules/.pnpm/date-fns-tz@1.3.8_date-fns@2.21.1/node_modules/date-fns-tz/_lib/tzPattern/index.js","../../../node_modules/.pnpm/date-fns-tz@1.3.8_date-fns@2.21.1/node_modules/date-fns-tz/toDate/index.js","../../../node_modules/.pnpm/date-fns-tz@1.3.8_date-fns@2.21.1/node_modules/date-fns-tz/format/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/_lib/assign/index.js","../../../node_modules/.pnpm/date-fns@2.21.1/node_modules/date-fns/_lib/cloneObject/index.js","../../../node_modules/.pnpm/date-fns-tz@1.3.8_date-fns@2.21.1/node_modules/date-fns-tz/utcToZonedTime/index.js","../../../node_modules/.pnpm/date-fns-tz@1.3.8_date-fns@2.21.1/node_modules/date-fns-tz/formatInTimeZone/index.js","../../../node_modules/.pnpm/date-fns-tz@1.3.8_date-fns@2.21.1/node_modules/date-fns-tz/getTimezoneOffset/index.js","../../../node_modules/.pnpm/date-fns-tz@1.3.8_date-fns@2.21.1/node_modules/date-fns-tz/zonedTimeToUtc/index.js","../../../node_modules/.pnpm/date-fns-tz@1.3.8_date-fns@2.21.1/node_modules/date-fns-tz/index.js","../../../app/javascript/widget/mixins/availability.js","../../../app/javascript/widget/mixins/routerMixin.js","../../../app/javascript/widget/helpers/IframeEventHelper.js","../../../app/javascript/widget/composables/useDarkMode.js","../../../app/javascript/widget/App.vue","../../../app/javascript/widget/helpers/WidgetAudioNotificationHelper.js","../../../app/javascript/widget/helpers/actionCable.js","../../../app/javascript/widget/components/Banner.vue","../../../app/javascript/widget/mixins/nextAvailabilityTime.js","../../../app/javascript/widget/components/HeaderActions.vue","../../../app/javascript/widget/components/ChatHeader.vue","../../../app/javascript/widget/components/ChatHeaderExpanded.vue","../../../app/javascript/widget/components/layouts/ViewWithHeader.vue","../../../app/javascript/widget/router.js","../../../app/javascript/entrypoints/widget.js"],"sourcesContent":["import axios from 'axios';\nimport { APP_BASE_URL } from 'widget/helpers/constants';\n\nexport const API = axios.create({\n baseURL: APP_BASE_URL,\n withCredentials: false,\n});\n\nexport const setHeader = (value, key = 'X-Auth-Token') => {\n API.defaults.headers.common[key] = value;\n};\n\nexport const removeHeader = key => {\n delete API.defaults.headers.common[key];\n};\n","import { API } from 'widget/helpers/axios';\nimport { buildSearchParamsWithLocale } from '../helpers/urlParamsHelper';\n\nexport const generateEventParams = () => ({\n initiated_at: {\n timestamp: new Date().toString(),\n },\n referer: window.referrerURL || '',\n});\n\nexport default {\n create(name) {\n const search = buildSearchParamsWithLocale(window.location.search);\n return API.post(`/api/v1/widget/events${search}`, {\n name,\n event_info: generateEventParams(),\n });\n },\n};\n","import { buildSearchParamsWithLocale } from '../helpers/urlParamsHelper';\nimport { generateEventParams } from './events';\n\nconst createConversation = params => {\n const referrerURL = window.referrerURL || '';\n const search = buildSearchParamsWithLocale(window.location.search);\n return {\n url: `/api/v1/widget/conversations${search}`,\n params: {\n contact: {\n name: params.fullName,\n email: params.emailAddress,\n phone_number: params.phoneNumber,\n },\n message: {\n content: params.message,\n timestamp: new Date().toString(),\n referer_url: referrerURL,\n },\n custom_attributes: params.customAttributes,\n },\n };\n};\n\nconst sendMessage = (content, replyTo) => {\n const referrerURL = window.referrerURL || '';\n const search = buildSearchParamsWithLocale(window.location.search);\n return {\n url: `/api/v1/widget/messages${search}`,\n params: {\n message: {\n content,\n reply_to: replyTo,\n timestamp: new Date().toString(),\n referer_url: referrerURL,\n },\n },\n };\n};\n\nconst sendAttachment = ({ attachment, replyTo = null }) => {\n const { referrerURL = '' } = window;\n const timestamp = new Date().toString();\n const { file } = attachment;\n\n const formData = new FormData();\n if (typeof file === 'string') {\n formData.append('message[attachments][]', file);\n } else {\n formData.append('message[attachments][]', file, file.name);\n }\n\n formData.append('message[referer_url]', referrerURL);\n formData.append('message[timestamp]', timestamp);\n if (replyTo !== null) {\n formData.append('message[reply_to]', replyTo);\n }\n return {\n url: `/api/v1/widget/messages${window.location.search}`,\n params: formData,\n };\n};\n\nconst getConversation = ({ before, after }) => ({\n url: `/api/v1/widget/messages${window.location.search}`,\n params: { before, after },\n});\n\nconst updateMessage = id => ({\n url: `/api/v1/widget/messages/${id}${window.location.search}`,\n});\n\nconst getAvailableAgents = token => ({\n url: '/api/v1/widget/inbox_members',\n params: {\n website_token: token,\n },\n});\nconst getCampaigns = token => ({\n url: '/api/v1/widget/campaigns',\n params: {\n website_token: token,\n },\n});\nconst triggerCampaign = ({ websiteToken, campaignId, customAttributes }) => ({\n url: '/api/v1/widget/events',\n data: {\n name: 'campaign.triggered',\n event_info: {\n campaign_id: campaignId,\n custom_attributes: customAttributes,\n ...generateEventParams(),\n },\n },\n params: {\n website_token: websiteToken,\n },\n});\n\nconst getMostReadArticles = (slug, locale) => ({\n url: `/hc/${slug}/${locale}/articles.json`,\n params: {\n page: 1,\n sort: 'views',\n status: 1,\n },\n});\n\nexport default {\n createConversation,\n sendMessage,\n sendAttachment,\n getConversation,\n updateMessage,\n getAvailableAgents,\n getCampaigns,\n triggerCampaign,\n getMostReadArticles,\n};\n","import endPoints from 'widget/api/endPoints';\nimport { API } from 'widget/helpers/axios';\n\nexport const getAvailableAgents = async websiteToken => {\n const urlData = endPoints.getAvailableAgents(websiteToken);\n return API.get(urlData.url, { params: urlData.params });\n};\n","import { getAvailableAgents } from 'widget/api/agent';\nimport * as MutationHelpers from 'shared/helpers/vuex/mutationHelpers';\n\nconst state = {\n records: [],\n uiFlags: {\n isError: false,\n hasFetched: false,\n },\n};\n\nexport const getters = {\n getHasFetched: $state => $state.uiFlags.hasFetched,\n availableAgents: $state =>\n $state.records.filter(agent => agent.availability_status === 'online'),\n};\n\nexport const actions = {\n fetchAvailableAgents: async ({ commit }, websiteToken) => {\n try {\n const { data } = await getAvailableAgents(websiteToken);\n const { payload = [] } = data;\n commit('setAgents', payload);\n commit('setError', false);\n commit('setHasFetched', true);\n } catch (error) {\n commit('setError', true);\n commit('setHasFetched', true);\n }\n },\n updatePresence: async ({ commit }, data) => {\n commit('updatePresence', data);\n },\n};\n\nexport const mutations = {\n setAgents($state, data) {\n $state.records = data;\n },\n updatePresence: MutationHelpers.updatePresence,\n setError($state, value) {\n $state.uiFlags.isError = value;\n },\n setHasFetched($state, value) {\n $state.uiFlags.hasFetched = value;\n },\n};\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations,\n};\n","export const CLEAR_CONVERSATION_ATTRIBUTES = 'CLEAR_CONVERSATION_ATTRIBUTES';\nexport const SET_CONVERSATION_ATTRIBUTES = 'SET_CONVERSATION_ATTRIBUTES';\nexport const SET_WIDGET_APP_CONFIG = 'SET_WIDGET_APP_CONFIG';\nexport const SET_WIDGET_COLOR = 'SET_WIDGET_COLOR';\nexport const SET_COLOR_SCHEME = 'SET_COLOR_SCHEME';\nexport const UPDATE_CONVERSATION_ATTRIBUTES = 'UPDATE_CONVERSATION_ATTRIBUTES';\nexport const TOGGLE_WIDGET_OPEN = 'TOGGLE_WIDGET_OPEN';\nexport const SET_REFERRER_HOST = 'SET_REFERRER_HOST';\nexport const SET_BUBBLE_VISIBILITY = 'SET_BUBBLE_VISIBILITY';\n","import {\n SET_BUBBLE_VISIBILITY,\n SET_COLOR_SCHEME,\n SET_REFERRER_HOST,\n SET_WIDGET_APP_CONFIG,\n SET_WIDGET_COLOR,\n TOGGLE_WIDGET_OPEN,\n} from '../types';\n\nconst state = {\n hideMessageBubble: false,\n isCampaignViewClicked: false,\n showUnreadMessagesDialog: true,\n isWebWidgetTriggered: false,\n isWidgetOpen: false,\n position: 'right',\n referrerHost: '',\n showPopoutButton: false,\n widgetColor: '',\n widgetStyle: 'standard',\n darkMode: 'light',\n};\n\nexport const getters = {\n getAppConfig: $state => $state,\n isRightAligned: $state => $state.position === 'right',\n getHideMessageBubble: $state => $state.hideMessageBubble,\n getIsWidgetOpen: $state => $state.isWidgetOpen,\n getWidgetColor: $state => $state.widgetColor,\n getReferrerHost: $state => $state.referrerHost,\n isWidgetStyleFlat: $state => $state.widgetStyle === 'flat',\n darkMode: $state => $state.darkMode,\n getShowUnreadMessagesDialog: $state => $state.showUnreadMessagesDialog,\n};\n\nexport const actions = {\n setAppConfig(\n { commit },\n {\n showPopoutButton,\n position,\n hideMessageBubble,\n showUnreadMessagesDialog,\n widgetStyle = 'rounded',\n darkMode = 'light',\n }\n ) {\n commit(SET_WIDGET_APP_CONFIG, {\n hideMessageBubble: !!hideMessageBubble,\n position: position || 'right',\n showPopoutButton: !!showPopoutButton,\n showUnreadMessagesDialog: !!showUnreadMessagesDialog,\n widgetStyle,\n darkMode,\n });\n },\n toggleWidgetOpen({ commit }, isWidgetOpen) {\n commit(TOGGLE_WIDGET_OPEN, isWidgetOpen);\n },\n setWidgetColor({ commit }, widgetColor) {\n commit(SET_WIDGET_COLOR, widgetColor);\n },\n setColorScheme({ commit }, darkMode) {\n commit(SET_COLOR_SCHEME, darkMode);\n },\n setReferrerHost({ commit }, referrerHost) {\n commit(SET_REFERRER_HOST, referrerHost);\n },\n setBubbleVisibility({ commit }, hideMessageBubble) {\n commit(SET_BUBBLE_VISIBILITY, hideMessageBubble);\n },\n};\n\nexport const mutations = {\n [SET_WIDGET_APP_CONFIG]($state, data) {\n $state.showPopoutButton = data.showPopoutButton;\n $state.position = data.position;\n $state.hideMessageBubble = data.hideMessageBubble;\n $state.widgetStyle = data.widgetStyle;\n $state.darkMode = data.darkMode;\n $state.locale = data.locale || $state.locale;\n $state.showUnreadMessagesDialog = data.showUnreadMessagesDialog;\n },\n [TOGGLE_WIDGET_OPEN]($state, isWidgetOpen) {\n $state.isWidgetOpen = isWidgetOpen;\n },\n [SET_WIDGET_COLOR]($state, widgetColor) {\n $state.widgetColor = widgetColor;\n },\n [SET_REFERRER_HOST]($state, referrerHost) {\n $state.referrerHost = referrerHost;\n },\n [SET_BUBBLE_VISIBILITY]($state, hideMessageBubble) {\n $state.hideMessageBubble = hideMessageBubble;\n },\n [SET_COLOR_SCHEME]($state, darkMode) {\n $state.darkMode = darkMode;\n },\n};\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations,\n};\n","import { WOOT_PREFIX } from './constants';\n\nexport const isEmptyObject = obj => {\n if (!obj) return true;\n return Object.keys(obj).length === 0 && obj.constructor === Object;\n};\n\nexport const sendMessage = msg => {\n window.parent.postMessage(\n `chatwoot-widget:${JSON.stringify({ ...msg })}`,\n '*'\n );\n};\n\nexport const IFrameHelper = {\n isIFrame: () => window.self !== window.top,\n sendMessage,\n isAValidEvent: e => {\n const isDataAString = typeof e.data === 'string';\n return isDataAString && e.data.indexOf(WOOT_PREFIX) === 0;\n },\n getMessage: e => JSON.parse(e.data.replace(WOOT_PREFIX, '')),\n};\nexport const RNHelper = {\n isRNWebView: () => window.ReactNativeWebView,\n sendMessage: msg => {\n window.ReactNativeWebView.postMessage(\n `chatwoot-widget:${JSON.stringify({ ...msg })}`\n );\n },\n};\n\nexport const groupBy = (array, predicate) => {\n return array.reduce((acc, value) => {\n (acc[predicate(value)] ||= []).push(value);\n return acc;\n }, {});\n};\n","import { API } from 'widget/helpers/axios';\n\nconst buildUrl = endPoint => `/api/v1/${endPoint}${window.location.search}`;\n\nexport default {\n get() {\n return API.get(buildUrl('widget/contact'));\n },\n update(userObject) {\n return API.patch(buildUrl('widget/contact'), userObject);\n },\n setUser(identifier, userObject) {\n return API.patch(buildUrl('widget/contact/set_user'), {\n identifier,\n ...userObject,\n });\n },\n setCustomAttributes(customAttributes = {}) {\n return API.patch(buildUrl('widget/contact'), {\n custom_attributes: customAttributes,\n });\n },\n deleteCustomAttribute(customAttribute) {\n return API.post(buildUrl('widget/contact/destroy_custom_attributes'), {\n custom_attributes: [customAttribute],\n });\n },\n};\n","import { sendMessage } from 'widget/helpers/utils';\nimport ContactsAPI from '../../api/contacts';\nimport { SET_USER_ERROR } from '../../constants/errorTypes';\nimport { setHeader } from '../../helpers/axios';\nconst state = {\n currentUser: {},\n};\n\nconst SET_CURRENT_USER = 'SET_CURRENT_USER';\nconst parseErrorData = error =>\n error && error.response && error.response.data ? error.response.data : error;\nexport const updateWidgetAuthToken = widgetAuthToken => {\n if (widgetAuthToken) {\n setHeader(widgetAuthToken);\n sendMessage({\n event: 'setAuthCookie',\n data: { widgetAuthToken },\n });\n }\n};\n\nexport const getters = {\n getCurrentUser(_state) {\n return _state.currentUser;\n },\n};\n\nexport const actions = {\n get: async ({ commit }) => {\n try {\n const { data } = await ContactsAPI.get();\n commit(SET_CURRENT_USER, data);\n } catch (error) {\n // Ignore error\n }\n },\n update: async ({ dispatch }, { user }) => {\n try {\n await ContactsAPI.update(user);\n dispatch('get');\n } catch (error) {\n // Ignore error\n }\n },\n setUser: async ({ dispatch }, { identifier, user: userObject }) => {\n try {\n const {\n email,\n name,\n avatar_url,\n identifier_hash: identifierHash,\n phone_number,\n company_name,\n city,\n country_code,\n description,\n custom_attributes,\n social_profiles,\n } = userObject;\n const user = {\n email,\n name,\n avatar_url,\n identifier_hash: identifierHash,\n phone_number,\n additional_attributes: {\n company_name,\n city,\n description,\n country_code,\n social_profiles,\n },\n custom_attributes,\n };\n const {\n data: { widget_auth_token: widgetAuthToken },\n } = await ContactsAPI.setUser(identifier, user);\n updateWidgetAuthToken(widgetAuthToken);\n dispatch('get');\n if (identifierHash || widgetAuthToken) {\n dispatch('conversation/clearConversations', {}, { root: true });\n dispatch('conversation/fetchOldConversations', {}, { root: true });\n dispatch('conversationAttributes/getAttributes', {}, { root: true });\n }\n } catch (error) {\n const data = parseErrorData(error);\n sendMessage({ event: 'error', errorType: SET_USER_ERROR, data });\n }\n },\n setCustomAttributes: async (_, customAttributes = {}) => {\n try {\n await ContactsAPI.setCustomAttributes(customAttributes);\n } catch (error) {\n // Ignore error\n }\n },\n deleteCustomAttribute: async (_, customAttribute) => {\n try {\n await ContactsAPI.deleteCustomAttribute(customAttribute);\n } catch (error) {\n // Ignore error\n }\n },\n};\n\nexport const mutations = {\n [SET_CURRENT_USER]($state, user) {\n const { currentUser } = $state;\n $state.currentUser = { ...currentUser, ...user };\n },\n};\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations,\n};\n","import { MESSAGE_TYPE } from 'widget/helpers/constants';\nimport { isASubmittedFormMessage } from 'shared/helpers/MessageTypeHelper';\n\nimport getUuid from '../../../helpers/uuid';\nexport const createTemporaryMessage = ({ attachments, content, replyTo }) => {\n const timestamp = new Date().getTime() / 1000;\n return {\n id: getUuid(),\n content,\n attachments,\n status: 'in_progress',\n replyTo,\n created_at: timestamp,\n message_type: MESSAGE_TYPE.INCOMING,\n };\n};\n\nconst getSenderName = message => (message.sender ? message.sender.name : '');\n\nconst shouldShowAvatar = (message, nextMessage) => {\n const currentSender = getSenderName(message);\n const nextSender = getSenderName(nextMessage);\n\n return (\n currentSender !== nextSender ||\n message.message_type !== nextMessage.message_type ||\n isASubmittedFormMessage(nextMessage)\n );\n};\n\nexport const groupConversationBySender = conversationsForADate =>\n conversationsForADate.map((message, index) => {\n let showAvatar;\n const isLastMessage = index === conversationsForADate.length - 1;\n if (isASubmittedFormMessage(message)) {\n showAvatar = false;\n } else if (isLastMessage) {\n showAvatar = true;\n } else {\n const nextMessage = conversationsForADate[index + 1];\n showAvatar = shouldShowAvatar(message, nextMessage);\n }\n return { showAvatar, ...message };\n });\n\nexport const findUndeliveredMessage = (messageInbox, { content }) =>\n Object.values(messageInbox).filter(\n message => message.content === content && message.status === 'in_progress'\n );\n\nexport const getNonDeletedMessages = ({ messages }) => {\n return messages.filter(\n item => !(item.content_attributes && item.content_attributes.deleted)\n );\n};\n","import { MESSAGE_TYPE } from 'widget/helpers/constants';\nimport { groupBy } from 'widget/helpers/utils';\nimport { groupConversationBySender } from './helpers';\nimport { formatUnixDate } from 'shared/helpers/DateHelper';\n\nexport const getters = {\n getAllMessagesLoaded: _state => _state.uiFlags.allMessagesLoaded,\n getIsCreating: _state => _state.uiFlags.isCreating,\n getIsAgentTyping: _state => _state.uiFlags.isAgentTyping,\n getConversation: _state => _state.conversations,\n getConversationSize: _state => Object.keys(_state.conversations).length,\n getEarliestMessage: _state => {\n const conversation = Object.values(_state.conversations);\n if (conversation.length) {\n return conversation[0];\n }\n return {};\n },\n getLastMessage: _state => {\n const conversation = Object.values(_state.conversations);\n if (conversation.length) {\n return conversation[conversation.length - 1];\n }\n return {};\n },\n getGroupedConversation: _state => {\n const conversationGroupedByDate = groupBy(\n Object.values(_state.conversations),\n message => formatUnixDate(message.created_at)\n );\n return Object.keys(conversationGroupedByDate).map(date => ({\n date,\n messages: groupConversationBySender(conversationGroupedByDate[date]),\n }));\n },\n getIsFetchingList: _state => _state.uiFlags.isFetchingList,\n getMessageCount: _state => {\n return Object.values(_state.conversations).length;\n },\n getUnreadMessageCount: _state => {\n const { userLastSeenAt } = _state.meta;\n return Object.values(_state.conversations).filter(chat => {\n const { created_at: createdAt, message_type: messageType } = chat;\n const isOutGoing = messageType === MESSAGE_TYPE.OUTGOING;\n const hasNotSeen = userLastSeenAt\n ? createdAt * 1000 > userLastSeenAt * 1000\n : true;\n return hasNotSeen && isOutGoing;\n }).length;\n },\n getUnreadTextMessages: (_state, _getters) => {\n const unreadCount = _getters.getUnreadMessageCount;\n const allMessages = [...Object.values(_state.conversations)];\n const unreadAgentMessages = allMessages.filter(message => {\n const { message_type: messageType } = message;\n return messageType === MESSAGE_TYPE.OUTGOING;\n });\n const maxUnreadCount = Math.min(unreadCount, 3);\n return unreadAgentMessages.splice(-maxUnreadCount);\n },\n};\n","import endPoints from 'widget/api/endPoints';\nimport { API } from 'widget/helpers/axios';\n\nconst createConversationAPI = async content => {\n const urlData = endPoints.createConversation(content);\n return API.post(urlData.url, urlData.params);\n};\n\nconst sendMessageAPI = async (content, replyTo = null) => {\n const urlData = endPoints.sendMessage(content, replyTo);\n return API.post(urlData.url, urlData.params);\n};\n\nconst sendAttachmentAPI = async (attachment, replyTo = null) => {\n const urlData = endPoints.sendAttachment(attachment, replyTo);\n return API.post(urlData.url, urlData.params);\n};\n\nconst getMessagesAPI = async ({ before, after }) => {\n const urlData = endPoints.getConversation({ before, after });\n return API.get(urlData.url, { params: urlData.params });\n};\n\nconst getConversationAPI = async () => {\n return API.get(`/api/v1/widget/conversations${window.location.search}`);\n};\n\nconst toggleTyping = async ({ typingStatus }) => {\n return API.post(\n `/api/v1/widget/conversations/toggle_typing${window.location.search}`,\n { typing_status: typingStatus }\n );\n};\n\nconst setUserLastSeenAt = async ({ lastSeen }) => {\n return API.post(\n `/api/v1/widget/conversations/update_last_seen${window.location.search}`,\n { contact_last_seen_at: lastSeen }\n );\n};\nconst sendEmailTranscript = async () => {\n return API.post(\n `/api/v1/widget/conversations/transcript${window.location.search}`\n );\n};\nconst toggleStatus = async () => {\n return API.get(\n `/api/v1/widget/conversations/toggle_status${window.location.search}`\n );\n};\n\nconst setCustomAttributes = async customAttributes => {\n return API.post(\n `/api/v1/widget/conversations/set_custom_attributes${window.location.search}`,\n {\n custom_attributes: customAttributes,\n }\n );\n};\n\nconst deleteCustomAttribute = async customAttribute => {\n return API.post(\n `/api/v1/widget/conversations/destroy_custom_attributes${window.location.search}`,\n {\n custom_attribute: [customAttribute],\n }\n );\n};\n\nexport {\n createConversationAPI,\n sendMessageAPI,\n getConversationAPI,\n getMessagesAPI,\n sendAttachmentAPI,\n toggleTyping,\n setUserLastSeenAt,\n sendEmailTranscript,\n toggleStatus,\n setCustomAttributes,\n deleteCustomAttribute,\n};\n","export const ON_AGENT_MESSAGE_RECEIVED = 'ON_AGENT_MESSAGE_RECEIVED';\nexport const ON_UNREAD_MESSAGE_CLICK = 'ON_UNREAD_MESSAGE_CLICK';\nexport const ON_CAMPAIGN_MESSAGE_CLICK = 'ON_CAMPAIGN_MESSAGE_CLICK';\nexport const ON_CONVERSATION_CREATED = 'ON_CONVERSATION_CREATED';\n","import {\n createConversationAPI,\n sendMessageAPI,\n getMessagesAPI,\n sendAttachmentAPI,\n toggleTyping,\n setUserLastSeenAt,\n toggleStatus,\n setCustomAttributes,\n deleteCustomAttribute,\n} from 'widget/api/conversation';\n\nimport { ON_CONVERSATION_CREATED } from 'widget/constants/widgetBusEvents';\nimport { createTemporaryMessage, getNonDeletedMessages } from './helpers';\nimport { emitter } from 'shared/helpers/mitt';\nexport const actions = {\n createConversation: async ({ commit, dispatch }, params) => {\n commit('setConversationUIFlag', { isCreating: true });\n try {\n const { data } = await createConversationAPI(params);\n const { messages } = data;\n const [message = {}] = messages;\n commit('pushMessageToConversation', message);\n dispatch('conversationAttributes/getAttributes', {}, { root: true });\n // Emit event to notify that conversation is created and show the chat screen\n emitter.emit(ON_CONVERSATION_CREATED);\n } catch (error) {\n // Ignore error\n } finally {\n commit('setConversationUIFlag', { isCreating: false });\n }\n },\n sendMessage: async ({ dispatch }, params) => {\n const { content, replyTo } = params;\n const message = createTemporaryMessage({ content, replyTo });\n dispatch('sendMessageWithData', message);\n },\n sendMessageWithData: async ({ commit }, message) => {\n const { id, content, replyTo, meta = {} } = message;\n\n commit('pushMessageToConversation', message);\n commit('updateMessageMeta', { id, meta: { ...meta, error: '' } });\n try {\n const { data } = await sendMessageAPI(content, replyTo);\n\n // [VITE] Don't delete this manually, since `pushMessageToConversation` does the replacement for us anyway\n // commit('deleteMessage', message.id);\n commit('pushMessageToConversation', { ...data, status: 'sent' });\n } catch (error) {\n commit('pushMessageToConversation', { ...message, status: 'failed' });\n commit('updateMessageMeta', {\n id,\n meta: { ...meta, error: '' },\n });\n }\n },\n\n setLastMessageId: async ({ commit }) => {\n commit('setLastMessageId');\n },\n\n sendAttachment: async ({ commit }, params) => {\n const {\n attachment: { thumbUrl, fileType },\n meta = {},\n } = params;\n const attachment = {\n thumb_url: thumbUrl,\n data_url: thumbUrl,\n file_type: fileType,\n status: 'in_progress',\n };\n const tempMessage = createTemporaryMessage({\n attachments: [attachment],\n replyTo: params.replyTo,\n });\n commit('pushMessageToConversation', tempMessage);\n try {\n const { data } = await sendAttachmentAPI(params);\n commit('updateAttachmentMessageStatus', {\n message: data,\n tempId: tempMessage.id,\n });\n commit('pushMessageToConversation', { ...data, status: 'sent' });\n } catch (error) {\n commit('pushMessageToConversation', { ...tempMessage, status: 'failed' });\n commit('updateMessageMeta', {\n id: tempMessage.id,\n meta: { ...meta, error: '' },\n });\n // Show error\n }\n },\n fetchOldConversations: async ({ commit }, { before } = {}) => {\n try {\n commit('setConversationListLoading', true);\n const {\n data: { payload, meta },\n } = await getMessagesAPI({ before });\n const { contact_last_seen_at: lastSeen } = meta;\n const formattedMessages = getNonDeletedMessages({ messages: payload });\n commit('conversation/setMetaUserLastSeenAt', lastSeen, { root: true });\n commit('setMessagesInConversation', formattedMessages);\n commit('setConversationListLoading', false);\n } catch (error) {\n commit('setConversationListLoading', false);\n }\n },\n\n syncLatestMessages: async ({ state, commit }) => {\n try {\n const { lastMessageId, conversations } = state;\n\n const {\n data: { payload, meta },\n } = await getMessagesAPI({ after: lastMessageId });\n\n const { contact_last_seen_at: lastSeen } = meta;\n const formattedMessages = getNonDeletedMessages({ messages: payload });\n const missingMessages = formattedMessages.filter(\n message => conversations?.[message.id] === undefined\n );\n if (!missingMessages.length) return;\n missingMessages.forEach(message => {\n conversations[message.id] = message;\n });\n // Sort conversation messages by created_at\n const updatedConversation = Object.fromEntries(\n Object.entries(conversations).sort(\n (a, b) => a[1].created_at - b[1].created_at\n )\n );\n commit('conversation/setMetaUserLastSeenAt', lastSeen, { root: true });\n commit('setMissingMessagesInConversation', updatedConversation);\n } catch (error) {\n // IgnoreError\n }\n },\n\n clearConversations: ({ commit }) => {\n commit('clearConversations');\n },\n\n addOrUpdateMessage: async ({ commit }, data) => {\n const { id, content_attributes } = data;\n if (content_attributes && content_attributes.deleted) {\n commit('deleteMessage', id);\n return;\n }\n commit('pushMessageToConversation', data);\n },\n\n toggleAgentTyping({ commit }, data) {\n commit('toggleAgentTypingStatus', data);\n },\n\n toggleUserTyping: async (_, data) => {\n try {\n await toggleTyping(data);\n } catch (error) {\n // IgnoreError\n }\n },\n\n setUserLastSeen: async ({ commit, getters: appGetters }) => {\n if (!appGetters.getConversationSize) {\n return;\n }\n\n const lastSeen = Date.now() / 1000;\n try {\n commit('setMetaUserLastSeenAt', lastSeen);\n await setUserLastSeenAt({ lastSeen });\n } catch (error) {\n // IgnoreError\n }\n },\n\n resolveConversation: async () => {\n await toggleStatus();\n },\n\n setCustomAttributes: async (_, customAttributes = {}) => {\n try {\n await setCustomAttributes(customAttributes);\n } catch (error) {\n // IgnoreError\n }\n },\n\n deleteCustomAttribute: async (_, customAttribute) => {\n try {\n await deleteCustomAttribute(customAttribute);\n } catch (error) {\n // IgnoreError\n }\n },\n};\n","import { MESSAGE_TYPE } from 'widget/helpers/constants';\nimport { findUndeliveredMessage } from './helpers';\n\nexport const mutations = {\n clearConversations($state) {\n $state.conversations = {};\n },\n pushMessageToConversation($state, message) {\n const { id, status, message_type: type } = message;\n\n const messagesInbox = $state.conversations;\n const isMessageIncoming = type === MESSAGE_TYPE.INCOMING;\n const isTemporaryMessage = status === 'in_progress';\n\n if (!isMessageIncoming || isTemporaryMessage) {\n messagesInbox[id] = message;\n return;\n }\n\n const [messageInConversation] = findUndeliveredMessage(\n messagesInbox,\n message\n );\n if (!messageInConversation) {\n messagesInbox[id] = message;\n } else {\n // [VITE] instead of leaving undefined behind, we remove it completely\n // remove the temporary message and replace it with the new message\n // messagesInbox[messageInConversation.id] = undefined;\n delete messagesInbox[messageInConversation.id];\n messagesInbox[id] = message;\n }\n },\n\n updateAttachmentMessageStatus($state, { message, tempId }) {\n const { id } = message;\n const messagesInbox = $state.conversations;\n\n const messageInConversation = messagesInbox[tempId];\n\n if (messageInConversation) {\n // [VITE] instead of leaving undefined behind, we remove it completely\n // remove the temporary message and replace it with the new message\n // messagesInbox[tempId] = undefined;\n delete messagesInbox[tempId];\n messagesInbox[id] = { ...message };\n }\n },\n\n setConversationUIFlag($state, uiFlags) {\n $state.uiFlags = {\n ...$state.uiFlags,\n ...uiFlags,\n };\n },\n\n setConversationListLoading($state, status) {\n $state.uiFlags.isFetchingList = status;\n },\n\n setMessagesInConversation($state, payload) {\n if (!payload.length) {\n $state.uiFlags.allMessagesLoaded = true;\n return;\n }\n\n payload.forEach(message => {\n $state.conversations[message.id] = message;\n });\n },\n\n setMissingMessagesInConversation($state, payload) {\n $state.conversation = payload;\n },\n\n updateMessage($state, { id, content_attributes }) {\n $state.conversations[id] = {\n ...$state.conversations[id],\n content_attributes: {\n ...($state.conversations[id].content_attributes || {}),\n ...content_attributes,\n },\n };\n },\n\n updateMessageMeta($state, { id, meta }) {\n const message = $state.conversations[id];\n if (!message) return;\n\n const newMeta = message.meta ? { ...message.meta, ...meta } : { ...meta };\n message.meta = { ...newMeta };\n },\n\n deleteMessage($state, id) {\n delete $state.conversations[id];\n // [VITE] In Vue 3 proxy objects, we can't delete properties by setting them to undefined\n // Instead, we have to use the delete operator\n // $state.conversations[id] = undefined;\n },\n\n toggleAgentTypingStatus($state, { status }) {\n $state.uiFlags.isAgentTyping = status === 'on';\n },\n\n setMetaUserLastSeenAt($state, lastSeen) {\n $state.meta.userLastSeenAt = lastSeen;\n },\n\n setLastMessageId($state) {\n const { conversations } = $state;\n const lastMessage = Object.values(conversations).pop();\n if (!lastMessage) return;\n const { id } = lastMessage;\n $state.lastMessageId = id;\n },\n};\n","import { getters } from './getters';\nimport { actions } from './actions';\nimport { mutations } from './mutations';\n\nconst state = {\n conversations: {},\n meta: {\n userLastSeenAt: undefined,\n },\n uiFlags: {\n allMessagesLoaded: false,\n isFetchingList: false,\n isAgentTyping: false,\n isCreating: false,\n },\n lastMessageId: null,\n};\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations,\n};\n","import {\n SET_CONVERSATION_ATTRIBUTES,\n UPDATE_CONVERSATION_ATTRIBUTES,\n CLEAR_CONVERSATION_ATTRIBUTES,\n} from '../types';\nimport { getConversationAPI } from '../../api/conversation';\n\nconst state = {\n id: '',\n status: '',\n};\n\nexport const getters = {\n getConversationParams: $state => $state,\n};\n\nexport const actions = {\n getAttributes: async ({ commit }) => {\n try {\n const { data } = await getConversationAPI();\n const { contact_last_seen_at: lastSeen } = data;\n commit(SET_CONVERSATION_ATTRIBUTES, data);\n commit('conversation/setMetaUserLastSeenAt', lastSeen, { root: true });\n } catch (error) {\n // Ignore error\n }\n },\n update({ commit }, data) {\n commit(UPDATE_CONVERSATION_ATTRIBUTES, data);\n },\n clearConversationAttributes: ({ commit }) => {\n commit('CLEAR_CONVERSATION_ATTRIBUTES');\n },\n};\n\nexport const mutations = {\n [SET_CONVERSATION_ATTRIBUTES]($state, data) {\n $state.id = data.id;\n $state.status = data.status;\n },\n [UPDATE_CONVERSATION_ATTRIBUTES]($state, data) {\n if (data.id === $state.id) {\n $state.id = data.id;\n $state.status = data.status;\n }\n },\n [CLEAR_CONVERSATION_ATTRIBUTES]($state) {\n $state.id = '';\n $state.status = '';\n },\n};\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations,\n};\n","import { API } from 'widget/helpers/axios';\n\nconst buildUrl = endPoint => `/api/v1/${endPoint}${window.location.search}`;\n\nexport default {\n create(label) {\n return API.post(buildUrl('widget/labels'), { label });\n },\n destroy(label) {\n return API.delete(buildUrl(`widget/labels/${label}`));\n },\n};\n","import conversationLabels from '../../api/conversationLabels';\n\nconst state = {};\n\nexport const getters = {};\n\nexport const actions = {\n create: async (_, label) => {\n try {\n await conversationLabels.create(label);\n } catch (error) {\n // Ignore error\n }\n },\n destroy: async (_, label) => {\n try {\n await conversationLabels.destroy(label);\n } catch (error) {\n // Ignore error\n }\n },\n};\n\nexport const mutations = {};\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations,\n};\n","import events from 'widget/api/events';\n\nconst actions = {\n create: async (_, { name }) => {\n try {\n await events.create(name);\n } catch (error) {\n // Ignore error\n }\n },\n};\n\nexport default {\n namespaced: true,\n state: {},\n getters: {},\n actions,\n mutations: {},\n};\n","import authEndPoint from 'widget/api/endPoints';\nimport { API } from 'widget/helpers/axios';\n\nexport default {\n update: ({ messageId, email, values }) => {\n const urlData = authEndPoint.updateMessage(messageId);\n return API.patch(urlData.url, {\n contact: { email },\n message: { submitted_values: values },\n });\n },\n};\n","import MessageAPI from '../../api/message';\n\nconst state = {\n uiFlags: {\n isUpdating: false,\n },\n};\n\nexport const getters = {\n getUIFlags: $state => $state.uiFlags,\n};\n\nexport const actions = {\n update: async (\n { commit, dispatch, getters: { getUIFlags: uiFlags } },\n { email, messageId, submittedValues }\n ) => {\n if (uiFlags.isUpdating) {\n return;\n }\n commit('toggleUpdateStatus', true);\n try {\n await MessageAPI.update({\n email,\n messageId,\n values: submittedValues,\n });\n commit(\n 'conversation/updateMessage',\n {\n id: messageId,\n content_attributes: {\n submitted_email: email,\n submitted_values: email ? null : submittedValues,\n },\n },\n { root: true }\n );\n dispatch('contacts/get', {}, { root: true });\n } catch (error) {\n // Ignore error\n }\n commit('toggleUpdateStatus', false);\n },\n};\n\nexport const mutations = {\n toggleUpdateStatus($state, status) {\n $state.uiFlags.isUpdating = status;\n },\n};\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations,\n};\n","import endPoints from 'widget/api/endPoints';\nimport { API } from 'widget/helpers/axios';\n\nconst getCampaigns = async websiteToken => {\n const urlData = endPoints.getCampaigns(websiteToken);\n return API.get(urlData.url, { params: urlData.params });\n};\n\nconst triggerCampaign = async ({\n campaignId,\n websiteToken,\n customAttributes,\n}) => {\n const urlData = endPoints.triggerCampaign({\n websiteToken,\n campaignId,\n customAttributes,\n });\n await API.post(\n urlData.url,\n { ...urlData.data },\n {\n params: urlData.params,\n }\n );\n};\nexport { getCampaigns, triggerCampaign };\n","import store from '../store';\nclass CampaignTimer {\n constructor() {\n this.campaignTimers = [];\n }\n\n initTimers = ({ campaigns }, websiteToken) => {\n this.clearTimers();\n campaigns.forEach(campaign => {\n const { timeOnPage, id: campaignId } = campaign;\n this.campaignTimers[campaignId] = setTimeout(() => {\n store.dispatch('campaign/startCampaign', { campaignId, websiteToken });\n }, timeOnPage * 1000);\n });\n };\n\n clearTimers = () => {\n this.campaignTimers.forEach(timerId => {\n clearTimeout(timerId);\n this.campaignTimers[timerId] = null;\n });\n };\n}\nexport default new CampaignTimer();\n","import { URLPattern } from 'urlpattern-polyfill';\n\nexport const isPatternMatchingWithURL = (urlPattern, url) => {\n let updatedUrlPattern = urlPattern;\n const locationObj = new URL(url);\n\n if (updatedUrlPattern.endsWith('/')) {\n updatedUrlPattern = updatedUrlPattern.slice(0, -1) + '*\\\\?*\\\\#*';\n }\n\n if (locationObj.pathname.endsWith('/')) {\n locationObj.pathname = locationObj.pathname.slice(0, -1);\n }\n\n const pattern = new URLPattern(updatedUrlPattern);\n return pattern.test(locationObj.toString());\n};\n\n// Format all campaigns\nexport const formatCampaigns = ({ campaigns }) => {\n return campaigns.map(item => {\n return {\n id: item.id,\n triggerOnlyDuringBusinessHours:\n item.trigger_only_during_business_hours || false,\n timeOnPage: item?.trigger_rules?.time_on_page,\n url: item?.trigger_rules?.url,\n };\n });\n};\n\n// Filter all campaigns based on current URL and business availability time\nexport const filterCampaigns = ({\n campaigns,\n currentURL,\n isInBusinessHours,\n}) => {\n return campaigns.filter(campaign => {\n if (!isPatternMatchingWithURL(campaign.url, currentURL)) {\n return false;\n }\n if (campaign.triggerOnlyDuringBusinessHours) {\n return isInBusinessHours;\n }\n return true;\n });\n};\n","import { getCampaigns, triggerCampaign } from 'widget/api/campaign';\nimport campaignTimer from 'widget/helpers/campaignTimer';\nimport {\n formatCampaigns,\n filterCampaigns,\n} from 'widget/helpers/campaignHelper';\nconst state = {\n records: [],\n uiFlags: {\n isError: false,\n },\n activeCampaign: {},\n};\n\nconst resetCampaignTimers = (\n campaigns,\n currentURL,\n websiteToken,\n isInBusinessHours\n) => {\n const formattedCampaigns = formatCampaigns({ campaigns });\n // Find all campaigns that matches the current URL\n const filteredCampaigns = filterCampaigns({\n campaigns: formattedCampaigns,\n currentURL,\n isInBusinessHours,\n });\n campaignTimer.initTimers({ campaigns: filteredCampaigns }, websiteToken);\n};\n\nexport const getters = {\n getCampaigns: $state => $state.records,\n getActiveCampaign: $state => $state.activeCampaign,\n};\n\nexport const actions = {\n fetchCampaigns: async (\n { commit },\n { websiteToken, currentURL, isInBusinessHours }\n ) => {\n try {\n const { data: campaigns } = await getCampaigns(websiteToken);\n commit('setCampaigns', campaigns);\n commit('setError', false);\n resetCampaignTimers(\n campaigns,\n currentURL,\n websiteToken,\n isInBusinessHours\n );\n } catch (error) {\n commit('setError', true);\n }\n },\n initCampaigns: async (\n { getters: { getCampaigns: campaigns }, dispatch },\n { currentURL, websiteToken, isInBusinessHours }\n ) => {\n if (!campaigns.length) {\n dispatch('fetchCampaigns', {\n websiteToken,\n currentURL,\n isInBusinessHours,\n });\n } else {\n resetCampaignTimers(\n campaigns,\n currentURL,\n websiteToken,\n isInBusinessHours\n );\n }\n },\n startCampaign: async (\n {\n commit,\n rootState: {\n appConfig: { isWidgetOpen },\n },\n },\n { websiteToken, campaignId }\n ) => {\n // Disable campaign execution if widget is opened\n if (!isWidgetOpen) {\n const { data: campaigns } = await getCampaigns(websiteToken);\n // Check campaign is disabled or not\n const campaign = campaigns.find(item => item.id === campaignId);\n if (campaign) {\n commit('setActiveCampaign', campaign);\n }\n }\n },\n\n executeCampaign: async (\n { commit },\n { campaignId, websiteToken, customAttributes }\n ) => {\n try {\n commit(\n 'conversation/setConversationUIFlag',\n { isCreating: true },\n { root: true }\n );\n await triggerCampaign({ campaignId, websiteToken, customAttributes });\n commit('setCampaignExecuted', true);\n commit('setActiveCampaign', {});\n } catch (error) {\n commit('setError', true);\n } finally {\n commit(\n 'conversation/setConversationUIFlag',\n { isCreating: false },\n { root: true }\n );\n }\n },\n resetCampaign: async ({ commit }) => {\n try {\n commit('setCampaignExecuted', false);\n commit('setActiveCampaign', {});\n } catch (error) {\n commit('setError', true);\n }\n },\n};\n\nexport const mutations = {\n setCampaigns($state, data) {\n $state.records = data;\n },\n setActiveCampaign($state, data) {\n $state.activeCampaign = data;\n },\n setError($state, value) {\n $state.uiFlags.isError = value;\n },\n setHasFetched($state, value) {\n $state.uiFlags.hasFetched = value;\n },\n setCampaignExecuted($state, data) {\n $state.campaignHasExecuted = data;\n },\n};\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations,\n};\n","import endPoints from 'widget/api/endPoints';\nimport { API } from 'widget/helpers/axios';\n\nexport const getMostReadArticles = async (slug, locale) => {\n const urlData = endPoints.getMostReadArticles(slug, locale);\n return API.get(urlData.url, { params: urlData.params });\n};\n","import { getMostReadArticles } from 'widget/api/article';\n\nconst state = {\n records: [],\n uiFlags: {\n isError: false,\n hasFetched: false,\n isFetching: false,\n },\n};\n\nexport const getters = {\n uiFlags: $state => $state.uiFlags,\n popularArticles: $state => $state.records,\n};\n\nexport const actions = {\n fetch: async ({ commit }, { slug, locale }) => {\n commit('setIsFetching', true);\n commit('setError', false);\n\n try {\n const { data } = await getMostReadArticles(slug, locale);\n const { payload = [] } = data;\n\n if (payload.length) {\n commit('setArticles', payload);\n }\n } catch (error) {\n commit('setError', true);\n } finally {\n commit('setIsFetching', false);\n }\n },\n};\n\nexport const mutations = {\n setArticles($state, data) {\n $state.records = data;\n },\n setError($state, value) {\n $state.uiFlags.isError = value;\n },\n setIsFetching($state, value) {\n $state.uiFlags.isFetching = value;\n },\n};\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations,\n};\n","import { createStore } from 'vuex';\n\nimport agent from 'widget/store/modules/agent';\nimport appConfig from 'widget/store/modules/appConfig';\nimport contacts from 'widget/store/modules/contacts';\nimport conversation from 'widget/store/modules/conversation';\nimport conversationAttributes from 'widget/store/modules/conversationAttributes';\nimport conversationLabels from 'widget/store/modules/conversationLabels';\nimport events from 'widget/store/modules/events';\nimport globalConfig from 'shared/store/globalConfig';\nimport message from 'widget/store/modules/message';\nimport campaign from 'widget/store/modules/campaign';\nimport article from 'widget/store/modules/articles';\n\nexport default createStore({\n modules: {\n agent,\n appConfig,\n contacts,\n conversation,\n conversationAttributes,\n conversationLabels,\n events,\n globalConfig,\n message,\n campaign,\n article,\n },\n});\n","export default {\n computed: {\n useInboxAvatarForBot() {\n return this.channelConfig.enabledFeatures.includes(\n 'use_inbox_avatar_for_bot'\n );\n },\n hasAConnectedAgentBot() {\n return !!window.chatwootWebChannel.hasAConnectedAgentBot;\n },\n inboxAvatarUrl() {\n return window.chatwootWebChannel.avatarUrl;\n },\n channelConfig() {\n return window.chatwootWebChannel;\n },\n hasEmojiPickerEnabled() {\n return this.channelConfig.enabledFeatures.includes('emoji_picker');\n },\n hasAttachmentsEnabled() {\n return this.channelConfig.enabledFeatures.includes('attachments');\n },\n hasEndConversationEnabled() {\n return this.channelConfig.enabledFeatures.includes('end_conversation');\n },\n preChatFormEnabled() {\n return window.chatwootWebChannel.preChatFormEnabled;\n },\n preChatFormOptions() {\n let preChatMessage = '';\n const options = window.chatwootWebChannel.preChatFormOptions || {};\n preChatMessage = options.pre_chat_message;\n const { pre_chat_fields: preChatFields = [] } = options;\n return {\n preChatMessage,\n preChatFields,\n };\n },\n shouldShowPreChatForm() {\n const { preChatFields } = this.preChatFormOptions;\n // Check if at least one enabled field in pre-chat fields\n const hasEnabledFields =\n preChatFields.filter(field => field.enabled).length > 0;\n return this.preChatFormEnabled && hasEnabledFields;\n },\n },\n};\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = requiredArgs;\n\nfunction requiredArgs(required, args) {\n if (args.length < required) {\n throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n }\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = toDate;\n\nvar _index = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nfunction toDate(argument) {\n (0, _index.default)(1, arguments);\n var argStr = Object.prototype.toString.call(argument); // Clone the date\n\n if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime());\n } else if (typeof argument === 'number' || argStr === '[object Number]') {\n return new Date(argument);\n } else {\n if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule\"); // eslint-disable-next-line no-console\n\n console.warn(new Error().stack);\n }\n\n return new Date(NaN);\n }\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isValid;\n\nvar _index = _interopRequireDefault(require(\"../toDate/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - Now `isValid` doesn't throw an exception\n * if the first argument is not an instance of Date.\n * Instead, argument is converted beforehand using `toDate`.\n *\n * Examples:\n *\n * | `isValid` argument | Before v2.0.0 | v2.0.0 onward |\n * |---------------------------|---------------|---------------|\n * | `new Date()` | `true` | `true` |\n * | `new Date('2016-01-01')` | `true` | `true` |\n * | `new Date('')` | `false` | `false` |\n * | `new Date(1488370835081)` | `true` | `true` |\n * | `new Date(NaN)` | `false` | `false` |\n * | `'2016-01-01'` | `TypeError` | `false` |\n * | `''` | `TypeError` | `false` |\n * | `1488370835081` | `TypeError` | `true` |\n * | `NaN` | `TypeError` | `false` |\n *\n * We introduce this change to make *date-fns* consistent with ECMAScript behavior\n * that try to coerce arguments to the expected type\n * (which is also the case with other *date-fns* functions).\n *\n * @param {*} date - the date to check\n * @returns {Boolean} the date is valid\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // For the valid date:\n * var result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertable into a date:\n * var result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * var result = isValid(new Date(''))\n * //=> false\n */\nfunction isValid(dirtyDate) {\n (0, _index2.default)(1, arguments);\n var date = (0, _index.default)(dirtyDate);\n return !isNaN(date);\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = formatDistance;\nvar formatDistanceLocale = {\n lessThanXSeconds: {\n one: 'less than a second',\n other: 'less than {{count}} seconds'\n },\n xSeconds: {\n one: '1 second',\n other: '{{count}} seconds'\n },\n halfAMinute: 'half a minute',\n lessThanXMinutes: {\n one: 'less than a minute',\n other: 'less than {{count}} minutes'\n },\n xMinutes: {\n one: '1 minute',\n other: '{{count}} minutes'\n },\n aboutXHours: {\n one: 'about 1 hour',\n other: 'about {{count}} hours'\n },\n xHours: {\n one: '1 hour',\n other: '{{count}} hours'\n },\n xDays: {\n one: '1 day',\n other: '{{count}} days'\n },\n aboutXWeeks: {\n one: 'about 1 week',\n other: 'about {{count}} weeks'\n },\n xWeeks: {\n one: '1 week',\n other: '{{count}} weeks'\n },\n aboutXMonths: {\n one: 'about 1 month',\n other: 'about {{count}} months'\n },\n xMonths: {\n one: '1 month',\n other: '{{count}} months'\n },\n aboutXYears: {\n one: 'about 1 year',\n other: 'about {{count}} years'\n },\n xYears: {\n one: '1 year',\n other: '{{count}} years'\n },\n overXYears: {\n one: 'over 1 year',\n other: 'over {{count}} years'\n },\n almostXYears: {\n one: 'almost 1 year',\n other: 'almost {{count}} years'\n }\n};\n\nfunction formatDistance(token, count, options) {\n options = options || {};\n var result;\n\n if (typeof formatDistanceLocale[token] === 'string') {\n result = formatDistanceLocale[token];\n } else if (count === 1) {\n result = formatDistanceLocale[token].one;\n } else {\n result = formatDistanceLocale[token].other.replace('{{count}}', count);\n }\n\n if (options.addSuffix) {\n if (options.comparison > 0) {\n return 'in ' + result;\n } else {\n return result + ' ago';\n }\n }\n\n return result;\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = buildFormatLongFn;\n\nfunction buildFormatLongFn(args) {\n return function (dirtyOptions) {\n var options = dirtyOptions || {};\n var width = options.width ? String(options.width) : args.defaultWidth;\n var format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _index = _interopRequireDefault(require(\"../../../_lib/buildFormatLongFn/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar dateFormats = {\n full: 'EEEE, MMMM do, y',\n long: 'MMMM do, y',\n medium: 'MMM d, y',\n short: 'MM/dd/yyyy'\n};\nvar timeFormats = {\n full: 'h:mm:ss a zzzz',\n long: 'h:mm:ss a z',\n medium: 'h:mm:ss a',\n short: 'h:mm a'\n};\nvar dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: '{{date}}, {{time}}',\n short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n date: (0, _index.default)({\n formats: dateFormats,\n defaultWidth: 'full'\n }),\n time: (0, _index.default)({\n formats: timeFormats,\n defaultWidth: 'full'\n }),\n dateTime: (0, _index.default)({\n formats: dateTimeFormats,\n defaultWidth: 'full'\n })\n};\nvar _default = formatLong;\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = formatRelative;\nvar formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: 'P'\n};\n\nfunction formatRelative(token, _date, _baseDate, _options) {\n return formatRelativeLocale[token];\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = buildLocalizeFn;\n\nfunction buildLocalizeFn(args) {\n return function (dirtyIndex, dirtyOptions) {\n var options = dirtyOptions || {};\n var context = options.context ? String(options.context) : 'standalone';\n var valuesArray;\n\n if (context === 'formatting' && args.formattingValues) {\n var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n var width = options.width ? String(options.width) : defaultWidth;\n valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n var _defaultWidth = args.defaultWidth;\n\n var _width = options.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[_width] || args.values[_defaultWidth];\n }\n\n var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;\n return valuesArray[index];\n };\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _index = _interopRequireDefault(require(\"../../../_lib/buildLocalizeFn/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar eraValues = {\n narrow: ['B', 'A'],\n abbreviated: ['BC', 'AD'],\n wide: ['Before Christ', 'Anno Domini']\n};\nvar quarterValues = {\n narrow: ['1', '2', '3', '4'],\n abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],\n wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter'] // Note: in English, the names of days of the week and months are capitalized.\n // If you are making a new locale based on this one, check if the same is true for the language you're working on.\n // Generally, formatted dates should look like they are in the middle of a sentence,\n // e.g. in Spanish language the weekdays and months should be in the lowercase.\n\n};\nvar monthValues = {\n narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n};\nvar dayValues = {\n narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n};\nvar dayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n }\n};\nvar formattingDayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n }\n};\n\nfunction ordinalNumber(dirtyNumber, _dirtyOptions) {\n var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`:\n //\n // var options = dirtyOptions || {}\n // var unit = String(options.unit)\n //\n // where `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'\n\n var rem100 = number % 100;\n\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + 'st';\n\n case 2:\n return number + 'nd';\n\n case 3:\n return number + 'rd';\n }\n }\n\n return number + 'th';\n}\n\nvar localize = {\n ordinalNumber: ordinalNumber,\n era: (0, _index.default)({\n values: eraValues,\n defaultWidth: 'wide'\n }),\n quarter: (0, _index.default)({\n values: quarterValues,\n defaultWidth: 'wide',\n argumentCallback: function (quarter) {\n return Number(quarter) - 1;\n }\n }),\n month: (0, _index.default)({\n values: monthValues,\n defaultWidth: 'wide'\n }),\n day: (0, _index.default)({\n values: dayValues,\n defaultWidth: 'wide'\n }),\n dayPeriod: (0, _index.default)({\n values: dayPeriodValues,\n defaultWidth: 'wide',\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: 'wide'\n })\n};\nvar _default = localize;\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = buildMatchPatternFn;\n\nfunction buildMatchPatternFn(args) {\n return function (dirtyString, dirtyOptions) {\n var string = String(dirtyString);\n var options = dirtyOptions || {};\n var matchResult = string.match(args.matchPattern);\n\n if (!matchResult) {\n return null;\n }\n\n var matchedString = matchResult[0];\n var parseResult = string.match(args.parsePattern);\n\n if (!parseResult) {\n return null;\n }\n\n var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];\n value = options.valueCallback ? options.valueCallback(value) : value;\n return {\n value: value,\n rest: string.slice(matchedString.length)\n };\n };\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = buildMatchFn;\n\nfunction buildMatchFn(args) {\n return function (dirtyString, dirtyOptions) {\n var string = String(dirtyString);\n var options = dirtyOptions || {};\n var width = options.width;\n var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];\n var matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n\n var matchedString = matchResult[0];\n var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];\n var value;\n\n if (Object.prototype.toString.call(parsePatterns) === '[object Array]') {\n value = findIndex(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n });\n } else {\n value = findKey(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n });\n }\n\n value = args.valueCallback ? args.valueCallback(value) : value;\n value = options.valueCallback ? options.valueCallback(value) : value;\n return {\n value: value,\n rest: string.slice(matchedString.length)\n };\n };\n}\n\nfunction findKey(object, predicate) {\n for (var key in object) {\n if (object.hasOwnProperty(key) && predicate(object[key])) {\n return key;\n }\n }\n}\n\nfunction findIndex(array, predicate) {\n for (var key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _index = _interopRequireDefault(require(\"../../../_lib/buildMatchPatternFn/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../../../_lib/buildMatchFn/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i\n};\nvar parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i]\n};\nvar matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i\n};\nvar parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i\n};\nvar parseMonthPatterns = {\n narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\n any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]\n};\nvar matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i\n};\nvar parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]\n};\nvar matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i\n};\nvar parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i\n }\n};\nvar match = {\n ordinalNumber: (0, _index.default)({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: function (value) {\n return parseInt(value, 10);\n }\n }),\n era: (0, _index2.default)({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseEraPatterns,\n defaultParseWidth: 'any'\n }),\n quarter: (0, _index2.default)({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: 'any',\n valueCallback: function (index) {\n return index + 1;\n }\n }),\n month: (0, _index2.default)({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: 'any'\n }),\n day: (0, _index2.default)({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseDayPatterns,\n defaultParseWidth: 'any'\n }),\n dayPeriod: (0, _index2.default)({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: 'any',\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: 'any'\n })\n};\nvar _default = match;\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _index = _interopRequireDefault(require(\"./_lib/formatDistance/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"./_lib/formatLong/index.js\"));\n\nvar _index3 = _interopRequireDefault(require(\"./_lib/formatRelative/index.js\"));\n\nvar _index4 = _interopRequireDefault(require(\"./_lib/localize/index.js\"));\n\nvar _index5 = _interopRequireDefault(require(\"./_lib/match/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @type {Locale}\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}\n * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}\n */\nvar locale = {\n code: 'en-US',\n formatDistance: _index.default,\n formatLong: _index2.default,\n formatRelative: _index3.default,\n localize: _index4.default,\n match: _index5.default,\n options: {\n weekStartsOn: 0\n /* Sunday */\n ,\n firstWeekContainsDate: 1\n }\n};\nvar _default = locale;\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = toInteger;\n\nfunction toInteger(dirtyNumber) {\n if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {\n return NaN;\n }\n\n var number = Number(dirtyNumber);\n\n if (isNaN(number)) {\n return number;\n }\n\n return number < 0 ? Math.ceil(number) : Math.floor(number);\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = addMilliseconds;\n\nvar _index = _interopRequireDefault(require(\"../_lib/toInteger/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../toDate/index.js\"));\n\nvar _index3 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @name addMilliseconds\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\nfunction addMilliseconds(dirtyDate, dirtyAmount) {\n (0, _index3.default)(2, arguments);\n var timestamp = (0, _index2.default)(dirtyDate).getTime();\n var amount = (0, _index.default)(dirtyAmount);\n return new Date(timestamp + amount);\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = subMilliseconds;\n\nvar _index = _interopRequireDefault(require(\"../_lib/toInteger/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../addMilliseconds/index.js\"));\n\nvar _index3 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @name subMilliseconds\n * @category Millisecond Helpers\n * @summary Subtract the specified number of milliseconds from the given date.\n *\n * @description\n * Subtract the specified number of milliseconds from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\n * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:29.250\n */\nfunction subMilliseconds(dirtyDate, dirtyAmount) {\n (0, _index3.default)(2, arguments);\n var amount = (0, _index.default)(dirtyAmount);\n return (0, _index2.default)(dirtyDate, -amount);\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = addLeadingZeros;\n\nfunction addLeadingZeros(number, targetLength) {\n var sign = number < 0 ? '-' : '';\n var output = Math.abs(number).toString();\n\n while (output.length < targetLength) {\n output = '0' + output;\n }\n\n return sign + output;\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _index = _interopRequireDefault(require(\"../../addLeadingZeros/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\nvar formatters = {\n // Year\n y: function (date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return (0, _index.default)(token === 'yy' ? year % 100 : year, token.length);\n },\n // Month\n M: function (date, token) {\n var month = date.getUTCMonth();\n return token === 'M' ? String(month + 1) : (0, _index.default)(month + 1, 2);\n },\n // Day of the month\n d: function (date, token) {\n return (0, _index.default)(date.getUTCDate(), token.length);\n },\n // AM or PM\n a: function (date, token) {\n var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';\n\n switch (token) {\n case 'a':\n case 'aa':\n return dayPeriodEnumValue.toUpperCase();\n\n case 'aaa':\n return dayPeriodEnumValue;\n\n case 'aaaaa':\n return dayPeriodEnumValue[0];\n\n case 'aaaa':\n default:\n return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';\n }\n },\n // Hour [1-12]\n h: function (date, token) {\n return (0, _index.default)(date.getUTCHours() % 12 || 12, token.length);\n },\n // Hour [0-23]\n H: function (date, token) {\n return (0, _index.default)(date.getUTCHours(), token.length);\n },\n // Minute\n m: function (date, token) {\n return (0, _index.default)(date.getUTCMinutes(), token.length);\n },\n // Second\n s: function (date, token) {\n return (0, _index.default)(date.getUTCSeconds(), token.length);\n },\n // Fraction of second\n S: function (date, token) {\n var numberOfDigits = token.length;\n var milliseconds = date.getUTCMilliseconds();\n var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));\n return (0, _index.default)(fractionalSeconds, token.length);\n }\n};\nvar _default = formatters;\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = getUTCDayOfYear;\n\nvar _index = _interopRequireDefault(require(\"../../toDate/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../requiredArgs/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MILLISECONDS_IN_DAY = 86400000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction getUTCDayOfYear(dirtyDate) {\n (0, _index2.default)(1, arguments);\n var date = (0, _index.default)(dirtyDate);\n var timestamp = date.getTime();\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n var startOfYearTimestamp = date.getTime();\n var difference = timestamp - startOfYearTimestamp;\n return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = startOfUTCISOWeek;\n\nvar _index = _interopRequireDefault(require(\"../../toDate/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../requiredArgs/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\nfunction startOfUTCISOWeek(dirtyDate) {\n (0, _index2.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0, _index.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = getUTCISOWeekYear;\n\nvar _index = _interopRequireDefault(require(\"../../toDate/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../startOfUTCISOWeek/index.js\"));\n\nvar _index3 = _interopRequireDefault(require(\"../requiredArgs/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\nfunction getUTCISOWeekYear(dirtyDate) {\n (0, _index3.default)(1, arguments);\n var date = (0, _index.default)(dirtyDate);\n var year = date.getUTCFullYear();\n var fourthOfJanuaryOfNextYear = new Date(0);\n fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = (0, _index2.default)(fourthOfJanuaryOfNextYear);\n var fourthOfJanuaryOfThisYear = new Date(0);\n fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = (0, _index2.default)(fourthOfJanuaryOfThisYear);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = startOfUTCISOWeekYear;\n\nvar _index = _interopRequireDefault(require(\"../getUTCISOWeekYear/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../startOfUTCISOWeek/index.js\"));\n\nvar _index3 = _interopRequireDefault(require(\"../requiredArgs/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\nfunction startOfUTCISOWeekYear(dirtyDate) {\n (0, _index3.default)(1, arguments);\n var year = (0, _index.default)(dirtyDate);\n var fourthOfJanuary = new Date(0);\n fourthOfJanuary.setUTCFullYear(year, 0, 4);\n fourthOfJanuary.setUTCHours(0, 0, 0, 0);\n var date = (0, _index2.default)(fourthOfJanuary);\n return date;\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = getUTCISOWeek;\n\nvar _index = _interopRequireDefault(require(\"../../toDate/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../startOfUTCISOWeek/index.js\"));\n\nvar _index3 = _interopRequireDefault(require(\"../startOfUTCISOWeekYear/index.js\"));\n\nvar _index4 = _interopRequireDefault(require(\"../requiredArgs/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction getUTCISOWeek(dirtyDate) {\n (0, _index4.default)(1, arguments);\n var date = (0, _index.default)(dirtyDate);\n var diff = (0, _index2.default)(date).getTime() - (0, _index3.default)(date).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = startOfUTCWeek;\n\nvar _index = _interopRequireDefault(require(\"../toInteger/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../../toDate/index.js\"));\n\nvar _index3 = _interopRequireDefault(require(\"../requiredArgs/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\nfunction startOfUTCWeek(dirtyDate, dirtyOptions) {\n (0, _index3.default)(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : (0, _index.default)(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : (0, _index.default)(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = (0, _index2.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = getUTCWeekYear;\n\nvar _index = _interopRequireDefault(require(\"../toInteger/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../../toDate/index.js\"));\n\nvar _index3 = _interopRequireDefault(require(\"../startOfUTCWeek/index.js\"));\n\nvar _index4 = _interopRequireDefault(require(\"../requiredArgs/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\nfunction getUTCWeekYear(dirtyDate, dirtyOptions) {\n (0, _index4.default)(1, arguments);\n var date = (0, _index2.default)(dirtyDate, dirtyOptions);\n var year = date.getUTCFullYear();\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : (0, _index.default)(localeFirstWeekContainsDate);\n var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : (0, _index.default)(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var firstWeekOfNextYear = new Date(0);\n firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = (0, _index3.default)(firstWeekOfNextYear, dirtyOptions);\n var firstWeekOfThisYear = new Date(0);\n firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = (0, _index3.default)(firstWeekOfThisYear, dirtyOptions);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = startOfUTCWeekYear;\n\nvar _index = _interopRequireDefault(require(\"../toInteger/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../getUTCWeekYear/index.js\"));\n\nvar _index3 = _interopRequireDefault(require(\"../startOfUTCWeek/index.js\"));\n\nvar _index4 = _interopRequireDefault(require(\"../requiredArgs/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\nfunction startOfUTCWeekYear(dirtyDate, dirtyOptions) {\n (0, _index4.default)(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : (0, _index.default)(localeFirstWeekContainsDate);\n var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : (0, _index.default)(options.firstWeekContainsDate);\n var year = (0, _index2.default)(dirtyDate, dirtyOptions);\n var firstWeek = new Date(0);\n firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setUTCHours(0, 0, 0, 0);\n var date = (0, _index3.default)(firstWeek, dirtyOptions);\n return date;\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = getUTCWeek;\n\nvar _index = _interopRequireDefault(require(\"../../toDate/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../startOfUTCWeek/index.js\"));\n\nvar _index3 = _interopRequireDefault(require(\"../startOfUTCWeekYear/index.js\"));\n\nvar _index4 = _interopRequireDefault(require(\"../requiredArgs/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction getUTCWeek(dirtyDate, options) {\n (0, _index4.default)(1, arguments);\n var date = (0, _index.default)(dirtyDate);\n var diff = (0, _index2.default)(date, options).getTime() - (0, _index3.default)(date, options).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _index = _interopRequireDefault(require(\"../lightFormatters/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../../../_lib/getUTCDayOfYear/index.js\"));\n\nvar _index3 = _interopRequireDefault(require(\"../../../_lib/getUTCISOWeek/index.js\"));\n\nvar _index4 = _interopRequireDefault(require(\"../../../_lib/getUTCISOWeekYear/index.js\"));\n\nvar _index5 = _interopRequireDefault(require(\"../../../_lib/getUTCWeek/index.js\"));\n\nvar _index6 = _interopRequireDefault(require(\"../../../_lib/getUTCWeekYear/index.js\"));\n\nvar _index7 = _interopRequireDefault(require(\"../../addLeadingZeros/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar dayPeriodEnum = {\n am: 'am',\n pm: 'pm',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n /*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\n};\nvar formatters = {\n // Era\n G: function (date, token, localize) {\n var era = date.getUTCFullYear() > 0 ? 1 : 0;\n\n switch (token) {\n // AD, BC\n case 'G':\n case 'GG':\n case 'GGG':\n return localize.era(era, {\n width: 'abbreviated'\n });\n // A, B\n\n case 'GGGGG':\n return localize.era(era, {\n width: 'narrow'\n });\n // Anno Domini, Before Christ\n\n case 'GGGG':\n default:\n return localize.era(era, {\n width: 'wide'\n });\n }\n },\n // Year\n y: function (date, token, localize) {\n // Ordinal number\n if (token === 'yo') {\n var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, {\n unit: 'year'\n });\n }\n\n return _index.default.y(date, token);\n },\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n var signedWeekYear = (0, _index6.default)(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year\n\n if (token === 'YY') {\n var twoDigitYear = weekYear % 100;\n return (0, _index7.default)(twoDigitYear, 2);\n } // Ordinal number\n\n\n if (token === 'Yo') {\n return localize.ordinalNumber(weekYear, {\n unit: 'year'\n });\n } // Padding\n\n\n return (0, _index7.default)(weekYear, token.length);\n },\n // ISO week-numbering year\n R: function (date, token) {\n var isoWeekYear = (0, _index4.default)(date); // Padding\n\n return (0, _index7.default)(isoWeekYear, token.length);\n },\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function (date, token) {\n var year = date.getUTCFullYear();\n return (0, _index7.default)(year, token.length);\n },\n // Quarter\n Q: function (date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n switch (token) {\n // 1, 2, 3, 4\n case 'Q':\n return String(quarter);\n // 01, 02, 03, 04\n\n case 'QQ':\n return (0, _index7.default)(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n\n case 'Qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'QQQ':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'QQQQQ':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'QQQQ':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone quarter\n q: function (date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n switch (token) {\n // 1, 2, 3, 4\n case 'q':\n return String(quarter);\n // 01, 02, 03, 04\n\n case 'qq':\n return (0, _index7.default)(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n\n case 'qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'qqq':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'qqqqq':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'qqqq':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Month\n M: function (date, token, localize) {\n var month = date.getUTCMonth();\n\n switch (token) {\n case 'M':\n case 'MM':\n return _index.default.M(date, token);\n // 1st, 2nd, ..., 12th\n\n case 'Mo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n\n case 'MMM':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // J, F, ..., D\n\n case 'MMMMM':\n return localize.month(month, {\n width: 'narrow',\n context: 'formatting'\n });\n // January, February, ..., December\n\n case 'MMMM':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone month\n L: function (date, token, localize) {\n var month = date.getUTCMonth();\n\n switch (token) {\n // 1, 2, ..., 12\n case 'L':\n return String(month + 1);\n // 01, 02, ..., 12\n\n case 'LL':\n return (0, _index7.default)(month + 1, 2);\n // 1st, 2nd, ..., 12th\n\n case 'Lo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n\n case 'LLL':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // J, F, ..., D\n\n case 'LLLLL':\n return localize.month(month, {\n width: 'narrow',\n context: 'standalone'\n });\n // January, February, ..., December\n\n case 'LLLL':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Local week of year\n w: function (date, token, localize, options) {\n var week = (0, _index5.default)(date, options);\n\n if (token === 'wo') {\n return localize.ordinalNumber(week, {\n unit: 'week'\n });\n }\n\n return (0, _index7.default)(week, token.length);\n },\n // ISO week of year\n I: function (date, token, localize) {\n var isoWeek = (0, _index3.default)(date);\n\n if (token === 'Io') {\n return localize.ordinalNumber(isoWeek, {\n unit: 'week'\n });\n }\n\n return (0, _index7.default)(isoWeek, token.length);\n },\n // Day of the month\n d: function (date, token, localize) {\n if (token === 'do') {\n return localize.ordinalNumber(date.getUTCDate(), {\n unit: 'date'\n });\n }\n\n return _index.default.d(date, token);\n },\n // Day of year\n D: function (date, token, localize) {\n var dayOfYear = (0, _index2.default)(date);\n\n if (token === 'Do') {\n return localize.ordinalNumber(dayOfYear, {\n unit: 'dayOfYear'\n });\n }\n\n return (0, _index7.default)(dayOfYear, token.length);\n },\n // Day of week\n E: function (date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n\n switch (token) {\n // Tue\n case 'E':\n case 'EE':\n case 'EEE':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'EEEEE':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'EEEEEE':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'EEEE':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Local day of week\n e: function (date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case 'e':\n return String(localDayOfWeek);\n // Padded numerical value\n\n case 'ee':\n return (0, _index7.default)(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n\n case 'eo':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n\n case 'eee':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'eeeee':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'eeeeee':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'eeee':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n switch (token) {\n // Numerical value (same as in `e`)\n case 'c':\n return String(localDayOfWeek);\n // Padded numerical value\n\n case 'cc':\n return (0, _index7.default)(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n\n case 'co':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n\n case 'ccc':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // T\n\n case 'ccccc':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tu\n\n case 'cccccc':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'standalone'\n });\n // Tuesday\n\n case 'cccc':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // ISO day of week\n i: function (date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n\n switch (token) {\n // 2\n case 'i':\n return String(isoDayOfWeek);\n // 02\n\n case 'ii':\n return (0, _index7.default)(isoDayOfWeek, token.length);\n // 2nd\n\n case 'io':\n return localize.ordinalNumber(isoDayOfWeek, {\n unit: 'day'\n });\n // Tue\n\n case 'iii':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'iiiii':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'iiiiii':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'iiii':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM or PM\n a: function (date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n\n switch (token) {\n case 'a':\n case 'aa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'aaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n\n case 'aaaaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'aaaa':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n }\n\n switch (token) {\n case 'b':\n case 'bb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'bbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n\n case 'bbbbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'bbbb':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case 'B':\n case 'BB':\n case 'BBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'BBBBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'BBBB':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Hour [1-12]\n h: function (date, token, localize) {\n if (token === 'ho') {\n var hours = date.getUTCHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return _index.default.h(date, token);\n },\n // Hour [0-23]\n H: function (date, token, localize) {\n if (token === 'Ho') {\n return localize.ordinalNumber(date.getUTCHours(), {\n unit: 'hour'\n });\n }\n\n return _index.default.H(date, token);\n },\n // Hour [0-11]\n K: function (date, token, localize) {\n var hours = date.getUTCHours() % 12;\n\n if (token === 'Ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return (0, _index7.default)(hours, token.length);\n },\n // Hour [1-24]\n k: function (date, token, localize) {\n var hours = date.getUTCHours();\n if (hours === 0) hours = 24;\n\n if (token === 'ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return (0, _index7.default)(hours, token.length);\n },\n // Minute\n m: function (date, token, localize) {\n if (token === 'mo') {\n return localize.ordinalNumber(date.getUTCMinutes(), {\n unit: 'minute'\n });\n }\n\n return _index.default.m(date, token);\n },\n // Second\n s: function (date, token, localize) {\n if (token === 'so') {\n return localize.ordinalNumber(date.getUTCSeconds(), {\n unit: 'second'\n });\n }\n\n return _index.default.s(date, token);\n },\n // Fraction of second\n S: function (date, token) {\n return _index.default.S(date, token);\n },\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return 'Z';\n }\n\n switch (token) {\n // Hours and optional minutes\n case 'X':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n\n case 'XXXX':\n case 'XX':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n\n case 'XXXXX':\n case 'XXX': // Hours and minutes with `:` delimiter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case 'x':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n\n case 'xxxx':\n case 'xx':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n\n case 'xxxxx':\n case 'xxx': // Hours and minutes with `:` delimiter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (GMT)\n O: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'O':\n case 'OO':\n case 'OOO':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n\n case 'OOOO':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (specific non-location)\n z: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'z':\n case 'zz':\n case 'zzz':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n\n case 'zzzz':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Seconds timestamp\n t: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = Math.floor(originalDate.getTime() / 1000);\n return (0, _index7.default)(timestamp, token.length);\n },\n // Milliseconds timestamp\n T: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = originalDate.getTime();\n return (0, _index7.default)(timestamp, token.length);\n }\n};\n\nfunction formatTimezoneShort(offset, dirtyDelimiter) {\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = Math.floor(absOffset / 60);\n var minutes = absOffset % 60;\n\n if (minutes === 0) {\n return sign + String(hours);\n }\n\n var delimiter = dirtyDelimiter || '';\n return sign + String(hours) + delimiter + (0, _index7.default)(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {\n if (offset % 60 === 0) {\n var sign = offset > 0 ? '-' : '+';\n return sign + (0, _index7.default)(Math.abs(offset) / 60, 2);\n }\n\n return formatTimezone(offset, dirtyDelimiter);\n}\n\nfunction formatTimezone(offset, dirtyDelimiter) {\n var delimiter = dirtyDelimiter || '';\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = (0, _index7.default)(Math.floor(absOffset / 60), 2);\n var minutes = (0, _index7.default)(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n\nvar _default = formatters;\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nfunction dateLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'P':\n return formatLong.date({\n width: 'short'\n });\n\n case 'PP':\n return formatLong.date({\n width: 'medium'\n });\n\n case 'PPP':\n return formatLong.date({\n width: 'long'\n });\n\n case 'PPPP':\n default:\n return formatLong.date({\n width: 'full'\n });\n }\n}\n\nfunction timeLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'p':\n return formatLong.time({\n width: 'short'\n });\n\n case 'pp':\n return formatLong.time({\n width: 'medium'\n });\n\n case 'ppp':\n return formatLong.time({\n width: 'long'\n });\n\n case 'pppp':\n default:\n return formatLong.time({\n width: 'full'\n });\n }\n}\n\nfunction dateTimeLongFormatter(pattern, formatLong) {\n var matchResult = pattern.match(/(P+)(p+)?/);\n var datePattern = matchResult[1];\n var timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n var dateTimeFormat;\n\n switch (datePattern) {\n case 'P':\n dateTimeFormat = formatLong.dateTime({\n width: 'short'\n });\n break;\n\n case 'PP':\n dateTimeFormat = formatLong.dateTime({\n width: 'medium'\n });\n break;\n\n case 'PPP':\n dateTimeFormat = formatLong.dateTime({\n width: 'long'\n });\n break;\n\n case 'PPPP':\n default:\n dateTimeFormat = formatLong.dateTime({\n width: 'full'\n });\n break;\n }\n\n return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));\n}\n\nvar longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter\n};\nvar _default = longFormatters;\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = getTimezoneOffsetInMilliseconds;\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nfunction getTimezoneOffsetInMilliseconds(date) {\n var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));\n utcDate.setUTCFullYear(date.getFullYear());\n return date.getTime() - utcDate.getTime();\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isProtectedDayOfYearToken = isProtectedDayOfYearToken;\nexports.isProtectedWeekYearToken = isProtectedWeekYearToken;\nexports.throwProtectedError = throwProtectedError;\nvar protectedDayOfYearTokens = ['D', 'DD'];\nvar protectedWeekYearTokens = ['YY', 'YYYY'];\n\nfunction isProtectedDayOfYearToken(token) {\n return protectedDayOfYearTokens.indexOf(token) !== -1;\n}\n\nfunction isProtectedWeekYearToken(token) {\n return protectedWeekYearTokens.indexOf(token) !== -1;\n}\n\nfunction throwProtectedError(token, format, input) {\n if (token === 'YYYY') {\n throw new RangeError(\"Use `yyyy` instead of `YYYY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://git.io/fxCyr\"));\n } else if (token === 'YY') {\n throw new RangeError(\"Use `yy` instead of `YY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://git.io/fxCyr\"));\n } else if (token === 'D') {\n throw new RangeError(\"Use `d` instead of `D` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://git.io/fxCyr\"));\n } else if (token === 'DD') {\n throw new RangeError(\"Use `dd` instead of `DD` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://git.io/fxCyr\"));\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = format;\n\nvar _index = _interopRequireDefault(require(\"../isValid/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../locale/en-US/index.js\"));\n\nvar _index3 = _interopRequireDefault(require(\"../subMilliseconds/index.js\"));\n\nvar _index4 = _interopRequireDefault(require(\"../toDate/index.js\"));\n\nvar _index5 = _interopRequireDefault(require(\"../_lib/format/formatters/index.js\"));\n\nvar _index6 = _interopRequireDefault(require(\"../_lib/format/longFormatters/index.js\"));\n\nvar _index7 = _interopRequireDefault(require(\"../_lib/getTimezoneOffsetInMilliseconds/index.js\"));\n\nvar _index8 = require(\"../_lib/protectedTokens/index.js\");\n\nvar _index9 = _interopRequireDefault(require(\"../_lib/toInteger/index.js\"));\n\nvar _index10 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\n\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n/**\n * @name format\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://git.io/fxCyr\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Su, Sa | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Su, Sa | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Su, Sa | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Su, Sa | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}\n * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://git.io/fxCyr\n *\n * 9. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://git.io/fxCyr\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The second argument is now required for the sake of explicitness.\n *\n * ```javascript\n * // Before v2.0.0\n * format(new Date(2016, 0, 1))\n *\n * // v2.0.0 onward\n * format(new Date(2016, 0, 1), \"yyyy-MM-dd'T'HH:mm:ss.SSSxxx\")\n * ```\n *\n * - New format string API for `format` function\n * which is based on [Unicode Technical Standard #35](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table).\n * See [this post](https://blog.date-fns.org/post/unicode-tokens-in-date-fns-v2-sreatyki91jg) for more details.\n *\n * - Characters are now escaped using single quote symbols (`'`) instead of square brackets.\n *\n * @param {Date|Number} date - the original date\n * @param {String} format - the string of tokens\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n * see: https://git.io/fxCyr\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n * see: https://git.io/fxCyr\n * @returns {String} the formatted date string\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `localize` property\n * @throws {RangeError} `options.locale` must contain `formatLong` property\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * var result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * var result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * var result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\n\nfunction format(dirtyDate, dirtyFormatStr, dirtyOptions) {\n (0, _index10.default)(2, arguments);\n var formatStr = String(dirtyFormatStr);\n var options = dirtyOptions || {};\n var locale = options.locale || _index2.default;\n var localeFirstWeekContainsDate = locale.options && locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : (0, _index9.default)(localeFirstWeekContainsDate);\n var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : (0, _index9.default)(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var localeWeekStartsOn = locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : (0, _index9.default)(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : (0, _index9.default)(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n if (!locale.localize) {\n throw new RangeError('locale must contain localize property');\n }\n\n if (!locale.formatLong) {\n throw new RangeError('locale must contain formatLong property');\n }\n\n var originalDate = (0, _index4.default)(dirtyDate);\n\n if (!(0, _index.default)(originalDate)) {\n throw new RangeError('Invalid time value');\n } // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n // This ensures that when UTC functions will be implemented, locales will be compatible with them.\n // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376\n\n\n var timezoneOffset = (0, _index7.default)(originalDate);\n var utcDate = (0, _index3.default)(originalDate, timezoneOffset);\n var formatterOptions = {\n firstWeekContainsDate: firstWeekContainsDate,\n weekStartsOn: weekStartsOn,\n locale: locale,\n _originalDate: originalDate\n };\n var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {\n var firstCharacter = substring[0];\n\n if (firstCharacter === 'p' || firstCharacter === 'P') {\n var longFormatter = _index6.default[firstCharacter];\n return longFormatter(substring, locale.formatLong, formatterOptions);\n }\n\n return substring;\n }).join('').match(formattingTokensRegExp).map(function (substring) {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return \"'\";\n }\n\n var firstCharacter = substring[0];\n\n if (firstCharacter === \"'\") {\n return cleanEscapedString(substring);\n }\n\n var formatter = _index5.default[firstCharacter];\n\n if (formatter) {\n if (!options.useAdditionalWeekYearTokens && (0, _index8.isProtectedWeekYearToken)(substring)) {\n (0, _index8.throwProtectedError)(substring, dirtyFormatStr, dirtyDate);\n }\n\n if (!options.useAdditionalDayOfYearTokens && (0, _index8.isProtectedDayOfYearToken)(substring)) {\n (0, _index8.throwProtectedError)(substring, dirtyFormatStr, dirtyDate);\n }\n\n return formatter(utcDate, substring, locale.localize, formatterOptions);\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n }\n\n return substring;\n }).join('');\n return result;\n}\n\nfunction cleanEscapedString(input) {\n return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, \"'\");\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = tzIntlTimeZoneName;\n\n/**\n * Returns the formatted time zone name of the provided `timeZone` or the current\n * system time zone if omitted, accounting for DST according to the UTC value of\n * the date.\n */\nfunction tzIntlTimeZoneName(length, date, options) {\n var dtf = getDTF(length, options.timeZone, options.locale);\n return dtf.formatToParts ? partsTimeZone(dtf, date) : hackyTimeZone(dtf, date);\n}\n\nfunction partsTimeZone(dtf, date) {\n var formatted = dtf.formatToParts(date);\n\n for (var i = formatted.length - 1; i >= 0; --i) {\n if (formatted[i].type === 'timeZoneName') {\n return formatted[i].value;\n }\n }\n}\n\nfunction hackyTimeZone(dtf, date) {\n var formatted = dtf.format(date).replace(/\\u200E/g, '');\n var tzNameMatch = / [\\w-+ ]+$/.exec(formatted);\n return tzNameMatch ? tzNameMatch[0].substr(1) : '';\n} // If a locale has been provided `en-US` is used as a fallback in case it is an\n// invalid locale, otherwise the locale is left undefined to use the system locale.\n\n\nfunction getDTF(length, timeZone, locale) {\n if (locale && !locale.code) {\n throw new Error(\"date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`\");\n }\n\n return new Intl.DateTimeFormat(locale ? [locale.code, 'en-US'] : undefined, {\n timeZone: timeZone,\n timeZoneName: length\n });\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = tzTokenizeDate;\n\n/**\n * Returns the [year, month, day, hour, minute, seconds] tokens of the provided\n * `date` as it will be rendered in the `timeZone`.\n */\nfunction tzTokenizeDate(date, timeZone) {\n var dtf = getDateTimeFormat(timeZone);\n return dtf.formatToParts ? partsOffset(dtf, date) : hackyOffset(dtf, date);\n}\n\nvar typeToPos = {\n year: 0,\n month: 1,\n day: 2,\n hour: 3,\n minute: 4,\n second: 5\n};\n\nfunction partsOffset(dtf, date) {\n try {\n var formatted = dtf.formatToParts(date);\n var filled = [];\n\n for (var i = 0; i < formatted.length; i++) {\n var pos = typeToPos[formatted[i].type];\n\n if (pos >= 0) {\n filled[pos] = parseInt(formatted[i].value, 10);\n }\n }\n\n return filled;\n } catch (error) {\n if (error instanceof RangeError) {\n return [NaN];\n }\n\n throw error;\n }\n}\n\nfunction hackyOffset(dtf, date) {\n var formatted = dtf.format(date).replace(/\\u200E/g, '');\n var parsed = /(\\d+)\\/(\\d+)\\/(\\d+),? (\\d+):(\\d+):(\\d+)/.exec(formatted); // var [, fMonth, fDay, fYear, fHour, fMinute, fSecond] = parsed\n // return [fYear, fMonth, fDay, fHour, fMinute, fSecond]\n\n return [parsed[3], parsed[1], parsed[2], parsed[4], parsed[5], parsed[6]];\n} // Get a cached Intl.DateTimeFormat instance for the IANA `timeZone`. This can be used\n// to get deterministic local date/time output according to the `en-US` locale which\n// can be used to extract local time parts as necessary.\n\n\nvar dtfCache = {};\n\nfunction getDateTimeFormat(timeZone) {\n if (!dtfCache[timeZone]) {\n // New browsers use `hourCycle`, IE and Chrome <73 does not support it and uses `hour12`\n var testDateFormatted = new Intl.DateTimeFormat('en-US', {\n hour12: false,\n timeZone: 'America/New_York',\n year: 'numeric',\n month: 'numeric',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit'\n }).format(new Date('2014-06-25T04:00:00.123Z'));\n var hourCycleSupported = testDateFormatted === '06/25/2014, 00:00:00' || testDateFormatted === '06/25/2014 00:00:00';\n dtfCache[timeZone] = hourCycleSupported ? new Intl.DateTimeFormat('en-US', {\n hour12: false,\n timeZone: timeZone,\n year: 'numeric',\n month: 'numeric',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit'\n }) : new Intl.DateTimeFormat('en-US', {\n hourCycle: 'h23',\n timeZone: timeZone,\n year: 'numeric',\n month: 'numeric',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit'\n });\n }\n\n return dtfCache[timeZone];\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = newDateUTC;\n\n/**\n * Use instead of `new Date(Date.UTC(...))` to support years below 100 which doesn't work\n * otherwise due to the nature of the\n * [`Date` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years.\n *\n * For `Date.UTC(...)`, use `newDateUTC(...).getTime()`.\n */\nfunction newDateUTC(fullYear, month, day, hour, minute, second, millisecond) {\n var utcDate = new Date(0);\n utcDate.setUTCFullYear(fullYear, month, day);\n utcDate.setUTCHours(hour, minute, second, millisecond);\n return utcDate;\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = tzParseTimezone;\n\nvar _index = _interopRequireDefault(require(\"../tzTokenizeDate/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../newDateUTC/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MILLISECONDS_IN_HOUR = 3600000;\nvar MILLISECONDS_IN_MINUTE = 60000;\nvar patterns = {\n timezone: /([Z+-].*)$/,\n timezoneZ: /^(Z)$/,\n timezoneHH: /^([+-]\\d{2})$/,\n timezoneHHMM: /^([+-]\\d{2}):?(\\d{2})$/\n}; // Parse various time zone offset formats to an offset in milliseconds\n\nfunction tzParseTimezone(timezoneString, date, isUtcDate) {\n var token;\n var absoluteOffset; // Empty string\n\n if (!timezoneString) {\n return 0;\n } // Z\n\n\n token = patterns.timezoneZ.exec(timezoneString);\n\n if (token) {\n return 0;\n }\n\n var hours; // ±hh\n\n token = patterns.timezoneHH.exec(timezoneString);\n\n if (token) {\n hours = parseInt(token[1], 10);\n\n if (!validateTimezone(hours)) {\n return NaN;\n }\n\n return -(hours * MILLISECONDS_IN_HOUR);\n } // ±hh:mm or ±hhmm\n\n\n token = patterns.timezoneHHMM.exec(timezoneString);\n\n if (token) {\n hours = parseInt(token[1], 10);\n var minutes = parseInt(token[2], 10);\n\n if (!validateTimezone(hours, minutes)) {\n return NaN;\n }\n\n absoluteOffset = Math.abs(hours) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE;\n return hours > 0 ? -absoluteOffset : absoluteOffset;\n } // IANA time zone\n\n\n if (isValidTimezoneIANAString(timezoneString)) {\n date = new Date(date || Date.now());\n var utcDate = isUtcDate ? date : toUtcDate(date);\n var offset = calcOffset(utcDate, timezoneString);\n var fixedOffset = isUtcDate ? offset : fixOffset(date, offset, timezoneString);\n return -fixedOffset;\n }\n\n return NaN;\n}\n\nfunction toUtcDate(date) {\n return (0, _index2.default)(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n}\n\nfunction calcOffset(date, timezoneString) {\n var tokens = (0, _index.default)(date, timezoneString); // ms dropped because it's not provided by tzTokenizeDate\n\n var asUTC = (0, _index2.default)(tokens[0], tokens[1] - 1, tokens[2], tokens[3] % 24, tokens[4], tokens[5], 0).getTime();\n var asTS = date.getTime();\n var over = asTS % 1000;\n asTS -= over >= 0 ? over : 1000 + over;\n return asUTC - asTS;\n}\n\nfunction fixOffset(date, offset, timezoneString) {\n var localTS = date.getTime(); // Our UTC time is just a guess because our offset is just a guess\n\n var utcGuess = localTS - offset; // Test whether the zone matches the offset for this ts\n\n var o2 = calcOffset(new Date(utcGuess), timezoneString); // If so, offset didn't change, and we're done\n\n if (offset === o2) {\n return offset;\n } // If not, change the ts by the difference in the offset\n\n\n utcGuess -= o2 - offset; // If that gives us the local time we want, we're done\n\n var o3 = calcOffset(new Date(utcGuess), timezoneString);\n\n if (o2 === o3) {\n return o2;\n } // If it's different, we're in a hole time. The offset has changed, but we don't adjust the time\n\n\n return Math.max(o2, o3);\n}\n\nfunction validateTimezone(hours, minutes) {\n return -23 <= hours && hours <= 23 && (minutes == null || 0 <= minutes && minutes <= 59);\n}\n\nvar validIANATimezoneCache = {};\n\nfunction isValidTimezoneIANAString(timeZoneString) {\n if (validIANATimezoneCache[timeZoneString]) return true;\n\n try {\n new Intl.DateTimeFormat(undefined, {\n timeZone: timeZoneString\n });\n validIANATimezoneCache[timeZoneString] = true;\n return true;\n } catch (error) {\n return false;\n }\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _index = _interopRequireDefault(require(\"../../_lib/tzIntlTimeZoneName/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../../_lib/tzParseTimezone/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MILLISECONDS_IN_MINUTE = 60 * 1000;\nvar formatters = {\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, localize, options) {\n var timezoneOffset = getTimeZoneOffset(options.timeZone, options._originalDate || date);\n\n if (timezoneOffset === 0) {\n return 'Z';\n }\n\n switch (token) {\n // Hours and optional minutes\n case 'X':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimeter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n\n case 'XXXX':\n case 'XX':\n // Hours and minutes without `:` delimeter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimeter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n\n case 'XXXXX':\n case 'XXX': // Hours and minutes with `:` delimeter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, localize, options) {\n var timezoneOffset = getTimeZoneOffset(options.timeZone, options._originalDate || date);\n\n switch (token) {\n // Hours and optional minutes\n case 'x':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimeter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n\n case 'xxxx':\n case 'xx':\n // Hours and minutes without `:` delimeter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimeter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n\n case 'xxxxx':\n case 'xxx': // Hours and minutes with `:` delimeter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (GMT)\n O: function (date, token, localize, options) {\n var timezoneOffset = getTimeZoneOffset(options.timeZone, options._originalDate || date);\n\n switch (token) {\n // Short\n case 'O':\n case 'OO':\n case 'OOO':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n\n case 'OOOO':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (specific non-location)\n z: function (date, token, localize, options) {\n var originalDate = options._originalDate || date;\n\n switch (token) {\n // Short\n case 'z':\n case 'zz':\n case 'zzz':\n return (0, _index.default)('short', originalDate, options);\n // Long\n\n case 'zzzz':\n default:\n return (0, _index.default)('long', originalDate, options);\n }\n }\n};\n\nfunction getTimeZoneOffset(timeZone, originalDate) {\n var timeZoneOffset = timeZone ? (0, _index2.default)(timeZone, originalDate, true) / MILLISECONDS_IN_MINUTE : originalDate.getTimezoneOffset();\n\n if (Number.isNaN(timeZoneOffset)) {\n throw new RangeError('Invalid time zone specified: ' + timeZone);\n }\n\n return timeZoneOffset;\n}\n\nfunction addLeadingZeros(number, targetLength) {\n var sign = number < 0 ? '-' : '';\n var output = Math.abs(number).toString();\n\n while (output.length < targetLength) {\n output = '0' + output;\n }\n\n return sign + output;\n}\n\nfunction formatTimezone(offset, dirtyDelimeter) {\n var delimeter = dirtyDelimeter || '';\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);\n var minutes = addLeadingZeros(Math.floor(absOffset % 60), 2);\n return sign + hours + delimeter + minutes;\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, dirtyDelimeter) {\n if (offset % 60 === 0) {\n var sign = offset > 0 ? '-' : '+';\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n\n return formatTimezone(offset, dirtyDelimeter);\n}\n\nfunction formatTimezoneShort(offset, dirtyDelimeter) {\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = Math.floor(absOffset / 60);\n var minutes = absOffset % 60;\n\n if (minutes === 0) {\n return sign + String(hours);\n }\n\n var delimeter = dirtyDelimeter || '';\n return sign + String(hours) + delimeter + addLeadingZeros(minutes, 2);\n}\n\nvar _default = formatters;\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n/** Regex to identify the presence of a time zone specifier in a date string */\nvar tzPattern = /(Z|[+-]\\d{2}(?::?\\d{2})?| UTC| [a-zA-Z]+\\/[a-zA-Z_]+(?:\\/[a-zA-Z_]+)?)$/;\nvar _default = tzPattern;\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = toDate;\n\nvar _index = _interopRequireDefault(require(\"date-fns/_lib/toInteger/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"date-fns/_lib/getTimezoneOffsetInMilliseconds/index.js\"));\n\nvar _index3 = _interopRequireDefault(require(\"../_lib/tzParseTimezone/index.js\"));\n\nvar _index4 = _interopRequireDefault(require(\"../_lib/tzPattern/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MILLISECONDS_IN_HOUR = 3600000;\nvar MILLISECONDS_IN_MINUTE = 60000;\nvar DEFAULT_ADDITIONAL_DIGITS = 2;\nvar patterns = {\n dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,\n datePattern: /^([0-9W+-]+)(.*)/,\n plainTime: /:/,\n // year tokens\n YY: /^(\\d{2})$/,\n YYY: [/^([+-]\\d{2})$/, // 0 additional digits\n /^([+-]\\d{3})$/, // 1 additional digit\n /^([+-]\\d{4})$/ // 2 additional digits\n ],\n YYYY: /^(\\d{4})/,\n YYYYY: [/^([+-]\\d{4})/, // 0 additional digits\n /^([+-]\\d{5})/, // 1 additional digit\n /^([+-]\\d{6})/ // 2 additional digits\n ],\n // date tokens\n MM: /^-(\\d{2})$/,\n DDD: /^-?(\\d{3})$/,\n MMDD: /^-?(\\d{2})-?(\\d{2})$/,\n Www: /^-?W(\\d{2})$/,\n WwwD: /^-?W(\\d{2})-?(\\d{1})$/,\n HH: /^(\\d{2}([.,]\\d*)?)$/,\n HHMM: /^(\\d{2}):?(\\d{2}([.,]\\d*)?)$/,\n HHMMSS: /^(\\d{2}):?(\\d{2}):?(\\d{2}([.,]\\d*)?)$/,\n // time zone tokens (to identify the presence of a tz)\n timeZone: _index4.default\n};\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If an argument is a string, the function tries to parse it.\n * Function accepts complete ISO 8601 formats as well as partial implementations.\n * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n * If the function cannot parse the string or the values are invalid, it returns Invalid Date.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n * All *date-fns* functions will throw `RangeError` if `options.additionalDigits` is not 0, 1, 2 or undefined.\n *\n * @param {Date|String|Number} argument - the value to convert\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] - the additional number of digits in the extended year format\n * @param {String} [options.timeZone=''] - used to specify the IANA time zone offset of a date String.\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // Convert string '2014-02-11T11:30:30' to date:\n * var result = toDate('2014-02-11T11:30:30')\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert string '+02014101' to date,\n * // if the additional number of digits in the extended year format is 1:\n * var result = toDate('+02014101', {additionalDigits: 1})\n * //=> Fri Apr 11 2014 00:00:00\n */\n\nfunction toDate(argument, dirtyOptions) {\n if (arguments.length < 1) {\n throw new TypeError('1 argument required, but only ' + arguments.length + ' present');\n }\n\n if (argument === null) {\n return new Date(NaN);\n }\n\n var options = dirtyOptions || {};\n var additionalDigits = options.additionalDigits == null ? DEFAULT_ADDITIONAL_DIGITS : (0, _index.default)(options.additionalDigits);\n\n if (additionalDigits !== 2 && additionalDigits !== 1 && additionalDigits !== 0) {\n throw new RangeError('additionalDigits must be 0, 1 or 2');\n } // Clone the date\n\n\n if (argument instanceof Date || typeof argument === 'object' && Object.prototype.toString.call(argument) === '[object Date]') {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime());\n } else if (typeof argument === 'number' || Object.prototype.toString.call(argument) === '[object Number]') {\n return new Date(argument);\n } else if (!(typeof argument === 'string' || Object.prototype.toString.call(argument) === '[object String]')) {\n return new Date(NaN);\n }\n\n var dateStrings = splitDateString(argument);\n var parseYearResult = parseYear(dateStrings.date, additionalDigits);\n var year = parseYearResult.year;\n var restDateString = parseYearResult.restDateString;\n var date = parseDate(restDateString, year);\n\n if (isNaN(date)) {\n return new Date(NaN);\n }\n\n if (date) {\n var timestamp = date.getTime();\n var time = 0;\n var offset;\n\n if (dateStrings.time) {\n time = parseTime(dateStrings.time);\n\n if (isNaN(time)) {\n return new Date(NaN);\n }\n }\n\n if (dateStrings.timeZone || options.timeZone) {\n offset = (0, _index3.default)(dateStrings.timeZone || options.timeZone, new Date(timestamp + time));\n\n if (isNaN(offset)) {\n return new Date(NaN);\n }\n } else {\n // get offset accurate to hour in time zones that change offset\n offset = (0, _index2.default)(new Date(timestamp + time));\n offset = (0, _index2.default)(new Date(timestamp + time + offset));\n }\n\n return new Date(timestamp + time + offset);\n } else {\n return new Date(NaN);\n }\n}\n\nfunction splitDateString(dateString) {\n var dateStrings = {};\n var parts = patterns.dateTimePattern.exec(dateString);\n var timeString;\n\n if (!parts) {\n parts = patterns.datePattern.exec(dateString);\n\n if (parts) {\n dateStrings.date = parts[1];\n timeString = parts[2];\n } else {\n dateStrings.date = null;\n timeString = dateString;\n }\n } else {\n dateStrings.date = parts[1];\n timeString = parts[3];\n }\n\n if (timeString) {\n var token = patterns.timeZone.exec(timeString);\n\n if (token) {\n dateStrings.time = timeString.replace(token[1], '');\n dateStrings.timeZone = token[1].trim();\n } else {\n dateStrings.time = timeString;\n }\n }\n\n return dateStrings;\n}\n\nfunction parseYear(dateString, additionalDigits) {\n var patternYYY = patterns.YYY[additionalDigits];\n var patternYYYYY = patterns.YYYYY[additionalDigits];\n var token; // YYYY or ±YYYYY\n\n token = patterns.YYYY.exec(dateString) || patternYYYYY.exec(dateString);\n\n if (token) {\n var yearString = token[1];\n return {\n year: parseInt(yearString, 10),\n restDateString: dateString.slice(yearString.length)\n };\n } // YY or ±YYY\n\n\n token = patterns.YY.exec(dateString) || patternYYY.exec(dateString);\n\n if (token) {\n var centuryString = token[1];\n return {\n year: parseInt(centuryString, 10) * 100,\n restDateString: dateString.slice(centuryString.length)\n };\n } // Invalid ISO-formatted year\n\n\n return {\n year: null\n };\n}\n\nfunction parseDate(dateString, year) {\n // Invalid ISO-formatted year\n if (year === null) {\n return null;\n }\n\n var token;\n var date;\n var month;\n var week; // YYYY\n\n if (dateString.length === 0) {\n date = new Date(0);\n date.setUTCFullYear(year);\n return date;\n } // YYYY-MM\n\n\n token = patterns.MM.exec(dateString);\n\n if (token) {\n date = new Date(0);\n month = parseInt(token[1], 10) - 1;\n\n if (!validateDate(year, month)) {\n return new Date(NaN);\n }\n\n date.setUTCFullYear(year, month);\n return date;\n } // YYYY-DDD or YYYYDDD\n\n\n token = patterns.DDD.exec(dateString);\n\n if (token) {\n date = new Date(0);\n var dayOfYear = parseInt(token[1], 10);\n\n if (!validateDayOfYearDate(year, dayOfYear)) {\n return new Date(NaN);\n }\n\n date.setUTCFullYear(year, 0, dayOfYear);\n return date;\n } // yyyy-MM-dd or YYYYMMDD\n\n\n token = patterns.MMDD.exec(dateString);\n\n if (token) {\n date = new Date(0);\n month = parseInt(token[1], 10) - 1;\n var day = parseInt(token[2], 10);\n\n if (!validateDate(year, month, day)) {\n return new Date(NaN);\n }\n\n date.setUTCFullYear(year, month, day);\n return date;\n } // YYYY-Www or YYYYWww\n\n\n token = patterns.Www.exec(dateString);\n\n if (token) {\n week = parseInt(token[1], 10) - 1;\n\n if (!validateWeekDate(year, week)) {\n return new Date(NaN);\n }\n\n return dayOfISOWeekYear(year, week);\n } // YYYY-Www-D or YYYYWwwD\n\n\n token = patterns.WwwD.exec(dateString);\n\n if (token) {\n week = parseInt(token[1], 10) - 1;\n var dayOfWeek = parseInt(token[2], 10) - 1;\n\n if (!validateWeekDate(year, week, dayOfWeek)) {\n return new Date(NaN);\n }\n\n return dayOfISOWeekYear(year, week, dayOfWeek);\n } // Invalid ISO-formatted date\n\n\n return null;\n}\n\nfunction parseTime(timeString) {\n var token;\n var hours;\n var minutes; // hh\n\n token = patterns.HH.exec(timeString);\n\n if (token) {\n hours = parseFloat(token[1].replace(',', '.'));\n\n if (!validateTime(hours)) {\n return NaN;\n }\n\n return hours % 24 * MILLISECONDS_IN_HOUR;\n } // hh:mm or hhmm\n\n\n token = patterns.HHMM.exec(timeString);\n\n if (token) {\n hours = parseInt(token[1], 10);\n minutes = parseFloat(token[2].replace(',', '.'));\n\n if (!validateTime(hours, minutes)) {\n return NaN;\n }\n\n return hours % 24 * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE;\n } // hh:mm:ss or hhmmss\n\n\n token = patterns.HHMMSS.exec(timeString);\n\n if (token) {\n hours = parseInt(token[1], 10);\n minutes = parseInt(token[2], 10);\n var seconds = parseFloat(token[3].replace(',', '.'));\n\n if (!validateTime(hours, minutes, seconds)) {\n return NaN;\n }\n\n return hours % 24 * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE + seconds * 1000;\n } // Invalid ISO-formatted time\n\n\n return null;\n}\n\nfunction dayOfISOWeekYear(isoWeekYear, week, day) {\n week = week || 0;\n day = day || 0;\n var date = new Date(0);\n date.setUTCFullYear(isoWeekYear, 0, 4);\n var fourthOfJanuaryDay = date.getUTCDay() || 7;\n var diff = week * 7 + day + 1 - fourthOfJanuaryDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n} // Validation functions\n\n\nvar DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nvar DAYS_IN_MONTH_LEAP_YEAR = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\nfunction isLeapYearIndex(year) {\n return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;\n}\n\nfunction validateDate(year, month, date) {\n if (month < 0 || month > 11) {\n return false;\n }\n\n if (date != null) {\n if (date < 1) {\n return false;\n }\n\n var isLeapYear = isLeapYearIndex(year);\n\n if (isLeapYear && date > DAYS_IN_MONTH_LEAP_YEAR[month]) {\n return false;\n }\n\n if (!isLeapYear && date > DAYS_IN_MONTH[month]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction validateDayOfYearDate(year, dayOfYear) {\n if (dayOfYear < 1) {\n return false;\n }\n\n var isLeapYear = isLeapYearIndex(year);\n\n if (isLeapYear && dayOfYear > 366) {\n return false;\n }\n\n if (!isLeapYear && dayOfYear > 365) {\n return false;\n }\n\n return true;\n}\n\nfunction validateWeekDate(year, week, day) {\n if (week < 0 || week > 52) {\n return false;\n }\n\n if (day != null && (day < 0 || day > 6)) {\n return false;\n }\n\n return true;\n}\n\nfunction validateTime(hours, minutes, seconds) {\n if (hours != null && (hours < 0 || hours >= 25)) {\n return false;\n }\n\n if (minutes != null && (minutes < 0 || minutes >= 60)) {\n return false;\n }\n\n if (seconds != null && (seconds < 0 || seconds >= 60)) {\n return false;\n }\n\n return true;\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = format;\n\nvar _index = _interopRequireDefault(require(\"date-fns/format/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"./formatters/index.js\"));\n\nvar _index3 = _interopRequireDefault(require(\"../toDate/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar tzFormattingTokensRegExp = /([xXOz]+)|''|'(''|[^'])+('|$)/g;\n/**\n * @name format\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://git.io/fxCyr\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 8 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 8 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Su | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Su, Sa | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Su | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Su, Sa | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Su | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Su, Sa | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Su | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Su, Sa | |\n * | AM, PM | a..aaa | AM, PM | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bbb | AM, PM, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 1, 2, ..., 11, 0 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 0001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | PDT, EST, CEST | 6 |\n * | | zzzz | Pacific Daylight Time | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 05/29/1453 | 7 |\n * | | PP | May 29, 1453 | 7 |\n * | | PPP | May 29th, 1453 | 7 |\n * | | PPPP | Sunday, May 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 05/29/1453, 12:00 AM | 7 |\n * | | PPpp | May 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | May 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Sunday, May 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}\n * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).\n *\n * 6. Specific non-location timezones are created using the Intl browser API. The output is determined by the\n * preferred standard of the current locale (en-US by default) which may not always give the expected result.\n * For this reason it is recommended to supply a `locale` in the format options when formatting a time zone name.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. These tokens are often confused with others. See: https://git.io/fxCyr\n *\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole\n * library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The second argument is now required for the sake of explicitness.\n *\n * ```javascript\n * // Before v2.0.0\n * format(new Date(2016, 0, 1))\n *\n * // v2.0.0 onward\n * format(new Date(2016, 0, 1), \"yyyy-MM-dd'T'HH:mm:ss.SSSxxx\")\n * ```\n *\n * - New format string API for `format` function\n * which is based on [Unicode Technical Standard\n * #35](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table). See [this\n * post](https://blog.date-fns.org/post/unicode-tokens-in-date-fns-v2-sreatyki91jg) for more details.\n *\n * - Characters are now escaped using single quote symbols (`'`) instead of square brackets.\n *\n * @param {Date|Number} date - the original date\n * @param {String} format - the string of tokens\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\n * https://date-fns.org/docs/toDate}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See\n * [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {Boolean} [options.awareOfUnicodeTokens=false] - if true, allows usage of Unicode tokens causes confusion:\n * - Some of the day of year tokens (`D`, `DD`) that are confused with the day of month tokens (`d`, `dd`).\n * - Some of the local week-numbering year tokens (`YY`, `YYYY`) that are confused with the calendar year tokens\n * (`yy`, `yyyy`). See: https://git.io/fxCyr\n * @param {String} [options.timeZone=''] - used to specify the IANA time zone offset of a date String.\n * @returns {String} the formatted date string\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n * @throws {RangeError} `options.locale` must contain `localize` property\n * @throws {RangeError} `options.locale` must contain `formatLong` property\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} `options.awareOfUnicodeTokens` must be set to `true` to use `XX` token; see:\n * https://git.io/fxCyr\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * var result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * var result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * var result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\n\nfunction format(dirtyDate, dirtyFormatStr, dirtyOptions) {\n var formatStr = String(dirtyFormatStr);\n var options = dirtyOptions || {};\n var matches = formatStr.match(tzFormattingTokensRegExp);\n\n if (matches) {\n var date = (0, _index3.default)(dirtyDate, options); // Work through each match and replace the tz token in the format string with the quoted\n // formatted time zone so the remaining tokens can be filled in by date-fns#format.\n\n formatStr = matches.reduce(function (result, token) {\n if (token[0] === \"'\") {\n return result; // This is a quoted portion, matched only to ensure we don't match inside it\n }\n\n var pos = result.indexOf(token);\n var precededByQuotedSection = result[pos - 1] === \"'\";\n var replaced = result.replace(token, \"'\" + _index2.default[token[0]](date, token, null, options) + \"'\"); // If the replacement results in two adjoining quoted strings, the back to back quotes\n // are removed, so it doesn't look like an escaped quote.\n\n return precededByQuotedSection ? replaced.substring(0, pos - 1) + replaced.substring(pos + 1) : replaced;\n }, formatStr);\n }\n\n return (0, _index.default)(dirtyDate, formatStr, options);\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = assign;\n\nfunction assign(target, dirtyObject) {\n if (target == null) {\n throw new TypeError('assign requires that input parameter not be null or undefined');\n }\n\n dirtyObject = dirtyObject || {};\n\n for (var property in dirtyObject) {\n if (dirtyObject.hasOwnProperty(property)) {\n target[property] = dirtyObject[property];\n }\n }\n\n return target;\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = cloneObject;\n\nvar _index = _interopRequireDefault(require(\"../assign/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction cloneObject(dirtyObject) {\n return (0, _index.default)({}, dirtyObject);\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = utcToZonedTime;\n\nvar _index = _interopRequireDefault(require(\"../_lib/tzParseTimezone/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../toDate/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\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 */\nfunction utcToZonedTime(dirtyDate, timeZone, options) {\n var date = (0, _index2.default)(dirtyDate, options);\n var offsetMilliseconds = (0, _index.default)(timeZone, date, true);\n var d = new Date(date.getTime() - offsetMilliseconds);\n var resultDate = new Date(0);\n resultDate.setFullYear(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate());\n resultDate.setHours(d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds());\n return resultDate;\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = formatInTimeZone;\n\nvar _index = _interopRequireDefault(require(\"date-fns/_lib/cloneObject/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../format/index.js\"));\n\nvar _index3 = _interopRequireDefault(require(\"../utcToZonedTime/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @name formatInTimeZone\n * @category Time Zone Helpers\n * @summary Gets the offset in milliseconds between the time zone and Universal Coordinated Time (UTC)\n *\n * @param {Date|String|Number} date - the date representing the local time / real UTC time\n * @param {String} timeZone - the time zone this date should be formatted for; can be an offset or IANA time zone\n * @param {String} formatStr - the string of tokens\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\n * https://date-fns.org/docs/toDate}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See\n * [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {Boolean} [options.awareOfUnicodeTokens=false] - if true, allows usage of Unicode tokens causes confusion:\n * - Some of the day of year tokens (`D`, `DD`) that are confused with the day of month tokens (`d`, `dd`).\n * - Some of the local week-numbering year tokens (`YY`, `YYYY`) that are confused with the calendar year tokens\n * (`yy`, `yyyy`). See: https://git.io/fxCyr\n * @param {String} [options.timeZone=''] - used to specify the IANA time zone offset of a date String.\n * @returns {String} the formatted date string\n */\nfunction formatInTimeZone(date, timeZone, formatStr, options) {\n var extendedOptions = (0, _index.default)(options);\n extendedOptions.timeZone = timeZone;\n return (0, _index2.default)((0, _index3.default)(date, timeZone), formatStr, extendedOptions);\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = getTimezoneOffset;\n\nvar _index = _interopRequireDefault(require(\"../_lib/tzParseTimezone/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @name getTimezoneOffset\n * @category Time Zone Helpers\n * @summary Gets the offset in milliseconds between the time zone and Universal Coordinated Time (UTC)\n *\n * @description\n * Returns the time zone offset from UTC time in milliseconds for IANA time zones as well\n * as other time zone offset string formats.\n *\n * For time zones where daylight savings time is applicable a `Date` should be passed on\n * the second parameter to ensure the offset correctly accounts for DST at that time of\n * year. When omitted, the current date is used.\n *\n * @param {String} timeZone - the time zone of this local time, can be an offset or IANA time zone\n * @param {Date|Number} [date] - the date with values representing the local time\n * @returns {Number} the time zone offset in milliseconds\n *\n * @example\n * const result = getTimezoneOffset('-07:00')\n * //=> -18000000 (-7 * 60 * 60 * 1000)\n * const result = getTimezoneOffset('Africa/Johannesburg')\n * //=> 7200000 (2 * 60 * 60 * 1000)\n * const result = getTimezoneOffset('America/New_York', new Date(2016, 0, 1))\n * //=> -18000000 (-5 * 60 * 60 * 1000)\n * const result = getTimezoneOffset('America/New_York', new Date(2016, 6, 1))\n * //=> -14400000 (-4 * 60 * 60 * 1000)\n */\nfunction getTimezoneOffset(timeZone, date) {\n return -(0, _index.default)(timeZone, date);\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = zonedTimeToUtc;\n\nvar _index = _interopRequireDefault(require(\"date-fns/_lib/cloneObject/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../toDate/index.js\"));\n\nvar _index3 = _interopRequireDefault(require(\"../_lib/tzPattern/index.js\"));\n\nvar _index4 = _interopRequireDefault(require(\"../_lib/tzParseTimezone/index.js\"));\n\nvar _index5 = _interopRequireDefault(require(\"../_lib/newDateUTC/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @name zonedTimeToUtc\n * @category Time Zone Helpers\n * @summary Get the UTC date/time from a date representing local time in a given time zone\n *\n * @description\n * Returns a date instance with the UTC time of the provided date of which the values\n * represented the local time in the time zone specified. In other words, if the input\n * date represented local time in time time zone, the timestamp of the output date will\n * give the equivalent UTC of that local time regardless of the current system time zone.\n *\n * @param {Date|String|Number} date - the date with values representing the local time\n * @param {String} timeZone - the time zone of this local time, 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 in Los Angeles is 5pm UTC\n * const result = zonedTimeToUtc(new Date(2014, 5, 25, 10, 0, 0), 'America/Los_Angeles')\n * //=> 2014-06-25T17:00:00.000Z\n */\nfunction zonedTimeToUtc(date, timeZone, options) {\n if (typeof date === 'string' && !date.match(_index3.default)) {\n var extendedOptions = (0, _index.default)(options);\n extendedOptions.timeZone = timeZone;\n return (0, _index2.default)(date, extendedOptions);\n }\n\n var d = (0, _index2.default)(date, options);\n var utc = (0, _index5.default)(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds(), d.getMilliseconds()).getTime();\n var offsetMilliseconds = (0, _index4.default)(timeZone, new Date(utc));\n return new Date(utc + offsetMilliseconds);\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\n// This file is generated automatically by `scripts/build/indices.js`. Please, don't change it.\nmodule.exports = {\n format: require('./format/index.js'),\n formatInTimeZone: require('./formatInTimeZone/index.js'),\n getTimezoneOffset: require('./getTimezoneOffset/index.js'),\n toDate: require('./toDate/index.js'),\n utcToZonedTime: require('./utcToZonedTime/index.js'),\n zonedTimeToUtc: require('./zonedTimeToUtc/index.js')\n};","import { utcToZonedTime } from 'date-fns-tz';\nimport { isTimeAfter } from 'shared/helpers/DateHelper';\n\nexport default {\n computed: {\n channelConfig() {\n return window.chatwootWebChannel;\n },\n replyTime() {\n return window.chatwootWebChannel.replyTime;\n },\n replyTimeStatus() {\n switch (this.replyTime) {\n case 'in_a_few_minutes':\n return this.$t('REPLY_TIME.IN_A_FEW_MINUTES');\n case 'in_a_few_hours':\n return this.$t('REPLY_TIME.IN_A_FEW_HOURS');\n case 'in_a_day':\n return this.$t('REPLY_TIME.IN_A_DAY');\n default:\n return this.$t('REPLY_TIME.IN_A_FEW_HOURS');\n }\n },\n replyWaitMessage() {\n const { workingHoursEnabled } = this.channelConfig;\n if (workingHoursEnabled) {\n return this.isOnline\n ? this.replyTimeStatus\n : `${this.$t('REPLY_TIME.BACK_IN')} ${this.timeLeftToBackInOnline}`;\n }\n return this.isOnline\n ? this.replyTimeStatus\n : this.$t('TEAM_AVAILABILITY.OFFLINE');\n },\n outOfOfficeMessage() {\n return this.channelConfig.outOfOfficeMessage;\n },\n isInBetweenTheWorkingHours() {\n const currentDayWorkingHours = this.currentDayAvailability;\n\n if (currentDayWorkingHours.length === 1) {\n let firstWorkingHour = currentDayWorkingHours[0];\n if (firstWorkingHour.open_all_day) {\n return true;\n }\n \n if (firstWorkingHour.closed_all_day) {\n return false;\n }\n }\n\n const { utcOffset } = this.channelConfig;\n const today = this.getDateWithOffset(utcOffset);\n const currentHours = today.getHours();\n const currentMinutes = today.getMinutes();\n \n for (const workingHour of currentDayWorkingHours) {\n const isAfterStartTime = isTimeAfter(\n currentHours,\n currentMinutes,\n workingHour.open_hour,\n workingHour.open_minutes\n );\n const isBeforeEndTime = isTimeAfter(\n workingHour.close_hour,\n workingHour.close_minutes,\n currentHours,\n currentMinutes\n );\n\n if (isAfterStartTime && isBeforeEndTime) {\n return true;\n }\n }\n\n return false;\n },\n currentDayAvailability() {\n const { utcOffset, overrideDates } = this.channelConfig;\n const today = this.getDateWithOffset(utcOffset);\n const day = today.getDate();\n const month = today.getMonth() + 1;\n const year = today.getFullYear();\n\n const overrideDate = overrideDates.find(\n date => date.day === day && date.month === month && date.year === year\n );\n\n if (overrideDate) {\n return overrideDate.working_hours;\n }\n\n const dayOfTheWeek = this.getDateWithOffset(utcOffset).getDay();\n const workingHourConfig = this.channelConfig.workingHours.filter(\n workingHour => workingHour.day_of_week === dayOfTheWeek\n );\n return workingHourConfig;\n },\n isInBusinessHours() {\n const { workingHoursEnabled } = this.channelConfig;\n return workingHoursEnabled ? this.isInBetweenTheWorkingHours : true;\n },\n },\n\n methods: {\n getDateWithOffset(utcOffset) {\n return utcToZonedTime(new Date().toISOString(), utcOffset);\n },\n },\n};\n","export default {\n methods: {\n async replaceRoute(name, params = {}) {\n if (this.$route.name !== name) {\n return this.$router.replace({ name, params });\n }\n return undefined;\n },\n },\n};\n","export const loadedEventConfig = () => {\n return {\n event: 'loaded',\n config: {\n authToken: window.authToken,\n channelConfig: window.chatwootWebChannel,\n },\n };\n};\n\nexport const getExtraSpaceToScroll = () => {\n // This function calculates the extra space needed for the view to\n // accommodate the height of close button + height of\n // read messages button. So that scrollbar won't appear\n const unreadMessageWrap = document.querySelector('.unread-messages');\n const unreadCloseWrap = document.querySelector('.close-unread-wrap');\n const readViewWrap = document.querySelector('.open-read-view-wrap');\n\n if (!unreadMessageWrap) return 0;\n\n // 24px to compensate the paddings\n let extraHeight = 48 + unreadMessageWrap.scrollHeight;\n if (unreadCloseWrap) extraHeight += unreadCloseWrap.scrollHeight;\n if (readViewWrap) extraHeight += readViewWrap.scrollHeight;\n\n return extraHeight;\n};\n\nexport const shouldTriggerMessageUpdateEvent = message => {\n const { previous_changes: previousChanges } = message;\n\n if (!previousChanges) {\n return false;\n }\n const hasNotifiableAttributeChanges =\n Object.keys(previousChanges).includes('content_attributes');\n if (!hasNotifiableAttributeChanges) {\n return false;\n }\n\n const hasSubmittedValueChanges = Object.keys(\n previousChanges.content_attributes[1] || {}\n ).includes('submitted_values');\n\n return hasSubmittedValueChanges;\n};\n","import { computed } from 'vue';\nimport { useMapGetter } from 'dashboard/composables/store';\n\nconst isDarkModeAuto = mode => mode === 'auto';\nconst isDarkMode = mode => mode === 'dark';\n\nconst getSystemPreference = () =>\n window.matchMedia?.('(prefers-color-scheme: dark)').matches ?? false;\n\nconst calculatePrefersDarkMode = (mode, systemPreference) =>\n isDarkModeAuto(mode) ? systemPreference : isDarkMode(mode);\n\nconst calculateThemeClass = (mode, light, dark) => {\n if (isDarkModeAuto(mode)) return `${light} ${dark}`;\n return isDarkMode(mode) ? dark : light;\n};\n\n/**\n * Composable for handling dark mode.\n * @returns {Object} An object containing computed properties and methods for dark mode.\n */\nexport function useDarkMode() {\n const darkMode = useMapGetter('appConfig/darkMode');\n\n const systemPreference = computed(getSystemPreference);\n\n const prefersDarkMode = computed(() =>\n calculatePrefersDarkMode(darkMode.value, systemPreference.value)\n );\n\n const getThemeClass = (light, dark) =>\n calculateThemeClass(darkMode.value, light, dark);\n\n return {\n darkMode,\n prefersDarkMode,\n getThemeClass,\n };\n}\n","\n\n\n \n \n \n \n \n \n\n\n\n","import { IFrameHelper } from 'widget/helpers/utils';\n\nexport const playNewMessageNotificationInWidget = () => {\n IFrameHelper.sendMessage({ event: 'playAudio' });\n};\n","import BaseActionCableConnector from '../../shared/helpers/BaseActionCableConnector';\nimport { playNewMessageNotificationInWidget } from 'widget/helpers/WidgetAudioNotificationHelper';\nimport { ON_AGENT_MESSAGE_RECEIVED } from '../constants/widgetBusEvents';\nimport { IFrameHelper } from 'widget/helpers/utils';\nimport { shouldTriggerMessageUpdateEvent } from './IframeEventHelper';\nimport { CHATWOOT_ON_MESSAGE } from '../constants/sdkEvents';\nimport { emitter } from '../../shared/helpers/mitt';\n\nconst isMessageInActiveConversation = (getters, message) => {\n const { conversation_id: conversationId } = message;\n const activeConversationId =\n getters['conversationAttributes/getConversationParams'].id;\n return activeConversationId && conversationId !== activeConversationId;\n};\n\nclass ActionCableConnector extends BaseActionCableConnector {\n constructor(app, pubsubToken) {\n super(app, pubsubToken);\n this.events = {\n 'message.created': this.onMessageCreated,\n 'message.updated': this.onMessageUpdated,\n 'conversation.typing_on': this.onTypingOn,\n 'conversation.typing_off': this.onTypingOff,\n 'conversation.status_changed': this.onStatusChange,\n 'conversation.created': this.onConversationCreated,\n 'presence.update': this.onPresenceUpdate,\n 'contact.merged': this.onContactMerge,\n };\n }\n\n onDisconnected = () => {\n this.setLastMessageId();\n };\n\n onReconnect = () => {\n this.syncLatestMessages();\n };\n\n setLastMessageId = () => {\n this.app.$store.dispatch('conversation/setLastMessageId');\n };\n\n syncLatestMessages = () => {\n this.app.$store.dispatch('conversation/syncLatestMessages');\n };\n\n onStatusChange = data => {\n if (data.status === 'resolved') {\n this.app.$store.dispatch('campaign/resetCampaign');\n }\n this.app.$store.dispatch('conversationAttributes/update', data);\n };\n\n onMessageCreated = data => {\n if (isMessageInActiveConversation(this.app.$store.getters, data)) {\n return;\n }\n\n this.app.$store\n .dispatch('conversation/addOrUpdateMessage', data)\n .then(() => emitter.emit(ON_AGENT_MESSAGE_RECEIVED));\n\n IFrameHelper.sendMessage({\n event: 'onEvent',\n eventIdentifier: CHATWOOT_ON_MESSAGE,\n data,\n });\n if (data.sender_type === 'User') {\n playNewMessageNotificationInWidget();\n }\n };\n\n onMessageUpdated = data => {\n if (isMessageInActiveConversation(this.app.$store.getters, data)) {\n return;\n }\n\n if (shouldTriggerMessageUpdateEvent(data)) {\n IFrameHelper.sendMessage({\n event: 'onEvent',\n eventIdentifier: CHATWOOT_ON_MESSAGE,\n data,\n });\n }\n\n this.app.$store.dispatch('conversation/addOrUpdateMessage', data);\n };\n\n onConversationCreated = () => {\n this.app.$store.dispatch('conversationAttributes/getAttributes');\n };\n\n onPresenceUpdate = data => {\n this.app.$store.dispatch('agent/updatePresence', data.users);\n };\n\n // eslint-disable-next-line class-methods-use-this\n onContactMerge = data => {\n const { pubsub_token: pubsubToken } = data;\n ActionCableConnector.refreshConnector(pubsubToken);\n };\n\n onTypingOn = data => {\n const activeConversationId =\n this.app.$store.getters['conversationAttributes/getConversationParams']\n .id;\n const isUserTypingOnAnotherConversation =\n data.conversation && data.conversation.id !== activeConversationId;\n\n if (isUserTypingOnAnotherConversation || data.is_private) {\n return;\n }\n this.clearTimer();\n this.app.$store.dispatch('conversation/toggleAgentTyping', {\n status: 'on',\n });\n this.initTimer();\n };\n\n onTypingOff = () => {\n this.clearTimer();\n this.app.$store.dispatch('conversation/toggleAgentTyping', {\n status: 'off',\n });\n };\n\n clearTimer = () => {\n if (this.CancelTyping) {\n clearTimeout(this.CancelTyping);\n this.CancelTyping = null;\n }\n };\n\n initTimer = () => {\n // Turn off typing automatically after 30 seconds\n this.CancelTyping = setTimeout(() => {\n this.onTypingOff();\n }, 30000);\n };\n}\n\nexport default ActionCableConnector;\n","\n\n\n\n \n \n {{ bannerMessage }}\n \n \n\n\n\n","import { utcToZonedTime } from 'date-fns-tz';\nimport { generateRelativeTime, isTimeAfter } from 'shared/helpers/DateHelper';\nimport { defaultTimeSlot } from 'dashboard/routes/dashboard/settings/inbox/helpers/businessHour';\n\nconst MINUTE_ROUNDING_FACTOR = 5;\n\nexport default {\n data() {\n return {\n dayNames: [\n this.$t('DAY_NAMES.SUNDAY'),\n this.$t('DAY_NAMES.MONDAY'),\n this.$t('DAY_NAMES.TUESDAY'),\n this.$t('DAY_NAMES.WEDNESDAY'),\n this.$t('DAY_NAMES.THURSDAY'),\n this.$t('DAY_NAMES.FRIDAY'),\n this.$t('DAY_NAMES.SATURDAY'),\n ],\n timeSlots: [...defaultTimeSlot],\n timeSlot: {},\n };\n },\n computed: {\n channelConfig() {\n return window.chatwootWebChannel;\n },\n workingHours() {\n return this.channelConfig.workingHours;\n },\n newDateWithTimeZone() {\n return utcToZonedTime(new Date(), this.timeZoneValue);\n },\n presentHour() {\n return this.newDateWithTimeZone.getHours();\n },\n presentMinute() {\n return this.newDateWithTimeZone.getMinutes();\n },\n timeZoneValue() {\n return this.channelConfig.timezone;\n },\n currentDayWorkingHours() {\n const { utcOffset, overrideDates } = this.channelConfig;\n const today = this.getDateWithOffset(utcOffset);\n const day = today.getDate();\n const month = today.getMonth() + 1;\n const year = today.getFullYear();\n\n const overrideDate = overrideDates.find(\n date => date.day === day && date.month === month && date.year === year\n );\n\n if (overrideDate) {\n return overrideDate.working_hours;\n }\n\n const dayOfTheWeek = this.getDateWithOffset(utcOffset).getDay();\n const workingHourConfig = this.channelConfig.workingHours.filter(\n workingHour => workingHour.day_of_week === dayOfTheWeek\n );\n return workingHourConfig;\n },\n nextWorkingHour() {\n const { utcOffset, overrideDates } = this.channelConfig;\n let workingHours = this.currentDayWorkingHours;\n\n for (const workingHour of workingHours) {\n if (\n isTimeAfter(\n workingHour.open_hour,\n workingHour.open_minutes,\n this.presentHour,\n this.presentMinute\n )\n ) {\n let dayOffset = 0;\n return { workingHour, dayOffset };\n }\n }\n\n let dayOffset = 1;\n const currentDate = this.getDateWithOffset(utcOffset);\n\n while (true) {\n const nextDay = (currentDate.getDay() + dayOffset) % 7;\n const nextDate = new Date(currentDate);\n nextDate.setDate(nextDate.getDate() + dayOffset);\n const nextDayOfMonth = nextDate.getDate();\n const nextMonth = nextDate.getMonth() + 1;\n const nextYear = nextDate.getFullYear();\n\n const nextDayOverrideDate = overrideDates.find(\n date => date.day === nextDayOfMonth && date.month === nextMonth && date.year === nextYear\n );\n\n let nextDayWorkingHours;\n if (nextDayOverrideDate) {\n nextDayWorkingHours = nextDayOverrideDate.working_hours;\n } else {\n nextDayWorkingHours = this.channelConfig.workingHours.filter(\n workingHour => workingHour.day_of_week === nextDay\n );\n }\n\n for (const workingHour of nextDayWorkingHours) {\n if (!workingHour.closed_all_day) {\n return { workingHour, dayOffset };\n }\n }\n\n dayOffset += 1;\n }\n },\n timeLeftToBackInOnline() {\n const { workingHour, dayOffset } = this.nextWorkingHour;\n\n const openHour = workingHour.open_hour;\n const openMinutes = workingHour.open_minutes;\n\n const timezone = this.channelConfig.utcOffset;\n if (dayOffset === 0) {\n return `${openHour}:${openMinutes < 10 ? '0' : ''}${openMinutes} UTC ${timezone}`;\n } else if (dayOffset <= 7) {\n const dayName = this.dayNames[workingHour.day_of_week];\n return `${dayName} ${openHour}:${openMinutes < 10 ? '0' : ''}${openMinutes} UTC ${timezone}`;\n } else {\n const nextDate = this.getDateWithOffset(this.channelConfig.utcOffset);\n nextDate.setDate(nextDate.getDate() + dayOffset);\n const formattedDate = nextDate.toLocaleDateString(this.$i18n.locale.replace(/_/g, '-'));\n return `${formattedDate} ${openHour}:${openMinutes < 10 ? '0' : ''}${openMinutes} UTC ${timezone}`;\n }\n }\n },\n};\n","\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n\n\n\n","\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n {{ replyWaitMessage }}\n \n \n \n \n \n\n","\n\n\n \n \n \n \n \n \n \n \n\n","\n\n\n \n \n \n \n \n \n \n \n\n \n \n \n\n\n\n","import { createRouter, createWebHashHistory } from 'vue-router';\nimport ViewWithHeader from './components/layouts/ViewWithHeader.vue';\n\nexport default createRouter({\n history: createWebHashHistory(),\n routes: [\n {\n path: '/unread-messages',\n name: 'unread-messages',\n component: () => import('./views/UnreadMessages.vue'),\n },\n {\n path: '/campaigns',\n name: 'campaigns',\n component: () => import('./views/Campaigns.vue'),\n },\n {\n path: '/',\n component: ViewWithHeader,\n children: [\n {\n path: '',\n name: 'home',\n component: () => import('./views/Home.vue'),\n },\n {\n path: '/prechat-form',\n name: 'prechat-form',\n component: () => import('./views/PreChatForm.vue'),\n },\n {\n path: '/messages',\n name: 'messages',\n component: () => import('./views/Messages.vue'),\n },\n {\n path: '/article',\n name: 'article-viewer',\n component: () => import('./views/ArticleViewer.vue'),\n },\n ],\n },\n ],\n});\n","import { createApp } from 'vue';\nimport { createI18n } from 'vue-i18n';\n\nimport VueDOMPurifyHTML from 'vue-dompurify-html';\nimport store from '../widget/store';\nimport App from '../widget/App.vue';\nimport ActionCableConnector from '../widget/helpers/actionCable';\nimport i18nMessages from '../widget/i18n';\nimport router from '../widget/router';\nimport { directive as onClickaway } from 'vue3-click-away';\nimport { domPurifyConfig } from '../shared/helpers/HTMLSanitizer';\nimport { plugin, defaultConfig } from '@formkit/vue';\n\nimport {\n startsWithPlus,\n isPhoneNumberValidWithDialCode,\n} from 'shared/helpers/Validators';\n\nconst i18n = createI18n({\n legacy: false, // https://github.com/intlify/vue-i18n/issues/1902\n locale: 'en',\n messages: i18nMessages,\n});\n\nconst app = createApp(App);\napp.use(i18n);\napp.use(store);\napp.use(router);\napp.use(VueDOMPurifyHTML, domPurifyConfig);\napp.directive('on-clickaway', onClickaway);\n\napp.use(\n plugin,\n defaultConfig({\n rules: {\n startsWithPlus: ({ value }) => startsWithPlus(value),\n isValidPhoneNumber: ({ value }) => isPhoneNumberValidWithDialCode(value),\n },\n })\n);\n\n// Event Bus\n// We can use the useEmitter directly\n// Vue.prototype.$emitter = emitter;\n\n// Vue.config.productionTip = false;\n\nwindow.onload = () => {\n window.WOOT_WIDGET = app.mount('#app');\n window.actionCable = new ActionCableConnector(\n window.WOOT_WIDGET,\n window.chatwootPubsubToken\n );\n};\n"],"file":"assets/widget-BYWK6umO.js"}