From 622750e493eb07beadf94396fc9fd254de892b70 Mon Sep 17 00:00:00 2001 From: Jia Xu Date: Tue, 22 Oct 2024 16:12:26 -0700 Subject: [PATCH 1/7] pull main --- .../ViewRoutingSlip/RefundRequestForm.vue | 6 ++-- .../ViewRoutingSlip/RoutingSlipInfo.vue | 1 + src/composables/Dashboard/useSearch.ts | 4 +-- .../ViewRoutingSlip/useRefundRequestForm.ts | 9 +++-- src/views/ViewRoutingSlip.vue | 33 +++++++++++++------ 5 files changed, 37 insertions(+), 16 deletions(-) diff --git a/src/components/ViewRoutingSlip/RefundRequestForm.vue b/src/components/ViewRoutingSlip/RefundRequestForm.vue index 1521213e..4e4fe656 100644 --- a/src/components/ViewRoutingSlip/RefundRequestForm.vue +++ b/src/components/ViewRoutingSlip/RefundRequestForm.vue @@ -24,7 +24,7 @@ {{ 'Address' }} @@ -128,6 +128,7 @@ import { useRoutingSlip } from '@/composables/useRoutingSlip' import { useSearch } from '@/composables/Dashboard/useSearch' export default defineComponent({ + name: 'RefundRequestForm', components: { AddressForm }, @@ -176,10 +177,11 @@ export default defineComponent({ const getRoutingSlipRequestPayload: GetRoutingSlipRequestPayload = { routingSlipNumber: routingSlipOperations.routingSlip.value?.number } await routingSlipOperations.getRoutingSlip(getRoutingSlipRequestPayload) } + context.emit('commentsUpdated') } return { - ...toRefs(state), // Convert all reactive properties to refs + ...toRefs(state), currentRefundStatusLabel, filteredStatuses, expendStatus, diff --git a/src/components/ViewRoutingSlip/RoutingSlipInfo.vue b/src/components/ViewRoutingSlip/RoutingSlipInfo.vue index da16f8af..df9b4a79 100644 --- a/src/components/ViewRoutingSlip/RoutingSlipInfo.vue +++ b/src/components/ViewRoutingSlip/RoutingSlipInfo.vue @@ -75,6 +75,7 @@ @update:refundRequestDetails="refundRequestDetails = $event" :isApprovalFlow="isApprovalFlow" :routingSlipDetails="routingSlipDetails" + @commentsUpdated="$emit('commentsUpdated')" > diff --git a/src/composables/Dashboard/useSearch.ts b/src/composables/Dashboard/useSearch.ts index 672e0d7c..464f2793 100644 --- a/src/composables/Dashboard/useSearch.ts +++ b/src/composables/Dashboard/useSearch.ts @@ -277,9 +277,9 @@ export function useSearch (props, context) { reachedEnd.value = await infiniteScrollCallback() }, 100) // Adjust the wait time as needed - function getRefundStatusText (statusCode: string): string { + function getRefundStatusText (statusCode: string | undefined): string { const status = RoutingSlipRefundStatus.find(item => item.code === statusCode) - return status.text ? status.text : RoutingSlipRefundCodes.PROCESSING + return status ? status.text : RoutingSlipRefundCodes.PROCESSING } function getStatusFromRefundStatus (statusCode: string): SlipStatus { diff --git a/src/composables/ViewRoutingSlip/useRefundRequestForm.ts b/src/composables/ViewRoutingSlip/useRefundRequestForm.ts index 166146bb..328653f4 100644 --- a/src/composables/ViewRoutingSlip/useRefundRequestForm.ts +++ b/src/composables/ViewRoutingSlip/useRefundRequestForm.ts @@ -20,7 +20,7 @@ export default function useRefundRequestForm (props, context) { const chequeAdviceRules = CommonUtils.optionalFieldRule('This field should be maximum of 40 characters', 40) const name = ref('') - const address = ref
(undefined) + const address = ref
({}) const chequeAdvice = ref('') const canEdit = computed(() => { @@ -28,6 +28,10 @@ export default function useRefundRequestForm (props, context) { return !isApprovalFlow.value && isEditing.value }) + const showAddress = computed(() => { + return canEdit.value || (address.value && Object.values(address.value).some(value => !!value)) + }) + function addressValidity (isValid: boolean): void { isAddressValid.value = isValid } @@ -69,6 +73,7 @@ export default function useRefundRequestForm (props, context) { addressForm, addressValidity, isValid, - canEdit + canEdit, + showAddress } } diff --git a/src/views/ViewRoutingSlip.vue b/src/views/ViewRoutingSlip.vue index 672a3999..96057dff 100644 --- a/src/views/ViewRoutingSlip.vue +++ b/src/views/ViewRoutingSlip.vue @@ -13,19 +13,19 @@ - + - + - + - + - + @@ -33,7 +33,7 @@ From 4ccc807fa811a2dd457a36fecc2b508985dce9f4 Mon Sep 17 00:00:00 2001 From: Jia Xu Date: Mon, 28 Oct 2024 17:03:24 -0700 Subject: [PATCH 2/7] styling tweaks --- lib/lib.umd.min.js | 2 +- lib/lib.umd.min.js.map | 2 +- .../ViewRoutingSlip/RefundRequestForm.vue | 24 +++++++++++++++---- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/lib/lib.umd.min.js b/lib/lib.umd.min.js index 5a883b43..79807372 100644 --- a/lib/lib.umd.min.js +++ b/lib/lib.umd.min.js @@ -901,7 +901,7 @@ const U=debounce((async()=>{_.value||(b.value=await h())}),100) return{headerSearch:R,displayedHeaderSearch:T,status:E,refundStatus:O,routingSlipNumber:C,receiptNumber:w,dateFilter:F,businessIdentifier:A,accountName:I,remainingAmount:P,chequeReceiptNumber:N,canShowColumn:function canShowColumn(e){return T.value.find((r=>r.value===e))},applyDateFilter:function applyDateFilter(e){F.value=e},searchNow:searchNow,debouncedSearch:x,searchRoutingSlipResult:u,getStatusLabel:function getStatusLabel(e){return g(e)},searchParamsExist:s,clearFilter:async function clearFilter(){S(),a(),await l(),k.value=!1,S()},formatFolioResult:function formatFolioResult(e){if(!k.value&&A.value&&""!==A.value)return[A.value] const{invoices:r}=e return r?r.filter((e=>e.businessIdentifier)).map((e=>e.businessIdentifier)):["-"]},showExpandedFolio:y,showExpandedCheque:v,toggleFolio:function toggleFolio(e){y.value.includes(e)?y.value=y.value.filter((function(r){return r!==e})):y.value.push(e)},toggleCheque:function toggleCheque(e){v.value.includes(e)?v.value=v.value.filter((function(r){return r!==e})):v.value.push(e)},isLoading:_,navigateTo:function navigateTo(e){p.value?window.location.href=`${ConfigHelper.getFasWebUrl()}view-routing-slip/${e}?viewFromAuth=true`:r.root.$router.push(M(`/view-routing-slip/${e}`,r.root.$route))},fasUrl:m,initiator:D,reachedEnd:b,getNext:U,getRefundStatusText:function getRefundStatusText(e){const r=RoutingSlipRefundStatus.find((r=>r.code===e)) -return r.text?r.text:RoutingSlipRefundCodes.PROCESSING},getStatusFromRefundStatus:function getStatusFromRefundStatus(e){return e===RoutingSlipRefundCodes.PROCESSING?SlipStatus.REFUNDREQUEST:SlipStatus.REFUNDPROCESSED}}} +return r?r.text:RoutingSlipRefundCodes.PROCESSING},getStatusFromRefundStatus:function getStatusFromRefundStatus(e){return e===RoutingSlipRefundCodes.PROCESSING?SlipStatus.REFUNDREQUEST:SlipStatus.REFUNDPROCESSED}}} /** * vue-class-component v7.2.6 * (c) 2015-present Evan You diff --git a/lib/lib.umd.min.js.map b/lib/lib.umd.min.js.map index f939de16..63ab2604 100644 --- a/lib/lib.umd.min.js.map +++ b/lib/lib.umd.min.js.map @@ -1 +1 @@ -{"version":3,"file":"lib.umd.min.js","sources":["../src/shims-vue-composition-api.ts","../src/util/constants.ts","../node_modules/js-sha256/src/sha256.js","../node_modules/keycloak-js/node_modules/base64-js/index.js","../node_modules/keycloak-js/dist/keycloak.js","../node_modules/sbc-common-components/src/util/constants.ts","../node_modules/sbc-common-components/src/util/common-util.ts","../node_modules/sbc-common-components/src/util/config-helper.ts","../node_modules/vuex-module-decorators/dist/esm/index.js","../node_modules/sbc-common-components/src/store/modules/auth.ts","../node_modules/sbc-common-components/src/services/keycloak.services.ts","../node_modules/moment/dist/moment.js","../src/util/common-util.ts","../src/util/config-helper.ts","../src/util/debounce.ts","../src/composables/useIndicators.ts","../src/composables/common/useLoader.ts","../node_modules/axios/lib/helpers/bind.js","../node_modules/axios/lib/utils.js","../node_modules/axios/lib/helpers/buildURL.js","../node_modules/axios/lib/core/InterceptorManager.js","../node_modules/axios/lib/helpers/normalizeHeaderName.js","../node_modules/axios/lib/core/enhanceError.js","../node_modules/axios/lib/core/createError.js","../node_modules/axios/lib/core/settle.js","../node_modules/axios/lib/helpers/cookies.js","../node_modules/axios/lib/helpers/isAbsoluteURL.js","../node_modules/axios/lib/helpers/combineURLs.js","../node_modules/axios/lib/core/buildFullPath.js","../node_modules/axios/lib/helpers/parseHeaders.js","../node_modules/axios/lib/helpers/isURLSameOrigin.js","../node_modules/axios/lib/adapters/xhr.js","../node_modules/axios/lib/defaults.js","../node_modules/axios/lib/core/transformData.js","../node_modules/axios/lib/cancel/isCancel.js","../node_modules/axios/lib/core/dispatchRequest.js","../node_modules/axios/lib/core/mergeConfig.js","../node_modules/axios/lib/helpers/validator.js","../node_modules/axios/lib/core/Axios.js","../node_modules/axios/lib/cancel/Cancel.js","../node_modules/axios/lib/cancel/CancelToken.js","../node_modules/axios/lib/helpers/spread.js","../node_modules/axios/lib/helpers/isAxiosError.js","../node_modules/axios/lib/axios.js","../node_modules/axios/index.js","../src/util/http-util.ts","../src/services/codes.service.ts","../src/composables/useCodes.ts","../src/composables/common/useStatusList.ts","../src/services/routingSlip.services.ts","../src/composables/useRoutingSlip.ts","../src/composables/Dashboard/useSearch.ts","../node_modules/vue-class-component/dist/vue-class-component.esm.js","../node_modules/vue-property-decorator/lib/decorators/Emit.js","../node_modules/vue-property-decorator/lib/helpers/metadata.js","../node_modules/vue-property-decorator/lib/decorators/Prop.js","../src/composables/common/useDateRange.ts","../src/composables/common/useSearchColumnFilterComponent.ts","../src/components/common/DateRangeFilter.vue","../src/components/common/DateRangeFilter.vue?vue&type=template&lang.js","../src/components/common/SearchColumnFilterComponent.vue","../src/components/common/SearchColumnFilterComponent.vue?vue&type=template&lang.js","../src/components/common/StatusList.vue","../src/components/common/StatusList.vue?vue&type=template&lang.js","../src/components/common/TableObserver.vue?vue&type=template&lang.js","../src/components/common/TableObserver.vue","../src/composables/Dashboard/useDashboard.ts","../src/directives/can.ts","../src/components/Dashboard/Search.vue","../src/components/Dashboard/Search.vue?vue&type=template&lang.js","../node_modules/vue-i18n/dist/vue-i18n.esm.js","../node_modules/vue-i18n-composable/dist/index.mjs","../src/plugins/i18n.ts","../src/lib-setup.js"],"sourcesContent":["// This needs to be done, otherwise these App.vue gets hoisted above the statements below:\nimport VueCompositionAPI from '@vue/composition-api'\nimport Vue from 'vue'\nVue.use(VueCompositionAPI)\n","export enum SessionStorageKeys {\n KeyCloakToken = 'KEYCLOAK_TOKEN',\n ApiConfigKey = 'AUTH_API_CONFIG',\n LaunchDarklyFlags = 'LD_FLAGS',\n ExtraProvincialUser = 'EXTRAPROVINCIAL_USER',\n SessionSynced = 'SESSION_SYNCED',\n AuthApiUrl = 'AUTH_API_URL',\n AuthWebUrl = 'AUTH_WEB_URL',\n PayApiUrl = 'PAY_API_URL',\n StatusApiUrl = 'STATUS_API_URL',\n FasWebUrl = 'FAS_WEB_URL',\n SiteminderLogoutUrl = 'SITEMINDER_LOGOUT_URL'\n}\n\nexport enum DateFilterCodes {\n TODAY = 'TODAY',\n YESTERDAY = 'YESTERDAY',\n LASTWEEK = 'LASTWEEK',\n LASTMONTH = 'LASTMONTH',\n CUSTOMRANGE = 'CUSTOMRANGE',\n}\n\nexport enum PaymentMethods {\n CASH = 'CASH',\n CHEQUE = 'CHEQUE',\n}\n\nexport enum SlipStatus {\n ACTIVE = 'ACTIVE',\n COMPLETE = 'COMPLETE',\n BOUNCED = 'BOUNCED',\n NSF = 'NSF',\n REFUND = 'REFUND',\n LAST = 'LAST',\n HOLD = 'HOLD',\n LINKED = 'LINKED',\n REFUNDREQUEST = 'REFUND_REQUESTED',\n REFUNDAUTHORIZED = 'REFUND_AUTHORIZED',\n REFUNDPROCESSED = 'REFUND_PROCESSED',\n REFUNDUPLOADED = 'REFUND_UPLOADED',\n REFUNDREJECTED = 'REFUND_REJECTED',\n CANCEL_REFUND_REQUEST = 'CANCEL_REFUND_REQUEST',\n CANCELWRITEOFFREQUEST='CANCEL_WRITE_OFF_REQUEST',\n WRITEOFFAUTHORIZED='WRITE_OFF_AUTHORIZED',\n WRITEOFFREQUESTED='WRITE_OFF_REQUESTED',\n WRITEOFFCOMPLETED='WRITE_OFF_COMPLETED',\n VOID='VOID',\n CORRECTION='CORRECTION'\n}\n\nexport enum SlipStatusLabel {\n ACTIVE = 'Place routing slip to active',\n NSF = 'Place routing slip to NSF',\n HOLD = 'Place routing slip on hold',\n LINKED = 'LINKED',\n REFUND_REQUESTED = 'Refund request',\n WRITE_OFF_REQUESTED = 'Write off request',\n CANCEL_REFUND_REQUEST = 'Cancel refund request',\n REFUND_AUTHORIZED='Review refund request',\n WRITE_OFF_AUTHORIZED='Authorize Write off request',\n CANCEL_WRITE_OFF_REQUEST='Cancel Write off request',\n VOID='Void Routing Slip',\n // CORRECTION='Correct Routing Slip' - Future\n}\n\nexport enum Role {\n FAS_USER = 'fas_user',\n FAS_EDIT = 'fas_edit',\n FAS_REPORTS = 'fas_reports',\n FAS_SEARCH = 'fas_search',\n FAS_VIEW = 'fas_view',\n FAS_CREATE = 'fas_create',\n FAS_LNK = 'fas_link',\n FAS_TRANSACTION = 'fas_transaction',\n FAS_REFUND_APPROVER = 'fas_refund_approver',\n FAS_REFUND = 'fas_refund',\n FAS_VOID = 'fas_void',\n FAS_CORRECTION = 'fas_correction'\n}\n\nexport enum InvoiceStatus {\n COMPLETED = 'COMPLETED',\n REFUNDED = 'REFUNDED',\n DELETE_ACCEPTED = 'DELETE_ACCEPTED',\n REFUNDREQUEST = 'REFUND_REQUESTED',\n}\n\nexport enum ApiErrors {\n FAS_INVALID_ROUTING_SLIP_DIGITS = 'FAS_INVALID_ROUTING_SLIP_DIGITS'\n}\n\nexport enum CreateRoutingSlipStatus {\n VALID = 'VALID',\n EXISTS = 'EXISTS',\n INVALID_DIGITS = 'INVALID_DIGITS',\n}\n\nexport enum PatchActions {\n UPDATE_STATUS = 'updateStatus'\n}\n\nexport const AXIOS_ERROR_ALERT_TIME_OUT = 5000\n\nexport const headerSearchTitle =\n[\n {\n text: 'Routing Slip Number',\n align: 'start',\n value: 'routingSlipNumber',\n display: true,\n className: 'routing-slip'\n },\n {\n text: 'Receipt Number',\n align: 'start',\n sortable: false,\n value: 'receiptNumber',\n display: true,\n className: 'receiptNumber'\n },\n {\n text: 'Entity Number',\n align: 'start',\n value: 'accountName',\n sortable: false,\n display: false,\n className: 'accountName'\n },\n {\n text: 'Created By',\n align: 'start',\n value: 'createdName',\n sortable: false,\n display: false,\n className: 'createdName'\n },\n {\n text: 'Date',\n align: 'start',\n sortable: false,\n value: 'date',\n display: true,\n className: 'date'\n },\n {\n text: 'Status',\n align: 'start',\n sortable: false,\n value: 'status',\n display: true,\n className: 'status'\n },\n {\n text: 'Refund Status',\n align: 'start',\n sortable: false,\n value: 'refundStatus',\n display: true,\n className: 'refundStatus'\n },\n {\n text: 'Reference Number',\n align: 'start',\n value: 'businessIdentifier',\n sortable: false,\n display: true,\n className: 'businessIdentifier'\n },\n {\n text: 'Cheque Number',\n align: 'start',\n value: 'chequeReceiptNumber',\n sortable: false,\n display: false,\n className: 'cheque-receipt-number'\n },\n {\n text: 'Balance',\n align: 'right',\n value: 'remainingAmount',\n sortable: false,\n display: true,\n className: 'remainingAmount'\n },\n {\n text: 'Actions',\n align: 'start',\n value: '',\n sortable: false,\n display: true,\n hideInSearchColumnFilter: true,\n className: 'action'\n }\n]\n\nexport const RoutingSlipRefundStatus = [\n {\n code: 'PROCESSING',\n text: 'PROCESSING',\n display: false\n },\n {\n code: 'PROCESSED',\n text: 'PROCESSED',\n display: true\n },\n {\n code: 'CHEQUE_UNDELIVERABLE',\n text: 'CHEQUE UNDELIVERABLE',\n display: true\n }\n]\n\nexport const RoutingSlipRefundCodes = RoutingSlipRefundStatus.reduce((acc, status) => {\n acc[status.code] = status.code\n return acc\n}, {} as { [key: string]: string })\n","/**\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\n *\n * @version 0.9.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2017\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var ERROR = 'input is invalid type';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA256_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA256_NO_COMMON_JS && typeof module === 'object' && module.exports;\n var AMD = typeof define === 'function' && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA256_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var EXTRA = [-2147483648, 8388608, 32768, 128];\n var SHIFT = [24, 16, 8, 0];\n var K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n ];\n var OUTPUT_TYPES = ['hex', 'array', 'digest', 'arrayBuffer'];\n\n var blocks = [];\n\n if (root.JS_SHA256_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n }\n\n if (ARRAY_BUFFER && (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n\n var createOutputMethod = function (outputType, is224) {\n return function (message) {\n return new Sha256(is224, true).update(message)[outputType]();\n };\n };\n\n var createMethod = function (is224) {\n var method = createOutputMethod('hex', is224);\n if (NODE_JS) {\n method = nodeWrap(method, is224);\n }\n method.create = function () {\n return new Sha256(is224);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createOutputMethod(type, is224);\n }\n return method;\n };\n\n var nodeWrap = function (method, is224) {\n var crypto = eval(\"require('crypto')\");\n var Buffer = eval(\"require('buffer').Buffer\");\n var algorithm = is224 ? 'sha224' : 'sha256';\n var nodeMethod = function (message) {\n if (typeof message === 'string') {\n return crypto.createHash(algorithm).update(message, 'utf8').digest('hex');\n } else {\n if (message === null || message === undefined) {\n throw new Error(ERROR);\n } else if (message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n }\n }\n if (Array.isArray(message) || ArrayBuffer.isView(message) ||\n message.constructor === Buffer) {\n return crypto.createHash(algorithm).update(new Buffer(message)).digest('hex');\n } else {\n return method(message);\n }\n };\n return nodeMethod;\n };\n\n var createHmacOutputMethod = function (outputType, is224) {\n return function (key, message) {\n return new HmacSha256(key, is224, true).update(message)[outputType]();\n };\n };\n\n var createHmacMethod = function (is224) {\n var method = createHmacOutputMethod('hex', is224);\n method.create = function (key) {\n return new HmacSha256(key, is224);\n };\n method.update = function (key, message) {\n return method.create(key).update(message);\n };\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createHmacOutputMethod(type, is224);\n }\n return method;\n };\n\n function Sha256(is224, sharedMemory) {\n if (sharedMemory) {\n blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n this.blocks = blocks;\n } else {\n this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n }\n\n if (is224) {\n this.h0 = 0xc1059ed8;\n this.h1 = 0x367cd507;\n this.h2 = 0x3070dd17;\n this.h3 = 0xf70e5939;\n this.h4 = 0xffc00b31;\n this.h5 = 0x68581511;\n this.h6 = 0x64f98fa7;\n this.h7 = 0xbefa4fa4;\n } else { // 256\n this.h0 = 0x6a09e667;\n this.h1 = 0xbb67ae85;\n this.h2 = 0x3c6ef372;\n this.h3 = 0xa54ff53a;\n this.h4 = 0x510e527f;\n this.h5 = 0x9b05688c;\n this.h6 = 0x1f83d9ab;\n this.h7 = 0x5be0cd19;\n }\n\n this.block = this.start = this.bytes = this.hBytes = 0;\n this.finalized = this.hashed = false;\n this.first = true;\n this.is224 = is224;\n }\n\n Sha256.prototype.update = function (message) {\n if (this.finalized) {\n return;\n }\n var notString, type = typeof message;\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n notString = true;\n }\n var code, index = 0, i, length = message.length, blocks = this.blocks;\n\n while (index < length) {\n if (this.hashed) {\n this.hashed = false;\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n\n if (notString) {\n for (i = this.start; index < length && i < 64; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < 64; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n\n this.lastByteIndex = i;\n this.bytes += i - this.start;\n if (i >= 64) {\n this.block = blocks[16];\n this.start = i - 64;\n this.hash();\n this.hashed = true;\n } else {\n this.start = i;\n }\n }\n if (this.bytes > 4294967295) {\n this.hBytes += this.bytes / 4294967296 << 0;\n this.bytes = this.bytes % 4294967296;\n }\n return this;\n };\n\n Sha256.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex;\n blocks[16] = this.block;\n blocks[i >> 2] |= EXTRA[i & 3];\n this.block = blocks[16];\n if (i >= 56) {\n if (!this.hashed) {\n this.hash();\n }\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n blocks[14] = this.hBytes << 3 | this.bytes >>> 29;\n blocks[15] = this.bytes << 3;\n this.hash();\n };\n\n Sha256.prototype.hash = function () {\n var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6,\n h = this.h7, blocks = this.blocks, j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc;\n\n for (j = 16; j < 64; ++j) {\n // rightrotate\n t1 = blocks[j - 15];\n s0 = ((t1 >>> 7) | (t1 << 25)) ^ ((t1 >>> 18) | (t1 << 14)) ^ (t1 >>> 3);\n t1 = blocks[j - 2];\n s1 = ((t1 >>> 17) | (t1 << 15)) ^ ((t1 >>> 19) | (t1 << 13)) ^ (t1 >>> 10);\n blocks[j] = blocks[j - 16] + s0 + blocks[j - 7] + s1 << 0;\n }\n\n bc = b & c;\n for (j = 0; j < 64; j += 4) {\n if (this.first) {\n if (this.is224) {\n ab = 300032;\n t1 = blocks[0] - 1413257819;\n h = t1 - 150054599 << 0;\n d = t1 + 24177077 << 0;\n } else {\n ab = 704751109;\n t1 = blocks[0] - 210244248;\n h = t1 - 1521486534 << 0;\n d = t1 + 143694565 << 0;\n }\n this.first = false;\n } else {\n s0 = ((a >>> 2) | (a << 30)) ^ ((a >>> 13) | (a << 19)) ^ ((a >>> 22) | (a << 10));\n s1 = ((e >>> 6) | (e << 26)) ^ ((e >>> 11) | (e << 21)) ^ ((e >>> 25) | (e << 7));\n ab = a & b;\n maj = ab ^ (a & c) ^ bc;\n ch = (e & f) ^ (~e & g);\n t1 = h + s1 + ch + K[j] + blocks[j];\n t2 = s0 + maj;\n h = d + t1 << 0;\n d = t1 + t2 << 0;\n }\n s0 = ((d >>> 2) | (d << 30)) ^ ((d >>> 13) | (d << 19)) ^ ((d >>> 22) | (d << 10));\n s1 = ((h >>> 6) | (h << 26)) ^ ((h >>> 11) | (h << 21)) ^ ((h >>> 25) | (h << 7));\n da = d & a;\n maj = da ^ (d & b) ^ ab;\n ch = (h & e) ^ (~h & f);\n t1 = g + s1 + ch + K[j + 1] + blocks[j + 1];\n t2 = s0 + maj;\n g = c + t1 << 0;\n c = t1 + t2 << 0;\n s0 = ((c >>> 2) | (c << 30)) ^ ((c >>> 13) | (c << 19)) ^ ((c >>> 22) | (c << 10));\n s1 = ((g >>> 6) | (g << 26)) ^ ((g >>> 11) | (g << 21)) ^ ((g >>> 25) | (g << 7));\n cd = c & d;\n maj = cd ^ (c & a) ^ da;\n ch = (g & h) ^ (~g & e);\n t1 = f + s1 + ch + K[j + 2] + blocks[j + 2];\n t2 = s0 + maj;\n f = b + t1 << 0;\n b = t1 + t2 << 0;\n s0 = ((b >>> 2) | (b << 30)) ^ ((b >>> 13) | (b << 19)) ^ ((b >>> 22) | (b << 10));\n s1 = ((f >>> 6) | (f << 26)) ^ ((f >>> 11) | (f << 21)) ^ ((f >>> 25) | (f << 7));\n bc = b & c;\n maj = bc ^ (b & d) ^ cd;\n ch = (f & g) ^ (~f & h);\n t1 = e + s1 + ch + K[j + 3] + blocks[j + 3];\n t2 = s0 + maj;\n e = a + t1 << 0;\n a = t1 + t2 << 0;\n }\n\n this.h0 = this.h0 + a << 0;\n this.h1 = this.h1 + b << 0;\n this.h2 = this.h2 + c << 0;\n this.h3 = this.h3 + d << 0;\n this.h4 = this.h4 + e << 0;\n this.h5 = this.h5 + f << 0;\n this.h6 = this.h6 + g << 0;\n this.h7 = this.h7 + h << 0;\n };\n\n Sha256.prototype.hex = function () {\n this.finalize();\n\n var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,\n h6 = this.h6, h7 = this.h7;\n\n var hex = HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] +\n HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] +\n HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] +\n HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] +\n HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] +\n HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] +\n HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] +\n HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] +\n HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] +\n HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] +\n HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] +\n HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] +\n HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F] +\n HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] +\n HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] +\n HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] +\n HEX_CHARS[(h4 >> 28) & 0x0F] + HEX_CHARS[(h4 >> 24) & 0x0F] +\n HEX_CHARS[(h4 >> 20) & 0x0F] + HEX_CHARS[(h4 >> 16) & 0x0F] +\n HEX_CHARS[(h4 >> 12) & 0x0F] + HEX_CHARS[(h4 >> 8) & 0x0F] +\n HEX_CHARS[(h4 >> 4) & 0x0F] + HEX_CHARS[h4 & 0x0F] +\n HEX_CHARS[(h5 >> 28) & 0x0F] + HEX_CHARS[(h5 >> 24) & 0x0F] +\n HEX_CHARS[(h5 >> 20) & 0x0F] + HEX_CHARS[(h5 >> 16) & 0x0F] +\n HEX_CHARS[(h5 >> 12) & 0x0F] + HEX_CHARS[(h5 >> 8) & 0x0F] +\n HEX_CHARS[(h5 >> 4) & 0x0F] + HEX_CHARS[h5 & 0x0F] +\n HEX_CHARS[(h6 >> 28) & 0x0F] + HEX_CHARS[(h6 >> 24) & 0x0F] +\n HEX_CHARS[(h6 >> 20) & 0x0F] + HEX_CHARS[(h6 >> 16) & 0x0F] +\n HEX_CHARS[(h6 >> 12) & 0x0F] + HEX_CHARS[(h6 >> 8) & 0x0F] +\n HEX_CHARS[(h6 >> 4) & 0x0F] + HEX_CHARS[h6 & 0x0F];\n if (!this.is224) {\n hex += HEX_CHARS[(h7 >> 28) & 0x0F] + HEX_CHARS[(h7 >> 24) & 0x0F] +\n HEX_CHARS[(h7 >> 20) & 0x0F] + HEX_CHARS[(h7 >> 16) & 0x0F] +\n HEX_CHARS[(h7 >> 12) & 0x0F] + HEX_CHARS[(h7 >> 8) & 0x0F] +\n HEX_CHARS[(h7 >> 4) & 0x0F] + HEX_CHARS[h7 & 0x0F];\n }\n return hex;\n };\n\n Sha256.prototype.toString = Sha256.prototype.hex;\n\n Sha256.prototype.digest = function () {\n this.finalize();\n\n var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,\n h6 = this.h6, h7 = this.h7;\n\n var arr = [\n (h0 >> 24) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 8) & 0xFF, h0 & 0xFF,\n (h1 >> 24) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 8) & 0xFF, h1 & 0xFF,\n (h2 >> 24) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 8) & 0xFF, h2 & 0xFF,\n (h3 >> 24) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 8) & 0xFF, h3 & 0xFF,\n (h4 >> 24) & 0xFF, (h4 >> 16) & 0xFF, (h4 >> 8) & 0xFF, h4 & 0xFF,\n (h5 >> 24) & 0xFF, (h5 >> 16) & 0xFF, (h5 >> 8) & 0xFF, h5 & 0xFF,\n (h6 >> 24) & 0xFF, (h6 >> 16) & 0xFF, (h6 >> 8) & 0xFF, h6 & 0xFF\n ];\n if (!this.is224) {\n arr.push((h7 >> 24) & 0xFF, (h7 >> 16) & 0xFF, (h7 >> 8) & 0xFF, h7 & 0xFF);\n }\n return arr;\n };\n\n Sha256.prototype.array = Sha256.prototype.digest;\n\n Sha256.prototype.arrayBuffer = function () {\n this.finalize();\n\n var buffer = new ArrayBuffer(this.is224 ? 28 : 32);\n var dataView = new DataView(buffer);\n dataView.setUint32(0, this.h0);\n dataView.setUint32(4, this.h1);\n dataView.setUint32(8, this.h2);\n dataView.setUint32(12, this.h3);\n dataView.setUint32(16, this.h4);\n dataView.setUint32(20, this.h5);\n dataView.setUint32(24, this.h6);\n if (!this.is224) {\n dataView.setUint32(28, this.h7);\n }\n return buffer;\n };\n\n function HmacSha256(key, is224, sharedMemory) {\n var i, type = typeof key;\n if (type === 'string') {\n var bytes = [], length = key.length, index = 0, code;\n for (i = 0; i < length; ++i) {\n code = key.charCodeAt(i);\n if (code < 0x80) {\n bytes[index++] = code;\n } else if (code < 0x800) {\n bytes[index++] = (0xc0 | (code >> 6));\n bytes[index++] = (0x80 | (code & 0x3f));\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes[index++] = (0xe0 | (code >> 12));\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\n bytes[index++] = (0x80 | (code & 0x3f));\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));\n bytes[index++] = (0xf0 | (code >> 18));\n bytes[index++] = (0x80 | ((code >> 12) & 0x3f));\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\n bytes[index++] = (0x80 | (code & 0x3f));\n }\n }\n key = bytes;\n } else {\n if (type === 'object') {\n if (key === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && key.constructor === ArrayBuffer) {\n key = new Uint8Array(key);\n } else if (!Array.isArray(key)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(key)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n }\n\n if (key.length > 64) {\n key = (new Sha256(is224, true)).update(key).array();\n }\n\n var oKeyPad = [], iKeyPad = [];\n for (i = 0; i < 64; ++i) {\n var b = key[i] || 0;\n oKeyPad[i] = 0x5c ^ b;\n iKeyPad[i] = 0x36 ^ b;\n }\n\n Sha256.call(this, is224, sharedMemory);\n\n this.update(iKeyPad);\n this.oKeyPad = oKeyPad;\n this.inner = true;\n this.sharedMemory = sharedMemory;\n }\n HmacSha256.prototype = new Sha256();\n\n HmacSha256.prototype.finalize = function () {\n Sha256.prototype.finalize.call(this);\n if (this.inner) {\n this.inner = false;\n var innerHash = this.array();\n Sha256.call(this, this.is224, this.sharedMemory);\n this.update(this.oKeyPad);\n this.update(innerHash);\n Sha256.prototype.finalize.call(this);\n }\n };\n\n var exports = createMethod();\n exports.sha256 = exports;\n exports.sha224 = createMethod(true);\n exports.sha256.hmac = createHmacMethod();\n exports.sha224.hmac = createHmacMethod(true);\n\n if (COMMON_JS) {\n module.exports = exports;\n } else {\n root.sha256 = exports.sha256;\n root.sha224 = exports.sha224;\n if (AMD) {\n define(function () {\n return exports;\n });\n }\n }\n})();\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*\n * Copyright 2016 Red Hat, Inc. and/or its affiliates\n * and other contributors as indicated by the @author tags.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n(function(root, factory) {\n if ( typeof exports === 'object' ) {\n if ( typeof module === 'object' ) {\n module.exports = factory( require(\"js-sha256\"), require(\"base64-js\") ); \n } else {\n exports[\"keycloak\"] = factory( require(\"js-sha256\"), require(\"base64-js\") ); \n }\n } else {\n /**\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\n *\n * @version 0.9.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2017\n * @license MIT\n */\n !function () { \"use strict\"; function t(t, i) { i ? (d[0] = d[16] = d[1] = d[2] = d[3] = d[4] = d[5] = d[6] = d[7] = d[8] = d[9] = d[10] = d[11] = d[12] = d[13] = d[14] = d[15] = 0, this.blocks = d) : this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], t ? (this.h0 = 3238371032, this.h1 = 914150663, this.h2 = 812702999, this.h3 = 4144912697, this.h4 = 4290775857, this.h5 = 1750603025, this.h6 = 1694076839, this.h7 = 3204075428) : (this.h0 = 1779033703, this.h1 = 3144134277, this.h2 = 1013904242, this.h3 = 2773480762, this.h4 = 1359893119, this.h5 = 2600822924, this.h6 = 528734635, this.h7 = 1541459225), this.block = this.start = this.bytes = this.hBytes = 0, this.finalized = this.hashed = !1, this.first = !0, this.is224 = t } function i(i, r, s) { var e, n = typeof i; if (\"string\" === n) { var o, a = [], u = i.length, c = 0; for (e = 0; e < u; ++e)(o = i.charCodeAt(e)) < 128 ? a[c++] = o : o < 2048 ? (a[c++] = 192 | o >> 6, a[c++] = 128 | 63 & o) : o < 55296 || o >= 57344 ? (a[c++] = 224 | o >> 12, a[c++] = 128 | o >> 6 & 63, a[c++] = 128 | 63 & o) : (o = 65536 + ((1023 & o) << 10 | 1023 & i.charCodeAt(++e)), a[c++] = 240 | o >> 18, a[c++] = 128 | o >> 12 & 63, a[c++] = 128 | o >> 6 & 63, a[c++] = 128 | 63 & o); i = a } else { if (\"object\" !== n) throw new Error(h); if (null === i) throw new Error(h); if (f && i.constructor === ArrayBuffer) i = new Uint8Array(i); else if (!(Array.isArray(i) || f && ArrayBuffer.isView(i))) throw new Error(h) } i.length > 64 && (i = new t(r, !0).update(i).array()); var y = [], p = []; for (e = 0; e < 64; ++e) { var l = i[e] || 0; y[e] = 92 ^ l, p[e] = 54 ^ l } t.call(this, r, s), this.update(p), this.oKeyPad = y, this.inner = !0, this.sharedMemory = s } var h = \"input is invalid type\", r = \"object\" == typeof window, s = r ? window : {}; s.JS_SHA256_NO_WINDOW && (r = !1); var e = !r && \"object\" == typeof self, n = !s.JS_SHA256_NO_NODE_JS && \"object\" == typeof process && process.versions && process.versions.node; n ? s = global : e && (s = self); var o = !s.JS_SHA256_NO_COMMON_JS && \"object\" == typeof module && module.exports, a = \"function\" == typeof define && define.amd, f = !s.JS_SHA256_NO_ARRAY_BUFFER && \"undefined\" != typeof ArrayBuffer, u = \"0123456789abcdef\".split(\"\"), c = [-2147483648, 8388608, 32768, 128], y = [24, 16, 8, 0], p = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298], l = [\"hex\", \"array\", \"digest\", \"arrayBuffer\"], d = []; !s.JS_SHA256_NO_NODE_JS && Array.isArray || (Array.isArray = function (t) { return \"[object Array]\" === Object.prototype.toString.call(t) }), !f || !s.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW && ArrayBuffer.isView || (ArrayBuffer.isView = function (t) { return \"object\" == typeof t && t.buffer && t.buffer.constructor === ArrayBuffer }); var A = function (i, h) { return function (r) { return new t(h, !0).update(r)[i]() } }, w = function (i) { var h = A(\"hex\", i); n && (h = b(h, i)), h.create = function () { return new t(i) }, h.update = function (t) { return h.create().update(t) }; for (var r = 0; r < l.length; ++r) { var s = l[r]; h[s] = A(s, i) } return h }, b = function (t, i) { var r = eval(\"require('crypto')\"), s = eval(\"require('buffer').Buffer\"), e = i ? \"sha224\" : \"sha256\", n = function (i) { if (\"string\" == typeof i) return r.createHash(e).update(i, \"utf8\").digest(\"hex\"); if (null === i || void 0 === i) throw new Error(h); return i.constructor === ArrayBuffer && (i = new Uint8Array(i)), Array.isArray(i) || ArrayBuffer.isView(i) || i.constructor === s ? r.createHash(e).update(new s(i)).digest(\"hex\") : t(i) }; return n }, v = function (t, h) { return function (r, s) { return new i(r, h, !0).update(s)[t]() } }, _ = function (t) { var h = v(\"hex\", t); h.create = function (h) { return new i(h, t) }, h.update = function (t, i) { return h.create(t).update(i) }; for (var r = 0; r < l.length; ++r) { var s = l[r]; h[s] = v(s, t) } return h }; t.prototype.update = function (t) { if (!this.finalized) { var i, r = typeof t; if (\"string\" !== r) { if (\"object\" !== r) throw new Error(h); if (null === t) throw new Error(h); if (f && t.constructor === ArrayBuffer) t = new Uint8Array(t); else if (!(Array.isArray(t) || f && ArrayBuffer.isView(t))) throw new Error(h); i = !0 } for (var s, e, n = 0, o = t.length, a = this.blocks; n < o;) { if (this.hashed && (this.hashed = !1, a[0] = this.block, a[16] = a[1] = a[2] = a[3] = a[4] = a[5] = a[6] = a[7] = a[8] = a[9] = a[10] = a[11] = a[12] = a[13] = a[14] = a[15] = 0), i) for (e = this.start; n < o && e < 64; ++n)a[e >> 2] |= t[n] << y[3 & e++]; else for (e = this.start; n < o && e < 64; ++n)(s = t.charCodeAt(n)) < 128 ? a[e >> 2] |= s << y[3 & e++] : s < 2048 ? (a[e >> 2] |= (192 | s >> 6) << y[3 & e++], a[e >> 2] |= (128 | 63 & s) << y[3 & e++]) : s < 55296 || s >= 57344 ? (a[e >> 2] |= (224 | s >> 12) << y[3 & e++], a[e >> 2] |= (128 | s >> 6 & 63) << y[3 & e++], a[e >> 2] |= (128 | 63 & s) << y[3 & e++]) : (s = 65536 + ((1023 & s) << 10 | 1023 & t.charCodeAt(++n)), a[e >> 2] |= (240 | s >> 18) << y[3 & e++], a[e >> 2] |= (128 | s >> 12 & 63) << y[3 & e++], a[e >> 2] |= (128 | s >> 6 & 63) << y[3 & e++], a[e >> 2] |= (128 | 63 & s) << y[3 & e++]); this.lastByteIndex = e, this.bytes += e - this.start, e >= 64 ? (this.block = a[16], this.start = e - 64, this.hash(), this.hashed = !0) : this.start = e } return this.bytes > 4294967295 && (this.hBytes += this.bytes / 4294967296 << 0, this.bytes = this.bytes % 4294967296), this } }, t.prototype.finalize = function () { if (!this.finalized) { this.finalized = !0; var t = this.blocks, i = this.lastByteIndex; t[16] = this.block, t[i >> 2] |= c[3 & i], this.block = t[16], i >= 56 && (this.hashed || this.hash(), t[0] = this.block, t[16] = t[1] = t[2] = t[3] = t[4] = t[5] = t[6] = t[7] = t[8] = t[9] = t[10] = t[11] = t[12] = t[13] = t[14] = t[15] = 0), t[14] = this.hBytes << 3 | this.bytes >>> 29, t[15] = this.bytes << 3, this.hash() } }, t.prototype.hash = function () { var t, i, h, r, s, e, n, o, a, f = this.h0, u = this.h1, c = this.h2, y = this.h3, l = this.h4, d = this.h5, A = this.h6, w = this.h7, b = this.blocks; for (t = 16; t < 64; ++t)i = ((s = b[t - 15]) >>> 7 | s << 25) ^ (s >>> 18 | s << 14) ^ s >>> 3, h = ((s = b[t - 2]) >>> 17 | s << 15) ^ (s >>> 19 | s << 13) ^ s >>> 10, b[t] = b[t - 16] + i + b[t - 7] + h << 0; for (a = u & c, t = 0; t < 64; t += 4)this.first ? (this.is224 ? (e = 300032, w = (s = b[0] - 1413257819) - 150054599 << 0, y = s + 24177077 << 0) : (e = 704751109, w = (s = b[0] - 210244248) - 1521486534 << 0, y = s + 143694565 << 0), this.first = !1) : (i = (f >>> 2 | f << 30) ^ (f >>> 13 | f << 19) ^ (f >>> 22 | f << 10), r = (e = f & u) ^ f & c ^ a, w = y + (s = w + (h = (l >>> 6 | l << 26) ^ (l >>> 11 | l << 21) ^ (l >>> 25 | l << 7)) + (l & d ^ ~l & A) + p[t] + b[t]) << 0, y = s + (i + r) << 0), i = (y >>> 2 | y << 30) ^ (y >>> 13 | y << 19) ^ (y >>> 22 | y << 10), r = (n = y & f) ^ y & u ^ e, A = c + (s = A + (h = (w >>> 6 | w << 26) ^ (w >>> 11 | w << 21) ^ (w >>> 25 | w << 7)) + (w & l ^ ~w & d) + p[t + 1] + b[t + 1]) << 0, i = ((c = s + (i + r) << 0) >>> 2 | c << 30) ^ (c >>> 13 | c << 19) ^ (c >>> 22 | c << 10), r = (o = c & y) ^ c & f ^ n, d = u + (s = d + (h = (A >>> 6 | A << 26) ^ (A >>> 11 | A << 21) ^ (A >>> 25 | A << 7)) + (A & w ^ ~A & l) + p[t + 2] + b[t + 2]) << 0, i = ((u = s + (i + r) << 0) >>> 2 | u << 30) ^ (u >>> 13 | u << 19) ^ (u >>> 22 | u << 10), r = (a = u & c) ^ u & y ^ o, l = f + (s = l + (h = (d >>> 6 | d << 26) ^ (d >>> 11 | d << 21) ^ (d >>> 25 | d << 7)) + (d & A ^ ~d & w) + p[t + 3] + b[t + 3]) << 0, f = s + (i + r) << 0; this.h0 = this.h0 + f << 0, this.h1 = this.h1 + u << 0, this.h2 = this.h2 + c << 0, this.h3 = this.h3 + y << 0, this.h4 = this.h4 + l << 0, this.h5 = this.h5 + d << 0, this.h6 = this.h6 + A << 0, this.h7 = this.h7 + w << 0 }, t.prototype.hex = function () { this.finalize(); var t = this.h0, i = this.h1, h = this.h2, r = this.h3, s = this.h4, e = this.h5, n = this.h6, o = this.h7, a = u[t >> 28 & 15] + u[t >> 24 & 15] + u[t >> 20 & 15] + u[t >> 16 & 15] + u[t >> 12 & 15] + u[t >> 8 & 15] + u[t >> 4 & 15] + u[15 & t] + u[i >> 28 & 15] + u[i >> 24 & 15] + u[i >> 20 & 15] + u[i >> 16 & 15] + u[i >> 12 & 15] + u[i >> 8 & 15] + u[i >> 4 & 15] + u[15 & i] + u[h >> 28 & 15] + u[h >> 24 & 15] + u[h >> 20 & 15] + u[h >> 16 & 15] + u[h >> 12 & 15] + u[h >> 8 & 15] + u[h >> 4 & 15] + u[15 & h] + u[r >> 28 & 15] + u[r >> 24 & 15] + u[r >> 20 & 15] + u[r >> 16 & 15] + u[r >> 12 & 15] + u[r >> 8 & 15] + u[r >> 4 & 15] + u[15 & r] + u[s >> 28 & 15] + u[s >> 24 & 15] + u[s >> 20 & 15] + u[s >> 16 & 15] + u[s >> 12 & 15] + u[s >> 8 & 15] + u[s >> 4 & 15] + u[15 & s] + u[e >> 28 & 15] + u[e >> 24 & 15] + u[e >> 20 & 15] + u[e >> 16 & 15] + u[e >> 12 & 15] + u[e >> 8 & 15] + u[e >> 4 & 15] + u[15 & e] + u[n >> 28 & 15] + u[n >> 24 & 15] + u[n >> 20 & 15] + u[n >> 16 & 15] + u[n >> 12 & 15] + u[n >> 8 & 15] + u[n >> 4 & 15] + u[15 & n]; return this.is224 || (a += u[o >> 28 & 15] + u[o >> 24 & 15] + u[o >> 20 & 15] + u[o >> 16 & 15] + u[o >> 12 & 15] + u[o >> 8 & 15] + u[o >> 4 & 15] + u[15 & o]), a }, t.prototype.toString = t.prototype.hex, t.prototype.digest = function () { this.finalize(); var t = this.h0, i = this.h1, h = this.h2, r = this.h3, s = this.h4, e = this.h5, n = this.h6, o = this.h7, a = [t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, 255 & t, i >> 24 & 255, i >> 16 & 255, i >> 8 & 255, 255 & i, h >> 24 & 255, h >> 16 & 255, h >> 8 & 255, 255 & h, r >> 24 & 255, r >> 16 & 255, r >> 8 & 255, 255 & r, s >> 24 & 255, s >> 16 & 255, s >> 8 & 255, 255 & s, e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e, n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, 255 & n]; return this.is224 || a.push(o >> 24 & 255, o >> 16 & 255, o >> 8 & 255, 255 & o), a }, t.prototype.array = t.prototype.digest, t.prototype.arrayBuffer = function () { this.finalize(); var t = new ArrayBuffer(this.is224 ? 28 : 32), i = new DataView(t); return i.setUint32(0, this.h0), i.setUint32(4, this.h1), i.setUint32(8, this.h2), i.setUint32(12, this.h3), i.setUint32(16, this.h4), i.setUint32(20, this.h5), i.setUint32(24, this.h6), this.is224 || i.setUint32(28, this.h7), t }, i.prototype = new t, i.prototype.finalize = function () { if (t.prototype.finalize.call(this), this.inner) { this.inner = !1; var i = this.array(); t.call(this, this.is224, this.sharedMemory), this.update(this.oKeyPad), this.update(i), t.prototype.finalize.call(this) } }; var B = w(); B.sha256 = B, B.sha224 = w(!0), B.sha256.hmac = _(), B.sha224.hmac = _(!0), o ? module.exports = B : (s.sha256 = B.sha256, s.sha224 = B.sha224, a && define(function () { return B })) }();\n\n /**\n * [base64-js]{@link https://github.com/beatgammit/base64-js}\n *\n * @version v1.3.0 \n * @author Kirill, Fomichev\n * @copyright Kirill, Fomichev 2014\n * @license MIT\n */\n (function (r) { if (typeof exports === \"object\" && typeof module !== \"undefined\") { module.exports = r() } else if (typeof define === \"function\" && define.amd) { define([], r) } else { var e; if (typeof window !== \"undefined\") { e = window } else if (typeof global !== \"undefined\") { e = global } else if (typeof self !== \"undefined\") { e = self } else { e = this } e.base64js = r() } })(function () { var r, e, n; return function () { function r(e, n, t) { function o(f, i) { if (!n[f]) { if (!e[f]) { var u = \"function\" == typeof require && require; if (!i && u) return u(f, !0); if (a) return a(f, !0); var v = new Error(\"Cannot find module '\" + f + \"'\"); throw v.code = \"MODULE_NOT_FOUND\", v } var d = n[f] = { exports: {} }; e[f][0].call(d.exports, function (r) { var n = e[f][1][r]; return o(n || r) }, d, d.exports, r, e, n, t) } return n[f].exports } for (var a = \"function\" == typeof require && require, f = 0; f < t.length; f++)o(t[f]); return o } return r }()({ \"/\": [function (r, e, n) { \"use strict\"; n.byteLength = d; n.toByteArray = h; n.fromByteArray = p; var t = []; var o = []; var a = typeof Uint8Array !== \"undefined\" ? Uint8Array : Array; var f = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"; for (var i = 0, u = f.length; i < u; ++i) { t[i] = f[i]; o[f.charCodeAt(i)] = i } o[\"-\".charCodeAt(0)] = 62; o[\"_\".charCodeAt(0)] = 63; function v(r) { var e = r.length; if (e % 4 > 0) { throw new Error(\"Invalid string. Length must be a multiple of 4\") } var n = r.indexOf(\"=\"); if (n === -1) n = e; var t = n === e ? 0 : 4 - n % 4; return [n, t] } function d(r) { var e = v(r); var n = e[0]; var t = e[1]; return (n + t) * 3 / 4 - t } function c(r, e, n) { return (e + n) * 3 / 4 - n } function h(r) { var e; var n = v(r); var t = n[0]; var f = n[1]; var i = new a(c(r, t, f)); var u = 0; var d = f > 0 ? t - 4 : t; for (var h = 0; h < d; h += 4) { e = o[r.charCodeAt(h)] << 18 | o[r.charCodeAt(h + 1)] << 12 | o[r.charCodeAt(h + 2)] << 6 | o[r.charCodeAt(h + 3)]; i[u++] = e >> 16 & 255; i[u++] = e >> 8 & 255; i[u++] = e & 255 } if (f === 2) { e = o[r.charCodeAt(h)] << 2 | o[r.charCodeAt(h + 1)] >> 4; i[u++] = e & 255 } if (f === 1) { e = o[r.charCodeAt(h)] << 10 | o[r.charCodeAt(h + 1)] << 4 | o[r.charCodeAt(h + 2)] >> 2; i[u++] = e >> 8 & 255; i[u++] = e & 255 } return i } function s(r) { return t[r >> 18 & 63] + t[r >> 12 & 63] + t[r >> 6 & 63] + t[r & 63] } function l(r, e, n) { var t; var o = []; for (var a = e; a < n; a += 3) { t = (r[a] << 16 & 16711680) + (r[a + 1] << 8 & 65280) + (r[a + 2] & 255); o.push(s(t)) } return o.join(\"\") } function p(r) { var e; var n = r.length; var o = n % 3; var a = []; var f = 16383; for (var i = 0, u = n - o; i < u; i += f) { a.push(l(r, i, i + f > u ? u : i + f)) } if (o === 1) { e = r[n - 1]; a.push(t[e >> 2] + t[e << 4 & 63] + \"==\") } else if (o === 2) { e = (r[n - 2] << 8) + r[n - 1]; a.push(t[e >> 10] + t[e >> 4 & 63] + t[e << 2 & 63] + \"=\") } return a.join(\"\") } }, {}] }, {}, [])(\"/\") });\n\n /**\n * [promise-polyfill]{@link https://github.com/taylorhakes/promise-polyfill}\n *\n * @version v8.1.3 \n * @author Hakes, Taylor\n * @copyright Hakes, Taylor 2014\n * @license MIT\n */\n !function(e,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?n():\"function\"==typeof define&&define.amd?define(n):n()}(0,function(){\"use strict\";function e(e){var n=this.constructor;return this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){return n.reject(t)})})}function n(e){return!(!e||\"undefined\"==typeof e.length)}function t(){}function o(e){if(!(this instanceof o))throw new TypeError(\"Promises must be constructed via new\");if(\"function\"!=typeof e)throw new TypeError(\"not a function\");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],c(e,this)}function r(e,n){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,o._immediateFn(function(){var t=1===e._state?n.onFulfilled:n.onRejected;if(null!==t){var o;try{o=t(e._value)}catch(r){return void f(n.promise,r)}i(n.promise,o)}else(1===e._state?i:f)(n.promise,e._value)})):e._deferreds.push(n)}function i(e,n){try{if(n===e)throw new TypeError(\"A promise cannot be resolved with itself.\");if(n&&(\"object\"==typeof n||\"function\"==typeof n)){var t=n.then;if(n instanceof o)return e._state=3,e._value=n,void u(e);if(\"function\"==typeof t)return void c(function(e,n){return function(){e.apply(n,arguments)}}(t,n),e)}e._state=1,e._value=n,u(e)}catch(r){f(e,r)}}function f(e,n){e._state=2,e._value=n,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&o._immediateFn(function(){e._handled||o._unhandledRejectionFn(e._value)});for(var n=0,t=e._deferreds.length;t>n;n++)r(e,e._deferreds[n]);e._deferreds=null}function c(e,n){var t=!1;try{e(function(e){t||(t=!0,i(n,e))},function(e){t||(t=!0,f(n,e))})}catch(o){if(t)return;t=!0,f(n,o)}}var a=setTimeout;o.prototype[\"catch\"]=function(e){return this.then(null,e)},o.prototype.then=function(e,n){var o=new this.constructor(t);return r(this,new function(e,n,t){this.onFulfilled=\"function\"==typeof e?e:null,this.onRejected=\"function\"==typeof n?n:null,this.promise=t}(e,n,o)),o},o.prototype[\"finally\"]=e,o.all=function(e){return new o(function(t,o){function r(e,n){try{if(n&&(\"object\"==typeof n||\"function\"==typeof n)){var u=n.then;if(\"function\"==typeof u)return void u.call(n,function(n){r(e,n)},o)}i[e]=n,0==--f&&t(i)}catch(c){o(c)}}if(!n(e))return o(new TypeError(\"Promise.all accepts an array\"));var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);for(var f=i.length,u=0;i.length>u;u++)r(u,i[u])})},o.resolve=function(e){return e&&\"object\"==typeof e&&e.constructor===o?e:new o(function(n){n(e)})},o.reject=function(e){return new o(function(n,t){t(e)})},o.race=function(e){return new o(function(t,r){if(!n(e))return r(new TypeError(\"Promise.race accepts an array\"));for(var i=0,f=e.length;f>i;i++)o.resolve(e[i]).then(t,r)})},o._immediateFn=\"function\"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){a(e,0)},o._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn(\"Possible Unhandled Promise Rejection:\",e)};var l=function(){if(\"undefined\"!=typeof self)return self;if(\"undefined\"!=typeof window)return window;if(\"undefined\"!=typeof global)return global;throw Error(\"unable to locate global object\")}();\"Promise\"in l?l.Promise.prototype[\"finally\"]||(l.Promise.prototype[\"finally\"]=e):l.Promise=o});\n\n var Keycloak = factory( root[\"sha256\"], root[\"base64js\"] );\n root[\"Keycloak\"] = Keycloak;\n\n if ( typeof define === \"function\" && define.amd ) { \n define( \"keycloak\", [], function () { return Keycloak; } );\n }\n }\n})(window, function (sha256_imported, base64js_imported) {\n if (typeof Promise === 'undefined') {\n throw Error('Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.');\n }\n\n var loggedPromiseDeprecation = false;\n\n function logPromiseDeprecation() {\n if (!loggedPromiseDeprecation) {\n loggedPromiseDeprecation = true;\n console.warn('[KEYCLOAK] Usage of legacy style promise methods such as `.error()` and `.success()` has been deprecated and support will be removed in future versions. Use standard style promise methods such as `.then() and `.catch()` instead.');\n }\n }\n\n function toKeycloakPromise(promise) {\n promise.__proto__ = KeycloakPromise.prototype;\n return promise;\n }\n\n function KeycloakPromise(executor) {\n return toKeycloakPromise(new Promise(executor));\n }\n\n KeycloakPromise.prototype = Object.create(Promise.prototype);\n KeycloakPromise.prototype.constructor = KeycloakPromise;\n\n KeycloakPromise.prototype.success = function(callback) {\n logPromiseDeprecation();\n\n var promise = this.then(function handleSuccess(value) {\n callback(value);\n });\n \n return toKeycloakPromise(promise);\n };\n\n KeycloakPromise.prototype.error = function(callback) {\n logPromiseDeprecation();\n\n var promise = this.catch(function handleError(error) {\n callback(error);\n });\n\n return toKeycloakPromise(promise);\n };\n\n function Keycloak (config) {\n if (!(this instanceof Keycloak)) {\n return new Keycloak(config);\n }\n\n var kc = this;\n var adapter;\n var refreshQueue = [];\n var callbackStorage;\n\n var loginIframe = {\n enable: true,\n callbackList: [],\n interval: 5\n };\n\n var scripts = document.getElementsByTagName('script');\n for (var i = 0; i < scripts.length; i++) {\n if ((scripts[i].src.indexOf('keycloak.js') !== -1 || scripts[i].src.indexOf('keycloak.min.js') !== -1) && scripts[i].src.indexOf('version=') !== -1) {\n kc.iframeVersion = scripts[i].src.substring(scripts[i].src.indexOf('version=') + 8).split('&')[0];\n }\n }\n\n var useNonce = true;\n var logInfo = createLogger(console.info);\n var logWarn = createLogger(console.warn);\n \n kc.init = function (initOptions) {\n kc.authenticated = false;\n\n callbackStorage = createCallbackStorage();\n var adapters = ['default', 'cordova', 'cordova-native'];\n\n if (initOptions && adapters.indexOf(initOptions.adapter) > -1) {\n adapter = loadAdapter(initOptions.adapter);\n } else if (initOptions && typeof initOptions.adapter === \"object\") {\n adapter = initOptions.adapter;\n } else {\n if (window.Cordova || window.cordova) {\n adapter = loadAdapter('cordova');\n } else {\n adapter = loadAdapter();\n }\n }\n\n if (initOptions) {\n if (typeof initOptions.useNonce !== 'undefined') {\n useNonce = initOptions.useNonce;\n }\n\n if (typeof initOptions.checkLoginIframe !== 'undefined') {\n loginIframe.enable = initOptions.checkLoginIframe;\n }\n\n if (initOptions.checkLoginIframeInterval) {\n loginIframe.interval = initOptions.checkLoginIframeInterval;\n }\n\n if (initOptions.onLoad === 'login-required') {\n kc.loginRequired = true;\n }\n\n if (initOptions.responseMode) {\n if (initOptions.responseMode === 'query' || initOptions.responseMode === 'fragment') {\n kc.responseMode = initOptions.responseMode;\n } else {\n throw 'Invalid value for responseMode';\n }\n }\n\n if (initOptions.flow) {\n switch (initOptions.flow) {\n case 'standard':\n kc.responseType = 'code';\n break;\n case 'implicit':\n kc.responseType = 'id_token token';\n break;\n case 'hybrid':\n kc.responseType = 'code id_token token';\n break;\n default:\n throw 'Invalid value for flow';\n }\n kc.flow = initOptions.flow;\n }\n\n if (initOptions.timeSkew != null) {\n kc.timeSkew = initOptions.timeSkew;\n }\n\n if(initOptions.redirectUri) {\n kc.redirectUri = initOptions.redirectUri;\n }\n\n if (initOptions.silentCheckSsoRedirectUri) {\n kc.silentCheckSsoRedirectUri = initOptions.silentCheckSsoRedirectUri;\n }\n\n if (initOptions.pkceMethod) {\n if (initOptions.pkceMethod !== \"S256\") {\n throw 'Invalid value for pkceMethod';\n }\n kc.pkceMethod = initOptions.pkceMethod;\n }\n\n if (typeof initOptions.enableLogging === 'boolean') {\n kc.enableLogging = initOptions.enableLogging;\n } else {\n kc.enableLogging = false;\n }\n }\n\n if (!kc.responseMode) {\n kc.responseMode = 'fragment';\n }\n if (!kc.responseType) {\n kc.responseType = 'code';\n kc.flow = 'standard';\n }\n\n var promise = createPromise();\n\n var initPromise = createPromise();\n initPromise.promise.then(function() {\n kc.onReady && kc.onReady(kc.authenticated);\n promise.setSuccess(kc.authenticated);\n }).catch(function(errorData) {\n promise.setError(errorData);\n });\n\n var configPromise = loadConfig(config);\n\n function onLoad() {\n var doLogin = function(prompt) {\n if (!prompt) {\n options.prompt = 'none';\n }\n\n kc.login(options).then(function () {\n initPromise.setSuccess();\n }).catch(function () {\n initPromise.setError();\n });\n }\n\n var checkSsoSilently = function() {\n var ifrm = document.createElement(\"iframe\");\n var src = kc.createLoginUrl({prompt: 'none', redirectUri: kc.silentCheckSsoRedirectUri});\n ifrm.setAttribute(\"src\", src);\n ifrm.setAttribute(\"title\", \"keycloak-silent-check-sso\");\n ifrm.style.display = \"none\";\n document.body.appendChild(ifrm);\n\n var messageCallback = function(event) {\n if (event.origin !== window.location.origin || ifrm.contentWindow !== event.source) {\n return;\n }\n\n var oauth = parseCallback(event.data);\n processCallback(oauth, initPromise);\n\n document.body.removeChild(ifrm);\n window.removeEventListener(\"message\", messageCallback);\n };\n\n window.addEventListener(\"message\", messageCallback);\n };\n\n var options = {};\n switch (initOptions.onLoad) {\n case 'check-sso':\n if (loginIframe.enable) {\n setupCheckLoginIframe().then(function() {\n checkLoginIframe().then(function (unchanged) {\n if (!unchanged) {\n kc.silentCheckSsoRedirectUri ? checkSsoSilently() : doLogin(false);\n } else {\n initPromise.setSuccess();\n }\n }).catch(function () {\n initPromise.setError();\n });\n });\n } else {\n kc.silentCheckSsoRedirectUri ? checkSsoSilently() : doLogin(false);\n }\n break;\n case 'login-required':\n doLogin(true);\n break;\n default:\n throw 'Invalid value for onLoad';\n }\n }\n\n function processInit() {\n var callback = parseCallback(window.location.href);\n\n if (callback) {\n window.history.replaceState(window.history.state, null, callback.newUrl);\n }\n\n if (callback && callback.valid) {\n return setupCheckLoginIframe().then(function() {\n processCallback(callback, initPromise);\n }).catch(function (e) {\n initPromise.setError();\n });\n } else if (initOptions) {\n if (initOptions.token && initOptions.refreshToken) {\n setToken(initOptions.token, initOptions.refreshToken, initOptions.idToken);\n\n if (loginIframe.enable) {\n setupCheckLoginIframe().then(function() {\n checkLoginIframe().then(function (unchanged) {\n if (unchanged) {\n kc.onAuthSuccess && kc.onAuthSuccess();\n initPromise.setSuccess();\n scheduleCheckIframe();\n } else {\n initPromise.setSuccess();\n }\n }).catch(function () {\n initPromise.setError();\n });\n });\n } else {\n kc.updateToken(-1).then(function() {\n kc.onAuthSuccess && kc.onAuthSuccess();\n initPromise.setSuccess();\n }).catch(function() {\n kc.onAuthError && kc.onAuthError();\n if (initOptions.onLoad) {\n onLoad();\n } else {\n initPromise.setError();\n }\n });\n }\n } else if (initOptions.onLoad) {\n onLoad();\n } else {\n initPromise.setSuccess();\n }\n } else {\n initPromise.setSuccess();\n }\n }\n\n configPromise.then(processInit);\n configPromise.catch(function() {\n promise.setError();\n });\n\n return promise.promise;\n }\n\n kc.login = function (options) {\n return adapter.login(options);\n }\n\n function generateRandomData(len) {\n // use web crypto APIs if possible\n var array = null;\n var crypto = window.crypto || window.msCrypto;\n if (crypto && crypto.getRandomValues && window.Uint8Array) {\n array = new Uint8Array(len);\n crypto.getRandomValues(array);\n return array;\n }\n\n // fallback to Math random\n array = new Array(len);\n for (var j = 0; j < array.length; j++) {\n array[j] = Math.floor(256 * Math.random());\n }\n return array;\n }\n\n function generateCodeVerifier(len) {\n return generateRandomString(len, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789');\n }\n\n function generateRandomString(len, alphabet){\n var randomData = generateRandomData(len);\n var chars = new Array(len);\n for (var i = 0; i < len; i++) {\n chars[i] = alphabet.charCodeAt(randomData[i] % alphabet.length);\n }\n return String.fromCharCode.apply(null, chars);\n }\n\n function generatePkceChallenge(pkceMethod, codeVerifier) {\n switch (pkceMethod) {\n // The use of the \"plain\" method is considered insecure and therefore not supported.\n case \"S256\":\n // hash codeVerifier, then encode as url-safe base64 without padding\n var hashBytes = new Uint8Array(sha256_imported.arrayBuffer(codeVerifier));\n var encodedHash = base64js_imported.fromByteArray(hashBytes)\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_')\n .replace(/\\=/g, '');\n return encodedHash;\n default:\n throw 'Invalid value for pkceMethod';\n }\n }\n\n kc.createLoginUrl = function(options) {\n var state = createUUID();\n var nonce = createUUID();\n\n var redirectUri = adapter.redirectUri(options);\n\n var callbackState = {\n state: state,\n nonce: nonce,\n redirectUri: encodeURIComponent(redirectUri)\n };\n\n if (options && options.prompt) {\n callbackState.prompt = options.prompt;\n }\n\n var baseUrl;\n if (options && options.action == 'register') {\n baseUrl = kc.endpoints.register();\n } else {\n baseUrl = kc.endpoints.authorize();\n }\n\n var scope;\n if (options && options.scope) {\n if (options.scope.indexOf(\"openid\") != -1) {\n scope = options.scope;\n } else {\n scope = \"openid \" + options.scope;\n }\n } else {\n scope = \"openid\";\n }\n\n var url = baseUrl\n + '?client_id=' + encodeURIComponent(kc.clientId)\n + '&redirect_uri=' + encodeURIComponent(redirectUri)\n + '&state=' + encodeURIComponent(state)\n + '&response_mode=' + encodeURIComponent(kc.responseMode)\n + '&response_type=' + encodeURIComponent(kc.responseType)\n + '&scope=' + encodeURIComponent(scope);\n if (useNonce) {\n url = url + '&nonce=' + encodeURIComponent(nonce);\n }\n\n if (options && options.prompt) {\n url += '&prompt=' + encodeURIComponent(options.prompt);\n }\n\n if (options && options.maxAge) {\n url += '&max_age=' + encodeURIComponent(options.maxAge);\n }\n\n if (options && options.loginHint) {\n url += '&login_hint=' + encodeURIComponent(options.loginHint);\n }\n\n if (options && options.idpHint) {\n url += '&kc_idp_hint=' + encodeURIComponent(options.idpHint);\n }\n\n if (options && options.locale) {\n url += '&ui_locales=' + encodeURIComponent(options.locale);\n }\n\n if (kc.pkceMethod) {\n var codeVerifier = generateCodeVerifier(96);\n callbackState.pkceCodeVerifier = codeVerifier;\n var pkceChallenge = generatePkceChallenge(kc.pkceMethod, codeVerifier);\n url += '&code_challenge=' + pkceChallenge;\n url += '&code_challenge_method=' + kc.pkceMethod;\n }\n\n callbackStorage.add(callbackState);\n\n return url;\n }\n\n kc.logout = function(options) {\n return adapter.logout(options);\n }\n\n kc.createLogoutUrl = function(options) {\n var url = kc.endpoints.logout()\n + '?redirect_uri=' + encodeURIComponent(adapter.redirectUri(options, false));\n\n return url;\n }\n\n kc.register = function (options) {\n return adapter.register(options);\n }\n\n kc.createRegisterUrl = function(options) {\n if (!options) {\n options = {};\n }\n options.action = 'register';\n return kc.createLoginUrl(options);\n }\n\n kc.createAccountUrl = function(options) {\n var realm = getRealmUrl();\n var url = undefined;\n if (typeof realm !== 'undefined') {\n url = realm\n + '/account'\n + '?referrer=' + encodeURIComponent(kc.clientId)\n + '&referrer_uri=' + encodeURIComponent(adapter.redirectUri(options));\n }\n return url;\n }\n\n kc.accountManagement = function() {\n return adapter.accountManagement();\n }\n\n kc.hasRealmRole = function (role) {\n var access = kc.realmAccess;\n return !!access && access.roles.indexOf(role) >= 0;\n }\n\n kc.hasResourceRole = function(role, resource) {\n if (!kc.resourceAccess) {\n return false;\n }\n\n var access = kc.resourceAccess[resource || kc.clientId];\n return !!access && access.roles.indexOf(role) >= 0;\n }\n\n kc.loadUserProfile = function() {\n var url = getRealmUrl() + '/account';\n var req = new XMLHttpRequest();\n req.open('GET', url, true);\n req.setRequestHeader('Accept', 'application/json');\n req.setRequestHeader('Authorization', 'bearer ' + kc.token);\n\n var promise = createPromise();\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200) {\n kc.profile = JSON.parse(req.responseText);\n promise.setSuccess(kc.profile);\n } else {\n promise.setError();\n }\n }\n }\n\n req.send();\n\n return promise.promise;\n }\n\n kc.loadUserInfo = function() {\n var url = kc.endpoints.userinfo();\n var req = new XMLHttpRequest();\n req.open('GET', url, true);\n req.setRequestHeader('Accept', 'application/json');\n req.setRequestHeader('Authorization', 'bearer ' + kc.token);\n\n var promise = createPromise();\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200) {\n kc.userInfo = JSON.parse(req.responseText);\n promise.setSuccess(kc.userInfo);\n } else {\n promise.setError();\n }\n }\n }\n\n req.send();\n\n return promise.promise;\n }\n\n kc.isTokenExpired = function(minValidity) {\n if (!kc.tokenParsed || (!kc.refreshToken && kc.flow != 'implicit' )) {\n throw 'Not authenticated';\n }\n\n if (kc.timeSkew == null) {\n logInfo('[KEYCLOAK] Unable to determine if token is expired as timeskew is not set');\n return true;\n }\n\n var expiresIn = kc.tokenParsed['exp'] - Math.ceil(new Date().getTime() / 1000) + kc.timeSkew;\n if (minValidity) {\n if (isNaN(minValidity)) {\n throw 'Invalid minValidity';\n }\n expiresIn -= minValidity;\n }\n return expiresIn < 0;\n }\n\n kc.updateToken = function(minValidity) {\n var promise = createPromise();\n\n if (!kc.refreshToken) {\n promise.setError();\n return promise.promise;\n }\n\n minValidity = minValidity || 5;\n\n var exec = function() {\n var refreshToken = false;\n if (minValidity == -1) {\n refreshToken = true;\n logInfo('[KEYCLOAK] Refreshing token: forced refresh');\n } else if (!kc.tokenParsed || kc.isTokenExpired(minValidity)) {\n refreshToken = true;\n logInfo('[KEYCLOAK] Refreshing token: token expired');\n }\n\n if (!refreshToken) {\n promise.setSuccess(false);\n } else {\n var params = 'grant_type=refresh_token&' + 'refresh_token=' + kc.refreshToken;\n var url = kc.endpoints.token();\n\n refreshQueue.push(promise);\n\n if (refreshQueue.length == 1) {\n var req = new XMLHttpRequest();\n req.open('POST', url, true);\n req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');\n req.withCredentials = true;\n\n params += '&client_id=' + encodeURIComponent(kc.clientId);\n\n var timeLocal = new Date().getTime();\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200) {\n logInfo('[KEYCLOAK] Token refreshed');\n\n timeLocal = (timeLocal + new Date().getTime()) / 2;\n\n var tokenResponse = JSON.parse(req.responseText);\n\n setToken(tokenResponse['access_token'], tokenResponse['refresh_token'], tokenResponse['id_token'], timeLocal);\n\n kc.onAuthRefreshSuccess && kc.onAuthRefreshSuccess();\n for (var p = refreshQueue.pop(); p != null; p = refreshQueue.pop()) {\n p.setSuccess(true);\n }\n } else {\n logWarn('[KEYCLOAK] Failed to refresh token');\n\n if (req.status == 400) {\n kc.clearToken();\n }\n\n kc.onAuthRefreshError && kc.onAuthRefreshError();\n for (var p = refreshQueue.pop(); p != null; p = refreshQueue.pop()) {\n p.setError(true);\n }\n }\n }\n };\n\n req.send(params);\n }\n }\n }\n\n if (loginIframe.enable) {\n var iframePromise = checkLoginIframe();\n iframePromise.then(function() {\n exec();\n }).catch(function() {\n promise.setError();\n });\n } else {\n exec();\n }\n\n return promise.promise;\n }\n\n kc.clearToken = function() {\n if (kc.token) {\n setToken(null, null, null);\n kc.onAuthLogout && kc.onAuthLogout();\n if (kc.loginRequired) {\n kc.login();\n }\n }\n }\n\n function getRealmUrl() {\n if (typeof kc.authServerUrl !== 'undefined') {\n if (kc.authServerUrl.charAt(kc.authServerUrl.length - 1) == '/') {\n return kc.authServerUrl + 'realms/' + encodeURIComponent(kc.realm);\n } else {\n return kc.authServerUrl + '/realms/' + encodeURIComponent(kc.realm);\n }\n } else {\n \treturn undefined;\n }\n }\n\n function getOrigin() {\n if (!window.location.origin) {\n return window.location.protocol + \"//\" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');\n } else {\n return window.location.origin;\n }\n }\n\n function processCallback(oauth, promise) {\n var code = oauth.code;\n var error = oauth.error;\n var prompt = oauth.prompt;\n\n var timeLocal = new Date().getTime();\n\n if (error) {\n if (prompt != 'none') {\n var errorData = { error: error, error_description: oauth.error_description };\n kc.onAuthError && kc.onAuthError(errorData);\n promise && promise.setError(errorData);\n } else {\n promise && promise.setSuccess();\n }\n return;\n } else if ((kc.flow != 'standard') && (oauth.access_token || oauth.id_token)) {\n authSuccess(oauth.access_token, null, oauth.id_token, true);\n }\n\n if ((kc.flow != 'implicit') && code) {\n var params = 'code=' + code + '&grant_type=authorization_code';\n var url = kc.endpoints.token();\n\n var req = new XMLHttpRequest();\n req.open('POST', url, true);\n req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');\n\n params += '&client_id=' + encodeURIComponent(kc.clientId);\n params += '&redirect_uri=' + oauth.redirectUri;\n\n if (oauth.pkceCodeVerifier) {\n params += '&code_verifier=' + oauth.pkceCodeVerifier;\n }\n\n req.withCredentials = true;\n\n req.onreadystatechange = function() {\n if (req.readyState == 4) {\n if (req.status == 200) {\n\n var tokenResponse = JSON.parse(req.responseText);\n authSuccess(tokenResponse['access_token'], tokenResponse['refresh_token'], tokenResponse['id_token'], kc.flow === 'standard');\n scheduleCheckIframe();\n } else {\n kc.onAuthError && kc.onAuthError();\n promise && promise.setError();\n }\n }\n };\n\n req.send(params);\n }\n\n function authSuccess(accessToken, refreshToken, idToken, fulfillPromise) {\n timeLocal = (timeLocal + new Date().getTime()) / 2;\n\n setToken(accessToken, refreshToken, idToken, timeLocal);\n\n if (useNonce && ((kc.tokenParsed && kc.tokenParsed.nonce != oauth.storedNonce) ||\n (kc.refreshTokenParsed && kc.refreshTokenParsed.nonce != oauth.storedNonce) ||\n (kc.idTokenParsed && kc.idTokenParsed.nonce != oauth.storedNonce))) {\n\n logInfo('[KEYCLOAK] Invalid nonce, clearing token');\n kc.clearToken();\n promise && promise.setError();\n } else {\n if (fulfillPromise) {\n kc.onAuthSuccess && kc.onAuthSuccess();\n promise && promise.setSuccess();\n }\n }\n }\n\n }\n\n function loadConfig(url) {\n var promise = createPromise();\n var configUrl;\n\n if (!config) {\n configUrl = 'keycloak.json';\n } else if (typeof config === 'string') {\n configUrl = config;\n }\n\n function setupOidcEndoints(oidcConfiguration) {\n if (! oidcConfiguration) {\n kc.endpoints = {\n authorize: function() {\n return getRealmUrl() + '/protocol/openid-connect/auth';\n },\n token: function() {\n return getRealmUrl() + '/protocol/openid-connect/token';\n },\n logout: function() {\n return getRealmUrl() + '/protocol/openid-connect/logout';\n },\n checkSessionIframe: function() {\n var src = getRealmUrl() + '/protocol/openid-connect/login-status-iframe.html';\n if (kc.iframeVersion) {\n src = src + '?version=' + kc.iframeVersion;\n }\n return src;\n },\n register: function() {\n return getRealmUrl() + '/protocol/openid-connect/registrations';\n },\n userinfo: function() {\n return getRealmUrl() + '/protocol/openid-connect/userinfo';\n }\n };\n } else {\n kc.endpoints = {\n authorize: function() {\n return oidcConfiguration.authorization_endpoint;\n },\n token: function() {\n return oidcConfiguration.token_endpoint;\n },\n logout: function() {\n if (!oidcConfiguration.end_session_endpoint) {\n throw \"Not supported by the OIDC server\";\n }\n return oidcConfiguration.end_session_endpoint;\n },\n checkSessionIframe: function() {\n if (!oidcConfiguration.check_session_iframe) {\n throw \"Not supported by the OIDC server\";\n }\n return oidcConfiguration.check_session_iframe;\n },\n register: function() {\n throw 'Redirection to \"Register user\" page not supported in standard OIDC mode';\n },\n userinfo: function() {\n if (!oidcConfiguration.userinfo_endpoint) {\n throw \"Not supported by the OIDC server\";\n }\n return oidcConfiguration.userinfo_endpoint;\n }\n }\n }\n }\n\n if (configUrl) {\n var req = new XMLHttpRequest();\n req.open('GET', configUrl, true);\n req.setRequestHeader('Accept', 'application/json');\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200 || fileLoaded(req)) {\n var config = JSON.parse(req.responseText);\n\n kc.authServerUrl = config['auth-server-url'];\n kc.realm = config['realm'];\n kc.clientId = config['resource'];\n setupOidcEndoints(null);\n promise.setSuccess();\n } else {\n promise.setError();\n }\n }\n };\n\n req.send();\n } else {\n if (!config.clientId) {\n throw 'clientId missing';\n }\n\n kc.clientId = config.clientId;\n\n var oidcProvider = config['oidcProvider'];\n if (!oidcProvider) {\n if (!config['url']) {\n var scripts = document.getElementsByTagName('script');\n for (var i = 0; i < scripts.length; i++) {\n if (scripts[i].src.match(/.*keycloak\\.js/)) {\n config.url = scripts[i].src.substr(0, scripts[i].src.indexOf('/js/keycloak.js'));\n break;\n }\n }\n }\n if (!config.realm) {\n throw 'realm missing';\n }\n\n kc.authServerUrl = config.url;\n kc.realm = config.realm;\n setupOidcEndoints(null);\n promise.setSuccess();\n } else {\n if (typeof oidcProvider === 'string') {\n var oidcProviderConfigUrl;\n if (oidcProvider.charAt(oidcProvider.length - 1) == '/') {\n oidcProviderConfigUrl = oidcProvider + '.well-known/openid-configuration';\n } else {\n oidcProviderConfigUrl = oidcProvider + '/.well-known/openid-configuration';\n }\n var req = new XMLHttpRequest();\n req.open('GET', oidcProviderConfigUrl, true);\n req.setRequestHeader('Accept', 'application/json');\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200 || fileLoaded(req)) {\n var oidcProviderConfig = JSON.parse(req.responseText);\n setupOidcEndoints(oidcProviderConfig);\n promise.setSuccess();\n } else {\n promise.setError();\n }\n }\n };\n\n req.send();\n } else {\n setupOidcEndoints(oidcProvider);\n promise.setSuccess();\n }\n }\n }\n\n return promise.promise;\n }\n\n function fileLoaded(xhr) {\n return xhr.status == 0 && xhr.responseText && xhr.responseURL.startsWith('file:');\n }\n\n function setToken(token, refreshToken, idToken, timeLocal) {\n if (kc.tokenTimeoutHandle) {\n clearTimeout(kc.tokenTimeoutHandle);\n kc.tokenTimeoutHandle = null;\n }\n\n if (refreshToken) {\n kc.refreshToken = refreshToken;\n kc.refreshTokenParsed = decodeToken(refreshToken);\n } else {\n delete kc.refreshToken;\n delete kc.refreshTokenParsed;\n }\n\n if (idToken) {\n kc.idToken = idToken;\n kc.idTokenParsed = decodeToken(idToken);\n } else {\n delete kc.idToken;\n delete kc.idTokenParsed;\n }\n\n if (token) {\n kc.token = token;\n kc.tokenParsed = decodeToken(token);\n kc.sessionId = kc.tokenParsed.session_state;\n kc.authenticated = true;\n kc.subject = kc.tokenParsed.sub;\n kc.realmAccess = kc.tokenParsed.realm_access;\n kc.resourceAccess = kc.tokenParsed.resource_access;\n\n if (timeLocal) {\n kc.timeSkew = Math.floor(timeLocal / 1000) - kc.tokenParsed.iat;\n }\n\n if (kc.timeSkew != null) {\n logInfo('[KEYCLOAK] Estimated time difference between browser and server is ' + kc.timeSkew + ' seconds');\n\n if (kc.onTokenExpired) {\n var expiresIn = (kc.tokenParsed['exp'] - (new Date().getTime() / 1000) + kc.timeSkew) * 1000;\n logInfo('[KEYCLOAK] Token expires in ' + Math.round(expiresIn / 1000) + ' s');\n if (expiresIn <= 0) {\n kc.onTokenExpired();\n } else {\n kc.tokenTimeoutHandle = setTimeout(kc.onTokenExpired, expiresIn);\n }\n }\n }\n } else {\n delete kc.token;\n delete kc.tokenParsed;\n delete kc.subject;\n delete kc.realmAccess;\n delete kc.resourceAccess;\n\n kc.authenticated = false;\n }\n }\n\n function decodeToken(str) {\n str = str.split('.')[1];\n\n str = str.replace('/-/g', '+');\n str = str.replace('/_/g', '/');\n switch (str.length % 4)\n {\n case 0:\n break;\n case 2:\n str += '==';\n break;\n case 3:\n str += '=';\n break;\n default:\n throw 'Invalid token';\n }\n\n str = (str + '===').slice(0, str.length + (str.length % 4));\n str = str.replace(/-/g, '+').replace(/_/g, '/');\n\n str = decodeURIComponent(escape(atob(str)));\n\n str = JSON.parse(str);\n return str;\n }\n\n function createUUID() {\n var hexDigits = '0123456789abcdef';\n var s = generateRandomString(36, hexDigits).split(\"\");\n s[14] = '4';\n s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);\n s[8] = s[13] = s[18] = s[23] = '-';\n var uuid = s.join('');\n return uuid;\n }\n\n function parseCallback(url) {\n var oauth = parseCallbackUrl(url);\n if (!oauth) {\n return;\n }\n\n var oauthState = callbackStorage.get(oauth.state);\n\n if (oauthState) {\n oauth.valid = true;\n oauth.redirectUri = oauthState.redirectUri;\n oauth.storedNonce = oauthState.nonce;\n oauth.prompt = oauthState.prompt;\n oauth.pkceCodeVerifier = oauthState.pkceCodeVerifier;\n }\n\n return oauth;\n }\n\n function parseCallbackUrl(url) {\n var supportedParams;\n switch (kc.flow) {\n case 'standard':\n supportedParams = ['code', 'state', 'session_state'];\n break;\n case 'implicit':\n supportedParams = ['access_token', 'token_type', 'id_token', 'state', 'session_state', 'expires_in'];\n break;\n case 'hybrid':\n supportedParams = ['access_token', 'id_token', 'code', 'state', 'session_state'];\n break;\n }\n\n supportedParams.push('error');\n supportedParams.push('error_description');\n supportedParams.push('error_uri');\n\n var queryIndex = url.indexOf('?');\n var fragmentIndex = url.indexOf('#');\n\n var newUrl;\n var parsed;\n\n if (kc.responseMode === 'query' && queryIndex !== -1) {\n newUrl = url.substring(0, queryIndex);\n parsed = parseCallbackParams(url.substring(queryIndex + 1, fragmentIndex !== -1 ? fragmentIndex : url.length), supportedParams);\n if (parsed.paramsString !== '') {\n newUrl += '?' + parsed.paramsString;\n }\n if (fragmentIndex !== -1) {\n newUrl += url.substring(fragmentIndex);\n }\n } else if (kc.responseMode === 'fragment' && fragmentIndex !== -1) {\n newUrl = url.substring(0, fragmentIndex);\n parsed = parseCallbackParams(url.substring(fragmentIndex + 1), supportedParams);\n if (parsed.paramsString !== '') {\n newUrl += '#' + parsed.paramsString;\n }\n }\n\n if (parsed && parsed.oauthParams) {\n if (kc.flow === 'standard' || kc.flow === 'hybrid') {\n if ((parsed.oauthParams.code || parsed.oauthParams.error) && parsed.oauthParams.state) {\n parsed.oauthParams.newUrl = newUrl;\n return parsed.oauthParams;\n }\n } else if (kc.flow === 'implicit') {\n if ((parsed.oauthParams.access_token || parsed.oauthParams.error) && parsed.oauthParams.state) {\n parsed.oauthParams.newUrl = newUrl;\n return parsed.oauthParams;\n }\n }\n }\n }\n\n function parseCallbackParams(paramsString, supportedParams) {\n var p = paramsString.split('&');\n var result = {\n paramsString: '',\n oauthParams: {}\n }\n for (var i = 0; i < p.length; i++) {\n var split = p[i].indexOf(\"=\");\n var key = p[i].slice(0, split);\n if (supportedParams.indexOf(key) !== -1) {\n result.oauthParams[key] = p[i].slice(split + 1);\n } else {\n if (result.paramsString !== '') {\n result.paramsString += '&';\n }\n result.paramsString += p[i];\n }\n }\n return result;\n }\n\n function createPromise() {\n // Need to create a native Promise which also preserves the\n // interface of the custom promise type previously used by the API\n var p = {\n setSuccess: function(result) {\n p.resolve(result);\n },\n\n setError: function(result) {\n p.reject(result);\n }\n };\n p.promise = new KeycloakPromise(function(resolve, reject) {\n p.resolve = resolve;\n p.reject = reject;\n });\n return p;\n }\n\n\n function setupCheckLoginIframe() {\n var promise = createPromise();\n\n if (!loginIframe.enable) {\n promise.setSuccess();\n return promise.promise;\n }\n\n if (loginIframe.iframe) {\n promise.setSuccess();\n return promise.promise;\n }\n\n var iframe = document.createElement('iframe');\n loginIframe.iframe = iframe;\n\n iframe.onload = function() {\n var authUrl = kc.endpoints.authorize();\n if (authUrl.charAt(0) === '/') {\n loginIframe.iframeOrigin = getOrigin();\n } else {\n loginIframe.iframeOrigin = authUrl.substring(0, authUrl.indexOf('/', 8));\n }\n promise.setSuccess();\n }\n\n var src = kc.endpoints.checkSessionIframe();\n iframe.setAttribute('src', src );\n iframe.setAttribute('title', 'keycloak-session-iframe' );\n iframe.style.display = 'none';\n document.body.appendChild(iframe);\n\n var messageCallback = function(event) {\n if ((event.origin !== loginIframe.iframeOrigin) || (loginIframe.iframe.contentWindow !== event.source)) {\n return;\n }\n\n if (!(event.data == 'unchanged' || event.data == 'changed' || event.data == 'error')) {\n return;\n }\n\n\n if (event.data != 'unchanged') {\n kc.clearToken();\n }\n\n var callbacks = loginIframe.callbackList.splice(0, loginIframe.callbackList.length);\n\n for (var i = callbacks.length - 1; i >= 0; --i) {\n var promise = callbacks[i];\n if (event.data == 'error') {\n promise.setError();\n } else {\n promise.setSuccess(event.data == 'unchanged');\n }\n }\n };\n\n window.addEventListener('message', messageCallback, false);\n\n return promise.promise;\n }\n\n function scheduleCheckIframe() {\n if (loginIframe.enable) {\n if (kc.token) {\n setTimeout(function() {\n checkLoginIframe().then(function(unchanged) {\n if (unchanged) {\n scheduleCheckIframe();\n }\n });\n }, loginIframe.interval * 1000);\n }\n }\n }\n\n function checkLoginIframe() {\n var promise = createPromise();\n\n if (loginIframe.iframe && loginIframe.iframeOrigin ) {\n var msg = kc.clientId + ' ' + (kc.sessionId ? kc.sessionId : '');\n loginIframe.callbackList.push(promise);\n var origin = loginIframe.iframeOrigin;\n if (loginIframe.callbackList.length == 1) {\n loginIframe.iframe.contentWindow.postMessage(msg, origin);\n }\n } else {\n promise.setSuccess();\n }\n\n return promise.promise;\n }\n\n function loadAdapter(type) {\n if (!type || type == 'default') {\n return {\n login: function(options) {\n window.location.replace(kc.createLoginUrl(options));\n return createPromise().promise;\n },\n\n logout: function(options) {\n window.location.replace(kc.createLogoutUrl(options));\n return createPromise().promise;\n },\n\n register: function(options) {\n window.location.replace(kc.createRegisterUrl(options));\n return createPromise().promise;\n },\n\n accountManagement : function() {\n var accountUrl = kc.createAccountUrl();\n if (typeof accountUrl !== 'undefined') {\n window.location.href = accountUrl;\n } else {\n throw \"Not supported by the OIDC server\";\n }\n return createPromise().promise;\n },\n\n redirectUri: function(options, encodeHash) {\n if (arguments.length == 1) {\n encodeHash = true;\n }\n\n if (options && options.redirectUri) {\n return options.redirectUri;\n } else if (kc.redirectUri) {\n return kc.redirectUri;\n } else {\n return location.href;\n }\n }\n };\n }\n\n if (type == 'cordova') {\n loginIframe.enable = false;\n var cordovaOpenWindowWrapper = function(loginUrl, target, options) {\n if (window.cordova && window.cordova.InAppBrowser) {\n // Use inappbrowser for IOS and Android if available\n return window.cordova.InAppBrowser.open(loginUrl, target, options);\n } else {\n return window.open(loginUrl, target, options);\n }\n };\n\n var shallowCloneCordovaOptions = function (userOptions) {\n if (userOptions && userOptions.cordovaOptions) {\n return Object.keys(userOptions.cordovaOptions).reduce(function (options, optionName) {\n options[optionName] = userOptions.cordovaOptions[optionName];\n return options;\n }, {});\n } else {\n return {};\n }\n };\n\n var formatCordovaOptions = function (cordovaOptions) {\n return Object.keys(cordovaOptions).reduce(function (options, optionName) {\n options.push(optionName+\"=\"+cordovaOptions[optionName]);\n return options;\n }, []).join(\",\");\n };\n\n var createCordovaOptions = function (userOptions) {\n var cordovaOptions = shallowCloneCordovaOptions(userOptions);\n cordovaOptions.location = 'no';\n if (userOptions && userOptions.prompt == 'none') {\n cordovaOptions.hidden = 'yes';\n }\n return formatCordovaOptions(cordovaOptions);\n };\n\n return {\n login: function(options) {\n var promise = createPromise();\n\n var cordovaOptions = createCordovaOptions(options);\n var loginUrl = kc.createLoginUrl(options);\n var ref = cordovaOpenWindowWrapper(loginUrl, '_blank', cordovaOptions);\n var completed = false;\n\n var closed = false;\n var closeBrowser = function() {\n closed = true;\n ref.close();\n };\n\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n var callback = parseCallback(event.url);\n processCallback(callback, promise);\n closeBrowser();\n completed = true;\n }\n });\n\n ref.addEventListener('loaderror', function(event) {\n if (!completed) {\n if (event.url.indexOf('http://localhost') == 0) {\n var callback = parseCallback(event.url);\n processCallback(callback, promise);\n closeBrowser();\n completed = true;\n } else {\n promise.setError();\n closeBrowser();\n }\n }\n });\n\n ref.addEventListener('exit', function(event) {\n if (!closed) {\n promise.setError({\n reason: \"closed_by_user\"\n });\n }\n });\n\n return promise.promise;\n },\n\n logout: function(options) {\n var promise = createPromise();\n\n var logoutUrl = kc.createLogoutUrl(options);\n var ref = cordovaOpenWindowWrapper(logoutUrl, '_blank', 'location=no,hidden=yes');\n\n var error;\n\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n }\n });\n\n ref.addEventListener('loaderror', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n } else {\n error = true;\n ref.close();\n }\n });\n\n ref.addEventListener('exit', function(event) {\n if (error) {\n promise.setError();\n } else {\n kc.clearToken();\n promise.setSuccess();\n }\n });\n\n return promise.promise;\n },\n\n register : function(options) {\n var promise = createPromise();\n var registerUrl = kc.createRegisterUrl();\n var cordovaOptions = createCordovaOptions(options);\n var ref = cordovaOpenWindowWrapper(registerUrl, '_blank', cordovaOptions);\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n var oauth = parseCallback(event.url);\n processCallback(oauth, promise);\n }\n });\n return promise.promise;\n },\n\n accountManagement : function() {\n var accountUrl = kc.createAccountUrl();\n if (typeof accountUrl !== 'undefined') {\n var ref = cordovaOpenWindowWrapper(accountUrl, '_blank', 'location=no');\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n }\n });\n } else {\n throw \"Not supported by the OIDC server\";\n }\n },\n\n redirectUri: function(options) {\n return 'http://localhost';\n }\n }\n }\n\n if (type == 'cordova-native') {\n loginIframe.enable = false;\n\n return {\n login: function(options) {\n var promise = createPromise();\n var loginUrl = kc.createLoginUrl(options);\n\n universalLinks.subscribe('keycloak', function(event) {\n universalLinks.unsubscribe('keycloak');\n window.cordova.plugins.browsertab.close();\n var oauth = parseCallback(event.url);\n processCallback(oauth, promise);\n });\n\n window.cordova.plugins.browsertab.openUrl(loginUrl);\n return promise.promise;\n },\n\n logout: function(options) {\n var promise = createPromise();\n var logoutUrl = kc.createLogoutUrl(options);\n\n universalLinks.subscribe('keycloak', function(event) {\n universalLinks.unsubscribe('keycloak');\n window.cordova.plugins.browsertab.close();\n kc.clearToken();\n promise.setSuccess();\n });\n\n window.cordova.plugins.browsertab.openUrl(logoutUrl);\n return promise.promise;\n },\n\n register : function(options) {\n var promise = createPromise();\n var registerUrl = kc.createRegisterUrl(options);\n universalLinks.subscribe('keycloak' , function(event) {\n universalLinks.unsubscribe('keycloak');\n window.cordova.plugins.browsertab.close();\n var oauth = parseCallback(event.url);\n processCallback(oauth, promise);\n });\n window.cordova.plugins.browsertab.openUrl(registerUrl);\n return promise.promise;\n\n },\n\n accountManagement : function() {\n var accountUrl = kc.createAccountUrl();\n if (typeof accountUrl !== 'undefined') {\n window.cordova.plugins.browsertab.openUrl(accountUrl);\n } else {\n throw \"Not supported by the OIDC server\";\n }\n },\n\n redirectUri: function(options) {\n if (options && options.redirectUri) {\n return options.redirectUri;\n } else if (kc.redirectUri) {\n return kc.redirectUri;\n } else {\n return \"http://localhost\";\n }\n }\n }\n }\n\n throw 'invalid adapter type: ' + type;\n }\n\n var LocalStorage = function() {\n if (!(this instanceof LocalStorage)) {\n return new LocalStorage();\n }\n\n localStorage.setItem('kc-test', 'test');\n localStorage.removeItem('kc-test');\n\n var cs = this;\n\n function clearExpired() {\n var time = new Date().getTime();\n for (var i = 0; i < localStorage.length; i++) {\n var key = localStorage.key(i);\n if (key && key.indexOf('kc-callback-') == 0) {\n var value = localStorage.getItem(key);\n if (value) {\n try {\n var expires = JSON.parse(value).expires;\n if (!expires || expires < time) {\n localStorage.removeItem(key);\n }\n } catch (err) {\n localStorage.removeItem(key);\n }\n }\n }\n }\n }\n\n cs.get = function(state) {\n if (!state) {\n return;\n }\n\n var key = 'kc-callback-' + state;\n var value = localStorage.getItem(key);\n if (value) {\n localStorage.removeItem(key);\n value = JSON.parse(value);\n }\n\n clearExpired();\n return value;\n };\n\n cs.add = function(state) {\n clearExpired();\n\n var key = 'kc-callback-' + state.state;\n state.expires = new Date().getTime() + (60 * 60 * 1000);\n localStorage.setItem(key, JSON.stringify(state));\n };\n };\n\n var CookieStorage = function() {\n if (!(this instanceof CookieStorage)) {\n return new CookieStorage();\n }\n\n var cs = this;\n\n cs.get = function(state) {\n if (!state) {\n return;\n }\n\n var value = getCookie('kc-callback-' + state);\n setCookie('kc-callback-' + state, '', cookieExpiration(-100));\n if (value) {\n return JSON.parse(value);\n }\n };\n\n cs.add = function(state) {\n setCookie('kc-callback-' + state.state, JSON.stringify(state), cookieExpiration(60));\n };\n\n cs.removeItem = function(key) {\n setCookie(key, '', cookieExpiration(-100));\n };\n\n var cookieExpiration = function (minutes) {\n var exp = new Date();\n exp.setTime(exp.getTime() + (minutes*60*1000));\n return exp;\n };\n\n var getCookie = function (key) {\n var name = key + '=';\n var ca = document.cookie.split(';');\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length);\n }\n }\n return '';\n };\n\n var setCookie = function (key, value, expirationDate) {\n var cookie = key + '=' + value + '; '\n + 'expires=' + expirationDate.toUTCString() + '; ';\n document.cookie = cookie;\n }\n };\n\n function createCallbackStorage() {\n try {\n return new LocalStorage();\n } catch (err) {\n }\n\n return new CookieStorage();\n }\n\n function createLogger(fn) {\n return function() {\n if (kc.enableLogging) {\n fn.apply(console, Array.prototype.slice.call(arguments));\n }\n };\n }\n }\n\n return Keycloak;\n})\n","export enum SessionStorageKeys {\n KeyCloakToken = 'KEYCLOAK_TOKEN',\n KeyCloakRefreshToken = 'KEYCLOAK_REFRESH_TOKEN',\n KeyCloakIdToken = 'KEYCLOAK_ID_TOKEN',\n ApiConfigKey = 'AUTH_API_CONFIG',\n PreventStorageSync = 'PREVENT_STORAGE_SYNC',\n LaunchDarklyFlags = 'LD_FLAGS',\n CurrentAccount = 'CURRENT_ACCOUNT',\n AuthApiUrl = 'AUTH_API_URL',\n AuthWebUrl = 'AUTH_WEB_URL',\n StatusApiUrl = 'STATUS_API_URL',\n WhatsNew = 'WHATS_NEW',\n SessionSynced = 'SESSION_SYNCED',\n RegistryHomeUrl = 'REGISTRY_HOME_URL',\n NameRequestUrl = 'NAME_REQUEST_URL',\n PprWebUrl = 'PPR_WEB_URL',\n SiteminderLogoutUrl = 'SITEMINDER_LOGOUT_URL'\n}\n\nexport enum Account {\n ANONYMOUS = 'ANONYMOUS',\n PREMIUM = 'PREMIUM',\n BASIC = 'BASIC',\n SBC_STAFF = 'SBC_STAFF',\n STAFF = 'STAFF'\n}\n\nexport enum IdpHint {\n BCROS = 'bcros',\n IDIR = 'idir',\n BCSC = 'bcsc',\n BCEID = 'bceid'\n}\n\nexport enum LoginSource {\n BCROS = 'BCROS',\n IDIR = 'IDIR',\n BCSC = 'BCSC',\n BCEID = 'BCEID'\n}\n\nexport enum Role {\n AccountHolder = 'account_holder',\n PublicUser = 'public_user',\n Staff = 'staff',\n GOVMAccountUser = 'gov_account_user'\n}\n\nexport enum Pages {\n HOME = 'home',\n USER_PROFILE = 'userprofile',\n ACCOUNT = 'account',\n SETTINGS = 'settings',\n SIGNIN = 'signin',\n USER_PROFILE_TERMS = 'userprofileterms',\n CREATE_ACCOUNT = 'setup-account',\n CHOOSE_AUTH_METHOD = 'choose-authentication-method',\n NON_BCSC_INSTRUCTIONS = 'nonbcsc-info/instructions',\n ACCOUNT_FREEZ = 'account-freeze',\n PENDING_APPROVAL = 'pendingapproval',\n ACCOUNT_SWITCHING = 'account-switching',\n REGISTRY_DASHBOARD = 'dashboard'\n}\n\nexport const ALLOWED_URIS_FOR_PENDING_ORGS: string[] = ['setup-non-bcsc-account', 'signout']\n\nexport const ACCOUNT_ID = 'accountid'\n","import ConfigHelper from './config-helper'\nimport { SessionStorageKeys, ACCOUNT_ID } from './constants'\n\n/**\n * Place to put all the custom utility methods\n */\nexport function getBoolean (value: boolean | string | number): boolean {\n let resultVal = value\n if (typeof value === 'string') {\n resultVal = value.toLowerCase()\n }\n switch (resultVal) {\n case true:\n case 'true':\n case 1:\n case '1':\n case 'on':\n case 'yes':\n case 'none':\n return true\n default:\n return false\n }\n}\n\nexport function decodeKCToken () {\n try {\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)\n if (token) {\n const base64Url = token.split('.')[1]\n const base64 = decodeURIComponent(window.atob(base64Url).split('').map(function (c) {\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)\n }).join(''))\n return JSON.parse(base64)\n } else {\n return {}\n }\n } catch (error) {\n throw new Error('Error parsing JWT - ' + error)\n }\n}\n\nexport function trimTrailingSlashURL (url) {\n return (url) ? url.trim().replace(/\\/+$/, '') : ''\n}\n\nexport function getAccountIdFromCurrentUrl () {\n const urlParams = new URLSearchParams(window.location.search)\n return urlParams.get(ACCOUNT_ID) || false\n}\n\nexport function checkAndAppend (url, key = '', value = '') {\n const separator = (/\\?/).test(url) ? '&' : '?'\n // remove key from URL if existing\n const newUrl = removeAccountIdFromUrl(url, key)\n return (value !== '' && key !== '') ? `${newUrl}${separator}${key}=${value}` : url\n}\n\n// if account id is not passed, will get it from session\n// there are some cases we need to pass account id, ie to watch account id and get URL dynamically\nexport function appendAccountId (url, accountId = '') {\n const sessionAccountId = JSON.parse(ConfigHelper.getFromSession(SessionStorageKeys.CurrentAccount) || '{}').id || ''\n const currentAccount = accountId !== '' ? accountId : sessionAccountId\n return checkAndAppend(url, ACCOUNT_ID, currentAccount)\n}\n\nexport function removeAccountIdFromUrl (url, key = ACCOUNT_ID) {\n // replacing account id and formattig ie, removing extra ? or &\n return url?.replace(new RegExp(key + '=\\\\w+'), '').replace('?&', '?').replace(/\\?$/, '')\n .replace('&&', '&').replace(/&$/, '')\n}\n","import { SessionStorageKeys } from './constants'\nimport { trimTrailingSlashURL } from './common-util'\n\nexport default class ConfigHelper {\n static keycloakConfigUrl = ''\n\n static addToSession (key: string, value: any): void {\n sessionStorage.setItem(key, value)\n }\n\n static getFromSession (key: string): string | null {\n return sessionStorage.getItem(key)\n }\n\n static removeFromSession (key: string): void {\n sessionStorage.removeItem(key)\n }\n\n static clearSession (): void {\n sessionStorage.clear()\n }\n\n static getStatusAPIUrl (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.StatusApiUrl) || '')\n }\n\n static getAuthAPIUrl (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.AuthApiUrl) || '')\n }\n\n static getAuthContextPath (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.AuthWebUrl) || '')\n }\n\n static getRegistryHomeURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.RegistryHomeUrl) || '')\n }\n\n static getNameRequestURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.NameRequestUrl) || '')\n }\n\n static getPprWebURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.PprWebUrl) || '')\n }\n\n static setKeycloakConfigUrl (keycloakConfigUrl: string) {\n this.keycloakConfigUrl = keycloakConfigUrl\n }\n\n static getKeycloakConfigUrl (): string {\n return this.keycloakConfigUrl\n }\n}\n","var VuexModule = /** @class */ (function () {\r\n function VuexModule(module) {\r\n this.actions = module.actions;\r\n this.mutations = module.mutations;\r\n this.state = module.state;\r\n this.getters = module.getters;\r\n this.namespaced = module.namespaced;\r\n this.modules = module.modules;\r\n }\r\n return VuexModule;\r\n}());\r\nfunction getModule(moduleClass, store) {\r\n if (moduleClass._statics) {\r\n return moduleClass._statics;\r\n }\r\n var genStatic = moduleClass._genStatic;\r\n if (!genStatic) {\r\n throw new Error(\"ERR_GET_MODULE_NO_STATICS : Could not get module accessor.\\n Make sure your module has name, we can't make accessors for unnamed modules\\n i.e. @Module({ name: 'something' })\");\r\n }\r\n return (moduleClass._statics = genStatic(store));\r\n}\n\nvar reservedKeys = ['actions', 'getters', 'mutations', 'modules', 'state', 'namespaced', 'commit'];\r\nfunction stateFactory(module) {\r\n var state = new module.prototype.constructor({});\r\n var s = {};\r\n Object.keys(state).forEach(function (key) {\r\n if (reservedKeys.indexOf(key) !== -1) {\r\n if (typeof state[key] !== 'undefined') {\r\n throw new Error(\"ERR_RESERVED_STATE_KEY_USED: You cannot use the following\\n ['actions', 'getters', 'mutations', 'modules', 'state', 'namespaced', 'commit']\\n as fields in your module. These are reserved as they have special purpose in Vuex\");\r\n }\r\n return;\r\n }\r\n if (state.hasOwnProperty(key)) {\r\n if (typeof state[key] !== 'function') {\r\n s[key] = state[key];\r\n }\r\n }\r\n });\r\n return s;\r\n}\n\n/**\r\n * Takes the properties on object from parameter source and adds them to the object\r\n * parameter target\r\n * @param {object} target Object to have properties copied onto from y\r\n * @param {object} source Object with properties to be copied to x\r\n */\r\nfunction addPropertiesToObject(target, source) {\r\n var _loop_1 = function (k) {\r\n Object.defineProperty(target, k, {\r\n get: function () { return source[k]; }\r\n });\r\n };\r\n for (var _i = 0, _a = Object.keys(source || {}); _i < _a.length; _i++) {\r\n var k = _a[_i];\r\n _loop_1(k);\r\n }\r\n}\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\n\nfunction staticStateGenerator(module, modOpt, statics) {\r\n var state = modOpt.stateFactory ? module.state() : module.state;\r\n Object.keys(state).forEach(function (key) {\r\n if (state.hasOwnProperty(key)) {\r\n // If not undefined or function means it is a state value\r\n if (['undefined', 'function'].indexOf(typeof state[key]) === -1) {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return modOpt.store.state[modOpt.name][key];\r\n }\r\n });\r\n }\r\n }\r\n });\r\n}\r\nfunction staticGetterGenerator(module, modOpt, statics) {\r\n Object.keys(module.getters).forEach(function (key) {\r\n if (module.namespaced) {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return modOpt.store.getters[modOpt.name + \"/\" + key];\r\n }\r\n });\r\n }\r\n else {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return modOpt.store.getters[key];\r\n }\r\n });\r\n }\r\n });\r\n}\r\nfunction staticMutationGenerator(module, modOpt, statics) {\r\n Object.keys(module.mutations).forEach(function (key) {\r\n if (module.namespaced) {\r\n statics[key] = function () {\r\n var _a;\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n (_a = modOpt.store).commit.apply(_a, [modOpt.name + \"/\" + key].concat(args));\r\n };\r\n }\r\n else {\r\n statics[key] = function () {\r\n var _a;\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n (_a = modOpt.store).commit.apply(_a, [key].concat(args));\r\n };\r\n }\r\n });\r\n}\r\nfunction staticActionGenerators(module, modOpt, statics) {\r\n Object.keys(module.actions).forEach(function (key) {\r\n if (module.namespaced) {\r\n statics[key] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _a;\r\n return __generator(this, function (_b) {\r\n return [2 /*return*/, (_a = modOpt.store).dispatch.apply(_a, [modOpt.name + \"/\" + key].concat(args))];\r\n });\r\n });\r\n };\r\n }\r\n else {\r\n statics[key] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _a;\r\n return __generator(this, function (_b) {\r\n return [2 /*return*/, (_a = modOpt.store).dispatch.apply(_a, [key].concat(args))];\r\n });\r\n });\r\n };\r\n }\r\n });\r\n}\n\nfunction moduleDecoratorFactory(moduleOptions) {\r\n return function (constructor) {\r\n var module = constructor;\r\n var stateFactory$1 = function () { return stateFactory(module); };\r\n if (!module.state) {\r\n module.state = moduleOptions && moduleOptions.stateFactory ? stateFactory$1 : stateFactory$1();\r\n }\r\n if (!module.getters) {\r\n module.getters = {};\r\n }\r\n if (!module.namespaced) {\r\n module.namespaced = moduleOptions && moduleOptions.namespaced;\r\n }\r\n Object.getOwnPropertyNames(module.prototype).forEach(function (funcName) {\r\n var descriptor = Object.getOwnPropertyDescriptor(module.prototype, funcName);\r\n if (descriptor.get && module.getters) {\r\n module.getters[funcName] = function (state, getters, rootState, rootGetters) {\r\n var thisObj = { context: { state: state, getters: getters, rootState: rootState, rootGetters: rootGetters } };\r\n addPropertiesToObject(thisObj, state);\r\n addPropertiesToObject(thisObj, getters);\r\n var got = descriptor.get.call(thisObj);\r\n return got;\r\n };\r\n }\r\n });\r\n var modOpt = moduleOptions;\r\n if (modOpt.name) {\r\n Object.defineProperty(constructor, '_genStatic', {\r\n value: function (store) {\r\n var statics = {};\r\n modOpt.store = modOpt.store || store;\r\n if (!modOpt.store) {\r\n throw new Error(\"ERR_STORE_NOT_PROVIDED: To use getModule(), either the module\\n should be decorated with store in decorator, i.e. @Module({store: store}) or\\n store should be passed when calling getModule(), i.e. getModule(MyModule, this.$store)\");\r\n }\r\n // =========== For statics ==============\r\n // ------ state -------\r\n staticStateGenerator(module, modOpt, statics);\r\n // ------- getters -------\r\n if (module.getters) {\r\n staticGetterGenerator(module, modOpt, statics);\r\n }\r\n // -------- mutations --------\r\n if (module.mutations) {\r\n staticMutationGenerator(module, modOpt, statics);\r\n }\r\n // -------- actions ---------\r\n if (module.actions) {\r\n staticActionGenerators(module, modOpt, statics);\r\n }\r\n return statics;\r\n }\r\n });\r\n }\r\n if (modOpt.dynamic) {\r\n if (!modOpt.name) {\r\n throw new Error('Name of module not provided in decorator options');\r\n }\r\n modOpt.store.registerModule(modOpt.name, // TODO: Handle nested modules too in future\r\n module);\r\n }\r\n return constructor;\r\n };\r\n}\r\nfunction Module(modOrOpt) {\r\n if (typeof modOrOpt === 'function') {\r\n /*\r\n * @Module decorator called without options (directly on the class definition)\r\n */\r\n moduleDecoratorFactory({})(modOrOpt);\r\n }\r\n else {\r\n /*\r\n * @Module({...}) decorator called with options\r\n */\r\n return moduleDecoratorFactory(modOrOpt);\r\n }\r\n}\n\nfunction actionDecoratorFactory(params) {\r\n var _a = params || {}, _b = _a.commit, commit = _b === void 0 ? undefined : _b, _c = _a.rawError, rawError = _c === void 0 ? false : _c, _d = _a.root, root = _d === void 0 ? false : _d;\r\n return function (target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.actions) {\r\n module.actions = {};\r\n }\r\n var actionFunction = descriptor.value;\r\n var action = function (context, payload) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var actionPayload, moduleAccessor, thisObj, e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, 5, , 6]);\r\n actionPayload = null;\r\n if (!module._genStatic) return [3 /*break*/, 2];\r\n moduleAccessor = getModule(module);\r\n moduleAccessor.context = context;\r\n return [4 /*yield*/, actionFunction.call(moduleAccessor, payload)];\r\n case 1:\r\n actionPayload = _a.sent();\r\n return [3 /*break*/, 4];\r\n case 2:\r\n thisObj = { context: context };\r\n addPropertiesToObject(thisObj, context.state);\r\n addPropertiesToObject(thisObj, context.getters);\r\n return [4 /*yield*/, actionFunction.call(thisObj, payload)];\r\n case 3:\r\n actionPayload = _a.sent();\r\n _a.label = 4;\r\n case 4:\r\n if (commit) {\r\n context.commit(commit, actionPayload);\r\n }\r\n return [2 /*return*/, actionPayload];\r\n case 5:\r\n e_1 = _a.sent();\r\n throw rawError\r\n ? e_1\r\n : new Error('ERR_ACTION_ACCESS_UNDEFINED: Are you trying to access ' +\r\n 'this.someMutation() or this.someGetter inside an @Action? \\n' +\r\n 'That works only in dynamic modules. \\n' +\r\n 'If not dynamic use this.context.commit(\"mutationName\", payload) ' +\r\n 'and this.context.getters[\"getterName\"]' +\r\n '\\n' +\r\n new Error(\"Could not perform action \" + key.toString()).stack +\r\n '\\n' +\r\n e_1.stack);\r\n case 6: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n module.actions[key] = root ? { root: root, handler: action } : action;\r\n };\r\n}\r\n/**\r\n * The @Action decorator turns an async function into an Vuex action\r\n *\r\n * @param targetOrParams the module class\r\n * @param key name of the action\r\n * @param descriptor the action function descriptor\r\n * @constructor\r\n */\r\nfunction Action(targetOrParams, key, descriptor) {\r\n if (!key && !descriptor) {\r\n /*\r\n * This is the case when `targetOrParams` is params.\r\n * i.e. when used as -\r\n *
\r\n            @Action({commit: 'incrCount'})\r\n            async getCountDelta() {\r\n              return 5\r\n            }\r\n         * 
\r\n */\r\n return actionDecoratorFactory(targetOrParams);\r\n }\r\n else {\r\n /*\r\n * This is the case when @Action is called on action function\r\n * without any params\r\n *
\r\n         *   @Action\r\n         *   async doSomething() {\r\n         *    ...\r\n         *   }\r\n         * 
\r\n */\r\n actionDecoratorFactory()(targetOrParams, key, descriptor);\r\n }\r\n}\n\nfunction Mutation(target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.mutations) {\r\n module.mutations = {};\r\n }\r\n var mutationFunction = descriptor.value ? descriptor.value : function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return ({});\r\n };\r\n var mutation = function (state, payload) {\r\n mutationFunction.call(state, payload);\r\n };\r\n module.mutations[key] = mutation;\r\n}\n\nfunction mutationActionDecoratorFactory(params) {\r\n return function (target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.mutations) {\r\n module.mutations = {};\r\n }\r\n if (!module.actions) {\r\n module.actions = {};\r\n }\r\n var mutactFunction = descriptor.value;\r\n var action = function (context, payload) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var actionPayload, e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, 2, , 3]);\r\n return [4 /*yield*/, mutactFunction.call(context, payload)];\r\n case 1:\r\n actionPayload = _a.sent();\r\n context.commit(key, actionPayload);\r\n return [3 /*break*/, 3];\r\n case 2:\r\n e_1 = _a.sent();\r\n if (params.rawError) {\r\n throw e_1;\r\n }\r\n else {\r\n console.error('Could not perform action ' + key.toString());\r\n console.error(e_1);\r\n }\r\n return [3 /*break*/, 3];\r\n case 3: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n var mutation = function (state, payload) {\r\n if (!params.mutate) {\r\n params.mutate = Object.keys(payload);\r\n }\r\n for (var _i = 0, _a = params.mutate; _i < _a.length; _i++) {\r\n var stateItem = _a[_i];\r\n if (state.hasOwnProperty(stateItem) && payload.hasOwnProperty(stateItem)) {\r\n state[stateItem] = payload[stateItem];\r\n }\r\n else {\r\n throw new Error(\"ERR_MUTATE_PARAMS_NOT_IN_PAYLOAD\\n In @MutationAction, mutate: ['a', 'b', ...] array keys must\\n match with return type = {a: {}, b: {}, ...} and must\\n also be in state.\");\r\n }\r\n }\r\n };\r\n module.actions[key] = params.root ? { root: true, handler: action } : action;\r\n module.mutations[key] = mutation;\r\n };\r\n}\r\n/**\r\n * The @MutationAction decorator turns this into an action that further calls a mutation\r\n * Both the action and the mutation are generated for you\r\n *\r\n * @param paramsOrTarget the params or the target class\r\n * @param key the name of the function\r\n * @param descriptor the function body\r\n * @constructor\r\n */\r\nfunction MutationAction(paramsOrTarget, key, descriptor) {\r\n if (!key && !descriptor) {\r\n /*\r\n * This is the case when `paramsOrTarget` is params.\r\n * i.e. when used as -\r\n *
\r\n            @MutationAction({mutate: ['incrCount']})\r\n            async getCountDelta() {\r\n              return {incrCount: 5}\r\n            }\r\n         * 
\r\n */\r\n return mutationActionDecoratorFactory(paramsOrTarget);\r\n }\r\n else {\r\n /*\r\n * This is the case when `paramsOrTarget` is target.\r\n * i.e. when used as -\r\n *
\r\n            @MutationAction\r\n            async getCountDelta() {\r\n              return {incrCount: 5}\r\n            }\r\n         * 
\r\n */\r\n mutationActionDecoratorFactory({})(paramsOrTarget, key, descriptor);\r\n }\r\n}\n\nexport { Action, Module, Mutation, MutationAction, VuexModule, getModule };\n//# sourceMappingURL=index.js.map\n","import { Module, VuexModule, Mutation, Action } from 'vuex-module-decorators'\nimport ConfigHelper from '../../util/config-helper'\nimport KeycloakServices from '../../services/keycloak.services'\nimport { SessionStorageKeys } from '../../util/constants'\n\n@Module({\n name: 'auth',\n namespaced: true\n})\nexport default class AuthModule extends VuexModule {\n token: string = ''\n idToken: string = ''\n refreshToken: string = ''\n kcGuid: string = ''\n loginSource: string = ''\n\n get isAuthenticated (): boolean {\n return !!this.token\n }\n\n get keycloakGuid (): string {\n return this.kcGuid || KeycloakServices.getUserInfo().keycloakGuid\n }\n\n get currentLoginSource (): string {\n return this.loginSource || KeycloakServices.getUserInfo().loginSource\n }\n\n @Mutation\n public setKCToken (token: string): void {\n this.token = token\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakToken, token)\n }\n\n @Mutation\n public setIDToken (idToken: string): void {\n this.idToken = idToken\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakIdToken, idToken)\n }\n\n @Mutation\n public setRefreshToken (refreshToken: string): void {\n this.refreshToken = refreshToken\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakRefreshToken, refreshToken)\n }\n\n @Mutation\n public setKCGuid (kcGuid: string): void {\n this.kcGuid = kcGuid\n }\n\n @Mutation\n public setLoginSource (loginSource: string): void {\n this.loginSource = loginSource\n }\n\n @Action({ rawError: true })\n public clearSession (): void {\n this.context.commit('setKCToken', '')\n this.context.commit('setIDToken', '')\n this.context.commit('setRefreshToken', '')\n this.context.commit('setKCGuid', '')\n this.context.commit('setLoginSource', '')\n }\n\n @Action({ rawError: true })\n public syncWithSessionStorage (): void {\n this.context.commit('setKCToken', ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || '')\n this.context.commit('setIDToken', ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || '')\n this.context.commit('setRefreshToken', ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || '')\n }\n}\n","import Keycloak, { KeycloakInitOptions, KeycloakInstance, KeycloakLoginOptions, KeycloakTokenParsed } from 'keycloak-js'\nimport { KCUserProfile } from '../models/KCUserProfile'\nimport ConfigHelper from '../util/config-helper'\nimport { SessionStorageKeys } from '../util/constants'\nimport { Store } from 'vuex'\nimport { getModule } from 'vuex-module-decorators'\nimport AuthModule from '../store/modules/auth'\nimport { decodeKCToken } from '../util/common-util'\n\nclass KeyCloakService {\n private kc: KeycloakInstance | undefined\n private parsedToken: any\n private static instance: KeyCloakService\n private store: Store | null = null\n private counter = 0\n private REFRESH_ATTEMPT_INTERVAL = 10 // in seconds\n private timerId: any = 0\n\n public static getInstance (): KeyCloakService {\n return (this.instance) ? this.instance : new KeyCloakService()\n }\n\n public get isInitialized (): boolean {\n return !!this.kc\n }\n\n // Setting keycloak config url as a static configuration to access from other parts of the app if needed\n async setKeycloakConfigUrl (keyCloakConfigurl: string) {\n ConfigHelper.setKeycloakConfigUrl(keyCloakConfigurl)\n }\n\n getKCInstance () : KeycloakInstance | undefined {\n return this.kc\n }\n\n async initializeKeyCloak (idpHint: string, store: Store) {\n this.store = store\n this.clearSession()\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || undefined\n const keycloakConfig = ConfigHelper.getKeycloakConfigUrl()\n this.kc = Keycloak(keycloakConfig)\n const kcLogin = this.kc.login\n this.kc.login = (options?: KeycloakLoginOptions) => {\n if (options) {\n options.idpHint = idpHint\n }\n return kcLogin(options)\n }\n let kcOptions :KeycloakInitOptions = {\n onLoad: 'login-required',\n checkLoginIframe: false,\n timeSkew: 0,\n token,\n refreshToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || undefined,\n idToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || undefined,\n pkceMethod: 'S256'\n }\n return this.kc.init(kcOptions)\n }\n\n async initSession () {\n if (!this.store) {\n return\n }\n\n const authModule = getModule(AuthModule, this.store)\n authModule.setKCToken(this.kc?.token || '')\n authModule.setIDToken(this.kc?.idToken || '')\n authModule.setRefreshToken(this.kc?.refreshToken || '')\n\n const userInfo = this.getUserInfo()\n authModule.setKCGuid(userInfo?.keycloakGuid || '')\n authModule.setLoginSource(userInfo?.loginSource || '')\n\n await this.syncSessionAndScheduleTokenRefresh()\n }\n\n getUserInfo () : KCUserProfile {\n if (!this.parsedToken || !Object.keys(this.parsedToken).length) {\n this.parsedToken = decodeKCToken()\n }\n return {\n lastName: this.parsedToken?.lastname,\n firstName: this.parsedToken?.firstname,\n email: this.parsedToken?.email,\n // eslint-disable-next-line camelcase\n roles: this.parsedToken?.realm_access?.roles,\n keycloakGuid: this.parsedToken?.sub,\n userName: this.parsedToken?.username,\n fullName: this.parsedToken?.name,\n loginSource: this.parsedToken?.loginSource\n }\n }\n\n async logout (redirectUrl?: string) {\n let token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || undefined\n if (token) {\n this.kc = Keycloak(ConfigHelper.getKeycloakConfigUrl())\n let kcOptions :KeycloakInitOptions = {\n onLoad: 'login-required',\n checkLoginIframe: false,\n timeSkew: 0,\n token,\n refreshToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || undefined,\n idToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || undefined,\n pkceMethod: 'S256'\n }\n const siteminderLogoutUrl = ConfigHelper.getFromSession(SessionStorageKeys.SiteminderLogoutUrl) || undefined\n // Here we clear session storage, and add a flag in to prevent the app from\n // putting tokens back in from returning async calls (see #2341)\n ConfigHelper.clearSession()\n ConfigHelper.addToSession(SessionStorageKeys.PreventStorageSync, true)\n return new Promise((resolve, reject) => {\n this.kc && this.kc.init(kcOptions)\n .then(authenticated => {\n if (!authenticated) {\n resolve()\n }\n redirectUrl = redirectUrl || `${window.location.origin}${process.env.VUE_APP_PATH}`\n if (siteminderLogoutUrl?.includes('http')) {\n redirectUrl = `${siteminderLogoutUrl}?returl=${redirectUrl.replace(/(https?:\\/\\/)|(\\/)+/g, '$1$2')}&retnow=1`\n }\n this.kc && this.kc.logout({ redirectUri: redirectUrl })\n .then(() => {\n resolve()\n })\n .catch(error => {\n reject(error)\n })\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n }\n\n async refreshToken (isForceRefresh?: boolean) {\n // Set the token expiry time as the minValidity to force refresh token\n if (!isForceRefresh && (!this.kc?.tokenParsed?.exp || !this.kc.timeSkew)) {\n return\n }\n // if isForceRefresh is true, send -1 in updateToken to force update the token\n let tokenExpiresIn = (isForceRefresh) ? -1 : this.kc.tokenParsed.exp - Math.ceil(new Date().getTime() / 1000) + this.kc.timeSkew + 100\n if (this.kc) {\n this.kc.updateToken(tokenExpiresIn)\n .then(refreshed => {\n if (refreshed) {\n this.initSession()\n }\n })\n .catch(() => {\n this.clearSession()\n return new Error('Could not refresh Token')\n })\n } else {\n return new Error('Could not refresh Token:No Kc Instance')\n }\n }\n\n verifyRoles (allowedRoles:[], disabledRoles:[]) {\n let isAuthorized = false\n if (allowedRoles || disabledRoles) {\n let userInfo = this.getUserInfo()\n isAuthorized = allowedRoles ? allowedRoles.some(role => userInfo.roles.includes(role)) : !disabledRoles.some(role => userInfo.roles.includes(role))\n } else {\n isAuthorized = true\n }\n return isAuthorized\n }\n\n async initializeToken (store?: Store, isScheduleRefresh: boolean = true, forceLogin: boolean = false) {\n this.store = store\n const kcOptions: KeycloakInitOptions = {\n onLoad: forceLogin ? 'login-required' : 'check-sso',\n checkLoginIframe: false,\n timeSkew: 0,\n token: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || undefined,\n refreshToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || undefined,\n idToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || undefined,\n pkceMethod: 'S256'\n }\n\n return new Promise((resolve, reject) => {\n this.kc = Keycloak(ConfigHelper.getKeycloakConfigUrl())\n ConfigHelper.addToSession(SessionStorageKeys.SessionSynced, false)\n this.kc.init(kcOptions)\n .then(authenticated => {\n console.info('[TokenServices] is User Authenticated?: Syncing ' + authenticated)\n resolve(this.syncSessionAndScheduleTokenRefresh(isScheduleRefresh))\n })\n .catch(error => {\n reject(new Error('Could not Initialize KC' + error))\n })\n })\n }\n\n async syncSessionAndScheduleTokenRefresh (isScheduleRefresh: boolean = true) {\n if (this.kc?.authenticated) {\n this.syncSessionStorage()\n if (isScheduleRefresh) {\n this.scheduleRefreshTimer()\n }\n return this.kc.token\n } else {\n this.clearSession()\n return new Error('NOT_AUTHENTICATED')\n }\n }\n\n scheduleRefreshTimer (refreshEarlyTime = 0) {\n let refreshEarlyTimeinMilliseconds = Math.max(this.REFRESH_ATTEMPT_INTERVAL, refreshEarlyTime) * 1000\n this.scheduleRefreshToken(refreshEarlyTimeinMilliseconds)\n }\n\n private scheduleRefreshToken (refreshEarlyTimeinMilliseconds: number) {\n let refreshTokenExpiresIn = -1\n // check if refresh token is still valid . Or else clear all timers and throw errors\n if (this.kc && this.kc.timeSkew !== undefined && this.kc.refreshTokenParsed) {\n refreshTokenExpiresIn = this.kc.refreshTokenParsed['exp']! - Math.ceil(new Date().getTime() / 1000) + this.kc.timeSkew\n }\n if (refreshTokenExpiresIn < 0) {\n throw new Error('Refresh Token Expired. No more token refreshes')\n }\n let expiresIn = -1\n if (this.kc && this.kc.tokenParsed && this.kc.tokenParsed['exp'] && this.kc.timeSkew !== undefined) {\n expiresIn = this.kc.tokenParsed['exp'] - Math.ceil(new Date().getTime() / 1000) + this.kc.timeSkew\n }\n if (expiresIn < 0) {\n throw new Error('Refresh Token Expired. No more token refreshes')\n }\n let refreshInMilliSeconds = (expiresIn * 1000) - refreshEarlyTimeinMilliseconds // in milliseconds\n console.info('[TokenServices] Token Refresh Scheduled in %s Seconds', (refreshInMilliSeconds / 1000))\n this.timerId = setTimeout(() => {\n console.log('[TokenServices] Refreshing Token Attempt: %s ', ++this.counter)\n this.kc!.updateToken(-1)\n .then(refreshed => {\n if (refreshed) {\n console.log('Token successfully refreshed')\n this.syncSessionStorage()\n this.scheduleRefreshToken(refreshEarlyTimeinMilliseconds)\n }\n })\n .catch(() => {\n clearTimeout(this.timerId)\n })\n }, refreshInMilliSeconds)\n }\n\n private syncSessionStorage () {\n if (this.kc) {\n if (this.kc.token) {\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakToken, this.kc.token)\n }\n if (this.kc.refreshToken) {\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakRefreshToken, this.kc.refreshToken)\n }\n if (this.kc.idToken) {\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakIdToken, this.kc.idToken)\n }\n ConfigHelper.addToSession(SessionStorageKeys.SessionSynced, true)\n } else {\n ConfigHelper.addToSession(SessionStorageKeys.SessionSynced, false)\n }\n }\n\n private async clearSession () {\n if (this.store) {\n const authModule = getModule(AuthModule, this.store)\n authModule.clearSession()\n }\n ConfigHelper.removeFromSession(SessionStorageKeys.KeyCloakToken)\n ConfigHelper.removeFromSession(SessionStorageKeys.KeyCloakIdToken)\n ConfigHelper.removeFromSession(SessionStorageKeys.KeyCloakRefreshToken)\n }\n}\n\nexport default KeyCloakService.getInstance()\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","/**\n * Place to put all the custom utility methods\n */\n\nimport { Address, BaseAddressModel } from '@/models/Address'\nimport { Role, SlipStatus } from '@/util/constants'\n\nimport KeyCloakService from 'sbc-common-components/src/services/keycloak.services'\nimport moment from 'moment'\n\nexport default class CommonUtils {\n // Formatting date in the desired format for displaying in the template\n static formatDisplayDate (date: Date, format?: string) {\n return date ? moment(date).format(format || 'MMM DD, YYYY') : ''\n }\n\n static requiredFieldRule (errorMessage: string = 'This field is required') {\n return [v => !!v || errorMessage]\n }\n\n static optionalFieldRule (errorMessage: string, length: number) {\n return [v => !v || (v.length <= length) || errorMessage]\n }\n\n static isSigningIn (): boolean {\n const path = window.location.pathname\n return (\n path.includes('/signin') ||\n path.includes('/signin-redirect') ||\n path.includes('/signin-redirect-full')\n )\n }\n\n static isSigningOut (): boolean {\n const path = window.location.pathname\n return path.includes('/signout')\n }\n\n // blob convert to downloadable file\n static fileDownload (data: any, fileName: string, fileType: string = 'text/plain', action:string = 'download') {\n const blob = new Blob([data], { type: fileType })\n if (typeof window.navigator.msSaveBlob !== 'undefined') {\n // IE workaround for \"HTML7007: One or more blob URLs were\n // revoked by closing the blob for which they were created.\n // These URLs will no longer resolve as the data backing\n // the URL has been freed.\"\n window.navigator.msSaveBlob(blob, fileName)\n } else {\n const blobURL = (window.URL && window.URL.createObjectURL) ? window.URL.createObjectURL(blob) : window.webkitURL.createObjectURL(blob)\n const tempLink = document.createElement('a')\n tempLink.style.display = 'none'\n tempLink.href = blobURL\n if (action === 'open') {\n tempLink.setAttribute('target', '_blank')\n } else {\n tempLink.setAttribute('download', fileName)\n }\n\n // Safari thinks _blank anchor are pop ups. We only want to set _blank\n // target if the browser does not support the HTML5 download attribute.\n // This allows you to download files in desktop safari if pop up blocking\n // is enabled.\n if (typeof tempLink.download === 'undefined') {\n tempLink.setAttribute('target', '_blank')\n }\n document.body.appendChild(tempLink)\n tempLink.click()\n setTimeout(() => {\n document.body.removeChild(tempLink)\n // TO CHECK: not revoking may increase more temp memory usage\n // once download, we will revokeObjectURL\n if (action !== 'open') {\n window.URL.revokeObjectURL(blobURL)\n }\n }, 200)\n }\n }\n\n static statusListColor (status: string, textColor: boolean = true) {\n let color = ''\n switch (status) {\n case SlipStatus.ACTIVE:\n case SlipStatus.COMPLETE:\n case SlipStatus.REFUNDPROCESSED:\n case SlipStatus.WRITEOFFCOMPLETED:\n color = 'success'\n break\n case SlipStatus.BOUNCED:\n case SlipStatus.NSF:\n case SlipStatus.LINKED:\n case SlipStatus.REFUNDREQUEST:\n case SlipStatus.REFUNDAUTHORIZED:\n case SlipStatus.WRITEOFFAUTHORIZED:\n case SlipStatus.WRITEOFFREQUESTED:\n case SlipStatus.VOID:\n color = 'error'\n break\n }\n\n return textColor ? `${color}--text` : color\n }\n\n static appendCurrencySymbol (currency: number | string) {\n return '$' + currency\n }\n\n static cleanObject (obj) {\n if (obj.remainingAmount) {\n obj.remainingAmount = obj.remainingAmount.replace(/[^0-9.]/g, '')\n }\n return Object.keys(obj)\n .filter((k) => obj[k] !== '' && obj[k] !== null)\n .reduce((a, k) => ({ ...a, [k]: obj[k] }), {})\n }\n\n static createQueryParams = params =>\n Object.keys(params)\n .map(k => `${k}=${encodeURI(params[k])}`)\n .join('&')\n\n static appendQueryParamsIfNeeded (targetUrl: string, route: any): string {\n const requestParams = CommonUtils.createQueryParams(route.query)\n return requestParams ? `${targetUrl}?${requestParams}` : targetUrl\n }\n\n // for converting address object of sbc-auth to as needed for BaseAddress component\n static convertAddressForComponent (address: Address) : BaseAddressModel {\n return {\n addressCity: address.city,\n addressCountry: address.country,\n addressRegion: address.region,\n deliveryInstructions: address.deliveryInstructions,\n postalCode: address.postalCode,\n streetAddress: address.street,\n streetAddressAdditional: address.streetAdditional\n }\n }\n\n // for converting address object of BaseAddress component to as needed for sbc-auth\n static convertAddressForAuth (iaddress: BaseAddressModel) : Address {\n return {\n city: iaddress.addressCity,\n country: iaddress.addressCountry,\n region: iaddress.addressRegion,\n deliveryInstructions: iaddress.deliveryInstructions,\n postalCode: iaddress.postalCode,\n street: iaddress.streetAddress,\n streetAdditional: iaddress.streetAddressAdditional\n }\n }\n\n static isApproverRole () {\n const approverRole:any = [Role.FAS_REFUND_APPROVER]\n return KeyCloakService.verifyRoles(approverRole, [])\n }\n\n static isVoidRole () {\n const voidRole:any = [Role.FAS_VOID]\n return KeyCloakService.verifyRoles(voidRole, [])\n }\n\n /**\n * check its in refunc process\n * @param {string} status\n */\n static isRefundProcessStatus (status) {\n return [\n SlipStatus.REFUNDREQUEST,\n SlipStatus.REFUNDAUTHORIZED,\n SlipStatus.REFUNDPROCESSED,\n SlipStatus.REFUNDREJECTED,\n SlipStatus.REFUNDUPLOADED\n ].includes(status)\n }\n\n /**\n * status is refundrequest\n * @param {string} status\n */\n static isRefundRequestStatus (status) {\n return [\n SlipStatus.REFUNDREQUEST\n ].includes(status)\n }\n\n /**\n * status permission allow to chaneg details\n * @param {string} status\n */\n static isEditEnabledBystatus (status) {\n return ![\n SlipStatus.REFUNDPROCESSED,\n SlipStatus.REFUNDAUTHORIZED,\n SlipStatus.NSF,\n SlipStatus.LINKED\n ].includes(status)\n }\n\n static isObject = (object) => {\n return object != null && typeof object === 'object'\n }\n\n static isDeepEqual = (object1, object2) => {\n const objKeys1 = Object.keys(object1)\n const objKeys2 = Object.keys(object2)\n\n if (objKeys1.length !== objKeys2.length) return false\n\n for (const key of objKeys1) {\n const value1 = object1[key]\n const value2 = object2[key]\n\n const isObjects = CommonUtils.isObject(value1) && CommonUtils.isObject(value2)\n\n if ((isObjects && !CommonUtils.isDeepEqual(value1, value2)) ||\n (!isObjects && value1 !== value2)\n ) {\n return false\n }\n }\n return true\n }\n}\n","import { SessionStorageKeys } from '@/util/constants'\n\nexport default class ConfigHelper {\n static async fetchConfig () {\n // sbc common components need the following keys\n sessionStorage.setItem(SessionStorageKeys.AuthApiUrl, ConfigHelper.getAuthAPIUrl())\n sessionStorage.setItem(SessionStorageKeys.PayApiUrl, ConfigHelper.getPayAPIURL())\n sessionStorage.setItem(SessionStorageKeys.StatusApiUrl, ConfigHelper.getStatusAPIUrl())\n sessionStorage.setItem(SessionStorageKeys.AuthWebUrl, ConfigHelper.getAuthWebUrl())\n sessionStorage.setItem(SessionStorageKeys.FasWebUrl, ConfigHelper.getFasWebUrl())\n if (ConfigHelper.getSiteminderLogoutUrl()) {\n sessionStorage.setItem(SessionStorageKeys.SiteminderLogoutUrl, ConfigHelper.getSiteminderLogoutUrl())\n }\n }\n\n /**\n * this will run everytime when vue is being loaded..so do the call only when session storage doesnt have the values\n */\n static saveConfigToSessionStorage () {\n return this.fetchConfig()\n }\n\n static getSelfURL () {\n // this is without a trailing slash\n return `${window.location.origin}${import.meta.env.VUE_APP_PATH}`.replace(/\\/$/, '') // remove the slash at the end\n }\n\n static getPayAPIURL () {\n const payApiUrl = `${import.meta.env.VUE_APP_PAY_API_URL}` + `${import.meta.env.VUE_APP_PAY_API_VERSION}`\n return sessionStorage.getItem(SessionStorageKeys.PayApiUrl) || payApiUrl\n }\n\n static getFasAPIURL () {\n return `${ConfigHelper.getPayAPIURL()}/fas`\n }\n\n static getAuthAPIUrl () {\n const authApiUrl = `${import.meta.env.VUE_APP_AUTH_API_URL}` + `${import.meta.env.VUE_APP_AUTH_API_VERSION}`\n return sessionStorage.getItem(SessionStorageKeys.AuthApiUrl) || authApiUrl\n }\n\n static getAuthWebUrl () {\n return sessionStorage.getItem(SessionStorageKeys.AuthWebUrl) || `${import.meta.env.VUE_APP_AUTH_WEB_URL}`\n }\n\n static getFasWebUrl () {\n return sessionStorage.getItem(SessionStorageKeys.FasWebUrl) || `${import.meta.env.VUE_APP_FAS_WEB_URL}`\n }\n\n static getStatusAPIUrl () {\n const statusApiUrl = `${import.meta.env.VUE_APP_STATUS_API_URL}` + `${import.meta.env.VUE_APP_STATUS_API_VERSION}`\n return sessionStorage.getItem(SessionStorageKeys.StatusApiUrl) || statusApiUrl\n }\n\n static getSiteminderLogoutUrl () {\n const logoutUrl = `${import.meta.env.VUE_APP_SITEMINDER_LOGOUT_URL}`\n return sessionStorage.getItem(SessionStorageKeys.SiteminderLogoutUrl) || logoutUrl\n }\n\n static getKeycloakAuthUrl () {\n return `${import.meta.env.VUE_APP_KEYCLOAK_AUTH_URL}`\n }\n\n static getKeycloakRealm () {\n return `${import.meta.env.VUE_APP_KEYCLOAK_REALM}`\n }\n\n static getKeycloakClientId () {\n return `${import.meta.env.VUE_APP_KEYCLOAK_CLIENTID}`\n }\n\n static getAddressCompleteKey () {\n return `${import.meta.env.VUE_APP_ADDRESS_COMPLETE_KEY}`\n }\n\n static addToSession (key:string, value:any) {\n sessionStorage.setItem(key, value)\n }\n\n static getFromSession (key:string) {\n return sessionStorage.getItem(key)\n }\n\n static removeFromSession (key:string) {\n sessionStorage.removeItem(key)\n }\n\n static clearSession () {\n sessionStorage.clear()\n }\n}\n","// Returns a function, that, as long as it continues to be invoked, will not\n// be triggered. The function will be called after it stops being called for\n// N milliseconds. If `immediate` is passed, trigger the function on the\n// leading edge, instead of the trailing.\n\nfunction debounce (func, wait = 300, immediate = false) {\n let timeout\n\n // to avoid this type error define this with type any, arg for rest arguments\n return function (this: any, ...args) {\n const context = this\n\n const later = function () {\n timeout = null\n if (!immediate) func.apply(context, args)\n }\n const callNow = immediate && !timeout\n\n clearTimeout(timeout)\n timeout = setTimeout(later, wait)\n if (callNow) func.apply(context, args)\n }\n}\n\nexport default debounce\n","import { computed, ref } from '@vue/composition-api'\n\nconst hasCallFailed = ref(false)\nconst activeCalls = ref(0)\nconst isThereActiveCalls = computed(() => {\n return activeCalls.value > 0\n})\n\nexport const useIndicators = () => {\n return {\n hasCallFailed,\n activeCalls,\n isThereActiveCalls\n }\n}\n","/*\nComposable function for loader component that is displayed whenever axios async process takes place\nGlobal loader is used in App.vue where show a full route loader - \nWhile, isLoading can be used inside an individual component - \n\n*/\n\nimport { ref } from '@vue/composition-api'\nimport { useIndicators } from '../useIndicators'\n\nexport function useLoader () {\n const { isThereActiveCalls } = useIndicators()\n const isLoading = ref(false)\n // vuex getters\n function changeLoadingStatus (isLoadingStatus: boolean): void {\n isLoading.value = isLoadingStatus\n }\n\n function toggleLoading (): void {\n changeLoadingStatus(!isLoading.value)\n }\n\n return {\n isLoading,\n isThereActiveCalls,\n toggleLoading\n }\n}\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\nvar enhanceError = require('./core/enhanceError');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n },\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nvar utils = require('./../utils');\nvar defaults = require('./../defaults');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n","'use strict';\n\nvar pkg = require('./../../package.json');\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\nvar currentVerArr = pkg.version.split('.');\n\n/**\n * Compare package versions\n * @param {string} version\n * @param {string?} thanVersion\n * @returns {boolean}\n */\nfunction isOlderVersion(version, thanVersion) {\n var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;\n var destVer = version.split('.');\n for (var i = 0; i < 3; i++) {\n if (pkgVersionArr[i] > destVer[i]) {\n return true;\n } else if (pkgVersionArr[i] < destVer[i]) {\n return false;\n }\n }\n return false;\n}\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator\n * @param {string?} version\n * @param {string} message\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n var isDeprecated = version && isOlderVersion(version);\n\n function formatMessage(opt, desc) {\n return '[Axios v' + pkg.version + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed in ' + version));\n }\n\n if (isDeprecated && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n isOlderVersion: isOlderVersion,\n assertOptions: assertOptions,\n validators: validators\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\nvar validator = require('../helpers/validator');\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","module.exports = require('./lib/axios');","import Axios from 'axios'\nimport ConfigHelper from '@/util/config-helper'\nimport { SessionStorageKeys } from '@/util/constants'\nimport { useIndicators } from '@/composables/useIndicators'\n// import store from '@/store'\n// using fasStore from window to avoid library build issue.\nconst axios = Axios.create()\n\nconst { activeCalls, hasCallFailed, isThereActiveCalls } = useIndicators()\n\naxios.defaults.showGlobalLoader = false // by default, false\naxios.defaults.showGlobalErrorHandling = true\n\naxios.interceptors.request.use(\n config => {\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)\n if (token) {\n config.headers.Authorization = `Bearer ${token}`\n }\n if (config.showGlobalLoader) {\n activeCalls.value++\n }\n return config\n },\n error => Promise.reject(error)\n)\n\naxios.interceptors.response.use(\n response => {\n // decrement active calls count by one\n if (response.config.showGlobalLoader && isThereActiveCalls.value) {\n activeCalls.value--\n }\n return response\n },\n error => {\n // decrement active calls count by one\n if (error.config.showGlobalLoader && isThereActiveCalls.value) {\n activeCalls.value--\n }\n // call has failed in this case. And if the config showGlobalErrorHandling is true, then update store\n if (error.config.showGlobalErrorHandling && error?.response?.status >= 500) {\n hasCallFailed.value = true\n }\n return Promise.reject(error)\n }\n)\n\n// to work on both case export as default and normal\nexport { axios }\nexport default axios\n","import { AxiosResponse } from 'axios'\nimport { Code } from '@/models/Code'\nimport ConfigHelper from '@/util/config-helper'\nimport axios from '@/util/http-util'\n\nexport default class CodesService {\n public static async getCodes (codeType: string): Promise> {\n return axios.get(`${ConfigHelper.getPayAPIURL()}/codes/${codeType}`)\n }\n}\n","import { ref } from '@vue/composition-api'\nimport { Code } from '@/models/Code'\nimport CodesService from '@/services/codes.service'\nimport { SlipStatus } from '@/util/constants'\n\nconst routingSlipStatusList = ref([])\n\nexport const useCodes = () => {\n const getRoutingSlipStatusList = async () => {\n if (routingSlipStatusList.value.length === 0) {\n const response: any = await CodesService.getCodes(\n 'routing_slip_statuses'\n )\n if (response && response.data && response.status === 200) {\n routingSlipStatusList.value = response.data?.codes.filter(\n code => code.code !== SlipStatus.REFUNDREJECTED\n )\n return\n }\n routingSlipStatusList.value = []\n }\n }\n return {\n routingSlipStatusList,\n getRoutingSlipStatusList\n }\n}\n","import { Code } from '@/models/Code'\nimport { SlipStatus } from '@/util/constants'\nimport { ref, computed, toRefs, onMounted } from '@vue/composition-api'\nimport { useCodes } from '../useCodes'\n\nexport function useStatusList (props, context) {\n const { getRoutingSlipStatusList, routingSlipStatusList } = useCodes()\n // default value set blank incase if we didnt pass props\n const { value = ref('') } = toRefs(props)\n\n // using same v-model value for getting value and update parent on change\n const currentStatus = computed({\n get: () => {\n return value.value || ''\n },\n set: (modalValue: Code) => {\n context.emit('input', modalValue.code)\n }\n })\n\n onMounted(() => {\n // getting status list mouint and setting inside store\n // will make call once till page refresh\n getRoutingSlipStatusList()\n })\n\n /**\n * return status label on code\n *\n * @param {string} code\n * @returns {string} description - label\n */\n function statusLabel (code: string) {\n const codeArray = selectedStatusObject(code)\n return codeArray[0]?.description || ''\n }\n\n /**\n * filtering array and find given value of object\n * use full when needed to set object of status\n * @param {string} code\n * @returns [{code, description}]\n */\n\n function selectedStatusObject (code: string) {\n return routingSlipStatusList.value?.filter(\n statusList => statusList.code === code\n )\n }\n\n return {\n routingSlipStatusList,\n currentStatus,\n statusLabel,\n selectedStatusObject\n }\n}\n","import { AxiosResponse } from 'axios'\nimport CommonUtils from '@/util/common-util'\nimport ConfigHelper from '@/util/config-helper'\nimport { GetFeeRequestParams, Payment } from '@/models/Payment'\nimport { LinkRoutingSlipPrams } from '@/models/RoutingSlip'\nimport axios from '@/util/http-util'\nimport { CreateRoutingSlipStatus, PatchActions, SlipStatus } from '@/util/constants'\n\nexport default class RoutingSlip {\n public static async getRoutingSlip (\n routingNumber: string,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.get(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingNumber}`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async createRoutingSlip (\n routingSlipRequest: RoutingSlip,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips`,\n routingSlipRequest,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async adjustRoutingSlip (\n payments: Payment[],\n routingSlipNumber: string\n ): Promise {\n const payload = {\n status: SlipStatus.CORRECTION,\n payments: payments\n }\n return axios.patch(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}?action=${PatchActions.UPDATE_STATUS}`,\n payload\n )\n }\n\n public static async updateRoutingSlipStatus (\n code: string,\n routingSlipNumber: string\n ): Promise {\n return axios.patch(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}?action=updateStatus`,\n { status: code }\n )\n }\n\n public static async updateRoutingSlipRefundStatus (\n code: string,\n routingSlipNumber: string\n ): Promise {\n try {\n const response = await axios.patch(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}?action=updateRefundStatus`,\n { refund_status: code }\n )\n if (response?.data) {\n return response.data\n }\n return null\n } catch (error) {\n console.error('Routing slip refund status update failed', error)\n throw error\n }\n }\n\n public static async updateRoutingSlipComments (\n data: any,\n slipNumber: string\n ): Promise {\n try {\n const response = await axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${slipNumber}/comments`,\n data\n )\n if (response?.data) {\n return response.data\n }\n return null\n } catch (error) {\n console.error('Failed to update routing slip comments', error)\n throw error\n }\n }\n\n public static async updateRoutingSlipRefund (\n details: string,\n routingSlipNumber: string\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}/refunds`,\n details\n )\n }\n\n public static async getSearchRoutingSlip (\n searchParams: RoutingSlip,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/queries`,\n searchParams,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async saveLinkRoutingSlip (\n LinkRoutingSlip: LinkRoutingSlipPrams,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/links`,\n LinkRoutingSlip,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async getLinkedRoutingSlips (\n routingSlipNumber: string,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.get(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}/links`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async getDailyReport (\n selectedDate: string,\n type: string = 'application/pdf',\n showGlobalLoader: boolean = false\n ): Promise {\n const headers = {\n Accept: type\n }\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${selectedDate}/reports`,\n {},\n {\n headers,\n responseType: 'blob' as 'json',\n showGlobalLoader: showGlobalLoader\n }\n )\n }\n\n public static async getSearchFilingType (\n searchParams: string,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.get(\n `${ConfigHelper.getPayAPIURL()}/fees/schedules?description=${searchParams}`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async getFeeByCorpTypeAndFilingType (\n getFeeRequestParams: GetFeeRequestParams,\n showGlobalLoader: boolean = false\n ): Promise {\n const requestParams = CommonUtils.createQueryParams(getFeeRequestParams.requestParams)\n return axios.get(\n `${ConfigHelper.getPayAPIURL()}/fees/${getFeeRequestParams.corpTypeCode}/${getFeeRequestParams.filingTypeCode}?${requestParams}`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async saveManualTransactions (\n transactions: any,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getPayAPIURL()}/payment-requests`,\n transactions,\n { showGlobalLoader: showGlobalLoader }\n\n )\n }\n\n public static async cancelRoutingSlipInvoice (\n invoiceId: number,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getPayAPIURL()}/payment-requests/${invoiceId}/refunds`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n}\n","import { computed, ref } from '@vue/composition-api'\nimport RoutingSlipService from '@/services/routingSlip.services'\nimport { AccountInfo, AdjustRoutingSlipAmountPrams, AdjustRoutingSlipChequePrams, GetRoutingSlipRequestPayload, LinkedRoutingSlips, RoutingSlip, RoutingSlipDetails } from '@/models/RoutingSlip'\nimport { ApiErrors, CreateRoutingSlipStatus, headerSearchTitle as headerSearchTitleConstant, SlipStatus } from '@/util/constants'\nimport CommonUtils from '@/util/common-util'\nimport { BusinessInfo, GetFeeRequestParams, Payment, TransactionParams } from '@/models/Payment'\n\nconst defaultParams = {\n page: 1,\n limit: 50,\n total: Infinity\n}\nconst headerSearchTitle = ref(headerSearchTitleConstant)\nconst searchRoutingSlipResult = ref([])\nconst searchRoutingSlipParams = ref(defaultParams)\n\nconst routingSlip = ref({})\nconst linkedRoutingSlips = ref(undefined)\nconst routingSlipDetails = ref({})\nconst accountInfo = ref({})\nconst chequePayment = ref([])\nconst cashPayment = ref({})\nconst isPaymentMethodCheque = ref(true)\nconst isAmountPaidInUsd = ref(false)\nconst autoCompleteRoutingSlips = ref([])\n\nexport const useRoutingSlip = () => {\n // Computed\n const invoiceCount = computed(() => {\n return routingSlip.value?.invoices?.length\n })\n\n const searchParamsExist = computed(() => {\n const params = searchRoutingSlipParams.value\n for (const key in params) {\n if (params[key] && params[key] !== '') {\n return false\n }\n }\n return true\n })\n\n // for a child linked to a parent routing slip, there would be a parentNumber\n const isRoutingSlipAChild = computed(() => {\n return !!routingSlip.value?.parentNumber\n })\n\n // if routingslip has parentNumber then it is a child Else, check if there are any children in linkedroutingslips for it.(in this case, it is a parent)\n const isRoutingSlipLinked = computed(() => {\n return (\n isRoutingSlipAChild.value || linkedRoutingSlips.value?.children.length > 0\n )\n })\n\n const isRoutingSlipVoid = computed(() => {\n return routingSlip.value?.status === SlipStatus.VOID\n })\n\n const updateRoutingSlipChequeNumber = (chequeNumToChange: AdjustRoutingSlipChequePrams) => {\n const payments = routingSlip.value.payments.map((payment: Payment, i: number) => {\n if (chequeNumToChange.paymentIndex === i) {\n payment.chequeReceiptNumber = chequeNumToChange.chequeNum\n }\n return { ...payment }\n })\n routingSlip.value.payments = payments\n }\n\n const updateRoutingSlipAmount = (amountToChange: AdjustRoutingSlipAmountPrams) => {\n const payments = routingSlip.value.payments.map((payment: Payment, i: number) => {\n if (amountToChange.paymentIndex === i) {\n if (amountToChange.isRoutingSlipPaidInUsd) {\n payment.paidUsdAmount = amountToChange.amount\n } else {\n payment.paidAmount = amountToChange.amount\n }\n }\n return { ...payment }\n })\n routingSlip.value.payments = payments\n }\n\n // Functions\n const createRoutingSlip = async () => {\n // build the RoutingSlip Request JSON object that needs to be sent.\n let routingSlipRequest: RoutingSlip = {}\n routingSlipRequest = { ...routingSlipDetails.value }\n routingSlipRequest.paymentAccount = accountInfo.value\n\n // By design, a routing slip can only have one payment method - CASH or CHEQUE.\n routingSlipRequest.payments = isPaymentMethodCheque.value\n ? chequePayment.value\n : [cashPayment.value]\n\n const response = await RoutingSlipService.createRoutingSlip(\n routingSlipRequest,\n true\n )\n if (response && response.data && response.status === 200) {\n routingSlip.value = response.data\n }\n }\n\n const checkRoutingNumber = async (): Promise => {\n try {\n const routingNumber = routingSlipDetails.value.number\n const response = await RoutingSlipService.getRoutingSlip(routingNumber)\n // if routing number existing we will get 200 as response\n // else we will get 204\n if (response.status === 204) {\n return CreateRoutingSlipStatus.VALID\n }\n // all other case routing is existing so can't use this number\n return CreateRoutingSlipStatus.EXISTS\n } catch (error) {\n if (error.response?.status === 400 && error.response?.data?.type === ApiErrors.FAS_INVALID_ROUTING_SLIP_DIGITS) {\n return CreateRoutingSlipStatus.INVALID_DIGITS\n }\n\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data)\n // on error we allow the routing number which should break on create and show error message\n return CreateRoutingSlipStatus.VALID\n }\n }\n\n const getRoutingSlip = async (getRoutingSlipRequestPayload: GetRoutingSlipRequestPayload) => {\n try {\n const response = await RoutingSlipService.getRoutingSlip(\n getRoutingSlipRequestPayload.routingSlipNumber,\n getRoutingSlipRequestPayload?.showGlobalLoader\n )\n\n if (response && response.data && response.status === 200) {\n routingSlip.value = response.data\n }\n // TODO : need to handle if slip not existing\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data) // 500 errors may not return data\n }\n }\n\n const updateRoutingSlipStatus = async (\n statusDetails: any\n ) => {\n const slipNumber = routingSlip.value.number\n // update status\n try {\n let response\n if (CommonUtils.isRefundProcessStatus(statusDetails?.status)) {\n response = await RoutingSlipService.updateRoutingSlipRefund(\n statusDetails,\n slipNumber\n )\n } else {\n response = await RoutingSlipService.updateRoutingSlipStatus(\n statusDetails.status,\n slipNumber\n )\n }\n if (response?.data && (response.status === 200 || response.status === 202)) {\n if (!CommonUtils.isRefundProcessStatus(statusDetails?.status)) {\n routingSlip.value = response.data\n } else {\n const getRoutingSlipRequestPayload: GetRoutingSlipRequestPayload = { routingSlipNumber: slipNumber }\n getRoutingSlip(getRoutingSlipRequestPayload)\n }\n return response\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response)\n return error?.response\n }\n }\n\n const updateRoutingSlipRefundStatus = async (status: any) => {\n const slipNumber = routingSlip.value.number\n try {\n const responseData = await RoutingSlipService.updateRoutingSlipRefundStatus(status, slipNumber)\n return responseData\n } catch (error) {\n console.error('Error updating refund status:', error)\n return error?.response\n }\n }\n\n const updateRoutingSlipComments = async (text: any) => {\n const slipNumber = routingSlip.value.number\n const data = {\n comment: {\n businessId: slipNumber,\n comment: text\n }\n }\n try {\n const responseData = await RoutingSlipService.updateRoutingSlipComments(data, slipNumber)\n return responseData\n } catch (error) {\n console.error('Error updating routing slip comments:', error)\n return error?.response\n }\n }\n\n const adjustRoutingSlip = async (payments: Payment[]): Promise => {\n // build the RoutingSlip Request JSON object that needs to be sent.\n const slipNumber = routingSlip.value.number\n try {\n const response = await RoutingSlipService.adjustRoutingSlip(\n payments,\n slipNumber\n )\n if (response?.data && response.status === 200) {\n return response.data\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response)\n return error?.response\n }\n }\n\n const resetRoutingSlipDetails = () => {\n routingSlipDetails.value = undefined\n accountInfo.value = undefined\n chequePayment.value = undefined\n cashPayment.value = undefined\n isPaymentMethodCheque.value = undefined\n }\n\n const resetSearchParams = (): void => {\n searchRoutingSlipParams.value = defaultParams\n searchRoutingSlipResult.value = []\n }\n\n const searchRoutingSlip = async (appendToResults = false) => {\n // // build the RoutingSlip Request JSON object that needs to be sent.\n\n let params = { ...searchRoutingSlipParams.value }\n // filtering and removing all non set values\n params = CommonUtils.cleanObject(params)\n\n // formatting as per API\n if (params.dateFilter) {\n params.dateFilter = {\n startDate: CommonUtils.formatDisplayDate(\n params.dateFilter[0],\n 'YYYY-MM-DD'\n ),\n endDate: CommonUtils.formatDisplayDate(\n params.dateFilter[1],\n 'YYYY-MM-DD'\n )\n }\n }\n\n // check for error handling\n if (params.status) {\n params.status = params.status.code\n }\n\n if (Object.keys(params).length > 0) {\n // need to reset result of there is no search params\n const response = await RoutingSlipService.getSearchRoutingSlip(\n params\n )\n if (response && response.data && response.status === 200) {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n total: response.data?.total || 0\n }\n if (appendToResults) {\n searchRoutingSlipResult.value = [\n ...searchRoutingSlipResult.value,\n ...response.data?.items\n ]\n } else {\n searchRoutingSlipResult.value = response.data?.items\n }\n\n return\n }\n }\n searchRoutingSlipResult.value = []\n }\n\n const saveLinkRoutingSlip = async (\n parentRoutingSlipNumber: string\n ): Promise => {\n const childRoutingSlipNumber: string = routingSlip.value.number\n\n const LinkPrams = { childRoutingSlipNumber, parentRoutingSlipNumber }\n\n try {\n // handle error condtions here\n const response = await RoutingSlipService.saveLinkRoutingSlip(LinkPrams)\n if (response && response.data && response.status === 200) {\n return {\n error: false\n }\n }\n } catch (error) {\n if (error.response.status === 400) {\n return { error: true, details: error.response?.data }\n }\n\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data)\n }\n }\n\n const getLinkedRoutingSlips = async (routingSlipNumber) => {\n try {\n const response = await RoutingSlipService.getLinkedRoutingSlips(\n routingSlipNumber,\n true\n )\n let result: LinkedRoutingSlips\n if (response && response.data && response.status === 200) {\n result = response.data\n }\n // 204 non content response\n linkedRoutingSlips.value = result\n } catch (error) {\n linkedRoutingSlips.value = undefined\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data) // 500 errors may not return data\n }\n }\n\n const getDailyReportByDate = async (selectedDate, type) => {\n const formatedDate = CommonUtils.formatDisplayDate(\n selectedDate,\n 'YYYY-MM-DD'\n )\n try {\n return await RoutingSlipService.getDailyReport(formatedDate, type, false)\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data) // 500 errors may not return data\n return error.response\n }\n }\n\n const getAutoCompleteRoutingSlips = async (\n routingSlipNumber\n ): Promise => {\n const response = await RoutingSlipService.getSearchRoutingSlip({\n routingSlipNumber\n })\n if (response && response.data && response.status === 200) {\n return response.data?.items\n }\n\n return []\n }\n\n const getFeeByCorpTypeAndFilingType = async (\n getFeeRequestParams: GetFeeRequestParams\n ): Promise => {\n // Currently, in FAS we only need total from the result that is the source of truth.\n // Other properties such as tax breakdown and priority fees can be ignored here.\n const response = await RoutingSlipService.getFeeByCorpTypeAndFilingType(\n getFeeRequestParams\n )\n if (response && response.data && response.status === 200) {\n return response.data?.total\n }\n return null\n }\n\n const saveManualTransactions = async (transation: any): Promise => {\n // prepare format from here\n const routingSlipNumber: string = routingSlip.value.number\n\n const {\n referenceNumber,\n filingType,\n futureEffective,\n priority,\n quantity\n } = transation\n const businessInfo: BusinessInfo = {\n corpType: filingType.corpTypeCode.code\n }\n\n // no need to pass if empty\n if (referenceNumber) {\n businessInfo.businessIdentifier = referenceNumber\n }\n\n const transactionParams: TransactionParams = {\n businessInfo,\n filingInfo: {\n filingTypes: [\n {\n filingTypeCode: filingType.filingTypeCode.code,\n futureEffective: futureEffective,\n priority: priority,\n quantity: parseInt(quantity)\n }\n ]\n },\n accountInfo: {\n routingSlip: routingSlipNumber\n }\n }\n\n const response = await RoutingSlipService.saveManualTransactions(\n transactionParams\n )\n return response\n }\n\n const cancelRoutingSlipInvoice = async (invoiceId: number) => {\n return await RoutingSlipService.cancelRoutingSlipInvoice(invoiceId)\n }\n\n async function infiniteScrollCallback () {\n const params = { ...searchRoutingSlipParams.value }\n if (params.total !== Infinity && params.total < params.limit) return true\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n page: searchRoutingSlipParams.value.page ? searchRoutingSlipParams.value.page + 1 : 1\n }\n await searchRoutingSlip(true)\n return false\n }\n\n return {\n headerSearchTitle,\n searchRoutingSlipResult,\n searchRoutingSlipParams,\n routingSlip,\n linkedRoutingSlips,\n routingSlipDetails,\n accountInfo,\n chequePayment,\n cashPayment,\n isPaymentMethodCheque,\n isAmountPaidInUsd,\n autoCompleteRoutingSlips,\n invoiceCount,\n searchParamsExist,\n isRoutingSlipAChild,\n isRoutingSlipLinked,\n isRoutingSlipVoid,\n defaultParams,\n updateRoutingSlipChequeNumber,\n updateRoutingSlipAmount,\n createRoutingSlip,\n checkRoutingNumber,\n getRoutingSlip,\n updateRoutingSlipStatus,\n updateRoutingSlipRefundStatus,\n adjustRoutingSlip,\n resetRoutingSlipDetails,\n resetSearchParams,\n searchRoutingSlip,\n saveLinkRoutingSlip,\n getLinkedRoutingSlips,\n getDailyReportByDate,\n getAutoCompleteRoutingSlips,\n getFeeByCorpTypeAndFilingType,\n saveManualTransactions,\n cancelRoutingSlipInvoice,\n infiniteScrollCallback,\n updateRoutingSlipComments\n }\n}\n","import { computed, onMounted, reactive, ref, toRefs } from '@vue/composition-api'\n\nimport CommonUtils from '@/util/common-util'\nimport ConfigHelper from '@/util/config-helper'\nimport debounce from '@/util/debounce'\nimport { useLoader } from '@/composables/common/useLoader'\nimport { useStatusList } from '@/composables/common/useStatusList'\nimport { useRoutingSlip } from '../useRoutingSlip'\nimport { RoutingSlipRefundCodes, RoutingSlipRefundStatus, SlipStatus } from '@/util/constants'\n\nexport function useSearch (props, context) {\n const {\n headerSearchTitle,\n resetSearchParams,\n searchParamsExist,\n searchRoutingSlip,\n searchRoutingSlipParams,\n searchRoutingSlipResult,\n infiniteScrollCallback,\n defaultParams\n } = useRoutingSlip()\n const { isLibraryMode } = toRefs(props)\n // Adding openFromAuth=true queryparams so that we can build breadcrumbs\n // Eg of a typical breadcrumb flow = Staff Dashboard -> FAS Dashboard -> View Routing Slip: test -> View Routing Slip: testchild\n const fasUrl = `${ConfigHelper.getFasWebUrl()}?openFromAuth=true`\n\n const { statusLabel } = useStatusList(reactive({ value: '' }), {})\n const { isLoading, toggleLoading } = useLoader()\n\n const showExpandedFolio = ref([])\n const showExpandedCheque = ref([])\n // to make sure not updating result on keyup\n const searchParamsChanged = ref(false)\n const reachedEnd = ref(false)\n\n const headerSearch: any = computed({\n get: () => {\n return headerSearchTitle.value || []\n },\n set: (modalValue: any) => {\n headerSearchTitle.value = modalValue\n }\n })\n\n // columntoshow component and update the local object if display = true\n const displayedHeaderSearch: any = computed(() => {\n const displayed = []\n for (let i = 0; i < headerSearch.value?.length; i++) {\n if (headerSearch.value[i].display) {\n displayed.push(headerSearch.value[i])\n }\n }\n return displayed\n })\n\n function canShowColumn (columnName) {\n return displayedHeaderSearch.value.find(header => {\n return header.value === columnName\n })\n }\n\n function updateSearchFilter (updates: any) {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n ...defaultParams,\n ...updates\n }\n searchParamsChanged.value = true\n reachedEnd.value = false\n }\n\n // using same v-model value for getting value and update parent on change\n const routingSlipNumber: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.routingSlipNumber || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n routingSlipNumber: modalValue\n })\n }\n })\n\n const receiptNumber: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.receiptNumber || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n receiptNumber: modalValue\n })\n }\n })\n\n const status: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.status || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n status: modalValue\n })\n }\n })\n\n const refundStatus: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.refundStatus || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n refundStatus: modalValue\n })\n }\n })\n\n const businessIdentifier: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.businessIdentifier || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n businessIdentifier: modalValue\n })\n }\n })\n\n const accountName: any = computed({\n get: () => {\n return searchRoutingSlipParams.value?.accountName || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n accountName: modalValue\n })\n }\n })\n\n const initiator: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.initiator || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n initiator: modalValue\n })\n }\n })\n\n const remainingAmount: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.remainingAmount || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n remainingAmount: modalValue\n })\n }\n })\n\n const dateFilter: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.dateFilter || []\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n dateFilter: modalValue\n })\n }\n })\n\n const chequeReceiptNumber: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.chequeReceiptNumber || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n chequeReceiptNumber: modalValue\n })\n }\n })\n\n function applyDateFilter (dateRangeObj) {\n dateFilter.value = dateRangeObj\n }\n\n async function searchNow () {\n toggleLoading()\n await searchRoutingSlip()\n searchParamsChanged.value = false\n toggleLoading()\n }\n\n onMounted(() => {\n // To be triggered when coming back to FAS home page from a breadcrumb and if there are any search params present\n if (!searchParamsExist.value) {\n searchNow()\n }\n })\n\n const debouncedSearch = debounce(() => {\n searchNow()\n })\n\n const appendQueryParamsIfNeeded = CommonUtils.appendQueryParamsIfNeeded\n\n // get label of status\n function getStatusLabel (code: string) {\n return statusLabel(code)\n }\n\n async function clearFilter () {\n toggleLoading()\n resetSearchParams()\n await searchRoutingSlip()\n searchParamsChanged.value = false\n toggleLoading()\n }\n\n function toggleFolio (id: number) {\n // to show and hide multiple folio on click\n // remove from array if already existing else add to array\n if (showExpandedFolio.value.includes(id)) {\n showExpandedFolio.value = showExpandedFolio.value.filter(function (item) {\n return item !== id\n })\n } else {\n showExpandedFolio.value.push(id)\n }\n }\n\n function toggleCheque (id: number) {\n // to show and hide multiple folio on click\n // remove from array if already existing else add to array\n if (showExpandedCheque.value.includes(id)) {\n showExpandedCheque.value = showExpandedCheque.value.filter(function (item) {\n return item !== id\n })\n } else {\n showExpandedCheque.value.push(id)\n }\n }\n\n function formatFolioResult (routingSlip) {\n // to make sure not updating on keyup\n if (\n !searchParamsChanged.value &&\n businessIdentifier.value &&\n businessIdentifier.value !== ''\n ) {\n return [businessIdentifier.value]\n }\n const { invoices } = routingSlip\n\n if (invoices) {\n return invoices\n .filter(invoice => invoice.businessIdentifier)\n .map(value => value.businessIdentifier)\n }\n return ['-']\n }\n\n function navigateTo (routingSlipNumber: number) : void {\n if (isLibraryMode.value) {\n // This scenario would hit when the FAS Search is displayed as a plugin in Staff dashboard\n // we append queryparams so that we can persist breadcrumbs across different components and refresh issue\n // Adding viewFromAuth=true queryparams so that we can build breadcrumbs\n // Eg of a typical breadcrumb flow = Staff Dashboard -> View Routing Slip: test -> View Routing Slip: testchild\n window.location.href = `${ConfigHelper.getFasWebUrl()}view-routing-slip/${routingSlipNumber}?viewFromAuth=true`\n } else {\n context.root.$router.push(appendQueryParamsIfNeeded(`/view-routing-slip/${routingSlipNumber}`, context.root.$route))\n }\n }\n\n const getNext = debounce(async () => {\n if (isLoading.value) return\n reachedEnd.value = await infiniteScrollCallback()\n }, 100) // Adjust the wait time as needed\n\n function getRefundStatusText (statusCode: string): string {\n const status = RoutingSlipRefundStatus.find(item => item.code === statusCode)\n return status.text ? status.text : RoutingSlipRefundCodes.PROCESSING\n }\n\n function getStatusFromRefundStatus (statusCode: string): SlipStatus {\n if (statusCode === RoutingSlipRefundCodes.PROCESSING) {\n return SlipStatus.REFUNDREQUEST\n } else {\n return SlipStatus.REFUNDPROCESSED\n }\n }\n\n return {\n headerSearch,\n displayedHeaderSearch,\n status,\n refundStatus,\n routingSlipNumber,\n receiptNumber,\n dateFilter,\n businessIdentifier,\n accountName,\n remainingAmount,\n chequeReceiptNumber,\n canShowColumn,\n applyDateFilter,\n searchNow,\n debouncedSearch,\n searchRoutingSlipResult,\n getStatusLabel,\n searchParamsExist,\n clearFilter,\n formatFolioResult,\n showExpandedFolio,\n showExpandedCheque,\n toggleFolio,\n toggleCheque,\n isLoading,\n navigateTo,\n fasUrl,\n initiator,\n reachedEnd,\n getNext,\n getRefundStatusText,\n getStatusFromRefundStatus\n }\n}\n","/**\n * vue-class-component v7.2.6\n * (c) 2015-present Evan You\n * @license MIT\n */\nimport Vue from 'vue';\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\n// The rational behind the verbose Reflect-feature check below is the fact that there are polyfills\n// which add an implementation for Reflect.defineMetadata but not for Reflect.getOwnMetadataKeys.\n// Without this check consumers will encounter hard to track down runtime errors.\nfunction reflectionIsSupported() {\n return typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys;\n}\nfunction copyReflectionMetadata(to, from) {\n forwardMetadata(to, from);\n Object.getOwnPropertyNames(from.prototype).forEach(function (key) {\n forwardMetadata(to.prototype, from.prototype, key);\n });\n Object.getOwnPropertyNames(from).forEach(function (key) {\n forwardMetadata(to, from, key);\n });\n}\n\nfunction forwardMetadata(to, from, propertyKey) {\n var metaKeys = propertyKey ? Reflect.getOwnMetadataKeys(from, propertyKey) : Reflect.getOwnMetadataKeys(from);\n metaKeys.forEach(function (metaKey) {\n var metadata = propertyKey ? Reflect.getOwnMetadata(metaKey, from, propertyKey) : Reflect.getOwnMetadata(metaKey, from);\n\n if (propertyKey) {\n Reflect.defineMetadata(metaKey, metadata, to, propertyKey);\n } else {\n Reflect.defineMetadata(metaKey, metadata, to);\n }\n });\n}\n\nvar fakeArray = {\n __proto__: []\n};\nvar hasProto = fakeArray instanceof Array;\nfunction createDecorator(factory) {\n return function (target, key, index) {\n var Ctor = typeof target === 'function' ? target : target.constructor;\n\n if (!Ctor.__decorators__) {\n Ctor.__decorators__ = [];\n }\n\n if (typeof index !== 'number') {\n index = undefined;\n }\n\n Ctor.__decorators__.push(function (options) {\n return factory(options, key, index);\n });\n };\n}\nfunction mixins() {\n for (var _len = arguments.length, Ctors = new Array(_len), _key = 0; _key < _len; _key++) {\n Ctors[_key] = arguments[_key];\n }\n\n return Vue.extend({\n mixins: Ctors\n });\n}\nfunction isPrimitive(value) {\n var type = _typeof(value);\n\n return value == null || type !== 'object' && type !== 'function';\n}\nfunction warn(message) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-class-component] ' + message);\n }\n}\n\nfunction collectDataFromConstructor(vm, Component) {\n // override _init to prevent to init as Vue instance\n var originalInit = Component.prototype._init;\n\n Component.prototype._init = function () {\n var _this = this;\n\n // proxy to actual vm\n var keys = Object.getOwnPropertyNames(vm); // 2.2.0 compat (props are no longer exposed as self properties)\n\n if (vm.$options.props) {\n for (var key in vm.$options.props) {\n if (!vm.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n }\n\n keys.forEach(function (key) {\n Object.defineProperty(_this, key, {\n get: function get() {\n return vm[key];\n },\n set: function set(value) {\n vm[key] = value;\n },\n configurable: true\n });\n });\n }; // should be acquired class property values\n\n\n var data = new Component(); // restore original _init to avoid memory leak (#209)\n\n Component.prototype._init = originalInit; // create plain data object\n\n var plainData = {};\n Object.keys(data).forEach(function (key) {\n if (data[key] !== undefined) {\n plainData[key] = data[key];\n }\n });\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(Component.prototype instanceof Vue) && Object.keys(plainData).length > 0) {\n warn('Component class must inherit Vue or its descendant class ' + 'when class property is used.');\n }\n }\n\n return plainData;\n}\n\nvar $internalHooks = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeDestroy', 'destroyed', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch' // 2.6\n];\nfunction componentFactory(Component) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n options.name = options.name || Component._componentTag || Component.name; // prototype props.\n\n var proto = Component.prototype;\n Object.getOwnPropertyNames(proto).forEach(function (key) {\n if (key === 'constructor') {\n return;\n } // hooks\n\n\n if ($internalHooks.indexOf(key) > -1) {\n options[key] = proto[key];\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(proto, key);\n\n if (descriptor.value !== void 0) {\n // methods\n if (typeof descriptor.value === 'function') {\n (options.methods || (options.methods = {}))[key] = descriptor.value;\n } else {\n // typescript decorated data\n (options.mixins || (options.mixins = [])).push({\n data: function data() {\n return _defineProperty({}, key, descriptor.value);\n }\n });\n }\n } else if (descriptor.get || descriptor.set) {\n // computed properties\n (options.computed || (options.computed = {}))[key] = {\n get: descriptor.get,\n set: descriptor.set\n };\n }\n });\n (options.mixins || (options.mixins = [])).push({\n data: function data() {\n return collectDataFromConstructor(this, Component);\n }\n }); // decorate options\n\n var decorators = Component.__decorators__;\n\n if (decorators) {\n decorators.forEach(function (fn) {\n return fn(options);\n });\n delete Component.__decorators__;\n } // find super\n\n\n var superProto = Object.getPrototypeOf(Component.prototype);\n var Super = superProto instanceof Vue ? superProto.constructor : Vue;\n var Extended = Super.extend(options);\n forwardStaticMembers(Extended, Component, Super);\n\n if (reflectionIsSupported()) {\n copyReflectionMetadata(Extended, Component);\n }\n\n return Extended;\n}\nvar reservedPropertyNames = [// Unique id\n'cid', // Super Vue constructor\n'super', // Component options that will be used by the component\n'options', 'superOptions', 'extendOptions', 'sealedOptions', // Private assets\n'component', 'directive', 'filter'];\nvar shouldIgnore = {\n prototype: true,\n arguments: true,\n callee: true,\n caller: true\n};\n\nfunction forwardStaticMembers(Extended, Original, Super) {\n // We have to use getOwnPropertyNames since Babel registers methods as non-enumerable\n Object.getOwnPropertyNames(Original).forEach(function (key) {\n // Skip the properties that should not be overwritten\n if (shouldIgnore[key]) {\n return;\n } // Some browsers does not allow reconfigure built-in properties\n\n\n var extendedDescriptor = Object.getOwnPropertyDescriptor(Extended, key);\n\n if (extendedDescriptor && !extendedDescriptor.configurable) {\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(Original, key); // If the user agent does not support `__proto__` or its family (IE <= 10),\n // the sub class properties may be inherited properties from the super class in TypeScript.\n // We need to exclude such properties to prevent to overwrite\n // the component options object which stored on the extended constructor (See #192).\n // If the value is a referenced value (object or function),\n // we can check equality of them and exclude it if they have the same reference.\n // If it is a primitive value, it will be forwarded for safety.\n\n if (!hasProto) {\n // Only `cid` is explicitly exluded from property forwarding\n // because we cannot detect whether it is a inherited property or not\n // on the no `__proto__` environment even though the property is reserved.\n if (key === 'cid') {\n return;\n }\n\n var superDescriptor = Object.getOwnPropertyDescriptor(Super, key);\n\n if (!isPrimitive(descriptor.value) && superDescriptor && superDescriptor.value === descriptor.value) {\n return;\n }\n } // Warn if the users manually declare reserved properties\n\n\n if (process.env.NODE_ENV !== 'production' && reservedPropertyNames.indexOf(key) >= 0) {\n warn(\"Static property name '\".concat(key, \"' declared on class '\").concat(Original.name, \"' \") + 'conflicts with reserved property name of Vue internal. ' + 'It may cause unexpected behavior of the component. Consider renaming the property.');\n }\n\n Object.defineProperty(Extended, key, descriptor);\n });\n}\n\nfunction Component(options) {\n if (typeof options === 'function') {\n return componentFactory(options);\n }\n\n return function (Component) {\n return componentFactory(Component, options);\n };\n}\n\nComponent.registerHooks = function registerHooks(keys) {\n $internalHooks.push.apply($internalHooks, _toConsumableArray(keys));\n};\n\nexport default Component;\nexport { createDecorator, mixins };\n","var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\n// Code copied from Vue/src/shared/util.js\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) { return str.replace(hyphenateRE, '-$1').toLowerCase(); };\n/**\n * decorator of an event-emitter function\n * @param event The name of the event\n * @return MethodDecorator\n */\nexport function Emit(event) {\n return function (_target, propertyKey, descriptor) {\n var key = hyphenate(propertyKey);\n var original = descriptor.value;\n descriptor.value = function emitter() {\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var emit = function (returnValue) {\n var emitName = event || key;\n if (returnValue === undefined) {\n if (args.length === 0) {\n _this.$emit(emitName);\n }\n else if (args.length === 1) {\n _this.$emit(emitName, args[0]);\n }\n else {\n _this.$emit.apply(_this, __spreadArrays([emitName], args));\n }\n }\n else {\n args.unshift(returnValue);\n _this.$emit.apply(_this, __spreadArrays([emitName], args));\n }\n };\n var returnValue = original.apply(this, args);\n if (isPromise(returnValue)) {\n returnValue.then(emit);\n }\n else {\n emit(returnValue);\n }\n return returnValue;\n };\n };\n}\nfunction isPromise(obj) {\n return obj instanceof Promise || (obj && typeof obj.then === 'function');\n}\n","/** @see {@link https://github.com/vuejs/vue-class-component/blob/master/src/reflect.ts} */\nvar reflectMetadataIsSupported = typeof Reflect !== 'undefined' && typeof Reflect.getMetadata !== 'undefined';\nexport function applyMetadata(options, target, key) {\n if (reflectMetadataIsSupported) {\n if (!Array.isArray(options) &&\n typeof options !== 'function' &&\n !options.hasOwnProperty('type') &&\n typeof options.type === 'undefined') {\n var type = Reflect.getMetadata('design:type', target, key);\n if (type !== Object) {\n options.type = type;\n }\n }\n }\n}\n","import { createDecorator } from 'vue-class-component';\nimport { applyMetadata } from '../helpers/metadata';\n/**\n * decorator of a prop\n * @param options the options for the prop\n * @return PropertyDecorator | void\n */\nexport function Prop(options) {\n if (options === void 0) { options = {}; }\n return function (target, key) {\n applyMetadata(options, target, key);\n createDecorator(function (componentOptions, k) {\n ;\n (componentOptions.props || (componentOptions.props = {}))[k] = options;\n })(target, key);\n };\n}\n","import { computed, reactive, ref, toRefs } from '@vue/composition-api'\n\nimport CommonUtils from '@/util/common-util'\nimport { DateFilterCodes } from '@/util/constants'\nimport moment from 'moment'\n\nexport const DATEFILTER_CODES = DateFilterCodes\nexport function useDateRange (props, context) {\n const { value } = toRefs(props)\n\n // using same v-model value for getting value and update parent on change\n const dateRangeSelected = computed({\n get: () => {\n return value.value\n },\n set: (modalValue: Date[]) => {\n context.emit('input', modalValue)\n }\n })\n // to keep track of old value on cancel rest to this value default value will props passed\n const oldSelectedRange = ref(value.value)\n\n const dateRangeSelectedDisplay = computed(() => {\n return dateRangeSelected.value.join(' - ')\n })\n\n const dateFilterRanges = reactive([\n {\n label: 'Today',\n code: DATEFILTER_CODES.TODAY\n },\n {\n label: 'Yesterday',\n code: DATEFILTER_CODES.YESTERDAY\n },\n {\n label: 'Last Week',\n code: DATEFILTER_CODES.LASTWEEK\n },\n {\n label: 'Last Month',\n code: DATEFILTER_CODES.LASTMONTH\n },\n {\n label: 'Custom Range',\n code: DATEFILTER_CODES.CUSTOMRANGE\n }\n ])\n\n const dateFilterSelectedIndex = ref(null)\n const dateFilterSelected: any = ref({})\n const showDateFilter = ref(false)\n const pickerDate = ref('')\n\n // apply filter button enable only if the date ranges are selected and start date <= end date\n const isApplyFilterBtnValid = computed(() => {\n if (\n dateRangeSelected.value.length === 2 &&\n dateRangeSelected.value[0] > dateRangeSelected.value[1]\n ) {\n dateRangeSelected.value = [\n dateRangeSelected.value[1],\n dateRangeSelected.value[0]\n ]\n }\n\n return (\n dateRangeSelected.value[0] &&\n dateRangeSelected.value[1] &&\n dateRangeSelected.value[0] <= dateRangeSelected.value[1]\n )\n })\n\n const showDateRangeSelected = computed(() => {\n let dateText = ''\n if (\n dateFilterSelected.value.code === DATEFILTER_CODES.TODAY ||\n dateFilterSelected.value.code === DATEFILTER_CODES.YESTERDAY\n ) {\n dateText = `${\n dateFilterSelected.value.label\n }: ${CommonUtils.formatDisplayDate(\n dateRangeSelected.value[0],\n 'MM-DD-YYYY'\n )}`\n } else {\n dateText = `${dateFilterSelected.value?.label}: \n ${CommonUtils.formatDisplayDate(\n dateRangeSelected.value[0],\n 'MM-DD-YYYY'\n )} \n - ${CommonUtils.formatDisplayDate(\n dateRangeSelected.value[1],\n 'MM-DD-YYYY'\n )}`\n }\n\n return dateFilterSelected.value?.code\n ? dateText\n : 'No dates selected'\n })\n\n function formatDatePickerDate (dateObj) {\n return dateObj.format('YYYY-MM-DD')\n }\n\n function dateFilterChange (val) {\n if (val > -1) {\n dateFilterSelected.value = dateFilterRanges[val]\n switch (dateFilterSelected.value.code) {\n case DATEFILTER_CODES.TODAY:\n // eslint-disable-next-line no-case-declarations\n const today = formatDatePickerDate(moment())\n dateRangeSelected.value = [today, today]\n pickerDate.value = today.slice(0, -3)\n break\n case DATEFILTER_CODES.YESTERDAY:\n // eslint-disable-next-line no-case-declarations\n const yesterday = formatDatePickerDate(moment().subtract(1, 'days'))\n dateRangeSelected.value = [yesterday, yesterday]\n pickerDate.value = yesterday.slice(0, -3)\n break\n case DATEFILTER_CODES.LASTWEEK:\n // Week should start from Monday and Ends on Sunday\n // eslint-disable-next-line no-case-declarations\n const weekStart = formatDatePickerDate(\n moment()\n .subtract(1, 'weeks')\n .startOf('isoWeek')\n )\n // eslint-disable-next-line no-case-declarations\n const weekEnd = formatDatePickerDate(\n moment()\n .subtract(1, 'weeks')\n .endOf('isoWeek')\n )\n dateRangeSelected.value = [weekStart, weekEnd]\n pickerDate.value = weekStart.slice(0, -3)\n break\n case DATEFILTER_CODES.LASTMONTH:\n // eslint-disable-next-line no-case-declarations\n const monthStart = formatDatePickerDate(\n moment()\n .subtract(1, 'months')\n .startOf('month')\n )\n // eslint-disable-next-line no-case-declarations\n const monthEnd = formatDatePickerDate(\n moment()\n .subtract(1, 'months')\n .endOf('month')\n )\n dateRangeSelected.value = [monthStart, monthEnd]\n pickerDate.value = monthStart.slice(0, -3)\n break\n case DATEFILTER_CODES.CUSTOMRANGE:\n pickerDate.value = ''\n }\n }\n }\n\n function dateClick (date) {\n pickerDate.value = ''\n // ideally it should find using DATEFILTER_CODES.CUSTOMRANGE, but since its static and date click is often, better give the index as it is\n dateFilterSelectedIndex.value = 4 // 4 = Custom Range\n dateFilterSelected.value = dateFilterRanges[dateFilterSelectedIndex.value]\n }\n\n function applyDateFilter () {\n // emit applied event so that we can hook to any @change event in parent. By default, v-model with parent variable is in sync all the time\n context.emit('applied', dateRangeSelected)\n // updating old value on appy click\n oldSelectedRange.value = dateRangeSelected.value\n showDateFilter.value = false\n }\n function cancelDateFilter () {\n // on cancel we need to rest to previous value, which we stored in oldSelectedRange\n dateRangeSelected.value = oldSelectedRange.value\n showDateFilter.value = false\n }\n\n return {\n dateFilterRanges,\n dateRangeSelected,\n dateFilterSelectedIndex,\n dateRangeSelectedDisplay,\n dateFilterSelected,\n showDateFilter,\n pickerDate,\n dateFilterChange,\n isApplyFilterBtnValid,\n dateClick,\n applyDateFilter,\n showDateRangeSelected,\n cancelDateFilter\n }\n}\n","/*\nComposable function for SearchColumn Filter component. It tracks the columns\nthat are present in a parent data-table and tracks display property to true/false\n*/\n\nimport { computed, toRefs } from '@vue/composition-api'\n\nexport function useSearchColumnFilterComponent (props, context) {\n const { value } = toRefs(props)\n\n // using same v-model value for getting value and update parent on change\n const selectedHeaderSearchList = computed({\n get: () => {\n return value.value\n },\n set: (modalValue: any[]) => {\n context.emit('input', modalValue)\n }\n })\n\n return {\n selectedHeaderSearchList\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 Apply\n \n \n Cancel\n \n
\n \n
\n
\n \n \n
\n\n","\n\n\n\n","\n\n \n \n \n !header.hideInSearchColumnFilter)\"\n :key=\"i\"\n >\n \n \n \n \n\n","\n\n\n","\n\n","\n
\n","\n\n\n\n\n","import CommonUtils from '@/util/common-util'\nimport { useRoutingSlip } from '../useRoutingSlip'\n\nexport function useDashboard (_, context) {\n const { resetRoutingSlipDetails } = useRoutingSlip()\n const appendQueryParamsIfNeeded = CommonUtils.appendQueryParamsIfNeeded\n\n function addRoutingSlip (): void {\n // we need to clear out the routing slip store before rendering the create slip component\n resetRoutingSlipDetails()\n // navigate now\n // Check if we had come from Staff dashboard\n context.root.$router.push(appendQueryParamsIfNeeded('/create-routing-slip', context.root.$route))\n }\n\n return {\n addRoutingSlip\n }\n}\n","import { DirectiveBinding } from 'vue/types/options'\nimport { DirectiveOptions } from 'vue'\nimport KeyCloakService from 'sbc-common-components/src/services/keycloak.services'\nimport { VNode } from 'vue/types'\n\ninterface CustomHTMLElement extends HTMLElement {\n disabled: boolean\n readOnly: boolean\n}\n\nconst can: DirectiveOptions = {\n inserted (el, binding, node) {\n canAccess(binding, el, node)\n },\n componentUpdated (el, binding, node) {\n canAccess(binding, el, node)\n }\n}\n\nfunction canAccess (binding: DirectiveBinding, el: HTMLElement, node: VNode) {\n const behaviour = binding.modifiers.disable ? 'disable' : 'hide'\n // to handle special elements like v-card etc\n const isCard = !!binding.modifiers.card\n const requestedAction:any = [binding.arg]\n const customeEl = el as CustomHTMLElement\n const okayToAccess = KeyCloakService.verifyRoles(requestedAction, [])\n // if not okay , hide or disable\n if (!okayToAccess) {\n if (behaviour === 'hide') {\n commentNode(el, node)\n } else if (behaviour === 'disable' && isCard === false) {\n customeEl.disabled = true\n } else if (behaviour === 'disable' && isCard === true) {\n // TODO tab still works.. can tab to the text field and make it work\n customeEl.classList.add('v-card--disabled')\n customeEl.style.pointerEvents = 'none'\n }\n }\n}\n\n/**\n * Create comment node\n *\n * @private\n * @author https://stackoverflow.com/questions/43003976/a-custom-directive-similar-to-v-if-in-vuejs#43543814\n */\nfunction commentNode (el: HTMLElement, vnode: VNode) {\n const comment = document.createComment(' ')\n\n Object.defineProperty(comment, 'setAttribute', {\n value: () => undefined\n })\n\n vnode.text = ' '\n vnode.elm = comment\n vnode.isComment = true\n vnode.tag = undefined\n\n vnode.data = vnode.data || {}\n vnode.data.directives = undefined\n\n if (vnode.componentInstance) {\n // @ts-ignore\n vnode.componentInstance.$el = comment\n }\n\n if (el.parentNode) {\n el.parentNode.replaceChild(comment, el)\n }\n}\nexport default can\n","\n \n \n \n \n {{\n item.remainingAmount\n ? appendCurrencySymbol(item.remainingAmount.toFixed(2))\n : '-'\n }}\n \n \n \n \n Open\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 mdi-plus\n \n Add New Routing Slip\n \n \n \n \n Access Fee Accounting System\n \n mdi-open-in-new\n \n \n \n \n \n \n \n \n \n \n
\n \n mdi-view-list\n \n

\n {{ isLibraryMode ? 'Recent Routing Slip' : 'Search Routing Slip' }}\n

\n
\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n {{\n item.remainingAmount\n ? appendCurrencySymbol(item.remainingAmount.toFixed(2))\n : '-'\n }}\n \n \n \n \n Open\n \n \n \n \n \n\n \n \n \n \n \n \n
\n
\n
\n","/*!\n * vue-i18n v8.28.2 \n * (c) 2022 kazuya kawaguchi\n * Released under the MIT License.\n */\n/* */\n\n/**\n * constants\n */\n\nvar numberFormatKeys = [\n 'compactDisplay',\n 'currency',\n 'currencyDisplay',\n 'currencySign',\n 'localeMatcher',\n 'notation',\n 'numberingSystem',\n 'signDisplay',\n 'style',\n 'unit',\n 'unitDisplay',\n 'useGrouping',\n 'minimumIntegerDigits',\n 'minimumFractionDigits',\n 'maximumFractionDigits',\n 'minimumSignificantDigits',\n 'maximumSignificantDigits'\n];\n\nvar dateTimeFormatKeys = [\n 'dateStyle',\n 'timeStyle',\n 'calendar',\n 'localeMatcher',\n \"hour12\",\n \"hourCycle\",\n \"timeZone\",\n \"formatMatcher\",\n 'weekday',\n 'era',\n 'year',\n 'month',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'timeZoneName' ];\n\n/**\n * utilities\n */\n\nfunction warn (msg, err) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-i18n] ' + msg);\n /* istanbul ignore if */\n if (err) {\n console.warn(err.stack);\n }\n }\n}\n\nfunction error (msg, err) {\n if (typeof console !== 'undefined') {\n console.error('[vue-i18n] ' + msg);\n /* istanbul ignore if */\n if (err) {\n console.error(err.stack);\n }\n }\n}\n\nvar isArray = Array.isArray;\n\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\nfunction isBoolean (val) {\n return typeof val === 'boolean'\n}\n\nfunction isString (val) {\n return typeof val === 'string'\n}\n\nvar toString = Object.prototype.toString;\nvar OBJECT_STRING = '[object Object]';\nfunction isPlainObject (obj) {\n return toString.call(obj) === OBJECT_STRING\n}\n\nfunction isNull (val) {\n return val === null || val === undefined\n}\n\nfunction isFunction (val) {\n return typeof val === 'function'\n}\n\nfunction parseArgs () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var locale = null;\n var params = null;\n if (args.length === 1) {\n if (isObject(args[0]) || isArray(args[0])) {\n params = args[0];\n } else if (typeof args[0] === 'string') {\n locale = args[0];\n }\n } else if (args.length === 2) {\n if (typeof args[0] === 'string') {\n locale = args[0];\n }\n /* istanbul ignore if */\n if (isObject(args[1]) || isArray(args[1])) {\n params = args[1];\n }\n }\n\n return { locale: locale, params: params }\n}\n\nfunction looseClone (obj) {\n return JSON.parse(JSON.stringify(obj))\n}\n\nfunction remove (arr, item) {\n if (arr.delete(item)) {\n return arr\n }\n}\n\nfunction arrayFrom (arr) {\n var ret = [];\n arr.forEach(function (a) { return ret.push(a); });\n return ret\n}\n\nfunction includes (arr, item) {\n return !!~arr.indexOf(item)\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n return hasOwnProperty.call(obj, key)\n}\n\nfunction merge (target) {\n var arguments$1 = arguments;\n\n var output = Object(target);\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments$1[i];\n if (source !== undefined && source !== null) {\n var key = (void 0);\n for (key in source) {\n if (hasOwn(source, key)) {\n if (isObject(source[key])) {\n output[key] = merge(output[key], source[key]);\n } else {\n output[key] = source[key];\n }\n }\n }\n }\n }\n return output\n}\n\nfunction looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = isArray(a);\n var isArrayB = isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}\n\n/**\n * Sanitizes html special characters from input strings. For mitigating risk of XSS attacks.\n * @param rawText The raw input from the user that should be escaped.\n */\nfunction escapeHtml(rawText) {\n return rawText\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n}\n\n/**\n * Escapes html tags and special symbols from all provided params which were returned from parseArgs().params.\n * This method performs an in-place operation on the params object.\n *\n * @param {any} params Parameters as provided from `parseArgs().params`.\n * May be either an array of strings or a string->any map.\n *\n * @returns The manipulated `params` object.\n */\nfunction escapeParams(params) {\n if(params != null) {\n Object.keys(params).forEach(function (key) {\n if(typeof(params[key]) == 'string') {\n params[key] = escapeHtml(params[key]);\n }\n });\n }\n return params\n}\n\n/* */\n\nfunction extend (Vue) {\n if (!Vue.prototype.hasOwnProperty('$i18n')) {\n // $FlowFixMe\n Object.defineProperty(Vue.prototype, '$i18n', {\n get: function get () { return this._i18n }\n });\n }\n\n Vue.prototype.$t = function (key) {\n var values = [], len = arguments.length - 1;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];\n\n var i18n = this.$i18n;\n return i18n._t.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this ].concat( values ))\n };\n\n Vue.prototype.$tc = function (key, choice) {\n var values = [], len = arguments.length - 2;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];\n\n var i18n = this.$i18n;\n return i18n._tc.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this, choice ].concat( values ))\n };\n\n Vue.prototype.$te = function (key, locale) {\n var i18n = this.$i18n;\n return i18n._te(key, i18n.locale, i18n._getMessages(), locale)\n };\n\n Vue.prototype.$d = function (value) {\n var ref;\n\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n return (ref = this.$i18n).d.apply(ref, [ value ].concat( args ))\n };\n\n Vue.prototype.$n = function (value) {\n var ref;\n\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n return (ref = this.$i18n).n.apply(ref, [ value ].concat( args ))\n };\n}\n\n/* */\n\n/**\n * Mixin\n * \n * If `bridge` mode, empty mixin is returned,\n * else regulary mixin implementation is returned.\n */\nfunction defineMixin (bridge) {\n if ( bridge === void 0 ) bridge = false;\n\n function mounted () {\n if (this !== this.$root && this.$options.__INTLIFY_META__ && this.$el) {\n this.$el.setAttribute('data-intlify', this.$options.__INTLIFY_META__);\n }\n }\n\n return bridge\n ? { mounted: mounted } // delegate `vue-i18n-bridge` mixin implementation\n : { // regulary \n beforeCreate: function beforeCreate () {\n var options = this.$options;\n options.i18n = options.i18n || ((options.__i18nBridge || options.__i18n) ? {} : null);\n\n if (options.i18n) {\n if (options.i18n instanceof VueI18n) {\n // init locale messages via custom blocks\n if ((options.__i18nBridge || options.__i18n)) {\n try {\n var localeMessages = options.i18n && options.i18n.messages ? options.i18n.messages : {};\n var _i18n = options.__i18nBridge || options.__i18n;\n _i18n.forEach(function (resource) {\n localeMessages = merge(localeMessages, JSON.parse(resource));\n });\n Object.keys(localeMessages).forEach(function (locale) {\n options.i18n.mergeLocaleMessage(locale, localeMessages[locale]);\n });\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n error(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n this._i18n = options.i18n;\n this._i18nWatcher = this._i18n.watchI18nData();\n } else if (isPlainObject(options.i18n)) {\n var rootI18n = this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n\n ? this.$root.$i18n\n : null;\n // component local i18n\n if (rootI18n) {\n options.i18n.root = this.$root;\n options.i18n.formatter = rootI18n.formatter;\n options.i18n.fallbackLocale = rootI18n.fallbackLocale;\n options.i18n.formatFallbackMessages = rootI18n.formatFallbackMessages;\n options.i18n.silentTranslationWarn = rootI18n.silentTranslationWarn;\n options.i18n.silentFallbackWarn = rootI18n.silentFallbackWarn;\n options.i18n.pluralizationRules = rootI18n.pluralizationRules;\n options.i18n.preserveDirectiveContent = rootI18n.preserveDirectiveContent;\n }\n\n // init locale messages via custom blocks\n if ((options.__i18nBridge || options.__i18n)) {\n try {\n var localeMessages$1 = options.i18n && options.i18n.messages ? options.i18n.messages : {};\n var _i18n$1 = options.__i18nBridge || options.__i18n;\n _i18n$1.forEach(function (resource) {\n localeMessages$1 = merge(localeMessages$1, JSON.parse(resource));\n });\n options.i18n.messages = localeMessages$1;\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n\n var ref = options.i18n;\n var sharedMessages = ref.sharedMessages;\n if (sharedMessages && isPlainObject(sharedMessages)) {\n options.i18n.messages = merge(options.i18n.messages, sharedMessages);\n }\n\n this._i18n = new VueI18n(options.i18n);\n this._i18nWatcher = this._i18n.watchI18nData();\n\n if (options.i18n.sync === undefined || !!options.i18n.sync) {\n this._localeWatcher = this.$i18n.watchLocale();\n }\n\n if (rootI18n) {\n rootI18n.onComponentInstanceCreated(this._i18n);\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot be interpreted 'i18n' option.\");\n }\n }\n } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n // root i18n\n this._i18n = this.$root.$i18n;\n } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {\n // parent i18n\n this._i18n = options.parent.$i18n;\n }\n },\n\n beforeMount: function beforeMount () {\n var options = this.$options;\n options.i18n = options.i18n || ((options.__i18nBridge || options.__i18n) ? {} : null);\n\n if (options.i18n) {\n if (options.i18n instanceof VueI18n) {\n // init locale messages via custom blocks\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else if (isPlainObject(options.i18n)) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot be interpreted 'i18n' option.\");\n }\n }\n } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n }\n },\n\n mounted: mounted,\n\n beforeDestroy: function beforeDestroy () {\n if (!this._i18n) { return }\n\n var self = this;\n this.$nextTick(function () {\n if (self._subscribing) {\n self._i18n.unsubscribeDataChanging(self);\n delete self._subscribing;\n }\n\n if (self._i18nWatcher) {\n self._i18nWatcher();\n self._i18n.destroyVM();\n delete self._i18nWatcher;\n }\n\n if (self._localeWatcher) {\n self._localeWatcher();\n delete self._localeWatcher;\n }\n });\n }\n }\n}\n\n/* */\n\nvar interpolationComponent = {\n name: 'i18n',\n functional: true,\n props: {\n tag: {\n type: [String, Boolean, Object],\n default: 'span'\n },\n path: {\n type: String,\n required: true\n },\n locale: {\n type: String\n },\n places: {\n type: [Array, Object]\n }\n },\n render: function render (h, ref) {\n var data = ref.data;\n var parent = ref.parent;\n var props = ref.props;\n var slots = ref.slots;\n\n var $i18n = parent.$i18n;\n if (!$i18n) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot find VueI18n instance!');\n }\n return\n }\n\n var path = props.path;\n var locale = props.locale;\n var places = props.places;\n var params = slots();\n var children = $i18n.i(\n path,\n locale,\n onlyHasDefaultPlace(params) || places\n ? useLegacyPlaces(params.default, places)\n : params\n );\n\n var tag = (!!props.tag && props.tag !== true) || props.tag === false ? props.tag : 'span';\n return tag ? h(tag, data, children) : children\n }\n};\n\nfunction onlyHasDefaultPlace (params) {\n var prop;\n for (prop in params) {\n if (prop !== 'default') { return false }\n }\n return Boolean(prop)\n}\n\nfunction useLegacyPlaces (children, places) {\n var params = places ? createParamsFromPlaces(places) : {};\n\n if (!children) { return params }\n\n // Filter empty text nodes\n children = children.filter(function (child) {\n return child.tag || child.text.trim() !== ''\n });\n\n var everyPlace = children.every(vnodeHasPlaceAttribute);\n if (process.env.NODE_ENV !== 'production' && everyPlace) {\n warn('`place` attribute is deprecated in next major version. Please switch to Vue slots.');\n }\n\n return children.reduce(\n everyPlace ? assignChildPlace : assignChildIndex,\n params\n )\n}\n\nfunction createParamsFromPlaces (places) {\n if (process.env.NODE_ENV !== 'production') {\n warn('`places` prop is deprecated in next major version. Please switch to Vue slots.');\n }\n\n return Array.isArray(places)\n ? places.reduce(assignChildIndex, {})\n : Object.assign({}, places)\n}\n\nfunction assignChildPlace (params, child) {\n if (child.data && child.data.attrs && child.data.attrs.place) {\n params[child.data.attrs.place] = child;\n }\n return params\n}\n\nfunction assignChildIndex (params, child, index) {\n params[index] = child;\n return params\n}\n\nfunction vnodeHasPlaceAttribute (vnode) {\n return Boolean(vnode.data && vnode.data.attrs && vnode.data.attrs.place)\n}\n\n/* */\n\nvar numberComponent = {\n name: 'i18n-n',\n functional: true,\n props: {\n tag: {\n type: [String, Boolean, Object],\n default: 'span'\n },\n value: {\n type: Number,\n required: true\n },\n format: {\n type: [String, Object]\n },\n locale: {\n type: String\n }\n },\n render: function render (h, ref) {\n var props = ref.props;\n var parent = ref.parent;\n var data = ref.data;\n\n var i18n = parent.$i18n;\n\n if (!i18n) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot find VueI18n instance!');\n }\n return null\n }\n\n var key = null;\n var options = null;\n\n if (isString(props.format)) {\n key = props.format;\n } else if (isObject(props.format)) {\n if (props.format.key) {\n key = props.format.key;\n }\n\n // Filter out number format options only\n options = Object.keys(props.format).reduce(function (acc, prop) {\n var obj;\n\n if (includes(numberFormatKeys, prop)) {\n return Object.assign({}, acc, ( obj = {}, obj[prop] = props.format[prop], obj ))\n }\n return acc\n }, null);\n }\n\n var locale = props.locale || i18n.locale;\n var parts = i18n._ntp(props.value, locale, key, options);\n\n var values = parts.map(function (part, index) {\n var obj;\n\n var slot = data.scopedSlots && data.scopedSlots[part.type];\n return slot ? slot(( obj = {}, obj[part.type] = part.value, obj.index = index, obj.parts = parts, obj )) : part.value\n });\n\n var tag = (!!props.tag && props.tag !== true) || props.tag === false ? props.tag : 'span';\n return tag\n ? h(tag, {\n attrs: data.attrs,\n 'class': data['class'],\n staticClass: data.staticClass\n }, values)\n : values\n }\n};\n\n/* */\n\nfunction bind (el, binding, vnode) {\n if (!assert(el, vnode)) { return }\n\n t(el, binding, vnode);\n}\n\nfunction update (el, binding, vnode, oldVNode) {\n if (!assert(el, vnode)) { return }\n\n var i18n = vnode.context.$i18n;\n if (localeEqual(el, vnode) &&\n (looseEqual(binding.value, binding.oldValue) &&\n looseEqual(el._localeMessage, i18n.getLocaleMessage(i18n.locale)))) { return }\n\n t(el, binding, vnode);\n}\n\nfunction unbind (el, binding, vnode, oldVNode) {\n var vm = vnode.context;\n if (!vm) {\n warn('Vue instance does not exists in VNode context');\n return\n }\n\n var i18n = vnode.context.$i18n || {};\n if (!binding.modifiers.preserve && !i18n.preserveDirectiveContent) {\n el.textContent = '';\n }\n el._vt = undefined;\n delete el['_vt'];\n el._locale = undefined;\n delete el['_locale'];\n el._localeMessage = undefined;\n delete el['_localeMessage'];\n}\n\nfunction assert (el, vnode) {\n var vm = vnode.context;\n if (!vm) {\n warn('Vue instance does not exists in VNode context');\n return false\n }\n\n if (!vm.$i18n) {\n warn('VueI18n instance does not exists in Vue instance');\n return false\n }\n\n return true\n}\n\nfunction localeEqual (el, vnode) {\n var vm = vnode.context;\n return el._locale === vm.$i18n.locale\n}\n\nfunction t (el, binding, vnode) {\n var ref$1, ref$2;\n\n var value = binding.value;\n\n var ref = parseValue(value);\n var path = ref.path;\n var locale = ref.locale;\n var args = ref.args;\n var choice = ref.choice;\n if (!path && !locale && !args) {\n warn('value type not supported');\n return\n }\n\n if (!path) {\n warn('`path` is required in v-t directive');\n return\n }\n\n var vm = vnode.context;\n if (choice != null) {\n el._vt = el.textContent = (ref$1 = vm.$i18n).tc.apply(ref$1, [ path, choice ].concat( makeParams(locale, args) ));\n } else {\n el._vt = el.textContent = (ref$2 = vm.$i18n).t.apply(ref$2, [ path ].concat( makeParams(locale, args) ));\n }\n el._locale = vm.$i18n.locale;\n el._localeMessage = vm.$i18n.getLocaleMessage(vm.$i18n.locale);\n}\n\nfunction parseValue (value) {\n var path;\n var locale;\n var args;\n var choice;\n\n if (isString(value)) {\n path = value;\n } else if (isPlainObject(value)) {\n path = value.path;\n locale = value.locale;\n args = value.args;\n choice = value.choice;\n }\n\n return { path: path, locale: locale, args: args, choice: choice }\n}\n\nfunction makeParams (locale, args) {\n var params = [];\n\n locale && params.push(locale);\n if (args && (Array.isArray(args) || isPlainObject(args))) {\n params.push(args);\n }\n\n return params\n}\n\nvar Vue;\n\nfunction install (_Vue, options) {\n if ( options === void 0 ) options = { bridge: false };\n\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && install.installed && _Vue === Vue) {\n warn('already installed.');\n return\n }\n install.installed = true;\n\n Vue = _Vue;\n\n var version = (Vue.version && Number(Vue.version.split('.')[0])) || -1;\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && version < 2) {\n warn((\"vue-i18n (\" + (install.version) + \") need to use Vue 2.0 or later (Vue: \" + (Vue.version) + \").\"));\n return\n }\n\n extend(Vue);\n Vue.mixin(defineMixin(options.bridge));\n Vue.directive('t', { bind: bind, update: update, unbind: unbind });\n Vue.component(interpolationComponent.name, interpolationComponent);\n Vue.component(numberComponent.name, numberComponent);\n\n // use simple mergeStrategies to prevent i18n instance lose '__proto__'\n var strats = Vue.config.optionMergeStrategies;\n strats.i18n = function (parentVal, childVal) {\n return childVal === undefined\n ? parentVal\n : childVal\n };\n}\n\n/* */\n\nvar BaseFormatter = function BaseFormatter () {\n this._caches = Object.create(null);\n};\n\nBaseFormatter.prototype.interpolate = function interpolate (message, values) {\n if (!values) {\n return [message]\n }\n var tokens = this._caches[message];\n if (!tokens) {\n tokens = parse(message);\n this._caches[message] = tokens;\n }\n return compile(tokens, values)\n};\n\n\n\nvar RE_TOKEN_LIST_VALUE = /^(?:\\d)+/;\nvar RE_TOKEN_NAMED_VALUE = /^(?:\\w)+/;\n\nfunction parse (format) {\n var tokens = [];\n var position = 0;\n\n var text = '';\n while (position < format.length) {\n var char = format[position++];\n if (char === '{') {\n if (text) {\n tokens.push({ type: 'text', value: text });\n }\n\n text = '';\n var sub = '';\n char = format[position++];\n while (char !== undefined && char !== '}') {\n sub += char;\n char = format[position++];\n }\n var isClosed = char === '}';\n\n var type = RE_TOKEN_LIST_VALUE.test(sub)\n ? 'list'\n : isClosed && RE_TOKEN_NAMED_VALUE.test(sub)\n ? 'named'\n : 'unknown';\n tokens.push({ value: sub, type: type });\n } else if (char === '%') {\n // when found rails i18n syntax, skip text capture\n if (format[(position)] !== '{') {\n text += char;\n }\n } else {\n text += char;\n }\n }\n\n text && tokens.push({ type: 'text', value: text });\n\n return tokens\n}\n\nfunction compile (tokens, values) {\n var compiled = [];\n var index = 0;\n\n var mode = Array.isArray(values)\n ? 'list'\n : isObject(values)\n ? 'named'\n : 'unknown';\n if (mode === 'unknown') { return compiled }\n\n while (index < tokens.length) {\n var token = tokens[index];\n switch (token.type) {\n case 'text':\n compiled.push(token.value);\n break\n case 'list':\n compiled.push(values[parseInt(token.value, 10)]);\n break\n case 'named':\n if (mode === 'named') {\n compiled.push((values)[token.value]);\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Type of token '\" + (token.type) + \"' and format of value '\" + mode + \"' don't match!\"));\n }\n }\n break\n case 'unknown':\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Detect 'unknown' type of token!\");\n }\n break\n }\n index++;\n }\n\n return compiled\n}\n\n/* */\n\n/**\n * Path parser\n * - Inspired:\n * Vue.js Path parser\n */\n\n// actions\nvar APPEND = 0;\nvar PUSH = 1;\nvar INC_SUB_PATH_DEPTH = 2;\nvar PUSH_SUB_PATH = 3;\n\n// states\nvar BEFORE_PATH = 0;\nvar IN_PATH = 1;\nvar BEFORE_IDENT = 2;\nvar IN_IDENT = 3;\nvar IN_SUB_PATH = 4;\nvar IN_SINGLE_QUOTE = 5;\nvar IN_DOUBLE_QUOTE = 6;\nvar AFTER_PATH = 7;\nvar ERROR = 8;\n\nvar pathStateMachine = [];\n\npathStateMachine[BEFORE_PATH] = {\n 'ws': [BEFORE_PATH],\n 'ident': [IN_IDENT, APPEND],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\n\npathStateMachine[IN_PATH] = {\n 'ws': [IN_PATH],\n '.': [BEFORE_IDENT],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\n\npathStateMachine[BEFORE_IDENT] = {\n 'ws': [BEFORE_IDENT],\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND]\n};\n\npathStateMachine[IN_IDENT] = {\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND],\n 'ws': [IN_PATH, PUSH],\n '.': [BEFORE_IDENT, PUSH],\n '[': [IN_SUB_PATH, PUSH],\n 'eof': [AFTER_PATH, PUSH]\n};\n\npathStateMachine[IN_SUB_PATH] = {\n \"'\": [IN_SINGLE_QUOTE, APPEND],\n '\"': [IN_DOUBLE_QUOTE, APPEND],\n '[': [IN_SUB_PATH, INC_SUB_PATH_DEPTH],\n ']': [IN_PATH, PUSH_SUB_PATH],\n 'eof': ERROR,\n 'else': [IN_SUB_PATH, APPEND]\n};\n\npathStateMachine[IN_SINGLE_QUOTE] = {\n \"'\": [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_SINGLE_QUOTE, APPEND]\n};\n\npathStateMachine[IN_DOUBLE_QUOTE] = {\n '\"': [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_DOUBLE_QUOTE, APPEND]\n};\n\n/**\n * Check if an expression is a literal value.\n */\n\nvar literalValueRE = /^\\s?(?:true|false|-?[\\d.]+|'[^']*'|\"[^\"]*\")\\s?$/;\nfunction isLiteral (exp) {\n return literalValueRE.test(exp)\n}\n\n/**\n * Strip quotes from a string\n */\n\nfunction stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}\n\n/**\n * Determine the type of a character in a keypath.\n */\n\nfunction getPathCharType (ch) {\n if (ch === undefined || ch === null) { return 'eof' }\n\n var code = ch.charCodeAt(0);\n\n switch (code) {\n case 0x5B: // [\n case 0x5D: // ]\n case 0x2E: // .\n case 0x22: // \"\n case 0x27: // '\n return ch\n\n case 0x5F: // _\n case 0x24: // $\n case 0x2D: // -\n return 'ident'\n\n case 0x09: // Tab\n case 0x0A: // Newline\n case 0x0D: // Return\n case 0xA0: // No-break space\n case 0xFEFF: // Byte Order Mark\n case 0x2028: // Line Separator\n case 0x2029: // Paragraph Separator\n return 'ws'\n }\n\n return 'ident'\n}\n\n/**\n * Format a subPath, return its plain form if it is\n * a literal string or number. Otherwise prepend the\n * dynamic indicator (*).\n */\n\nfunction formatSubPath (path) {\n var trimmed = path.trim();\n // invalid leading 0\n if (path.charAt(0) === '0' && isNaN(path)) { return false }\n\n return isLiteral(trimmed) ? stripQuotes(trimmed) : '*' + trimmed\n}\n\n/**\n * Parse a string path into an array of segments\n */\n\nfunction parse$1 (path) {\n var keys = [];\n var index = -1;\n var mode = BEFORE_PATH;\n var subPathDepth = 0;\n var c;\n var key;\n var newChar;\n var type;\n var transition;\n var action;\n var typeMap;\n var actions = [];\n\n actions[PUSH] = function () {\n if (key !== undefined) {\n keys.push(key);\n key = undefined;\n }\n };\n\n actions[APPEND] = function () {\n if (key === undefined) {\n key = newChar;\n } else {\n key += newChar;\n }\n };\n\n actions[INC_SUB_PATH_DEPTH] = function () {\n actions[APPEND]();\n subPathDepth++;\n };\n\n actions[PUSH_SUB_PATH] = function () {\n if (subPathDepth > 0) {\n subPathDepth--;\n mode = IN_SUB_PATH;\n actions[APPEND]();\n } else {\n subPathDepth = 0;\n if (key === undefined) { return false }\n key = formatSubPath(key);\n if (key === false) {\n return false\n } else {\n actions[PUSH]();\n }\n }\n };\n\n function maybeUnescapeQuote () {\n var nextChar = path[index + 1];\n if ((mode === IN_SINGLE_QUOTE && nextChar === \"'\") ||\n (mode === IN_DOUBLE_QUOTE && nextChar === '\"')) {\n index++;\n newChar = '\\\\' + nextChar;\n actions[APPEND]();\n return true\n }\n }\n\n while (mode !== null) {\n index++;\n c = path[index];\n\n if (c === '\\\\' && maybeUnescapeQuote()) {\n continue\n }\n\n type = getPathCharType(c);\n typeMap = pathStateMachine[mode];\n transition = typeMap[type] || typeMap['else'] || ERROR;\n\n if (transition === ERROR) {\n return // parse error\n }\n\n mode = transition[0];\n action = actions[transition[1]];\n if (action) {\n newChar = transition[2];\n newChar = newChar === undefined\n ? c\n : newChar;\n if (action() === false) {\n return\n }\n }\n\n if (mode === AFTER_PATH) {\n return keys\n }\n }\n}\n\n\n\n\n\nvar I18nPath = function I18nPath () {\n this._cache = Object.create(null);\n};\n\n/**\n * External parse that check for a cache hit first\n */\nI18nPath.prototype.parsePath = function parsePath (path) {\n var hit = this._cache[path];\n if (!hit) {\n hit = parse$1(path);\n if (hit) {\n this._cache[path] = hit;\n }\n }\n return hit || []\n};\n\n/**\n * Get path value from path string\n */\nI18nPath.prototype.getPathValue = function getPathValue (obj, path) {\n if (!isObject(obj)) { return null }\n\n var paths = this.parsePath(path);\n if (paths.length === 0) {\n return null\n } else {\n var length = paths.length;\n var last = obj;\n var i = 0;\n while (i < length) {\n var value = last[paths[i]];\n if (value === undefined || value === null) {\n return null\n }\n last = value;\n i++;\n }\n\n return last\n }\n};\n\n/* */\n\n\n\nvar htmlTagMatcher = /<\\/?[\\w\\s=\"/.':;#-\\/]+>/;\nvar linkKeyMatcher = /(?:@(?:\\.[a-zA-Z]+)?:(?:[\\w\\-_|./]+|\\([\\w\\-_:|./]+\\)))/g;\nvar linkKeyPrefixMatcher = /^@(?:\\.([a-zA-Z]+))?:/;\nvar bracketsMatcher = /[()]/g;\nvar defaultModifiers = {\n 'upper': function (str) { return str.toLocaleUpperCase(); },\n 'lower': function (str) { return str.toLocaleLowerCase(); },\n 'capitalize': function (str) { return (\"\" + (str.charAt(0).toLocaleUpperCase()) + (str.substr(1))); }\n};\n\nvar defaultFormatter = new BaseFormatter();\n\nvar VueI18n = function VueI18n (options) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n // Auto install if it is not done yet and `window` has `Vue`.\n // To allow users to avoid auto-installation in some cases,\n // this code should be placed here. See #290\n /* istanbul ignore if */\n if (!Vue && typeof window !== 'undefined' && window.Vue) {\n install(window.Vue);\n }\n\n var locale = options.locale || 'en-US';\n var fallbackLocale = options.fallbackLocale === false\n ? false\n : options.fallbackLocale || 'en-US';\n var messages = options.messages || {};\n var dateTimeFormats = options.dateTimeFormats || options.datetimeFormats || {};\n var numberFormats = options.numberFormats || {};\n\n this._vm = null;\n this._formatter = options.formatter || defaultFormatter;\n this._modifiers = options.modifiers || {};\n this._missing = options.missing || null;\n this._root = options.root || null;\n this._sync = options.sync === undefined ? true : !!options.sync;\n this._fallbackRoot = options.fallbackRoot === undefined\n ? true\n : !!options.fallbackRoot;\n this._fallbackRootWithEmptyString = options.fallbackRootWithEmptyString === undefined\n ? true\n : !!options.fallbackRootWithEmptyString;\n this._formatFallbackMessages = options.formatFallbackMessages === undefined\n ? false\n : !!options.formatFallbackMessages;\n this._silentTranslationWarn = options.silentTranslationWarn === undefined\n ? false\n : options.silentTranslationWarn;\n this._silentFallbackWarn = options.silentFallbackWarn === undefined\n ? false\n : !!options.silentFallbackWarn;\n this._dateTimeFormatters = {};\n this._numberFormatters = {};\n this._path = new I18nPath();\n this._dataListeners = new Set();\n this._componentInstanceCreatedListener = options.componentInstanceCreatedListener || null;\n this._preserveDirectiveContent = options.preserveDirectiveContent === undefined\n ? false\n : !!options.preserveDirectiveContent;\n this.pluralizationRules = options.pluralizationRules || {};\n this._warnHtmlInMessage = options.warnHtmlInMessage || 'off';\n this._postTranslation = options.postTranslation || null;\n this._escapeParameterHtml = options.escapeParameterHtml || false;\n\n if ('__VUE_I18N_BRIDGE__' in options) {\n this.__VUE_I18N_BRIDGE__ = options.__VUE_I18N_BRIDGE__;\n }\n\n /**\n * @param choice {number} a choice index given by the input to $tc: `$tc('path.to.rule', choiceIndex)`\n * @param choicesLength {number} an overall amount of available choices\n * @returns a final choice index\n */\n this.getChoiceIndex = function (choice, choicesLength) {\n var thisPrototype = Object.getPrototypeOf(this$1);\n if (thisPrototype && thisPrototype.getChoiceIndex) {\n var prototypeGetChoiceIndex = (thisPrototype.getChoiceIndex);\n return (prototypeGetChoiceIndex).call(this$1, choice, choicesLength)\n }\n\n // Default (old) getChoiceIndex implementation - english-compatible\n var defaultImpl = function (_choice, _choicesLength) {\n _choice = Math.abs(_choice);\n\n if (_choicesLength === 2) {\n return _choice\n ? _choice > 1\n ? 1\n : 0\n : 1\n }\n\n return _choice ? Math.min(_choice, 2) : 0\n };\n\n if (this$1.locale in this$1.pluralizationRules) {\n return this$1.pluralizationRules[this$1.locale].apply(this$1, [choice, choicesLength])\n } else {\n return defaultImpl(choice, choicesLength)\n }\n };\n\n\n this._exist = function (message, key) {\n if (!message || !key) { return false }\n if (!isNull(this$1._path.getPathValue(message, key))) { return true }\n // fallback for flat key\n if (message[key]) { return true }\n return false\n };\n\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n Object.keys(messages).forEach(function (locale) {\n this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);\n });\n }\n\n this._initVM({\n locale: locale,\n fallbackLocale: fallbackLocale,\n messages: messages,\n dateTimeFormats: dateTimeFormats,\n numberFormats: numberFormats\n });\n};\n\nvar prototypeAccessors = { vm: { configurable: true },messages: { configurable: true },dateTimeFormats: { configurable: true },numberFormats: { configurable: true },availableLocales: { configurable: true },locale: { configurable: true },fallbackLocale: { configurable: true },formatFallbackMessages: { configurable: true },missing: { configurable: true },formatter: { configurable: true },silentTranslationWarn: { configurable: true },silentFallbackWarn: { configurable: true },preserveDirectiveContent: { configurable: true },warnHtmlInMessage: { configurable: true },postTranslation: { configurable: true },sync: { configurable: true } };\n\nVueI18n.prototype._checkLocaleMessage = function _checkLocaleMessage (locale, level, message) {\n var paths = [];\n\n var fn = function (level, locale, message, paths) {\n if (isPlainObject(message)) {\n Object.keys(message).forEach(function (key) {\n var val = message[key];\n if (isPlainObject(val)) {\n paths.push(key);\n paths.push('.');\n fn(level, locale, val, paths);\n paths.pop();\n paths.pop();\n } else {\n paths.push(key);\n fn(level, locale, val, paths);\n paths.pop();\n }\n });\n } else if (isArray(message)) {\n message.forEach(function (item, index) {\n if (isPlainObject(item)) {\n paths.push((\"[\" + index + \"]\"));\n paths.push('.');\n fn(level, locale, item, paths);\n paths.pop();\n paths.pop();\n } else {\n paths.push((\"[\" + index + \"]\"));\n fn(level, locale, item, paths);\n paths.pop();\n }\n });\n } else if (isString(message)) {\n var ret = htmlTagMatcher.test(message);\n if (ret) {\n var msg = \"Detected HTML in message '\" + message + \"' of keypath '\" + (paths.join('')) + \"' at '\" + locale + \"'. Consider component interpolation with '' to avoid XSS. See https://bit.ly/2ZqJzkp\";\n if (level === 'warn') {\n warn(msg);\n } else if (level === 'error') {\n error(msg);\n }\n }\n }\n };\n\n fn(level, locale, message, paths);\n};\n\nVueI18n.prototype._initVM = function _initVM (data) {\n var silent = Vue.config.silent;\n Vue.config.silent = true;\n this._vm = new Vue({ data: data, __VUE18N__INSTANCE__: true });\n Vue.config.silent = silent;\n};\n\nVueI18n.prototype.destroyVM = function destroyVM () {\n this._vm.$destroy();\n};\n\nVueI18n.prototype.subscribeDataChanging = function subscribeDataChanging (vm) {\n this._dataListeners.add(vm);\n};\n\nVueI18n.prototype.unsubscribeDataChanging = function unsubscribeDataChanging (vm) {\n remove(this._dataListeners, vm);\n};\n\nVueI18n.prototype.watchI18nData = function watchI18nData () {\n var this$1 = this;\n return this._vm.$watch('$data', function () {\n var listeners = arrayFrom(this$1._dataListeners);\n var i = listeners.length;\n while(i--) {\n Vue.nextTick(function () {\n listeners[i] && listeners[i].$forceUpdate();\n });\n }\n }, { deep: true })\n};\n\nVueI18n.prototype.watchLocale = function watchLocale (composer) {\n if (!composer) {\n /* istanbul ignore if */\n if (!this._sync || !this._root) { return null }\n var target = this._vm;\n return this._root.$i18n.vm.$watch('locale', function (val) {\n target.$set(target, 'locale', val);\n target.$forceUpdate();\n }, { immediate: true })\n } else {\n // deal with vue-i18n-bridge\n if (!this.__VUE_I18N_BRIDGE__) { return null }\n var self = this;\n var target$1 = this._vm;\n return this.vm.$watch('locale', function (val) {\n target$1.$set(target$1, 'locale', val);\n if (self.__VUE_I18N_BRIDGE__ && composer) {\n composer.locale.value = val;\n }\n target$1.$forceUpdate();\n }, { immediate: true })\n }\n};\n\nVueI18n.prototype.onComponentInstanceCreated = function onComponentInstanceCreated (newI18n) {\n if (this._componentInstanceCreatedListener) {\n this._componentInstanceCreatedListener(newI18n, this);\n }\n};\n\nprototypeAccessors.vm.get = function () { return this._vm };\n\nprototypeAccessors.messages.get = function () { return looseClone(this._getMessages()) };\nprototypeAccessors.dateTimeFormats.get = function () { return looseClone(this._getDateTimeFormats()) };\nprototypeAccessors.numberFormats.get = function () { return looseClone(this._getNumberFormats()) };\nprototypeAccessors.availableLocales.get = function () { return Object.keys(this.messages).sort() };\n\nprototypeAccessors.locale.get = function () { return this._vm.locale };\nprototypeAccessors.locale.set = function (locale) {\n this._vm.$set(this._vm, 'locale', locale);\n};\n\nprototypeAccessors.fallbackLocale.get = function () { return this._vm.fallbackLocale };\nprototypeAccessors.fallbackLocale.set = function (locale) {\n this._localeChainCache = {};\n this._vm.$set(this._vm, 'fallbackLocale', locale);\n};\n\nprototypeAccessors.formatFallbackMessages.get = function () { return this._formatFallbackMessages };\nprototypeAccessors.formatFallbackMessages.set = function (fallback) { this._formatFallbackMessages = fallback; };\n\nprototypeAccessors.missing.get = function () { return this._missing };\nprototypeAccessors.missing.set = function (handler) { this._missing = handler; };\n\nprototypeAccessors.formatter.get = function () { return this._formatter };\nprototypeAccessors.formatter.set = function (formatter) { this._formatter = formatter; };\n\nprototypeAccessors.silentTranslationWarn.get = function () { return this._silentTranslationWarn };\nprototypeAccessors.silentTranslationWarn.set = function (silent) { this._silentTranslationWarn = silent; };\n\nprototypeAccessors.silentFallbackWarn.get = function () { return this._silentFallbackWarn };\nprototypeAccessors.silentFallbackWarn.set = function (silent) { this._silentFallbackWarn = silent; };\n\nprototypeAccessors.preserveDirectiveContent.get = function () { return this._preserveDirectiveContent };\nprototypeAccessors.preserveDirectiveContent.set = function (preserve) { this._preserveDirectiveContent = preserve; };\n\nprototypeAccessors.warnHtmlInMessage.get = function () { return this._warnHtmlInMessage };\nprototypeAccessors.warnHtmlInMessage.set = function (level) {\n var this$1 = this;\n\n var orgLevel = this._warnHtmlInMessage;\n this._warnHtmlInMessage = level;\n if (orgLevel !== level && (level === 'warn' || level === 'error')) {\n var messages = this._getMessages();\n Object.keys(messages).forEach(function (locale) {\n this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);\n });\n }\n};\n\nprototypeAccessors.postTranslation.get = function () { return this._postTranslation };\nprototypeAccessors.postTranslation.set = function (handler) { this._postTranslation = handler; };\n\nprototypeAccessors.sync.get = function () { return this._sync };\nprototypeAccessors.sync.set = function (val) { this._sync = val; };\n\nVueI18n.prototype._getMessages = function _getMessages () { return this._vm.messages };\nVueI18n.prototype._getDateTimeFormats = function _getDateTimeFormats () { return this._vm.dateTimeFormats };\nVueI18n.prototype._getNumberFormats = function _getNumberFormats () { return this._vm.numberFormats };\n\nVueI18n.prototype._warnDefault = function _warnDefault (locale, key, result, vm, values, interpolateMode) {\n if (!isNull(result)) { return result }\n if (this._missing) {\n var missingRet = this._missing.apply(null, [locale, key, vm, values]);\n if (isString(missingRet)) {\n return missingRet\n }\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn(\n \"Cannot translate the value of keypath '\" + key + \"'. \" +\n 'Use the value of keypath as default.'\n );\n }\n }\n\n if (this._formatFallbackMessages) {\n var parsedArgs = parseArgs.apply(void 0, values);\n return this._render(key, interpolateMode, parsedArgs.params, key)\n } else {\n return key\n }\n};\n\nVueI18n.prototype._isFallbackRoot = function _isFallbackRoot (val) {\n return (this._fallbackRootWithEmptyString? !val : isNull(val)) && !isNull(this._root) && this._fallbackRoot\n};\n\nVueI18n.prototype._isSilentFallbackWarn = function _isSilentFallbackWarn (key) {\n return this._silentFallbackWarn instanceof RegExp\n ? this._silentFallbackWarn.test(key)\n : this._silentFallbackWarn\n};\n\nVueI18n.prototype._isSilentFallback = function _isSilentFallback (locale, key) {\n return this._isSilentFallbackWarn(key) && (this._isFallbackRoot() || locale !== this.fallbackLocale)\n};\n\nVueI18n.prototype._isSilentTranslationWarn = function _isSilentTranslationWarn (key) {\n return this._silentTranslationWarn instanceof RegExp\n ? this._silentTranslationWarn.test(key)\n : this._silentTranslationWarn\n};\n\nVueI18n.prototype._interpolate = function _interpolate (\n locale,\n message,\n key,\n host,\n interpolateMode,\n values,\n visitedLinkStack\n) {\n if (!message) { return null }\n\n var pathRet = this._path.getPathValue(message, key);\n if (isArray(pathRet) || isPlainObject(pathRet)) { return pathRet }\n\n var ret;\n if (isNull(pathRet)) {\n /* istanbul ignore else */\n if (isPlainObject(message)) {\n ret = message[key];\n if (!(isString(ret) || isFunction(ret))) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {\n warn((\"Value of key '\" + key + \"' is not a string or function !\"));\n }\n return null\n }\n } else {\n return null\n }\n } else {\n /* istanbul ignore else */\n if (isString(pathRet) || isFunction(pathRet)) {\n ret = pathRet;\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {\n warn((\"Value of key '\" + key + \"' is not a string or function!\"));\n }\n return null\n }\n }\n\n // Check for the existence of links within the translated string\n if (isString(ret) && (ret.indexOf('@:') >= 0 || ret.indexOf('@.') >= 0)) {\n ret = this._link(locale, message, ret, host, 'raw', values, visitedLinkStack);\n }\n\n return this._render(ret, interpolateMode, values, key)\n};\n\nVueI18n.prototype._link = function _link (\n locale,\n message,\n str,\n host,\n interpolateMode,\n values,\n visitedLinkStack\n) {\n var ret = str;\n\n // Match all the links within the local\n // We are going to replace each of\n // them with its translation\n var matches = ret.match(linkKeyMatcher);\n\n // eslint-disable-next-line no-autofix/prefer-const\n for (var idx in matches) {\n // ie compatible: filter custom array\n // prototype method\n if (!matches.hasOwnProperty(idx)) {\n continue\n }\n var link = matches[idx];\n var linkKeyPrefixMatches = link.match(linkKeyPrefixMatcher);\n var linkPrefix = linkKeyPrefixMatches[0];\n var formatterName = linkKeyPrefixMatches[1];\n\n // Remove the leading @:, @.case: and the brackets\n var linkPlaceholder = link.replace(linkPrefix, '').replace(bracketsMatcher, '');\n\n if (includes(visitedLinkStack, linkPlaceholder)) {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Circular reference found. \\\"\" + link + \"\\\" is already visited in the chain of \" + (visitedLinkStack.reverse().join(' <- '))));\n }\n return ret\n }\n visitedLinkStack.push(linkPlaceholder);\n\n // Translate the link\n var translated = this._interpolate(\n locale, message, linkPlaceholder, host,\n interpolateMode === 'raw' ? 'string' : interpolateMode,\n interpolateMode === 'raw' ? undefined : values,\n visitedLinkStack\n );\n\n if (this._isFallbackRoot(translated)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(linkPlaceholder)) {\n warn((\"Fall back to translate the link placeholder '\" + linkPlaceholder + \"' with root locale.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n var root = this._root.$i18n;\n translated = root._translate(\n root._getMessages(), root.locale, root.fallbackLocale,\n linkPlaceholder, host, interpolateMode, values\n );\n }\n translated = this._warnDefault(\n locale, linkPlaceholder, translated, host,\n isArray(values) ? values : [values],\n interpolateMode\n );\n\n if (this._modifiers.hasOwnProperty(formatterName)) {\n translated = this._modifiers[formatterName](translated);\n } else if (defaultModifiers.hasOwnProperty(formatterName)) {\n translated = defaultModifiers[formatterName](translated);\n }\n\n visitedLinkStack.pop();\n\n // Replace the link with the translated\n ret = !translated ? ret : ret.replace(link, translated);\n }\n\n return ret\n};\n\nVueI18n.prototype._createMessageContext = function _createMessageContext (values, formatter, path, interpolateMode) {\n var this$1 = this;\n\n var _list = isArray(values) ? values : [];\n var _named = isObject(values) ? values : {};\n var list = function (index) { return _list[index]; };\n var named = function (key) { return _named[key]; };\n var messages = this._getMessages();\n var locale = this.locale;\n\n return {\n list: list,\n named: named,\n values: values,\n formatter: formatter,\n path: path,\n messages: messages,\n locale: locale,\n linked: function (linkedKey) { return this$1._interpolate(locale, messages[locale] || {}, linkedKey, null, interpolateMode, undefined, [linkedKey]); }\n }\n};\n\nVueI18n.prototype._render = function _render (message, interpolateMode, values, path) {\n if (isFunction(message)) {\n return message(\n this._createMessageContext(values, this._formatter || defaultFormatter, path, interpolateMode)\n )\n }\n\n var ret = this._formatter.interpolate(message, values, path);\n\n // If the custom formatter refuses to work - apply the default one\n if (!ret) {\n ret = defaultFormatter.interpolate(message, values, path);\n }\n\n // if interpolateMode is **not** 'string' ('row'),\n // return the compiled data (e.g. ['foo', VNode, 'bar']) with formatter\n return interpolateMode === 'string' && !isString(ret) ? ret.join('') : ret\n};\n\nVueI18n.prototype._appendItemToChain = function _appendItemToChain (chain, item, blocks) {\n var follow = false;\n if (!includes(chain, item)) {\n follow = true;\n if (item) {\n follow = item[item.length - 1] !== '!';\n item = item.replace(/!/g, '');\n chain.push(item);\n if (blocks && blocks[item]) {\n follow = blocks[item];\n }\n }\n }\n return follow\n};\n\nVueI18n.prototype._appendLocaleToChain = function _appendLocaleToChain (chain, locale, blocks) {\n var follow;\n var tokens = locale.split('-');\n do {\n var item = tokens.join('-');\n follow = this._appendItemToChain(chain, item, blocks);\n tokens.splice(-1, 1);\n } while (tokens.length && (follow === true))\n return follow\n};\n\nVueI18n.prototype._appendBlockToChain = function _appendBlockToChain (chain, block, blocks) {\n var follow = true;\n for (var i = 0; (i < block.length) && (isBoolean(follow)); i++) {\n var locale = block[i];\n if (isString(locale)) {\n follow = this._appendLocaleToChain(chain, locale, blocks);\n }\n }\n return follow\n};\n\nVueI18n.prototype._getLocaleChain = function _getLocaleChain (start, fallbackLocale) {\n if (start === '') { return [] }\n\n if (!this._localeChainCache) {\n this._localeChainCache = {};\n }\n\n var chain = this._localeChainCache[start];\n if (!chain) {\n if (!fallbackLocale) {\n fallbackLocale = this.fallbackLocale;\n }\n chain = [];\n\n // first block defined by start\n var block = [start];\n\n // while any intervening block found\n while (isArray(block)) {\n block = this._appendBlockToChain(\n chain,\n block,\n fallbackLocale\n );\n }\n\n // last block defined by default\n var defaults;\n if (isArray(fallbackLocale)) {\n defaults = fallbackLocale;\n } else if (isObject(fallbackLocale)) {\n /* $FlowFixMe */\n if (fallbackLocale['default']) {\n defaults = fallbackLocale['default'];\n } else {\n defaults = null;\n }\n } else {\n defaults = fallbackLocale;\n }\n\n // convert defaults to array\n if (isString(defaults)) {\n block = [defaults];\n } else {\n block = defaults;\n }\n if (block) {\n this._appendBlockToChain(\n chain,\n block,\n null\n );\n }\n this._localeChainCache[start] = chain;\n }\n return chain\n};\n\nVueI18n.prototype._translate = function _translate (\n messages,\n locale,\n fallback,\n key,\n host,\n interpolateMode,\n args\n) {\n var chain = this._getLocaleChain(locale, fallback);\n var res;\n for (var i = 0; i < chain.length; i++) {\n var step = chain[i];\n res =\n this._interpolate(step, messages[step], key, host, interpolateMode, args, [key]);\n if (!isNull(res)) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to translate the keypath '\" + key + \"' with '\" + step + \"' locale.\"));\n }\n return res\n }\n }\n return null\n};\n\nVueI18n.prototype._t = function _t (key, _locale, messages, host) {\n var ref;\n\n var values = [], len = arguments.length - 4;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 4 ];\n if (!key) { return '' }\n\n var parsedArgs = parseArgs.apply(void 0, values);\n if(this._escapeParameterHtml) {\n parsedArgs.params = escapeParams(parsedArgs.params);\n }\n\n var locale = parsedArgs.locale || _locale;\n\n var ret = this._translate(\n messages, locale, this.fallbackLocale, key,\n host, 'string', parsedArgs.params\n );\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to translate the keypath '\" + key + \"' with root locale.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return (ref = this._root).$t.apply(ref, [ key ].concat( values ))\n } else {\n ret = this._warnDefault(locale, key, ret, host, values, 'string');\n if (this._postTranslation && ret !== null && ret !== undefined) {\n ret = this._postTranslation(ret, key);\n }\n return ret\n }\n};\n\nVueI18n.prototype.t = function t (key) {\n var ref;\n\n var values = [], len = arguments.length - 1;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];\n return (ref = this)._t.apply(ref, [ key, this.locale, this._getMessages(), null ].concat( values ))\n};\n\nVueI18n.prototype._i = function _i (key, locale, messages, host, values) {\n var ret =\n this._translate(messages, locale, this.fallbackLocale, key, host, 'raw', values);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn((\"Fall back to interpolate the keypath '\" + key + \"' with root locale.\"));\n }\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.i(key, locale, values)\n } else {\n return this._warnDefault(locale, key, ret, host, [values], 'raw')\n }\n};\n\nVueI18n.prototype.i = function i (key, locale, values) {\n /* istanbul ignore if */\n if (!key) { return '' }\n\n if (!isString(locale)) {\n locale = this.locale;\n }\n\n return this._i(key, locale, this._getMessages(), null, values)\n};\n\nVueI18n.prototype._tc = function _tc (\n key,\n _locale,\n messages,\n host,\n choice\n) {\n var ref;\n\n var values = [], len = arguments.length - 5;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 5 ];\n if (!key) { return '' }\n if (choice === undefined) {\n choice = 1;\n }\n\n var predefined = { 'count': choice, 'n': choice };\n var parsedArgs = parseArgs.apply(void 0, values);\n parsedArgs.params = Object.assign(predefined, parsedArgs.params);\n values = parsedArgs.locale === null ? [parsedArgs.params] : [parsedArgs.locale, parsedArgs.params];\n return this.fetchChoice((ref = this)._t.apply(ref, [ key, _locale, messages, host ].concat( values )), choice)\n};\n\nVueI18n.prototype.fetchChoice = function fetchChoice (message, choice) {\n /* istanbul ignore if */\n if (!message || !isString(message)) { return null }\n var choices = message.split('|');\n\n choice = this.getChoiceIndex(choice, choices.length);\n if (!choices[choice]) { return message }\n return choices[choice].trim()\n};\n\nVueI18n.prototype.tc = function tc (key, choice) {\n var ref;\n\n var values = [], len = arguments.length - 2;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];\n return (ref = this)._tc.apply(ref, [ key, this.locale, this._getMessages(), null, choice ].concat( values ))\n};\n\nVueI18n.prototype._te = function _te (key, locale, messages) {\n var args = [], len = arguments.length - 3;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 3 ];\n\n var _locale = parseArgs.apply(void 0, args).locale || locale;\n return this._exist(messages[_locale], key)\n};\n\nVueI18n.prototype.te = function te (key, locale) {\n return this._te(key, this.locale, this._getMessages(), locale)\n};\n\nVueI18n.prototype.getLocaleMessage = function getLocaleMessage (locale) {\n return looseClone(this._vm.messages[locale] || {})\n};\n\nVueI18n.prototype.setLocaleMessage = function setLocaleMessage (locale, message) {\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);\n }\n this._vm.$set(this._vm.messages, locale, message);\n};\n\nVueI18n.prototype.mergeLocaleMessage = function mergeLocaleMessage (locale, message) {\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);\n }\n this._vm.$set(this._vm.messages, locale, merge(\n typeof this._vm.messages[locale] !== 'undefined' && Object.keys(this._vm.messages[locale]).length\n ? Object.assign({}, this._vm.messages[locale])\n : {},\n message\n ));\n};\n\nVueI18n.prototype.getDateTimeFormat = function getDateTimeFormat (locale) {\n return looseClone(this._vm.dateTimeFormats[locale] || {})\n};\n\nVueI18n.prototype.setDateTimeFormat = function setDateTimeFormat (locale, format) {\n this._vm.$set(this._vm.dateTimeFormats, locale, format);\n this._clearDateTimeFormat(locale, format);\n};\n\nVueI18n.prototype.mergeDateTimeFormat = function mergeDateTimeFormat (locale, format) {\n this._vm.$set(this._vm.dateTimeFormats, locale, merge(this._vm.dateTimeFormats[locale] || {}, format));\n this._clearDateTimeFormat(locale, format);\n};\n\nVueI18n.prototype._clearDateTimeFormat = function _clearDateTimeFormat (locale, format) {\n // eslint-disable-next-line no-autofix/prefer-const\n for (var key in format) {\n var id = locale + \"__\" + key;\n\n if (!this._dateTimeFormatters.hasOwnProperty(id)) {\n continue\n }\n\n delete this._dateTimeFormatters[id];\n }\n};\n\nVueI18n.prototype._localizeDateTime = function _localizeDateTime (\n value,\n locale,\n fallback,\n dateTimeFormats,\n key,\n options\n) {\n var _locale = locale;\n var formats = dateTimeFormats[_locale];\n\n var chain = this._getLocaleChain(locale, fallback);\n for (var i = 0; i < chain.length; i++) {\n var current = _locale;\n var step = chain[i];\n formats = dateTimeFormats[step];\n _locale = step;\n // fallback locale\n if (isNull(formats) || isNull(formats[key])) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to '\" + step + \"' datetime formats from '\" + current + \"' datetime formats.\"));\n }\n } else {\n break\n }\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null\n } else {\n var format = formats[key];\n\n var formatter;\n if (options) {\n formatter = new Intl.DateTimeFormat(_locale, Object.assign({}, format, options));\n } else {\n var id = _locale + \"__\" + key;\n formatter = this._dateTimeFormatters[id];\n if (!formatter) {\n formatter = this._dateTimeFormatters[id] = new Intl.DateTimeFormat(_locale, format);\n }\n }\n\n return formatter.format(value)\n }\n};\n\nVueI18n.prototype._d = function _d (value, locale, key, options) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && !VueI18n.availabilities.dateTimeFormat) {\n warn('Cannot format a Date value due to not supported Intl.DateTimeFormat.');\n return ''\n }\n\n if (!key) {\n var dtf = !options ? new Intl.DateTimeFormat(locale) : new Intl.DateTimeFormat(locale, options);\n return dtf.format(value)\n }\n\n var ret =\n this._localizeDateTime(value, locale, this.fallbackLocale, this._getDateTimeFormats(), key, options);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to datetime localization of root: key '\" + key + \"'.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.d(value, key, locale)\n } else {\n return ret || ''\n }\n};\n\nVueI18n.prototype.d = function d (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n var locale = this.locale;\n var key = null;\n var options = null;\n\n if (args.length === 1) {\n if (isString(args[0])) {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n if (args[0].key) {\n key = args[0].key;\n }\n }\n\n options = Object.keys(args[0]).reduce(function (acc, key) {\n var obj;\n\n if (includes(dateTimeFormatKeys, key)) {\n return Object.assign({}, acc, ( obj = {}, obj[key] = args[0][key], obj ))\n }\n return acc\n }, null);\n\n } else if (args.length === 2) {\n if (isString(args[0])) {\n key = args[0];\n }\n if (isString(args[1])) {\n locale = args[1];\n }\n }\n\n return this._d(value, locale, key, options)\n};\n\nVueI18n.prototype.getNumberFormat = function getNumberFormat (locale) {\n return looseClone(this._vm.numberFormats[locale] || {})\n};\n\nVueI18n.prototype.setNumberFormat = function setNumberFormat (locale, format) {\n this._vm.$set(this._vm.numberFormats, locale, format);\n this._clearNumberFormat(locale, format);\n};\n\nVueI18n.prototype.mergeNumberFormat = function mergeNumberFormat (locale, format) {\n this._vm.$set(this._vm.numberFormats, locale, merge(this._vm.numberFormats[locale] || {}, format));\n this._clearNumberFormat(locale, format);\n};\n\nVueI18n.prototype._clearNumberFormat = function _clearNumberFormat (locale, format) {\n // eslint-disable-next-line no-autofix/prefer-const\n for (var key in format) {\n var id = locale + \"__\" + key;\n\n if (!this._numberFormatters.hasOwnProperty(id)) {\n continue\n }\n\n delete this._numberFormatters[id];\n }\n};\n\nVueI18n.prototype._getNumberFormatter = function _getNumberFormatter (\n value,\n locale,\n fallback,\n numberFormats,\n key,\n options\n) {\n var _locale = locale;\n var formats = numberFormats[_locale];\n\n var chain = this._getLocaleChain(locale, fallback);\n for (var i = 0; i < chain.length; i++) {\n var current = _locale;\n var step = chain[i];\n formats = numberFormats[step];\n _locale = step;\n // fallback locale\n if (isNull(formats) || isNull(formats[key])) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to '\" + step + \"' number formats from '\" + current + \"' number formats.\"));\n }\n } else {\n break\n }\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null\n } else {\n var format = formats[key];\n\n var formatter;\n if (options) {\n // If options specified - create one time number formatter\n formatter = new Intl.NumberFormat(_locale, Object.assign({}, format, options));\n } else {\n var id = _locale + \"__\" + key;\n formatter = this._numberFormatters[id];\n if (!formatter) {\n formatter = this._numberFormatters[id] = new Intl.NumberFormat(_locale, format);\n }\n }\n return formatter\n }\n};\n\nVueI18n.prototype._n = function _n (value, locale, key, options) {\n /* istanbul ignore if */\n if (!VueI18n.availabilities.numberFormat) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot format a Number value due to not supported Intl.NumberFormat.');\n }\n return ''\n }\n\n if (!key) {\n var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);\n return nf.format(value)\n }\n\n var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);\n var ret = formatter && formatter.format(value);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to number localization of root: key '\" + key + \"'.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.n(value, Object.assign({}, { key: key, locale: locale }, options))\n } else {\n return ret || ''\n }\n};\n\nVueI18n.prototype.n = function n (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n var locale = this.locale;\n var key = null;\n var options = null;\n\n if (args.length === 1) {\n if (isString(args[0])) {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n if (args[0].key) {\n key = args[0].key;\n }\n\n // Filter out number format options only\n options = Object.keys(args[0]).reduce(function (acc, key) {\n var obj;\n\n if (includes(numberFormatKeys, key)) {\n return Object.assign({}, acc, ( obj = {}, obj[key] = args[0][key], obj ))\n }\n return acc\n }, null);\n }\n } else if (args.length === 2) {\n if (isString(args[0])) {\n key = args[0];\n }\n if (isString(args[1])) {\n locale = args[1];\n }\n }\n\n return this._n(value, locale, key, options)\n};\n\nVueI18n.prototype._ntp = function _ntp (value, locale, key, options) {\n /* istanbul ignore if */\n if (!VueI18n.availabilities.numberFormat) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot format to parts a Number value due to not supported Intl.NumberFormat.');\n }\n return []\n }\n\n if (!key) {\n var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);\n return nf.formatToParts(value)\n }\n\n var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);\n var ret = formatter && formatter.formatToParts(value);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn((\"Fall back to format number to parts of root: key '\" + key + \"' .\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n._ntp(value, locale, key, options)\n } else {\n return ret || []\n }\n};\n\nObject.defineProperties( VueI18n.prototype, prototypeAccessors );\n\nvar availabilities;\n// $FlowFixMe\nObject.defineProperty(VueI18n, 'availabilities', {\n get: function get () {\n if (!availabilities) {\n var intlDefined = typeof Intl !== 'undefined';\n availabilities = {\n dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',\n numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'\n };\n }\n\n return availabilities\n }\n});\n\nVueI18n.install = install;\nVueI18n.version = '8.28.2';\n\nexport default VueI18n;\n","// src/index.ts\nimport Vue from \"vue\";\nimport VueI18n from \"vue-i18n\";\nimport { computed, getCurrentInstance } from \"@vue/composition-api\";\nvar i18nInstance;\nfunction createI18n(options) {\n i18nInstance = new VueI18n(options);\n return i18nInstance;\n}\nfunction useI18n() {\n if (!i18nInstance)\n throw new Error(\"vue-i18n not initialized\");\n const i18n = i18nInstance;\n const instance = getCurrentInstance();\n const vm = (instance == null ? void 0 : instance.proxy) || instance || new Vue({});\n const locale = computed({\n get() {\n return i18n.locale;\n },\n set(v) {\n i18n.locale = v;\n }\n });\n return {\n locale,\n t: vm.$t.bind(vm),\n tc: vm.$tc.bind(vm),\n d: vm.$d.bind(vm),\n te: vm.$te.bind(vm),\n n: vm.$n.bind(vm)\n };\n}\nexport {\n createI18n,\n useI18n\n};\n","import VueI18n, { LocaleMessages } from 'vue-i18n'\nimport { createI18n } from 'vue-i18n-composable'\nimport enLocals from '@/locales/en.json'\n\nexport default function initialize (vue) {\n vue.use(VueI18n)\n\n function loadLocaleMessages (): LocaleMessages {\n const messages: LocaleMessages = { en: {} }\n Object.keys(enLocals).forEach((key) => {\n messages.en[key] = enLocals[key]\n })\n return messages\n }\n\n const i18n = createI18n({\n locale: import.meta.env.VUE_APP_I18N_LOCALE || 'en',\n fallbackLocale: import.meta.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en',\n messages: loadLocaleMessages()\n })\n return i18n\n}\n","/*\nWhile upgrading to vue 3 please check full plugin and do necessary modifications here\n Library build set up for fas-search-components.\n build library using vue-cli-service\n Basic set up of included files store and i18n included here\n How to use :\n inside main.ts `import Search from 'fas-ui'`\n Vue.use(Search, { store, i18n })\n include style if needed either\n import 'fas-ui/fas-lib/fas-ui.css'\n or inside component style tag us without scope (global scope needed),\n @import '~fas-ui/src/assets/scss/search.scss';\n */\n\nimport OurVue from 'vue'\nimport Search from '@/components/Dashboard/Search.vue'\nimport VueCompositionAPI from '@vue/composition-api'\nimport initializeI18n from './plugins/i18n'\n\n// stores needed fro search\n\n// lang files\n\n/**\n * install function\n *\n * @param {*} Vue parent component vue contructor\n * @param {store, i18n} options need store and i18n\n */\nfunction install (Vue, options) {\n if (OurVue !== Vue) {\n // eslint-disable-next-line no-console\n console.error('Multiple instances of Vue detected ')\n }\n\n if (install.installed) return\n install.installed = true\n // since VueCompositionAPI is not giving direct access to property we are checking by using setup api exist in context or not\n // since setup is a reserved keyword and which is using in vue 3 also, Hope it will not change.\n // Another solution is Object.hasOwnProperty.call(Vue, '__composition_api_installed__').\n // we are not using that in futurem, if they change the string no need to brake app\n // Couldnot find better solution since lack of information available. sorry devs :(\n if (!Object.hasOwnProperty.call(Vue.config.optionMergeStrategies, 'setup')) {\n // if parent is not using VueCompositionAPI api need to push to vue\n Vue.use(VueCompositionAPI)\n // eslint-disable-next-line no-console\n console.info('[FAS-Plugin] VueCompositionAPI is not available in parent so pushing from plugin')\n } else {\n // eslint-disable-next-line no-console\n console.info('[FAS-Plugin] VueCompositionAPI already installed')\n }\n\n // simple hack to inject locale messages. check for better solutions\n // this will not work when chaging lang.\n // need to updated code (since we are not using other lag now, not updating chanegs)\n const t = initializeI18n(Vue)\n if (options.i18n && t && t.messages) {\n options.i18n.mergeLocaleMessage(\n options.i18n.locale,\n t.messages[t.locale]\n )\n } else {\n // eslint-disable-next-line no-console\n console.error('[FAS-Plugin] please provide i18n to use lang')\n }\n // pushing store modules to parent store\n // use unique name to avoid conflict\n if (options.store) {\n // options.store.registerModule('store', store)\n window.fasStore = options.store\n } else {\n // eslint-disable-next-line no-console\n console.error('[FAS-Plugin] please provide store')\n }\n // registering component to use as plugin\n Vue.component('fas-search-component', Search)\n}\n\nconst plugin = {\n install\n}\n\nlet GlobalVue = null\nif (typeof window !== 'undefined') {\n GlobalVue = window.Vue\n} else if (typeof global !== 'undefined') {\n GlobalVue = global.vue\n}\n\nif (GlobalVue) {\n GlobalVue.use(plugin)\n}\n\nSearch.install = install\n\nexport default Search\n"],"names":["Vue","use","VueCompositionAPI","SessionStorageKeys","DateFilterCodes","PaymentMethods","SlipStatus","Role","ApiErrors","CreateRoutingSlipStatus","PatchActions","headerSearchTitle","text","align","value","display","className","sortable","hideInSearchColumnFilter","RoutingSlipRefundStatus","code","RoutingSlipRefundCodes","reduce","acc","status","ERROR","WINDOW","window","root","JS_SHA256_NO_WINDOW","WEB_WORKER","self","NODE_JS","JS_SHA256_NO_NODE_JS","process","versions","node","global","COMMON_JS","JS_SHA256_NO_COMMON_JS","module","exports","ARRAY_BUFFER","JS_SHA256_NO_ARRAY_BUFFER","ArrayBuffer","HEX_CHARS","split","EXTRA","SHIFT","K","OUTPUT_TYPES","blocks","Array","isArray","obj","Object","prototype","toString","call","JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW","isView","buffer","constructor","createOutputMethod","outputType","is224","message","Sha256","update","createMethod","method","nodeWrap","create","i","length","type","crypto","eval","Buffer","algorithm","nodeMethod","createHash","digest","Error","Uint8Array","createHmacOutputMethod","key","HmacSha256","createHmacMethod","sharedMemory","this","h0","h1","h2","h3","h4","h5","h6","h7","block","start","bytes","hBytes","finalized","hashed","first","index","charCodeAt","array","oKeyPad","iKeyPad","b","inner","notString","lastByteIndex","hash","finalize","j","s0","s1","maj","t1","ab","da","cd","bc","a","c","d","e","f","g","h","hex","arr","push","arrayBuffer","dataView","DataView","setUint32","innerHash","sha256","sha224","hmac","base64Js","byteLength","b64","lens","getLens","validLen","placeHoldersLen","toByteArray","tmp","Arr","_byteLength","curByte","len","revLookup","fromByteArray","uint8","extraBytes","parts","maxChunkLength","len2","encodeChunk","lookup","join","indexOf","end","num","output","sha256_imported","base64js_imported","Promise","loggedPromiseDeprecation","logPromiseDeprecation","console","warn","toKeycloakPromise","promise","__proto__","KeycloakPromise","executor","Keycloak","config","adapter","callbackStorage","kc","refreshQueue","loginIframe","enable","callbackList","interval","scripts","document","getElementsByTagName","src","iframeVersion","substring","useNonce","logInfo","createLogger","info","logWarn","generateRandomData","msCrypto","getRandomValues","Math","floor","random","generateCodeVerifier","generateRandomString","alphabet","randomData","chars","String","fromCharCode","apply","generatePkceChallenge","pkceMethod","codeVerifier","hashBytes","replace","getRealmUrl","authServerUrl","charAt","encodeURIComponent","realm","getOrigin","location","origin","protocol","hostname","port","processCallback","oauth","error","prompt","timeLocal","Date","getTime","errorData","error_description","onAuthError","setError","setSuccess","flow","access_token","id_token","authSuccess","params","url","endpoints","token","req","XMLHttpRequest","open","setRequestHeader","clientId","redirectUri","pkceCodeVerifier","withCredentials","onreadystatechange","readyState","tokenResponse","JSON","parse","responseText","send","accessToken","refreshToken","idToken","fulfillPromise","setToken","tokenParsed","nonce","storedNonce","refreshTokenParsed","idTokenParsed","clearToken","onAuthSuccess","loadConfig","configUrl","createPromise","setupOidcEndoints","oidcConfiguration","authorize","authorization_endpoint","token_endpoint","logout","end_session_endpoint","checkSessionIframe","check_session_iframe","register","userinfo","userinfo_endpoint","fileLoaded","oidcProvider","oidcProviderConfigUrl","match","substr","xhr","responseURL","startsWith","tokenTimeoutHandle","clearTimeout","decodeToken","sessionId","session_state","authenticated","subject","sub","realmAccess","realm_access","resourceAccess","resource_access","timeSkew","iat","onTokenExpired","expiresIn","round","setTimeout","str","slice","decodeURIComponent","escape","atob","createUUID","hexDigits","s","parseCallback","parseCallbackUrl","oauthState","get","state","valid","supportedParams","newUrl","parsed","queryIndex","fragmentIndex","responseMode","parseCallbackParams","paramsString","oauthParams","p","result","resolve","reject","setupCheckLoginIframe","iframe","createElement","onload","authUrl","iframeOrigin","setAttribute","style","body","appendChild","messageCallback","event","contentWindow","source","data","callbacks","splice","addEventListener","scheduleCheckIframe","checkLoginIframe","then","unchanged","msg","postMessage","loadAdapter","login","options","createLoginUrl","createLogoutUrl","createRegisterUrl","accountManagement","accountUrl","createAccountUrl","href","encodeHash","cordovaOpenWindowWrapper","loginUrl","target","cordova","InAppBrowser","shallowCloneCordovaOptions","userOptions","cordovaOptions","keys","optionName","formatCordovaOptions","createCordovaOptions","hidden","ref","completed","closed","closeBrowser","close","reason","logoutUrl","registerUrl","universalLinks","subscribe","unsubscribe","plugins","browsertab","openUrl","init","initOptions","createCallbackStorage","Cordova","checkLoginIframeInterval","onLoad","loginRequired","responseType","silentCheckSsoRedirectUri","enableLogging","initPromise","onReady","catch","configPromise","doLogin","checkSsoSilently","ifrm","removeChild","removeEventListener","processInit","callback","history","replaceState","updateToken","baseUrl","scope","callbackState","action","maxAge","loginHint","idpHint","locale","add","hasRealmRole","role","access","roles","hasResourceRole","resource","loadUserProfile","profile","loadUserInfo","userInfo","isTokenExpired","minValidity","ceil","isNaN","exec","onAuthRefreshSuccess","pop","onAuthRefreshError","onAuthLogout","LocalStorage","localStorage","setItem","removeItem","cs","clearExpired","time","getItem","expires","err","stringify","CookieStorage","getCookie","setCookie","cookieExpiration","minutes","exp","setTime","name","ca","cookie","expirationDate","toUTCString","fn","arguments","success","handleSuccess","handleError","factory","require$$0","require$$1","decodeKCToken","ConfigHelper","getFromSession","KeyCloakToken","base64Url","base64","map","trimTrailingSlashURL","trim","ConfigHelper$1","_a","addToSession","sessionStorage","removeFromSession","clearSession","clear","getStatusAPIUrl","StatusApiUrl","getAuthAPIUrl","AuthApiUrl","getAuthContextPath","AuthWebUrl","getRegistryHomeURL","RegistryHomeUrl","getNameRequestURL","NameRequestUrl","getPprWebURL","PprWebUrl","setKeycloakConfigUrl","keycloakConfigUrl","getKeycloakConfigUrl","__publicField","VuexModule","actions","mutations","getters","namespaced","modules","getModule","moduleClass","store","_statics","genStatic","_genStatic","reservedKeys","stateFactory","forEach","hasOwnProperty","addPropertiesToObject","_loop_1","k","defineProperty","_i","__awaiter","thisArg","_arguments","P","generator","fulfilled","step","next","rejected","done","__generator","y","t","_","label","sent","trys","ops","verb","throw","return","Symbol","iterator","n","v","op","TypeError","staticStateGenerator","modOpt","statics","staticGetterGenerator","staticMutationGenerator","args","commit","concat","staticActionGenerators","_b","dispatch","moduleDecoratorFactory","moduleOptions","stateFactory$1","getOwnPropertyNames","funcName","descriptor","getOwnPropertyDescriptor","rootState","rootGetters","thisObj","context","dynamic","registerModule","Module","modOrOpt","actionDecoratorFactory","_c","rawError","_d","actionFunction","payload","actionPayload","moduleAccessor","e_1","stack","handler","Action","targetOrParams","Mutation","mutationFunction","AuthModule","super","isAuthenticated","keycloakGuid","kcGuid","KeycloakServices","getUserInfo","currentLoginSource","loginSource","setKCToken","setIDToken","KeyCloakIdToken","setRefreshToken","KeyCloakRefreshToken","setKCGuid","setLoginSource","syncWithSessionStorage","__decorateClass$2","__decorateClass","_KeyCloakService","getInstance","instance","isInitialized","keyCloakConfigurl","getKCInstance","initializeKeyCloak","keycloakConfig","kcLogin","kcOptions","initSession","authModule","syncSessionAndScheduleTokenRefresh","parsedToken","lastName","lastname","firstName","firstname","email","_e","_f","userName","_g","username","fullName","_h","redirectUrl","siteminderLogoutUrl","SiteminderLogoutUrl","PreventStorageSync","env","VUE_APP_PATH","includes","isForceRefresh","tokenExpiresIn","refreshed","verifyRoles","allowedRoles","disabledRoles","isAuthorized","some","initializeToken","isScheduleRefresh","forceLogin","SessionSynced","syncSessionStorage","scheduleRefreshTimer","refreshEarlyTime","refreshEarlyTimeinMilliseconds","max","REFRESH_ATTEMPT_INTERVAL","scheduleRefreshToken","refreshTokenExpiresIn","refreshInMilliSeconds","timerId","log","counter","KeyCloakService","KeyCloakService$1","hookCallback","hooks","setHookCallback","input","isObject","hasOwnProp","isObjectEmpty","isUndefined","isNumber","isDate","res","arrLen","extend","valueOf","createUTC","format","strict","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidEra","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","era","meridiem","rfc2822","weekdayMismatch","getParsingFlags","m","_pf","isValid","_isValid","flags","parsedParts","isNowValid","invalidWeekday","_strict","bigHour","isFrozen","createInvalid","NaN","extend$2","fun","momentProperties","updateInProgress","copyConfig","to","from","prop","val","momentPropertiesLen","_isAMomentObject","_l","_tzm","_isUTC","_offset","_locale","Moment","updateOffset","isMoment","suppressDeprecationWarnings","deprecate","firstTime","deprecationHandler","arg","argLen","deprecations","deprecateSimple","isFunction","Function","set","_config","_dayOfMonthOrdinalParseLenient","RegExp","_dayOfMonthOrdinalParse","_ordinalParse","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","calendar","mom","now","_calendar","zeroFill","number","targetLength","forceSign","absNumber","abs","zerosToFill","pow","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","padded","ordinal","func","localeData","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","invalidDate","replaceLongDateFormatTokens","longDateFormat","lastIndex","test","defaultLongDateFormat","LTS","LT","L","LL","LLL","LLLL","_longDateFormat","formatUpper","toUpperCase","tok","defaultInvalidDate","_invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","_ordinal","defaultRelativeTime","future","past","ss","mm","hh","dd","w","ww","M","MM","yy","relativeTime","withoutSuffix","string","isFuture","_relativeTime","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","toLowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","u","sort","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","isFinite","makeGetSet","keepTime","set$1","month","date","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","_w","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","x","modMonth","o","monthsShort","months","monthsShortRegex","monthsRegex","monthsParse","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","_months","isFormat","localeMonthsShort","_monthsShort","handleStrictParse","monthName","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","localeMonthsParse","_monthsParseExact","setMonth","dayOfMonth","min","getSetMonth","getDaysInMonth","computeMonthsParse","_monthsShortStrictRegex","_monthsShortRegex","_monthsStrictRegex","_monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","parseTwoDigitYear","parseInt","getSetYear","getIsLeapYear","createDate","ms","getFullYear","setFullYear","createUTCDate","UTC","getUTCFullYear","setUTCFullYear","firstWeekOffset","dow","doy","fwd","getUTCDay","dayOfYearFromWeeks","week","weekday","resYear","resDayOfYear","dayOfYear","weekOfYear","resWeek","weekOffset","weeksInYear","weekOffsetNext","localeWeek","_week","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","weekdaysParse","parseIsoWeekday","shiftWeekdays","ws","weekdaysMin","weekdaysShort","weekdays","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","_weekdays","day","localeWeekdaysShort","_weekdaysShort","localeWeekdaysMin","_weekdaysMin","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","localeWeekdaysParse","_weekdaysParseExact","_fullWeekdaysParse","getSetDayOfWeek","getDay","getSetLocaleDayOfWeek","getSetISODayOfWeek","computeWeekdaysParse","_weekdaysStrictRegex","_weekdaysRegex","_weekdaysShortStrictRegex","_weekdaysShortRegex","_weekdaysMinStrictRegex","_weekdaysMinRegex","minp","shortp","longp","minPieces","hFormat","hours","kFormat","lowercase","matchMeridiem","_meridiemParse","localeIsPM","seconds","kInput","_isPm","isPM","_meridiem","pos","pos1","pos2","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","isLower","baseConfig","dayOfMonthOrdinalParse","meridiemParse","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","loadLocale","isLocaleNameSane","oldLocale","_abbr","require","getSetGlobalLocale","values","getLocale","defineLocale","abbr","parentLocale","updateLocale","tmpLocale","listLocales","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","configFromISO","l","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","setUTCMinutes","getUTCMinutes","configFromString","createFromInputFallback","defaults","currentDateArray","nowValue","_useUTC","getUTCMonth","getUTCDate","getMonth","getDate","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","weekYear","temp","weekdayOverflow","curWeek","GG","W","E","createLocal","gg","ISO_8601","RFC_2822","skipped","stringLength","totalParsedInputLength","meridiemFixWrap","erasConvertYear","hour","isPm","meridiemHour","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","score","configFromObject","dayOrDate","minute","second","millisecond","createFromConfig","prepareConfig","preparse","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","ordering","isDurationValid","unitHasDecimal","orderLen","parseFloat","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","quarter","weeks","isoWeek","days","milliseconds","_milliseconds","_days","_data","_bubble","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","offset","separator","utcOffset","sign","offsetFromString","chunkOffset","matcher","matches","cloneWithOffset","model","clone","local","getDateOffset","getTimezoneOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","subtract","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","_isDSTShifted","toArray","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","ret","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","base","isAfter","isBefore","createAdder","direction","period","isAdding","invalid","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","propertyLen","arrayTest","dataTypeTest","filter","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","startOf","calendarFormat","localInput","endOf","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","that","zoneDelta","monthDiff","wholeMonthDiff","anchor","toISOString","keepOffset","toDate","inspect","prefix","suffix","zone","inputString","defaultFormatUtc","defaultFormat","postformat","humanize","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOfDate","isoWeekday","unix","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","localeEras","eras","_eras","since","until","Infinity","localeErasParse","eraName","narrow","localeErasConvertYear","dir","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","_erasNameRegex","_erasRegex","erasAbbrRegex","_erasAbbrRegex","erasNarrowRegex","_erasNarrowRegex","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","_eraYearOrdinalRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","isoWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","erasParse","eraYearOrdinalParse","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","parseZone","preParsePostFormat","for","eraNarrow","eraAbbr","eraYear","isoWeeks","weeksInWeekYear","isoWeeksInYear","isoWeeksInISOWeekYear","isDST","zoneAbbr","zoneName","dates","isDSTShifted","proto$1","get$1","field","setter","listMonthsImpl","out","listWeekdaysImpl","localeSorted","shift","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","firstDayOfYear","firstDayOfWeek","langData","mathAbs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","limit","argWithSuffix","argThresholds","withSuffix","th","assign","abs$1","toISOString$1","totalSign","ymSign","daysSign","hmsSign","total","toFixed","proto$2","toIsoString","version","relativeTimeRounding","relativeTimeThreshold","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","TIME","TIME_SECONDS","TIME_MS","_CommonUtils","formatDisplayDate","moment","requiredFieldRule","errorMessage","optionalFieldRule","isSigningIn","path","pathname","isSigningOut","fileDownload","fileName","fileType","blob","Blob","navigator","msSaveBlob","blobURL","URL","createObjectURL","webkitURL","tempLink","download","click","revokeObjectURL","statusListColor","textColor","color","ACTIVE","COMPLETE","REFUNDPROCESSED","WRITEOFFCOMPLETED","BOUNCED","NSF","LINKED","REFUNDREQUEST","REFUNDAUTHORIZED","WRITEOFFAUTHORIZED","WRITEOFFREQUESTED","VOID","appendCurrencySymbol","currency","cleanObject","remainingAmount","appendQueryParamsIfNeeded","targetUrl","route","requestParams","createQueryParams","query","convertAddressForComponent","address","addressCity","city","addressCountry","country","addressRegion","region","deliveryInstructions","postalCode","streetAddress","street","streetAddressAdditional","streetAdditional","convertAddressForAuth","iaddress","isApproverRole","approverRole","FAS_REFUND_APPROVER","isVoidRole","voidRole","FAS_VOID","isRefundProcessStatus","REFUNDREJECTED","REFUNDUPLOADED","isRefundRequestStatus","isEditEnabledBystatus","encodeURI","object","object1","object2","objKeys1","objKeys2","value1","value2","isObjects","isDeepEqual","CommonUtils","fetchConfig","PayApiUrl","getPayAPIURL","getAuthWebUrl","FasWebUrl","getFasWebUrl","getSiteminderLogoutUrl","saveConfigToSessionStorage","getSelfURL","getFasAPIURL","getKeycloakAuthUrl","getKeycloakRealm","getKeycloakClientId","getAddressCompleteKey","debounce","wait","immediate","timeout","callNow","hasCallFailed","activeCalls","isThereActiveCalls","computed","useIndicators","useLoader","isLoading","toggleLoading","changeLoadingStatus","isLoadingStatus","bind","wrap","isBuffer","isArrayBuffer","isFormData","FormData","isArrayBufferView","isPlainObject","getPrototypeOf","isFile","isBlob","isStream","pipe","isURLSearchParams","URLSearchParams","isStandardBrowserEnv","product","merge","assignValue","stripBOM","content","utils","encode","buildURL","paramsSerializer","serializedParams","serialize","parseValue","hashmarkIndex","InterceptorManager","handlers","synchronous","runWhen","InterceptorManager$1","eject","id","forEachHandler","InterceptorManager_1","normalizeHeaderName","headers","normalizedName","processHeader","enhanceError","request","response","isAxiosError","description","lineNumber","columnNumber","createError","settle","validateStatus","cookies","standardBrowserEnv","write","domain","secure","toGMTString","read","remove","isAbsoluteURL","combineURLs","baseURL","relativeURL","buildFullPath","requestedURL","ignoreDuplicateOf","parseHeaders","parser","line","isURLSameOrigin","originURL","msie","userAgent","urlParsingNode","resolveURL","host","search","requestURL","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","xhrAdapter","dispatchXhrRequest","requestData","requestHeaders","auth","password","unescape","Authorization","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","statusText","handleLoad","onabort","handleAbort","onerror","ontimeout","handleTimeout","timeoutErrorMessage","transitional","clarifyTimeoutError","xsrfValue","xsrfCookieName","xsrfHeaderName","onDownloadProgress","onUploadProgress","upload","cancelToken","onCanceled","cancel","abort","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","getDefaultAdapter","stringifySafely","rawValue","encoder","silentJSONParsing","forcedJSONParsing","transformRequest","transformResponse","strictJSONParsing","maxContentLength","maxBodyLength","defaults$3","common","Accept","utils$5","forEachMethodNoData","forEachMethodWithData","defaults_1","transformData","fns","transform","isCancel$1","isCancel","__CANCEL__","throwIfCancellationRequested","throwIfRequested","dispatchRequest","utils$3","cleanHeaderConfig","onAdapterResolution","onAdapterRejection","mergeConfig","config1","config2","valueFromConfig2Keys","mergeDeepPropertiesKeys","defaultToConfig2Keys","directMergeKeys","getMergedValue","mergeDeepProperties","valueFromConfig2","utils$2","defaultToConfig2","axiosKeys","otherKeys","filterAxiosKeys","pkg","validators","validator","thing","deprecatedWarnings","currentVerArr","isOlderVersion","thanVersion","pkgVersionArr","destVer","assertOptions","schema","allowUnknown","opt","validators$1","isDeprecated","formatMessage","desc","opts","Axios","instanceConfig","interceptors","Axios$2","boolean","requestInterceptorChain","synchronousRequestInterceptors","unshiftRequestInterceptors","interceptor","unshift","responseInterceptorChain","pushResponseInterceptors","chain","newConfig","onFulfilled","onRejected","getUri","utils$1","Axios_1","Cancel","Cancel_1","CancelToken","resolvePromise","promiseExecutor","CancelToken_1","spread","createInstance","defaultConfig","axios","axios$2","all","promises","require$$8","require$$9","axiosModule","default","showGlobalLoader","showGlobalErrorHandling","CodesService","getCodes","codeType","routingSlipStatusList","useCodes","getRoutingSlipStatusList","async","codes","useStatusList","props","toRefs","currentStatus","modalValue","emit","selectedStatusObject","statusList","onMounted","statusLabel","RoutingSlip","getRoutingSlip","routingNumber","createRoutingSlip","routingSlipRequest","post","adjustRoutingSlip","payments","routingSlipNumber","CORRECTION","patch","UPDATE_STATUS","updateRoutingSlipStatus","updateRoutingSlipRefundStatus","refund_status","updateRoutingSlipComments","slipNumber","updateRoutingSlipRefund","details","getSearchRoutingSlip","searchParams","saveLinkRoutingSlip","LinkRoutingSlip","getLinkedRoutingSlips","getDailyReport","selectedDate","getSearchFilingType","getFeeByCorpTypeAndFilingType","getFeeRequestParams","corpTypeCode","filingTypeCode","saveManualTransactions","transactions","cancelRoutingSlipInvoice","invoiceId","defaultParams","page","headerSearchTitleConstant","searchRoutingSlipResult","searchRoutingSlipParams","routingSlip","linkedRoutingSlips","routingSlipDetails","accountInfo","chequePayment","cashPayment","isPaymentMethodCheque","isAmountPaidInUsd","autoCompleteRoutingSlips","useRoutingSlip","invoiceCount","invoices","searchParamsExist","isRoutingSlipAChild","parentNumber","isRoutingSlipLinked","children","isRoutingSlipVoid","getRoutingSlipRequestPayload","RoutingSlipService","searchRoutingSlip","appendToResults","dateFilter","startDate","endDate","items","updateRoutingSlipChequeNumber","chequeNumToChange","payment","paymentIndex","chequeReceiptNumber","chequeNum","updateRoutingSlipAmount","amountToChange","isRoutingSlipPaidInUsd","paidUsdAmount","amount","paidAmount","paymentAccount","checkRoutingNumber","VALID","EXISTS","FAS_INVALID_ROUTING_SLIP_DIGITS","INVALID_DIGITS","statusDetails","resetRoutingSlipDetails","resetSearchParams","parentRoutingSlipNumber","LinkPrams","childRoutingSlipNumber","getDailyReportByDate","formatedDate","getAutoCompleteRoutingSlips","transation","referenceNumber","filingType","futureEffective","quantity","businessInfo","corpType","businessIdentifier","transactionParams","filingInfo","filingTypes","infiniteScrollCallback","comment","businessId","useSearch","isLibraryMode","fasUrl","reactive","showExpandedFolio","showExpandedCheque","searchParamsChanged","reachedEnd","headerSearch","displayedHeaderSearch","displayed","updateSearchFilter","updates","receiptNumber","refundStatus","accountName","initiator","searchNow","debouncedSearch","getNext","canShowColumn","columnName","find","header","applyDateFilter","dateRangeObj","getStatusLabel","clearFilter","formatFolioResult","invoice","toggleFolio","toggleCheque","navigateTo","$router","$route","getRefundStatusText","statusCode","PROCESSING","getStatusFromRefundStatus","_typeof","_defineProperty","enumerable","configurable","writable","_toConsumableArray","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","iter","reflectionIsSupported","Reflect","defineMetadata","getOwnMetadataKeys","copyReflectionMetadata","forwardMetadata","propertyKey","metaKey","metadata","getOwnMetadata","fakeArray","hasProto","createDecorator","Ctor","__decorators__","isPrimitive","collectDataFromConstructor","vm","Component","originalInit","_init","_this","$options","plainData","NODE_ENV","$internalHooks","componentFactory","_componentTag","methods","mixins","decorators","superProto","Super","Extended","forwardStaticMembers","reservedPropertyNames","shouldIgnore","callee","caller","Original","extendedDescriptor","superDescriptor","warn$1","registerHooks","__spreadArrays","reflectMetadataIsSupported","getMetadata","applyMetadata","Prop","componentOptions","DATEFILTER_CODES","useDateRange","dateRangeSelected","oldSelectedRange","dateRangeSelectedDisplay","dateFilterRanges","TODAY","YESTERDAY","LASTWEEK","LASTMONTH","CUSTOMRANGE","dateFilterSelectedIndex","dateFilterSelected","showDateFilter","pickerDate","isApplyFilterBtnValid","showDateRangeSelected","dateText","formatDatePickerDate","dateObj","dateFilterChange","today","yesterday","weekStart","weekEnd","monthStart","monthEnd","dateClick","cancelDateFilter","useSearchColumnFilterComponent","selectedHeaderSearchList","DateRangeFilter","__decorateClass$1","DateRangeFilter$1","setup","render","_vm","$createElement","_self","attrs","transition","scopedSlots","_u","_ref","on","readonly","filled","$$v","expression","$attrs","slot","_v","staticClass","dense","change","filterRange","domProps","textContent","_s","large","disabled","outlined","$event","innerHTML","width","range","$listeners","staticRenderFns","SearchColumnFilterComponent","SearchColumnFilterComponent$1","nav","$set","__vue2_script$2","defineComponent","required","column","__vue2_script","observerElement","observer","IntersectionObserver","entry","isIntersecting","observe","onBeforeUnmount","disconnect","useDashboard","addRoutingSlip","can","inserted","el","binding","canAccess","componentUpdated","behaviour","modifiers","disable","isCard","card","requestedAction","customeEl","commentNode","classList","pointerEvents","vnode","createComment","elm","isComment","tag","directives","componentInstance","$el","parentNode","replaceChild","Boolean","colors","commonUtil","components","statusListComponent","TableObserver","_objectDestructuringEmpty","class","sm","cols","rawName","hide","dark","small","height","loading","$t","proxy","autocomplete","placeholder","applied","_ref2","paymentMethod","createdName","routingSlipDate","CHEQUE_UNDELIVERABLE","folio","CHEQUE","colspan","intersect","numberFormatKeys","dateTimeFormatKeys","isBoolean","OBJECT_STRING","isNull","parseArgs","looseClone","delete","arrayFrom","hasOwn","arguments$1","looseEqual","isObjectA","isObjectB","isArrayA","isArrayB","every","keysA","keysB","escapeHtml","rawText","escapeParams","_i18n","i18n","$i18n","_t","_getMessages","$tc","choice","_tc","$te","_te","$d","$n","defineMixin","bridge","mounted","$root","__INTLIFY_META__","beforeCreate","__i18nBridge","__i18n","VueI18n","localeMessages","messages","mergeLocaleMessage","_i18nWatcher","watchI18nData","rootI18n","formatter","fallbackLocale","formatFallbackMessages","silentTranslationWarn","silentFallbackWarn","pluralizationRules","preserveDirectiveContent","localeMessages$1","sharedMessages","sync","_localeWatcher","watchLocale","onComponentInstanceCreated","parent","beforeMount","subscribeDataChanging","_subscribing","beforeDestroy","$nextTick","unsubscribeDataChanging","destroyVM","interpolationComponent","functional","places","slots","onlyHasDefaultPlace","useLegacyPlaces","createParamsFromPlaces","everyPlace","child","vnodeHasPlaceAttribute","assignChildPlace","assignChildIndex","place","numberComponent","Number","_ntp","part","assert","oldVNode","localeEqual","oldValue","_localeMessage","getLocaleMessage","unbind","preserve","_vt","ref$1","ref$2","tc","makeParams","install","_Vue","installed","mixin","directive","component","optionMergeStrategies","parentVal","childVal","BaseFormatter","_caches","interpolate","compile","RE_TOKEN_LIST_VALUE","RE_TOKEN_NAMED_VALUE","position","char","isClosed","compiled","mode","APPEND","PUSH","INC_SUB_PATH_DEPTH","PUSH_SUB_PATH","BEFORE_PATH","IN_PATH","BEFORE_IDENT","IN_IDENT","IN_SUB_PATH","IN_SINGLE_QUOTE","IN_DOUBLE_QUOTE","AFTER_PATH","pathStateMachine","ident","eof","else","literalValueRE","isLiteral","stripQuotes","getPathCharType","ch","formatSubPath","trimmed","parse$1","newChar","typeMap","subPathDepth","maybeUnescapeQuote","nextChar","I18nPath","_cache","parsePath","hit","getPathValue","paths","last","htmlTagMatcher","linkKeyMatcher","linkKeyPrefixMatcher","bracketsMatcher","defaultModifiers","upper","toLocaleUpperCase","lower","capitalize","defaultFormatter","this$1","dateTimeFormats","datetimeFormats","numberFormats","_formatter","_modifiers","_missing","missing","_root","_sync","_fallbackRoot","fallbackRoot","_fallbackRootWithEmptyString","fallbackRootWithEmptyString","_formatFallbackMessages","_silentTranslationWarn","_silentFallbackWarn","_dateTimeFormatters","_numberFormatters","_path","_dataListeners","Set","_componentInstanceCreatedListener","componentInstanceCreatedListener","_preserveDirectiveContent","_warnHtmlInMessage","warnHtmlInMessage","_postTranslation","postTranslation","_escapeParameterHtml","escapeParameterHtml","__VUE_I18N_BRIDGE__","getChoiceIndex","choicesLength","thisPrototype","_choice","_choicesLength","_exist","_checkLocaleMessage","_initVM","prototypeAccessors","availableLocales","availabilities","level","silent","__VUE18N__INSTANCE__","$destroy","$watch","listeners","nextTick","$forceUpdate","deep","composer","target$1","newI18n","_getDateTimeFormats","_getNumberFormats","_localeChainCache","fallback","orgLevel","_warnDefault","interpolateMode","missingRet","_isSilentTranslationWarn","parsedArgs","_render","_isFallbackRoot","_isSilentFallbackWarn","_isSilentFallback","_interpolate","visitedLinkStack","pathRet","_link","idx","link","linkKeyPrefixMatches","linkPrefix","formatterName","linkPlaceholder","reverse","translated","_translate","_createMessageContext","_list","_named","list","named","linked","linkedKey","_appendItemToChain","follow","_appendLocaleToChain","_appendBlockToChain","_getLocaleChain","predefined","count","fetchChoice","choices","te","setLocaleMessage","getDateTimeFormat","setDateTimeFormat","_clearDateTimeFormat","mergeDateTimeFormat","_localizeDateTime","current","Intl","DateTimeFormat","dateTimeFormat","getNumberFormat","setNumberFormat","_clearNumberFormat","mergeNumberFormat","_getNumberFormatter","NumberFormat","_n","numberFormat","formatToParts","defineProperties","intlDefined","VueI18n$1","i18nInstance","createI18n","initialize","vue","VUE_APP_I18N_LOCALE","VUE_APP_I18N_FALLBACK_LOCALE","loadLocaleMessages","en","enLocals","OurVue","initializeI18n","fasStore","Search","plugin","GlobalVue"],"mappings":";;AAGAA,MAAIC,IAAIC;ACHIC,IAAAA,sBAAAA,IACVA,EAAgB,cAAA,iBAChBA,EAAe,aAAA,kBACfA,EAAoB,kBAAA,WACpBA,EAAsB,oBAAA,uBACtBA,EAAgB,cAAA,iBAChBA,EAAa,WAAA,eACbA,EAAa,WAAA,eACbA,EAAY,UAAA,cACZA,EAAe,aAAA,iBACfA,EAAY,UAAA,cACZA,EAAsB,oBAAA,wBAXZA,IAAAA,sBAAA,CAAA,GAcAC,iBAAAA,IACVA,EAAQ,MAAA,QACRA,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xpD,GAAKA,EAAE6qD,SACzBr2D,EAAQg1D,KAAKsB,mBACXt2D,EAAQg1D,KAAK7wD,OACbqH,EAAE6qD,SAAS7qD,EAAErH,SAIf1Q,QAAQ4D,MAAM,gDAIZ2I,EAAQ+J,MAEV3f,OAAO+7E,SAAWnmE,EAAQ+J,MAG1BtW,QAAQ4D,MAAM,qCAGhB5O,EAAIyxE,UAAU,uBAAwBkM,OACxC,CAEA,MAAMC,OAAS,CACbxM;AAGF,IAAIyM,UAAY;MACM,oBAAXl8E,OACTk8E,UAAYl8E,OAAO3B,IACQ,oBAAXqC,SAChBw7E,UAAYx7E,OAAO66E,KAGjBW,WACFA,UAAU59E,IAAI29E,QAGhBD,OAAOvM,QAAUA","x_google_ignoreList":[2,3,4,5,6,7,8,9,10,11,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,52,53,54,55,70,71]} \ No newline at end of file +{"version":3,"file":"lib.umd.min.js","sources":["../src/shims-vue-composition-api.ts","../src/util/constants.ts","../node_modules/js-sha256/src/sha256.js","../node_modules/keycloak-js/node_modules/base64-js/index.js","../node_modules/keycloak-js/dist/keycloak.js","../node_modules/sbc-common-components/src/util/constants.ts","../node_modules/sbc-common-components/src/util/common-util.ts","../node_modules/sbc-common-components/src/util/config-helper.ts","../node_modules/vuex-module-decorators/dist/esm/index.js","../node_modules/sbc-common-components/src/store/modules/auth.ts","../node_modules/sbc-common-components/src/services/keycloak.services.ts","../node_modules/moment/dist/moment.js","../src/util/common-util.ts","../src/util/config-helper.ts","../src/util/debounce.ts","../src/composables/useIndicators.ts","../src/composables/common/useLoader.ts","../node_modules/axios/lib/helpers/bind.js","../node_modules/axios/lib/utils.js","../node_modules/axios/lib/helpers/buildURL.js","../node_modules/axios/lib/core/InterceptorManager.js","../node_modules/axios/lib/helpers/normalizeHeaderName.js","../node_modules/axios/lib/core/enhanceError.js","../node_modules/axios/lib/core/createError.js","../node_modules/axios/lib/core/settle.js","../node_modules/axios/lib/helpers/cookies.js","../node_modules/axios/lib/helpers/isAbsoluteURL.js","../node_modules/axios/lib/helpers/combineURLs.js","../node_modules/axios/lib/core/buildFullPath.js","../node_modules/axios/lib/helpers/parseHeaders.js","../node_modules/axios/lib/helpers/isURLSameOrigin.js","../node_modules/axios/lib/adapters/xhr.js","../node_modules/axios/lib/defaults.js","../node_modules/axios/lib/core/transformData.js","../node_modules/axios/lib/cancel/isCancel.js","../node_modules/axios/lib/core/dispatchRequest.js","../node_modules/axios/lib/core/mergeConfig.js","../node_modules/axios/lib/helpers/validator.js","../node_modules/axios/lib/core/Axios.js","../node_modules/axios/lib/cancel/Cancel.js","../node_modules/axios/lib/cancel/CancelToken.js","../node_modules/axios/lib/helpers/spread.js","../node_modules/axios/lib/helpers/isAxiosError.js","../node_modules/axios/lib/axios.js","../node_modules/axios/index.js","../src/util/http-util.ts","../src/services/codes.service.ts","../src/composables/useCodes.ts","../src/composables/common/useStatusList.ts","../src/services/routingSlip.services.ts","../src/composables/useRoutingSlip.ts","../src/composables/Dashboard/useSearch.ts","../node_modules/vue-class-component/dist/vue-class-component.esm.js","../node_modules/vue-property-decorator/lib/decorators/Emit.js","../node_modules/vue-property-decorator/lib/helpers/metadata.js","../node_modules/vue-property-decorator/lib/decorators/Prop.js","../src/composables/common/useDateRange.ts","../src/composables/common/useSearchColumnFilterComponent.ts","../src/components/common/DateRangeFilter.vue","../src/components/common/DateRangeFilter.vue?vue&type=template&lang.js","../src/components/common/SearchColumnFilterComponent.vue","../src/components/common/SearchColumnFilterComponent.vue?vue&type=template&lang.js","../src/components/common/StatusList.vue","../src/components/common/StatusList.vue?vue&type=template&lang.js","../src/components/common/TableObserver.vue?vue&type=template&lang.js","../src/components/common/TableObserver.vue","../src/composables/Dashboard/useDashboard.ts","../src/directives/can.ts","../src/components/Dashboard/Search.vue","../src/components/Dashboard/Search.vue?vue&type=template&lang.js","../node_modules/vue-i18n/dist/vue-i18n.esm.js","../node_modules/vue-i18n-composable/dist/index.mjs","../src/plugins/i18n.ts","../src/lib-setup.js"],"sourcesContent":["// This needs to be done, otherwise these App.vue gets hoisted above the statements below:\nimport VueCompositionAPI from '@vue/composition-api'\nimport Vue from 'vue'\nVue.use(VueCompositionAPI)\n","export enum SessionStorageKeys {\n KeyCloakToken = 'KEYCLOAK_TOKEN',\n ApiConfigKey = 'AUTH_API_CONFIG',\n LaunchDarklyFlags = 'LD_FLAGS',\n ExtraProvincialUser = 'EXTRAPROVINCIAL_USER',\n SessionSynced = 'SESSION_SYNCED',\n AuthApiUrl = 'AUTH_API_URL',\n AuthWebUrl = 'AUTH_WEB_URL',\n PayApiUrl = 'PAY_API_URL',\n StatusApiUrl = 'STATUS_API_URL',\n FasWebUrl = 'FAS_WEB_URL',\n SiteminderLogoutUrl = 'SITEMINDER_LOGOUT_URL'\n}\n\nexport enum DateFilterCodes {\n TODAY = 'TODAY',\n YESTERDAY = 'YESTERDAY',\n LASTWEEK = 'LASTWEEK',\n LASTMONTH = 'LASTMONTH',\n CUSTOMRANGE = 'CUSTOMRANGE',\n}\n\nexport enum PaymentMethods {\n CASH = 'CASH',\n CHEQUE = 'CHEQUE',\n}\n\nexport enum SlipStatus {\n ACTIVE = 'ACTIVE',\n COMPLETE = 'COMPLETE',\n BOUNCED = 'BOUNCED',\n NSF = 'NSF',\n REFUND = 'REFUND',\n LAST = 'LAST',\n HOLD = 'HOLD',\n LINKED = 'LINKED',\n REFUNDREQUEST = 'REFUND_REQUESTED',\n REFUNDAUTHORIZED = 'REFUND_AUTHORIZED',\n REFUNDPROCESSED = 'REFUND_PROCESSED',\n REFUNDUPLOADED = 'REFUND_UPLOADED',\n REFUNDREJECTED = 'REFUND_REJECTED',\n CANCEL_REFUND_REQUEST = 'CANCEL_REFUND_REQUEST',\n CANCELWRITEOFFREQUEST='CANCEL_WRITE_OFF_REQUEST',\n WRITEOFFAUTHORIZED='WRITE_OFF_AUTHORIZED',\n WRITEOFFREQUESTED='WRITE_OFF_REQUESTED',\n WRITEOFFCOMPLETED='WRITE_OFF_COMPLETED',\n VOID='VOID',\n CORRECTION='CORRECTION'\n}\n\nexport enum SlipStatusLabel {\n ACTIVE = 'Place routing slip to active',\n NSF = 'Place routing slip to NSF',\n HOLD = 'Place routing slip on hold',\n LINKED = 'LINKED',\n REFUND_REQUESTED = 'Refund request',\n WRITE_OFF_REQUESTED = 'Write off request',\n CANCEL_REFUND_REQUEST = 'Cancel refund request',\n REFUND_AUTHORIZED='Review refund request',\n WRITE_OFF_AUTHORIZED='Authorize Write off request',\n CANCEL_WRITE_OFF_REQUEST='Cancel Write off request',\n VOID='Void Routing Slip',\n // CORRECTION='Correct Routing Slip' - Future\n}\n\nexport enum Role {\n FAS_USER = 'fas_user',\n FAS_EDIT = 'fas_edit',\n FAS_REPORTS = 'fas_reports',\n FAS_SEARCH = 'fas_search',\n FAS_VIEW = 'fas_view',\n FAS_CREATE = 'fas_create',\n FAS_LNK = 'fas_link',\n FAS_TRANSACTION = 'fas_transaction',\n FAS_REFUND_APPROVER = 'fas_refund_approver',\n FAS_REFUND = 'fas_refund',\n FAS_VOID = 'fas_void',\n FAS_CORRECTION = 'fas_correction'\n}\n\nexport enum InvoiceStatus {\n COMPLETED = 'COMPLETED',\n REFUNDED = 'REFUNDED',\n DELETE_ACCEPTED = 'DELETE_ACCEPTED',\n REFUNDREQUEST = 'REFUND_REQUESTED',\n}\n\nexport enum ApiErrors {\n FAS_INVALID_ROUTING_SLIP_DIGITS = 'FAS_INVALID_ROUTING_SLIP_DIGITS'\n}\n\nexport enum CreateRoutingSlipStatus {\n VALID = 'VALID',\n EXISTS = 'EXISTS',\n INVALID_DIGITS = 'INVALID_DIGITS',\n}\n\nexport enum PatchActions {\n UPDATE_STATUS = 'updateStatus'\n}\n\nexport const AXIOS_ERROR_ALERT_TIME_OUT = 5000\n\nexport const headerSearchTitle =\n[\n {\n text: 'Routing Slip Number',\n align: 'start',\n value: 'routingSlipNumber',\n display: true,\n className: 'routing-slip'\n },\n {\n text: 'Receipt Number',\n align: 'start',\n sortable: false,\n value: 'receiptNumber',\n display: true,\n className: 'receiptNumber'\n },\n {\n text: 'Entity Number',\n align: 'start',\n value: 'accountName',\n sortable: false,\n display: false,\n className: 'accountName'\n },\n {\n text: 'Created By',\n align: 'start',\n value: 'createdName',\n sortable: false,\n display: false,\n className: 'createdName'\n },\n {\n text: 'Date',\n align: 'start',\n sortable: false,\n value: 'date',\n display: true,\n className: 'date'\n },\n {\n text: 'Status',\n align: 'start',\n sortable: false,\n value: 'status',\n display: true,\n className: 'status'\n },\n {\n text: 'Refund Status',\n align: 'start',\n sortable: false,\n value: 'refundStatus',\n display: true,\n className: 'refundStatus'\n },\n {\n text: 'Reference Number',\n align: 'start',\n value: 'businessIdentifier',\n sortable: false,\n display: true,\n className: 'businessIdentifier'\n },\n {\n text: 'Cheque Number',\n align: 'start',\n value: 'chequeReceiptNumber',\n sortable: false,\n display: false,\n className: 'cheque-receipt-number'\n },\n {\n text: 'Balance',\n align: 'right',\n value: 'remainingAmount',\n sortable: false,\n display: true,\n className: 'remainingAmount'\n },\n {\n text: 'Actions',\n align: 'start',\n value: '',\n sortable: false,\n display: true,\n hideInSearchColumnFilter: true,\n className: 'action'\n }\n]\n\nexport const RoutingSlipRefundStatus = [\n {\n code: 'PROCESSING',\n text: 'PROCESSING',\n display: false\n },\n {\n code: 'PROCESSED',\n text: 'PROCESSED',\n display: true\n },\n {\n code: 'CHEQUE_UNDELIVERABLE',\n text: 'CHEQUE UNDELIVERABLE',\n display: true\n }\n]\n\nexport const RoutingSlipRefundCodes = RoutingSlipRefundStatus.reduce((acc, status) => {\n acc[status.code] = status.code\n return acc\n}, {} as { [key: string]: string })\n","/**\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\n *\n * @version 0.9.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2017\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var ERROR = 'input is invalid type';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA256_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA256_NO_COMMON_JS && typeof module === 'object' && module.exports;\n var AMD = typeof define === 'function' && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA256_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var EXTRA = [-2147483648, 8388608, 32768, 128];\n var SHIFT = [24, 16, 8, 0];\n var K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n ];\n var OUTPUT_TYPES = ['hex', 'array', 'digest', 'arrayBuffer'];\n\n var blocks = [];\n\n if (root.JS_SHA256_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n }\n\n if (ARRAY_BUFFER && (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n\n var createOutputMethod = function (outputType, is224) {\n return function (message) {\n return new Sha256(is224, true).update(message)[outputType]();\n };\n };\n\n var createMethod = function (is224) {\n var method = createOutputMethod('hex', is224);\n if (NODE_JS) {\n method = nodeWrap(method, is224);\n }\n method.create = function () {\n return new Sha256(is224);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createOutputMethod(type, is224);\n }\n return method;\n };\n\n var nodeWrap = function (method, is224) {\n var crypto = eval(\"require('crypto')\");\n var Buffer = eval(\"require('buffer').Buffer\");\n var algorithm = is224 ? 'sha224' : 'sha256';\n var nodeMethod = function (message) {\n if (typeof message === 'string') {\n return crypto.createHash(algorithm).update(message, 'utf8').digest('hex');\n } else {\n if (message === null || message === undefined) {\n throw new Error(ERROR);\n } else if (message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n }\n }\n if (Array.isArray(message) || ArrayBuffer.isView(message) ||\n message.constructor === Buffer) {\n return crypto.createHash(algorithm).update(new Buffer(message)).digest('hex');\n } else {\n return method(message);\n }\n };\n return nodeMethod;\n };\n\n var createHmacOutputMethod = function (outputType, is224) {\n return function (key, message) {\n return new HmacSha256(key, is224, true).update(message)[outputType]();\n };\n };\n\n var createHmacMethod = function (is224) {\n var method = createHmacOutputMethod('hex', is224);\n method.create = function (key) {\n return new HmacSha256(key, is224);\n };\n method.update = function (key, message) {\n return method.create(key).update(message);\n };\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createHmacOutputMethod(type, is224);\n }\n return method;\n };\n\n function Sha256(is224, sharedMemory) {\n if (sharedMemory) {\n blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n this.blocks = blocks;\n } else {\n this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n }\n\n if (is224) {\n this.h0 = 0xc1059ed8;\n this.h1 = 0x367cd507;\n this.h2 = 0x3070dd17;\n this.h3 = 0xf70e5939;\n this.h4 = 0xffc00b31;\n this.h5 = 0x68581511;\n this.h6 = 0x64f98fa7;\n this.h7 = 0xbefa4fa4;\n } else { // 256\n this.h0 = 0x6a09e667;\n this.h1 = 0xbb67ae85;\n this.h2 = 0x3c6ef372;\n this.h3 = 0xa54ff53a;\n this.h4 = 0x510e527f;\n this.h5 = 0x9b05688c;\n this.h6 = 0x1f83d9ab;\n this.h7 = 0x5be0cd19;\n }\n\n this.block = this.start = this.bytes = this.hBytes = 0;\n this.finalized = this.hashed = false;\n this.first = true;\n this.is224 = is224;\n }\n\n Sha256.prototype.update = function (message) {\n if (this.finalized) {\n return;\n }\n var notString, type = typeof message;\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n notString = true;\n }\n var code, index = 0, i, length = message.length, blocks = this.blocks;\n\n while (index < length) {\n if (this.hashed) {\n this.hashed = false;\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n\n if (notString) {\n for (i = this.start; index < length && i < 64; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < 64; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n\n this.lastByteIndex = i;\n this.bytes += i - this.start;\n if (i >= 64) {\n this.block = blocks[16];\n this.start = i - 64;\n this.hash();\n this.hashed = true;\n } else {\n this.start = i;\n }\n }\n if (this.bytes > 4294967295) {\n this.hBytes += this.bytes / 4294967296 << 0;\n this.bytes = this.bytes % 4294967296;\n }\n return this;\n };\n\n Sha256.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex;\n blocks[16] = this.block;\n blocks[i >> 2] |= EXTRA[i & 3];\n this.block = blocks[16];\n if (i >= 56) {\n if (!this.hashed) {\n this.hash();\n }\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n blocks[14] = this.hBytes << 3 | this.bytes >>> 29;\n blocks[15] = this.bytes << 3;\n this.hash();\n };\n\n Sha256.prototype.hash = function () {\n var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6,\n h = this.h7, blocks = this.blocks, j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc;\n\n for (j = 16; j < 64; ++j) {\n // rightrotate\n t1 = blocks[j - 15];\n s0 = ((t1 >>> 7) | (t1 << 25)) ^ ((t1 >>> 18) | (t1 << 14)) ^ (t1 >>> 3);\n t1 = blocks[j - 2];\n s1 = ((t1 >>> 17) | (t1 << 15)) ^ ((t1 >>> 19) | (t1 << 13)) ^ (t1 >>> 10);\n blocks[j] = blocks[j - 16] + s0 + blocks[j - 7] + s1 << 0;\n }\n\n bc = b & c;\n for (j = 0; j < 64; j += 4) {\n if (this.first) {\n if (this.is224) {\n ab = 300032;\n t1 = blocks[0] - 1413257819;\n h = t1 - 150054599 << 0;\n d = t1 + 24177077 << 0;\n } else {\n ab = 704751109;\n t1 = blocks[0] - 210244248;\n h = t1 - 1521486534 << 0;\n d = t1 + 143694565 << 0;\n }\n this.first = false;\n } else {\n s0 = ((a >>> 2) | (a << 30)) ^ ((a >>> 13) | (a << 19)) ^ ((a >>> 22) | (a << 10));\n s1 = ((e >>> 6) | (e << 26)) ^ ((e >>> 11) | (e << 21)) ^ ((e >>> 25) | (e << 7));\n ab = a & b;\n maj = ab ^ (a & c) ^ bc;\n ch = (e & f) ^ (~e & g);\n t1 = h + s1 + ch + K[j] + blocks[j];\n t2 = s0 + maj;\n h = d + t1 << 0;\n d = t1 + t2 << 0;\n }\n s0 = ((d >>> 2) | (d << 30)) ^ ((d >>> 13) | (d << 19)) ^ ((d >>> 22) | (d << 10));\n s1 = ((h >>> 6) | (h << 26)) ^ ((h >>> 11) | (h << 21)) ^ ((h >>> 25) | (h << 7));\n da = d & a;\n maj = da ^ (d & b) ^ ab;\n ch = (h & e) ^ (~h & f);\n t1 = g + s1 + ch + K[j + 1] + blocks[j + 1];\n t2 = s0 + maj;\n g = c + t1 << 0;\n c = t1 + t2 << 0;\n s0 = ((c >>> 2) | (c << 30)) ^ ((c >>> 13) | (c << 19)) ^ ((c >>> 22) | (c << 10));\n s1 = ((g >>> 6) | (g << 26)) ^ ((g >>> 11) | (g << 21)) ^ ((g >>> 25) | (g << 7));\n cd = c & d;\n maj = cd ^ (c & a) ^ da;\n ch = (g & h) ^ (~g & e);\n t1 = f + s1 + ch + K[j + 2] + blocks[j + 2];\n t2 = s0 + maj;\n f = b + t1 << 0;\n b = t1 + t2 << 0;\n s0 = ((b >>> 2) | (b << 30)) ^ ((b >>> 13) | (b << 19)) ^ ((b >>> 22) | (b << 10));\n s1 = ((f >>> 6) | (f << 26)) ^ ((f >>> 11) | (f << 21)) ^ ((f >>> 25) | (f << 7));\n bc = b & c;\n maj = bc ^ (b & d) ^ cd;\n ch = (f & g) ^ (~f & h);\n t1 = e + s1 + ch + K[j + 3] + blocks[j + 3];\n t2 = s0 + maj;\n e = a + t1 << 0;\n a = t1 + t2 << 0;\n }\n\n this.h0 = this.h0 + a << 0;\n this.h1 = this.h1 + b << 0;\n this.h2 = this.h2 + c << 0;\n this.h3 = this.h3 + d << 0;\n this.h4 = this.h4 + e << 0;\n this.h5 = this.h5 + f << 0;\n this.h6 = this.h6 + g << 0;\n this.h7 = this.h7 + h << 0;\n };\n\n Sha256.prototype.hex = function () {\n this.finalize();\n\n var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,\n h6 = this.h6, h7 = this.h7;\n\n var hex = HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] +\n HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] +\n HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] +\n HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] +\n HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] +\n HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] +\n HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] +\n HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] +\n HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] +\n HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] +\n HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] +\n HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] +\n HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F] +\n HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] +\n HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] +\n HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] +\n HEX_CHARS[(h4 >> 28) & 0x0F] + HEX_CHARS[(h4 >> 24) & 0x0F] +\n HEX_CHARS[(h4 >> 20) & 0x0F] + HEX_CHARS[(h4 >> 16) & 0x0F] +\n HEX_CHARS[(h4 >> 12) & 0x0F] + HEX_CHARS[(h4 >> 8) & 0x0F] +\n HEX_CHARS[(h4 >> 4) & 0x0F] + HEX_CHARS[h4 & 0x0F] +\n HEX_CHARS[(h5 >> 28) & 0x0F] + HEX_CHARS[(h5 >> 24) & 0x0F] +\n HEX_CHARS[(h5 >> 20) & 0x0F] + HEX_CHARS[(h5 >> 16) & 0x0F] +\n HEX_CHARS[(h5 >> 12) & 0x0F] + HEX_CHARS[(h5 >> 8) & 0x0F] +\n HEX_CHARS[(h5 >> 4) & 0x0F] + HEX_CHARS[h5 & 0x0F] +\n HEX_CHARS[(h6 >> 28) & 0x0F] + HEX_CHARS[(h6 >> 24) & 0x0F] +\n HEX_CHARS[(h6 >> 20) & 0x0F] + HEX_CHARS[(h6 >> 16) & 0x0F] +\n HEX_CHARS[(h6 >> 12) & 0x0F] + HEX_CHARS[(h6 >> 8) & 0x0F] +\n HEX_CHARS[(h6 >> 4) & 0x0F] + HEX_CHARS[h6 & 0x0F];\n if (!this.is224) {\n hex += HEX_CHARS[(h7 >> 28) & 0x0F] + HEX_CHARS[(h7 >> 24) & 0x0F] +\n HEX_CHARS[(h7 >> 20) & 0x0F] + HEX_CHARS[(h7 >> 16) & 0x0F] +\n HEX_CHARS[(h7 >> 12) & 0x0F] + HEX_CHARS[(h7 >> 8) & 0x0F] +\n HEX_CHARS[(h7 >> 4) & 0x0F] + HEX_CHARS[h7 & 0x0F];\n }\n return hex;\n };\n\n Sha256.prototype.toString = Sha256.prototype.hex;\n\n Sha256.prototype.digest = function () {\n this.finalize();\n\n var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,\n h6 = this.h6, h7 = this.h7;\n\n var arr = [\n (h0 >> 24) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 8) & 0xFF, h0 & 0xFF,\n (h1 >> 24) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 8) & 0xFF, h1 & 0xFF,\n (h2 >> 24) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 8) & 0xFF, h2 & 0xFF,\n (h3 >> 24) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 8) & 0xFF, h3 & 0xFF,\n (h4 >> 24) & 0xFF, (h4 >> 16) & 0xFF, (h4 >> 8) & 0xFF, h4 & 0xFF,\n (h5 >> 24) & 0xFF, (h5 >> 16) & 0xFF, (h5 >> 8) & 0xFF, h5 & 0xFF,\n (h6 >> 24) & 0xFF, (h6 >> 16) & 0xFF, (h6 >> 8) & 0xFF, h6 & 0xFF\n ];\n if (!this.is224) {\n arr.push((h7 >> 24) & 0xFF, (h7 >> 16) & 0xFF, (h7 >> 8) & 0xFF, h7 & 0xFF);\n }\n return arr;\n };\n\n Sha256.prototype.array = Sha256.prototype.digest;\n\n Sha256.prototype.arrayBuffer = function () {\n this.finalize();\n\n var buffer = new ArrayBuffer(this.is224 ? 28 : 32);\n var dataView = new DataView(buffer);\n dataView.setUint32(0, this.h0);\n dataView.setUint32(4, this.h1);\n dataView.setUint32(8, this.h2);\n dataView.setUint32(12, this.h3);\n dataView.setUint32(16, this.h4);\n dataView.setUint32(20, this.h5);\n dataView.setUint32(24, this.h6);\n if (!this.is224) {\n dataView.setUint32(28, this.h7);\n }\n return buffer;\n };\n\n function HmacSha256(key, is224, sharedMemory) {\n var i, type = typeof key;\n if (type === 'string') {\n var bytes = [], length = key.length, index = 0, code;\n for (i = 0; i < length; ++i) {\n code = key.charCodeAt(i);\n if (code < 0x80) {\n bytes[index++] = code;\n } else if (code < 0x800) {\n bytes[index++] = (0xc0 | (code >> 6));\n bytes[index++] = (0x80 | (code & 0x3f));\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes[index++] = (0xe0 | (code >> 12));\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\n bytes[index++] = (0x80 | (code & 0x3f));\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));\n bytes[index++] = (0xf0 | (code >> 18));\n bytes[index++] = (0x80 | ((code >> 12) & 0x3f));\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\n bytes[index++] = (0x80 | (code & 0x3f));\n }\n }\n key = bytes;\n } else {\n if (type === 'object') {\n if (key === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && key.constructor === ArrayBuffer) {\n key = new Uint8Array(key);\n } else if (!Array.isArray(key)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(key)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n }\n\n if (key.length > 64) {\n key = (new Sha256(is224, true)).update(key).array();\n }\n\n var oKeyPad = [], iKeyPad = [];\n for (i = 0; i < 64; ++i) {\n var b = key[i] || 0;\n oKeyPad[i] = 0x5c ^ b;\n iKeyPad[i] = 0x36 ^ b;\n }\n\n Sha256.call(this, is224, sharedMemory);\n\n this.update(iKeyPad);\n this.oKeyPad = oKeyPad;\n this.inner = true;\n this.sharedMemory = sharedMemory;\n }\n HmacSha256.prototype = new Sha256();\n\n HmacSha256.prototype.finalize = function () {\n Sha256.prototype.finalize.call(this);\n if (this.inner) {\n this.inner = false;\n var innerHash = this.array();\n Sha256.call(this, this.is224, this.sharedMemory);\n this.update(this.oKeyPad);\n this.update(innerHash);\n Sha256.prototype.finalize.call(this);\n }\n };\n\n var exports = createMethod();\n exports.sha256 = exports;\n exports.sha224 = createMethod(true);\n exports.sha256.hmac = createHmacMethod();\n exports.sha224.hmac = createHmacMethod(true);\n\n if (COMMON_JS) {\n module.exports = exports;\n } else {\n root.sha256 = exports.sha256;\n root.sha224 = exports.sha224;\n if (AMD) {\n define(function () {\n return exports;\n });\n }\n }\n})();\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*\n * Copyright 2016 Red Hat, Inc. and/or its affiliates\n * and other contributors as indicated by the @author tags.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n(function(root, factory) {\n if ( typeof exports === 'object' ) {\n if ( typeof module === 'object' ) {\n module.exports = factory( require(\"js-sha256\"), require(\"base64-js\") ); \n } else {\n exports[\"keycloak\"] = factory( require(\"js-sha256\"), require(\"base64-js\") ); \n }\n } else {\n /**\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\n *\n * @version 0.9.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2017\n * @license MIT\n */\n !function () { \"use strict\"; function t(t, i) { i ? (d[0] = d[16] = d[1] = d[2] = d[3] = d[4] = d[5] = d[6] = d[7] = d[8] = d[9] = d[10] = d[11] = d[12] = d[13] = d[14] = d[15] = 0, this.blocks = d) : this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], t ? (this.h0 = 3238371032, this.h1 = 914150663, this.h2 = 812702999, this.h3 = 4144912697, this.h4 = 4290775857, this.h5 = 1750603025, this.h6 = 1694076839, this.h7 = 3204075428) : (this.h0 = 1779033703, this.h1 = 3144134277, this.h2 = 1013904242, this.h3 = 2773480762, this.h4 = 1359893119, this.h5 = 2600822924, this.h6 = 528734635, this.h7 = 1541459225), this.block = this.start = this.bytes = this.hBytes = 0, this.finalized = this.hashed = !1, this.first = !0, this.is224 = t } function i(i, r, s) { var e, n = typeof i; if (\"string\" === n) { var o, a = [], u = i.length, c = 0; for (e = 0; e < u; ++e)(o = i.charCodeAt(e)) < 128 ? a[c++] = o : o < 2048 ? (a[c++] = 192 | o >> 6, a[c++] = 128 | 63 & o) : o < 55296 || o >= 57344 ? (a[c++] = 224 | o >> 12, a[c++] = 128 | o >> 6 & 63, a[c++] = 128 | 63 & o) : (o = 65536 + ((1023 & o) << 10 | 1023 & i.charCodeAt(++e)), a[c++] = 240 | o >> 18, a[c++] = 128 | o >> 12 & 63, a[c++] = 128 | o >> 6 & 63, a[c++] = 128 | 63 & o); i = a } else { if (\"object\" !== n) throw new Error(h); if (null === i) throw new Error(h); if (f && i.constructor === ArrayBuffer) i = new Uint8Array(i); else if (!(Array.isArray(i) || f && ArrayBuffer.isView(i))) throw new Error(h) } i.length > 64 && (i = new t(r, !0).update(i).array()); var y = [], p = []; for (e = 0; e < 64; ++e) { var l = i[e] || 0; y[e] = 92 ^ l, p[e] = 54 ^ l } t.call(this, r, s), this.update(p), this.oKeyPad = y, this.inner = !0, this.sharedMemory = s } var h = \"input is invalid type\", r = \"object\" == typeof window, s = r ? window : {}; s.JS_SHA256_NO_WINDOW && (r = !1); var e = !r && \"object\" == typeof self, n = !s.JS_SHA256_NO_NODE_JS && \"object\" == typeof process && process.versions && process.versions.node; n ? s = global : e && (s = self); var o = !s.JS_SHA256_NO_COMMON_JS && \"object\" == typeof module && module.exports, a = \"function\" == typeof define && define.amd, f = !s.JS_SHA256_NO_ARRAY_BUFFER && \"undefined\" != typeof ArrayBuffer, u = \"0123456789abcdef\".split(\"\"), c = [-2147483648, 8388608, 32768, 128], y = [24, 16, 8, 0], p = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298], l = [\"hex\", \"array\", \"digest\", \"arrayBuffer\"], d = []; !s.JS_SHA256_NO_NODE_JS && Array.isArray || (Array.isArray = function (t) { return \"[object Array]\" === Object.prototype.toString.call(t) }), !f || !s.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW && ArrayBuffer.isView || (ArrayBuffer.isView = function (t) { return \"object\" == typeof t && t.buffer && t.buffer.constructor === ArrayBuffer }); var A = function (i, h) { return function (r) { return new t(h, !0).update(r)[i]() } }, w = function (i) { var h = A(\"hex\", i); n && (h = b(h, i)), h.create = function () { return new t(i) }, h.update = function (t) { return h.create().update(t) }; for (var r = 0; r < l.length; ++r) { var s = l[r]; h[s] = A(s, i) } return h }, b = function (t, i) { var r = eval(\"require('crypto')\"), s = eval(\"require('buffer').Buffer\"), e = i ? \"sha224\" : \"sha256\", n = function (i) { if (\"string\" == typeof i) return r.createHash(e).update(i, \"utf8\").digest(\"hex\"); if (null === i || void 0 === i) throw new Error(h); return i.constructor === ArrayBuffer && (i = new Uint8Array(i)), Array.isArray(i) || ArrayBuffer.isView(i) || i.constructor === s ? r.createHash(e).update(new s(i)).digest(\"hex\") : t(i) }; return n }, v = function (t, h) { return function (r, s) { return new i(r, h, !0).update(s)[t]() } }, _ = function (t) { var h = v(\"hex\", t); h.create = function (h) { return new i(h, t) }, h.update = function (t, i) { return h.create(t).update(i) }; for (var r = 0; r < l.length; ++r) { var s = l[r]; h[s] = v(s, t) } return h }; t.prototype.update = function (t) { if (!this.finalized) { var i, r = typeof t; if (\"string\" !== r) { if (\"object\" !== r) throw new Error(h); if (null === t) throw new Error(h); if (f && t.constructor === ArrayBuffer) t = new Uint8Array(t); else if (!(Array.isArray(t) || f && ArrayBuffer.isView(t))) throw new Error(h); i = !0 } for (var s, e, n = 0, o = t.length, a = this.blocks; n < o;) { if (this.hashed && (this.hashed = !1, a[0] = this.block, a[16] = a[1] = a[2] = a[3] = a[4] = a[5] = a[6] = a[7] = a[8] = a[9] = a[10] = a[11] = a[12] = a[13] = a[14] = a[15] = 0), i) for (e = this.start; n < o && e < 64; ++n)a[e >> 2] |= t[n] << y[3 & e++]; else for (e = this.start; n < o && e < 64; ++n)(s = t.charCodeAt(n)) < 128 ? a[e >> 2] |= s << y[3 & e++] : s < 2048 ? (a[e >> 2] |= (192 | s >> 6) << y[3 & e++], a[e >> 2] |= (128 | 63 & s) << y[3 & e++]) : s < 55296 || s >= 57344 ? (a[e >> 2] |= (224 | s >> 12) << y[3 & e++], a[e >> 2] |= (128 | s >> 6 & 63) << y[3 & e++], a[e >> 2] |= (128 | 63 & s) << y[3 & e++]) : (s = 65536 + ((1023 & s) << 10 | 1023 & t.charCodeAt(++n)), a[e >> 2] |= (240 | s >> 18) << y[3 & e++], a[e >> 2] |= (128 | s >> 12 & 63) << y[3 & e++], a[e >> 2] |= (128 | s >> 6 & 63) << y[3 & e++], a[e >> 2] |= (128 | 63 & s) << y[3 & e++]); this.lastByteIndex = e, this.bytes += e - this.start, e >= 64 ? (this.block = a[16], this.start = e - 64, this.hash(), this.hashed = !0) : this.start = e } return this.bytes > 4294967295 && (this.hBytes += this.bytes / 4294967296 << 0, this.bytes = this.bytes % 4294967296), this } }, t.prototype.finalize = function () { if (!this.finalized) { this.finalized = !0; var t = this.blocks, i = this.lastByteIndex; t[16] = this.block, t[i >> 2] |= c[3 & i], this.block = t[16], i >= 56 && (this.hashed || this.hash(), t[0] = this.block, t[16] = t[1] = t[2] = t[3] = t[4] = t[5] = t[6] = t[7] = t[8] = t[9] = t[10] = t[11] = t[12] = t[13] = t[14] = t[15] = 0), t[14] = this.hBytes << 3 | this.bytes >>> 29, t[15] = this.bytes << 3, this.hash() } }, t.prototype.hash = function () { var t, i, h, r, s, e, n, o, a, f = this.h0, u = this.h1, c = this.h2, y = this.h3, l = this.h4, d = this.h5, A = this.h6, w = this.h7, b = this.blocks; for (t = 16; t < 64; ++t)i = ((s = b[t - 15]) >>> 7 | s << 25) ^ (s >>> 18 | s << 14) ^ s >>> 3, h = ((s = b[t - 2]) >>> 17 | s << 15) ^ (s >>> 19 | s << 13) ^ s >>> 10, b[t] = b[t - 16] + i + b[t - 7] + h << 0; for (a = u & c, t = 0; t < 64; t += 4)this.first ? (this.is224 ? (e = 300032, w = (s = b[0] - 1413257819) - 150054599 << 0, y = s + 24177077 << 0) : (e = 704751109, w = (s = b[0] - 210244248) - 1521486534 << 0, y = s + 143694565 << 0), this.first = !1) : (i = (f >>> 2 | f << 30) ^ (f >>> 13 | f << 19) ^ (f >>> 22 | f << 10), r = (e = f & u) ^ f & c ^ a, w = y + (s = w + (h = (l >>> 6 | l << 26) ^ (l >>> 11 | l << 21) ^ (l >>> 25 | l << 7)) + (l & d ^ ~l & A) + p[t] + b[t]) << 0, y = s + (i + r) << 0), i = (y >>> 2 | y << 30) ^ (y >>> 13 | y << 19) ^ (y >>> 22 | y << 10), r = (n = y & f) ^ y & u ^ e, A = c + (s = A + (h = (w >>> 6 | w << 26) ^ (w >>> 11 | w << 21) ^ (w >>> 25 | w << 7)) + (w & l ^ ~w & d) + p[t + 1] + b[t + 1]) << 0, i = ((c = s + (i + r) << 0) >>> 2 | c << 30) ^ (c >>> 13 | c << 19) ^ (c >>> 22 | c << 10), r = (o = c & y) ^ c & f ^ n, d = u + (s = d + (h = (A >>> 6 | A << 26) ^ (A >>> 11 | A << 21) ^ (A >>> 25 | A << 7)) + (A & w ^ ~A & l) + p[t + 2] + b[t + 2]) << 0, i = ((u = s + (i + r) << 0) >>> 2 | u << 30) ^ (u >>> 13 | u << 19) ^ (u >>> 22 | u << 10), r = (a = u & c) ^ u & y ^ o, l = f + (s = l + (h = (d >>> 6 | d << 26) ^ (d >>> 11 | d << 21) ^ (d >>> 25 | d << 7)) + (d & A ^ ~d & w) + p[t + 3] + b[t + 3]) << 0, f = s + (i + r) << 0; this.h0 = this.h0 + f << 0, this.h1 = this.h1 + u << 0, this.h2 = this.h2 + c << 0, this.h3 = this.h3 + y << 0, this.h4 = this.h4 + l << 0, this.h5 = this.h5 + d << 0, this.h6 = this.h6 + A << 0, this.h7 = this.h7 + w << 0 }, t.prototype.hex = function () { this.finalize(); var t = this.h0, i = this.h1, h = this.h2, r = this.h3, s = this.h4, e = this.h5, n = this.h6, o = this.h7, a = u[t >> 28 & 15] + u[t >> 24 & 15] + u[t >> 20 & 15] + u[t >> 16 & 15] + u[t >> 12 & 15] + u[t >> 8 & 15] + u[t >> 4 & 15] + u[15 & t] + u[i >> 28 & 15] + u[i >> 24 & 15] + u[i >> 20 & 15] + u[i >> 16 & 15] + u[i >> 12 & 15] + u[i >> 8 & 15] + u[i >> 4 & 15] + u[15 & i] + u[h >> 28 & 15] + u[h >> 24 & 15] + u[h >> 20 & 15] + u[h >> 16 & 15] + u[h >> 12 & 15] + u[h >> 8 & 15] + u[h >> 4 & 15] + u[15 & h] + u[r >> 28 & 15] + u[r >> 24 & 15] + u[r >> 20 & 15] + u[r >> 16 & 15] + u[r >> 12 & 15] + u[r >> 8 & 15] + u[r >> 4 & 15] + u[15 & r] + u[s >> 28 & 15] + u[s >> 24 & 15] + u[s >> 20 & 15] + u[s >> 16 & 15] + u[s >> 12 & 15] + u[s >> 8 & 15] + u[s >> 4 & 15] + u[15 & s] + u[e >> 28 & 15] + u[e >> 24 & 15] + u[e >> 20 & 15] + u[e >> 16 & 15] + u[e >> 12 & 15] + u[e >> 8 & 15] + u[e >> 4 & 15] + u[15 & e] + u[n >> 28 & 15] + u[n >> 24 & 15] + u[n >> 20 & 15] + u[n >> 16 & 15] + u[n >> 12 & 15] + u[n >> 8 & 15] + u[n >> 4 & 15] + u[15 & n]; return this.is224 || (a += u[o >> 28 & 15] + u[o >> 24 & 15] + u[o >> 20 & 15] + u[o >> 16 & 15] + u[o >> 12 & 15] + u[o >> 8 & 15] + u[o >> 4 & 15] + u[15 & o]), a }, t.prototype.toString = t.prototype.hex, t.prototype.digest = function () { this.finalize(); var t = this.h0, i = this.h1, h = this.h2, r = this.h3, s = this.h4, e = this.h5, n = this.h6, o = this.h7, a = [t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, 255 & t, i >> 24 & 255, i >> 16 & 255, i >> 8 & 255, 255 & i, h >> 24 & 255, h >> 16 & 255, h >> 8 & 255, 255 & h, r >> 24 & 255, r >> 16 & 255, r >> 8 & 255, 255 & r, s >> 24 & 255, s >> 16 & 255, s >> 8 & 255, 255 & s, e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e, n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, 255 & n]; return this.is224 || a.push(o >> 24 & 255, o >> 16 & 255, o >> 8 & 255, 255 & o), a }, t.prototype.array = t.prototype.digest, t.prototype.arrayBuffer = function () { this.finalize(); var t = new ArrayBuffer(this.is224 ? 28 : 32), i = new DataView(t); return i.setUint32(0, this.h0), i.setUint32(4, this.h1), i.setUint32(8, this.h2), i.setUint32(12, this.h3), i.setUint32(16, this.h4), i.setUint32(20, this.h5), i.setUint32(24, this.h6), this.is224 || i.setUint32(28, this.h7), t }, i.prototype = new t, i.prototype.finalize = function () { if (t.prototype.finalize.call(this), this.inner) { this.inner = !1; var i = this.array(); t.call(this, this.is224, this.sharedMemory), this.update(this.oKeyPad), this.update(i), t.prototype.finalize.call(this) } }; var B = w(); B.sha256 = B, B.sha224 = w(!0), B.sha256.hmac = _(), B.sha224.hmac = _(!0), o ? module.exports = B : (s.sha256 = B.sha256, s.sha224 = B.sha224, a && define(function () { return B })) }();\n\n /**\n * [base64-js]{@link https://github.com/beatgammit/base64-js}\n *\n * @version v1.3.0 \n * @author Kirill, Fomichev\n * @copyright Kirill, Fomichev 2014\n * @license MIT\n */\n (function (r) { if (typeof exports === \"object\" && typeof module !== \"undefined\") { module.exports = r() } else if (typeof define === \"function\" && define.amd) { define([], r) } else { var e; if (typeof window !== \"undefined\") { e = window } else if (typeof global !== \"undefined\") { e = global } else if (typeof self !== \"undefined\") { e = self } else { e = this } e.base64js = r() } })(function () { var r, e, n; return function () { function r(e, n, t) { function o(f, i) { if (!n[f]) { if (!e[f]) { var u = \"function\" == typeof require && require; if (!i && u) return u(f, !0); if (a) return a(f, !0); var v = new Error(\"Cannot find module '\" + f + \"'\"); throw v.code = \"MODULE_NOT_FOUND\", v } var d = n[f] = { exports: {} }; e[f][0].call(d.exports, function (r) { var n = e[f][1][r]; return o(n || r) }, d, d.exports, r, e, n, t) } return n[f].exports } for (var a = \"function\" == typeof require && require, f = 0; f < t.length; f++)o(t[f]); return o } return r }()({ \"/\": [function (r, e, n) { \"use strict\"; n.byteLength = d; n.toByteArray = h; n.fromByteArray = p; var t = []; var o = []; var a = typeof Uint8Array !== \"undefined\" ? Uint8Array : Array; var f = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"; for (var i = 0, u = f.length; i < u; ++i) { t[i] = f[i]; o[f.charCodeAt(i)] = i } o[\"-\".charCodeAt(0)] = 62; o[\"_\".charCodeAt(0)] = 63; function v(r) { var e = r.length; if (e % 4 > 0) { throw new Error(\"Invalid string. Length must be a multiple of 4\") } var n = r.indexOf(\"=\"); if (n === -1) n = e; var t = n === e ? 0 : 4 - n % 4; return [n, t] } function d(r) { var e = v(r); var n = e[0]; var t = e[1]; return (n + t) * 3 / 4 - t } function c(r, e, n) { return (e + n) * 3 / 4 - n } function h(r) { var e; var n = v(r); var t = n[0]; var f = n[1]; var i = new a(c(r, t, f)); var u = 0; var d = f > 0 ? t - 4 : t; for (var h = 0; h < d; h += 4) { e = o[r.charCodeAt(h)] << 18 | o[r.charCodeAt(h + 1)] << 12 | o[r.charCodeAt(h + 2)] << 6 | o[r.charCodeAt(h + 3)]; i[u++] = e >> 16 & 255; i[u++] = e >> 8 & 255; i[u++] = e & 255 } if (f === 2) { e = o[r.charCodeAt(h)] << 2 | o[r.charCodeAt(h + 1)] >> 4; i[u++] = e & 255 } if (f === 1) { e = o[r.charCodeAt(h)] << 10 | o[r.charCodeAt(h + 1)] << 4 | o[r.charCodeAt(h + 2)] >> 2; i[u++] = e >> 8 & 255; i[u++] = e & 255 } return i } function s(r) { return t[r >> 18 & 63] + t[r >> 12 & 63] + t[r >> 6 & 63] + t[r & 63] } function l(r, e, n) { var t; var o = []; for (var a = e; a < n; a += 3) { t = (r[a] << 16 & 16711680) + (r[a + 1] << 8 & 65280) + (r[a + 2] & 255); o.push(s(t)) } return o.join(\"\") } function p(r) { var e; var n = r.length; var o = n % 3; var a = []; var f = 16383; for (var i = 0, u = n - o; i < u; i += f) { a.push(l(r, i, i + f > u ? u : i + f)) } if (o === 1) { e = r[n - 1]; a.push(t[e >> 2] + t[e << 4 & 63] + \"==\") } else if (o === 2) { e = (r[n - 2] << 8) + r[n - 1]; a.push(t[e >> 10] + t[e >> 4 & 63] + t[e << 2 & 63] + \"=\") } return a.join(\"\") } }, {}] }, {}, [])(\"/\") });\n\n /**\n * [promise-polyfill]{@link https://github.com/taylorhakes/promise-polyfill}\n *\n * @version v8.1.3 \n * @author Hakes, Taylor\n * @copyright Hakes, Taylor 2014\n * @license MIT\n */\n !function(e,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?n():\"function\"==typeof define&&define.amd?define(n):n()}(0,function(){\"use strict\";function e(e){var n=this.constructor;return this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){return n.reject(t)})})}function n(e){return!(!e||\"undefined\"==typeof e.length)}function t(){}function o(e){if(!(this instanceof o))throw new TypeError(\"Promises must be constructed via new\");if(\"function\"!=typeof e)throw new TypeError(\"not a function\");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],c(e,this)}function r(e,n){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,o._immediateFn(function(){var t=1===e._state?n.onFulfilled:n.onRejected;if(null!==t){var o;try{o=t(e._value)}catch(r){return void f(n.promise,r)}i(n.promise,o)}else(1===e._state?i:f)(n.promise,e._value)})):e._deferreds.push(n)}function i(e,n){try{if(n===e)throw new TypeError(\"A promise cannot be resolved with itself.\");if(n&&(\"object\"==typeof n||\"function\"==typeof n)){var t=n.then;if(n instanceof o)return e._state=3,e._value=n,void u(e);if(\"function\"==typeof t)return void c(function(e,n){return function(){e.apply(n,arguments)}}(t,n),e)}e._state=1,e._value=n,u(e)}catch(r){f(e,r)}}function f(e,n){e._state=2,e._value=n,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&o._immediateFn(function(){e._handled||o._unhandledRejectionFn(e._value)});for(var n=0,t=e._deferreds.length;t>n;n++)r(e,e._deferreds[n]);e._deferreds=null}function c(e,n){var t=!1;try{e(function(e){t||(t=!0,i(n,e))},function(e){t||(t=!0,f(n,e))})}catch(o){if(t)return;t=!0,f(n,o)}}var a=setTimeout;o.prototype[\"catch\"]=function(e){return this.then(null,e)},o.prototype.then=function(e,n){var o=new this.constructor(t);return r(this,new function(e,n,t){this.onFulfilled=\"function\"==typeof e?e:null,this.onRejected=\"function\"==typeof n?n:null,this.promise=t}(e,n,o)),o},o.prototype[\"finally\"]=e,o.all=function(e){return new o(function(t,o){function r(e,n){try{if(n&&(\"object\"==typeof n||\"function\"==typeof n)){var u=n.then;if(\"function\"==typeof u)return void u.call(n,function(n){r(e,n)},o)}i[e]=n,0==--f&&t(i)}catch(c){o(c)}}if(!n(e))return o(new TypeError(\"Promise.all accepts an array\"));var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);for(var f=i.length,u=0;i.length>u;u++)r(u,i[u])})},o.resolve=function(e){return e&&\"object\"==typeof e&&e.constructor===o?e:new o(function(n){n(e)})},o.reject=function(e){return new o(function(n,t){t(e)})},o.race=function(e){return new o(function(t,r){if(!n(e))return r(new TypeError(\"Promise.race accepts an array\"));for(var i=0,f=e.length;f>i;i++)o.resolve(e[i]).then(t,r)})},o._immediateFn=\"function\"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){a(e,0)},o._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn(\"Possible Unhandled Promise Rejection:\",e)};var l=function(){if(\"undefined\"!=typeof self)return self;if(\"undefined\"!=typeof window)return window;if(\"undefined\"!=typeof global)return global;throw Error(\"unable to locate global object\")}();\"Promise\"in l?l.Promise.prototype[\"finally\"]||(l.Promise.prototype[\"finally\"]=e):l.Promise=o});\n\n var Keycloak = factory( root[\"sha256\"], root[\"base64js\"] );\n root[\"Keycloak\"] = Keycloak;\n\n if ( typeof define === \"function\" && define.amd ) { \n define( \"keycloak\", [], function () { return Keycloak; } );\n }\n }\n})(window, function (sha256_imported, base64js_imported) {\n if (typeof Promise === 'undefined') {\n throw Error('Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.');\n }\n\n var loggedPromiseDeprecation = false;\n\n function logPromiseDeprecation() {\n if (!loggedPromiseDeprecation) {\n loggedPromiseDeprecation = true;\n console.warn('[KEYCLOAK] Usage of legacy style promise methods such as `.error()` and `.success()` has been deprecated and support will be removed in future versions. Use standard style promise methods such as `.then() and `.catch()` instead.');\n }\n }\n\n function toKeycloakPromise(promise) {\n promise.__proto__ = KeycloakPromise.prototype;\n return promise;\n }\n\n function KeycloakPromise(executor) {\n return toKeycloakPromise(new Promise(executor));\n }\n\n KeycloakPromise.prototype = Object.create(Promise.prototype);\n KeycloakPromise.prototype.constructor = KeycloakPromise;\n\n KeycloakPromise.prototype.success = function(callback) {\n logPromiseDeprecation();\n\n var promise = this.then(function handleSuccess(value) {\n callback(value);\n });\n \n return toKeycloakPromise(promise);\n };\n\n KeycloakPromise.prototype.error = function(callback) {\n logPromiseDeprecation();\n\n var promise = this.catch(function handleError(error) {\n callback(error);\n });\n\n return toKeycloakPromise(promise);\n };\n\n function Keycloak (config) {\n if (!(this instanceof Keycloak)) {\n return new Keycloak(config);\n }\n\n var kc = this;\n var adapter;\n var refreshQueue = [];\n var callbackStorage;\n\n var loginIframe = {\n enable: true,\n callbackList: [],\n interval: 5\n };\n\n var scripts = document.getElementsByTagName('script');\n for (var i = 0; i < scripts.length; i++) {\n if ((scripts[i].src.indexOf('keycloak.js') !== -1 || scripts[i].src.indexOf('keycloak.min.js') !== -1) && scripts[i].src.indexOf('version=') !== -1) {\n kc.iframeVersion = scripts[i].src.substring(scripts[i].src.indexOf('version=') + 8).split('&')[0];\n }\n }\n\n var useNonce = true;\n var logInfo = createLogger(console.info);\n var logWarn = createLogger(console.warn);\n \n kc.init = function (initOptions) {\n kc.authenticated = false;\n\n callbackStorage = createCallbackStorage();\n var adapters = ['default', 'cordova', 'cordova-native'];\n\n if (initOptions && adapters.indexOf(initOptions.adapter) > -1) {\n adapter = loadAdapter(initOptions.adapter);\n } else if (initOptions && typeof initOptions.adapter === \"object\") {\n adapter = initOptions.adapter;\n } else {\n if (window.Cordova || window.cordova) {\n adapter = loadAdapter('cordova');\n } else {\n adapter = loadAdapter();\n }\n }\n\n if (initOptions) {\n if (typeof initOptions.useNonce !== 'undefined') {\n useNonce = initOptions.useNonce;\n }\n\n if (typeof initOptions.checkLoginIframe !== 'undefined') {\n loginIframe.enable = initOptions.checkLoginIframe;\n }\n\n if (initOptions.checkLoginIframeInterval) {\n loginIframe.interval = initOptions.checkLoginIframeInterval;\n }\n\n if (initOptions.onLoad === 'login-required') {\n kc.loginRequired = true;\n }\n\n if (initOptions.responseMode) {\n if (initOptions.responseMode === 'query' || initOptions.responseMode === 'fragment') {\n kc.responseMode = initOptions.responseMode;\n } else {\n throw 'Invalid value for responseMode';\n }\n }\n\n if (initOptions.flow) {\n switch (initOptions.flow) {\n case 'standard':\n kc.responseType = 'code';\n break;\n case 'implicit':\n kc.responseType = 'id_token token';\n break;\n case 'hybrid':\n kc.responseType = 'code id_token token';\n break;\n default:\n throw 'Invalid value for flow';\n }\n kc.flow = initOptions.flow;\n }\n\n if (initOptions.timeSkew != null) {\n kc.timeSkew = initOptions.timeSkew;\n }\n\n if(initOptions.redirectUri) {\n kc.redirectUri = initOptions.redirectUri;\n }\n\n if (initOptions.silentCheckSsoRedirectUri) {\n kc.silentCheckSsoRedirectUri = initOptions.silentCheckSsoRedirectUri;\n }\n\n if (initOptions.pkceMethod) {\n if (initOptions.pkceMethod !== \"S256\") {\n throw 'Invalid value for pkceMethod';\n }\n kc.pkceMethod = initOptions.pkceMethod;\n }\n\n if (typeof initOptions.enableLogging === 'boolean') {\n kc.enableLogging = initOptions.enableLogging;\n } else {\n kc.enableLogging = false;\n }\n }\n\n if (!kc.responseMode) {\n kc.responseMode = 'fragment';\n }\n if (!kc.responseType) {\n kc.responseType = 'code';\n kc.flow = 'standard';\n }\n\n var promise = createPromise();\n\n var initPromise = createPromise();\n initPromise.promise.then(function() {\n kc.onReady && kc.onReady(kc.authenticated);\n promise.setSuccess(kc.authenticated);\n }).catch(function(errorData) {\n promise.setError(errorData);\n });\n\n var configPromise = loadConfig(config);\n\n function onLoad() {\n var doLogin = function(prompt) {\n if (!prompt) {\n options.prompt = 'none';\n }\n\n kc.login(options).then(function () {\n initPromise.setSuccess();\n }).catch(function () {\n initPromise.setError();\n });\n }\n\n var checkSsoSilently = function() {\n var ifrm = document.createElement(\"iframe\");\n var src = kc.createLoginUrl({prompt: 'none', redirectUri: kc.silentCheckSsoRedirectUri});\n ifrm.setAttribute(\"src\", src);\n ifrm.setAttribute(\"title\", \"keycloak-silent-check-sso\");\n ifrm.style.display = \"none\";\n document.body.appendChild(ifrm);\n\n var messageCallback = function(event) {\n if (event.origin !== window.location.origin || ifrm.contentWindow !== event.source) {\n return;\n }\n\n var oauth = parseCallback(event.data);\n processCallback(oauth, initPromise);\n\n document.body.removeChild(ifrm);\n window.removeEventListener(\"message\", messageCallback);\n };\n\n window.addEventListener(\"message\", messageCallback);\n };\n\n var options = {};\n switch (initOptions.onLoad) {\n case 'check-sso':\n if (loginIframe.enable) {\n setupCheckLoginIframe().then(function() {\n checkLoginIframe().then(function (unchanged) {\n if (!unchanged) {\n kc.silentCheckSsoRedirectUri ? checkSsoSilently() : doLogin(false);\n } else {\n initPromise.setSuccess();\n }\n }).catch(function () {\n initPromise.setError();\n });\n });\n } else {\n kc.silentCheckSsoRedirectUri ? checkSsoSilently() : doLogin(false);\n }\n break;\n case 'login-required':\n doLogin(true);\n break;\n default:\n throw 'Invalid value for onLoad';\n }\n }\n\n function processInit() {\n var callback = parseCallback(window.location.href);\n\n if (callback) {\n window.history.replaceState(window.history.state, null, callback.newUrl);\n }\n\n if (callback && callback.valid) {\n return setupCheckLoginIframe().then(function() {\n processCallback(callback, initPromise);\n }).catch(function (e) {\n initPromise.setError();\n });\n } else if (initOptions) {\n if (initOptions.token && initOptions.refreshToken) {\n setToken(initOptions.token, initOptions.refreshToken, initOptions.idToken);\n\n if (loginIframe.enable) {\n setupCheckLoginIframe().then(function() {\n checkLoginIframe().then(function (unchanged) {\n if (unchanged) {\n kc.onAuthSuccess && kc.onAuthSuccess();\n initPromise.setSuccess();\n scheduleCheckIframe();\n } else {\n initPromise.setSuccess();\n }\n }).catch(function () {\n initPromise.setError();\n });\n });\n } else {\n kc.updateToken(-1).then(function() {\n kc.onAuthSuccess && kc.onAuthSuccess();\n initPromise.setSuccess();\n }).catch(function() {\n kc.onAuthError && kc.onAuthError();\n if (initOptions.onLoad) {\n onLoad();\n } else {\n initPromise.setError();\n }\n });\n }\n } else if (initOptions.onLoad) {\n onLoad();\n } else {\n initPromise.setSuccess();\n }\n } else {\n initPromise.setSuccess();\n }\n }\n\n configPromise.then(processInit);\n configPromise.catch(function() {\n promise.setError();\n });\n\n return promise.promise;\n }\n\n kc.login = function (options) {\n return adapter.login(options);\n }\n\n function generateRandomData(len) {\n // use web crypto APIs if possible\n var array = null;\n var crypto = window.crypto || window.msCrypto;\n if (crypto && crypto.getRandomValues && window.Uint8Array) {\n array = new Uint8Array(len);\n crypto.getRandomValues(array);\n return array;\n }\n\n // fallback to Math random\n array = new Array(len);\n for (var j = 0; j < array.length; j++) {\n array[j] = Math.floor(256 * Math.random());\n }\n return array;\n }\n\n function generateCodeVerifier(len) {\n return generateRandomString(len, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789');\n }\n\n function generateRandomString(len, alphabet){\n var randomData = generateRandomData(len);\n var chars = new Array(len);\n for (var i = 0; i < len; i++) {\n chars[i] = alphabet.charCodeAt(randomData[i] % alphabet.length);\n }\n return String.fromCharCode.apply(null, chars);\n }\n\n function generatePkceChallenge(pkceMethod, codeVerifier) {\n switch (pkceMethod) {\n // The use of the \"plain\" method is considered insecure and therefore not supported.\n case \"S256\":\n // hash codeVerifier, then encode as url-safe base64 without padding\n var hashBytes = new Uint8Array(sha256_imported.arrayBuffer(codeVerifier));\n var encodedHash = base64js_imported.fromByteArray(hashBytes)\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_')\n .replace(/\\=/g, '');\n return encodedHash;\n default:\n throw 'Invalid value for pkceMethod';\n }\n }\n\n kc.createLoginUrl = function(options) {\n var state = createUUID();\n var nonce = createUUID();\n\n var redirectUri = adapter.redirectUri(options);\n\n var callbackState = {\n state: state,\n nonce: nonce,\n redirectUri: encodeURIComponent(redirectUri)\n };\n\n if (options && options.prompt) {\n callbackState.prompt = options.prompt;\n }\n\n var baseUrl;\n if (options && options.action == 'register') {\n baseUrl = kc.endpoints.register();\n } else {\n baseUrl = kc.endpoints.authorize();\n }\n\n var scope;\n if (options && options.scope) {\n if (options.scope.indexOf(\"openid\") != -1) {\n scope = options.scope;\n } else {\n scope = \"openid \" + options.scope;\n }\n } else {\n scope = \"openid\";\n }\n\n var url = baseUrl\n + '?client_id=' + encodeURIComponent(kc.clientId)\n + '&redirect_uri=' + encodeURIComponent(redirectUri)\n + '&state=' + encodeURIComponent(state)\n + '&response_mode=' + encodeURIComponent(kc.responseMode)\n + '&response_type=' + encodeURIComponent(kc.responseType)\n + '&scope=' + encodeURIComponent(scope);\n if (useNonce) {\n url = url + '&nonce=' + encodeURIComponent(nonce);\n }\n\n if (options && options.prompt) {\n url += '&prompt=' + encodeURIComponent(options.prompt);\n }\n\n if (options && options.maxAge) {\n url += '&max_age=' + encodeURIComponent(options.maxAge);\n }\n\n if (options && options.loginHint) {\n url += '&login_hint=' + encodeURIComponent(options.loginHint);\n }\n\n if (options && options.idpHint) {\n url += '&kc_idp_hint=' + encodeURIComponent(options.idpHint);\n }\n\n if (options && options.locale) {\n url += '&ui_locales=' + encodeURIComponent(options.locale);\n }\n\n if (kc.pkceMethod) {\n var codeVerifier = generateCodeVerifier(96);\n callbackState.pkceCodeVerifier = codeVerifier;\n var pkceChallenge = generatePkceChallenge(kc.pkceMethod, codeVerifier);\n url += '&code_challenge=' + pkceChallenge;\n url += '&code_challenge_method=' + kc.pkceMethod;\n }\n\n callbackStorage.add(callbackState);\n\n return url;\n }\n\n kc.logout = function(options) {\n return adapter.logout(options);\n }\n\n kc.createLogoutUrl = function(options) {\n var url = kc.endpoints.logout()\n + '?redirect_uri=' + encodeURIComponent(adapter.redirectUri(options, false));\n\n return url;\n }\n\n kc.register = function (options) {\n return adapter.register(options);\n }\n\n kc.createRegisterUrl = function(options) {\n if (!options) {\n options = {};\n }\n options.action = 'register';\n return kc.createLoginUrl(options);\n }\n\n kc.createAccountUrl = function(options) {\n var realm = getRealmUrl();\n var url = undefined;\n if (typeof realm !== 'undefined') {\n url = realm\n + '/account'\n + '?referrer=' + encodeURIComponent(kc.clientId)\n + '&referrer_uri=' + encodeURIComponent(adapter.redirectUri(options));\n }\n return url;\n }\n\n kc.accountManagement = function() {\n return adapter.accountManagement();\n }\n\n kc.hasRealmRole = function (role) {\n var access = kc.realmAccess;\n return !!access && access.roles.indexOf(role) >= 0;\n }\n\n kc.hasResourceRole = function(role, resource) {\n if (!kc.resourceAccess) {\n return false;\n }\n\n var access = kc.resourceAccess[resource || kc.clientId];\n return !!access && access.roles.indexOf(role) >= 0;\n }\n\n kc.loadUserProfile = function() {\n var url = getRealmUrl() + '/account';\n var req = new XMLHttpRequest();\n req.open('GET', url, true);\n req.setRequestHeader('Accept', 'application/json');\n req.setRequestHeader('Authorization', 'bearer ' + kc.token);\n\n var promise = createPromise();\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200) {\n kc.profile = JSON.parse(req.responseText);\n promise.setSuccess(kc.profile);\n } else {\n promise.setError();\n }\n }\n }\n\n req.send();\n\n return promise.promise;\n }\n\n kc.loadUserInfo = function() {\n var url = kc.endpoints.userinfo();\n var req = new XMLHttpRequest();\n req.open('GET', url, true);\n req.setRequestHeader('Accept', 'application/json');\n req.setRequestHeader('Authorization', 'bearer ' + kc.token);\n\n var promise = createPromise();\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200) {\n kc.userInfo = JSON.parse(req.responseText);\n promise.setSuccess(kc.userInfo);\n } else {\n promise.setError();\n }\n }\n }\n\n req.send();\n\n return promise.promise;\n }\n\n kc.isTokenExpired = function(minValidity) {\n if (!kc.tokenParsed || (!kc.refreshToken && kc.flow != 'implicit' )) {\n throw 'Not authenticated';\n }\n\n if (kc.timeSkew == null) {\n logInfo('[KEYCLOAK] Unable to determine if token is expired as timeskew is not set');\n return true;\n }\n\n var expiresIn = kc.tokenParsed['exp'] - Math.ceil(new Date().getTime() / 1000) + kc.timeSkew;\n if (minValidity) {\n if (isNaN(minValidity)) {\n throw 'Invalid minValidity';\n }\n expiresIn -= minValidity;\n }\n return expiresIn < 0;\n }\n\n kc.updateToken = function(minValidity) {\n var promise = createPromise();\n\n if (!kc.refreshToken) {\n promise.setError();\n return promise.promise;\n }\n\n minValidity = minValidity || 5;\n\n var exec = function() {\n var refreshToken = false;\n if (minValidity == -1) {\n refreshToken = true;\n logInfo('[KEYCLOAK] Refreshing token: forced refresh');\n } else if (!kc.tokenParsed || kc.isTokenExpired(minValidity)) {\n refreshToken = true;\n logInfo('[KEYCLOAK] Refreshing token: token expired');\n }\n\n if (!refreshToken) {\n promise.setSuccess(false);\n } else {\n var params = 'grant_type=refresh_token&' + 'refresh_token=' + kc.refreshToken;\n var url = kc.endpoints.token();\n\n refreshQueue.push(promise);\n\n if (refreshQueue.length == 1) {\n var req = new XMLHttpRequest();\n req.open('POST', url, true);\n req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');\n req.withCredentials = true;\n\n params += '&client_id=' + encodeURIComponent(kc.clientId);\n\n var timeLocal = new Date().getTime();\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200) {\n logInfo('[KEYCLOAK] Token refreshed');\n\n timeLocal = (timeLocal + new Date().getTime()) / 2;\n\n var tokenResponse = JSON.parse(req.responseText);\n\n setToken(tokenResponse['access_token'], tokenResponse['refresh_token'], tokenResponse['id_token'], timeLocal);\n\n kc.onAuthRefreshSuccess && kc.onAuthRefreshSuccess();\n for (var p = refreshQueue.pop(); p != null; p = refreshQueue.pop()) {\n p.setSuccess(true);\n }\n } else {\n logWarn('[KEYCLOAK] Failed to refresh token');\n\n if (req.status == 400) {\n kc.clearToken();\n }\n\n kc.onAuthRefreshError && kc.onAuthRefreshError();\n for (var p = refreshQueue.pop(); p != null; p = refreshQueue.pop()) {\n p.setError(true);\n }\n }\n }\n };\n\n req.send(params);\n }\n }\n }\n\n if (loginIframe.enable) {\n var iframePromise = checkLoginIframe();\n iframePromise.then(function() {\n exec();\n }).catch(function() {\n promise.setError();\n });\n } else {\n exec();\n }\n\n return promise.promise;\n }\n\n kc.clearToken = function() {\n if (kc.token) {\n setToken(null, null, null);\n kc.onAuthLogout && kc.onAuthLogout();\n if (kc.loginRequired) {\n kc.login();\n }\n }\n }\n\n function getRealmUrl() {\n if (typeof kc.authServerUrl !== 'undefined') {\n if (kc.authServerUrl.charAt(kc.authServerUrl.length - 1) == '/') {\n return kc.authServerUrl + 'realms/' + encodeURIComponent(kc.realm);\n } else {\n return kc.authServerUrl + '/realms/' + encodeURIComponent(kc.realm);\n }\n } else {\n \treturn undefined;\n }\n }\n\n function getOrigin() {\n if (!window.location.origin) {\n return window.location.protocol + \"//\" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');\n } else {\n return window.location.origin;\n }\n }\n\n function processCallback(oauth, promise) {\n var code = oauth.code;\n var error = oauth.error;\n var prompt = oauth.prompt;\n\n var timeLocal = new Date().getTime();\n\n if (error) {\n if (prompt != 'none') {\n var errorData = { error: error, error_description: oauth.error_description };\n kc.onAuthError && kc.onAuthError(errorData);\n promise && promise.setError(errorData);\n } else {\n promise && promise.setSuccess();\n }\n return;\n } else if ((kc.flow != 'standard') && (oauth.access_token || oauth.id_token)) {\n authSuccess(oauth.access_token, null, oauth.id_token, true);\n }\n\n if ((kc.flow != 'implicit') && code) {\n var params = 'code=' + code + '&grant_type=authorization_code';\n var url = kc.endpoints.token();\n\n var req = new XMLHttpRequest();\n req.open('POST', url, true);\n req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');\n\n params += '&client_id=' + encodeURIComponent(kc.clientId);\n params += '&redirect_uri=' + oauth.redirectUri;\n\n if (oauth.pkceCodeVerifier) {\n params += '&code_verifier=' + oauth.pkceCodeVerifier;\n }\n\n req.withCredentials = true;\n\n req.onreadystatechange = function() {\n if (req.readyState == 4) {\n if (req.status == 200) {\n\n var tokenResponse = JSON.parse(req.responseText);\n authSuccess(tokenResponse['access_token'], tokenResponse['refresh_token'], tokenResponse['id_token'], kc.flow === 'standard');\n scheduleCheckIframe();\n } else {\n kc.onAuthError && kc.onAuthError();\n promise && promise.setError();\n }\n }\n };\n\n req.send(params);\n }\n\n function authSuccess(accessToken, refreshToken, idToken, fulfillPromise) {\n timeLocal = (timeLocal + new Date().getTime()) / 2;\n\n setToken(accessToken, refreshToken, idToken, timeLocal);\n\n if (useNonce && ((kc.tokenParsed && kc.tokenParsed.nonce != oauth.storedNonce) ||\n (kc.refreshTokenParsed && kc.refreshTokenParsed.nonce != oauth.storedNonce) ||\n (kc.idTokenParsed && kc.idTokenParsed.nonce != oauth.storedNonce))) {\n\n logInfo('[KEYCLOAK] Invalid nonce, clearing token');\n kc.clearToken();\n promise && promise.setError();\n } else {\n if (fulfillPromise) {\n kc.onAuthSuccess && kc.onAuthSuccess();\n promise && promise.setSuccess();\n }\n }\n }\n\n }\n\n function loadConfig(url) {\n var promise = createPromise();\n var configUrl;\n\n if (!config) {\n configUrl = 'keycloak.json';\n } else if (typeof config === 'string') {\n configUrl = config;\n }\n\n function setupOidcEndoints(oidcConfiguration) {\n if (! oidcConfiguration) {\n kc.endpoints = {\n authorize: function() {\n return getRealmUrl() + '/protocol/openid-connect/auth';\n },\n token: function() {\n return getRealmUrl() + '/protocol/openid-connect/token';\n },\n logout: function() {\n return getRealmUrl() + '/protocol/openid-connect/logout';\n },\n checkSessionIframe: function() {\n var src = getRealmUrl() + '/protocol/openid-connect/login-status-iframe.html';\n if (kc.iframeVersion) {\n src = src + '?version=' + kc.iframeVersion;\n }\n return src;\n },\n register: function() {\n return getRealmUrl() + '/protocol/openid-connect/registrations';\n },\n userinfo: function() {\n return getRealmUrl() + '/protocol/openid-connect/userinfo';\n }\n };\n } else {\n kc.endpoints = {\n authorize: function() {\n return oidcConfiguration.authorization_endpoint;\n },\n token: function() {\n return oidcConfiguration.token_endpoint;\n },\n logout: function() {\n if (!oidcConfiguration.end_session_endpoint) {\n throw \"Not supported by the OIDC server\";\n }\n return oidcConfiguration.end_session_endpoint;\n },\n checkSessionIframe: function() {\n if (!oidcConfiguration.check_session_iframe) {\n throw \"Not supported by the OIDC server\";\n }\n return oidcConfiguration.check_session_iframe;\n },\n register: function() {\n throw 'Redirection to \"Register user\" page not supported in standard OIDC mode';\n },\n userinfo: function() {\n if (!oidcConfiguration.userinfo_endpoint) {\n throw \"Not supported by the OIDC server\";\n }\n return oidcConfiguration.userinfo_endpoint;\n }\n }\n }\n }\n\n if (configUrl) {\n var req = new XMLHttpRequest();\n req.open('GET', configUrl, true);\n req.setRequestHeader('Accept', 'application/json');\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200 || fileLoaded(req)) {\n var config = JSON.parse(req.responseText);\n\n kc.authServerUrl = config['auth-server-url'];\n kc.realm = config['realm'];\n kc.clientId = config['resource'];\n setupOidcEndoints(null);\n promise.setSuccess();\n } else {\n promise.setError();\n }\n }\n };\n\n req.send();\n } else {\n if (!config.clientId) {\n throw 'clientId missing';\n }\n\n kc.clientId = config.clientId;\n\n var oidcProvider = config['oidcProvider'];\n if (!oidcProvider) {\n if (!config['url']) {\n var scripts = document.getElementsByTagName('script');\n for (var i = 0; i < scripts.length; i++) {\n if (scripts[i].src.match(/.*keycloak\\.js/)) {\n config.url = scripts[i].src.substr(0, scripts[i].src.indexOf('/js/keycloak.js'));\n break;\n }\n }\n }\n if (!config.realm) {\n throw 'realm missing';\n }\n\n kc.authServerUrl = config.url;\n kc.realm = config.realm;\n setupOidcEndoints(null);\n promise.setSuccess();\n } else {\n if (typeof oidcProvider === 'string') {\n var oidcProviderConfigUrl;\n if (oidcProvider.charAt(oidcProvider.length - 1) == '/') {\n oidcProviderConfigUrl = oidcProvider + '.well-known/openid-configuration';\n } else {\n oidcProviderConfigUrl = oidcProvider + '/.well-known/openid-configuration';\n }\n var req = new XMLHttpRequest();\n req.open('GET', oidcProviderConfigUrl, true);\n req.setRequestHeader('Accept', 'application/json');\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200 || fileLoaded(req)) {\n var oidcProviderConfig = JSON.parse(req.responseText);\n setupOidcEndoints(oidcProviderConfig);\n promise.setSuccess();\n } else {\n promise.setError();\n }\n }\n };\n\n req.send();\n } else {\n setupOidcEndoints(oidcProvider);\n promise.setSuccess();\n }\n }\n }\n\n return promise.promise;\n }\n\n function fileLoaded(xhr) {\n return xhr.status == 0 && xhr.responseText && xhr.responseURL.startsWith('file:');\n }\n\n function setToken(token, refreshToken, idToken, timeLocal) {\n if (kc.tokenTimeoutHandle) {\n clearTimeout(kc.tokenTimeoutHandle);\n kc.tokenTimeoutHandle = null;\n }\n\n if (refreshToken) {\n kc.refreshToken = refreshToken;\n kc.refreshTokenParsed = decodeToken(refreshToken);\n } else {\n delete kc.refreshToken;\n delete kc.refreshTokenParsed;\n }\n\n if (idToken) {\n kc.idToken = idToken;\n kc.idTokenParsed = decodeToken(idToken);\n } else {\n delete kc.idToken;\n delete kc.idTokenParsed;\n }\n\n if (token) {\n kc.token = token;\n kc.tokenParsed = decodeToken(token);\n kc.sessionId = kc.tokenParsed.session_state;\n kc.authenticated = true;\n kc.subject = kc.tokenParsed.sub;\n kc.realmAccess = kc.tokenParsed.realm_access;\n kc.resourceAccess = kc.tokenParsed.resource_access;\n\n if (timeLocal) {\n kc.timeSkew = Math.floor(timeLocal / 1000) - kc.tokenParsed.iat;\n }\n\n if (kc.timeSkew != null) {\n logInfo('[KEYCLOAK] Estimated time difference between browser and server is ' + kc.timeSkew + ' seconds');\n\n if (kc.onTokenExpired) {\n var expiresIn = (kc.tokenParsed['exp'] - (new Date().getTime() / 1000) + kc.timeSkew) * 1000;\n logInfo('[KEYCLOAK] Token expires in ' + Math.round(expiresIn / 1000) + ' s');\n if (expiresIn <= 0) {\n kc.onTokenExpired();\n } else {\n kc.tokenTimeoutHandle = setTimeout(kc.onTokenExpired, expiresIn);\n }\n }\n }\n } else {\n delete kc.token;\n delete kc.tokenParsed;\n delete kc.subject;\n delete kc.realmAccess;\n delete kc.resourceAccess;\n\n kc.authenticated = false;\n }\n }\n\n function decodeToken(str) {\n str = str.split('.')[1];\n\n str = str.replace('/-/g', '+');\n str = str.replace('/_/g', '/');\n switch (str.length % 4)\n {\n case 0:\n break;\n case 2:\n str += '==';\n break;\n case 3:\n str += '=';\n break;\n default:\n throw 'Invalid token';\n }\n\n str = (str + '===').slice(0, str.length + (str.length % 4));\n str = str.replace(/-/g, '+').replace(/_/g, '/');\n\n str = decodeURIComponent(escape(atob(str)));\n\n str = JSON.parse(str);\n return str;\n }\n\n function createUUID() {\n var hexDigits = '0123456789abcdef';\n var s = generateRandomString(36, hexDigits).split(\"\");\n s[14] = '4';\n s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);\n s[8] = s[13] = s[18] = s[23] = '-';\n var uuid = s.join('');\n return uuid;\n }\n\n function parseCallback(url) {\n var oauth = parseCallbackUrl(url);\n if (!oauth) {\n return;\n }\n\n var oauthState = callbackStorage.get(oauth.state);\n\n if (oauthState) {\n oauth.valid = true;\n oauth.redirectUri = oauthState.redirectUri;\n oauth.storedNonce = oauthState.nonce;\n oauth.prompt = oauthState.prompt;\n oauth.pkceCodeVerifier = oauthState.pkceCodeVerifier;\n }\n\n return oauth;\n }\n\n function parseCallbackUrl(url) {\n var supportedParams;\n switch (kc.flow) {\n case 'standard':\n supportedParams = ['code', 'state', 'session_state'];\n break;\n case 'implicit':\n supportedParams = ['access_token', 'token_type', 'id_token', 'state', 'session_state', 'expires_in'];\n break;\n case 'hybrid':\n supportedParams = ['access_token', 'id_token', 'code', 'state', 'session_state'];\n break;\n }\n\n supportedParams.push('error');\n supportedParams.push('error_description');\n supportedParams.push('error_uri');\n\n var queryIndex = url.indexOf('?');\n var fragmentIndex = url.indexOf('#');\n\n var newUrl;\n var parsed;\n\n if (kc.responseMode === 'query' && queryIndex !== -1) {\n newUrl = url.substring(0, queryIndex);\n parsed = parseCallbackParams(url.substring(queryIndex + 1, fragmentIndex !== -1 ? fragmentIndex : url.length), supportedParams);\n if (parsed.paramsString !== '') {\n newUrl += '?' + parsed.paramsString;\n }\n if (fragmentIndex !== -1) {\n newUrl += url.substring(fragmentIndex);\n }\n } else if (kc.responseMode === 'fragment' && fragmentIndex !== -1) {\n newUrl = url.substring(0, fragmentIndex);\n parsed = parseCallbackParams(url.substring(fragmentIndex + 1), supportedParams);\n if (parsed.paramsString !== '') {\n newUrl += '#' + parsed.paramsString;\n }\n }\n\n if (parsed && parsed.oauthParams) {\n if (kc.flow === 'standard' || kc.flow === 'hybrid') {\n if ((parsed.oauthParams.code || parsed.oauthParams.error) && parsed.oauthParams.state) {\n parsed.oauthParams.newUrl = newUrl;\n return parsed.oauthParams;\n }\n } else if (kc.flow === 'implicit') {\n if ((parsed.oauthParams.access_token || parsed.oauthParams.error) && parsed.oauthParams.state) {\n parsed.oauthParams.newUrl = newUrl;\n return parsed.oauthParams;\n }\n }\n }\n }\n\n function parseCallbackParams(paramsString, supportedParams) {\n var p = paramsString.split('&');\n var result = {\n paramsString: '',\n oauthParams: {}\n }\n for (var i = 0; i < p.length; i++) {\n var split = p[i].indexOf(\"=\");\n var key = p[i].slice(0, split);\n if (supportedParams.indexOf(key) !== -1) {\n result.oauthParams[key] = p[i].slice(split + 1);\n } else {\n if (result.paramsString !== '') {\n result.paramsString += '&';\n }\n result.paramsString += p[i];\n }\n }\n return result;\n }\n\n function createPromise() {\n // Need to create a native Promise which also preserves the\n // interface of the custom promise type previously used by the API\n var p = {\n setSuccess: function(result) {\n p.resolve(result);\n },\n\n setError: function(result) {\n p.reject(result);\n }\n };\n p.promise = new KeycloakPromise(function(resolve, reject) {\n p.resolve = resolve;\n p.reject = reject;\n });\n return p;\n }\n\n\n function setupCheckLoginIframe() {\n var promise = createPromise();\n\n if (!loginIframe.enable) {\n promise.setSuccess();\n return promise.promise;\n }\n\n if (loginIframe.iframe) {\n promise.setSuccess();\n return promise.promise;\n }\n\n var iframe = document.createElement('iframe');\n loginIframe.iframe = iframe;\n\n iframe.onload = function() {\n var authUrl = kc.endpoints.authorize();\n if (authUrl.charAt(0) === '/') {\n loginIframe.iframeOrigin = getOrigin();\n } else {\n loginIframe.iframeOrigin = authUrl.substring(0, authUrl.indexOf('/', 8));\n }\n promise.setSuccess();\n }\n\n var src = kc.endpoints.checkSessionIframe();\n iframe.setAttribute('src', src );\n iframe.setAttribute('title', 'keycloak-session-iframe' );\n iframe.style.display = 'none';\n document.body.appendChild(iframe);\n\n var messageCallback = function(event) {\n if ((event.origin !== loginIframe.iframeOrigin) || (loginIframe.iframe.contentWindow !== event.source)) {\n return;\n }\n\n if (!(event.data == 'unchanged' || event.data == 'changed' || event.data == 'error')) {\n return;\n }\n\n\n if (event.data != 'unchanged') {\n kc.clearToken();\n }\n\n var callbacks = loginIframe.callbackList.splice(0, loginIframe.callbackList.length);\n\n for (var i = callbacks.length - 1; i >= 0; --i) {\n var promise = callbacks[i];\n if (event.data == 'error') {\n promise.setError();\n } else {\n promise.setSuccess(event.data == 'unchanged');\n }\n }\n };\n\n window.addEventListener('message', messageCallback, false);\n\n return promise.promise;\n }\n\n function scheduleCheckIframe() {\n if (loginIframe.enable) {\n if (kc.token) {\n setTimeout(function() {\n checkLoginIframe().then(function(unchanged) {\n if (unchanged) {\n scheduleCheckIframe();\n }\n });\n }, loginIframe.interval * 1000);\n }\n }\n }\n\n function checkLoginIframe() {\n var promise = createPromise();\n\n if (loginIframe.iframe && loginIframe.iframeOrigin ) {\n var msg = kc.clientId + ' ' + (kc.sessionId ? kc.sessionId : '');\n loginIframe.callbackList.push(promise);\n var origin = loginIframe.iframeOrigin;\n if (loginIframe.callbackList.length == 1) {\n loginIframe.iframe.contentWindow.postMessage(msg, origin);\n }\n } else {\n promise.setSuccess();\n }\n\n return promise.promise;\n }\n\n function loadAdapter(type) {\n if (!type || type == 'default') {\n return {\n login: function(options) {\n window.location.replace(kc.createLoginUrl(options));\n return createPromise().promise;\n },\n\n logout: function(options) {\n window.location.replace(kc.createLogoutUrl(options));\n return createPromise().promise;\n },\n\n register: function(options) {\n window.location.replace(kc.createRegisterUrl(options));\n return createPromise().promise;\n },\n\n accountManagement : function() {\n var accountUrl = kc.createAccountUrl();\n if (typeof accountUrl !== 'undefined') {\n window.location.href = accountUrl;\n } else {\n throw \"Not supported by the OIDC server\";\n }\n return createPromise().promise;\n },\n\n redirectUri: function(options, encodeHash) {\n if (arguments.length == 1) {\n encodeHash = true;\n }\n\n if (options && options.redirectUri) {\n return options.redirectUri;\n } else if (kc.redirectUri) {\n return kc.redirectUri;\n } else {\n return location.href;\n }\n }\n };\n }\n\n if (type == 'cordova') {\n loginIframe.enable = false;\n var cordovaOpenWindowWrapper = function(loginUrl, target, options) {\n if (window.cordova && window.cordova.InAppBrowser) {\n // Use inappbrowser for IOS and Android if available\n return window.cordova.InAppBrowser.open(loginUrl, target, options);\n } else {\n return window.open(loginUrl, target, options);\n }\n };\n\n var shallowCloneCordovaOptions = function (userOptions) {\n if (userOptions && userOptions.cordovaOptions) {\n return Object.keys(userOptions.cordovaOptions).reduce(function (options, optionName) {\n options[optionName] = userOptions.cordovaOptions[optionName];\n return options;\n }, {});\n } else {\n return {};\n }\n };\n\n var formatCordovaOptions = function (cordovaOptions) {\n return Object.keys(cordovaOptions).reduce(function (options, optionName) {\n options.push(optionName+\"=\"+cordovaOptions[optionName]);\n return options;\n }, []).join(\",\");\n };\n\n var createCordovaOptions = function (userOptions) {\n var cordovaOptions = shallowCloneCordovaOptions(userOptions);\n cordovaOptions.location = 'no';\n if (userOptions && userOptions.prompt == 'none') {\n cordovaOptions.hidden = 'yes';\n }\n return formatCordovaOptions(cordovaOptions);\n };\n\n return {\n login: function(options) {\n var promise = createPromise();\n\n var cordovaOptions = createCordovaOptions(options);\n var loginUrl = kc.createLoginUrl(options);\n var ref = cordovaOpenWindowWrapper(loginUrl, '_blank', cordovaOptions);\n var completed = false;\n\n var closed = false;\n var closeBrowser = function() {\n closed = true;\n ref.close();\n };\n\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n var callback = parseCallback(event.url);\n processCallback(callback, promise);\n closeBrowser();\n completed = true;\n }\n });\n\n ref.addEventListener('loaderror', function(event) {\n if (!completed) {\n if (event.url.indexOf('http://localhost') == 0) {\n var callback = parseCallback(event.url);\n processCallback(callback, promise);\n closeBrowser();\n completed = true;\n } else {\n promise.setError();\n closeBrowser();\n }\n }\n });\n\n ref.addEventListener('exit', function(event) {\n if (!closed) {\n promise.setError({\n reason: \"closed_by_user\"\n });\n }\n });\n\n return promise.promise;\n },\n\n logout: function(options) {\n var promise = createPromise();\n\n var logoutUrl = kc.createLogoutUrl(options);\n var ref = cordovaOpenWindowWrapper(logoutUrl, '_blank', 'location=no,hidden=yes');\n\n var error;\n\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n }\n });\n\n ref.addEventListener('loaderror', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n } else {\n error = true;\n ref.close();\n }\n });\n\n ref.addEventListener('exit', function(event) {\n if (error) {\n promise.setError();\n } else {\n kc.clearToken();\n promise.setSuccess();\n }\n });\n\n return promise.promise;\n },\n\n register : function(options) {\n var promise = createPromise();\n var registerUrl = kc.createRegisterUrl();\n var cordovaOptions = createCordovaOptions(options);\n var ref = cordovaOpenWindowWrapper(registerUrl, '_blank', cordovaOptions);\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n var oauth = parseCallback(event.url);\n processCallback(oauth, promise);\n }\n });\n return promise.promise;\n },\n\n accountManagement : function() {\n var accountUrl = kc.createAccountUrl();\n if (typeof accountUrl !== 'undefined') {\n var ref = cordovaOpenWindowWrapper(accountUrl, '_blank', 'location=no');\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n }\n });\n } else {\n throw \"Not supported by the OIDC server\";\n }\n },\n\n redirectUri: function(options) {\n return 'http://localhost';\n }\n }\n }\n\n if (type == 'cordova-native') {\n loginIframe.enable = false;\n\n return {\n login: function(options) {\n var promise = createPromise();\n var loginUrl = kc.createLoginUrl(options);\n\n universalLinks.subscribe('keycloak', function(event) {\n universalLinks.unsubscribe('keycloak');\n window.cordova.plugins.browsertab.close();\n var oauth = parseCallback(event.url);\n processCallback(oauth, promise);\n });\n\n window.cordova.plugins.browsertab.openUrl(loginUrl);\n return promise.promise;\n },\n\n logout: function(options) {\n var promise = createPromise();\n var logoutUrl = kc.createLogoutUrl(options);\n\n universalLinks.subscribe('keycloak', function(event) {\n universalLinks.unsubscribe('keycloak');\n window.cordova.plugins.browsertab.close();\n kc.clearToken();\n promise.setSuccess();\n });\n\n window.cordova.plugins.browsertab.openUrl(logoutUrl);\n return promise.promise;\n },\n\n register : function(options) {\n var promise = createPromise();\n var registerUrl = kc.createRegisterUrl(options);\n universalLinks.subscribe('keycloak' , function(event) {\n universalLinks.unsubscribe('keycloak');\n window.cordova.plugins.browsertab.close();\n var oauth = parseCallback(event.url);\n processCallback(oauth, promise);\n });\n window.cordova.plugins.browsertab.openUrl(registerUrl);\n return promise.promise;\n\n },\n\n accountManagement : function() {\n var accountUrl = kc.createAccountUrl();\n if (typeof accountUrl !== 'undefined') {\n window.cordova.plugins.browsertab.openUrl(accountUrl);\n } else {\n throw \"Not supported by the OIDC server\";\n }\n },\n\n redirectUri: function(options) {\n if (options && options.redirectUri) {\n return options.redirectUri;\n } else if (kc.redirectUri) {\n return kc.redirectUri;\n } else {\n return \"http://localhost\";\n }\n }\n }\n }\n\n throw 'invalid adapter type: ' + type;\n }\n\n var LocalStorage = function() {\n if (!(this instanceof LocalStorage)) {\n return new LocalStorage();\n }\n\n localStorage.setItem('kc-test', 'test');\n localStorage.removeItem('kc-test');\n\n var cs = this;\n\n function clearExpired() {\n var time = new Date().getTime();\n for (var i = 0; i < localStorage.length; i++) {\n var key = localStorage.key(i);\n if (key && key.indexOf('kc-callback-') == 0) {\n var value = localStorage.getItem(key);\n if (value) {\n try {\n var expires = JSON.parse(value).expires;\n if (!expires || expires < time) {\n localStorage.removeItem(key);\n }\n } catch (err) {\n localStorage.removeItem(key);\n }\n }\n }\n }\n }\n\n cs.get = function(state) {\n if (!state) {\n return;\n }\n\n var key = 'kc-callback-' + state;\n var value = localStorage.getItem(key);\n if (value) {\n localStorage.removeItem(key);\n value = JSON.parse(value);\n }\n\n clearExpired();\n return value;\n };\n\n cs.add = function(state) {\n clearExpired();\n\n var key = 'kc-callback-' + state.state;\n state.expires = new Date().getTime() + (60 * 60 * 1000);\n localStorage.setItem(key, JSON.stringify(state));\n };\n };\n\n var CookieStorage = function() {\n if (!(this instanceof CookieStorage)) {\n return new CookieStorage();\n }\n\n var cs = this;\n\n cs.get = function(state) {\n if (!state) {\n return;\n }\n\n var value = getCookie('kc-callback-' + state);\n setCookie('kc-callback-' + state, '', cookieExpiration(-100));\n if (value) {\n return JSON.parse(value);\n }\n };\n\n cs.add = function(state) {\n setCookie('kc-callback-' + state.state, JSON.stringify(state), cookieExpiration(60));\n };\n\n cs.removeItem = function(key) {\n setCookie(key, '', cookieExpiration(-100));\n };\n\n var cookieExpiration = function (minutes) {\n var exp = new Date();\n exp.setTime(exp.getTime() + (minutes*60*1000));\n return exp;\n };\n\n var getCookie = function (key) {\n var name = key + '=';\n var ca = document.cookie.split(';');\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length);\n }\n }\n return '';\n };\n\n var setCookie = function (key, value, expirationDate) {\n var cookie = key + '=' + value + '; '\n + 'expires=' + expirationDate.toUTCString() + '; ';\n document.cookie = cookie;\n }\n };\n\n function createCallbackStorage() {\n try {\n return new LocalStorage();\n } catch (err) {\n }\n\n return new CookieStorage();\n }\n\n function createLogger(fn) {\n return function() {\n if (kc.enableLogging) {\n fn.apply(console, Array.prototype.slice.call(arguments));\n }\n };\n }\n }\n\n return Keycloak;\n})\n","export enum SessionStorageKeys {\n KeyCloakToken = 'KEYCLOAK_TOKEN',\n KeyCloakRefreshToken = 'KEYCLOAK_REFRESH_TOKEN',\n KeyCloakIdToken = 'KEYCLOAK_ID_TOKEN',\n ApiConfigKey = 'AUTH_API_CONFIG',\n PreventStorageSync = 'PREVENT_STORAGE_SYNC',\n LaunchDarklyFlags = 'LD_FLAGS',\n CurrentAccount = 'CURRENT_ACCOUNT',\n AuthApiUrl = 'AUTH_API_URL',\n AuthWebUrl = 'AUTH_WEB_URL',\n StatusApiUrl = 'STATUS_API_URL',\n WhatsNew = 'WHATS_NEW',\n SessionSynced = 'SESSION_SYNCED',\n RegistryHomeUrl = 'REGISTRY_HOME_URL',\n NameRequestUrl = 'NAME_REQUEST_URL',\n PprWebUrl = 'PPR_WEB_URL',\n SiteminderLogoutUrl = 'SITEMINDER_LOGOUT_URL'\n}\n\nexport enum Account {\n ANONYMOUS = 'ANONYMOUS',\n PREMIUM = 'PREMIUM',\n BASIC = 'BASIC',\n SBC_STAFF = 'SBC_STAFF',\n STAFF = 'STAFF'\n}\n\nexport enum IdpHint {\n BCROS = 'bcros',\n IDIR = 'idir',\n BCSC = 'bcsc',\n BCEID = 'bceid'\n}\n\nexport enum LoginSource {\n BCROS = 'BCROS',\n IDIR = 'IDIR',\n BCSC = 'BCSC',\n BCEID = 'BCEID'\n}\n\nexport enum Role {\n AccountHolder = 'account_holder',\n PublicUser = 'public_user',\n Staff = 'staff',\n GOVMAccountUser = 'gov_account_user'\n}\n\nexport enum Pages {\n HOME = 'home',\n USER_PROFILE = 'userprofile',\n ACCOUNT = 'account',\n SETTINGS = 'settings',\n SIGNIN = 'signin',\n USER_PROFILE_TERMS = 'userprofileterms',\n CREATE_ACCOUNT = 'setup-account',\n CHOOSE_AUTH_METHOD = 'choose-authentication-method',\n NON_BCSC_INSTRUCTIONS = 'nonbcsc-info/instructions',\n ACCOUNT_FREEZ = 'account-freeze',\n PENDING_APPROVAL = 'pendingapproval',\n ACCOUNT_SWITCHING = 'account-switching',\n REGISTRY_DASHBOARD = 'dashboard'\n}\n\nexport const ALLOWED_URIS_FOR_PENDING_ORGS: string[] = ['setup-non-bcsc-account', 'signout']\n\nexport const ACCOUNT_ID = 'accountid'\n","import ConfigHelper from './config-helper'\nimport { SessionStorageKeys, ACCOUNT_ID } from './constants'\n\n/**\n * Place to put all the custom utility methods\n */\nexport function getBoolean (value: boolean | string | number): boolean {\n let resultVal = value\n if (typeof value === 'string') {\n resultVal = value.toLowerCase()\n }\n switch (resultVal) {\n case true:\n case 'true':\n case 1:\n case '1':\n case 'on':\n case 'yes':\n case 'none':\n return true\n default:\n return false\n }\n}\n\nexport function decodeKCToken () {\n try {\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)\n if (token) {\n const base64Url = token.split('.')[1]\n const base64 = decodeURIComponent(window.atob(base64Url).split('').map(function (c) {\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)\n }).join(''))\n return JSON.parse(base64)\n } else {\n return {}\n }\n } catch (error) {\n throw new Error('Error parsing JWT - ' + error)\n }\n}\n\nexport function trimTrailingSlashURL (url) {\n return (url) ? url.trim().replace(/\\/+$/, '') : ''\n}\n\nexport function getAccountIdFromCurrentUrl () {\n const urlParams = new URLSearchParams(window.location.search)\n return urlParams.get(ACCOUNT_ID) || false\n}\n\nexport function checkAndAppend (url, key = '', value = '') {\n const separator = (/\\?/).test(url) ? '&' : '?'\n // remove key from URL if existing\n const newUrl = removeAccountIdFromUrl(url, key)\n return (value !== '' && key !== '') ? `${newUrl}${separator}${key}=${value}` : url\n}\n\n// if account id is not passed, will get it from session\n// there are some cases we need to pass account id, ie to watch account id and get URL dynamically\nexport function appendAccountId (url, accountId = '') {\n const sessionAccountId = JSON.parse(ConfigHelper.getFromSession(SessionStorageKeys.CurrentAccount) || '{}').id || ''\n const currentAccount = accountId !== '' ? accountId : sessionAccountId\n return checkAndAppend(url, ACCOUNT_ID, currentAccount)\n}\n\nexport function removeAccountIdFromUrl (url, key = ACCOUNT_ID) {\n // replacing account id and formattig ie, removing extra ? or &\n return url?.replace(new RegExp(key + '=\\\\w+'), '').replace('?&', '?').replace(/\\?$/, '')\n .replace('&&', '&').replace(/&$/, '')\n}\n","import { SessionStorageKeys } from './constants'\nimport { trimTrailingSlashURL } from './common-util'\n\nexport default class ConfigHelper {\n static keycloakConfigUrl = ''\n\n static addToSession (key: string, value: any): void {\n sessionStorage.setItem(key, value)\n }\n\n static getFromSession (key: string): string | null {\n return sessionStorage.getItem(key)\n }\n\n static removeFromSession (key: string): void {\n sessionStorage.removeItem(key)\n }\n\n static clearSession (): void {\n sessionStorage.clear()\n }\n\n static getStatusAPIUrl (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.StatusApiUrl) || '')\n }\n\n static getAuthAPIUrl (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.AuthApiUrl) || '')\n }\n\n static getAuthContextPath (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.AuthWebUrl) || '')\n }\n\n static getRegistryHomeURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.RegistryHomeUrl) || '')\n }\n\n static getNameRequestURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.NameRequestUrl) || '')\n }\n\n static getPprWebURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.PprWebUrl) || '')\n }\n\n static setKeycloakConfigUrl (keycloakConfigUrl: string) {\n this.keycloakConfigUrl = keycloakConfigUrl\n }\n\n static getKeycloakConfigUrl (): string {\n return this.keycloakConfigUrl\n }\n}\n","var VuexModule = /** @class */ (function () {\r\n function VuexModule(module) {\r\n this.actions = module.actions;\r\n this.mutations = module.mutations;\r\n this.state = module.state;\r\n this.getters = module.getters;\r\n this.namespaced = module.namespaced;\r\n this.modules = module.modules;\r\n }\r\n return VuexModule;\r\n}());\r\nfunction getModule(moduleClass, store) {\r\n if (moduleClass._statics) {\r\n return moduleClass._statics;\r\n }\r\n var genStatic = moduleClass._genStatic;\r\n if (!genStatic) {\r\n throw new Error(\"ERR_GET_MODULE_NO_STATICS : Could not get module accessor.\\n Make sure your module has name, we can't make accessors for unnamed modules\\n i.e. @Module({ name: 'something' })\");\r\n }\r\n return (moduleClass._statics = genStatic(store));\r\n}\n\nvar reservedKeys = ['actions', 'getters', 'mutations', 'modules', 'state', 'namespaced', 'commit'];\r\nfunction stateFactory(module) {\r\n var state = new module.prototype.constructor({});\r\n var s = {};\r\n Object.keys(state).forEach(function (key) {\r\n if (reservedKeys.indexOf(key) !== -1) {\r\n if (typeof state[key] !== 'undefined') {\r\n throw new Error(\"ERR_RESERVED_STATE_KEY_USED: You cannot use the following\\n ['actions', 'getters', 'mutations', 'modules', 'state', 'namespaced', 'commit']\\n as fields in your module. These are reserved as they have special purpose in Vuex\");\r\n }\r\n return;\r\n }\r\n if (state.hasOwnProperty(key)) {\r\n if (typeof state[key] !== 'function') {\r\n s[key] = state[key];\r\n }\r\n }\r\n });\r\n return s;\r\n}\n\n/**\r\n * Takes the properties on object from parameter source and adds them to the object\r\n * parameter target\r\n * @param {object} target Object to have properties copied onto from y\r\n * @param {object} source Object with properties to be copied to x\r\n */\r\nfunction addPropertiesToObject(target, source) {\r\n var _loop_1 = function (k) {\r\n Object.defineProperty(target, k, {\r\n get: function () { return source[k]; }\r\n });\r\n };\r\n for (var _i = 0, _a = Object.keys(source || {}); _i < _a.length; _i++) {\r\n var k = _a[_i];\r\n _loop_1(k);\r\n }\r\n}\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\n\nfunction staticStateGenerator(module, modOpt, statics) {\r\n var state = modOpt.stateFactory ? module.state() : module.state;\r\n Object.keys(state).forEach(function (key) {\r\n if (state.hasOwnProperty(key)) {\r\n // If not undefined or function means it is a state value\r\n if (['undefined', 'function'].indexOf(typeof state[key]) === -1) {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return modOpt.store.state[modOpt.name][key];\r\n }\r\n });\r\n }\r\n }\r\n });\r\n}\r\nfunction staticGetterGenerator(module, modOpt, statics) {\r\n Object.keys(module.getters).forEach(function (key) {\r\n if (module.namespaced) {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return modOpt.store.getters[modOpt.name + \"/\" + key];\r\n }\r\n });\r\n }\r\n else {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return modOpt.store.getters[key];\r\n }\r\n });\r\n }\r\n });\r\n}\r\nfunction staticMutationGenerator(module, modOpt, statics) {\r\n Object.keys(module.mutations).forEach(function (key) {\r\n if (module.namespaced) {\r\n statics[key] = function () {\r\n var _a;\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n (_a = modOpt.store).commit.apply(_a, [modOpt.name + \"/\" + key].concat(args));\r\n };\r\n }\r\n else {\r\n statics[key] = function () {\r\n var _a;\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n (_a = modOpt.store).commit.apply(_a, [key].concat(args));\r\n };\r\n }\r\n });\r\n}\r\nfunction staticActionGenerators(module, modOpt, statics) {\r\n Object.keys(module.actions).forEach(function (key) {\r\n if (module.namespaced) {\r\n statics[key] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _a;\r\n return __generator(this, function (_b) {\r\n return [2 /*return*/, (_a = modOpt.store).dispatch.apply(_a, [modOpt.name + \"/\" + key].concat(args))];\r\n });\r\n });\r\n };\r\n }\r\n else {\r\n statics[key] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _a;\r\n return __generator(this, function (_b) {\r\n return [2 /*return*/, (_a = modOpt.store).dispatch.apply(_a, [key].concat(args))];\r\n });\r\n });\r\n };\r\n }\r\n });\r\n}\n\nfunction moduleDecoratorFactory(moduleOptions) {\r\n return function (constructor) {\r\n var module = constructor;\r\n var stateFactory$1 = function () { return stateFactory(module); };\r\n if (!module.state) {\r\n module.state = moduleOptions && moduleOptions.stateFactory ? stateFactory$1 : stateFactory$1();\r\n }\r\n if (!module.getters) {\r\n module.getters = {};\r\n }\r\n if (!module.namespaced) {\r\n module.namespaced = moduleOptions && moduleOptions.namespaced;\r\n }\r\n Object.getOwnPropertyNames(module.prototype).forEach(function (funcName) {\r\n var descriptor = Object.getOwnPropertyDescriptor(module.prototype, funcName);\r\n if (descriptor.get && module.getters) {\r\n module.getters[funcName] = function (state, getters, rootState, rootGetters) {\r\n var thisObj = { context: { state: state, getters: getters, rootState: rootState, rootGetters: rootGetters } };\r\n addPropertiesToObject(thisObj, state);\r\n addPropertiesToObject(thisObj, getters);\r\n var got = descriptor.get.call(thisObj);\r\n return got;\r\n };\r\n }\r\n });\r\n var modOpt = moduleOptions;\r\n if (modOpt.name) {\r\n Object.defineProperty(constructor, '_genStatic', {\r\n value: function (store) {\r\n var statics = {};\r\n modOpt.store = modOpt.store || store;\r\n if (!modOpt.store) {\r\n throw new Error(\"ERR_STORE_NOT_PROVIDED: To use getModule(), either the module\\n should be decorated with store in decorator, i.e. @Module({store: store}) or\\n store should be passed when calling getModule(), i.e. getModule(MyModule, this.$store)\");\r\n }\r\n // =========== For statics ==============\r\n // ------ state -------\r\n staticStateGenerator(module, modOpt, statics);\r\n // ------- getters -------\r\n if (module.getters) {\r\n staticGetterGenerator(module, modOpt, statics);\r\n }\r\n // -------- mutations --------\r\n if (module.mutations) {\r\n staticMutationGenerator(module, modOpt, statics);\r\n }\r\n // -------- actions ---------\r\n if (module.actions) {\r\n staticActionGenerators(module, modOpt, statics);\r\n }\r\n return statics;\r\n }\r\n });\r\n }\r\n if (modOpt.dynamic) {\r\n if (!modOpt.name) {\r\n throw new Error('Name of module not provided in decorator options');\r\n }\r\n modOpt.store.registerModule(modOpt.name, // TODO: Handle nested modules too in future\r\n module);\r\n }\r\n return constructor;\r\n };\r\n}\r\nfunction Module(modOrOpt) {\r\n if (typeof modOrOpt === 'function') {\r\n /*\r\n * @Module decorator called without options (directly on the class definition)\r\n */\r\n moduleDecoratorFactory({})(modOrOpt);\r\n }\r\n else {\r\n /*\r\n * @Module({...}) decorator called with options\r\n */\r\n return moduleDecoratorFactory(modOrOpt);\r\n }\r\n}\n\nfunction actionDecoratorFactory(params) {\r\n var _a = params || {}, _b = _a.commit, commit = _b === void 0 ? undefined : _b, _c = _a.rawError, rawError = _c === void 0 ? false : _c, _d = _a.root, root = _d === void 0 ? false : _d;\r\n return function (target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.actions) {\r\n module.actions = {};\r\n }\r\n var actionFunction = descriptor.value;\r\n var action = function (context, payload) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var actionPayload, moduleAccessor, thisObj, e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, 5, , 6]);\r\n actionPayload = null;\r\n if (!module._genStatic) return [3 /*break*/, 2];\r\n moduleAccessor = getModule(module);\r\n moduleAccessor.context = context;\r\n return [4 /*yield*/, actionFunction.call(moduleAccessor, payload)];\r\n case 1:\r\n actionPayload = _a.sent();\r\n return [3 /*break*/, 4];\r\n case 2:\r\n thisObj = { context: context };\r\n addPropertiesToObject(thisObj, context.state);\r\n addPropertiesToObject(thisObj, context.getters);\r\n return [4 /*yield*/, actionFunction.call(thisObj, payload)];\r\n case 3:\r\n actionPayload = _a.sent();\r\n _a.label = 4;\r\n case 4:\r\n if (commit) {\r\n context.commit(commit, actionPayload);\r\n }\r\n return [2 /*return*/, actionPayload];\r\n case 5:\r\n e_1 = _a.sent();\r\n throw rawError\r\n ? e_1\r\n : new Error('ERR_ACTION_ACCESS_UNDEFINED: Are you trying to access ' +\r\n 'this.someMutation() or this.someGetter inside an @Action? \\n' +\r\n 'That works only in dynamic modules. \\n' +\r\n 'If not dynamic use this.context.commit(\"mutationName\", payload) ' +\r\n 'and this.context.getters[\"getterName\"]' +\r\n '\\n' +\r\n new Error(\"Could not perform action \" + key.toString()).stack +\r\n '\\n' +\r\n e_1.stack);\r\n case 6: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n module.actions[key] = root ? { root: root, handler: action } : action;\r\n };\r\n}\r\n/**\r\n * The @Action decorator turns an async function into an Vuex action\r\n *\r\n * @param targetOrParams the module class\r\n * @param key name of the action\r\n * @param descriptor the action function descriptor\r\n * @constructor\r\n */\r\nfunction Action(targetOrParams, key, descriptor) {\r\n if (!key && !descriptor) {\r\n /*\r\n * This is the case when `targetOrParams` is params.\r\n * i.e. when used as -\r\n *
\r\n            @Action({commit: 'incrCount'})\r\n            async getCountDelta() {\r\n              return 5\r\n            }\r\n         * 
\r\n */\r\n return actionDecoratorFactory(targetOrParams);\r\n }\r\n else {\r\n /*\r\n * This is the case when @Action is called on action function\r\n * without any params\r\n *
\r\n         *   @Action\r\n         *   async doSomething() {\r\n         *    ...\r\n         *   }\r\n         * 
\r\n */\r\n actionDecoratorFactory()(targetOrParams, key, descriptor);\r\n }\r\n}\n\nfunction Mutation(target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.mutations) {\r\n module.mutations = {};\r\n }\r\n var mutationFunction = descriptor.value ? descriptor.value : function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return ({});\r\n };\r\n var mutation = function (state, payload) {\r\n mutationFunction.call(state, payload);\r\n };\r\n module.mutations[key] = mutation;\r\n}\n\nfunction mutationActionDecoratorFactory(params) {\r\n return function (target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.mutations) {\r\n module.mutations = {};\r\n }\r\n if (!module.actions) {\r\n module.actions = {};\r\n }\r\n var mutactFunction = descriptor.value;\r\n var action = function (context, payload) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var actionPayload, e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, 2, , 3]);\r\n return [4 /*yield*/, mutactFunction.call(context, payload)];\r\n case 1:\r\n actionPayload = _a.sent();\r\n context.commit(key, actionPayload);\r\n return [3 /*break*/, 3];\r\n case 2:\r\n e_1 = _a.sent();\r\n if (params.rawError) {\r\n throw e_1;\r\n }\r\n else {\r\n console.error('Could not perform action ' + key.toString());\r\n console.error(e_1);\r\n }\r\n return [3 /*break*/, 3];\r\n case 3: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n var mutation = function (state, payload) {\r\n if (!params.mutate) {\r\n params.mutate = Object.keys(payload);\r\n }\r\n for (var _i = 0, _a = params.mutate; _i < _a.length; _i++) {\r\n var stateItem = _a[_i];\r\n if (state.hasOwnProperty(stateItem) && payload.hasOwnProperty(stateItem)) {\r\n state[stateItem] = payload[stateItem];\r\n }\r\n else {\r\n throw new Error(\"ERR_MUTATE_PARAMS_NOT_IN_PAYLOAD\\n In @MutationAction, mutate: ['a', 'b', ...] array keys must\\n match with return type = {a: {}, b: {}, ...} and must\\n also be in state.\");\r\n }\r\n }\r\n };\r\n module.actions[key] = params.root ? { root: true, handler: action } : action;\r\n module.mutations[key] = mutation;\r\n };\r\n}\r\n/**\r\n * The @MutationAction decorator turns this into an action that further calls a mutation\r\n * Both the action and the mutation are generated for you\r\n *\r\n * @param paramsOrTarget the params or the target class\r\n * @param key the name of the function\r\n * @param descriptor the function body\r\n * @constructor\r\n */\r\nfunction MutationAction(paramsOrTarget, key, descriptor) {\r\n if (!key && !descriptor) {\r\n /*\r\n * This is the case when `paramsOrTarget` is params.\r\n * i.e. when used as -\r\n *
\r\n            @MutationAction({mutate: ['incrCount']})\r\n            async getCountDelta() {\r\n              return {incrCount: 5}\r\n            }\r\n         * 
\r\n */\r\n return mutationActionDecoratorFactory(paramsOrTarget);\r\n }\r\n else {\r\n /*\r\n * This is the case when `paramsOrTarget` is target.\r\n * i.e. when used as -\r\n *
\r\n            @MutationAction\r\n            async getCountDelta() {\r\n              return {incrCount: 5}\r\n            }\r\n         * 
\r\n */\r\n mutationActionDecoratorFactory({})(paramsOrTarget, key, descriptor);\r\n }\r\n}\n\nexport { Action, Module, Mutation, MutationAction, VuexModule, getModule };\n//# sourceMappingURL=index.js.map\n","import { Module, VuexModule, Mutation, Action } from 'vuex-module-decorators'\nimport ConfigHelper from '../../util/config-helper'\nimport KeycloakServices from '../../services/keycloak.services'\nimport { SessionStorageKeys } from '../../util/constants'\n\n@Module({\n name: 'auth',\n namespaced: true\n})\nexport default class AuthModule extends VuexModule {\n token: string = ''\n idToken: string = ''\n refreshToken: string = ''\n kcGuid: string = ''\n loginSource: string = ''\n\n get isAuthenticated (): boolean {\n return !!this.token\n }\n\n get keycloakGuid (): string {\n return this.kcGuid || KeycloakServices.getUserInfo().keycloakGuid\n }\n\n get currentLoginSource (): string {\n return this.loginSource || KeycloakServices.getUserInfo().loginSource\n }\n\n @Mutation\n public setKCToken (token: string): void {\n this.token = token\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakToken, token)\n }\n\n @Mutation\n public setIDToken (idToken: string): void {\n this.idToken = idToken\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakIdToken, idToken)\n }\n\n @Mutation\n public setRefreshToken (refreshToken: string): void {\n this.refreshToken = refreshToken\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakRefreshToken, refreshToken)\n }\n\n @Mutation\n public setKCGuid (kcGuid: string): void {\n this.kcGuid = kcGuid\n }\n\n @Mutation\n public setLoginSource (loginSource: string): void {\n this.loginSource = loginSource\n }\n\n @Action({ rawError: true })\n public clearSession (): void {\n this.context.commit('setKCToken', '')\n this.context.commit('setIDToken', '')\n this.context.commit('setRefreshToken', '')\n this.context.commit('setKCGuid', '')\n this.context.commit('setLoginSource', '')\n }\n\n @Action({ rawError: true })\n public syncWithSessionStorage (): void {\n this.context.commit('setKCToken', ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || '')\n this.context.commit('setIDToken', ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || '')\n this.context.commit('setRefreshToken', ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || '')\n }\n}\n","import Keycloak, { KeycloakInitOptions, KeycloakInstance, KeycloakLoginOptions, KeycloakTokenParsed } from 'keycloak-js'\nimport { KCUserProfile } from '../models/KCUserProfile'\nimport ConfigHelper from '../util/config-helper'\nimport { SessionStorageKeys } from '../util/constants'\nimport { Store } from 'vuex'\nimport { getModule } from 'vuex-module-decorators'\nimport AuthModule from '../store/modules/auth'\nimport { decodeKCToken } from '../util/common-util'\n\nclass KeyCloakService {\n private kc: KeycloakInstance | undefined\n private parsedToken: any\n private static instance: KeyCloakService\n private store: Store | null = null\n private counter = 0\n private REFRESH_ATTEMPT_INTERVAL = 10 // in seconds\n private timerId: any = 0\n\n public static getInstance (): KeyCloakService {\n return (this.instance) ? this.instance : new KeyCloakService()\n }\n\n public get isInitialized (): boolean {\n return !!this.kc\n }\n\n // Setting keycloak config url as a static configuration to access from other parts of the app if needed\n async setKeycloakConfigUrl (keyCloakConfigurl: string) {\n ConfigHelper.setKeycloakConfigUrl(keyCloakConfigurl)\n }\n\n getKCInstance () : KeycloakInstance | undefined {\n return this.kc\n }\n\n async initializeKeyCloak (idpHint: string, store: Store) {\n this.store = store\n this.clearSession()\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || undefined\n const keycloakConfig = ConfigHelper.getKeycloakConfigUrl()\n this.kc = Keycloak(keycloakConfig)\n const kcLogin = this.kc.login\n this.kc.login = (options?: KeycloakLoginOptions) => {\n if (options) {\n options.idpHint = idpHint\n }\n return kcLogin(options)\n }\n let kcOptions :KeycloakInitOptions = {\n onLoad: 'login-required',\n checkLoginIframe: false,\n timeSkew: 0,\n token,\n refreshToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || undefined,\n idToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || undefined,\n pkceMethod: 'S256'\n }\n return this.kc.init(kcOptions)\n }\n\n async initSession () {\n if (!this.store) {\n return\n }\n\n const authModule = getModule(AuthModule, this.store)\n authModule.setKCToken(this.kc?.token || '')\n authModule.setIDToken(this.kc?.idToken || '')\n authModule.setRefreshToken(this.kc?.refreshToken || '')\n\n const userInfo = this.getUserInfo()\n authModule.setKCGuid(userInfo?.keycloakGuid || '')\n authModule.setLoginSource(userInfo?.loginSource || '')\n\n await this.syncSessionAndScheduleTokenRefresh()\n }\n\n getUserInfo () : KCUserProfile {\n if (!this.parsedToken || !Object.keys(this.parsedToken).length) {\n this.parsedToken = decodeKCToken()\n }\n return {\n lastName: this.parsedToken?.lastname,\n firstName: this.parsedToken?.firstname,\n email: this.parsedToken?.email,\n // eslint-disable-next-line camelcase\n roles: this.parsedToken?.realm_access?.roles,\n keycloakGuid: this.parsedToken?.sub,\n userName: this.parsedToken?.username,\n fullName: this.parsedToken?.name,\n loginSource: this.parsedToken?.loginSource\n }\n }\n\n async logout (redirectUrl?: string) {\n let token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || undefined\n if (token) {\n this.kc = Keycloak(ConfigHelper.getKeycloakConfigUrl())\n let kcOptions :KeycloakInitOptions = {\n onLoad: 'login-required',\n checkLoginIframe: false,\n timeSkew: 0,\n token,\n refreshToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || undefined,\n idToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || undefined,\n pkceMethod: 'S256'\n }\n const siteminderLogoutUrl = ConfigHelper.getFromSession(SessionStorageKeys.SiteminderLogoutUrl) || undefined\n // Here we clear session storage, and add a flag in to prevent the app from\n // putting tokens back in from returning async calls (see #2341)\n ConfigHelper.clearSession()\n ConfigHelper.addToSession(SessionStorageKeys.PreventStorageSync, true)\n return new Promise((resolve, reject) => {\n this.kc && this.kc.init(kcOptions)\n .then(authenticated => {\n if (!authenticated) {\n resolve()\n }\n redirectUrl = redirectUrl || `${window.location.origin}${process.env.VUE_APP_PATH}`\n if (siteminderLogoutUrl?.includes('http')) {\n redirectUrl = `${siteminderLogoutUrl}?returl=${redirectUrl.replace(/(https?:\\/\\/)|(\\/)+/g, '$1$2')}&retnow=1`\n }\n this.kc && this.kc.logout({ redirectUri: redirectUrl })\n .then(() => {\n resolve()\n })\n .catch(error => {\n reject(error)\n })\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n }\n\n async refreshToken (isForceRefresh?: boolean) {\n // Set the token expiry time as the minValidity to force refresh token\n if (!isForceRefresh && (!this.kc?.tokenParsed?.exp || !this.kc.timeSkew)) {\n return\n }\n // if isForceRefresh is true, send -1 in updateToken to force update the token\n let tokenExpiresIn = (isForceRefresh) ? -1 : this.kc.tokenParsed.exp - Math.ceil(new Date().getTime() / 1000) + this.kc.timeSkew + 100\n if (this.kc) {\n this.kc.updateToken(tokenExpiresIn)\n .then(refreshed => {\n if (refreshed) {\n this.initSession()\n }\n })\n .catch(() => {\n this.clearSession()\n return new Error('Could not refresh Token')\n })\n } else {\n return new Error('Could not refresh Token:No Kc Instance')\n }\n }\n\n verifyRoles (allowedRoles:[], disabledRoles:[]) {\n let isAuthorized = false\n if (allowedRoles || disabledRoles) {\n let userInfo = this.getUserInfo()\n isAuthorized = allowedRoles ? allowedRoles.some(role => userInfo.roles.includes(role)) : !disabledRoles.some(role => userInfo.roles.includes(role))\n } else {\n isAuthorized = true\n }\n return isAuthorized\n }\n\n async initializeToken (store?: Store, isScheduleRefresh: boolean = true, forceLogin: boolean = false) {\n this.store = store\n const kcOptions: KeycloakInitOptions = {\n onLoad: forceLogin ? 'login-required' : 'check-sso',\n checkLoginIframe: false,\n timeSkew: 0,\n token: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || undefined,\n refreshToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || undefined,\n idToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || undefined,\n pkceMethod: 'S256'\n }\n\n return new Promise((resolve, reject) => {\n this.kc = Keycloak(ConfigHelper.getKeycloakConfigUrl())\n ConfigHelper.addToSession(SessionStorageKeys.SessionSynced, false)\n this.kc.init(kcOptions)\n .then(authenticated => {\n console.info('[TokenServices] is User Authenticated?: Syncing ' + authenticated)\n resolve(this.syncSessionAndScheduleTokenRefresh(isScheduleRefresh))\n })\n .catch(error => {\n reject(new Error('Could not Initialize KC' + error))\n })\n })\n }\n\n async syncSessionAndScheduleTokenRefresh (isScheduleRefresh: boolean = true) {\n if (this.kc?.authenticated) {\n this.syncSessionStorage()\n if (isScheduleRefresh) {\n this.scheduleRefreshTimer()\n }\n return this.kc.token\n } else {\n this.clearSession()\n return new Error('NOT_AUTHENTICATED')\n }\n }\n\n scheduleRefreshTimer (refreshEarlyTime = 0) {\n let refreshEarlyTimeinMilliseconds = Math.max(this.REFRESH_ATTEMPT_INTERVAL, refreshEarlyTime) * 1000\n this.scheduleRefreshToken(refreshEarlyTimeinMilliseconds)\n }\n\n private scheduleRefreshToken (refreshEarlyTimeinMilliseconds: number) {\n let refreshTokenExpiresIn = -1\n // check if refresh token is still valid . Or else clear all timers and throw errors\n if (this.kc && this.kc.timeSkew !== undefined && this.kc.refreshTokenParsed) {\n refreshTokenExpiresIn = this.kc.refreshTokenParsed['exp']! - Math.ceil(new Date().getTime() / 1000) + this.kc.timeSkew\n }\n if (refreshTokenExpiresIn < 0) {\n throw new Error('Refresh Token Expired. No more token refreshes')\n }\n let expiresIn = -1\n if (this.kc && this.kc.tokenParsed && this.kc.tokenParsed['exp'] && this.kc.timeSkew !== undefined) {\n expiresIn = this.kc.tokenParsed['exp'] - Math.ceil(new Date().getTime() / 1000) + this.kc.timeSkew\n }\n if (expiresIn < 0) {\n throw new Error('Refresh Token Expired. No more token refreshes')\n }\n let refreshInMilliSeconds = (expiresIn * 1000) - refreshEarlyTimeinMilliseconds // in milliseconds\n console.info('[TokenServices] Token Refresh Scheduled in %s Seconds', (refreshInMilliSeconds / 1000))\n this.timerId = setTimeout(() => {\n console.log('[TokenServices] Refreshing Token Attempt: %s ', ++this.counter)\n this.kc!.updateToken(-1)\n .then(refreshed => {\n if (refreshed) {\n console.log('Token successfully refreshed')\n this.syncSessionStorage()\n this.scheduleRefreshToken(refreshEarlyTimeinMilliseconds)\n }\n })\n .catch(() => {\n clearTimeout(this.timerId)\n })\n }, refreshInMilliSeconds)\n }\n\n private syncSessionStorage () {\n if (this.kc) {\n if (this.kc.token) {\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakToken, this.kc.token)\n }\n if (this.kc.refreshToken) {\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakRefreshToken, this.kc.refreshToken)\n }\n if (this.kc.idToken) {\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakIdToken, this.kc.idToken)\n }\n ConfigHelper.addToSession(SessionStorageKeys.SessionSynced, true)\n } else {\n ConfigHelper.addToSession(SessionStorageKeys.SessionSynced, false)\n }\n }\n\n private async clearSession () {\n if (this.store) {\n const authModule = getModule(AuthModule, this.store)\n authModule.clearSession()\n }\n ConfigHelper.removeFromSession(SessionStorageKeys.KeyCloakToken)\n ConfigHelper.removeFromSession(SessionStorageKeys.KeyCloakIdToken)\n ConfigHelper.removeFromSession(SessionStorageKeys.KeyCloakRefreshToken)\n }\n}\n\nexport default KeyCloakService.getInstance()\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","/**\n * Place to put all the custom utility methods\n */\n\nimport { Address, BaseAddressModel } from '@/models/Address'\nimport { Role, SlipStatus } from '@/util/constants'\n\nimport KeyCloakService from 'sbc-common-components/src/services/keycloak.services'\nimport moment from 'moment'\n\nexport default class CommonUtils {\n // Formatting date in the desired format for displaying in the template\n static formatDisplayDate (date: Date, format?: string) {\n return date ? moment(date).format(format || 'MMM DD, YYYY') : ''\n }\n\n static requiredFieldRule (errorMessage: string = 'This field is required') {\n return [v => !!v || errorMessage]\n }\n\n static optionalFieldRule (errorMessage: string, length: number) {\n return [v => !v || (v.length <= length) || errorMessage]\n }\n\n static isSigningIn (): boolean {\n const path = window.location.pathname\n return (\n path.includes('/signin') ||\n path.includes('/signin-redirect') ||\n path.includes('/signin-redirect-full')\n )\n }\n\n static isSigningOut (): boolean {\n const path = window.location.pathname\n return path.includes('/signout')\n }\n\n // blob convert to downloadable file\n static fileDownload (data: any, fileName: string, fileType: string = 'text/plain', action:string = 'download') {\n const blob = new Blob([data], { type: fileType })\n if (typeof window.navigator.msSaveBlob !== 'undefined') {\n // IE workaround for \"HTML7007: One or more blob URLs were\n // revoked by closing the blob for which they were created.\n // These URLs will no longer resolve as the data backing\n // the URL has been freed.\"\n window.navigator.msSaveBlob(blob, fileName)\n } else {\n const blobURL = (window.URL && window.URL.createObjectURL) ? window.URL.createObjectURL(blob) : window.webkitURL.createObjectURL(blob)\n const tempLink = document.createElement('a')\n tempLink.style.display = 'none'\n tempLink.href = blobURL\n if (action === 'open') {\n tempLink.setAttribute('target', '_blank')\n } else {\n tempLink.setAttribute('download', fileName)\n }\n\n // Safari thinks _blank anchor are pop ups. We only want to set _blank\n // target if the browser does not support the HTML5 download attribute.\n // This allows you to download files in desktop safari if pop up blocking\n // is enabled.\n if (typeof tempLink.download === 'undefined') {\n tempLink.setAttribute('target', '_blank')\n }\n document.body.appendChild(tempLink)\n tempLink.click()\n setTimeout(() => {\n document.body.removeChild(tempLink)\n // TO CHECK: not revoking may increase more temp memory usage\n // once download, we will revokeObjectURL\n if (action !== 'open') {\n window.URL.revokeObjectURL(blobURL)\n }\n }, 200)\n }\n }\n\n static statusListColor (status: string, textColor: boolean = true) {\n let color = ''\n switch (status) {\n case SlipStatus.ACTIVE:\n case SlipStatus.COMPLETE:\n case SlipStatus.REFUNDPROCESSED:\n case SlipStatus.WRITEOFFCOMPLETED:\n color = 'success'\n break\n case SlipStatus.BOUNCED:\n case SlipStatus.NSF:\n case SlipStatus.LINKED:\n case SlipStatus.REFUNDREQUEST:\n case SlipStatus.REFUNDAUTHORIZED:\n case SlipStatus.WRITEOFFAUTHORIZED:\n case SlipStatus.WRITEOFFREQUESTED:\n case SlipStatus.VOID:\n color = 'error'\n break\n }\n\n return textColor ? `${color}--text` : color\n }\n\n static appendCurrencySymbol (currency: number | string) {\n return '$' + currency\n }\n\n static cleanObject (obj) {\n if (obj.remainingAmount) {\n obj.remainingAmount = obj.remainingAmount.replace(/[^0-9.]/g, '')\n }\n return Object.keys(obj)\n .filter((k) => obj[k] !== '' && obj[k] !== null)\n .reduce((a, k) => ({ ...a, [k]: obj[k] }), {})\n }\n\n static createQueryParams = params =>\n Object.keys(params)\n .map(k => `${k}=${encodeURI(params[k])}`)\n .join('&')\n\n static appendQueryParamsIfNeeded (targetUrl: string, route: any): string {\n const requestParams = CommonUtils.createQueryParams(route.query)\n return requestParams ? `${targetUrl}?${requestParams}` : targetUrl\n }\n\n // for converting address object of sbc-auth to as needed for BaseAddress component\n static convertAddressForComponent (address: Address) : BaseAddressModel {\n return {\n addressCity: address.city,\n addressCountry: address.country,\n addressRegion: address.region,\n deliveryInstructions: address.deliveryInstructions,\n postalCode: address.postalCode,\n streetAddress: address.street,\n streetAddressAdditional: address.streetAdditional\n }\n }\n\n // for converting address object of BaseAddress component to as needed for sbc-auth\n static convertAddressForAuth (iaddress: BaseAddressModel) : Address {\n return {\n city: iaddress.addressCity,\n country: iaddress.addressCountry,\n region: iaddress.addressRegion,\n deliveryInstructions: iaddress.deliveryInstructions,\n postalCode: iaddress.postalCode,\n street: iaddress.streetAddress,\n streetAdditional: iaddress.streetAddressAdditional\n }\n }\n\n static isApproverRole () {\n const approverRole:any = [Role.FAS_REFUND_APPROVER]\n return KeyCloakService.verifyRoles(approverRole, [])\n }\n\n static isVoidRole () {\n const voidRole:any = [Role.FAS_VOID]\n return KeyCloakService.verifyRoles(voidRole, [])\n }\n\n /**\n * check its in refunc process\n * @param {string} status\n */\n static isRefundProcessStatus (status) {\n return [\n SlipStatus.REFUNDREQUEST,\n SlipStatus.REFUNDAUTHORIZED,\n SlipStatus.REFUNDPROCESSED,\n SlipStatus.REFUNDREJECTED,\n SlipStatus.REFUNDUPLOADED\n ].includes(status)\n }\n\n /**\n * status is refundrequest\n * @param {string} status\n */\n static isRefundRequestStatus (status) {\n return [\n SlipStatus.REFUNDREQUEST\n ].includes(status)\n }\n\n /**\n * status permission allow to chaneg details\n * @param {string} status\n */\n static isEditEnabledBystatus (status) {\n return ![\n SlipStatus.REFUNDPROCESSED,\n SlipStatus.REFUNDAUTHORIZED,\n SlipStatus.NSF,\n SlipStatus.LINKED\n ].includes(status)\n }\n\n static isObject = (object) => {\n return object != null && typeof object === 'object'\n }\n\n static isDeepEqual = (object1, object2) => {\n const objKeys1 = Object.keys(object1)\n const objKeys2 = Object.keys(object2)\n\n if (objKeys1.length !== objKeys2.length) return false\n\n for (const key of objKeys1) {\n const value1 = object1[key]\n const value2 = object2[key]\n\n const isObjects = CommonUtils.isObject(value1) && CommonUtils.isObject(value2)\n\n if ((isObjects && !CommonUtils.isDeepEqual(value1, value2)) ||\n (!isObjects && value1 !== value2)\n ) {\n return false\n }\n }\n return true\n }\n}\n","import { SessionStorageKeys } from '@/util/constants'\n\nexport default class ConfigHelper {\n static async fetchConfig () {\n // sbc common components need the following keys\n sessionStorage.setItem(SessionStorageKeys.AuthApiUrl, ConfigHelper.getAuthAPIUrl())\n sessionStorage.setItem(SessionStorageKeys.PayApiUrl, ConfigHelper.getPayAPIURL())\n sessionStorage.setItem(SessionStorageKeys.StatusApiUrl, ConfigHelper.getStatusAPIUrl())\n sessionStorage.setItem(SessionStorageKeys.AuthWebUrl, ConfigHelper.getAuthWebUrl())\n sessionStorage.setItem(SessionStorageKeys.FasWebUrl, ConfigHelper.getFasWebUrl())\n if (ConfigHelper.getSiteminderLogoutUrl()) {\n sessionStorage.setItem(SessionStorageKeys.SiteminderLogoutUrl, ConfigHelper.getSiteminderLogoutUrl())\n }\n }\n\n /**\n * this will run everytime when vue is being loaded..so do the call only when session storage doesnt have the values\n */\n static saveConfigToSessionStorage () {\n return this.fetchConfig()\n }\n\n static getSelfURL () {\n // this is without a trailing slash\n return `${window.location.origin}${import.meta.env.VUE_APP_PATH}`.replace(/\\/$/, '') // remove the slash at the end\n }\n\n static getPayAPIURL () {\n const payApiUrl = `${import.meta.env.VUE_APP_PAY_API_URL}` + `${import.meta.env.VUE_APP_PAY_API_VERSION}`\n return sessionStorage.getItem(SessionStorageKeys.PayApiUrl) || payApiUrl\n }\n\n static getFasAPIURL () {\n return `${ConfigHelper.getPayAPIURL()}/fas`\n }\n\n static getAuthAPIUrl () {\n const authApiUrl = `${import.meta.env.VUE_APP_AUTH_API_URL}` + `${import.meta.env.VUE_APP_AUTH_API_VERSION}`\n return sessionStorage.getItem(SessionStorageKeys.AuthApiUrl) || authApiUrl\n }\n\n static getAuthWebUrl () {\n return sessionStorage.getItem(SessionStorageKeys.AuthWebUrl) || `${import.meta.env.VUE_APP_AUTH_WEB_URL}`\n }\n\n static getFasWebUrl () {\n return sessionStorage.getItem(SessionStorageKeys.FasWebUrl) || `${import.meta.env.VUE_APP_FAS_WEB_URL}`\n }\n\n static getStatusAPIUrl () {\n const statusApiUrl = `${import.meta.env.VUE_APP_STATUS_API_URL}` + `${import.meta.env.VUE_APP_STATUS_API_VERSION}`\n return sessionStorage.getItem(SessionStorageKeys.StatusApiUrl) || statusApiUrl\n }\n\n static getSiteminderLogoutUrl () {\n const logoutUrl = `${import.meta.env.VUE_APP_SITEMINDER_LOGOUT_URL}`\n return sessionStorage.getItem(SessionStorageKeys.SiteminderLogoutUrl) || logoutUrl\n }\n\n static getKeycloakAuthUrl () {\n return `${import.meta.env.VUE_APP_KEYCLOAK_AUTH_URL}`\n }\n\n static getKeycloakRealm () {\n return `${import.meta.env.VUE_APP_KEYCLOAK_REALM}`\n }\n\n static getKeycloakClientId () {\n return `${import.meta.env.VUE_APP_KEYCLOAK_CLIENTID}`\n }\n\n static getAddressCompleteKey () {\n return `${import.meta.env.VUE_APP_ADDRESS_COMPLETE_KEY}`\n }\n\n static addToSession (key:string, value:any) {\n sessionStorage.setItem(key, value)\n }\n\n static getFromSession (key:string) {\n return sessionStorage.getItem(key)\n }\n\n static removeFromSession (key:string) {\n sessionStorage.removeItem(key)\n }\n\n static clearSession () {\n sessionStorage.clear()\n }\n}\n","// Returns a function, that, as long as it continues to be invoked, will not\n// be triggered. The function will be called after it stops being called for\n// N milliseconds. If `immediate` is passed, trigger the function on the\n// leading edge, instead of the trailing.\n\nfunction debounce (func, wait = 300, immediate = false) {\n let timeout\n\n // to avoid this type error define this with type any, arg for rest arguments\n return function (this: any, ...args) {\n const context = this\n\n const later = function () {\n timeout = null\n if (!immediate) func.apply(context, args)\n }\n const callNow = immediate && !timeout\n\n clearTimeout(timeout)\n timeout = setTimeout(later, wait)\n if (callNow) func.apply(context, args)\n }\n}\n\nexport default debounce\n","import { computed, ref } from '@vue/composition-api'\n\nconst hasCallFailed = ref(false)\nconst activeCalls = ref(0)\nconst isThereActiveCalls = computed(() => {\n return activeCalls.value > 0\n})\n\nexport const useIndicators = () => {\n return {\n hasCallFailed,\n activeCalls,\n isThereActiveCalls\n }\n}\n","/*\nComposable function for loader component that is displayed whenever axios async process takes place\nGlobal loader is used in App.vue where show a full route loader - \nWhile, isLoading can be used inside an individual component - \n\n*/\n\nimport { ref } from '@vue/composition-api'\nimport { useIndicators } from '../useIndicators'\n\nexport function useLoader () {\n const { isThereActiveCalls } = useIndicators()\n const isLoading = ref(false)\n // vuex getters\n function changeLoadingStatus (isLoadingStatus: boolean): void {\n isLoading.value = isLoadingStatus\n }\n\n function toggleLoading (): void {\n changeLoadingStatus(!isLoading.value)\n }\n\n return {\n isLoading,\n isThereActiveCalls,\n toggleLoading\n }\n}\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\nvar enhanceError = require('./core/enhanceError');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n },\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nvar utils = require('./../utils');\nvar defaults = require('./../defaults');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n","'use strict';\n\nvar pkg = require('./../../package.json');\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\nvar currentVerArr = pkg.version.split('.');\n\n/**\n * Compare package versions\n * @param {string} version\n * @param {string?} thanVersion\n * @returns {boolean}\n */\nfunction isOlderVersion(version, thanVersion) {\n var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;\n var destVer = version.split('.');\n for (var i = 0; i < 3; i++) {\n if (pkgVersionArr[i] > destVer[i]) {\n return true;\n } else if (pkgVersionArr[i] < destVer[i]) {\n return false;\n }\n }\n return false;\n}\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator\n * @param {string?} version\n * @param {string} message\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n var isDeprecated = version && isOlderVersion(version);\n\n function formatMessage(opt, desc) {\n return '[Axios v' + pkg.version + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed in ' + version));\n }\n\n if (isDeprecated && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n isOlderVersion: isOlderVersion,\n assertOptions: assertOptions,\n validators: validators\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\nvar validator = require('../helpers/validator');\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","module.exports = require('./lib/axios');","import Axios from 'axios'\nimport ConfigHelper from '@/util/config-helper'\nimport { SessionStorageKeys } from '@/util/constants'\nimport { useIndicators } from '@/composables/useIndicators'\n// import store from '@/store'\n// using fasStore from window to avoid library build issue.\nconst axios = Axios.create()\n\nconst { activeCalls, hasCallFailed, isThereActiveCalls } = useIndicators()\n\naxios.defaults.showGlobalLoader = false // by default, false\naxios.defaults.showGlobalErrorHandling = true\n\naxios.interceptors.request.use(\n config => {\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)\n if (token) {\n config.headers.Authorization = `Bearer ${token}`\n }\n if (config.showGlobalLoader) {\n activeCalls.value++\n }\n return config\n },\n error => Promise.reject(error)\n)\n\naxios.interceptors.response.use(\n response => {\n // decrement active calls count by one\n if (response.config.showGlobalLoader && isThereActiveCalls.value) {\n activeCalls.value--\n }\n return response\n },\n error => {\n // decrement active calls count by one\n if (error.config.showGlobalLoader && isThereActiveCalls.value) {\n activeCalls.value--\n }\n // call has failed in this case. And if the config showGlobalErrorHandling is true, then update store\n if (error.config.showGlobalErrorHandling && error?.response?.status >= 500) {\n hasCallFailed.value = true\n }\n return Promise.reject(error)\n }\n)\n\n// to work on both case export as default and normal\nexport { axios }\nexport default axios\n","import { AxiosResponse } from 'axios'\nimport { Code } from '@/models/Code'\nimport ConfigHelper from '@/util/config-helper'\nimport axios from '@/util/http-util'\n\nexport default class CodesService {\n public static async getCodes (codeType: string): Promise> {\n return axios.get(`${ConfigHelper.getPayAPIURL()}/codes/${codeType}`)\n }\n}\n","import { ref } from '@vue/composition-api'\nimport { Code } from '@/models/Code'\nimport CodesService from '@/services/codes.service'\nimport { SlipStatus } from '@/util/constants'\n\nconst routingSlipStatusList = ref([])\n\nexport const useCodes = () => {\n const getRoutingSlipStatusList = async () => {\n if (routingSlipStatusList.value.length === 0) {\n const response: any = await CodesService.getCodes(\n 'routing_slip_statuses'\n )\n if (response && response.data && response.status === 200) {\n routingSlipStatusList.value = response.data?.codes.filter(\n code => code.code !== SlipStatus.REFUNDREJECTED\n )\n return\n }\n routingSlipStatusList.value = []\n }\n }\n return {\n routingSlipStatusList,\n getRoutingSlipStatusList\n }\n}\n","import { Code } from '@/models/Code'\nimport { SlipStatus } from '@/util/constants'\nimport { ref, computed, toRefs, onMounted } from '@vue/composition-api'\nimport { useCodes } from '../useCodes'\n\nexport function useStatusList (props, context) {\n const { getRoutingSlipStatusList, routingSlipStatusList } = useCodes()\n // default value set blank incase if we didnt pass props\n const { value = ref('') } = toRefs(props)\n\n // using same v-model value for getting value and update parent on change\n const currentStatus = computed({\n get: () => {\n return value.value || ''\n },\n set: (modalValue: Code) => {\n context.emit('input', modalValue.code)\n }\n })\n\n onMounted(() => {\n // getting status list mouint and setting inside store\n // will make call once till page refresh\n getRoutingSlipStatusList()\n })\n\n /**\n * return status label on code\n *\n * @param {string} code\n * @returns {string} description - label\n */\n function statusLabel (code: string) {\n const codeArray = selectedStatusObject(code)\n return codeArray[0]?.description || ''\n }\n\n /**\n * filtering array and find given value of object\n * use full when needed to set object of status\n * @param {string} code\n * @returns [{code, description}]\n */\n\n function selectedStatusObject (code: string) {\n return routingSlipStatusList.value?.filter(\n statusList => statusList.code === code\n )\n }\n\n return {\n routingSlipStatusList,\n currentStatus,\n statusLabel,\n selectedStatusObject\n }\n}\n","import { AxiosResponse } from 'axios'\nimport CommonUtils from '@/util/common-util'\nimport ConfigHelper from '@/util/config-helper'\nimport { GetFeeRequestParams, Payment } from '@/models/Payment'\nimport { LinkRoutingSlipPrams } from '@/models/RoutingSlip'\nimport axios from '@/util/http-util'\nimport { CreateRoutingSlipStatus, PatchActions, SlipStatus } from '@/util/constants'\n\nexport default class RoutingSlip {\n public static async getRoutingSlip (\n routingNumber: string,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.get(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingNumber}`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async createRoutingSlip (\n routingSlipRequest: RoutingSlip,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips`,\n routingSlipRequest,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async adjustRoutingSlip (\n payments: Payment[],\n routingSlipNumber: string\n ): Promise {\n const payload = {\n status: SlipStatus.CORRECTION,\n payments: payments\n }\n return axios.patch(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}?action=${PatchActions.UPDATE_STATUS}`,\n payload\n )\n }\n\n public static async updateRoutingSlipStatus (\n code: string,\n routingSlipNumber: string\n ): Promise {\n return axios.patch(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}?action=updateStatus`,\n { status: code }\n )\n }\n\n public static async updateRoutingSlipRefundStatus (\n code: string,\n routingSlipNumber: string\n ): Promise {\n try {\n const response = await axios.patch(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}?action=updateRefundStatus`,\n { refund_status: code }\n )\n if (response?.data) {\n return response.data\n }\n return null\n } catch (error) {\n console.error('Routing slip refund status update failed', error)\n throw error\n }\n }\n\n public static async updateRoutingSlipComments (\n data: any,\n slipNumber: string\n ): Promise {\n try {\n const response = await axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${slipNumber}/comments`,\n data\n )\n if (response?.data) {\n return response.data\n }\n return null\n } catch (error) {\n console.error('Failed to update routing slip comments', error)\n throw error\n }\n }\n\n public static async updateRoutingSlipRefund (\n details: string,\n routingSlipNumber: string\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}/refunds`,\n details\n )\n }\n\n public static async getSearchRoutingSlip (\n searchParams: RoutingSlip,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/queries`,\n searchParams,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async saveLinkRoutingSlip (\n LinkRoutingSlip: LinkRoutingSlipPrams,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/links`,\n LinkRoutingSlip,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async getLinkedRoutingSlips (\n routingSlipNumber: string,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.get(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}/links`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async getDailyReport (\n selectedDate: string,\n type: string = 'application/pdf',\n showGlobalLoader: boolean = false\n ): Promise {\n const headers = {\n Accept: type\n }\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${selectedDate}/reports`,\n {},\n {\n headers,\n responseType: 'blob' as 'json',\n showGlobalLoader: showGlobalLoader\n }\n )\n }\n\n public static async getSearchFilingType (\n searchParams: string,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.get(\n `${ConfigHelper.getPayAPIURL()}/fees/schedules?description=${searchParams}`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async getFeeByCorpTypeAndFilingType (\n getFeeRequestParams: GetFeeRequestParams,\n showGlobalLoader: boolean = false\n ): Promise {\n const requestParams = CommonUtils.createQueryParams(getFeeRequestParams.requestParams)\n return axios.get(\n `${ConfigHelper.getPayAPIURL()}/fees/${getFeeRequestParams.corpTypeCode}/${getFeeRequestParams.filingTypeCode}?${requestParams}`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async saveManualTransactions (\n transactions: any,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getPayAPIURL()}/payment-requests`,\n transactions,\n { showGlobalLoader: showGlobalLoader }\n\n )\n }\n\n public static async cancelRoutingSlipInvoice (\n invoiceId: number,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getPayAPIURL()}/payment-requests/${invoiceId}/refunds`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n}\n","import { computed, ref } from '@vue/composition-api'\nimport RoutingSlipService from '@/services/routingSlip.services'\nimport { AccountInfo, AdjustRoutingSlipAmountPrams, AdjustRoutingSlipChequePrams, GetRoutingSlipRequestPayload, LinkedRoutingSlips, RoutingSlip, RoutingSlipDetails } from '@/models/RoutingSlip'\nimport { ApiErrors, CreateRoutingSlipStatus, headerSearchTitle as headerSearchTitleConstant, SlipStatus } from '@/util/constants'\nimport CommonUtils from '@/util/common-util'\nimport { BusinessInfo, GetFeeRequestParams, Payment, TransactionParams } from '@/models/Payment'\n\nconst defaultParams = {\n page: 1,\n limit: 50,\n total: Infinity\n}\nconst headerSearchTitle = ref(headerSearchTitleConstant)\nconst searchRoutingSlipResult = ref([])\nconst searchRoutingSlipParams = ref(defaultParams)\n\nconst routingSlip = ref({})\nconst linkedRoutingSlips = ref(undefined)\nconst routingSlipDetails = ref({})\nconst accountInfo = ref({})\nconst chequePayment = ref([])\nconst cashPayment = ref({})\nconst isPaymentMethodCheque = ref(true)\nconst isAmountPaidInUsd = ref(false)\nconst autoCompleteRoutingSlips = ref([])\n\nexport const useRoutingSlip = () => {\n // Computed\n const invoiceCount = computed(() => {\n return routingSlip.value?.invoices?.length\n })\n\n const searchParamsExist = computed(() => {\n const params = searchRoutingSlipParams.value\n for (const key in params) {\n if (params[key] && params[key] !== '') {\n return false\n }\n }\n return true\n })\n\n // for a child linked to a parent routing slip, there would be a parentNumber\n const isRoutingSlipAChild = computed(() => {\n return !!routingSlip.value?.parentNumber\n })\n\n // if routingslip has parentNumber then it is a child Else, check if there are any children in linkedroutingslips for it.(in this case, it is a parent)\n const isRoutingSlipLinked = computed(() => {\n return (\n isRoutingSlipAChild.value || linkedRoutingSlips.value?.children.length > 0\n )\n })\n\n const isRoutingSlipVoid = computed(() => {\n return routingSlip.value?.status === SlipStatus.VOID\n })\n\n const updateRoutingSlipChequeNumber = (chequeNumToChange: AdjustRoutingSlipChequePrams) => {\n const payments = routingSlip.value.payments.map((payment: Payment, i: number) => {\n if (chequeNumToChange.paymentIndex === i) {\n payment.chequeReceiptNumber = chequeNumToChange.chequeNum\n }\n return { ...payment }\n })\n routingSlip.value.payments = payments\n }\n\n const updateRoutingSlipAmount = (amountToChange: AdjustRoutingSlipAmountPrams) => {\n const payments = routingSlip.value.payments.map((payment: Payment, i: number) => {\n if (amountToChange.paymentIndex === i) {\n if (amountToChange.isRoutingSlipPaidInUsd) {\n payment.paidUsdAmount = amountToChange.amount\n } else {\n payment.paidAmount = amountToChange.amount\n }\n }\n return { ...payment }\n })\n routingSlip.value.payments = payments\n }\n\n // Functions\n const createRoutingSlip = async () => {\n // build the RoutingSlip Request JSON object that needs to be sent.\n let routingSlipRequest: RoutingSlip = {}\n routingSlipRequest = { ...routingSlipDetails.value }\n routingSlipRequest.paymentAccount = accountInfo.value\n\n // By design, a routing slip can only have one payment method - CASH or CHEQUE.\n routingSlipRequest.payments = isPaymentMethodCheque.value\n ? chequePayment.value\n : [cashPayment.value]\n\n const response = await RoutingSlipService.createRoutingSlip(\n routingSlipRequest,\n true\n )\n if (response && response.data && response.status === 200) {\n routingSlip.value = response.data\n }\n }\n\n const checkRoutingNumber = async (): Promise => {\n try {\n const routingNumber = routingSlipDetails.value.number\n const response = await RoutingSlipService.getRoutingSlip(routingNumber)\n // if routing number existing we will get 200 as response\n // else we will get 204\n if (response.status === 204) {\n return CreateRoutingSlipStatus.VALID\n }\n // all other case routing is existing so can't use this number\n return CreateRoutingSlipStatus.EXISTS\n } catch (error) {\n if (error.response?.status === 400 && error.response?.data?.type === ApiErrors.FAS_INVALID_ROUTING_SLIP_DIGITS) {\n return CreateRoutingSlipStatus.INVALID_DIGITS\n }\n\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data)\n // on error we allow the routing number which should break on create and show error message\n return CreateRoutingSlipStatus.VALID\n }\n }\n\n const getRoutingSlip = async (getRoutingSlipRequestPayload: GetRoutingSlipRequestPayload) => {\n try {\n const response = await RoutingSlipService.getRoutingSlip(\n getRoutingSlipRequestPayload.routingSlipNumber,\n getRoutingSlipRequestPayload?.showGlobalLoader\n )\n\n if (response && response.data && response.status === 200) {\n routingSlip.value = response.data\n }\n // TODO : need to handle if slip not existing\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data) // 500 errors may not return data\n }\n }\n\n const updateRoutingSlipStatus = async (\n statusDetails: any\n ) => {\n const slipNumber = routingSlip.value.number\n // update status\n try {\n let response\n if (CommonUtils.isRefundProcessStatus(statusDetails?.status)) {\n response = await RoutingSlipService.updateRoutingSlipRefund(\n statusDetails,\n slipNumber\n )\n } else {\n response = await RoutingSlipService.updateRoutingSlipStatus(\n statusDetails.status,\n slipNumber\n )\n }\n if (response?.data && (response.status === 200 || response.status === 202)) {\n if (!CommonUtils.isRefundProcessStatus(statusDetails?.status)) {\n routingSlip.value = response.data\n } else {\n const getRoutingSlipRequestPayload: GetRoutingSlipRequestPayload = { routingSlipNumber: slipNumber }\n getRoutingSlip(getRoutingSlipRequestPayload)\n }\n return response\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response)\n return error?.response\n }\n }\n\n const updateRoutingSlipRefundStatus = async (status: any) => {\n const slipNumber = routingSlip.value.number\n try {\n const responseData = await RoutingSlipService.updateRoutingSlipRefundStatus(status, slipNumber)\n return responseData\n } catch (error) {\n console.error('Error updating refund status:', error)\n return error?.response\n }\n }\n\n const updateRoutingSlipComments = async (text: any) => {\n const slipNumber = routingSlip.value.number\n const data = {\n comment: {\n businessId: slipNumber,\n comment: text\n }\n }\n try {\n const responseData = await RoutingSlipService.updateRoutingSlipComments(data, slipNumber)\n return responseData\n } catch (error) {\n console.error('Error updating routing slip comments:', error)\n return error?.response\n }\n }\n\n const adjustRoutingSlip = async (payments: Payment[]): Promise => {\n // build the RoutingSlip Request JSON object that needs to be sent.\n const slipNumber = routingSlip.value.number\n try {\n const response = await RoutingSlipService.adjustRoutingSlip(\n payments,\n slipNumber\n )\n if (response?.data && response.status === 200) {\n return response.data\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response)\n return error?.response\n }\n }\n\n const resetRoutingSlipDetails = () => {\n routingSlipDetails.value = undefined\n accountInfo.value = undefined\n chequePayment.value = undefined\n cashPayment.value = undefined\n isPaymentMethodCheque.value = undefined\n }\n\n const resetSearchParams = (): void => {\n searchRoutingSlipParams.value = defaultParams\n searchRoutingSlipResult.value = []\n }\n\n const searchRoutingSlip = async (appendToResults = false) => {\n // // build the RoutingSlip Request JSON object that needs to be sent.\n\n let params = { ...searchRoutingSlipParams.value }\n // filtering and removing all non set values\n params = CommonUtils.cleanObject(params)\n\n // formatting as per API\n if (params.dateFilter) {\n params.dateFilter = {\n startDate: CommonUtils.formatDisplayDate(\n params.dateFilter[0],\n 'YYYY-MM-DD'\n ),\n endDate: CommonUtils.formatDisplayDate(\n params.dateFilter[1],\n 'YYYY-MM-DD'\n )\n }\n }\n\n // check for error handling\n if (params.status) {\n params.status = params.status.code\n }\n\n if (Object.keys(params).length > 0) {\n // need to reset result of there is no search params\n const response = await RoutingSlipService.getSearchRoutingSlip(\n params\n )\n if (response && response.data && response.status === 200) {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n total: response.data?.total || 0\n }\n if (appendToResults) {\n searchRoutingSlipResult.value = [\n ...searchRoutingSlipResult.value,\n ...response.data?.items\n ]\n } else {\n searchRoutingSlipResult.value = response.data?.items\n }\n\n return\n }\n }\n searchRoutingSlipResult.value = []\n }\n\n const saveLinkRoutingSlip = async (\n parentRoutingSlipNumber: string\n ): Promise => {\n const childRoutingSlipNumber: string = routingSlip.value.number\n\n const LinkPrams = { childRoutingSlipNumber, parentRoutingSlipNumber }\n\n try {\n // handle error condtions here\n const response = await RoutingSlipService.saveLinkRoutingSlip(LinkPrams)\n if (response && response.data && response.status === 200) {\n return {\n error: false\n }\n }\n } catch (error) {\n if (error.response.status === 400) {\n return { error: true, details: error.response?.data }\n }\n\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data)\n }\n }\n\n const getLinkedRoutingSlips = async (routingSlipNumber) => {\n try {\n const response = await RoutingSlipService.getLinkedRoutingSlips(\n routingSlipNumber,\n true\n )\n let result: LinkedRoutingSlips\n if (response && response.data && response.status === 200) {\n result = response.data\n }\n // 204 non content response\n linkedRoutingSlips.value = result\n } catch (error) {\n linkedRoutingSlips.value = undefined\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data) // 500 errors may not return data\n }\n }\n\n const getDailyReportByDate = async (selectedDate, type) => {\n const formatedDate = CommonUtils.formatDisplayDate(\n selectedDate,\n 'YYYY-MM-DD'\n )\n try {\n return await RoutingSlipService.getDailyReport(formatedDate, type, false)\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data) // 500 errors may not return data\n return error.response\n }\n }\n\n const getAutoCompleteRoutingSlips = async (\n routingSlipNumber\n ): Promise => {\n const response = await RoutingSlipService.getSearchRoutingSlip({\n routingSlipNumber\n })\n if (response && response.data && response.status === 200) {\n return response.data?.items\n }\n\n return []\n }\n\n const getFeeByCorpTypeAndFilingType = async (\n getFeeRequestParams: GetFeeRequestParams\n ): Promise => {\n // Currently, in FAS we only need total from the result that is the source of truth.\n // Other properties such as tax breakdown and priority fees can be ignored here.\n const response = await RoutingSlipService.getFeeByCorpTypeAndFilingType(\n getFeeRequestParams\n )\n if (response && response.data && response.status === 200) {\n return response.data?.total\n }\n return null\n }\n\n const saveManualTransactions = async (transation: any): Promise => {\n // prepare format from here\n const routingSlipNumber: string = routingSlip.value.number\n\n const {\n referenceNumber,\n filingType,\n futureEffective,\n priority,\n quantity\n } = transation\n const businessInfo: BusinessInfo = {\n corpType: filingType.corpTypeCode.code\n }\n\n // no need to pass if empty\n if (referenceNumber) {\n businessInfo.businessIdentifier = referenceNumber\n }\n\n const transactionParams: TransactionParams = {\n businessInfo,\n filingInfo: {\n filingTypes: [\n {\n filingTypeCode: filingType.filingTypeCode.code,\n futureEffective: futureEffective,\n priority: priority,\n quantity: parseInt(quantity)\n }\n ]\n },\n accountInfo: {\n routingSlip: routingSlipNumber\n }\n }\n\n const response = await RoutingSlipService.saveManualTransactions(\n transactionParams\n )\n return response\n }\n\n const cancelRoutingSlipInvoice = async (invoiceId: number) => {\n return await RoutingSlipService.cancelRoutingSlipInvoice(invoiceId)\n }\n\n async function infiniteScrollCallback () {\n const params = { ...searchRoutingSlipParams.value }\n if (params.total !== Infinity && params.total < params.limit) return true\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n page: searchRoutingSlipParams.value.page ? searchRoutingSlipParams.value.page + 1 : 1\n }\n await searchRoutingSlip(true)\n return false\n }\n\n return {\n headerSearchTitle,\n searchRoutingSlipResult,\n searchRoutingSlipParams,\n routingSlip,\n linkedRoutingSlips,\n routingSlipDetails,\n accountInfo,\n chequePayment,\n cashPayment,\n isPaymentMethodCheque,\n isAmountPaidInUsd,\n autoCompleteRoutingSlips,\n invoiceCount,\n searchParamsExist,\n isRoutingSlipAChild,\n isRoutingSlipLinked,\n isRoutingSlipVoid,\n defaultParams,\n updateRoutingSlipChequeNumber,\n updateRoutingSlipAmount,\n createRoutingSlip,\n checkRoutingNumber,\n getRoutingSlip,\n updateRoutingSlipStatus,\n updateRoutingSlipRefundStatus,\n adjustRoutingSlip,\n resetRoutingSlipDetails,\n resetSearchParams,\n searchRoutingSlip,\n saveLinkRoutingSlip,\n getLinkedRoutingSlips,\n getDailyReportByDate,\n getAutoCompleteRoutingSlips,\n getFeeByCorpTypeAndFilingType,\n saveManualTransactions,\n cancelRoutingSlipInvoice,\n infiniteScrollCallback,\n updateRoutingSlipComments\n }\n}\n","import { computed, onMounted, reactive, ref, toRefs } from '@vue/composition-api'\n\nimport CommonUtils from '@/util/common-util'\nimport ConfigHelper from '@/util/config-helper'\nimport debounce from '@/util/debounce'\nimport { useLoader } from '@/composables/common/useLoader'\nimport { useStatusList } from '@/composables/common/useStatusList'\nimport { useRoutingSlip } from '../useRoutingSlip'\nimport { RoutingSlipRefundCodes, RoutingSlipRefundStatus, SlipStatus } from '@/util/constants'\n\nexport function useSearch (props, context) {\n const {\n headerSearchTitle,\n resetSearchParams,\n searchParamsExist,\n searchRoutingSlip,\n searchRoutingSlipParams,\n searchRoutingSlipResult,\n infiniteScrollCallback,\n defaultParams\n } = useRoutingSlip()\n const { isLibraryMode } = toRefs(props)\n // Adding openFromAuth=true queryparams so that we can build breadcrumbs\n // Eg of a typical breadcrumb flow = Staff Dashboard -> FAS Dashboard -> View Routing Slip: test -> View Routing Slip: testchild\n const fasUrl = `${ConfigHelper.getFasWebUrl()}?openFromAuth=true`\n\n const { statusLabel } = useStatusList(reactive({ value: '' }), {})\n const { isLoading, toggleLoading } = useLoader()\n\n const showExpandedFolio = ref([])\n const showExpandedCheque = ref([])\n // to make sure not updating result on keyup\n const searchParamsChanged = ref(false)\n const reachedEnd = ref(false)\n\n const headerSearch: any = computed({\n get: () => {\n return headerSearchTitle.value || []\n },\n set: (modalValue: any) => {\n headerSearchTitle.value = modalValue\n }\n })\n\n // columntoshow component and update the local object if display = true\n const displayedHeaderSearch: any = computed(() => {\n const displayed = []\n for (let i = 0; i < headerSearch.value?.length; i++) {\n if (headerSearch.value[i].display) {\n displayed.push(headerSearch.value[i])\n }\n }\n return displayed\n })\n\n function canShowColumn (columnName) {\n return displayedHeaderSearch.value.find(header => {\n return header.value === columnName\n })\n }\n\n function updateSearchFilter (updates: any) {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n ...defaultParams,\n ...updates\n }\n searchParamsChanged.value = true\n reachedEnd.value = false\n }\n\n // using same v-model value for getting value and update parent on change\n const routingSlipNumber: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.routingSlipNumber || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n routingSlipNumber: modalValue\n })\n }\n })\n\n const receiptNumber: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.receiptNumber || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n receiptNumber: modalValue\n })\n }\n })\n\n const status: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.status || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n status: modalValue\n })\n }\n })\n\n const refundStatus: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.refundStatus || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n refundStatus: modalValue\n })\n }\n })\n\n const businessIdentifier: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.businessIdentifier || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n businessIdentifier: modalValue\n })\n }\n })\n\n const accountName: any = computed({\n get: () => {\n return searchRoutingSlipParams.value?.accountName || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n accountName: modalValue\n })\n }\n })\n\n const initiator: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.initiator || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n initiator: modalValue\n })\n }\n })\n\n const remainingAmount: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.remainingAmount || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n remainingAmount: modalValue\n })\n }\n })\n\n const dateFilter: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.dateFilter || []\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n dateFilter: modalValue\n })\n }\n })\n\n const chequeReceiptNumber: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.chequeReceiptNumber || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n chequeReceiptNumber: modalValue\n })\n }\n })\n\n function applyDateFilter (dateRangeObj) {\n dateFilter.value = dateRangeObj\n }\n\n async function searchNow () {\n toggleLoading()\n await searchRoutingSlip()\n searchParamsChanged.value = false\n toggleLoading()\n }\n\n onMounted(() => {\n // To be triggered when coming back to FAS home page from a breadcrumb and if there are any search params present\n if (!searchParamsExist.value) {\n searchNow()\n }\n })\n\n const debouncedSearch = debounce(() => {\n searchNow()\n })\n\n const appendQueryParamsIfNeeded = CommonUtils.appendQueryParamsIfNeeded\n\n // get label of status\n function getStatusLabel (code: string) {\n return statusLabel(code)\n }\n\n async function clearFilter () {\n toggleLoading()\n resetSearchParams()\n await searchRoutingSlip()\n searchParamsChanged.value = false\n toggleLoading()\n }\n\n function toggleFolio (id: number) {\n // to show and hide multiple folio on click\n // remove from array if already existing else add to array\n if (showExpandedFolio.value.includes(id)) {\n showExpandedFolio.value = showExpandedFolio.value.filter(function (item) {\n return item !== id\n })\n } else {\n showExpandedFolio.value.push(id)\n }\n }\n\n function toggleCheque (id: number) {\n // to show and hide multiple folio on click\n // remove from array if already existing else add to array\n if (showExpandedCheque.value.includes(id)) {\n showExpandedCheque.value = showExpandedCheque.value.filter(function (item) {\n return item !== id\n })\n } else {\n showExpandedCheque.value.push(id)\n }\n }\n\n function formatFolioResult (routingSlip) {\n // to make sure not updating on keyup\n if (\n !searchParamsChanged.value &&\n businessIdentifier.value &&\n businessIdentifier.value !== ''\n ) {\n return [businessIdentifier.value]\n }\n const { invoices } = routingSlip\n\n if (invoices) {\n return invoices\n .filter(invoice => invoice.businessIdentifier)\n .map(value => value.businessIdentifier)\n }\n return ['-']\n }\n\n function navigateTo (routingSlipNumber: number) : void {\n if (isLibraryMode.value) {\n // This scenario would hit when the FAS Search is displayed as a plugin in Staff dashboard\n // we append queryparams so that we can persist breadcrumbs across different components and refresh issue\n // Adding viewFromAuth=true queryparams so that we can build breadcrumbs\n // Eg of a typical breadcrumb flow = Staff Dashboard -> View Routing Slip: test -> View Routing Slip: testchild\n window.location.href = `${ConfigHelper.getFasWebUrl()}view-routing-slip/${routingSlipNumber}?viewFromAuth=true`\n } else {\n context.root.$router.push(appendQueryParamsIfNeeded(`/view-routing-slip/${routingSlipNumber}`, context.root.$route))\n }\n }\n\n const getNext = debounce(async () => {\n if (isLoading.value) return\n reachedEnd.value = await infiniteScrollCallback()\n }, 100) // Adjust the wait time as needed\n\n function getRefundStatusText (statusCode: string | undefined): string {\n const status = RoutingSlipRefundStatus.find(item => item.code === statusCode)\n return status ? status.text : RoutingSlipRefundCodes.PROCESSING\n }\n\n function getStatusFromRefundStatus (statusCode: string): SlipStatus {\n if (statusCode === RoutingSlipRefundCodes.PROCESSING) {\n return SlipStatus.REFUNDREQUEST\n } else {\n return SlipStatus.REFUNDPROCESSED\n }\n }\n\n return {\n headerSearch,\n displayedHeaderSearch,\n status,\n refundStatus,\n routingSlipNumber,\n receiptNumber,\n dateFilter,\n businessIdentifier,\n accountName,\n remainingAmount,\n chequeReceiptNumber,\n canShowColumn,\n applyDateFilter,\n searchNow,\n debouncedSearch,\n searchRoutingSlipResult,\n getStatusLabel,\n searchParamsExist,\n clearFilter,\n formatFolioResult,\n showExpandedFolio,\n showExpandedCheque,\n toggleFolio,\n toggleCheque,\n isLoading,\n navigateTo,\n fasUrl,\n initiator,\n reachedEnd,\n getNext,\n getRefundStatusText,\n getStatusFromRefundStatus\n }\n}\n","/**\n * vue-class-component v7.2.6\n * (c) 2015-present Evan You\n * @license MIT\n */\nimport Vue from 'vue';\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\n// The rational behind the verbose Reflect-feature check below is the fact that there are polyfills\n// which add an implementation for Reflect.defineMetadata but not for Reflect.getOwnMetadataKeys.\n// Without this check consumers will encounter hard to track down runtime errors.\nfunction reflectionIsSupported() {\n return typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys;\n}\nfunction copyReflectionMetadata(to, from) {\n forwardMetadata(to, from);\n Object.getOwnPropertyNames(from.prototype).forEach(function (key) {\n forwardMetadata(to.prototype, from.prototype, key);\n });\n Object.getOwnPropertyNames(from).forEach(function (key) {\n forwardMetadata(to, from, key);\n });\n}\n\nfunction forwardMetadata(to, from, propertyKey) {\n var metaKeys = propertyKey ? Reflect.getOwnMetadataKeys(from, propertyKey) : Reflect.getOwnMetadataKeys(from);\n metaKeys.forEach(function (metaKey) {\n var metadata = propertyKey ? Reflect.getOwnMetadata(metaKey, from, propertyKey) : Reflect.getOwnMetadata(metaKey, from);\n\n if (propertyKey) {\n Reflect.defineMetadata(metaKey, metadata, to, propertyKey);\n } else {\n Reflect.defineMetadata(metaKey, metadata, to);\n }\n });\n}\n\nvar fakeArray = {\n __proto__: []\n};\nvar hasProto = fakeArray instanceof Array;\nfunction createDecorator(factory) {\n return function (target, key, index) {\n var Ctor = typeof target === 'function' ? target : target.constructor;\n\n if (!Ctor.__decorators__) {\n Ctor.__decorators__ = [];\n }\n\n if (typeof index !== 'number') {\n index = undefined;\n }\n\n Ctor.__decorators__.push(function (options) {\n return factory(options, key, index);\n });\n };\n}\nfunction mixins() {\n for (var _len = arguments.length, Ctors = new Array(_len), _key = 0; _key < _len; _key++) {\n Ctors[_key] = arguments[_key];\n }\n\n return Vue.extend({\n mixins: Ctors\n });\n}\nfunction isPrimitive(value) {\n var type = _typeof(value);\n\n return value == null || type !== 'object' && type !== 'function';\n}\nfunction warn(message) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-class-component] ' + message);\n }\n}\n\nfunction collectDataFromConstructor(vm, Component) {\n // override _init to prevent to init as Vue instance\n var originalInit = Component.prototype._init;\n\n Component.prototype._init = function () {\n var _this = this;\n\n // proxy to actual vm\n var keys = Object.getOwnPropertyNames(vm); // 2.2.0 compat (props are no longer exposed as self properties)\n\n if (vm.$options.props) {\n for (var key in vm.$options.props) {\n if (!vm.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n }\n\n keys.forEach(function (key) {\n Object.defineProperty(_this, key, {\n get: function get() {\n return vm[key];\n },\n set: function set(value) {\n vm[key] = value;\n },\n configurable: true\n });\n });\n }; // should be acquired class property values\n\n\n var data = new Component(); // restore original _init to avoid memory leak (#209)\n\n Component.prototype._init = originalInit; // create plain data object\n\n var plainData = {};\n Object.keys(data).forEach(function (key) {\n if (data[key] !== undefined) {\n plainData[key] = data[key];\n }\n });\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(Component.prototype instanceof Vue) && Object.keys(plainData).length > 0) {\n warn('Component class must inherit Vue or its descendant class ' + 'when class property is used.');\n }\n }\n\n return plainData;\n}\n\nvar $internalHooks = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeDestroy', 'destroyed', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch' // 2.6\n];\nfunction componentFactory(Component) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n options.name = options.name || Component._componentTag || Component.name; // prototype props.\n\n var proto = Component.prototype;\n Object.getOwnPropertyNames(proto).forEach(function (key) {\n if (key === 'constructor') {\n return;\n } // hooks\n\n\n if ($internalHooks.indexOf(key) > -1) {\n options[key] = proto[key];\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(proto, key);\n\n if (descriptor.value !== void 0) {\n // methods\n if (typeof descriptor.value === 'function') {\n (options.methods || (options.methods = {}))[key] = descriptor.value;\n } else {\n // typescript decorated data\n (options.mixins || (options.mixins = [])).push({\n data: function data() {\n return _defineProperty({}, key, descriptor.value);\n }\n });\n }\n } else if (descriptor.get || descriptor.set) {\n // computed properties\n (options.computed || (options.computed = {}))[key] = {\n get: descriptor.get,\n set: descriptor.set\n };\n }\n });\n (options.mixins || (options.mixins = [])).push({\n data: function data() {\n return collectDataFromConstructor(this, Component);\n }\n }); // decorate options\n\n var decorators = Component.__decorators__;\n\n if (decorators) {\n decorators.forEach(function (fn) {\n return fn(options);\n });\n delete Component.__decorators__;\n } // find super\n\n\n var superProto = Object.getPrototypeOf(Component.prototype);\n var Super = superProto instanceof Vue ? superProto.constructor : Vue;\n var Extended = Super.extend(options);\n forwardStaticMembers(Extended, Component, Super);\n\n if (reflectionIsSupported()) {\n copyReflectionMetadata(Extended, Component);\n }\n\n return Extended;\n}\nvar reservedPropertyNames = [// Unique id\n'cid', // Super Vue constructor\n'super', // Component options that will be used by the component\n'options', 'superOptions', 'extendOptions', 'sealedOptions', // Private assets\n'component', 'directive', 'filter'];\nvar shouldIgnore = {\n prototype: true,\n arguments: true,\n callee: true,\n caller: true\n};\n\nfunction forwardStaticMembers(Extended, Original, Super) {\n // We have to use getOwnPropertyNames since Babel registers methods as non-enumerable\n Object.getOwnPropertyNames(Original).forEach(function (key) {\n // Skip the properties that should not be overwritten\n if (shouldIgnore[key]) {\n return;\n } // Some browsers does not allow reconfigure built-in properties\n\n\n var extendedDescriptor = Object.getOwnPropertyDescriptor(Extended, key);\n\n if (extendedDescriptor && !extendedDescriptor.configurable) {\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(Original, key); // If the user agent does not support `__proto__` or its family (IE <= 10),\n // the sub class properties may be inherited properties from the super class in TypeScript.\n // We need to exclude such properties to prevent to overwrite\n // the component options object which stored on the extended constructor (See #192).\n // If the value is a referenced value (object or function),\n // we can check equality of them and exclude it if they have the same reference.\n // If it is a primitive value, it will be forwarded for safety.\n\n if (!hasProto) {\n // Only `cid` is explicitly exluded from property forwarding\n // because we cannot detect whether it is a inherited property or not\n // on the no `__proto__` environment even though the property is reserved.\n if (key === 'cid') {\n return;\n }\n\n var superDescriptor = Object.getOwnPropertyDescriptor(Super, key);\n\n if (!isPrimitive(descriptor.value) && superDescriptor && superDescriptor.value === descriptor.value) {\n return;\n }\n } // Warn if the users manually declare reserved properties\n\n\n if (process.env.NODE_ENV !== 'production' && reservedPropertyNames.indexOf(key) >= 0) {\n warn(\"Static property name '\".concat(key, \"' declared on class '\").concat(Original.name, \"' \") + 'conflicts with reserved property name of Vue internal. ' + 'It may cause unexpected behavior of the component. Consider renaming the property.');\n }\n\n Object.defineProperty(Extended, key, descriptor);\n });\n}\n\nfunction Component(options) {\n if (typeof options === 'function') {\n return componentFactory(options);\n }\n\n return function (Component) {\n return componentFactory(Component, options);\n };\n}\n\nComponent.registerHooks = function registerHooks(keys) {\n $internalHooks.push.apply($internalHooks, _toConsumableArray(keys));\n};\n\nexport default Component;\nexport { createDecorator, mixins };\n","var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\n// Code copied from Vue/src/shared/util.js\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) { return str.replace(hyphenateRE, '-$1').toLowerCase(); };\n/**\n * decorator of an event-emitter function\n * @param event The name of the event\n * @return MethodDecorator\n */\nexport function Emit(event) {\n return function (_target, propertyKey, descriptor) {\n var key = hyphenate(propertyKey);\n var original = descriptor.value;\n descriptor.value = function emitter() {\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var emit = function (returnValue) {\n var emitName = event || key;\n if (returnValue === undefined) {\n if (args.length === 0) {\n _this.$emit(emitName);\n }\n else if (args.length === 1) {\n _this.$emit(emitName, args[0]);\n }\n else {\n _this.$emit.apply(_this, __spreadArrays([emitName], args));\n }\n }\n else {\n args.unshift(returnValue);\n _this.$emit.apply(_this, __spreadArrays([emitName], args));\n }\n };\n var returnValue = original.apply(this, args);\n if (isPromise(returnValue)) {\n returnValue.then(emit);\n }\n else {\n emit(returnValue);\n }\n return returnValue;\n };\n };\n}\nfunction isPromise(obj) {\n return obj instanceof Promise || (obj && typeof obj.then === 'function');\n}\n","/** @see {@link https://github.com/vuejs/vue-class-component/blob/master/src/reflect.ts} */\nvar reflectMetadataIsSupported = typeof Reflect !== 'undefined' && typeof Reflect.getMetadata !== 'undefined';\nexport function applyMetadata(options, target, key) {\n if (reflectMetadataIsSupported) {\n if (!Array.isArray(options) &&\n typeof options !== 'function' &&\n !options.hasOwnProperty('type') &&\n typeof options.type === 'undefined') {\n var type = Reflect.getMetadata('design:type', target, key);\n if (type !== Object) {\n options.type = type;\n }\n }\n }\n}\n","import { createDecorator } from 'vue-class-component';\nimport { applyMetadata } from '../helpers/metadata';\n/**\n * decorator of a prop\n * @param options the options for the prop\n * @return PropertyDecorator | void\n */\nexport function Prop(options) {\n if (options === void 0) { options = {}; }\n return function (target, key) {\n applyMetadata(options, target, key);\n createDecorator(function (componentOptions, k) {\n ;\n (componentOptions.props || (componentOptions.props = {}))[k] = options;\n })(target, key);\n };\n}\n","import { computed, reactive, ref, toRefs } from '@vue/composition-api'\n\nimport CommonUtils from '@/util/common-util'\nimport { DateFilterCodes } from '@/util/constants'\nimport moment from 'moment'\n\nexport const DATEFILTER_CODES = DateFilterCodes\nexport function useDateRange (props, context) {\n const { value } = toRefs(props)\n\n // using same v-model value for getting value and update parent on change\n const dateRangeSelected = computed({\n get: () => {\n return value.value\n },\n set: (modalValue: Date[]) => {\n context.emit('input', modalValue)\n }\n })\n // to keep track of old value on cancel rest to this value default value will props passed\n const oldSelectedRange = ref(value.value)\n\n const dateRangeSelectedDisplay = computed(() => {\n return dateRangeSelected.value.join(' - ')\n })\n\n const dateFilterRanges = reactive([\n {\n label: 'Today',\n code: DATEFILTER_CODES.TODAY\n },\n {\n label: 'Yesterday',\n code: DATEFILTER_CODES.YESTERDAY\n },\n {\n label: 'Last Week',\n code: DATEFILTER_CODES.LASTWEEK\n },\n {\n label: 'Last Month',\n code: DATEFILTER_CODES.LASTMONTH\n },\n {\n label: 'Custom Range',\n code: DATEFILTER_CODES.CUSTOMRANGE\n }\n ])\n\n const dateFilterSelectedIndex = ref(null)\n const dateFilterSelected: any = ref({})\n const showDateFilter = ref(false)\n const pickerDate = ref('')\n\n // apply filter button enable only if the date ranges are selected and start date <= end date\n const isApplyFilterBtnValid = computed(() => {\n if (\n dateRangeSelected.value.length === 2 &&\n dateRangeSelected.value[0] > dateRangeSelected.value[1]\n ) {\n dateRangeSelected.value = [\n dateRangeSelected.value[1],\n dateRangeSelected.value[0]\n ]\n }\n\n return (\n dateRangeSelected.value[0] &&\n dateRangeSelected.value[1] &&\n dateRangeSelected.value[0] <= dateRangeSelected.value[1]\n )\n })\n\n const showDateRangeSelected = computed(() => {\n let dateText = ''\n if (\n dateFilterSelected.value.code === DATEFILTER_CODES.TODAY ||\n dateFilterSelected.value.code === DATEFILTER_CODES.YESTERDAY\n ) {\n dateText = `${\n dateFilterSelected.value.label\n }: ${CommonUtils.formatDisplayDate(\n dateRangeSelected.value[0],\n 'MM-DD-YYYY'\n )}`\n } else {\n dateText = `${dateFilterSelected.value?.label}: \n ${CommonUtils.formatDisplayDate(\n dateRangeSelected.value[0],\n 'MM-DD-YYYY'\n )} \n - ${CommonUtils.formatDisplayDate(\n dateRangeSelected.value[1],\n 'MM-DD-YYYY'\n )}`\n }\n\n return dateFilterSelected.value?.code\n ? dateText\n : 'No dates selected'\n })\n\n function formatDatePickerDate (dateObj) {\n return dateObj.format('YYYY-MM-DD')\n }\n\n function dateFilterChange (val) {\n if (val > -1) {\n dateFilterSelected.value = dateFilterRanges[val]\n switch (dateFilterSelected.value.code) {\n case DATEFILTER_CODES.TODAY:\n // eslint-disable-next-line no-case-declarations\n const today = formatDatePickerDate(moment())\n dateRangeSelected.value = [today, today]\n pickerDate.value = today.slice(0, -3)\n break\n case DATEFILTER_CODES.YESTERDAY:\n // eslint-disable-next-line no-case-declarations\n const yesterday = formatDatePickerDate(moment().subtract(1, 'days'))\n dateRangeSelected.value = [yesterday, yesterday]\n pickerDate.value = yesterday.slice(0, -3)\n break\n case DATEFILTER_CODES.LASTWEEK:\n // Week should start from Monday and Ends on Sunday\n // eslint-disable-next-line no-case-declarations\n const weekStart = formatDatePickerDate(\n moment()\n .subtract(1, 'weeks')\n .startOf('isoWeek')\n )\n // eslint-disable-next-line no-case-declarations\n const weekEnd = formatDatePickerDate(\n moment()\n .subtract(1, 'weeks')\n .endOf('isoWeek')\n )\n dateRangeSelected.value = [weekStart, weekEnd]\n pickerDate.value = weekStart.slice(0, -3)\n break\n case DATEFILTER_CODES.LASTMONTH:\n // eslint-disable-next-line no-case-declarations\n const monthStart = formatDatePickerDate(\n moment()\n .subtract(1, 'months')\n .startOf('month')\n )\n // eslint-disable-next-line no-case-declarations\n const monthEnd = formatDatePickerDate(\n moment()\n .subtract(1, 'months')\n .endOf('month')\n )\n dateRangeSelected.value = [monthStart, monthEnd]\n pickerDate.value = monthStart.slice(0, -3)\n break\n case DATEFILTER_CODES.CUSTOMRANGE:\n pickerDate.value = ''\n }\n }\n }\n\n function dateClick (date) {\n pickerDate.value = ''\n // ideally it should find using DATEFILTER_CODES.CUSTOMRANGE, but since its static and date click is often, better give the index as it is\n dateFilterSelectedIndex.value = 4 // 4 = Custom Range\n dateFilterSelected.value = dateFilterRanges[dateFilterSelectedIndex.value]\n }\n\n function applyDateFilter () {\n // emit applied event so that we can hook to any @change event in parent. By default, v-model with parent variable is in sync all the time\n context.emit('applied', dateRangeSelected)\n // updating old value on appy click\n oldSelectedRange.value = dateRangeSelected.value\n showDateFilter.value = false\n }\n function cancelDateFilter () {\n // on cancel we need to rest to previous value, which we stored in oldSelectedRange\n dateRangeSelected.value = oldSelectedRange.value\n showDateFilter.value = false\n }\n\n return {\n dateFilterRanges,\n dateRangeSelected,\n dateFilterSelectedIndex,\n dateRangeSelectedDisplay,\n dateFilterSelected,\n showDateFilter,\n pickerDate,\n dateFilterChange,\n isApplyFilterBtnValid,\n dateClick,\n applyDateFilter,\n showDateRangeSelected,\n cancelDateFilter\n }\n}\n","/*\nComposable function for SearchColumn Filter component. It tracks the columns\nthat are present in a parent data-table and tracks display property to true/false\n*/\n\nimport { computed, toRefs } from '@vue/composition-api'\n\nexport function useSearchColumnFilterComponent (props, context) {\n const { value } = toRefs(props)\n\n // using same v-model value for getting value and update parent on change\n const selectedHeaderSearchList = computed({\n get: () => {\n return value.value\n },\n set: (modalValue: any[]) => {\n context.emit('input', modalValue)\n }\n })\n\n return {\n selectedHeaderSearchList\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 Apply\n \n \n Cancel\n \n
\n \n
\n
\n \n \n
\n\n","\n\n\n\n","\n\n \n \n \n !header.hideInSearchColumnFilter)\"\n :key=\"i\"\n >\n \n \n \n \n\n","\n\n\n","\n\n","\n
\n","\n\n\n\n\n","import CommonUtils from '@/util/common-util'\nimport { useRoutingSlip } from '../useRoutingSlip'\n\nexport function useDashboard (_, context) {\n const { resetRoutingSlipDetails } = useRoutingSlip()\n const appendQueryParamsIfNeeded = CommonUtils.appendQueryParamsIfNeeded\n\n function addRoutingSlip (): void {\n // we need to clear out the routing slip store before rendering the create slip component\n resetRoutingSlipDetails()\n // navigate now\n // Check if we had come from Staff dashboard\n context.root.$router.push(appendQueryParamsIfNeeded('/create-routing-slip', context.root.$route))\n }\n\n return {\n addRoutingSlip\n }\n}\n","import { DirectiveBinding } from 'vue/types/options'\nimport { DirectiveOptions } from 'vue'\nimport KeyCloakService from 'sbc-common-components/src/services/keycloak.services'\nimport { VNode } from 'vue/types'\n\ninterface CustomHTMLElement extends HTMLElement {\n disabled: boolean\n readOnly: boolean\n}\n\nconst can: DirectiveOptions = {\n inserted (el, binding, node) {\n canAccess(binding, el, node)\n },\n componentUpdated (el, binding, node) {\n canAccess(binding, el, node)\n }\n}\n\nfunction canAccess (binding: DirectiveBinding, el: HTMLElement, node: VNode) {\n const behaviour = binding.modifiers.disable ? 'disable' : 'hide'\n // to handle special elements like v-card etc\n const isCard = !!binding.modifiers.card\n const requestedAction:any = [binding.arg]\n const customeEl = el as CustomHTMLElement\n const okayToAccess = KeyCloakService.verifyRoles(requestedAction, [])\n // if not okay , hide or disable\n if (!okayToAccess) {\n if (behaviour === 'hide') {\n commentNode(el, node)\n } else if (behaviour === 'disable' && isCard === false) {\n customeEl.disabled = true\n } else if (behaviour === 'disable' && isCard === true) {\n // TODO tab still works.. can tab to the text field and make it work\n customeEl.classList.add('v-card--disabled')\n customeEl.style.pointerEvents = 'none'\n }\n }\n}\n\n/**\n * Create comment node\n *\n * @private\n * @author https://stackoverflow.com/questions/43003976/a-custom-directive-similar-to-v-if-in-vuejs#43543814\n */\nfunction commentNode (el: HTMLElement, vnode: VNode) {\n const comment = document.createComment(' ')\n\n Object.defineProperty(comment, 'setAttribute', {\n value: () => undefined\n })\n\n vnode.text = ' '\n vnode.elm = comment\n vnode.isComment = true\n vnode.tag = undefined\n\n vnode.data = vnode.data || {}\n vnode.data.directives = undefined\n\n if (vnode.componentInstance) {\n // @ts-ignore\n vnode.componentInstance.$el = comment\n }\n\n if (el.parentNode) {\n el.parentNode.replaceChild(comment, el)\n }\n}\nexport default can\n","\n \n \n \n \n {{\n item.remainingAmount\n ? appendCurrencySymbol(item.remainingAmount.toFixed(2))\n : '-'\n }}\n \n \n \n \n Open\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 mdi-plus\n \n Add New Routing Slip\n \n \n \n \n Access Fee Accounting System\n \n mdi-open-in-new\n \n \n \n \n \n \n \n \n \n \n
\n \n mdi-view-list\n \n

\n {{ isLibraryMode ? 'Recent Routing Slip' : 'Search Routing Slip' }}\n

\n
\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n {{\n item.remainingAmount\n ? appendCurrencySymbol(item.remainingAmount.toFixed(2))\n : '-'\n }}\n \n \n \n \n Open\n \n \n \n \n \n\n \n \n \n \n \n \n
\n
\n
\n","/*!\n * vue-i18n v8.28.2 \n * (c) 2022 kazuya kawaguchi\n * Released under the MIT License.\n */\n/* */\n\n/**\n * constants\n */\n\nvar numberFormatKeys = [\n 'compactDisplay',\n 'currency',\n 'currencyDisplay',\n 'currencySign',\n 'localeMatcher',\n 'notation',\n 'numberingSystem',\n 'signDisplay',\n 'style',\n 'unit',\n 'unitDisplay',\n 'useGrouping',\n 'minimumIntegerDigits',\n 'minimumFractionDigits',\n 'maximumFractionDigits',\n 'minimumSignificantDigits',\n 'maximumSignificantDigits'\n];\n\nvar dateTimeFormatKeys = [\n 'dateStyle',\n 'timeStyle',\n 'calendar',\n 'localeMatcher',\n \"hour12\",\n \"hourCycle\",\n \"timeZone\",\n \"formatMatcher\",\n 'weekday',\n 'era',\n 'year',\n 'month',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'timeZoneName' ];\n\n/**\n * utilities\n */\n\nfunction warn (msg, err) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-i18n] ' + msg);\n /* istanbul ignore if */\n if (err) {\n console.warn(err.stack);\n }\n }\n}\n\nfunction error (msg, err) {\n if (typeof console !== 'undefined') {\n console.error('[vue-i18n] ' + msg);\n /* istanbul ignore if */\n if (err) {\n console.error(err.stack);\n }\n }\n}\n\nvar isArray = Array.isArray;\n\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\nfunction isBoolean (val) {\n return typeof val === 'boolean'\n}\n\nfunction isString (val) {\n return typeof val === 'string'\n}\n\nvar toString = Object.prototype.toString;\nvar OBJECT_STRING = '[object Object]';\nfunction isPlainObject (obj) {\n return toString.call(obj) === OBJECT_STRING\n}\n\nfunction isNull (val) {\n return val === null || val === undefined\n}\n\nfunction isFunction (val) {\n return typeof val === 'function'\n}\n\nfunction parseArgs () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var locale = null;\n var params = null;\n if (args.length === 1) {\n if (isObject(args[0]) || isArray(args[0])) {\n params = args[0];\n } else if (typeof args[0] === 'string') {\n locale = args[0];\n }\n } else if (args.length === 2) {\n if (typeof args[0] === 'string') {\n locale = args[0];\n }\n /* istanbul ignore if */\n if (isObject(args[1]) || isArray(args[1])) {\n params = args[1];\n }\n }\n\n return { locale: locale, params: params }\n}\n\nfunction looseClone (obj) {\n return JSON.parse(JSON.stringify(obj))\n}\n\nfunction remove (arr, item) {\n if (arr.delete(item)) {\n return arr\n }\n}\n\nfunction arrayFrom (arr) {\n var ret = [];\n arr.forEach(function (a) { return ret.push(a); });\n return ret\n}\n\nfunction includes (arr, item) {\n return !!~arr.indexOf(item)\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n return hasOwnProperty.call(obj, key)\n}\n\nfunction merge (target) {\n var arguments$1 = arguments;\n\n var output = Object(target);\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments$1[i];\n if (source !== undefined && source !== null) {\n var key = (void 0);\n for (key in source) {\n if (hasOwn(source, key)) {\n if (isObject(source[key])) {\n output[key] = merge(output[key], source[key]);\n } else {\n output[key] = source[key];\n }\n }\n }\n }\n }\n return output\n}\n\nfunction looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = isArray(a);\n var isArrayB = isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}\n\n/**\n * Sanitizes html special characters from input strings. For mitigating risk of XSS attacks.\n * @param rawText The raw input from the user that should be escaped.\n */\nfunction escapeHtml(rawText) {\n return rawText\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n}\n\n/**\n * Escapes html tags and special symbols from all provided params which were returned from parseArgs().params.\n * This method performs an in-place operation on the params object.\n *\n * @param {any} params Parameters as provided from `parseArgs().params`.\n * May be either an array of strings or a string->any map.\n *\n * @returns The manipulated `params` object.\n */\nfunction escapeParams(params) {\n if(params != null) {\n Object.keys(params).forEach(function (key) {\n if(typeof(params[key]) == 'string') {\n params[key] = escapeHtml(params[key]);\n }\n });\n }\n return params\n}\n\n/* */\n\nfunction extend (Vue) {\n if (!Vue.prototype.hasOwnProperty('$i18n')) {\n // $FlowFixMe\n Object.defineProperty(Vue.prototype, '$i18n', {\n get: function get () { return this._i18n }\n });\n }\n\n Vue.prototype.$t = function (key) {\n var values = [], len = arguments.length - 1;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];\n\n var i18n = this.$i18n;\n return i18n._t.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this ].concat( values ))\n };\n\n Vue.prototype.$tc = function (key, choice) {\n var values = [], len = arguments.length - 2;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];\n\n var i18n = this.$i18n;\n return i18n._tc.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this, choice ].concat( values ))\n };\n\n Vue.prototype.$te = function (key, locale) {\n var i18n = this.$i18n;\n return i18n._te(key, i18n.locale, i18n._getMessages(), locale)\n };\n\n Vue.prototype.$d = function (value) {\n var ref;\n\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n return (ref = this.$i18n).d.apply(ref, [ value ].concat( args ))\n };\n\n Vue.prototype.$n = function (value) {\n var ref;\n\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n return (ref = this.$i18n).n.apply(ref, [ value ].concat( args ))\n };\n}\n\n/* */\n\n/**\n * Mixin\n * \n * If `bridge` mode, empty mixin is returned,\n * else regulary mixin implementation is returned.\n */\nfunction defineMixin (bridge) {\n if ( bridge === void 0 ) bridge = false;\n\n function mounted () {\n if (this !== this.$root && this.$options.__INTLIFY_META__ && this.$el) {\n this.$el.setAttribute('data-intlify', this.$options.__INTLIFY_META__);\n }\n }\n\n return bridge\n ? { mounted: mounted } // delegate `vue-i18n-bridge` mixin implementation\n : { // regulary \n beforeCreate: function beforeCreate () {\n var options = this.$options;\n options.i18n = options.i18n || ((options.__i18nBridge || options.__i18n) ? {} : null);\n\n if (options.i18n) {\n if (options.i18n instanceof VueI18n) {\n // init locale messages via custom blocks\n if ((options.__i18nBridge || options.__i18n)) {\n try {\n var localeMessages = options.i18n && options.i18n.messages ? options.i18n.messages : {};\n var _i18n = options.__i18nBridge || options.__i18n;\n _i18n.forEach(function (resource) {\n localeMessages = merge(localeMessages, JSON.parse(resource));\n });\n Object.keys(localeMessages).forEach(function (locale) {\n options.i18n.mergeLocaleMessage(locale, localeMessages[locale]);\n });\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n error(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n this._i18n = options.i18n;\n this._i18nWatcher = this._i18n.watchI18nData();\n } else if (isPlainObject(options.i18n)) {\n var rootI18n = this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n\n ? this.$root.$i18n\n : null;\n // component local i18n\n if (rootI18n) {\n options.i18n.root = this.$root;\n options.i18n.formatter = rootI18n.formatter;\n options.i18n.fallbackLocale = rootI18n.fallbackLocale;\n options.i18n.formatFallbackMessages = rootI18n.formatFallbackMessages;\n options.i18n.silentTranslationWarn = rootI18n.silentTranslationWarn;\n options.i18n.silentFallbackWarn = rootI18n.silentFallbackWarn;\n options.i18n.pluralizationRules = rootI18n.pluralizationRules;\n options.i18n.preserveDirectiveContent = rootI18n.preserveDirectiveContent;\n }\n\n // init locale messages via custom blocks\n if ((options.__i18nBridge || options.__i18n)) {\n try {\n var localeMessages$1 = options.i18n && options.i18n.messages ? options.i18n.messages : {};\n var _i18n$1 = options.__i18nBridge || options.__i18n;\n _i18n$1.forEach(function (resource) {\n localeMessages$1 = merge(localeMessages$1, JSON.parse(resource));\n });\n options.i18n.messages = localeMessages$1;\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n\n var ref = options.i18n;\n var sharedMessages = ref.sharedMessages;\n if (sharedMessages && isPlainObject(sharedMessages)) {\n options.i18n.messages = merge(options.i18n.messages, sharedMessages);\n }\n\n this._i18n = new VueI18n(options.i18n);\n this._i18nWatcher = this._i18n.watchI18nData();\n\n if (options.i18n.sync === undefined || !!options.i18n.sync) {\n this._localeWatcher = this.$i18n.watchLocale();\n }\n\n if (rootI18n) {\n rootI18n.onComponentInstanceCreated(this._i18n);\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot be interpreted 'i18n' option.\");\n }\n }\n } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n // root i18n\n this._i18n = this.$root.$i18n;\n } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {\n // parent i18n\n this._i18n = options.parent.$i18n;\n }\n },\n\n beforeMount: function beforeMount () {\n var options = this.$options;\n options.i18n = options.i18n || ((options.__i18nBridge || options.__i18n) ? {} : null);\n\n if (options.i18n) {\n if (options.i18n instanceof VueI18n) {\n // init locale messages via custom blocks\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else if (isPlainObject(options.i18n)) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot be interpreted 'i18n' option.\");\n }\n }\n } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n }\n },\n\n mounted: mounted,\n\n beforeDestroy: function beforeDestroy () {\n if (!this._i18n) { return }\n\n var self = this;\n this.$nextTick(function () {\n if (self._subscribing) {\n self._i18n.unsubscribeDataChanging(self);\n delete self._subscribing;\n }\n\n if (self._i18nWatcher) {\n self._i18nWatcher();\n self._i18n.destroyVM();\n delete self._i18nWatcher;\n }\n\n if (self._localeWatcher) {\n self._localeWatcher();\n delete self._localeWatcher;\n }\n });\n }\n }\n}\n\n/* */\n\nvar interpolationComponent = {\n name: 'i18n',\n functional: true,\n props: {\n tag: {\n type: [String, Boolean, Object],\n default: 'span'\n },\n path: {\n type: String,\n required: true\n },\n locale: {\n type: String\n },\n places: {\n type: [Array, Object]\n }\n },\n render: function render (h, ref) {\n var data = ref.data;\n var parent = ref.parent;\n var props = ref.props;\n var slots = ref.slots;\n\n var $i18n = parent.$i18n;\n if (!$i18n) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot find VueI18n instance!');\n }\n return\n }\n\n var path = props.path;\n var locale = props.locale;\n var places = props.places;\n var params = slots();\n var children = $i18n.i(\n path,\n locale,\n onlyHasDefaultPlace(params) || places\n ? useLegacyPlaces(params.default, places)\n : params\n );\n\n var tag = (!!props.tag && props.tag !== true) || props.tag === false ? props.tag : 'span';\n return tag ? h(tag, data, children) : children\n }\n};\n\nfunction onlyHasDefaultPlace (params) {\n var prop;\n for (prop in params) {\n if (prop !== 'default') { return false }\n }\n return Boolean(prop)\n}\n\nfunction useLegacyPlaces (children, places) {\n var params = places ? createParamsFromPlaces(places) : {};\n\n if (!children) { return params }\n\n // Filter empty text nodes\n children = children.filter(function (child) {\n return child.tag || child.text.trim() !== ''\n });\n\n var everyPlace = children.every(vnodeHasPlaceAttribute);\n if (process.env.NODE_ENV !== 'production' && everyPlace) {\n warn('`place` attribute is deprecated in next major version. Please switch to Vue slots.');\n }\n\n return children.reduce(\n everyPlace ? assignChildPlace : assignChildIndex,\n params\n )\n}\n\nfunction createParamsFromPlaces (places) {\n if (process.env.NODE_ENV !== 'production') {\n warn('`places` prop is deprecated in next major version. Please switch to Vue slots.');\n }\n\n return Array.isArray(places)\n ? places.reduce(assignChildIndex, {})\n : Object.assign({}, places)\n}\n\nfunction assignChildPlace (params, child) {\n if (child.data && child.data.attrs && child.data.attrs.place) {\n params[child.data.attrs.place] = child;\n }\n return params\n}\n\nfunction assignChildIndex (params, child, index) {\n params[index] = child;\n return params\n}\n\nfunction vnodeHasPlaceAttribute (vnode) {\n return Boolean(vnode.data && vnode.data.attrs && vnode.data.attrs.place)\n}\n\n/* */\n\nvar numberComponent = {\n name: 'i18n-n',\n functional: true,\n props: {\n tag: {\n type: [String, Boolean, Object],\n default: 'span'\n },\n value: {\n type: Number,\n required: true\n },\n format: {\n type: [String, Object]\n },\n locale: {\n type: String\n }\n },\n render: function render (h, ref) {\n var props = ref.props;\n var parent = ref.parent;\n var data = ref.data;\n\n var i18n = parent.$i18n;\n\n if (!i18n) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot find VueI18n instance!');\n }\n return null\n }\n\n var key = null;\n var options = null;\n\n if (isString(props.format)) {\n key = props.format;\n } else if (isObject(props.format)) {\n if (props.format.key) {\n key = props.format.key;\n }\n\n // Filter out number format options only\n options = Object.keys(props.format).reduce(function (acc, prop) {\n var obj;\n\n if (includes(numberFormatKeys, prop)) {\n return Object.assign({}, acc, ( obj = {}, obj[prop] = props.format[prop], obj ))\n }\n return acc\n }, null);\n }\n\n var locale = props.locale || i18n.locale;\n var parts = i18n._ntp(props.value, locale, key, options);\n\n var values = parts.map(function (part, index) {\n var obj;\n\n var slot = data.scopedSlots && data.scopedSlots[part.type];\n return slot ? slot(( obj = {}, obj[part.type] = part.value, obj.index = index, obj.parts = parts, obj )) : part.value\n });\n\n var tag = (!!props.tag && props.tag !== true) || props.tag === false ? props.tag : 'span';\n return tag\n ? h(tag, {\n attrs: data.attrs,\n 'class': data['class'],\n staticClass: data.staticClass\n }, values)\n : values\n }\n};\n\n/* */\n\nfunction bind (el, binding, vnode) {\n if (!assert(el, vnode)) { return }\n\n t(el, binding, vnode);\n}\n\nfunction update (el, binding, vnode, oldVNode) {\n if (!assert(el, vnode)) { return }\n\n var i18n = vnode.context.$i18n;\n if (localeEqual(el, vnode) &&\n (looseEqual(binding.value, binding.oldValue) &&\n looseEqual(el._localeMessage, i18n.getLocaleMessage(i18n.locale)))) { return }\n\n t(el, binding, vnode);\n}\n\nfunction unbind (el, binding, vnode, oldVNode) {\n var vm = vnode.context;\n if (!vm) {\n warn('Vue instance does not exists in VNode context');\n return\n }\n\n var i18n = vnode.context.$i18n || {};\n if (!binding.modifiers.preserve && !i18n.preserveDirectiveContent) {\n el.textContent = '';\n }\n el._vt = undefined;\n delete el['_vt'];\n el._locale = undefined;\n delete el['_locale'];\n el._localeMessage = undefined;\n delete el['_localeMessage'];\n}\n\nfunction assert (el, vnode) {\n var vm = vnode.context;\n if (!vm) {\n warn('Vue instance does not exists in VNode context');\n return false\n }\n\n if (!vm.$i18n) {\n warn('VueI18n instance does not exists in Vue instance');\n return false\n }\n\n return true\n}\n\nfunction localeEqual (el, vnode) {\n var vm = vnode.context;\n return el._locale === vm.$i18n.locale\n}\n\nfunction t (el, binding, vnode) {\n var ref$1, ref$2;\n\n var value = binding.value;\n\n var ref = parseValue(value);\n var path = ref.path;\n var locale = ref.locale;\n var args = ref.args;\n var choice = ref.choice;\n if (!path && !locale && !args) {\n warn('value type not supported');\n return\n }\n\n if (!path) {\n warn('`path` is required in v-t directive');\n return\n }\n\n var vm = vnode.context;\n if (choice != null) {\n el._vt = el.textContent = (ref$1 = vm.$i18n).tc.apply(ref$1, [ path, choice ].concat( makeParams(locale, args) ));\n } else {\n el._vt = el.textContent = (ref$2 = vm.$i18n).t.apply(ref$2, [ path ].concat( makeParams(locale, args) ));\n }\n el._locale = vm.$i18n.locale;\n el._localeMessage = vm.$i18n.getLocaleMessage(vm.$i18n.locale);\n}\n\nfunction parseValue (value) {\n var path;\n var locale;\n var args;\n var choice;\n\n if (isString(value)) {\n path = value;\n } else if (isPlainObject(value)) {\n path = value.path;\n locale = value.locale;\n args = value.args;\n choice = value.choice;\n }\n\n return { path: path, locale: locale, args: args, choice: choice }\n}\n\nfunction makeParams (locale, args) {\n var params = [];\n\n locale && params.push(locale);\n if (args && (Array.isArray(args) || isPlainObject(args))) {\n params.push(args);\n }\n\n return params\n}\n\nvar Vue;\n\nfunction install (_Vue, options) {\n if ( options === void 0 ) options = { bridge: false };\n\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && install.installed && _Vue === Vue) {\n warn('already installed.');\n return\n }\n install.installed = true;\n\n Vue = _Vue;\n\n var version = (Vue.version && Number(Vue.version.split('.')[0])) || -1;\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && version < 2) {\n warn((\"vue-i18n (\" + (install.version) + \") need to use Vue 2.0 or later (Vue: \" + (Vue.version) + \").\"));\n return\n }\n\n extend(Vue);\n Vue.mixin(defineMixin(options.bridge));\n Vue.directive('t', { bind: bind, update: update, unbind: unbind });\n Vue.component(interpolationComponent.name, interpolationComponent);\n Vue.component(numberComponent.name, numberComponent);\n\n // use simple mergeStrategies to prevent i18n instance lose '__proto__'\n var strats = Vue.config.optionMergeStrategies;\n strats.i18n = function (parentVal, childVal) {\n return childVal === undefined\n ? parentVal\n : childVal\n };\n}\n\n/* */\n\nvar BaseFormatter = function BaseFormatter () {\n this._caches = Object.create(null);\n};\n\nBaseFormatter.prototype.interpolate = function interpolate (message, values) {\n if (!values) {\n return [message]\n }\n var tokens = this._caches[message];\n if (!tokens) {\n tokens = parse(message);\n this._caches[message] = tokens;\n }\n return compile(tokens, values)\n};\n\n\n\nvar RE_TOKEN_LIST_VALUE = /^(?:\\d)+/;\nvar RE_TOKEN_NAMED_VALUE = /^(?:\\w)+/;\n\nfunction parse (format) {\n var tokens = [];\n var position = 0;\n\n var text = '';\n while (position < format.length) {\n var char = format[position++];\n if (char === '{') {\n if (text) {\n tokens.push({ type: 'text', value: text });\n }\n\n text = '';\n var sub = '';\n char = format[position++];\n while (char !== undefined && char !== '}') {\n sub += char;\n char = format[position++];\n }\n var isClosed = char === '}';\n\n var type = RE_TOKEN_LIST_VALUE.test(sub)\n ? 'list'\n : isClosed && RE_TOKEN_NAMED_VALUE.test(sub)\n ? 'named'\n : 'unknown';\n tokens.push({ value: sub, type: type });\n } else if (char === '%') {\n // when found rails i18n syntax, skip text capture\n if (format[(position)] !== '{') {\n text += char;\n }\n } else {\n text += char;\n }\n }\n\n text && tokens.push({ type: 'text', value: text });\n\n return tokens\n}\n\nfunction compile (tokens, values) {\n var compiled = [];\n var index = 0;\n\n var mode = Array.isArray(values)\n ? 'list'\n : isObject(values)\n ? 'named'\n : 'unknown';\n if (mode === 'unknown') { return compiled }\n\n while (index < tokens.length) {\n var token = tokens[index];\n switch (token.type) {\n case 'text':\n compiled.push(token.value);\n break\n case 'list':\n compiled.push(values[parseInt(token.value, 10)]);\n break\n case 'named':\n if (mode === 'named') {\n compiled.push((values)[token.value]);\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Type of token '\" + (token.type) + \"' and format of value '\" + mode + \"' don't match!\"));\n }\n }\n break\n case 'unknown':\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Detect 'unknown' type of token!\");\n }\n break\n }\n index++;\n }\n\n return compiled\n}\n\n/* */\n\n/**\n * Path parser\n * - Inspired:\n * Vue.js Path parser\n */\n\n// actions\nvar APPEND = 0;\nvar PUSH = 1;\nvar INC_SUB_PATH_DEPTH = 2;\nvar PUSH_SUB_PATH = 3;\n\n// states\nvar BEFORE_PATH = 0;\nvar IN_PATH = 1;\nvar BEFORE_IDENT = 2;\nvar IN_IDENT = 3;\nvar IN_SUB_PATH = 4;\nvar IN_SINGLE_QUOTE = 5;\nvar IN_DOUBLE_QUOTE = 6;\nvar AFTER_PATH = 7;\nvar ERROR = 8;\n\nvar pathStateMachine = [];\n\npathStateMachine[BEFORE_PATH] = {\n 'ws': [BEFORE_PATH],\n 'ident': [IN_IDENT, APPEND],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\n\npathStateMachine[IN_PATH] = {\n 'ws': [IN_PATH],\n '.': [BEFORE_IDENT],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\n\npathStateMachine[BEFORE_IDENT] = {\n 'ws': [BEFORE_IDENT],\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND]\n};\n\npathStateMachine[IN_IDENT] = {\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND],\n 'ws': [IN_PATH, PUSH],\n '.': [BEFORE_IDENT, PUSH],\n '[': [IN_SUB_PATH, PUSH],\n 'eof': [AFTER_PATH, PUSH]\n};\n\npathStateMachine[IN_SUB_PATH] = {\n \"'\": [IN_SINGLE_QUOTE, APPEND],\n '\"': [IN_DOUBLE_QUOTE, APPEND],\n '[': [IN_SUB_PATH, INC_SUB_PATH_DEPTH],\n ']': [IN_PATH, PUSH_SUB_PATH],\n 'eof': ERROR,\n 'else': [IN_SUB_PATH, APPEND]\n};\n\npathStateMachine[IN_SINGLE_QUOTE] = {\n \"'\": [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_SINGLE_QUOTE, APPEND]\n};\n\npathStateMachine[IN_DOUBLE_QUOTE] = {\n '\"': [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_DOUBLE_QUOTE, APPEND]\n};\n\n/**\n * Check if an expression is a literal value.\n */\n\nvar literalValueRE = /^\\s?(?:true|false|-?[\\d.]+|'[^']*'|\"[^\"]*\")\\s?$/;\nfunction isLiteral (exp) {\n return literalValueRE.test(exp)\n}\n\n/**\n * Strip quotes from a string\n */\n\nfunction stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}\n\n/**\n * Determine the type of a character in a keypath.\n */\n\nfunction getPathCharType (ch) {\n if (ch === undefined || ch === null) { return 'eof' }\n\n var code = ch.charCodeAt(0);\n\n switch (code) {\n case 0x5B: // [\n case 0x5D: // ]\n case 0x2E: // .\n case 0x22: // \"\n case 0x27: // '\n return ch\n\n case 0x5F: // _\n case 0x24: // $\n case 0x2D: // -\n return 'ident'\n\n case 0x09: // Tab\n case 0x0A: // Newline\n case 0x0D: // Return\n case 0xA0: // No-break space\n case 0xFEFF: // Byte Order Mark\n case 0x2028: // Line Separator\n case 0x2029: // Paragraph Separator\n return 'ws'\n }\n\n return 'ident'\n}\n\n/**\n * Format a subPath, return its plain form if it is\n * a literal string or number. Otherwise prepend the\n * dynamic indicator (*).\n */\n\nfunction formatSubPath (path) {\n var trimmed = path.trim();\n // invalid leading 0\n if (path.charAt(0) === '0' && isNaN(path)) { return false }\n\n return isLiteral(trimmed) ? stripQuotes(trimmed) : '*' + trimmed\n}\n\n/**\n * Parse a string path into an array of segments\n */\n\nfunction parse$1 (path) {\n var keys = [];\n var index = -1;\n var mode = BEFORE_PATH;\n var subPathDepth = 0;\n var c;\n var key;\n var newChar;\n var type;\n var transition;\n var action;\n var typeMap;\n var actions = [];\n\n actions[PUSH] = function () {\n if (key !== undefined) {\n keys.push(key);\n key = undefined;\n }\n };\n\n actions[APPEND] = function () {\n if (key === undefined) {\n key = newChar;\n } else {\n key += newChar;\n }\n };\n\n actions[INC_SUB_PATH_DEPTH] = function () {\n actions[APPEND]();\n subPathDepth++;\n };\n\n actions[PUSH_SUB_PATH] = function () {\n if (subPathDepth > 0) {\n subPathDepth--;\n mode = IN_SUB_PATH;\n actions[APPEND]();\n } else {\n subPathDepth = 0;\n if (key === undefined) { return false }\n key = formatSubPath(key);\n if (key === false) {\n return false\n } else {\n actions[PUSH]();\n }\n }\n };\n\n function maybeUnescapeQuote () {\n var nextChar = path[index + 1];\n if ((mode === IN_SINGLE_QUOTE && nextChar === \"'\") ||\n (mode === IN_DOUBLE_QUOTE && nextChar === '\"')) {\n index++;\n newChar = '\\\\' + nextChar;\n actions[APPEND]();\n return true\n }\n }\n\n while (mode !== null) {\n index++;\n c = path[index];\n\n if (c === '\\\\' && maybeUnescapeQuote()) {\n continue\n }\n\n type = getPathCharType(c);\n typeMap = pathStateMachine[mode];\n transition = typeMap[type] || typeMap['else'] || ERROR;\n\n if (transition === ERROR) {\n return // parse error\n }\n\n mode = transition[0];\n action = actions[transition[1]];\n if (action) {\n newChar = transition[2];\n newChar = newChar === undefined\n ? c\n : newChar;\n if (action() === false) {\n return\n }\n }\n\n if (mode === AFTER_PATH) {\n return keys\n }\n }\n}\n\n\n\n\n\nvar I18nPath = function I18nPath () {\n this._cache = Object.create(null);\n};\n\n/**\n * External parse that check for a cache hit first\n */\nI18nPath.prototype.parsePath = function parsePath (path) {\n var hit = this._cache[path];\n if (!hit) {\n hit = parse$1(path);\n if (hit) {\n this._cache[path] = hit;\n }\n }\n return hit || []\n};\n\n/**\n * Get path value from path string\n */\nI18nPath.prototype.getPathValue = function getPathValue (obj, path) {\n if (!isObject(obj)) { return null }\n\n var paths = this.parsePath(path);\n if (paths.length === 0) {\n return null\n } else {\n var length = paths.length;\n var last = obj;\n var i = 0;\n while (i < length) {\n var value = last[paths[i]];\n if (value === undefined || value === null) {\n return null\n }\n last = value;\n i++;\n }\n\n return last\n }\n};\n\n/* */\n\n\n\nvar htmlTagMatcher = /<\\/?[\\w\\s=\"/.':;#-\\/]+>/;\nvar linkKeyMatcher = /(?:@(?:\\.[a-zA-Z]+)?:(?:[\\w\\-_|./]+|\\([\\w\\-_:|./]+\\)))/g;\nvar linkKeyPrefixMatcher = /^@(?:\\.([a-zA-Z]+))?:/;\nvar bracketsMatcher = /[()]/g;\nvar defaultModifiers = {\n 'upper': function (str) { return str.toLocaleUpperCase(); },\n 'lower': function (str) { return str.toLocaleLowerCase(); },\n 'capitalize': function (str) { return (\"\" + (str.charAt(0).toLocaleUpperCase()) + (str.substr(1))); }\n};\n\nvar defaultFormatter = new BaseFormatter();\n\nvar VueI18n = function VueI18n (options) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n // Auto install if it is not done yet and `window` has `Vue`.\n // To allow users to avoid auto-installation in some cases,\n // this code should be placed here. See #290\n /* istanbul ignore if */\n if (!Vue && typeof window !== 'undefined' && window.Vue) {\n install(window.Vue);\n }\n\n var locale = options.locale || 'en-US';\n var fallbackLocale = options.fallbackLocale === false\n ? false\n : options.fallbackLocale || 'en-US';\n var messages = options.messages || {};\n var dateTimeFormats = options.dateTimeFormats || options.datetimeFormats || {};\n var numberFormats = options.numberFormats || {};\n\n this._vm = null;\n this._formatter = options.formatter || defaultFormatter;\n this._modifiers = options.modifiers || {};\n this._missing = options.missing || null;\n this._root = options.root || null;\n this._sync = options.sync === undefined ? true : !!options.sync;\n this._fallbackRoot = options.fallbackRoot === undefined\n ? true\n : !!options.fallbackRoot;\n this._fallbackRootWithEmptyString = options.fallbackRootWithEmptyString === undefined\n ? true\n : !!options.fallbackRootWithEmptyString;\n this._formatFallbackMessages = options.formatFallbackMessages === undefined\n ? false\n : !!options.formatFallbackMessages;\n this._silentTranslationWarn = options.silentTranslationWarn === undefined\n ? false\n : options.silentTranslationWarn;\n this._silentFallbackWarn = options.silentFallbackWarn === undefined\n ? false\n : !!options.silentFallbackWarn;\n this._dateTimeFormatters = {};\n this._numberFormatters = {};\n this._path = new I18nPath();\n this._dataListeners = new Set();\n this._componentInstanceCreatedListener = options.componentInstanceCreatedListener || null;\n this._preserveDirectiveContent = options.preserveDirectiveContent === undefined\n ? false\n : !!options.preserveDirectiveContent;\n this.pluralizationRules = options.pluralizationRules || {};\n this._warnHtmlInMessage = options.warnHtmlInMessage || 'off';\n this._postTranslation = options.postTranslation || null;\n this._escapeParameterHtml = options.escapeParameterHtml || false;\n\n if ('__VUE_I18N_BRIDGE__' in options) {\n this.__VUE_I18N_BRIDGE__ = options.__VUE_I18N_BRIDGE__;\n }\n\n /**\n * @param choice {number} a choice index given by the input to $tc: `$tc('path.to.rule', choiceIndex)`\n * @param choicesLength {number} an overall amount of available choices\n * @returns a final choice index\n */\n this.getChoiceIndex = function (choice, choicesLength) {\n var thisPrototype = Object.getPrototypeOf(this$1);\n if (thisPrototype && thisPrototype.getChoiceIndex) {\n var prototypeGetChoiceIndex = (thisPrototype.getChoiceIndex);\n return (prototypeGetChoiceIndex).call(this$1, choice, choicesLength)\n }\n\n // Default (old) getChoiceIndex implementation - english-compatible\n var defaultImpl = function (_choice, _choicesLength) {\n _choice = Math.abs(_choice);\n\n if (_choicesLength === 2) {\n return _choice\n ? _choice > 1\n ? 1\n : 0\n : 1\n }\n\n return _choice ? Math.min(_choice, 2) : 0\n };\n\n if (this$1.locale in this$1.pluralizationRules) {\n return this$1.pluralizationRules[this$1.locale].apply(this$1, [choice, choicesLength])\n } else {\n return defaultImpl(choice, choicesLength)\n }\n };\n\n\n this._exist = function (message, key) {\n if (!message || !key) { return false }\n if (!isNull(this$1._path.getPathValue(message, key))) { return true }\n // fallback for flat key\n if (message[key]) { return true }\n return false\n };\n\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n Object.keys(messages).forEach(function (locale) {\n this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);\n });\n }\n\n this._initVM({\n locale: locale,\n fallbackLocale: fallbackLocale,\n messages: messages,\n dateTimeFormats: dateTimeFormats,\n numberFormats: numberFormats\n });\n};\n\nvar prototypeAccessors = { vm: { configurable: true },messages: { configurable: true },dateTimeFormats: { configurable: true },numberFormats: { configurable: true },availableLocales: { configurable: true },locale: { configurable: true },fallbackLocale: { configurable: true },formatFallbackMessages: { configurable: true },missing: { configurable: true },formatter: { configurable: true },silentTranslationWarn: { configurable: true },silentFallbackWarn: { configurable: true },preserveDirectiveContent: { configurable: true },warnHtmlInMessage: { configurable: true },postTranslation: { configurable: true },sync: { configurable: true } };\n\nVueI18n.prototype._checkLocaleMessage = function _checkLocaleMessage (locale, level, message) {\n var paths = [];\n\n var fn = function (level, locale, message, paths) {\n if (isPlainObject(message)) {\n Object.keys(message).forEach(function (key) {\n var val = message[key];\n if (isPlainObject(val)) {\n paths.push(key);\n paths.push('.');\n fn(level, locale, val, paths);\n paths.pop();\n paths.pop();\n } else {\n paths.push(key);\n fn(level, locale, val, paths);\n paths.pop();\n }\n });\n } else if (isArray(message)) {\n message.forEach(function (item, index) {\n if (isPlainObject(item)) {\n paths.push((\"[\" + index + \"]\"));\n paths.push('.');\n fn(level, locale, item, paths);\n paths.pop();\n paths.pop();\n } else {\n paths.push((\"[\" + index + \"]\"));\n fn(level, locale, item, paths);\n paths.pop();\n }\n });\n } else if (isString(message)) {\n var ret = htmlTagMatcher.test(message);\n if (ret) {\n var msg = \"Detected HTML in message '\" + message + \"' of keypath '\" + (paths.join('')) + \"' at '\" + locale + \"'. Consider component interpolation with '' to avoid XSS. See https://bit.ly/2ZqJzkp\";\n if (level === 'warn') {\n warn(msg);\n } else if (level === 'error') {\n error(msg);\n }\n }\n }\n };\n\n fn(level, locale, message, paths);\n};\n\nVueI18n.prototype._initVM = function _initVM (data) {\n var silent = Vue.config.silent;\n Vue.config.silent = true;\n this._vm = new Vue({ data: data, __VUE18N__INSTANCE__: true });\n Vue.config.silent = silent;\n};\n\nVueI18n.prototype.destroyVM = function destroyVM () {\n this._vm.$destroy();\n};\n\nVueI18n.prototype.subscribeDataChanging = function subscribeDataChanging (vm) {\n this._dataListeners.add(vm);\n};\n\nVueI18n.prototype.unsubscribeDataChanging = function unsubscribeDataChanging (vm) {\n remove(this._dataListeners, vm);\n};\n\nVueI18n.prototype.watchI18nData = function watchI18nData () {\n var this$1 = this;\n return this._vm.$watch('$data', function () {\n var listeners = arrayFrom(this$1._dataListeners);\n var i = listeners.length;\n while(i--) {\n Vue.nextTick(function () {\n listeners[i] && listeners[i].$forceUpdate();\n });\n }\n }, { deep: true })\n};\n\nVueI18n.prototype.watchLocale = function watchLocale (composer) {\n if (!composer) {\n /* istanbul ignore if */\n if (!this._sync || !this._root) { return null }\n var target = this._vm;\n return this._root.$i18n.vm.$watch('locale', function (val) {\n target.$set(target, 'locale', val);\n target.$forceUpdate();\n }, { immediate: true })\n } else {\n // deal with vue-i18n-bridge\n if (!this.__VUE_I18N_BRIDGE__) { return null }\n var self = this;\n var target$1 = this._vm;\n return this.vm.$watch('locale', function (val) {\n target$1.$set(target$1, 'locale', val);\n if (self.__VUE_I18N_BRIDGE__ && composer) {\n composer.locale.value = val;\n }\n target$1.$forceUpdate();\n }, { immediate: true })\n }\n};\n\nVueI18n.prototype.onComponentInstanceCreated = function onComponentInstanceCreated (newI18n) {\n if (this._componentInstanceCreatedListener) {\n this._componentInstanceCreatedListener(newI18n, this);\n }\n};\n\nprototypeAccessors.vm.get = function () { return this._vm };\n\nprototypeAccessors.messages.get = function () { return looseClone(this._getMessages()) };\nprototypeAccessors.dateTimeFormats.get = function () { return looseClone(this._getDateTimeFormats()) };\nprototypeAccessors.numberFormats.get = function () { return looseClone(this._getNumberFormats()) };\nprototypeAccessors.availableLocales.get = function () { return Object.keys(this.messages).sort() };\n\nprototypeAccessors.locale.get = function () { return this._vm.locale };\nprototypeAccessors.locale.set = function (locale) {\n this._vm.$set(this._vm, 'locale', locale);\n};\n\nprototypeAccessors.fallbackLocale.get = function () { return this._vm.fallbackLocale };\nprototypeAccessors.fallbackLocale.set = function (locale) {\n this._localeChainCache = {};\n this._vm.$set(this._vm, 'fallbackLocale', locale);\n};\n\nprototypeAccessors.formatFallbackMessages.get = function () { return this._formatFallbackMessages };\nprototypeAccessors.formatFallbackMessages.set = function (fallback) { this._formatFallbackMessages = fallback; };\n\nprototypeAccessors.missing.get = function () { return this._missing };\nprototypeAccessors.missing.set = function (handler) { this._missing = handler; };\n\nprototypeAccessors.formatter.get = function () { return this._formatter };\nprototypeAccessors.formatter.set = function (formatter) { this._formatter = formatter; };\n\nprototypeAccessors.silentTranslationWarn.get = function () { return this._silentTranslationWarn };\nprototypeAccessors.silentTranslationWarn.set = function (silent) { this._silentTranslationWarn = silent; };\n\nprototypeAccessors.silentFallbackWarn.get = function () { return this._silentFallbackWarn };\nprototypeAccessors.silentFallbackWarn.set = function (silent) { this._silentFallbackWarn = silent; };\n\nprototypeAccessors.preserveDirectiveContent.get = function () { return this._preserveDirectiveContent };\nprototypeAccessors.preserveDirectiveContent.set = function (preserve) { this._preserveDirectiveContent = preserve; };\n\nprototypeAccessors.warnHtmlInMessage.get = function () { return this._warnHtmlInMessage };\nprototypeAccessors.warnHtmlInMessage.set = function (level) {\n var this$1 = this;\n\n var orgLevel = this._warnHtmlInMessage;\n this._warnHtmlInMessage = level;\n if (orgLevel !== level && (level === 'warn' || level === 'error')) {\n var messages = this._getMessages();\n Object.keys(messages).forEach(function (locale) {\n this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);\n });\n }\n};\n\nprototypeAccessors.postTranslation.get = function () { return this._postTranslation };\nprototypeAccessors.postTranslation.set = function (handler) { this._postTranslation = handler; };\n\nprototypeAccessors.sync.get = function () { return this._sync };\nprototypeAccessors.sync.set = function (val) { this._sync = val; };\n\nVueI18n.prototype._getMessages = function _getMessages () { return this._vm.messages };\nVueI18n.prototype._getDateTimeFormats = function _getDateTimeFormats () { return this._vm.dateTimeFormats };\nVueI18n.prototype._getNumberFormats = function _getNumberFormats () { return this._vm.numberFormats };\n\nVueI18n.prototype._warnDefault = function _warnDefault (locale, key, result, vm, values, interpolateMode) {\n if (!isNull(result)) { return result }\n if (this._missing) {\n var missingRet = this._missing.apply(null, [locale, key, vm, values]);\n if (isString(missingRet)) {\n return missingRet\n }\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn(\n \"Cannot translate the value of keypath '\" + key + \"'. \" +\n 'Use the value of keypath as default.'\n );\n }\n }\n\n if (this._formatFallbackMessages) {\n var parsedArgs = parseArgs.apply(void 0, values);\n return this._render(key, interpolateMode, parsedArgs.params, key)\n } else {\n return key\n }\n};\n\nVueI18n.prototype._isFallbackRoot = function _isFallbackRoot (val) {\n return (this._fallbackRootWithEmptyString? !val : isNull(val)) && !isNull(this._root) && this._fallbackRoot\n};\n\nVueI18n.prototype._isSilentFallbackWarn = function _isSilentFallbackWarn (key) {\n return this._silentFallbackWarn instanceof RegExp\n ? this._silentFallbackWarn.test(key)\n : this._silentFallbackWarn\n};\n\nVueI18n.prototype._isSilentFallback = function _isSilentFallback (locale, key) {\n return this._isSilentFallbackWarn(key) && (this._isFallbackRoot() || locale !== this.fallbackLocale)\n};\n\nVueI18n.prototype._isSilentTranslationWarn = function _isSilentTranslationWarn (key) {\n return this._silentTranslationWarn instanceof RegExp\n ? this._silentTranslationWarn.test(key)\n : this._silentTranslationWarn\n};\n\nVueI18n.prototype._interpolate = function _interpolate (\n locale,\n message,\n key,\n host,\n interpolateMode,\n values,\n visitedLinkStack\n) {\n if (!message) { return null }\n\n var pathRet = this._path.getPathValue(message, key);\n if (isArray(pathRet) || isPlainObject(pathRet)) { return pathRet }\n\n var ret;\n if (isNull(pathRet)) {\n /* istanbul ignore else */\n if (isPlainObject(message)) {\n ret = message[key];\n if (!(isString(ret) || isFunction(ret))) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {\n warn((\"Value of key '\" + key + \"' is not a string or function !\"));\n }\n return null\n }\n } else {\n return null\n }\n } else {\n /* istanbul ignore else */\n if (isString(pathRet) || isFunction(pathRet)) {\n ret = pathRet;\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {\n warn((\"Value of key '\" + key + \"' is not a string or function!\"));\n }\n return null\n }\n }\n\n // Check for the existence of links within the translated string\n if (isString(ret) && (ret.indexOf('@:') >= 0 || ret.indexOf('@.') >= 0)) {\n ret = this._link(locale, message, ret, host, 'raw', values, visitedLinkStack);\n }\n\n return this._render(ret, interpolateMode, values, key)\n};\n\nVueI18n.prototype._link = function _link (\n locale,\n message,\n str,\n host,\n interpolateMode,\n values,\n visitedLinkStack\n) {\n var ret = str;\n\n // Match all the links within the local\n // We are going to replace each of\n // them with its translation\n var matches = ret.match(linkKeyMatcher);\n\n // eslint-disable-next-line no-autofix/prefer-const\n for (var idx in matches) {\n // ie compatible: filter custom array\n // prototype method\n if (!matches.hasOwnProperty(idx)) {\n continue\n }\n var link = matches[idx];\n var linkKeyPrefixMatches = link.match(linkKeyPrefixMatcher);\n var linkPrefix = linkKeyPrefixMatches[0];\n var formatterName = linkKeyPrefixMatches[1];\n\n // Remove the leading @:, @.case: and the brackets\n var linkPlaceholder = link.replace(linkPrefix, '').replace(bracketsMatcher, '');\n\n if (includes(visitedLinkStack, linkPlaceholder)) {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Circular reference found. \\\"\" + link + \"\\\" is already visited in the chain of \" + (visitedLinkStack.reverse().join(' <- '))));\n }\n return ret\n }\n visitedLinkStack.push(linkPlaceholder);\n\n // Translate the link\n var translated = this._interpolate(\n locale, message, linkPlaceholder, host,\n interpolateMode === 'raw' ? 'string' : interpolateMode,\n interpolateMode === 'raw' ? undefined : values,\n visitedLinkStack\n );\n\n if (this._isFallbackRoot(translated)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(linkPlaceholder)) {\n warn((\"Fall back to translate the link placeholder '\" + linkPlaceholder + \"' with root locale.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n var root = this._root.$i18n;\n translated = root._translate(\n root._getMessages(), root.locale, root.fallbackLocale,\n linkPlaceholder, host, interpolateMode, values\n );\n }\n translated = this._warnDefault(\n locale, linkPlaceholder, translated, host,\n isArray(values) ? values : [values],\n interpolateMode\n );\n\n if (this._modifiers.hasOwnProperty(formatterName)) {\n translated = this._modifiers[formatterName](translated);\n } else if (defaultModifiers.hasOwnProperty(formatterName)) {\n translated = defaultModifiers[formatterName](translated);\n }\n\n visitedLinkStack.pop();\n\n // Replace the link with the translated\n ret = !translated ? ret : ret.replace(link, translated);\n }\n\n return ret\n};\n\nVueI18n.prototype._createMessageContext = function _createMessageContext (values, formatter, path, interpolateMode) {\n var this$1 = this;\n\n var _list = isArray(values) ? values : [];\n var _named = isObject(values) ? values : {};\n var list = function (index) { return _list[index]; };\n var named = function (key) { return _named[key]; };\n var messages = this._getMessages();\n var locale = this.locale;\n\n return {\n list: list,\n named: named,\n values: values,\n formatter: formatter,\n path: path,\n messages: messages,\n locale: locale,\n linked: function (linkedKey) { return this$1._interpolate(locale, messages[locale] || {}, linkedKey, null, interpolateMode, undefined, [linkedKey]); }\n }\n};\n\nVueI18n.prototype._render = function _render (message, interpolateMode, values, path) {\n if (isFunction(message)) {\n return message(\n this._createMessageContext(values, this._formatter || defaultFormatter, path, interpolateMode)\n )\n }\n\n var ret = this._formatter.interpolate(message, values, path);\n\n // If the custom formatter refuses to work - apply the default one\n if (!ret) {\n ret = defaultFormatter.interpolate(message, values, path);\n }\n\n // if interpolateMode is **not** 'string' ('row'),\n // return the compiled data (e.g. ['foo', VNode, 'bar']) with formatter\n return interpolateMode === 'string' && !isString(ret) ? ret.join('') : ret\n};\n\nVueI18n.prototype._appendItemToChain = function _appendItemToChain (chain, item, blocks) {\n var follow = false;\n if (!includes(chain, item)) {\n follow = true;\n if (item) {\n follow = item[item.length - 1] !== '!';\n item = item.replace(/!/g, '');\n chain.push(item);\n if (blocks && blocks[item]) {\n follow = blocks[item];\n }\n }\n }\n return follow\n};\n\nVueI18n.prototype._appendLocaleToChain = function _appendLocaleToChain (chain, locale, blocks) {\n var follow;\n var tokens = locale.split('-');\n do {\n var item = tokens.join('-');\n follow = this._appendItemToChain(chain, item, blocks);\n tokens.splice(-1, 1);\n } while (tokens.length && (follow === true))\n return follow\n};\n\nVueI18n.prototype._appendBlockToChain = function _appendBlockToChain (chain, block, blocks) {\n var follow = true;\n for (var i = 0; (i < block.length) && (isBoolean(follow)); i++) {\n var locale = block[i];\n if (isString(locale)) {\n follow = this._appendLocaleToChain(chain, locale, blocks);\n }\n }\n return follow\n};\n\nVueI18n.prototype._getLocaleChain = function _getLocaleChain (start, fallbackLocale) {\n if (start === '') { return [] }\n\n if (!this._localeChainCache) {\n this._localeChainCache = {};\n }\n\n var chain = this._localeChainCache[start];\n if (!chain) {\n if (!fallbackLocale) {\n fallbackLocale = this.fallbackLocale;\n }\n chain = [];\n\n // first block defined by start\n var block = [start];\n\n // while any intervening block found\n while (isArray(block)) {\n block = this._appendBlockToChain(\n chain,\n block,\n fallbackLocale\n );\n }\n\n // last block defined by default\n var defaults;\n if (isArray(fallbackLocale)) {\n defaults = fallbackLocale;\n } else if (isObject(fallbackLocale)) {\n /* $FlowFixMe */\n if (fallbackLocale['default']) {\n defaults = fallbackLocale['default'];\n } else {\n defaults = null;\n }\n } else {\n defaults = fallbackLocale;\n }\n\n // convert defaults to array\n if (isString(defaults)) {\n block = [defaults];\n } else {\n block = defaults;\n }\n if (block) {\n this._appendBlockToChain(\n chain,\n block,\n null\n );\n }\n this._localeChainCache[start] = chain;\n }\n return chain\n};\n\nVueI18n.prototype._translate = function _translate (\n messages,\n locale,\n fallback,\n key,\n host,\n interpolateMode,\n args\n) {\n var chain = this._getLocaleChain(locale, fallback);\n var res;\n for (var i = 0; i < chain.length; i++) {\n var step = chain[i];\n res =\n this._interpolate(step, messages[step], key, host, interpolateMode, args, [key]);\n if (!isNull(res)) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to translate the keypath '\" + key + \"' with '\" + step + \"' locale.\"));\n }\n return res\n }\n }\n return null\n};\n\nVueI18n.prototype._t = function _t (key, _locale, messages, host) {\n var ref;\n\n var values = [], len = arguments.length - 4;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 4 ];\n if (!key) { return '' }\n\n var parsedArgs = parseArgs.apply(void 0, values);\n if(this._escapeParameterHtml) {\n parsedArgs.params = escapeParams(parsedArgs.params);\n }\n\n var locale = parsedArgs.locale || _locale;\n\n var ret = this._translate(\n messages, locale, this.fallbackLocale, key,\n host, 'string', parsedArgs.params\n );\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to translate the keypath '\" + key + \"' with root locale.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return (ref = this._root).$t.apply(ref, [ key ].concat( values ))\n } else {\n ret = this._warnDefault(locale, key, ret, host, values, 'string');\n if (this._postTranslation && ret !== null && ret !== undefined) {\n ret = this._postTranslation(ret, key);\n }\n return ret\n }\n};\n\nVueI18n.prototype.t = function t (key) {\n var ref;\n\n var values = [], len = arguments.length - 1;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];\n return (ref = this)._t.apply(ref, [ key, this.locale, this._getMessages(), null ].concat( values ))\n};\n\nVueI18n.prototype._i = function _i (key, locale, messages, host, values) {\n var ret =\n this._translate(messages, locale, this.fallbackLocale, key, host, 'raw', values);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn((\"Fall back to interpolate the keypath '\" + key + \"' with root locale.\"));\n }\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.i(key, locale, values)\n } else {\n return this._warnDefault(locale, key, ret, host, [values], 'raw')\n }\n};\n\nVueI18n.prototype.i = function i (key, locale, values) {\n /* istanbul ignore if */\n if (!key) { return '' }\n\n if (!isString(locale)) {\n locale = this.locale;\n }\n\n return this._i(key, locale, this._getMessages(), null, values)\n};\n\nVueI18n.prototype._tc = function _tc (\n key,\n _locale,\n messages,\n host,\n choice\n) {\n var ref;\n\n var values = [], len = arguments.length - 5;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 5 ];\n if (!key) { return '' }\n if (choice === undefined) {\n choice = 1;\n }\n\n var predefined = { 'count': choice, 'n': choice };\n var parsedArgs = parseArgs.apply(void 0, values);\n parsedArgs.params = Object.assign(predefined, parsedArgs.params);\n values = parsedArgs.locale === null ? [parsedArgs.params] : [parsedArgs.locale, parsedArgs.params];\n return this.fetchChoice((ref = this)._t.apply(ref, [ key, _locale, messages, host ].concat( values )), choice)\n};\n\nVueI18n.prototype.fetchChoice = function fetchChoice (message, choice) {\n /* istanbul ignore if */\n if (!message || !isString(message)) { return null }\n var choices = message.split('|');\n\n choice = this.getChoiceIndex(choice, choices.length);\n if (!choices[choice]) { return message }\n return choices[choice].trim()\n};\n\nVueI18n.prototype.tc = function tc (key, choice) {\n var ref;\n\n var values = [], len = arguments.length - 2;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];\n return (ref = this)._tc.apply(ref, [ key, this.locale, this._getMessages(), null, choice ].concat( values ))\n};\n\nVueI18n.prototype._te = function _te (key, locale, messages) {\n var args = [], len = arguments.length - 3;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 3 ];\n\n var _locale = parseArgs.apply(void 0, args).locale || locale;\n return this._exist(messages[_locale], key)\n};\n\nVueI18n.prototype.te = function te (key, locale) {\n return this._te(key, this.locale, this._getMessages(), locale)\n};\n\nVueI18n.prototype.getLocaleMessage = function getLocaleMessage (locale) {\n return looseClone(this._vm.messages[locale] || {})\n};\n\nVueI18n.prototype.setLocaleMessage = function setLocaleMessage (locale, message) {\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);\n }\n this._vm.$set(this._vm.messages, locale, message);\n};\n\nVueI18n.prototype.mergeLocaleMessage = function mergeLocaleMessage (locale, message) {\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);\n }\n this._vm.$set(this._vm.messages, locale, merge(\n typeof this._vm.messages[locale] !== 'undefined' && Object.keys(this._vm.messages[locale]).length\n ? Object.assign({}, this._vm.messages[locale])\n : {},\n message\n ));\n};\n\nVueI18n.prototype.getDateTimeFormat = function getDateTimeFormat (locale) {\n return looseClone(this._vm.dateTimeFormats[locale] || {})\n};\n\nVueI18n.prototype.setDateTimeFormat = function setDateTimeFormat (locale, format) {\n this._vm.$set(this._vm.dateTimeFormats, locale, format);\n this._clearDateTimeFormat(locale, format);\n};\n\nVueI18n.prototype.mergeDateTimeFormat = function mergeDateTimeFormat (locale, format) {\n this._vm.$set(this._vm.dateTimeFormats, locale, merge(this._vm.dateTimeFormats[locale] || {}, format));\n this._clearDateTimeFormat(locale, format);\n};\n\nVueI18n.prototype._clearDateTimeFormat = function _clearDateTimeFormat (locale, format) {\n // eslint-disable-next-line no-autofix/prefer-const\n for (var key in format) {\n var id = locale + \"__\" + key;\n\n if (!this._dateTimeFormatters.hasOwnProperty(id)) {\n continue\n }\n\n delete this._dateTimeFormatters[id];\n }\n};\n\nVueI18n.prototype._localizeDateTime = function _localizeDateTime (\n value,\n locale,\n fallback,\n dateTimeFormats,\n key,\n options\n) {\n var _locale = locale;\n var formats = dateTimeFormats[_locale];\n\n var chain = this._getLocaleChain(locale, fallback);\n for (var i = 0; i < chain.length; i++) {\n var current = _locale;\n var step = chain[i];\n formats = dateTimeFormats[step];\n _locale = step;\n // fallback locale\n if (isNull(formats) || isNull(formats[key])) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to '\" + step + \"' datetime formats from '\" + current + \"' datetime formats.\"));\n }\n } else {\n break\n }\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null\n } else {\n var format = formats[key];\n\n var formatter;\n if (options) {\n formatter = new Intl.DateTimeFormat(_locale, Object.assign({}, format, options));\n } else {\n var id = _locale + \"__\" + key;\n formatter = this._dateTimeFormatters[id];\n if (!formatter) {\n formatter = this._dateTimeFormatters[id] = new Intl.DateTimeFormat(_locale, format);\n }\n }\n\n return formatter.format(value)\n }\n};\n\nVueI18n.prototype._d = function _d (value, locale, key, options) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && !VueI18n.availabilities.dateTimeFormat) {\n warn('Cannot format a Date value due to not supported Intl.DateTimeFormat.');\n return ''\n }\n\n if (!key) {\n var dtf = !options ? new Intl.DateTimeFormat(locale) : new Intl.DateTimeFormat(locale, options);\n return dtf.format(value)\n }\n\n var ret =\n this._localizeDateTime(value, locale, this.fallbackLocale, this._getDateTimeFormats(), key, options);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to datetime localization of root: key '\" + key + \"'.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.d(value, key, locale)\n } else {\n return ret || ''\n }\n};\n\nVueI18n.prototype.d = function d (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n var locale = this.locale;\n var key = null;\n var options = null;\n\n if (args.length === 1) {\n if (isString(args[0])) {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n if (args[0].key) {\n key = args[0].key;\n }\n }\n\n options = Object.keys(args[0]).reduce(function (acc, key) {\n var obj;\n\n if (includes(dateTimeFormatKeys, key)) {\n return Object.assign({}, acc, ( obj = {}, obj[key] = args[0][key], obj ))\n }\n return acc\n }, null);\n\n } else if (args.length === 2) {\n if (isString(args[0])) {\n key = args[0];\n }\n if (isString(args[1])) {\n locale = args[1];\n }\n }\n\n return this._d(value, locale, key, options)\n};\n\nVueI18n.prototype.getNumberFormat = function getNumberFormat (locale) {\n return looseClone(this._vm.numberFormats[locale] || {})\n};\n\nVueI18n.prototype.setNumberFormat = function setNumberFormat (locale, format) {\n this._vm.$set(this._vm.numberFormats, locale, format);\n this._clearNumberFormat(locale, format);\n};\n\nVueI18n.prototype.mergeNumberFormat = function mergeNumberFormat (locale, format) {\n this._vm.$set(this._vm.numberFormats, locale, merge(this._vm.numberFormats[locale] || {}, format));\n this._clearNumberFormat(locale, format);\n};\n\nVueI18n.prototype._clearNumberFormat = function _clearNumberFormat (locale, format) {\n // eslint-disable-next-line no-autofix/prefer-const\n for (var key in format) {\n var id = locale + \"__\" + key;\n\n if (!this._numberFormatters.hasOwnProperty(id)) {\n continue\n }\n\n delete this._numberFormatters[id];\n }\n};\n\nVueI18n.prototype._getNumberFormatter = function _getNumberFormatter (\n value,\n locale,\n fallback,\n numberFormats,\n key,\n options\n) {\n var _locale = locale;\n var formats = numberFormats[_locale];\n\n var chain = this._getLocaleChain(locale, fallback);\n for (var i = 0; i < chain.length; i++) {\n var current = _locale;\n var step = chain[i];\n formats = numberFormats[step];\n _locale = step;\n // fallback locale\n if (isNull(formats) || isNull(formats[key])) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to '\" + step + \"' number formats from '\" + current + \"' number formats.\"));\n }\n } else {\n break\n }\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null\n } else {\n var format = formats[key];\n\n var formatter;\n if (options) {\n // If options specified - create one time number formatter\n formatter = new Intl.NumberFormat(_locale, Object.assign({}, format, options));\n } else {\n var id = _locale + \"__\" + key;\n formatter = this._numberFormatters[id];\n if (!formatter) {\n formatter = this._numberFormatters[id] = new Intl.NumberFormat(_locale, format);\n }\n }\n return formatter\n }\n};\n\nVueI18n.prototype._n = function _n (value, locale, key, options) {\n /* istanbul ignore if */\n if (!VueI18n.availabilities.numberFormat) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot format a Number value due to not supported Intl.NumberFormat.');\n }\n return ''\n }\n\n if (!key) {\n var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);\n return nf.format(value)\n }\n\n var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);\n var ret = formatter && formatter.format(value);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to number localization of root: key '\" + key + \"'.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.n(value, Object.assign({}, { key: key, locale: locale }, options))\n } else {\n return ret || ''\n }\n};\n\nVueI18n.prototype.n = function n (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n var locale = this.locale;\n var key = null;\n var options = null;\n\n if (args.length === 1) {\n if (isString(args[0])) {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n if (args[0].key) {\n key = args[0].key;\n }\n\n // Filter out number format options only\n options = Object.keys(args[0]).reduce(function (acc, key) {\n var obj;\n\n if (includes(numberFormatKeys, key)) {\n return Object.assign({}, acc, ( obj = {}, obj[key] = args[0][key], obj ))\n }\n return acc\n }, null);\n }\n } else if (args.length === 2) {\n if (isString(args[0])) {\n key = args[0];\n }\n if (isString(args[1])) {\n locale = args[1];\n }\n }\n\n return this._n(value, locale, key, options)\n};\n\nVueI18n.prototype._ntp = function _ntp (value, locale, key, options) {\n /* istanbul ignore if */\n if (!VueI18n.availabilities.numberFormat) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot format to parts a Number value due to not supported Intl.NumberFormat.');\n }\n return []\n }\n\n if (!key) {\n var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);\n return nf.formatToParts(value)\n }\n\n var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);\n var ret = formatter && formatter.formatToParts(value);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn((\"Fall back to format number to parts of root: key '\" + key + \"' .\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n._ntp(value, locale, key, options)\n } else {\n return ret || []\n }\n};\n\nObject.defineProperties( VueI18n.prototype, prototypeAccessors );\n\nvar availabilities;\n// $FlowFixMe\nObject.defineProperty(VueI18n, 'availabilities', {\n get: function get () {\n if (!availabilities) {\n var intlDefined = typeof Intl !== 'undefined';\n availabilities = {\n dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',\n numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'\n };\n }\n\n return availabilities\n }\n});\n\nVueI18n.install = install;\nVueI18n.version = '8.28.2';\n\nexport default VueI18n;\n","// src/index.ts\nimport Vue from \"vue\";\nimport VueI18n from \"vue-i18n\";\nimport { computed, getCurrentInstance } from \"@vue/composition-api\";\nvar i18nInstance;\nfunction createI18n(options) {\n i18nInstance = new VueI18n(options);\n return i18nInstance;\n}\nfunction useI18n() {\n if (!i18nInstance)\n throw new Error(\"vue-i18n not initialized\");\n const i18n = i18nInstance;\n const instance = getCurrentInstance();\n const vm = (instance == null ? void 0 : instance.proxy) || instance || new Vue({});\n const locale = computed({\n get() {\n return i18n.locale;\n },\n set(v) {\n i18n.locale = v;\n }\n });\n return {\n locale,\n t: vm.$t.bind(vm),\n tc: vm.$tc.bind(vm),\n d: vm.$d.bind(vm),\n te: vm.$te.bind(vm),\n n: vm.$n.bind(vm)\n };\n}\nexport {\n createI18n,\n useI18n\n};\n","import VueI18n, { LocaleMessages } from 'vue-i18n'\nimport { createI18n } from 'vue-i18n-composable'\nimport enLocals from '@/locales/en.json'\n\nexport default function initialize (vue) {\n vue.use(VueI18n)\n\n function loadLocaleMessages (): LocaleMessages {\n const messages: LocaleMessages = { en: {} }\n Object.keys(enLocals).forEach((key) => {\n messages.en[key] = enLocals[key]\n })\n return messages\n }\n\n const i18n = createI18n({\n locale: import.meta.env.VUE_APP_I18N_LOCALE || 'en',\n fallbackLocale: import.meta.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en',\n messages: loadLocaleMessages()\n })\n return i18n\n}\n","/*\nWhile upgrading to vue 3 please check full plugin and do necessary modifications here\n Library build set up for fas-search-components.\n build library using vue-cli-service\n Basic set up of included files store and i18n included here\n How to use :\n inside main.ts `import Search from 'fas-ui'`\n Vue.use(Search, { store, i18n })\n include style if needed either\n import 'fas-ui/fas-lib/fas-ui.css'\n or inside component style tag us without scope (global scope needed),\n @import '~fas-ui/src/assets/scss/search.scss';\n */\n\nimport OurVue from 'vue'\nimport Search from '@/components/Dashboard/Search.vue'\nimport VueCompositionAPI from '@vue/composition-api'\nimport initializeI18n from './plugins/i18n'\n\n// stores needed fro search\n\n// lang files\n\n/**\n * install function\n *\n * @param {*} Vue parent component vue contructor\n * @param {store, i18n} options need store and i18n\n */\nfunction install (Vue, options) {\n if (OurVue !== Vue) {\n // eslint-disable-next-line no-console\n console.error('Multiple instances of Vue detected ')\n }\n\n if (install.installed) return\n install.installed = true\n // since VueCompositionAPI is not giving direct access to property we are checking by using setup api exist in context or not\n // since setup is a reserved keyword and which is using in vue 3 also, Hope it will not change.\n // Another solution is Object.hasOwnProperty.call(Vue, '__composition_api_installed__').\n // we are not using that in futurem, if they change the string no need to brake app\n // Couldnot find better solution since lack of information available. sorry devs :(\n if (!Object.hasOwnProperty.call(Vue.config.optionMergeStrategies, 'setup')) {\n // if parent is not using VueCompositionAPI api need to push to vue\n Vue.use(VueCompositionAPI)\n // eslint-disable-next-line no-console\n console.info('[FAS-Plugin] VueCompositionAPI is not available in parent so pushing from plugin')\n } else {\n // eslint-disable-next-line no-console\n console.info('[FAS-Plugin] VueCompositionAPI already installed')\n }\n\n // simple hack to inject locale messages. check for better solutions\n // this will not work when chaging lang.\n // need to updated code (since we are not using other lag now, not updating chanegs)\n const t = initializeI18n(Vue)\n if (options.i18n && t && t.messages) {\n options.i18n.mergeLocaleMessage(\n options.i18n.locale,\n t.messages[t.locale]\n )\n } else {\n // eslint-disable-next-line no-console\n console.error('[FAS-Plugin] please provide i18n to use lang')\n }\n // pushing store modules to parent store\n // use unique name to avoid conflict\n if (options.store) {\n // options.store.registerModule('store', store)\n window.fasStore = options.store\n } else {\n // eslint-disable-next-line no-console\n console.error('[FAS-Plugin] please provide store')\n }\n // registering component to use as plugin\n Vue.component('fas-search-component', Search)\n}\n\nconst plugin = {\n install\n}\n\nlet GlobalVue = null\nif (typeof window !== 'undefined') {\n GlobalVue = window.Vue\n} else if (typeof global !== 'undefined') {\n GlobalVue = global.vue\n}\n\nif (GlobalVue) {\n GlobalVue.use(plugin)\n}\n\nSearch.install = install\n\nexport default Search\n"],"names":["Vue","use","VueCompositionAPI","SessionStorageKeys","DateFilterCodes","PaymentMethods","SlipStatus","Role","ApiErrors","CreateRoutingSlipStatus","PatchActions","headerSearchTitle","text","align","value","display","className","sortable","hideInSearchColumnFilter","RoutingSlipRefundStatus","code","RoutingSlipRefundCodes","reduce","acc","status","ERROR","WINDOW","window","root","JS_SHA256_NO_WINDOW","WEB_WORKER","self","NODE_JS","JS_SHA256_NO_NODE_JS","process","versions","node","global","COMMON_JS","JS_SHA256_NO_COMMON_JS","module","exports","ARRAY_BUFFER","JS_SHA256_NO_ARRAY_BUFFER","ArrayBuffer","HEX_CHARS","split","EXTRA","SHIFT","K","OUTPUT_TYPES","blocks","Array","isArray","obj","Object","prototype","toString","call","JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW","isView","buffer","constructor","createOutputMethod","outputType","is224","message","Sha256","update","createMethod","method","nodeWrap","create","i","length","type","crypto","eval","Buffer","algorithm","nodeMethod","createHash","digest","Error","Uint8Array","createHmacOutputMethod","key","HmacSha256","createHmacMethod","sharedMemory","this","h0","h1","h2","h3","h4","h5","h6","h7","block","start","bytes","hBytes","finalized","hashed","first","index","charCodeAt","array","oKeyPad","iKeyPad","b","inner","notString","lastByteIndex","hash","finalize","j","s0","s1","maj","t1","ab","da","cd","bc","a","c","d","e","f","g","h","hex","arr","push","arrayBuffer","dataView","DataView","setUint32","innerHash","sha256","sha224","hmac","base64Js","byteLength","b64","lens","getLens","validLen","placeHoldersLen","toByteArray","tmp","Arr","_byteLength","curByte","len","revLookup","fromByteArray","uint8","extraBytes","parts","maxChunkLength","len2","encodeChunk","lookup","join","indexOf","end","num","output","sha256_imported","base64js_imported","Promise","loggedPromiseDeprecation","logPromiseDeprecation","console","warn","toKeycloakPromise","promise","__proto__","KeycloakPromise","executor","Keycloak","config","adapter","callbackStorage","kc","refreshQueue","loginIframe","enable","callbackList","interval","scripts","document","getElementsByTagName","src","iframeVersion","substring","useNonce","logInfo","createLogger","info","logWarn","generateRandomData","msCrypto","getRandomValues","Math","floor","random","generateCodeVerifier","generateRandomString","alphabet","randomData","chars","String","fromCharCode","apply","generatePkceChallenge","pkceMethod","codeVerifier","hashBytes","replace","getRealmUrl","authServerUrl","charAt","encodeURIComponent","realm","getOrigin","location","origin","protocol","hostname","port","processCallback","oauth","error","prompt","timeLocal","Date","getTime","errorData","error_description","onAuthError","setError","setSuccess","flow","access_token","id_token","authSuccess","params","url","endpoints","token","req","XMLHttpRequest","open","setRequestHeader","clientId","redirectUri","pkceCodeVerifier","withCredentials","onreadystatechange","readyState","tokenResponse","JSON","parse","responseText","send","accessToken","refreshToken","idToken","fulfillPromise","setToken","tokenParsed","nonce","storedNonce","refreshTokenParsed","idTokenParsed","clearToken","onAuthSuccess","loadConfig","configUrl","createPromise","setupOidcEndoints","oidcConfiguration","authorize","authorization_endpoint","token_endpoint","logout","end_session_endpoint","checkSessionIframe","check_session_iframe","register","userinfo","userinfo_endpoint","fileLoaded","oidcProvider","oidcProviderConfigUrl","match","substr","xhr","responseURL","startsWith","tokenTimeoutHandle","clearTimeout","decodeToken","sessionId","session_state","authenticated","subject","sub","realmAccess","realm_access","resourceAccess","resource_access","timeSkew","iat","onTokenExpired","expiresIn","round","setTimeout","str","slice","decodeURIComponent","escape","atob","createUUID","hexDigits","s","parseCallback","parseCallbackUrl","oauthState","get","state","valid","supportedParams","newUrl","parsed","queryIndex","fragmentIndex","responseMode","parseCallbackParams","paramsString","oauthParams","p","result","resolve","reject","setupCheckLoginIframe","iframe","createElement","onload","authUrl","iframeOrigin","setAttribute","style","body","appendChild","messageCallback","event","contentWindow","source","data","callbacks","splice","addEventListener","scheduleCheckIframe","checkLoginIframe","then","unchanged","msg","postMessage","loadAdapter","login","options","createLoginUrl","createLogoutUrl","createRegisterUrl","accountManagement","accountUrl","createAccountUrl","href","encodeHash","cordovaOpenWindowWrapper","loginUrl","target","cordova","InAppBrowser","shallowCloneCordovaOptions","userOptions","cordovaOptions","keys","optionName","formatCordovaOptions","createCordovaOptions","hidden","ref","completed","closed","closeBrowser","close","reason","logoutUrl","registerUrl","universalLinks","subscribe","unsubscribe","plugins","browsertab","openUrl","init","initOptions","createCallbackStorage","Cordova","checkLoginIframeInterval","onLoad","loginRequired","responseType","silentCheckSsoRedirectUri","enableLogging","initPromise","onReady","catch","configPromise","doLogin","checkSsoSilently","ifrm","removeChild","removeEventListener","processInit","callback","history","replaceState","updateToken","baseUrl","scope","callbackState","action","maxAge","loginHint","idpHint","locale","add","hasRealmRole","role","access","roles","hasResourceRole","resource","loadUserProfile","profile","loadUserInfo","userInfo","isTokenExpired","minValidity","ceil","isNaN","exec","onAuthRefreshSuccess","pop","onAuthRefreshError","onAuthLogout","LocalStorage","localStorage","setItem","removeItem","cs","clearExpired","time","getItem","expires","err","stringify","CookieStorage","getCookie","setCookie","cookieExpiration","minutes","exp","setTime","name","ca","cookie","expirationDate","toUTCString","fn","arguments","success","handleSuccess","handleError","factory","require$$0","require$$1","decodeKCToken","ConfigHelper","getFromSession","KeyCloakToken","base64Url","base64","map","trimTrailingSlashURL","trim","ConfigHelper$1","_a","addToSession","sessionStorage","removeFromSession","clearSession","clear","getStatusAPIUrl","StatusApiUrl","getAuthAPIUrl","AuthApiUrl","getAuthContextPath","AuthWebUrl","getRegistryHomeURL","RegistryHomeUrl","getNameRequestURL","NameRequestUrl","getPprWebURL","PprWebUrl","setKeycloakConfigUrl","keycloakConfigUrl","getKeycloakConfigUrl","__publicField","VuexModule","actions","mutations","getters","namespaced","modules","getModule","moduleClass","store","_statics","genStatic","_genStatic","reservedKeys","stateFactory","forEach","hasOwnProperty","addPropertiesToObject","_loop_1","k","defineProperty","_i","__awaiter","thisArg","_arguments","P","generator","fulfilled","step","next","rejected","done","__generator","y","t","_","label","sent","trys","ops","verb","throw","return","Symbol","iterator","n","v","op","TypeError","staticStateGenerator","modOpt","statics","staticGetterGenerator","staticMutationGenerator","args","commit","concat","staticActionGenerators","_b","dispatch","moduleDecoratorFactory","moduleOptions","stateFactory$1","getOwnPropertyNames","funcName","descriptor","getOwnPropertyDescriptor","rootState","rootGetters","thisObj","context","dynamic","registerModule","Module","modOrOpt","actionDecoratorFactory","_c","rawError","_d","actionFunction","payload","actionPayload","moduleAccessor","e_1","stack","handler","Action","targetOrParams","Mutation","mutationFunction","AuthModule","super","isAuthenticated","keycloakGuid","kcGuid","KeycloakServices","getUserInfo","currentLoginSource","loginSource","setKCToken","setIDToken","KeyCloakIdToken","setRefreshToken","KeyCloakRefreshToken","setKCGuid","setLoginSource","syncWithSessionStorage","__decorateClass$2","__decorateClass","_KeyCloakService","getInstance","instance","isInitialized","keyCloakConfigurl","getKCInstance","initializeKeyCloak","keycloakConfig","kcLogin","kcOptions","initSession","authModule","syncSessionAndScheduleTokenRefresh","parsedToken","lastName","lastname","firstName","firstname","email","_e","_f","userName","_g","username","fullName","_h","redirectUrl","siteminderLogoutUrl","SiteminderLogoutUrl","PreventStorageSync","env","VUE_APP_PATH","includes","isForceRefresh","tokenExpiresIn","refreshed","verifyRoles","allowedRoles","disabledRoles","isAuthorized","some","initializeToken","isScheduleRefresh","forceLogin","SessionSynced","syncSessionStorage","scheduleRefreshTimer","refreshEarlyTime","refreshEarlyTimeinMilliseconds","max","REFRESH_ATTEMPT_INTERVAL","scheduleRefreshToken","refreshTokenExpiresIn","refreshInMilliSeconds","timerId","log","counter","KeyCloakService","KeyCloakService$1","hookCallback","hooks","setHookCallback","input","isObject","hasOwnProp","isObjectEmpty","isUndefined","isNumber","isDate","res","arrLen","extend","valueOf","createUTC","format","strict","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidEra","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","era","meridiem","rfc2822","weekdayMismatch","getParsingFlags","m","_pf","isValid","_isValid","flags","parsedParts","isNowValid","invalidWeekday","_strict","bigHour","isFrozen","createInvalid","NaN","extend$2","fun","momentProperties","updateInProgress","copyConfig","to","from","prop","val","momentPropertiesLen","_isAMomentObject","_l","_tzm","_isUTC","_offset","_locale","Moment","updateOffset","isMoment","suppressDeprecationWarnings","deprecate","firstTime","deprecationHandler","arg","argLen","deprecations","deprecateSimple","isFunction","Function","set","_config","_dayOfMonthOrdinalParseLenient","RegExp","_dayOfMonthOrdinalParse","_ordinalParse","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","calendar","mom","now","_calendar","zeroFill","number","targetLength","forceSign","absNumber","abs","zerosToFill","pow","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","padded","ordinal","func","localeData","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","invalidDate","replaceLongDateFormatTokens","longDateFormat","lastIndex","test","defaultLongDateFormat","LTS","LT","L","LL","LLL","LLLL","_longDateFormat","formatUpper","toUpperCase","tok","defaultInvalidDate","_invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","_ordinal","defaultRelativeTime","future","past","ss","mm","hh","dd","w","ww","M","MM","yy","relativeTime","withoutSuffix","string","isFuture","_relativeTime","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","toLowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","u","sort","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","isFinite","makeGetSet","keepTime","set$1","month","date","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","_w","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","x","modMonth","o","monthsShort","months","monthsShortRegex","monthsRegex","monthsParse","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","_months","isFormat","localeMonthsShort","_monthsShort","handleStrictParse","monthName","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","localeMonthsParse","_monthsParseExact","setMonth","dayOfMonth","min","getSetMonth","getDaysInMonth","computeMonthsParse","_monthsShortStrictRegex","_monthsShortRegex","_monthsStrictRegex","_monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","parseTwoDigitYear","parseInt","getSetYear","getIsLeapYear","createDate","ms","getFullYear","setFullYear","createUTCDate","UTC","getUTCFullYear","setUTCFullYear","firstWeekOffset","dow","doy","fwd","getUTCDay","dayOfYearFromWeeks","week","weekday","resYear","resDayOfYear","dayOfYear","weekOfYear","resWeek","weekOffset","weeksInYear","weekOffsetNext","localeWeek","_week","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","weekdaysParse","parseIsoWeekday","shiftWeekdays","ws","weekdaysMin","weekdaysShort","weekdays","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","_weekdays","day","localeWeekdaysShort","_weekdaysShort","localeWeekdaysMin","_weekdaysMin","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","localeWeekdaysParse","_weekdaysParseExact","_fullWeekdaysParse","getSetDayOfWeek","getDay","getSetLocaleDayOfWeek","getSetISODayOfWeek","computeWeekdaysParse","_weekdaysStrictRegex","_weekdaysRegex","_weekdaysShortStrictRegex","_weekdaysShortRegex","_weekdaysMinStrictRegex","_weekdaysMinRegex","minp","shortp","longp","minPieces","hFormat","hours","kFormat","lowercase","matchMeridiem","_meridiemParse","localeIsPM","seconds","kInput","_isPm","isPM","_meridiem","pos","pos1","pos2","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","isLower","baseConfig","dayOfMonthOrdinalParse","meridiemParse","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","loadLocale","isLocaleNameSane","oldLocale","_abbr","require","getSetGlobalLocale","values","getLocale","defineLocale","abbr","parentLocale","updateLocale","tmpLocale","listLocales","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","configFromISO","l","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","setUTCMinutes","getUTCMinutes","configFromString","createFromInputFallback","defaults","currentDateArray","nowValue","_useUTC","getUTCMonth","getUTCDate","getMonth","getDate","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","weekYear","temp","weekdayOverflow","curWeek","GG","W","E","createLocal","gg","ISO_8601","RFC_2822","skipped","stringLength","totalParsedInputLength","meridiemFixWrap","erasConvertYear","hour","isPm","meridiemHour","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","score","configFromObject","dayOrDate","minute","second","millisecond","createFromConfig","prepareConfig","preparse","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","ordering","isDurationValid","unitHasDecimal","orderLen","parseFloat","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","quarter","weeks","isoWeek","days","milliseconds","_milliseconds","_days","_data","_bubble","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","offset","separator","utcOffset","sign","offsetFromString","chunkOffset","matcher","matches","cloneWithOffset","model","clone","local","getDateOffset","getTimezoneOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","subtract","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","_isDSTShifted","toArray","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","ret","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","base","isAfter","isBefore","createAdder","direction","period","isAdding","invalid","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","propertyLen","arrayTest","dataTypeTest","filter","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","startOf","calendarFormat","localInput","endOf","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","that","zoneDelta","monthDiff","wholeMonthDiff","anchor","toISOString","keepOffset","toDate","inspect","prefix","suffix","zone","inputString","defaultFormatUtc","defaultFormat","postformat","humanize","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOfDate","isoWeekday","unix","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","localeEras","eras","_eras","since","until","Infinity","localeErasParse","eraName","narrow","localeErasConvertYear","dir","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","_erasNameRegex","_erasRegex","erasAbbrRegex","_erasAbbrRegex","erasNarrowRegex","_erasNarrowRegex","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","_eraYearOrdinalRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","isoWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","erasParse","eraYearOrdinalParse","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","parseZone","preParsePostFormat","for","eraNarrow","eraAbbr","eraYear","isoWeeks","weeksInWeekYear","isoWeeksInYear","isoWeeksInISOWeekYear","isDST","zoneAbbr","zoneName","dates","isDSTShifted","proto$1","get$1","field","setter","listMonthsImpl","out","listWeekdaysImpl","localeSorted","shift","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","firstDayOfYear","firstDayOfWeek","langData","mathAbs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","limit","argWithSuffix","argThresholds","withSuffix","th","assign","abs$1","toISOString$1","totalSign","ymSign","daysSign","hmsSign","total","toFixed","proto$2","toIsoString","version","relativeTimeRounding","relativeTimeThreshold","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","TIME","TIME_SECONDS","TIME_MS","_CommonUtils","formatDisplayDate","moment","requiredFieldRule","errorMessage","optionalFieldRule","isSigningIn","path","pathname","isSigningOut","fileDownload","fileName","fileType","blob","Blob","navigator","msSaveBlob","blobURL","URL","createObjectURL","webkitURL","tempLink","download","click","revokeObjectURL","statusListColor","textColor","color","ACTIVE","COMPLETE","REFUNDPROCESSED","WRITEOFFCOMPLETED","BOUNCED","NSF","LINKED","REFUNDREQUEST","REFUNDAUTHORIZED","WRITEOFFAUTHORIZED","WRITEOFFREQUESTED","VOID","appendCurrencySymbol","currency","cleanObject","remainingAmount","appendQueryParamsIfNeeded","targetUrl","route","requestParams","createQueryParams","query","convertAddressForComponent","address","addressCity","city","addressCountry","country","addressRegion","region","deliveryInstructions","postalCode","streetAddress","street","streetAddressAdditional","streetAdditional","convertAddressForAuth","iaddress","isApproverRole","approverRole","FAS_REFUND_APPROVER","isVoidRole","voidRole","FAS_VOID","isRefundProcessStatus","REFUNDREJECTED","REFUNDUPLOADED","isRefundRequestStatus","isEditEnabledBystatus","encodeURI","object","object1","object2","objKeys1","objKeys2","value1","value2","isObjects","isDeepEqual","CommonUtils","fetchConfig","PayApiUrl","getPayAPIURL","getAuthWebUrl","FasWebUrl","getFasWebUrl","getSiteminderLogoutUrl","saveConfigToSessionStorage","getSelfURL","getFasAPIURL","getKeycloakAuthUrl","getKeycloakRealm","getKeycloakClientId","getAddressCompleteKey","debounce","wait","immediate","timeout","callNow","hasCallFailed","activeCalls","isThereActiveCalls","computed","useIndicators","useLoader","isLoading","toggleLoading","changeLoadingStatus","isLoadingStatus","bind","wrap","isBuffer","isArrayBuffer","isFormData","FormData","isArrayBufferView","isPlainObject","getPrototypeOf","isFile","isBlob","isStream","pipe","isURLSearchParams","URLSearchParams","isStandardBrowserEnv","product","merge","assignValue","stripBOM","content","utils","encode","buildURL","paramsSerializer","serializedParams","serialize","parseValue","hashmarkIndex","InterceptorManager","handlers","synchronous","runWhen","InterceptorManager$1","eject","id","forEachHandler","InterceptorManager_1","normalizeHeaderName","headers","normalizedName","processHeader","enhanceError","request","response","isAxiosError","description","lineNumber","columnNumber","createError","settle","validateStatus","cookies","standardBrowserEnv","write","domain","secure","toGMTString","read","remove","isAbsoluteURL","combineURLs","baseURL","relativeURL","buildFullPath","requestedURL","ignoreDuplicateOf","parseHeaders","parser","line","isURLSameOrigin","originURL","msie","userAgent","urlParsingNode","resolveURL","host","search","requestURL","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","xhrAdapter","dispatchXhrRequest","requestData","requestHeaders","auth","password","unescape","Authorization","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","statusText","handleLoad","onabort","handleAbort","onerror","ontimeout","handleTimeout","timeoutErrorMessage","transitional","clarifyTimeoutError","xsrfValue","xsrfCookieName","xsrfHeaderName","onDownloadProgress","onUploadProgress","upload","cancelToken","onCanceled","cancel","abort","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","getDefaultAdapter","stringifySafely","rawValue","encoder","silentJSONParsing","forcedJSONParsing","transformRequest","transformResponse","strictJSONParsing","maxContentLength","maxBodyLength","defaults$3","common","Accept","utils$5","forEachMethodNoData","forEachMethodWithData","defaults_1","transformData","fns","transform","isCancel$1","isCancel","__CANCEL__","throwIfCancellationRequested","throwIfRequested","dispatchRequest","utils$3","cleanHeaderConfig","onAdapterResolution","onAdapterRejection","mergeConfig","config1","config2","valueFromConfig2Keys","mergeDeepPropertiesKeys","defaultToConfig2Keys","directMergeKeys","getMergedValue","mergeDeepProperties","valueFromConfig2","utils$2","defaultToConfig2","axiosKeys","otherKeys","filterAxiosKeys","pkg","validators","validator","thing","deprecatedWarnings","currentVerArr","isOlderVersion","thanVersion","pkgVersionArr","destVer","assertOptions","schema","allowUnknown","opt","validators$1","isDeprecated","formatMessage","desc","opts","Axios","instanceConfig","interceptors","Axios$2","boolean","requestInterceptorChain","synchronousRequestInterceptors","unshiftRequestInterceptors","interceptor","unshift","responseInterceptorChain","pushResponseInterceptors","chain","newConfig","onFulfilled","onRejected","getUri","utils$1","Axios_1","Cancel","Cancel_1","CancelToken","resolvePromise","promiseExecutor","CancelToken_1","spread","createInstance","defaultConfig","axios","axios$2","all","promises","require$$8","require$$9","axiosModule","default","showGlobalLoader","showGlobalErrorHandling","CodesService","getCodes","codeType","routingSlipStatusList","useCodes","getRoutingSlipStatusList","async","codes","useStatusList","props","toRefs","currentStatus","modalValue","emit","selectedStatusObject","statusList","onMounted","statusLabel","RoutingSlip","getRoutingSlip","routingNumber","createRoutingSlip","routingSlipRequest","post","adjustRoutingSlip","payments","routingSlipNumber","CORRECTION","patch","UPDATE_STATUS","updateRoutingSlipStatus","updateRoutingSlipRefundStatus","refund_status","updateRoutingSlipComments","slipNumber","updateRoutingSlipRefund","details","getSearchRoutingSlip","searchParams","saveLinkRoutingSlip","LinkRoutingSlip","getLinkedRoutingSlips","getDailyReport","selectedDate","getSearchFilingType","getFeeByCorpTypeAndFilingType","getFeeRequestParams","corpTypeCode","filingTypeCode","saveManualTransactions","transactions","cancelRoutingSlipInvoice","invoiceId","defaultParams","page","headerSearchTitleConstant","searchRoutingSlipResult","searchRoutingSlipParams","routingSlip","linkedRoutingSlips","routingSlipDetails","accountInfo","chequePayment","cashPayment","isPaymentMethodCheque","isAmountPaidInUsd","autoCompleteRoutingSlips","useRoutingSlip","invoiceCount","invoices","searchParamsExist","isRoutingSlipAChild","parentNumber","isRoutingSlipLinked","children","isRoutingSlipVoid","getRoutingSlipRequestPayload","RoutingSlipService","searchRoutingSlip","appendToResults","dateFilter","startDate","endDate","items","updateRoutingSlipChequeNumber","chequeNumToChange","payment","paymentIndex","chequeReceiptNumber","chequeNum","updateRoutingSlipAmount","amountToChange","isRoutingSlipPaidInUsd","paidUsdAmount","amount","paidAmount","paymentAccount","checkRoutingNumber","VALID","EXISTS","FAS_INVALID_ROUTING_SLIP_DIGITS","INVALID_DIGITS","statusDetails","resetRoutingSlipDetails","resetSearchParams","parentRoutingSlipNumber","LinkPrams","childRoutingSlipNumber","getDailyReportByDate","formatedDate","getAutoCompleteRoutingSlips","transation","referenceNumber","filingType","futureEffective","quantity","businessInfo","corpType","businessIdentifier","transactionParams","filingInfo","filingTypes","infiniteScrollCallback","comment","businessId","useSearch","isLibraryMode","fasUrl","reactive","showExpandedFolio","showExpandedCheque","searchParamsChanged","reachedEnd","headerSearch","displayedHeaderSearch","displayed","updateSearchFilter","updates","receiptNumber","refundStatus","accountName","initiator","searchNow","debouncedSearch","getNext","canShowColumn","columnName","find","header","applyDateFilter","dateRangeObj","getStatusLabel","clearFilter","formatFolioResult","invoice","toggleFolio","toggleCheque","navigateTo","$router","$route","getRefundStatusText","statusCode","PROCESSING","getStatusFromRefundStatus","_typeof","_defineProperty","enumerable","configurable","writable","_toConsumableArray","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","iter","reflectionIsSupported","Reflect","defineMetadata","getOwnMetadataKeys","copyReflectionMetadata","forwardMetadata","propertyKey","metaKey","metadata","getOwnMetadata","fakeArray","hasProto","createDecorator","Ctor","__decorators__","isPrimitive","collectDataFromConstructor","vm","Component","originalInit","_init","_this","$options","plainData","NODE_ENV","$internalHooks","componentFactory","_componentTag","methods","mixins","decorators","superProto","Super","Extended","forwardStaticMembers","reservedPropertyNames","shouldIgnore","callee","caller","Original","extendedDescriptor","superDescriptor","warn$1","registerHooks","__spreadArrays","reflectMetadataIsSupported","getMetadata","applyMetadata","Prop","componentOptions","DATEFILTER_CODES","useDateRange","dateRangeSelected","oldSelectedRange","dateRangeSelectedDisplay","dateFilterRanges","TODAY","YESTERDAY","LASTWEEK","LASTMONTH","CUSTOMRANGE","dateFilterSelectedIndex","dateFilterSelected","showDateFilter","pickerDate","isApplyFilterBtnValid","showDateRangeSelected","dateText","formatDatePickerDate","dateObj","dateFilterChange","today","yesterday","weekStart","weekEnd","monthStart","monthEnd","dateClick","cancelDateFilter","useSearchColumnFilterComponent","selectedHeaderSearchList","DateRangeFilter","__decorateClass$1","DateRangeFilter$1","setup","render","_vm","$createElement","_self","attrs","transition","scopedSlots","_u","_ref","on","readonly","filled","$$v","expression","$attrs","slot","_v","staticClass","dense","change","filterRange","domProps","textContent","_s","large","disabled","outlined","$event","innerHTML","width","range","$listeners","staticRenderFns","SearchColumnFilterComponent","SearchColumnFilterComponent$1","nav","$set","__vue2_script$2","defineComponent","required","column","__vue2_script","observerElement","observer","IntersectionObserver","entry","isIntersecting","observe","onBeforeUnmount","disconnect","useDashboard","addRoutingSlip","can","inserted","el","binding","canAccess","componentUpdated","behaviour","modifiers","disable","isCard","card","requestedAction","customeEl","commentNode","classList","pointerEvents","vnode","createComment","elm","isComment","tag","directives","componentInstance","$el","parentNode","replaceChild","Boolean","colors","commonUtil","components","statusListComponent","TableObserver","_objectDestructuringEmpty","class","sm","cols","rawName","hide","dark","small","height","loading","$t","proxy","autocomplete","placeholder","applied","_ref2","paymentMethod","createdName","routingSlipDate","CHEQUE_UNDELIVERABLE","folio","CHEQUE","colspan","intersect","numberFormatKeys","dateTimeFormatKeys","isBoolean","OBJECT_STRING","isNull","parseArgs","looseClone","delete","arrayFrom","hasOwn","arguments$1","looseEqual","isObjectA","isObjectB","isArrayA","isArrayB","every","keysA","keysB","escapeHtml","rawText","escapeParams","_i18n","i18n","$i18n","_t","_getMessages","$tc","choice","_tc","$te","_te","$d","$n","defineMixin","bridge","mounted","$root","__INTLIFY_META__","beforeCreate","__i18nBridge","__i18n","VueI18n","localeMessages","messages","mergeLocaleMessage","_i18nWatcher","watchI18nData","rootI18n","formatter","fallbackLocale","formatFallbackMessages","silentTranslationWarn","silentFallbackWarn","pluralizationRules","preserveDirectiveContent","localeMessages$1","sharedMessages","sync","_localeWatcher","watchLocale","onComponentInstanceCreated","parent","beforeMount","subscribeDataChanging","_subscribing","beforeDestroy","$nextTick","unsubscribeDataChanging","destroyVM","interpolationComponent","functional","places","slots","onlyHasDefaultPlace","useLegacyPlaces","createParamsFromPlaces","everyPlace","child","vnodeHasPlaceAttribute","assignChildPlace","assignChildIndex","place","numberComponent","Number","_ntp","part","assert","oldVNode","localeEqual","oldValue","_localeMessage","getLocaleMessage","unbind","preserve","_vt","ref$1","ref$2","tc","makeParams","install","_Vue","installed","mixin","directive","component","optionMergeStrategies","parentVal","childVal","BaseFormatter","_caches","interpolate","compile","RE_TOKEN_LIST_VALUE","RE_TOKEN_NAMED_VALUE","position","char","isClosed","compiled","mode","APPEND","PUSH","INC_SUB_PATH_DEPTH","PUSH_SUB_PATH","BEFORE_PATH","IN_PATH","BEFORE_IDENT","IN_IDENT","IN_SUB_PATH","IN_SINGLE_QUOTE","IN_DOUBLE_QUOTE","AFTER_PATH","pathStateMachine","ident","eof","else","literalValueRE","isLiteral","stripQuotes","getPathCharType","ch","formatSubPath","trimmed","parse$1","newChar","typeMap","subPathDepth","maybeUnescapeQuote","nextChar","I18nPath","_cache","parsePath","hit","getPathValue","paths","last","htmlTagMatcher","linkKeyMatcher","linkKeyPrefixMatcher","bracketsMatcher","defaultModifiers","upper","toLocaleUpperCase","lower","capitalize","defaultFormatter","this$1","dateTimeFormats","datetimeFormats","numberFormats","_formatter","_modifiers","_missing","missing","_root","_sync","_fallbackRoot","fallbackRoot","_fallbackRootWithEmptyString","fallbackRootWithEmptyString","_formatFallbackMessages","_silentTranslationWarn","_silentFallbackWarn","_dateTimeFormatters","_numberFormatters","_path","_dataListeners","Set","_componentInstanceCreatedListener","componentInstanceCreatedListener","_preserveDirectiveContent","_warnHtmlInMessage","warnHtmlInMessage","_postTranslation","postTranslation","_escapeParameterHtml","escapeParameterHtml","__VUE_I18N_BRIDGE__","getChoiceIndex","choicesLength","thisPrototype","_choice","_choicesLength","_exist","_checkLocaleMessage","_initVM","prototypeAccessors","availableLocales","availabilities","level","silent","__VUE18N__INSTANCE__","$destroy","$watch","listeners","nextTick","$forceUpdate","deep","composer","target$1","newI18n","_getDateTimeFormats","_getNumberFormats","_localeChainCache","fallback","orgLevel","_warnDefault","interpolateMode","missingRet","_isSilentTranslationWarn","parsedArgs","_render","_isFallbackRoot","_isSilentFallbackWarn","_isSilentFallback","_interpolate","visitedLinkStack","pathRet","_link","idx","link","linkKeyPrefixMatches","linkPrefix","formatterName","linkPlaceholder","reverse","translated","_translate","_createMessageContext","_list","_named","list","named","linked","linkedKey","_appendItemToChain","follow","_appendLocaleToChain","_appendBlockToChain","_getLocaleChain","predefined","count","fetchChoice","choices","te","setLocaleMessage","getDateTimeFormat","setDateTimeFormat","_clearDateTimeFormat","mergeDateTimeFormat","_localizeDateTime","current","Intl","DateTimeFormat","dateTimeFormat","getNumberFormat","setNumberFormat","_clearNumberFormat","mergeNumberFormat","_getNumberFormatter","NumberFormat","_n","numberFormat","formatToParts","defineProperties","intlDefined","VueI18n$1","i18nInstance","createI18n","initialize","vue","VUE_APP_I18N_LOCALE","VUE_APP_I18N_FALLBACK_LOCALE","loadLocaleMessages","en","enLocals","OurVue","initializeI18n","fasStore","Search","plugin","GlobalVue"],"mappings":";;AAGAA,MAAIC,IAAIC;ACHIC,IAAAA,sBAAAA,IACVA,EAAgB,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imE,QAAWx9E,GAEbgL,QAAQ4D,MAAM,uCAGZwiE,QAAQE,UAAW;AACvBF,QAAQE,WAAY,EAMf/tE,OAAOse,eAAene,KAAK1D,EAAIwL,OAAOkmE,sBAAuB,SAOhE1mE,QAAQ0B,KAAK,qDALb1M,EAAIC,IAAIC,mBAER8K,QAAQ0B,KAAK;AASTqW,MAAAA,EAAI06D,WAAez9E;AACrBuX,EAAQg1D,MAAQxpD,GAAKA,EAAE6qD,SACzBr2D,EAAQg1D,KAAKsB,mBACXt2D,EAAQg1D,KAAK7wD,OACbqH,EAAE6qD,SAAS7qD,EAAErH,SAIf1Q,QAAQ4D,MAAM,gDAIZ2I,EAAQ+J,MAEV3f,OAAO+7E,SAAWnmE,EAAQ+J,MAG1BtW,QAAQ4D,MAAM,qCAGhB5O,EAAIyxE,UAAU,uBAAwBkM,OACxC,CAEA,MAAMC,OAAS,CACbxM;AAGF,IAAIyM,UAAY;MACM,oBAAXl8E,OACTk8E,UAAYl8E,OAAO3B,IACQ,oBAAXqC,SAChBw7E,UAAYx7E,OAAO66E,KAGjBW,WACFA,UAAU59E,IAAI29E,QAGhBD,OAAOvM,QAAUA","x_google_ignoreList":[2,3,4,5,6,7,8,9,10,11,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,52,53,54,55,70,71]} \ No newline at end of file diff --git a/src/components/ViewRoutingSlip/RefundRequestForm.vue b/src/components/ViewRoutingSlip/RefundRequestForm.vue index 4e4fe656..520eb6de 100644 --- a/src/components/ViewRoutingSlip/RefundRequestForm.vue +++ b/src/components/ViewRoutingSlip/RefundRequestForm.vue @@ -73,17 +73,19 @@ v-on="on" small class="hover-btn ml-2" + color="primary" @click="expendStatus" > Update Status {{ isExpanded ? 'mdi-menu-up' : 'mdi-menu-down' }} - + {{ status.text }} @@ -195,10 +197,24 @@ export default defineComponent({ From ddf08c5520e9fbe7130bae39a1cc2ff6f9a55446 Mon Sep 17 00:00:00 2001 From: Jia Xu Date: Tue, 29 Oct 2024 09:05:06 -0700 Subject: [PATCH 3/7] tweaks --- .../ViewRoutingSlip/RefundRequestForm.vue | 19 +++++++++++++++---- src/composables/Dashboard/useSearch.ts | 4 ++-- src/composables/useRoutingSlip.ts | 1 + 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/components/ViewRoutingSlip/RefundRequestForm.vue b/src/components/ViewRoutingSlip/RefundRequestForm.vue index 520eb6de..c3b77997 100644 --- a/src/components/ViewRoutingSlip/RefundRequestForm.vue +++ b/src/components/ViewRoutingSlip/RefundRequestForm.vue @@ -64,7 +64,7 @@ close-on-content-click offset-y v-model="isExpanded" - v-if="!canEdit && currentRefundStatusLabel !== RoutingSlipRefundCodes.PROCESSING" + v-if="!canEdit && currentRefundStatusLabel && currentRefundStatusLabel !== RoutingSlipRefundCodes.PROCESSING" > { - const refundInProgress = [SlipStatus.REFUNDAUTHORIZED, SlipStatus.REFUNDREQUEST, SlipStatus.REFUNDUPLOADED].includes(state.currentStatus as SlipStatus) - const refundComplete = [SlipStatus.REFUNDPROCESSED].includes(state.currentStatus as SlipStatus) - if (refundInProgress) { - return RoutingSlipRefundCodes.PROCESSING - } else if (refundComplete) { - return searchState.getRefundStatusText(state.currentRefundStatus) - } else { - return null + const statusMap = { + [SlipStatus.REFUNDAUTHORIZED]: RoutingSlipRefundCodes.PROCESSING, + [SlipStatus.REFUNDREQUEST]: RoutingSlipRefundCodes.PROCESSING, + [SlipStatus.REFUNDUPLOADED]: RoutingSlipRefundCodes.PROCESSING, + [SlipStatus.REFUNDPROCESSED]: searchState.getRefundStatusText(state.currentRefundStatus) } + return statusMap[state.currentStatus] || null }) const expendStatus = () => { @@ -217,12 +215,6 @@ export default defineComponent({ background-color: transparent !important; } -.status-list { - margin: 0 !important; - padding: 0 !important; - min-width: auto !important; -} - .status-list .v-list-item__title { color: #1669BB !important; font-size: 16px !important; diff --git a/src/composables/Dashboard/useSearch.ts b/src/composables/Dashboard/useSearch.ts index f95bb89a..205b53b3 100644 --- a/src/composables/Dashboard/useSearch.ts +++ b/src/composables/Dashboard/useSearch.ts @@ -278,8 +278,8 @@ export function useSearch (props, context) { }, 100) // Adjust the wait time as needed function getRefundStatusText (statusCode: string | undefined): string { - const refundStatus = RoutingSlipRefundStatus.find(item => item.code === statusCode) - return refundStatus.text ? refundStatus.text : RoutingSlipRefundCodes.PROCESSING + const refundStatus = RoutingSlipRefundStatus.find(item => item.code === statusCode)?.text || RoutingSlipRefundCodes.PROCESSING + return refundStatus } function getStatusFromRefundStatus (statusCode: string): SlipStatus { From 99a3f90b462a90891246f6be3082c5c81c6da986 Mon Sep 17 00:00:00 2001 From: Jia Xu Date: Tue, 29 Oct 2024 13:11:05 -0700 Subject: [PATCH 5/7] 1.2.16 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 956b83be..6eb3374c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "fas-ui", - "version": "1.2.15", + "version": "1.2.16", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "fas-ui", - "version": "1.2.15", + "version": "1.2.16", "dependencies": { "@bcrs-shared-components/base-address": "^2.0.3", "@bcrs-shared-components/enums": "^1.0.51", diff --git a/package.json b/package.json index e913e820..cffa2370 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fas-ui", - "version": "1.2.15", + "version": "1.2.16", "private": true, "main": "./lib/lib.umd.min.js", "appName": "FAS UI", From 3bd4369f4ccc214e09ad5942ef8d64ef4883253e Mon Sep 17 00:00:00 2001 From: Jia Xu Date: Tue, 29 Oct 2024 13:11:25 -0700 Subject: [PATCH 6/7] 1.2.17 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6eb3374c..53cef459 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "fas-ui", - "version": "1.2.16", + "version": "1.2.17", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "fas-ui", - "version": "1.2.16", + "version": "1.2.17", "dependencies": { "@bcrs-shared-components/base-address": "^2.0.3", "@bcrs-shared-components/enums": "^1.0.51", diff --git a/package.json b/package.json index cffa2370..8791ebe1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fas-ui", - "version": "1.2.16", + "version": "1.2.17", "private": true, "main": "./lib/lib.umd.min.js", "appName": "FAS UI", From 47439818852f40e42fcc992cc923329ccbed7aab Mon Sep 17 00:00:00 2001 From: Jia Xu Date: Tue, 29 Oct 2024 13:13:00 -0700 Subject: [PATCH 7/7] re-build lib --- lib/lib.umd.min.js | 7 ++++--- lib/lib.umd.min.js.map | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/lib.umd.min.js b/lib/lib.umd.min.js index 79807372..78f0874e 100644 --- a/lib/lib.umd.min.js +++ b/lib/lib.umd.min.js @@ -852,7 +852,8 @@ return!0})),o=VueCompositionAPI.computed((()=>{var e return!!(null==(e=routingSlip.value)?void 0:e.parentNumber)})),a=VueCompositionAPI.computed((()=>{var e return o.value||(null==(e=linkedRoutingSlips.value)?void 0:e.children.length)>0})),s=VueCompositionAPI.computed((()=>{var e return(null==(e=routingSlip.value)?void 0:e.status)===SlipStatus.VOID})),getRoutingSlip=async e=>{var r -try{const r=await RoutingSlip.getRoutingSlip(e.routingSlipNumber,null==e?void 0:e.showGlobalLoader) +try{routingSlip.value=null +const r=await RoutingSlip.getRoutingSlip(e.routingSlipNumber,null==e?void 0:e.showGlobalLoader) r&&r.data&&200===r.status&&(routingSlip.value=r.data)}catch(o){console.error("error ",null==(r=o.response)?void 0:r.data)}},searchRoutingSlip=async(e=!1)=>{var r,o,a let s={...searchRoutingSlipParams.value} if(s=CommonUtils.cleanObject(s),s.dateFilter&&(s.dateFilter={startDate:CommonUtils.formatDisplayDate(s.dateFilter[0],"YYYY-MM-DD"),endDate:CommonUtils.formatDisplayDate(s.dateFilter[1],"YYYY-MM-DD")}),s.status&&(s.status=s.status.code),Object.keys(s).length>0){const l=await RoutingSlip.getSearchRoutingSlip(s) @@ -900,8 +901,8 @@ const x=debounce((()=>{searchNow()})),M=CommonUtils.appendQueryParamsIfNeeded const U=debounce((async()=>{_.value||(b.value=await h())}),100) return{headerSearch:R,displayedHeaderSearch:T,status:E,refundStatus:O,routingSlipNumber:C,receiptNumber:w,dateFilter:F,businessIdentifier:A,accountName:I,remainingAmount:P,chequeReceiptNumber:N,canShowColumn:function canShowColumn(e){return T.value.find((r=>r.value===e))},applyDateFilter:function applyDateFilter(e){F.value=e},searchNow:searchNow,debouncedSearch:x,searchRoutingSlipResult:u,getStatusLabel:function getStatusLabel(e){return g(e)},searchParamsExist:s,clearFilter:async function clearFilter(){S(),a(),await l(),k.value=!1,S()},formatFolioResult:function formatFolioResult(e){if(!k.value&&A.value&&""!==A.value)return[A.value] const{invoices:r}=e -return r?r.filter((e=>e.businessIdentifier)).map((e=>e.businessIdentifier)):["-"]},showExpandedFolio:y,showExpandedCheque:v,toggleFolio:function toggleFolio(e){y.value.includes(e)?y.value=y.value.filter((function(r){return r!==e})):y.value.push(e)},toggleCheque:function toggleCheque(e){v.value.includes(e)?v.value=v.value.filter((function(r){return r!==e})):v.value.push(e)},isLoading:_,navigateTo:function navigateTo(e){p.value?window.location.href=`${ConfigHelper.getFasWebUrl()}view-routing-slip/${e}?viewFromAuth=true`:r.root.$router.push(M(`/view-routing-slip/${e}`,r.root.$route))},fasUrl:m,initiator:D,reachedEnd:b,getNext:U,getRefundStatusText:function getRefundStatusText(e){const r=RoutingSlipRefundStatus.find((r=>r.code===e)) -return r?r.text:RoutingSlipRefundCodes.PROCESSING},getStatusFromRefundStatus:function getStatusFromRefundStatus(e){return e===RoutingSlipRefundCodes.PROCESSING?SlipStatus.REFUNDREQUEST:SlipStatus.REFUNDPROCESSED}}} +return r?r.filter((e=>e.businessIdentifier)).map((e=>e.businessIdentifier)):["-"]},showExpandedFolio:y,showExpandedCheque:v,toggleFolio:function toggleFolio(e){y.value.includes(e)?y.value=y.value.filter((function(r){return r!==e})):y.value.push(e)},toggleCheque:function toggleCheque(e){v.value.includes(e)?v.value=v.value.filter((function(r){return r!==e})):v.value.push(e)},isLoading:_,navigateTo:function navigateTo(e){p.value?window.location.href=`${ConfigHelper.getFasWebUrl()}view-routing-slip/${e}?viewFromAuth=true`:r.root.$router.push(M(`/view-routing-slip/${e}`,r.root.$route))},fasUrl:m,initiator:D,reachedEnd:b,getNext:U,getRefundStatusText:function getRefundStatusText(e){var r +return(null==(r=RoutingSlipRefundStatus.find((r=>r.code===e)))?void 0:r.text)||RoutingSlipRefundCodes.PROCESSING},getStatusFromRefundStatus:function getStatusFromRefundStatus(e){return e===RoutingSlipRefundCodes.PROCESSING?SlipStatus.REFUNDREQUEST:SlipStatus.REFUNDPROCESSED}}} /** * vue-class-component v7.2.6 * (c) 2015-present Evan You diff --git a/lib/lib.umd.min.js.map b/lib/lib.umd.min.js.map index 63ab2604..2facf384 100644 --- a/lib/lib.umd.min.js.map +++ b/lib/lib.umd.min.js.map @@ -1 +1 @@ -{"version":3,"file":"lib.umd.min.js","sources":["../src/shims-vue-composition-api.ts","../src/util/constants.ts","../node_modules/js-sha256/src/sha256.js","../node_modules/keycloak-js/node_modules/base64-js/index.js","../node_modules/keycloak-js/dist/keycloak.js","../node_modules/sbc-common-components/src/util/constants.ts","../node_modules/sbc-common-components/src/util/common-util.ts","../node_modules/sbc-common-components/src/util/config-helper.ts","../node_modules/vuex-module-decorators/dist/esm/index.js","../node_modules/sbc-common-components/src/store/modules/auth.ts","../node_modules/sbc-common-components/src/services/keycloak.services.ts","../node_modules/moment/dist/moment.js","../src/util/common-util.ts","../src/util/config-helper.ts","../src/util/debounce.ts","../src/composables/useIndicators.ts","../src/composables/common/useLoader.ts","../node_modules/axios/lib/helpers/bind.js","../node_modules/axios/lib/utils.js","../node_modules/axios/lib/helpers/buildURL.js","../node_modules/axios/lib/core/InterceptorManager.js","../node_modules/axios/lib/helpers/normalizeHeaderName.js","../node_modules/axios/lib/core/enhanceError.js","../node_modules/axios/lib/core/createError.js","../node_modules/axios/lib/core/settle.js","../node_modules/axios/lib/helpers/cookies.js","../node_modules/axios/lib/helpers/isAbsoluteURL.js","../node_modules/axios/lib/helpers/combineURLs.js","../node_modules/axios/lib/core/buildFullPath.js","../node_modules/axios/lib/helpers/parseHeaders.js","../node_modules/axios/lib/helpers/isURLSameOrigin.js","../node_modules/axios/lib/adapters/xhr.js","../node_modules/axios/lib/defaults.js","../node_modules/axios/lib/core/transformData.js","../node_modules/axios/lib/cancel/isCancel.js","../node_modules/axios/lib/core/dispatchRequest.js","../node_modules/axios/lib/core/mergeConfig.js","../node_modules/axios/lib/helpers/validator.js","../node_modules/axios/lib/core/Axios.js","../node_modules/axios/lib/cancel/Cancel.js","../node_modules/axios/lib/cancel/CancelToken.js","../node_modules/axios/lib/helpers/spread.js","../node_modules/axios/lib/helpers/isAxiosError.js","../node_modules/axios/lib/axios.js","../node_modules/axios/index.js","../src/util/http-util.ts","../src/services/codes.service.ts","../src/composables/useCodes.ts","../src/composables/common/useStatusList.ts","../src/services/routingSlip.services.ts","../src/composables/useRoutingSlip.ts","../src/composables/Dashboard/useSearch.ts","../node_modules/vue-class-component/dist/vue-class-component.esm.js","../node_modules/vue-property-decorator/lib/decorators/Emit.js","../node_modules/vue-property-decorator/lib/helpers/metadata.js","../node_modules/vue-property-decorator/lib/decorators/Prop.js","../src/composables/common/useDateRange.ts","../src/composables/common/useSearchColumnFilterComponent.ts","../src/components/common/DateRangeFilter.vue","../src/components/common/DateRangeFilter.vue?vue&type=template&lang.js","../src/components/common/SearchColumnFilterComponent.vue","../src/components/common/SearchColumnFilterComponent.vue?vue&type=template&lang.js","../src/components/common/StatusList.vue","../src/components/common/StatusList.vue?vue&type=template&lang.js","../src/components/common/TableObserver.vue?vue&type=template&lang.js","../src/components/common/TableObserver.vue","../src/composables/Dashboard/useDashboard.ts","../src/directives/can.ts","../src/components/Dashboard/Search.vue","../src/components/Dashboard/Search.vue?vue&type=template&lang.js","../node_modules/vue-i18n/dist/vue-i18n.esm.js","../node_modules/vue-i18n-composable/dist/index.mjs","../src/plugins/i18n.ts","../src/lib-setup.js"],"sourcesContent":["// This needs to be done, otherwise these App.vue gets hoisted above the statements below:\nimport VueCompositionAPI from '@vue/composition-api'\nimport Vue from 'vue'\nVue.use(VueCompositionAPI)\n","export enum SessionStorageKeys {\n KeyCloakToken = 'KEYCLOAK_TOKEN',\n ApiConfigKey = 'AUTH_API_CONFIG',\n LaunchDarklyFlags = 'LD_FLAGS',\n ExtraProvincialUser = 'EXTRAPROVINCIAL_USER',\n SessionSynced = 'SESSION_SYNCED',\n AuthApiUrl = 'AUTH_API_URL',\n AuthWebUrl = 'AUTH_WEB_URL',\n PayApiUrl = 'PAY_API_URL',\n StatusApiUrl = 'STATUS_API_URL',\n FasWebUrl = 'FAS_WEB_URL',\n SiteminderLogoutUrl = 'SITEMINDER_LOGOUT_URL'\n}\n\nexport enum DateFilterCodes {\n TODAY = 'TODAY',\n YESTERDAY = 'YESTERDAY',\n LASTWEEK = 'LASTWEEK',\n LASTMONTH = 'LASTMONTH',\n CUSTOMRANGE = 'CUSTOMRANGE',\n}\n\nexport enum PaymentMethods {\n CASH = 'CASH',\n CHEQUE = 'CHEQUE',\n}\n\nexport enum SlipStatus {\n ACTIVE = 'ACTIVE',\n COMPLETE = 'COMPLETE',\n BOUNCED = 'BOUNCED',\n NSF = 'NSF',\n REFUND = 'REFUND',\n LAST = 'LAST',\n HOLD = 'HOLD',\n LINKED = 'LINKED',\n REFUNDREQUEST = 'REFUND_REQUESTED',\n REFUNDAUTHORIZED = 'REFUND_AUTHORIZED',\n REFUNDPROCESSED = 'REFUND_PROCESSED',\n REFUNDUPLOADED = 'REFUND_UPLOADED',\n REFUNDREJECTED = 'REFUND_REJECTED',\n CANCEL_REFUND_REQUEST = 'CANCEL_REFUND_REQUEST',\n CANCELWRITEOFFREQUEST='CANCEL_WRITE_OFF_REQUEST',\n WRITEOFFAUTHORIZED='WRITE_OFF_AUTHORIZED',\n WRITEOFFREQUESTED='WRITE_OFF_REQUESTED',\n WRITEOFFCOMPLETED='WRITE_OFF_COMPLETED',\n VOID='VOID',\n CORRECTION='CORRECTION'\n}\n\nexport enum SlipStatusLabel {\n ACTIVE = 'Place routing slip to active',\n NSF = 'Place routing slip to NSF',\n HOLD = 'Place routing slip on hold',\n LINKED = 'LINKED',\n REFUND_REQUESTED = 'Refund request',\n WRITE_OFF_REQUESTED = 'Write off request',\n CANCEL_REFUND_REQUEST = 'Cancel refund request',\n REFUND_AUTHORIZED='Review refund request',\n WRITE_OFF_AUTHORIZED='Authorize Write off request',\n CANCEL_WRITE_OFF_REQUEST='Cancel Write off request',\n VOID='Void Routing Slip',\n // CORRECTION='Correct Routing Slip' - Future\n}\n\nexport enum Role {\n FAS_USER = 'fas_user',\n FAS_EDIT = 'fas_edit',\n FAS_REPORTS = 'fas_reports',\n FAS_SEARCH = 'fas_search',\n FAS_VIEW = 'fas_view',\n FAS_CREATE = 'fas_create',\n FAS_LNK = 'fas_link',\n FAS_TRANSACTION = 'fas_transaction',\n FAS_REFUND_APPROVER = 'fas_refund_approver',\n FAS_REFUND = 'fas_refund',\n FAS_VOID = 'fas_void',\n FAS_CORRECTION = 'fas_correction'\n}\n\nexport enum InvoiceStatus {\n COMPLETED = 'COMPLETED',\n REFUNDED = 'REFUNDED',\n DELETE_ACCEPTED = 'DELETE_ACCEPTED',\n REFUNDREQUEST = 'REFUND_REQUESTED',\n}\n\nexport enum ApiErrors {\n FAS_INVALID_ROUTING_SLIP_DIGITS = 'FAS_INVALID_ROUTING_SLIP_DIGITS'\n}\n\nexport enum CreateRoutingSlipStatus {\n VALID = 'VALID',\n EXISTS = 'EXISTS',\n INVALID_DIGITS = 'INVALID_DIGITS',\n}\n\nexport enum PatchActions {\n UPDATE_STATUS = 'updateStatus'\n}\n\nexport const AXIOS_ERROR_ALERT_TIME_OUT = 5000\n\nexport const headerSearchTitle =\n[\n {\n text: 'Routing Slip Number',\n align: 'start',\n value: 'routingSlipNumber',\n display: true,\n className: 'routing-slip'\n },\n {\n text: 'Receipt Number',\n align: 'start',\n sortable: false,\n value: 'receiptNumber',\n display: true,\n className: 'receiptNumber'\n },\n {\n text: 'Entity Number',\n align: 'start',\n value: 'accountName',\n sortable: false,\n display: false,\n className: 'accountName'\n },\n {\n text: 'Created By',\n align: 'start',\n value: 'createdName',\n sortable: false,\n display: false,\n className: 'createdName'\n },\n {\n text: 'Date',\n align: 'start',\n sortable: false,\n value: 'date',\n display: true,\n className: 'date'\n },\n {\n text: 'Status',\n align: 'start',\n sortable: false,\n value: 'status',\n display: true,\n className: 'status'\n },\n {\n text: 'Refund Status',\n align: 'start',\n sortable: false,\n value: 'refundStatus',\n display: true,\n className: 'refundStatus'\n },\n {\n text: 'Reference Number',\n align: 'start',\n value: 'businessIdentifier',\n sortable: false,\n display: true,\n className: 'businessIdentifier'\n },\n {\n text: 'Cheque Number',\n align: 'start',\n value: 'chequeReceiptNumber',\n sortable: false,\n display: false,\n className: 'cheque-receipt-number'\n },\n {\n text: 'Balance',\n align: 'right',\n value: 'remainingAmount',\n sortable: false,\n display: true,\n className: 'remainingAmount'\n },\n {\n text: 'Actions',\n align: 'start',\n value: '',\n sortable: false,\n display: true,\n hideInSearchColumnFilter: true,\n className: 'action'\n }\n]\n\nexport const RoutingSlipRefundStatus = [\n {\n code: 'PROCESSING',\n text: 'PROCESSING',\n display: false\n },\n {\n code: 'PROCESSED',\n text: 'PROCESSED',\n display: true\n },\n {\n code: 'CHEQUE_UNDELIVERABLE',\n text: 'CHEQUE UNDELIVERABLE',\n display: true\n }\n]\n\nexport const RoutingSlipRefundCodes = RoutingSlipRefundStatus.reduce((acc, status) => {\n acc[status.code] = status.code\n return acc\n}, {} as { [key: string]: string })\n","/**\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\n *\n * @version 0.9.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2017\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var ERROR = 'input is invalid type';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA256_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA256_NO_COMMON_JS && typeof module === 'object' && module.exports;\n var AMD = typeof define === 'function' && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA256_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var EXTRA = [-2147483648, 8388608, 32768, 128];\n var SHIFT = [24, 16, 8, 0];\n var K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n ];\n var OUTPUT_TYPES = ['hex', 'array', 'digest', 'arrayBuffer'];\n\n var blocks = [];\n\n if (root.JS_SHA256_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n }\n\n if (ARRAY_BUFFER && (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n\n var createOutputMethod = function (outputType, is224) {\n return function (message) {\n return new Sha256(is224, true).update(message)[outputType]();\n };\n };\n\n var createMethod = function (is224) {\n var method = createOutputMethod('hex', is224);\n if (NODE_JS) {\n method = nodeWrap(method, is224);\n }\n method.create = function () {\n return new Sha256(is224);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createOutputMethod(type, is224);\n }\n return method;\n };\n\n var nodeWrap = function (method, is224) {\n var crypto = eval(\"require('crypto')\");\n var Buffer = eval(\"require('buffer').Buffer\");\n var algorithm = is224 ? 'sha224' : 'sha256';\n var nodeMethod = function (message) {\n if (typeof message === 'string') {\n return crypto.createHash(algorithm).update(message, 'utf8').digest('hex');\n } else {\n if (message === null || message === undefined) {\n throw new Error(ERROR);\n } else if (message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n }\n }\n if (Array.isArray(message) || ArrayBuffer.isView(message) ||\n message.constructor === Buffer) {\n return crypto.createHash(algorithm).update(new Buffer(message)).digest('hex');\n } else {\n return method(message);\n }\n };\n return nodeMethod;\n };\n\n var createHmacOutputMethod = function (outputType, is224) {\n return function (key, message) {\n return new HmacSha256(key, is224, true).update(message)[outputType]();\n };\n };\n\n var createHmacMethod = function (is224) {\n var method = createHmacOutputMethod('hex', is224);\n method.create = function (key) {\n return new HmacSha256(key, is224);\n };\n method.update = function (key, message) {\n return method.create(key).update(message);\n };\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createHmacOutputMethod(type, is224);\n }\n return method;\n };\n\n function Sha256(is224, sharedMemory) {\n if (sharedMemory) {\n blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n this.blocks = blocks;\n } else {\n this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n }\n\n if (is224) {\n this.h0 = 0xc1059ed8;\n this.h1 = 0x367cd507;\n this.h2 = 0x3070dd17;\n this.h3 = 0xf70e5939;\n this.h4 = 0xffc00b31;\n this.h5 = 0x68581511;\n this.h6 = 0x64f98fa7;\n this.h7 = 0xbefa4fa4;\n } else { // 256\n this.h0 = 0x6a09e667;\n this.h1 = 0xbb67ae85;\n this.h2 = 0x3c6ef372;\n this.h3 = 0xa54ff53a;\n this.h4 = 0x510e527f;\n this.h5 = 0x9b05688c;\n this.h6 = 0x1f83d9ab;\n this.h7 = 0x5be0cd19;\n }\n\n this.block = this.start = this.bytes = this.hBytes = 0;\n this.finalized = this.hashed = false;\n this.first = true;\n this.is224 = is224;\n }\n\n Sha256.prototype.update = function (message) {\n if (this.finalized) {\n return;\n }\n var notString, type = typeof message;\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n notString = true;\n }\n var code, index = 0, i, length = message.length, blocks = this.blocks;\n\n while (index < length) {\n if (this.hashed) {\n this.hashed = false;\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n\n if (notString) {\n for (i = this.start; index < length && i < 64; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < 64; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n\n this.lastByteIndex = i;\n this.bytes += i - this.start;\n if (i >= 64) {\n this.block = blocks[16];\n this.start = i - 64;\n this.hash();\n this.hashed = true;\n } else {\n this.start = i;\n }\n }\n if (this.bytes > 4294967295) {\n this.hBytes += this.bytes / 4294967296 << 0;\n this.bytes = this.bytes % 4294967296;\n }\n return this;\n };\n\n Sha256.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex;\n blocks[16] = this.block;\n blocks[i >> 2] |= EXTRA[i & 3];\n this.block = blocks[16];\n if (i >= 56) {\n if (!this.hashed) {\n this.hash();\n }\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n blocks[14] = this.hBytes << 3 | this.bytes >>> 29;\n blocks[15] = this.bytes << 3;\n this.hash();\n };\n\n Sha256.prototype.hash = function () {\n var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6,\n h = this.h7, blocks = this.blocks, j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc;\n\n for (j = 16; j < 64; ++j) {\n // rightrotate\n t1 = blocks[j - 15];\n s0 = ((t1 >>> 7) | (t1 << 25)) ^ ((t1 >>> 18) | (t1 << 14)) ^ (t1 >>> 3);\n t1 = blocks[j - 2];\n s1 = ((t1 >>> 17) | (t1 << 15)) ^ ((t1 >>> 19) | (t1 << 13)) ^ (t1 >>> 10);\n blocks[j] = blocks[j - 16] + s0 + blocks[j - 7] + s1 << 0;\n }\n\n bc = b & c;\n for (j = 0; j < 64; j += 4) {\n if (this.first) {\n if (this.is224) {\n ab = 300032;\n t1 = blocks[0] - 1413257819;\n h = t1 - 150054599 << 0;\n d = t1 + 24177077 << 0;\n } else {\n ab = 704751109;\n t1 = blocks[0] - 210244248;\n h = t1 - 1521486534 << 0;\n d = t1 + 143694565 << 0;\n }\n this.first = false;\n } else {\n s0 = ((a >>> 2) | (a << 30)) ^ ((a >>> 13) | (a << 19)) ^ ((a >>> 22) | (a << 10));\n s1 = ((e >>> 6) | (e << 26)) ^ ((e >>> 11) | (e << 21)) ^ ((e >>> 25) | (e << 7));\n ab = a & b;\n maj = ab ^ (a & c) ^ bc;\n ch = (e & f) ^ (~e & g);\n t1 = h + s1 + ch + K[j] + blocks[j];\n t2 = s0 + maj;\n h = d + t1 << 0;\n d = t1 + t2 << 0;\n }\n s0 = ((d >>> 2) | (d << 30)) ^ ((d >>> 13) | (d << 19)) ^ ((d >>> 22) | (d << 10));\n s1 = ((h >>> 6) | (h << 26)) ^ ((h >>> 11) | (h << 21)) ^ ((h >>> 25) | (h << 7));\n da = d & a;\n maj = da ^ (d & b) ^ ab;\n ch = (h & e) ^ (~h & f);\n t1 = g + s1 + ch + K[j + 1] + blocks[j + 1];\n t2 = s0 + maj;\n g = c + t1 << 0;\n c = t1 + t2 << 0;\n s0 = ((c >>> 2) | (c << 30)) ^ ((c >>> 13) | (c << 19)) ^ ((c >>> 22) | (c << 10));\n s1 = ((g >>> 6) | (g << 26)) ^ ((g >>> 11) | (g << 21)) ^ ((g >>> 25) | (g << 7));\n cd = c & d;\n maj = cd ^ (c & a) ^ da;\n ch = (g & h) ^ (~g & e);\n t1 = f + s1 + ch + K[j + 2] + blocks[j + 2];\n t2 = s0 + maj;\n f = b + t1 << 0;\n b = t1 + t2 << 0;\n s0 = ((b >>> 2) | (b << 30)) ^ ((b >>> 13) | (b << 19)) ^ ((b >>> 22) | (b << 10));\n s1 = ((f >>> 6) | (f << 26)) ^ ((f >>> 11) | (f << 21)) ^ ((f >>> 25) | (f << 7));\n bc = b & c;\n maj = bc ^ (b & d) ^ cd;\n ch = (f & g) ^ (~f & h);\n t1 = e + s1 + ch + K[j + 3] + blocks[j + 3];\n t2 = s0 + maj;\n e = a + t1 << 0;\n a = t1 + t2 << 0;\n }\n\n this.h0 = this.h0 + a << 0;\n this.h1 = this.h1 + b << 0;\n this.h2 = this.h2 + c << 0;\n this.h3 = this.h3 + d << 0;\n this.h4 = this.h4 + e << 0;\n this.h5 = this.h5 + f << 0;\n this.h6 = this.h6 + g << 0;\n this.h7 = this.h7 + h << 0;\n };\n\n Sha256.prototype.hex = function () {\n this.finalize();\n\n var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,\n h6 = this.h6, h7 = this.h7;\n\n var hex = HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] +\n HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] +\n HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] +\n HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] +\n HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] +\n HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] +\n HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] +\n HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] +\n HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] +\n HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] +\n HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] +\n HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] +\n HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F] +\n HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] +\n HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] +\n HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] +\n HEX_CHARS[(h4 >> 28) & 0x0F] + HEX_CHARS[(h4 >> 24) & 0x0F] +\n HEX_CHARS[(h4 >> 20) & 0x0F] + HEX_CHARS[(h4 >> 16) & 0x0F] +\n HEX_CHARS[(h4 >> 12) & 0x0F] + HEX_CHARS[(h4 >> 8) & 0x0F] +\n HEX_CHARS[(h4 >> 4) & 0x0F] + HEX_CHARS[h4 & 0x0F] +\n HEX_CHARS[(h5 >> 28) & 0x0F] + HEX_CHARS[(h5 >> 24) & 0x0F] +\n HEX_CHARS[(h5 >> 20) & 0x0F] + HEX_CHARS[(h5 >> 16) & 0x0F] +\n HEX_CHARS[(h5 >> 12) & 0x0F] + HEX_CHARS[(h5 >> 8) & 0x0F] +\n HEX_CHARS[(h5 >> 4) & 0x0F] + HEX_CHARS[h5 & 0x0F] +\n HEX_CHARS[(h6 >> 28) & 0x0F] + HEX_CHARS[(h6 >> 24) & 0x0F] +\n HEX_CHARS[(h6 >> 20) & 0x0F] + HEX_CHARS[(h6 >> 16) & 0x0F] +\n HEX_CHARS[(h6 >> 12) & 0x0F] + HEX_CHARS[(h6 >> 8) & 0x0F] +\n HEX_CHARS[(h6 >> 4) & 0x0F] + HEX_CHARS[h6 & 0x0F];\n if (!this.is224) {\n hex += HEX_CHARS[(h7 >> 28) & 0x0F] + HEX_CHARS[(h7 >> 24) & 0x0F] +\n HEX_CHARS[(h7 >> 20) & 0x0F] + HEX_CHARS[(h7 >> 16) & 0x0F] +\n HEX_CHARS[(h7 >> 12) & 0x0F] + HEX_CHARS[(h7 >> 8) & 0x0F] +\n HEX_CHARS[(h7 >> 4) & 0x0F] + HEX_CHARS[h7 & 0x0F];\n }\n return hex;\n };\n\n Sha256.prototype.toString = Sha256.prototype.hex;\n\n Sha256.prototype.digest = function () {\n this.finalize();\n\n var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,\n h6 = this.h6, h7 = this.h7;\n\n var arr = [\n (h0 >> 24) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 8) & 0xFF, h0 & 0xFF,\n (h1 >> 24) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 8) & 0xFF, h1 & 0xFF,\n (h2 >> 24) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 8) & 0xFF, h2 & 0xFF,\n (h3 >> 24) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 8) & 0xFF, h3 & 0xFF,\n (h4 >> 24) & 0xFF, (h4 >> 16) & 0xFF, (h4 >> 8) & 0xFF, h4 & 0xFF,\n (h5 >> 24) & 0xFF, (h5 >> 16) & 0xFF, (h5 >> 8) & 0xFF, h5 & 0xFF,\n (h6 >> 24) & 0xFF, (h6 >> 16) & 0xFF, (h6 >> 8) & 0xFF, h6 & 0xFF\n ];\n if (!this.is224) {\n arr.push((h7 >> 24) & 0xFF, (h7 >> 16) & 0xFF, (h7 >> 8) & 0xFF, h7 & 0xFF);\n }\n return arr;\n };\n\n Sha256.prototype.array = Sha256.prototype.digest;\n\n Sha256.prototype.arrayBuffer = function () {\n this.finalize();\n\n var buffer = new ArrayBuffer(this.is224 ? 28 : 32);\n var dataView = new DataView(buffer);\n dataView.setUint32(0, this.h0);\n dataView.setUint32(4, this.h1);\n dataView.setUint32(8, this.h2);\n dataView.setUint32(12, this.h3);\n dataView.setUint32(16, this.h4);\n dataView.setUint32(20, this.h5);\n dataView.setUint32(24, this.h6);\n if (!this.is224) {\n dataView.setUint32(28, this.h7);\n }\n return buffer;\n };\n\n function HmacSha256(key, is224, sharedMemory) {\n var i, type = typeof key;\n if (type === 'string') {\n var bytes = [], length = key.length, index = 0, code;\n for (i = 0; i < length; ++i) {\n code = key.charCodeAt(i);\n if (code < 0x80) {\n bytes[index++] = code;\n } else if (code < 0x800) {\n bytes[index++] = (0xc0 | (code >> 6));\n bytes[index++] = (0x80 | (code & 0x3f));\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes[index++] = (0xe0 | (code >> 12));\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\n bytes[index++] = (0x80 | (code & 0x3f));\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));\n bytes[index++] = (0xf0 | (code >> 18));\n bytes[index++] = (0x80 | ((code >> 12) & 0x3f));\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\n bytes[index++] = (0x80 | (code & 0x3f));\n }\n }\n key = bytes;\n } else {\n if (type === 'object') {\n if (key === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && key.constructor === ArrayBuffer) {\n key = new Uint8Array(key);\n } else if (!Array.isArray(key)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(key)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n }\n\n if (key.length > 64) {\n key = (new Sha256(is224, true)).update(key).array();\n }\n\n var oKeyPad = [], iKeyPad = [];\n for (i = 0; i < 64; ++i) {\n var b = key[i] || 0;\n oKeyPad[i] = 0x5c ^ b;\n iKeyPad[i] = 0x36 ^ b;\n }\n\n Sha256.call(this, is224, sharedMemory);\n\n this.update(iKeyPad);\n this.oKeyPad = oKeyPad;\n this.inner = true;\n this.sharedMemory = sharedMemory;\n }\n HmacSha256.prototype = new Sha256();\n\n HmacSha256.prototype.finalize = function () {\n Sha256.prototype.finalize.call(this);\n if (this.inner) {\n this.inner = false;\n var innerHash = this.array();\n Sha256.call(this, this.is224, this.sharedMemory);\n this.update(this.oKeyPad);\n this.update(innerHash);\n Sha256.prototype.finalize.call(this);\n }\n };\n\n var exports = createMethod();\n exports.sha256 = exports;\n exports.sha224 = createMethod(true);\n exports.sha256.hmac = createHmacMethod();\n exports.sha224.hmac = createHmacMethod(true);\n\n if (COMMON_JS) {\n module.exports = exports;\n } else {\n root.sha256 = exports.sha256;\n root.sha224 = exports.sha224;\n if (AMD) {\n define(function () {\n return exports;\n });\n }\n }\n})();\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*\n * Copyright 2016 Red Hat, Inc. and/or its affiliates\n * and other contributors as indicated by the @author tags.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n(function(root, factory) {\n if ( typeof exports === 'object' ) {\n if ( typeof module === 'object' ) {\n module.exports = factory( require(\"js-sha256\"), require(\"base64-js\") ); \n } else {\n exports[\"keycloak\"] = factory( require(\"js-sha256\"), require(\"base64-js\") ); \n }\n } else {\n /**\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\n *\n * @version 0.9.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2017\n * @license MIT\n */\n !function () { \"use strict\"; function t(t, i) { i ? (d[0] = d[16] = d[1] = d[2] = d[3] = d[4] = d[5] = d[6] = d[7] = d[8] = d[9] = d[10] = d[11] = d[12] = d[13] = d[14] = d[15] = 0, this.blocks = d) : this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], t ? (this.h0 = 3238371032, this.h1 = 914150663, this.h2 = 812702999, this.h3 = 4144912697, this.h4 = 4290775857, this.h5 = 1750603025, this.h6 = 1694076839, this.h7 = 3204075428) : (this.h0 = 1779033703, this.h1 = 3144134277, this.h2 = 1013904242, this.h3 = 2773480762, this.h4 = 1359893119, this.h5 = 2600822924, this.h6 = 528734635, this.h7 = 1541459225), this.block = this.start = this.bytes = this.hBytes = 0, this.finalized = this.hashed = !1, this.first = !0, this.is224 = t } function i(i, r, s) { var e, n = typeof i; if (\"string\" === n) { var o, a = [], u = i.length, c = 0; for (e = 0; e < u; ++e)(o = i.charCodeAt(e)) < 128 ? a[c++] = o : o < 2048 ? (a[c++] = 192 | o >> 6, a[c++] = 128 | 63 & o) : o < 55296 || o >= 57344 ? (a[c++] = 224 | o >> 12, a[c++] = 128 | o >> 6 & 63, a[c++] = 128 | 63 & o) : (o = 65536 + ((1023 & o) << 10 | 1023 & i.charCodeAt(++e)), a[c++] = 240 | o >> 18, a[c++] = 128 | o >> 12 & 63, a[c++] = 128 | o >> 6 & 63, a[c++] = 128 | 63 & o); i = a } else { if (\"object\" !== n) throw new Error(h); if (null === i) throw new Error(h); if (f && i.constructor === ArrayBuffer) i = new Uint8Array(i); else if (!(Array.isArray(i) || f && ArrayBuffer.isView(i))) throw new Error(h) } i.length > 64 && (i = new t(r, !0).update(i).array()); var y = [], p = []; for (e = 0; e < 64; ++e) { var l = i[e] || 0; y[e] = 92 ^ l, p[e] = 54 ^ l } t.call(this, r, s), this.update(p), this.oKeyPad = y, this.inner = !0, this.sharedMemory = s } var h = \"input is invalid type\", r = \"object\" == typeof window, s = r ? window : {}; s.JS_SHA256_NO_WINDOW && (r = !1); var e = !r && \"object\" == typeof self, n = !s.JS_SHA256_NO_NODE_JS && \"object\" == typeof process && process.versions && process.versions.node; n ? s = global : e && (s = self); var o = !s.JS_SHA256_NO_COMMON_JS && \"object\" == typeof module && module.exports, a = \"function\" == typeof define && define.amd, f = !s.JS_SHA256_NO_ARRAY_BUFFER && \"undefined\" != typeof ArrayBuffer, u = \"0123456789abcdef\".split(\"\"), c = [-2147483648, 8388608, 32768, 128], y = [24, 16, 8, 0], p = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298], l = [\"hex\", \"array\", \"digest\", \"arrayBuffer\"], d = []; !s.JS_SHA256_NO_NODE_JS && Array.isArray || (Array.isArray = function (t) { return \"[object Array]\" === Object.prototype.toString.call(t) }), !f || !s.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW && ArrayBuffer.isView || (ArrayBuffer.isView = function (t) { return \"object\" == typeof t && t.buffer && t.buffer.constructor === ArrayBuffer }); var A = function (i, h) { return function (r) { return new t(h, !0).update(r)[i]() } }, w = function (i) { var h = A(\"hex\", i); n && (h = b(h, i)), h.create = function () { return new t(i) }, h.update = function (t) { return h.create().update(t) }; for (var r = 0; r < l.length; ++r) { var s = l[r]; h[s] = A(s, i) } return h }, b = function (t, i) { var r = eval(\"require('crypto')\"), s = eval(\"require('buffer').Buffer\"), e = i ? \"sha224\" : \"sha256\", n = function (i) { if (\"string\" == typeof i) return r.createHash(e).update(i, \"utf8\").digest(\"hex\"); if (null === i || void 0 === i) throw new Error(h); return i.constructor === ArrayBuffer && (i = new Uint8Array(i)), Array.isArray(i) || ArrayBuffer.isView(i) || i.constructor === s ? r.createHash(e).update(new s(i)).digest(\"hex\") : t(i) }; return n }, v = function (t, h) { return function (r, s) { return new i(r, h, !0).update(s)[t]() } }, _ = function (t) { var h = v(\"hex\", t); h.create = function (h) { return new i(h, t) }, h.update = function (t, i) { return h.create(t).update(i) }; for (var r = 0; r < l.length; ++r) { var s = l[r]; h[s] = v(s, t) } return h }; t.prototype.update = function (t) { if (!this.finalized) { var i, r = typeof t; if (\"string\" !== r) { if (\"object\" !== r) throw new Error(h); if (null === t) throw new Error(h); if (f && t.constructor === ArrayBuffer) t = new Uint8Array(t); else if (!(Array.isArray(t) || f && ArrayBuffer.isView(t))) throw new Error(h); i = !0 } for (var s, e, n = 0, o = t.length, a = this.blocks; n < o;) { if (this.hashed && (this.hashed = !1, a[0] = this.block, a[16] = a[1] = a[2] = a[3] = a[4] = a[5] = a[6] = a[7] = a[8] = a[9] = a[10] = a[11] = a[12] = a[13] = a[14] = a[15] = 0), i) for (e = this.start; n < o && e < 64; ++n)a[e >> 2] |= t[n] << y[3 & e++]; else for (e = this.start; n < o && e < 64; ++n)(s = t.charCodeAt(n)) < 128 ? a[e >> 2] |= s << y[3 & e++] : s < 2048 ? (a[e >> 2] |= (192 | s >> 6) << y[3 & e++], a[e >> 2] |= (128 | 63 & s) << y[3 & e++]) : s < 55296 || s >= 57344 ? (a[e >> 2] |= (224 | s >> 12) << y[3 & e++], a[e >> 2] |= (128 | s >> 6 & 63) << y[3 & e++], a[e >> 2] |= (128 | 63 & s) << y[3 & e++]) : (s = 65536 + ((1023 & s) << 10 | 1023 & t.charCodeAt(++n)), a[e >> 2] |= (240 | s >> 18) << y[3 & e++], a[e >> 2] |= (128 | s >> 12 & 63) << y[3 & e++], a[e >> 2] |= (128 | s >> 6 & 63) << y[3 & e++], a[e >> 2] |= (128 | 63 & s) << y[3 & e++]); this.lastByteIndex = e, this.bytes += e - this.start, e >= 64 ? (this.block = a[16], this.start = e - 64, this.hash(), this.hashed = !0) : this.start = e } return this.bytes > 4294967295 && (this.hBytes += this.bytes / 4294967296 << 0, this.bytes = this.bytes % 4294967296), this } }, t.prototype.finalize = function () { if (!this.finalized) { this.finalized = !0; var t = this.blocks, i = this.lastByteIndex; t[16] = this.block, t[i >> 2] |= c[3 & i], this.block = t[16], i >= 56 && (this.hashed || this.hash(), t[0] = this.block, t[16] = t[1] = t[2] = t[3] = t[4] = t[5] = t[6] = t[7] = t[8] = t[9] = t[10] = t[11] = t[12] = t[13] = t[14] = t[15] = 0), t[14] = this.hBytes << 3 | this.bytes >>> 29, t[15] = this.bytes << 3, this.hash() } }, t.prototype.hash = function () { var t, i, h, r, s, e, n, o, a, f = this.h0, u = this.h1, c = this.h2, y = this.h3, l = this.h4, d = this.h5, A = this.h6, w = this.h7, b = this.blocks; for (t = 16; t < 64; ++t)i = ((s = b[t - 15]) >>> 7 | s << 25) ^ (s >>> 18 | s << 14) ^ s >>> 3, h = ((s = b[t - 2]) >>> 17 | s << 15) ^ (s >>> 19 | s << 13) ^ s >>> 10, b[t] = b[t - 16] + i + b[t - 7] + h << 0; for (a = u & c, t = 0; t < 64; t += 4)this.first ? (this.is224 ? (e = 300032, w = (s = b[0] - 1413257819) - 150054599 << 0, y = s + 24177077 << 0) : (e = 704751109, w = (s = b[0] - 210244248) - 1521486534 << 0, y = s + 143694565 << 0), this.first = !1) : (i = (f >>> 2 | f << 30) ^ (f >>> 13 | f << 19) ^ (f >>> 22 | f << 10), r = (e = f & u) ^ f & c ^ a, w = y + (s = w + (h = (l >>> 6 | l << 26) ^ (l >>> 11 | l << 21) ^ (l >>> 25 | l << 7)) + (l & d ^ ~l & A) + p[t] + b[t]) << 0, y = s + (i + r) << 0), i = (y >>> 2 | y << 30) ^ (y >>> 13 | y << 19) ^ (y >>> 22 | y << 10), r = (n = y & f) ^ y & u ^ e, A = c + (s = A + (h = (w >>> 6 | w << 26) ^ (w >>> 11 | w << 21) ^ (w >>> 25 | w << 7)) + (w & l ^ ~w & d) + p[t + 1] + b[t + 1]) << 0, i = ((c = s + (i + r) << 0) >>> 2 | c << 30) ^ (c >>> 13 | c << 19) ^ (c >>> 22 | c << 10), r = (o = c & y) ^ c & f ^ n, d = u + (s = d + (h = (A >>> 6 | A << 26) ^ (A >>> 11 | A << 21) ^ (A >>> 25 | A << 7)) + (A & w ^ ~A & l) + p[t + 2] + b[t + 2]) << 0, i = ((u = s + (i + r) << 0) >>> 2 | u << 30) ^ (u >>> 13 | u << 19) ^ (u >>> 22 | u << 10), r = (a = u & c) ^ u & y ^ o, l = f + (s = l + (h = (d >>> 6 | d << 26) ^ (d >>> 11 | d << 21) ^ (d >>> 25 | d << 7)) + (d & A ^ ~d & w) + p[t + 3] + b[t + 3]) << 0, f = s + (i + r) << 0; this.h0 = this.h0 + f << 0, this.h1 = this.h1 + u << 0, this.h2 = this.h2 + c << 0, this.h3 = this.h3 + y << 0, this.h4 = this.h4 + l << 0, this.h5 = this.h5 + d << 0, this.h6 = this.h6 + A << 0, this.h7 = this.h7 + w << 0 }, t.prototype.hex = function () { this.finalize(); var t = this.h0, i = this.h1, h = this.h2, r = this.h3, s = this.h4, e = this.h5, n = this.h6, o = this.h7, a = u[t >> 28 & 15] + u[t >> 24 & 15] + u[t >> 20 & 15] + u[t >> 16 & 15] + u[t >> 12 & 15] + u[t >> 8 & 15] + u[t >> 4 & 15] + u[15 & t] + u[i >> 28 & 15] + u[i >> 24 & 15] + u[i >> 20 & 15] + u[i >> 16 & 15] + u[i >> 12 & 15] + u[i >> 8 & 15] + u[i >> 4 & 15] + u[15 & i] + u[h >> 28 & 15] + u[h >> 24 & 15] + u[h >> 20 & 15] + u[h >> 16 & 15] + u[h >> 12 & 15] + u[h >> 8 & 15] + u[h >> 4 & 15] + u[15 & h] + u[r >> 28 & 15] + u[r >> 24 & 15] + u[r >> 20 & 15] + u[r >> 16 & 15] + u[r >> 12 & 15] + u[r >> 8 & 15] + u[r >> 4 & 15] + u[15 & r] + u[s >> 28 & 15] + u[s >> 24 & 15] + u[s >> 20 & 15] + u[s >> 16 & 15] + u[s >> 12 & 15] + u[s >> 8 & 15] + u[s >> 4 & 15] + u[15 & s] + u[e >> 28 & 15] + u[e >> 24 & 15] + u[e >> 20 & 15] + u[e >> 16 & 15] + u[e >> 12 & 15] + u[e >> 8 & 15] + u[e >> 4 & 15] + u[15 & e] + u[n >> 28 & 15] + u[n >> 24 & 15] + u[n >> 20 & 15] + u[n >> 16 & 15] + u[n >> 12 & 15] + u[n >> 8 & 15] + u[n >> 4 & 15] + u[15 & n]; return this.is224 || (a += u[o >> 28 & 15] + u[o >> 24 & 15] + u[o >> 20 & 15] + u[o >> 16 & 15] + u[o >> 12 & 15] + u[o >> 8 & 15] + u[o >> 4 & 15] + u[15 & o]), a }, t.prototype.toString = t.prototype.hex, t.prototype.digest = function () { this.finalize(); var t = this.h0, i = this.h1, h = this.h2, r = this.h3, s = this.h4, e = this.h5, n = this.h6, o = this.h7, a = [t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, 255 & t, i >> 24 & 255, i >> 16 & 255, i >> 8 & 255, 255 & i, h >> 24 & 255, h >> 16 & 255, h >> 8 & 255, 255 & h, r >> 24 & 255, r >> 16 & 255, r >> 8 & 255, 255 & r, s >> 24 & 255, s >> 16 & 255, s >> 8 & 255, 255 & s, e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e, n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, 255 & n]; return this.is224 || a.push(o >> 24 & 255, o >> 16 & 255, o >> 8 & 255, 255 & o), a }, t.prototype.array = t.prototype.digest, t.prototype.arrayBuffer = function () { this.finalize(); var t = new ArrayBuffer(this.is224 ? 28 : 32), i = new DataView(t); return i.setUint32(0, this.h0), i.setUint32(4, this.h1), i.setUint32(8, this.h2), i.setUint32(12, this.h3), i.setUint32(16, this.h4), i.setUint32(20, this.h5), i.setUint32(24, this.h6), this.is224 || i.setUint32(28, this.h7), t }, i.prototype = new t, i.prototype.finalize = function () { if (t.prototype.finalize.call(this), this.inner) { this.inner = !1; var i = this.array(); t.call(this, this.is224, this.sharedMemory), this.update(this.oKeyPad), this.update(i), t.prototype.finalize.call(this) } }; var B = w(); B.sha256 = B, B.sha224 = w(!0), B.sha256.hmac = _(), B.sha224.hmac = _(!0), o ? module.exports = B : (s.sha256 = B.sha256, s.sha224 = B.sha224, a && define(function () { return B })) }();\n\n /**\n * [base64-js]{@link https://github.com/beatgammit/base64-js}\n *\n * @version v1.3.0 \n * @author Kirill, Fomichev\n * @copyright Kirill, Fomichev 2014\n * @license MIT\n */\n (function (r) { if (typeof exports === \"object\" && typeof module !== \"undefined\") { module.exports = r() } else if (typeof define === \"function\" && define.amd) { define([], r) } else { var e; if (typeof window !== \"undefined\") { e = window } else if (typeof global !== \"undefined\") { e = global } else if (typeof self !== \"undefined\") { e = self } else { e = this } e.base64js = r() } })(function () { var r, e, n; return function () { function r(e, n, t) { function o(f, i) { if (!n[f]) { if (!e[f]) { var u = \"function\" == typeof require && require; if (!i && u) return u(f, !0); if (a) return a(f, !0); var v = new Error(\"Cannot find module '\" + f + \"'\"); throw v.code = \"MODULE_NOT_FOUND\", v } var d = n[f] = { exports: {} }; e[f][0].call(d.exports, function (r) { var n = e[f][1][r]; return o(n || r) }, d, d.exports, r, e, n, t) } return n[f].exports } for (var a = \"function\" == typeof require && require, f = 0; f < t.length; f++)o(t[f]); return o } return r }()({ \"/\": [function (r, e, n) { \"use strict\"; n.byteLength = d; n.toByteArray = h; n.fromByteArray = p; var t = []; var o = []; var a = typeof Uint8Array !== \"undefined\" ? Uint8Array : Array; var f = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"; for (var i = 0, u = f.length; i < u; ++i) { t[i] = f[i]; o[f.charCodeAt(i)] = i } o[\"-\".charCodeAt(0)] = 62; o[\"_\".charCodeAt(0)] = 63; function v(r) { var e = r.length; if (e % 4 > 0) { throw new Error(\"Invalid string. Length must be a multiple of 4\") } var n = r.indexOf(\"=\"); if (n === -1) n = e; var t = n === e ? 0 : 4 - n % 4; return [n, t] } function d(r) { var e = v(r); var n = e[0]; var t = e[1]; return (n + t) * 3 / 4 - t } function c(r, e, n) { return (e + n) * 3 / 4 - n } function h(r) { var e; var n = v(r); var t = n[0]; var f = n[1]; var i = new a(c(r, t, f)); var u = 0; var d = f > 0 ? t - 4 : t; for (var h = 0; h < d; h += 4) { e = o[r.charCodeAt(h)] << 18 | o[r.charCodeAt(h + 1)] << 12 | o[r.charCodeAt(h + 2)] << 6 | o[r.charCodeAt(h + 3)]; i[u++] = e >> 16 & 255; i[u++] = e >> 8 & 255; i[u++] = e & 255 } if (f === 2) { e = o[r.charCodeAt(h)] << 2 | o[r.charCodeAt(h + 1)] >> 4; i[u++] = e & 255 } if (f === 1) { e = o[r.charCodeAt(h)] << 10 | o[r.charCodeAt(h + 1)] << 4 | o[r.charCodeAt(h + 2)] >> 2; i[u++] = e >> 8 & 255; i[u++] = e & 255 } return i } function s(r) { return t[r >> 18 & 63] + t[r >> 12 & 63] + t[r >> 6 & 63] + t[r & 63] } function l(r, e, n) { var t; var o = []; for (var a = e; a < n; a += 3) { t = (r[a] << 16 & 16711680) + (r[a + 1] << 8 & 65280) + (r[a + 2] & 255); o.push(s(t)) } return o.join(\"\") } function p(r) { var e; var n = r.length; var o = n % 3; var a = []; var f = 16383; for (var i = 0, u = n - o; i < u; i += f) { a.push(l(r, i, i + f > u ? u : i + f)) } if (o === 1) { e = r[n - 1]; a.push(t[e >> 2] + t[e << 4 & 63] + \"==\") } else if (o === 2) { e = (r[n - 2] << 8) + r[n - 1]; a.push(t[e >> 10] + t[e >> 4 & 63] + t[e << 2 & 63] + \"=\") } return a.join(\"\") } }, {}] }, {}, [])(\"/\") });\n\n /**\n * [promise-polyfill]{@link https://github.com/taylorhakes/promise-polyfill}\n *\n * @version v8.1.3 \n * @author Hakes, Taylor\n * @copyright Hakes, Taylor 2014\n * @license MIT\n */\n !function(e,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?n():\"function\"==typeof define&&define.amd?define(n):n()}(0,function(){\"use strict\";function e(e){var n=this.constructor;return this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){return n.reject(t)})})}function n(e){return!(!e||\"undefined\"==typeof e.length)}function t(){}function o(e){if(!(this instanceof o))throw new TypeError(\"Promises must be constructed via new\");if(\"function\"!=typeof e)throw new TypeError(\"not a function\");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],c(e,this)}function r(e,n){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,o._immediateFn(function(){var t=1===e._state?n.onFulfilled:n.onRejected;if(null!==t){var o;try{o=t(e._value)}catch(r){return void f(n.promise,r)}i(n.promise,o)}else(1===e._state?i:f)(n.promise,e._value)})):e._deferreds.push(n)}function i(e,n){try{if(n===e)throw new TypeError(\"A promise cannot be resolved with itself.\");if(n&&(\"object\"==typeof n||\"function\"==typeof n)){var t=n.then;if(n instanceof o)return e._state=3,e._value=n,void u(e);if(\"function\"==typeof t)return void c(function(e,n){return function(){e.apply(n,arguments)}}(t,n),e)}e._state=1,e._value=n,u(e)}catch(r){f(e,r)}}function f(e,n){e._state=2,e._value=n,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&o._immediateFn(function(){e._handled||o._unhandledRejectionFn(e._value)});for(var n=0,t=e._deferreds.length;t>n;n++)r(e,e._deferreds[n]);e._deferreds=null}function c(e,n){var t=!1;try{e(function(e){t||(t=!0,i(n,e))},function(e){t||(t=!0,f(n,e))})}catch(o){if(t)return;t=!0,f(n,o)}}var a=setTimeout;o.prototype[\"catch\"]=function(e){return this.then(null,e)},o.prototype.then=function(e,n){var o=new this.constructor(t);return r(this,new function(e,n,t){this.onFulfilled=\"function\"==typeof e?e:null,this.onRejected=\"function\"==typeof n?n:null,this.promise=t}(e,n,o)),o},o.prototype[\"finally\"]=e,o.all=function(e){return new o(function(t,o){function r(e,n){try{if(n&&(\"object\"==typeof n||\"function\"==typeof n)){var u=n.then;if(\"function\"==typeof u)return void u.call(n,function(n){r(e,n)},o)}i[e]=n,0==--f&&t(i)}catch(c){o(c)}}if(!n(e))return o(new TypeError(\"Promise.all accepts an array\"));var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);for(var f=i.length,u=0;i.length>u;u++)r(u,i[u])})},o.resolve=function(e){return e&&\"object\"==typeof e&&e.constructor===o?e:new o(function(n){n(e)})},o.reject=function(e){return new o(function(n,t){t(e)})},o.race=function(e){return new o(function(t,r){if(!n(e))return r(new TypeError(\"Promise.race accepts an array\"));for(var i=0,f=e.length;f>i;i++)o.resolve(e[i]).then(t,r)})},o._immediateFn=\"function\"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){a(e,0)},o._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn(\"Possible Unhandled Promise Rejection:\",e)};var l=function(){if(\"undefined\"!=typeof self)return self;if(\"undefined\"!=typeof window)return window;if(\"undefined\"!=typeof global)return global;throw Error(\"unable to locate global object\")}();\"Promise\"in l?l.Promise.prototype[\"finally\"]||(l.Promise.prototype[\"finally\"]=e):l.Promise=o});\n\n var Keycloak = factory( root[\"sha256\"], root[\"base64js\"] );\n root[\"Keycloak\"] = Keycloak;\n\n if ( typeof define === \"function\" && define.amd ) { \n define( \"keycloak\", [], function () { return Keycloak; } );\n }\n }\n})(window, function (sha256_imported, base64js_imported) {\n if (typeof Promise === 'undefined') {\n throw Error('Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.');\n }\n\n var loggedPromiseDeprecation = false;\n\n function logPromiseDeprecation() {\n if (!loggedPromiseDeprecation) {\n loggedPromiseDeprecation = true;\n console.warn('[KEYCLOAK] Usage of legacy style promise methods such as `.error()` and `.success()` has been deprecated and support will be removed in future versions. Use standard style promise methods such as `.then() and `.catch()` instead.');\n }\n }\n\n function toKeycloakPromise(promise) {\n promise.__proto__ = KeycloakPromise.prototype;\n return promise;\n }\n\n function KeycloakPromise(executor) {\n return toKeycloakPromise(new Promise(executor));\n }\n\n KeycloakPromise.prototype = Object.create(Promise.prototype);\n KeycloakPromise.prototype.constructor = KeycloakPromise;\n\n KeycloakPromise.prototype.success = function(callback) {\n logPromiseDeprecation();\n\n var promise = this.then(function handleSuccess(value) {\n callback(value);\n });\n \n return toKeycloakPromise(promise);\n };\n\n KeycloakPromise.prototype.error = function(callback) {\n logPromiseDeprecation();\n\n var promise = this.catch(function handleError(error) {\n callback(error);\n });\n\n return toKeycloakPromise(promise);\n };\n\n function Keycloak (config) {\n if (!(this instanceof Keycloak)) {\n return new Keycloak(config);\n }\n\n var kc = this;\n var adapter;\n var refreshQueue = [];\n var callbackStorage;\n\n var loginIframe = {\n enable: true,\n callbackList: [],\n interval: 5\n };\n\n var scripts = document.getElementsByTagName('script');\n for (var i = 0; i < scripts.length; i++) {\n if ((scripts[i].src.indexOf('keycloak.js') !== -1 || scripts[i].src.indexOf('keycloak.min.js') !== -1) && scripts[i].src.indexOf('version=') !== -1) {\n kc.iframeVersion = scripts[i].src.substring(scripts[i].src.indexOf('version=') + 8).split('&')[0];\n }\n }\n\n var useNonce = true;\n var logInfo = createLogger(console.info);\n var logWarn = createLogger(console.warn);\n \n kc.init = function (initOptions) {\n kc.authenticated = false;\n\n callbackStorage = createCallbackStorage();\n var adapters = ['default', 'cordova', 'cordova-native'];\n\n if (initOptions && adapters.indexOf(initOptions.adapter) > -1) {\n adapter = loadAdapter(initOptions.adapter);\n } else if (initOptions && typeof initOptions.adapter === \"object\") {\n adapter = initOptions.adapter;\n } else {\n if (window.Cordova || window.cordova) {\n adapter = loadAdapter('cordova');\n } else {\n adapter = loadAdapter();\n }\n }\n\n if (initOptions) {\n if (typeof initOptions.useNonce !== 'undefined') {\n useNonce = initOptions.useNonce;\n }\n\n if (typeof initOptions.checkLoginIframe !== 'undefined') {\n loginIframe.enable = initOptions.checkLoginIframe;\n }\n\n if (initOptions.checkLoginIframeInterval) {\n loginIframe.interval = initOptions.checkLoginIframeInterval;\n }\n\n if (initOptions.onLoad === 'login-required') {\n kc.loginRequired = true;\n }\n\n if (initOptions.responseMode) {\n if (initOptions.responseMode === 'query' || initOptions.responseMode === 'fragment') {\n kc.responseMode = initOptions.responseMode;\n } else {\n throw 'Invalid value for responseMode';\n }\n }\n\n if (initOptions.flow) {\n switch (initOptions.flow) {\n case 'standard':\n kc.responseType = 'code';\n break;\n case 'implicit':\n kc.responseType = 'id_token token';\n break;\n case 'hybrid':\n kc.responseType = 'code id_token token';\n break;\n default:\n throw 'Invalid value for flow';\n }\n kc.flow = initOptions.flow;\n }\n\n if (initOptions.timeSkew != null) {\n kc.timeSkew = initOptions.timeSkew;\n }\n\n if(initOptions.redirectUri) {\n kc.redirectUri = initOptions.redirectUri;\n }\n\n if (initOptions.silentCheckSsoRedirectUri) {\n kc.silentCheckSsoRedirectUri = initOptions.silentCheckSsoRedirectUri;\n }\n\n if (initOptions.pkceMethod) {\n if (initOptions.pkceMethod !== \"S256\") {\n throw 'Invalid value for pkceMethod';\n }\n kc.pkceMethod = initOptions.pkceMethod;\n }\n\n if (typeof initOptions.enableLogging === 'boolean') {\n kc.enableLogging = initOptions.enableLogging;\n } else {\n kc.enableLogging = false;\n }\n }\n\n if (!kc.responseMode) {\n kc.responseMode = 'fragment';\n }\n if (!kc.responseType) {\n kc.responseType = 'code';\n kc.flow = 'standard';\n }\n\n var promise = createPromise();\n\n var initPromise = createPromise();\n initPromise.promise.then(function() {\n kc.onReady && kc.onReady(kc.authenticated);\n promise.setSuccess(kc.authenticated);\n }).catch(function(errorData) {\n promise.setError(errorData);\n });\n\n var configPromise = loadConfig(config);\n\n function onLoad() {\n var doLogin = function(prompt) {\n if (!prompt) {\n options.prompt = 'none';\n }\n\n kc.login(options).then(function () {\n initPromise.setSuccess();\n }).catch(function () {\n initPromise.setError();\n });\n }\n\n var checkSsoSilently = function() {\n var ifrm = document.createElement(\"iframe\");\n var src = kc.createLoginUrl({prompt: 'none', redirectUri: kc.silentCheckSsoRedirectUri});\n ifrm.setAttribute(\"src\", src);\n ifrm.setAttribute(\"title\", \"keycloak-silent-check-sso\");\n ifrm.style.display = \"none\";\n document.body.appendChild(ifrm);\n\n var messageCallback = function(event) {\n if (event.origin !== window.location.origin || ifrm.contentWindow !== event.source) {\n return;\n }\n\n var oauth = parseCallback(event.data);\n processCallback(oauth, initPromise);\n\n document.body.removeChild(ifrm);\n window.removeEventListener(\"message\", messageCallback);\n };\n\n window.addEventListener(\"message\", messageCallback);\n };\n\n var options = {};\n switch (initOptions.onLoad) {\n case 'check-sso':\n if (loginIframe.enable) {\n setupCheckLoginIframe().then(function() {\n checkLoginIframe().then(function (unchanged) {\n if (!unchanged) {\n kc.silentCheckSsoRedirectUri ? checkSsoSilently() : doLogin(false);\n } else {\n initPromise.setSuccess();\n }\n }).catch(function () {\n initPromise.setError();\n });\n });\n } else {\n kc.silentCheckSsoRedirectUri ? checkSsoSilently() : doLogin(false);\n }\n break;\n case 'login-required':\n doLogin(true);\n break;\n default:\n throw 'Invalid value for onLoad';\n }\n }\n\n function processInit() {\n var callback = parseCallback(window.location.href);\n\n if (callback) {\n window.history.replaceState(window.history.state, null, callback.newUrl);\n }\n\n if (callback && callback.valid) {\n return setupCheckLoginIframe().then(function() {\n processCallback(callback, initPromise);\n }).catch(function (e) {\n initPromise.setError();\n });\n } else if (initOptions) {\n if (initOptions.token && initOptions.refreshToken) {\n setToken(initOptions.token, initOptions.refreshToken, initOptions.idToken);\n\n if (loginIframe.enable) {\n setupCheckLoginIframe().then(function() {\n checkLoginIframe().then(function (unchanged) {\n if (unchanged) {\n kc.onAuthSuccess && kc.onAuthSuccess();\n initPromise.setSuccess();\n scheduleCheckIframe();\n } else {\n initPromise.setSuccess();\n }\n }).catch(function () {\n initPromise.setError();\n });\n });\n } else {\n kc.updateToken(-1).then(function() {\n kc.onAuthSuccess && kc.onAuthSuccess();\n initPromise.setSuccess();\n }).catch(function() {\n kc.onAuthError && kc.onAuthError();\n if (initOptions.onLoad) {\n onLoad();\n } else {\n initPromise.setError();\n }\n });\n }\n } else if (initOptions.onLoad) {\n onLoad();\n } else {\n initPromise.setSuccess();\n }\n } else {\n initPromise.setSuccess();\n }\n }\n\n configPromise.then(processInit);\n configPromise.catch(function() {\n promise.setError();\n });\n\n return promise.promise;\n }\n\n kc.login = function (options) {\n return adapter.login(options);\n }\n\n function generateRandomData(len) {\n // use web crypto APIs if possible\n var array = null;\n var crypto = window.crypto || window.msCrypto;\n if (crypto && crypto.getRandomValues && window.Uint8Array) {\n array = new Uint8Array(len);\n crypto.getRandomValues(array);\n return array;\n }\n\n // fallback to Math random\n array = new Array(len);\n for (var j = 0; j < array.length; j++) {\n array[j] = Math.floor(256 * Math.random());\n }\n return array;\n }\n\n function generateCodeVerifier(len) {\n return generateRandomString(len, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789');\n }\n\n function generateRandomString(len, alphabet){\n var randomData = generateRandomData(len);\n var chars = new Array(len);\n for (var i = 0; i < len; i++) {\n chars[i] = alphabet.charCodeAt(randomData[i] % alphabet.length);\n }\n return String.fromCharCode.apply(null, chars);\n }\n\n function generatePkceChallenge(pkceMethod, codeVerifier) {\n switch (pkceMethod) {\n // The use of the \"plain\" method is considered insecure and therefore not supported.\n case \"S256\":\n // hash codeVerifier, then encode as url-safe base64 without padding\n var hashBytes = new Uint8Array(sha256_imported.arrayBuffer(codeVerifier));\n var encodedHash = base64js_imported.fromByteArray(hashBytes)\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_')\n .replace(/\\=/g, '');\n return encodedHash;\n default:\n throw 'Invalid value for pkceMethod';\n }\n }\n\n kc.createLoginUrl = function(options) {\n var state = createUUID();\n var nonce = createUUID();\n\n var redirectUri = adapter.redirectUri(options);\n\n var callbackState = {\n state: state,\n nonce: nonce,\n redirectUri: encodeURIComponent(redirectUri)\n };\n\n if (options && options.prompt) {\n callbackState.prompt = options.prompt;\n }\n\n var baseUrl;\n if (options && options.action == 'register') {\n baseUrl = kc.endpoints.register();\n } else {\n baseUrl = kc.endpoints.authorize();\n }\n\n var scope;\n if (options && options.scope) {\n if (options.scope.indexOf(\"openid\") != -1) {\n scope = options.scope;\n } else {\n scope = \"openid \" + options.scope;\n }\n } else {\n scope = \"openid\";\n }\n\n var url = baseUrl\n + '?client_id=' + encodeURIComponent(kc.clientId)\n + '&redirect_uri=' + encodeURIComponent(redirectUri)\n + '&state=' + encodeURIComponent(state)\n + '&response_mode=' + encodeURIComponent(kc.responseMode)\n + '&response_type=' + encodeURIComponent(kc.responseType)\n + '&scope=' + encodeURIComponent(scope);\n if (useNonce) {\n url = url + '&nonce=' + encodeURIComponent(nonce);\n }\n\n if (options && options.prompt) {\n url += '&prompt=' + encodeURIComponent(options.prompt);\n }\n\n if (options && options.maxAge) {\n url += '&max_age=' + encodeURIComponent(options.maxAge);\n }\n\n if (options && options.loginHint) {\n url += '&login_hint=' + encodeURIComponent(options.loginHint);\n }\n\n if (options && options.idpHint) {\n url += '&kc_idp_hint=' + encodeURIComponent(options.idpHint);\n }\n\n if (options && options.locale) {\n url += '&ui_locales=' + encodeURIComponent(options.locale);\n }\n\n if (kc.pkceMethod) {\n var codeVerifier = generateCodeVerifier(96);\n callbackState.pkceCodeVerifier = codeVerifier;\n var pkceChallenge = generatePkceChallenge(kc.pkceMethod, codeVerifier);\n url += '&code_challenge=' + pkceChallenge;\n url += '&code_challenge_method=' + kc.pkceMethod;\n }\n\n callbackStorage.add(callbackState);\n\n return url;\n }\n\n kc.logout = function(options) {\n return adapter.logout(options);\n }\n\n kc.createLogoutUrl = function(options) {\n var url = kc.endpoints.logout()\n + '?redirect_uri=' + encodeURIComponent(adapter.redirectUri(options, false));\n\n return url;\n }\n\n kc.register = function (options) {\n return adapter.register(options);\n }\n\n kc.createRegisterUrl = function(options) {\n if (!options) {\n options = {};\n }\n options.action = 'register';\n return kc.createLoginUrl(options);\n }\n\n kc.createAccountUrl = function(options) {\n var realm = getRealmUrl();\n var url = undefined;\n if (typeof realm !== 'undefined') {\n url = realm\n + '/account'\n + '?referrer=' + encodeURIComponent(kc.clientId)\n + '&referrer_uri=' + encodeURIComponent(adapter.redirectUri(options));\n }\n return url;\n }\n\n kc.accountManagement = function() {\n return adapter.accountManagement();\n }\n\n kc.hasRealmRole = function (role) {\n var access = kc.realmAccess;\n return !!access && access.roles.indexOf(role) >= 0;\n }\n\n kc.hasResourceRole = function(role, resource) {\n if (!kc.resourceAccess) {\n return false;\n }\n\n var access = kc.resourceAccess[resource || kc.clientId];\n return !!access && access.roles.indexOf(role) >= 0;\n }\n\n kc.loadUserProfile = function() {\n var url = getRealmUrl() + '/account';\n var req = new XMLHttpRequest();\n req.open('GET', url, true);\n req.setRequestHeader('Accept', 'application/json');\n req.setRequestHeader('Authorization', 'bearer ' + kc.token);\n\n var promise = createPromise();\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200) {\n kc.profile = JSON.parse(req.responseText);\n promise.setSuccess(kc.profile);\n } else {\n promise.setError();\n }\n }\n }\n\n req.send();\n\n return promise.promise;\n }\n\n kc.loadUserInfo = function() {\n var url = kc.endpoints.userinfo();\n var req = new XMLHttpRequest();\n req.open('GET', url, true);\n req.setRequestHeader('Accept', 'application/json');\n req.setRequestHeader('Authorization', 'bearer ' + kc.token);\n\n var promise = createPromise();\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200) {\n kc.userInfo = JSON.parse(req.responseText);\n promise.setSuccess(kc.userInfo);\n } else {\n promise.setError();\n }\n }\n }\n\n req.send();\n\n return promise.promise;\n }\n\n kc.isTokenExpired = function(minValidity) {\n if (!kc.tokenParsed || (!kc.refreshToken && kc.flow != 'implicit' )) {\n throw 'Not authenticated';\n }\n\n if (kc.timeSkew == null) {\n logInfo('[KEYCLOAK] Unable to determine if token is expired as timeskew is not set');\n return true;\n }\n\n var expiresIn = kc.tokenParsed['exp'] - Math.ceil(new Date().getTime() / 1000) + kc.timeSkew;\n if (minValidity) {\n if (isNaN(minValidity)) {\n throw 'Invalid minValidity';\n }\n expiresIn -= minValidity;\n }\n return expiresIn < 0;\n }\n\n kc.updateToken = function(minValidity) {\n var promise = createPromise();\n\n if (!kc.refreshToken) {\n promise.setError();\n return promise.promise;\n }\n\n minValidity = minValidity || 5;\n\n var exec = function() {\n var refreshToken = false;\n if (minValidity == -1) {\n refreshToken = true;\n logInfo('[KEYCLOAK] Refreshing token: forced refresh');\n } else if (!kc.tokenParsed || kc.isTokenExpired(minValidity)) {\n refreshToken = true;\n logInfo('[KEYCLOAK] Refreshing token: token expired');\n }\n\n if (!refreshToken) {\n promise.setSuccess(false);\n } else {\n var params = 'grant_type=refresh_token&' + 'refresh_token=' + kc.refreshToken;\n var url = kc.endpoints.token();\n\n refreshQueue.push(promise);\n\n if (refreshQueue.length == 1) {\n var req = new XMLHttpRequest();\n req.open('POST', url, true);\n req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');\n req.withCredentials = true;\n\n params += '&client_id=' + encodeURIComponent(kc.clientId);\n\n var timeLocal = new Date().getTime();\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200) {\n logInfo('[KEYCLOAK] Token refreshed');\n\n timeLocal = (timeLocal + new Date().getTime()) / 2;\n\n var tokenResponse = JSON.parse(req.responseText);\n\n setToken(tokenResponse['access_token'], tokenResponse['refresh_token'], tokenResponse['id_token'], timeLocal);\n\n kc.onAuthRefreshSuccess && kc.onAuthRefreshSuccess();\n for (var p = refreshQueue.pop(); p != null; p = refreshQueue.pop()) {\n p.setSuccess(true);\n }\n } else {\n logWarn('[KEYCLOAK] Failed to refresh token');\n\n if (req.status == 400) {\n kc.clearToken();\n }\n\n kc.onAuthRefreshError && kc.onAuthRefreshError();\n for (var p = refreshQueue.pop(); p != null; p = refreshQueue.pop()) {\n p.setError(true);\n }\n }\n }\n };\n\n req.send(params);\n }\n }\n }\n\n if (loginIframe.enable) {\n var iframePromise = checkLoginIframe();\n iframePromise.then(function() {\n exec();\n }).catch(function() {\n promise.setError();\n });\n } else {\n exec();\n }\n\n return promise.promise;\n }\n\n kc.clearToken = function() {\n if (kc.token) {\n setToken(null, null, null);\n kc.onAuthLogout && kc.onAuthLogout();\n if (kc.loginRequired) {\n kc.login();\n }\n }\n }\n\n function getRealmUrl() {\n if (typeof kc.authServerUrl !== 'undefined') {\n if (kc.authServerUrl.charAt(kc.authServerUrl.length - 1) == '/') {\n return kc.authServerUrl + 'realms/' + encodeURIComponent(kc.realm);\n } else {\n return kc.authServerUrl + '/realms/' + encodeURIComponent(kc.realm);\n }\n } else {\n \treturn undefined;\n }\n }\n\n function getOrigin() {\n if (!window.location.origin) {\n return window.location.protocol + \"//\" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');\n } else {\n return window.location.origin;\n }\n }\n\n function processCallback(oauth, promise) {\n var code = oauth.code;\n var error = oauth.error;\n var prompt = oauth.prompt;\n\n var timeLocal = new Date().getTime();\n\n if (error) {\n if (prompt != 'none') {\n var errorData = { error: error, error_description: oauth.error_description };\n kc.onAuthError && kc.onAuthError(errorData);\n promise && promise.setError(errorData);\n } else {\n promise && promise.setSuccess();\n }\n return;\n } else if ((kc.flow != 'standard') && (oauth.access_token || oauth.id_token)) {\n authSuccess(oauth.access_token, null, oauth.id_token, true);\n }\n\n if ((kc.flow != 'implicit') && code) {\n var params = 'code=' + code + '&grant_type=authorization_code';\n var url = kc.endpoints.token();\n\n var req = new XMLHttpRequest();\n req.open('POST', url, true);\n req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');\n\n params += '&client_id=' + encodeURIComponent(kc.clientId);\n params += '&redirect_uri=' + oauth.redirectUri;\n\n if (oauth.pkceCodeVerifier) {\n params += '&code_verifier=' + oauth.pkceCodeVerifier;\n }\n\n req.withCredentials = true;\n\n req.onreadystatechange = function() {\n if (req.readyState == 4) {\n if (req.status == 200) {\n\n var tokenResponse = JSON.parse(req.responseText);\n authSuccess(tokenResponse['access_token'], tokenResponse['refresh_token'], tokenResponse['id_token'], kc.flow === 'standard');\n scheduleCheckIframe();\n } else {\n kc.onAuthError && kc.onAuthError();\n promise && promise.setError();\n }\n }\n };\n\n req.send(params);\n }\n\n function authSuccess(accessToken, refreshToken, idToken, fulfillPromise) {\n timeLocal = (timeLocal + new Date().getTime()) / 2;\n\n setToken(accessToken, refreshToken, idToken, timeLocal);\n\n if (useNonce && ((kc.tokenParsed && kc.tokenParsed.nonce != oauth.storedNonce) ||\n (kc.refreshTokenParsed && kc.refreshTokenParsed.nonce != oauth.storedNonce) ||\n (kc.idTokenParsed && kc.idTokenParsed.nonce != oauth.storedNonce))) {\n\n logInfo('[KEYCLOAK] Invalid nonce, clearing token');\n kc.clearToken();\n promise && promise.setError();\n } else {\n if (fulfillPromise) {\n kc.onAuthSuccess && kc.onAuthSuccess();\n promise && promise.setSuccess();\n }\n }\n }\n\n }\n\n function loadConfig(url) {\n var promise = createPromise();\n var configUrl;\n\n if (!config) {\n configUrl = 'keycloak.json';\n } else if (typeof config === 'string') {\n configUrl = config;\n }\n\n function setupOidcEndoints(oidcConfiguration) {\n if (! oidcConfiguration) {\n kc.endpoints = {\n authorize: function() {\n return getRealmUrl() + '/protocol/openid-connect/auth';\n },\n token: function() {\n return getRealmUrl() + '/protocol/openid-connect/token';\n },\n logout: function() {\n return getRealmUrl() + '/protocol/openid-connect/logout';\n },\n checkSessionIframe: function() {\n var src = getRealmUrl() + '/protocol/openid-connect/login-status-iframe.html';\n if (kc.iframeVersion) {\n src = src + '?version=' + kc.iframeVersion;\n }\n return src;\n },\n register: function() {\n return getRealmUrl() + '/protocol/openid-connect/registrations';\n },\n userinfo: function() {\n return getRealmUrl() + '/protocol/openid-connect/userinfo';\n }\n };\n } else {\n kc.endpoints = {\n authorize: function() {\n return oidcConfiguration.authorization_endpoint;\n },\n token: function() {\n return oidcConfiguration.token_endpoint;\n },\n logout: function() {\n if (!oidcConfiguration.end_session_endpoint) {\n throw \"Not supported by the OIDC server\";\n }\n return oidcConfiguration.end_session_endpoint;\n },\n checkSessionIframe: function() {\n if (!oidcConfiguration.check_session_iframe) {\n throw \"Not supported by the OIDC server\";\n }\n return oidcConfiguration.check_session_iframe;\n },\n register: function() {\n throw 'Redirection to \"Register user\" page not supported in standard OIDC mode';\n },\n userinfo: function() {\n if (!oidcConfiguration.userinfo_endpoint) {\n throw \"Not supported by the OIDC server\";\n }\n return oidcConfiguration.userinfo_endpoint;\n }\n }\n }\n }\n\n if (configUrl) {\n var req = new XMLHttpRequest();\n req.open('GET', configUrl, true);\n req.setRequestHeader('Accept', 'application/json');\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200 || fileLoaded(req)) {\n var config = JSON.parse(req.responseText);\n\n kc.authServerUrl = config['auth-server-url'];\n kc.realm = config['realm'];\n kc.clientId = config['resource'];\n setupOidcEndoints(null);\n promise.setSuccess();\n } else {\n promise.setError();\n }\n }\n };\n\n req.send();\n } else {\n if (!config.clientId) {\n throw 'clientId missing';\n }\n\n kc.clientId = config.clientId;\n\n var oidcProvider = config['oidcProvider'];\n if (!oidcProvider) {\n if (!config['url']) {\n var scripts = document.getElementsByTagName('script');\n for (var i = 0; i < scripts.length; i++) {\n if (scripts[i].src.match(/.*keycloak\\.js/)) {\n config.url = scripts[i].src.substr(0, scripts[i].src.indexOf('/js/keycloak.js'));\n break;\n }\n }\n }\n if (!config.realm) {\n throw 'realm missing';\n }\n\n kc.authServerUrl = config.url;\n kc.realm = config.realm;\n setupOidcEndoints(null);\n promise.setSuccess();\n } else {\n if (typeof oidcProvider === 'string') {\n var oidcProviderConfigUrl;\n if (oidcProvider.charAt(oidcProvider.length - 1) == '/') {\n oidcProviderConfigUrl = oidcProvider + '.well-known/openid-configuration';\n } else {\n oidcProviderConfigUrl = oidcProvider + '/.well-known/openid-configuration';\n }\n var req = new XMLHttpRequest();\n req.open('GET', oidcProviderConfigUrl, true);\n req.setRequestHeader('Accept', 'application/json');\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200 || fileLoaded(req)) {\n var oidcProviderConfig = JSON.parse(req.responseText);\n setupOidcEndoints(oidcProviderConfig);\n promise.setSuccess();\n } else {\n promise.setError();\n }\n }\n };\n\n req.send();\n } else {\n setupOidcEndoints(oidcProvider);\n promise.setSuccess();\n }\n }\n }\n\n return promise.promise;\n }\n\n function fileLoaded(xhr) {\n return xhr.status == 0 && xhr.responseText && xhr.responseURL.startsWith('file:');\n }\n\n function setToken(token, refreshToken, idToken, timeLocal) {\n if (kc.tokenTimeoutHandle) {\n clearTimeout(kc.tokenTimeoutHandle);\n kc.tokenTimeoutHandle = null;\n }\n\n if (refreshToken) {\n kc.refreshToken = refreshToken;\n kc.refreshTokenParsed = decodeToken(refreshToken);\n } else {\n delete kc.refreshToken;\n delete kc.refreshTokenParsed;\n }\n\n if (idToken) {\n kc.idToken = idToken;\n kc.idTokenParsed = decodeToken(idToken);\n } else {\n delete kc.idToken;\n delete kc.idTokenParsed;\n }\n\n if (token) {\n kc.token = token;\n kc.tokenParsed = decodeToken(token);\n kc.sessionId = kc.tokenParsed.session_state;\n kc.authenticated = true;\n kc.subject = kc.tokenParsed.sub;\n kc.realmAccess = kc.tokenParsed.realm_access;\n kc.resourceAccess = kc.tokenParsed.resource_access;\n\n if (timeLocal) {\n kc.timeSkew = Math.floor(timeLocal / 1000) - kc.tokenParsed.iat;\n }\n\n if (kc.timeSkew != null) {\n logInfo('[KEYCLOAK] Estimated time difference between browser and server is ' + kc.timeSkew + ' seconds');\n\n if (kc.onTokenExpired) {\n var expiresIn = (kc.tokenParsed['exp'] - (new Date().getTime() / 1000) + kc.timeSkew) * 1000;\n logInfo('[KEYCLOAK] Token expires in ' + Math.round(expiresIn / 1000) + ' s');\n if (expiresIn <= 0) {\n kc.onTokenExpired();\n } else {\n kc.tokenTimeoutHandle = setTimeout(kc.onTokenExpired, expiresIn);\n }\n }\n }\n } else {\n delete kc.token;\n delete kc.tokenParsed;\n delete kc.subject;\n delete kc.realmAccess;\n delete kc.resourceAccess;\n\n kc.authenticated = false;\n }\n }\n\n function decodeToken(str) {\n str = str.split('.')[1];\n\n str = str.replace('/-/g', '+');\n str = str.replace('/_/g', '/');\n switch (str.length % 4)\n {\n case 0:\n break;\n case 2:\n str += '==';\n break;\n case 3:\n str += '=';\n break;\n default:\n throw 'Invalid token';\n }\n\n str = (str + '===').slice(0, str.length + (str.length % 4));\n str = str.replace(/-/g, '+').replace(/_/g, '/');\n\n str = decodeURIComponent(escape(atob(str)));\n\n str = JSON.parse(str);\n return str;\n }\n\n function createUUID() {\n var hexDigits = '0123456789abcdef';\n var s = generateRandomString(36, hexDigits).split(\"\");\n s[14] = '4';\n s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);\n s[8] = s[13] = s[18] = s[23] = '-';\n var uuid = s.join('');\n return uuid;\n }\n\n function parseCallback(url) {\n var oauth = parseCallbackUrl(url);\n if (!oauth) {\n return;\n }\n\n var oauthState = callbackStorage.get(oauth.state);\n\n if (oauthState) {\n oauth.valid = true;\n oauth.redirectUri = oauthState.redirectUri;\n oauth.storedNonce = oauthState.nonce;\n oauth.prompt = oauthState.prompt;\n oauth.pkceCodeVerifier = oauthState.pkceCodeVerifier;\n }\n\n return oauth;\n }\n\n function parseCallbackUrl(url) {\n var supportedParams;\n switch (kc.flow) {\n case 'standard':\n supportedParams = ['code', 'state', 'session_state'];\n break;\n case 'implicit':\n supportedParams = ['access_token', 'token_type', 'id_token', 'state', 'session_state', 'expires_in'];\n break;\n case 'hybrid':\n supportedParams = ['access_token', 'id_token', 'code', 'state', 'session_state'];\n break;\n }\n\n supportedParams.push('error');\n supportedParams.push('error_description');\n supportedParams.push('error_uri');\n\n var queryIndex = url.indexOf('?');\n var fragmentIndex = url.indexOf('#');\n\n var newUrl;\n var parsed;\n\n if (kc.responseMode === 'query' && queryIndex !== -1) {\n newUrl = url.substring(0, queryIndex);\n parsed = parseCallbackParams(url.substring(queryIndex + 1, fragmentIndex !== -1 ? fragmentIndex : url.length), supportedParams);\n if (parsed.paramsString !== '') {\n newUrl += '?' + parsed.paramsString;\n }\n if (fragmentIndex !== -1) {\n newUrl += url.substring(fragmentIndex);\n }\n } else if (kc.responseMode === 'fragment' && fragmentIndex !== -1) {\n newUrl = url.substring(0, fragmentIndex);\n parsed = parseCallbackParams(url.substring(fragmentIndex + 1), supportedParams);\n if (parsed.paramsString !== '') {\n newUrl += '#' + parsed.paramsString;\n }\n }\n\n if (parsed && parsed.oauthParams) {\n if (kc.flow === 'standard' || kc.flow === 'hybrid') {\n if ((parsed.oauthParams.code || parsed.oauthParams.error) && parsed.oauthParams.state) {\n parsed.oauthParams.newUrl = newUrl;\n return parsed.oauthParams;\n }\n } else if (kc.flow === 'implicit') {\n if ((parsed.oauthParams.access_token || parsed.oauthParams.error) && parsed.oauthParams.state) {\n parsed.oauthParams.newUrl = newUrl;\n return parsed.oauthParams;\n }\n }\n }\n }\n\n function parseCallbackParams(paramsString, supportedParams) {\n var p = paramsString.split('&');\n var result = {\n paramsString: '',\n oauthParams: {}\n }\n for (var i = 0; i < p.length; i++) {\n var split = p[i].indexOf(\"=\");\n var key = p[i].slice(0, split);\n if (supportedParams.indexOf(key) !== -1) {\n result.oauthParams[key] = p[i].slice(split + 1);\n } else {\n if (result.paramsString !== '') {\n result.paramsString += '&';\n }\n result.paramsString += p[i];\n }\n }\n return result;\n }\n\n function createPromise() {\n // Need to create a native Promise which also preserves the\n // interface of the custom promise type previously used by the API\n var p = {\n setSuccess: function(result) {\n p.resolve(result);\n },\n\n setError: function(result) {\n p.reject(result);\n }\n };\n p.promise = new KeycloakPromise(function(resolve, reject) {\n p.resolve = resolve;\n p.reject = reject;\n });\n return p;\n }\n\n\n function setupCheckLoginIframe() {\n var promise = createPromise();\n\n if (!loginIframe.enable) {\n promise.setSuccess();\n return promise.promise;\n }\n\n if (loginIframe.iframe) {\n promise.setSuccess();\n return promise.promise;\n }\n\n var iframe = document.createElement('iframe');\n loginIframe.iframe = iframe;\n\n iframe.onload = function() {\n var authUrl = kc.endpoints.authorize();\n if (authUrl.charAt(0) === '/') {\n loginIframe.iframeOrigin = getOrigin();\n } else {\n loginIframe.iframeOrigin = authUrl.substring(0, authUrl.indexOf('/', 8));\n }\n promise.setSuccess();\n }\n\n var src = kc.endpoints.checkSessionIframe();\n iframe.setAttribute('src', src );\n iframe.setAttribute('title', 'keycloak-session-iframe' );\n iframe.style.display = 'none';\n document.body.appendChild(iframe);\n\n var messageCallback = function(event) {\n if ((event.origin !== loginIframe.iframeOrigin) || (loginIframe.iframe.contentWindow !== event.source)) {\n return;\n }\n\n if (!(event.data == 'unchanged' || event.data == 'changed' || event.data == 'error')) {\n return;\n }\n\n\n if (event.data != 'unchanged') {\n kc.clearToken();\n }\n\n var callbacks = loginIframe.callbackList.splice(0, loginIframe.callbackList.length);\n\n for (var i = callbacks.length - 1; i >= 0; --i) {\n var promise = callbacks[i];\n if (event.data == 'error') {\n promise.setError();\n } else {\n promise.setSuccess(event.data == 'unchanged');\n }\n }\n };\n\n window.addEventListener('message', messageCallback, false);\n\n return promise.promise;\n }\n\n function scheduleCheckIframe() {\n if (loginIframe.enable) {\n if (kc.token) {\n setTimeout(function() {\n checkLoginIframe().then(function(unchanged) {\n if (unchanged) {\n scheduleCheckIframe();\n }\n });\n }, loginIframe.interval * 1000);\n }\n }\n }\n\n function checkLoginIframe() {\n var promise = createPromise();\n\n if (loginIframe.iframe && loginIframe.iframeOrigin ) {\n var msg = kc.clientId + ' ' + (kc.sessionId ? kc.sessionId : '');\n loginIframe.callbackList.push(promise);\n var origin = loginIframe.iframeOrigin;\n if (loginIframe.callbackList.length == 1) {\n loginIframe.iframe.contentWindow.postMessage(msg, origin);\n }\n } else {\n promise.setSuccess();\n }\n\n return promise.promise;\n }\n\n function loadAdapter(type) {\n if (!type || type == 'default') {\n return {\n login: function(options) {\n window.location.replace(kc.createLoginUrl(options));\n return createPromise().promise;\n },\n\n logout: function(options) {\n window.location.replace(kc.createLogoutUrl(options));\n return createPromise().promise;\n },\n\n register: function(options) {\n window.location.replace(kc.createRegisterUrl(options));\n return createPromise().promise;\n },\n\n accountManagement : function() {\n var accountUrl = kc.createAccountUrl();\n if (typeof accountUrl !== 'undefined') {\n window.location.href = accountUrl;\n } else {\n throw \"Not supported by the OIDC server\";\n }\n return createPromise().promise;\n },\n\n redirectUri: function(options, encodeHash) {\n if (arguments.length == 1) {\n encodeHash = true;\n }\n\n if (options && options.redirectUri) {\n return options.redirectUri;\n } else if (kc.redirectUri) {\n return kc.redirectUri;\n } else {\n return location.href;\n }\n }\n };\n }\n\n if (type == 'cordova') {\n loginIframe.enable = false;\n var cordovaOpenWindowWrapper = function(loginUrl, target, options) {\n if (window.cordova && window.cordova.InAppBrowser) {\n // Use inappbrowser for IOS and Android if available\n return window.cordova.InAppBrowser.open(loginUrl, target, options);\n } else {\n return window.open(loginUrl, target, options);\n }\n };\n\n var shallowCloneCordovaOptions = function (userOptions) {\n if (userOptions && userOptions.cordovaOptions) {\n return Object.keys(userOptions.cordovaOptions).reduce(function (options, optionName) {\n options[optionName] = userOptions.cordovaOptions[optionName];\n return options;\n }, {});\n } else {\n return {};\n }\n };\n\n var formatCordovaOptions = function (cordovaOptions) {\n return Object.keys(cordovaOptions).reduce(function (options, optionName) {\n options.push(optionName+\"=\"+cordovaOptions[optionName]);\n return options;\n }, []).join(\",\");\n };\n\n var createCordovaOptions = function (userOptions) {\n var cordovaOptions = shallowCloneCordovaOptions(userOptions);\n cordovaOptions.location = 'no';\n if (userOptions && userOptions.prompt == 'none') {\n cordovaOptions.hidden = 'yes';\n }\n return formatCordovaOptions(cordovaOptions);\n };\n\n return {\n login: function(options) {\n var promise = createPromise();\n\n var cordovaOptions = createCordovaOptions(options);\n var loginUrl = kc.createLoginUrl(options);\n var ref = cordovaOpenWindowWrapper(loginUrl, '_blank', cordovaOptions);\n var completed = false;\n\n var closed = false;\n var closeBrowser = function() {\n closed = true;\n ref.close();\n };\n\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n var callback = parseCallback(event.url);\n processCallback(callback, promise);\n closeBrowser();\n completed = true;\n }\n });\n\n ref.addEventListener('loaderror', function(event) {\n if (!completed) {\n if (event.url.indexOf('http://localhost') == 0) {\n var callback = parseCallback(event.url);\n processCallback(callback, promise);\n closeBrowser();\n completed = true;\n } else {\n promise.setError();\n closeBrowser();\n }\n }\n });\n\n ref.addEventListener('exit', function(event) {\n if (!closed) {\n promise.setError({\n reason: \"closed_by_user\"\n });\n }\n });\n\n return promise.promise;\n },\n\n logout: function(options) {\n var promise = createPromise();\n\n var logoutUrl = kc.createLogoutUrl(options);\n var ref = cordovaOpenWindowWrapper(logoutUrl, '_blank', 'location=no,hidden=yes');\n\n var error;\n\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n }\n });\n\n ref.addEventListener('loaderror', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n } else {\n error = true;\n ref.close();\n }\n });\n\n ref.addEventListener('exit', function(event) {\n if (error) {\n promise.setError();\n } else {\n kc.clearToken();\n promise.setSuccess();\n }\n });\n\n return promise.promise;\n },\n\n register : function(options) {\n var promise = createPromise();\n var registerUrl = kc.createRegisterUrl();\n var cordovaOptions = createCordovaOptions(options);\n var ref = cordovaOpenWindowWrapper(registerUrl, '_blank', cordovaOptions);\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n var oauth = parseCallback(event.url);\n processCallback(oauth, promise);\n }\n });\n return promise.promise;\n },\n\n accountManagement : function() {\n var accountUrl = kc.createAccountUrl();\n if (typeof accountUrl !== 'undefined') {\n var ref = cordovaOpenWindowWrapper(accountUrl, '_blank', 'location=no');\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n }\n });\n } else {\n throw \"Not supported by the OIDC server\";\n }\n },\n\n redirectUri: function(options) {\n return 'http://localhost';\n }\n }\n }\n\n if (type == 'cordova-native') {\n loginIframe.enable = false;\n\n return {\n login: function(options) {\n var promise = createPromise();\n var loginUrl = kc.createLoginUrl(options);\n\n universalLinks.subscribe('keycloak', function(event) {\n universalLinks.unsubscribe('keycloak');\n window.cordova.plugins.browsertab.close();\n var oauth = parseCallback(event.url);\n processCallback(oauth, promise);\n });\n\n window.cordova.plugins.browsertab.openUrl(loginUrl);\n return promise.promise;\n },\n\n logout: function(options) {\n var promise = createPromise();\n var logoutUrl = kc.createLogoutUrl(options);\n\n universalLinks.subscribe('keycloak', function(event) {\n universalLinks.unsubscribe('keycloak');\n window.cordova.plugins.browsertab.close();\n kc.clearToken();\n promise.setSuccess();\n });\n\n window.cordova.plugins.browsertab.openUrl(logoutUrl);\n return promise.promise;\n },\n\n register : function(options) {\n var promise = createPromise();\n var registerUrl = kc.createRegisterUrl(options);\n universalLinks.subscribe('keycloak' , function(event) {\n universalLinks.unsubscribe('keycloak');\n window.cordova.plugins.browsertab.close();\n var oauth = parseCallback(event.url);\n processCallback(oauth, promise);\n });\n window.cordova.plugins.browsertab.openUrl(registerUrl);\n return promise.promise;\n\n },\n\n accountManagement : function() {\n var accountUrl = kc.createAccountUrl();\n if (typeof accountUrl !== 'undefined') {\n window.cordova.plugins.browsertab.openUrl(accountUrl);\n } else {\n throw \"Not supported by the OIDC server\";\n }\n },\n\n redirectUri: function(options) {\n if (options && options.redirectUri) {\n return options.redirectUri;\n } else if (kc.redirectUri) {\n return kc.redirectUri;\n } else {\n return \"http://localhost\";\n }\n }\n }\n }\n\n throw 'invalid adapter type: ' + type;\n }\n\n var LocalStorage = function() {\n if (!(this instanceof LocalStorage)) {\n return new LocalStorage();\n }\n\n localStorage.setItem('kc-test', 'test');\n localStorage.removeItem('kc-test');\n\n var cs = this;\n\n function clearExpired() {\n var time = new Date().getTime();\n for (var i = 0; i < localStorage.length; i++) {\n var key = localStorage.key(i);\n if (key && key.indexOf('kc-callback-') == 0) {\n var value = localStorage.getItem(key);\n if (value) {\n try {\n var expires = JSON.parse(value).expires;\n if (!expires || expires < time) {\n localStorage.removeItem(key);\n }\n } catch (err) {\n localStorage.removeItem(key);\n }\n }\n }\n }\n }\n\n cs.get = function(state) {\n if (!state) {\n return;\n }\n\n var key = 'kc-callback-' + state;\n var value = localStorage.getItem(key);\n if (value) {\n localStorage.removeItem(key);\n value = JSON.parse(value);\n }\n\n clearExpired();\n return value;\n };\n\n cs.add = function(state) {\n clearExpired();\n\n var key = 'kc-callback-' + state.state;\n state.expires = new Date().getTime() + (60 * 60 * 1000);\n localStorage.setItem(key, JSON.stringify(state));\n };\n };\n\n var CookieStorage = function() {\n if (!(this instanceof CookieStorage)) {\n return new CookieStorage();\n }\n\n var cs = this;\n\n cs.get = function(state) {\n if (!state) {\n return;\n }\n\n var value = getCookie('kc-callback-' + state);\n setCookie('kc-callback-' + state, '', cookieExpiration(-100));\n if (value) {\n return JSON.parse(value);\n }\n };\n\n cs.add = function(state) {\n setCookie('kc-callback-' + state.state, JSON.stringify(state), cookieExpiration(60));\n };\n\n cs.removeItem = function(key) {\n setCookie(key, '', cookieExpiration(-100));\n };\n\n var cookieExpiration = function (minutes) {\n var exp = new Date();\n exp.setTime(exp.getTime() + (minutes*60*1000));\n return exp;\n };\n\n var getCookie = function (key) {\n var name = key + '=';\n var ca = document.cookie.split(';');\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length);\n }\n }\n return '';\n };\n\n var setCookie = function (key, value, expirationDate) {\n var cookie = key + '=' + value + '; '\n + 'expires=' + expirationDate.toUTCString() + '; ';\n document.cookie = cookie;\n }\n };\n\n function createCallbackStorage() {\n try {\n return new LocalStorage();\n } catch (err) {\n }\n\n return new CookieStorage();\n }\n\n function createLogger(fn) {\n return function() {\n if (kc.enableLogging) {\n fn.apply(console, Array.prototype.slice.call(arguments));\n }\n };\n }\n }\n\n return Keycloak;\n})\n","export enum SessionStorageKeys {\n KeyCloakToken = 'KEYCLOAK_TOKEN',\n KeyCloakRefreshToken = 'KEYCLOAK_REFRESH_TOKEN',\n KeyCloakIdToken = 'KEYCLOAK_ID_TOKEN',\n ApiConfigKey = 'AUTH_API_CONFIG',\n PreventStorageSync = 'PREVENT_STORAGE_SYNC',\n LaunchDarklyFlags = 'LD_FLAGS',\n CurrentAccount = 'CURRENT_ACCOUNT',\n AuthApiUrl = 'AUTH_API_URL',\n AuthWebUrl = 'AUTH_WEB_URL',\n StatusApiUrl = 'STATUS_API_URL',\n WhatsNew = 'WHATS_NEW',\n SessionSynced = 'SESSION_SYNCED',\n RegistryHomeUrl = 'REGISTRY_HOME_URL',\n NameRequestUrl = 'NAME_REQUEST_URL',\n PprWebUrl = 'PPR_WEB_URL',\n SiteminderLogoutUrl = 'SITEMINDER_LOGOUT_URL'\n}\n\nexport enum Account {\n ANONYMOUS = 'ANONYMOUS',\n PREMIUM = 'PREMIUM',\n BASIC = 'BASIC',\n SBC_STAFF = 'SBC_STAFF',\n STAFF = 'STAFF'\n}\n\nexport enum IdpHint {\n BCROS = 'bcros',\n IDIR = 'idir',\n BCSC = 'bcsc',\n BCEID = 'bceid'\n}\n\nexport enum LoginSource {\n BCROS = 'BCROS',\n IDIR = 'IDIR',\n BCSC = 'BCSC',\n BCEID = 'BCEID'\n}\n\nexport enum Role {\n AccountHolder = 'account_holder',\n PublicUser = 'public_user',\n Staff = 'staff',\n GOVMAccountUser = 'gov_account_user'\n}\n\nexport enum Pages {\n HOME = 'home',\n USER_PROFILE = 'userprofile',\n ACCOUNT = 'account',\n SETTINGS = 'settings',\n SIGNIN = 'signin',\n USER_PROFILE_TERMS = 'userprofileterms',\n CREATE_ACCOUNT = 'setup-account',\n CHOOSE_AUTH_METHOD = 'choose-authentication-method',\n NON_BCSC_INSTRUCTIONS = 'nonbcsc-info/instructions',\n ACCOUNT_FREEZ = 'account-freeze',\n PENDING_APPROVAL = 'pendingapproval',\n ACCOUNT_SWITCHING = 'account-switching',\n REGISTRY_DASHBOARD = 'dashboard'\n}\n\nexport const ALLOWED_URIS_FOR_PENDING_ORGS: string[] = ['setup-non-bcsc-account', 'signout']\n\nexport const ACCOUNT_ID = 'accountid'\n","import ConfigHelper from './config-helper'\nimport { SessionStorageKeys, ACCOUNT_ID } from './constants'\n\n/**\n * Place to put all the custom utility methods\n */\nexport function getBoolean (value: boolean | string | number): boolean {\n let resultVal = value\n if (typeof value === 'string') {\n resultVal = value.toLowerCase()\n }\n switch (resultVal) {\n case true:\n case 'true':\n case 1:\n case '1':\n case 'on':\n case 'yes':\n case 'none':\n return true\n default:\n return false\n }\n}\n\nexport function decodeKCToken () {\n try {\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)\n if (token) {\n const base64Url = token.split('.')[1]\n const base64 = decodeURIComponent(window.atob(base64Url).split('').map(function (c) {\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)\n }).join(''))\n return JSON.parse(base64)\n } else {\n return {}\n }\n } catch (error) {\n throw new Error('Error parsing JWT - ' + error)\n }\n}\n\nexport function trimTrailingSlashURL (url) {\n return (url) ? url.trim().replace(/\\/+$/, '') : ''\n}\n\nexport function getAccountIdFromCurrentUrl () {\n const urlParams = new URLSearchParams(window.location.search)\n return urlParams.get(ACCOUNT_ID) || false\n}\n\nexport function checkAndAppend (url, key = '', value = '') {\n const separator = (/\\?/).test(url) ? '&' : '?'\n // remove key from URL if existing\n const newUrl = removeAccountIdFromUrl(url, key)\n return (value !== '' && key !== '') ? `${newUrl}${separator}${key}=${value}` : url\n}\n\n// if account id is not passed, will get it from session\n// there are some cases we need to pass account id, ie to watch account id and get URL dynamically\nexport function appendAccountId (url, accountId = '') {\n const sessionAccountId = JSON.parse(ConfigHelper.getFromSession(SessionStorageKeys.CurrentAccount) || '{}').id || ''\n const currentAccount = accountId !== '' ? accountId : sessionAccountId\n return checkAndAppend(url, ACCOUNT_ID, currentAccount)\n}\n\nexport function removeAccountIdFromUrl (url, key = ACCOUNT_ID) {\n // replacing account id and formattig ie, removing extra ? or &\n return url?.replace(new RegExp(key + '=\\\\w+'), '').replace('?&', '?').replace(/\\?$/, '')\n .replace('&&', '&').replace(/&$/, '')\n}\n","import { SessionStorageKeys } from './constants'\nimport { trimTrailingSlashURL } from './common-util'\n\nexport default class ConfigHelper {\n static keycloakConfigUrl = ''\n\n static addToSession (key: string, value: any): void {\n sessionStorage.setItem(key, value)\n }\n\n static getFromSession (key: string): string | null {\n return sessionStorage.getItem(key)\n }\n\n static removeFromSession (key: string): void {\n sessionStorage.removeItem(key)\n }\n\n static clearSession (): void {\n sessionStorage.clear()\n }\n\n static getStatusAPIUrl (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.StatusApiUrl) || '')\n }\n\n static getAuthAPIUrl (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.AuthApiUrl) || '')\n }\n\n static getAuthContextPath (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.AuthWebUrl) || '')\n }\n\n static getRegistryHomeURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.RegistryHomeUrl) || '')\n }\n\n static getNameRequestURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.NameRequestUrl) || '')\n }\n\n static getPprWebURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.PprWebUrl) || '')\n }\n\n static setKeycloakConfigUrl (keycloakConfigUrl: string) {\n this.keycloakConfigUrl = keycloakConfigUrl\n }\n\n static getKeycloakConfigUrl (): string {\n return this.keycloakConfigUrl\n }\n}\n","var VuexModule = /** @class */ (function () {\r\n function VuexModule(module) {\r\n this.actions = module.actions;\r\n this.mutations = module.mutations;\r\n this.state = module.state;\r\n this.getters = module.getters;\r\n this.namespaced = module.namespaced;\r\n this.modules = module.modules;\r\n }\r\n return VuexModule;\r\n}());\r\nfunction getModule(moduleClass, store) {\r\n if (moduleClass._statics) {\r\n return moduleClass._statics;\r\n }\r\n var genStatic = moduleClass._genStatic;\r\n if (!genStatic) {\r\n throw new Error(\"ERR_GET_MODULE_NO_STATICS : Could not get module accessor.\\n Make sure your module has name, we can't make accessors for unnamed modules\\n i.e. @Module({ name: 'something' })\");\r\n }\r\n return (moduleClass._statics = genStatic(store));\r\n}\n\nvar reservedKeys = ['actions', 'getters', 'mutations', 'modules', 'state', 'namespaced', 'commit'];\r\nfunction stateFactory(module) {\r\n var state = new module.prototype.constructor({});\r\n var s = {};\r\n Object.keys(state).forEach(function (key) {\r\n if (reservedKeys.indexOf(key) !== -1) {\r\n if (typeof state[key] !== 'undefined') {\r\n throw new Error(\"ERR_RESERVED_STATE_KEY_USED: You cannot use the following\\n ['actions', 'getters', 'mutations', 'modules', 'state', 'namespaced', 'commit']\\n as fields in your module. These are reserved as they have special purpose in Vuex\");\r\n }\r\n return;\r\n }\r\n if (state.hasOwnProperty(key)) {\r\n if (typeof state[key] !== 'function') {\r\n s[key] = state[key];\r\n }\r\n }\r\n });\r\n return s;\r\n}\n\n/**\r\n * Takes the properties on object from parameter source and adds them to the object\r\n * parameter target\r\n * @param {object} target Object to have properties copied onto from y\r\n * @param {object} source Object with properties to be copied to x\r\n */\r\nfunction addPropertiesToObject(target, source) {\r\n var _loop_1 = function (k) {\r\n Object.defineProperty(target, k, {\r\n get: function () { return source[k]; }\r\n });\r\n };\r\n for (var _i = 0, _a = Object.keys(source || {}); _i < _a.length; _i++) {\r\n var k = _a[_i];\r\n _loop_1(k);\r\n }\r\n}\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\n\nfunction staticStateGenerator(module, modOpt, statics) {\r\n var state = modOpt.stateFactory ? module.state() : module.state;\r\n Object.keys(state).forEach(function (key) {\r\n if (state.hasOwnProperty(key)) {\r\n // If not undefined or function means it is a state value\r\n if (['undefined', 'function'].indexOf(typeof state[key]) === -1) {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return modOpt.store.state[modOpt.name][key];\r\n }\r\n });\r\n }\r\n }\r\n });\r\n}\r\nfunction staticGetterGenerator(module, modOpt, statics) {\r\n Object.keys(module.getters).forEach(function (key) {\r\n if (module.namespaced) {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return modOpt.store.getters[modOpt.name + \"/\" + key];\r\n }\r\n });\r\n }\r\n else {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return modOpt.store.getters[key];\r\n }\r\n });\r\n }\r\n });\r\n}\r\nfunction staticMutationGenerator(module, modOpt, statics) {\r\n Object.keys(module.mutations).forEach(function (key) {\r\n if (module.namespaced) {\r\n statics[key] = function () {\r\n var _a;\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n (_a = modOpt.store).commit.apply(_a, [modOpt.name + \"/\" + key].concat(args));\r\n };\r\n }\r\n else {\r\n statics[key] = function () {\r\n var _a;\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n (_a = modOpt.store).commit.apply(_a, [key].concat(args));\r\n };\r\n }\r\n });\r\n}\r\nfunction staticActionGenerators(module, modOpt, statics) {\r\n Object.keys(module.actions).forEach(function (key) {\r\n if (module.namespaced) {\r\n statics[key] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _a;\r\n return __generator(this, function (_b) {\r\n return [2 /*return*/, (_a = modOpt.store).dispatch.apply(_a, [modOpt.name + \"/\" + key].concat(args))];\r\n });\r\n });\r\n };\r\n }\r\n else {\r\n statics[key] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _a;\r\n return __generator(this, function (_b) {\r\n return [2 /*return*/, (_a = modOpt.store).dispatch.apply(_a, [key].concat(args))];\r\n });\r\n });\r\n };\r\n }\r\n });\r\n}\n\nfunction moduleDecoratorFactory(moduleOptions) {\r\n return function (constructor) {\r\n var module = constructor;\r\n var stateFactory$1 = function () { return stateFactory(module); };\r\n if (!module.state) {\r\n module.state = moduleOptions && moduleOptions.stateFactory ? stateFactory$1 : stateFactory$1();\r\n }\r\n if (!module.getters) {\r\n module.getters = {};\r\n }\r\n if (!module.namespaced) {\r\n module.namespaced = moduleOptions && moduleOptions.namespaced;\r\n }\r\n Object.getOwnPropertyNames(module.prototype).forEach(function (funcName) {\r\n var descriptor = Object.getOwnPropertyDescriptor(module.prototype, funcName);\r\n if (descriptor.get && module.getters) {\r\n module.getters[funcName] = function (state, getters, rootState, rootGetters) {\r\n var thisObj = { context: { state: state, getters: getters, rootState: rootState, rootGetters: rootGetters } };\r\n addPropertiesToObject(thisObj, state);\r\n addPropertiesToObject(thisObj, getters);\r\n var got = descriptor.get.call(thisObj);\r\n return got;\r\n };\r\n }\r\n });\r\n var modOpt = moduleOptions;\r\n if (modOpt.name) {\r\n Object.defineProperty(constructor, '_genStatic', {\r\n value: function (store) {\r\n var statics = {};\r\n modOpt.store = modOpt.store || store;\r\n if (!modOpt.store) {\r\n throw new Error(\"ERR_STORE_NOT_PROVIDED: To use getModule(), either the module\\n should be decorated with store in decorator, i.e. @Module({store: store}) or\\n store should be passed when calling getModule(), i.e. getModule(MyModule, this.$store)\");\r\n }\r\n // =========== For statics ==============\r\n // ------ state -------\r\n staticStateGenerator(module, modOpt, statics);\r\n // ------- getters -------\r\n if (module.getters) {\r\n staticGetterGenerator(module, modOpt, statics);\r\n }\r\n // -------- mutations --------\r\n if (module.mutations) {\r\n staticMutationGenerator(module, modOpt, statics);\r\n }\r\n // -------- actions ---------\r\n if (module.actions) {\r\n staticActionGenerators(module, modOpt, statics);\r\n }\r\n return statics;\r\n }\r\n });\r\n }\r\n if (modOpt.dynamic) {\r\n if (!modOpt.name) {\r\n throw new Error('Name of module not provided in decorator options');\r\n }\r\n modOpt.store.registerModule(modOpt.name, // TODO: Handle nested modules too in future\r\n module);\r\n }\r\n return constructor;\r\n };\r\n}\r\nfunction Module(modOrOpt) {\r\n if (typeof modOrOpt === 'function') {\r\n /*\r\n * @Module decorator called without options (directly on the class definition)\r\n */\r\n moduleDecoratorFactory({})(modOrOpt);\r\n }\r\n else {\r\n /*\r\n * @Module({...}) decorator called with options\r\n */\r\n return moduleDecoratorFactory(modOrOpt);\r\n }\r\n}\n\nfunction actionDecoratorFactory(params) {\r\n var _a = params || {}, _b = _a.commit, commit = _b === void 0 ? undefined : _b, _c = _a.rawError, rawError = _c === void 0 ? false : _c, _d = _a.root, root = _d === void 0 ? false : _d;\r\n return function (target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.actions) {\r\n module.actions = {};\r\n }\r\n var actionFunction = descriptor.value;\r\n var action = function (context, payload) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var actionPayload, moduleAccessor, thisObj, e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, 5, , 6]);\r\n actionPayload = null;\r\n if (!module._genStatic) return [3 /*break*/, 2];\r\n moduleAccessor = getModule(module);\r\n moduleAccessor.context = context;\r\n return [4 /*yield*/, actionFunction.call(moduleAccessor, payload)];\r\n case 1:\r\n actionPayload = _a.sent();\r\n return [3 /*break*/, 4];\r\n case 2:\r\n thisObj = { context: context };\r\n addPropertiesToObject(thisObj, context.state);\r\n addPropertiesToObject(thisObj, context.getters);\r\n return [4 /*yield*/, actionFunction.call(thisObj, payload)];\r\n case 3:\r\n actionPayload = _a.sent();\r\n _a.label = 4;\r\n case 4:\r\n if (commit) {\r\n context.commit(commit, actionPayload);\r\n }\r\n return [2 /*return*/, actionPayload];\r\n case 5:\r\n e_1 = _a.sent();\r\n throw rawError\r\n ? e_1\r\n : new Error('ERR_ACTION_ACCESS_UNDEFINED: Are you trying to access ' +\r\n 'this.someMutation() or this.someGetter inside an @Action? \\n' +\r\n 'That works only in dynamic modules. \\n' +\r\n 'If not dynamic use this.context.commit(\"mutationName\", payload) ' +\r\n 'and this.context.getters[\"getterName\"]' +\r\n '\\n' +\r\n new Error(\"Could not perform action \" + key.toString()).stack +\r\n '\\n' +\r\n e_1.stack);\r\n case 6: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n module.actions[key] = root ? { root: root, handler: action } : action;\r\n };\r\n}\r\n/**\r\n * The @Action decorator turns an async function into an Vuex action\r\n *\r\n * @param targetOrParams the module class\r\n * @param key name of the action\r\n * @param descriptor the action function descriptor\r\n * @constructor\r\n */\r\nfunction Action(targetOrParams, key, descriptor) {\r\n if (!key && !descriptor) {\r\n /*\r\n * This is the case when `targetOrParams` is params.\r\n * i.e. when used as -\r\n *
\r\n            @Action({commit: 'incrCount'})\r\n            async getCountDelta() {\r\n              return 5\r\n            }\r\n         * 
\r\n */\r\n return actionDecoratorFactory(targetOrParams);\r\n }\r\n else {\r\n /*\r\n * This is the case when @Action is called on action function\r\n * without any params\r\n *
\r\n         *   @Action\r\n         *   async doSomething() {\r\n         *    ...\r\n         *   }\r\n         * 
\r\n */\r\n actionDecoratorFactory()(targetOrParams, key, descriptor);\r\n }\r\n}\n\nfunction Mutation(target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.mutations) {\r\n module.mutations = {};\r\n }\r\n var mutationFunction = descriptor.value ? descriptor.value : function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return ({});\r\n };\r\n var mutation = function (state, payload) {\r\n mutationFunction.call(state, payload);\r\n };\r\n module.mutations[key] = mutation;\r\n}\n\nfunction mutationActionDecoratorFactory(params) {\r\n return function (target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.mutations) {\r\n module.mutations = {};\r\n }\r\n if (!module.actions) {\r\n module.actions = {};\r\n }\r\n var mutactFunction = descriptor.value;\r\n var action = function (context, payload) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var actionPayload, e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, 2, , 3]);\r\n return [4 /*yield*/, mutactFunction.call(context, payload)];\r\n case 1:\r\n actionPayload = _a.sent();\r\n context.commit(key, actionPayload);\r\n return [3 /*break*/, 3];\r\n case 2:\r\n e_1 = _a.sent();\r\n if (params.rawError) {\r\n throw e_1;\r\n }\r\n else {\r\n console.error('Could not perform action ' + key.toString());\r\n console.error(e_1);\r\n }\r\n return [3 /*break*/, 3];\r\n case 3: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n var mutation = function (state, payload) {\r\n if (!params.mutate) {\r\n params.mutate = Object.keys(payload);\r\n }\r\n for (var _i = 0, _a = params.mutate; _i < _a.length; _i++) {\r\n var stateItem = _a[_i];\r\n if (state.hasOwnProperty(stateItem) && payload.hasOwnProperty(stateItem)) {\r\n state[stateItem] = payload[stateItem];\r\n }\r\n else {\r\n throw new Error(\"ERR_MUTATE_PARAMS_NOT_IN_PAYLOAD\\n In @MutationAction, mutate: ['a', 'b', ...] array keys must\\n match with return type = {a: {}, b: {}, ...} and must\\n also be in state.\");\r\n }\r\n }\r\n };\r\n module.actions[key] = params.root ? { root: true, handler: action } : action;\r\n module.mutations[key] = mutation;\r\n };\r\n}\r\n/**\r\n * The @MutationAction decorator turns this into an action that further calls a mutation\r\n * Both the action and the mutation are generated for you\r\n *\r\n * @param paramsOrTarget the params or the target class\r\n * @param key the name of the function\r\n * @param descriptor the function body\r\n * @constructor\r\n */\r\nfunction MutationAction(paramsOrTarget, key, descriptor) {\r\n if (!key && !descriptor) {\r\n /*\r\n * This is the case when `paramsOrTarget` is params.\r\n * i.e. when used as -\r\n *
\r\n            @MutationAction({mutate: ['incrCount']})\r\n            async getCountDelta() {\r\n              return {incrCount: 5}\r\n            }\r\n         * 
\r\n */\r\n return mutationActionDecoratorFactory(paramsOrTarget);\r\n }\r\n else {\r\n /*\r\n * This is the case when `paramsOrTarget` is target.\r\n * i.e. when used as -\r\n *
\r\n            @MutationAction\r\n            async getCountDelta() {\r\n              return {incrCount: 5}\r\n            }\r\n         * 
\r\n */\r\n mutationActionDecoratorFactory({})(paramsOrTarget, key, descriptor);\r\n }\r\n}\n\nexport { Action, Module, Mutation, MutationAction, VuexModule, getModule };\n//# sourceMappingURL=index.js.map\n","import { Module, VuexModule, Mutation, Action } from 'vuex-module-decorators'\nimport ConfigHelper from '../../util/config-helper'\nimport KeycloakServices from '../../services/keycloak.services'\nimport { SessionStorageKeys } from '../../util/constants'\n\n@Module({\n name: 'auth',\n namespaced: true\n})\nexport default class AuthModule extends VuexModule {\n token: string = ''\n idToken: string = ''\n refreshToken: string = ''\n kcGuid: string = ''\n loginSource: string = ''\n\n get isAuthenticated (): boolean {\n return !!this.token\n }\n\n get keycloakGuid (): string {\n return this.kcGuid || KeycloakServices.getUserInfo().keycloakGuid\n }\n\n get currentLoginSource (): string {\n return this.loginSource || KeycloakServices.getUserInfo().loginSource\n }\n\n @Mutation\n public setKCToken (token: string): void {\n this.token = token\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakToken, token)\n }\n\n @Mutation\n public setIDToken (idToken: string): void {\n this.idToken = idToken\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakIdToken, idToken)\n }\n\n @Mutation\n public setRefreshToken (refreshToken: string): void {\n this.refreshToken = refreshToken\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakRefreshToken, refreshToken)\n }\n\n @Mutation\n public setKCGuid (kcGuid: string): void {\n this.kcGuid = kcGuid\n }\n\n @Mutation\n public setLoginSource (loginSource: string): void {\n this.loginSource = loginSource\n }\n\n @Action({ rawError: true })\n public clearSession (): void {\n this.context.commit('setKCToken', '')\n this.context.commit('setIDToken', '')\n this.context.commit('setRefreshToken', '')\n this.context.commit('setKCGuid', '')\n this.context.commit('setLoginSource', '')\n }\n\n @Action({ rawError: true })\n public syncWithSessionStorage (): void {\n this.context.commit('setKCToken', ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || '')\n this.context.commit('setIDToken', ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || '')\n this.context.commit('setRefreshToken', ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || '')\n }\n}\n","import Keycloak, { KeycloakInitOptions, KeycloakInstance, KeycloakLoginOptions, KeycloakTokenParsed } from 'keycloak-js'\nimport { KCUserProfile } from '../models/KCUserProfile'\nimport ConfigHelper from '../util/config-helper'\nimport { SessionStorageKeys } from '../util/constants'\nimport { Store } from 'vuex'\nimport { getModule } from 'vuex-module-decorators'\nimport AuthModule from '../store/modules/auth'\nimport { decodeKCToken } from '../util/common-util'\n\nclass KeyCloakService {\n private kc: KeycloakInstance | undefined\n private parsedToken: any\n private static instance: KeyCloakService\n private store: Store | null = null\n private counter = 0\n private REFRESH_ATTEMPT_INTERVAL = 10 // in seconds\n private timerId: any = 0\n\n public static getInstance (): KeyCloakService {\n return (this.instance) ? this.instance : new KeyCloakService()\n }\n\n public get isInitialized (): boolean {\n return !!this.kc\n }\n\n // Setting keycloak config url as a static configuration to access from other parts of the app if needed\n async setKeycloakConfigUrl (keyCloakConfigurl: string) {\n ConfigHelper.setKeycloakConfigUrl(keyCloakConfigurl)\n }\n\n getKCInstance () : KeycloakInstance | undefined {\n return this.kc\n }\n\n async initializeKeyCloak (idpHint: string, store: Store) {\n this.store = store\n this.clearSession()\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || undefined\n const keycloakConfig = ConfigHelper.getKeycloakConfigUrl()\n this.kc = Keycloak(keycloakConfig)\n const kcLogin = this.kc.login\n this.kc.login = (options?: KeycloakLoginOptions) => {\n if (options) {\n options.idpHint = idpHint\n }\n return kcLogin(options)\n }\n let kcOptions :KeycloakInitOptions = {\n onLoad: 'login-required',\n checkLoginIframe: false,\n timeSkew: 0,\n token,\n refreshToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || undefined,\n idToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || undefined,\n pkceMethod: 'S256'\n }\n return this.kc.init(kcOptions)\n }\n\n async initSession () {\n if (!this.store) {\n return\n }\n\n const authModule = getModule(AuthModule, this.store)\n authModule.setKCToken(this.kc?.token || '')\n authModule.setIDToken(this.kc?.idToken || '')\n authModule.setRefreshToken(this.kc?.refreshToken || '')\n\n const userInfo = this.getUserInfo()\n authModule.setKCGuid(userInfo?.keycloakGuid || '')\n authModule.setLoginSource(userInfo?.loginSource || '')\n\n await this.syncSessionAndScheduleTokenRefresh()\n }\n\n getUserInfo () : KCUserProfile {\n if (!this.parsedToken || !Object.keys(this.parsedToken).length) {\n this.parsedToken = decodeKCToken()\n }\n return {\n lastName: this.parsedToken?.lastname,\n firstName: this.parsedToken?.firstname,\n email: this.parsedToken?.email,\n // eslint-disable-next-line camelcase\n roles: this.parsedToken?.realm_access?.roles,\n keycloakGuid: this.parsedToken?.sub,\n userName: this.parsedToken?.username,\n fullName: this.parsedToken?.name,\n loginSource: this.parsedToken?.loginSource\n }\n }\n\n async logout (redirectUrl?: string) {\n let token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || undefined\n if (token) {\n this.kc = Keycloak(ConfigHelper.getKeycloakConfigUrl())\n let kcOptions :KeycloakInitOptions = {\n onLoad: 'login-required',\n checkLoginIframe: false,\n timeSkew: 0,\n token,\n refreshToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || undefined,\n idToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || undefined,\n pkceMethod: 'S256'\n }\n const siteminderLogoutUrl = ConfigHelper.getFromSession(SessionStorageKeys.SiteminderLogoutUrl) || undefined\n // Here we clear session storage, and add a flag in to prevent the app from\n // putting tokens back in from returning async calls (see #2341)\n ConfigHelper.clearSession()\n ConfigHelper.addToSession(SessionStorageKeys.PreventStorageSync, true)\n return new Promise((resolve, reject) => {\n this.kc && this.kc.init(kcOptions)\n .then(authenticated => {\n if (!authenticated) {\n resolve()\n }\n redirectUrl = redirectUrl || `${window.location.origin}${process.env.VUE_APP_PATH}`\n if (siteminderLogoutUrl?.includes('http')) {\n redirectUrl = `${siteminderLogoutUrl}?returl=${redirectUrl.replace(/(https?:\\/\\/)|(\\/)+/g, '$1$2')}&retnow=1`\n }\n this.kc && this.kc.logout({ redirectUri: redirectUrl })\n .then(() => {\n resolve()\n })\n .catch(error => {\n reject(error)\n })\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n }\n\n async refreshToken (isForceRefresh?: boolean) {\n // Set the token expiry time as the minValidity to force refresh token\n if (!isForceRefresh && (!this.kc?.tokenParsed?.exp || !this.kc.timeSkew)) {\n return\n }\n // if isForceRefresh is true, send -1 in updateToken to force update the token\n let tokenExpiresIn = (isForceRefresh) ? -1 : this.kc.tokenParsed.exp - Math.ceil(new Date().getTime() / 1000) + this.kc.timeSkew + 100\n if (this.kc) {\n this.kc.updateToken(tokenExpiresIn)\n .then(refreshed => {\n if (refreshed) {\n this.initSession()\n }\n })\n .catch(() => {\n this.clearSession()\n return new Error('Could not refresh Token')\n })\n } else {\n return new Error('Could not refresh Token:No Kc Instance')\n }\n }\n\n verifyRoles (allowedRoles:[], disabledRoles:[]) {\n let isAuthorized = false\n if (allowedRoles || disabledRoles) {\n let userInfo = this.getUserInfo()\n isAuthorized = allowedRoles ? allowedRoles.some(role => userInfo.roles.includes(role)) : !disabledRoles.some(role => userInfo.roles.includes(role))\n } else {\n isAuthorized = true\n }\n return isAuthorized\n }\n\n async initializeToken (store?: Store, isScheduleRefresh: boolean = true, forceLogin: boolean = false) {\n this.store = store\n const kcOptions: KeycloakInitOptions = {\n onLoad: forceLogin ? 'login-required' : 'check-sso',\n checkLoginIframe: false,\n timeSkew: 0,\n token: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || undefined,\n refreshToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || undefined,\n idToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || undefined,\n pkceMethod: 'S256'\n }\n\n return new Promise((resolve, reject) => {\n this.kc = Keycloak(ConfigHelper.getKeycloakConfigUrl())\n ConfigHelper.addToSession(SessionStorageKeys.SessionSynced, false)\n this.kc.init(kcOptions)\n .then(authenticated => {\n console.info('[TokenServices] is User Authenticated?: Syncing ' + authenticated)\n resolve(this.syncSessionAndScheduleTokenRefresh(isScheduleRefresh))\n })\n .catch(error => {\n reject(new Error('Could not Initialize KC' + error))\n })\n })\n }\n\n async syncSessionAndScheduleTokenRefresh (isScheduleRefresh: boolean = true) {\n if (this.kc?.authenticated) {\n this.syncSessionStorage()\n if (isScheduleRefresh) {\n this.scheduleRefreshTimer()\n }\n return this.kc.token\n } else {\n this.clearSession()\n return new Error('NOT_AUTHENTICATED')\n }\n }\n\n scheduleRefreshTimer (refreshEarlyTime = 0) {\n let refreshEarlyTimeinMilliseconds = Math.max(this.REFRESH_ATTEMPT_INTERVAL, refreshEarlyTime) * 1000\n this.scheduleRefreshToken(refreshEarlyTimeinMilliseconds)\n }\n\n private scheduleRefreshToken (refreshEarlyTimeinMilliseconds: number) {\n let refreshTokenExpiresIn = -1\n // check if refresh token is still valid . Or else clear all timers and throw errors\n if (this.kc && this.kc.timeSkew !== undefined && this.kc.refreshTokenParsed) {\n refreshTokenExpiresIn = this.kc.refreshTokenParsed['exp']! - Math.ceil(new Date().getTime() / 1000) + this.kc.timeSkew\n }\n if (refreshTokenExpiresIn < 0) {\n throw new Error('Refresh Token Expired. No more token refreshes')\n }\n let expiresIn = -1\n if (this.kc && this.kc.tokenParsed && this.kc.tokenParsed['exp'] && this.kc.timeSkew !== undefined) {\n expiresIn = this.kc.tokenParsed['exp'] - Math.ceil(new Date().getTime() / 1000) + this.kc.timeSkew\n }\n if (expiresIn < 0) {\n throw new Error('Refresh Token Expired. No more token refreshes')\n }\n let refreshInMilliSeconds = (expiresIn * 1000) - refreshEarlyTimeinMilliseconds // in milliseconds\n console.info('[TokenServices] Token Refresh Scheduled in %s Seconds', (refreshInMilliSeconds / 1000))\n this.timerId = setTimeout(() => {\n console.log('[TokenServices] Refreshing Token Attempt: %s ', ++this.counter)\n this.kc!.updateToken(-1)\n .then(refreshed => {\n if (refreshed) {\n console.log('Token successfully refreshed')\n this.syncSessionStorage()\n this.scheduleRefreshToken(refreshEarlyTimeinMilliseconds)\n }\n })\n .catch(() => {\n clearTimeout(this.timerId)\n })\n }, refreshInMilliSeconds)\n }\n\n private syncSessionStorage () {\n if (this.kc) {\n if (this.kc.token) {\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakToken, this.kc.token)\n }\n if (this.kc.refreshToken) {\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakRefreshToken, this.kc.refreshToken)\n }\n if (this.kc.idToken) {\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakIdToken, this.kc.idToken)\n }\n ConfigHelper.addToSession(SessionStorageKeys.SessionSynced, true)\n } else {\n ConfigHelper.addToSession(SessionStorageKeys.SessionSynced, false)\n }\n }\n\n private async clearSession () {\n if (this.store) {\n const authModule = getModule(AuthModule, this.store)\n authModule.clearSession()\n }\n ConfigHelper.removeFromSession(SessionStorageKeys.KeyCloakToken)\n ConfigHelper.removeFromSession(SessionStorageKeys.KeyCloakIdToken)\n ConfigHelper.removeFromSession(SessionStorageKeys.KeyCloakRefreshToken)\n }\n}\n\nexport default KeyCloakService.getInstance()\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","/**\n * Place to put all the custom utility methods\n */\n\nimport { Address, BaseAddressModel } from '@/models/Address'\nimport { Role, SlipStatus } from '@/util/constants'\n\nimport KeyCloakService from 'sbc-common-components/src/services/keycloak.services'\nimport moment from 'moment'\n\nexport default class CommonUtils {\n // Formatting date in the desired format for displaying in the template\n static formatDisplayDate (date: Date, format?: string) {\n return date ? moment(date).format(format || 'MMM DD, YYYY') : ''\n }\n\n static requiredFieldRule (errorMessage: string = 'This field is required') {\n return [v => !!v || errorMessage]\n }\n\n static optionalFieldRule (errorMessage: string, length: number) {\n return [v => !v || (v.length <= length) || errorMessage]\n }\n\n static isSigningIn (): boolean {\n const path = window.location.pathname\n return (\n path.includes('/signin') ||\n path.includes('/signin-redirect') ||\n path.includes('/signin-redirect-full')\n )\n }\n\n static isSigningOut (): boolean {\n const path = window.location.pathname\n return path.includes('/signout')\n }\n\n // blob convert to downloadable file\n static fileDownload (data: any, fileName: string, fileType: string = 'text/plain', action:string = 'download') {\n const blob = new Blob([data], { type: fileType })\n if (typeof window.navigator.msSaveBlob !== 'undefined') {\n // IE workaround for \"HTML7007: One or more blob URLs were\n // revoked by closing the blob for which they were created.\n // These URLs will no longer resolve as the data backing\n // the URL has been freed.\"\n window.navigator.msSaveBlob(blob, fileName)\n } else {\n const blobURL = (window.URL && window.URL.createObjectURL) ? window.URL.createObjectURL(blob) : window.webkitURL.createObjectURL(blob)\n const tempLink = document.createElement('a')\n tempLink.style.display = 'none'\n tempLink.href = blobURL\n if (action === 'open') {\n tempLink.setAttribute('target', '_blank')\n } else {\n tempLink.setAttribute('download', fileName)\n }\n\n // Safari thinks _blank anchor are pop ups. We only want to set _blank\n // target if the browser does not support the HTML5 download attribute.\n // This allows you to download files in desktop safari if pop up blocking\n // is enabled.\n if (typeof tempLink.download === 'undefined') {\n tempLink.setAttribute('target', '_blank')\n }\n document.body.appendChild(tempLink)\n tempLink.click()\n setTimeout(() => {\n document.body.removeChild(tempLink)\n // TO CHECK: not revoking may increase more temp memory usage\n // once download, we will revokeObjectURL\n if (action !== 'open') {\n window.URL.revokeObjectURL(blobURL)\n }\n }, 200)\n }\n }\n\n static statusListColor (status: string, textColor: boolean = true) {\n let color = ''\n switch (status) {\n case SlipStatus.ACTIVE:\n case SlipStatus.COMPLETE:\n case SlipStatus.REFUNDPROCESSED:\n case SlipStatus.WRITEOFFCOMPLETED:\n color = 'success'\n break\n case SlipStatus.BOUNCED:\n case SlipStatus.NSF:\n case SlipStatus.LINKED:\n case SlipStatus.REFUNDREQUEST:\n case SlipStatus.REFUNDAUTHORIZED:\n case SlipStatus.WRITEOFFAUTHORIZED:\n case SlipStatus.WRITEOFFREQUESTED:\n case SlipStatus.VOID:\n color = 'error'\n break\n }\n\n return textColor ? `${color}--text` : color\n }\n\n static appendCurrencySymbol (currency: number | string) {\n return '$' + currency\n }\n\n static cleanObject (obj) {\n if (obj.remainingAmount) {\n obj.remainingAmount = obj.remainingAmount.replace(/[^0-9.]/g, '')\n }\n return Object.keys(obj)\n .filter((k) => obj[k] !== '' && obj[k] !== null)\n .reduce((a, k) => ({ ...a, [k]: obj[k] }), {})\n }\n\n static createQueryParams = params =>\n Object.keys(params)\n .map(k => `${k}=${encodeURI(params[k])}`)\n .join('&')\n\n static appendQueryParamsIfNeeded (targetUrl: string, route: any): string {\n const requestParams = CommonUtils.createQueryParams(route.query)\n return requestParams ? `${targetUrl}?${requestParams}` : targetUrl\n }\n\n // for converting address object of sbc-auth to as needed for BaseAddress component\n static convertAddressForComponent (address: Address) : BaseAddressModel {\n return {\n addressCity: address.city,\n addressCountry: address.country,\n addressRegion: address.region,\n deliveryInstructions: address.deliveryInstructions,\n postalCode: address.postalCode,\n streetAddress: address.street,\n streetAddressAdditional: address.streetAdditional\n }\n }\n\n // for converting address object of BaseAddress component to as needed for sbc-auth\n static convertAddressForAuth (iaddress: BaseAddressModel) : Address {\n return {\n city: iaddress.addressCity,\n country: iaddress.addressCountry,\n region: iaddress.addressRegion,\n deliveryInstructions: iaddress.deliveryInstructions,\n postalCode: iaddress.postalCode,\n street: iaddress.streetAddress,\n streetAdditional: iaddress.streetAddressAdditional\n }\n }\n\n static isApproverRole () {\n const approverRole:any = [Role.FAS_REFUND_APPROVER]\n return KeyCloakService.verifyRoles(approverRole, [])\n }\n\n static isVoidRole () {\n const voidRole:any = [Role.FAS_VOID]\n return KeyCloakService.verifyRoles(voidRole, [])\n }\n\n /**\n * check its in refunc process\n * @param {string} status\n */\n static isRefundProcessStatus (status) {\n return [\n SlipStatus.REFUNDREQUEST,\n SlipStatus.REFUNDAUTHORIZED,\n SlipStatus.REFUNDPROCESSED,\n SlipStatus.REFUNDREJECTED,\n SlipStatus.REFUNDUPLOADED\n ].includes(status)\n }\n\n /**\n * status is refundrequest\n * @param {string} status\n */\n static isRefundRequestStatus (status) {\n return [\n SlipStatus.REFUNDREQUEST\n ].includes(status)\n }\n\n /**\n * status permission allow to chaneg details\n * @param {string} status\n */\n static isEditEnabledBystatus (status) {\n return ![\n SlipStatus.REFUNDPROCESSED,\n SlipStatus.REFUNDAUTHORIZED,\n SlipStatus.NSF,\n SlipStatus.LINKED\n ].includes(status)\n }\n\n static isObject = (object) => {\n return object != null && typeof object === 'object'\n }\n\n static isDeepEqual = (object1, object2) => {\n const objKeys1 = Object.keys(object1)\n const objKeys2 = Object.keys(object2)\n\n if (objKeys1.length !== objKeys2.length) return false\n\n for (const key of objKeys1) {\n const value1 = object1[key]\n const value2 = object2[key]\n\n const isObjects = CommonUtils.isObject(value1) && CommonUtils.isObject(value2)\n\n if ((isObjects && !CommonUtils.isDeepEqual(value1, value2)) ||\n (!isObjects && value1 !== value2)\n ) {\n return false\n }\n }\n return true\n }\n}\n","import { SessionStorageKeys } from '@/util/constants'\n\nexport default class ConfigHelper {\n static async fetchConfig () {\n // sbc common components need the following keys\n sessionStorage.setItem(SessionStorageKeys.AuthApiUrl, ConfigHelper.getAuthAPIUrl())\n sessionStorage.setItem(SessionStorageKeys.PayApiUrl, ConfigHelper.getPayAPIURL())\n sessionStorage.setItem(SessionStorageKeys.StatusApiUrl, ConfigHelper.getStatusAPIUrl())\n sessionStorage.setItem(SessionStorageKeys.AuthWebUrl, ConfigHelper.getAuthWebUrl())\n sessionStorage.setItem(SessionStorageKeys.FasWebUrl, ConfigHelper.getFasWebUrl())\n if (ConfigHelper.getSiteminderLogoutUrl()) {\n sessionStorage.setItem(SessionStorageKeys.SiteminderLogoutUrl, ConfigHelper.getSiteminderLogoutUrl())\n }\n }\n\n /**\n * this will run everytime when vue is being loaded..so do the call only when session storage doesnt have the values\n */\n static saveConfigToSessionStorage () {\n return this.fetchConfig()\n }\n\n static getSelfURL () {\n // this is without a trailing slash\n return `${window.location.origin}${import.meta.env.VUE_APP_PATH}`.replace(/\\/$/, '') // remove the slash at the end\n }\n\n static getPayAPIURL () {\n const payApiUrl = `${import.meta.env.VUE_APP_PAY_API_URL}` + `${import.meta.env.VUE_APP_PAY_API_VERSION}`\n return sessionStorage.getItem(SessionStorageKeys.PayApiUrl) || payApiUrl\n }\n\n static getFasAPIURL () {\n return `${ConfigHelper.getPayAPIURL()}/fas`\n }\n\n static getAuthAPIUrl () {\n const authApiUrl = `${import.meta.env.VUE_APP_AUTH_API_URL}` + `${import.meta.env.VUE_APP_AUTH_API_VERSION}`\n return sessionStorage.getItem(SessionStorageKeys.AuthApiUrl) || authApiUrl\n }\n\n static getAuthWebUrl () {\n return sessionStorage.getItem(SessionStorageKeys.AuthWebUrl) || `${import.meta.env.VUE_APP_AUTH_WEB_URL}`\n }\n\n static getFasWebUrl () {\n return sessionStorage.getItem(SessionStorageKeys.FasWebUrl) || `${import.meta.env.VUE_APP_FAS_WEB_URL}`\n }\n\n static getStatusAPIUrl () {\n const statusApiUrl = `${import.meta.env.VUE_APP_STATUS_API_URL}` + `${import.meta.env.VUE_APP_STATUS_API_VERSION}`\n return sessionStorage.getItem(SessionStorageKeys.StatusApiUrl) || statusApiUrl\n }\n\n static getSiteminderLogoutUrl () {\n const logoutUrl = `${import.meta.env.VUE_APP_SITEMINDER_LOGOUT_URL}`\n return sessionStorage.getItem(SessionStorageKeys.SiteminderLogoutUrl) || logoutUrl\n }\n\n static getKeycloakAuthUrl () {\n return `${import.meta.env.VUE_APP_KEYCLOAK_AUTH_URL}`\n }\n\n static getKeycloakRealm () {\n return `${import.meta.env.VUE_APP_KEYCLOAK_REALM}`\n }\n\n static getKeycloakClientId () {\n return `${import.meta.env.VUE_APP_KEYCLOAK_CLIENTID}`\n }\n\n static getAddressCompleteKey () {\n return `${import.meta.env.VUE_APP_ADDRESS_COMPLETE_KEY}`\n }\n\n static addToSession (key:string, value:any) {\n sessionStorage.setItem(key, value)\n }\n\n static getFromSession (key:string) {\n return sessionStorage.getItem(key)\n }\n\n static removeFromSession (key:string) {\n sessionStorage.removeItem(key)\n }\n\n static clearSession () {\n sessionStorage.clear()\n }\n}\n","// Returns a function, that, as long as it continues to be invoked, will not\n// be triggered. The function will be called after it stops being called for\n// N milliseconds. If `immediate` is passed, trigger the function on the\n// leading edge, instead of the trailing.\n\nfunction debounce (func, wait = 300, immediate = false) {\n let timeout\n\n // to avoid this type error define this with type any, arg for rest arguments\n return function (this: any, ...args) {\n const context = this\n\n const later = function () {\n timeout = null\n if (!immediate) func.apply(context, args)\n }\n const callNow = immediate && !timeout\n\n clearTimeout(timeout)\n timeout = setTimeout(later, wait)\n if (callNow) func.apply(context, args)\n }\n}\n\nexport default debounce\n","import { computed, ref } from '@vue/composition-api'\n\nconst hasCallFailed = ref(false)\nconst activeCalls = ref(0)\nconst isThereActiveCalls = computed(() => {\n return activeCalls.value > 0\n})\n\nexport const useIndicators = () => {\n return {\n hasCallFailed,\n activeCalls,\n isThereActiveCalls\n }\n}\n","/*\nComposable function for loader component that is displayed whenever axios async process takes place\nGlobal loader is used in App.vue where show a full route loader - \nWhile, isLoading can be used inside an individual component - \n\n*/\n\nimport { ref } from '@vue/composition-api'\nimport { useIndicators } from '../useIndicators'\n\nexport function useLoader () {\n const { isThereActiveCalls } = useIndicators()\n const isLoading = ref(false)\n // vuex getters\n function changeLoadingStatus (isLoadingStatus: boolean): void {\n isLoading.value = isLoadingStatus\n }\n\n function toggleLoading (): void {\n changeLoadingStatus(!isLoading.value)\n }\n\n return {\n isLoading,\n isThereActiveCalls,\n toggleLoading\n }\n}\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\nvar enhanceError = require('./core/enhanceError');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n },\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nvar utils = require('./../utils');\nvar defaults = require('./../defaults');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n","'use strict';\n\nvar pkg = require('./../../package.json');\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\nvar currentVerArr = pkg.version.split('.');\n\n/**\n * Compare package versions\n * @param {string} version\n * @param {string?} thanVersion\n * @returns {boolean}\n */\nfunction isOlderVersion(version, thanVersion) {\n var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;\n var destVer = version.split('.');\n for (var i = 0; i < 3; i++) {\n if (pkgVersionArr[i] > destVer[i]) {\n return true;\n } else if (pkgVersionArr[i] < destVer[i]) {\n return false;\n }\n }\n return false;\n}\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator\n * @param {string?} version\n * @param {string} message\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n var isDeprecated = version && isOlderVersion(version);\n\n function formatMessage(opt, desc) {\n return '[Axios v' + pkg.version + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed in ' + version));\n }\n\n if (isDeprecated && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n isOlderVersion: isOlderVersion,\n assertOptions: assertOptions,\n validators: validators\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\nvar validator = require('../helpers/validator');\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","module.exports = require('./lib/axios');","import Axios from 'axios'\nimport ConfigHelper from '@/util/config-helper'\nimport { SessionStorageKeys } from '@/util/constants'\nimport { useIndicators } from '@/composables/useIndicators'\n// import store from '@/store'\n// using fasStore from window to avoid library build issue.\nconst axios = Axios.create()\n\nconst { activeCalls, hasCallFailed, isThereActiveCalls } = useIndicators()\n\naxios.defaults.showGlobalLoader = false // by default, false\naxios.defaults.showGlobalErrorHandling = true\n\naxios.interceptors.request.use(\n config => {\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)\n if (token) {\n config.headers.Authorization = `Bearer ${token}`\n }\n if (config.showGlobalLoader) {\n activeCalls.value++\n }\n return config\n },\n error => Promise.reject(error)\n)\n\naxios.interceptors.response.use(\n response => {\n // decrement active calls count by one\n if (response.config.showGlobalLoader && isThereActiveCalls.value) {\n activeCalls.value--\n }\n return response\n },\n error => {\n // decrement active calls count by one\n if (error.config.showGlobalLoader && isThereActiveCalls.value) {\n activeCalls.value--\n }\n // call has failed in this case. And if the config showGlobalErrorHandling is true, then update store\n if (error.config.showGlobalErrorHandling && error?.response?.status >= 500) {\n hasCallFailed.value = true\n }\n return Promise.reject(error)\n }\n)\n\n// to work on both case export as default and normal\nexport { axios }\nexport default axios\n","import { AxiosResponse } from 'axios'\nimport { Code } from '@/models/Code'\nimport ConfigHelper from '@/util/config-helper'\nimport axios from '@/util/http-util'\n\nexport default class CodesService {\n public static async getCodes (codeType: string): Promise> {\n return axios.get(`${ConfigHelper.getPayAPIURL()}/codes/${codeType}`)\n }\n}\n","import { ref } from '@vue/composition-api'\nimport { Code } from '@/models/Code'\nimport CodesService from '@/services/codes.service'\nimport { SlipStatus } from '@/util/constants'\n\nconst routingSlipStatusList = ref([])\n\nexport const useCodes = () => {\n const getRoutingSlipStatusList = async () => {\n if (routingSlipStatusList.value.length === 0) {\n const response: any = await CodesService.getCodes(\n 'routing_slip_statuses'\n )\n if (response && response.data && response.status === 200) {\n routingSlipStatusList.value = response.data?.codes.filter(\n code => code.code !== SlipStatus.REFUNDREJECTED\n )\n return\n }\n routingSlipStatusList.value = []\n }\n }\n return {\n routingSlipStatusList,\n getRoutingSlipStatusList\n }\n}\n","import { Code } from '@/models/Code'\nimport { SlipStatus } from '@/util/constants'\nimport { ref, computed, toRefs, onMounted } from '@vue/composition-api'\nimport { useCodes } from '../useCodes'\n\nexport function useStatusList (props, context) {\n const { getRoutingSlipStatusList, routingSlipStatusList } = useCodes()\n // default value set blank incase if we didnt pass props\n const { value = ref('') } = toRefs(props)\n\n // using same v-model value for getting value and update parent on change\n const currentStatus = computed({\n get: () => {\n return value.value || ''\n },\n set: (modalValue: Code) => {\n context.emit('input', modalValue.code)\n }\n })\n\n onMounted(() => {\n // getting status list mouint and setting inside store\n // will make call once till page refresh\n getRoutingSlipStatusList()\n })\n\n /**\n * return status label on code\n *\n * @param {string} code\n * @returns {string} description - label\n */\n function statusLabel (code: string) {\n const codeArray = selectedStatusObject(code)\n return codeArray[0]?.description || ''\n }\n\n /**\n * filtering array and find given value of object\n * use full when needed to set object of status\n * @param {string} code\n * @returns [{code, description}]\n */\n\n function selectedStatusObject (code: string) {\n return routingSlipStatusList.value?.filter(\n statusList => statusList.code === code\n )\n }\n\n return {\n routingSlipStatusList,\n currentStatus,\n statusLabel,\n selectedStatusObject\n }\n}\n","import { AxiosResponse } from 'axios'\nimport CommonUtils from '@/util/common-util'\nimport ConfigHelper from '@/util/config-helper'\nimport { GetFeeRequestParams, Payment } from '@/models/Payment'\nimport { LinkRoutingSlipPrams } from '@/models/RoutingSlip'\nimport axios from '@/util/http-util'\nimport { CreateRoutingSlipStatus, PatchActions, SlipStatus } from '@/util/constants'\n\nexport default class RoutingSlip {\n public static async getRoutingSlip (\n routingNumber: string,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.get(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingNumber}`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async createRoutingSlip (\n routingSlipRequest: RoutingSlip,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips`,\n routingSlipRequest,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async adjustRoutingSlip (\n payments: Payment[],\n routingSlipNumber: string\n ): Promise {\n const payload = {\n status: SlipStatus.CORRECTION,\n payments: payments\n }\n return axios.patch(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}?action=${PatchActions.UPDATE_STATUS}`,\n payload\n )\n }\n\n public static async updateRoutingSlipStatus (\n code: string,\n routingSlipNumber: string\n ): Promise {\n return axios.patch(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}?action=updateStatus`,\n { status: code }\n )\n }\n\n public static async updateRoutingSlipRefundStatus (\n code: string,\n routingSlipNumber: string\n ): Promise {\n try {\n const response = await axios.patch(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}?action=updateRefundStatus`,\n { refund_status: code }\n )\n if (response?.data) {\n return response.data\n }\n return null\n } catch (error) {\n console.error('Routing slip refund status update failed', error)\n throw error\n }\n }\n\n public static async updateRoutingSlipComments (\n data: any,\n slipNumber: string\n ): Promise {\n try {\n const response = await axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${slipNumber}/comments`,\n data\n )\n if (response?.data) {\n return response.data\n }\n return null\n } catch (error) {\n console.error('Failed to update routing slip comments', error)\n throw error\n }\n }\n\n public static async updateRoutingSlipRefund (\n details: string,\n routingSlipNumber: string\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}/refunds`,\n details\n )\n }\n\n public static async getSearchRoutingSlip (\n searchParams: RoutingSlip,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/queries`,\n searchParams,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async saveLinkRoutingSlip (\n LinkRoutingSlip: LinkRoutingSlipPrams,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/links`,\n LinkRoutingSlip,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async getLinkedRoutingSlips (\n routingSlipNumber: string,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.get(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}/links`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async getDailyReport (\n selectedDate: string,\n type: string = 'application/pdf',\n showGlobalLoader: boolean = false\n ): Promise {\n const headers = {\n Accept: type\n }\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${selectedDate}/reports`,\n {},\n {\n headers,\n responseType: 'blob' as 'json',\n showGlobalLoader: showGlobalLoader\n }\n )\n }\n\n public static async getSearchFilingType (\n searchParams: string,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.get(\n `${ConfigHelper.getPayAPIURL()}/fees/schedules?description=${searchParams}`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async getFeeByCorpTypeAndFilingType (\n getFeeRequestParams: GetFeeRequestParams,\n showGlobalLoader: boolean = false\n ): Promise {\n const requestParams = CommonUtils.createQueryParams(getFeeRequestParams.requestParams)\n return axios.get(\n `${ConfigHelper.getPayAPIURL()}/fees/${getFeeRequestParams.corpTypeCode}/${getFeeRequestParams.filingTypeCode}?${requestParams}`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async saveManualTransactions (\n transactions: any,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getPayAPIURL()}/payment-requests`,\n transactions,\n { showGlobalLoader: showGlobalLoader }\n\n )\n }\n\n public static async cancelRoutingSlipInvoice (\n invoiceId: number,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getPayAPIURL()}/payment-requests/${invoiceId}/refunds`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n}\n","import { computed, ref } from '@vue/composition-api'\nimport RoutingSlipService from '@/services/routingSlip.services'\nimport { AccountInfo, AdjustRoutingSlipAmountPrams, AdjustRoutingSlipChequePrams, GetRoutingSlipRequestPayload, LinkedRoutingSlips, RoutingSlip, RoutingSlipDetails } from '@/models/RoutingSlip'\nimport { ApiErrors, CreateRoutingSlipStatus, headerSearchTitle as headerSearchTitleConstant, SlipStatus } from '@/util/constants'\nimport CommonUtils from '@/util/common-util'\nimport { BusinessInfo, GetFeeRequestParams, Payment, TransactionParams } from '@/models/Payment'\n\nconst defaultParams = {\n page: 1,\n limit: 50,\n total: Infinity\n}\nconst headerSearchTitle = ref(headerSearchTitleConstant)\nconst searchRoutingSlipResult = ref([])\nconst searchRoutingSlipParams = ref(defaultParams)\n\nconst routingSlip = ref({})\nconst linkedRoutingSlips = ref(undefined)\nconst routingSlipDetails = ref({})\nconst accountInfo = ref({})\nconst chequePayment = ref([])\nconst cashPayment = ref({})\nconst isPaymentMethodCheque = ref(true)\nconst isAmountPaidInUsd = ref(false)\nconst autoCompleteRoutingSlips = ref([])\n\nexport const useRoutingSlip = () => {\n // Computed\n const invoiceCount = computed(() => {\n return routingSlip.value?.invoices?.length\n })\n\n const searchParamsExist = computed(() => {\n const params = searchRoutingSlipParams.value\n for (const key in params) {\n if (params[key] && params[key] !== '') {\n return false\n }\n }\n return true\n })\n\n // for a child linked to a parent routing slip, there would be a parentNumber\n const isRoutingSlipAChild = computed(() => {\n return !!routingSlip.value?.parentNumber\n })\n\n // if routingslip has parentNumber then it is a child Else, check if there are any children in linkedroutingslips for it.(in this case, it is a parent)\n const isRoutingSlipLinked = computed(() => {\n return (\n isRoutingSlipAChild.value || linkedRoutingSlips.value?.children.length > 0\n )\n })\n\n const isRoutingSlipVoid = computed(() => {\n return routingSlip.value?.status === SlipStatus.VOID\n })\n\n const updateRoutingSlipChequeNumber = (chequeNumToChange: AdjustRoutingSlipChequePrams) => {\n const payments = routingSlip.value.payments.map((payment: Payment, i: number) => {\n if (chequeNumToChange.paymentIndex === i) {\n payment.chequeReceiptNumber = chequeNumToChange.chequeNum\n }\n return { ...payment }\n })\n routingSlip.value.payments = payments\n }\n\n const updateRoutingSlipAmount = (amountToChange: AdjustRoutingSlipAmountPrams) => {\n const payments = routingSlip.value.payments.map((payment: Payment, i: number) => {\n if (amountToChange.paymentIndex === i) {\n if (amountToChange.isRoutingSlipPaidInUsd) {\n payment.paidUsdAmount = amountToChange.amount\n } else {\n payment.paidAmount = amountToChange.amount\n }\n }\n return { ...payment }\n })\n routingSlip.value.payments = payments\n }\n\n // Functions\n const createRoutingSlip = async () => {\n // build the RoutingSlip Request JSON object that needs to be sent.\n let routingSlipRequest: RoutingSlip = {}\n routingSlipRequest = { ...routingSlipDetails.value }\n routingSlipRequest.paymentAccount = accountInfo.value\n\n // By design, a routing slip can only have one payment method - CASH or CHEQUE.\n routingSlipRequest.payments = isPaymentMethodCheque.value\n ? chequePayment.value\n : [cashPayment.value]\n\n const response = await RoutingSlipService.createRoutingSlip(\n routingSlipRequest,\n true\n )\n if (response && response.data && response.status === 200) {\n routingSlip.value = response.data\n }\n }\n\n const checkRoutingNumber = async (): Promise => {\n try {\n const routingNumber = routingSlipDetails.value.number\n const response = await RoutingSlipService.getRoutingSlip(routingNumber)\n // if routing number existing we will get 200 as response\n // else we will get 204\n if (response.status === 204) {\n return CreateRoutingSlipStatus.VALID\n }\n // all other case routing is existing so can't use this number\n return CreateRoutingSlipStatus.EXISTS\n } catch (error) {\n if (error.response?.status === 400 && error.response?.data?.type === ApiErrors.FAS_INVALID_ROUTING_SLIP_DIGITS) {\n return CreateRoutingSlipStatus.INVALID_DIGITS\n }\n\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data)\n // on error we allow the routing number which should break on create and show error message\n return CreateRoutingSlipStatus.VALID\n }\n }\n\n const getRoutingSlip = async (getRoutingSlipRequestPayload: GetRoutingSlipRequestPayload) => {\n try {\n const response = await RoutingSlipService.getRoutingSlip(\n getRoutingSlipRequestPayload.routingSlipNumber,\n getRoutingSlipRequestPayload?.showGlobalLoader\n )\n\n if (response && response.data && response.status === 200) {\n routingSlip.value = response.data\n }\n // TODO : need to handle if slip not existing\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data) // 500 errors may not return data\n }\n }\n\n const updateRoutingSlipStatus = async (\n statusDetails: any\n ) => {\n const slipNumber = routingSlip.value.number\n // update status\n try {\n let response\n if (CommonUtils.isRefundProcessStatus(statusDetails?.status)) {\n response = await RoutingSlipService.updateRoutingSlipRefund(\n statusDetails,\n slipNumber\n )\n } else {\n response = await RoutingSlipService.updateRoutingSlipStatus(\n statusDetails.status,\n slipNumber\n )\n }\n if (response?.data && (response.status === 200 || response.status === 202)) {\n if (!CommonUtils.isRefundProcessStatus(statusDetails?.status)) {\n routingSlip.value = response.data\n } else {\n const getRoutingSlipRequestPayload: GetRoutingSlipRequestPayload = { routingSlipNumber: slipNumber }\n getRoutingSlip(getRoutingSlipRequestPayload)\n }\n return response\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response)\n return error?.response\n }\n }\n\n const updateRoutingSlipRefundStatus = async (status: any) => {\n const slipNumber = routingSlip.value.number\n try {\n const responseData = await RoutingSlipService.updateRoutingSlipRefundStatus(status, slipNumber)\n return responseData\n } catch (error) {\n console.error('Error updating refund status:', error)\n return error?.response\n }\n }\n\n const updateRoutingSlipComments = async (text: any) => {\n const slipNumber = routingSlip.value.number\n const data = {\n comment: {\n businessId: slipNumber,\n comment: text\n }\n }\n try {\n const responseData = await RoutingSlipService.updateRoutingSlipComments(data, slipNumber)\n return responseData\n } catch (error) {\n console.error('Error updating routing slip comments:', error)\n return error?.response\n }\n }\n\n const adjustRoutingSlip = async (payments: Payment[]): Promise => {\n // build the RoutingSlip Request JSON object that needs to be sent.\n const slipNumber = routingSlip.value.number\n try {\n const response = await RoutingSlipService.adjustRoutingSlip(\n payments,\n slipNumber\n )\n if (response?.data && response.status === 200) {\n return response.data\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response)\n return error?.response\n }\n }\n\n const resetRoutingSlipDetails = () => {\n routingSlipDetails.value = undefined\n accountInfo.value = undefined\n chequePayment.value = undefined\n cashPayment.value = undefined\n isPaymentMethodCheque.value = undefined\n }\n\n const resetSearchParams = (): void => {\n searchRoutingSlipParams.value = defaultParams\n searchRoutingSlipResult.value = []\n }\n\n const searchRoutingSlip = async (appendToResults = false) => {\n // // build the RoutingSlip Request JSON object that needs to be sent.\n\n let params = { ...searchRoutingSlipParams.value }\n // filtering and removing all non set values\n params = CommonUtils.cleanObject(params)\n\n // formatting as per API\n if (params.dateFilter) {\n params.dateFilter = {\n startDate: CommonUtils.formatDisplayDate(\n params.dateFilter[0],\n 'YYYY-MM-DD'\n ),\n endDate: CommonUtils.formatDisplayDate(\n params.dateFilter[1],\n 'YYYY-MM-DD'\n )\n }\n }\n\n // check for error handling\n if (params.status) {\n params.status = params.status.code\n }\n\n if (Object.keys(params).length > 0) {\n // need to reset result of there is no search params\n const response = await RoutingSlipService.getSearchRoutingSlip(\n params\n )\n if (response && response.data && response.status === 200) {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n total: response.data?.total || 0\n }\n if (appendToResults) {\n searchRoutingSlipResult.value = [\n ...searchRoutingSlipResult.value,\n ...response.data?.items\n ]\n } else {\n searchRoutingSlipResult.value = response.data?.items\n }\n\n return\n }\n }\n searchRoutingSlipResult.value = []\n }\n\n const saveLinkRoutingSlip = async (\n parentRoutingSlipNumber: string\n ): Promise => {\n const childRoutingSlipNumber: string = routingSlip.value.number\n\n const LinkPrams = { childRoutingSlipNumber, parentRoutingSlipNumber }\n\n try {\n // handle error condtions here\n const response = await RoutingSlipService.saveLinkRoutingSlip(LinkPrams)\n if (response && response.data && response.status === 200) {\n return {\n error: false\n }\n }\n } catch (error) {\n if (error.response.status === 400) {\n return { error: true, details: error.response?.data }\n }\n\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data)\n }\n }\n\n const getLinkedRoutingSlips = async (routingSlipNumber) => {\n try {\n const response = await RoutingSlipService.getLinkedRoutingSlips(\n routingSlipNumber,\n true\n )\n let result: LinkedRoutingSlips\n if (response && response.data && response.status === 200) {\n result = response.data\n }\n // 204 non content response\n linkedRoutingSlips.value = result\n } catch (error) {\n linkedRoutingSlips.value = undefined\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data) // 500 errors may not return data\n }\n }\n\n const getDailyReportByDate = async (selectedDate, type) => {\n const formatedDate = CommonUtils.formatDisplayDate(\n selectedDate,\n 'YYYY-MM-DD'\n )\n try {\n return await RoutingSlipService.getDailyReport(formatedDate, type, false)\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data) // 500 errors may not return data\n return error.response\n }\n }\n\n const getAutoCompleteRoutingSlips = async (\n routingSlipNumber\n ): Promise => {\n const response = await RoutingSlipService.getSearchRoutingSlip({\n routingSlipNumber\n })\n if (response && response.data && response.status === 200) {\n return response.data?.items\n }\n\n return []\n }\n\n const getFeeByCorpTypeAndFilingType = async (\n getFeeRequestParams: GetFeeRequestParams\n ): Promise => {\n // Currently, in FAS we only need total from the result that is the source of truth.\n // Other properties such as tax breakdown and priority fees can be ignored here.\n const response = await RoutingSlipService.getFeeByCorpTypeAndFilingType(\n getFeeRequestParams\n )\n if (response && response.data && response.status === 200) {\n return response.data?.total\n }\n return null\n }\n\n const saveManualTransactions = async (transation: any): Promise => {\n // prepare format from here\n const routingSlipNumber: string = routingSlip.value.number\n\n const {\n referenceNumber,\n filingType,\n futureEffective,\n priority,\n quantity\n } = transation\n const businessInfo: BusinessInfo = {\n corpType: filingType.corpTypeCode.code\n }\n\n // no need to pass if empty\n if (referenceNumber) {\n businessInfo.businessIdentifier = referenceNumber\n }\n\n const transactionParams: TransactionParams = {\n businessInfo,\n filingInfo: {\n filingTypes: [\n {\n filingTypeCode: filingType.filingTypeCode.code,\n futureEffective: futureEffective,\n priority: priority,\n quantity: parseInt(quantity)\n }\n ]\n },\n accountInfo: {\n routingSlip: routingSlipNumber\n }\n }\n\n const response = await RoutingSlipService.saveManualTransactions(\n transactionParams\n )\n return response\n }\n\n const cancelRoutingSlipInvoice = async (invoiceId: number) => {\n return await RoutingSlipService.cancelRoutingSlipInvoice(invoiceId)\n }\n\n async function infiniteScrollCallback () {\n const params = { ...searchRoutingSlipParams.value }\n if (params.total !== Infinity && params.total < params.limit) return true\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n page: searchRoutingSlipParams.value.page ? searchRoutingSlipParams.value.page + 1 : 1\n }\n await searchRoutingSlip(true)\n return false\n }\n\n return {\n headerSearchTitle,\n searchRoutingSlipResult,\n searchRoutingSlipParams,\n routingSlip,\n linkedRoutingSlips,\n routingSlipDetails,\n accountInfo,\n chequePayment,\n cashPayment,\n isPaymentMethodCheque,\n isAmountPaidInUsd,\n autoCompleteRoutingSlips,\n invoiceCount,\n searchParamsExist,\n isRoutingSlipAChild,\n isRoutingSlipLinked,\n isRoutingSlipVoid,\n defaultParams,\n updateRoutingSlipChequeNumber,\n updateRoutingSlipAmount,\n createRoutingSlip,\n checkRoutingNumber,\n getRoutingSlip,\n updateRoutingSlipStatus,\n updateRoutingSlipRefundStatus,\n adjustRoutingSlip,\n resetRoutingSlipDetails,\n resetSearchParams,\n searchRoutingSlip,\n saveLinkRoutingSlip,\n getLinkedRoutingSlips,\n getDailyReportByDate,\n getAutoCompleteRoutingSlips,\n getFeeByCorpTypeAndFilingType,\n saveManualTransactions,\n cancelRoutingSlipInvoice,\n infiniteScrollCallback,\n updateRoutingSlipComments\n }\n}\n","import { computed, onMounted, reactive, ref, toRefs } from '@vue/composition-api'\n\nimport CommonUtils from '@/util/common-util'\nimport ConfigHelper from '@/util/config-helper'\nimport debounce from '@/util/debounce'\nimport { useLoader } from '@/composables/common/useLoader'\nimport { useStatusList } from '@/composables/common/useStatusList'\nimport { useRoutingSlip } from '../useRoutingSlip'\nimport { RoutingSlipRefundCodes, RoutingSlipRefundStatus, SlipStatus } from '@/util/constants'\n\nexport function useSearch (props, context) {\n const {\n headerSearchTitle,\n resetSearchParams,\n searchParamsExist,\n searchRoutingSlip,\n searchRoutingSlipParams,\n searchRoutingSlipResult,\n infiniteScrollCallback,\n defaultParams\n } = useRoutingSlip()\n const { isLibraryMode } = toRefs(props)\n // Adding openFromAuth=true queryparams so that we can build breadcrumbs\n // Eg of a typical breadcrumb flow = Staff Dashboard -> FAS Dashboard -> View Routing Slip: test -> View Routing Slip: testchild\n const fasUrl = `${ConfigHelper.getFasWebUrl()}?openFromAuth=true`\n\n const { statusLabel } = useStatusList(reactive({ value: '' }), {})\n const { isLoading, toggleLoading } = useLoader()\n\n const showExpandedFolio = ref([])\n const showExpandedCheque = ref([])\n // to make sure not updating result on keyup\n const searchParamsChanged = ref(false)\n const reachedEnd = ref(false)\n\n const headerSearch: any = computed({\n get: () => {\n return headerSearchTitle.value || []\n },\n set: (modalValue: any) => {\n headerSearchTitle.value = modalValue\n }\n })\n\n // columntoshow component and update the local object if display = true\n const displayedHeaderSearch: any = computed(() => {\n const displayed = []\n for (let i = 0; i < headerSearch.value?.length; i++) {\n if (headerSearch.value[i].display) {\n displayed.push(headerSearch.value[i])\n }\n }\n return displayed\n })\n\n function canShowColumn (columnName) {\n return displayedHeaderSearch.value.find(header => {\n return header.value === columnName\n })\n }\n\n function updateSearchFilter (updates: any) {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n ...defaultParams,\n ...updates\n }\n searchParamsChanged.value = true\n reachedEnd.value = false\n }\n\n // using same v-model value for getting value and update parent on change\n const routingSlipNumber: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.routingSlipNumber || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n routingSlipNumber: modalValue\n })\n }\n })\n\n const receiptNumber: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.receiptNumber || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n receiptNumber: modalValue\n })\n }\n })\n\n const status: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.status || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n status: modalValue\n })\n }\n })\n\n const refundStatus: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.refundStatus || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n refundStatus: modalValue\n })\n }\n })\n\n const businessIdentifier: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.businessIdentifier || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n businessIdentifier: modalValue\n })\n }\n })\n\n const accountName: any = computed({\n get: () => {\n return searchRoutingSlipParams.value?.accountName || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n accountName: modalValue\n })\n }\n })\n\n const initiator: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.initiator || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n initiator: modalValue\n })\n }\n })\n\n const remainingAmount: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.remainingAmount || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n remainingAmount: modalValue\n })\n }\n })\n\n const dateFilter: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.dateFilter || []\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n dateFilter: modalValue\n })\n }\n })\n\n const chequeReceiptNumber: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.chequeReceiptNumber || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n chequeReceiptNumber: modalValue\n })\n }\n })\n\n function applyDateFilter (dateRangeObj) {\n dateFilter.value = dateRangeObj\n }\n\n async function searchNow () {\n toggleLoading()\n await searchRoutingSlip()\n searchParamsChanged.value = false\n toggleLoading()\n }\n\n onMounted(() => {\n // To be triggered when coming back to FAS home page from a breadcrumb and if there are any search params present\n if (!searchParamsExist.value) {\n searchNow()\n }\n })\n\n const debouncedSearch = debounce(() => {\n searchNow()\n })\n\n const appendQueryParamsIfNeeded = CommonUtils.appendQueryParamsIfNeeded\n\n // get label of status\n function getStatusLabel (code: string) {\n return statusLabel(code)\n }\n\n async function clearFilter () {\n toggleLoading()\n resetSearchParams()\n await searchRoutingSlip()\n searchParamsChanged.value = false\n toggleLoading()\n }\n\n function toggleFolio (id: number) {\n // to show and hide multiple folio on click\n // remove from array if already existing else add to array\n if (showExpandedFolio.value.includes(id)) {\n showExpandedFolio.value = showExpandedFolio.value.filter(function (item) {\n return item !== id\n })\n } else {\n showExpandedFolio.value.push(id)\n }\n }\n\n function toggleCheque (id: number) {\n // to show and hide multiple folio on click\n // remove from array if already existing else add to array\n if (showExpandedCheque.value.includes(id)) {\n showExpandedCheque.value = showExpandedCheque.value.filter(function (item) {\n return item !== id\n })\n } else {\n showExpandedCheque.value.push(id)\n }\n }\n\n function formatFolioResult (routingSlip) {\n // to make sure not updating on keyup\n if (\n !searchParamsChanged.value &&\n businessIdentifier.value &&\n businessIdentifier.value !== ''\n ) {\n return [businessIdentifier.value]\n }\n const { invoices } = routingSlip\n\n if (invoices) {\n return invoices\n .filter(invoice => invoice.businessIdentifier)\n .map(value => value.businessIdentifier)\n }\n return ['-']\n }\n\n function navigateTo (routingSlipNumber: number) : void {\n if (isLibraryMode.value) {\n // This scenario would hit when the FAS Search is displayed as a plugin in Staff dashboard\n // we append queryparams so that we can persist breadcrumbs across different components and refresh issue\n // Adding viewFromAuth=true queryparams so that we can build breadcrumbs\n // Eg of a typical breadcrumb flow = Staff Dashboard -> View Routing Slip: test -> View Routing Slip: testchild\n window.location.href = `${ConfigHelper.getFasWebUrl()}view-routing-slip/${routingSlipNumber}?viewFromAuth=true`\n } else {\n context.root.$router.push(appendQueryParamsIfNeeded(`/view-routing-slip/${routingSlipNumber}`, context.root.$route))\n }\n }\n\n const getNext = debounce(async () => {\n if (isLoading.value) return\n reachedEnd.value = await infiniteScrollCallback()\n }, 100) // Adjust the wait time as needed\n\n function getRefundStatusText (statusCode: string | undefined): string {\n const status = RoutingSlipRefundStatus.find(item => item.code === statusCode)\n return status ? status.text : RoutingSlipRefundCodes.PROCESSING\n }\n\n function getStatusFromRefundStatus (statusCode: string): SlipStatus {\n if (statusCode === RoutingSlipRefundCodes.PROCESSING) {\n return SlipStatus.REFUNDREQUEST\n } else {\n return SlipStatus.REFUNDPROCESSED\n }\n }\n\n return {\n headerSearch,\n displayedHeaderSearch,\n status,\n refundStatus,\n routingSlipNumber,\n receiptNumber,\n dateFilter,\n businessIdentifier,\n accountName,\n remainingAmount,\n chequeReceiptNumber,\n canShowColumn,\n applyDateFilter,\n searchNow,\n debouncedSearch,\n searchRoutingSlipResult,\n getStatusLabel,\n searchParamsExist,\n clearFilter,\n formatFolioResult,\n showExpandedFolio,\n showExpandedCheque,\n toggleFolio,\n toggleCheque,\n isLoading,\n navigateTo,\n fasUrl,\n initiator,\n reachedEnd,\n getNext,\n getRefundStatusText,\n getStatusFromRefundStatus\n }\n}\n","/**\n * vue-class-component v7.2.6\n * (c) 2015-present Evan You\n * @license MIT\n */\nimport Vue from 'vue';\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\n// The rational behind the verbose Reflect-feature check below is the fact that there are polyfills\n// which add an implementation for Reflect.defineMetadata but not for Reflect.getOwnMetadataKeys.\n// Without this check consumers will encounter hard to track down runtime errors.\nfunction reflectionIsSupported() {\n return typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys;\n}\nfunction copyReflectionMetadata(to, from) {\n forwardMetadata(to, from);\n Object.getOwnPropertyNames(from.prototype).forEach(function (key) {\n forwardMetadata(to.prototype, from.prototype, key);\n });\n Object.getOwnPropertyNames(from).forEach(function (key) {\n forwardMetadata(to, from, key);\n });\n}\n\nfunction forwardMetadata(to, from, propertyKey) {\n var metaKeys = propertyKey ? Reflect.getOwnMetadataKeys(from, propertyKey) : Reflect.getOwnMetadataKeys(from);\n metaKeys.forEach(function (metaKey) {\n var metadata = propertyKey ? Reflect.getOwnMetadata(metaKey, from, propertyKey) : Reflect.getOwnMetadata(metaKey, from);\n\n if (propertyKey) {\n Reflect.defineMetadata(metaKey, metadata, to, propertyKey);\n } else {\n Reflect.defineMetadata(metaKey, metadata, to);\n }\n });\n}\n\nvar fakeArray = {\n __proto__: []\n};\nvar hasProto = fakeArray instanceof Array;\nfunction createDecorator(factory) {\n return function (target, key, index) {\n var Ctor = typeof target === 'function' ? target : target.constructor;\n\n if (!Ctor.__decorators__) {\n Ctor.__decorators__ = [];\n }\n\n if (typeof index !== 'number') {\n index = undefined;\n }\n\n Ctor.__decorators__.push(function (options) {\n return factory(options, key, index);\n });\n };\n}\nfunction mixins() {\n for (var _len = arguments.length, Ctors = new Array(_len), _key = 0; _key < _len; _key++) {\n Ctors[_key] = arguments[_key];\n }\n\n return Vue.extend({\n mixins: Ctors\n });\n}\nfunction isPrimitive(value) {\n var type = _typeof(value);\n\n return value == null || type !== 'object' && type !== 'function';\n}\nfunction warn(message) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-class-component] ' + message);\n }\n}\n\nfunction collectDataFromConstructor(vm, Component) {\n // override _init to prevent to init as Vue instance\n var originalInit = Component.prototype._init;\n\n Component.prototype._init = function () {\n var _this = this;\n\n // proxy to actual vm\n var keys = Object.getOwnPropertyNames(vm); // 2.2.0 compat (props are no longer exposed as self properties)\n\n if (vm.$options.props) {\n for (var key in vm.$options.props) {\n if (!vm.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n }\n\n keys.forEach(function (key) {\n Object.defineProperty(_this, key, {\n get: function get() {\n return vm[key];\n },\n set: function set(value) {\n vm[key] = value;\n },\n configurable: true\n });\n });\n }; // should be acquired class property values\n\n\n var data = new Component(); // restore original _init to avoid memory leak (#209)\n\n Component.prototype._init = originalInit; // create plain data object\n\n var plainData = {};\n Object.keys(data).forEach(function (key) {\n if (data[key] !== undefined) {\n plainData[key] = data[key];\n }\n });\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(Component.prototype instanceof Vue) && Object.keys(plainData).length > 0) {\n warn('Component class must inherit Vue or its descendant class ' + 'when class property is used.');\n }\n }\n\n return plainData;\n}\n\nvar $internalHooks = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeDestroy', 'destroyed', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch' // 2.6\n];\nfunction componentFactory(Component) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n options.name = options.name || Component._componentTag || Component.name; // prototype props.\n\n var proto = Component.prototype;\n Object.getOwnPropertyNames(proto).forEach(function (key) {\n if (key === 'constructor') {\n return;\n } // hooks\n\n\n if ($internalHooks.indexOf(key) > -1) {\n options[key] = proto[key];\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(proto, key);\n\n if (descriptor.value !== void 0) {\n // methods\n if (typeof descriptor.value === 'function') {\n (options.methods || (options.methods = {}))[key] = descriptor.value;\n } else {\n // typescript decorated data\n (options.mixins || (options.mixins = [])).push({\n data: function data() {\n return _defineProperty({}, key, descriptor.value);\n }\n });\n }\n } else if (descriptor.get || descriptor.set) {\n // computed properties\n (options.computed || (options.computed = {}))[key] = {\n get: descriptor.get,\n set: descriptor.set\n };\n }\n });\n (options.mixins || (options.mixins = [])).push({\n data: function data() {\n return collectDataFromConstructor(this, Component);\n }\n }); // decorate options\n\n var decorators = Component.__decorators__;\n\n if (decorators) {\n decorators.forEach(function (fn) {\n return fn(options);\n });\n delete Component.__decorators__;\n } // find super\n\n\n var superProto = Object.getPrototypeOf(Component.prototype);\n var Super = superProto instanceof Vue ? superProto.constructor : Vue;\n var Extended = Super.extend(options);\n forwardStaticMembers(Extended, Component, Super);\n\n if (reflectionIsSupported()) {\n copyReflectionMetadata(Extended, Component);\n }\n\n return Extended;\n}\nvar reservedPropertyNames = [// Unique id\n'cid', // Super Vue constructor\n'super', // Component options that will be used by the component\n'options', 'superOptions', 'extendOptions', 'sealedOptions', // Private assets\n'component', 'directive', 'filter'];\nvar shouldIgnore = {\n prototype: true,\n arguments: true,\n callee: true,\n caller: true\n};\n\nfunction forwardStaticMembers(Extended, Original, Super) {\n // We have to use getOwnPropertyNames since Babel registers methods as non-enumerable\n Object.getOwnPropertyNames(Original).forEach(function (key) {\n // Skip the properties that should not be overwritten\n if (shouldIgnore[key]) {\n return;\n } // Some browsers does not allow reconfigure built-in properties\n\n\n var extendedDescriptor = Object.getOwnPropertyDescriptor(Extended, key);\n\n if (extendedDescriptor && !extendedDescriptor.configurable) {\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(Original, key); // If the user agent does not support `__proto__` or its family (IE <= 10),\n // the sub class properties may be inherited properties from the super class in TypeScript.\n // We need to exclude such properties to prevent to overwrite\n // the component options object which stored on the extended constructor (See #192).\n // If the value is a referenced value (object or function),\n // we can check equality of them and exclude it if they have the same reference.\n // If it is a primitive value, it will be forwarded for safety.\n\n if (!hasProto) {\n // Only `cid` is explicitly exluded from property forwarding\n // because we cannot detect whether it is a inherited property or not\n // on the no `__proto__` environment even though the property is reserved.\n if (key === 'cid') {\n return;\n }\n\n var superDescriptor = Object.getOwnPropertyDescriptor(Super, key);\n\n if (!isPrimitive(descriptor.value) && superDescriptor && superDescriptor.value === descriptor.value) {\n return;\n }\n } // Warn if the users manually declare reserved properties\n\n\n if (process.env.NODE_ENV !== 'production' && reservedPropertyNames.indexOf(key) >= 0) {\n warn(\"Static property name '\".concat(key, \"' declared on class '\").concat(Original.name, \"' \") + 'conflicts with reserved property name of Vue internal. ' + 'It may cause unexpected behavior of the component. Consider renaming the property.');\n }\n\n Object.defineProperty(Extended, key, descriptor);\n });\n}\n\nfunction Component(options) {\n if (typeof options === 'function') {\n return componentFactory(options);\n }\n\n return function (Component) {\n return componentFactory(Component, options);\n };\n}\n\nComponent.registerHooks = function registerHooks(keys) {\n $internalHooks.push.apply($internalHooks, _toConsumableArray(keys));\n};\n\nexport default Component;\nexport { createDecorator, mixins };\n","var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\n// Code copied from Vue/src/shared/util.js\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) { return str.replace(hyphenateRE, '-$1').toLowerCase(); };\n/**\n * decorator of an event-emitter function\n * @param event The name of the event\n * @return MethodDecorator\n */\nexport function Emit(event) {\n return function (_target, propertyKey, descriptor) {\n var key = hyphenate(propertyKey);\n var original = descriptor.value;\n descriptor.value = function emitter() {\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var emit = function (returnValue) {\n var emitName = event || key;\n if (returnValue === undefined) {\n if (args.length === 0) {\n _this.$emit(emitName);\n }\n else if (args.length === 1) {\n _this.$emit(emitName, args[0]);\n }\n else {\n _this.$emit.apply(_this, __spreadArrays([emitName], args));\n }\n }\n else {\n args.unshift(returnValue);\n _this.$emit.apply(_this, __spreadArrays([emitName], args));\n }\n };\n var returnValue = original.apply(this, args);\n if (isPromise(returnValue)) {\n returnValue.then(emit);\n }\n else {\n emit(returnValue);\n }\n return returnValue;\n };\n };\n}\nfunction isPromise(obj) {\n return obj instanceof Promise || (obj && typeof obj.then === 'function');\n}\n","/** @see {@link https://github.com/vuejs/vue-class-component/blob/master/src/reflect.ts} */\nvar reflectMetadataIsSupported = typeof Reflect !== 'undefined' && typeof Reflect.getMetadata !== 'undefined';\nexport function applyMetadata(options, target, key) {\n if (reflectMetadataIsSupported) {\n if (!Array.isArray(options) &&\n typeof options !== 'function' &&\n !options.hasOwnProperty('type') &&\n typeof options.type === 'undefined') {\n var type = Reflect.getMetadata('design:type', target, key);\n if (type !== Object) {\n options.type = type;\n }\n }\n }\n}\n","import { createDecorator } from 'vue-class-component';\nimport { applyMetadata } from '../helpers/metadata';\n/**\n * decorator of a prop\n * @param options the options for the prop\n * @return PropertyDecorator | void\n */\nexport function Prop(options) {\n if (options === void 0) { options = {}; }\n return function (target, key) {\n applyMetadata(options, target, key);\n createDecorator(function (componentOptions, k) {\n ;\n (componentOptions.props || (componentOptions.props = {}))[k] = options;\n })(target, key);\n };\n}\n","import { computed, reactive, ref, toRefs } from '@vue/composition-api'\n\nimport CommonUtils from '@/util/common-util'\nimport { DateFilterCodes } from '@/util/constants'\nimport moment from 'moment'\n\nexport const DATEFILTER_CODES = DateFilterCodes\nexport function useDateRange (props, context) {\n const { value } = toRefs(props)\n\n // using same v-model value for getting value and update parent on change\n const dateRangeSelected = computed({\n get: () => {\n return value.value\n },\n set: (modalValue: Date[]) => {\n context.emit('input', modalValue)\n }\n })\n // to keep track of old value on cancel rest to this value default value will props passed\n const oldSelectedRange = ref(value.value)\n\n const dateRangeSelectedDisplay = computed(() => {\n return dateRangeSelected.value.join(' - ')\n })\n\n const dateFilterRanges = reactive([\n {\n label: 'Today',\n code: DATEFILTER_CODES.TODAY\n },\n {\n label: 'Yesterday',\n code: DATEFILTER_CODES.YESTERDAY\n },\n {\n label: 'Last Week',\n code: DATEFILTER_CODES.LASTWEEK\n },\n {\n label: 'Last Month',\n code: DATEFILTER_CODES.LASTMONTH\n },\n {\n label: 'Custom Range',\n code: DATEFILTER_CODES.CUSTOMRANGE\n }\n ])\n\n const dateFilterSelectedIndex = ref(null)\n const dateFilterSelected: any = ref({})\n const showDateFilter = ref(false)\n const pickerDate = ref('')\n\n // apply filter button enable only if the date ranges are selected and start date <= end date\n const isApplyFilterBtnValid = computed(() => {\n if (\n dateRangeSelected.value.length === 2 &&\n dateRangeSelected.value[0] > dateRangeSelected.value[1]\n ) {\n dateRangeSelected.value = [\n dateRangeSelected.value[1],\n dateRangeSelected.value[0]\n ]\n }\n\n return (\n dateRangeSelected.value[0] &&\n dateRangeSelected.value[1] &&\n dateRangeSelected.value[0] <= dateRangeSelected.value[1]\n )\n })\n\n const showDateRangeSelected = computed(() => {\n let dateText = ''\n if (\n dateFilterSelected.value.code === DATEFILTER_CODES.TODAY ||\n dateFilterSelected.value.code === DATEFILTER_CODES.YESTERDAY\n ) {\n dateText = `${\n dateFilterSelected.value.label\n }: ${CommonUtils.formatDisplayDate(\n dateRangeSelected.value[0],\n 'MM-DD-YYYY'\n )}`\n } else {\n dateText = `${dateFilterSelected.value?.label}: \n ${CommonUtils.formatDisplayDate(\n dateRangeSelected.value[0],\n 'MM-DD-YYYY'\n )} \n - ${CommonUtils.formatDisplayDate(\n dateRangeSelected.value[1],\n 'MM-DD-YYYY'\n )}`\n }\n\n return dateFilterSelected.value?.code\n ? dateText\n : 'No dates selected'\n })\n\n function formatDatePickerDate (dateObj) {\n return dateObj.format('YYYY-MM-DD')\n }\n\n function dateFilterChange (val) {\n if (val > -1) {\n dateFilterSelected.value = dateFilterRanges[val]\n switch (dateFilterSelected.value.code) {\n case DATEFILTER_CODES.TODAY:\n // eslint-disable-next-line no-case-declarations\n const today = formatDatePickerDate(moment())\n dateRangeSelected.value = [today, today]\n pickerDate.value = today.slice(0, -3)\n break\n case DATEFILTER_CODES.YESTERDAY:\n // eslint-disable-next-line no-case-declarations\n const yesterday = formatDatePickerDate(moment().subtract(1, 'days'))\n dateRangeSelected.value = [yesterday, yesterday]\n pickerDate.value = yesterday.slice(0, -3)\n break\n case DATEFILTER_CODES.LASTWEEK:\n // Week should start from Monday and Ends on Sunday\n // eslint-disable-next-line no-case-declarations\n const weekStart = formatDatePickerDate(\n moment()\n .subtract(1, 'weeks')\n .startOf('isoWeek')\n )\n // eslint-disable-next-line no-case-declarations\n const weekEnd = formatDatePickerDate(\n moment()\n .subtract(1, 'weeks')\n .endOf('isoWeek')\n )\n dateRangeSelected.value = [weekStart, weekEnd]\n pickerDate.value = weekStart.slice(0, -3)\n break\n case DATEFILTER_CODES.LASTMONTH:\n // eslint-disable-next-line no-case-declarations\n const monthStart = formatDatePickerDate(\n moment()\n .subtract(1, 'months')\n .startOf('month')\n )\n // eslint-disable-next-line no-case-declarations\n const monthEnd = formatDatePickerDate(\n moment()\n .subtract(1, 'months')\n .endOf('month')\n )\n dateRangeSelected.value = [monthStart, monthEnd]\n pickerDate.value = monthStart.slice(0, -3)\n break\n case DATEFILTER_CODES.CUSTOMRANGE:\n pickerDate.value = ''\n }\n }\n }\n\n function dateClick (date) {\n pickerDate.value = ''\n // ideally it should find using DATEFILTER_CODES.CUSTOMRANGE, but since its static and date click is often, better give the index as it is\n dateFilterSelectedIndex.value = 4 // 4 = Custom Range\n dateFilterSelected.value = dateFilterRanges[dateFilterSelectedIndex.value]\n }\n\n function applyDateFilter () {\n // emit applied event so that we can hook to any @change event in parent. By default, v-model with parent variable is in sync all the time\n context.emit('applied', dateRangeSelected)\n // updating old value on appy click\n oldSelectedRange.value = dateRangeSelected.value\n showDateFilter.value = false\n }\n function cancelDateFilter () {\n // on cancel we need to rest to previous value, which we stored in oldSelectedRange\n dateRangeSelected.value = oldSelectedRange.value\n showDateFilter.value = false\n }\n\n return {\n dateFilterRanges,\n dateRangeSelected,\n dateFilterSelectedIndex,\n dateRangeSelectedDisplay,\n dateFilterSelected,\n showDateFilter,\n pickerDate,\n dateFilterChange,\n isApplyFilterBtnValid,\n dateClick,\n applyDateFilter,\n showDateRangeSelected,\n cancelDateFilter\n }\n}\n","/*\nComposable function for SearchColumn Filter component. It tracks the columns\nthat are present in a parent data-table and tracks display property to true/false\n*/\n\nimport { computed, toRefs } from '@vue/composition-api'\n\nexport function useSearchColumnFilterComponent (props, context) {\n const { value } = toRefs(props)\n\n // using same v-model value for getting value and update parent on change\n const selectedHeaderSearchList = computed({\n get: () => {\n return value.value\n },\n set: (modalValue: any[]) => {\n context.emit('input', modalValue)\n }\n })\n\n return {\n selectedHeaderSearchList\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 Apply\n \n \n Cancel\n \n
\n \n
\n
\n \n \n \n\n","\n\n\n\n","\n\n \n \n \n !header.hideInSearchColumnFilter)\"\n :key=\"i\"\n >\n \n
\n \n
\n\n","\n\n\n","\n\n","\n
\n","\n\n\n\n\n","import CommonUtils from '@/util/common-util'\nimport { useRoutingSlip } from '../useRoutingSlip'\n\nexport function useDashboard (_, context) {\n const { resetRoutingSlipDetails } = useRoutingSlip()\n const appendQueryParamsIfNeeded = CommonUtils.appendQueryParamsIfNeeded\n\n function addRoutingSlip (): void {\n // we need to clear out the routing slip store before rendering the create slip component\n resetRoutingSlipDetails()\n // navigate now\n // Check if we had come from Staff dashboard\n context.root.$router.push(appendQueryParamsIfNeeded('/create-routing-slip', context.root.$route))\n }\n\n return {\n addRoutingSlip\n }\n}\n","import { DirectiveBinding } from 'vue/types/options'\nimport { DirectiveOptions } from 'vue'\nimport KeyCloakService from 'sbc-common-components/src/services/keycloak.services'\nimport { VNode } from 'vue/types'\n\ninterface CustomHTMLElement extends HTMLElement {\n disabled: boolean\n readOnly: boolean\n}\n\nconst can: DirectiveOptions = {\n inserted (el, binding, node) {\n canAccess(binding, el, node)\n },\n componentUpdated (el, binding, node) {\n canAccess(binding, el, node)\n }\n}\n\nfunction canAccess (binding: DirectiveBinding, el: HTMLElement, node: VNode) {\n const behaviour = binding.modifiers.disable ? 'disable' : 'hide'\n // to handle special elements like v-card etc\n const isCard = !!binding.modifiers.card\n const requestedAction:any = [binding.arg]\n const customeEl = el as CustomHTMLElement\n const okayToAccess = KeyCloakService.verifyRoles(requestedAction, [])\n // if not okay , hide or disable\n if (!okayToAccess) {\n if (behaviour === 'hide') {\n commentNode(el, node)\n } else if (behaviour === 'disable' && isCard === false) {\n customeEl.disabled = true\n } else if (behaviour === 'disable' && isCard === true) {\n // TODO tab still works.. can tab to the text field and make it work\n customeEl.classList.add('v-card--disabled')\n customeEl.style.pointerEvents = 'none'\n }\n }\n}\n\n/**\n * Create comment node\n *\n * @private\n * @author https://stackoverflow.com/questions/43003976/a-custom-directive-similar-to-v-if-in-vuejs#43543814\n */\nfunction commentNode (el: HTMLElement, vnode: VNode) {\n const comment = document.createComment(' ')\n\n Object.defineProperty(comment, 'setAttribute', {\n value: () => undefined\n })\n\n vnode.text = ' '\n vnode.elm = comment\n vnode.isComment = true\n vnode.tag = undefined\n\n vnode.data = vnode.data || {}\n vnode.data.directives = undefined\n\n if (vnode.componentInstance) {\n // @ts-ignore\n vnode.componentInstance.$el = comment\n }\n\n if (el.parentNode) {\n el.parentNode.replaceChild(comment, el)\n }\n}\nexport default can\n","\n \n \n \n \n {{\n item.remainingAmount\n ? appendCurrencySymbol(item.remainingAmount.toFixed(2))\n : '-'\n }}\n \n \n \n \n Open\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 mdi-plus\n \n Add New Routing Slip\n \n \n \n \n Access Fee Accounting System\n \n mdi-open-in-new\n \n \n \n \n \n \n \n \n \n \n
\n \n mdi-view-list\n \n

\n {{ isLibraryMode ? 'Recent Routing Slip' : 'Search Routing Slip' }}\n

\n
\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n {{\n item.remainingAmount\n ? appendCurrencySymbol(item.remainingAmount.toFixed(2))\n : '-'\n }}\n \n \n \n \n Open\n \n \n \n \n \n\n \n \n \n \n \n \n
\n
\n
\n","/*!\n * vue-i18n v8.28.2 \n * (c) 2022 kazuya kawaguchi\n * Released under the MIT License.\n */\n/* */\n\n/**\n * constants\n */\n\nvar numberFormatKeys = [\n 'compactDisplay',\n 'currency',\n 'currencyDisplay',\n 'currencySign',\n 'localeMatcher',\n 'notation',\n 'numberingSystem',\n 'signDisplay',\n 'style',\n 'unit',\n 'unitDisplay',\n 'useGrouping',\n 'minimumIntegerDigits',\n 'minimumFractionDigits',\n 'maximumFractionDigits',\n 'minimumSignificantDigits',\n 'maximumSignificantDigits'\n];\n\nvar dateTimeFormatKeys = [\n 'dateStyle',\n 'timeStyle',\n 'calendar',\n 'localeMatcher',\n \"hour12\",\n \"hourCycle\",\n \"timeZone\",\n \"formatMatcher\",\n 'weekday',\n 'era',\n 'year',\n 'month',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'timeZoneName' ];\n\n/**\n * utilities\n */\n\nfunction warn (msg, err) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-i18n] ' + msg);\n /* istanbul ignore if */\n if (err) {\n console.warn(err.stack);\n }\n }\n}\n\nfunction error (msg, err) {\n if (typeof console !== 'undefined') {\n console.error('[vue-i18n] ' + msg);\n /* istanbul ignore if */\n if (err) {\n console.error(err.stack);\n }\n }\n}\n\nvar isArray = Array.isArray;\n\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\nfunction isBoolean (val) {\n return typeof val === 'boolean'\n}\n\nfunction isString (val) {\n return typeof val === 'string'\n}\n\nvar toString = Object.prototype.toString;\nvar OBJECT_STRING = '[object Object]';\nfunction isPlainObject (obj) {\n return toString.call(obj) === OBJECT_STRING\n}\n\nfunction isNull (val) {\n return val === null || val === undefined\n}\n\nfunction isFunction (val) {\n return typeof val === 'function'\n}\n\nfunction parseArgs () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var locale = null;\n var params = null;\n if (args.length === 1) {\n if (isObject(args[0]) || isArray(args[0])) {\n params = args[0];\n } else if (typeof args[0] === 'string') {\n locale = args[0];\n }\n } else if (args.length === 2) {\n if (typeof args[0] === 'string') {\n locale = args[0];\n }\n /* istanbul ignore if */\n if (isObject(args[1]) || isArray(args[1])) {\n params = args[1];\n }\n }\n\n return { locale: locale, params: params }\n}\n\nfunction looseClone (obj) {\n return JSON.parse(JSON.stringify(obj))\n}\n\nfunction remove (arr, item) {\n if (arr.delete(item)) {\n return arr\n }\n}\n\nfunction arrayFrom (arr) {\n var ret = [];\n arr.forEach(function (a) { return ret.push(a); });\n return ret\n}\n\nfunction includes (arr, item) {\n return !!~arr.indexOf(item)\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n return hasOwnProperty.call(obj, key)\n}\n\nfunction merge (target) {\n var arguments$1 = arguments;\n\n var output = Object(target);\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments$1[i];\n if (source !== undefined && source !== null) {\n var key = (void 0);\n for (key in source) {\n if (hasOwn(source, key)) {\n if (isObject(source[key])) {\n output[key] = merge(output[key], source[key]);\n } else {\n output[key] = source[key];\n }\n }\n }\n }\n }\n return output\n}\n\nfunction looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = isArray(a);\n var isArrayB = isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}\n\n/**\n * Sanitizes html special characters from input strings. For mitigating risk of XSS attacks.\n * @param rawText The raw input from the user that should be escaped.\n */\nfunction escapeHtml(rawText) {\n return rawText\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n}\n\n/**\n * Escapes html tags and special symbols from all provided params which were returned from parseArgs().params.\n * This method performs an in-place operation on the params object.\n *\n * @param {any} params Parameters as provided from `parseArgs().params`.\n * May be either an array of strings or a string->any map.\n *\n * @returns The manipulated `params` object.\n */\nfunction escapeParams(params) {\n if(params != null) {\n Object.keys(params).forEach(function (key) {\n if(typeof(params[key]) == 'string') {\n params[key] = escapeHtml(params[key]);\n }\n });\n }\n return params\n}\n\n/* */\n\nfunction extend (Vue) {\n if (!Vue.prototype.hasOwnProperty('$i18n')) {\n // $FlowFixMe\n Object.defineProperty(Vue.prototype, '$i18n', {\n get: function get () { return this._i18n }\n });\n }\n\n Vue.prototype.$t = function (key) {\n var values = [], len = arguments.length - 1;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];\n\n var i18n = this.$i18n;\n return i18n._t.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this ].concat( values ))\n };\n\n Vue.prototype.$tc = function (key, choice) {\n var values = [], len = arguments.length - 2;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];\n\n var i18n = this.$i18n;\n return i18n._tc.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this, choice ].concat( values ))\n };\n\n Vue.prototype.$te = function (key, locale) {\n var i18n = this.$i18n;\n return i18n._te(key, i18n.locale, i18n._getMessages(), locale)\n };\n\n Vue.prototype.$d = function (value) {\n var ref;\n\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n return (ref = this.$i18n).d.apply(ref, [ value ].concat( args ))\n };\n\n Vue.prototype.$n = function (value) {\n var ref;\n\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n return (ref = this.$i18n).n.apply(ref, [ value ].concat( args ))\n };\n}\n\n/* */\n\n/**\n * Mixin\n * \n * If `bridge` mode, empty mixin is returned,\n * else regulary mixin implementation is returned.\n */\nfunction defineMixin (bridge) {\n if ( bridge === void 0 ) bridge = false;\n\n function mounted () {\n if (this !== this.$root && this.$options.__INTLIFY_META__ && this.$el) {\n this.$el.setAttribute('data-intlify', this.$options.__INTLIFY_META__);\n }\n }\n\n return bridge\n ? { mounted: mounted } // delegate `vue-i18n-bridge` mixin implementation\n : { // regulary \n beforeCreate: function beforeCreate () {\n var options = this.$options;\n options.i18n = options.i18n || ((options.__i18nBridge || options.__i18n) ? {} : null);\n\n if (options.i18n) {\n if (options.i18n instanceof VueI18n) {\n // init locale messages via custom blocks\n if ((options.__i18nBridge || options.__i18n)) {\n try {\n var localeMessages = options.i18n && options.i18n.messages ? options.i18n.messages : {};\n var _i18n = options.__i18nBridge || options.__i18n;\n _i18n.forEach(function (resource) {\n localeMessages = merge(localeMessages, JSON.parse(resource));\n });\n Object.keys(localeMessages).forEach(function (locale) {\n options.i18n.mergeLocaleMessage(locale, localeMessages[locale]);\n });\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n error(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n this._i18n = options.i18n;\n this._i18nWatcher = this._i18n.watchI18nData();\n } else if (isPlainObject(options.i18n)) {\n var rootI18n = this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n\n ? this.$root.$i18n\n : null;\n // component local i18n\n if (rootI18n) {\n options.i18n.root = this.$root;\n options.i18n.formatter = rootI18n.formatter;\n options.i18n.fallbackLocale = rootI18n.fallbackLocale;\n options.i18n.formatFallbackMessages = rootI18n.formatFallbackMessages;\n options.i18n.silentTranslationWarn = rootI18n.silentTranslationWarn;\n options.i18n.silentFallbackWarn = rootI18n.silentFallbackWarn;\n options.i18n.pluralizationRules = rootI18n.pluralizationRules;\n options.i18n.preserveDirectiveContent = rootI18n.preserveDirectiveContent;\n }\n\n // init locale messages via custom blocks\n if ((options.__i18nBridge || options.__i18n)) {\n try {\n var localeMessages$1 = options.i18n && options.i18n.messages ? options.i18n.messages : {};\n var _i18n$1 = options.__i18nBridge || options.__i18n;\n _i18n$1.forEach(function (resource) {\n localeMessages$1 = merge(localeMessages$1, JSON.parse(resource));\n });\n options.i18n.messages = localeMessages$1;\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n\n var ref = options.i18n;\n var sharedMessages = ref.sharedMessages;\n if (sharedMessages && isPlainObject(sharedMessages)) {\n options.i18n.messages = merge(options.i18n.messages, sharedMessages);\n }\n\n this._i18n = new VueI18n(options.i18n);\n this._i18nWatcher = this._i18n.watchI18nData();\n\n if (options.i18n.sync === undefined || !!options.i18n.sync) {\n this._localeWatcher = this.$i18n.watchLocale();\n }\n\n if (rootI18n) {\n rootI18n.onComponentInstanceCreated(this._i18n);\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot be interpreted 'i18n' option.\");\n }\n }\n } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n // root i18n\n this._i18n = this.$root.$i18n;\n } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {\n // parent i18n\n this._i18n = options.parent.$i18n;\n }\n },\n\n beforeMount: function beforeMount () {\n var options = this.$options;\n options.i18n = options.i18n || ((options.__i18nBridge || options.__i18n) ? {} : null);\n\n if (options.i18n) {\n if (options.i18n instanceof VueI18n) {\n // init locale messages via custom blocks\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else if (isPlainObject(options.i18n)) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot be interpreted 'i18n' option.\");\n }\n }\n } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n }\n },\n\n mounted: mounted,\n\n beforeDestroy: function beforeDestroy () {\n if (!this._i18n) { return }\n\n var self = this;\n this.$nextTick(function () {\n if (self._subscribing) {\n self._i18n.unsubscribeDataChanging(self);\n delete self._subscribing;\n }\n\n if (self._i18nWatcher) {\n self._i18nWatcher();\n self._i18n.destroyVM();\n delete self._i18nWatcher;\n }\n\n if (self._localeWatcher) {\n self._localeWatcher();\n delete self._localeWatcher;\n }\n });\n }\n }\n}\n\n/* */\n\nvar interpolationComponent = {\n name: 'i18n',\n functional: true,\n props: {\n tag: {\n type: [String, Boolean, Object],\n default: 'span'\n },\n path: {\n type: String,\n required: true\n },\n locale: {\n type: String\n },\n places: {\n type: [Array, Object]\n }\n },\n render: function render (h, ref) {\n var data = ref.data;\n var parent = ref.parent;\n var props = ref.props;\n var slots = ref.slots;\n\n var $i18n = parent.$i18n;\n if (!$i18n) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot find VueI18n instance!');\n }\n return\n }\n\n var path = props.path;\n var locale = props.locale;\n var places = props.places;\n var params = slots();\n var children = $i18n.i(\n path,\n locale,\n onlyHasDefaultPlace(params) || places\n ? useLegacyPlaces(params.default, places)\n : params\n );\n\n var tag = (!!props.tag && props.tag !== true) || props.tag === false ? props.tag : 'span';\n return tag ? h(tag, data, children) : children\n }\n};\n\nfunction onlyHasDefaultPlace (params) {\n var prop;\n for (prop in params) {\n if (prop !== 'default') { return false }\n }\n return Boolean(prop)\n}\n\nfunction useLegacyPlaces (children, places) {\n var params = places ? createParamsFromPlaces(places) : {};\n\n if (!children) { return params }\n\n // Filter empty text nodes\n children = children.filter(function (child) {\n return child.tag || child.text.trim() !== ''\n });\n\n var everyPlace = children.every(vnodeHasPlaceAttribute);\n if (process.env.NODE_ENV !== 'production' && everyPlace) {\n warn('`place` attribute is deprecated in next major version. Please switch to Vue slots.');\n }\n\n return children.reduce(\n everyPlace ? assignChildPlace : assignChildIndex,\n params\n )\n}\n\nfunction createParamsFromPlaces (places) {\n if (process.env.NODE_ENV !== 'production') {\n warn('`places` prop is deprecated in next major version. Please switch to Vue slots.');\n }\n\n return Array.isArray(places)\n ? places.reduce(assignChildIndex, {})\n : Object.assign({}, places)\n}\n\nfunction assignChildPlace (params, child) {\n if (child.data && child.data.attrs && child.data.attrs.place) {\n params[child.data.attrs.place] = child;\n }\n return params\n}\n\nfunction assignChildIndex (params, child, index) {\n params[index] = child;\n return params\n}\n\nfunction vnodeHasPlaceAttribute (vnode) {\n return Boolean(vnode.data && vnode.data.attrs && vnode.data.attrs.place)\n}\n\n/* */\n\nvar numberComponent = {\n name: 'i18n-n',\n functional: true,\n props: {\n tag: {\n type: [String, Boolean, Object],\n default: 'span'\n },\n value: {\n type: Number,\n required: true\n },\n format: {\n type: [String, Object]\n },\n locale: {\n type: String\n }\n },\n render: function render (h, ref) {\n var props = ref.props;\n var parent = ref.parent;\n var data = ref.data;\n\n var i18n = parent.$i18n;\n\n if (!i18n) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot find VueI18n instance!');\n }\n return null\n }\n\n var key = null;\n var options = null;\n\n if (isString(props.format)) {\n key = props.format;\n } else if (isObject(props.format)) {\n if (props.format.key) {\n key = props.format.key;\n }\n\n // Filter out number format options only\n options = Object.keys(props.format).reduce(function (acc, prop) {\n var obj;\n\n if (includes(numberFormatKeys, prop)) {\n return Object.assign({}, acc, ( obj = {}, obj[prop] = props.format[prop], obj ))\n }\n return acc\n }, null);\n }\n\n var locale = props.locale || i18n.locale;\n var parts = i18n._ntp(props.value, locale, key, options);\n\n var values = parts.map(function (part, index) {\n var obj;\n\n var slot = data.scopedSlots && data.scopedSlots[part.type];\n return slot ? slot(( obj = {}, obj[part.type] = part.value, obj.index = index, obj.parts = parts, obj )) : part.value\n });\n\n var tag = (!!props.tag && props.tag !== true) || props.tag === false ? props.tag : 'span';\n return tag\n ? h(tag, {\n attrs: data.attrs,\n 'class': data['class'],\n staticClass: data.staticClass\n }, values)\n : values\n }\n};\n\n/* */\n\nfunction bind (el, binding, vnode) {\n if (!assert(el, vnode)) { return }\n\n t(el, binding, vnode);\n}\n\nfunction update (el, binding, vnode, oldVNode) {\n if (!assert(el, vnode)) { return }\n\n var i18n = vnode.context.$i18n;\n if (localeEqual(el, vnode) &&\n (looseEqual(binding.value, binding.oldValue) &&\n looseEqual(el._localeMessage, i18n.getLocaleMessage(i18n.locale)))) { return }\n\n t(el, binding, vnode);\n}\n\nfunction unbind (el, binding, vnode, oldVNode) {\n var vm = vnode.context;\n if (!vm) {\n warn('Vue instance does not exists in VNode context');\n return\n }\n\n var i18n = vnode.context.$i18n || {};\n if (!binding.modifiers.preserve && !i18n.preserveDirectiveContent) {\n el.textContent = '';\n }\n el._vt = undefined;\n delete el['_vt'];\n el._locale = undefined;\n delete el['_locale'];\n el._localeMessage = undefined;\n delete el['_localeMessage'];\n}\n\nfunction assert (el, vnode) {\n var vm = vnode.context;\n if (!vm) {\n warn('Vue instance does not exists in VNode context');\n return false\n }\n\n if (!vm.$i18n) {\n warn('VueI18n instance does not exists in Vue instance');\n return false\n }\n\n return true\n}\n\nfunction localeEqual (el, vnode) {\n var vm = vnode.context;\n return el._locale === vm.$i18n.locale\n}\n\nfunction t (el, binding, vnode) {\n var ref$1, ref$2;\n\n var value = binding.value;\n\n var ref = parseValue(value);\n var path = ref.path;\n var locale = ref.locale;\n var args = ref.args;\n var choice = ref.choice;\n if (!path && !locale && !args) {\n warn('value type not supported');\n return\n }\n\n if (!path) {\n warn('`path` is required in v-t directive');\n return\n }\n\n var vm = vnode.context;\n if (choice != null) {\n el._vt = el.textContent = (ref$1 = vm.$i18n).tc.apply(ref$1, [ path, choice ].concat( makeParams(locale, args) ));\n } else {\n el._vt = el.textContent = (ref$2 = vm.$i18n).t.apply(ref$2, [ path ].concat( makeParams(locale, args) ));\n }\n el._locale = vm.$i18n.locale;\n el._localeMessage = vm.$i18n.getLocaleMessage(vm.$i18n.locale);\n}\n\nfunction parseValue (value) {\n var path;\n var locale;\n var args;\n var choice;\n\n if (isString(value)) {\n path = value;\n } else if (isPlainObject(value)) {\n path = value.path;\n locale = value.locale;\n args = value.args;\n choice = value.choice;\n }\n\n return { path: path, locale: locale, args: args, choice: choice }\n}\n\nfunction makeParams (locale, args) {\n var params = [];\n\n locale && params.push(locale);\n if (args && (Array.isArray(args) || isPlainObject(args))) {\n params.push(args);\n }\n\n return params\n}\n\nvar Vue;\n\nfunction install (_Vue, options) {\n if ( options === void 0 ) options = { bridge: false };\n\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && install.installed && _Vue === Vue) {\n warn('already installed.');\n return\n }\n install.installed = true;\n\n Vue = _Vue;\n\n var version = (Vue.version && Number(Vue.version.split('.')[0])) || -1;\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && version < 2) {\n warn((\"vue-i18n (\" + (install.version) + \") need to use Vue 2.0 or later (Vue: \" + (Vue.version) + \").\"));\n return\n }\n\n extend(Vue);\n Vue.mixin(defineMixin(options.bridge));\n Vue.directive('t', { bind: bind, update: update, unbind: unbind });\n Vue.component(interpolationComponent.name, interpolationComponent);\n Vue.component(numberComponent.name, numberComponent);\n\n // use simple mergeStrategies to prevent i18n instance lose '__proto__'\n var strats = Vue.config.optionMergeStrategies;\n strats.i18n = function (parentVal, childVal) {\n return childVal === undefined\n ? parentVal\n : childVal\n };\n}\n\n/* */\n\nvar BaseFormatter = function BaseFormatter () {\n this._caches = Object.create(null);\n};\n\nBaseFormatter.prototype.interpolate = function interpolate (message, values) {\n if (!values) {\n return [message]\n }\n var tokens = this._caches[message];\n if (!tokens) {\n tokens = parse(message);\n this._caches[message] = tokens;\n }\n return compile(tokens, values)\n};\n\n\n\nvar RE_TOKEN_LIST_VALUE = /^(?:\\d)+/;\nvar RE_TOKEN_NAMED_VALUE = /^(?:\\w)+/;\n\nfunction parse (format) {\n var tokens = [];\n var position = 0;\n\n var text = '';\n while (position < format.length) {\n var char = format[position++];\n if (char === '{') {\n if (text) {\n tokens.push({ type: 'text', value: text });\n }\n\n text = '';\n var sub = '';\n char = format[position++];\n while (char !== undefined && char !== '}') {\n sub += char;\n char = format[position++];\n }\n var isClosed = char === '}';\n\n var type = RE_TOKEN_LIST_VALUE.test(sub)\n ? 'list'\n : isClosed && RE_TOKEN_NAMED_VALUE.test(sub)\n ? 'named'\n : 'unknown';\n tokens.push({ value: sub, type: type });\n } else if (char === '%') {\n // when found rails i18n syntax, skip text capture\n if (format[(position)] !== '{') {\n text += char;\n }\n } else {\n text += char;\n }\n }\n\n text && tokens.push({ type: 'text', value: text });\n\n return tokens\n}\n\nfunction compile (tokens, values) {\n var compiled = [];\n var index = 0;\n\n var mode = Array.isArray(values)\n ? 'list'\n : isObject(values)\n ? 'named'\n : 'unknown';\n if (mode === 'unknown') { return compiled }\n\n while (index < tokens.length) {\n var token = tokens[index];\n switch (token.type) {\n case 'text':\n compiled.push(token.value);\n break\n case 'list':\n compiled.push(values[parseInt(token.value, 10)]);\n break\n case 'named':\n if (mode === 'named') {\n compiled.push((values)[token.value]);\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Type of token '\" + (token.type) + \"' and format of value '\" + mode + \"' don't match!\"));\n }\n }\n break\n case 'unknown':\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Detect 'unknown' type of token!\");\n }\n break\n }\n index++;\n }\n\n return compiled\n}\n\n/* */\n\n/**\n * Path parser\n * - Inspired:\n * Vue.js Path parser\n */\n\n// actions\nvar APPEND = 0;\nvar PUSH = 1;\nvar INC_SUB_PATH_DEPTH = 2;\nvar PUSH_SUB_PATH = 3;\n\n// states\nvar BEFORE_PATH = 0;\nvar IN_PATH = 1;\nvar BEFORE_IDENT = 2;\nvar IN_IDENT = 3;\nvar IN_SUB_PATH = 4;\nvar IN_SINGLE_QUOTE = 5;\nvar IN_DOUBLE_QUOTE = 6;\nvar AFTER_PATH = 7;\nvar ERROR = 8;\n\nvar pathStateMachine = [];\n\npathStateMachine[BEFORE_PATH] = {\n 'ws': [BEFORE_PATH],\n 'ident': [IN_IDENT, APPEND],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\n\npathStateMachine[IN_PATH] = {\n 'ws': [IN_PATH],\n '.': [BEFORE_IDENT],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\n\npathStateMachine[BEFORE_IDENT] = {\n 'ws': [BEFORE_IDENT],\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND]\n};\n\npathStateMachine[IN_IDENT] = {\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND],\n 'ws': [IN_PATH, PUSH],\n '.': [BEFORE_IDENT, PUSH],\n '[': [IN_SUB_PATH, PUSH],\n 'eof': [AFTER_PATH, PUSH]\n};\n\npathStateMachine[IN_SUB_PATH] = {\n \"'\": [IN_SINGLE_QUOTE, APPEND],\n '\"': [IN_DOUBLE_QUOTE, APPEND],\n '[': [IN_SUB_PATH, INC_SUB_PATH_DEPTH],\n ']': [IN_PATH, PUSH_SUB_PATH],\n 'eof': ERROR,\n 'else': [IN_SUB_PATH, APPEND]\n};\n\npathStateMachine[IN_SINGLE_QUOTE] = {\n \"'\": [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_SINGLE_QUOTE, APPEND]\n};\n\npathStateMachine[IN_DOUBLE_QUOTE] = {\n '\"': [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_DOUBLE_QUOTE, APPEND]\n};\n\n/**\n * Check if an expression is a literal value.\n */\n\nvar literalValueRE = /^\\s?(?:true|false|-?[\\d.]+|'[^']*'|\"[^\"]*\")\\s?$/;\nfunction isLiteral (exp) {\n return literalValueRE.test(exp)\n}\n\n/**\n * Strip quotes from a string\n */\n\nfunction stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}\n\n/**\n * Determine the type of a character in a keypath.\n */\n\nfunction getPathCharType (ch) {\n if (ch === undefined || ch === null) { return 'eof' }\n\n var code = ch.charCodeAt(0);\n\n switch (code) {\n case 0x5B: // [\n case 0x5D: // ]\n case 0x2E: // .\n case 0x22: // \"\n case 0x27: // '\n return ch\n\n case 0x5F: // _\n case 0x24: // $\n case 0x2D: // -\n return 'ident'\n\n case 0x09: // Tab\n case 0x0A: // Newline\n case 0x0D: // Return\n case 0xA0: // No-break space\n case 0xFEFF: // Byte Order Mark\n case 0x2028: // Line Separator\n case 0x2029: // Paragraph Separator\n return 'ws'\n }\n\n return 'ident'\n}\n\n/**\n * Format a subPath, return its plain form if it is\n * a literal string or number. Otherwise prepend the\n * dynamic indicator (*).\n */\n\nfunction formatSubPath (path) {\n var trimmed = path.trim();\n // invalid leading 0\n if (path.charAt(0) === '0' && isNaN(path)) { return false }\n\n return isLiteral(trimmed) ? stripQuotes(trimmed) : '*' + trimmed\n}\n\n/**\n * Parse a string path into an array of segments\n */\n\nfunction parse$1 (path) {\n var keys = [];\n var index = -1;\n var mode = BEFORE_PATH;\n var subPathDepth = 0;\n var c;\n var key;\n var newChar;\n var type;\n var transition;\n var action;\n var typeMap;\n var actions = [];\n\n actions[PUSH] = function () {\n if (key !== undefined) {\n keys.push(key);\n key = undefined;\n }\n };\n\n actions[APPEND] = function () {\n if (key === undefined) {\n key = newChar;\n } else {\n key += newChar;\n }\n };\n\n actions[INC_SUB_PATH_DEPTH] = function () {\n actions[APPEND]();\n subPathDepth++;\n };\n\n actions[PUSH_SUB_PATH] = function () {\n if (subPathDepth > 0) {\n subPathDepth--;\n mode = IN_SUB_PATH;\n actions[APPEND]();\n } else {\n subPathDepth = 0;\n if (key === undefined) { return false }\n key = formatSubPath(key);\n if (key === false) {\n return false\n } else {\n actions[PUSH]();\n }\n }\n };\n\n function maybeUnescapeQuote () {\n var nextChar = path[index + 1];\n if ((mode === IN_SINGLE_QUOTE && nextChar === \"'\") ||\n (mode === IN_DOUBLE_QUOTE && nextChar === '\"')) {\n index++;\n newChar = '\\\\' + nextChar;\n actions[APPEND]();\n return true\n }\n }\n\n while (mode !== null) {\n index++;\n c = path[index];\n\n if (c === '\\\\' && maybeUnescapeQuote()) {\n continue\n }\n\n type = getPathCharType(c);\n typeMap = pathStateMachine[mode];\n transition = typeMap[type] || typeMap['else'] || ERROR;\n\n if (transition === ERROR) {\n return // parse error\n }\n\n mode = transition[0];\n action = actions[transition[1]];\n if (action) {\n newChar = transition[2];\n newChar = newChar === undefined\n ? c\n : newChar;\n if (action() === false) {\n return\n }\n }\n\n if (mode === AFTER_PATH) {\n return keys\n }\n }\n}\n\n\n\n\n\nvar I18nPath = function I18nPath () {\n this._cache = Object.create(null);\n};\n\n/**\n * External parse that check for a cache hit first\n */\nI18nPath.prototype.parsePath = function parsePath (path) {\n var hit = this._cache[path];\n if (!hit) {\n hit = parse$1(path);\n if (hit) {\n this._cache[path] = hit;\n }\n }\n return hit || []\n};\n\n/**\n * Get path value from path string\n */\nI18nPath.prototype.getPathValue = function getPathValue (obj, path) {\n if (!isObject(obj)) { return null }\n\n var paths = this.parsePath(path);\n if (paths.length === 0) {\n return null\n } else {\n var length = paths.length;\n var last = obj;\n var i = 0;\n while (i < length) {\n var value = last[paths[i]];\n if (value === undefined || value === null) {\n return null\n }\n last = value;\n i++;\n }\n\n return last\n }\n};\n\n/* */\n\n\n\nvar htmlTagMatcher = /<\\/?[\\w\\s=\"/.':;#-\\/]+>/;\nvar linkKeyMatcher = /(?:@(?:\\.[a-zA-Z]+)?:(?:[\\w\\-_|./]+|\\([\\w\\-_:|./]+\\)))/g;\nvar linkKeyPrefixMatcher = /^@(?:\\.([a-zA-Z]+))?:/;\nvar bracketsMatcher = /[()]/g;\nvar defaultModifiers = {\n 'upper': function (str) { return str.toLocaleUpperCase(); },\n 'lower': function (str) { return str.toLocaleLowerCase(); },\n 'capitalize': function (str) { return (\"\" + (str.charAt(0).toLocaleUpperCase()) + (str.substr(1))); }\n};\n\nvar defaultFormatter = new BaseFormatter();\n\nvar VueI18n = function VueI18n (options) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n // Auto install if it is not done yet and `window` has `Vue`.\n // To allow users to avoid auto-installation in some cases,\n // this code should be placed here. See #290\n /* istanbul ignore if */\n if (!Vue && typeof window !== 'undefined' && window.Vue) {\n install(window.Vue);\n }\n\n var locale = options.locale || 'en-US';\n var fallbackLocale = options.fallbackLocale === false\n ? false\n : options.fallbackLocale || 'en-US';\n var messages = options.messages || {};\n var dateTimeFormats = options.dateTimeFormats || options.datetimeFormats || {};\n var numberFormats = options.numberFormats || {};\n\n this._vm = null;\n this._formatter = options.formatter || defaultFormatter;\n this._modifiers = options.modifiers || {};\n this._missing = options.missing || null;\n this._root = options.root || null;\n this._sync = options.sync === undefined ? true : !!options.sync;\n this._fallbackRoot = options.fallbackRoot === undefined\n ? true\n : !!options.fallbackRoot;\n this._fallbackRootWithEmptyString = options.fallbackRootWithEmptyString === undefined\n ? true\n : !!options.fallbackRootWithEmptyString;\n this._formatFallbackMessages = options.formatFallbackMessages === undefined\n ? false\n : !!options.formatFallbackMessages;\n this._silentTranslationWarn = options.silentTranslationWarn === undefined\n ? false\n : options.silentTranslationWarn;\n this._silentFallbackWarn = options.silentFallbackWarn === undefined\n ? false\n : !!options.silentFallbackWarn;\n this._dateTimeFormatters = {};\n this._numberFormatters = {};\n this._path = new I18nPath();\n this._dataListeners = new Set();\n this._componentInstanceCreatedListener = options.componentInstanceCreatedListener || null;\n this._preserveDirectiveContent = options.preserveDirectiveContent === undefined\n ? false\n : !!options.preserveDirectiveContent;\n this.pluralizationRules = options.pluralizationRules || {};\n this._warnHtmlInMessage = options.warnHtmlInMessage || 'off';\n this._postTranslation = options.postTranslation || null;\n this._escapeParameterHtml = options.escapeParameterHtml || false;\n\n if ('__VUE_I18N_BRIDGE__' in options) {\n this.__VUE_I18N_BRIDGE__ = options.__VUE_I18N_BRIDGE__;\n }\n\n /**\n * @param choice {number} a choice index given by the input to $tc: `$tc('path.to.rule', choiceIndex)`\n * @param choicesLength {number} an overall amount of available choices\n * @returns a final choice index\n */\n this.getChoiceIndex = function (choice, choicesLength) {\n var thisPrototype = Object.getPrototypeOf(this$1);\n if (thisPrototype && thisPrototype.getChoiceIndex) {\n var prototypeGetChoiceIndex = (thisPrototype.getChoiceIndex);\n return (prototypeGetChoiceIndex).call(this$1, choice, choicesLength)\n }\n\n // Default (old) getChoiceIndex implementation - english-compatible\n var defaultImpl = function (_choice, _choicesLength) {\n _choice = Math.abs(_choice);\n\n if (_choicesLength === 2) {\n return _choice\n ? _choice > 1\n ? 1\n : 0\n : 1\n }\n\n return _choice ? Math.min(_choice, 2) : 0\n };\n\n if (this$1.locale in this$1.pluralizationRules) {\n return this$1.pluralizationRules[this$1.locale].apply(this$1, [choice, choicesLength])\n } else {\n return defaultImpl(choice, choicesLength)\n }\n };\n\n\n this._exist = function (message, key) {\n if (!message || !key) { return false }\n if (!isNull(this$1._path.getPathValue(message, key))) { return true }\n // fallback for flat key\n if (message[key]) { return true }\n return false\n };\n\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n Object.keys(messages).forEach(function (locale) {\n this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);\n });\n }\n\n this._initVM({\n locale: locale,\n fallbackLocale: fallbackLocale,\n messages: messages,\n dateTimeFormats: dateTimeFormats,\n numberFormats: numberFormats\n });\n};\n\nvar prototypeAccessors = { vm: { configurable: true },messages: { configurable: true },dateTimeFormats: { configurable: true },numberFormats: { configurable: true },availableLocales: { configurable: true },locale: { configurable: true },fallbackLocale: { configurable: true },formatFallbackMessages: { configurable: true },missing: { configurable: true },formatter: { configurable: true },silentTranslationWarn: { configurable: true },silentFallbackWarn: { configurable: true },preserveDirectiveContent: { configurable: true },warnHtmlInMessage: { configurable: true },postTranslation: { configurable: true },sync: { configurable: true } };\n\nVueI18n.prototype._checkLocaleMessage = function _checkLocaleMessage (locale, level, message) {\n var paths = [];\n\n var fn = function (level, locale, message, paths) {\n if (isPlainObject(message)) {\n Object.keys(message).forEach(function (key) {\n var val = message[key];\n if (isPlainObject(val)) {\n paths.push(key);\n paths.push('.');\n fn(level, locale, val, paths);\n paths.pop();\n paths.pop();\n } else {\n paths.push(key);\n fn(level, locale, val, paths);\n paths.pop();\n }\n });\n } else if (isArray(message)) {\n message.forEach(function (item, index) {\n if (isPlainObject(item)) {\n paths.push((\"[\" + index + \"]\"));\n paths.push('.');\n fn(level, locale, item, paths);\n paths.pop();\n paths.pop();\n } else {\n paths.push((\"[\" + index + \"]\"));\n fn(level, locale, item, paths);\n paths.pop();\n }\n });\n } else if (isString(message)) {\n var ret = htmlTagMatcher.test(message);\n if (ret) {\n var msg = \"Detected HTML in message '\" + message + \"' of keypath '\" + (paths.join('')) + \"' at '\" + locale + \"'. Consider component interpolation with '' to avoid XSS. See https://bit.ly/2ZqJzkp\";\n if (level === 'warn') {\n warn(msg);\n } else if (level === 'error') {\n error(msg);\n }\n }\n }\n };\n\n fn(level, locale, message, paths);\n};\n\nVueI18n.prototype._initVM = function _initVM (data) {\n var silent = Vue.config.silent;\n Vue.config.silent = true;\n this._vm = new Vue({ data: data, __VUE18N__INSTANCE__: true });\n Vue.config.silent = silent;\n};\n\nVueI18n.prototype.destroyVM = function destroyVM () {\n this._vm.$destroy();\n};\n\nVueI18n.prototype.subscribeDataChanging = function subscribeDataChanging (vm) {\n this._dataListeners.add(vm);\n};\n\nVueI18n.prototype.unsubscribeDataChanging = function unsubscribeDataChanging (vm) {\n remove(this._dataListeners, vm);\n};\n\nVueI18n.prototype.watchI18nData = function watchI18nData () {\n var this$1 = this;\n return this._vm.$watch('$data', function () {\n var listeners = arrayFrom(this$1._dataListeners);\n var i = listeners.length;\n while(i--) {\n Vue.nextTick(function () {\n listeners[i] && listeners[i].$forceUpdate();\n });\n }\n }, { deep: true })\n};\n\nVueI18n.prototype.watchLocale = function watchLocale (composer) {\n if (!composer) {\n /* istanbul ignore if */\n if (!this._sync || !this._root) { return null }\n var target = this._vm;\n return this._root.$i18n.vm.$watch('locale', function (val) {\n target.$set(target, 'locale', val);\n target.$forceUpdate();\n }, { immediate: true })\n } else {\n // deal with vue-i18n-bridge\n if (!this.__VUE_I18N_BRIDGE__) { return null }\n var self = this;\n var target$1 = this._vm;\n return this.vm.$watch('locale', function (val) {\n target$1.$set(target$1, 'locale', val);\n if (self.__VUE_I18N_BRIDGE__ && composer) {\n composer.locale.value = val;\n }\n target$1.$forceUpdate();\n }, { immediate: true })\n }\n};\n\nVueI18n.prototype.onComponentInstanceCreated = function onComponentInstanceCreated (newI18n) {\n if (this._componentInstanceCreatedListener) {\n this._componentInstanceCreatedListener(newI18n, this);\n }\n};\n\nprototypeAccessors.vm.get = function () { return this._vm };\n\nprototypeAccessors.messages.get = function () { return looseClone(this._getMessages()) };\nprototypeAccessors.dateTimeFormats.get = function () { return looseClone(this._getDateTimeFormats()) };\nprototypeAccessors.numberFormats.get = function () { return looseClone(this._getNumberFormats()) };\nprototypeAccessors.availableLocales.get = function () { return Object.keys(this.messages).sort() };\n\nprototypeAccessors.locale.get = function () { return this._vm.locale };\nprototypeAccessors.locale.set = function (locale) {\n this._vm.$set(this._vm, 'locale', locale);\n};\n\nprototypeAccessors.fallbackLocale.get = function () { return this._vm.fallbackLocale };\nprototypeAccessors.fallbackLocale.set = function (locale) {\n this._localeChainCache = {};\n this._vm.$set(this._vm, 'fallbackLocale', locale);\n};\n\nprototypeAccessors.formatFallbackMessages.get = function () { return this._formatFallbackMessages };\nprototypeAccessors.formatFallbackMessages.set = function (fallback) { this._formatFallbackMessages = fallback; };\n\nprototypeAccessors.missing.get = function () { return this._missing };\nprototypeAccessors.missing.set = function (handler) { this._missing = handler; };\n\nprototypeAccessors.formatter.get = function () { return this._formatter };\nprototypeAccessors.formatter.set = function (formatter) { this._formatter = formatter; };\n\nprototypeAccessors.silentTranslationWarn.get = function () { return this._silentTranslationWarn };\nprototypeAccessors.silentTranslationWarn.set = function (silent) { this._silentTranslationWarn = silent; };\n\nprototypeAccessors.silentFallbackWarn.get = function () { return this._silentFallbackWarn };\nprototypeAccessors.silentFallbackWarn.set = function (silent) { this._silentFallbackWarn = silent; };\n\nprototypeAccessors.preserveDirectiveContent.get = function () { return this._preserveDirectiveContent };\nprototypeAccessors.preserveDirectiveContent.set = function (preserve) { this._preserveDirectiveContent = preserve; };\n\nprototypeAccessors.warnHtmlInMessage.get = function () { return this._warnHtmlInMessage };\nprototypeAccessors.warnHtmlInMessage.set = function (level) {\n var this$1 = this;\n\n var orgLevel = this._warnHtmlInMessage;\n this._warnHtmlInMessage = level;\n if (orgLevel !== level && (level === 'warn' || level === 'error')) {\n var messages = this._getMessages();\n Object.keys(messages).forEach(function (locale) {\n this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);\n });\n }\n};\n\nprototypeAccessors.postTranslation.get = function () { return this._postTranslation };\nprototypeAccessors.postTranslation.set = function (handler) { this._postTranslation = handler; };\n\nprototypeAccessors.sync.get = function () { return this._sync };\nprototypeAccessors.sync.set = function (val) { this._sync = val; };\n\nVueI18n.prototype._getMessages = function _getMessages () { return this._vm.messages };\nVueI18n.prototype._getDateTimeFormats = function _getDateTimeFormats () { return this._vm.dateTimeFormats };\nVueI18n.prototype._getNumberFormats = function _getNumberFormats () { return this._vm.numberFormats };\n\nVueI18n.prototype._warnDefault = function _warnDefault (locale, key, result, vm, values, interpolateMode) {\n if (!isNull(result)) { return result }\n if (this._missing) {\n var missingRet = this._missing.apply(null, [locale, key, vm, values]);\n if (isString(missingRet)) {\n return missingRet\n }\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn(\n \"Cannot translate the value of keypath '\" + key + \"'. \" +\n 'Use the value of keypath as default.'\n );\n }\n }\n\n if (this._formatFallbackMessages) {\n var parsedArgs = parseArgs.apply(void 0, values);\n return this._render(key, interpolateMode, parsedArgs.params, key)\n } else {\n return key\n }\n};\n\nVueI18n.prototype._isFallbackRoot = function _isFallbackRoot (val) {\n return (this._fallbackRootWithEmptyString? !val : isNull(val)) && !isNull(this._root) && this._fallbackRoot\n};\n\nVueI18n.prototype._isSilentFallbackWarn = function _isSilentFallbackWarn (key) {\n return this._silentFallbackWarn instanceof RegExp\n ? this._silentFallbackWarn.test(key)\n : this._silentFallbackWarn\n};\n\nVueI18n.prototype._isSilentFallback = function _isSilentFallback (locale, key) {\n return this._isSilentFallbackWarn(key) && (this._isFallbackRoot() || locale !== this.fallbackLocale)\n};\n\nVueI18n.prototype._isSilentTranslationWarn = function _isSilentTranslationWarn (key) {\n return this._silentTranslationWarn instanceof RegExp\n ? this._silentTranslationWarn.test(key)\n : this._silentTranslationWarn\n};\n\nVueI18n.prototype._interpolate = function _interpolate (\n locale,\n message,\n key,\n host,\n interpolateMode,\n values,\n visitedLinkStack\n) {\n if (!message) { return null }\n\n var pathRet = this._path.getPathValue(message, key);\n if (isArray(pathRet) || isPlainObject(pathRet)) { return pathRet }\n\n var ret;\n if (isNull(pathRet)) {\n /* istanbul ignore else */\n if (isPlainObject(message)) {\n ret = message[key];\n if (!(isString(ret) || isFunction(ret))) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {\n warn((\"Value of key '\" + key + \"' is not a string or function !\"));\n }\n return null\n }\n } else {\n return null\n }\n } else {\n /* istanbul ignore else */\n if (isString(pathRet) || isFunction(pathRet)) {\n ret = pathRet;\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {\n warn((\"Value of key '\" + key + \"' is not a string or function!\"));\n }\n return null\n }\n }\n\n // Check for the existence of links within the translated string\n if (isString(ret) && (ret.indexOf('@:') >= 0 || ret.indexOf('@.') >= 0)) {\n ret = this._link(locale, message, ret, host, 'raw', values, visitedLinkStack);\n }\n\n return this._render(ret, interpolateMode, values, key)\n};\n\nVueI18n.prototype._link = function _link (\n locale,\n message,\n str,\n host,\n interpolateMode,\n values,\n visitedLinkStack\n) {\n var ret = str;\n\n // Match all the links within the local\n // We are going to replace each of\n // them with its translation\n var matches = ret.match(linkKeyMatcher);\n\n // eslint-disable-next-line no-autofix/prefer-const\n for (var idx in matches) {\n // ie compatible: filter custom array\n // prototype method\n if (!matches.hasOwnProperty(idx)) {\n continue\n }\n var link = matches[idx];\n var linkKeyPrefixMatches = link.match(linkKeyPrefixMatcher);\n var linkPrefix = linkKeyPrefixMatches[0];\n var formatterName = linkKeyPrefixMatches[1];\n\n // Remove the leading @:, @.case: and the brackets\n var linkPlaceholder = link.replace(linkPrefix, '').replace(bracketsMatcher, '');\n\n if (includes(visitedLinkStack, linkPlaceholder)) {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Circular reference found. \\\"\" + link + \"\\\" is already visited in the chain of \" + (visitedLinkStack.reverse().join(' <- '))));\n }\n return ret\n }\n visitedLinkStack.push(linkPlaceholder);\n\n // Translate the link\n var translated = this._interpolate(\n locale, message, linkPlaceholder, host,\n interpolateMode === 'raw' ? 'string' : interpolateMode,\n interpolateMode === 'raw' ? undefined : values,\n visitedLinkStack\n );\n\n if (this._isFallbackRoot(translated)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(linkPlaceholder)) {\n warn((\"Fall back to translate the link placeholder '\" + linkPlaceholder + \"' with root locale.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n var root = this._root.$i18n;\n translated = root._translate(\n root._getMessages(), root.locale, root.fallbackLocale,\n linkPlaceholder, host, interpolateMode, values\n );\n }\n translated = this._warnDefault(\n locale, linkPlaceholder, translated, host,\n isArray(values) ? values : [values],\n interpolateMode\n );\n\n if (this._modifiers.hasOwnProperty(formatterName)) {\n translated = this._modifiers[formatterName](translated);\n } else if (defaultModifiers.hasOwnProperty(formatterName)) {\n translated = defaultModifiers[formatterName](translated);\n }\n\n visitedLinkStack.pop();\n\n // Replace the link with the translated\n ret = !translated ? ret : ret.replace(link, translated);\n }\n\n return ret\n};\n\nVueI18n.prototype._createMessageContext = function _createMessageContext (values, formatter, path, interpolateMode) {\n var this$1 = this;\n\n var _list = isArray(values) ? values : [];\n var _named = isObject(values) ? values : {};\n var list = function (index) { return _list[index]; };\n var named = function (key) { return _named[key]; };\n var messages = this._getMessages();\n var locale = this.locale;\n\n return {\n list: list,\n named: named,\n values: values,\n formatter: formatter,\n path: path,\n messages: messages,\n locale: locale,\n linked: function (linkedKey) { return this$1._interpolate(locale, messages[locale] || {}, linkedKey, null, interpolateMode, undefined, [linkedKey]); }\n }\n};\n\nVueI18n.prototype._render = function _render (message, interpolateMode, values, path) {\n if (isFunction(message)) {\n return message(\n this._createMessageContext(values, this._formatter || defaultFormatter, path, interpolateMode)\n )\n }\n\n var ret = this._formatter.interpolate(message, values, path);\n\n // If the custom formatter refuses to work - apply the default one\n if (!ret) {\n ret = defaultFormatter.interpolate(message, values, path);\n }\n\n // if interpolateMode is **not** 'string' ('row'),\n // return the compiled data (e.g. ['foo', VNode, 'bar']) with formatter\n return interpolateMode === 'string' && !isString(ret) ? ret.join('') : ret\n};\n\nVueI18n.prototype._appendItemToChain = function _appendItemToChain (chain, item, blocks) {\n var follow = false;\n if (!includes(chain, item)) {\n follow = true;\n if (item) {\n follow = item[item.length - 1] !== '!';\n item = item.replace(/!/g, '');\n chain.push(item);\n if (blocks && blocks[item]) {\n follow = blocks[item];\n }\n }\n }\n return follow\n};\n\nVueI18n.prototype._appendLocaleToChain = function _appendLocaleToChain (chain, locale, blocks) {\n var follow;\n var tokens = locale.split('-');\n do {\n var item = tokens.join('-');\n follow = this._appendItemToChain(chain, item, blocks);\n tokens.splice(-1, 1);\n } while (tokens.length && (follow === true))\n return follow\n};\n\nVueI18n.prototype._appendBlockToChain = function _appendBlockToChain (chain, block, blocks) {\n var follow = true;\n for (var i = 0; (i < block.length) && (isBoolean(follow)); i++) {\n var locale = block[i];\n if (isString(locale)) {\n follow = this._appendLocaleToChain(chain, locale, blocks);\n }\n }\n return follow\n};\n\nVueI18n.prototype._getLocaleChain = function _getLocaleChain (start, fallbackLocale) {\n if (start === '') { return [] }\n\n if (!this._localeChainCache) {\n this._localeChainCache = {};\n }\n\n var chain = this._localeChainCache[start];\n if (!chain) {\n if (!fallbackLocale) {\n fallbackLocale = this.fallbackLocale;\n }\n chain = [];\n\n // first block defined by start\n var block = [start];\n\n // while any intervening block found\n while (isArray(block)) {\n block = this._appendBlockToChain(\n chain,\n block,\n fallbackLocale\n );\n }\n\n // last block defined by default\n var defaults;\n if (isArray(fallbackLocale)) {\n defaults = fallbackLocale;\n } else if (isObject(fallbackLocale)) {\n /* $FlowFixMe */\n if (fallbackLocale['default']) {\n defaults = fallbackLocale['default'];\n } else {\n defaults = null;\n }\n } else {\n defaults = fallbackLocale;\n }\n\n // convert defaults to array\n if (isString(defaults)) {\n block = [defaults];\n } else {\n block = defaults;\n }\n if (block) {\n this._appendBlockToChain(\n chain,\n block,\n null\n );\n }\n this._localeChainCache[start] = chain;\n }\n return chain\n};\n\nVueI18n.prototype._translate = function _translate (\n messages,\n locale,\n fallback,\n key,\n host,\n interpolateMode,\n args\n) {\n var chain = this._getLocaleChain(locale, fallback);\n var res;\n for (var i = 0; i < chain.length; i++) {\n var step = chain[i];\n res =\n this._interpolate(step, messages[step], key, host, interpolateMode, args, [key]);\n if (!isNull(res)) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to translate the keypath '\" + key + \"' with '\" + step + \"' locale.\"));\n }\n return res\n }\n }\n return null\n};\n\nVueI18n.prototype._t = function _t (key, _locale, messages, host) {\n var ref;\n\n var values = [], len = arguments.length - 4;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 4 ];\n if (!key) { return '' }\n\n var parsedArgs = parseArgs.apply(void 0, values);\n if(this._escapeParameterHtml) {\n parsedArgs.params = escapeParams(parsedArgs.params);\n }\n\n var locale = parsedArgs.locale || _locale;\n\n var ret = this._translate(\n messages, locale, this.fallbackLocale, key,\n host, 'string', parsedArgs.params\n );\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to translate the keypath '\" + key + \"' with root locale.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return (ref = this._root).$t.apply(ref, [ key ].concat( values ))\n } else {\n ret = this._warnDefault(locale, key, ret, host, values, 'string');\n if (this._postTranslation && ret !== null && ret !== undefined) {\n ret = this._postTranslation(ret, key);\n }\n return ret\n }\n};\n\nVueI18n.prototype.t = function t (key) {\n var ref;\n\n var values = [], len = arguments.length - 1;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];\n return (ref = this)._t.apply(ref, [ key, this.locale, this._getMessages(), null ].concat( values ))\n};\n\nVueI18n.prototype._i = function _i (key, locale, messages, host, values) {\n var ret =\n this._translate(messages, locale, this.fallbackLocale, key, host, 'raw', values);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn((\"Fall back to interpolate the keypath '\" + key + \"' with root locale.\"));\n }\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.i(key, locale, values)\n } else {\n return this._warnDefault(locale, key, ret, host, [values], 'raw')\n }\n};\n\nVueI18n.prototype.i = function i (key, locale, values) {\n /* istanbul ignore if */\n if (!key) { return '' }\n\n if (!isString(locale)) {\n locale = this.locale;\n }\n\n return this._i(key, locale, this._getMessages(), null, values)\n};\n\nVueI18n.prototype._tc = function _tc (\n key,\n _locale,\n messages,\n host,\n choice\n) {\n var ref;\n\n var values = [], len = arguments.length - 5;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 5 ];\n if (!key) { return '' }\n if (choice === undefined) {\n choice = 1;\n }\n\n var predefined = { 'count': choice, 'n': choice };\n var parsedArgs = parseArgs.apply(void 0, values);\n parsedArgs.params = Object.assign(predefined, parsedArgs.params);\n values = parsedArgs.locale === null ? [parsedArgs.params] : [parsedArgs.locale, parsedArgs.params];\n return this.fetchChoice((ref = this)._t.apply(ref, [ key, _locale, messages, host ].concat( values )), choice)\n};\n\nVueI18n.prototype.fetchChoice = function fetchChoice (message, choice) {\n /* istanbul ignore if */\n if (!message || !isString(message)) { return null }\n var choices = message.split('|');\n\n choice = this.getChoiceIndex(choice, choices.length);\n if (!choices[choice]) { return message }\n return choices[choice].trim()\n};\n\nVueI18n.prototype.tc = function tc (key, choice) {\n var ref;\n\n var values = [], len = arguments.length - 2;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];\n return (ref = this)._tc.apply(ref, [ key, this.locale, this._getMessages(), null, choice ].concat( values ))\n};\n\nVueI18n.prototype._te = function _te (key, locale, messages) {\n var args = [], len = arguments.length - 3;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 3 ];\n\n var _locale = parseArgs.apply(void 0, args).locale || locale;\n return this._exist(messages[_locale], key)\n};\n\nVueI18n.prototype.te = function te (key, locale) {\n return this._te(key, this.locale, this._getMessages(), locale)\n};\n\nVueI18n.prototype.getLocaleMessage = function getLocaleMessage (locale) {\n return looseClone(this._vm.messages[locale] || {})\n};\n\nVueI18n.prototype.setLocaleMessage = function setLocaleMessage (locale, message) {\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);\n }\n this._vm.$set(this._vm.messages, locale, message);\n};\n\nVueI18n.prototype.mergeLocaleMessage = function mergeLocaleMessage (locale, message) {\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);\n }\n this._vm.$set(this._vm.messages, locale, merge(\n typeof this._vm.messages[locale] !== 'undefined' && Object.keys(this._vm.messages[locale]).length\n ? Object.assign({}, this._vm.messages[locale])\n : {},\n message\n ));\n};\n\nVueI18n.prototype.getDateTimeFormat = function getDateTimeFormat (locale) {\n return looseClone(this._vm.dateTimeFormats[locale] || {})\n};\n\nVueI18n.prototype.setDateTimeFormat = function setDateTimeFormat (locale, format) {\n this._vm.$set(this._vm.dateTimeFormats, locale, format);\n this._clearDateTimeFormat(locale, format);\n};\n\nVueI18n.prototype.mergeDateTimeFormat = function mergeDateTimeFormat (locale, format) {\n this._vm.$set(this._vm.dateTimeFormats, locale, merge(this._vm.dateTimeFormats[locale] || {}, format));\n this._clearDateTimeFormat(locale, format);\n};\n\nVueI18n.prototype._clearDateTimeFormat = function _clearDateTimeFormat (locale, format) {\n // eslint-disable-next-line no-autofix/prefer-const\n for (var key in format) {\n var id = locale + \"__\" + key;\n\n if (!this._dateTimeFormatters.hasOwnProperty(id)) {\n continue\n }\n\n delete this._dateTimeFormatters[id];\n }\n};\n\nVueI18n.prototype._localizeDateTime = function _localizeDateTime (\n value,\n locale,\n fallback,\n dateTimeFormats,\n key,\n options\n) {\n var _locale = locale;\n var formats = dateTimeFormats[_locale];\n\n var chain = this._getLocaleChain(locale, fallback);\n for (var i = 0; i < chain.length; i++) {\n var current = _locale;\n var step = chain[i];\n formats = dateTimeFormats[step];\n _locale = step;\n // fallback locale\n if (isNull(formats) || isNull(formats[key])) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to '\" + step + \"' datetime formats from '\" + current + \"' datetime formats.\"));\n }\n } else {\n break\n }\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null\n } else {\n var format = formats[key];\n\n var formatter;\n if (options) {\n formatter = new Intl.DateTimeFormat(_locale, Object.assign({}, format, options));\n } else {\n var id = _locale + \"__\" + key;\n formatter = this._dateTimeFormatters[id];\n if (!formatter) {\n formatter = this._dateTimeFormatters[id] = new Intl.DateTimeFormat(_locale, format);\n }\n }\n\n return formatter.format(value)\n }\n};\n\nVueI18n.prototype._d = function _d (value, locale, key, options) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && !VueI18n.availabilities.dateTimeFormat) {\n warn('Cannot format a Date value due to not supported Intl.DateTimeFormat.');\n return ''\n }\n\n if (!key) {\n var dtf = !options ? new Intl.DateTimeFormat(locale) : new Intl.DateTimeFormat(locale, options);\n return dtf.format(value)\n }\n\n var ret =\n this._localizeDateTime(value, locale, this.fallbackLocale, this._getDateTimeFormats(), key, options);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to datetime localization of root: key '\" + key + \"'.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.d(value, key, locale)\n } else {\n return ret || ''\n }\n};\n\nVueI18n.prototype.d = function d (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n var locale = this.locale;\n var key = null;\n var options = null;\n\n if (args.length === 1) {\n if (isString(args[0])) {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n if (args[0].key) {\n key = args[0].key;\n }\n }\n\n options = Object.keys(args[0]).reduce(function (acc, key) {\n var obj;\n\n if (includes(dateTimeFormatKeys, key)) {\n return Object.assign({}, acc, ( obj = {}, obj[key] = args[0][key], obj ))\n }\n return acc\n }, null);\n\n } else if (args.length === 2) {\n if (isString(args[0])) {\n key = args[0];\n }\n if (isString(args[1])) {\n locale = args[1];\n }\n }\n\n return this._d(value, locale, key, options)\n};\n\nVueI18n.prototype.getNumberFormat = function getNumberFormat (locale) {\n return looseClone(this._vm.numberFormats[locale] || {})\n};\n\nVueI18n.prototype.setNumberFormat = function setNumberFormat (locale, format) {\n this._vm.$set(this._vm.numberFormats, locale, format);\n this._clearNumberFormat(locale, format);\n};\n\nVueI18n.prototype.mergeNumberFormat = function mergeNumberFormat (locale, format) {\n this._vm.$set(this._vm.numberFormats, locale, merge(this._vm.numberFormats[locale] || {}, format));\n this._clearNumberFormat(locale, format);\n};\n\nVueI18n.prototype._clearNumberFormat = function _clearNumberFormat (locale, format) {\n // eslint-disable-next-line no-autofix/prefer-const\n for (var key in format) {\n var id = locale + \"__\" + key;\n\n if (!this._numberFormatters.hasOwnProperty(id)) {\n continue\n }\n\n delete this._numberFormatters[id];\n }\n};\n\nVueI18n.prototype._getNumberFormatter = function _getNumberFormatter (\n value,\n locale,\n fallback,\n numberFormats,\n key,\n options\n) {\n var _locale = locale;\n var formats = numberFormats[_locale];\n\n var chain = this._getLocaleChain(locale, fallback);\n for (var i = 0; i < chain.length; i++) {\n var current = _locale;\n var step = chain[i];\n formats = numberFormats[step];\n _locale = step;\n // fallback locale\n if (isNull(formats) || isNull(formats[key])) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to '\" + step + \"' number formats from '\" + current + \"' number formats.\"));\n }\n } else {\n break\n }\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null\n } else {\n var format = formats[key];\n\n var formatter;\n if (options) {\n // If options specified - create one time number formatter\n formatter = new Intl.NumberFormat(_locale, Object.assign({}, format, options));\n } else {\n var id = _locale + \"__\" + key;\n formatter = this._numberFormatters[id];\n if (!formatter) {\n formatter = this._numberFormatters[id] = new Intl.NumberFormat(_locale, format);\n }\n }\n return formatter\n }\n};\n\nVueI18n.prototype._n = function _n (value, locale, key, options) {\n /* istanbul ignore if */\n if (!VueI18n.availabilities.numberFormat) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot format a Number value due to not supported Intl.NumberFormat.');\n }\n return ''\n }\n\n if (!key) {\n var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);\n return nf.format(value)\n }\n\n var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);\n var ret = formatter && formatter.format(value);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to number localization of root: key '\" + key + \"'.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.n(value, Object.assign({}, { key: key, locale: locale }, options))\n } else {\n return ret || ''\n }\n};\n\nVueI18n.prototype.n = function n (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n var locale = this.locale;\n var key = null;\n var options = null;\n\n if (args.length === 1) {\n if (isString(args[0])) {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n if (args[0].key) {\n key = args[0].key;\n }\n\n // Filter out number format options only\n options = Object.keys(args[0]).reduce(function (acc, key) {\n var obj;\n\n if (includes(numberFormatKeys, key)) {\n return Object.assign({}, acc, ( obj = {}, obj[key] = args[0][key], obj ))\n }\n return acc\n }, null);\n }\n } else if (args.length === 2) {\n if (isString(args[0])) {\n key = args[0];\n }\n if (isString(args[1])) {\n locale = args[1];\n }\n }\n\n return this._n(value, locale, key, options)\n};\n\nVueI18n.prototype._ntp = function _ntp (value, locale, key, options) {\n /* istanbul ignore if */\n if (!VueI18n.availabilities.numberFormat) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot format to parts a Number value due to not supported Intl.NumberFormat.');\n }\n return []\n }\n\n if (!key) {\n var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);\n return nf.formatToParts(value)\n }\n\n var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);\n var ret = formatter && formatter.formatToParts(value);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn((\"Fall back to format number to parts of root: key '\" + key + \"' .\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n._ntp(value, locale, key, options)\n } else {\n return ret || []\n }\n};\n\nObject.defineProperties( VueI18n.prototype, prototypeAccessors );\n\nvar availabilities;\n// $FlowFixMe\nObject.defineProperty(VueI18n, 'availabilities', {\n get: function get () {\n if (!availabilities) {\n var intlDefined = typeof Intl !== 'undefined';\n availabilities = {\n dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',\n numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'\n };\n }\n\n return availabilities\n }\n});\n\nVueI18n.install = install;\nVueI18n.version = '8.28.2';\n\nexport default VueI18n;\n","// src/index.ts\nimport Vue from \"vue\";\nimport VueI18n from \"vue-i18n\";\nimport { computed, getCurrentInstance } from \"@vue/composition-api\";\nvar i18nInstance;\nfunction createI18n(options) {\n i18nInstance = new VueI18n(options);\n return i18nInstance;\n}\nfunction useI18n() {\n if (!i18nInstance)\n throw new Error(\"vue-i18n not initialized\");\n const i18n = i18nInstance;\n const instance = getCurrentInstance();\n const vm = (instance == null ? void 0 : instance.proxy) || instance || new Vue({});\n const locale = computed({\n get() {\n return i18n.locale;\n },\n set(v) {\n i18n.locale = v;\n }\n });\n return {\n locale,\n t: vm.$t.bind(vm),\n tc: vm.$tc.bind(vm),\n d: vm.$d.bind(vm),\n te: vm.$te.bind(vm),\n n: vm.$n.bind(vm)\n };\n}\nexport {\n createI18n,\n useI18n\n};\n","import VueI18n, { LocaleMessages } from 'vue-i18n'\nimport { createI18n } from 'vue-i18n-composable'\nimport enLocals from '@/locales/en.json'\n\nexport default function initialize (vue) {\n vue.use(VueI18n)\n\n function loadLocaleMessages (): LocaleMessages {\n const messages: LocaleMessages = { en: {} }\n Object.keys(enLocals).forEach((key) => {\n messages.en[key] = enLocals[key]\n })\n return messages\n }\n\n const i18n = createI18n({\n locale: import.meta.env.VUE_APP_I18N_LOCALE || 'en',\n fallbackLocale: import.meta.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en',\n messages: loadLocaleMessages()\n })\n return i18n\n}\n","/*\nWhile upgrading to vue 3 please check full plugin and do necessary modifications here\n Library build set up for fas-search-components.\n build library using vue-cli-service\n Basic set up of included files store and i18n included here\n How to use :\n inside main.ts `import Search from 'fas-ui'`\n Vue.use(Search, { store, i18n })\n include style if needed either\n import 'fas-ui/fas-lib/fas-ui.css'\n or inside component style tag us without scope (global scope needed),\n @import '~fas-ui/src/assets/scss/search.scss';\n */\n\nimport OurVue from 'vue'\nimport Search from '@/components/Dashboard/Search.vue'\nimport VueCompositionAPI from '@vue/composition-api'\nimport initializeI18n from './plugins/i18n'\n\n// stores needed fro search\n\n// lang files\n\n/**\n * install function\n *\n * @param {*} Vue parent component vue contructor\n * @param {store, i18n} options need store and i18n\n */\nfunction install (Vue, options) {\n if (OurVue !== Vue) {\n // eslint-disable-next-line no-console\n console.error('Multiple instances of Vue detected ')\n }\n\n if (install.installed) return\n install.installed = true\n // since VueCompositionAPI is not giving direct access to property we are checking by using setup api exist in context or not\n // since setup is a reserved keyword and which is using in vue 3 also, Hope it will not change.\n // Another solution is Object.hasOwnProperty.call(Vue, '__composition_api_installed__').\n // we are not using that in futurem, if they change the string no need to brake app\n // Couldnot find better solution since lack of information available. sorry devs :(\n if (!Object.hasOwnProperty.call(Vue.config.optionMergeStrategies, 'setup')) {\n // if parent is not using VueCompositionAPI api need to push to vue\n Vue.use(VueCompositionAPI)\n // eslint-disable-next-line no-console\n console.info('[FAS-Plugin] VueCompositionAPI is not available in parent so pushing from plugin')\n } else {\n // eslint-disable-next-line no-console\n console.info('[FAS-Plugin] VueCompositionAPI already installed')\n }\n\n // simple hack to inject locale messages. check for better solutions\n // this will not work when chaging lang.\n // need to updated code (since we are not using other lag now, not updating chanegs)\n const t = initializeI18n(Vue)\n if (options.i18n && t && t.messages) {\n options.i18n.mergeLocaleMessage(\n options.i18n.locale,\n t.messages[t.locale]\n )\n } else {\n // eslint-disable-next-line no-console\n console.error('[FAS-Plugin] please provide i18n to use lang')\n }\n // pushing store modules to parent store\n // use unique name to avoid conflict\n if (options.store) {\n // options.store.registerModule('store', store)\n window.fasStore = options.store\n } else {\n // eslint-disable-next-line no-console\n console.error('[FAS-Plugin] please provide store')\n }\n // registering component to use as plugin\n Vue.component('fas-search-component', Search)\n}\n\nconst plugin = {\n install\n}\n\nlet GlobalVue = null\nif (typeof window !== 'undefined') {\n GlobalVue = window.Vue\n} else if (typeof global !== 'undefined') {\n GlobalVue = global.vue\n}\n\nif (GlobalVue) {\n GlobalVue.use(plugin)\n}\n\nSearch.install = install\n\nexport default Search\n"],"names":["Vue","use","VueCompositionAPI","SessionStorageKeys","DateFilterCodes","PaymentMethods","SlipStatus","Role","ApiErrors","CreateRoutingSlipStatus","PatchActions","headerSearchTitle","text","align","value","display","className","sortable","hideInSearchColumnFilter","RoutingSlipRefundStatus","code","RoutingSlipRefundCodes","reduce","acc","status","ERROR","WINDOW","window","root","JS_SHA256_NO_WINDOW","WEB_WORKER","self","NODE_JS","JS_SHA256_NO_NODE_JS","process","versions","node","global","COMMON_JS","JS_SHA256_NO_COMMON_JS","module","exports","ARRAY_BUFFER","JS_SHA256_NO_ARRAY_BUFFER","ArrayBuffer","HEX_CHARS","split","EXTRA","SHIFT","K","OUTPUT_TYPES","blocks","Array","isArray","obj","Object","prototype","toString","call","JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW","isView","buffer","constructor","createOutputMethod","outputType","is224","message","Sha256","update","createMethod","method","nodeWrap","create","i","length","type","crypto","eval","Buffer","algorithm","nodeMethod","createHash","digest","Error","Uint8Array","createHmacOutputMethod","key","HmacSha256","createHmacMethod","sharedMemory","this","h0","h1","h2","h3","h4","h5","h6","h7","block","start","bytes","hBytes","finalized","hashed","first","index","charCodeAt","array","oKeyPad","iKeyPad","b","inner","notString","lastByteIndex","hash","finalize","j","s0","s1","maj","t1","ab","da","cd","bc","a","c","d","e","f","g","h","hex","arr","push","arrayBuffer","dataView","DataView","setUint32","innerHash","sha256","sha224","hmac","base64Js","byteLength","b64","lens","getLens","validLen","placeHoldersLen","toByteArray","tmp","Arr","_byteLength","curByte","len","revLookup","fromByteArray","uint8","extraBytes","parts","maxChunkLength","len2","encodeChunk","lookup","join","indexOf","end","num","output","sha256_imported","base64js_imported","Promise","loggedPromiseDeprecation","logPromiseDeprecation","console","warn","toKeycloakPromise","promise","__proto__","KeycloakPromise","executor","Keycloak","config","adapter","callbackStorage","kc","refreshQueue","loginIframe","enable","callbackList","interval","scripts","document","getElementsByTagName","src","iframeVersion","substring","useNonce","logInfo","createLogger","info","logWarn","generateRandomData","msCrypto","getRandomValues","Math","floor","random","generateCodeVerifier","generateRandomString","alphabet","randomData","chars","String","fromCharCode","apply","generatePkceChallenge","pkceMethod","codeVerifier","hashBytes","replace","getRealmUrl","authServerUrl","charAt","encodeURIComponent","realm","getOrigin","location","origin","protocol","hostname","port","processCallback","oauth","error","prompt","timeLocal","Date","getTime","errorData","error_description","onAuthError","setError","setSuccess","flow","access_token","id_token","authSuccess","params","url","endpoints","token","req","XMLHttpRequest","open","setRequestHeader","clientId","redirectUri","pkceCodeVerifier","withCredentials","onreadystatechange","readyState","tokenResponse","JSON","parse","responseText","send","accessToken","refreshToken","idToken","fulfillPromise","setToken","tokenParsed","nonce","storedNonce","refreshTokenParsed","idTokenParsed","clearToken","onAuthSuccess","loadConfig","configUrl","createPromise","setupOidcEndoints","oidcConfiguration","authorize","authorization_endpoint","token_endpoint","logout","end_session_endpoint","checkSessionIframe","check_session_iframe","register","userinfo","userinfo_endpoint","fileLoaded","oidcProvider","oidcProviderConfigUrl","match","substr","xhr","responseURL","startsWith","tokenTimeoutHandle","clearTimeout","decodeToken","sessionId","session_state","authenticated","subject","sub","realmAccess","realm_access","resourceAccess","resource_access","timeSkew","iat","onTokenExpired","expiresIn","round","setTimeout","str","slice","decodeURIComponent","escape","atob","createUUID","hexDigits","s","parseCallback","parseCallbackUrl","oauthState","get","state","valid","supportedParams","newUrl","parsed","queryIndex","fragmentIndex","responseMode","parseCallbackParams","paramsString","oauthParams","p","result","resolve","reject","setupCheckLoginIframe","iframe","createElement","onload","authUrl","iframeOrigin","setAttribute","style","body","appendChild","messageCallback","event","contentWindow","source","data","callbacks","splice","addEventListener","scheduleCheckIframe","checkLoginIframe","then","unchanged","msg","postMessage","loadAdapter","login","options","createLoginUrl","createLogoutUrl","createRegisterUrl","accountManagement","accountUrl","createAccountUrl","href","encodeHash","cordovaOpenWindowWrapper","loginUrl","target","cordova","InAppBrowser","shallowCloneCordovaOptions","userOptions","cordovaOptions","keys","optionName","formatCordovaOptions","createCordovaOptions","hidden","ref","completed","closed","closeBrowser","close","reason","logoutUrl","registerUrl","universalLinks","subscribe","unsubscribe","plugins","browsertab","openUrl","init","initOptions","createCallbackStorage","Cordova","checkLoginIframeInterval","onLoad","loginRequired","responseType","silentCheckSsoRedirectUri","enableLogging","initPromise","onReady","catch","configPromise","doLogin","checkSsoSilently","ifrm","removeChild","removeEventListener","processInit","callback","history","replaceState","updateToken","baseUrl","scope","callbackState","action","maxAge","loginHint","idpHint","locale","add","hasRealmRole","role","access","roles","hasResourceRole","resource","loadUserProfile","profile","loadUserInfo","userInfo","isTokenExpired","minValidity","ceil","isNaN","exec","onAuthRefreshSuccess","pop","onAuthRefreshError","onAuthLogout","LocalStorage","localStorage","setItem","removeItem","cs","clearExpired","time","getItem","expires","err","stringify","CookieStorage","getCookie","setCookie","cookieExpiration","minutes","exp","setTime","name","ca","cookie","expirationDate","toUTCString","fn","arguments","success","handleSuccess","handleError","factory","require$$0","require$$1","decodeKCToken","ConfigHelper","getFromSession","KeyCloakToken","base64Url","base64","map","trimTrailingSlashURL","trim","ConfigHelper$1","_a","addToSession","sessionStorage","removeFromSession","clearSession","clear","getStatusAPIUrl","StatusApiUrl","getAuthAPIUrl","AuthApiUrl","getAuthContextPath","AuthWebUrl","getRegistryHomeURL","RegistryHomeUrl","getNameRequestURL","NameRequestUrl","getPprWebURL","PprWebUrl","setKeycloakConfigUrl","keycloakConfigUrl","getKeycloakConfigUrl","__publicField","VuexModule","actions","mutations","getters","namespaced","modules","getModule","moduleClass","store","_statics","genStatic","_genStatic","reservedKeys","stateFactory","forEach","hasOwnProperty","addPropertiesToObject","_loop_1","k","defineProperty","_i","__awaiter","thisArg","_arguments","P","generator","fulfilled","step","next","rejected","done","__generator","y","t","_","label","sent","trys","ops","verb","throw","return","Symbol","iterator","n","v","op","TypeError","staticStateGenerator","modOpt","statics","staticGetterGenerator","staticMutationGenerator","args","commit","concat","staticActionGenerators","_b","dispatch","moduleDecoratorFactory","moduleOptions","stateFactory$1","getOwnPropertyNames","funcName","descriptor","getOwnPropertyDescriptor","rootState","rootGetters","thisObj","context","dynamic","registerModule","Module","modOrOpt","actionDecoratorFactory","_c","rawError","_d","actionFunction","payload","actionPayload","moduleAccessor","e_1","stack","handler","Action","targetOrParams","Mutation","mutationFunction","AuthModule","super","isAuthenticated","keycloakGuid","kcGuid","KeycloakServices","getUserInfo","currentLoginSource","loginSource","setKCToken","setIDToken","KeyCloakIdToken","setRefreshToken","KeyCloakRefreshToken","setKCGuid","setLoginSource","syncWithSessionStorage","__decorateClass$2","__decorateClass","_KeyCloakService","getInstance","instance","isInitialized","keyCloakConfigurl","getKCInstance","initializeKeyCloak","keycloakConfig","kcLogin","kcOptions","initSession","authModule","syncSessionAndScheduleTokenRefresh","parsedToken","lastName","lastname","firstName","firstname","email","_e","_f","userName","_g","username","fullName","_h","redirectUrl","siteminderLogoutUrl","SiteminderLogoutUrl","PreventStorageSync","env","VUE_APP_PATH","includes","isForceRefresh","tokenExpiresIn","refreshed","verifyRoles","allowedRoles","disabledRoles","isAuthorized","some","initializeToken","isScheduleRefresh","forceLogin","SessionSynced","syncSessionStorage","scheduleRefreshTimer","refreshEarlyTime","refreshEarlyTimeinMilliseconds","max","REFRESH_ATTEMPT_INTERVAL","scheduleRefreshToken","refreshTokenExpiresIn","refreshInMilliSeconds","timerId","log","counter","KeyCloakService","KeyCloakService$1","hookCallback","hooks","setHookCallback","input","isObject","hasOwnProp","isObjectEmpty","isUndefined","isNumber","isDate","res","arrLen","extend","valueOf","createUTC","format","strict","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidEra","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","era","meridiem","rfc2822","weekdayMismatch","getParsingFlags","m","_pf","isValid","_isValid","flags","parsedParts","isNowValid","invalidWeekday","_strict","bigHour","isFrozen","createInvalid","NaN","extend$2","fun","momentProperties","updateInProgress","copyConfig","to","from","prop","val","momentPropertiesLen","_isAMomentObject","_l","_tzm","_isUTC","_offset","_locale","Moment","updateOffset","isMoment","suppressDeprecationWarnings","deprecate","firstTime","deprecationHandler","arg","argLen","deprecations","deprecateSimple","isFunction","Function","set","_config","_dayOfMonthOrdinalParseLenient","RegExp","_dayOfMonthOrdinalParse","_ordinalParse","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","calendar","mom","now","_calendar","zeroFill","number","targetLength","forceSign","absNumber","abs","zerosToFill","pow","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","padded","ordinal","func","localeData","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","invalidDate","replaceLongDateFormatTokens","longDateFormat","lastIndex","test","defaultLongDateFormat","LTS","LT","L","LL","LLL","LLLL","_longDateFormat","formatUpper","toUpperCase","tok","defaultInvalidDate","_invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","_ordinal","defaultRelativeTime","future","past","ss","mm","hh","dd","w","ww","M","MM","yy","relativeTime","withoutSuffix","string","isFuture","_relativeTime","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","toLowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","u","sort","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","isFinite","makeGetSet","keepTime","set$1","month","date","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","_w","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","x","modMonth","o","monthsShort","months","monthsShortRegex","monthsRegex","monthsParse","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","_months","isFormat","localeMonthsShort","_monthsShort","handleStrictParse","monthName","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","localeMonthsParse","_monthsParseExact","setMonth","dayOfMonth","min","getSetMonth","getDaysInMonth","computeMonthsParse","_monthsShortStrictRegex","_monthsShortRegex","_monthsStrictRegex","_monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","parseTwoDigitYear","parseInt","getSetYear","getIsLeapYear","createDate","ms","getFullYear","setFullYear","createUTCDate","UTC","getUTCFullYear","setUTCFullYear","firstWeekOffset","dow","doy","fwd","getUTCDay","dayOfYearFromWeeks","week","weekday","resYear","resDayOfYear","dayOfYear","weekOfYear","resWeek","weekOffset","weeksInYear","weekOffsetNext","localeWeek","_week","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","weekdaysParse","parseIsoWeekday","shiftWeekdays","ws","weekdaysMin","weekdaysShort","weekdays","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","_weekdays","day","localeWeekdaysShort","_weekdaysShort","localeWeekdaysMin","_weekdaysMin","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","localeWeekdaysParse","_weekdaysParseExact","_fullWeekdaysParse","getSetDayOfWeek","getDay","getSetLocaleDayOfWeek","getSetISODayOfWeek","computeWeekdaysParse","_weekdaysStrictRegex","_weekdaysRegex","_weekdaysShortStrictRegex","_weekdaysShortRegex","_weekdaysMinStrictRegex","_weekdaysMinRegex","minp","shortp","longp","minPieces","hFormat","hours","kFormat","lowercase","matchMeridiem","_meridiemParse","localeIsPM","seconds","kInput","_isPm","isPM","_meridiem","pos","pos1","pos2","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","isLower","baseConfig","dayOfMonthOrdinalParse","meridiemParse","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","loadLocale","isLocaleNameSane","oldLocale","_abbr","require","getSetGlobalLocale","values","getLocale","defineLocale","abbr","parentLocale","updateLocale","tmpLocale","listLocales","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","configFromISO","l","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","setUTCMinutes","getUTCMinutes","configFromString","createFromInputFallback","defaults","currentDateArray","nowValue","_useUTC","getUTCMonth","getUTCDate","getMonth","getDate","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","weekYear","temp","weekdayOverflow","curWeek","GG","W","E","createLocal","gg","ISO_8601","RFC_2822","skipped","stringLength","totalParsedInputLength","meridiemFixWrap","erasConvertYear","hour","isPm","meridiemHour","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","score","configFromObject","dayOrDate","minute","second","millisecond","createFromConfig","prepareConfig","preparse","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","ordering","isDurationValid","unitHasDecimal","orderLen","parseFloat","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","quarter","weeks","isoWeek","days","milliseconds","_milliseconds","_days","_data","_bubble","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","offset","separator","utcOffset","sign","offsetFromString","chunkOffset","matcher","matches","cloneWithOffset","model","clone","local","getDateOffset","getTimezoneOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","subtract","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","_isDSTShifted","toArray","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","ret","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","base","isAfter","isBefore","createAdder","direction","period","isAdding","invalid","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","propertyLen","arrayTest","dataTypeTest","filter","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","startOf","calendarFormat","localInput","endOf","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","that","zoneDelta","monthDiff","wholeMonthDiff","anchor","toISOString","keepOffset","toDate","inspect","prefix","suffix","zone","inputString","defaultFormatUtc","defaultFormat","postformat","humanize","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOfDate","isoWeekday","unix","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","localeEras","eras","_eras","since","until","Infinity","localeErasParse","eraName","narrow","localeErasConvertYear","dir","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","_erasNameRegex","_erasRegex","erasAbbrRegex","_erasAbbrRegex","erasNarrowRegex","_erasNarrowRegex","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","_eraYearOrdinalRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","isoWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","erasParse","eraYearOrdinalParse","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","parseZone","preParsePostFormat","for","eraNarrow","eraAbbr","eraYear","isoWeeks","weeksInWeekYear","isoWeeksInYear","isoWeeksInISOWeekYear","isDST","zoneAbbr","zoneName","dates","isDSTShifted","proto$1","get$1","field","setter","listMonthsImpl","out","listWeekdaysImpl","localeSorted","shift","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","firstDayOfYear","firstDayOfWeek","langData","mathAbs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","limit","argWithSuffix","argThresholds","withSuffix","th","assign","abs$1","toISOString$1","totalSign","ymSign","daysSign","hmsSign","total","toFixed","proto$2","toIsoString","version","relativeTimeRounding","relativeTimeThreshold","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","TIME","TIME_SECONDS","TIME_MS","_CommonUtils","formatDisplayDate","moment","requiredFieldRule","errorMessage","optionalFieldRule","isSigningIn","path","pathname","isSigningOut","fileDownload","fileName","fileType","blob","Blob","navigator","msSaveBlob","blobURL","URL","createObjectURL","webkitURL","tempLink","download","click","revokeObjectURL","statusListColor","textColor","color","ACTIVE","COMPLETE","REFUNDPROCESSED","WRITEOFFCOMPLETED","BOUNCED","NSF","LINKED","REFUNDREQUEST","REFUNDAUTHORIZED","WRITEOFFAUTHORIZED","WRITEOFFREQUESTED","VOID","appendCurrencySymbol","currency","cleanObject","remainingAmount","appendQueryParamsIfNeeded","targetUrl","route","requestParams","createQueryParams","query","convertAddressForComponent","address","addressCity","city","addressCountry","country","addressRegion","region","deliveryInstructions","postalCode","streetAddress","street","streetAddressAdditional","streetAdditional","convertAddressForAuth","iaddress","isApproverRole","approverRole","FAS_REFUND_APPROVER","isVoidRole","voidRole","FAS_VOID","isRefundProcessStatus","REFUNDREJECTED","REFUNDUPLOADED","isRefundRequestStatus","isEditEnabledBystatus","encodeURI","object","object1","object2","objKeys1","objKeys2","value1","value2","isObjects","isDeepEqual","CommonUtils","fetchConfig","PayApiUrl","getPayAPIURL","getAuthWebUrl","FasWebUrl","getFasWebUrl","getSiteminderLogoutUrl","saveConfigToSessionStorage","getSelfURL","getFasAPIURL","getKeycloakAuthUrl","getKeycloakRealm","getKeycloakClientId","getAddressCompleteKey","debounce","wait","immediate","timeout","callNow","hasCallFailed","activeCalls","isThereActiveCalls","computed","useIndicators","useLoader","isLoading","toggleLoading","changeLoadingStatus","isLoadingStatus","bind","wrap","isBuffer","isArrayBuffer","isFormData","FormData","isArrayBufferView","isPlainObject","getPrototypeOf","isFile","isBlob","isStream","pipe","isURLSearchParams","URLSearchParams","isStandardBrowserEnv","product","merge","assignValue","stripBOM","content","utils","encode","buildURL","paramsSerializer","serializedParams","serialize","parseValue","hashmarkIndex","InterceptorManager","handlers","synchronous","runWhen","InterceptorManager$1","eject","id","forEachHandler","InterceptorManager_1","normalizeHeaderName","headers","normalizedName","processHeader","enhanceError","request","response","isAxiosError","description","lineNumber","columnNumber","createError","settle","validateStatus","cookies","standardBrowserEnv","write","domain","secure","toGMTString","read","remove","isAbsoluteURL","combineURLs","baseURL","relativeURL","buildFullPath","requestedURL","ignoreDuplicateOf","parseHeaders","parser","line","isURLSameOrigin","originURL","msie","userAgent","urlParsingNode","resolveURL","host","search","requestURL","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","xhrAdapter","dispatchXhrRequest","requestData","requestHeaders","auth","password","unescape","Authorization","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","statusText","handleLoad","onabort","handleAbort","onerror","ontimeout","handleTimeout","timeoutErrorMessage","transitional","clarifyTimeoutError","xsrfValue","xsrfCookieName","xsrfHeaderName","onDownloadProgress","onUploadProgress","upload","cancelToken","onCanceled","cancel","abort","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","getDefaultAdapter","stringifySafely","rawValue","encoder","silentJSONParsing","forcedJSONParsing","transformRequest","transformResponse","strictJSONParsing","maxContentLength","maxBodyLength","defaults$3","common","Accept","utils$5","forEachMethodNoData","forEachMethodWithData","defaults_1","transformData","fns","transform","isCancel$1","isCancel","__CANCEL__","throwIfCancellationRequested","throwIfRequested","dispatchRequest","utils$3","cleanHeaderConfig","onAdapterResolution","onAdapterRejection","mergeConfig","config1","config2","valueFromConfig2Keys","mergeDeepPropertiesKeys","defaultToConfig2Keys","directMergeKeys","getMergedValue","mergeDeepProperties","valueFromConfig2","utils$2","defaultToConfig2","axiosKeys","otherKeys","filterAxiosKeys","pkg","validators","validator","thing","deprecatedWarnings","currentVerArr","isOlderVersion","thanVersion","pkgVersionArr","destVer","assertOptions","schema","allowUnknown","opt","validators$1","isDeprecated","formatMessage","desc","opts","Axios","instanceConfig","interceptors","Axios$2","boolean","requestInterceptorChain","synchronousRequestInterceptors","unshiftRequestInterceptors","interceptor","unshift","responseInterceptorChain","pushResponseInterceptors","chain","newConfig","onFulfilled","onRejected","getUri","utils$1","Axios_1","Cancel","Cancel_1","CancelToken","resolvePromise","promiseExecutor","CancelToken_1","spread","createInstance","defaultConfig","axios","axios$2","all","promises","require$$8","require$$9","axiosModule","default","showGlobalLoader","showGlobalErrorHandling","CodesService","getCodes","codeType","routingSlipStatusList","useCodes","getRoutingSlipStatusList","async","codes","useStatusList","props","toRefs","currentStatus","modalValue","emit","selectedStatusObject","statusList","onMounted","statusLabel","RoutingSlip","getRoutingSlip","routingNumber","createRoutingSlip","routingSlipRequest","post","adjustRoutingSlip","payments","routingSlipNumber","CORRECTION","patch","UPDATE_STATUS","updateRoutingSlipStatus","updateRoutingSlipRefundStatus","refund_status","updateRoutingSlipComments","slipNumber","updateRoutingSlipRefund","details","getSearchRoutingSlip","searchParams","saveLinkRoutingSlip","LinkRoutingSlip","getLinkedRoutingSlips","getDailyReport","selectedDate","getSearchFilingType","getFeeByCorpTypeAndFilingType","getFeeRequestParams","corpTypeCode","filingTypeCode","saveManualTransactions","transactions","cancelRoutingSlipInvoice","invoiceId","defaultParams","page","headerSearchTitleConstant","searchRoutingSlipResult","searchRoutingSlipParams","routingSlip","linkedRoutingSlips","routingSlipDetails","accountInfo","chequePayment","cashPayment","isPaymentMethodCheque","isAmountPaidInUsd","autoCompleteRoutingSlips","useRoutingSlip","invoiceCount","invoices","searchParamsExist","isRoutingSlipAChild","parentNumber","isRoutingSlipLinked","children","isRoutingSlipVoid","getRoutingSlipRequestPayload","RoutingSlipService","searchRoutingSlip","appendToResults","dateFilter","startDate","endDate","items","updateRoutingSlipChequeNumber","chequeNumToChange","payment","paymentIndex","chequeReceiptNumber","chequeNum","updateRoutingSlipAmount","amountToChange","isRoutingSlipPaidInUsd","paidUsdAmount","amount","paidAmount","paymentAccount","checkRoutingNumber","VALID","EXISTS","FAS_INVALID_ROUTING_SLIP_DIGITS","INVALID_DIGITS","statusDetails","resetRoutingSlipDetails","resetSearchParams","parentRoutingSlipNumber","LinkPrams","childRoutingSlipNumber","getDailyReportByDate","formatedDate","getAutoCompleteRoutingSlips","transation","referenceNumber","filingType","futureEffective","quantity","businessInfo","corpType","businessIdentifier","transactionParams","filingInfo","filingTypes","infiniteScrollCallback","comment","businessId","useSearch","isLibraryMode","fasUrl","reactive","showExpandedFolio","showExpandedCheque","searchParamsChanged","reachedEnd","headerSearch","displayedHeaderSearch","displayed","updateSearchFilter","updates","receiptNumber","refundStatus","accountName","initiator","searchNow","debouncedSearch","getNext","canShowColumn","columnName","find","header","applyDateFilter","dateRangeObj","getStatusLabel","clearFilter","formatFolioResult","invoice","toggleFolio","toggleCheque","navigateTo","$router","$route","getRefundStatusText","statusCode","PROCESSING","getStatusFromRefundStatus","_typeof","_defineProperty","enumerable","configurable","writable","_toConsumableArray","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","iter","reflectionIsSupported","Reflect","defineMetadata","getOwnMetadataKeys","copyReflectionMetadata","forwardMetadata","propertyKey","metaKey","metadata","getOwnMetadata","fakeArray","hasProto","createDecorator","Ctor","__decorators__","isPrimitive","collectDataFromConstructor","vm","Component","originalInit","_init","_this","$options","plainData","NODE_ENV","$internalHooks","componentFactory","_componentTag","methods","mixins","decorators","superProto","Super","Extended","forwardStaticMembers","reservedPropertyNames","shouldIgnore","callee","caller","Original","extendedDescriptor","superDescriptor","warn$1","registerHooks","__spreadArrays","reflectMetadataIsSupported","getMetadata","applyMetadata","Prop","componentOptions","DATEFILTER_CODES","useDateRange","dateRangeSelected","oldSelectedRange","dateRangeSelectedDisplay","dateFilterRanges","TODAY","YESTERDAY","LASTWEEK","LASTMONTH","CUSTOMRANGE","dateFilterSelectedIndex","dateFilterSelected","showDateFilter","pickerDate","isApplyFilterBtnValid","showDateRangeSelected","dateText","formatDatePickerDate","dateObj","dateFilterChange","today","yesterday","weekStart","weekEnd","monthStart","monthEnd","dateClick","cancelDateFilter","useSearchColumnFilterComponent","selectedHeaderSearchList","DateRangeFilter","__decorateClass$1","DateRangeFilter$1","setup","render","_vm","$createElement","_self","attrs","transition","scopedSlots","_u","_ref","on","readonly","filled","$$v","expression","$attrs","slot","_v","staticClass","dense","change","filterRange","domProps","textContent","_s","large","disabled","outlined","$event","innerHTML","width","range","$listeners","staticRenderFns","SearchColumnFilterComponent","SearchColumnFilterComponent$1","nav","$set","__vue2_script$2","defineComponent","required","column","__vue2_script","observerElement","observer","IntersectionObserver","entry","isIntersecting","observe","onBeforeUnmount","disconnect","useDashboard","addRoutingSlip","can","inserted","el","binding","canAccess","componentUpdated","behaviour","modifiers","disable","isCard","card","requestedAction","customeEl","commentNode","classList","pointerEvents","vnode","createComment","elm","isComment","tag","directives","componentInstance","$el","parentNode","replaceChild","Boolean","colors","commonUtil","components","statusListComponent","TableObserver","_objectDestructuringEmpty","class","sm","cols","rawName","hide","dark","small","height","loading","$t","proxy","autocomplete","placeholder","applied","_ref2","paymentMethod","createdName","routingSlipDate","CHEQUE_UNDELIVERABLE","folio","CHEQUE","colspan","intersect","numberFormatKeys","dateTimeFormatKeys","isBoolean","OBJECT_STRING","isNull","parseArgs","looseClone","delete","arrayFrom","hasOwn","arguments$1","looseEqual","isObjectA","isObjectB","isArrayA","isArrayB","every","keysA","keysB","escapeHtml","rawText","escapeParams","_i18n","i18n","$i18n","_t","_getMessages","$tc","choice","_tc","$te","_te","$d","$n","defineMixin","bridge","mounted","$root","__INTLIFY_META__","beforeCreate","__i18nBridge","__i18n","VueI18n","localeMessages","messages","mergeLocaleMessage","_i18nWatcher","watchI18nData","rootI18n","formatter","fallbackLocale","formatFallbackMessages","silentTranslationWarn","silentFallbackWarn","pluralizationRules","preserveDirectiveContent","localeMessages$1","sharedMessages","sync","_localeWatcher","watchLocale","onComponentInstanceCreated","parent","beforeMount","subscribeDataChanging","_subscribing","beforeDestroy","$nextTick","unsubscribeDataChanging","destroyVM","interpolationComponent","functional","places","slots","onlyHasDefaultPlace","useLegacyPlaces","createParamsFromPlaces","everyPlace","child","vnodeHasPlaceAttribute","assignChildPlace","assignChildIndex","place","numberComponent","Number","_ntp","part","assert","oldVNode","localeEqual","oldValue","_localeMessage","getLocaleMessage","unbind","preserve","_vt","ref$1","ref$2","tc","makeParams","install","_Vue","installed","mixin","directive","component","optionMergeStrategies","parentVal","childVal","BaseFormatter","_caches","interpolate","compile","RE_TOKEN_LIST_VALUE","RE_TOKEN_NAMED_VALUE","position","char","isClosed","compiled","mode","APPEND","PUSH","INC_SUB_PATH_DEPTH","PUSH_SUB_PATH","BEFORE_PATH","IN_PATH","BEFORE_IDENT","IN_IDENT","IN_SUB_PATH","IN_SINGLE_QUOTE","IN_DOUBLE_QUOTE","AFTER_PATH","pathStateMachine","ident","eof","else","literalValueRE","isLiteral","stripQuotes","getPathCharType","ch","formatSubPath","trimmed","parse$1","newChar","typeMap","subPathDepth","maybeUnescapeQuote","nextChar","I18nPath","_cache","parsePath","hit","getPathValue","paths","last","htmlTagMatcher","linkKeyMatcher","linkKeyPrefixMatcher","bracketsMatcher","defaultModifiers","upper","toLocaleUpperCase","lower","capitalize","defaultFormatter","this$1","dateTimeFormats","datetimeFormats","numberFormats","_formatter","_modifiers","_missing","missing","_root","_sync","_fallbackRoot","fallbackRoot","_fallbackRootWithEmptyString","fallbackRootWithEmptyString","_formatFallbackMessages","_silentTranslationWarn","_silentFallbackWarn","_dateTimeFormatters","_numberFormatters","_path","_dataListeners","Set","_componentInstanceCreatedListener","componentInstanceCreatedListener","_preserveDirectiveContent","_warnHtmlInMessage","warnHtmlInMessage","_postTranslation","postTranslation","_escapeParameterHtml","escapeParameterHtml","__VUE_I18N_BRIDGE__","getChoiceIndex","choicesLength","thisPrototype","_choice","_choicesLength","_exist","_checkLocaleMessage","_initVM","prototypeAccessors","availableLocales","availabilities","level","silent","__VUE18N__INSTANCE__","$destroy","$watch","listeners","nextTick","$forceUpdate","deep","composer","target$1","newI18n","_getDateTimeFormats","_getNumberFormats","_localeChainCache","fallback","orgLevel","_warnDefault","interpolateMode","missingRet","_isSilentTranslationWarn","parsedArgs","_render","_isFallbackRoot","_isSilentFallbackWarn","_isSilentFallback","_interpolate","visitedLinkStack","pathRet","_link","idx","link","linkKeyPrefixMatches","linkPrefix","formatterName","linkPlaceholder","reverse","translated","_translate","_createMessageContext","_list","_named","list","named","linked","linkedKey","_appendItemToChain","follow","_appendLocaleToChain","_appendBlockToChain","_getLocaleChain","predefined","count","fetchChoice","choices","te","setLocaleMessage","getDateTimeFormat","setDateTimeFormat","_clearDateTimeFormat","mergeDateTimeFormat","_localizeDateTime","current","Intl","DateTimeFormat","dateTimeFormat","getNumberFormat","setNumberFormat","_clearNumberFormat","mergeNumberFormat","_getNumberFormatter","NumberFormat","_n","numberFormat","formatToParts","defineProperties","intlDefined","VueI18n$1","i18nInstance","createI18n","initialize","vue","VUE_APP_I18N_LOCALE","VUE_APP_I18N_FALLBACK_LOCALE","loadLocaleMessages","en","enLocals","OurVue","initializeI18n","fasStore","Search","plugin","GlobalVue"],"mappings":";;AAGAA,MAAIC,IAAIC;ACHIC,IAAAA,sBAAAA,IACVA,EAAgB,cAAA,iBAChBA,EAAe,aAAA,kBACfA,EAAoB,kBAAA,WACpBA,EAAsB,oBAAA,uBACtBA,EAAgB,cAAA,iBAChBA,EAAa,WAAA,eACbA,EAAa,WAAA,eACbA,EAAY,UAAA,cACZA,EAAe,aAAA,iBACfA,EAAY,UAAA,cACZA,EAAsB,oBAAA,wBAXZA,IAAAA,sBAAA,CAAA,GAcAC,iBAAAA,IACVA,EAAQ,MAAA,QACRA,EAAY,UAAA,YACZA,EAAW,SAAA,WACXA,EAAY,UAAA,YACZA,EAAc,YAAA,cALJA,IAAAA,iBAAA,CAAA,GAQAC,gBAAAA,IACVA,EAAO,KAAA,OACPA,EAAS,OAAA,SAFCA,IAAAA,gBAAA,CAAA,GAKAC,YAAAA,IACVA,EAAS,OAAA,SACTA,EAAW,SAAA,WACXA,EAAU,QAAA,UACVA,EAAM,IAAA,MACNA,EAAS,OAAA,SACTA,EAAO,KAAA,OACPA,EAAO,KAAA,OACPA,EAAS,OAAA,SACTA,EAAgB,cAAA,mBAChBA,EAAmB,iBAAA,oBACnBA,EAAkB,gBAAA,mBAClBA,EAAiB,eAAA,kBACjBA,EAAiB,eAAA,kBACjBA,EAAwB,sBAAA,wBACxBA,EAAsB,sBAAA,2BACtBA,EAAmB,mBAAA,uBACnBA,EAAkB,kBAAA,sBAClBA,EAAkB,kBAAA,sBAClBA,EAAK,KAAA,OACLA,EAAW,WAAA,aApBDA,IAAAA,YAAA,CAAA,GAsCAC,MAAAA,IACVA,EAAW,SAAA,WACXA,EAAW,SAAA,WACXA,EAAc,YAAA,cACdA,EAAa,WAAA,aACbA,EAAW,SAAA,WACXA,EAAa,WAAA,aACbA,EAAU,QAAA,WACVA,EAAkB,gBAAA,kBAClBA,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AHP/5E,OAAOiV,KAAK+kE,UAAU37D,SAAStc,IAC7BsoE,EAAS0P,GAAGh4E,GAAOi4E,SAASj4E,EAAG,IAE1BsoE,CACT,CAKYyP,IAGd,CCQS,SAAAjM,QAASpxE,EAAKuX,GAMrB,GALIimE,QAAWx9E,GAEbgL,QAAQ4D,MAAM,uCAGZwiE,QAAQE,UAAW;AACvBF,QAAQE,WAAY,EAMf/tE,OAAOse,eAAene,KAAK1D,EAAIwL,OAAOkmE,sBAAuB,SAOhE1mE,QAAQ0B,KAAK,qDALb1M,EAAIC,IAAIC,mBAER8K,QAAQ0B,KAAK;AASTqW,MAAAA,EAAI06D,WAAez9E;AACrBuX,EAAQg1D,MAAQxpD,GAAKA,EAAE6qD,SACzBr2D,EAAQg1D,KAAKsB,mBACXt2D,EAAQg1D,KAAK7wD,OACbqH,EAAE6qD,SAAS7qD,EAAErH,SAIf1Q,QAAQ4D,MAAM,gDAIZ2I,EAAQ+J,MAEV3f,OAAO+7E,SAAWnmE,EAAQ+J,MAG1BtW,QAAQ4D,MAAM,qCAGhB5O,EAAIyxE,UAAU,uBAAwBkM,OACxC,CAEA,MAAMC,OAAS,CACbxM;AAGF,IAAIyM,UAAY;MACM,oBAAXl8E,OACTk8E,UAAYl8E,OAAO3B,IACQ,oBAAXqC,SAChBw7E,UAAYx7E,OAAO66E,KAGjBW,WACFA,UAAU59E,IAAI29E,QAGhBD,OAAOvM,QAAUA","x_google_ignoreList":[2,3,4,5,6,7,8,9,10,11,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,52,53,54,55,70,71]} \ No newline at end of file +{"version":3,"file":"lib.umd.min.js","sources":["../src/shims-vue-composition-api.ts","../src/util/constants.ts","../node_modules/js-sha256/src/sha256.js","../node_modules/keycloak-js/node_modules/base64-js/index.js","../node_modules/keycloak-js/dist/keycloak.js","../node_modules/sbc-common-components/src/util/constants.ts","../node_modules/sbc-common-components/src/util/common-util.ts","../node_modules/sbc-common-components/src/util/config-helper.ts","../node_modules/vuex-module-decorators/dist/esm/index.js","../node_modules/sbc-common-components/src/store/modules/auth.ts","../node_modules/sbc-common-components/src/services/keycloak.services.ts","../node_modules/moment/dist/moment.js","../src/util/common-util.ts","../src/util/config-helper.ts","../src/util/debounce.ts","../src/composables/useIndicators.ts","../src/composables/common/useLoader.ts","../node_modules/axios/lib/helpers/bind.js","../node_modules/axios/lib/utils.js","../node_modules/axios/lib/helpers/buildURL.js","../node_modules/axios/lib/core/InterceptorManager.js","../node_modules/axios/lib/helpers/normalizeHeaderName.js","../node_modules/axios/lib/core/enhanceError.js","../node_modules/axios/lib/core/createError.js","../node_modules/axios/lib/core/settle.js","../node_modules/axios/lib/helpers/cookies.js","../node_modules/axios/lib/helpers/isAbsoluteURL.js","../node_modules/axios/lib/helpers/combineURLs.js","../node_modules/axios/lib/core/buildFullPath.js","../node_modules/axios/lib/helpers/parseHeaders.js","../node_modules/axios/lib/helpers/isURLSameOrigin.js","../node_modules/axios/lib/adapters/xhr.js","../node_modules/axios/lib/defaults.js","../node_modules/axios/lib/core/transformData.js","../node_modules/axios/lib/cancel/isCancel.js","../node_modules/axios/lib/core/dispatchRequest.js","../node_modules/axios/lib/core/mergeConfig.js","../node_modules/axios/lib/helpers/validator.js","../node_modules/axios/lib/core/Axios.js","../node_modules/axios/lib/cancel/Cancel.js","../node_modules/axios/lib/cancel/CancelToken.js","../node_modules/axios/lib/helpers/spread.js","../node_modules/axios/lib/helpers/isAxiosError.js","../node_modules/axios/lib/axios.js","../node_modules/axios/index.js","../src/util/http-util.ts","../src/services/codes.service.ts","../src/composables/useCodes.ts","../src/composables/common/useStatusList.ts","../src/services/routingSlip.services.ts","../src/composables/useRoutingSlip.ts","../src/composables/Dashboard/useSearch.ts","../node_modules/vue-class-component/dist/vue-class-component.esm.js","../node_modules/vue-property-decorator/lib/decorators/Emit.js","../node_modules/vue-property-decorator/lib/helpers/metadata.js","../node_modules/vue-property-decorator/lib/decorators/Prop.js","../src/composables/common/useDateRange.ts","../src/composables/common/useSearchColumnFilterComponent.ts","../src/components/common/DateRangeFilter.vue","../src/components/common/DateRangeFilter.vue?vue&type=template&lang.js","../src/components/common/SearchColumnFilterComponent.vue","../src/components/common/SearchColumnFilterComponent.vue?vue&type=template&lang.js","../src/components/common/StatusList.vue","../src/components/common/StatusList.vue?vue&type=template&lang.js","../src/components/common/TableObserver.vue?vue&type=template&lang.js","../src/components/common/TableObserver.vue","../src/composables/Dashboard/useDashboard.ts","../src/directives/can.ts","../src/components/Dashboard/Search.vue","../src/components/Dashboard/Search.vue?vue&type=template&lang.js","../node_modules/vue-i18n/dist/vue-i18n.esm.js","../node_modules/vue-i18n-composable/dist/index.mjs","../src/plugins/i18n.ts","../src/lib-setup.js"],"sourcesContent":["// This needs to be done, otherwise these App.vue gets hoisted above the statements below:\nimport VueCompositionAPI from '@vue/composition-api'\nimport Vue from 'vue'\nVue.use(VueCompositionAPI)\n","export enum SessionStorageKeys {\n KeyCloakToken = 'KEYCLOAK_TOKEN',\n ApiConfigKey = 'AUTH_API_CONFIG',\n LaunchDarklyFlags = 'LD_FLAGS',\n ExtraProvincialUser = 'EXTRAPROVINCIAL_USER',\n SessionSynced = 'SESSION_SYNCED',\n AuthApiUrl = 'AUTH_API_URL',\n AuthWebUrl = 'AUTH_WEB_URL',\n PayApiUrl = 'PAY_API_URL',\n StatusApiUrl = 'STATUS_API_URL',\n FasWebUrl = 'FAS_WEB_URL',\n SiteminderLogoutUrl = 'SITEMINDER_LOGOUT_URL'\n}\n\nexport enum DateFilterCodes {\n TODAY = 'TODAY',\n YESTERDAY = 'YESTERDAY',\n LASTWEEK = 'LASTWEEK',\n LASTMONTH = 'LASTMONTH',\n CUSTOMRANGE = 'CUSTOMRANGE',\n}\n\nexport enum PaymentMethods {\n CASH = 'CASH',\n CHEQUE = 'CHEQUE',\n}\n\nexport enum SlipStatus {\n ACTIVE = 'ACTIVE',\n COMPLETE = 'COMPLETE',\n BOUNCED = 'BOUNCED',\n NSF = 'NSF',\n REFUND = 'REFUND',\n LAST = 'LAST',\n HOLD = 'HOLD',\n LINKED = 'LINKED',\n REFUNDREQUEST = 'REFUND_REQUESTED',\n REFUNDAUTHORIZED = 'REFUND_AUTHORIZED',\n REFUNDPROCESSED = 'REFUND_PROCESSED',\n REFUNDUPLOADED = 'REFUND_UPLOADED',\n REFUNDREJECTED = 'REFUND_REJECTED',\n CANCEL_REFUND_REQUEST = 'CANCEL_REFUND_REQUEST',\n CANCELWRITEOFFREQUEST='CANCEL_WRITE_OFF_REQUEST',\n WRITEOFFAUTHORIZED='WRITE_OFF_AUTHORIZED',\n WRITEOFFREQUESTED='WRITE_OFF_REQUESTED',\n WRITEOFFCOMPLETED='WRITE_OFF_COMPLETED',\n VOID='VOID',\n CORRECTION='CORRECTION'\n}\n\nexport enum SlipStatusLabel {\n ACTIVE = 'Place routing slip to active',\n NSF = 'Place routing slip to NSF',\n HOLD = 'Place routing slip on hold',\n LINKED = 'LINKED',\n REFUND_REQUESTED = 'Refund request',\n WRITE_OFF_REQUESTED = 'Write off request',\n CANCEL_REFUND_REQUEST = 'Cancel refund request',\n REFUND_AUTHORIZED='Review refund request',\n WRITE_OFF_AUTHORIZED='Authorize Write off request',\n CANCEL_WRITE_OFF_REQUEST='Cancel Write off request',\n VOID='Void Routing Slip',\n // CORRECTION='Correct Routing Slip' - Future\n}\n\nexport enum Role {\n FAS_USER = 'fas_user',\n FAS_EDIT = 'fas_edit',\n FAS_REPORTS = 'fas_reports',\n FAS_SEARCH = 'fas_search',\n FAS_VIEW = 'fas_view',\n FAS_CREATE = 'fas_create',\n FAS_LNK = 'fas_link',\n FAS_TRANSACTION = 'fas_transaction',\n FAS_REFUND_APPROVER = 'fas_refund_approver',\n FAS_REFUND = 'fas_refund',\n FAS_VOID = 'fas_void',\n FAS_CORRECTION = 'fas_correction'\n}\n\nexport enum InvoiceStatus {\n COMPLETED = 'COMPLETED',\n REFUNDED = 'REFUNDED',\n DELETE_ACCEPTED = 'DELETE_ACCEPTED',\n REFUNDREQUEST = 'REFUND_REQUESTED',\n}\n\nexport enum ApiErrors {\n FAS_INVALID_ROUTING_SLIP_DIGITS = 'FAS_INVALID_ROUTING_SLIP_DIGITS'\n}\n\nexport enum CreateRoutingSlipStatus {\n VALID = 'VALID',\n EXISTS = 'EXISTS',\n INVALID_DIGITS = 'INVALID_DIGITS',\n}\n\nexport enum PatchActions {\n UPDATE_STATUS = 'updateStatus'\n}\n\nexport const AXIOS_ERROR_ALERT_TIME_OUT = 5000\n\nexport const headerSearchTitle =\n[\n {\n text: 'Routing Slip Number',\n align: 'start',\n value: 'routingSlipNumber',\n display: true,\n className: 'routing-slip'\n },\n {\n text: 'Receipt Number',\n align: 'start',\n sortable: false,\n value: 'receiptNumber',\n display: true,\n className: 'receiptNumber'\n },\n {\n text: 'Entity Number',\n align: 'start',\n value: 'accountName',\n sortable: false,\n display: false,\n className: 'accountName'\n },\n {\n text: 'Created By',\n align: 'start',\n value: 'createdName',\n sortable: false,\n display: false,\n className: 'createdName'\n },\n {\n text: 'Date',\n align: 'start',\n sortable: false,\n value: 'date',\n display: true,\n className: 'date'\n },\n {\n text: 'Status',\n align: 'start',\n sortable: false,\n value: 'status',\n display: true,\n className: 'status'\n },\n {\n text: 'Refund Status',\n align: 'start',\n sortable: false,\n value: 'refundStatus',\n display: true,\n className: 'refundStatus'\n },\n {\n text: 'Reference Number',\n align: 'start',\n value: 'businessIdentifier',\n sortable: false,\n display: true,\n className: 'businessIdentifier'\n },\n {\n text: 'Cheque Number',\n align: 'start',\n value: 'chequeReceiptNumber',\n sortable: false,\n display: false,\n className: 'cheque-receipt-number'\n },\n {\n text: 'Balance',\n align: 'right',\n value: 'remainingAmount',\n sortable: false,\n display: true,\n className: 'remainingAmount'\n },\n {\n text: 'Actions',\n align: 'start',\n value: '',\n sortable: false,\n display: true,\n hideInSearchColumnFilter: true,\n className: 'action'\n }\n]\n\nexport const RoutingSlipRefundStatus = [\n {\n code: 'PROCESSING',\n text: 'PROCESSING',\n display: false\n },\n {\n code: 'PROCESSED',\n text: 'PROCESSED',\n display: true\n },\n {\n code: 'CHEQUE_UNDELIVERABLE',\n text: 'CHEQUE UNDELIVERABLE',\n display: true\n }\n]\n\nexport const RoutingSlipRefundCodes = RoutingSlipRefundStatus.reduce((acc, status) => {\n acc[status.code] = status.code\n return acc\n}, {} as { [key: string]: string })\n","/**\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\n *\n * @version 0.9.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2017\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var ERROR = 'input is invalid type';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA256_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA256_NO_COMMON_JS && typeof module === 'object' && module.exports;\n var AMD = typeof define === 'function' && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA256_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var EXTRA = [-2147483648, 8388608, 32768, 128];\n var SHIFT = [24, 16, 8, 0];\n var K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n ];\n var OUTPUT_TYPES = ['hex', 'array', 'digest', 'arrayBuffer'];\n\n var blocks = [];\n\n if (root.JS_SHA256_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n }\n\n if (ARRAY_BUFFER && (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n\n var createOutputMethod = function (outputType, is224) {\n return function (message) {\n return new Sha256(is224, true).update(message)[outputType]();\n };\n };\n\n var createMethod = function (is224) {\n var method = createOutputMethod('hex', is224);\n if (NODE_JS) {\n method = nodeWrap(method, is224);\n }\n method.create = function () {\n return new Sha256(is224);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createOutputMethod(type, is224);\n }\n return method;\n };\n\n var nodeWrap = function (method, is224) {\n var crypto = eval(\"require('crypto')\");\n var Buffer = eval(\"require('buffer').Buffer\");\n var algorithm = is224 ? 'sha224' : 'sha256';\n var nodeMethod = function (message) {\n if (typeof message === 'string') {\n return crypto.createHash(algorithm).update(message, 'utf8').digest('hex');\n } else {\n if (message === null || message === undefined) {\n throw new Error(ERROR);\n } else if (message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n }\n }\n if (Array.isArray(message) || ArrayBuffer.isView(message) ||\n message.constructor === Buffer) {\n return crypto.createHash(algorithm).update(new Buffer(message)).digest('hex');\n } else {\n return method(message);\n }\n };\n return nodeMethod;\n };\n\n var createHmacOutputMethod = function (outputType, is224) {\n return function (key, message) {\n return new HmacSha256(key, is224, true).update(message)[outputType]();\n };\n };\n\n var createHmacMethod = function (is224) {\n var method = createHmacOutputMethod('hex', is224);\n method.create = function (key) {\n return new HmacSha256(key, is224);\n };\n method.update = function (key, message) {\n return method.create(key).update(message);\n };\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createHmacOutputMethod(type, is224);\n }\n return method;\n };\n\n function Sha256(is224, sharedMemory) {\n if (sharedMemory) {\n blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n this.blocks = blocks;\n } else {\n this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n }\n\n if (is224) {\n this.h0 = 0xc1059ed8;\n this.h1 = 0x367cd507;\n this.h2 = 0x3070dd17;\n this.h3 = 0xf70e5939;\n this.h4 = 0xffc00b31;\n this.h5 = 0x68581511;\n this.h6 = 0x64f98fa7;\n this.h7 = 0xbefa4fa4;\n } else { // 256\n this.h0 = 0x6a09e667;\n this.h1 = 0xbb67ae85;\n this.h2 = 0x3c6ef372;\n this.h3 = 0xa54ff53a;\n this.h4 = 0x510e527f;\n this.h5 = 0x9b05688c;\n this.h6 = 0x1f83d9ab;\n this.h7 = 0x5be0cd19;\n }\n\n this.block = this.start = this.bytes = this.hBytes = 0;\n this.finalized = this.hashed = false;\n this.first = true;\n this.is224 = is224;\n }\n\n Sha256.prototype.update = function (message) {\n if (this.finalized) {\n return;\n }\n var notString, type = typeof message;\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n notString = true;\n }\n var code, index = 0, i, length = message.length, blocks = this.blocks;\n\n while (index < length) {\n if (this.hashed) {\n this.hashed = false;\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n\n if (notString) {\n for (i = this.start; index < length && i < 64; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < 64; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n\n this.lastByteIndex = i;\n this.bytes += i - this.start;\n if (i >= 64) {\n this.block = blocks[16];\n this.start = i - 64;\n this.hash();\n this.hashed = true;\n } else {\n this.start = i;\n }\n }\n if (this.bytes > 4294967295) {\n this.hBytes += this.bytes / 4294967296 << 0;\n this.bytes = this.bytes % 4294967296;\n }\n return this;\n };\n\n Sha256.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex;\n blocks[16] = this.block;\n blocks[i >> 2] |= EXTRA[i & 3];\n this.block = blocks[16];\n if (i >= 56) {\n if (!this.hashed) {\n this.hash();\n }\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n blocks[14] = this.hBytes << 3 | this.bytes >>> 29;\n blocks[15] = this.bytes << 3;\n this.hash();\n };\n\n Sha256.prototype.hash = function () {\n var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6,\n h = this.h7, blocks = this.blocks, j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc;\n\n for (j = 16; j < 64; ++j) {\n // rightrotate\n t1 = blocks[j - 15];\n s0 = ((t1 >>> 7) | (t1 << 25)) ^ ((t1 >>> 18) | (t1 << 14)) ^ (t1 >>> 3);\n t1 = blocks[j - 2];\n s1 = ((t1 >>> 17) | (t1 << 15)) ^ ((t1 >>> 19) | (t1 << 13)) ^ (t1 >>> 10);\n blocks[j] = blocks[j - 16] + s0 + blocks[j - 7] + s1 << 0;\n }\n\n bc = b & c;\n for (j = 0; j < 64; j += 4) {\n if (this.first) {\n if (this.is224) {\n ab = 300032;\n t1 = blocks[0] - 1413257819;\n h = t1 - 150054599 << 0;\n d = t1 + 24177077 << 0;\n } else {\n ab = 704751109;\n t1 = blocks[0] - 210244248;\n h = t1 - 1521486534 << 0;\n d = t1 + 143694565 << 0;\n }\n this.first = false;\n } else {\n s0 = ((a >>> 2) | (a << 30)) ^ ((a >>> 13) | (a << 19)) ^ ((a >>> 22) | (a << 10));\n s1 = ((e >>> 6) | (e << 26)) ^ ((e >>> 11) | (e << 21)) ^ ((e >>> 25) | (e << 7));\n ab = a & b;\n maj = ab ^ (a & c) ^ bc;\n ch = (e & f) ^ (~e & g);\n t1 = h + s1 + ch + K[j] + blocks[j];\n t2 = s0 + maj;\n h = d + t1 << 0;\n d = t1 + t2 << 0;\n }\n s0 = ((d >>> 2) | (d << 30)) ^ ((d >>> 13) | (d << 19)) ^ ((d >>> 22) | (d << 10));\n s1 = ((h >>> 6) | (h << 26)) ^ ((h >>> 11) | (h << 21)) ^ ((h >>> 25) | (h << 7));\n da = d & a;\n maj = da ^ (d & b) ^ ab;\n ch = (h & e) ^ (~h & f);\n t1 = g + s1 + ch + K[j + 1] + blocks[j + 1];\n t2 = s0 + maj;\n g = c + t1 << 0;\n c = t1 + t2 << 0;\n s0 = ((c >>> 2) | (c << 30)) ^ ((c >>> 13) | (c << 19)) ^ ((c >>> 22) | (c << 10));\n s1 = ((g >>> 6) | (g << 26)) ^ ((g >>> 11) | (g << 21)) ^ ((g >>> 25) | (g << 7));\n cd = c & d;\n maj = cd ^ (c & a) ^ da;\n ch = (g & h) ^ (~g & e);\n t1 = f + s1 + ch + K[j + 2] + blocks[j + 2];\n t2 = s0 + maj;\n f = b + t1 << 0;\n b = t1 + t2 << 0;\n s0 = ((b >>> 2) | (b << 30)) ^ ((b >>> 13) | (b << 19)) ^ ((b >>> 22) | (b << 10));\n s1 = ((f >>> 6) | (f << 26)) ^ ((f >>> 11) | (f << 21)) ^ ((f >>> 25) | (f << 7));\n bc = b & c;\n maj = bc ^ (b & d) ^ cd;\n ch = (f & g) ^ (~f & h);\n t1 = e + s1 + ch + K[j + 3] + blocks[j + 3];\n t2 = s0 + maj;\n e = a + t1 << 0;\n a = t1 + t2 << 0;\n }\n\n this.h0 = this.h0 + a << 0;\n this.h1 = this.h1 + b << 0;\n this.h2 = this.h2 + c << 0;\n this.h3 = this.h3 + d << 0;\n this.h4 = this.h4 + e << 0;\n this.h5 = this.h5 + f << 0;\n this.h6 = this.h6 + g << 0;\n this.h7 = this.h7 + h << 0;\n };\n\n Sha256.prototype.hex = function () {\n this.finalize();\n\n var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,\n h6 = this.h6, h7 = this.h7;\n\n var hex = HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] +\n HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] +\n HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] +\n HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] +\n HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] +\n HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] +\n HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] +\n HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] +\n HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] +\n HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] +\n HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] +\n HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] +\n HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F] +\n HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] +\n HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] +\n HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] +\n HEX_CHARS[(h4 >> 28) & 0x0F] + HEX_CHARS[(h4 >> 24) & 0x0F] +\n HEX_CHARS[(h4 >> 20) & 0x0F] + HEX_CHARS[(h4 >> 16) & 0x0F] +\n HEX_CHARS[(h4 >> 12) & 0x0F] + HEX_CHARS[(h4 >> 8) & 0x0F] +\n HEX_CHARS[(h4 >> 4) & 0x0F] + HEX_CHARS[h4 & 0x0F] +\n HEX_CHARS[(h5 >> 28) & 0x0F] + HEX_CHARS[(h5 >> 24) & 0x0F] +\n HEX_CHARS[(h5 >> 20) & 0x0F] + HEX_CHARS[(h5 >> 16) & 0x0F] +\n HEX_CHARS[(h5 >> 12) & 0x0F] + HEX_CHARS[(h5 >> 8) & 0x0F] +\n HEX_CHARS[(h5 >> 4) & 0x0F] + HEX_CHARS[h5 & 0x0F] +\n HEX_CHARS[(h6 >> 28) & 0x0F] + HEX_CHARS[(h6 >> 24) & 0x0F] +\n HEX_CHARS[(h6 >> 20) & 0x0F] + HEX_CHARS[(h6 >> 16) & 0x0F] +\n HEX_CHARS[(h6 >> 12) & 0x0F] + HEX_CHARS[(h6 >> 8) & 0x0F] +\n HEX_CHARS[(h6 >> 4) & 0x0F] + HEX_CHARS[h6 & 0x0F];\n if (!this.is224) {\n hex += HEX_CHARS[(h7 >> 28) & 0x0F] + HEX_CHARS[(h7 >> 24) & 0x0F] +\n HEX_CHARS[(h7 >> 20) & 0x0F] + HEX_CHARS[(h7 >> 16) & 0x0F] +\n HEX_CHARS[(h7 >> 12) & 0x0F] + HEX_CHARS[(h7 >> 8) & 0x0F] +\n HEX_CHARS[(h7 >> 4) & 0x0F] + HEX_CHARS[h7 & 0x0F];\n }\n return hex;\n };\n\n Sha256.prototype.toString = Sha256.prototype.hex;\n\n Sha256.prototype.digest = function () {\n this.finalize();\n\n var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,\n h6 = this.h6, h7 = this.h7;\n\n var arr = [\n (h0 >> 24) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 8) & 0xFF, h0 & 0xFF,\n (h1 >> 24) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 8) & 0xFF, h1 & 0xFF,\n (h2 >> 24) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 8) & 0xFF, h2 & 0xFF,\n (h3 >> 24) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 8) & 0xFF, h3 & 0xFF,\n (h4 >> 24) & 0xFF, (h4 >> 16) & 0xFF, (h4 >> 8) & 0xFF, h4 & 0xFF,\n (h5 >> 24) & 0xFF, (h5 >> 16) & 0xFF, (h5 >> 8) & 0xFF, h5 & 0xFF,\n (h6 >> 24) & 0xFF, (h6 >> 16) & 0xFF, (h6 >> 8) & 0xFF, h6 & 0xFF\n ];\n if (!this.is224) {\n arr.push((h7 >> 24) & 0xFF, (h7 >> 16) & 0xFF, (h7 >> 8) & 0xFF, h7 & 0xFF);\n }\n return arr;\n };\n\n Sha256.prototype.array = Sha256.prototype.digest;\n\n Sha256.prototype.arrayBuffer = function () {\n this.finalize();\n\n var buffer = new ArrayBuffer(this.is224 ? 28 : 32);\n var dataView = new DataView(buffer);\n dataView.setUint32(0, this.h0);\n dataView.setUint32(4, this.h1);\n dataView.setUint32(8, this.h2);\n dataView.setUint32(12, this.h3);\n dataView.setUint32(16, this.h4);\n dataView.setUint32(20, this.h5);\n dataView.setUint32(24, this.h6);\n if (!this.is224) {\n dataView.setUint32(28, this.h7);\n }\n return buffer;\n };\n\n function HmacSha256(key, is224, sharedMemory) {\n var i, type = typeof key;\n if (type === 'string') {\n var bytes = [], length = key.length, index = 0, code;\n for (i = 0; i < length; ++i) {\n code = key.charCodeAt(i);\n if (code < 0x80) {\n bytes[index++] = code;\n } else if (code < 0x800) {\n bytes[index++] = (0xc0 | (code >> 6));\n bytes[index++] = (0x80 | (code & 0x3f));\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes[index++] = (0xe0 | (code >> 12));\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\n bytes[index++] = (0x80 | (code & 0x3f));\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));\n bytes[index++] = (0xf0 | (code >> 18));\n bytes[index++] = (0x80 | ((code >> 12) & 0x3f));\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\n bytes[index++] = (0x80 | (code & 0x3f));\n }\n }\n key = bytes;\n } else {\n if (type === 'object') {\n if (key === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && key.constructor === ArrayBuffer) {\n key = new Uint8Array(key);\n } else if (!Array.isArray(key)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(key)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n }\n\n if (key.length > 64) {\n key = (new Sha256(is224, true)).update(key).array();\n }\n\n var oKeyPad = [], iKeyPad = [];\n for (i = 0; i < 64; ++i) {\n var b = key[i] || 0;\n oKeyPad[i] = 0x5c ^ b;\n iKeyPad[i] = 0x36 ^ b;\n }\n\n Sha256.call(this, is224, sharedMemory);\n\n this.update(iKeyPad);\n this.oKeyPad = oKeyPad;\n this.inner = true;\n this.sharedMemory = sharedMemory;\n }\n HmacSha256.prototype = new Sha256();\n\n HmacSha256.prototype.finalize = function () {\n Sha256.prototype.finalize.call(this);\n if (this.inner) {\n this.inner = false;\n var innerHash = this.array();\n Sha256.call(this, this.is224, this.sharedMemory);\n this.update(this.oKeyPad);\n this.update(innerHash);\n Sha256.prototype.finalize.call(this);\n }\n };\n\n var exports = createMethod();\n exports.sha256 = exports;\n exports.sha224 = createMethod(true);\n exports.sha256.hmac = createHmacMethod();\n exports.sha224.hmac = createHmacMethod(true);\n\n if (COMMON_JS) {\n module.exports = exports;\n } else {\n root.sha256 = exports.sha256;\n root.sha224 = exports.sha224;\n if (AMD) {\n define(function () {\n return exports;\n });\n }\n }\n})();\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*\n * Copyright 2016 Red Hat, Inc. and/or its affiliates\n * and other contributors as indicated by the @author tags.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n(function(root, factory) {\n if ( typeof exports === 'object' ) {\n if ( typeof module === 'object' ) {\n module.exports = factory( require(\"js-sha256\"), require(\"base64-js\") ); \n } else {\n exports[\"keycloak\"] = factory( require(\"js-sha256\"), require(\"base64-js\") ); \n }\n } else {\n /**\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\n *\n * @version 0.9.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2017\n * @license MIT\n */\n !function () { \"use strict\"; function t(t, i) { i ? (d[0] = d[16] = d[1] = d[2] = d[3] = d[4] = d[5] = d[6] = d[7] = d[8] = d[9] = d[10] = d[11] = d[12] = d[13] = d[14] = d[15] = 0, this.blocks = d) : this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], t ? (this.h0 = 3238371032, this.h1 = 914150663, this.h2 = 812702999, this.h3 = 4144912697, this.h4 = 4290775857, this.h5 = 1750603025, this.h6 = 1694076839, this.h7 = 3204075428) : (this.h0 = 1779033703, this.h1 = 3144134277, this.h2 = 1013904242, this.h3 = 2773480762, this.h4 = 1359893119, this.h5 = 2600822924, this.h6 = 528734635, this.h7 = 1541459225), this.block = this.start = this.bytes = this.hBytes = 0, this.finalized = this.hashed = !1, this.first = !0, this.is224 = t } function i(i, r, s) { var e, n = typeof i; if (\"string\" === n) { var o, a = [], u = i.length, c = 0; for (e = 0; e < u; ++e)(o = i.charCodeAt(e)) < 128 ? a[c++] = o : o < 2048 ? (a[c++] = 192 | o >> 6, a[c++] = 128 | 63 & o) : o < 55296 || o >= 57344 ? (a[c++] = 224 | o >> 12, a[c++] = 128 | o >> 6 & 63, a[c++] = 128 | 63 & o) : (o = 65536 + ((1023 & o) << 10 | 1023 & i.charCodeAt(++e)), a[c++] = 240 | o >> 18, a[c++] = 128 | o >> 12 & 63, a[c++] = 128 | o >> 6 & 63, a[c++] = 128 | 63 & o); i = a } else { if (\"object\" !== n) throw new Error(h); if (null === i) throw new Error(h); if (f && i.constructor === ArrayBuffer) i = new Uint8Array(i); else if (!(Array.isArray(i) || f && ArrayBuffer.isView(i))) throw new Error(h) } i.length > 64 && (i = new t(r, !0).update(i).array()); var y = [], p = []; for (e = 0; e < 64; ++e) { var l = i[e] || 0; y[e] = 92 ^ l, p[e] = 54 ^ l } t.call(this, r, s), this.update(p), this.oKeyPad = y, this.inner = !0, this.sharedMemory = s } var h = \"input is invalid type\", r = \"object\" == typeof window, s = r ? window : {}; s.JS_SHA256_NO_WINDOW && (r = !1); var e = !r && \"object\" == typeof self, n = !s.JS_SHA256_NO_NODE_JS && \"object\" == typeof process && process.versions && process.versions.node; n ? s = global : e && (s = self); var o = !s.JS_SHA256_NO_COMMON_JS && \"object\" == typeof module && module.exports, a = \"function\" == typeof define && define.amd, f = !s.JS_SHA256_NO_ARRAY_BUFFER && \"undefined\" != typeof ArrayBuffer, u = \"0123456789abcdef\".split(\"\"), c = [-2147483648, 8388608, 32768, 128], y = [24, 16, 8, 0], p = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298], l = [\"hex\", \"array\", \"digest\", \"arrayBuffer\"], d = []; !s.JS_SHA256_NO_NODE_JS && Array.isArray || (Array.isArray = function (t) { return \"[object Array]\" === Object.prototype.toString.call(t) }), !f || !s.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW && ArrayBuffer.isView || (ArrayBuffer.isView = function (t) { return \"object\" == typeof t && t.buffer && t.buffer.constructor === ArrayBuffer }); var A = function (i, h) { return function (r) { return new t(h, !0).update(r)[i]() } }, w = function (i) { var h = A(\"hex\", i); n && (h = b(h, i)), h.create = function () { return new t(i) }, h.update = function (t) { return h.create().update(t) }; for (var r = 0; r < l.length; ++r) { var s = l[r]; h[s] = A(s, i) } return h }, b = function (t, i) { var r = eval(\"require('crypto')\"), s = eval(\"require('buffer').Buffer\"), e = i ? \"sha224\" : \"sha256\", n = function (i) { if (\"string\" == typeof i) return r.createHash(e).update(i, \"utf8\").digest(\"hex\"); if (null === i || void 0 === i) throw new Error(h); return i.constructor === ArrayBuffer && (i = new Uint8Array(i)), Array.isArray(i) || ArrayBuffer.isView(i) || i.constructor === s ? r.createHash(e).update(new s(i)).digest(\"hex\") : t(i) }; return n }, v = function (t, h) { return function (r, s) { return new i(r, h, !0).update(s)[t]() } }, _ = function (t) { var h = v(\"hex\", t); h.create = function (h) { return new i(h, t) }, h.update = function (t, i) { return h.create(t).update(i) }; for (var r = 0; r < l.length; ++r) { var s = l[r]; h[s] = v(s, t) } return h }; t.prototype.update = function (t) { if (!this.finalized) { var i, r = typeof t; if (\"string\" !== r) { if (\"object\" !== r) throw new Error(h); if (null === t) throw new Error(h); if (f && t.constructor === ArrayBuffer) t = new Uint8Array(t); else if (!(Array.isArray(t) || f && ArrayBuffer.isView(t))) throw new Error(h); i = !0 } for (var s, e, n = 0, o = t.length, a = this.blocks; n < o;) { if (this.hashed && (this.hashed = !1, a[0] = this.block, a[16] = a[1] = a[2] = a[3] = a[4] = a[5] = a[6] = a[7] = a[8] = a[9] = a[10] = a[11] = a[12] = a[13] = a[14] = a[15] = 0), i) for (e = this.start; n < o && e < 64; ++n)a[e >> 2] |= t[n] << y[3 & e++]; else for (e = this.start; n < o && e < 64; ++n)(s = t.charCodeAt(n)) < 128 ? a[e >> 2] |= s << y[3 & e++] : s < 2048 ? (a[e >> 2] |= (192 | s >> 6) << y[3 & e++], a[e >> 2] |= (128 | 63 & s) << y[3 & e++]) : s < 55296 || s >= 57344 ? (a[e >> 2] |= (224 | s >> 12) << y[3 & e++], a[e >> 2] |= (128 | s >> 6 & 63) << y[3 & e++], a[e >> 2] |= (128 | 63 & s) << y[3 & e++]) : (s = 65536 + ((1023 & s) << 10 | 1023 & t.charCodeAt(++n)), a[e >> 2] |= (240 | s >> 18) << y[3 & e++], a[e >> 2] |= (128 | s >> 12 & 63) << y[3 & e++], a[e >> 2] |= (128 | s >> 6 & 63) << y[3 & e++], a[e >> 2] |= (128 | 63 & s) << y[3 & e++]); this.lastByteIndex = e, this.bytes += e - this.start, e >= 64 ? (this.block = a[16], this.start = e - 64, this.hash(), this.hashed = !0) : this.start = e } return this.bytes > 4294967295 && (this.hBytes += this.bytes / 4294967296 << 0, this.bytes = this.bytes % 4294967296), this } }, t.prototype.finalize = function () { if (!this.finalized) { this.finalized = !0; var t = this.blocks, i = this.lastByteIndex; t[16] = this.block, t[i >> 2] |= c[3 & i], this.block = t[16], i >= 56 && (this.hashed || this.hash(), t[0] = this.block, t[16] = t[1] = t[2] = t[3] = t[4] = t[5] = t[6] = t[7] = t[8] = t[9] = t[10] = t[11] = t[12] = t[13] = t[14] = t[15] = 0), t[14] = this.hBytes << 3 | this.bytes >>> 29, t[15] = this.bytes << 3, this.hash() } }, t.prototype.hash = function () { var t, i, h, r, s, e, n, o, a, f = this.h0, u = this.h1, c = this.h2, y = this.h3, l = this.h4, d = this.h5, A = this.h6, w = this.h7, b = this.blocks; for (t = 16; t < 64; ++t)i = ((s = b[t - 15]) >>> 7 | s << 25) ^ (s >>> 18 | s << 14) ^ s >>> 3, h = ((s = b[t - 2]) >>> 17 | s << 15) ^ (s >>> 19 | s << 13) ^ s >>> 10, b[t] = b[t - 16] + i + b[t - 7] + h << 0; for (a = u & c, t = 0; t < 64; t += 4)this.first ? (this.is224 ? (e = 300032, w = (s = b[0] - 1413257819) - 150054599 << 0, y = s + 24177077 << 0) : (e = 704751109, w = (s = b[0] - 210244248) - 1521486534 << 0, y = s + 143694565 << 0), this.first = !1) : (i = (f >>> 2 | f << 30) ^ (f >>> 13 | f << 19) ^ (f >>> 22 | f << 10), r = (e = f & u) ^ f & c ^ a, w = y + (s = w + (h = (l >>> 6 | l << 26) ^ (l >>> 11 | l << 21) ^ (l >>> 25 | l << 7)) + (l & d ^ ~l & A) + p[t] + b[t]) << 0, y = s + (i + r) << 0), i = (y >>> 2 | y << 30) ^ (y >>> 13 | y << 19) ^ (y >>> 22 | y << 10), r = (n = y & f) ^ y & u ^ e, A = c + (s = A + (h = (w >>> 6 | w << 26) ^ (w >>> 11 | w << 21) ^ (w >>> 25 | w << 7)) + (w & l ^ ~w & d) + p[t + 1] + b[t + 1]) << 0, i = ((c = s + (i + r) << 0) >>> 2 | c << 30) ^ (c >>> 13 | c << 19) ^ (c >>> 22 | c << 10), r = (o = c & y) ^ c & f ^ n, d = u + (s = d + (h = (A >>> 6 | A << 26) ^ (A >>> 11 | A << 21) ^ (A >>> 25 | A << 7)) + (A & w ^ ~A & l) + p[t + 2] + b[t + 2]) << 0, i = ((u = s + (i + r) << 0) >>> 2 | u << 30) ^ (u >>> 13 | u << 19) ^ (u >>> 22 | u << 10), r = (a = u & c) ^ u & y ^ o, l = f + (s = l + (h = (d >>> 6 | d << 26) ^ (d >>> 11 | d << 21) ^ (d >>> 25 | d << 7)) + (d & A ^ ~d & w) + p[t + 3] + b[t + 3]) << 0, f = s + (i + r) << 0; this.h0 = this.h0 + f << 0, this.h1 = this.h1 + u << 0, this.h2 = this.h2 + c << 0, this.h3 = this.h3 + y << 0, this.h4 = this.h4 + l << 0, this.h5 = this.h5 + d << 0, this.h6 = this.h6 + A << 0, this.h7 = this.h7 + w << 0 }, t.prototype.hex = function () { this.finalize(); var t = this.h0, i = this.h1, h = this.h2, r = this.h3, s = this.h4, e = this.h5, n = this.h6, o = this.h7, a = u[t >> 28 & 15] + u[t >> 24 & 15] + u[t >> 20 & 15] + u[t >> 16 & 15] + u[t >> 12 & 15] + u[t >> 8 & 15] + u[t >> 4 & 15] + u[15 & t] + u[i >> 28 & 15] + u[i >> 24 & 15] + u[i >> 20 & 15] + u[i >> 16 & 15] + u[i >> 12 & 15] + u[i >> 8 & 15] + u[i >> 4 & 15] + u[15 & i] + u[h >> 28 & 15] + u[h >> 24 & 15] + u[h >> 20 & 15] + u[h >> 16 & 15] + u[h >> 12 & 15] + u[h >> 8 & 15] + u[h >> 4 & 15] + u[15 & h] + u[r >> 28 & 15] + u[r >> 24 & 15] + u[r >> 20 & 15] + u[r >> 16 & 15] + u[r >> 12 & 15] + u[r >> 8 & 15] + u[r >> 4 & 15] + u[15 & r] + u[s >> 28 & 15] + u[s >> 24 & 15] + u[s >> 20 & 15] + u[s >> 16 & 15] + u[s >> 12 & 15] + u[s >> 8 & 15] + u[s >> 4 & 15] + u[15 & s] + u[e >> 28 & 15] + u[e >> 24 & 15] + u[e >> 20 & 15] + u[e >> 16 & 15] + u[e >> 12 & 15] + u[e >> 8 & 15] + u[e >> 4 & 15] + u[15 & e] + u[n >> 28 & 15] + u[n >> 24 & 15] + u[n >> 20 & 15] + u[n >> 16 & 15] + u[n >> 12 & 15] + u[n >> 8 & 15] + u[n >> 4 & 15] + u[15 & n]; return this.is224 || (a += u[o >> 28 & 15] + u[o >> 24 & 15] + u[o >> 20 & 15] + u[o >> 16 & 15] + u[o >> 12 & 15] + u[o >> 8 & 15] + u[o >> 4 & 15] + u[15 & o]), a }, t.prototype.toString = t.prototype.hex, t.prototype.digest = function () { this.finalize(); var t = this.h0, i = this.h1, h = this.h2, r = this.h3, s = this.h4, e = this.h5, n = this.h6, o = this.h7, a = [t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, 255 & t, i >> 24 & 255, i >> 16 & 255, i >> 8 & 255, 255 & i, h >> 24 & 255, h >> 16 & 255, h >> 8 & 255, 255 & h, r >> 24 & 255, r >> 16 & 255, r >> 8 & 255, 255 & r, s >> 24 & 255, s >> 16 & 255, s >> 8 & 255, 255 & s, e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e, n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, 255 & n]; return this.is224 || a.push(o >> 24 & 255, o >> 16 & 255, o >> 8 & 255, 255 & o), a }, t.prototype.array = t.prototype.digest, t.prototype.arrayBuffer = function () { this.finalize(); var t = new ArrayBuffer(this.is224 ? 28 : 32), i = new DataView(t); return i.setUint32(0, this.h0), i.setUint32(4, this.h1), i.setUint32(8, this.h2), i.setUint32(12, this.h3), i.setUint32(16, this.h4), i.setUint32(20, this.h5), i.setUint32(24, this.h6), this.is224 || i.setUint32(28, this.h7), t }, i.prototype = new t, i.prototype.finalize = function () { if (t.prototype.finalize.call(this), this.inner) { this.inner = !1; var i = this.array(); t.call(this, this.is224, this.sharedMemory), this.update(this.oKeyPad), this.update(i), t.prototype.finalize.call(this) } }; var B = w(); B.sha256 = B, B.sha224 = w(!0), B.sha256.hmac = _(), B.sha224.hmac = _(!0), o ? module.exports = B : (s.sha256 = B.sha256, s.sha224 = B.sha224, a && define(function () { return B })) }();\n\n /**\n * [base64-js]{@link https://github.com/beatgammit/base64-js}\n *\n * @version v1.3.0 \n * @author Kirill, Fomichev\n * @copyright Kirill, Fomichev 2014\n * @license MIT\n */\n (function (r) { if (typeof exports === \"object\" && typeof module !== \"undefined\") { module.exports = r() } else if (typeof define === \"function\" && define.amd) { define([], r) } else { var e; if (typeof window !== \"undefined\") { e = window } else if (typeof global !== \"undefined\") { e = global } else if (typeof self !== \"undefined\") { e = self } else { e = this } e.base64js = r() } })(function () { var r, e, n; return function () { function r(e, n, t) { function o(f, i) { if (!n[f]) { if (!e[f]) { var u = \"function\" == typeof require && require; if (!i && u) return u(f, !0); if (a) return a(f, !0); var v = new Error(\"Cannot find module '\" + f + \"'\"); throw v.code = \"MODULE_NOT_FOUND\", v } var d = n[f] = { exports: {} }; e[f][0].call(d.exports, function (r) { var n = e[f][1][r]; return o(n || r) }, d, d.exports, r, e, n, t) } return n[f].exports } for (var a = \"function\" == typeof require && require, f = 0; f < t.length; f++)o(t[f]); return o } return r }()({ \"/\": [function (r, e, n) { \"use strict\"; n.byteLength = d; n.toByteArray = h; n.fromByteArray = p; var t = []; var o = []; var a = typeof Uint8Array !== \"undefined\" ? Uint8Array : Array; var f = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"; for (var i = 0, u = f.length; i < u; ++i) { t[i] = f[i]; o[f.charCodeAt(i)] = i } o[\"-\".charCodeAt(0)] = 62; o[\"_\".charCodeAt(0)] = 63; function v(r) { var e = r.length; if (e % 4 > 0) { throw new Error(\"Invalid string. Length must be a multiple of 4\") } var n = r.indexOf(\"=\"); if (n === -1) n = e; var t = n === e ? 0 : 4 - n % 4; return [n, t] } function d(r) { var e = v(r); var n = e[0]; var t = e[1]; return (n + t) * 3 / 4 - t } function c(r, e, n) { return (e + n) * 3 / 4 - n } function h(r) { var e; var n = v(r); var t = n[0]; var f = n[1]; var i = new a(c(r, t, f)); var u = 0; var d = f > 0 ? t - 4 : t; for (var h = 0; h < d; h += 4) { e = o[r.charCodeAt(h)] << 18 | o[r.charCodeAt(h + 1)] << 12 | o[r.charCodeAt(h + 2)] << 6 | o[r.charCodeAt(h + 3)]; i[u++] = e >> 16 & 255; i[u++] = e >> 8 & 255; i[u++] = e & 255 } if (f === 2) { e = o[r.charCodeAt(h)] << 2 | o[r.charCodeAt(h + 1)] >> 4; i[u++] = e & 255 } if (f === 1) { e = o[r.charCodeAt(h)] << 10 | o[r.charCodeAt(h + 1)] << 4 | o[r.charCodeAt(h + 2)] >> 2; i[u++] = e >> 8 & 255; i[u++] = e & 255 } return i } function s(r) { return t[r >> 18 & 63] + t[r >> 12 & 63] + t[r >> 6 & 63] + t[r & 63] } function l(r, e, n) { var t; var o = []; for (var a = e; a < n; a += 3) { t = (r[a] << 16 & 16711680) + (r[a + 1] << 8 & 65280) + (r[a + 2] & 255); o.push(s(t)) } return o.join(\"\") } function p(r) { var e; var n = r.length; var o = n % 3; var a = []; var f = 16383; for (var i = 0, u = n - o; i < u; i += f) { a.push(l(r, i, i + f > u ? u : i + f)) } if (o === 1) { e = r[n - 1]; a.push(t[e >> 2] + t[e << 4 & 63] + \"==\") } else if (o === 2) { e = (r[n - 2] << 8) + r[n - 1]; a.push(t[e >> 10] + t[e >> 4 & 63] + t[e << 2 & 63] + \"=\") } return a.join(\"\") } }, {}] }, {}, [])(\"/\") });\n\n /**\n * [promise-polyfill]{@link https://github.com/taylorhakes/promise-polyfill}\n *\n * @version v8.1.3 \n * @author Hakes, Taylor\n * @copyright Hakes, Taylor 2014\n * @license MIT\n */\n !function(e,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?n():\"function\"==typeof define&&define.amd?define(n):n()}(0,function(){\"use strict\";function e(e){var n=this.constructor;return this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){return n.reject(t)})})}function n(e){return!(!e||\"undefined\"==typeof e.length)}function t(){}function o(e){if(!(this instanceof o))throw new TypeError(\"Promises must be constructed via new\");if(\"function\"!=typeof e)throw new TypeError(\"not a function\");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],c(e,this)}function r(e,n){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,o._immediateFn(function(){var t=1===e._state?n.onFulfilled:n.onRejected;if(null!==t){var o;try{o=t(e._value)}catch(r){return void f(n.promise,r)}i(n.promise,o)}else(1===e._state?i:f)(n.promise,e._value)})):e._deferreds.push(n)}function i(e,n){try{if(n===e)throw new TypeError(\"A promise cannot be resolved with itself.\");if(n&&(\"object\"==typeof n||\"function\"==typeof n)){var t=n.then;if(n instanceof o)return e._state=3,e._value=n,void u(e);if(\"function\"==typeof t)return void c(function(e,n){return function(){e.apply(n,arguments)}}(t,n),e)}e._state=1,e._value=n,u(e)}catch(r){f(e,r)}}function f(e,n){e._state=2,e._value=n,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&o._immediateFn(function(){e._handled||o._unhandledRejectionFn(e._value)});for(var n=0,t=e._deferreds.length;t>n;n++)r(e,e._deferreds[n]);e._deferreds=null}function c(e,n){var t=!1;try{e(function(e){t||(t=!0,i(n,e))},function(e){t||(t=!0,f(n,e))})}catch(o){if(t)return;t=!0,f(n,o)}}var a=setTimeout;o.prototype[\"catch\"]=function(e){return this.then(null,e)},o.prototype.then=function(e,n){var o=new this.constructor(t);return r(this,new function(e,n,t){this.onFulfilled=\"function\"==typeof e?e:null,this.onRejected=\"function\"==typeof n?n:null,this.promise=t}(e,n,o)),o},o.prototype[\"finally\"]=e,o.all=function(e){return new o(function(t,o){function r(e,n){try{if(n&&(\"object\"==typeof n||\"function\"==typeof n)){var u=n.then;if(\"function\"==typeof u)return void u.call(n,function(n){r(e,n)},o)}i[e]=n,0==--f&&t(i)}catch(c){o(c)}}if(!n(e))return o(new TypeError(\"Promise.all accepts an array\"));var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);for(var f=i.length,u=0;i.length>u;u++)r(u,i[u])})},o.resolve=function(e){return e&&\"object\"==typeof e&&e.constructor===o?e:new o(function(n){n(e)})},o.reject=function(e){return new o(function(n,t){t(e)})},o.race=function(e){return new o(function(t,r){if(!n(e))return r(new TypeError(\"Promise.race accepts an array\"));for(var i=0,f=e.length;f>i;i++)o.resolve(e[i]).then(t,r)})},o._immediateFn=\"function\"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){a(e,0)},o._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn(\"Possible Unhandled Promise Rejection:\",e)};var l=function(){if(\"undefined\"!=typeof self)return self;if(\"undefined\"!=typeof window)return window;if(\"undefined\"!=typeof global)return global;throw Error(\"unable to locate global object\")}();\"Promise\"in l?l.Promise.prototype[\"finally\"]||(l.Promise.prototype[\"finally\"]=e):l.Promise=o});\n\n var Keycloak = factory( root[\"sha256\"], root[\"base64js\"] );\n root[\"Keycloak\"] = Keycloak;\n\n if ( typeof define === \"function\" && define.amd ) { \n define( \"keycloak\", [], function () { return Keycloak; } );\n }\n }\n})(window, function (sha256_imported, base64js_imported) {\n if (typeof Promise === 'undefined') {\n throw Error('Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.');\n }\n\n var loggedPromiseDeprecation = false;\n\n function logPromiseDeprecation() {\n if (!loggedPromiseDeprecation) {\n loggedPromiseDeprecation = true;\n console.warn('[KEYCLOAK] Usage of legacy style promise methods such as `.error()` and `.success()` has been deprecated and support will be removed in future versions. Use standard style promise methods such as `.then() and `.catch()` instead.');\n }\n }\n\n function toKeycloakPromise(promise) {\n promise.__proto__ = KeycloakPromise.prototype;\n return promise;\n }\n\n function KeycloakPromise(executor) {\n return toKeycloakPromise(new Promise(executor));\n }\n\n KeycloakPromise.prototype = Object.create(Promise.prototype);\n KeycloakPromise.prototype.constructor = KeycloakPromise;\n\n KeycloakPromise.prototype.success = function(callback) {\n logPromiseDeprecation();\n\n var promise = this.then(function handleSuccess(value) {\n callback(value);\n });\n \n return toKeycloakPromise(promise);\n };\n\n KeycloakPromise.prototype.error = function(callback) {\n logPromiseDeprecation();\n\n var promise = this.catch(function handleError(error) {\n callback(error);\n });\n\n return toKeycloakPromise(promise);\n };\n\n function Keycloak (config) {\n if (!(this instanceof Keycloak)) {\n return new Keycloak(config);\n }\n\n var kc = this;\n var adapter;\n var refreshQueue = [];\n var callbackStorage;\n\n var loginIframe = {\n enable: true,\n callbackList: [],\n interval: 5\n };\n\n var scripts = document.getElementsByTagName('script');\n for (var i = 0; i < scripts.length; i++) {\n if ((scripts[i].src.indexOf('keycloak.js') !== -1 || scripts[i].src.indexOf('keycloak.min.js') !== -1) && scripts[i].src.indexOf('version=') !== -1) {\n kc.iframeVersion = scripts[i].src.substring(scripts[i].src.indexOf('version=') + 8).split('&')[0];\n }\n }\n\n var useNonce = true;\n var logInfo = createLogger(console.info);\n var logWarn = createLogger(console.warn);\n \n kc.init = function (initOptions) {\n kc.authenticated = false;\n\n callbackStorage = createCallbackStorage();\n var adapters = ['default', 'cordova', 'cordova-native'];\n\n if (initOptions && adapters.indexOf(initOptions.adapter) > -1) {\n adapter = loadAdapter(initOptions.adapter);\n } else if (initOptions && typeof initOptions.adapter === \"object\") {\n adapter = initOptions.adapter;\n } else {\n if (window.Cordova || window.cordova) {\n adapter = loadAdapter('cordova');\n } else {\n adapter = loadAdapter();\n }\n }\n\n if (initOptions) {\n if (typeof initOptions.useNonce !== 'undefined') {\n useNonce = initOptions.useNonce;\n }\n\n if (typeof initOptions.checkLoginIframe !== 'undefined') {\n loginIframe.enable = initOptions.checkLoginIframe;\n }\n\n if (initOptions.checkLoginIframeInterval) {\n loginIframe.interval = initOptions.checkLoginIframeInterval;\n }\n\n if (initOptions.onLoad === 'login-required') {\n kc.loginRequired = true;\n }\n\n if (initOptions.responseMode) {\n if (initOptions.responseMode === 'query' || initOptions.responseMode === 'fragment') {\n kc.responseMode = initOptions.responseMode;\n } else {\n throw 'Invalid value for responseMode';\n }\n }\n\n if (initOptions.flow) {\n switch (initOptions.flow) {\n case 'standard':\n kc.responseType = 'code';\n break;\n case 'implicit':\n kc.responseType = 'id_token token';\n break;\n case 'hybrid':\n kc.responseType = 'code id_token token';\n break;\n default:\n throw 'Invalid value for flow';\n }\n kc.flow = initOptions.flow;\n }\n\n if (initOptions.timeSkew != null) {\n kc.timeSkew = initOptions.timeSkew;\n }\n\n if(initOptions.redirectUri) {\n kc.redirectUri = initOptions.redirectUri;\n }\n\n if (initOptions.silentCheckSsoRedirectUri) {\n kc.silentCheckSsoRedirectUri = initOptions.silentCheckSsoRedirectUri;\n }\n\n if (initOptions.pkceMethod) {\n if (initOptions.pkceMethod !== \"S256\") {\n throw 'Invalid value for pkceMethod';\n }\n kc.pkceMethod = initOptions.pkceMethod;\n }\n\n if (typeof initOptions.enableLogging === 'boolean') {\n kc.enableLogging = initOptions.enableLogging;\n } else {\n kc.enableLogging = false;\n }\n }\n\n if (!kc.responseMode) {\n kc.responseMode = 'fragment';\n }\n if (!kc.responseType) {\n kc.responseType = 'code';\n kc.flow = 'standard';\n }\n\n var promise = createPromise();\n\n var initPromise = createPromise();\n initPromise.promise.then(function() {\n kc.onReady && kc.onReady(kc.authenticated);\n promise.setSuccess(kc.authenticated);\n }).catch(function(errorData) {\n promise.setError(errorData);\n });\n\n var configPromise = loadConfig(config);\n\n function onLoad() {\n var doLogin = function(prompt) {\n if (!prompt) {\n options.prompt = 'none';\n }\n\n kc.login(options).then(function () {\n initPromise.setSuccess();\n }).catch(function () {\n initPromise.setError();\n });\n }\n\n var checkSsoSilently = function() {\n var ifrm = document.createElement(\"iframe\");\n var src = kc.createLoginUrl({prompt: 'none', redirectUri: kc.silentCheckSsoRedirectUri});\n ifrm.setAttribute(\"src\", src);\n ifrm.setAttribute(\"title\", \"keycloak-silent-check-sso\");\n ifrm.style.display = \"none\";\n document.body.appendChild(ifrm);\n\n var messageCallback = function(event) {\n if (event.origin !== window.location.origin || ifrm.contentWindow !== event.source) {\n return;\n }\n\n var oauth = parseCallback(event.data);\n processCallback(oauth, initPromise);\n\n document.body.removeChild(ifrm);\n window.removeEventListener(\"message\", messageCallback);\n };\n\n window.addEventListener(\"message\", messageCallback);\n };\n\n var options = {};\n switch (initOptions.onLoad) {\n case 'check-sso':\n if (loginIframe.enable) {\n setupCheckLoginIframe().then(function() {\n checkLoginIframe().then(function (unchanged) {\n if (!unchanged) {\n kc.silentCheckSsoRedirectUri ? checkSsoSilently() : doLogin(false);\n } else {\n initPromise.setSuccess();\n }\n }).catch(function () {\n initPromise.setError();\n });\n });\n } else {\n kc.silentCheckSsoRedirectUri ? checkSsoSilently() : doLogin(false);\n }\n break;\n case 'login-required':\n doLogin(true);\n break;\n default:\n throw 'Invalid value for onLoad';\n }\n }\n\n function processInit() {\n var callback = parseCallback(window.location.href);\n\n if (callback) {\n window.history.replaceState(window.history.state, null, callback.newUrl);\n }\n\n if (callback && callback.valid) {\n return setupCheckLoginIframe().then(function() {\n processCallback(callback, initPromise);\n }).catch(function (e) {\n initPromise.setError();\n });\n } else if (initOptions) {\n if (initOptions.token && initOptions.refreshToken) {\n setToken(initOptions.token, initOptions.refreshToken, initOptions.idToken);\n\n if (loginIframe.enable) {\n setupCheckLoginIframe().then(function() {\n checkLoginIframe().then(function (unchanged) {\n if (unchanged) {\n kc.onAuthSuccess && kc.onAuthSuccess();\n initPromise.setSuccess();\n scheduleCheckIframe();\n } else {\n initPromise.setSuccess();\n }\n }).catch(function () {\n initPromise.setError();\n });\n });\n } else {\n kc.updateToken(-1).then(function() {\n kc.onAuthSuccess && kc.onAuthSuccess();\n initPromise.setSuccess();\n }).catch(function() {\n kc.onAuthError && kc.onAuthError();\n if (initOptions.onLoad) {\n onLoad();\n } else {\n initPromise.setError();\n }\n });\n }\n } else if (initOptions.onLoad) {\n onLoad();\n } else {\n initPromise.setSuccess();\n }\n } else {\n initPromise.setSuccess();\n }\n }\n\n configPromise.then(processInit);\n configPromise.catch(function() {\n promise.setError();\n });\n\n return promise.promise;\n }\n\n kc.login = function (options) {\n return adapter.login(options);\n }\n\n function generateRandomData(len) {\n // use web crypto APIs if possible\n var array = null;\n var crypto = window.crypto || window.msCrypto;\n if (crypto && crypto.getRandomValues && window.Uint8Array) {\n array = new Uint8Array(len);\n crypto.getRandomValues(array);\n return array;\n }\n\n // fallback to Math random\n array = new Array(len);\n for (var j = 0; j < array.length; j++) {\n array[j] = Math.floor(256 * Math.random());\n }\n return array;\n }\n\n function generateCodeVerifier(len) {\n return generateRandomString(len, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789');\n }\n\n function generateRandomString(len, alphabet){\n var randomData = generateRandomData(len);\n var chars = new Array(len);\n for (var i = 0; i < len; i++) {\n chars[i] = alphabet.charCodeAt(randomData[i] % alphabet.length);\n }\n return String.fromCharCode.apply(null, chars);\n }\n\n function generatePkceChallenge(pkceMethod, codeVerifier) {\n switch (pkceMethod) {\n // The use of the \"plain\" method is considered insecure and therefore not supported.\n case \"S256\":\n // hash codeVerifier, then encode as url-safe base64 without padding\n var hashBytes = new Uint8Array(sha256_imported.arrayBuffer(codeVerifier));\n var encodedHash = base64js_imported.fromByteArray(hashBytes)\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_')\n .replace(/\\=/g, '');\n return encodedHash;\n default:\n throw 'Invalid value for pkceMethod';\n }\n }\n\n kc.createLoginUrl = function(options) {\n var state = createUUID();\n var nonce = createUUID();\n\n var redirectUri = adapter.redirectUri(options);\n\n var callbackState = {\n state: state,\n nonce: nonce,\n redirectUri: encodeURIComponent(redirectUri)\n };\n\n if (options && options.prompt) {\n callbackState.prompt = options.prompt;\n }\n\n var baseUrl;\n if (options && options.action == 'register') {\n baseUrl = kc.endpoints.register();\n } else {\n baseUrl = kc.endpoints.authorize();\n }\n\n var scope;\n if (options && options.scope) {\n if (options.scope.indexOf(\"openid\") != -1) {\n scope = options.scope;\n } else {\n scope = \"openid \" + options.scope;\n }\n } else {\n scope = \"openid\";\n }\n\n var url = baseUrl\n + '?client_id=' + encodeURIComponent(kc.clientId)\n + '&redirect_uri=' + encodeURIComponent(redirectUri)\n + '&state=' + encodeURIComponent(state)\n + '&response_mode=' + encodeURIComponent(kc.responseMode)\n + '&response_type=' + encodeURIComponent(kc.responseType)\n + '&scope=' + encodeURIComponent(scope);\n if (useNonce) {\n url = url + '&nonce=' + encodeURIComponent(nonce);\n }\n\n if (options && options.prompt) {\n url += '&prompt=' + encodeURIComponent(options.prompt);\n }\n\n if (options && options.maxAge) {\n url += '&max_age=' + encodeURIComponent(options.maxAge);\n }\n\n if (options && options.loginHint) {\n url += '&login_hint=' + encodeURIComponent(options.loginHint);\n }\n\n if (options && options.idpHint) {\n url += '&kc_idp_hint=' + encodeURIComponent(options.idpHint);\n }\n\n if (options && options.locale) {\n url += '&ui_locales=' + encodeURIComponent(options.locale);\n }\n\n if (kc.pkceMethod) {\n var codeVerifier = generateCodeVerifier(96);\n callbackState.pkceCodeVerifier = codeVerifier;\n var pkceChallenge = generatePkceChallenge(kc.pkceMethod, codeVerifier);\n url += '&code_challenge=' + pkceChallenge;\n url += '&code_challenge_method=' + kc.pkceMethod;\n }\n\n callbackStorage.add(callbackState);\n\n return url;\n }\n\n kc.logout = function(options) {\n return adapter.logout(options);\n }\n\n kc.createLogoutUrl = function(options) {\n var url = kc.endpoints.logout()\n + '?redirect_uri=' + encodeURIComponent(adapter.redirectUri(options, false));\n\n return url;\n }\n\n kc.register = function (options) {\n return adapter.register(options);\n }\n\n kc.createRegisterUrl = function(options) {\n if (!options) {\n options = {};\n }\n options.action = 'register';\n return kc.createLoginUrl(options);\n }\n\n kc.createAccountUrl = function(options) {\n var realm = getRealmUrl();\n var url = undefined;\n if (typeof realm !== 'undefined') {\n url = realm\n + '/account'\n + '?referrer=' + encodeURIComponent(kc.clientId)\n + '&referrer_uri=' + encodeURIComponent(adapter.redirectUri(options));\n }\n return url;\n }\n\n kc.accountManagement = function() {\n return adapter.accountManagement();\n }\n\n kc.hasRealmRole = function (role) {\n var access = kc.realmAccess;\n return !!access && access.roles.indexOf(role) >= 0;\n }\n\n kc.hasResourceRole = function(role, resource) {\n if (!kc.resourceAccess) {\n return false;\n }\n\n var access = kc.resourceAccess[resource || kc.clientId];\n return !!access && access.roles.indexOf(role) >= 0;\n }\n\n kc.loadUserProfile = function() {\n var url = getRealmUrl() + '/account';\n var req = new XMLHttpRequest();\n req.open('GET', url, true);\n req.setRequestHeader('Accept', 'application/json');\n req.setRequestHeader('Authorization', 'bearer ' + kc.token);\n\n var promise = createPromise();\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200) {\n kc.profile = JSON.parse(req.responseText);\n promise.setSuccess(kc.profile);\n } else {\n promise.setError();\n }\n }\n }\n\n req.send();\n\n return promise.promise;\n }\n\n kc.loadUserInfo = function() {\n var url = kc.endpoints.userinfo();\n var req = new XMLHttpRequest();\n req.open('GET', url, true);\n req.setRequestHeader('Accept', 'application/json');\n req.setRequestHeader('Authorization', 'bearer ' + kc.token);\n\n var promise = createPromise();\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200) {\n kc.userInfo = JSON.parse(req.responseText);\n promise.setSuccess(kc.userInfo);\n } else {\n promise.setError();\n }\n }\n }\n\n req.send();\n\n return promise.promise;\n }\n\n kc.isTokenExpired = function(minValidity) {\n if (!kc.tokenParsed || (!kc.refreshToken && kc.flow != 'implicit' )) {\n throw 'Not authenticated';\n }\n\n if (kc.timeSkew == null) {\n logInfo('[KEYCLOAK] Unable to determine if token is expired as timeskew is not set');\n return true;\n }\n\n var expiresIn = kc.tokenParsed['exp'] - Math.ceil(new Date().getTime() / 1000) + kc.timeSkew;\n if (minValidity) {\n if (isNaN(minValidity)) {\n throw 'Invalid minValidity';\n }\n expiresIn -= minValidity;\n }\n return expiresIn < 0;\n }\n\n kc.updateToken = function(minValidity) {\n var promise = createPromise();\n\n if (!kc.refreshToken) {\n promise.setError();\n return promise.promise;\n }\n\n minValidity = minValidity || 5;\n\n var exec = function() {\n var refreshToken = false;\n if (minValidity == -1) {\n refreshToken = true;\n logInfo('[KEYCLOAK] Refreshing token: forced refresh');\n } else if (!kc.tokenParsed || kc.isTokenExpired(minValidity)) {\n refreshToken = true;\n logInfo('[KEYCLOAK] Refreshing token: token expired');\n }\n\n if (!refreshToken) {\n promise.setSuccess(false);\n } else {\n var params = 'grant_type=refresh_token&' + 'refresh_token=' + kc.refreshToken;\n var url = kc.endpoints.token();\n\n refreshQueue.push(promise);\n\n if (refreshQueue.length == 1) {\n var req = new XMLHttpRequest();\n req.open('POST', url, true);\n req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');\n req.withCredentials = true;\n\n params += '&client_id=' + encodeURIComponent(kc.clientId);\n\n var timeLocal = new Date().getTime();\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200) {\n logInfo('[KEYCLOAK] Token refreshed');\n\n timeLocal = (timeLocal + new Date().getTime()) / 2;\n\n var tokenResponse = JSON.parse(req.responseText);\n\n setToken(tokenResponse['access_token'], tokenResponse['refresh_token'], tokenResponse['id_token'], timeLocal);\n\n kc.onAuthRefreshSuccess && kc.onAuthRefreshSuccess();\n for (var p = refreshQueue.pop(); p != null; p = refreshQueue.pop()) {\n p.setSuccess(true);\n }\n } else {\n logWarn('[KEYCLOAK] Failed to refresh token');\n\n if (req.status == 400) {\n kc.clearToken();\n }\n\n kc.onAuthRefreshError && kc.onAuthRefreshError();\n for (var p = refreshQueue.pop(); p != null; p = refreshQueue.pop()) {\n p.setError(true);\n }\n }\n }\n };\n\n req.send(params);\n }\n }\n }\n\n if (loginIframe.enable) {\n var iframePromise = checkLoginIframe();\n iframePromise.then(function() {\n exec();\n }).catch(function() {\n promise.setError();\n });\n } else {\n exec();\n }\n\n return promise.promise;\n }\n\n kc.clearToken = function() {\n if (kc.token) {\n setToken(null, null, null);\n kc.onAuthLogout && kc.onAuthLogout();\n if (kc.loginRequired) {\n kc.login();\n }\n }\n }\n\n function getRealmUrl() {\n if (typeof kc.authServerUrl !== 'undefined') {\n if (kc.authServerUrl.charAt(kc.authServerUrl.length - 1) == '/') {\n return kc.authServerUrl + 'realms/' + encodeURIComponent(kc.realm);\n } else {\n return kc.authServerUrl + '/realms/' + encodeURIComponent(kc.realm);\n }\n } else {\n \treturn undefined;\n }\n }\n\n function getOrigin() {\n if (!window.location.origin) {\n return window.location.protocol + \"//\" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');\n } else {\n return window.location.origin;\n }\n }\n\n function processCallback(oauth, promise) {\n var code = oauth.code;\n var error = oauth.error;\n var prompt = oauth.prompt;\n\n var timeLocal = new Date().getTime();\n\n if (error) {\n if (prompt != 'none') {\n var errorData = { error: error, error_description: oauth.error_description };\n kc.onAuthError && kc.onAuthError(errorData);\n promise && promise.setError(errorData);\n } else {\n promise && promise.setSuccess();\n }\n return;\n } else if ((kc.flow != 'standard') && (oauth.access_token || oauth.id_token)) {\n authSuccess(oauth.access_token, null, oauth.id_token, true);\n }\n\n if ((kc.flow != 'implicit') && code) {\n var params = 'code=' + code + '&grant_type=authorization_code';\n var url = kc.endpoints.token();\n\n var req = new XMLHttpRequest();\n req.open('POST', url, true);\n req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');\n\n params += '&client_id=' + encodeURIComponent(kc.clientId);\n params += '&redirect_uri=' + oauth.redirectUri;\n\n if (oauth.pkceCodeVerifier) {\n params += '&code_verifier=' + oauth.pkceCodeVerifier;\n }\n\n req.withCredentials = true;\n\n req.onreadystatechange = function() {\n if (req.readyState == 4) {\n if (req.status == 200) {\n\n var tokenResponse = JSON.parse(req.responseText);\n authSuccess(tokenResponse['access_token'], tokenResponse['refresh_token'], tokenResponse['id_token'], kc.flow === 'standard');\n scheduleCheckIframe();\n } else {\n kc.onAuthError && kc.onAuthError();\n promise && promise.setError();\n }\n }\n };\n\n req.send(params);\n }\n\n function authSuccess(accessToken, refreshToken, idToken, fulfillPromise) {\n timeLocal = (timeLocal + new Date().getTime()) / 2;\n\n setToken(accessToken, refreshToken, idToken, timeLocal);\n\n if (useNonce && ((kc.tokenParsed && kc.tokenParsed.nonce != oauth.storedNonce) ||\n (kc.refreshTokenParsed && kc.refreshTokenParsed.nonce != oauth.storedNonce) ||\n (kc.idTokenParsed && kc.idTokenParsed.nonce != oauth.storedNonce))) {\n\n logInfo('[KEYCLOAK] Invalid nonce, clearing token');\n kc.clearToken();\n promise && promise.setError();\n } else {\n if (fulfillPromise) {\n kc.onAuthSuccess && kc.onAuthSuccess();\n promise && promise.setSuccess();\n }\n }\n }\n\n }\n\n function loadConfig(url) {\n var promise = createPromise();\n var configUrl;\n\n if (!config) {\n configUrl = 'keycloak.json';\n } else if (typeof config === 'string') {\n configUrl = config;\n }\n\n function setupOidcEndoints(oidcConfiguration) {\n if (! oidcConfiguration) {\n kc.endpoints = {\n authorize: function() {\n return getRealmUrl() + '/protocol/openid-connect/auth';\n },\n token: function() {\n return getRealmUrl() + '/protocol/openid-connect/token';\n },\n logout: function() {\n return getRealmUrl() + '/protocol/openid-connect/logout';\n },\n checkSessionIframe: function() {\n var src = getRealmUrl() + '/protocol/openid-connect/login-status-iframe.html';\n if (kc.iframeVersion) {\n src = src + '?version=' + kc.iframeVersion;\n }\n return src;\n },\n register: function() {\n return getRealmUrl() + '/protocol/openid-connect/registrations';\n },\n userinfo: function() {\n return getRealmUrl() + '/protocol/openid-connect/userinfo';\n }\n };\n } else {\n kc.endpoints = {\n authorize: function() {\n return oidcConfiguration.authorization_endpoint;\n },\n token: function() {\n return oidcConfiguration.token_endpoint;\n },\n logout: function() {\n if (!oidcConfiguration.end_session_endpoint) {\n throw \"Not supported by the OIDC server\";\n }\n return oidcConfiguration.end_session_endpoint;\n },\n checkSessionIframe: function() {\n if (!oidcConfiguration.check_session_iframe) {\n throw \"Not supported by the OIDC server\";\n }\n return oidcConfiguration.check_session_iframe;\n },\n register: function() {\n throw 'Redirection to \"Register user\" page not supported in standard OIDC mode';\n },\n userinfo: function() {\n if (!oidcConfiguration.userinfo_endpoint) {\n throw \"Not supported by the OIDC server\";\n }\n return oidcConfiguration.userinfo_endpoint;\n }\n }\n }\n }\n\n if (configUrl) {\n var req = new XMLHttpRequest();\n req.open('GET', configUrl, true);\n req.setRequestHeader('Accept', 'application/json');\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200 || fileLoaded(req)) {\n var config = JSON.parse(req.responseText);\n\n kc.authServerUrl = config['auth-server-url'];\n kc.realm = config['realm'];\n kc.clientId = config['resource'];\n setupOidcEndoints(null);\n promise.setSuccess();\n } else {\n promise.setError();\n }\n }\n };\n\n req.send();\n } else {\n if (!config.clientId) {\n throw 'clientId missing';\n }\n\n kc.clientId = config.clientId;\n\n var oidcProvider = config['oidcProvider'];\n if (!oidcProvider) {\n if (!config['url']) {\n var scripts = document.getElementsByTagName('script');\n for (var i = 0; i < scripts.length; i++) {\n if (scripts[i].src.match(/.*keycloak\\.js/)) {\n config.url = scripts[i].src.substr(0, scripts[i].src.indexOf('/js/keycloak.js'));\n break;\n }\n }\n }\n if (!config.realm) {\n throw 'realm missing';\n }\n\n kc.authServerUrl = config.url;\n kc.realm = config.realm;\n setupOidcEndoints(null);\n promise.setSuccess();\n } else {\n if (typeof oidcProvider === 'string') {\n var oidcProviderConfigUrl;\n if (oidcProvider.charAt(oidcProvider.length - 1) == '/') {\n oidcProviderConfigUrl = oidcProvider + '.well-known/openid-configuration';\n } else {\n oidcProviderConfigUrl = oidcProvider + '/.well-known/openid-configuration';\n }\n var req = new XMLHttpRequest();\n req.open('GET', oidcProviderConfigUrl, true);\n req.setRequestHeader('Accept', 'application/json');\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200 || fileLoaded(req)) {\n var oidcProviderConfig = JSON.parse(req.responseText);\n setupOidcEndoints(oidcProviderConfig);\n promise.setSuccess();\n } else {\n promise.setError();\n }\n }\n };\n\n req.send();\n } else {\n setupOidcEndoints(oidcProvider);\n promise.setSuccess();\n }\n }\n }\n\n return promise.promise;\n }\n\n function fileLoaded(xhr) {\n return xhr.status == 0 && xhr.responseText && xhr.responseURL.startsWith('file:');\n }\n\n function setToken(token, refreshToken, idToken, timeLocal) {\n if (kc.tokenTimeoutHandle) {\n clearTimeout(kc.tokenTimeoutHandle);\n kc.tokenTimeoutHandle = null;\n }\n\n if (refreshToken) {\n kc.refreshToken = refreshToken;\n kc.refreshTokenParsed = decodeToken(refreshToken);\n } else {\n delete kc.refreshToken;\n delete kc.refreshTokenParsed;\n }\n\n if (idToken) {\n kc.idToken = idToken;\n kc.idTokenParsed = decodeToken(idToken);\n } else {\n delete kc.idToken;\n delete kc.idTokenParsed;\n }\n\n if (token) {\n kc.token = token;\n kc.tokenParsed = decodeToken(token);\n kc.sessionId = kc.tokenParsed.session_state;\n kc.authenticated = true;\n kc.subject = kc.tokenParsed.sub;\n kc.realmAccess = kc.tokenParsed.realm_access;\n kc.resourceAccess = kc.tokenParsed.resource_access;\n\n if (timeLocal) {\n kc.timeSkew = Math.floor(timeLocal / 1000) - kc.tokenParsed.iat;\n }\n\n if (kc.timeSkew != null) {\n logInfo('[KEYCLOAK] Estimated time difference between browser and server is ' + kc.timeSkew + ' seconds');\n\n if (kc.onTokenExpired) {\n var expiresIn = (kc.tokenParsed['exp'] - (new Date().getTime() / 1000) + kc.timeSkew) * 1000;\n logInfo('[KEYCLOAK] Token expires in ' + Math.round(expiresIn / 1000) + ' s');\n if (expiresIn <= 0) {\n kc.onTokenExpired();\n } else {\n kc.tokenTimeoutHandle = setTimeout(kc.onTokenExpired, expiresIn);\n }\n }\n }\n } else {\n delete kc.token;\n delete kc.tokenParsed;\n delete kc.subject;\n delete kc.realmAccess;\n delete kc.resourceAccess;\n\n kc.authenticated = false;\n }\n }\n\n function decodeToken(str) {\n str = str.split('.')[1];\n\n str = str.replace('/-/g', '+');\n str = str.replace('/_/g', '/');\n switch (str.length % 4)\n {\n case 0:\n break;\n case 2:\n str += '==';\n break;\n case 3:\n str += '=';\n break;\n default:\n throw 'Invalid token';\n }\n\n str = (str + '===').slice(0, str.length + (str.length % 4));\n str = str.replace(/-/g, '+').replace(/_/g, '/');\n\n str = decodeURIComponent(escape(atob(str)));\n\n str = JSON.parse(str);\n return str;\n }\n\n function createUUID() {\n var hexDigits = '0123456789abcdef';\n var s = generateRandomString(36, hexDigits).split(\"\");\n s[14] = '4';\n s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);\n s[8] = s[13] = s[18] = s[23] = '-';\n var uuid = s.join('');\n return uuid;\n }\n\n function parseCallback(url) {\n var oauth = parseCallbackUrl(url);\n if (!oauth) {\n return;\n }\n\n var oauthState = callbackStorage.get(oauth.state);\n\n if (oauthState) {\n oauth.valid = true;\n oauth.redirectUri = oauthState.redirectUri;\n oauth.storedNonce = oauthState.nonce;\n oauth.prompt = oauthState.prompt;\n oauth.pkceCodeVerifier = oauthState.pkceCodeVerifier;\n }\n\n return oauth;\n }\n\n function parseCallbackUrl(url) {\n var supportedParams;\n switch (kc.flow) {\n case 'standard':\n supportedParams = ['code', 'state', 'session_state'];\n break;\n case 'implicit':\n supportedParams = ['access_token', 'token_type', 'id_token', 'state', 'session_state', 'expires_in'];\n break;\n case 'hybrid':\n supportedParams = ['access_token', 'id_token', 'code', 'state', 'session_state'];\n break;\n }\n\n supportedParams.push('error');\n supportedParams.push('error_description');\n supportedParams.push('error_uri');\n\n var queryIndex = url.indexOf('?');\n var fragmentIndex = url.indexOf('#');\n\n var newUrl;\n var parsed;\n\n if (kc.responseMode === 'query' && queryIndex !== -1) {\n newUrl = url.substring(0, queryIndex);\n parsed = parseCallbackParams(url.substring(queryIndex + 1, fragmentIndex !== -1 ? fragmentIndex : url.length), supportedParams);\n if (parsed.paramsString !== '') {\n newUrl += '?' + parsed.paramsString;\n }\n if (fragmentIndex !== -1) {\n newUrl += url.substring(fragmentIndex);\n }\n } else if (kc.responseMode === 'fragment' && fragmentIndex !== -1) {\n newUrl = url.substring(0, fragmentIndex);\n parsed = parseCallbackParams(url.substring(fragmentIndex + 1), supportedParams);\n if (parsed.paramsString !== '') {\n newUrl += '#' + parsed.paramsString;\n }\n }\n\n if (parsed && parsed.oauthParams) {\n if (kc.flow === 'standard' || kc.flow === 'hybrid') {\n if ((parsed.oauthParams.code || parsed.oauthParams.error) && parsed.oauthParams.state) {\n parsed.oauthParams.newUrl = newUrl;\n return parsed.oauthParams;\n }\n } else if (kc.flow === 'implicit') {\n if ((parsed.oauthParams.access_token || parsed.oauthParams.error) && parsed.oauthParams.state) {\n parsed.oauthParams.newUrl = newUrl;\n return parsed.oauthParams;\n }\n }\n }\n }\n\n function parseCallbackParams(paramsString, supportedParams) {\n var p = paramsString.split('&');\n var result = {\n paramsString: '',\n oauthParams: {}\n }\n for (var i = 0; i < p.length; i++) {\n var split = p[i].indexOf(\"=\");\n var key = p[i].slice(0, split);\n if (supportedParams.indexOf(key) !== -1) {\n result.oauthParams[key] = p[i].slice(split + 1);\n } else {\n if (result.paramsString !== '') {\n result.paramsString += '&';\n }\n result.paramsString += p[i];\n }\n }\n return result;\n }\n\n function createPromise() {\n // Need to create a native Promise which also preserves the\n // interface of the custom promise type previously used by the API\n var p = {\n setSuccess: function(result) {\n p.resolve(result);\n },\n\n setError: function(result) {\n p.reject(result);\n }\n };\n p.promise = new KeycloakPromise(function(resolve, reject) {\n p.resolve = resolve;\n p.reject = reject;\n });\n return p;\n }\n\n\n function setupCheckLoginIframe() {\n var promise = createPromise();\n\n if (!loginIframe.enable) {\n promise.setSuccess();\n return promise.promise;\n }\n\n if (loginIframe.iframe) {\n promise.setSuccess();\n return promise.promise;\n }\n\n var iframe = document.createElement('iframe');\n loginIframe.iframe = iframe;\n\n iframe.onload = function() {\n var authUrl = kc.endpoints.authorize();\n if (authUrl.charAt(0) === '/') {\n loginIframe.iframeOrigin = getOrigin();\n } else {\n loginIframe.iframeOrigin = authUrl.substring(0, authUrl.indexOf('/', 8));\n }\n promise.setSuccess();\n }\n\n var src = kc.endpoints.checkSessionIframe();\n iframe.setAttribute('src', src );\n iframe.setAttribute('title', 'keycloak-session-iframe' );\n iframe.style.display = 'none';\n document.body.appendChild(iframe);\n\n var messageCallback = function(event) {\n if ((event.origin !== loginIframe.iframeOrigin) || (loginIframe.iframe.contentWindow !== event.source)) {\n return;\n }\n\n if (!(event.data == 'unchanged' || event.data == 'changed' || event.data == 'error')) {\n return;\n }\n\n\n if (event.data != 'unchanged') {\n kc.clearToken();\n }\n\n var callbacks = loginIframe.callbackList.splice(0, loginIframe.callbackList.length);\n\n for (var i = callbacks.length - 1; i >= 0; --i) {\n var promise = callbacks[i];\n if (event.data == 'error') {\n promise.setError();\n } else {\n promise.setSuccess(event.data == 'unchanged');\n }\n }\n };\n\n window.addEventListener('message', messageCallback, false);\n\n return promise.promise;\n }\n\n function scheduleCheckIframe() {\n if (loginIframe.enable) {\n if (kc.token) {\n setTimeout(function() {\n checkLoginIframe().then(function(unchanged) {\n if (unchanged) {\n scheduleCheckIframe();\n }\n });\n }, loginIframe.interval * 1000);\n }\n }\n }\n\n function checkLoginIframe() {\n var promise = createPromise();\n\n if (loginIframe.iframe && loginIframe.iframeOrigin ) {\n var msg = kc.clientId + ' ' + (kc.sessionId ? kc.sessionId : '');\n loginIframe.callbackList.push(promise);\n var origin = loginIframe.iframeOrigin;\n if (loginIframe.callbackList.length == 1) {\n loginIframe.iframe.contentWindow.postMessage(msg, origin);\n }\n } else {\n promise.setSuccess();\n }\n\n return promise.promise;\n }\n\n function loadAdapter(type) {\n if (!type || type == 'default') {\n return {\n login: function(options) {\n window.location.replace(kc.createLoginUrl(options));\n return createPromise().promise;\n },\n\n logout: function(options) {\n window.location.replace(kc.createLogoutUrl(options));\n return createPromise().promise;\n },\n\n register: function(options) {\n window.location.replace(kc.createRegisterUrl(options));\n return createPromise().promise;\n },\n\n accountManagement : function() {\n var accountUrl = kc.createAccountUrl();\n if (typeof accountUrl !== 'undefined') {\n window.location.href = accountUrl;\n } else {\n throw \"Not supported by the OIDC server\";\n }\n return createPromise().promise;\n },\n\n redirectUri: function(options, encodeHash) {\n if (arguments.length == 1) {\n encodeHash = true;\n }\n\n if (options && options.redirectUri) {\n return options.redirectUri;\n } else if (kc.redirectUri) {\n return kc.redirectUri;\n } else {\n return location.href;\n }\n }\n };\n }\n\n if (type == 'cordova') {\n loginIframe.enable = false;\n var cordovaOpenWindowWrapper = function(loginUrl, target, options) {\n if (window.cordova && window.cordova.InAppBrowser) {\n // Use inappbrowser for IOS and Android if available\n return window.cordova.InAppBrowser.open(loginUrl, target, options);\n } else {\n return window.open(loginUrl, target, options);\n }\n };\n\n var shallowCloneCordovaOptions = function (userOptions) {\n if (userOptions && userOptions.cordovaOptions) {\n return Object.keys(userOptions.cordovaOptions).reduce(function (options, optionName) {\n options[optionName] = userOptions.cordovaOptions[optionName];\n return options;\n }, {});\n } else {\n return {};\n }\n };\n\n var formatCordovaOptions = function (cordovaOptions) {\n return Object.keys(cordovaOptions).reduce(function (options, optionName) {\n options.push(optionName+\"=\"+cordovaOptions[optionName]);\n return options;\n }, []).join(\",\");\n };\n\n var createCordovaOptions = function (userOptions) {\n var cordovaOptions = shallowCloneCordovaOptions(userOptions);\n cordovaOptions.location = 'no';\n if (userOptions && userOptions.prompt == 'none') {\n cordovaOptions.hidden = 'yes';\n }\n return formatCordovaOptions(cordovaOptions);\n };\n\n return {\n login: function(options) {\n var promise = createPromise();\n\n var cordovaOptions = createCordovaOptions(options);\n var loginUrl = kc.createLoginUrl(options);\n var ref = cordovaOpenWindowWrapper(loginUrl, '_blank', cordovaOptions);\n var completed = false;\n\n var closed = false;\n var closeBrowser = function() {\n closed = true;\n ref.close();\n };\n\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n var callback = parseCallback(event.url);\n processCallback(callback, promise);\n closeBrowser();\n completed = true;\n }\n });\n\n ref.addEventListener('loaderror', function(event) {\n if (!completed) {\n if (event.url.indexOf('http://localhost') == 0) {\n var callback = parseCallback(event.url);\n processCallback(callback, promise);\n closeBrowser();\n completed = true;\n } else {\n promise.setError();\n closeBrowser();\n }\n }\n });\n\n ref.addEventListener('exit', function(event) {\n if (!closed) {\n promise.setError({\n reason: \"closed_by_user\"\n });\n }\n });\n\n return promise.promise;\n },\n\n logout: function(options) {\n var promise = createPromise();\n\n var logoutUrl = kc.createLogoutUrl(options);\n var ref = cordovaOpenWindowWrapper(logoutUrl, '_blank', 'location=no,hidden=yes');\n\n var error;\n\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n }\n });\n\n ref.addEventListener('loaderror', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n } else {\n error = true;\n ref.close();\n }\n });\n\n ref.addEventListener('exit', function(event) {\n if (error) {\n promise.setError();\n } else {\n kc.clearToken();\n promise.setSuccess();\n }\n });\n\n return promise.promise;\n },\n\n register : function(options) {\n var promise = createPromise();\n var registerUrl = kc.createRegisterUrl();\n var cordovaOptions = createCordovaOptions(options);\n var ref = cordovaOpenWindowWrapper(registerUrl, '_blank', cordovaOptions);\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n var oauth = parseCallback(event.url);\n processCallback(oauth, promise);\n }\n });\n return promise.promise;\n },\n\n accountManagement : function() {\n var accountUrl = kc.createAccountUrl();\n if (typeof accountUrl !== 'undefined') {\n var ref = cordovaOpenWindowWrapper(accountUrl, '_blank', 'location=no');\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n }\n });\n } else {\n throw \"Not supported by the OIDC server\";\n }\n },\n\n redirectUri: function(options) {\n return 'http://localhost';\n }\n }\n }\n\n if (type == 'cordova-native') {\n loginIframe.enable = false;\n\n return {\n login: function(options) {\n var promise = createPromise();\n var loginUrl = kc.createLoginUrl(options);\n\n universalLinks.subscribe('keycloak', function(event) {\n universalLinks.unsubscribe('keycloak');\n window.cordova.plugins.browsertab.close();\n var oauth = parseCallback(event.url);\n processCallback(oauth, promise);\n });\n\n window.cordova.plugins.browsertab.openUrl(loginUrl);\n return promise.promise;\n },\n\n logout: function(options) {\n var promise = createPromise();\n var logoutUrl = kc.createLogoutUrl(options);\n\n universalLinks.subscribe('keycloak', function(event) {\n universalLinks.unsubscribe('keycloak');\n window.cordova.plugins.browsertab.close();\n kc.clearToken();\n promise.setSuccess();\n });\n\n window.cordova.plugins.browsertab.openUrl(logoutUrl);\n return promise.promise;\n },\n\n register : function(options) {\n var promise = createPromise();\n var registerUrl = kc.createRegisterUrl(options);\n universalLinks.subscribe('keycloak' , function(event) {\n universalLinks.unsubscribe('keycloak');\n window.cordova.plugins.browsertab.close();\n var oauth = parseCallback(event.url);\n processCallback(oauth, promise);\n });\n window.cordova.plugins.browsertab.openUrl(registerUrl);\n return promise.promise;\n\n },\n\n accountManagement : function() {\n var accountUrl = kc.createAccountUrl();\n if (typeof accountUrl !== 'undefined') {\n window.cordova.plugins.browsertab.openUrl(accountUrl);\n } else {\n throw \"Not supported by the OIDC server\";\n }\n },\n\n redirectUri: function(options) {\n if (options && options.redirectUri) {\n return options.redirectUri;\n } else if (kc.redirectUri) {\n return kc.redirectUri;\n } else {\n return \"http://localhost\";\n }\n }\n }\n }\n\n throw 'invalid adapter type: ' + type;\n }\n\n var LocalStorage = function() {\n if (!(this instanceof LocalStorage)) {\n return new LocalStorage();\n }\n\n localStorage.setItem('kc-test', 'test');\n localStorage.removeItem('kc-test');\n\n var cs = this;\n\n function clearExpired() {\n var time = new Date().getTime();\n for (var i = 0; i < localStorage.length; i++) {\n var key = localStorage.key(i);\n if (key && key.indexOf('kc-callback-') == 0) {\n var value = localStorage.getItem(key);\n if (value) {\n try {\n var expires = JSON.parse(value).expires;\n if (!expires || expires < time) {\n localStorage.removeItem(key);\n }\n } catch (err) {\n localStorage.removeItem(key);\n }\n }\n }\n }\n }\n\n cs.get = function(state) {\n if (!state) {\n return;\n }\n\n var key = 'kc-callback-' + state;\n var value = localStorage.getItem(key);\n if (value) {\n localStorage.removeItem(key);\n value = JSON.parse(value);\n }\n\n clearExpired();\n return value;\n };\n\n cs.add = function(state) {\n clearExpired();\n\n var key = 'kc-callback-' + state.state;\n state.expires = new Date().getTime() + (60 * 60 * 1000);\n localStorage.setItem(key, JSON.stringify(state));\n };\n };\n\n var CookieStorage = function() {\n if (!(this instanceof CookieStorage)) {\n return new CookieStorage();\n }\n\n var cs = this;\n\n cs.get = function(state) {\n if (!state) {\n return;\n }\n\n var value = getCookie('kc-callback-' + state);\n setCookie('kc-callback-' + state, '', cookieExpiration(-100));\n if (value) {\n return JSON.parse(value);\n }\n };\n\n cs.add = function(state) {\n setCookie('kc-callback-' + state.state, JSON.stringify(state), cookieExpiration(60));\n };\n\n cs.removeItem = function(key) {\n setCookie(key, '', cookieExpiration(-100));\n };\n\n var cookieExpiration = function (minutes) {\n var exp = new Date();\n exp.setTime(exp.getTime() + (minutes*60*1000));\n return exp;\n };\n\n var getCookie = function (key) {\n var name = key + '=';\n var ca = document.cookie.split(';');\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length);\n }\n }\n return '';\n };\n\n var setCookie = function (key, value, expirationDate) {\n var cookie = key + '=' + value + '; '\n + 'expires=' + expirationDate.toUTCString() + '; ';\n document.cookie = cookie;\n }\n };\n\n function createCallbackStorage() {\n try {\n return new LocalStorage();\n } catch (err) {\n }\n\n return new CookieStorage();\n }\n\n function createLogger(fn) {\n return function() {\n if (kc.enableLogging) {\n fn.apply(console, Array.prototype.slice.call(arguments));\n }\n };\n }\n }\n\n return Keycloak;\n})\n","export enum SessionStorageKeys {\n KeyCloakToken = 'KEYCLOAK_TOKEN',\n KeyCloakRefreshToken = 'KEYCLOAK_REFRESH_TOKEN',\n KeyCloakIdToken = 'KEYCLOAK_ID_TOKEN',\n ApiConfigKey = 'AUTH_API_CONFIG',\n PreventStorageSync = 'PREVENT_STORAGE_SYNC',\n LaunchDarklyFlags = 'LD_FLAGS',\n CurrentAccount = 'CURRENT_ACCOUNT',\n AuthApiUrl = 'AUTH_API_URL',\n AuthWebUrl = 'AUTH_WEB_URL',\n StatusApiUrl = 'STATUS_API_URL',\n WhatsNew = 'WHATS_NEW',\n SessionSynced = 'SESSION_SYNCED',\n RegistryHomeUrl = 'REGISTRY_HOME_URL',\n NameRequestUrl = 'NAME_REQUEST_URL',\n PprWebUrl = 'PPR_WEB_URL',\n SiteminderLogoutUrl = 'SITEMINDER_LOGOUT_URL'\n}\n\nexport enum Account {\n ANONYMOUS = 'ANONYMOUS',\n PREMIUM = 'PREMIUM',\n BASIC = 'BASIC',\n SBC_STAFF = 'SBC_STAFF',\n STAFF = 'STAFF'\n}\n\nexport enum IdpHint {\n BCROS = 'bcros',\n IDIR = 'idir',\n BCSC = 'bcsc',\n BCEID = 'bceid'\n}\n\nexport enum LoginSource {\n BCROS = 'BCROS',\n IDIR = 'IDIR',\n BCSC = 'BCSC',\n BCEID = 'BCEID'\n}\n\nexport enum Role {\n AccountHolder = 'account_holder',\n PublicUser = 'public_user',\n Staff = 'staff',\n GOVMAccountUser = 'gov_account_user'\n}\n\nexport enum Pages {\n HOME = 'home',\n USER_PROFILE = 'userprofile',\n ACCOUNT = 'account',\n SETTINGS = 'settings',\n SIGNIN = 'signin',\n USER_PROFILE_TERMS = 'userprofileterms',\n CREATE_ACCOUNT = 'setup-account',\n CHOOSE_AUTH_METHOD = 'choose-authentication-method',\n NON_BCSC_INSTRUCTIONS = 'nonbcsc-info/instructions',\n ACCOUNT_FREEZ = 'account-freeze',\n PENDING_APPROVAL = 'pendingapproval',\n ACCOUNT_SWITCHING = 'account-switching',\n REGISTRY_DASHBOARD = 'dashboard'\n}\n\nexport const ALLOWED_URIS_FOR_PENDING_ORGS: string[] = ['setup-non-bcsc-account', 'signout']\n\nexport const ACCOUNT_ID = 'accountid'\n","import ConfigHelper from './config-helper'\nimport { SessionStorageKeys, ACCOUNT_ID } from './constants'\n\n/**\n * Place to put all the custom utility methods\n */\nexport function getBoolean (value: boolean | string | number): boolean {\n let resultVal = value\n if (typeof value === 'string') {\n resultVal = value.toLowerCase()\n }\n switch (resultVal) {\n case true:\n case 'true':\n case 1:\n case '1':\n case 'on':\n case 'yes':\n case 'none':\n return true\n default:\n return false\n }\n}\n\nexport function decodeKCToken () {\n try {\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)\n if (token) {\n const base64Url = token.split('.')[1]\n const base64 = decodeURIComponent(window.atob(base64Url).split('').map(function (c) {\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)\n }).join(''))\n return JSON.parse(base64)\n } else {\n return {}\n }\n } catch (error) {\n throw new Error('Error parsing JWT - ' + error)\n }\n}\n\nexport function trimTrailingSlashURL (url) {\n return (url) ? url.trim().replace(/\\/+$/, '') : ''\n}\n\nexport function getAccountIdFromCurrentUrl () {\n const urlParams = new URLSearchParams(window.location.search)\n return urlParams.get(ACCOUNT_ID) || false\n}\n\nexport function checkAndAppend (url, key = '', value = '') {\n const separator = (/\\?/).test(url) ? '&' : '?'\n // remove key from URL if existing\n const newUrl = removeAccountIdFromUrl(url, key)\n return (value !== '' && key !== '') ? `${newUrl}${separator}${key}=${value}` : url\n}\n\n// if account id is not passed, will get it from session\n// there are some cases we need to pass account id, ie to watch account id and get URL dynamically\nexport function appendAccountId (url, accountId = '') {\n const sessionAccountId = JSON.parse(ConfigHelper.getFromSession(SessionStorageKeys.CurrentAccount) || '{}').id || ''\n const currentAccount = accountId !== '' ? accountId : sessionAccountId\n return checkAndAppend(url, ACCOUNT_ID, currentAccount)\n}\n\nexport function removeAccountIdFromUrl (url, key = ACCOUNT_ID) {\n // replacing account id and formattig ie, removing extra ? or &\n return url?.replace(new RegExp(key + '=\\\\w+'), '').replace('?&', '?').replace(/\\?$/, '')\n .replace('&&', '&').replace(/&$/, '')\n}\n","import { SessionStorageKeys } from './constants'\nimport { trimTrailingSlashURL } from './common-util'\n\nexport default class ConfigHelper {\n static keycloakConfigUrl = ''\n\n static addToSession (key: string, value: any): void {\n sessionStorage.setItem(key, value)\n }\n\n static getFromSession (key: string): string | null {\n return sessionStorage.getItem(key)\n }\n\n static removeFromSession (key: string): void {\n sessionStorage.removeItem(key)\n }\n\n static clearSession (): void {\n sessionStorage.clear()\n }\n\n static getStatusAPIUrl (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.StatusApiUrl) || '')\n }\n\n static getAuthAPIUrl (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.AuthApiUrl) || '')\n }\n\n static getAuthContextPath (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.AuthWebUrl) || '')\n }\n\n static getRegistryHomeURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.RegistryHomeUrl) || '')\n }\n\n static getNameRequestURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.NameRequestUrl) || '')\n }\n\n static getPprWebURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.PprWebUrl) || '')\n }\n\n static setKeycloakConfigUrl (keycloakConfigUrl: string) {\n this.keycloakConfigUrl = keycloakConfigUrl\n }\n\n static getKeycloakConfigUrl (): string {\n return this.keycloakConfigUrl\n }\n}\n","var VuexModule = /** @class */ (function () {\r\n function VuexModule(module) {\r\n this.actions = module.actions;\r\n this.mutations = module.mutations;\r\n this.state = module.state;\r\n this.getters = module.getters;\r\n this.namespaced = module.namespaced;\r\n this.modules = module.modules;\r\n }\r\n return VuexModule;\r\n}());\r\nfunction getModule(moduleClass, store) {\r\n if (moduleClass._statics) {\r\n return moduleClass._statics;\r\n }\r\n var genStatic = moduleClass._genStatic;\r\n if (!genStatic) {\r\n throw new Error(\"ERR_GET_MODULE_NO_STATICS : Could not get module accessor.\\n Make sure your module has name, we can't make accessors for unnamed modules\\n i.e. @Module({ name: 'something' })\");\r\n }\r\n return (moduleClass._statics = genStatic(store));\r\n}\n\nvar reservedKeys = ['actions', 'getters', 'mutations', 'modules', 'state', 'namespaced', 'commit'];\r\nfunction stateFactory(module) {\r\n var state = new module.prototype.constructor({});\r\n var s = {};\r\n Object.keys(state).forEach(function (key) {\r\n if (reservedKeys.indexOf(key) !== -1) {\r\n if (typeof state[key] !== 'undefined') {\r\n throw new Error(\"ERR_RESERVED_STATE_KEY_USED: You cannot use the following\\n ['actions', 'getters', 'mutations', 'modules', 'state', 'namespaced', 'commit']\\n as fields in your module. These are reserved as they have special purpose in Vuex\");\r\n }\r\n return;\r\n }\r\n if (state.hasOwnProperty(key)) {\r\n if (typeof state[key] !== 'function') {\r\n s[key] = state[key];\r\n }\r\n }\r\n });\r\n return s;\r\n}\n\n/**\r\n * Takes the properties on object from parameter source and adds them to the object\r\n * parameter target\r\n * @param {object} target Object to have properties copied onto from y\r\n * @param {object} source Object with properties to be copied to x\r\n */\r\nfunction addPropertiesToObject(target, source) {\r\n var _loop_1 = function (k) {\r\n Object.defineProperty(target, k, {\r\n get: function () { return source[k]; }\r\n });\r\n };\r\n for (var _i = 0, _a = Object.keys(source || {}); _i < _a.length; _i++) {\r\n var k = _a[_i];\r\n _loop_1(k);\r\n }\r\n}\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\n\nfunction staticStateGenerator(module, modOpt, statics) {\r\n var state = modOpt.stateFactory ? module.state() : module.state;\r\n Object.keys(state).forEach(function (key) {\r\n if (state.hasOwnProperty(key)) {\r\n // If not undefined or function means it is a state value\r\n if (['undefined', 'function'].indexOf(typeof state[key]) === -1) {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return modOpt.store.state[modOpt.name][key];\r\n }\r\n });\r\n }\r\n }\r\n });\r\n}\r\nfunction staticGetterGenerator(module, modOpt, statics) {\r\n Object.keys(module.getters).forEach(function (key) {\r\n if (module.namespaced) {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return modOpt.store.getters[modOpt.name + \"/\" + key];\r\n }\r\n });\r\n }\r\n else {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return modOpt.store.getters[key];\r\n }\r\n });\r\n }\r\n });\r\n}\r\nfunction staticMutationGenerator(module, modOpt, statics) {\r\n Object.keys(module.mutations).forEach(function (key) {\r\n if (module.namespaced) {\r\n statics[key] = function () {\r\n var _a;\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n (_a = modOpt.store).commit.apply(_a, [modOpt.name + \"/\" + key].concat(args));\r\n };\r\n }\r\n else {\r\n statics[key] = function () {\r\n var _a;\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n (_a = modOpt.store).commit.apply(_a, [key].concat(args));\r\n };\r\n }\r\n });\r\n}\r\nfunction staticActionGenerators(module, modOpt, statics) {\r\n Object.keys(module.actions).forEach(function (key) {\r\n if (module.namespaced) {\r\n statics[key] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _a;\r\n return __generator(this, function (_b) {\r\n return [2 /*return*/, (_a = modOpt.store).dispatch.apply(_a, [modOpt.name + \"/\" + key].concat(args))];\r\n });\r\n });\r\n };\r\n }\r\n else {\r\n statics[key] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _a;\r\n return __generator(this, function (_b) {\r\n return [2 /*return*/, (_a = modOpt.store).dispatch.apply(_a, [key].concat(args))];\r\n });\r\n });\r\n };\r\n }\r\n });\r\n}\n\nfunction moduleDecoratorFactory(moduleOptions) {\r\n return function (constructor) {\r\n var module = constructor;\r\n var stateFactory$1 = function () { return stateFactory(module); };\r\n if (!module.state) {\r\n module.state = moduleOptions && moduleOptions.stateFactory ? stateFactory$1 : stateFactory$1();\r\n }\r\n if (!module.getters) {\r\n module.getters = {};\r\n }\r\n if (!module.namespaced) {\r\n module.namespaced = moduleOptions && moduleOptions.namespaced;\r\n }\r\n Object.getOwnPropertyNames(module.prototype).forEach(function (funcName) {\r\n var descriptor = Object.getOwnPropertyDescriptor(module.prototype, funcName);\r\n if (descriptor.get && module.getters) {\r\n module.getters[funcName] = function (state, getters, rootState, rootGetters) {\r\n var thisObj = { context: { state: state, getters: getters, rootState: rootState, rootGetters: rootGetters } };\r\n addPropertiesToObject(thisObj, state);\r\n addPropertiesToObject(thisObj, getters);\r\n var got = descriptor.get.call(thisObj);\r\n return got;\r\n };\r\n }\r\n });\r\n var modOpt = moduleOptions;\r\n if (modOpt.name) {\r\n Object.defineProperty(constructor, '_genStatic', {\r\n value: function (store) {\r\n var statics = {};\r\n modOpt.store = modOpt.store || store;\r\n if (!modOpt.store) {\r\n throw new Error(\"ERR_STORE_NOT_PROVIDED: To use getModule(), either the module\\n should be decorated with store in decorator, i.e. @Module({store: store}) or\\n store should be passed when calling getModule(), i.e. getModule(MyModule, this.$store)\");\r\n }\r\n // =========== For statics ==============\r\n // ------ state -------\r\n staticStateGenerator(module, modOpt, statics);\r\n // ------- getters -------\r\n if (module.getters) {\r\n staticGetterGenerator(module, modOpt, statics);\r\n }\r\n // -------- mutations --------\r\n if (module.mutations) {\r\n staticMutationGenerator(module, modOpt, statics);\r\n }\r\n // -------- actions ---------\r\n if (module.actions) {\r\n staticActionGenerators(module, modOpt, statics);\r\n }\r\n return statics;\r\n }\r\n });\r\n }\r\n if (modOpt.dynamic) {\r\n if (!modOpt.name) {\r\n throw new Error('Name of module not provided in decorator options');\r\n }\r\n modOpt.store.registerModule(modOpt.name, // TODO: Handle nested modules too in future\r\n module);\r\n }\r\n return constructor;\r\n };\r\n}\r\nfunction Module(modOrOpt) {\r\n if (typeof modOrOpt === 'function') {\r\n /*\r\n * @Module decorator called without options (directly on the class definition)\r\n */\r\n moduleDecoratorFactory({})(modOrOpt);\r\n }\r\n else {\r\n /*\r\n * @Module({...}) decorator called with options\r\n */\r\n return moduleDecoratorFactory(modOrOpt);\r\n }\r\n}\n\nfunction actionDecoratorFactory(params) {\r\n var _a = params || {}, _b = _a.commit, commit = _b === void 0 ? undefined : _b, _c = _a.rawError, rawError = _c === void 0 ? false : _c, _d = _a.root, root = _d === void 0 ? false : _d;\r\n return function (target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.actions) {\r\n module.actions = {};\r\n }\r\n var actionFunction = descriptor.value;\r\n var action = function (context, payload) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var actionPayload, moduleAccessor, thisObj, e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, 5, , 6]);\r\n actionPayload = null;\r\n if (!module._genStatic) return [3 /*break*/, 2];\r\n moduleAccessor = getModule(module);\r\n moduleAccessor.context = context;\r\n return [4 /*yield*/, actionFunction.call(moduleAccessor, payload)];\r\n case 1:\r\n actionPayload = _a.sent();\r\n return [3 /*break*/, 4];\r\n case 2:\r\n thisObj = { context: context };\r\n addPropertiesToObject(thisObj, context.state);\r\n addPropertiesToObject(thisObj, context.getters);\r\n return [4 /*yield*/, actionFunction.call(thisObj, payload)];\r\n case 3:\r\n actionPayload = _a.sent();\r\n _a.label = 4;\r\n case 4:\r\n if (commit) {\r\n context.commit(commit, actionPayload);\r\n }\r\n return [2 /*return*/, actionPayload];\r\n case 5:\r\n e_1 = _a.sent();\r\n throw rawError\r\n ? e_1\r\n : new Error('ERR_ACTION_ACCESS_UNDEFINED: Are you trying to access ' +\r\n 'this.someMutation() or this.someGetter inside an @Action? \\n' +\r\n 'That works only in dynamic modules. \\n' +\r\n 'If not dynamic use this.context.commit(\"mutationName\", payload) ' +\r\n 'and this.context.getters[\"getterName\"]' +\r\n '\\n' +\r\n new Error(\"Could not perform action \" + key.toString()).stack +\r\n '\\n' +\r\n e_1.stack);\r\n case 6: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n module.actions[key] = root ? { root: root, handler: action } : action;\r\n };\r\n}\r\n/**\r\n * The @Action decorator turns an async function into an Vuex action\r\n *\r\n * @param targetOrParams the module class\r\n * @param key name of the action\r\n * @param descriptor the action function descriptor\r\n * @constructor\r\n */\r\nfunction Action(targetOrParams, key, descriptor) {\r\n if (!key && !descriptor) {\r\n /*\r\n * This is the case when `targetOrParams` is params.\r\n * i.e. when used as -\r\n *
\r\n            @Action({commit: 'incrCount'})\r\n            async getCountDelta() {\r\n              return 5\r\n            }\r\n         * 
\r\n */\r\n return actionDecoratorFactory(targetOrParams);\r\n }\r\n else {\r\n /*\r\n * This is the case when @Action is called on action function\r\n * without any params\r\n *
\r\n         *   @Action\r\n         *   async doSomething() {\r\n         *    ...\r\n         *   }\r\n         * 
\r\n */\r\n actionDecoratorFactory()(targetOrParams, key, descriptor);\r\n }\r\n}\n\nfunction Mutation(target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.mutations) {\r\n module.mutations = {};\r\n }\r\n var mutationFunction = descriptor.value ? descriptor.value : function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return ({});\r\n };\r\n var mutation = function (state, payload) {\r\n mutationFunction.call(state, payload);\r\n };\r\n module.mutations[key] = mutation;\r\n}\n\nfunction mutationActionDecoratorFactory(params) {\r\n return function (target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.mutations) {\r\n module.mutations = {};\r\n }\r\n if (!module.actions) {\r\n module.actions = {};\r\n }\r\n var mutactFunction = descriptor.value;\r\n var action = function (context, payload) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var actionPayload, e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, 2, , 3]);\r\n return [4 /*yield*/, mutactFunction.call(context, payload)];\r\n case 1:\r\n actionPayload = _a.sent();\r\n context.commit(key, actionPayload);\r\n return [3 /*break*/, 3];\r\n case 2:\r\n e_1 = _a.sent();\r\n if (params.rawError) {\r\n throw e_1;\r\n }\r\n else {\r\n console.error('Could not perform action ' + key.toString());\r\n console.error(e_1);\r\n }\r\n return [3 /*break*/, 3];\r\n case 3: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n var mutation = function (state, payload) {\r\n if (!params.mutate) {\r\n params.mutate = Object.keys(payload);\r\n }\r\n for (var _i = 0, _a = params.mutate; _i < _a.length; _i++) {\r\n var stateItem = _a[_i];\r\n if (state.hasOwnProperty(stateItem) && payload.hasOwnProperty(stateItem)) {\r\n state[stateItem] = payload[stateItem];\r\n }\r\n else {\r\n throw new Error(\"ERR_MUTATE_PARAMS_NOT_IN_PAYLOAD\\n In @MutationAction, mutate: ['a', 'b', ...] array keys must\\n match with return type = {a: {}, b: {}, ...} and must\\n also be in state.\");\r\n }\r\n }\r\n };\r\n module.actions[key] = params.root ? { root: true, handler: action } : action;\r\n module.mutations[key] = mutation;\r\n };\r\n}\r\n/**\r\n * The @MutationAction decorator turns this into an action that further calls a mutation\r\n * Both the action and the mutation are generated for you\r\n *\r\n * @param paramsOrTarget the params or the target class\r\n * @param key the name of the function\r\n * @param descriptor the function body\r\n * @constructor\r\n */\r\nfunction MutationAction(paramsOrTarget, key, descriptor) {\r\n if (!key && !descriptor) {\r\n /*\r\n * This is the case when `paramsOrTarget` is params.\r\n * i.e. when used as -\r\n *
\r\n            @MutationAction({mutate: ['incrCount']})\r\n            async getCountDelta() {\r\n              return {incrCount: 5}\r\n            }\r\n         * 
\r\n */\r\n return mutationActionDecoratorFactory(paramsOrTarget);\r\n }\r\n else {\r\n /*\r\n * This is the case when `paramsOrTarget` is target.\r\n * i.e. when used as -\r\n *
\r\n            @MutationAction\r\n            async getCountDelta() {\r\n              return {incrCount: 5}\r\n            }\r\n         * 
\r\n */\r\n mutationActionDecoratorFactory({})(paramsOrTarget, key, descriptor);\r\n }\r\n}\n\nexport { Action, Module, Mutation, MutationAction, VuexModule, getModule };\n//# sourceMappingURL=index.js.map\n","import { Module, VuexModule, Mutation, Action } from 'vuex-module-decorators'\nimport ConfigHelper from '../../util/config-helper'\nimport KeycloakServices from '../../services/keycloak.services'\nimport { SessionStorageKeys } from '../../util/constants'\n\n@Module({\n name: 'auth',\n namespaced: true\n})\nexport default class AuthModule extends VuexModule {\n token: string = ''\n idToken: string = ''\n refreshToken: string = ''\n kcGuid: string = ''\n loginSource: string = ''\n\n get isAuthenticated (): boolean {\n return !!this.token\n }\n\n get keycloakGuid (): string {\n return this.kcGuid || KeycloakServices.getUserInfo().keycloakGuid\n }\n\n get currentLoginSource (): string {\n return this.loginSource || KeycloakServices.getUserInfo().loginSource\n }\n\n @Mutation\n public setKCToken (token: string): void {\n this.token = token\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakToken, token)\n }\n\n @Mutation\n public setIDToken (idToken: string): void {\n this.idToken = idToken\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakIdToken, idToken)\n }\n\n @Mutation\n public setRefreshToken (refreshToken: string): void {\n this.refreshToken = refreshToken\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakRefreshToken, refreshToken)\n }\n\n @Mutation\n public setKCGuid (kcGuid: string): void {\n this.kcGuid = kcGuid\n }\n\n @Mutation\n public setLoginSource (loginSource: string): void {\n this.loginSource = loginSource\n }\n\n @Action({ rawError: true })\n public clearSession (): void {\n this.context.commit('setKCToken', '')\n this.context.commit('setIDToken', '')\n this.context.commit('setRefreshToken', '')\n this.context.commit('setKCGuid', '')\n this.context.commit('setLoginSource', '')\n }\n\n @Action({ rawError: true })\n public syncWithSessionStorage (): void {\n this.context.commit('setKCToken', ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || '')\n this.context.commit('setIDToken', ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || '')\n this.context.commit('setRefreshToken', ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || '')\n }\n}\n","import Keycloak, { KeycloakInitOptions, KeycloakInstance, KeycloakLoginOptions, KeycloakTokenParsed } from 'keycloak-js'\nimport { KCUserProfile } from '../models/KCUserProfile'\nimport ConfigHelper from '../util/config-helper'\nimport { SessionStorageKeys } from '../util/constants'\nimport { Store } from 'vuex'\nimport { getModule } from 'vuex-module-decorators'\nimport AuthModule from '../store/modules/auth'\nimport { decodeKCToken } from '../util/common-util'\n\nclass KeyCloakService {\n private kc: KeycloakInstance | undefined\n private parsedToken: any\n private static instance: KeyCloakService\n private store: Store | null = null\n private counter = 0\n private REFRESH_ATTEMPT_INTERVAL = 10 // in seconds\n private timerId: any = 0\n\n public static getInstance (): KeyCloakService {\n return (this.instance) ? this.instance : new KeyCloakService()\n }\n\n public get isInitialized (): boolean {\n return !!this.kc\n }\n\n // Setting keycloak config url as a static configuration to access from other parts of the app if needed\n async setKeycloakConfigUrl (keyCloakConfigurl: string) {\n ConfigHelper.setKeycloakConfigUrl(keyCloakConfigurl)\n }\n\n getKCInstance () : KeycloakInstance | undefined {\n return this.kc\n }\n\n async initializeKeyCloak (idpHint: string, store: Store) {\n this.store = store\n this.clearSession()\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || undefined\n const keycloakConfig = ConfigHelper.getKeycloakConfigUrl()\n this.kc = Keycloak(keycloakConfig)\n const kcLogin = this.kc.login\n this.kc.login = (options?: KeycloakLoginOptions) => {\n if (options) {\n options.idpHint = idpHint\n }\n return kcLogin(options)\n }\n let kcOptions :KeycloakInitOptions = {\n onLoad: 'login-required',\n checkLoginIframe: false,\n timeSkew: 0,\n token,\n refreshToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || undefined,\n idToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || undefined,\n pkceMethod: 'S256'\n }\n return this.kc.init(kcOptions)\n }\n\n async initSession () {\n if (!this.store) {\n return\n }\n\n const authModule = getModule(AuthModule, this.store)\n authModule.setKCToken(this.kc?.token || '')\n authModule.setIDToken(this.kc?.idToken || '')\n authModule.setRefreshToken(this.kc?.refreshToken || '')\n\n const userInfo = this.getUserInfo()\n authModule.setKCGuid(userInfo?.keycloakGuid || '')\n authModule.setLoginSource(userInfo?.loginSource || '')\n\n await this.syncSessionAndScheduleTokenRefresh()\n }\n\n getUserInfo () : KCUserProfile {\n if (!this.parsedToken || !Object.keys(this.parsedToken).length) {\n this.parsedToken = decodeKCToken()\n }\n return {\n lastName: this.parsedToken?.lastname,\n firstName: this.parsedToken?.firstname,\n email: this.parsedToken?.email,\n // eslint-disable-next-line camelcase\n roles: this.parsedToken?.realm_access?.roles,\n keycloakGuid: this.parsedToken?.sub,\n userName: this.parsedToken?.username,\n fullName: this.parsedToken?.name,\n loginSource: this.parsedToken?.loginSource\n }\n }\n\n async logout (redirectUrl?: string) {\n let token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || undefined\n if (token) {\n this.kc = Keycloak(ConfigHelper.getKeycloakConfigUrl())\n let kcOptions :KeycloakInitOptions = {\n onLoad: 'login-required',\n checkLoginIframe: false,\n timeSkew: 0,\n token,\n refreshToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || undefined,\n idToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || undefined,\n pkceMethod: 'S256'\n }\n const siteminderLogoutUrl = ConfigHelper.getFromSession(SessionStorageKeys.SiteminderLogoutUrl) || undefined\n // Here we clear session storage, and add a flag in to prevent the app from\n // putting tokens back in from returning async calls (see #2341)\n ConfigHelper.clearSession()\n ConfigHelper.addToSession(SessionStorageKeys.PreventStorageSync, true)\n return new Promise((resolve, reject) => {\n this.kc && this.kc.init(kcOptions)\n .then(authenticated => {\n if (!authenticated) {\n resolve()\n }\n redirectUrl = redirectUrl || `${window.location.origin}${process.env.VUE_APP_PATH}`\n if (siteminderLogoutUrl?.includes('http')) {\n redirectUrl = `${siteminderLogoutUrl}?returl=${redirectUrl.replace(/(https?:\\/\\/)|(\\/)+/g, '$1$2')}&retnow=1`\n }\n this.kc && this.kc.logout({ redirectUri: redirectUrl })\n .then(() => {\n resolve()\n })\n .catch(error => {\n reject(error)\n })\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n }\n\n async refreshToken (isForceRefresh?: boolean) {\n // Set the token expiry time as the minValidity to force refresh token\n if (!isForceRefresh && (!this.kc?.tokenParsed?.exp || !this.kc.timeSkew)) {\n return\n }\n // if isForceRefresh is true, send -1 in updateToken to force update the token\n let tokenExpiresIn = (isForceRefresh) ? -1 : this.kc.tokenParsed.exp - Math.ceil(new Date().getTime() / 1000) + this.kc.timeSkew + 100\n if (this.kc) {\n this.kc.updateToken(tokenExpiresIn)\n .then(refreshed => {\n if (refreshed) {\n this.initSession()\n }\n })\n .catch(() => {\n this.clearSession()\n return new Error('Could not refresh Token')\n })\n } else {\n return new Error('Could not refresh Token:No Kc Instance')\n }\n }\n\n verifyRoles (allowedRoles:[], disabledRoles:[]) {\n let isAuthorized = false\n if (allowedRoles || disabledRoles) {\n let userInfo = this.getUserInfo()\n isAuthorized = allowedRoles ? allowedRoles.some(role => userInfo.roles.includes(role)) : !disabledRoles.some(role => userInfo.roles.includes(role))\n } else {\n isAuthorized = true\n }\n return isAuthorized\n }\n\n async initializeToken (store?: Store, isScheduleRefresh: boolean = true, forceLogin: boolean = false) {\n this.store = store\n const kcOptions: KeycloakInitOptions = {\n onLoad: forceLogin ? 'login-required' : 'check-sso',\n checkLoginIframe: false,\n timeSkew: 0,\n token: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || undefined,\n refreshToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || undefined,\n idToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || undefined,\n pkceMethod: 'S256'\n }\n\n return new Promise((resolve, reject) => {\n this.kc = Keycloak(ConfigHelper.getKeycloakConfigUrl())\n ConfigHelper.addToSession(SessionStorageKeys.SessionSynced, false)\n this.kc.init(kcOptions)\n .then(authenticated => {\n console.info('[TokenServices] is User Authenticated?: Syncing ' + authenticated)\n resolve(this.syncSessionAndScheduleTokenRefresh(isScheduleRefresh))\n })\n .catch(error => {\n reject(new Error('Could not Initialize KC' + error))\n })\n })\n }\n\n async syncSessionAndScheduleTokenRefresh (isScheduleRefresh: boolean = true) {\n if (this.kc?.authenticated) {\n this.syncSessionStorage()\n if (isScheduleRefresh) {\n this.scheduleRefreshTimer()\n }\n return this.kc.token\n } else {\n this.clearSession()\n return new Error('NOT_AUTHENTICATED')\n }\n }\n\n scheduleRefreshTimer (refreshEarlyTime = 0) {\n let refreshEarlyTimeinMilliseconds = Math.max(this.REFRESH_ATTEMPT_INTERVAL, refreshEarlyTime) * 1000\n this.scheduleRefreshToken(refreshEarlyTimeinMilliseconds)\n }\n\n private scheduleRefreshToken (refreshEarlyTimeinMilliseconds: number) {\n let refreshTokenExpiresIn = -1\n // check if refresh token is still valid . Or else clear all timers and throw errors\n if (this.kc && this.kc.timeSkew !== undefined && this.kc.refreshTokenParsed) {\n refreshTokenExpiresIn = this.kc.refreshTokenParsed['exp']! - Math.ceil(new Date().getTime() / 1000) + this.kc.timeSkew\n }\n if (refreshTokenExpiresIn < 0) {\n throw new Error('Refresh Token Expired. No more token refreshes')\n }\n let expiresIn = -1\n if (this.kc && this.kc.tokenParsed && this.kc.tokenParsed['exp'] && this.kc.timeSkew !== undefined) {\n expiresIn = this.kc.tokenParsed['exp'] - Math.ceil(new Date().getTime() / 1000) + this.kc.timeSkew\n }\n if (expiresIn < 0) {\n throw new Error('Refresh Token Expired. No more token refreshes')\n }\n let refreshInMilliSeconds = (expiresIn * 1000) - refreshEarlyTimeinMilliseconds // in milliseconds\n console.info('[TokenServices] Token Refresh Scheduled in %s Seconds', (refreshInMilliSeconds / 1000))\n this.timerId = setTimeout(() => {\n console.log('[TokenServices] Refreshing Token Attempt: %s ', ++this.counter)\n this.kc!.updateToken(-1)\n .then(refreshed => {\n if (refreshed) {\n console.log('Token successfully refreshed')\n this.syncSessionStorage()\n this.scheduleRefreshToken(refreshEarlyTimeinMilliseconds)\n }\n })\n .catch(() => {\n clearTimeout(this.timerId)\n })\n }, refreshInMilliSeconds)\n }\n\n private syncSessionStorage () {\n if (this.kc) {\n if (this.kc.token) {\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakToken, this.kc.token)\n }\n if (this.kc.refreshToken) {\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakRefreshToken, this.kc.refreshToken)\n }\n if (this.kc.idToken) {\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakIdToken, this.kc.idToken)\n }\n ConfigHelper.addToSession(SessionStorageKeys.SessionSynced, true)\n } else {\n ConfigHelper.addToSession(SessionStorageKeys.SessionSynced, false)\n }\n }\n\n private async clearSession () {\n if (this.store) {\n const authModule = getModule(AuthModule, this.store)\n authModule.clearSession()\n }\n ConfigHelper.removeFromSession(SessionStorageKeys.KeyCloakToken)\n ConfigHelper.removeFromSession(SessionStorageKeys.KeyCloakIdToken)\n ConfigHelper.removeFromSession(SessionStorageKeys.KeyCloakRefreshToken)\n }\n}\n\nexport default KeyCloakService.getInstance()\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","/**\n * Place to put all the custom utility methods\n */\n\nimport { Address, BaseAddressModel } from '@/models/Address'\nimport { Role, SlipStatus } from '@/util/constants'\n\nimport KeyCloakService from 'sbc-common-components/src/services/keycloak.services'\nimport moment from 'moment'\n\nexport default class CommonUtils {\n // Formatting date in the desired format for displaying in the template\n static formatDisplayDate (date: Date, format?: string) {\n return date ? moment(date).format(format || 'MMM DD, YYYY') : ''\n }\n\n static requiredFieldRule (errorMessage: string = 'This field is required') {\n return [v => !!v || errorMessage]\n }\n\n static optionalFieldRule (errorMessage: string, length: number) {\n return [v => !v || (v.length <= length) || errorMessage]\n }\n\n static isSigningIn (): boolean {\n const path = window.location.pathname\n return (\n path.includes('/signin') ||\n path.includes('/signin-redirect') ||\n path.includes('/signin-redirect-full')\n )\n }\n\n static isSigningOut (): boolean {\n const path = window.location.pathname\n return path.includes('/signout')\n }\n\n // blob convert to downloadable file\n static fileDownload (data: any, fileName: string, fileType: string = 'text/plain', action:string = 'download') {\n const blob = new Blob([data], { type: fileType })\n if (typeof window.navigator.msSaveBlob !== 'undefined') {\n // IE workaround for \"HTML7007: One or more blob URLs were\n // revoked by closing the blob for which they were created.\n // These URLs will no longer resolve as the data backing\n // the URL has been freed.\"\n window.navigator.msSaveBlob(blob, fileName)\n } else {\n const blobURL = (window.URL && window.URL.createObjectURL) ? window.URL.createObjectURL(blob) : window.webkitURL.createObjectURL(blob)\n const tempLink = document.createElement('a')\n tempLink.style.display = 'none'\n tempLink.href = blobURL\n if (action === 'open') {\n tempLink.setAttribute('target', '_blank')\n } else {\n tempLink.setAttribute('download', fileName)\n }\n\n // Safari thinks _blank anchor are pop ups. We only want to set _blank\n // target if the browser does not support the HTML5 download attribute.\n // This allows you to download files in desktop safari if pop up blocking\n // is enabled.\n if (typeof tempLink.download === 'undefined') {\n tempLink.setAttribute('target', '_blank')\n }\n document.body.appendChild(tempLink)\n tempLink.click()\n setTimeout(() => {\n document.body.removeChild(tempLink)\n // TO CHECK: not revoking may increase more temp memory usage\n // once download, we will revokeObjectURL\n if (action !== 'open') {\n window.URL.revokeObjectURL(blobURL)\n }\n }, 200)\n }\n }\n\n static statusListColor (status: string, textColor: boolean = true) {\n let color = ''\n switch (status) {\n case SlipStatus.ACTIVE:\n case SlipStatus.COMPLETE:\n case SlipStatus.REFUNDPROCESSED:\n case SlipStatus.WRITEOFFCOMPLETED:\n color = 'success'\n break\n case SlipStatus.BOUNCED:\n case SlipStatus.NSF:\n case SlipStatus.LINKED:\n case SlipStatus.REFUNDREQUEST:\n case SlipStatus.REFUNDAUTHORIZED:\n case SlipStatus.WRITEOFFAUTHORIZED:\n case SlipStatus.WRITEOFFREQUESTED:\n case SlipStatus.VOID:\n color = 'error'\n break\n }\n\n return textColor ? `${color}--text` : color\n }\n\n static appendCurrencySymbol (currency: number | string) {\n return '$' + currency\n }\n\n static cleanObject (obj) {\n if (obj.remainingAmount) {\n obj.remainingAmount = obj.remainingAmount.replace(/[^0-9.]/g, '')\n }\n return Object.keys(obj)\n .filter((k) => obj[k] !== '' && obj[k] !== null)\n .reduce((a, k) => ({ ...a, [k]: obj[k] }), {})\n }\n\n static createQueryParams = params =>\n Object.keys(params)\n .map(k => `${k}=${encodeURI(params[k])}`)\n .join('&')\n\n static appendQueryParamsIfNeeded (targetUrl: string, route: any): string {\n const requestParams = CommonUtils.createQueryParams(route.query)\n return requestParams ? `${targetUrl}?${requestParams}` : targetUrl\n }\n\n // for converting address object of sbc-auth to as needed for BaseAddress component\n static convertAddressForComponent (address: Address) : BaseAddressModel {\n return {\n addressCity: address.city,\n addressCountry: address.country,\n addressRegion: address.region,\n deliveryInstructions: address.deliveryInstructions,\n postalCode: address.postalCode,\n streetAddress: address.street,\n streetAddressAdditional: address.streetAdditional\n }\n }\n\n // for converting address object of BaseAddress component to as needed for sbc-auth\n static convertAddressForAuth (iaddress: BaseAddressModel) : Address {\n return {\n city: iaddress.addressCity,\n country: iaddress.addressCountry,\n region: iaddress.addressRegion,\n deliveryInstructions: iaddress.deliveryInstructions,\n postalCode: iaddress.postalCode,\n street: iaddress.streetAddress,\n streetAdditional: iaddress.streetAddressAdditional\n }\n }\n\n static isApproverRole () {\n const approverRole:any = [Role.FAS_REFUND_APPROVER]\n return KeyCloakService.verifyRoles(approverRole, [])\n }\n\n static isVoidRole () {\n const voidRole:any = [Role.FAS_VOID]\n return KeyCloakService.verifyRoles(voidRole, [])\n }\n\n /**\n * check its in refunc process\n * @param {string} status\n */\n static isRefundProcessStatus (status) {\n return [\n SlipStatus.REFUNDREQUEST,\n SlipStatus.REFUNDAUTHORIZED,\n SlipStatus.REFUNDPROCESSED,\n SlipStatus.REFUNDREJECTED,\n SlipStatus.REFUNDUPLOADED\n ].includes(status)\n }\n\n /**\n * status is refundrequest\n * @param {string} status\n */\n static isRefundRequestStatus (status) {\n return [\n SlipStatus.REFUNDREQUEST\n ].includes(status)\n }\n\n /**\n * status permission allow to chaneg details\n * @param {string} status\n */\n static isEditEnabledBystatus (status) {\n return ![\n SlipStatus.REFUNDPROCESSED,\n SlipStatus.REFUNDAUTHORIZED,\n SlipStatus.NSF,\n SlipStatus.LINKED\n ].includes(status)\n }\n\n static isObject = (object) => {\n return object != null && typeof object === 'object'\n }\n\n static isDeepEqual = (object1, object2) => {\n const objKeys1 = Object.keys(object1)\n const objKeys2 = Object.keys(object2)\n\n if (objKeys1.length !== objKeys2.length) return false\n\n for (const key of objKeys1) {\n const value1 = object1[key]\n const value2 = object2[key]\n\n const isObjects = CommonUtils.isObject(value1) && CommonUtils.isObject(value2)\n\n if ((isObjects && !CommonUtils.isDeepEqual(value1, value2)) ||\n (!isObjects && value1 !== value2)\n ) {\n return false\n }\n }\n return true\n }\n}\n","import { SessionStorageKeys } from '@/util/constants'\n\nexport default class ConfigHelper {\n static async fetchConfig () {\n // sbc common components need the following keys\n sessionStorage.setItem(SessionStorageKeys.AuthApiUrl, ConfigHelper.getAuthAPIUrl())\n sessionStorage.setItem(SessionStorageKeys.PayApiUrl, ConfigHelper.getPayAPIURL())\n sessionStorage.setItem(SessionStorageKeys.StatusApiUrl, ConfigHelper.getStatusAPIUrl())\n sessionStorage.setItem(SessionStorageKeys.AuthWebUrl, ConfigHelper.getAuthWebUrl())\n sessionStorage.setItem(SessionStorageKeys.FasWebUrl, ConfigHelper.getFasWebUrl())\n if (ConfigHelper.getSiteminderLogoutUrl()) {\n sessionStorage.setItem(SessionStorageKeys.SiteminderLogoutUrl, ConfigHelper.getSiteminderLogoutUrl())\n }\n }\n\n /**\n * this will run everytime when vue is being loaded..so do the call only when session storage doesnt have the values\n */\n static saveConfigToSessionStorage () {\n return this.fetchConfig()\n }\n\n static getSelfURL () {\n // this is without a trailing slash\n return `${window.location.origin}${import.meta.env.VUE_APP_PATH}`.replace(/\\/$/, '') // remove the slash at the end\n }\n\n static getPayAPIURL () {\n const payApiUrl = `${import.meta.env.VUE_APP_PAY_API_URL}` + `${import.meta.env.VUE_APP_PAY_API_VERSION}`\n return sessionStorage.getItem(SessionStorageKeys.PayApiUrl) || payApiUrl\n }\n\n static getFasAPIURL () {\n return `${ConfigHelper.getPayAPIURL()}/fas`\n }\n\n static getAuthAPIUrl () {\n const authApiUrl = `${import.meta.env.VUE_APP_AUTH_API_URL}` + `${import.meta.env.VUE_APP_AUTH_API_VERSION}`\n return sessionStorage.getItem(SessionStorageKeys.AuthApiUrl) || authApiUrl\n }\n\n static getAuthWebUrl () {\n return sessionStorage.getItem(SessionStorageKeys.AuthWebUrl) || `${import.meta.env.VUE_APP_AUTH_WEB_URL}`\n }\n\n static getFasWebUrl () {\n return sessionStorage.getItem(SessionStorageKeys.FasWebUrl) || `${import.meta.env.VUE_APP_FAS_WEB_URL}`\n }\n\n static getStatusAPIUrl () {\n const statusApiUrl = `${import.meta.env.VUE_APP_STATUS_API_URL}` + `${import.meta.env.VUE_APP_STATUS_API_VERSION}`\n return sessionStorage.getItem(SessionStorageKeys.StatusApiUrl) || statusApiUrl\n }\n\n static getSiteminderLogoutUrl () {\n const logoutUrl = `${import.meta.env.VUE_APP_SITEMINDER_LOGOUT_URL}`\n return sessionStorage.getItem(SessionStorageKeys.SiteminderLogoutUrl) || logoutUrl\n }\n\n static getKeycloakAuthUrl () {\n return `${import.meta.env.VUE_APP_KEYCLOAK_AUTH_URL}`\n }\n\n static getKeycloakRealm () {\n return `${import.meta.env.VUE_APP_KEYCLOAK_REALM}`\n }\n\n static getKeycloakClientId () {\n return `${import.meta.env.VUE_APP_KEYCLOAK_CLIENTID}`\n }\n\n static getAddressCompleteKey () {\n return `${import.meta.env.VUE_APP_ADDRESS_COMPLETE_KEY}`\n }\n\n static addToSession (key:string, value:any) {\n sessionStorage.setItem(key, value)\n }\n\n static getFromSession (key:string) {\n return sessionStorage.getItem(key)\n }\n\n static removeFromSession (key:string) {\n sessionStorage.removeItem(key)\n }\n\n static clearSession () {\n sessionStorage.clear()\n }\n}\n","// Returns a function, that, as long as it continues to be invoked, will not\n// be triggered. The function will be called after it stops being called for\n// N milliseconds. If `immediate` is passed, trigger the function on the\n// leading edge, instead of the trailing.\n\nfunction debounce (func, wait = 300, immediate = false) {\n let timeout\n\n // to avoid this type error define this with type any, arg for rest arguments\n return function (this: any, ...args) {\n const context = this\n\n const later = function () {\n timeout = null\n if (!immediate) func.apply(context, args)\n }\n const callNow = immediate && !timeout\n\n clearTimeout(timeout)\n timeout = setTimeout(later, wait)\n if (callNow) func.apply(context, args)\n }\n}\n\nexport default debounce\n","import { computed, ref } from '@vue/composition-api'\n\nconst hasCallFailed = ref(false)\nconst activeCalls = ref(0)\nconst isThereActiveCalls = computed(() => {\n return activeCalls.value > 0\n})\n\nexport const useIndicators = () => {\n return {\n hasCallFailed,\n activeCalls,\n isThereActiveCalls\n }\n}\n","/*\nComposable function for loader component that is displayed whenever axios async process takes place\nGlobal loader is used in App.vue where show a full route loader - \nWhile, isLoading can be used inside an individual component - \n\n*/\n\nimport { ref } from '@vue/composition-api'\nimport { useIndicators } from '../useIndicators'\n\nexport function useLoader () {\n const { isThereActiveCalls } = useIndicators()\n const isLoading = ref(false)\n // vuex getters\n function changeLoadingStatus (isLoadingStatus: boolean): void {\n isLoading.value = isLoadingStatus\n }\n\n function toggleLoading (): void {\n changeLoadingStatus(!isLoading.value)\n }\n\n return {\n isLoading,\n isThereActiveCalls,\n toggleLoading\n }\n}\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\nvar enhanceError = require('./core/enhanceError');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n },\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nvar utils = require('./../utils');\nvar defaults = require('./../defaults');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n","'use strict';\n\nvar pkg = require('./../../package.json');\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\nvar currentVerArr = pkg.version.split('.');\n\n/**\n * Compare package versions\n * @param {string} version\n * @param {string?} thanVersion\n * @returns {boolean}\n */\nfunction isOlderVersion(version, thanVersion) {\n var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;\n var destVer = version.split('.');\n for (var i = 0; i < 3; i++) {\n if (pkgVersionArr[i] > destVer[i]) {\n return true;\n } else if (pkgVersionArr[i] < destVer[i]) {\n return false;\n }\n }\n return false;\n}\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator\n * @param {string?} version\n * @param {string} message\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n var isDeprecated = version && isOlderVersion(version);\n\n function formatMessage(opt, desc) {\n return '[Axios v' + pkg.version + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed in ' + version));\n }\n\n if (isDeprecated && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n isOlderVersion: isOlderVersion,\n assertOptions: assertOptions,\n validators: validators\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\nvar validator = require('../helpers/validator');\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","module.exports = require('./lib/axios');","import Axios from 'axios'\nimport ConfigHelper from '@/util/config-helper'\nimport { SessionStorageKeys } from '@/util/constants'\nimport { useIndicators } from '@/composables/useIndicators'\n// import store from '@/store'\n// using fasStore from window to avoid library build issue.\nconst axios = Axios.create()\n\nconst { activeCalls, hasCallFailed, isThereActiveCalls } = useIndicators()\n\naxios.defaults.showGlobalLoader = false // by default, false\naxios.defaults.showGlobalErrorHandling = true\n\naxios.interceptors.request.use(\n config => {\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)\n if (token) {\n config.headers.Authorization = `Bearer ${token}`\n }\n if (config.showGlobalLoader) {\n activeCalls.value++\n }\n return config\n },\n error => Promise.reject(error)\n)\n\naxios.interceptors.response.use(\n response => {\n // decrement active calls count by one\n if (response.config.showGlobalLoader && isThereActiveCalls.value) {\n activeCalls.value--\n }\n return response\n },\n error => {\n // decrement active calls count by one\n if (error.config.showGlobalLoader && isThereActiveCalls.value) {\n activeCalls.value--\n }\n // call has failed in this case. And if the config showGlobalErrorHandling is true, then update store\n if (error.config.showGlobalErrorHandling && error?.response?.status >= 500) {\n hasCallFailed.value = true\n }\n return Promise.reject(error)\n }\n)\n\n// to work on both case export as default and normal\nexport { axios }\nexport default axios\n","import { AxiosResponse } from 'axios'\nimport { Code } from '@/models/Code'\nimport ConfigHelper from '@/util/config-helper'\nimport axios from '@/util/http-util'\n\nexport default class CodesService {\n public static async getCodes (codeType: string): Promise> {\n return axios.get(`${ConfigHelper.getPayAPIURL()}/codes/${codeType}`)\n }\n}\n","import { ref } from '@vue/composition-api'\nimport { Code } from '@/models/Code'\nimport CodesService from '@/services/codes.service'\nimport { SlipStatus } from '@/util/constants'\n\nconst routingSlipStatusList = ref([])\n\nexport const useCodes = () => {\n const getRoutingSlipStatusList = async () => {\n if (routingSlipStatusList.value.length === 0) {\n const response: any = await CodesService.getCodes(\n 'routing_slip_statuses'\n )\n if (response && response.data && response.status === 200) {\n routingSlipStatusList.value = response.data?.codes.filter(\n code => code.code !== SlipStatus.REFUNDREJECTED\n )\n return\n }\n routingSlipStatusList.value = []\n }\n }\n return {\n routingSlipStatusList,\n getRoutingSlipStatusList\n }\n}\n","import { Code } from '@/models/Code'\nimport { SlipStatus } from '@/util/constants'\nimport { ref, computed, toRefs, onMounted } from '@vue/composition-api'\nimport { useCodes } from '../useCodes'\n\nexport function useStatusList (props, context) {\n const { getRoutingSlipStatusList, routingSlipStatusList } = useCodes()\n // default value set blank incase if we didnt pass props\n const { value = ref('') } = toRefs(props)\n\n // using same v-model value for getting value and update parent on change\n const currentStatus = computed({\n get: () => {\n return value.value || ''\n },\n set: (modalValue: Code) => {\n context.emit('input', modalValue.code)\n }\n })\n\n onMounted(() => {\n // getting status list mouint and setting inside store\n // will make call once till page refresh\n getRoutingSlipStatusList()\n })\n\n /**\n * return status label on code\n *\n * @param {string} code\n * @returns {string} description - label\n */\n function statusLabel (code: string) {\n const codeArray = selectedStatusObject(code)\n return codeArray[0]?.description || ''\n }\n\n /**\n * filtering array and find given value of object\n * use full when needed to set object of status\n * @param {string} code\n * @returns [{code, description}]\n */\n\n function selectedStatusObject (code: string) {\n return routingSlipStatusList.value?.filter(\n statusList => statusList.code === code\n )\n }\n\n return {\n routingSlipStatusList,\n currentStatus,\n statusLabel,\n selectedStatusObject\n }\n}\n","import { AxiosResponse } from 'axios'\nimport CommonUtils from '@/util/common-util'\nimport ConfigHelper from '@/util/config-helper'\nimport { GetFeeRequestParams, Payment } from '@/models/Payment'\nimport { LinkRoutingSlipPrams } from '@/models/RoutingSlip'\nimport axios from '@/util/http-util'\nimport { CreateRoutingSlipStatus, PatchActions, SlipStatus } from '@/util/constants'\n\nexport default class RoutingSlip {\n public static async getRoutingSlip (\n routingNumber: string,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.get(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingNumber}`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async createRoutingSlip (\n routingSlipRequest: RoutingSlip,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips`,\n routingSlipRequest,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async adjustRoutingSlip (\n payments: Payment[],\n routingSlipNumber: string\n ): Promise {\n const payload = {\n status: SlipStatus.CORRECTION,\n payments: payments\n }\n return axios.patch(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}?action=${PatchActions.UPDATE_STATUS}`,\n payload\n )\n }\n\n public static async updateRoutingSlipStatus (\n code: string,\n routingSlipNumber: string\n ): Promise {\n return axios.patch(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}?action=updateStatus`,\n { status: code }\n )\n }\n\n public static async updateRoutingSlipRefundStatus (\n code: string,\n routingSlipNumber: string\n ): Promise {\n try {\n const response = await axios.patch(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}?action=updateRefundStatus`,\n { refund_status: code }\n )\n if (response?.data) {\n return response.data\n }\n return null\n } catch (error) {\n console.error('Routing slip refund status update failed', error)\n throw error\n }\n }\n\n public static async updateRoutingSlipComments (\n data: any,\n slipNumber: string\n ): Promise {\n try {\n const response = await axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${slipNumber}/comments`,\n data\n )\n if (response?.data) {\n return response.data\n }\n return null\n } catch (error) {\n console.error('Failed to update routing slip comments', error)\n throw error\n }\n }\n\n public static async updateRoutingSlipRefund (\n details: string,\n routingSlipNumber: string\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}/refunds`,\n details\n )\n }\n\n public static async getSearchRoutingSlip (\n searchParams: RoutingSlip,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/queries`,\n searchParams,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async saveLinkRoutingSlip (\n LinkRoutingSlip: LinkRoutingSlipPrams,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/links`,\n LinkRoutingSlip,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async getLinkedRoutingSlips (\n routingSlipNumber: string,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.get(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}/links`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async getDailyReport (\n selectedDate: string,\n type: string = 'application/pdf',\n showGlobalLoader: boolean = false\n ): Promise {\n const headers = {\n Accept: type\n }\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${selectedDate}/reports`,\n {},\n {\n headers,\n responseType: 'blob' as 'json',\n showGlobalLoader: showGlobalLoader\n }\n )\n }\n\n public static async getSearchFilingType (\n searchParams: string,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.get(\n `${ConfigHelper.getPayAPIURL()}/fees/schedules?description=${searchParams}`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async getFeeByCorpTypeAndFilingType (\n getFeeRequestParams: GetFeeRequestParams,\n showGlobalLoader: boolean = false\n ): Promise {\n const requestParams = CommonUtils.createQueryParams(getFeeRequestParams.requestParams)\n return axios.get(\n `${ConfigHelper.getPayAPIURL()}/fees/${getFeeRequestParams.corpTypeCode}/${getFeeRequestParams.filingTypeCode}?${requestParams}`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async saveManualTransactions (\n transactions: any,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getPayAPIURL()}/payment-requests`,\n transactions,\n { showGlobalLoader: showGlobalLoader }\n\n )\n }\n\n public static async cancelRoutingSlipInvoice (\n invoiceId: number,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getPayAPIURL()}/payment-requests/${invoiceId}/refunds`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n}\n","import { computed, ref } from '@vue/composition-api'\nimport RoutingSlipService from '@/services/routingSlip.services'\nimport { AccountInfo, AdjustRoutingSlipAmountPrams, AdjustRoutingSlipChequePrams, GetRoutingSlipRequestPayload, LinkedRoutingSlips, RoutingSlip, RoutingSlipDetails } from '@/models/RoutingSlip'\nimport { ApiErrors, CreateRoutingSlipStatus, headerSearchTitle as headerSearchTitleConstant, SlipStatus } from '@/util/constants'\nimport CommonUtils from '@/util/common-util'\nimport { BusinessInfo, GetFeeRequestParams, Payment, TransactionParams } from '@/models/Payment'\n\nconst defaultParams = {\n page: 1,\n limit: 50,\n total: Infinity\n}\nconst headerSearchTitle = ref(headerSearchTitleConstant)\nconst searchRoutingSlipResult = ref([])\nconst searchRoutingSlipParams = ref(defaultParams)\n\nconst routingSlip = ref({})\nconst linkedRoutingSlips = ref(undefined)\nconst routingSlipDetails = ref({})\nconst accountInfo = ref({})\nconst chequePayment = ref([])\nconst cashPayment = ref({})\nconst isPaymentMethodCheque = ref(true)\nconst isAmountPaidInUsd = ref(false)\nconst autoCompleteRoutingSlips = ref([])\n\nexport const useRoutingSlip = () => {\n // Computed\n const invoiceCount = computed(() => {\n return routingSlip.value?.invoices?.length\n })\n\n const searchParamsExist = computed(() => {\n const params = searchRoutingSlipParams.value\n for (const key in params) {\n if (params[key] && params[key] !== '') {\n return false\n }\n }\n return true\n })\n\n // for a child linked to a parent routing slip, there would be a parentNumber\n const isRoutingSlipAChild = computed(() => {\n return !!routingSlip.value?.parentNumber\n })\n\n // if routingslip has parentNumber then it is a child Else, check if there are any children in linkedroutingslips for it.(in this case, it is a parent)\n const isRoutingSlipLinked = computed(() => {\n return (\n isRoutingSlipAChild.value || linkedRoutingSlips.value?.children.length > 0\n )\n })\n\n const isRoutingSlipVoid = computed(() => {\n return routingSlip.value?.status === SlipStatus.VOID\n })\n\n const updateRoutingSlipChequeNumber = (chequeNumToChange: AdjustRoutingSlipChequePrams) => {\n const payments = routingSlip.value.payments.map((payment: Payment, i: number) => {\n if (chequeNumToChange.paymentIndex === i) {\n payment.chequeReceiptNumber = chequeNumToChange.chequeNum\n }\n return { ...payment }\n })\n routingSlip.value.payments = payments\n }\n\n const updateRoutingSlipAmount = (amountToChange: AdjustRoutingSlipAmountPrams) => {\n const payments = routingSlip.value.payments.map((payment: Payment, i: number) => {\n if (amountToChange.paymentIndex === i) {\n if (amountToChange.isRoutingSlipPaidInUsd) {\n payment.paidUsdAmount = amountToChange.amount\n } else {\n payment.paidAmount = amountToChange.amount\n }\n }\n return { ...payment }\n })\n routingSlip.value.payments = payments\n }\n\n // Functions\n const createRoutingSlip = async () => {\n // build the RoutingSlip Request JSON object that needs to be sent.\n let routingSlipRequest: RoutingSlip = {}\n routingSlipRequest = { ...routingSlipDetails.value }\n routingSlipRequest.paymentAccount = accountInfo.value\n\n // By design, a routing slip can only have one payment method - CASH or CHEQUE.\n routingSlipRequest.payments = isPaymentMethodCheque.value\n ? chequePayment.value\n : [cashPayment.value]\n\n const response = await RoutingSlipService.createRoutingSlip(\n routingSlipRequest,\n true\n )\n if (response && response.data && response.status === 200) {\n routingSlip.value = response.data\n }\n }\n\n const checkRoutingNumber = async (): Promise => {\n try {\n const routingNumber = routingSlipDetails.value.number\n const response = await RoutingSlipService.getRoutingSlip(routingNumber)\n // if routing number existing we will get 200 as response\n // else we will get 204\n if (response.status === 204) {\n return CreateRoutingSlipStatus.VALID\n }\n // all other case routing is existing so can't use this number\n return CreateRoutingSlipStatus.EXISTS\n } catch (error) {\n if (error.response?.status === 400 && error.response?.data?.type === ApiErrors.FAS_INVALID_ROUTING_SLIP_DIGITS) {\n return CreateRoutingSlipStatus.INVALID_DIGITS\n }\n\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data)\n // on error we allow the routing number which should break on create and show error message\n return CreateRoutingSlipStatus.VALID\n }\n }\n\n const getRoutingSlip = async (getRoutingSlipRequestPayload: GetRoutingSlipRequestPayload) => {\n try {\n routingSlip.value = null\n const response = await RoutingSlipService.getRoutingSlip(\n getRoutingSlipRequestPayload.routingSlipNumber,\n getRoutingSlipRequestPayload?.showGlobalLoader\n )\n\n if (response && response.data && response.status === 200) {\n routingSlip.value = response.data\n }\n // TODO : need to handle if slip not existing\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data) // 500 errors may not return data\n }\n }\n\n const updateRoutingSlipStatus = async (\n statusDetails: any\n ) => {\n const slipNumber = routingSlip.value.number\n // update status\n try {\n let response\n if (CommonUtils.isRefundProcessStatus(statusDetails?.status)) {\n response = await RoutingSlipService.updateRoutingSlipRefund(\n statusDetails,\n slipNumber\n )\n } else {\n response = await RoutingSlipService.updateRoutingSlipStatus(\n statusDetails.status,\n slipNumber\n )\n }\n if (response?.data && (response.status === 200 || response.status === 202)) {\n if (!CommonUtils.isRefundProcessStatus(statusDetails?.status)) {\n routingSlip.value = response.data\n } else {\n const getRoutingSlipRequestPayload: GetRoutingSlipRequestPayload = { routingSlipNumber: slipNumber }\n getRoutingSlip(getRoutingSlipRequestPayload)\n }\n return response\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response)\n return error?.response\n }\n }\n\n const updateRoutingSlipRefundStatus = async (status: any) => {\n const slipNumber = routingSlip.value.number\n try {\n const responseData = await RoutingSlipService.updateRoutingSlipRefundStatus(status, slipNumber)\n return responseData\n } catch (error) {\n console.error('Error updating refund status:', error)\n return error?.response\n }\n }\n\n const updateRoutingSlipComments = async (text: any) => {\n const slipNumber = routingSlip.value.number\n const data = {\n comment: {\n businessId: slipNumber,\n comment: text\n }\n }\n try {\n const responseData = await RoutingSlipService.updateRoutingSlipComments(data, slipNumber)\n return responseData\n } catch (error) {\n console.error('Error updating routing slip comments:', error)\n return error?.response\n }\n }\n\n const adjustRoutingSlip = async (payments: Payment[]): Promise => {\n // build the RoutingSlip Request JSON object that needs to be sent.\n const slipNumber = routingSlip.value.number\n try {\n const response = await RoutingSlipService.adjustRoutingSlip(\n payments,\n slipNumber\n )\n if (response?.data && response.status === 200) {\n return response.data\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response)\n return error?.response\n }\n }\n\n const resetRoutingSlipDetails = () => {\n routingSlipDetails.value = undefined\n accountInfo.value = undefined\n chequePayment.value = undefined\n cashPayment.value = undefined\n isPaymentMethodCheque.value = undefined\n }\n\n const resetSearchParams = (): void => {\n searchRoutingSlipParams.value = defaultParams\n searchRoutingSlipResult.value = []\n }\n\n const searchRoutingSlip = async (appendToResults = false) => {\n // // build the RoutingSlip Request JSON object that needs to be sent.\n\n let params = { ...searchRoutingSlipParams.value }\n // filtering and removing all non set values\n params = CommonUtils.cleanObject(params)\n\n // formatting as per API\n if (params.dateFilter) {\n params.dateFilter = {\n startDate: CommonUtils.formatDisplayDate(\n params.dateFilter[0],\n 'YYYY-MM-DD'\n ),\n endDate: CommonUtils.formatDisplayDate(\n params.dateFilter[1],\n 'YYYY-MM-DD'\n )\n }\n }\n\n // check for error handling\n if (params.status) {\n params.status = params.status.code\n }\n\n if (Object.keys(params).length > 0) {\n // need to reset result of there is no search params\n const response = await RoutingSlipService.getSearchRoutingSlip(\n params\n )\n if (response && response.data && response.status === 200) {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n total: response.data?.total || 0\n }\n if (appendToResults) {\n searchRoutingSlipResult.value = [\n ...searchRoutingSlipResult.value,\n ...response.data?.items\n ]\n } else {\n searchRoutingSlipResult.value = response.data?.items\n }\n\n return\n }\n }\n searchRoutingSlipResult.value = []\n }\n\n const saveLinkRoutingSlip = async (\n parentRoutingSlipNumber: string\n ): Promise => {\n const childRoutingSlipNumber: string = routingSlip.value.number\n\n const LinkPrams = { childRoutingSlipNumber, parentRoutingSlipNumber }\n\n try {\n // handle error condtions here\n const response = await RoutingSlipService.saveLinkRoutingSlip(LinkPrams)\n if (response && response.data && response.status === 200) {\n return {\n error: false\n }\n }\n } catch (error) {\n if (error.response.status === 400) {\n return { error: true, details: error.response?.data }\n }\n\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data)\n }\n }\n\n const getLinkedRoutingSlips = async (routingSlipNumber) => {\n try {\n const response = await RoutingSlipService.getLinkedRoutingSlips(\n routingSlipNumber,\n true\n )\n let result: LinkedRoutingSlips\n if (response && response.data && response.status === 200) {\n result = response.data\n }\n // 204 non content response\n linkedRoutingSlips.value = result\n } catch (error) {\n linkedRoutingSlips.value = undefined\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data) // 500 errors may not return data\n }\n }\n\n const getDailyReportByDate = async (selectedDate, type) => {\n const formatedDate = CommonUtils.formatDisplayDate(\n selectedDate,\n 'YYYY-MM-DD'\n )\n try {\n return await RoutingSlipService.getDailyReport(formatedDate, type, false)\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data) // 500 errors may not return data\n return error.response\n }\n }\n\n const getAutoCompleteRoutingSlips = async (\n routingSlipNumber\n ): Promise => {\n const response = await RoutingSlipService.getSearchRoutingSlip({\n routingSlipNumber\n })\n if (response && response.data && response.status === 200) {\n return response.data?.items\n }\n\n return []\n }\n\n const getFeeByCorpTypeAndFilingType = async (\n getFeeRequestParams: GetFeeRequestParams\n ): Promise => {\n // Currently, in FAS we only need total from the result that is the source of truth.\n // Other properties such as tax breakdown and priority fees can be ignored here.\n const response = await RoutingSlipService.getFeeByCorpTypeAndFilingType(\n getFeeRequestParams\n )\n if (response && response.data && response.status === 200) {\n return response.data?.total\n }\n return null\n }\n\n const saveManualTransactions = async (transation: any): Promise => {\n // prepare format from here\n const routingSlipNumber: string = routingSlip.value.number\n\n const {\n referenceNumber,\n filingType,\n futureEffective,\n priority,\n quantity\n } = transation\n const businessInfo: BusinessInfo = {\n corpType: filingType.corpTypeCode.code\n }\n\n // no need to pass if empty\n if (referenceNumber) {\n businessInfo.businessIdentifier = referenceNumber\n }\n\n const transactionParams: TransactionParams = {\n businessInfo,\n filingInfo: {\n filingTypes: [\n {\n filingTypeCode: filingType.filingTypeCode.code,\n futureEffective: futureEffective,\n priority: priority,\n quantity: parseInt(quantity)\n }\n ]\n },\n accountInfo: {\n routingSlip: routingSlipNumber\n }\n }\n\n const response = await RoutingSlipService.saveManualTransactions(\n transactionParams\n )\n return response\n }\n\n const cancelRoutingSlipInvoice = async (invoiceId: number) => {\n return await RoutingSlipService.cancelRoutingSlipInvoice(invoiceId)\n }\n\n async function infiniteScrollCallback () {\n const params = { ...searchRoutingSlipParams.value }\n if (params.total !== Infinity && params.total < params.limit) return true\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n page: searchRoutingSlipParams.value.page ? searchRoutingSlipParams.value.page + 1 : 1\n }\n await searchRoutingSlip(true)\n return false\n }\n\n return {\n headerSearchTitle,\n searchRoutingSlipResult,\n searchRoutingSlipParams,\n routingSlip,\n linkedRoutingSlips,\n routingSlipDetails,\n accountInfo,\n chequePayment,\n cashPayment,\n isPaymentMethodCheque,\n isAmountPaidInUsd,\n autoCompleteRoutingSlips,\n invoiceCount,\n searchParamsExist,\n isRoutingSlipAChild,\n isRoutingSlipLinked,\n isRoutingSlipVoid,\n defaultParams,\n updateRoutingSlipChequeNumber,\n updateRoutingSlipAmount,\n createRoutingSlip,\n checkRoutingNumber,\n getRoutingSlip,\n updateRoutingSlipStatus,\n updateRoutingSlipRefundStatus,\n adjustRoutingSlip,\n resetRoutingSlipDetails,\n resetSearchParams,\n searchRoutingSlip,\n saveLinkRoutingSlip,\n getLinkedRoutingSlips,\n getDailyReportByDate,\n getAutoCompleteRoutingSlips,\n getFeeByCorpTypeAndFilingType,\n saveManualTransactions,\n cancelRoutingSlipInvoice,\n infiniteScrollCallback,\n updateRoutingSlipComments\n }\n}\n","import { computed, onMounted, reactive, ref, toRefs } from '@vue/composition-api'\n\nimport CommonUtils from '@/util/common-util'\nimport ConfigHelper from '@/util/config-helper'\nimport debounce from '@/util/debounce'\nimport { useLoader } from '@/composables/common/useLoader'\nimport { useStatusList } from '@/composables/common/useStatusList'\nimport { useRoutingSlip } from '../useRoutingSlip'\nimport { RoutingSlipRefundCodes, RoutingSlipRefundStatus, SlipStatus } from '@/util/constants'\n\nexport function useSearch (props, context) {\n const {\n headerSearchTitle,\n resetSearchParams,\n searchParamsExist,\n searchRoutingSlip,\n searchRoutingSlipParams,\n searchRoutingSlipResult,\n infiniteScrollCallback,\n defaultParams\n } = useRoutingSlip()\n const { isLibraryMode } = toRefs(props)\n // Adding openFromAuth=true queryparams so that we can build breadcrumbs\n // Eg of a typical breadcrumb flow = Staff Dashboard -> FAS Dashboard -> View Routing Slip: test -> View Routing Slip: testchild\n const fasUrl = `${ConfigHelper.getFasWebUrl()}?openFromAuth=true`\n\n const { statusLabel } = useStatusList(reactive({ value: '' }), {})\n const { isLoading, toggleLoading } = useLoader()\n\n const showExpandedFolio = ref([])\n const showExpandedCheque = ref([])\n // to make sure not updating result on keyup\n const searchParamsChanged = ref(false)\n const reachedEnd = ref(false)\n\n const headerSearch: any = computed({\n get: () => {\n return headerSearchTitle.value || []\n },\n set: (modalValue: any) => {\n headerSearchTitle.value = modalValue\n }\n })\n\n // columntoshow component and update the local object if display = true\n const displayedHeaderSearch: any = computed(() => {\n const displayed = []\n for (let i = 0; i < headerSearch.value?.length; i++) {\n if (headerSearch.value[i].display) {\n displayed.push(headerSearch.value[i])\n }\n }\n return displayed\n })\n\n function canShowColumn (columnName) {\n return displayedHeaderSearch.value.find(header => {\n return header.value === columnName\n })\n }\n\n function updateSearchFilter (updates: any) {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n ...defaultParams,\n ...updates\n }\n searchParamsChanged.value = true\n reachedEnd.value = false\n }\n\n // using same v-model value for getting value and update parent on change\n const routingSlipNumber: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.routingSlipNumber || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n routingSlipNumber: modalValue\n })\n }\n })\n\n const receiptNumber: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.receiptNumber || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n receiptNumber: modalValue\n })\n }\n })\n\n const status: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.status || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n status: modalValue\n })\n }\n })\n\n const refundStatus: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.refundStatus || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n refundStatus: modalValue\n })\n }\n })\n\n const businessIdentifier: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.businessIdentifier || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n businessIdentifier: modalValue\n })\n }\n })\n\n const accountName: any = computed({\n get: () => {\n return searchRoutingSlipParams.value?.accountName || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n accountName: modalValue\n })\n }\n })\n\n const initiator: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.initiator || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n initiator: modalValue\n })\n }\n })\n\n const remainingAmount: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.remainingAmount || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n remainingAmount: modalValue\n })\n }\n })\n\n const dateFilter: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.dateFilter || []\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n dateFilter: modalValue\n })\n }\n })\n\n const chequeReceiptNumber: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.chequeReceiptNumber || ''\n },\n set: (modalValue: any) => {\n updateSearchFilter({\n chequeReceiptNumber: modalValue\n })\n }\n })\n\n function applyDateFilter (dateRangeObj) {\n dateFilter.value = dateRangeObj\n }\n\n async function searchNow () {\n toggleLoading()\n await searchRoutingSlip()\n searchParamsChanged.value = false\n toggleLoading()\n }\n\n onMounted(() => {\n // To be triggered when coming back to FAS home page from a breadcrumb and if there are any search params present\n if (!searchParamsExist.value) {\n searchNow()\n }\n })\n\n const debouncedSearch = debounce(() => {\n searchNow()\n })\n\n const appendQueryParamsIfNeeded = CommonUtils.appendQueryParamsIfNeeded\n\n // get label of status\n function getStatusLabel (code: string) {\n return statusLabel(code)\n }\n\n async function clearFilter () {\n toggleLoading()\n resetSearchParams()\n await searchRoutingSlip()\n searchParamsChanged.value = false\n toggleLoading()\n }\n\n function toggleFolio (id: number) {\n // to show and hide multiple folio on click\n // remove from array if already existing else add to array\n if (showExpandedFolio.value.includes(id)) {\n showExpandedFolio.value = showExpandedFolio.value.filter(function (item) {\n return item !== id\n })\n } else {\n showExpandedFolio.value.push(id)\n }\n }\n\n function toggleCheque (id: number) {\n // to show and hide multiple folio on click\n // remove from array if already existing else add to array\n if (showExpandedCheque.value.includes(id)) {\n showExpandedCheque.value = showExpandedCheque.value.filter(function (item) {\n return item !== id\n })\n } else {\n showExpandedCheque.value.push(id)\n }\n }\n\n function formatFolioResult (routingSlip) {\n // to make sure not updating on keyup\n if (\n !searchParamsChanged.value &&\n businessIdentifier.value &&\n businessIdentifier.value !== ''\n ) {\n return [businessIdentifier.value]\n }\n const { invoices } = routingSlip\n\n if (invoices) {\n return invoices\n .filter(invoice => invoice.businessIdentifier)\n .map(value => value.businessIdentifier)\n }\n return ['-']\n }\n\n function navigateTo (routingSlipNumber: number) : void {\n if (isLibraryMode.value) {\n // This scenario would hit when the FAS Search is displayed as a plugin in Staff dashboard\n // we append queryparams so that we can persist breadcrumbs across different components and refresh issue\n // Adding viewFromAuth=true queryparams so that we can build breadcrumbs\n // Eg of a typical breadcrumb flow = Staff Dashboard -> View Routing Slip: test -> View Routing Slip: testchild\n window.location.href = `${ConfigHelper.getFasWebUrl()}view-routing-slip/${routingSlipNumber}?viewFromAuth=true`\n } else {\n context.root.$router.push(appendQueryParamsIfNeeded(`/view-routing-slip/${routingSlipNumber}`, context.root.$route))\n }\n }\n\n const getNext = debounce(async () => {\n if (isLoading.value) return\n reachedEnd.value = await infiniteScrollCallback()\n }, 100) // Adjust the wait time as needed\n\n function getRefundStatusText (statusCode: string | undefined): string {\n const refundStatus = RoutingSlipRefundStatus.find(item => item.code === statusCode)?.text || RoutingSlipRefundCodes.PROCESSING\n return refundStatus\n }\n\n function getStatusFromRefundStatus (statusCode: string): SlipStatus {\n if (statusCode === RoutingSlipRefundCodes.PROCESSING) {\n return SlipStatus.REFUNDREQUEST\n } else {\n return SlipStatus.REFUNDPROCESSED\n }\n }\n\n return {\n headerSearch,\n displayedHeaderSearch,\n status,\n refundStatus,\n routingSlipNumber,\n receiptNumber,\n dateFilter,\n businessIdentifier,\n accountName,\n remainingAmount,\n chequeReceiptNumber,\n canShowColumn,\n applyDateFilter,\n searchNow,\n debouncedSearch,\n searchRoutingSlipResult,\n getStatusLabel,\n searchParamsExist,\n clearFilter,\n formatFolioResult,\n showExpandedFolio,\n showExpandedCheque,\n toggleFolio,\n toggleCheque,\n isLoading,\n navigateTo,\n fasUrl,\n initiator,\n reachedEnd,\n getNext,\n getRefundStatusText,\n getStatusFromRefundStatus\n }\n}\n","/**\n * vue-class-component v7.2.6\n * (c) 2015-present Evan You\n * @license MIT\n */\nimport Vue from 'vue';\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\n// The rational behind the verbose Reflect-feature check below is the fact that there are polyfills\n// which add an implementation for Reflect.defineMetadata but not for Reflect.getOwnMetadataKeys.\n// Without this check consumers will encounter hard to track down runtime errors.\nfunction reflectionIsSupported() {\n return typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys;\n}\nfunction copyReflectionMetadata(to, from) {\n forwardMetadata(to, from);\n Object.getOwnPropertyNames(from.prototype).forEach(function (key) {\n forwardMetadata(to.prototype, from.prototype, key);\n });\n Object.getOwnPropertyNames(from).forEach(function (key) {\n forwardMetadata(to, from, key);\n });\n}\n\nfunction forwardMetadata(to, from, propertyKey) {\n var metaKeys = propertyKey ? Reflect.getOwnMetadataKeys(from, propertyKey) : Reflect.getOwnMetadataKeys(from);\n metaKeys.forEach(function (metaKey) {\n var metadata = propertyKey ? Reflect.getOwnMetadata(metaKey, from, propertyKey) : Reflect.getOwnMetadata(metaKey, from);\n\n if (propertyKey) {\n Reflect.defineMetadata(metaKey, metadata, to, propertyKey);\n } else {\n Reflect.defineMetadata(metaKey, metadata, to);\n }\n });\n}\n\nvar fakeArray = {\n __proto__: []\n};\nvar hasProto = fakeArray instanceof Array;\nfunction createDecorator(factory) {\n return function (target, key, index) {\n var Ctor = typeof target === 'function' ? target : target.constructor;\n\n if (!Ctor.__decorators__) {\n Ctor.__decorators__ = [];\n }\n\n if (typeof index !== 'number') {\n index = undefined;\n }\n\n Ctor.__decorators__.push(function (options) {\n return factory(options, key, index);\n });\n };\n}\nfunction mixins() {\n for (var _len = arguments.length, Ctors = new Array(_len), _key = 0; _key < _len; _key++) {\n Ctors[_key] = arguments[_key];\n }\n\n return Vue.extend({\n mixins: Ctors\n });\n}\nfunction isPrimitive(value) {\n var type = _typeof(value);\n\n return value == null || type !== 'object' && type !== 'function';\n}\nfunction warn(message) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-class-component] ' + message);\n }\n}\n\nfunction collectDataFromConstructor(vm, Component) {\n // override _init to prevent to init as Vue instance\n var originalInit = Component.prototype._init;\n\n Component.prototype._init = function () {\n var _this = this;\n\n // proxy to actual vm\n var keys = Object.getOwnPropertyNames(vm); // 2.2.0 compat (props are no longer exposed as self properties)\n\n if (vm.$options.props) {\n for (var key in vm.$options.props) {\n if (!vm.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n }\n\n keys.forEach(function (key) {\n Object.defineProperty(_this, key, {\n get: function get() {\n return vm[key];\n },\n set: function set(value) {\n vm[key] = value;\n },\n configurable: true\n });\n });\n }; // should be acquired class property values\n\n\n var data = new Component(); // restore original _init to avoid memory leak (#209)\n\n Component.prototype._init = originalInit; // create plain data object\n\n var plainData = {};\n Object.keys(data).forEach(function (key) {\n if (data[key] !== undefined) {\n plainData[key] = data[key];\n }\n });\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(Component.prototype instanceof Vue) && Object.keys(plainData).length > 0) {\n warn('Component class must inherit Vue or its descendant class ' + 'when class property is used.');\n }\n }\n\n return plainData;\n}\n\nvar $internalHooks = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeDestroy', 'destroyed', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch' // 2.6\n];\nfunction componentFactory(Component) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n options.name = options.name || Component._componentTag || Component.name; // prototype props.\n\n var proto = Component.prototype;\n Object.getOwnPropertyNames(proto).forEach(function (key) {\n if (key === 'constructor') {\n return;\n } // hooks\n\n\n if ($internalHooks.indexOf(key) > -1) {\n options[key] = proto[key];\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(proto, key);\n\n if (descriptor.value !== void 0) {\n // methods\n if (typeof descriptor.value === 'function') {\n (options.methods || (options.methods = {}))[key] = descriptor.value;\n } else {\n // typescript decorated data\n (options.mixins || (options.mixins = [])).push({\n data: function data() {\n return _defineProperty({}, key, descriptor.value);\n }\n });\n }\n } else if (descriptor.get || descriptor.set) {\n // computed properties\n (options.computed || (options.computed = {}))[key] = {\n get: descriptor.get,\n set: descriptor.set\n };\n }\n });\n (options.mixins || (options.mixins = [])).push({\n data: function data() {\n return collectDataFromConstructor(this, Component);\n }\n }); // decorate options\n\n var decorators = Component.__decorators__;\n\n if (decorators) {\n decorators.forEach(function (fn) {\n return fn(options);\n });\n delete Component.__decorators__;\n } // find super\n\n\n var superProto = Object.getPrototypeOf(Component.prototype);\n var Super = superProto instanceof Vue ? superProto.constructor : Vue;\n var Extended = Super.extend(options);\n forwardStaticMembers(Extended, Component, Super);\n\n if (reflectionIsSupported()) {\n copyReflectionMetadata(Extended, Component);\n }\n\n return Extended;\n}\nvar reservedPropertyNames = [// Unique id\n'cid', // Super Vue constructor\n'super', // Component options that will be used by the component\n'options', 'superOptions', 'extendOptions', 'sealedOptions', // Private assets\n'component', 'directive', 'filter'];\nvar shouldIgnore = {\n prototype: true,\n arguments: true,\n callee: true,\n caller: true\n};\n\nfunction forwardStaticMembers(Extended, Original, Super) {\n // We have to use getOwnPropertyNames since Babel registers methods as non-enumerable\n Object.getOwnPropertyNames(Original).forEach(function (key) {\n // Skip the properties that should not be overwritten\n if (shouldIgnore[key]) {\n return;\n } // Some browsers does not allow reconfigure built-in properties\n\n\n var extendedDescriptor = Object.getOwnPropertyDescriptor(Extended, key);\n\n if (extendedDescriptor && !extendedDescriptor.configurable) {\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(Original, key); // If the user agent does not support `__proto__` or its family (IE <= 10),\n // the sub class properties may be inherited properties from the super class in TypeScript.\n // We need to exclude such properties to prevent to overwrite\n // the component options object which stored on the extended constructor (See #192).\n // If the value is a referenced value (object or function),\n // we can check equality of them and exclude it if they have the same reference.\n // If it is a primitive value, it will be forwarded for safety.\n\n if (!hasProto) {\n // Only `cid` is explicitly exluded from property forwarding\n // because we cannot detect whether it is a inherited property or not\n // on the no `__proto__` environment even though the property is reserved.\n if (key === 'cid') {\n return;\n }\n\n var superDescriptor = Object.getOwnPropertyDescriptor(Super, key);\n\n if (!isPrimitive(descriptor.value) && superDescriptor && superDescriptor.value === descriptor.value) {\n return;\n }\n } // Warn if the users manually declare reserved properties\n\n\n if (process.env.NODE_ENV !== 'production' && reservedPropertyNames.indexOf(key) >= 0) {\n warn(\"Static property name '\".concat(key, \"' declared on class '\").concat(Original.name, \"' \") + 'conflicts with reserved property name of Vue internal. ' + 'It may cause unexpected behavior of the component. Consider renaming the property.');\n }\n\n Object.defineProperty(Extended, key, descriptor);\n });\n}\n\nfunction Component(options) {\n if (typeof options === 'function') {\n return componentFactory(options);\n }\n\n return function (Component) {\n return componentFactory(Component, options);\n };\n}\n\nComponent.registerHooks = function registerHooks(keys) {\n $internalHooks.push.apply($internalHooks, _toConsumableArray(keys));\n};\n\nexport default Component;\nexport { createDecorator, mixins };\n","var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\n// Code copied from Vue/src/shared/util.js\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) { return str.replace(hyphenateRE, '-$1').toLowerCase(); };\n/**\n * decorator of an event-emitter function\n * @param event The name of the event\n * @return MethodDecorator\n */\nexport function Emit(event) {\n return function (_target, propertyKey, descriptor) {\n var key = hyphenate(propertyKey);\n var original = descriptor.value;\n descriptor.value = function emitter() {\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var emit = function (returnValue) {\n var emitName = event || key;\n if (returnValue === undefined) {\n if (args.length === 0) {\n _this.$emit(emitName);\n }\n else if (args.length === 1) {\n _this.$emit(emitName, args[0]);\n }\n else {\n _this.$emit.apply(_this, __spreadArrays([emitName], args));\n }\n }\n else {\n args.unshift(returnValue);\n _this.$emit.apply(_this, __spreadArrays([emitName], args));\n }\n };\n var returnValue = original.apply(this, args);\n if (isPromise(returnValue)) {\n returnValue.then(emit);\n }\n else {\n emit(returnValue);\n }\n return returnValue;\n };\n };\n}\nfunction isPromise(obj) {\n return obj instanceof Promise || (obj && typeof obj.then === 'function');\n}\n","/** @see {@link https://github.com/vuejs/vue-class-component/blob/master/src/reflect.ts} */\nvar reflectMetadataIsSupported = typeof Reflect !== 'undefined' && typeof Reflect.getMetadata !== 'undefined';\nexport function applyMetadata(options, target, key) {\n if (reflectMetadataIsSupported) {\n if (!Array.isArray(options) &&\n typeof options !== 'function' &&\n !options.hasOwnProperty('type') &&\n typeof options.type === 'undefined') {\n var type = Reflect.getMetadata('design:type', target, key);\n if (type !== Object) {\n options.type = type;\n }\n }\n }\n}\n","import { createDecorator } from 'vue-class-component';\nimport { applyMetadata } from '../helpers/metadata';\n/**\n * decorator of a prop\n * @param options the options for the prop\n * @return PropertyDecorator | void\n */\nexport function Prop(options) {\n if (options === void 0) { options = {}; }\n return function (target, key) {\n applyMetadata(options, target, key);\n createDecorator(function (componentOptions, k) {\n ;\n (componentOptions.props || (componentOptions.props = {}))[k] = options;\n })(target, key);\n };\n}\n","import { computed, reactive, ref, toRefs } from '@vue/composition-api'\n\nimport CommonUtils from '@/util/common-util'\nimport { DateFilterCodes } from '@/util/constants'\nimport moment from 'moment'\n\nexport const DATEFILTER_CODES = DateFilterCodes\nexport function useDateRange (props, context) {\n const { value } = toRefs(props)\n\n // using same v-model value for getting value and update parent on change\n const dateRangeSelected = computed({\n get: () => {\n return value.value\n },\n set: (modalValue: Date[]) => {\n context.emit('input', modalValue)\n }\n })\n // to keep track of old value on cancel rest to this value default value will props passed\n const oldSelectedRange = ref(value.value)\n\n const dateRangeSelectedDisplay = computed(() => {\n return dateRangeSelected.value.join(' - ')\n })\n\n const dateFilterRanges = reactive([\n {\n label: 'Today',\n code: DATEFILTER_CODES.TODAY\n },\n {\n label: 'Yesterday',\n code: DATEFILTER_CODES.YESTERDAY\n },\n {\n label: 'Last Week',\n code: DATEFILTER_CODES.LASTWEEK\n },\n {\n label: 'Last Month',\n code: DATEFILTER_CODES.LASTMONTH\n },\n {\n label: 'Custom Range',\n code: DATEFILTER_CODES.CUSTOMRANGE\n }\n ])\n\n const dateFilterSelectedIndex = ref(null)\n const dateFilterSelected: any = ref({})\n const showDateFilter = ref(false)\n const pickerDate = ref('')\n\n // apply filter button enable only if the date ranges are selected and start date <= end date\n const isApplyFilterBtnValid = computed(() => {\n if (\n dateRangeSelected.value.length === 2 &&\n dateRangeSelected.value[0] > dateRangeSelected.value[1]\n ) {\n dateRangeSelected.value = [\n dateRangeSelected.value[1],\n dateRangeSelected.value[0]\n ]\n }\n\n return (\n dateRangeSelected.value[0] &&\n dateRangeSelected.value[1] &&\n dateRangeSelected.value[0] <= dateRangeSelected.value[1]\n )\n })\n\n const showDateRangeSelected = computed(() => {\n let dateText = ''\n if (\n dateFilterSelected.value.code === DATEFILTER_CODES.TODAY ||\n dateFilterSelected.value.code === DATEFILTER_CODES.YESTERDAY\n ) {\n dateText = `${\n dateFilterSelected.value.label\n }: ${CommonUtils.formatDisplayDate(\n dateRangeSelected.value[0],\n 'MM-DD-YYYY'\n )}`\n } else {\n dateText = `${dateFilterSelected.value?.label}: \n ${CommonUtils.formatDisplayDate(\n dateRangeSelected.value[0],\n 'MM-DD-YYYY'\n )} \n - ${CommonUtils.formatDisplayDate(\n dateRangeSelected.value[1],\n 'MM-DD-YYYY'\n )}`\n }\n\n return dateFilterSelected.value?.code\n ? dateText\n : 'No dates selected'\n })\n\n function formatDatePickerDate (dateObj) {\n return dateObj.format('YYYY-MM-DD')\n }\n\n function dateFilterChange (val) {\n if (val > -1) {\n dateFilterSelected.value = dateFilterRanges[val]\n switch (dateFilterSelected.value.code) {\n case DATEFILTER_CODES.TODAY:\n // eslint-disable-next-line no-case-declarations\n const today = formatDatePickerDate(moment())\n dateRangeSelected.value = [today, today]\n pickerDate.value = today.slice(0, -3)\n break\n case DATEFILTER_CODES.YESTERDAY:\n // eslint-disable-next-line no-case-declarations\n const yesterday = formatDatePickerDate(moment().subtract(1, 'days'))\n dateRangeSelected.value = [yesterday, yesterday]\n pickerDate.value = yesterday.slice(0, -3)\n break\n case DATEFILTER_CODES.LASTWEEK:\n // Week should start from Monday and Ends on Sunday\n // eslint-disable-next-line no-case-declarations\n const weekStart = formatDatePickerDate(\n moment()\n .subtract(1, 'weeks')\n .startOf('isoWeek')\n )\n // eslint-disable-next-line no-case-declarations\n const weekEnd = formatDatePickerDate(\n moment()\n .subtract(1, 'weeks')\n .endOf('isoWeek')\n )\n dateRangeSelected.value = [weekStart, weekEnd]\n pickerDate.value = weekStart.slice(0, -3)\n break\n case DATEFILTER_CODES.LASTMONTH:\n // eslint-disable-next-line no-case-declarations\n const monthStart = formatDatePickerDate(\n moment()\n .subtract(1, 'months')\n .startOf('month')\n )\n // eslint-disable-next-line no-case-declarations\n const monthEnd = formatDatePickerDate(\n moment()\n .subtract(1, 'months')\n .endOf('month')\n )\n dateRangeSelected.value = [monthStart, monthEnd]\n pickerDate.value = monthStart.slice(0, -3)\n break\n case DATEFILTER_CODES.CUSTOMRANGE:\n pickerDate.value = ''\n }\n }\n }\n\n function dateClick (date) {\n pickerDate.value = ''\n // ideally it should find using DATEFILTER_CODES.CUSTOMRANGE, but since its static and date click is often, better give the index as it is\n dateFilterSelectedIndex.value = 4 // 4 = Custom Range\n dateFilterSelected.value = dateFilterRanges[dateFilterSelectedIndex.value]\n }\n\n function applyDateFilter () {\n // emit applied event so that we can hook to any @change event in parent. By default, v-model with parent variable is in sync all the time\n context.emit('applied', dateRangeSelected)\n // updating old value on appy click\n oldSelectedRange.value = dateRangeSelected.value\n showDateFilter.value = false\n }\n function cancelDateFilter () {\n // on cancel we need to rest to previous value, which we stored in oldSelectedRange\n dateRangeSelected.value = oldSelectedRange.value\n showDateFilter.value = false\n }\n\n return {\n dateFilterRanges,\n dateRangeSelected,\n dateFilterSelectedIndex,\n dateRangeSelectedDisplay,\n dateFilterSelected,\n showDateFilter,\n pickerDate,\n dateFilterChange,\n isApplyFilterBtnValid,\n dateClick,\n applyDateFilter,\n showDateRangeSelected,\n cancelDateFilter\n }\n}\n","/*\nComposable function for SearchColumn Filter component. It tracks the columns\nthat are present in a parent data-table and tracks display property to true/false\n*/\n\nimport { computed, toRefs } from '@vue/composition-api'\n\nexport function useSearchColumnFilterComponent (props, context) {\n const { value } = toRefs(props)\n\n // using same v-model value for getting value and update parent on change\n const selectedHeaderSearchList = computed({\n get: () => {\n return value.value\n },\n set: (modalValue: any[]) => {\n context.emit('input', modalValue)\n }\n })\n\n return {\n selectedHeaderSearchList\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 Apply\n \n \n Cancel\n \n
\n \n
\n
\n \n \n
\n\n","\n\n\n\n","\n\n \n \n \n !header.hideInSearchColumnFilter)\"\n :key=\"i\"\n >\n \n \n \n \n\n","\n\n\n","\n\n","\n
\n","\n\n\n\n\n","import CommonUtils from '@/util/common-util'\nimport { useRoutingSlip } from '../useRoutingSlip'\n\nexport function useDashboard (_, context) {\n const { resetRoutingSlipDetails } = useRoutingSlip()\n const appendQueryParamsIfNeeded = CommonUtils.appendQueryParamsIfNeeded\n\n function addRoutingSlip (): void {\n // we need to clear out the routing slip store before rendering the create slip component\n resetRoutingSlipDetails()\n // navigate now\n // Check if we had come from Staff dashboard\n context.root.$router.push(appendQueryParamsIfNeeded('/create-routing-slip', context.root.$route))\n }\n\n return {\n addRoutingSlip\n }\n}\n","import { DirectiveBinding } from 'vue/types/options'\nimport { DirectiveOptions } from 'vue'\nimport KeyCloakService from 'sbc-common-components/src/services/keycloak.services'\nimport { VNode } from 'vue/types'\n\ninterface CustomHTMLElement extends HTMLElement {\n disabled: boolean\n readOnly: boolean\n}\n\nconst can: DirectiveOptions = {\n inserted (el, binding, node) {\n canAccess(binding, el, node)\n },\n componentUpdated (el, binding, node) {\n canAccess(binding, el, node)\n }\n}\n\nfunction canAccess (binding: DirectiveBinding, el: HTMLElement, node: VNode) {\n const behaviour = binding.modifiers.disable ? 'disable' : 'hide'\n // to handle special elements like v-card etc\n const isCard = !!binding.modifiers.card\n const requestedAction:any = [binding.arg]\n const customeEl = el as CustomHTMLElement\n const okayToAccess = KeyCloakService.verifyRoles(requestedAction, [])\n // if not okay , hide or disable\n if (!okayToAccess) {\n if (behaviour === 'hide') {\n commentNode(el, node)\n } else if (behaviour === 'disable' && isCard === false) {\n customeEl.disabled = true\n } else if (behaviour === 'disable' && isCard === true) {\n // TODO tab still works.. can tab to the text field and make it work\n customeEl.classList.add('v-card--disabled')\n customeEl.style.pointerEvents = 'none'\n }\n }\n}\n\n/**\n * Create comment node\n *\n * @private\n * @author https://stackoverflow.com/questions/43003976/a-custom-directive-similar-to-v-if-in-vuejs#43543814\n */\nfunction commentNode (el: HTMLElement, vnode: VNode) {\n const comment = document.createComment(' ')\n\n Object.defineProperty(comment, 'setAttribute', {\n value: () => undefined\n })\n\n vnode.text = ' '\n vnode.elm = comment\n vnode.isComment = true\n vnode.tag = undefined\n\n vnode.data = vnode.data || {}\n vnode.data.directives = undefined\n\n if (vnode.componentInstance) {\n // @ts-ignore\n vnode.componentInstance.$el = comment\n }\n\n if (el.parentNode) {\n el.parentNode.replaceChild(comment, el)\n }\n}\nexport default can\n","\n \n \n \n \n {{\n item.remainingAmount\n ? appendCurrencySymbol(item.remainingAmount.toFixed(2))\n : '-'\n }}\n \n \n \n \n Open\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 mdi-plus\n \n Add New Routing Slip\n \n \n \n \n Access Fee Accounting System\n \n mdi-open-in-new\n \n \n \n \n \n \n \n \n \n \n
\n \n mdi-view-list\n \n

\n {{ isLibraryMode ? 'Recent Routing Slip' : 'Search Routing Slip' }}\n

\n
\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n {{\n item.remainingAmount\n ? appendCurrencySymbol(item.remainingAmount.toFixed(2))\n : '-'\n }}\n \n \n \n \n Open\n \n \n \n \n \n\n \n \n \n \n \n \n
\n
\n
\n","/*!\n * vue-i18n v8.28.2 \n * (c) 2022 kazuya kawaguchi\n * Released under the MIT License.\n */\n/* */\n\n/**\n * constants\n */\n\nvar numberFormatKeys = [\n 'compactDisplay',\n 'currency',\n 'currencyDisplay',\n 'currencySign',\n 'localeMatcher',\n 'notation',\n 'numberingSystem',\n 'signDisplay',\n 'style',\n 'unit',\n 'unitDisplay',\n 'useGrouping',\n 'minimumIntegerDigits',\n 'minimumFractionDigits',\n 'maximumFractionDigits',\n 'minimumSignificantDigits',\n 'maximumSignificantDigits'\n];\n\nvar dateTimeFormatKeys = [\n 'dateStyle',\n 'timeStyle',\n 'calendar',\n 'localeMatcher',\n \"hour12\",\n \"hourCycle\",\n \"timeZone\",\n \"formatMatcher\",\n 'weekday',\n 'era',\n 'year',\n 'month',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'timeZoneName' ];\n\n/**\n * utilities\n */\n\nfunction warn (msg, err) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-i18n] ' + msg);\n /* istanbul ignore if */\n if (err) {\n console.warn(err.stack);\n }\n }\n}\n\nfunction error (msg, err) {\n if (typeof console !== 'undefined') {\n console.error('[vue-i18n] ' + msg);\n /* istanbul ignore if */\n if (err) {\n console.error(err.stack);\n }\n }\n}\n\nvar isArray = Array.isArray;\n\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\nfunction isBoolean (val) {\n return typeof val === 'boolean'\n}\n\nfunction isString (val) {\n return typeof val === 'string'\n}\n\nvar toString = Object.prototype.toString;\nvar OBJECT_STRING = '[object Object]';\nfunction isPlainObject (obj) {\n return toString.call(obj) === OBJECT_STRING\n}\n\nfunction isNull (val) {\n return val === null || val === undefined\n}\n\nfunction isFunction (val) {\n return typeof val === 'function'\n}\n\nfunction parseArgs () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var locale = null;\n var params = null;\n if (args.length === 1) {\n if (isObject(args[0]) || isArray(args[0])) {\n params = args[0];\n } else if (typeof args[0] === 'string') {\n locale = args[0];\n }\n } else if (args.length === 2) {\n if (typeof args[0] === 'string') {\n locale = args[0];\n }\n /* istanbul ignore if */\n if (isObject(args[1]) || isArray(args[1])) {\n params = args[1];\n }\n }\n\n return { locale: locale, params: params }\n}\n\nfunction looseClone (obj) {\n return JSON.parse(JSON.stringify(obj))\n}\n\nfunction remove (arr, item) {\n if (arr.delete(item)) {\n return arr\n }\n}\n\nfunction arrayFrom (arr) {\n var ret = [];\n arr.forEach(function (a) { return ret.push(a); });\n return ret\n}\n\nfunction includes (arr, item) {\n return !!~arr.indexOf(item)\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n return hasOwnProperty.call(obj, key)\n}\n\nfunction merge (target) {\n var arguments$1 = arguments;\n\n var output = Object(target);\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments$1[i];\n if (source !== undefined && source !== null) {\n var key = (void 0);\n for (key in source) {\n if (hasOwn(source, key)) {\n if (isObject(source[key])) {\n output[key] = merge(output[key], source[key]);\n } else {\n output[key] = source[key];\n }\n }\n }\n }\n }\n return output\n}\n\nfunction looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = isArray(a);\n var isArrayB = isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}\n\n/**\n * Sanitizes html special characters from input strings. For mitigating risk of XSS attacks.\n * @param rawText The raw input from the user that should be escaped.\n */\nfunction escapeHtml(rawText) {\n return rawText\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n}\n\n/**\n * Escapes html tags and special symbols from all provided params which were returned from parseArgs().params.\n * This method performs an in-place operation on the params object.\n *\n * @param {any} params Parameters as provided from `parseArgs().params`.\n * May be either an array of strings or a string->any map.\n *\n * @returns The manipulated `params` object.\n */\nfunction escapeParams(params) {\n if(params != null) {\n Object.keys(params).forEach(function (key) {\n if(typeof(params[key]) == 'string') {\n params[key] = escapeHtml(params[key]);\n }\n });\n }\n return params\n}\n\n/* */\n\nfunction extend (Vue) {\n if (!Vue.prototype.hasOwnProperty('$i18n')) {\n // $FlowFixMe\n Object.defineProperty(Vue.prototype, '$i18n', {\n get: function get () { return this._i18n }\n });\n }\n\n Vue.prototype.$t = function (key) {\n var values = [], len = arguments.length - 1;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];\n\n var i18n = this.$i18n;\n return i18n._t.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this ].concat( values ))\n };\n\n Vue.prototype.$tc = function (key, choice) {\n var values = [], len = arguments.length - 2;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];\n\n var i18n = this.$i18n;\n return i18n._tc.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this, choice ].concat( values ))\n };\n\n Vue.prototype.$te = function (key, locale) {\n var i18n = this.$i18n;\n return i18n._te(key, i18n.locale, i18n._getMessages(), locale)\n };\n\n Vue.prototype.$d = function (value) {\n var ref;\n\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n return (ref = this.$i18n).d.apply(ref, [ value ].concat( args ))\n };\n\n Vue.prototype.$n = function (value) {\n var ref;\n\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n return (ref = this.$i18n).n.apply(ref, [ value ].concat( args ))\n };\n}\n\n/* */\n\n/**\n * Mixin\n * \n * If `bridge` mode, empty mixin is returned,\n * else regulary mixin implementation is returned.\n */\nfunction defineMixin (bridge) {\n if ( bridge === void 0 ) bridge = false;\n\n function mounted () {\n if (this !== this.$root && this.$options.__INTLIFY_META__ && this.$el) {\n this.$el.setAttribute('data-intlify', this.$options.__INTLIFY_META__);\n }\n }\n\n return bridge\n ? { mounted: mounted } // delegate `vue-i18n-bridge` mixin implementation\n : { // regulary \n beforeCreate: function beforeCreate () {\n var options = this.$options;\n options.i18n = options.i18n || ((options.__i18nBridge || options.__i18n) ? {} : null);\n\n if (options.i18n) {\n if (options.i18n instanceof VueI18n) {\n // init locale messages via custom blocks\n if ((options.__i18nBridge || options.__i18n)) {\n try {\n var localeMessages = options.i18n && options.i18n.messages ? options.i18n.messages : {};\n var _i18n = options.__i18nBridge || options.__i18n;\n _i18n.forEach(function (resource) {\n localeMessages = merge(localeMessages, JSON.parse(resource));\n });\n Object.keys(localeMessages).forEach(function (locale) {\n options.i18n.mergeLocaleMessage(locale, localeMessages[locale]);\n });\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n error(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n this._i18n = options.i18n;\n this._i18nWatcher = this._i18n.watchI18nData();\n } else if (isPlainObject(options.i18n)) {\n var rootI18n = this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n\n ? this.$root.$i18n\n : null;\n // component local i18n\n if (rootI18n) {\n options.i18n.root = this.$root;\n options.i18n.formatter = rootI18n.formatter;\n options.i18n.fallbackLocale = rootI18n.fallbackLocale;\n options.i18n.formatFallbackMessages = rootI18n.formatFallbackMessages;\n options.i18n.silentTranslationWarn = rootI18n.silentTranslationWarn;\n options.i18n.silentFallbackWarn = rootI18n.silentFallbackWarn;\n options.i18n.pluralizationRules = rootI18n.pluralizationRules;\n options.i18n.preserveDirectiveContent = rootI18n.preserveDirectiveContent;\n }\n\n // init locale messages via custom blocks\n if ((options.__i18nBridge || options.__i18n)) {\n try {\n var localeMessages$1 = options.i18n && options.i18n.messages ? options.i18n.messages : {};\n var _i18n$1 = options.__i18nBridge || options.__i18n;\n _i18n$1.forEach(function (resource) {\n localeMessages$1 = merge(localeMessages$1, JSON.parse(resource));\n });\n options.i18n.messages = localeMessages$1;\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n\n var ref = options.i18n;\n var sharedMessages = ref.sharedMessages;\n if (sharedMessages && isPlainObject(sharedMessages)) {\n options.i18n.messages = merge(options.i18n.messages, sharedMessages);\n }\n\n this._i18n = new VueI18n(options.i18n);\n this._i18nWatcher = this._i18n.watchI18nData();\n\n if (options.i18n.sync === undefined || !!options.i18n.sync) {\n this._localeWatcher = this.$i18n.watchLocale();\n }\n\n if (rootI18n) {\n rootI18n.onComponentInstanceCreated(this._i18n);\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot be interpreted 'i18n' option.\");\n }\n }\n } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n // root i18n\n this._i18n = this.$root.$i18n;\n } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {\n // parent i18n\n this._i18n = options.parent.$i18n;\n }\n },\n\n beforeMount: function beforeMount () {\n var options = this.$options;\n options.i18n = options.i18n || ((options.__i18nBridge || options.__i18n) ? {} : null);\n\n if (options.i18n) {\n if (options.i18n instanceof VueI18n) {\n // init locale messages via custom blocks\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else if (isPlainObject(options.i18n)) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot be interpreted 'i18n' option.\");\n }\n }\n } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n }\n },\n\n mounted: mounted,\n\n beforeDestroy: function beforeDestroy () {\n if (!this._i18n) { return }\n\n var self = this;\n this.$nextTick(function () {\n if (self._subscribing) {\n self._i18n.unsubscribeDataChanging(self);\n delete self._subscribing;\n }\n\n if (self._i18nWatcher) {\n self._i18nWatcher();\n self._i18n.destroyVM();\n delete self._i18nWatcher;\n }\n\n if (self._localeWatcher) {\n self._localeWatcher();\n delete self._localeWatcher;\n }\n });\n }\n }\n}\n\n/* */\n\nvar interpolationComponent = {\n name: 'i18n',\n functional: true,\n props: {\n tag: {\n type: [String, Boolean, Object],\n default: 'span'\n },\n path: {\n type: String,\n required: true\n },\n locale: {\n type: String\n },\n places: {\n type: [Array, Object]\n }\n },\n render: function render (h, ref) {\n var data = ref.data;\n var parent = ref.parent;\n var props = ref.props;\n var slots = ref.slots;\n\n var $i18n = parent.$i18n;\n if (!$i18n) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot find VueI18n instance!');\n }\n return\n }\n\n var path = props.path;\n var locale = props.locale;\n var places = props.places;\n var params = slots();\n var children = $i18n.i(\n path,\n locale,\n onlyHasDefaultPlace(params) || places\n ? useLegacyPlaces(params.default, places)\n : params\n );\n\n var tag = (!!props.tag && props.tag !== true) || props.tag === false ? props.tag : 'span';\n return tag ? h(tag, data, children) : children\n }\n};\n\nfunction onlyHasDefaultPlace (params) {\n var prop;\n for (prop in params) {\n if (prop !== 'default') { return false }\n }\n return Boolean(prop)\n}\n\nfunction useLegacyPlaces (children, places) {\n var params = places ? createParamsFromPlaces(places) : {};\n\n if (!children) { return params }\n\n // Filter empty text nodes\n children = children.filter(function (child) {\n return child.tag || child.text.trim() !== ''\n });\n\n var everyPlace = children.every(vnodeHasPlaceAttribute);\n if (process.env.NODE_ENV !== 'production' && everyPlace) {\n warn('`place` attribute is deprecated in next major version. Please switch to Vue slots.');\n }\n\n return children.reduce(\n everyPlace ? assignChildPlace : assignChildIndex,\n params\n )\n}\n\nfunction createParamsFromPlaces (places) {\n if (process.env.NODE_ENV !== 'production') {\n warn('`places` prop is deprecated in next major version. Please switch to Vue slots.');\n }\n\n return Array.isArray(places)\n ? places.reduce(assignChildIndex, {})\n : Object.assign({}, places)\n}\n\nfunction assignChildPlace (params, child) {\n if (child.data && child.data.attrs && child.data.attrs.place) {\n params[child.data.attrs.place] = child;\n }\n return params\n}\n\nfunction assignChildIndex (params, child, index) {\n params[index] = child;\n return params\n}\n\nfunction vnodeHasPlaceAttribute (vnode) {\n return Boolean(vnode.data && vnode.data.attrs && vnode.data.attrs.place)\n}\n\n/* */\n\nvar numberComponent = {\n name: 'i18n-n',\n functional: true,\n props: {\n tag: {\n type: [String, Boolean, Object],\n default: 'span'\n },\n value: {\n type: Number,\n required: true\n },\n format: {\n type: [String, Object]\n },\n locale: {\n type: String\n }\n },\n render: function render (h, ref) {\n var props = ref.props;\n var parent = ref.parent;\n var data = ref.data;\n\n var i18n = parent.$i18n;\n\n if (!i18n) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot find VueI18n instance!');\n }\n return null\n }\n\n var key = null;\n var options = null;\n\n if (isString(props.format)) {\n key = props.format;\n } else if (isObject(props.format)) {\n if (props.format.key) {\n key = props.format.key;\n }\n\n // Filter out number format options only\n options = Object.keys(props.format).reduce(function (acc, prop) {\n var obj;\n\n if (includes(numberFormatKeys, prop)) {\n return Object.assign({}, acc, ( obj = {}, obj[prop] = props.format[prop], obj ))\n }\n return acc\n }, null);\n }\n\n var locale = props.locale || i18n.locale;\n var parts = i18n._ntp(props.value, locale, key, options);\n\n var values = parts.map(function (part, index) {\n var obj;\n\n var slot = data.scopedSlots && data.scopedSlots[part.type];\n return slot ? slot(( obj = {}, obj[part.type] = part.value, obj.index = index, obj.parts = parts, obj )) : part.value\n });\n\n var tag = (!!props.tag && props.tag !== true) || props.tag === false ? props.tag : 'span';\n return tag\n ? h(tag, {\n attrs: data.attrs,\n 'class': data['class'],\n staticClass: data.staticClass\n }, values)\n : values\n }\n};\n\n/* */\n\nfunction bind (el, binding, vnode) {\n if (!assert(el, vnode)) { return }\n\n t(el, binding, vnode);\n}\n\nfunction update (el, binding, vnode, oldVNode) {\n if (!assert(el, vnode)) { return }\n\n var i18n = vnode.context.$i18n;\n if (localeEqual(el, vnode) &&\n (looseEqual(binding.value, binding.oldValue) &&\n looseEqual(el._localeMessage, i18n.getLocaleMessage(i18n.locale)))) { return }\n\n t(el, binding, vnode);\n}\n\nfunction unbind (el, binding, vnode, oldVNode) {\n var vm = vnode.context;\n if (!vm) {\n warn('Vue instance does not exists in VNode context');\n return\n }\n\n var i18n = vnode.context.$i18n || {};\n if (!binding.modifiers.preserve && !i18n.preserveDirectiveContent) {\n el.textContent = '';\n }\n el._vt = undefined;\n delete el['_vt'];\n el._locale = undefined;\n delete el['_locale'];\n el._localeMessage = undefined;\n delete el['_localeMessage'];\n}\n\nfunction assert (el, vnode) {\n var vm = vnode.context;\n if (!vm) {\n warn('Vue instance does not exists in VNode context');\n return false\n }\n\n if (!vm.$i18n) {\n warn('VueI18n instance does not exists in Vue instance');\n return false\n }\n\n return true\n}\n\nfunction localeEqual (el, vnode) {\n var vm = vnode.context;\n return el._locale === vm.$i18n.locale\n}\n\nfunction t (el, binding, vnode) {\n var ref$1, ref$2;\n\n var value = binding.value;\n\n var ref = parseValue(value);\n var path = ref.path;\n var locale = ref.locale;\n var args = ref.args;\n var choice = ref.choice;\n if (!path && !locale && !args) {\n warn('value type not supported');\n return\n }\n\n if (!path) {\n warn('`path` is required in v-t directive');\n return\n }\n\n var vm = vnode.context;\n if (choice != null) {\n el._vt = el.textContent = (ref$1 = vm.$i18n).tc.apply(ref$1, [ path, choice ].concat( makeParams(locale, args) ));\n } else {\n el._vt = el.textContent = (ref$2 = vm.$i18n).t.apply(ref$2, [ path ].concat( makeParams(locale, args) ));\n }\n el._locale = vm.$i18n.locale;\n el._localeMessage = vm.$i18n.getLocaleMessage(vm.$i18n.locale);\n}\n\nfunction parseValue (value) {\n var path;\n var locale;\n var args;\n var choice;\n\n if (isString(value)) {\n path = value;\n } else if (isPlainObject(value)) {\n path = value.path;\n locale = value.locale;\n args = value.args;\n choice = value.choice;\n }\n\n return { path: path, locale: locale, args: args, choice: choice }\n}\n\nfunction makeParams (locale, args) {\n var params = [];\n\n locale && params.push(locale);\n if (args && (Array.isArray(args) || isPlainObject(args))) {\n params.push(args);\n }\n\n return params\n}\n\nvar Vue;\n\nfunction install (_Vue, options) {\n if ( options === void 0 ) options = { bridge: false };\n\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && install.installed && _Vue === Vue) {\n warn('already installed.');\n return\n }\n install.installed = true;\n\n Vue = _Vue;\n\n var version = (Vue.version && Number(Vue.version.split('.')[0])) || -1;\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && version < 2) {\n warn((\"vue-i18n (\" + (install.version) + \") need to use Vue 2.0 or later (Vue: \" + (Vue.version) + \").\"));\n return\n }\n\n extend(Vue);\n Vue.mixin(defineMixin(options.bridge));\n Vue.directive('t', { bind: bind, update: update, unbind: unbind });\n Vue.component(interpolationComponent.name, interpolationComponent);\n Vue.component(numberComponent.name, numberComponent);\n\n // use simple mergeStrategies to prevent i18n instance lose '__proto__'\n var strats = Vue.config.optionMergeStrategies;\n strats.i18n = function (parentVal, childVal) {\n return childVal === undefined\n ? parentVal\n : childVal\n };\n}\n\n/* */\n\nvar BaseFormatter = function BaseFormatter () {\n this._caches = Object.create(null);\n};\n\nBaseFormatter.prototype.interpolate = function interpolate (message, values) {\n if (!values) {\n return [message]\n }\n var tokens = this._caches[message];\n if (!tokens) {\n tokens = parse(message);\n this._caches[message] = tokens;\n }\n return compile(tokens, values)\n};\n\n\n\nvar RE_TOKEN_LIST_VALUE = /^(?:\\d)+/;\nvar RE_TOKEN_NAMED_VALUE = /^(?:\\w)+/;\n\nfunction parse (format) {\n var tokens = [];\n var position = 0;\n\n var text = '';\n while (position < format.length) {\n var char = format[position++];\n if (char === '{') {\n if (text) {\n tokens.push({ type: 'text', value: text });\n }\n\n text = '';\n var sub = '';\n char = format[position++];\n while (char !== undefined && char !== '}') {\n sub += char;\n char = format[position++];\n }\n var isClosed = char === '}';\n\n var type = RE_TOKEN_LIST_VALUE.test(sub)\n ? 'list'\n : isClosed && RE_TOKEN_NAMED_VALUE.test(sub)\n ? 'named'\n : 'unknown';\n tokens.push({ value: sub, type: type });\n } else if (char === '%') {\n // when found rails i18n syntax, skip text capture\n if (format[(position)] !== '{') {\n text += char;\n }\n } else {\n text += char;\n }\n }\n\n text && tokens.push({ type: 'text', value: text });\n\n return tokens\n}\n\nfunction compile (tokens, values) {\n var compiled = [];\n var index = 0;\n\n var mode = Array.isArray(values)\n ? 'list'\n : isObject(values)\n ? 'named'\n : 'unknown';\n if (mode === 'unknown') { return compiled }\n\n while (index < tokens.length) {\n var token = tokens[index];\n switch (token.type) {\n case 'text':\n compiled.push(token.value);\n break\n case 'list':\n compiled.push(values[parseInt(token.value, 10)]);\n break\n case 'named':\n if (mode === 'named') {\n compiled.push((values)[token.value]);\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Type of token '\" + (token.type) + \"' and format of value '\" + mode + \"' don't match!\"));\n }\n }\n break\n case 'unknown':\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Detect 'unknown' type of token!\");\n }\n break\n }\n index++;\n }\n\n return compiled\n}\n\n/* */\n\n/**\n * Path parser\n * - Inspired:\n * Vue.js Path parser\n */\n\n// actions\nvar APPEND = 0;\nvar PUSH = 1;\nvar INC_SUB_PATH_DEPTH = 2;\nvar PUSH_SUB_PATH = 3;\n\n// states\nvar BEFORE_PATH = 0;\nvar IN_PATH = 1;\nvar BEFORE_IDENT = 2;\nvar IN_IDENT = 3;\nvar IN_SUB_PATH = 4;\nvar IN_SINGLE_QUOTE = 5;\nvar IN_DOUBLE_QUOTE = 6;\nvar AFTER_PATH = 7;\nvar ERROR = 8;\n\nvar pathStateMachine = [];\n\npathStateMachine[BEFORE_PATH] = {\n 'ws': [BEFORE_PATH],\n 'ident': [IN_IDENT, APPEND],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\n\npathStateMachine[IN_PATH] = {\n 'ws': [IN_PATH],\n '.': [BEFORE_IDENT],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\n\npathStateMachine[BEFORE_IDENT] = {\n 'ws': [BEFORE_IDENT],\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND]\n};\n\npathStateMachine[IN_IDENT] = {\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND],\n 'ws': [IN_PATH, PUSH],\n '.': [BEFORE_IDENT, PUSH],\n '[': [IN_SUB_PATH, PUSH],\n 'eof': [AFTER_PATH, PUSH]\n};\n\npathStateMachine[IN_SUB_PATH] = {\n \"'\": [IN_SINGLE_QUOTE, APPEND],\n '\"': [IN_DOUBLE_QUOTE, APPEND],\n '[': [IN_SUB_PATH, INC_SUB_PATH_DEPTH],\n ']': [IN_PATH, PUSH_SUB_PATH],\n 'eof': ERROR,\n 'else': [IN_SUB_PATH, APPEND]\n};\n\npathStateMachine[IN_SINGLE_QUOTE] = {\n \"'\": [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_SINGLE_QUOTE, APPEND]\n};\n\npathStateMachine[IN_DOUBLE_QUOTE] = {\n '\"': [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_DOUBLE_QUOTE, APPEND]\n};\n\n/**\n * Check if an expression is a literal value.\n */\n\nvar literalValueRE = /^\\s?(?:true|false|-?[\\d.]+|'[^']*'|\"[^\"]*\")\\s?$/;\nfunction isLiteral (exp) {\n return literalValueRE.test(exp)\n}\n\n/**\n * Strip quotes from a string\n */\n\nfunction stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}\n\n/**\n * Determine the type of a character in a keypath.\n */\n\nfunction getPathCharType (ch) {\n if (ch === undefined || ch === null) { return 'eof' }\n\n var code = ch.charCodeAt(0);\n\n switch (code) {\n case 0x5B: // [\n case 0x5D: // ]\n case 0x2E: // .\n case 0x22: // \"\n case 0x27: // '\n return ch\n\n case 0x5F: // _\n case 0x24: // $\n case 0x2D: // -\n return 'ident'\n\n case 0x09: // Tab\n case 0x0A: // Newline\n case 0x0D: // Return\n case 0xA0: // No-break space\n case 0xFEFF: // Byte Order Mark\n case 0x2028: // Line Separator\n case 0x2029: // Paragraph Separator\n return 'ws'\n }\n\n return 'ident'\n}\n\n/**\n * Format a subPath, return its plain form if it is\n * a literal string or number. Otherwise prepend the\n * dynamic indicator (*).\n */\n\nfunction formatSubPath (path) {\n var trimmed = path.trim();\n // invalid leading 0\n if (path.charAt(0) === '0' && isNaN(path)) { return false }\n\n return isLiteral(trimmed) ? stripQuotes(trimmed) : '*' + trimmed\n}\n\n/**\n * Parse a string path into an array of segments\n */\n\nfunction parse$1 (path) {\n var keys = [];\n var index = -1;\n var mode = BEFORE_PATH;\n var subPathDepth = 0;\n var c;\n var key;\n var newChar;\n var type;\n var transition;\n var action;\n var typeMap;\n var actions = [];\n\n actions[PUSH] = function () {\n if (key !== undefined) {\n keys.push(key);\n key = undefined;\n }\n };\n\n actions[APPEND] = function () {\n if (key === undefined) {\n key = newChar;\n } else {\n key += newChar;\n }\n };\n\n actions[INC_SUB_PATH_DEPTH] = function () {\n actions[APPEND]();\n subPathDepth++;\n };\n\n actions[PUSH_SUB_PATH] = function () {\n if (subPathDepth > 0) {\n subPathDepth--;\n mode = IN_SUB_PATH;\n actions[APPEND]();\n } else {\n subPathDepth = 0;\n if (key === undefined) { return false }\n key = formatSubPath(key);\n if (key === false) {\n return false\n } else {\n actions[PUSH]();\n }\n }\n };\n\n function maybeUnescapeQuote () {\n var nextChar = path[index + 1];\n if ((mode === IN_SINGLE_QUOTE && nextChar === \"'\") ||\n (mode === IN_DOUBLE_QUOTE && nextChar === '\"')) {\n index++;\n newChar = '\\\\' + nextChar;\n actions[APPEND]();\n return true\n }\n }\n\n while (mode !== null) {\n index++;\n c = path[index];\n\n if (c === '\\\\' && maybeUnescapeQuote()) {\n continue\n }\n\n type = getPathCharType(c);\n typeMap = pathStateMachine[mode];\n transition = typeMap[type] || typeMap['else'] || ERROR;\n\n if (transition === ERROR) {\n return // parse error\n }\n\n mode = transition[0];\n action = actions[transition[1]];\n if (action) {\n newChar = transition[2];\n newChar = newChar === undefined\n ? c\n : newChar;\n if (action() === false) {\n return\n }\n }\n\n if (mode === AFTER_PATH) {\n return keys\n }\n }\n}\n\n\n\n\n\nvar I18nPath = function I18nPath () {\n this._cache = Object.create(null);\n};\n\n/**\n * External parse that check for a cache hit first\n */\nI18nPath.prototype.parsePath = function parsePath (path) {\n var hit = this._cache[path];\n if (!hit) {\n hit = parse$1(path);\n if (hit) {\n this._cache[path] = hit;\n }\n }\n return hit || []\n};\n\n/**\n * Get path value from path string\n */\nI18nPath.prototype.getPathValue = function getPathValue (obj, path) {\n if (!isObject(obj)) { return null }\n\n var paths = this.parsePath(path);\n if (paths.length === 0) {\n return null\n } else {\n var length = paths.length;\n var last = obj;\n var i = 0;\n while (i < length) {\n var value = last[paths[i]];\n if (value === undefined || value === null) {\n return null\n }\n last = value;\n i++;\n }\n\n return last\n }\n};\n\n/* */\n\n\n\nvar htmlTagMatcher = /<\\/?[\\w\\s=\"/.':;#-\\/]+>/;\nvar linkKeyMatcher = /(?:@(?:\\.[a-zA-Z]+)?:(?:[\\w\\-_|./]+|\\([\\w\\-_:|./]+\\)))/g;\nvar linkKeyPrefixMatcher = /^@(?:\\.([a-zA-Z]+))?:/;\nvar bracketsMatcher = /[()]/g;\nvar defaultModifiers = {\n 'upper': function (str) { return str.toLocaleUpperCase(); },\n 'lower': function (str) { return str.toLocaleLowerCase(); },\n 'capitalize': function (str) { return (\"\" + (str.charAt(0).toLocaleUpperCase()) + (str.substr(1))); }\n};\n\nvar defaultFormatter = new BaseFormatter();\n\nvar VueI18n = function VueI18n (options) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n // Auto install if it is not done yet and `window` has `Vue`.\n // To allow users to avoid auto-installation in some cases,\n // this code should be placed here. See #290\n /* istanbul ignore if */\n if (!Vue && typeof window !== 'undefined' && window.Vue) {\n install(window.Vue);\n }\n\n var locale = options.locale || 'en-US';\n var fallbackLocale = options.fallbackLocale === false\n ? false\n : options.fallbackLocale || 'en-US';\n var messages = options.messages || {};\n var dateTimeFormats = options.dateTimeFormats || options.datetimeFormats || {};\n var numberFormats = options.numberFormats || {};\n\n this._vm = null;\n this._formatter = options.formatter || defaultFormatter;\n this._modifiers = options.modifiers || {};\n this._missing = options.missing || null;\n this._root = options.root || null;\n this._sync = options.sync === undefined ? true : !!options.sync;\n this._fallbackRoot = options.fallbackRoot === undefined\n ? true\n : !!options.fallbackRoot;\n this._fallbackRootWithEmptyString = options.fallbackRootWithEmptyString === undefined\n ? true\n : !!options.fallbackRootWithEmptyString;\n this._formatFallbackMessages = options.formatFallbackMessages === undefined\n ? false\n : !!options.formatFallbackMessages;\n this._silentTranslationWarn = options.silentTranslationWarn === undefined\n ? false\n : options.silentTranslationWarn;\n this._silentFallbackWarn = options.silentFallbackWarn === undefined\n ? false\n : !!options.silentFallbackWarn;\n this._dateTimeFormatters = {};\n this._numberFormatters = {};\n this._path = new I18nPath();\n this._dataListeners = new Set();\n this._componentInstanceCreatedListener = options.componentInstanceCreatedListener || null;\n this._preserveDirectiveContent = options.preserveDirectiveContent === undefined\n ? false\n : !!options.preserveDirectiveContent;\n this.pluralizationRules = options.pluralizationRules || {};\n this._warnHtmlInMessage = options.warnHtmlInMessage || 'off';\n this._postTranslation = options.postTranslation || null;\n this._escapeParameterHtml = options.escapeParameterHtml || false;\n\n if ('__VUE_I18N_BRIDGE__' in options) {\n this.__VUE_I18N_BRIDGE__ = options.__VUE_I18N_BRIDGE__;\n }\n\n /**\n * @param choice {number} a choice index given by the input to $tc: `$tc('path.to.rule', choiceIndex)`\n * @param choicesLength {number} an overall amount of available choices\n * @returns a final choice index\n */\n this.getChoiceIndex = function (choice, choicesLength) {\n var thisPrototype = Object.getPrototypeOf(this$1);\n if (thisPrototype && thisPrototype.getChoiceIndex) {\n var prototypeGetChoiceIndex = (thisPrototype.getChoiceIndex);\n return (prototypeGetChoiceIndex).call(this$1, choice, choicesLength)\n }\n\n // Default (old) getChoiceIndex implementation - english-compatible\n var defaultImpl = function (_choice, _choicesLength) {\n _choice = Math.abs(_choice);\n\n if (_choicesLength === 2) {\n return _choice\n ? _choice > 1\n ? 1\n : 0\n : 1\n }\n\n return _choice ? Math.min(_choice, 2) : 0\n };\n\n if (this$1.locale in this$1.pluralizationRules) {\n return this$1.pluralizationRules[this$1.locale].apply(this$1, [choice, choicesLength])\n } else {\n return defaultImpl(choice, choicesLength)\n }\n };\n\n\n this._exist = function (message, key) {\n if (!message || !key) { return false }\n if (!isNull(this$1._path.getPathValue(message, key))) { return true }\n // fallback for flat key\n if (message[key]) { return true }\n return false\n };\n\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n Object.keys(messages).forEach(function (locale) {\n this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);\n });\n }\n\n this._initVM({\n locale: locale,\n fallbackLocale: fallbackLocale,\n messages: messages,\n dateTimeFormats: dateTimeFormats,\n numberFormats: numberFormats\n });\n};\n\nvar prototypeAccessors = { vm: { configurable: true },messages: { configurable: true },dateTimeFormats: { configurable: true },numberFormats: { configurable: true },availableLocales: { configurable: true },locale: { configurable: true },fallbackLocale: { configurable: true },formatFallbackMessages: { configurable: true },missing: { configurable: true },formatter: { configurable: true },silentTranslationWarn: { configurable: true },silentFallbackWarn: { configurable: true },preserveDirectiveContent: { configurable: true },warnHtmlInMessage: { configurable: true },postTranslation: { configurable: true },sync: { configurable: true } };\n\nVueI18n.prototype._checkLocaleMessage = function _checkLocaleMessage (locale, level, message) {\n var paths = [];\n\n var fn = function (level, locale, message, paths) {\n if (isPlainObject(message)) {\n Object.keys(message).forEach(function (key) {\n var val = message[key];\n if (isPlainObject(val)) {\n paths.push(key);\n paths.push('.');\n fn(level, locale, val, paths);\n paths.pop();\n paths.pop();\n } else {\n paths.push(key);\n fn(level, locale, val, paths);\n paths.pop();\n }\n });\n } else if (isArray(message)) {\n message.forEach(function (item, index) {\n if (isPlainObject(item)) {\n paths.push((\"[\" + index + \"]\"));\n paths.push('.');\n fn(level, locale, item, paths);\n paths.pop();\n paths.pop();\n } else {\n paths.push((\"[\" + index + \"]\"));\n fn(level, locale, item, paths);\n paths.pop();\n }\n });\n } else if (isString(message)) {\n var ret = htmlTagMatcher.test(message);\n if (ret) {\n var msg = \"Detected HTML in message '\" + message + \"' of keypath '\" + (paths.join('')) + \"' at '\" + locale + \"'. Consider component interpolation with '' to avoid XSS. See https://bit.ly/2ZqJzkp\";\n if (level === 'warn') {\n warn(msg);\n } else if (level === 'error') {\n error(msg);\n }\n }\n }\n };\n\n fn(level, locale, message, paths);\n};\n\nVueI18n.prototype._initVM = function _initVM (data) {\n var silent = Vue.config.silent;\n Vue.config.silent = true;\n this._vm = new Vue({ data: data, __VUE18N__INSTANCE__: true });\n Vue.config.silent = silent;\n};\n\nVueI18n.prototype.destroyVM = function destroyVM () {\n this._vm.$destroy();\n};\n\nVueI18n.prototype.subscribeDataChanging = function subscribeDataChanging (vm) {\n this._dataListeners.add(vm);\n};\n\nVueI18n.prototype.unsubscribeDataChanging = function unsubscribeDataChanging (vm) {\n remove(this._dataListeners, vm);\n};\n\nVueI18n.prototype.watchI18nData = function watchI18nData () {\n var this$1 = this;\n return this._vm.$watch('$data', function () {\n var listeners = arrayFrom(this$1._dataListeners);\n var i = listeners.length;\n while(i--) {\n Vue.nextTick(function () {\n listeners[i] && listeners[i].$forceUpdate();\n });\n }\n }, { deep: true })\n};\n\nVueI18n.prototype.watchLocale = function watchLocale (composer) {\n if (!composer) {\n /* istanbul ignore if */\n if (!this._sync || !this._root) { return null }\n var target = this._vm;\n return this._root.$i18n.vm.$watch('locale', function (val) {\n target.$set(target, 'locale', val);\n target.$forceUpdate();\n }, { immediate: true })\n } else {\n // deal with vue-i18n-bridge\n if (!this.__VUE_I18N_BRIDGE__) { return null }\n var self = this;\n var target$1 = this._vm;\n return this.vm.$watch('locale', function (val) {\n target$1.$set(target$1, 'locale', val);\n if (self.__VUE_I18N_BRIDGE__ && composer) {\n composer.locale.value = val;\n }\n target$1.$forceUpdate();\n }, { immediate: true })\n }\n};\n\nVueI18n.prototype.onComponentInstanceCreated = function onComponentInstanceCreated (newI18n) {\n if (this._componentInstanceCreatedListener) {\n this._componentInstanceCreatedListener(newI18n, this);\n }\n};\n\nprototypeAccessors.vm.get = function () { return this._vm };\n\nprototypeAccessors.messages.get = function () { return looseClone(this._getMessages()) };\nprototypeAccessors.dateTimeFormats.get = function () { return looseClone(this._getDateTimeFormats()) };\nprototypeAccessors.numberFormats.get = function () { return looseClone(this._getNumberFormats()) };\nprototypeAccessors.availableLocales.get = function () { return Object.keys(this.messages).sort() };\n\nprototypeAccessors.locale.get = function () { return this._vm.locale };\nprototypeAccessors.locale.set = function (locale) {\n this._vm.$set(this._vm, 'locale', locale);\n};\n\nprototypeAccessors.fallbackLocale.get = function () { return this._vm.fallbackLocale };\nprototypeAccessors.fallbackLocale.set = function (locale) {\n this._localeChainCache = {};\n this._vm.$set(this._vm, 'fallbackLocale', locale);\n};\n\nprototypeAccessors.formatFallbackMessages.get = function () { return this._formatFallbackMessages };\nprototypeAccessors.formatFallbackMessages.set = function (fallback) { this._formatFallbackMessages = fallback; };\n\nprototypeAccessors.missing.get = function () { return this._missing };\nprototypeAccessors.missing.set = function (handler) { this._missing = handler; };\n\nprototypeAccessors.formatter.get = function () { return this._formatter };\nprototypeAccessors.formatter.set = function (formatter) { this._formatter = formatter; };\n\nprototypeAccessors.silentTranslationWarn.get = function () { return this._silentTranslationWarn };\nprototypeAccessors.silentTranslationWarn.set = function (silent) { this._silentTranslationWarn = silent; };\n\nprototypeAccessors.silentFallbackWarn.get = function () { return this._silentFallbackWarn };\nprototypeAccessors.silentFallbackWarn.set = function (silent) { this._silentFallbackWarn = silent; };\n\nprototypeAccessors.preserveDirectiveContent.get = function () { return this._preserveDirectiveContent };\nprototypeAccessors.preserveDirectiveContent.set = function (preserve) { this._preserveDirectiveContent = preserve; };\n\nprototypeAccessors.warnHtmlInMessage.get = function () { return this._warnHtmlInMessage };\nprototypeAccessors.warnHtmlInMessage.set = function (level) {\n var this$1 = this;\n\n var orgLevel = this._warnHtmlInMessage;\n this._warnHtmlInMessage = level;\n if (orgLevel !== level && (level === 'warn' || level === 'error')) {\n var messages = this._getMessages();\n Object.keys(messages).forEach(function (locale) {\n this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);\n });\n }\n};\n\nprototypeAccessors.postTranslation.get = function () { return this._postTranslation };\nprototypeAccessors.postTranslation.set = function (handler) { this._postTranslation = handler; };\n\nprototypeAccessors.sync.get = function () { return this._sync };\nprototypeAccessors.sync.set = function (val) { this._sync = val; };\n\nVueI18n.prototype._getMessages = function _getMessages () { return this._vm.messages };\nVueI18n.prototype._getDateTimeFormats = function _getDateTimeFormats () { return this._vm.dateTimeFormats };\nVueI18n.prototype._getNumberFormats = function _getNumberFormats () { return this._vm.numberFormats };\n\nVueI18n.prototype._warnDefault = function _warnDefault (locale, key, result, vm, values, interpolateMode) {\n if (!isNull(result)) { return result }\n if (this._missing) {\n var missingRet = this._missing.apply(null, [locale, key, vm, values]);\n if (isString(missingRet)) {\n return missingRet\n }\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn(\n \"Cannot translate the value of keypath '\" + key + \"'. \" +\n 'Use the value of keypath as default.'\n );\n }\n }\n\n if (this._formatFallbackMessages) {\n var parsedArgs = parseArgs.apply(void 0, values);\n return this._render(key, interpolateMode, parsedArgs.params, key)\n } else {\n return key\n }\n};\n\nVueI18n.prototype._isFallbackRoot = function _isFallbackRoot (val) {\n return (this._fallbackRootWithEmptyString? !val : isNull(val)) && !isNull(this._root) && this._fallbackRoot\n};\n\nVueI18n.prototype._isSilentFallbackWarn = function _isSilentFallbackWarn (key) {\n return this._silentFallbackWarn instanceof RegExp\n ? this._silentFallbackWarn.test(key)\n : this._silentFallbackWarn\n};\n\nVueI18n.prototype._isSilentFallback = function _isSilentFallback (locale, key) {\n return this._isSilentFallbackWarn(key) && (this._isFallbackRoot() || locale !== this.fallbackLocale)\n};\n\nVueI18n.prototype._isSilentTranslationWarn = function _isSilentTranslationWarn (key) {\n return this._silentTranslationWarn instanceof RegExp\n ? this._silentTranslationWarn.test(key)\n : this._silentTranslationWarn\n};\n\nVueI18n.prototype._interpolate = function _interpolate (\n locale,\n message,\n key,\n host,\n interpolateMode,\n values,\n visitedLinkStack\n) {\n if (!message) { return null }\n\n var pathRet = this._path.getPathValue(message, key);\n if (isArray(pathRet) || isPlainObject(pathRet)) { return pathRet }\n\n var ret;\n if (isNull(pathRet)) {\n /* istanbul ignore else */\n if (isPlainObject(message)) {\n ret = message[key];\n if (!(isString(ret) || isFunction(ret))) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {\n warn((\"Value of key '\" + key + \"' is not a string or function !\"));\n }\n return null\n }\n } else {\n return null\n }\n } else {\n /* istanbul ignore else */\n if (isString(pathRet) || isFunction(pathRet)) {\n ret = pathRet;\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {\n warn((\"Value of key '\" + key + \"' is not a string or function!\"));\n }\n return null\n }\n }\n\n // Check for the existence of links within the translated string\n if (isString(ret) && (ret.indexOf('@:') >= 0 || ret.indexOf('@.') >= 0)) {\n ret = this._link(locale, message, ret, host, 'raw', values, visitedLinkStack);\n }\n\n return this._render(ret, interpolateMode, values, key)\n};\n\nVueI18n.prototype._link = function _link (\n locale,\n message,\n str,\n host,\n interpolateMode,\n values,\n visitedLinkStack\n) {\n var ret = str;\n\n // Match all the links within the local\n // We are going to replace each of\n // them with its translation\n var matches = ret.match(linkKeyMatcher);\n\n // eslint-disable-next-line no-autofix/prefer-const\n for (var idx in matches) {\n // ie compatible: filter custom array\n // prototype method\n if (!matches.hasOwnProperty(idx)) {\n continue\n }\n var link = matches[idx];\n var linkKeyPrefixMatches = link.match(linkKeyPrefixMatcher);\n var linkPrefix = linkKeyPrefixMatches[0];\n var formatterName = linkKeyPrefixMatches[1];\n\n // Remove the leading @:, @.case: and the brackets\n var linkPlaceholder = link.replace(linkPrefix, '').replace(bracketsMatcher, '');\n\n if (includes(visitedLinkStack, linkPlaceholder)) {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Circular reference found. \\\"\" + link + \"\\\" is already visited in the chain of \" + (visitedLinkStack.reverse().join(' <- '))));\n }\n return ret\n }\n visitedLinkStack.push(linkPlaceholder);\n\n // Translate the link\n var translated = this._interpolate(\n locale, message, linkPlaceholder, host,\n interpolateMode === 'raw' ? 'string' : interpolateMode,\n interpolateMode === 'raw' ? undefined : values,\n visitedLinkStack\n );\n\n if (this._isFallbackRoot(translated)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(linkPlaceholder)) {\n warn((\"Fall back to translate the link placeholder '\" + linkPlaceholder + \"' with root locale.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n var root = this._root.$i18n;\n translated = root._translate(\n root._getMessages(), root.locale, root.fallbackLocale,\n linkPlaceholder, host, interpolateMode, values\n );\n }\n translated = this._warnDefault(\n locale, linkPlaceholder, translated, host,\n isArray(values) ? values : [values],\n interpolateMode\n );\n\n if (this._modifiers.hasOwnProperty(formatterName)) {\n translated = this._modifiers[formatterName](translated);\n } else if (defaultModifiers.hasOwnProperty(formatterName)) {\n translated = defaultModifiers[formatterName](translated);\n }\n\n visitedLinkStack.pop();\n\n // Replace the link with the translated\n ret = !translated ? ret : ret.replace(link, translated);\n }\n\n return ret\n};\n\nVueI18n.prototype._createMessageContext = function _createMessageContext (values, formatter, path, interpolateMode) {\n var this$1 = this;\n\n var _list = isArray(values) ? values : [];\n var _named = isObject(values) ? values : {};\n var list = function (index) { return _list[index]; };\n var named = function (key) { return _named[key]; };\n var messages = this._getMessages();\n var locale = this.locale;\n\n return {\n list: list,\n named: named,\n values: values,\n formatter: formatter,\n path: path,\n messages: messages,\n locale: locale,\n linked: function (linkedKey) { return this$1._interpolate(locale, messages[locale] || {}, linkedKey, null, interpolateMode, undefined, [linkedKey]); }\n }\n};\n\nVueI18n.prototype._render = function _render (message, interpolateMode, values, path) {\n if (isFunction(message)) {\n return message(\n this._createMessageContext(values, this._formatter || defaultFormatter, path, interpolateMode)\n )\n }\n\n var ret = this._formatter.interpolate(message, values, path);\n\n // If the custom formatter refuses to work - apply the default one\n if (!ret) {\n ret = defaultFormatter.interpolate(message, values, path);\n }\n\n // if interpolateMode is **not** 'string' ('row'),\n // return the compiled data (e.g. ['foo', VNode, 'bar']) with formatter\n return interpolateMode === 'string' && !isString(ret) ? ret.join('') : ret\n};\n\nVueI18n.prototype._appendItemToChain = function _appendItemToChain (chain, item, blocks) {\n var follow = false;\n if (!includes(chain, item)) {\n follow = true;\n if (item) {\n follow = item[item.length - 1] !== '!';\n item = item.replace(/!/g, '');\n chain.push(item);\n if (blocks && blocks[item]) {\n follow = blocks[item];\n }\n }\n }\n return follow\n};\n\nVueI18n.prototype._appendLocaleToChain = function _appendLocaleToChain (chain, locale, blocks) {\n var follow;\n var tokens = locale.split('-');\n do {\n var item = tokens.join('-');\n follow = this._appendItemToChain(chain, item, blocks);\n tokens.splice(-1, 1);\n } while (tokens.length && (follow === true))\n return follow\n};\n\nVueI18n.prototype._appendBlockToChain = function _appendBlockToChain (chain, block, blocks) {\n var follow = true;\n for (var i = 0; (i < block.length) && (isBoolean(follow)); i++) {\n var locale = block[i];\n if (isString(locale)) {\n follow = this._appendLocaleToChain(chain, locale, blocks);\n }\n }\n return follow\n};\n\nVueI18n.prototype._getLocaleChain = function _getLocaleChain (start, fallbackLocale) {\n if (start === '') { return [] }\n\n if (!this._localeChainCache) {\n this._localeChainCache = {};\n }\n\n var chain = this._localeChainCache[start];\n if (!chain) {\n if (!fallbackLocale) {\n fallbackLocale = this.fallbackLocale;\n }\n chain = [];\n\n // first block defined by start\n var block = [start];\n\n // while any intervening block found\n while (isArray(block)) {\n block = this._appendBlockToChain(\n chain,\n block,\n fallbackLocale\n );\n }\n\n // last block defined by default\n var defaults;\n if (isArray(fallbackLocale)) {\n defaults = fallbackLocale;\n } else if (isObject(fallbackLocale)) {\n /* $FlowFixMe */\n if (fallbackLocale['default']) {\n defaults = fallbackLocale['default'];\n } else {\n defaults = null;\n }\n } else {\n defaults = fallbackLocale;\n }\n\n // convert defaults to array\n if (isString(defaults)) {\n block = [defaults];\n } else {\n block = defaults;\n }\n if (block) {\n this._appendBlockToChain(\n chain,\n block,\n null\n );\n }\n this._localeChainCache[start] = chain;\n }\n return chain\n};\n\nVueI18n.prototype._translate = function _translate (\n messages,\n locale,\n fallback,\n key,\n host,\n interpolateMode,\n args\n) {\n var chain = this._getLocaleChain(locale, fallback);\n var res;\n for (var i = 0; i < chain.length; i++) {\n var step = chain[i];\n res =\n this._interpolate(step, messages[step], key, host, interpolateMode, args, [key]);\n if (!isNull(res)) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to translate the keypath '\" + key + \"' with '\" + step + \"' locale.\"));\n }\n return res\n }\n }\n return null\n};\n\nVueI18n.prototype._t = function _t (key, _locale, messages, host) {\n var ref;\n\n var values = [], len = arguments.length - 4;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 4 ];\n if (!key) { return '' }\n\n var parsedArgs = parseArgs.apply(void 0, values);\n if(this._escapeParameterHtml) {\n parsedArgs.params = escapeParams(parsedArgs.params);\n }\n\n var locale = parsedArgs.locale || _locale;\n\n var ret = this._translate(\n messages, locale, this.fallbackLocale, key,\n host, 'string', parsedArgs.params\n );\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to translate the keypath '\" + key + \"' with root locale.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return (ref = this._root).$t.apply(ref, [ key ].concat( values ))\n } else {\n ret = this._warnDefault(locale, key, ret, host, values, 'string');\n if (this._postTranslation && ret !== null && ret !== undefined) {\n ret = this._postTranslation(ret, key);\n }\n return ret\n }\n};\n\nVueI18n.prototype.t = function t (key) {\n var ref;\n\n var values = [], len = arguments.length - 1;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];\n return (ref = this)._t.apply(ref, [ key, this.locale, this._getMessages(), null ].concat( values ))\n};\n\nVueI18n.prototype._i = function _i (key, locale, messages, host, values) {\n var ret =\n this._translate(messages, locale, this.fallbackLocale, key, host, 'raw', values);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn((\"Fall back to interpolate the keypath '\" + key + \"' with root locale.\"));\n }\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.i(key, locale, values)\n } else {\n return this._warnDefault(locale, key, ret, host, [values], 'raw')\n }\n};\n\nVueI18n.prototype.i = function i (key, locale, values) {\n /* istanbul ignore if */\n if (!key) { return '' }\n\n if (!isString(locale)) {\n locale = this.locale;\n }\n\n return this._i(key, locale, this._getMessages(), null, values)\n};\n\nVueI18n.prototype._tc = function _tc (\n key,\n _locale,\n messages,\n host,\n choice\n) {\n var ref;\n\n var values = [], len = arguments.length - 5;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 5 ];\n if (!key) { return '' }\n if (choice === undefined) {\n choice = 1;\n }\n\n var predefined = { 'count': choice, 'n': choice };\n var parsedArgs = parseArgs.apply(void 0, values);\n parsedArgs.params = Object.assign(predefined, parsedArgs.params);\n values = parsedArgs.locale === null ? [parsedArgs.params] : [parsedArgs.locale, parsedArgs.params];\n return this.fetchChoice((ref = this)._t.apply(ref, [ key, _locale, messages, host ].concat( values )), choice)\n};\n\nVueI18n.prototype.fetchChoice = function fetchChoice (message, choice) {\n /* istanbul ignore if */\n if (!message || !isString(message)) { return null }\n var choices = message.split('|');\n\n choice = this.getChoiceIndex(choice, choices.length);\n if (!choices[choice]) { return message }\n return choices[choice].trim()\n};\n\nVueI18n.prototype.tc = function tc (key, choice) {\n var ref;\n\n var values = [], len = arguments.length - 2;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];\n return (ref = this)._tc.apply(ref, [ key, this.locale, this._getMessages(), null, choice ].concat( values ))\n};\n\nVueI18n.prototype._te = function _te (key, locale, messages) {\n var args = [], len = arguments.length - 3;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 3 ];\n\n var _locale = parseArgs.apply(void 0, args).locale || locale;\n return this._exist(messages[_locale], key)\n};\n\nVueI18n.prototype.te = function te (key, locale) {\n return this._te(key, this.locale, this._getMessages(), locale)\n};\n\nVueI18n.prototype.getLocaleMessage = function getLocaleMessage (locale) {\n return looseClone(this._vm.messages[locale] || {})\n};\n\nVueI18n.prototype.setLocaleMessage = function setLocaleMessage (locale, message) {\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);\n }\n this._vm.$set(this._vm.messages, locale, message);\n};\n\nVueI18n.prototype.mergeLocaleMessage = function mergeLocaleMessage (locale, message) {\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);\n }\n this._vm.$set(this._vm.messages, locale, merge(\n typeof this._vm.messages[locale] !== 'undefined' && Object.keys(this._vm.messages[locale]).length\n ? Object.assign({}, this._vm.messages[locale])\n : {},\n message\n ));\n};\n\nVueI18n.prototype.getDateTimeFormat = function getDateTimeFormat (locale) {\n return looseClone(this._vm.dateTimeFormats[locale] || {})\n};\n\nVueI18n.prototype.setDateTimeFormat = function setDateTimeFormat (locale, format) {\n this._vm.$set(this._vm.dateTimeFormats, locale, format);\n this._clearDateTimeFormat(locale, format);\n};\n\nVueI18n.prototype.mergeDateTimeFormat = function mergeDateTimeFormat (locale, format) {\n this._vm.$set(this._vm.dateTimeFormats, locale, merge(this._vm.dateTimeFormats[locale] || {}, format));\n this._clearDateTimeFormat(locale, format);\n};\n\nVueI18n.prototype._clearDateTimeFormat = function _clearDateTimeFormat (locale, format) {\n // eslint-disable-next-line no-autofix/prefer-const\n for (var key in format) {\n var id = locale + \"__\" + key;\n\n if (!this._dateTimeFormatters.hasOwnProperty(id)) {\n continue\n }\n\n delete this._dateTimeFormatters[id];\n }\n};\n\nVueI18n.prototype._localizeDateTime = function _localizeDateTime (\n value,\n locale,\n fallback,\n dateTimeFormats,\n key,\n options\n) {\n var _locale = locale;\n var formats = dateTimeFormats[_locale];\n\n var chain = this._getLocaleChain(locale, fallback);\n for (var i = 0; i < chain.length; i++) {\n var current = _locale;\n var step = chain[i];\n formats = dateTimeFormats[step];\n _locale = step;\n // fallback locale\n if (isNull(formats) || isNull(formats[key])) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to '\" + step + \"' datetime formats from '\" + current + \"' datetime formats.\"));\n }\n } else {\n break\n }\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null\n } else {\n var format = formats[key];\n\n var formatter;\n if (options) {\n formatter = new Intl.DateTimeFormat(_locale, Object.assign({}, format, options));\n } else {\n var id = _locale + \"__\" + key;\n formatter = this._dateTimeFormatters[id];\n if (!formatter) {\n formatter = this._dateTimeFormatters[id] = new Intl.DateTimeFormat(_locale, format);\n }\n }\n\n return formatter.format(value)\n }\n};\n\nVueI18n.prototype._d = function _d (value, locale, key, options) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && !VueI18n.availabilities.dateTimeFormat) {\n warn('Cannot format a Date value due to not supported Intl.DateTimeFormat.');\n return ''\n }\n\n if (!key) {\n var dtf = !options ? new Intl.DateTimeFormat(locale) : new Intl.DateTimeFormat(locale, options);\n return dtf.format(value)\n }\n\n var ret =\n this._localizeDateTime(value, locale, this.fallbackLocale, this._getDateTimeFormats(), key, options);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to datetime localization of root: key '\" + key + \"'.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.d(value, key, locale)\n } else {\n return ret || ''\n }\n};\n\nVueI18n.prototype.d = function d (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n var locale = this.locale;\n var key = null;\n var options = null;\n\n if (args.length === 1) {\n if (isString(args[0])) {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n if (args[0].key) {\n key = args[0].key;\n }\n }\n\n options = Object.keys(args[0]).reduce(function (acc, key) {\n var obj;\n\n if (includes(dateTimeFormatKeys, key)) {\n return Object.assign({}, acc, ( obj = {}, obj[key] = args[0][key], obj ))\n }\n return acc\n }, null);\n\n } else if (args.length === 2) {\n if (isString(args[0])) {\n key = args[0];\n }\n if (isString(args[1])) {\n locale = args[1];\n }\n }\n\n return this._d(value, locale, key, options)\n};\n\nVueI18n.prototype.getNumberFormat = function getNumberFormat (locale) {\n return looseClone(this._vm.numberFormats[locale] || {})\n};\n\nVueI18n.prototype.setNumberFormat = function setNumberFormat (locale, format) {\n this._vm.$set(this._vm.numberFormats, locale, format);\n this._clearNumberFormat(locale, format);\n};\n\nVueI18n.prototype.mergeNumberFormat = function mergeNumberFormat (locale, format) {\n this._vm.$set(this._vm.numberFormats, locale, merge(this._vm.numberFormats[locale] || {}, format));\n this._clearNumberFormat(locale, format);\n};\n\nVueI18n.prototype._clearNumberFormat = function _clearNumberFormat (locale, format) {\n // eslint-disable-next-line no-autofix/prefer-const\n for (var key in format) {\n var id = locale + \"__\" + key;\n\n if (!this._numberFormatters.hasOwnProperty(id)) {\n continue\n }\n\n delete this._numberFormatters[id];\n }\n};\n\nVueI18n.prototype._getNumberFormatter = function _getNumberFormatter (\n value,\n locale,\n fallback,\n numberFormats,\n key,\n options\n) {\n var _locale = locale;\n var formats = numberFormats[_locale];\n\n var chain = this._getLocaleChain(locale, fallback);\n for (var i = 0; i < chain.length; i++) {\n var current = _locale;\n var step = chain[i];\n formats = numberFormats[step];\n _locale = step;\n // fallback locale\n if (isNull(formats) || isNull(formats[key])) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to '\" + step + \"' number formats from '\" + current + \"' number formats.\"));\n }\n } else {\n break\n }\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null\n } else {\n var format = formats[key];\n\n var formatter;\n if (options) {\n // If options specified - create one time number formatter\n formatter = new Intl.NumberFormat(_locale, Object.assign({}, format, options));\n } else {\n var id = _locale + \"__\" + key;\n formatter = this._numberFormatters[id];\n if (!formatter) {\n formatter = this._numberFormatters[id] = new Intl.NumberFormat(_locale, format);\n }\n }\n return formatter\n }\n};\n\nVueI18n.prototype._n = function _n (value, locale, key, options) {\n /* istanbul ignore if */\n if (!VueI18n.availabilities.numberFormat) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot format a Number value due to not supported Intl.NumberFormat.');\n }\n return ''\n }\n\n if (!key) {\n var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);\n return nf.format(value)\n }\n\n var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);\n var ret = formatter && formatter.format(value);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to number localization of root: key '\" + key + \"'.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.n(value, Object.assign({}, { key: key, locale: locale }, options))\n } else {\n return ret || ''\n }\n};\n\nVueI18n.prototype.n = function n (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n var locale = this.locale;\n var key = null;\n var options = null;\n\n if (args.length === 1) {\n if (isString(args[0])) {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n if (args[0].key) {\n key = args[0].key;\n }\n\n // Filter out number format options only\n options = Object.keys(args[0]).reduce(function (acc, key) {\n var obj;\n\n if (includes(numberFormatKeys, key)) {\n return Object.assign({}, acc, ( obj = {}, obj[key] = args[0][key], obj ))\n }\n return acc\n }, null);\n }\n } else if (args.length === 2) {\n if (isString(args[0])) {\n key = args[0];\n }\n if (isString(args[1])) {\n locale = args[1];\n }\n }\n\n return this._n(value, locale, key, options)\n};\n\nVueI18n.prototype._ntp = function _ntp (value, locale, key, options) {\n /* istanbul ignore if */\n if (!VueI18n.availabilities.numberFormat) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot format to parts a Number value due to not supported Intl.NumberFormat.');\n }\n return []\n }\n\n if (!key) {\n var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);\n return nf.formatToParts(value)\n }\n\n var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);\n var ret = formatter && formatter.formatToParts(value);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn((\"Fall back to format number to parts of root: key '\" + key + \"' .\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n._ntp(value, locale, key, options)\n } else {\n return ret || []\n }\n};\n\nObject.defineProperties( VueI18n.prototype, prototypeAccessors );\n\nvar availabilities;\n// $FlowFixMe\nObject.defineProperty(VueI18n, 'availabilities', {\n get: function get () {\n if (!availabilities) {\n var intlDefined = typeof Intl !== 'undefined';\n availabilities = {\n dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',\n numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'\n };\n }\n\n return availabilities\n }\n});\n\nVueI18n.install = install;\nVueI18n.version = '8.28.2';\n\nexport default VueI18n;\n","// src/index.ts\nimport Vue from \"vue\";\nimport VueI18n from \"vue-i18n\";\nimport { computed, getCurrentInstance } from \"@vue/composition-api\";\nvar i18nInstance;\nfunction createI18n(options) {\n i18nInstance = new VueI18n(options);\n return i18nInstance;\n}\nfunction useI18n() {\n if (!i18nInstance)\n throw new Error(\"vue-i18n not initialized\");\n const i18n = i18nInstance;\n const instance = getCurrentInstance();\n const vm = (instance == null ? void 0 : instance.proxy) || instance || new Vue({});\n const locale = computed({\n get() {\n return i18n.locale;\n },\n set(v) {\n i18n.locale = v;\n }\n });\n return {\n locale,\n t: vm.$t.bind(vm),\n tc: vm.$tc.bind(vm),\n d: vm.$d.bind(vm),\n te: vm.$te.bind(vm),\n n: vm.$n.bind(vm)\n };\n}\nexport {\n createI18n,\n useI18n\n};\n","import VueI18n, { LocaleMessages } from 'vue-i18n'\nimport { createI18n } from 'vue-i18n-composable'\nimport enLocals from '@/locales/en.json'\n\nexport default function initialize (vue) {\n vue.use(VueI18n)\n\n function loadLocaleMessages (): LocaleMessages {\n const messages: LocaleMessages = { en: {} }\n Object.keys(enLocals).forEach((key) => {\n messages.en[key] = enLocals[key]\n })\n return messages\n }\n\n const i18n = createI18n({\n locale: import.meta.env.VUE_APP_I18N_LOCALE || 'en',\n fallbackLocale: import.meta.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en',\n messages: loadLocaleMessages()\n })\n return i18n\n}\n","/*\nWhile upgrading to vue 3 please check full plugin and do necessary modifications here\n Library build set up for fas-search-components.\n build library using vue-cli-service\n Basic set up of included files store and i18n included here\n How to use :\n inside main.ts `import Search from 'fas-ui'`\n Vue.use(Search, { store, i18n })\n include style if needed either\n import 'fas-ui/fas-lib/fas-ui.css'\n or inside component style tag us without scope (global scope needed),\n @import '~fas-ui/src/assets/scss/search.scss';\n */\n\nimport OurVue from 'vue'\nimport Search from '@/components/Dashboard/Search.vue'\nimport VueCompositionAPI from '@vue/composition-api'\nimport initializeI18n from './plugins/i18n'\n\n// stores needed fro search\n\n// lang files\n\n/**\n * install function\n *\n * @param {*} Vue parent component vue contructor\n * @param {store, i18n} options need store and i18n\n */\nfunction install (Vue, options) {\n if (OurVue !== Vue) {\n // eslint-disable-next-line no-console\n console.error('Multiple instances of Vue detected ')\n }\n\n if (install.installed) return\n install.installed = true\n // since VueCompositionAPI is not giving direct access to property we are checking by using setup api exist in context or not\n // since setup is a reserved keyword and which is using in vue 3 also, Hope it will not change.\n // Another solution is Object.hasOwnProperty.call(Vue, '__composition_api_installed__').\n // we are not using that in futurem, if they change the string no need to brake app\n // Couldnot find better solution since lack of information available. sorry devs :(\n if (!Object.hasOwnProperty.call(Vue.config.optionMergeStrategies, 'setup')) {\n // if parent is not using VueCompositionAPI api need to push to vue\n Vue.use(VueCompositionAPI)\n // eslint-disable-next-line no-console\n console.info('[FAS-Plugin] VueCompositionAPI is not available in parent so pushing from plugin')\n } else {\n // eslint-disable-next-line no-console\n console.info('[FAS-Plugin] VueCompositionAPI already installed')\n }\n\n // simple hack to inject locale messages. check for better solutions\n // this will not work when chaging lang.\n // need to updated code (since we are not using other lag now, not updating chanegs)\n const t = initializeI18n(Vue)\n if (options.i18n && t && t.messages) {\n options.i18n.mergeLocaleMessage(\n options.i18n.locale,\n t.messages[t.locale]\n )\n } else {\n // eslint-disable-next-line no-console\n console.error('[FAS-Plugin] please provide i18n to use lang')\n }\n // pushing store modules to parent store\n // use unique name to avoid conflict\n if (options.store) {\n // options.store.registerModule('store', store)\n window.fasStore = options.store\n } else {\n // eslint-disable-next-line no-console\n console.error('[FAS-Plugin] please provide store')\n }\n // registering component to use as plugin\n Vue.component('fas-search-component', Search)\n}\n\nconst plugin = {\n install\n}\n\nlet GlobalVue = null\nif (typeof window !== 'undefined') {\n GlobalVue = window.Vue\n} else if (typeof global !== 'undefined') {\n GlobalVue = global.vue\n}\n\nif (GlobalVue) {\n GlobalVue.use(plugin)\n}\n\nSearch.install = install\n\nexport default Search\n"],"names":["Vue","use","VueCompositionAPI","SessionStorageKeys","DateFilterCodes","PaymentMethods","SlipStatus","Role","ApiErrors","CreateRoutingSlipStatus","PatchActions","headerSearchTitle","text","align","value","display","className","sortable","hideInSearchColumnFilter","RoutingSlipRefundStatus","code","RoutingSlipRefundCodes","reduce","acc","status","ERROR","WINDOW","window","root","JS_SHA256_NO_WINDOW","WEB_WORKER","self","NODE_JS","JS_SHA256_NO_NODE_JS","process","versions","node","global","COMMON_JS","JS_SHA256_NO_COMMON_JS","module","exports","ARRAY_BUFFER","JS_SHA256_NO_ARRAY_BUFFER","ArrayBuffer","HEX_CHARS","split","EXTRA","SHIFT","K","OUTPUT_TYPES","blocks","Array","isArray","obj","Object","prototype","toString","call","JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW","isView","buffer","constructor","createOutputMethod","outputType","is224","message","Sha256","update","createMethod","method","nodeWrap","create","i","length","type","crypto","eval","Buffer","algorithm","nodeMethod","createHash","digest","Error","Uint8Array","createHmacOutputMethod","key","HmacSha256","createHmacMethod","sharedMemory","this","h0","h1","h2","h3","h4","h5","h6","h7","block","start","bytes","hBytes","finalized","hashed","first","index","charCodeAt","array","oKeyPad","iKeyPad","b","inner","notString","lastByteIndex","hash","finalize","j","s0","s1","maj","t1","ab","da","cd","bc","a","c","d","e","f","g","h","hex","arr","push","arrayBuffer","dataView","DataView","setUint32","innerHash","sha256","sha224","hmac","base64Js","byteLength","b64","lens","getLens","validLen","placeHoldersLen","toByteArray","tmp","Arr","_byteLength","curByte","len","revLookup","fromByteArray","uint8","extraBytes","parts","maxChunkLength","len2","encodeChunk","lookup","join","indexOf","end","num","output","sha256_imported","base64js_imported","Promise","loggedPromiseDeprecation","logPromiseDeprecation","console","warn","toKeycloakPromise","promise","__proto__","KeycloakPromise","executor","Keycloak","config","adapter","callbackStorage","kc","refreshQueue","loginIframe","enable","callbackList","interval","scripts","document","getElementsByTagName","src","iframeVersion","substring","useNonce","logInfo","createLogger","info","logWarn","generateRandomData","msCrypto","getRandomValues","Math","floor","random","generateCodeVerifier","generateRandomString","alphabet","randomData","chars","String","fromCharCode","apply","generatePkceChallenge","pkceMethod","codeVerifier","hashBytes","replace","getRealmUrl","authServerUrl","charAt","encodeURIComponent","realm","getOrigin","location","origin","protocol","hostname","port","processCallback","oauth","error","prompt","timeLocal","Date","getTime","errorData","error_description","onAuthError","setError","setSuccess","flow","access_token","id_token","authSuccess","params","url","endpoints","token","req","XMLHttpRequest","open","setRequestHeader","clientId","redirectUri","pkceCodeVerifier","withCredentials","onreadystatechange","readyState","tokenResponse","JSON","parse","responseText","send","accessToken","refreshToken","idToken","fulfillPromise","setToken","tokenParsed","nonce","storedNonce","refreshTokenParsed","idTokenParsed","clearToken","onAuthSuccess","loadConfig","configUrl","createPromise","setupOidcEndoints","oidcConfiguration","authorize","authorization_endpoint","token_endpoint","logout","end_session_endpoint","checkSessionIframe","check_session_iframe","register","userinfo","userinfo_endpoint","fileLoaded","oidcProvider","oidcProviderConfigUrl","match","substr","xhr","responseURL","startsWith","tokenTimeoutHandle","clearTimeout","decodeToken","sessionId","session_state","authenticated","subject","sub","realmAccess","realm_access","resourceAccess","resource_access","timeSkew","iat","onTokenExpired","expiresIn","round","setTimeout","str","slice","decodeURIComponent","escape","atob","createUUID","hexDigits","s","parseCallback","parseCallbackUrl","oauthState","get","state","valid","supportedParams","newUrl","parsed","queryIndex","fragmentIndex","responseMode","parseCallbackParams","paramsString","oauthParams","p","result","resolve","reject","setupCheckLoginIframe","iframe","createElement","onload","authUrl","iframeOrigin","setAttribute","style","body","appendChild","messageCallback","event","contentWindow","source","data","callbacks","splice","addEventListener","scheduleCheckIframe","checkLoginIframe","then","unchanged","msg","postMessage","loadAdapter","login","options","createLoginUrl","createLogoutUrl","createRegisterUrl","accountManagement","accountUrl","createAccountUrl","href","encodeHash","cordovaOpenWindowWrapper","loginUrl","target","cordova","InAppBrowser","shallowCloneCordovaOptions","userOptions","cordovaOptions","keys","optionName","formatCordovaOptions","createCordovaOptions","hidden","ref","completed","closed","closeBrowser","close","reason","logoutUrl","registerUrl","universalLinks","subscribe","unsubscribe","plugins","browsertab","openUrl","init","initOptions","createCallbackStorage","Cordova","checkLoginIframeInterval","onLoad","loginRequired","responseType","silentCheckSsoRedirectUri","enableLogging","initPromise","onReady","catch","configPromise","doLogin","checkSsoSilently","ifrm","removeChild","removeEventListener","processInit","callback","history","replaceState","updateToken","baseUrl","scope","callbackState","action","maxAge","loginHint","idpHint","locale","add","hasRealmRole","role","access","roles","hasResourceRole","resource","loadUserProfile","profile","loadUserInfo","userInfo","isTokenExpired","minValidity","ceil","isNaN","exec","onAuthRefreshSuccess","pop","onAuthRefreshError","onAuthLogout","LocalStorage","localStorage","setItem","removeItem","cs","clearExpired","time","getItem","expires","err","stringify","CookieStorage","getCookie","setCookie","cookieExpiration","minutes","exp","setTime","name","ca","cookie","expirationDate","toUTCString","fn","arguments","success","handleSuccess","handleError","factory","require$$0","require$$1","decodeKCToken","ConfigHelper","getFromSession","KeyCloakToken","base64Url","base64","map","trimTrailingSlashURL","trim","ConfigHelper$1","_a","addToSession","sessionStorage","removeFromSession","clearSession","clear","getStatusAPIUrl","StatusApiUrl","getAuthAPIUrl","AuthApiUrl","getAuthContextPath","AuthWebUrl","getRegistryHomeURL","RegistryHomeUrl","getNameRequestURL","NameRequestUrl","getPprWebURL","PprWebUrl","setKeycloakConfigUrl","keycloakConfigUrl","getKeycloakConfigUrl","__publicField","VuexModule","actions","mutations","getters","namespaced","modules","getModule","moduleClass","store","_statics","genStatic","_genStatic","reservedKeys","stateFactory","forEach","hasOwnProperty","addPropertiesToObject","_loop_1","k","defineProperty","_i","__awaiter","thisArg","_arguments","P","generator","fulfilled","step","next","rejected","done","__generator","y","t","_","label","sent","trys","ops","verb","throw","return","Symbol","iterator","n","v","op","TypeError","staticStateGenerator","modOpt","statics","staticGetterGenerator","staticMutationGenerator","args","commit","concat","staticActionGenerators","_b","dispatch","moduleDecoratorFactory","moduleOptions","stateFactory$1","getOwnPropertyNames","funcName","descriptor","getOwnPropertyDescriptor","rootState","rootGetters","thisObj","context","dynamic","registerModule","Module","modOrOpt","actionDecoratorFactory","_c","rawError","_d","actionFunction","payload","actionPayload","moduleAccessor","e_1","stack","handler","Action","targetOrParams","Mutation","mutationFunction","AuthModule","super","isAuthenticated","keycloakGuid","kcGuid","KeycloakServices","getUserInfo","currentLoginSource","loginSource","setKCToken","setIDToken","KeyCloakIdToken","setRefreshToken","KeyCloakRefreshToken","setKCGuid","setLoginSource","syncWithSessionStorage","__decorateClass$2","__decorateClass","_KeyCloakService","getInstance","instance","isInitialized","keyCloakConfigurl","getKCInstance","initializeKeyCloak","keycloakConfig","kcLogin","kcOptions","initSession","authModule","syncSessionAndScheduleTokenRefresh","parsedToken","lastName","lastname","firstName","firstname","email","_e","_f","userName","_g","username","fullName","_h","redirectUrl","siteminderLogoutUrl","SiteminderLogoutUrl","PreventStorageSync","env","VUE_APP_PATH","includes","isForceRefresh","tokenExpiresIn","refreshed","verifyRoles","allowedRoles","disabledRoles","isAuthorized","some","initializeToken","isScheduleRefresh","forceLogin","SessionSynced","syncSessionStorage","scheduleRefreshTimer","refreshEarlyTime","refreshEarlyTimeinMilliseconds","max","REFRESH_ATTEMPT_INTERVAL","scheduleRefreshToken","refreshTokenExpiresIn","refreshInMilliSeconds","timerId","log","counter","KeyCloakService","KeyCloakService$1","hookCallback","hooks","setHookCallback","input","isObject","hasOwnProp","isObjectEmpty","isUndefined","isNumber","isDate","res","arrLen","extend","valueOf","createUTC","format","strict","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidEra","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","era","meridiem","rfc2822","weekdayMismatch","getParsingFlags","m","_pf","isValid","_isValid","flags","parsedParts","isNowValid","invalidWeekday","_strict","bigHour","isFrozen","createInvalid","NaN","extend$2","fun","momentProperties","updateInProgress","copyConfig","to","from","prop","val","momentPropertiesLen","_isAMomentObject","_l","_tzm","_isUTC","_offset","_locale","Moment","updateOffset","isMoment","suppressDeprecationWarnings","deprecate","firstTime","deprecationHandler","arg","argLen","deprecations","deprecateSimple","isFunction","Function","set","_config","_dayOfMonthOrdinalParseLenient","RegExp","_dayOfMonthOrdinalParse","_ordinalParse","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","calendar","mom","now","_calendar","zeroFill","number","targetLength","forceSign","absNumber","abs","zerosToFill","pow","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","padded","ordinal","func","localeData","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","invalidDate","replaceLongDateFormatTokens","longDateFormat","lastIndex","test","defaultLongDateFormat","LTS","LT","L","LL","LLL","LLLL","_longDateFormat","formatUpper","toUpperCase","tok","defaultInvalidDate","_invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","_ordinal","defaultRelativeTime","future","past","ss","mm","hh","dd","w","ww","M","MM","yy","relativeTime","withoutSuffix","string","isFuture","_relativeTime","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","toLowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","u","sort","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","isFinite","makeGetSet","keepTime","set$1","month","date","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","_w","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","x","modMonth","o","monthsShort","months","monthsShortRegex","monthsRegex","monthsParse","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","_months","isFormat","localeMonthsShort","_monthsShort","handleStrictParse","monthName","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","localeMonthsParse","_monthsParseExact","setMonth","dayOfMonth","min","getSetMonth","getDaysInMonth","computeMonthsParse","_monthsShortStrictRegex","_monthsShortRegex","_monthsStrictRegex","_monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","parseTwoDigitYear","parseInt","getSetYear","getIsLeapYear","createDate","ms","getFullYear","setFullYear","createUTCDate","UTC","getUTCFullYear","setUTCFullYear","firstWeekOffset","dow","doy","fwd","getUTCDay","dayOfYearFromWeeks","week","weekday","resYear","resDayOfYear","dayOfYear","weekOfYear","resWeek","weekOffset","weeksInYear","weekOffsetNext","localeWeek","_week","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","weekdaysParse","parseIsoWeekday","shiftWeekdays","ws","weekdaysMin","weekdaysShort","weekdays","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","_weekdays","day","localeWeekdaysShort","_weekdaysShort","localeWeekdaysMin","_weekdaysMin","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","localeWeekdaysParse","_weekdaysParseExact","_fullWeekdaysParse","getSetDayOfWeek","getDay","getSetLocaleDayOfWeek","getSetISODayOfWeek","computeWeekdaysParse","_weekdaysStrictRegex","_weekdaysRegex","_weekdaysShortStrictRegex","_weekdaysShortRegex","_weekdaysMinStrictRegex","_weekdaysMinRegex","minp","shortp","longp","minPieces","hFormat","hours","kFormat","lowercase","matchMeridiem","_meridiemParse","localeIsPM","seconds","kInput","_isPm","isPM","_meridiem","pos","pos1","pos2","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","isLower","baseConfig","dayOfMonthOrdinalParse","meridiemParse","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","loadLocale","isLocaleNameSane","oldLocale","_abbr","require","getSetGlobalLocale","values","getLocale","defineLocale","abbr","parentLocale","updateLocale","tmpLocale","listLocales","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","configFromISO","l","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","setUTCMinutes","getUTCMinutes","configFromString","createFromInputFallback","defaults","currentDateArray","nowValue","_useUTC","getUTCMonth","getUTCDate","getMonth","getDate","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","weekYear","temp","weekdayOverflow","curWeek","GG","W","E","createLocal","gg","ISO_8601","RFC_2822","skipped","stringLength","totalParsedInputLength","meridiemFixWrap","erasConvertYear","hour","isPm","meridiemHour","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","score","configFromObject","dayOrDate","minute","second","millisecond","createFromConfig","prepareConfig","preparse","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","ordering","isDurationValid","unitHasDecimal","orderLen","parseFloat","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","quarter","weeks","isoWeek","days","milliseconds","_milliseconds","_days","_data","_bubble","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","offset","separator","utcOffset","sign","offsetFromString","chunkOffset","matcher","matches","cloneWithOffset","model","clone","local","getDateOffset","getTimezoneOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","subtract","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","_isDSTShifted","toArray","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","ret","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","base","isAfter","isBefore","createAdder","direction","period","isAdding","invalid","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","propertyLen","arrayTest","dataTypeTest","filter","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","startOf","calendarFormat","localInput","endOf","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","that","zoneDelta","monthDiff","wholeMonthDiff","anchor","toISOString","keepOffset","toDate","inspect","prefix","suffix","zone","inputString","defaultFormatUtc","defaultFormat","postformat","humanize","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOfDate","isoWeekday","unix","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","localeEras","eras","_eras","since","until","Infinity","localeErasParse","eraName","narrow","localeErasConvertYear","dir","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","_erasNameRegex","_erasRegex","erasAbbrRegex","_erasAbbrRegex","erasNarrowRegex","_erasNarrowRegex","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","_eraYearOrdinalRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","isoWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","erasParse","eraYearOrdinalParse","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","parseZone","preParsePostFormat","for","eraNarrow","eraAbbr","eraYear","isoWeeks","weeksInWeekYear","isoWeeksInYear","isoWeeksInISOWeekYear","isDST","zoneAbbr","zoneName","dates","isDSTShifted","proto$1","get$1","field","setter","listMonthsImpl","out","listWeekdaysImpl","localeSorted","shift","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","firstDayOfYear","firstDayOfWeek","langData","mathAbs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","limit","argWithSuffix","argThresholds","withSuffix","th","assign","abs$1","toISOString$1","totalSign","ymSign","daysSign","hmsSign","total","toFixed","proto$2","toIsoString","version","relativeTimeRounding","relativeTimeThreshold","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","TIME","TIME_SECONDS","TIME_MS","_CommonUtils","formatDisplayDate","moment","requiredFieldRule","errorMessage","optionalFieldRule","isSigningIn","path","pathname","isSigningOut","fileDownload","fileName","fileType","blob","Blob","navigator","msSaveBlob","blobURL","URL","createObjectURL","webkitURL","tempLink","download","click","revokeObjectURL","statusListColor","textColor","color","ACTIVE","COMPLETE","REFUNDPROCESSED","WRITEOFFCOMPLETED","BOUNCED","NSF","LINKED","REFUNDREQUEST","REFUNDAUTHORIZED","WRITEOFFAUTHORIZED","WRITEOFFREQUESTED","VOID","appendCurrencySymbol","currency","cleanObject","remainingAmount","appendQueryParamsIfNeeded","targetUrl","route","requestParams","createQueryParams","query","convertAddressForComponent","address","addressCity","city","addressCountry","country","addressRegion","region","deliveryInstructions","postalCode","streetAddress","street","streetAddressAdditional","streetAdditional","convertAddressForAuth","iaddress","isApproverRole","approverRole","FAS_REFUND_APPROVER","isVoidRole","voidRole","FAS_VOID","isRefundProcessStatus","REFUNDREJECTED","REFUNDUPLOADED","isRefundRequestStatus","isEditEnabledBystatus","encodeURI","object","object1","object2","objKeys1","objKeys2","value1","value2","isObjects","isDeepEqual","CommonUtils","fetchConfig","PayApiUrl","getPayAPIURL","getAuthWebUrl","FasWebUrl","getFasWebUrl","getSiteminderLogoutUrl","saveConfigToSessionStorage","getSelfURL","getFasAPIURL","getKeycloakAuthUrl","getKeycloakRealm","getKeycloakClientId","getAddressCompleteKey","debounce","wait","immediate","timeout","callNow","hasCallFailed","activeCalls","isThereActiveCalls","computed","useIndicators","useLoader","isLoading","toggleLoading","changeLoadingStatus","isLoadingStatus","bind","wrap","isBuffer","isArrayBuffer","isFormData","FormData","isArrayBufferView","isPlainObject","getPrototypeOf","isFile","isBlob","isStream","pipe","isURLSearchParams","URLSearchParams","isStandardBrowserEnv","product","merge","assignValue","stripBOM","content","utils","encode","buildURL","paramsSerializer","serializedParams","serialize","parseValue","hashmarkIndex","InterceptorManager","handlers","synchronous","runWhen","InterceptorManager$1","eject","id","forEachHandler","InterceptorManager_1","normalizeHeaderName","headers","normalizedName","processHeader","enhanceError","request","response","isAxiosError","description","lineNumber","columnNumber","createError","settle","validateStatus","cookies","standardBrowserEnv","write","domain","secure","toGMTString","read","remove","isAbsoluteURL","combineURLs","baseURL","relativeURL","buildFullPath","requestedURL","ignoreDuplicateOf","parseHeaders","parser","line","isURLSameOrigin","originURL","msie","userAgent","urlParsingNode","resolveURL","host","search","requestURL","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","xhrAdapter","dispatchXhrRequest","requestData","requestHeaders","auth","password","unescape","Authorization","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","statusText","handleLoad","onabort","handleAbort","onerror","ontimeout","handleTimeout","timeoutErrorMessage","transitional","clarifyTimeoutError","xsrfValue","xsrfCookieName","xsrfHeaderName","onDownloadProgress","onUploadProgress","upload","cancelToken","onCanceled","cancel","abort","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","getDefaultAdapter","stringifySafely","rawValue","encoder","silentJSONParsing","forcedJSONParsing","transformRequest","transformResponse","strictJSONParsing","maxContentLength","maxBodyLength","defaults$3","common","Accept","utils$5","forEachMethodNoData","forEachMethodWithData","defaults_1","transformData","fns","transform","isCancel$1","isCancel","__CANCEL__","throwIfCancellationRequested","throwIfRequested","dispatchRequest","utils$3","cleanHeaderConfig","onAdapterResolution","onAdapterRejection","mergeConfig","config1","config2","valueFromConfig2Keys","mergeDeepPropertiesKeys","defaultToConfig2Keys","directMergeKeys","getMergedValue","mergeDeepProperties","valueFromConfig2","utils$2","defaultToConfig2","axiosKeys","otherKeys","filterAxiosKeys","pkg","validators","validator","thing","deprecatedWarnings","currentVerArr","isOlderVersion","thanVersion","pkgVersionArr","destVer","assertOptions","schema","allowUnknown","opt","validators$1","isDeprecated","formatMessage","desc","opts","Axios","instanceConfig","interceptors","Axios$2","boolean","requestInterceptorChain","synchronousRequestInterceptors","unshiftRequestInterceptors","interceptor","unshift","responseInterceptorChain","pushResponseInterceptors","chain","newConfig","onFulfilled","onRejected","getUri","utils$1","Axios_1","Cancel","Cancel_1","CancelToken","resolvePromise","promiseExecutor","CancelToken_1","spread","createInstance","defaultConfig","axios","axios$2","all","promises","require$$8","require$$9","axiosModule","default","showGlobalLoader","showGlobalErrorHandling","CodesService","getCodes","codeType","routingSlipStatusList","useCodes","getRoutingSlipStatusList","async","codes","useStatusList","props","toRefs","currentStatus","modalValue","emit","selectedStatusObject","statusList","onMounted","statusLabel","RoutingSlip","getRoutingSlip","routingNumber","createRoutingSlip","routingSlipRequest","post","adjustRoutingSlip","payments","routingSlipNumber","CORRECTION","patch","UPDATE_STATUS","updateRoutingSlipStatus","updateRoutingSlipRefundStatus","refund_status","updateRoutingSlipComments","slipNumber","updateRoutingSlipRefund","details","getSearchRoutingSlip","searchParams","saveLinkRoutingSlip","LinkRoutingSlip","getLinkedRoutingSlips","getDailyReport","selectedDate","getSearchFilingType","getFeeByCorpTypeAndFilingType","getFeeRequestParams","corpTypeCode","filingTypeCode","saveManualTransactions","transactions","cancelRoutingSlipInvoice","invoiceId","defaultParams","page","headerSearchTitleConstant","searchRoutingSlipResult","searchRoutingSlipParams","routingSlip","linkedRoutingSlips","routingSlipDetails","accountInfo","chequePayment","cashPayment","isPaymentMethodCheque","isAmountPaidInUsd","autoCompleteRoutingSlips","useRoutingSlip","invoiceCount","invoices","searchParamsExist","isRoutingSlipAChild","parentNumber","isRoutingSlipLinked","children","isRoutingSlipVoid","getRoutingSlipRequestPayload","RoutingSlipService","searchRoutingSlip","appendToResults","dateFilter","startDate","endDate","items","updateRoutingSlipChequeNumber","chequeNumToChange","payment","paymentIndex","chequeReceiptNumber","chequeNum","updateRoutingSlipAmount","amountToChange","isRoutingSlipPaidInUsd","paidUsdAmount","amount","paidAmount","paymentAccount","checkRoutingNumber","VALID","EXISTS","FAS_INVALID_ROUTING_SLIP_DIGITS","INVALID_DIGITS","statusDetails","resetRoutingSlipDetails","resetSearchParams","parentRoutingSlipNumber","LinkPrams","childRoutingSlipNumber","getDailyReportByDate","formatedDate","getAutoCompleteRoutingSlips","transation","referenceNumber","filingType","futureEffective","quantity","businessInfo","corpType","businessIdentifier","transactionParams","filingInfo","filingTypes","infiniteScrollCallback","comment","businessId","useSearch","isLibraryMode","fasUrl","reactive","showExpandedFolio","showExpandedCheque","searchParamsChanged","reachedEnd","headerSearch","displayedHeaderSearch","displayed","updateSearchFilter","updates","receiptNumber","refundStatus","accountName","initiator","searchNow","debouncedSearch","getNext","canShowColumn","columnName","find","header","applyDateFilter","dateRangeObj","getStatusLabel","clearFilter","formatFolioResult","invoice","toggleFolio","toggleCheque","navigateTo","$router","$route","getRefundStatusText","statusCode","PROCESSING","getStatusFromRefundStatus","_typeof","_defineProperty","enumerable","configurable","writable","_toConsumableArray","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","iter","reflectionIsSupported","Reflect","defineMetadata","getOwnMetadataKeys","copyReflectionMetadata","forwardMetadata","propertyKey","metaKey","metadata","getOwnMetadata","fakeArray","hasProto","createDecorator","Ctor","__decorators__","isPrimitive","collectDataFromConstructor","vm","Component","originalInit","_init","_this","$options","plainData","NODE_ENV","$internalHooks","componentFactory","_componentTag","methods","mixins","decorators","superProto","Super","Extended","forwardStaticMembers","reservedPropertyNames","shouldIgnore","callee","caller","Original","extendedDescriptor","superDescriptor","warn$1","registerHooks","__spreadArrays","reflectMetadataIsSupported","getMetadata","applyMetadata","Prop","componentOptions","DATEFILTER_CODES","useDateRange","dateRangeSelected","oldSelectedRange","dateRangeSelectedDisplay","dateFilterRanges","TODAY","YESTERDAY","LASTWEEK","LASTMONTH","CUSTOMRANGE","dateFilterSelectedIndex","dateFilterSelected","showDateFilter","pickerDate","isApplyFilterBtnValid","showDateRangeSelected","dateText","formatDatePickerDate","dateObj","dateFilterChange","today","yesterday","weekStart","weekEnd","monthStart","monthEnd","dateClick","cancelDateFilter","useSearchColumnFilterComponent","selectedHeaderSearchList","DateRangeFilter","__decorateClass$1","DateRangeFilter$1","setup","render","_vm","$createElement","_self","attrs","transition","scopedSlots","_u","_ref","on","readonly","filled","$$v","expression","$attrs","slot","_v","staticClass","dense","change","filterRange","domProps","textContent","_s","large","disabled","outlined","$event","innerHTML","width","range","$listeners","staticRenderFns","SearchColumnFilterComponent","SearchColumnFilterComponent$1","nav","$set","__vue2_script$2","defineComponent","required","column","__vue2_script","observerElement","observer","IntersectionObserver","entry","isIntersecting","observe","onBeforeUnmount","disconnect","useDashboard","addRoutingSlip","can","inserted","el","binding","canAccess","componentUpdated","behaviour","modifiers","disable","isCard","card","requestedAction","customeEl","commentNode","classList","pointerEvents","vnode","createComment","elm","isComment","tag","directives","componentInstance","$el","parentNode","replaceChild","Boolean","colors","commonUtil","components","statusListComponent","TableObserver","_objectDestructuringEmpty","class","sm","cols","rawName","hide","dark","small","height","loading","$t","proxy","autocomplete","placeholder","applied","_ref2","paymentMethod","createdName","routingSlipDate","CHEQUE_UNDELIVERABLE","folio","CHEQUE","colspan","intersect","numberFormatKeys","dateTimeFormatKeys","isBoolean","OBJECT_STRING","isNull","parseArgs","looseClone","delete","arrayFrom","hasOwn","arguments$1","looseEqual","isObjectA","isObjectB","isArrayA","isArrayB","every","keysA","keysB","escapeHtml","rawText","escapeParams","_i18n","i18n","$i18n","_t","_getMessages","$tc","choice","_tc","$te","_te","$d","$n","defineMixin","bridge","mounted","$root","__INTLIFY_META__","beforeCreate","__i18nBridge","__i18n","VueI18n","localeMessages","messages","mergeLocaleMessage","_i18nWatcher","watchI18nData","rootI18n","formatter","fallbackLocale","formatFallbackMessages","silentTranslationWarn","silentFallbackWarn","pluralizationRules","preserveDirectiveContent","localeMessages$1","sharedMessages","sync","_localeWatcher","watchLocale","onComponentInstanceCreated","parent","beforeMount","subscribeDataChanging","_subscribing","beforeDestroy","$nextTick","unsubscribeDataChanging","destroyVM","interpolationComponent","functional","places","slots","onlyHasDefaultPlace","useLegacyPlaces","createParamsFromPlaces","everyPlace","child","vnodeHasPlaceAttribute","assignChildPlace","assignChildIndex","place","numberComponent","Number","_ntp","part","assert","oldVNode","localeEqual","oldValue","_localeMessage","getLocaleMessage","unbind","preserve","_vt","ref$1","ref$2","tc","makeParams","install","_Vue","installed","mixin","directive","component","optionMergeStrategies","parentVal","childVal","BaseFormatter","_caches","interpolate","compile","RE_TOKEN_LIST_VALUE","RE_TOKEN_NAMED_VALUE","position","char","isClosed","compiled","mode","APPEND","PUSH","INC_SUB_PATH_DEPTH","PUSH_SUB_PATH","BEFORE_PATH","IN_PATH","BEFORE_IDENT","IN_IDENT","IN_SUB_PATH","IN_SINGLE_QUOTE","IN_DOUBLE_QUOTE","AFTER_PATH","pathStateMachine","ident","eof","else","literalValueRE","isLiteral","stripQuotes","getPathCharType","ch","formatSubPath","trimmed","parse$1","newChar","typeMap","subPathDepth","maybeUnescapeQuote","nextChar","I18nPath","_cache","parsePath","hit","getPathValue","paths","last","htmlTagMatcher","linkKeyMatcher","linkKeyPrefixMatcher","bracketsMatcher","defaultModifiers","upper","toLocaleUpperCase","lower","capitalize","defaultFormatter","this$1","dateTimeFormats","datetimeFormats","numberFormats","_formatter","_modifiers","_missing","missing","_root","_sync","_fallbackRoot","fallbackRoot","_fallbackRootWithEmptyString","fallbackRootWithEmptyString","_formatFallbackMessages","_silentTranslationWarn","_silentFallbackWarn","_dateTimeFormatters","_numberFormatters","_path","_dataListeners","Set","_componentInstanceCreatedListener","componentInstanceCreatedListener","_preserveDirectiveContent","_warnHtmlInMessage","warnHtmlInMessage","_postTranslation","postTranslation","_escapeParameterHtml","escapeParameterHtml","__VUE_I18N_BRIDGE__","getChoiceIndex","choicesLength","thisPrototype","_choice","_choicesLength","_exist","_checkLocaleMessage","_initVM","prototypeAccessors","availableLocales","availabilities","level","silent","__VUE18N__INSTANCE__","$destroy","$watch","listeners","nextTick","$forceUpdate","deep","composer","target$1","newI18n","_getDateTimeFormats","_getNumberFormats","_localeChainCache","fallback","orgLevel","_warnDefault","interpolateMode","missingRet","_isSilentTranslationWarn","parsedArgs","_render","_isFallbackRoot","_isSilentFallbackWarn","_isSilentFallback","_interpolate","visitedLinkStack","pathRet","_link","idx","link","linkKeyPrefixMatches","linkPrefix","formatterName","linkPlaceholder","reverse","translated","_translate","_createMessageContext","_list","_named","list","named","linked","linkedKey","_appendItemToChain","follow","_appendLocaleToChain","_appendBlockToChain","_getLocaleChain","predefined","count","fetchChoice","choices","te","setLocaleMessage","getDateTimeFormat","setDateTimeFormat","_clearDateTimeFormat","mergeDateTimeFormat","_localizeDateTime","current","Intl","DateTimeFormat","dateTimeFormat","getNumberFormat","setNumberFormat","_clearNumberFormat","mergeNumberFormat","_getNumberFormatter","NumberFormat","_n","numberFormat","formatToParts","defineProperties","intlDefined","VueI18n$1","i18nInstance","createI18n","initialize","vue","VUE_APP_I18N_LOCALE","VUE_APP_I18N_FALLBACK_LOCALE","loadLocaleMessages","en","enLocals","OurVue","initializeI18n","fasStore","Search","plugin","GlobalVue"],"mappings":";;AAGAA,MAAIC,IAAIC;ACHIC,IAAAA,sBAAAA,IACVA,EAAgB,cAAA,iBAChBA,EAAe,aAAA,kBACfA,EAAoB,kBAAA,WACpBA,EAAsB,oBAAA,uBACtBA,EAAgB,cAAA,iBAChBA,EAAa,WAAA,eACbA,EAAa,WAAA,eACbA,EAAY,UAAA,cACZA,EAAe,aAAA,iBACfA,EAAY,UAAA,cACZA,EAAsB,oBAAA,wBAXZA,IAAAA,sBAAA,CAAA,GAcAC,iBAAAA,IACVA,EAAQ,MAAA,QACRA,EAAY,UAAA,YACZA,EAAW,SAAA,WACXA,EAAY,UAAA,YACZA,EAAc,YAAA,cALJA,IAAAA,iBAAA,CAAA,GAQAC,gBAAAA,IACVA,EAAO,KAAA,OACPA,EAAS,OAAA,SAFCA,IAAAA,gBAAA,CAAA,GAKAC,YAAAA,IACVA,EAAS,OAAA,SACTA,EAAW,SAAA,WACXA,EAAU,QAAA,UACVA,EAAM,IAAA,MACNA,EAAS,OAAA,SACTA,EAAO,KAAA,OACPA,EAAO,KAAA,OACPA,EAAS,OAAA,SACTA,EAAgB,cAAA,mBAChBA,EAAmB,iBAAA,oBACnBA,EAAkB,gBAAA,mBAClBA,EAAiB,eAAA,kBACjBA,EAAiB,eAAA,kBACjBA,EAAwB,sBAAA,wBACxBA,EAAsB,sBAAA,2BACtBA,EAAmB,m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,9,10,11,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,52,53,54,55,70,71]} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 53cef459..6eb3374c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "fas-ui", - "version": "1.2.17", + "version": "1.2.16", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "fas-ui", - "version": "1.2.17", + "version": "1.2.16", "dependencies": { "@bcrs-shared-components/base-address": "^2.0.3", "@bcrs-shared-components/enums": "^1.0.51", diff --git a/package.json b/package.json index 8791ebe1..cffa2370 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fas-ui", - "version": "1.2.17", + "version": "1.2.16", "private": true, "main": "./lib/lib.umd.min.js", "appName": "FAS UI",